From d6725f1e9cb6ff5515bacdb02394ae55024b5b1b Mon Sep 17 00:00:00 2001 From: Jorge Ferreira Date: Fri, 30 Oct 2026 20:51:38 +0000 Subject: [PATCH 1/6] web: add a tab overflow menu and reveal panes hidden by a maximize Signed-off-by: Jorge Ferreira --- src/web/dist/app.min.js | 734 ++++++++++++++--------- src/web/dist/report.min.js | 324 +++++++--- src/web/src/grid-layout.js | 443 ++++++++++++-- src/web/src/main.js | 7 +- src/web/src/menu-bar.js | 31 +- src/web/src/schematic-widget.js | 9 +- src/web/src/timing-widget.js | 46 +- src/web/src/ui-utils.js | 10 +- src/web/test/js/setup-dom.js | 1 + src/web/test/js/test-ide-layout.js | 410 ++++++++++++- src/web/test/js/test-menu-bar.js | 18 + src/web/test/js/test-schematic-widget.js | 14 +- src/web/test/js/test-timing-widget.js | 67 +++ src/web/test/js/test-ui-utils.js | 7 + 14 files changed, 1675 insertions(+), 446 deletions(-) diff --git a/src/web/dist/app.min.js b/src/web/dist/app.min.js index 2d27884cd97..2e1c2dbbb8d 100644 --- a/src/web/dist/app.min.js +++ b/src/web/dist/app.min.js @@ -1,13 +1,13 @@ -(()=>{var j3e=Object.create;var v_t=Object.defineProperty;var H3e=Object.getOwnPropertyDescriptor;var G3e=Object.getOwnPropertyNames;var W3e=Object.getPrototypeOf,$3e=Object.prototype.hasOwnProperty;var TI=(d=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(d,{get:(s,h)=>(typeof require<"u"?require:s)[h]}):d)(function(d){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+d+'" is not supported')});var Ld=(d,s)=>()=>(s||d((s={exports:{}}).exports,s),s.exports),V3e=(d,s)=>{for(var h in s)v_t(d,h,{get:s[h],enumerable:!0})},q3e=(d,s,h,g)=>{if(s&&typeof s=="object"||typeof s=="function")for(let m of G3e(s))!$3e.call(d,m)&&m!==h&&v_t(d,m,{get:()=>s[m],enumerable:!(g=H3e(s,m))||g.enumerable});return d};var AXt=(d,s,h)=>(h=d!=null?j3e(W3e(d)):{},q3e(s||!d||!d.__esModule?v_t(h,"default",{value:d,enumerable:!0}):h,d));var LXt=Ld((btt,kXt)=>{(function(d,s){typeof btt=="object"&&typeof kXt<"u"?s(btt):typeof define=="function"&&define.amd?define(["exports"],s):(d=typeof globalThis<"u"?globalThis:d||self,s(d.leaflet={}))})(btt,function(d){"use strict";var s="1.9.4";function h(w){var E,D,V,st;for(D=1,V=arguments.length;D"u"||!L||!L.Mixin)){w=X(w)?w:[w];for(var E=0;E0?Math.floor(w):Math.ceil(w)};re.prototype={clone:function(){return new re(this.x,this.y)},add:function(w){return this.clone()._add(Se(w))},_add:function(w){return this.x+=w.x,this.y+=w.y,this},subtract:function(w){return this.clone()._subtract(Se(w))},_subtract:function(w){return this.x-=w.x,this.y-=w.y,this},divideBy:function(w){return this.clone()._divideBy(w)},_divideBy:function(w){return this.x/=w,this.y/=w,this},multiplyBy:function(w){return this.clone()._multiplyBy(w)},_multiplyBy:function(w){return this.x*=w,this.y*=w,this},scaleBy:function(w){return new re(this.x*w.x,this.y*w.y)},unscaleBy:function(w){return new re(this.x/w.x,this.y/w.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=hn(this.x),this.y=hn(this.y),this},distanceTo:function(w){w=Se(w);var E=w.x-this.x,D=w.y-this.y;return Math.sqrt(E*E+D*D)},equals:function(w){return w=Se(w),w.x===this.x&&w.y===this.y},contains:function(w){return w=Se(w),Math.abs(w.x)<=Math.abs(this.x)&&Math.abs(w.y)<=Math.abs(this.y)},toString:function(){return"Point("+B(this.x)+", "+B(this.y)+")"}};function Se(w,E,D){return w instanceof re?w:X(w)?new re(w[0],w[1]):w==null?w:typeof w=="object"&&"x"in w&&"y"in w?new re(w.x,w.y):new re(w,E,D)}function ke(w,E){if(w)for(var D=E?[w,E]:w,V=0,st=D.length;V=this.min.x&&D.x<=this.max.x&&E.y>=this.min.y&&D.y<=this.max.y},intersects:function(w){w=mn(w);var E=this.min,D=this.max,V=w.min,st=w.max,vt=st.x>=E.x&&V.x<=D.x,$t=st.y>=E.y&&V.y<=D.y;return vt&&$t},overlaps:function(w){w=mn(w);var E=this.min,D=this.max,V=w.min,st=w.max,vt=st.x>E.x&&V.xE.y&&V.y=E.lat&&st.lat<=D.lat&&V.lng>=E.lng&&st.lng<=D.lng},intersects:function(w){w=Qn(w);var E=this._southWest,D=this._northEast,V=w.getSouthWest(),st=w.getNorthEast(),vt=st.lat>=E.lat&&V.lat<=D.lat,$t=st.lng>=E.lng&&V.lng<=D.lng;return vt&&$t},overlaps:function(w){w=Qn(w);var E=this._southWest,D=this._northEast,V=w.getSouthWest(),st=w.getNorthEast(),vt=st.lat>E.lat&&V.latE.lng&&V.lng1,oi=function(){var w=!1;try{var E=Object.defineProperty({},"passive",{get:function(){w=!0}});window.addEventListener("testPassiveEventSupport",N,E),window.removeEventListener("testPassiveEventSupport",N,E)}catch{}return w}(),Jr=function(){return!!document.createElement("canvas").getContext}(),Bs=!!(document.createElementNS&&ut("svg").createSVGRect),Oc=!!Bs&&function(){var w=document.createElement("div");return w.innerHTML="",(w.firstChild&&w.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),ru=!Bs&&function(){try{var w=document.createElement("div");w.innerHTML='';var E=w.firstChild;return E.style.behavior="url(#default#VML)",E&&typeof E.adj=="object"}catch{return!1}}(),fc=navigator.platform.indexOf("Mac")===0,il=navigator.platform.indexOf("Linux")===0;function va(w){return navigator.userAgent.toLowerCase().indexOf(w)>=0}var Mr={ie,ielt9:rn,edge:Pn,webkit:Tt,android:yt,android23:ue,androidStock:An,opera:zn,chrome:Li,gecko:xi,safari:Jt,phantom:nn,opera12:vn,win:he,ie3d:Mn,webkit3d:Sn,gecko3d:gn,any3d:Ce,mobile:dn,mobileWebkit:jn,mobileWebkit3d:ar,msPointer:gr,pointer:tr,touch:Qt,touchNative:Ln,mobileOpera:Mi,mobileGecko:sn,retina:Zn,passiveEvents:oi,canvas:Jr,svg:Bs,vml:ru,inlineSvg:Oc,mac:fc,linux:il},iv=Mr.msPointer?"MSPointerDown":"pointerdown",U0=Mr.msPointer?"MSPointerMove":"pointermove",rv=Mr.msPointer?"MSPointerUp":"pointerup",z0=Mr.msPointer?"MSPointerCancel":"pointercancel",j0={touchstart:iv,touchmove:U0,touchend:rv,touchcancel:z0},sv={touchstart:Pr,touchmove:Hi,touchend:Hi,touchcancel:Hi},vg={},ov=!1;function c3(w,E,D){return E==="touchstart"&&Ze(),sv[E]?(D=sv[E].bind(this,D),w.addEventListener(j0[E],D,!1),D):(console.warn("wrong event specified:",E),N)}function Rt(w,E,D){if(!j0[E]){console.warn("wrong event specified:",E);return}w.removeEventListener(j0[E],D,!1)}function ve(w){vg[w.pointerId]=w}function Je(w){vg[w.pointerId]&&(vg[w.pointerId]=w)}function tn(w){delete vg[w.pointerId]}function Ze(){ov||(document.addEventListener(iv,ve,!0),document.addEventListener(U0,Je,!0),document.addEventListener(rv,tn,!0),document.addEventListener(z0,tn,!0),ov=!0)}function Hi(w,E){if(E.pointerType!==(E.MSPOINTER_TYPE_MOUSE||"mouse")){E.touches=[];for(var D in vg)E.touches.push(vg[D]);E.changedTouches=[E],w(E)}}function Pr(w,E){E.MSPOINTER_TYPE_TOUCH&&E.pointerType===E.MSPOINTER_TYPE_TOUCH&&sl(E),Hi(w,E)}function Gr(w){var E={},D,V;for(V in w)D=w[V],E[V]=D&&D.bind?D.bind(w):D;return w=E,E.type="dblclick",E.detail=2,E.isTrusted=!1,E._simulated=!0,E}var hs=200;function Fs(w,E){w.addEventListener("dblclick",E);var D=0,V;function st(vt){if(vt.detail!==1){V=vt.detail;return}if(!(vt.pointerType==="mouse"||vt.sourceCapabilities&&!vt.sourceCapabilities.firesTouchEvents)){var $t=Bc(vt);if(!($t.some(function(Ye){return Ye instanceof HTMLLabelElement&&Ye.attributes.for})&&!$t.some(function(Ye){return Ye instanceof HTMLInputElement||Ye instanceof HTMLSelectElement}))){var _e=Date.now();_e-D<=hs?(V++,V===2&&E(Gr(vt))):V=1,D=_e}}}return w.addEventListener("click",st),{dblclick:E,simDblclick:st}}function Ms(w,E){w.removeEventListener("dblclick",E.dblclick),w.removeEventListener("click",E.simDblclick)}var bs=u1(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Tc=u1(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),rl=Tc==="webkitTransition"||Tc==="OTransition"?Tc+"End":"transitionend";function Oa(w){return typeof w=="string"?document.getElementById(w):w}function wh(w,E){var D=w.style[E]||w.currentStyle&&w.currentStyle[E];if((!D||D==="auto")&&document.defaultView){var V=document.defaultView.getComputedStyle(w,null);D=V?V[E]:null}return D==="auto"?null:D}function Nr(w,E,D){var V=document.createElement(w);return V.className=E||"",D&&D.appendChild(V),V}function mr(w){var E=w.parentNode;E&&E.removeChild(w)}function a1(w){for(;w.firstChild;)w.removeChild(w.firstChild)}function dc(w){var E=w.parentNode;E&&E.lastChild!==w&&E.appendChild(w)}function vh(w){var E=w.parentNode;E&&E.firstChild!==w&&E.insertBefore(w,E.firstChild)}function _g(w,E){if(w.classList!==void 0)return w.classList.contains(E);var D=ff(w);return D.length>0&&new RegExp("(^|\\s)"+E+"(\\s|$)").test(D)}function ws(w,E){if(w.classList!==void 0)for(var D=U(E),V=0,st=D.length;V0?2*window.devicePixelRatio:1;function xS(w){return Mr.edge?w.wheelDeltaY/2:w.deltaY&&w.deltaMode===0?-w.deltaY/wk:w.deltaY&&w.deltaMode===1?-w.deltaY*20:w.deltaY&&w.deltaMode===2?-w.deltaY*60:w.deltaX||w.deltaZ?0:w.wheelDelta?(w.wheelDeltaY||w.wheelDelta)/2:w.detail&&Math.abs(w.detail)<32765?-w.detail*20:w.detail?w.detail/-32765*60:0}function d3(w,E){var D=E.relatedTarget;if(!D)return!0;try{for(;D&&D!==w;)D=D.parentNode}catch{return!1}return D!==w}var vk={__proto__:null,on:As,off:Vc,stopPropagation:W0,disableScrollPropagation:f3,disableClickPropagation:lv,preventDefault:sl,stop:rc,getPropagationPath:Bc,getMousePosition:yS,getWheelDelta:xS,isExternalTarget:d3,addListener:As,removeListener:Vc},MS=xe.extend({run:function(w,E,D,V){this.stop(),this._el=w,this._inProgress=!0,this._duration=D||.25,this._easeOutPower=1/Math.max(V||.5,.2),this._startPos=yg(w),this._offset=E.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=ot(this._animate,this),this._step()},_step:function(w){var E=+new Date-this._startTime,D=this._duration*1e3;Ethis.options.maxZoom)?this.setZoom(w):this},panInsideBounds:function(w,E){this._enforcingBounds=!0;var D=this.getCenter(),V=this._limitCenter(D,this._zoom,Qn(w));return D.equals(V)||this.panTo(V,E),this._enforcingBounds=!1,this},panInside:function(w,E){E=E||{};var D=Se(E.paddingTopLeft||E.padding||[0,0]),V=Se(E.paddingBottomRight||E.padding||[0,0]),st=this.project(this.getCenter()),vt=this.project(w),$t=this.getPixelBounds(),_e=mn([$t.min.add(D),$t.max.subtract(V)]),Ye=_e.getSize();if(!_e.contains(vt)){this._enforcingBounds=!0;var Un=vt.subtract(_e.getCenter()),Ji=_e.extend(vt).getSize().subtract(Ye);st.x+=Un.x<0?-Ji.x:Ji.x,st.y+=Un.y<0?-Ji.y:Ji.y,this.panTo(this.unproject(st),E),this._enforcingBounds=!1}return this},invalidateSize:function(w){if(!this._loaded)return this;w=h({animate:!1,pan:!0},w===!0?{animate:!0}:w);var E=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var D=this.getSize(),V=E.divideBy(2).round(),st=D.divideBy(2).round(),vt=V.subtract(st);return!vt.x&&!vt.y?this:(w.animate&&w.pan?this.panBy(vt):(w.pan&&this._rawPanBy(vt),this.fire("move"),w.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(m(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:E,newSize:D}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(w){if(w=this._locateOptions=h({timeout:1e4,watch:!1},w),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var E=m(this._handleGeolocationResponse,this),D=m(this._handleGeolocationError,this);return w.watch?this._locationWatchId=navigator.geolocation.watchPosition(E,D,w):navigator.geolocation.getCurrentPosition(E,D,w),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(w){if(this._container._leaflet_id){var E=w.code,D=w.message||(E===1?"permission denied":E===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:E,message:"Geolocation error: "+D+"."})}},_handleGeolocationResponse:function(w){if(this._container._leaflet_id){var E=w.coords.latitude,D=w.coords.longitude,V=new ge(E,D),st=V.toBounds(w.coords.accuracy*2),vt=this._locateOptions;if(vt.setView){var $t=this.getBoundsZoom(st);this.setView(V,vt.maxZoom?Math.min($t,vt.maxZoom):$t)}var _e={latlng:V,bounds:st,timestamp:w.timestamp};for(var Ye in w.coords)typeof w.coords[Ye]=="number"&&(_e[Ye]=w.coords[Ye]);this.fire("locationfound",_e)}},addHandler:function(w,E){if(!E)return this;var D=this[w]=new E(this);return this._handlers.push(D),this.options[w]&&D.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),mr(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(Lt(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var w;for(w in this._layers)this._layers[w].remove();for(w in this._panes)mr(this._panes[w]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(w,E){var D="leaflet-pane"+(w?" leaflet-"+w.replace("Pane","")+"-pane":""),V=Nr("div",D,E||this._mapPane);return w&&(this._panes[w]=V),V},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var w=this.getPixelBounds(),E=this.unproject(w.getBottomLeft()),D=this.unproject(w.getTopRight());return new en(E,D)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(w,E,D){w=Qn(w),D=Se(D||[0,0]);var V=this.getZoom()||0,st=this.getMinZoom(),vt=this.getMaxZoom(),$t=w.getNorthWest(),_e=w.getSouthEast(),Ye=this.getSize().subtract(D),Un=mn(this.project(_e,V),this.project($t,V)).getSize(),Ji=Mr.any3d?this.options.zoomSnap:1,Qr=Ye.x/Un.x,Is=Ye.y/Un.y,ol=E?Math.max(Qr,Is):Math.min(Qr,Is);return V=this.getScaleZoom(ol,V),Ji&&(V=Math.round(V/(Ji/100))*(Ji/100),V=E?Math.ceil(V/Ji)*Ji:Math.floor(V/Ji)*Ji),Math.max(st,Math.min(vt,V))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new re(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(w,E){var D=this._getTopLeftPoint(w,E);return new ke(D,D.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(w){return this.options.crs.getProjectedBounds(w===void 0?this.getZoom():w)},getPane:function(w){return typeof w=="string"?this._panes[w]:w},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(w,E){var D=this.options.crs;return E=E===void 0?this._zoom:E,D.scale(w)/D.scale(E)},getScaleZoom:function(w,E){var D=this.options.crs;E=E===void 0?this._zoom:E;var V=D.zoom(w*D.scale(E));return isNaN(V)?1/0:V},project:function(w,E){return E=E===void 0?this._zoom:E,this.options.crs.latLngToPoint(Pe(w),E)},unproject:function(w,E){return E=E===void 0?this._zoom:E,this.options.crs.pointToLatLng(Se(w),E)},layerPointToLatLng:function(w){var E=Se(w).add(this.getPixelOrigin());return this.unproject(E)},latLngToLayerPoint:function(w){var E=this.project(Pe(w))._round();return E._subtract(this.getPixelOrigin())},wrapLatLng:function(w){return this.options.crs.wrapLatLng(Pe(w))},wrapLatLngBounds:function(w){return this.options.crs.wrapLatLngBounds(Qn(w))},distance:function(w,E){return this.options.crs.distance(Pe(w),Pe(E))},containerPointToLayerPoint:function(w){return Se(w).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(w){return Se(w).add(this._getMapPanePos())},containerPointToLatLng:function(w){var E=this.containerPointToLayerPoint(Se(w));return this.layerPointToLatLng(E)},latLngToContainerPoint:function(w){return this.layerPointToContainerPoint(this.latLngToLayerPoint(Pe(w)))},mouseEventToContainerPoint:function(w){return yS(w,this._container)},mouseEventToLayerPoint:function(w){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(w))},mouseEventToLatLng:function(w){return this.layerPointToLatLng(this.mouseEventToLayerPoint(w))},_initContainer:function(w){var E=this._container=Oa(w);if(E){if(E._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");As(E,"scroll",this._onScroll,this),this._containerId=S(E)},_initLayout:function(){var w=this._container;this._fadeAnimated=this.options.fadeAnimation&&Mr.any3d,ws(w,"leaflet-container"+(Mr.touch?" leaflet-touch":"")+(Mr.retina?" leaflet-retina":"")+(Mr.ielt9?" leaflet-oldie":"")+(Mr.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var E=wh(w,"position");E!=="absolute"&&E!=="relative"&&E!=="fixed"&&E!=="sticky"&&(w.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var w=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ya(this._mapPane,new re(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ws(w.markerPane,"leaflet-zoom-hide"),ws(w.shadowPane,"leaflet-zoom-hide"))},_resetView:function(w,E,D){ya(this._mapPane,new re(0,0));var V=!this._loaded;this._loaded=!0,E=this._limitZoom(E),this.fire("viewprereset");var st=this._zoom!==E;this._moveStart(st,D)._move(w,E)._moveEnd(st),this.fire("viewreset"),V&&this.fire("load")},_moveStart:function(w,E){return w&&this.fire("zoomstart"),E||this.fire("movestart"),this},_move:function(w,E,D,V){E===void 0&&(E=this._zoom);var st=this._zoom!==E;return this._zoom=E,this._lastCenter=w,this._pixelOrigin=this._getNewPixelOrigin(w),V?D&&D.pinch&&this.fire("zoom",D):((st||D&&D.pinch)&&this.fire("zoom",D),this.fire("move",D)),this},_moveEnd:function(w){return w&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return Lt(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(w){ya(this._mapPane,this._getMapPanePos().subtract(w))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(w){this._targets={},this._targets[S(this._container)]=this;var E=w?Vc:As;E(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&E(window,"resize",this._onResize,this),Mr.any3d&&this.options.transform3DLimit&&(w?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){Lt(this._resizeRequest),this._resizeRequest=ot(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var w=this._getMapPanePos();Math.max(Math.abs(w.x),Math.abs(w.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(w,E){for(var D=[],V,st=E==="mouseout"||E==="mouseover",vt=w.target||w.srcElement,$t=!1;vt;){if(V=this._targets[S(vt)],V&&(E==="click"||E==="preclick")&&this._draggableMoved(V)){$t=!0;break}if(V&&V.listens(E,!0)&&(st&&!d3(vt,w)||(D.push(V),st))||vt===this._container)break;vt=vt.parentNode}return!D.length&&!$t&&!st&&this.listens(E,!0)&&(D=[this]),D},_isClickDisabled:function(w){for(;w&&w!==this._container;){if(w._leaflet_disable_click)return!0;w=w.parentNode}},_handleDOMEvent:function(w){var E=w.target||w.srcElement;if(!(!this._loaded||E._leaflet_disable_events||w.type==="click"&&this._isClickDisabled(E))){var D=w.type;D==="mousedown"&&ky(E),this._fireDOMEvent(w,D)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(w,E,D){if(w.type==="click"){var V=h({},w);V.type="preclick",this._fireDOMEvent(V,V.type,D)}var st=this._findEventTargets(w,E);if(D){for(var vt=[],$t=0;$t0?Math.round(w-E)/2:Math.max(0,Math.ceil(w))-Math.max(0,Math.floor(E))},_limitZoom:function(w){var E=this.getMinZoom(),D=this.getMaxZoom(),V=Mr.any3d?this.options.zoomSnap:1;return V&&(w=Math.round(w/V)*V),Math.max(E,Math.min(D,w))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){$c(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(w,E){var D=this._getCenterOffset(w)._trunc();return(E&&E.animate)!==!0&&!this.getSize().contains(D)?!1:(this.panBy(D,E),!0)},_createAnimProxy:function(){var w=this._proxy=Nr("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(w),this.on("zoomanim",function(E){var D=bs,V=this._proxy.style[D];Nd(this._proxy,this.project(E.center,E.zoom),this.getZoomScale(E.zoom,1)),V===this._proxy.style[D]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){mr(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var w=this.getCenter(),E=this.getZoom();Nd(this._proxy,this.project(w,E),this.getZoomScale(E,1))},_catchTransitionEnd:function(w){this._animatingZoom&&w.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(w,E,D){if(this._animatingZoom)return!0;if(D=D||{},!this._zoomAnimated||D.animate===!1||this._nothingToAnimate()||Math.abs(E-this._zoom)>this.options.zoomAnimationThreshold)return!1;var V=this.getZoomScale(E),st=this._getCenterOffset(w)._divideBy(1-1/V);return D.animate!==!0&&!this.getSize().contains(st)?!1:(ot(function(){this._moveStart(!0,D.noMoveStart||!1)._animateZoom(w,E,!0)},this),!0)},_animateZoom:function(w,E,D,V){this._mapPane&&(D&&(this._animatingZoom=!0,this._animateToCenter=w,this._animateToZoom=E,ws(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:w,zoom:E,noUpdate:V}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(m(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&$c(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function _k(w,E){return new Co(w,E)}var Cc=ln.extend({options:{position:"topright"},initialize:function(w){W(this,w)},getPosition:function(){return this.options.position},setPosition:function(w){var E=this._map;return E&&E.removeControl(this),this.options.position=w,E&&E.addControl(this),this},getContainer:function(){return this._container},addTo:function(w){this.remove(),this._map=w;var E=this._container=this.onAdd(w),D=this.getPosition(),V=w._controlCorners[D];return ws(E,"leaflet-control"),D.indexOf("bottom")!==-1?V.insertBefore(E,V.firstChild):V.appendChild(E),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(mr(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(w){this._map&&w&&w.screenX>0&&w.screenY>0&&this._map.getContainer().focus()}}),$0=function(w){return new Cc(w)};Co.include({addControl:function(w){return w.addTo(this),this},removeControl:function(w){return w.remove(),this},_initControlPos:function(){var w=this._controlCorners={},E="leaflet-",D=this._controlContainer=Nr("div",E+"control-container",this._container);function V(st,vt){var $t=E+st+" "+E+vt;w[st+vt]=Nr("div",$t,D)}V("top","left"),V("top","right"),V("bottom","left"),V("bottom","right")},_clearControlPos:function(){for(var w in this._controlCorners)mr(this._controlCorners[w]);mr(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Mg=Cc.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(w,E,D,V){return D1,this._baseLayersList.style.display=w?"":"none"),this._separator.style.display=E&&w?"":"none",this},_onLayerChange:function(w){this._handlingClick||this._update();var E=this._getLayer(S(w.target)),D=E.overlay?w.type==="add"?"overlayadd":"overlayremove":w.type==="add"?"baselayerchange":null;D&&this._map.fire(D,E)},_createRadioElement:function(w,E){var D='",V=document.createElement("div");return V.innerHTML=D,V.firstChild},_addItem:function(w){var E=document.createElement("label"),D=this._map.hasLayer(w.layer),V;w.overlay?(V=document.createElement("input"),V.type="checkbox",V.className="leaflet-control-layers-selector",V.defaultChecked=D):V=this._createRadioElement("leaflet-base-layers_"+S(this),D),this._layerControlInputs.push(V),V.layerId=S(w.layer),As(V,"click",this._onInputClick,this);var st=document.createElement("span");st.innerHTML=" "+w.name;var vt=document.createElement("span");E.appendChild(vt),vt.appendChild(V),vt.appendChild(st);var $t=w.overlay?this._overlaysList:this._baseLayersList;return $t.appendChild(E),this._checkDisabledLayers(),E},_onInputClick:function(){if(!this._preventClick){var w=this._layerControlInputs,E,D,V=[],st=[];this._handlingClick=!0;for(var vt=w.length-1;vt>=0;vt--)E=w[vt],D=this._getLayer(E.layerId).layer,E.checked?V.push(D):E.checked||st.push(D);for(vt=0;vt=0;st--)E=w[st],D=this._getLayer(E.layerId).layer,E.disabled=D.options.minZoom!==void 0&&VD.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var w=this._section;this._preventClick=!0,As(w,"click",sl),this.expand();var E=this;setTimeout(function(){Vc(w,"click",sl),E._preventClick=!1})}}),ES=function(w,E,D){return new Mg(w,E,D)},hv=Cc.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(w){var E="leaflet-control-zoom",D=Nr("div",E+" leaflet-bar"),V=this.options;return this._zoomInButton=this._createButton(V.zoomInText,V.zoomInTitle,E+"-in",D,this._zoomIn),this._zoomOutButton=this._createButton(V.zoomOutText,V.zoomOutTitle,E+"-out",D,this._zoomOut),this._updateDisabled(),w.on("zoomend zoomlevelschange",this._updateDisabled,this),D},onRemove:function(w){w.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(w){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(w.shiftKey?3:1))},_createButton:function(w,E,D,V,st){var vt=Nr("a",D,V);return vt.innerHTML=w,vt.href="#",vt.title=E,vt.setAttribute("role","button"),vt.setAttribute("aria-label",E),lv(vt),As(vt,"click",rc),As(vt,"click",st,this),As(vt,"click",this._refocusOnMap,this),vt},_updateDisabled:function(){var w=this._map,E="leaflet-disabled";$c(this._zoomInButton,E),$c(this._zoomOutButton,E),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||w._zoom===w.getMinZoom())&&(ws(this._zoomOutButton,E),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||w._zoom===w.getMaxZoom())&&(ws(this._zoomInButton,E),this._zoomInButton.setAttribute("aria-disabled","true"))}});Co.mergeOptions({zoomControl:!0}),Co.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new hv,this.addControl(this.zoomControl))});var Xf=function(w){return new hv(w)},p3=Cc.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(w){var E="leaflet-control-scale",D=Nr("div",E),V=this.options;return this._addScales(V,E+"-line",D),w.on(V.updateWhenIdle?"moveend":"move",this._update,this),w.whenReady(this._update,this),D},onRemove:function(w){w.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(w,E,D){w.metric&&(this._mScale=Nr("div",E,D)),w.imperial&&(this._iScale=Nr("div",E,D))},_update:function(){var w=this._map,E=w.getSize().y/2,D=w.distance(w.containerPointToLatLng([0,E]),w.containerPointToLatLng([this.options.maxWidth,E]));this._updateScales(D)},_updateScales:function(w){this.options.metric&&w&&this._updateMetric(w),this.options.imperial&&w&&this._updateImperial(w)},_updateMetric:function(w){var E=this._getRoundNum(w),D=E<1e3?E+" m":E/1e3+" km";this._updateScale(this._mScale,D,E/w)},_updateImperial:function(w){var E=w*3.2808399,D,V,st;E>5280?(D=E/5280,V=this._getRoundNum(D),this._updateScale(this._iScale,V+" mi",V/D)):(st=this._getRoundNum(E),this._updateScale(this._iScale,st+" ft",st/E))},_updateScale:function(w,E,D){w.style.width=Math.round(this.options.maxWidth*D)+"px",w.innerHTML=E},_getRoundNum:function(w){var E=Math.pow(10,(Math.floor(w)+"").length-1),D=w/E;return D=D>=10?10:D>=5?5:D>=3?3:D>=2?2:1,E*D}}),SS=function(w){return new p3(w)},TS='',Ly=Cc.extend({options:{position:"bottomright",prefix:''+(Mr.inlineSvg?TS+" ":"")+"Leaflet"},initialize:function(w){W(this,w),this._attributions={}},onAdd:function(w){w.attributionControl=this,this._container=Nr("div","leaflet-control-attribution"),lv(this._container);for(var E in w._layers)w._layers[E].getAttribution&&this.addAttribution(w._layers[E].getAttribution());return this._update(),w.on("layeradd",this._addAttribution,this),this._container},onRemove:function(w){w.off("layeradd",this._addAttribution,this)},_addAttribution:function(w){w.layer.getAttribution&&(this.addAttribution(w.layer.getAttribution()),w.layer.once("remove",function(){this.removeAttribution(w.layer.getAttribution())},this))},setPrefix:function(w){return this.options.prefix=w,this._update(),this},addAttribution:function(w){return w?(this._attributions[w]||(this._attributions[w]=0),this._attributions[w]++,this._update(),this):this},removeAttribution:function(w){return w?(this._attributions[w]&&(this._attributions[w]--,this._update()),this):this},_update:function(){if(this._map){var w=[];for(var E in this._attributions)this._attributions[E]&&w.push(E);var D=[];this.options.prefix&&D.push(this.options.prefix),w.length&&D.push(w.join(", ")),this._container.innerHTML=D.join(' ')}}});Co.mergeOptions({attributionControl:!0}),Co.addInitHook(function(){this.options.attributionControl&&new Ly().addTo(this)});var CS=function(w){return new Ly(w)};Cc.Layers=Mg,Cc.Zoom=hv,Cc.Scale=p3,Cc.Attribution=Ly,$0.layers=ES,$0.zoom=Xf,$0.scale=SS,$0.attribution=CS;var Od=ln.extend({initialize:function(w){this._map=w},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Od.addTo=function(w,E){return w.addHandler(E,this),this};var df={Events:ne},AS=Mr.touch?"touchstart mousedown":"mousedown",su=xe.extend({options:{clickTolerance:3},initialize:function(w,E,D,V){W(this,V),this._element=w,this._dragStartTarget=E||w,this._preventOutline=D},enable:function(){this._enabled||(As(this._dragStartTarget,AS,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(su._dragging===this&&this.finishDrag(!0),Vc(this._dragStartTarget,AS,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(w){if(this._enabled&&(this._moved=!1,!_g(this._element,"leaflet-zoom-anim"))){if(w.touches&&w.touches.length!==1){su._dragging===this&&this.finishDrag();return}if(!(su._dragging||w.shiftKey||w.which!==1&&w.button!==1&&!w.touches)&&(su._dragging=this,this._preventOutline&&ky(this._element),Cy(),H0(),!this._moving)){this.fire("down");var E=w.touches?w.touches[0]:w,D=vS(this._element);this._startPoint=new re(E.clientX,E.clientY),this._startPos=yg(this._element),this._parentScale=u3(D);var V=w.type==="mousedown";As(document,V?"mousemove":"touchmove",this._onMove,this),As(document,V?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(w){if(this._enabled){if(w.touches&&w.touches.length>1){this._moved=!0;return}var E=w.touches&&w.touches.length===1?w.touches[0]:w,D=new re(E.clientX,E.clientY)._subtract(this._startPoint);!D.x&&!D.y||Math.abs(D.x)+Math.abs(D.y)vt&&($t=_e,vt=Ye);vt>D&&(E[$t]=1,b3(w,E,D,V,$t),b3(w,E,D,$t,st))}function w3(w,E){for(var D=[w[0]],V=1,st=0,vt=w.length;VE&&(D.push(w[V]),st=V);return stE.max.x&&(D|=2),w.yE.max.y&&(D|=8),D}function Dy(w,E){var D=E.x-w.x,V=E.y-w.y;return D*D+V*V}function vp(w,E,D,V){var st=E.x,vt=E.y,$t=D.x-st,_e=D.y-vt,Ye=$t*$t+_e*_e,Un;return Ye>0&&(Un=((w.x-st)*$t+(w.y-vt)*_e)/Ye,Un>1?(st=D.x,vt=D.y):Un>0&&(st+=$t*Un,vt+=_e*Un)),$t=w.x-st,_e=w.y-vt,V?$t*$t+_e*_e:new re(st,vt)}function Zf(w){return!X(w[0])||typeof w[0][0]!="object"&&typeof w[0][0]<"u"}function v3(w){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Zf(w)}function _3(w,E){var D,V,st,vt,$t,_e,Ye,Un;if(!w||w.length===0)throw new Error("latlngs not passed");Zf(w)||(console.warn("latlngs are not flat! Only the first ring will be used"),w=w[0]);var Ji=Pe([0,0]),Qr=Qn(w),Is=Qr.getNorthWest().distanceTo(Qr.getSouthWest())*Qr.getNorthEast().distanceTo(Qr.getNorthWest());Is<1700&&(Ji=wp(w));var ol=w.length,xa=[];for(D=0;DV){Ye=(vt-V)/st,Un=[_e.x-Ye*(_e.x-$t.x),_e.y-Ye*(_e.y-$t.y)];break}var Uu=E.unproject(Se(Un));return Pe([Uu.lat+Ji.lat,Uu.lng+Ji.lng])}var y3={__proto__:null,simplify:Iy,pointToSegmentDistance:ea,closestPointOnSegment:Eg,clipSegment:PS,_getEdgeIntersection:Ry,_getBitCode:Sg,_sqClosestPointOnSegment:vp,isFlat:Zf,_flat:v3,polylineCenter:_3},fv={project:function(w){return new re(w.lng,w.lat)},unproject:function(w){return new ge(w.y,w.x)},bounds:new ke([-180,-90],[180,90])},Ny={R:6378137,R_MINOR:6356752314245179e-9,bounds:new ke([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(w){var E=Math.PI/180,D=this.R,V=w.lat*E,st=this.R_MINOR/D,vt=Math.sqrt(1-st*st),$t=vt*Math.sin(V),_e=Math.tan(Math.PI/4-V/2)/Math.pow((1-$t)/(1+$t),vt/2);return V=-D*Math.log(Math.max(_e,1e-10)),new re(w.lng*E*D,V)},unproject:function(w){for(var E=180/Math.PI,D=this.R,V=this.R_MINOR/D,st=Math.sqrt(1-V*V),vt=Math.exp(-w.y/D),$t=Math.PI/2-2*Math.atan(vt),_e=0,Ye=.1,Un;_e<15&&Math.abs(Ye)>1e-7;_e++)Un=st*Math.sin($t),Un=Math.pow((1-Un)/(1+Un),st/2),Ye=Math.PI/2-2*Math.atan(vt*Un)-$t,$t+=Ye;return new ge($t*E,w.x*E/D)}},yk={__proto__:null,LonLat:fv,Mercator:Ny,SphericalMercator:lr},x3=h({},Yi,{code:"EPSG:3395",projection:Ny,transformation:function(){var w=.5/(Math.PI*Ny.R);return Kt(w,.5,-w,.5)}()}),Oy=h({},Yi,{code:"EPSG:4326",projection:fv,transformation:Kt(1/180,1,-1/180,.5)}),xk=h({},ti,{projection:fv,transformation:Kt(1,0,-1,0),scale:function(w){return Math.pow(2,w)},zoom:function(w){return Math.log(w)/Math.LN2},distance:function(w,E){var D=E.lng-w.lng,V=E.lat-w.lat;return Math.sqrt(D*D+V*V)},infinite:!0});ti.Earth=Yi,ti.EPSG3395=x3,ti.EPSG3857=wn,ti.EPSG900913=it,ti.EPSG4326=Oy,ti.Simple=xk;var Yf=xe.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(w){return w.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(w){return w&&w.removeLayer(this),this},getPane:function(w){return this._map.getPane(w?this.options[w]||w:this.options.pane)},addInteractiveTarget:function(w){return this._map._targets[S(w)]=this,this},removeInteractiveTarget:function(w){return delete this._map._targets[S(w)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(w){var E=w.target;if(E.hasLayer(this)){if(this._map=E,this._zoomAnimated=E._zoomAnimated,this.getEvents){var D=this.getEvents();E.on(D,this),this.once("remove",function(){E.off(D,this)},this)}this.onAdd(E),this.fire("add"),E.fire("layeradd",{layer:this})}}});Co.include({addLayer:function(w){if(!w._layerAdd)throw new Error("The provided object is not a Layer.");var E=S(w);return this._layers[E]?this:(this._layers[E]=w,w._mapToAdd=this,w.beforeAdd&&w.beforeAdd(this),this.whenReady(w._layerAdd,w),this)},removeLayer:function(w){var E=S(w);return this._layers[E]?(this._loaded&&w.onRemove(this),delete this._layers[E],this._loaded&&(this.fire("layerremove",{layer:w}),w.fire("remove")),w._map=w._mapToAdd=null,this):this},hasLayer:function(w){return S(w)in this._layers},eachLayer:function(w,E){for(var D in this._layers)w.call(E,this._layers[D]);return this},_addLayers:function(w){w=w?X(w)?w:[w]:[];for(var E=0,D=w.length;Ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&E[0]instanceof ge&&E[0].equals(E[D-1])&&E.pop(),E},_setLatLngs:function(w){Fl.prototype._setLatLngs.call(this,w),Zf(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Zf(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var w=this._renderer._bounds,E=this.options.weight,D=new re(E,E);if(w=new ke(w.min.subtract(D),w.max.add(D)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(w))){if(this.options.noClip){this._parts=this._rings;return}for(var V=0,st=this._rings.length,vt;Vw.y!=st.y>w.y&&w.x<(st.x-V.x)*(w.y-V.y)/(st.y-V.y)+V.x&&(E=!E);return E||Fl.prototype._containsPoint.call(this,w,!0)}});function Tk(w,E){return new _b(w,E)}var l1=pf.extend({initialize:function(w,E){W(this,E),this._layers={},w&&this.addData(w)},addData:function(w){var E=X(w)?w:w.features,D,V,st;if(E){for(D=0,V=E.length;D0&&st.push(st[0].slice()),st}function yb(w,E){return w.feature?h({},w.feature,{geometry:E}):Gy(E)}function Gy(w){return w.type==="Feature"||w.type==="FeatureCollection"?w:{type:"Feature",properties:{},geometry:w}}var Bd={toGeoJSON:function(w){return yb(this,{type:"Point",coordinates:E3(this.getLatLng(),w)})}};By.include(Bd),pv.include(Bd),Fy.include(Bd),Fl.include({toGeoJSON:function(w){var E=!Zf(this._latlngs),D=Hy(this._latlngs,E?1:0,!1,w);return yb(this,{type:(E?"Multi":"")+"LineString",coordinates:D})}}),_b.include({toGeoJSON:function(w){var E=!Zf(this._latlngs),D=E&&!Zf(this._latlngs[0]),V=Hy(this._latlngs,D?2:E?1:0,!0,w);return E||(V=[V]),yb(this,{type:(D?"Multi":"")+"Polygon",coordinates:V})}}),Fu.include({toMultiPoint:function(w){var E=[];return this.eachLayer(function(D){E.push(D.toGeoJSON(w).geometry.coordinates)}),yb(this,{type:"MultiPoint",coordinates:E})},toGeoJSON:function(w){var E=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(E==="MultiPoint")return this.toMultiPoint(w);var D=E==="GeometryCollection",V=[];return this.eachLayer(function(st){if(st.toGeoJSON){var vt=st.toGeoJSON(w);if(D)V.push(vt.geometry);else{var $t=Gy(vt);$t.type==="FeatureCollection"?V.push.apply(V,$t.features):V.push($t)}}}),D?yb(this,{geometries:V,type:"GeometryCollection"}):{type:"FeatureCollection",features:V}}});function oe(w,E){return new l1(w,E)}var _n=oe,$e=Yf.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(w,E,D){this._url=w,this._bounds=Qn(E),W(this,D)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ws(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){mr(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(w){return this.options.opacity=w,this._image&&this._updateOpacity(),this},setStyle:function(w){return w.opacity&&this.setOpacity(w.opacity),this},bringToFront:function(){return this._map&&dc(this._image),this},bringToBack:function(){return this._map&&vh(this._image),this},setUrl:function(w){return this._url=w,this._image&&(this._image.src=w),this},setBounds:function(w){return this._bounds=Qn(w),this._map&&this._reset(),this},getEvents:function(){var w={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(w.zoomanim=this._animateZoom),w},setZIndex:function(w){return this.options.zIndex=w,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var w=this._url.tagName==="IMG",E=this._image=w?this._url:Nr("img");if(ws(E,"leaflet-image-layer"),this._zoomAnimated&&ws(E,"leaflet-zoom-animated"),this.options.className&&ws(E,this.options.className),E.onselectstart=N,E.onmousemove=N,E.onload=m(this.fire,this,"load"),E.onerror=m(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(E.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),w){this._url=E.src;return}E.src=this._url,E.alt=this.options.alt},_animateZoom:function(w){var E=this._map.getZoomScale(w.zoom),D=this._map._latLngBoundsToNewLayerBounds(this._bounds,w.zoom,w.center).min;Nd(this._image,D,E)},_reset:function(){var w=this._image,E=new ke(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),D=E.getSize();ya(w,E.min),w.style.width=D.x+"px",w.style.height=D.y+"px"},_updateOpacity:function(){Bl(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var w=this.options.errorOverlayUrl;w&&this._url!==w&&(this._url=w,this._image.src=w)},getCenter:function(){return this._bounds.getCenter()}}),er=function(w,E,D){return new $e(w,E,D)},vs=$e.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var w=this._url.tagName==="VIDEO",E=this._image=w?this._url:Nr("video");if(ws(E,"leaflet-image-layer"),this._zoomAnimated&&ws(E,"leaflet-zoom-animated"),this.options.className&&ws(E,this.options.className),E.onselectstart=N,E.onmousemove=N,E.onloadeddata=m(this.fire,this,"load"),w){for(var D=E.getElementsByTagName("source"),V=[],st=0;st0?V:[E.src];return}X(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(E.style,"objectFit")&&(E.style.objectFit="fill"),E.autoplay=!!this.options.autoplay,E.loop=!!this.options.loop,E.muted=!!this.options.muted,E.playsInline=!!this.options.playsInline;for(var vt=0;vtst?(E.height=st+"px",ws(w,vt)):$c(w,vt),this._containerWidth=this._container.offsetWidth},_animateZoom:function(w){var E=this._map._latLngToNewLayerPoint(this._latlng,w.zoom,w.center),D=this._getAnchor();ya(this._container,E.add(D))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var w=this._map,E=parseInt(wh(this._container,"marginBottom"),10)||0,D=this._container.offsetHeight+E,V=this._containerWidth,st=new re(this._containerLeft,-D-this._containerBottom);st._add(yg(this._container));var vt=w.layerPointToContainerPoint(st),$t=Se(this.options.autoPanPadding),_e=Se(this.options.autoPanPaddingTopLeft||$t),Ye=Se(this.options.autoPanPaddingBottomRight||$t),Un=w.getSize(),Ji=0,Qr=0;vt.x+V+Ye.x>Un.x&&(Ji=vt.x+V-Un.x+Ye.x),vt.x-Ji-_e.x<0&&(Ji=vt.x-_e.x),vt.y+D+Ye.y>Un.y&&(Qr=vt.y+D-Un.y+Ye.y),vt.y-Qr-_e.y<0&&(Qr=vt.y-_e.y),(Ji||Qr)&&(this.options.keepInView&&(this._autopanning=!0),w.fire("autopanstart").panBy([Ji,Qr]))}},_getAnchor:function(){return Se(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Jf=function(w,E){return new Wy(w,E)};Co.mergeOptions({closePopupOnClick:!0}),Co.include({openPopup:function(w,E,D){return this._initOverlay(Wy,w,E,D).openOn(this),this},closePopup:function(w){return w=arguments.length?w:this._popup,w&&w.close(),this}}),Yf.include({bindPopup:function(w,E){return this._popup=this._initOverlay(Wy,this._popup,w,E),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(w){return this._popup&&(this instanceof pf||(this._popup._source=this),this._popup._prepareOpen(w||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(w){return this._popup&&this._popup.setContent(w),this},getPopup:function(){return this._popup},_openPopup:function(w){if(!(!this._popup||!this._map)){rc(w);var E=w.layer||w.target;if(this._popup._source===E&&!(E instanceof gf)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(w.latlng);return}this._popup._source=E,this.openPopup(w.latlng)}},_movePopup:function(w){this._popup.setLatLng(w.latlng)},_onKeyPress:function(w){w.originalEvent.keyCode===13&&this._openPopup(w)}});var q0=mf.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(w){mf.prototype.onAdd.call(this,w),this.setOpacity(this.options.opacity),w.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(w){mf.prototype.onRemove.call(this,w),w.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var w=mf.prototype.getEvents.call(this);return this.options.permanent||(w.preclick=this.close),w},_initLayout:function(){var w="leaflet-tooltip",E=w+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Nr("div",E),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+S(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(w){var E,D,V=this._map,st=this._container,vt=V.latLngToContainerPoint(V.getCenter()),$t=V.layerPointToContainerPoint(w),_e=this.options.direction,Ye=st.offsetWidth,Un=st.offsetHeight,Ji=Se(this.options.offset),Qr=this._getAnchor();_e==="top"?(E=Ye/2,D=Un):_e==="bottom"?(E=Ye/2,D=0):_e==="center"?(E=Ye/2,D=Un/2):_e==="right"?(E=0,D=Un/2):_e==="left"?(E=Ye,D=Un/2):$t.xthis.options.maxZoom||DV?this._retainParent(st,vt,$t,V):!1)},_retainChildren:function(w,E,D,V){for(var st=2*w;st<2*w+2;st++)for(var vt=2*E;vt<2*E+2;vt++){var $t=new re(st,vt);$t.z=D+1;var _e=this._tileCoordsToKey($t),Ye=this._tiles[_e];if(Ye&&Ye.active){Ye.retain=!0;continue}else Ye&&Ye.loaded&&(Ye.retain=!0);D+1this.options.maxZoom||this.options.minZoom!==void 0&&st1){this._setView(w,D);return}for(var Qr=st.min.y;Qr<=st.max.y;Qr++)for(var Is=st.min.x;Is<=st.max.x;Is++){var ol=new re(Is,Qr);if(ol.z=this._tileZoom,!!this._isValidTile(ol)){var xa=this._tiles[this._tileCoordsToKey(ol)];xa?xa.current=!0:$t.push(ol)}}if($t.sort(function(Uu,d1){return Uu.distanceTo(vt)-d1.distanceTo(vt)}),$t.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Ul=document.createDocumentFragment();for(Is=0;Is<$t.length;Is++)this._addTile($t[Is],Ul);this._level.el.appendChild(Ul)}}}},_isValidTile:function(w){var E=this._map.options.crs;if(!E.infinite){var D=this._globalTileRange;if(!E.wrapLng&&(w.xD.max.x)||!E.wrapLat&&(w.yD.max.y))return!1}if(!this.options.bounds)return!0;var V=this._tileCoordsToBounds(w);return Qn(this.options.bounds).overlaps(V)},_keyToBounds:function(w){return this._tileCoordsToBounds(this._keyToTileCoords(w))},_tileCoordsToNwSe:function(w){var E=this._map,D=this.getTileSize(),V=w.scaleBy(D),st=V.add(D),vt=E.unproject(V,w.z),$t=E.unproject(st,w.z);return[vt,$t]},_tileCoordsToBounds:function(w){var E=this._tileCoordsToNwSe(w),D=new en(E[0],E[1]);return this.options.noWrap||(D=this._map.wrapLatLngBounds(D)),D},_tileCoordsToKey:function(w){return w.x+":"+w.y+":"+w.z},_keyToTileCoords:function(w){var E=w.split(":"),D=new re(+E[0],+E[1]);return D.z=+E[2],D},_removeTile:function(w){var E=this._tiles[w];E&&(mr(E.el),delete this._tiles[w],this.fire("tileunload",{tile:E.el,coords:this._keyToTileCoords(w)}))},_initTile:function(w){ws(w,"leaflet-tile");var E=this.getTileSize();w.style.width=E.x+"px",w.style.height=E.y+"px",w.onselectstart=N,w.onmousemove=N,Mr.ielt9&&this.options.opacity<1&&Bl(w,this.options.opacity)},_addTile:function(w,E){var D=this._getTilePos(w),V=this._tileCoordsToKey(w),st=this.createTile(this._wrapCoords(w),m(this._tileReady,this,w));this._initTile(st),this.createTile.length<2&&ot(m(this._tileReady,this,w,null,st)),ya(st,D),this._tiles[V]={el:st,coords:w,current:!0},E.appendChild(st),this.fire("tileloadstart",{tile:st,coords:w})},_tileReady:function(w,E,D){E&&this.fire("tileerror",{error:E,tile:D,coords:w});var V=this._tileCoordsToKey(w);D=this._tiles[V],D&&(D.loaded=+new Date,this._map._fadeAnimated?(Bl(D.el,0),Lt(this._fadeFrame),this._fadeFrame=ot(this._updateOpacity,this)):(D.active=!0,this._pruneTiles()),E||(ws(D.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:D.el,coords:w})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Mr.ielt9||!this._map._fadeAnimated?ot(this._pruneTiles,this):setTimeout(m(this._pruneTiles,this),250)))},_getTilePos:function(w){return w.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(w){var E=new re(this._wrapX?R(w.x,this._wrapX):w.x,this._wrapY?R(w.y,this._wrapY):w.y);return E.z=w.z,E},_pxBoundsToTileRange:function(w){var E=this.getTileSize();return new ke(w.min.unscaleBy(E).floor(),w.max.unscaleBy(E).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var w in this._tiles)if(!this._tiles[w].loaded)return!1;return!0}});function pc(w){return new Tg(w)}var xb=Tg.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(w,E){this._url=w,E=W(this,E),E.detectRetina&&Mr.retina&&E.maxZoom>0?(E.tileSize=Math.floor(E.tileSize/2),E.zoomReverse?(E.zoomOffset--,E.minZoom=Math.min(E.maxZoom,E.minZoom+1)):(E.zoomOffset++,E.maxZoom=Math.max(E.minZoom,E.maxZoom-1)),E.minZoom=Math.max(0,E.minZoom)):E.zoomReverse?E.minZoom=Math.min(E.maxZoom,E.minZoom):E.maxZoom=Math.max(E.minZoom,E.maxZoom),typeof E.subdomains=="string"&&(E.subdomains=E.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(w,E){return this._url===w&&E===void 0&&(E=!0),this._url=w,E||this.redraw(),this},createTile:function(w,E){var D=document.createElement("img");return As(D,"load",m(this._tileOnLoad,this,E,D)),As(D,"error",m(this._tileOnError,this,E,D)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(D.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(D.referrerPolicy=this.options.referrerPolicy),D.alt="",D.src=this.getTileUrl(w),D},getTileUrl:function(w){var E={r:Mr.retina?"@2x":"",s:this._getSubdomain(w),x:w.x,y:w.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var D=this._globalTileRange.max.y-w.y;this.options.tms&&(E.y=D),E["-y"]=D}return Q(this._url,h(E,this.options))},_tileOnLoad:function(w,E){Mr.ielt9?setTimeout(m(w,this,null,E),0):w(null,E)},_tileOnError:function(w,E,D){var V=this.options.errorTileUrl;V&&E.getAttribute("src")!==V&&(E.src=V),w(D,E)},_onTileRemove:function(w){w.tile.onload=null},_getZoomForUrl:function(){var w=this._tileZoom,E=this.options.maxZoom,D=this.options.zoomReverse,V=this.options.zoomOffset;return D&&(w=E-w),w+V},_getSubdomain:function(w){var E=Math.abs(w.x+w.y)%this.options.subdomains.length;return this.options.subdomains[E]},_abortLoading:function(){var w,E;for(w in this._tiles)if(this._tiles[w].coords.z!==this._tileZoom&&(E=this._tiles[w].el,E.onload=N,E.onerror=N,!E.complete)){E.src=ft;var D=this._tiles[w].coords;mr(E),delete this._tiles[w],this.fire("tileabort",{tile:E,coords:D})}},_removeTile:function(w){var E=this._tiles[w];if(E)return E.el.setAttribute("src",ft),Tg.prototype._removeTile.call(this,w)},_tileReady:function(w,E,D){if(!(!this._map||D&&D.getAttribute("src")===ft))return Tg.prototype._tileReady.call(this,w,E,D)}});function S3(w,E){return new xb(w,E)}var gv=xb.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(w,E){this._url=w;var D=h({},this.defaultWmsParams);for(var V in E)V in this.options||(D[V]=E[V]);E=W(this,E);var st=E.detectRetina&&Mr.retina?2:1,vt=this.getTileSize();D.width=vt.x*st,D.height=vt.y*st,this.wmsParams=D},onAdd:function(w){this._crs=this.options.crs||w.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var E=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[E]=this._crs.code,xb.prototype.onAdd.call(this,w)},getTileUrl:function(w){var E=this._tileCoordsToNwSe(w),D=this._crs,V=mn(D.project(E[0]),D.project(E[1])),st=V.min,vt=V.max,$t=(this._wmsVersion>=1.3&&this._crs===Oy?[st.y,st.x,vt.y,vt.x]:[st.x,st.y,vt.x,vt.y]).join(","),_e=xb.prototype.getTileUrl.call(this,w);return _e+q(this.wmsParams,_e,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+$t},setParams:function(w,E){return h(this.wmsParams,w),E||this.redraw(),this}});function Ak(w,E){return new gv(w,E)}xb.WMS=gv,S3.wms=Ak;var f1=Yf.extend({options:{padding:.1},initialize:function(w){W(this,w),S(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),ws(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var w={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(w.zoomanim=this._onAnimZoom),w},_onAnimZoom:function(w){this._updateTransform(w.center,w.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(w,E){var D=this._map.getZoomScale(E,this._zoom),V=this._map.getSize().multiplyBy(.5+this.options.padding),st=this._map.project(this._center,E),vt=V.multiplyBy(-D).add(st).subtract(this._map._getNewPixelOrigin(w,E));Mr.any3d?Nd(this._container,vt,D):ya(this._container,vt)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var w in this._layers)this._layers[w]._reset()},_onZoomEnd:function(){for(var w in this._layers)this._layers[w]._project()},_updatePaths:function(){for(var w in this._layers)this._layers[w]._update()},_update:function(){var w=this.options.padding,E=this._map.getSize(),D=this._map.containerPointToLayerPoint(E.multiplyBy(-w)).round();this._bounds=new ke(D,D.add(E.multiplyBy(1+w*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),NS=f1.extend({options:{tolerance:0},getEvents:function(){var w=f1.prototype.getEvents.call(this);return w.viewprereset=this._onViewPreReset,w},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){f1.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var w=this._container=document.createElement("canvas");As(w,"mousemove",this._onMouseMove,this),As(w,"click dblclick mousedown mouseup contextmenu",this._onClick,this),As(w,"mouseout",this._handleMouseOut,this),w._leaflet_disable_events=!0,this._ctx=w.getContext("2d")},_destroyContainer:function(){Lt(this._redrawRequest),delete this._ctx,mr(this._container),Vc(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var w;this._redrawBounds=null;for(var E in this._layers)w=this._layers[E],w._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){f1.prototype._update.call(this);var w=this._bounds,E=this._container,D=w.getSize(),V=Mr.retina?2:1;ya(E,w.min),E.width=V*D.x,E.height=V*D.y,E.style.width=D.x+"px",E.style.height=D.y+"px",Mr.retina&&this._ctx.scale(2,2),this._ctx.translate(-w.min.x,-w.min.y),this.fire("update")}},_reset:function(){f1.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(w){this._updateDashArray(w),this._layers[S(w)]=w;var E=w._order={layer:w,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=E),this._drawLast=E,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(w){this._requestRedraw(w)},_removePath:function(w){var E=w._order,D=E.next,V=E.prev;D?D.prev=V:this._drawLast=V,V?V.next=D:this._drawFirst=D,delete w._order,delete this._layers[S(w)],this._requestRedraw(w)},_updatePath:function(w){this._extendRedrawBounds(w),w._project(),w._update(),this._requestRedraw(w)},_updateStyle:function(w){this._updateDashArray(w),this._requestRedraw(w)},_updateDashArray:function(w){if(typeof w.options.dashArray=="string"){var E=w.options.dashArray.split(/[, ]+/),D=[],V,st;for(st=0;st')}}catch{}return function(w){return document.createElement("<"+w+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Vy={_initContainer:function(){this._container=Nr("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(f1.prototype._update.call(this),this.fire("update"))},_initPath:function(w){var E=w._container=Qf("shape");ws(E,"leaflet-vml-shape "+(this.options.className||"")),E.coordsize="1 1",w._path=Qf("path"),E.appendChild(w._path),this._updateStyle(w),this._layers[S(w)]=w},_addPath:function(w){var E=w._container;this._container.appendChild(E),w.options.interactive&&w.addInteractiveTarget(E)},_removePath:function(w){var E=w._container;mr(E),w.removeInteractiveTarget(E),delete this._layers[S(w)]},_updateStyle:function(w){var E=w._stroke,D=w._fill,V=w.options,st=w._container;st.stroked=!!V.stroke,st.filled=!!V.fill,V.stroke?(E||(E=w._stroke=Qf("stroke")),st.appendChild(E),E.weight=V.weight+"px",E.color=V.color,E.opacity=V.opacity,V.dashArray?E.dashStyle=X(V.dashArray)?V.dashArray.join(" "):V.dashArray.replace(/( *, *)/g," "):E.dashStyle="",E.endcap=V.lineCap.replace("butt","flat"),E.joinstyle=V.lineJoin):E&&(st.removeChild(E),w._stroke=null),V.fill?(D||(D=w._fill=Qf("fill")),st.appendChild(D),D.color=V.fillColor||V.color,D.opacity=V.fillOpacity):D&&(st.removeChild(D),w._fill=null)},_updateCircle:function(w){var E=w._point.round(),D=Math.round(w._radius),V=Math.round(w._radiusY||D);this._setPath(w,w._empty()?"M0 0":"AL "+E.x+","+E.y+" "+D+","+V+" 0,"+65535*360)},_setPath:function(w,E){w._path.v=E},_bringToFront:function(w){dc(w._container)},_bringToBack:function(w){vh(w._container)}},bv=Mr.vml?Qf:ut,Cg=f1.extend({_initContainer:function(){this._container=bv("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=bv("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){mr(this._container),Vc(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){f1.prototype._update.call(this);var w=this._bounds,E=w.getSize(),D=this._container;(!this._svgSize||!this._svgSize.equals(E))&&(this._svgSize=E,D.setAttribute("width",E.x),D.setAttribute("height",E.y)),ya(D,w.min),D.setAttribute("viewBox",[w.min.x,w.min.y,E.x,E.y].join(" ")),this.fire("update")}},_initPath:function(w){var E=w._path=bv("path");w.options.className&&ws(E,w.options.className),w.options.interactive&&ws(E,"leaflet-interactive"),this._updateStyle(w),this._layers[S(w)]=w},_addPath:function(w){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(w._path),w.addInteractiveTarget(w._path)},_removePath:function(w){mr(w._path),w.removeInteractiveTarget(w._path),delete this._layers[S(w)]},_updatePath:function(w){w._project(),w._update()},_updateStyle:function(w){var E=w._path,D=w.options;E&&(D.stroke?(E.setAttribute("stroke",D.color),E.setAttribute("stroke-opacity",D.opacity),E.setAttribute("stroke-width",D.weight),E.setAttribute("stroke-linecap",D.lineCap),E.setAttribute("stroke-linejoin",D.lineJoin),D.dashArray?E.setAttribute("stroke-dasharray",D.dashArray):E.removeAttribute("stroke-dasharray"),D.dashOffset?E.setAttribute("stroke-dashoffset",D.dashOffset):E.removeAttribute("stroke-dashoffset")):E.setAttribute("stroke","none"),D.fill?(E.setAttribute("fill",D.fillColor||D.color),E.setAttribute("fill-opacity",D.fillOpacity),E.setAttribute("fill-rule",D.fillRule||"evenodd")):E.setAttribute("fill","none"))},_updatePoly:function(w,E){this._setPath(w,kt(w._parts,E))},_updateCircle:function(w){var E=w._point,D=Math.max(Math.round(w._radius),1),V=Math.max(Math.round(w._radiusY),1)||D,st="a"+D+","+V+" 0 1,0 ",vt=w._empty()?"M0 0":"M"+(E.x-D)+","+E.y+st+D*2+",0 "+st+-D*2+",0 ";this._setPath(w,vt)},_setPath:function(w,E){w._path.setAttribute("d",E)},_bringToFront:function(w){dc(w._path)},_bringToBack:function(w){vh(w._path)}});Mr.vml&&Cg.include(Vy);function T3(w){return Mr.svg||Mr.vml?new Cg(w):null}Co.include({getRenderer:function(w){var E=w.options.renderer||this._getPaneRenderer(w.options.pane)||this.options.renderer||this._renderer;return E||(E=this._renderer=this._createRenderer()),this.hasLayer(E)||this.addLayer(E),E},_getPaneRenderer:function(w){if(w==="overlayPane"||w===void 0)return!1;var E=this._paneRenderers[w];return E===void 0&&(E=this._createRenderer({pane:w}),this._paneRenderers[w]=E),E},_createRenderer:function(w){return this.options.preferCanvas&&mv(w)||T3(w)}});var C3=_b.extend({initialize:function(w,E){_b.prototype.initialize.call(this,this._boundsToLatLngs(w),E)},setBounds:function(w){return this.setLatLngs(this._boundsToLatLngs(w))},_boundsToLatLngs:function(w){return w=Qn(w),[w.getSouthWest(),w.getNorthWest(),w.getNorthEast(),w.getSouthEast()]}});function qy(w,E){return new C3(w,E)}Cg.create=bv,Cg.pointsToPath=kt,l1.geometryToLayer=h1,l1.coordsToLatLng=zy,l1.coordsToLatLngs=jy,l1.latLngToCoords=E3,l1.latLngsToCoords=Hy,l1.getFeature=yb,l1.asFeature=Gy,Co.mergeOptions({boxZoom:!0});var A3=Od.extend({initialize:function(w){this._map=w,this._container=w._container,this._pane=w._panes.overlayPane,this._resetStateTimeout=0,w.on("unload",this._destroy,this)},addHooks:function(){As(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Vc(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){mr(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(w){if(!w.shiftKey||w.which!==1&&w.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),H0(),Cy(),this._startPoint=this._map.mouseEventToContainerPoint(w),As(document,{contextmenu:rc,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(w){this._moved||(this._moved=!0,this._box=Nr("div","leaflet-zoom-box",this._container),ws(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(w);var E=new ke(this._point,this._startPoint),D=E.getSize();ya(this._box,E.min),this._box.style.width=D.x+"px",this._box.style.height=D.y+"px"},_finish:function(){this._moved&&(mr(this._box),$c(this._container,"leaflet-crosshair")),G0(),a3(),Vc(document,{contextmenu:rc,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(w){if(!(w.which!==1&&w.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(m(this._resetState,this),0);var E=new en(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(E).fire("boxzoomend",{boxZoomBounds:E})}},_onKeyDown:function(w){w.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Co.addInitHook("addHandler","boxZoom",A3),Co.mergeOptions({doubleClickZoom:!0});var Mb=Od.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(w){var E=this._map,D=E.getZoom(),V=E.options.zoomDelta,st=w.originalEvent.shiftKey?D-V:D+V;E.options.doubleClickZoom==="center"?E.setZoom(st):E.setZoomAround(w.containerPoint,st)}});Co.addInitHook("addHandler","doubleClickZoom",Mb),Co.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Ag=Od.extend({addHooks:function(){if(!this._draggable){var w=this._map;this._draggable=new su(w._mapPane,w._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),w.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),w.on("zoomend",this._onZoomEnd,this),w.whenReady(this._onZoomEnd,this))}ws(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){$c(this._map._container,"leaflet-grab"),$c(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var w=this._map;if(w._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var E=Qn(this._map.options.maxBounds);this._offsetLimit=mn(this._map.latLngToContainerPoint(E.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(E.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;w.fire("movestart").fire("dragstart"),w.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(w){if(this._map.options.inertia){var E=this._lastTime=+new Date,D=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(D),this._times.push(E),this._prunePositions(E)}this._map.fire("move",w).fire("drag",w)},_prunePositions:function(w){for(;this._positions.length>1&&w-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var w=this._map.getSize().divideBy(2),E=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=E.subtract(w).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(w,E){return w-(w-E)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var w=this._draggable._newPos.subtract(this._draggable._startPos),E=this._offsetLimit;w.xE.max.x&&(w.x=this._viscousLimit(w.x,E.max.x)),w.y>E.max.y&&(w.y=this._viscousLimit(w.y,E.max.y)),this._draggable._newPos=this._draggable._startPos.add(w)}},_onPreDragWrap:function(){var w=this._worldWidth,E=Math.round(w/2),D=this._initialWorldOffset,V=this._draggable._newPos.x,st=(V-E+D)%w+E-D,vt=(V+E+D)%w-E-D,$t=Math.abs(st+D)0?vt:-vt))-E;this._delta=0,this._startTime=null,$t&&(w.options.scrollWheelZoom==="center"?w.setZoom(E+$t):w.setZoomAround(this._lastMousePos,E+$t))}});Co.addInitHook("addHandler","scrollWheelZoom",OS);var kk=600;Co.mergeOptions({tapHold:Mr.touchNative&&Mr.safari&&Mr.mobile,tapTolerance:15});var BS=Od.extend({addHooks:function(){As(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Vc(this._map._container,"touchstart",this._onDown,this)},_onDown:function(w){if(clearTimeout(this._holdTimeout),w.touches.length===1){var E=w.touches[0];this._startPos=this._newPos=new re(E.clientX,E.clientY),this._holdTimeout=setTimeout(m(function(){this._cancel(),this._isTapValid()&&(As(document,"touchend",sl),As(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",E))},this),kk),As(document,"touchend touchcancel contextmenu",this._cancel,this),As(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function w(){Vc(document,"touchend",sl),Vc(document,"touchend touchcancel",w)},_cancel:function(){clearTimeout(this._holdTimeout),Vc(document,"touchend touchcancel contextmenu",this._cancel,this),Vc(document,"touchmove",this._onMove,this)},_onMove:function(w){var E=w.touches[0];this._newPos=new re(E.clientX,E.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(w,E){var D=new MouseEvent(w,{bubbles:!0,cancelable:!0,view:window,screenX:E.screenX,screenY:E.screenY,clientX:E.clientX,clientY:E.clientY});D._simulated=!0,E.target.dispatchEvent(D)}});Co.addInitHook("addHandler","tapHold",BS),Co.mergeOptions({touchZoom:Mr.touch,bounceAtZoomLimits:!0});var vv=Od.extend({addHooks:function(){ws(this._map._container,"leaflet-touch-zoom"),As(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){$c(this._map._container,"leaflet-touch-zoom"),Vc(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(w){var E=this._map;if(!(!w.touches||w.touches.length!==2||E._animatingZoom||this._zooming)){var D=E.mouseEventToContainerPoint(w.touches[0]),V=E.mouseEventToContainerPoint(w.touches[1]);this._centerPoint=E.getSize()._divideBy(2),this._startLatLng=E.containerPointToLatLng(this._centerPoint),E.options.touchZoom!=="center"&&(this._pinchStartLatLng=E.containerPointToLatLng(D.add(V)._divideBy(2))),this._startDist=D.distanceTo(V),this._startZoom=E.getZoom(),this._moved=!1,this._zooming=!0,E._stop(),As(document,"touchmove",this._onTouchMove,this),As(document,"touchend touchcancel",this._onTouchEnd,this),sl(w)}},_onTouchMove:function(w){if(!(!w.touches||w.touches.length!==2||!this._zooming)){var E=this._map,D=E.mouseEventToContainerPoint(w.touches[0]),V=E.mouseEventToContainerPoint(w.touches[1]),st=D.distanceTo(V)/this._startDist;if(this._zoom=E.getScaleZoom(st,this._startZoom),!E.options.bounceAtZoomLimits&&(this._zoomE.getMaxZoom()&&st>1)&&(this._zoom=E._limitZoom(this._zoom)),E.options.touchZoom==="center"){if(this._center=this._startLatLng,st===1)return}else{var vt=D._add(V)._divideBy(2)._subtract(this._centerPoint);if(st===1&&vt.x===0&&vt.y===0)return;this._center=E.unproject(E.project(this._pinchStartLatLng,this._zoom).subtract(vt),this._zoom)}this._moved||(E._moveStart(!0,!1),this._moved=!0),Lt(this._animRequest);var $t=m(E._move,E,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=ot($t,this,!0),sl(w)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,Lt(this._animRequest),Vc(document,"touchmove",this._onTouchMove,this),Vc(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});Co.addInitHook("addHandler","touchZoom",vv),Co.BoxZoom=A3,Co.DoubleClickZoom=Mb,Co.Drag=Ag,Co.Keyboard=wv,Co.ScrollWheelZoom=OS,Co.TapHold=BS,Co.TouchZoom=vv,d.Bounds=ke,d.Browser=Mr,d.CRS=ti,d.Canvas=NS,d.Circle=pv,d.CircleMarker=Fy,d.Class=ln,d.Control=Cc,d.DivIcon=X0,d.DivOverlay=mf,d.DomEvent=vk,d.DomUtil=bk,d.Draggable=su,d.Evented=xe,d.FeatureGroup=pf,d.GeoJSON=l1,d.GridLayer=Tg,d.Handler=Od,d.Icon=V0,d.ImageOverlay=$e,d.LatLng=ge,d.LatLngBounds=en,d.Layer=Yf,d.LayerGroup=Fu,d.LineUtil=y3,d.Map=Co,d.Marker=By,d.Mixin=df,d.Path=gf,d.Point=re,d.PolyUtil=Py,d.Polygon=_b,d.Polyline=Fl,d.Popup=Wy,d.PosAnimation=MS,d.Projection=yk,d.Rectangle=C3,d.Renderer=f1,d.SVG=Cg,d.SVGOverlay=Wa,d.TileLayer=xb,d.Tooltip=q0,d.Transformation=pr,d.Util=be,d.VideoOverlay=vs,d.bind=m,d.bounds=mn,d.canvas=mv,d.circle=DS,d.circleMarker=Sk,d.control=$0,d.divIcon=$y,d.extend=h,d.featureGroup=IS,d.geoJSON=oe,d.geoJson=_n,d.gridLayer=pc,d.icon=Mk,d.imageOverlay=er,d.latLng=Pe,d.latLngBounds=Qn,d.layerGroup=M3,d.map=_k,d.marker=Ek,d.point=Se,d.polygon=Tk,d.polyline=Uy,d.popup=Jf,d.rectangle=qy,d.setOptions=W,d.stamp=S,d.svg=T3,d.svgOverlay=Fc,d.tileLayer=S3,d.tooltip=Ck,d.transformation=Kt,d.version=s,d.videoOverlay=Wo;var Xy=window.L;d.noConflict=function(){return window.L=Xy,this},window.L=d})});var IXt=Ld((PXt,__t)=>{(function(d){if(typeof PXt=="object"&&typeof __t<"u")__t.exports=d();else if(typeof define=="function"&&define.amd)define([],d);else{var s;typeof window<"u"?s=window:typeof global<"u"?s=global:typeof self<"u"?s=self:s=this,s.ELK=d()}})(function(){var d,s,h;return function g(m,_,S){function y(B,P){if(!_[B]){if(!m[B]){var U=typeof TI=="function"&&TI;if(!P&&U)return U(B,!0);if(R)return R(B,!0);var W=new Error("Cannot find module '"+B+"'");throw W.code="MODULE_NOT_FOUND",W}var q=_[B]={exports:{}};m[B][0].call(q.exports,function(nt){var Q=m[B][1][nt];return y(Q||nt)},q,q.exports,g,m,_,S)}return _[B].exports}for(var R=typeof TI=="function"&&TI,N=0;N0&&arguments[0]!==void 0?arguments[0]:{},W=U.defaultLayoutOptions,q=W===void 0?{}:W,nt=U.algorithms,Q=nt===void 0?["layered","stress","mrtree","radial","force","disco"]:nt,X=U.workerFactory,gt=U.workerUrl;if(y(this,B),this.defaultLayoutOptions=q,this.initialized=!1,typeof gt>"u"&&typeof X>"u")throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.");var ft=X;typeof gt<"u"&&typeof X>"u"&&(ft=function(Ot){return new Worker(Ot)});var xt=ft(gt);if(typeof xt.postMessage!="function")throw new TypeError("Created worker does not provide the required 'postMessage' function.");this.worker=new N(xt),this.worker.postMessage({cmd:"register",algorithms:Q}).then(function(Bt){return P.initialized=!0}).catch(console.err)}return S(B,[{key:"layout",value:function(U){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=W.layoutOptions,nt=q===void 0?this.defaultLayoutOptions:q;return U?this.worker.postMessage({cmd:"layout",graph:U,options:nt}):Promise.reject(new Error("Missing mandatory parameter 'graph'."))}},{key:"knownLayoutAlgorithms",value:function(){return this.worker.postMessage({cmd:"algorithms"})}},{key:"knownLayoutOptions",value:function(){return this.worker.postMessage({cmd:"options"})}},{key:"knownLayoutCategories",value:function(){return this.worker.postMessage({cmd:"categories"})}},{key:"terminateWorker",value:function(){this.worker.terminate()}}]),B}();_.default=R;var N=function(){function B(P){var U=this;if(y(this,B),P===void 0)throw new Error("Missing mandatory parameter 'worker'.");this.resolvers={},this.worker=P,this.worker.onmessage=function(W){setTimeout(function(){U.receive(U,W)},0)}}return S(B,[{key:"postMessage",value:function(U){var W=this.id||0;this.id=W+1,U.id=W;var q=this;return new Promise(function(nt,Q){q.resolvers[W]=function(X,gt){X?Q(X):nt(gt)},q.worker.postMessage(U)})}},{key:"receive",value:function(U,W){var q=W.data,nt=U.resolvers[q.id];nt&&(delete U.resolvers[q.id],q.error?nt(q.error):nt(null,q.data))}},{key:"terminate",value:function(){this.worker.terminate&&this.worker.terminate()}}]),B}()},{}],2:[function(g,m,_){(function(S){var y;typeof window<"u"?y=window:typeof S<"u"?y=S:typeof self<"u"&&(y=self);var R,N;function B(){}function P(){}function U(){}function W(){}function q(){}function nt(){}function Q(){}function X(){}function gt(){}function ft(){}function xt(){}function Bt(){}function Ot(){}function Pt(){}function se(){}function ot(){}function Lt(){}function be(){}function ln(){}function Fn(){}function ne(){}function xe(){}function re(){}function hn(){}function Se(){}function ke(){}function mn(){}function en(){}function Qn(){}function ge(){}function Pe(){}function ti(){}function Yi(){}function ki(){}function lr(){}function pr(){}function Kt(){}function wn(){}function it(){}function ut(){}function kt(){}function Nt(){}function ie(){}function rn(){}function Pn(){}function Tt(){}function yt(){}function ue(){}function fn(){}function An(){}function zn(){}function Li(){}function xi(){}function Jt(){}function nn(){}function vn(){}function he(){}function Mn(){}function Sn(){}function gn(){}function Ce(){}function dn(){}function jn(){}function ar(){}function gr(){}function tr(){}function Ln(){}function Qt(){}function Mi(){}function sn(){}function Zn(){}function oi(){}function Jr(){}function Bs(){}function Oc(){}function ru(){}function fc(){}function il(){}function va(){}function Mr(){}function iv(){}function U0(){}function rv(){}function z0(){}function j0(){}function sv(){}function vg(){}function ov(){}function c3(){}function Rt(){}function ve(){}function Je(){}function tn(){}function Ze(){}function Hi(){}function Pr(){}function Gr(){}function hs(){}function Fs(){}function Ms(){}function bs(){}function Tc(){}function rl(){}function Oa(){}function wh(){}function Nr(){}function mr(){}function a1(){}function dc(){}function vh(){}function _g(){}function ws(){}function $c(){}function _a(){}function ff(){}function Bl(){}function _h(){}function u1(){}function Nd(){}function ya(){}function yg(){}function H0(){}function G0(){}function xg(){}function vb(){}function Cy(){}function a3(){}function cv(){}function Ay(){}function ky(){}function av(){}function vS(){}function u3(){}function bk(){}function As(){}function bp(){}function Vc(){}function _S(){}function l3(){}function uv(){}function h3(){}function W0(){}function f3(){}function lv(){}function sl(){}function rc(){}function Bc(){}function yS(){}function wk(){}function xS(){}function d3(){}function vk(){}function MS(){}function Co(){}function _k(){}function Cc(){}function $0(){}function Mg(){}function ES(){}function hv(){}function Xf(){}function p3(){}function SS(){}function TS(){}function Ly(){}function CS(){}function Od(){}function df(){}function AS(){}function su(){}function kS(){}function g3(){}function wp(){}function Py(){}function Iy(){}function ea(){}function Eg(){}function m3(){}function b3(){}function w3(){}function LS(){}function PS(){}function Ry(){}function Sg(){}function Dy(){}function vp(){}function Zf(){}function v3(){}function _3(){}function y3(){}function fv(){}function Ny(){}function yk(){}function x3(){}function Oy(){}function xk(){}function Yf(){}function Fu(){}function M3(){}function pf(){}function IS(){}function V0(){}function Mk(){}function dv(){}function RS(){}function By(){}function Ek(){}function gf(){}function Fy(){}function Sk(){}function pv(){}function DS(){}function Fl(){}function Uy(){}function _b(){}function Tk(){}function l1(){}function h1(){}function Kf(){}function zy(){}function jy(){}function E3(){}function Hy(){}function yb(){}function Gy(){}function Bd(){}function oe(){}function _n(){}function $e(){}function er(){}function vs(){}function Wo(){}function Wa(){}function Fc(){}function mf(){}function Wy(){}function Jf(){}function q0(){}function Ck(){}function X0(){}function $y(){}function Tg(){}function pc(){}function xb(){}function S3(){}function gv(){}function Ak(){}function f1(){}function NS(){}function mv(){}function Qf(){}function Vy(){}function bv(){}function Cg(){}function T3(){}function C3(){}function qy(){}function A3(){}function Mb(){}function Ag(){}function wv(){}function OS(){}function kk(){}function BS(){}function vv(){}function Xy(){}function w(){}function E(){}function D(){}function V(){}function st(){}function vt(){}function $t(){}function _e(){}function Ye(){}function Un(){}function Ji(){}function Qr(){}function Is(){}function ol(){}function xa(){}function Ul(){}function Uu(){}function d1(){}function Eb(){}function Lk(){}function Pk(){}function FS(){}function Ik(){}function US(){}function Ma(){}function kg(){}function zS(){}function Mt(){}function Sb(){}function Tb(){}function bf(){}function po(){}function qU(){}function XU(){}function ZU(){}function _v(){}function Z0(){}function Cb(){}function yR(){}function YU(){}function KU(){}function Y0(){}function JU(){}function QU(){}function tz(){}function ez(){}function nz(){}function K0(){}function iz(){}function rz(){}function sz(){}function oz(){}function cz(){}function yv(){}function az(){}function uz(){}function p1(){}function lz(){}function hz(){}function fz(){}function dz(){}function Ie(){}function xR(){}function MR(){}function pz(){}function gz(){}function Rk(){}function k3(){}function L3(){}function mz(){}function ER(){}function bz(){}function Lg(){}function Dk(){}function xv(){}function _p(){}function wz(){}function SR(){}function TR(){}function P3(){}function Ab(){}function CR(){}function vz(){}function jS(){}function _z(){}function I3(){}function yh(){}function HS(){}function R3(){}function Pg(){}function GS(){}function WS(){}function J0(){}function AR(){}function zl(){}function Nk(){}function yz(){}function xz(){}function Mz(){}function Zy(){}function Ez(){}function D3(){}function kR(){}function Sz(){}function LR(){}function N3(){}function Ok(){}function PR(){}function Bk(){}function IR(){}function Tz(){}function Cz(){}function Az(){}function RR(){}function Fk(){}function kz(){}function Uk(){}function DR(){}function NR(){}function OR(){}function $S(){}function Lz(){}function BR(){}function kb(){}function zk(){}function FR(){}function Pz(){}function jk(){}function UR(){}function Hk(){}function Iz(){}function Gk(){}function oo(){}function Rz(){}function Dz(){}function O3(){}function zR(){}function Nz(){}function Oz(){}function yp(){}function Bz(){}function VS(){}function Wk(){}function jR(){}function HR(){}function Fd(){}function Lb(){}function $k(){}function GR(){}function qS(){}function WR(){}function Vk(){}function $R(){}function qk(){}function Xk(){}function Pb(){}function Fz(){}function Ib(){}function VR(){}function qR(){}function Zk(){}function Uz(){}function zz(){}function jz(){}function XR(){}function ZR(){}function Hz(){}function YR(){}function KR(){}function td(){}function Ig(){}function Gz(){}function Wz(){}function XS(){}function Yy(){}function JR(){}function QR(){}function $z(){}function t8(){}function Ky(){}function B3(){}function Vz(){}function e8(){}function n8(){}function ZS(){}function i8(){}function YS(){}function Yk(){}function KS(){}function qz(){}function r8(){}function JS(){}function s8(){}function Kk(){}function Xz(){}function o8(){}function Q0(){}function c8(){}function a8(){}function Zz(){}function u8(){}function Yz(){}function Kz(){}function tm(){}function Jk(){}function Qk(){}function t5(){}function QS(){}function Jy(){}function cs(){}function tT(){}function e5(){}function Mv(){}function Jz(){}function n5(){}function l8(){}function zh(){}function Qz(){}function tj(){}function h8(){}function ej(){}function f8(){}function nj(){}function ij(){}function rj(){}function em(){}function jh(){}function i5(){}function sj(){}function oj(t){}function txt(t){}function r5(){Wr()}function F3(){g7()}function d8(){cq()}function p8(){zC()}function cj(){Ght()}function aj(){olt()}function uj(){BL()}function lj(){Ph()}function g8(){Aut()}function m8(){L5()}function hj(){cL()}function s5(){y5t()}function b8(){zRt()}function U3(){b3t()}function o5(){Nit()}function w8(){qt()}function v8(){tAt()}function eT(){ULt()}function _8(){iAt()}function g1(){kRt()}function Ev(){rAt()}function fj(){fat()}function y8(){l6t()}function dj(){sw()}function pj(){sAt()}function gj(){C5t()}function mj(){aNt()}function bj(){w3t()}function wj(){Plt()}function vj(){tw()}function wf(){bTt()}function _j(){v7()}function yj(){dr()}function x8(){G7()}function M8(){BN()}function E8(){iut()}function c5(){WV()}function xj(){mht()}function Mj(t){this.a=t}function Ej(t){this.a=t}function z3(t){this.a=t}function Sj(t){this.a=t}function Tj(t){this.a=t}function Cj(t){this.a=t}function S8(t){this.a=t}function Aj(t){this.a=t}function T8(t){this.a=t}function Ud(t){this.a=t}function kj(t){this.a=t}function a5(t){this.a=t}function Lj(t){this.a=t}function C8(t){this.a=t}function Pj(t){this.a=t}function Ij(t){this.a=t}function Rj(t){this.a=t}function Dj(t){this.a=t}function u5(t){this.a=t}function l5(t){this.b=t}function Nj(t){this.a=t}function Oj(t){this.a=t}function Bj(t){this.a=t}function Fj(t){this.a=t}function Uj(t){this.a=t}function A8(t){this.a=t}function k8(t){this.a=t}function h5(t){this.a=t}function nT(t){this.a=t}function j3(t){this.a=t}function zj(t){this.a=t}function L8(t){this.a=t}function Rb(t){this.a=t}function P8(t){this.a=t}function I8(t){this.a=t}function R8(t){this.a=t}function xp(t){this.a=t}function Sv(t){this.a=t}function f5(t){this.a=t}function vf(t){this.a=t}function nm(t){this.a=t}function H3(t){this.d=t}function Rg(){this.a=[]}function vi(){uu(this)}function vnt(t,e){t.i=e}function _nt(t,e){t.g=e}function ynt(t,e){t.b=e}function xnt(t,e){t.b=e}function Mnt(t,e){t.a=e}function D8(t,e){t.a=e}function Ent(t,e){t.c=e}function d5(t,e){t.c=e}function Snt(t,e){t.b=e}function Tnt(t,e){t.d=e}function Cnt(t,e){t.d=e}function jl(t,e){t.j=e}function Ant(t,e){t.a=e}function knt(t,e){t.f=e}function Lnt(t,e){t.f=e}function jj(t,e){t.e=e}function N8(t,e){t.k=e}function Pnt(t,e){t.a=e}function Int(t,e){t.b=e}function O8(t,e){t.g=e}function B8(t,e){t.j=e}function Rnt(t,e){t.n=e}function Dnt(t,e){t.a=e}function Nnt(t,e){t.a=e}function Hj(t,e){t.c=e}function Gj(t,e){t.c=e}function Ont(t,e){t.d=e}function Bnt(t,e){t.e=e}function Fnt(t,e){t.g=e}function Unt(t,e){t.a=e}function p5(t,e){t.c=e}function znt(t,e){t.d=e}function jnt(t,e){t.e=e}function Hnt(t,e){t.f=e}function Gnt(t,e){t.j=e}function Wnt(t,e){t.a=e}function $nt(t,e){t.a=e}function Vnt(t,e){t.b=e}function Wj(t){t.b=t.a}function $j(t){t.c=t.d.d}function Vj(t){hi(si(t))}function F8(t){this.b=t}function Tv(t){this.a=t}function iT(t){this.a=t}function rT(t){this.a=t}function Db(t){this.b=t}function Dg(t){this.b=t}function U8(t){this.a=t}function z8(t){this.a=t}function _r(t){this.a=t}function j8(t){this.a=t}function H8(t){this.a=t}function qj(t){this.a=t}function G8(t){this.a=t}function Qy(t){this.a=t}function sT(t){this.a=t}function Xj(t){this.a=t}function Zj(t){this.a=t}function g5(t){this.a=t}function W8(t){this.a=t}function Yj(t){this.a=t}function Kj(t){this.a=t}function Jj(t){this.a=t}function Qj(t){this.a=t}function tH(t){this.a=t}function eH(t){this.a=t}function nH(t){this.a=t}function iH(t){this.a=t}function rH(t){this.a=t}function sH(t){this.a=t}function oH(t){this.a=t}function Cv(t){this.a=t}function m1(t){this.a=t}function cH(t){this.a=t}function aH(t){this.a=t}function Av(t){this.a=t}function Us(t){this.a=t}function $8(t){this.a=t}function xh(t){this.a=t}function j(t){this.c=t}function oT(t){this.e=t}function zd(t){this.a=t}function uH(t){this.a=t}function kv(t){this.a=t}function V8(t){this.a=t}function lH(t){this.a=t}function hH(t){this.a=t}function m5(t){this.a=t}function fH(t){this.a=t}function im(t){this.a=t}function q8(t){this.a=t}function cT(t){this.a=t}function $a(t){this.a=t}function ou(t){this.a=t}function X8(t){this.a=t}function b5(t){this.a=t}function dH(t){this.a=t}function pH(t){this.a=t}function gH(t){this.a=t}function mH(t){this.a=t}function bH(t){this.a=t}function Z8(t){this.a=t}function G3(t){this.a=t}function Nb(t){this.a=t}function wH(t){this.a=t}function Y8(t){this.a=t}function aT(t){this.a=t}function jd(t){this.a=t}function t2(t){this.a=t}function vH(t){this.a=t}function _H(t){this.a=t}function yH(t){this.a=t}function xH(t){this.a=t}function MH(t){this.a=t}function K8(t){this.a=t}function rm(t){this.a=t}function Ys(t){this.a=t}function J8(t){this.a=t}function Mp(t){this.a=t}function Q8(t){this.a=t}function EH(t){this.b=t}function Ac(t){this.a=t}function SH(t){this.a=t}function t9(t){this.a=t}function e9(t){this.c=t}function w5(t){this.a=t}function TH(t){this.a=t}function CH(t){this.a=t}function AH(t){this.a=t}function kH(t){this.a=t}function LH(t){this.a=t}function PH(t){this.a=t}function IH(t){this.a=t}function RH(t){this.a=t}function DH(t){this.a=t}function NH(t){this.a=t}function OH(t){this.a=t}function BH(t){this.a=t}function v5(t){this.a=t}function FH(t){this.a=t}function _5(t){this.a=t}function UH(t){this.a=t}function zH(t){this.a=t}function jH(t){this.a=t}function Hl(t){this.a=t}function ed(t){this.a=t}function Hd(t){this.a=t}function Ob(t){this.a=t}function HH(t){this.a=t}function n9(t){this.a=t}function GH(t){this.a=t}function WH(t){this.a=t}function uT(t){this.a=t}function i9(t){this.f=t}function $H(t){this.i=t}function y5(t){this.a=t}function VH(t){this.a=t}function r9(t){this.a=t}function s9(t){this.a=t}function qH(t){this.a=t}function XH(t){this.a=t}function ZH(t){this.a=t}function YH(t){this.a=t}function e2(t){this.a=t}function KH(t){this.a=t}function JH(t){this.a=t}function QH(t){this.a=t}function tG(t){this.a=t}function eG(t){this.a=t}function o9(t){this.a=t}function c9(t){this.a=t}function nG(t){this.a=t}function iG(t){this.a=t}function rG(t){this.a=t}function sG(t){this.a=t}function oG(t){this.a=t}function cG(t){this.a=t}function aG(t){this.a=t}function uG(t){this.a=t}function lG(t){this.a=t}function hG(t){this.a=t}function fG(t){this.a=t}function dG(t){this.a=t}function pG(t){this.a=t}function gG(t){this.a=t}function mG(t){this.a=t}function a9(t){this.a=t}function kr(t){this.b=t}function bG(t){this.a=t}function wG(t){this.a=t}function vG(t){this.a=t}function _G(t){this.a=t}function yG(t){this.a=t}function xG(t){this.a=t}function MG(t){this.a=t}function EG(t){this.b=t}function x5(t){this.a=t}function n2(t){this.a=t}function u9(t){this.a=t}function lT(t){this.a=t}function hT(t){this.a=t}function M5(t){this.a=t}function E5(t){this.a=t}function SG(t){this.d=t}function l9(t){this.c=t}function fT(t){this.e=t}function Ba(t){this.e=t}function dT(t){this.a=t}function h9(t){this.a=t}function W3(){this.a=0}function $3(){UEt(this)}function Dt(){PW(this)}function V3(){r4t(this)}function qnt(){xit(),Lxe()}function f9(){return null}function Xnt(){return null}function Znt(t){return t.a}function Ynt(t){return t.a}function Knt(t){return t.a}function TG(t){return t.a}function Jnt(t){return t.a}function K(t){return t.e}function b1(){this.c=Hvt}function S5(){this.a=this}function pT(t){this.a=wle(t)}function d9(){Ep.call(this)}function q3(){Ep.call(this)}function na(){Ep.call(this)}function p9(){Ep.call(this)}function T5(){Ep.call(this)}function g9(){MSt.call(this)}function Ep(){MSt.call(this)}function i2(){Ep.call(this)}function Oi(){Ep.call(this)}function m9(){p9.call(this)}function Qnt(t){t.b.Te(t.e)}function CG(t,e){e.jd(t.a)}function r2(t,e){t.a=e-t.a}function s2(t,e){t.b=e-t.b}function AG(t,e){t.b+=e}function tit(t,e){t.d.b.$b(e)}function X3(t,e){t.e=e,e.b=t}function kG(t,e){t.length=e}function b9(t){t.a=new Fr}function w9(){w9=P,new vi}function LG(){this.b=new $it}function x(){this.Bb|=256}function C(){Ep.call(this)}function F(){Ep.call(this)}function J(){Ep.call(this)}function mt(){Ep.call(this)}function St(t){S7(t.c,t.b)}function Vt(t,e){llt(t.c,e)}function ee(t,e){f7(t.a,e)}function fe(t,e){xq(t.a,e)}function Cn(t,e){Ut(t.a,e)}function kn(t,e){Ir(t.b,e)}function Wn(t,e){Bi(t.e,e)}function Ki(t){MM(),MK.Rd(t)}function Er(){Er=P,o1t=new nt}function Wr(){Wr=P,wK=new W}function no(){no=P,s1t=new U}function Zr(){Zr=P,vK=new Zxt}function co(){co=P,_K=new Yxt}function $o(){$o=P,wzt=new ot}function Hh(){Hh=P,N4=new Lt}function _f(){_f=P,Ezt=new Fn}function $r(){this.a=new vi}function _u(){this.a=new SAt}function nd(){this.a=new Dt}function sm(){this.a=new Dt}function v9(){this.a=new Dt}function ext(){this.a=new Dt}function nxt(){this.a=new Dt}function ixt(){this.a=new $r}function eit(){this.a=new X3t}function nit(){this.a=new dAt}function iit(){this.a=new eTt}function rit(){this.a=new iv}function cl(){this.a=new Jf}function PG(){this.a=new Dt}function sit(){this.a=new Dt}function rxt(){this.b=new Dt}function oit(){this.f=new Dt}function sxt(){this.d=new Dt}function oxt(){this.a=new Dt}function Ng(){this.a=new Kkt}function cit(){this.a=new Mt}function cxt(){this.j=new Dt}function Va(){Fr.call(this)}function axt(){Dt.call(this)}function IG(){nd.call(this)}function ait(){o2.call(this)}function o2(){wh.call(this)}function c2(){wh.call(this)}function uit(){c2.call(this)}function uxt(){vi.call(this)}function lxt(){vi.call(this)}function hxt(){vi.call(this)}function fxt(){F4t.call(this)}function dxt(){F4t.call(this)}function pxt(){bD.call(this)}function gxt(){Pxt.call(this)}function mxt(){Pxt.call(this)}function lit(){yh.call(this)}function hit(){yh.call(this)}function RG(){Ort.call(this)}function DG(){Ort.call(this)}function NG(){WLt.call(this)}function fit(){zl.call(this)}function bxt(){zl.call(this)}function wxt(){fit.call(this)}function vxt(){x.call(this)}function _xt(){$r.call(this)}function dit(){vi.call(this)}function OG(){vi.call(this)}function yxt(){vi.call(this)}function xxt(){jh.call(this)}function uQt(t){j3t.call(this,t)}function pit(t){j3t.call(this,t)}function lQt(t){pit.call(this,t)}function Mxt(t){uPt.call(this,t)}function Ext(t){uPt.call(this,t)}function Sxt(t){yst.call(this,t)}function git(t){YG.call(this,t)}function mit(t){Z4t.call(this,t)}function Lv(t){nM.call(this,t)}function sc(t){DCt.call(this,t)}function Txt(t){sc.call(this,t)}function _9(t){sc.call(this,t)}function Uc(t){sc.call(this,t)}function Cxt(t){sc.call(this,t)}function BG(t){DCt.call(this,t)}function bit(t){Uc.call(this,t)}function gT(t){sc.call(this,t)}function yn(t){sc.call(this,t)}function yc(t){sc.call(this,t)}function Axt(t){sc.call(this,t)}function mT(t){sc.call(this,t)}function yf(t){yn.call(this,t)}function bT(){nT.call(this,{})}function Sp(){j3.call(this,"")}function wT(){j3.call(this,"")}function om(){j3.call(this,"")}function Bb(){j3.call(this,"")}function kxt(t){Uc.call(this,t)}function Tp(t){sc.call(this,t)}function wit(t){H7t(),uxe(this,t)}function FG(t){uM(),this.a=t}function C5(t){t.b=null,t.c=0}function hQt(t,e){t.a=e,r0e(t)}function fQt(t,e){return t*t/e}function Z3(t){return t<0?-t:t}function UG(t){vPt(),this.a=t}function zG(t){m$(),this.f=t}function jG(t){m$(),this.f=t}function HG(t,e,n){t.a[e.g]=n}function dQt(t,e,n){Bpe(n,t,e)}function pQt(t,e,n){Qye(n,t,e)}function gQt(t,e,n){Qfe(t,n,e)}function Lxt(){this.d=new Dt}function Pxt(){this.a=new Ez}function Ixt(){throw K(new Oi)}function vit(){throw K(new Oi)}function mQt(){throw K(new Oi)}function bQt(){throw K(new Oi)}function wQt(){throw K(new Oi)}function Rxt(){throw K(new Oi)}function A5(t){this.c=hi(si(t))}function vQt(t){return new h5(t)}function _Qt(t){return new M2(t)}function Z(t,e){return J4t(t,e)}function yQt(t,e){return t.a-e.a}function xQt(t,e){return t.a-e.a}function MQt(t,e){return t.a-e.a}function Dxt(t,e){return t.g-e.g}function Mh(t,e){return t>e?t:e}function cm(t,e){return t0}function qG(t,e){return Pc(t,e)<0}function Q3(t){return t.d.c+t.e.c}function go(){this.a=0,this.b=0}function E9(t){xD.call(this,t)}function w1(t){n_.call(this,t)}function h3t(t){j$.call(this,t)}function f3t(t){j$.call(this,t)}function S9(t){t6t.call(this,t,0)}function d3t(t){this.c=(En(t),t)}function T9(t){this.a=new S9(t)}function Ub(t){this.a=new w$(t)}function GQt(){throw K(new J)}function WQt(){throw K(new J)}function tM(){tM=P,R1t=new dEt}function Rv(){Rv=P,X_=new re}function p3t(){p3t=P,Uzt=new fn}function C9(){C9=P,DK=new PSt}function Iit(){Iit=P,kjt=new sv}function g3t(){g3t=P,Ljt=new Rt}function Rit(){Rit=P,Pjt=new MCt}function Dit(){Dit=P,kgt=new Hi}function m3t(){m3t=P,Ujt=new rl}function xT(){xT=P,Xjt=new Gy}function b3t(){b3t=P,qjt=new ES}function Nit(){Nit=P,v0t=new b3}function L5(){L5=P,Hjt=new go}function w3t(){w3t=P,L$t=new as}function v3t(){this.b=new AX(Nbt)}function _3t(){this.a=new AX(Zbt)}function y3t(){this.a=(Js(),Ff)}function x3t(){this.a=(Js(),Ff)}function A9(t){this.a=0,this.b=t}function k9(t){return t.b!=t.d.c}function M3t(t,e){return t.d[e.o]}function E3t(t,e){for(;t.sd(e););}function Oit(t,e,n){t.splice(e,n)}function $Qt(t,e,n){tc(t.d,e.f,n)}function VQt(t,e){_X(Et(t.a),e)}function qQt(t,e){_X(Et(t.a),e)}function S3t(t){t.c?ZDt(t):YDt(t)}function T3t(){T3t=P,_qt=new kR}function C3t(){C3t=P,Dqt=new lxt}function A3t(){A3t=P,Nqt=new hxt}function v1(){v1=P,Nl=new dit}function Bit(){Bit=P,zvt=new yxt}function L9(){L9=P,WF=new vi}function Fit(){Fit=P,Kvt=new Dt}function _1(){_1=P,hg=new sj}function MT(){MT=P,ctt=new KEt}function Ap(){Ap=P,wI=new JEt}function XG(){XG=P,qqt=new Ig}function Jo(){Jo=P,Zqt=new Gz}function P5(t){this.a=new q3t(t)}function k3t(t){this.a=a(si(t),13)}function L3t(t,e){this.b=t,this.c=e}function P3t(t,e){this.b=t,this.a=e}function Uit(t,e){this.b=t,this.d=e}function eM(t,e){this.e=t,this.d=e}function zit(t,e){this.b=t,this.c=e}function I3t(t,e){this.a=t,this.b=e}function R3t(t,e){this.a=t,this.b=e}function D3t(t,e){this.a=t,this.b=e}function N3t(t,e){this.a=t,this.b=e}function O3t(t,e){this.b=t,this.a=e}function d2(t,e){hM.call(this,t,e)}function Dv(t,e){d2.call(this,t,e)}function B3t(t,e){this.b=t,this.a=e}function F3t(t,e){this.a=t,this.b=e}function I5(t,e){this.g=t,this.i=e}function U3t(t,e){this.b=t,this.a=e}function ZG(t,e){this.a=t,this.b=e}function z3t(t,e){this.a=t,this.f=e}function j3t(t){NW(t.Wb()),this.c=t}function H3t(t,e){this.b=t,this.c=e}function Gi(t,e){this.f=t,this.g=e}function G3t(t,e){Gi.call(this,t,e)}function W3t(t,e){this.e=t,this.c=e}function YG(t){this.b=a(si(t),43)}function $3t(t){this.a=a(si(t),15)}function nM(t){this.a=a(si(t),15)}function jit(t,e){this.a=t,this.b=e}function XQt(t,e){return t>e&&e0?t:e}function SEt(t){return ia(t.l,t.m,t.h)}function CW(t){return t<10?"0"+t:""+t}function kte(t){return t==Xm||t==vw}function Lte(t){return t==Xm||t==ww}function ql(t){return nc(t.b.b,t,0)}function TEt(t){this.a=NMt(),this.b=t}function CEt(t){this.a=NMt(),this.b=t}function v2(t){this.a=t,r5.call(this)}function AEt(t){this.a=t,r5.call(this)}function yrt(t,e){IL(t,0,t.length,e)}function kEt(t,e){return Ut(t.a,e),e}function Pte(t,e){return Ut(t.c,e),t}function LEt(t,e){return pa(t.a,e),t}function Ite(t,e){return Zl(),e.a+=t}function Rte(t,e){return Zl(),e.c+=t}function Dte(t,e){return Zl(),e.a+=t}function PEt(t){return t==ry||t==iy}function zv(t){return t==ah||t==uh}function q5(t){return t==cg||t==fp}function Gd(t){return t!=dp&&t!=ob}function Xl(t){return t.eg()&&t.fg()}function tD(t){return pa(new as,t)}function IEt(){IEt=P,sQ=new DC(GQ)}function qa(){G8.call(this,new xm)}function REt(){XD.call(this,0,0,0,0)}function cM(){qh.call(this,0,0,0,0)}function xrt(t){sEt.call(this,t,!0)}function Oo(t){this.a=t.a,this.b=t.b}function Wd(t,e,n){th(t,e),eh(t,n)}function eD(t,e,n){o_(t,e),s_(t,n)}function Mrt(t,e,n){IV(t,e),RV(t,n)}function AW(t,e,n){_C(t,e),vC(t,n)}function kW(t,e,n){yC(t,e),xC(t,n)}function LW(t,e){fq(t,e),DV(t,t.D)}function DEt(t,e){return new NM(e,t)}function Nte(t,e){return new NM(e,t)}function Lp(t,e){return te?1:0}function zT(t){return uot(t.b.tc(),t.a)}function id(t){return KT(t.a.tc(),t.b)}function NEt(t){return ml(t,0,t.length)}function nD(t){return t!=null?Yr(t):0}function $d(t){Z4t.call(this,new mit(t))}function OEt(){N9.call(this,"Head",1)}function BEt(){N9.call(this,"Tail",3)}function Ert(t,e,n){ZW.call(this,t,e,n)}function Ote(t,e,n){D8(t,e.le(t.a,n))}function FEt(t,e){return parseInt(t,e)}function Bte(t,e){return bC(e,Tf(t))}function Fte(t,e){return bC(e,Tf(t))}function _2(t){XD.call(this,t,t,t,t)}function PW(t){t.c=dt(un,te,1,0,5,1)}function UEt(t){t.a=dt(un,te,1,8,5,1)}function Srt(t){return t.b&&VX(t),t.a}function Trt(t){return t.b&&VX(t),t.c}function IW(t){return t.d&&pX(t),t.c}function RW(t){return t.d&&pX(t),t.b}function Crt(t){return t.d&&pX(t),t.a}function Art(t,e,n){return Vr(t,e,n),n}function zEt(t,e,n){Vr(t.c[e.g],e.g,n)}function Ute(t,e,n){return wr(t.g,n,e)}function zte(t,e,n){return wr(t.k,n,e)}function jte(t,e,n){Wd(n,n.i+t,n.j+e)}function xc(t,e){es.call(this,t.b,e)}function jT(t){Ai(),Ba.call(this,t)}function ju(){ju=P,lg=(T3t(),_qt)}function Kn(){Kn=P,new jEt,new Dt}function jEt(){new vi,new vi,new vi}function Ao(){Ao=P,gzt=new xt,r1t=new Bt}function jv(){jv=P,h6=new nMt,f6=new yEt}function al(){al=P,e1t=bee(new A5(Rc))}function ts(){ts=P,new Vj((al(),"="))}function iD(t){t.j=dt(v1t,wt,287,0,0,1)}function HEt(t){this.a=t,Dst.call(this,t)}function Hte(t){return t==null?0:Yr(t)}function HT(t){return t==null?tu:Yc(t)}function bo(t,e){return t.charCodeAt(e)}function aM(t,e,n){return Prt(t,Ca(e),n)}function ia(t,e,n){return{l:t,m:e,h:n}}function Qo(t){return t.ae-1?0:e-1}function aee(t,e,n){return n?e!=0:e!=t-1}function FW(t,e,n){return t.a[e.g][n.g]}function uee(t,e){return t.e[e.c.o][e.o]}function lee(t,e){return t.a[e.c.o][e.o]}function Wh(t,e){return t.a[e.c.o][e.o]}function hee(t,e){return t.j[e.o]=jme(e)}function fee(t,e){return ro(t.c.d,e.c.d)}function dee(t,e){return ro(t.c.c,e.c.c)}function pee(t,e,n){L2e(t.a,t.b,t.c,e,n)}function gee(t,e,n,i){Vr(t.a[e.g],n.g,i)}function $T(t,e,n){return Vr(t.g,e,n),n}function hl(t,e){return t.a*=e,t.b*=e,t}function mee(t,e){t.q.setHours(e),r4(t,e)}function Ss(t,e,n){aL.call(this,t,e,n)}function oD(t,e,n){Ss.call(this,t,e,n)}function Hu(t,e,n){Ss.call(this,t,e,n)}function oSt(t,e,n){oD.call(this,t,e,n)}function Drt(t,e,n){CD.call(this,t,e,n)}function cSt(t,e,n){CD.call(this,t,e,n)}function aSt(t,e,n){Drt.call(this,t,e,n)}function uSt(t,e,n){Nrt.call(this,t,e,n)}function Nrt(t,e,n){aL.call(this,t,e,n)}function lM(t,e,n){aL.call(this,t,e,n)}function hM(t,e){this.a=t,JG.call(this,e)}function $n(t){this.i=t,this.f=this.i.j}function x1(t){this.c=t,this.a=this.c.a}function Ort(){this.Bb|=256,this.Bb|=512}function lSt(t,e){this.a=t,YG.call(this,e)}function hSt(t,e){this.a=e,YG.call(this,t)}function Brt(t){this.b=t,this.a=this.b.a.e}function fSt(t){t.b.jc(),--t.d.f.d,jD(t.d)}function dSt(t){t.a=a(an(t.b.a,4),116)}function pSt(t){t.a=a(an(t.b.a,4),116)}function gSt(t){a5.call(this,a(si(t),34))}function mSt(t){a5.call(this,a(si(t),34))}function bee(t){return si(tu),new $Tt(t,t)}function bSt(t,e){return new X8t(t.a,t.b,e)}function $h(t,e,n){return t.substr(e,n-e)}function wee(t){return t==null?null:t.name}function vee(t){return t.l+t.m*nx+t.h*o0}function Gb(t){return typeof t=="number"}function Vo(t){return typeof t=="number"}function Pp(t,e){return!!e&&t.b[e.g]==e}function Frt(t,e){var n;n=t[D_],e[D_]=n}function cD(t){Db.call(this,t),this.a=t}function Urt(t){Dg.call(this,t),this.a=t}function Z5(t){Pv.call(this,t),this.a=t}function zrt(t){G8.call(this,new Sct(t))}function wSt(t){if(!t)throw K(new C)}function Hn(t){if(!t)throw K(new J)}function Vd(t){t.o==null&&wme(t)}function UW(t){return Hn(t.a!=null),t.a}function vSt(t,e){return Ut(e.a,t.a),t.a}function _St(t,e){return Ut(e.b,t.a),t.a}function _ee(t,e){e&&(t.a=(Zv(e),e.a))}function jrt(t,e){return rC(t.a,e)!=null}function fa(t,e){return a(rr(t.a,e),15)}function zW(t){return t.b=a(h4t(t.a),38)}function lm(t){return t.$H||(t.$H=++y3e)}function jW(t){return Qo(t.a)||Qo(t.b)}function Wb(t,e){return!!t.p&&dm(t.p,e)}function yee(t,e){return t.k.b=(En(e),e)}function xee(t,e){return t.k.b=(En(e),e)}function aD(t,e){return++t.b,Ut(t.a,e)}function Hrt(t,e){return++t.b,Lc(t.a,e)}function Mee(t,e,n){return ekt(t,e,n,t.b)}function Grt(t,e,n){return ekt(t,e,n,t.c)}function Wrt(t,e){fut.call(this,t,e,null)}function ySt(t,e){this.a=e,YG.call(this,t)}function Y5(t){this.a=t,F8.call(this,t)}function xSt(){xT(),this.b=new t2(this)}function HW(t,e){m$(),this.f=e,this.d=t}function MSt(){iD(this),YD(this),this.Pd()}function VT(t){this.d=t,$n.call(this,t)}function y2(t){this.c=t,$n.call(this,t)}function K5(t){this.c=t,VT.call(this,t)}function Eee(t,e,n){xq(t.a,n),f7(t.a,e)}function $rt(t,e,n){a(PL(t,e),19).nc(n)}function hm(t,e){return Ut(e.a,t.a),t.a}function sd(t){var e;e=t.a,t.a=t.b,t.b=e}function J5(t,e){MT(),this.a=t,this.b=e}function uD(t,e){Ap(),this.b=t,this.c=e}function ESt(t,e,n,i){iot.call(this,t,e,n,i)}function lD(t,e,n){var i;i=t.fd(e),i.Bc(n)}function SSt(t,e,n){try{t[e]=n}catch{}}function hD(){hD=P,OF=new es(_Bt,0)}function qT(){qT=P,hA=new kr("root")}function XT(){XT=P,bI=new mxt,new gxt}function See(t){return++Ar,new Yb(3,t)}function od(t){return Ah(t,Q2),new Vu(t)}function Vrt(t){return Ao(),si(t),new MTt(t)}function Tee(t){return jv(),$i((vAt(),bzt),t)}function TSt(t){return MM(),parseInt(t)||-1}function Cee(t,e){return me(),t==e?0:t?1:-1}function Aee(t){return t==null?null:Yc(t)}function kee(t){return t==null?null:Yc(t)}function Q5(t){return t.f!=null?t.f:""+t.g}function GW(t){return bot(t.c,t.c.length)}function CSt(t){t.b=new LSt(t),t.c=new vi}function qrt(t){this.q=new y.Date(SM(t))}function ASt(t){this.c=t,this.a=1,this.b=1}function Xrt(t){tM(),this.b=t,this.a=!0}function kSt(){this.a=new Nv,this.b=new Nv}function LSt(t){Bst.call(this,t,null,null)}function PSt(){Gi.call(this,"POLYOMINO",0)}function tL(t){ct(t,142)&&a(t,142).Xg()}function WW(t){return Hn(t.b!=0),t.a.a.c}function fD(t){return Hn(t.b!=0),t.c.b.c}function Gu(t,e,n){return t.a+=e,t.b+=n,t}function Lee(t,e,n){return t.a*=e,t.b*=n,t}function eL(t,e,n){return t.a-=e,t.b-=n,t}function ISt(t,e,n){return t.a+=ml(e,0,n),t}function $W(t){return t.a=-t.a,t.b=-t.b,t}function VW(t){return Z3(t.d.e-t.e.e)-t.a}function Pee(t,e){return t.c.nc(a(e,134))}function Iee(t,e,n){return Ut(e,aIt(t,n))}function Ree(t,e){return t>0?e*e/t:e*e*100}function Dee(t,e){return t>0?e/(t*t):e*100}function Nee(t,e,n){YL(kc(t.a),e,bAt(n))}function Oee(t,e,n){YL(Ya(t.a),e,wAt(n))}function xu(t,e,n){lu.call(this,t,e,n,2)}function RSt(t,e){MT(),J5.call(this,t,e)}function Zrt(t,e){Ap(),uD.call(this,t,e)}function DSt(t,e){Ap(),uD.call(this,t,e)}function NSt(t,e){Ap(),Zrt.call(this,t,e)}function qW(t,e){ju(),ND.call(this,t,e)}function Yrt(t,e){ju(),ND.call(this,t,e)}function OSt(t,e){ju(),qW.call(this,t,e)}function Krt(t,e){ju(),qW.call(this,t,e)}function BSt(t,e){ju(),Krt.call(this,t,e)}function FSt(t,e){ju(),Yrt.call(this,t,e)}function USt(t,e){ju(),ND.call(this,t,e)}function Bee(t,e,n){return e.ak(t.e,t.c,n)}function Fee(t,e,n){return e.bk(t.e,t.c,n)}function Jrt(t,e,n){return $7(DL(t,e),n)}function XW(t,e){return B1(t.e,a(e,42))}function Uee(t){return t==null?null:G2e(t)}function zee(t){return t==null?null:vge(t)}function zSt(t){this.c=t,th(t,0),eh(t,0)}function fM(t,e){this.c=t,eM.call(this,t,e)}function ZT(t,e){this.a=t,fM.call(this,t,e)}function Qrt(t){this.a=t,this.b=$Ct(this.a.d)}function jee(t,e){this.d=t,$j(this),this.b=e}function tst(){WLt.call(this),this.Bb|=ao}function dD(){$le.call(this,new xm,new vi)}function ZW(t,e,n){EL.call(this,t,e,n,null)}function est(t,e,n){EL.call(this,t,e,n,null)}function cd(t,e){t.a.bd(t.b,e),++t.b,t.c=-1}function nst(t,e){var n;return n=t.e,t.e=e,n}function de(t){return WT(t==null||Hb(t)),t}function Yt(t){return WT(t==null||Gb(t)),t}function hi(t){return WT(t==null||Es(t)),t}function Hee(t,e){return si(t),si(e),MC(t,e)}function jSt(t){return t>8?0:t+1}function HSt(t){uu(t.c),t.b.b=t.b,t.b.a=t.b}function GSt(t,e){T5t.call(this,t),this.a=e}function gi(t,e){T5t.call(this,t),this.a=e}function Gee(t){rut.call(this,0,0),this.f=t}function YW(t){var e;e=t[D_]|0,t[D_]=e+1}function Wee(t,e,n){return t.Ld(e,n)<=0?n:e}function $ee(t,e){return a(D2(t.b,e),180)}function Vee(t,e){return a(D2(t.c,e),199)}function KW(t){return a(Ee(t.a,t.b),269)}function WSt(t){return new We(t.c,t.d+t.a)}function ist(t){return N1(Dre(Vo(t)?gl(t):t))}function $St(t){return Mu(),PEt(a(t,179))}function Fg(){Fg=P,Evt=qe((Ku(),E0))}function pD(){pD=P,y.Math.pow(2,-65)}function nL(t,e,n){++t.j,t.Yh(),pV(t,e,n)}function VSt(t,e,n){++t.j,t.Vh(e,t.Ch(e,n))}function rst(t,e,n){return n=ku(t,e,3,n),n}function sst(t,e,n){return n=ku(t,e,6,n),n}function ost(t,e,n){return n=ku(t,e,9,n),n}function qd(t,e){return A$(e,dpt),t.f=e,t}function cst(t,e){return(e&qi)%t.d.length}function qee(t,e){return L5(),GM(e.d.g,t)}function qSt(t,e){return wr(t.a,e,"")==null}function XSt(t,e,n){return Sht(t.c,t.b,e,n)}function Xee(t,e,n){var i;i=t.fd(e),i.Bc(n)}function ZSt(t,e){this.a=t,EG.call(this,e)}function iL(t,e){this.a=t,EG.call(this,e)}function YSt(t,e){this.c=t,n_.call(this,e)}function KSt(t){this.b=t,this.a=this.b.b.Tb()}function ast(t,e){l9.call(this,t),this.a=e}function JW(t,e){l9.call(this,t),this.a=e}function es(t,e){kr.call(this,t),this.a=e}function Wv(t,e){Uc.call(this,S4+t+LO+e)}function gD(){uQt.call(this,new vi),this.a=3}function rL(t){return!t.a&&(t.a=new ln),t.a}function mD(t){t.b?mD(t.b):t.f.c.Zb(t.e,t.d)}function JSt(t){this.a=(we(),new rT(si(t)))}function M1(t,e){if(!t)throw K(new yc(e))}function ust(t,e){if(!t)throw K(new yn(e))}function lst(t,e,n){return t.lastIndexOf(e,n)}function Zee(t,e,n){return t.apply(e,n);var i}function QW(t,e,n){return x2(t,a(e,23),n)}function Yee(t,e){return VG(DIt(t.a,e,!0))}function Kee(t,e){return VG(NIt(t.a,e,!0))}function QSt(t){return new d3t((Zv(t),t.a))}function t$(t){return String.fromCharCode(t)}function Jee(t){return t==null?null:t.message}function Qee(t,e){t.e=e,e!=null&&SSt(e,gZ,t)}function tne(t,e,n){return ro(t[e.b],t[n.b])}function hst(t,e,n,i){XD.call(this,t,e,n,i)}function sL(t){cle.call(this,t,(_N(),kK))}function ene(t,e){return t.k.a=(En(e),e+10)}function nne(t,e){return t.k.a=(En(e),e+10)}function ine(t,e){return L5(),!GM(e.d.g,t)}function tTt(){tTt=P,p1t=dt(Io,wt,21,256,0,1)}function me(){me=P,$m=(me(),!1),ME=!0}function eTt(){this.b=new go,this.c=new Dt}function fst(){this.d=new go,this.e=new go}function dst(){this.k=new go,this.n=new go}function nTt(){this.b=new v3t,this.a=new _e}function iTt(){this.b=new vi,this.a=new vi}function rTt(){this.b=new $r,this.a=new $r}function sTt(){this.a=new Dt,this.d=new Dt}function oTt(){this.a=new Dt,this.b=new Dt}function cTt(){this.a=new iv,this.b=new LG}function aTt(){this.a=new v9,this.c=new bs}function bD(){this.n=new c2,this.i=new cM}function uTt(){bD.call(this),this.a=new go}function pst(t,e,n){return n=ku(t,e,11,n),n}function sr(t,e){return t.a+=e.a,t.b+=e.b,t}function za(t,e){return t.a-=e.a,t.b-=e.b,t}function rne(t,e){var n;return n=e.Yg(t.a),n}function gst(t,e){return a(t.b.cd(e),190).a}function sne(t,e){return e==t||VC(R7(e),t)}function one(t){return t<100?null:new w1(t)}function cne(t,e,n){n!=null&&eat(e,Xq(t,n))}function ane(t,e,n){n!=null&&nat(e,Xq(t,n))}function dM(t,e,n,i){Wt.call(this,t,e,n,i)}function mst(t,e,n,i){Wt.call(this,t,e,n,i)}function lTt(t,e,n,i){mst.call(this,t,e,n,i)}function hTt(t,e,n,i){WD.call(this,t,e,n,i)}function e$(t,e,n,i){WD.call(this,t,e,n,i)}function bst(t,e,n,i){WD.call(this,t,e,n,i)}function fTt(t,e,n,i){e$.call(this,t,e,n,i)}function wst(t,e,n,i){e$.call(this,t,e,n,i)}function pn(t,e,n,i){bst.call(this,t,e,n,i)}function dTt(t,e,n,i){wst.call(this,t,e,n,i)}function pTt(t,e,n,i){aot.call(this,t,e,n,i)}function gTt(t,e,n){this.a=t,Uit.call(this,e,n)}function une(t,e,n){return t.d=a(e.Kb(n),206)}function mTt(t,e){return t.Pi().dh().Zg(t,e)}function vst(t,e){return t.Pi().dh()._g(t,e)}function n$(t,e){return Ao(),Ple(t.tc(),e)!=-1}function lne(t,e){return ts(),new ySt(t.tc(),e)}function wD(t){return Ao(),t.hc()?t.ic():null}function _st(t){return Gb(t)?(En(t),t):t.$d()}function vD(t){return!isNaN(t)&&!isFinite(t)}function yst(t){$b(),this.b=(we(),new Pv(t))}function $b(){$b=P,new Lj((we(),we(),fo))}function bTt(){bTt=P,Hqt=dt(un,te,1,0,5,1)}function xst(){xst=P,Gqt=dt(un,te,1,0,5,1)}function wTt(){wTt=P,Tqt=dt(un,te,1,0,5,1)}function vTt(){vTt=P,f1t=dt(fx,wt,192,256,0,1)}function _Tt(){_Tt=P,g1t=dt(Vm,wt,149,256,0,1)}function yTt(){yTt=P,w1t=dt(qm,wt,168,256,0,1)}function xTt(){xTt=P,d1t=dt(O4,wt,159,128,0,1)}function MTt(t){this.b=t,this.a=(Ao(),Ao(),r1t)}function ETt(t){this.b=t,J9.call(this,tO,0)}function STt(t){this.c=t,J9.call(this,tO,0)}function TTt(t){return t.c?nc(t.c.a,t,0):-1}function i$(t,e){return VG(NIt(t.a,e,!1))}function r$(t,e){return VG(DIt(t.a,e,!1))}function $v(t,e){return t.b.sd(new Xit(t,e))}function CTt(t,e){return t.b.sd(new aMt(t,e))}function _D(t,e){if(!t)throw K(new yn(e))}function Mst(t,e){if(!t)throw K(new Cxt(e))}function Est(t,e){b9(this),this.e=t,this.f=e}function Sst(){b9(this),this.e=0,this.f=!0}function Tst(t,e){this.c=t,E$.call(this,t,e)}function ATt(t,e){return ct(e,15)&&XDt(t.c,e)}function yD(t,e,n){return a(t.c,64).yj(e,n)}function hne(t,e,n){return a(t.c,64).xj(e,n)}function fne(t,e,n){return Bee(t,a(e,311),n)}function Cst(t,e,n){return Fee(t,a(e,311),n)}function dne(t,e,n){return a8t(t,a(e,311),n)}function kTt(t,e,n){return J1e(t,a(e,311),n)}function pne(t,e){return rd(),ni(Et(t.a),e)}function gne(t,e){return rd(),ni(Et(t.a),e)}function mne(t){return Ao(),k9(t.a)?okt(t):null}function LTt(t,e){return t.b.Qb(e)?t4t(t,e):null}function oL(t,e){return t.substr(e,t.length-e)}function PTt(t){return a(t,11).f.c.length!=0}function ITt(t){return a(t,11).d.c.length!=0}function YT(t){return t==Rx||t==Sd||t==Gc}function RTt(t){Th(t.a),E5t(t.c,t.b),t.b=null}function Eh(t){PW(this),Ust(this.c,0,t.yc())}function xD(t){$Et(this),ld(this),yo(this,t)}function DTt(t,e,n){this.d=t,this.b=n,this.a=e}function ja(t,e,n){this.a=t,this.b=e,this.c=n}function NTt(t,e,n){this.a=t,this.b=e,this.c=n}function OTt(t,e,n){this.c=t,this.a=e,this.b=n}function bne(t,e,n,i){t.d.b.$b(n),t.d.b.Zb(i,e)}function KT(t,e){return Ao(),si(e),new hSt(t,e)}function wne(t){return c7(),$i((dkt(),Gzt),t)}function vne(t){return MN(),$i((pkt(),Wzt),t)}function _ne(t){return _N(),$i((O5t(),Bzt),t)}function yne(t){return z1(),$i(($kt(),Fzt),t)}function xne(t){return F7(),$i((FPt(),$zt),t)}function Mne(t){return G2(),$i((U5t(),qzt),t)}function Ene(t){return HC(),$i((z5t(),Zzt),t)}function Sne(t){return C9(),$i((jAt(),Yzt),t)}function Tne(t){return SN(),$i((gkt(),djt),t)}function Cne(t){return gC(),$i((a5t(),Ejt),t)}function Ane(t){return Mo(),$i((cLt(),Ajt),t)}function kne(t){return FM(),$i((F5t(),Rjt),t)}function Lne(t){return Ke(),$i((fPt(),jjt),t)}function s$(t){XD.call(this,t.d,t.c,t.a,t.b)}function Ast(t){XD.call(this,t.d,t.c,t.a,t.b)}function Pne(t){return LC(),$i((u5t(),$jt),t)}function Ine(t){return Po(),$i((BMt(),Vjt),t)}function Rne(t){return $C(),$i((sLt(),Qjt),t)}function Dne(t){return gN(),$i((mkt(),tHt),t)}function Nne(t){return XM(),$i((NLt(),eHt),t)}function One(t){return L2(),$i((bkt(),nHt),t)}function Bne(t){return AN(),$i((Qkt(),iHt),t)}function Fne(t){return RN(),$i((Jkt(),rHt),t)}function Une(t){return u_(),$i((t5t(),oHt),t)}function zne(t){return M7(),$i((ILt(),cHt),t)}function jne(t){return dP(),$i((RLt(),aHt),t)}function Hne(t){return YM(),$i((DLt(),uHt),t)}function Gne(t){return So(),$i((u6t(),lHt),t)}function Wne(t){return DM(),$i((o5t(),hHt),t)}function $ne(t){return tp(),$i((c5t(),dHt),t)}function Vne(t){return uN(),$i((wkt(),pHt),t)}function qne(t){return bl(),$i((oLt(),mHt),t)}function Xne(t){return _7(),$i((OLt(),$Gt),t)}function Zne(t){return nw(),$i((B5t(),VGt),t)}function Yne(t){return jC(),$i((rLt(),qGt),t)}function Kne(t){return S_(),$i((TPt(),XGt),t)}function Jne(t){return Fo(),$i((e5t(),YGt),t)}function Qne(t){return e7(),$i((n5t(),KGt),t)}function tie(t){return PN(),$i((i5t(),JGt),t)}function eie(t){return B2(),$i((s5t(),QGt),t)}function nie(t){return zN(),$i((r5t(),tWt),t)}function kst(t,e){for(;t.b.sd(new Xit(t,e)););}function MD(t,e,n){this.b=t,this.a=e,this.c=n}function Lst(t,e,n){this.a=t,this.b=e,this.c=n}function BTt(t,e,n){this.a=t,this.b=e,this.c=n}function ED(t,e,n){this.e=e,this.b=t,this.d=n}function o$(t){var e;return e=new q0,e.e=t,e}function iie(t){return!t.e&&(t.e=new Dt),t.e}function Zl(){Zl=P,Zjt=new Sk,Yjt=new pv}function c$(){c$=P,P1t=new Pn,Ozt=new Tt}function cL(){cL=P,fB=new Bc,dB=new yS}function rie(t){return hC(),$i((Ckt(),_Wt),t)}function sie(t){return Tm(),$i((l5t(),mWt),t)}function oie(t){return VM(),$i((j5t(),p$t),t)}function cie(t){return ZC(),$i((kLt(),m$t),t)}function aie(t){return Sf(),$i((_kt(),CWt),t)}function uie(t){return Zh(),$i((vkt(),kWt),t)}function lie(t){return LL(),$i((ykt(),PWt),t)}function hie(t){return mu(),$i((FMt(),s$t),t)}function fie(t){return ZL(),$i((f5t(),N$t),t)}function die(t){return vN(),$i((Tkt(),D$t),t)}function pie(t){return vm(),$i((xkt(),d$t),t)}function gie(t){return eN(),$i((Ekt(),S$t),t)}function mie(t){return iN(),$i((Skt(),T$t),t)}function bie(t){return kN(),$i((Mkt(),P$t),t)}function wie(t){return t7(),$i((h5t(),R$t),t)}function vie(t){return d7(),$i((H5t(),$$t),t)}function _ie(t){return DN(),$i((d5t(),V$t),t)}function yie(t){return t0(),$i((uLt(),X$t),t)}function xie(t){return i0(),$i((CPt(),Y$t),t)}function Mie(t){return md(),$i((LLt(),K$t),t)}function Eie(t){return Kh(),$i((p5t(),SVt),t)}function Sie(t){return Ht(),$i((Y5t(),TVt),t)}function Tie(t){return Ls(),$i((yLt(),EVt),t)}function Cie(t){return Kg(),$i((m5t(),yVt),t)}function Aie(t){return r0(),$i((zPt(),xVt),t)}function kie(t){return G1(),$i((aLt(),MVt),t)}function Lie(t){return Js(),$i((lLt(),mVt),t)}function Pie(t){return ip(),$i((G5t(),bVt),t)}function Iie(t){return gd(),$i((W5t(),wVt),t)}function Rie(t){return y7(),$i((PLt(),vVt),t)}function Die(t){return Ku(),$i(($5t(),PVt),t)}function Nie(t){return ma(),$i((UPt(),IVt),t)}function Oie(t){return r7(),$i((q5t(),RVt),t)}function Bie(t){return Tu(),$i((X5t(),OVt),t)}function Fie(t){return Ch(),$i((g5t(),FVt),t)}function Uie(t){return hu(),$i((b5t(),zVt),t)}function zie(t){return Ha(),$i((w5t(),HVt),t)}function jie(t){return Z7(),$i((wEt(),hqt),t)}function Hie(t){return Am(),$i((V5t(),dqt),t)}function Gie(t){return JM(),$i((APt(),Sqt),t)}function a$(t,e,n){return t=e)throw K(new m9)}function mre(t,e){var n;for(n=0;n0?1:0}function Yst(t){return!Array.isArray(t)&&t.sl===B}function _Ct(t){return t!=null&&y$(t)&&t.sl!==B}function Kst(t,e){return ct(e,23)&&Pp(t,a(e,23))}function yCt(t,e){return ct(e,23)&&bue(t,a(e,23))}function _re(t,e){return t.a.get(e)!==void 0}function Jst(t){return pu(t,26)*l4+pu(t,27)*h4}function xCt(t,e){return Cue(new ie,new Xj(t),e)}function Qst(t,e){if(t==null)throw K(new mT(e))}function x2(t,e,n){return Su(t.a,e),lot(t,e.g,n)}function FD(t,e,n){M6t(0,e,t.length),IL(t,0,e,n)}function pm(t,e,n){Qv(e,t.c.length),B5(t.c,e,n)}function yre(t,e,n){Y9t(n,t,1),Ut(e,new vMt(n,t))}function xre(t,e,n){GC(n,t,1),Ut(e,new mMt(n,t))}function tot(){this.d=new xi,this.e=new O4t(this)}function MCt(){this.b=new tn,this.c=new N4t(this)}function ECt(){eAt(),this.e=new Fr,this.d=new Fr}function g$(t,e){this.b=new Fr,this.a=t,this.c=e}function qv(t,e,n){V1(),this.e=t,this.d=e,this.a=n}function UD(t,e,n){var i;t&&(i=t.i,i.d=e,i.a=n)}function zD(t,e,n){var i;t&&(i=t.i,i.c=e,i.b=n)}function SCt(t,e,n){var i;for(i=0;i0?y.Math.log(t/e):-100}function Fre(t,e){return ro(t.c.c+t.c.b,e.c.c+e.c.b)}function E$(t,e){this.d=t,$n.call(this,t),this.e=e}function qb(t,e,n){return Nle(t,e.g,n),Su(t.c,e),t}function Ure(t){return k_(t,(Js(),ah)),t.d=!0,t}function si(t){if(t==null)throw K(new i2);return t}function M2(t){if(t==null)throw K(new i2);this.a=t}function S$(t){t.a=null,t.e=null,uu(t.b),t.d=0,++t.c}function T$(t){return!t.j&&Gnt(t,cve(t.g,t.b)),t.j}function zre(t){return t.b.k.a+=t.a.f*(t.a.a-1),null}function eC(t){Gv(t.b!=-1),Em(t.c,t.a=t.b),t.b=-1}function FCt(t){UEt(this),kG(this.a,bat(8>t?8:t)<<1)}function pot(t,e){Ba.call(this,1),this.a=t,this.b=e}function C$(t,e,n){this.a=t,oV(n,e),this.c=e,this.b=n}function UCt(t,e){this.a=t,this.b=e,this.c=this.b.lc()}function dL(t,e){eSt(t,ct(e,184)?e:a(e,1630).rk())}function zCt(t){return si(t),ct(t,476)?a(t,476):Yc(t)}function got(t,e){return e?yo(t,e):!1}function gM(t,e){return t.a+=String.fromCharCode(e),t}function S1(t,e){return t.a+=String.fromCharCode(e),t}function jre(t,e,n,i){return t.a+=""+e.substr(n,i-n),t}function Hre(t,e,n){var i;return i=N2(t,e),Akt(t,e,n),i}function Gre(t,e,n){var i;for(i=0;i=t.g}function rse(t,e){return A2(),t==n0(e)?Dm(e):n0(e)}function wr(t,e,n){return Es(e)?tc(t,e,n):Cu(t.d,e,n)}function P$(t,e,n){var i;return i=UV(t,e,n),oht(t,i)}function iC(t,e){var n;return n=t.a._b(),Xoe(e,n),n-1-e}function _ot(t,e){var n;return n=new yL(t),Zat(n,e),n}function Vr(t,e,n){return eee(n==null||Hve(t,n)),t[e]=n}function S2(t,e){var n;n=t.a.length,N2(t,n),Akt(t,n,e)}function XCt(t,e){var n;++t.j,n=t.hi(),t.Wh(t.Ch(n,e))}function sse(t,e){S2(t,new M2(e.f!=null?e.f:""+e.g))}function ose(t,e){S2(t,new M2(e.f!=null?e.f:""+e.g))}function ZCt(t){this.b=new Dt,this.a=new Dt,this.c=t}function dl(t){this.c=new go,this.a=new Dt,this.b=t}function YCt(t){fst.call(this),this.a=new go,this.c=t}function yot(t,e,n){fT.call(this,e),this.a=t,this.b=n}function xot(t,e,n){Ba.call(this,t),this.a=e,this.b=n}function Mot(t,e,n){this.a=t,l9.call(this,e),this.b=n}function KCt(t,e,n){this.a=t,nct.call(this,8,e,null,n)}function JCt(t){this.c=t,this.a=new Fr,this.b=new Fr}function QCt(t){this.c=t,this.b=this.c.a,this.a=this.c.e}function cse(t){this.a=(En(ui),ui),this.b=t,new dit}function mm(t){return!t.d&&(t.d=new Ss(Do,t,1)),t.d}function t4t(t,e){var n;return n=t.b.$b(e),t.d.b.$b(n),n}function Eot(t,e){for(;e-- >0;)t=t<<1|(t<0?1:0);return t}function Rp(t,e){return zt(t)===zt(e)||t!=null&&Fi(t,e)}function bm(t,e){return QT(e,t.a.c.length),Ee(t.a,e)}function I$(t){return y.Math.sqrt(t.a*t.a+t.b*t.b)}function ase(t){return String.fromCharCode.apply(null,t)}function Dp(t){return ct(t,13)?a(t,13)._b():fC(t.tc())}function e4t(t){return ct(t,543)?t:new eMt(t)}function Mc(t){return!t.a&&t.c?t.c.b:t.a}function R$(t){t.c?R$(t.c):(t.d=!0,Pbe(t))}function Zv(t){t.c?Zv(t.c):(HM(t),t.d=!0)}function n4t(t){gL(t.a),t.b=dt(un,te,1,t.b.length,5,1)}function D$(t){this.c=t,this.b=t.a.b.a,Frt(t.a.c,this)}function use(t,e){t.c<0||t.b.b0?new Est(t-1,e):new Est(t,e)}function u4t(t,e){return TD(),new gut(new mSt(t),new gSt(e))}function vM(t){if(du(t.d),t.d.d!=t.c)throw K(new C)}function wse(t,e){var n;return n=t.a.get(e),n??[]}function vse(t,e){var n;return n=zi(t.f,e),hat(e,n),null}function _i(t,e,n,i){return WPt(t,e,n,!1),zat(t,i),t}function _se(t,e){return t.a=$h(t.a,0,e)+""+oL(t.a,e+1),t}function yse(t){return t.j.c=dt(un,te,1,0,5,1),t.a=-1,t}function xse(t){return!t.c&&(t.c=new pn(Si,t,5,8)),t.c}function Mse(t){return!t.b&&(t.b=new pn(Si,t,4,7)),t.b}function B$(t){return!t.n&&(t.n=new Wt(ic,t,1,7)),t.n}function kot(t){return!t.c&&(t.c=new Wt(Rl,t,9,9)),t.c}function _M(t){return t.e==_E&&jnt(t,Ffe(t.g,t.b)),t.e}function pL(t){return t.f==_E&&Hnt(t,fpe(t.g,t.b)),t.f}function l4t(t){return WT(t==null||y$(t)&&t.sl!==B),t}function Lot(t,e){if(t==null)throw K(new mT(e));return t}function Xb(t){var e;return e=t.b,!e&&(t.b=e=new Bj(t)),e}function Pot(t){var e;return e=t.Gh(t.f),ni(t,e),e.hc()}function gL(t){var e;for(e=t.tc();e.hc();)e.ic(),e.jc()}function h4t(t){return Hn(t.bi&&++i,i}function Kd(t){var e,n;return n=(e=new b1,e),wC(n,t),n}function z$(t){var e,n;return n=(e=new b1,e),x8t(n,t),n}function Ase(t){if(t.p!=5)throw K(new na);return or(t.f)}function kse(t){if(t.p!=5)throw K(new na);return or(t.k)}function y4t(t){return t?t.Wb():!null.tc().hc()}function YD(t){return t.n&&(t.e!==xOt&&t.Pd(),t.j=null),t}function Lse(t){return t!=null&&ST($F,t.toLowerCase())}function j$(t){this.f=t,this.c=this.f.e,t.f>0&&$Rt(this)}function jg(t,e,n,i){this.e=t,this.a=e,this.c=n,this.d=i}function x4t(t,e,n,i){ju(),qkt.call(this,e,n,i),this.a=t}function M4t(t,e,n,i){ju(),qkt.call(this,e,n,i),this.a=t}function E4t(t,e,n,i){this.b=t,this.c=i,J9.call(this,e,n)}function S4t(t,e){this.a=t,jee.call(this,t,a(t.d,15).fd(e))}function ld(t){t.a.a=t.c,t.c.b=t.a,t.a.b=t.c.a=null,t.b=0}function Rot(t,e){return t.b=e.b,t.c=e.c,t.d=e.d,t.a=e.a,t}function Pse(t,e,n){t.i=0,t.e=0,e!=n&&p6t(t,e,n)}function Ise(t,e,n){t.i=0,t.e=0,e!=n&&g6t(t,e,n)}function T4t(t,e){var n;return n=_V(e),a(zi(t.c,n),21).a}function Rse(t,e,n){return n>=0&&le(t.substr(n,e.length),e)}function H$(t,e){return e==null?!!Ea(t.d,null):_re(t.e,e)}function C4t(t,e){t.d&&!t.d.a&&(AG(t.d,e),C4t(t.d,e))}function A4t(t,e){t.e&&!t.e.a&&(AG(t.e,e),A4t(t.e,e))}function k4t(t,e){this.g=t,this.d=Y(Z(Cl,1),Ih,8,0,[e])}function Dot(t,e){new Fr,this.a=new Va,this.b=t,this.c=e}function L4t(){alt(this,new x8),this.wb=(T1(),Ae),Y3()}function P4t(t,e){return ct(e,166)&&le(t.b,a(e,166).Lf())}function Dse(t,e){return fu(t),fu(e),Dxt(a(t,23),a(e,23))}function Not(t,e,n,i,r,c){N5t.call(this,t,e,n,i,r,c?-2:-1)}function I4t(t,e,n,i){mrt.call(this,e,n),this.b=t,this.a=i}function R4t(t,e){lQt.call(this,new w$(t)),this.a=t,this.b=e}function Oot(t){this.b=t,this.c=t,t.e=null,t.c=null,this.a=1}function D4t(t,e){var n;return n=Og(t.ql),e==null?n:n+": "+e}function ns(t,e){return N1(Tre(Vo(t)?gl(t):t,Vo(e)?gl(e):e))}function Xh(t,e){return N1(Cre(Vo(t)?gl(t):t,Vo(e)?gl(e):e))}function Nse(t,e){return N1(Are(Vo(t)?gl(t):t,Vo(e)?gl(e):e))}function Bot(t){return t&&t.hashCode?t.hashCode():lm(t)}function yM(t){return we(),ct(t,49)?new WG(t):new cD(t)}function we(){we=P,fo=new xe,ap=new hn,QO=new Se}function xM(){xM=P,k1t=new ke,Pzt=new ke,L1t=new mn}function Fot(){Fot=P,zzt=new An,Hzt=new tot,jzt=new zn}function MM(){MM=P;var t,e;e=!yfe(),t=new ft,MK=e?new Q:t}function N4t(t){this.c=t,this.b=new Ub(a(si(new Je),65))}function O4t(t){this.c=t,this.b=new Ub(a(si(new Li),65))}function Np(){this.a=new Va,this.b=(Ah(3,Q2),new Vu(3))}function G$(t,e,n){this.a=t,this.e=!1,this.d=e,this.c=n}function B4t(t,e,n){return t.f?t.f.re(e,n):!1}function Et(t){return!t.s&&(t.s=new Wt(Ra,t,21,17)),t.s}function Wi(t){return!t.q&&(t.q=new Wt(ph,t,11,10)),t.q}function Uot(t){return!t.a&&(t.a=new Wt(zr,t,10,11)),t.a}function Ose(t,e){var n;return n=Irt(t.a,e),n&&(e.d=null),n}function Yv(t,e,n,i){Vr(t.c[e.g],n.g,i),Vr(t.c[n.g],e.g,i)}function KD(t,e,n,i){Vr(t.c[e.g],e.g,n),Vr(t.b[e.g],e.g,i)}function T2(t,e,n){hN(),t&&wr(itt,t,e),t&&wr(gI,t,n)}function Bse(t,e){rSt(t,or(ns(E1(e,24),nO)),or(ns(e,nO)))}function da(t){var e;return e=a(an(t,16),24),e||t.Rg()}function Fse(t){if(t.p!=0)throw K(new na);return ET(t.f,0)}function Use(t){if(t.p!=0)throw K(new na);return ET(t.k,0)}function Bo(t){return t.u||(pl(t),t.u=new ZSt(t,t)),t.u}function zse(t){return t==hp||t==Zp}function jse(t){x9(),y.setTimeout(function(){throw t},0)}function W$(t){this.c=t.c,this.d=t.d,this.b=t.b,this.a=t.a}function Op(t,e){this.e=t,this.a=un,this.b=hNt(e),this.c=e}function F4t(){this.b=new $r,this.c=new Fr,this.d=new IG}function Sf(){Sf=P,Qm=new srt(fE,0),Xp=new srt(hE,1)}function vm(){vm=P,sg=new lrt(hE,0),oy=new lrt(fE,1)}function U4t(){U4t=P,$b(),i1t=($o(),wzt),pzt=new Cot(new Ub(i1t))}function Hse(t){return U4t(),si(t),i1t==t?pzt:new Cot(new Ub(t))}function Hg(t,e,n,i,r,c,l){return new rV(t.e,e,n,i,r,c,l)}function z4t(t,e,n,i,r,c){this.a=t,OV.call(this,e,n,i,r,c)}function j4t(t,e,n,i,r,c){this.a=t,OV.call(this,e,n,i,r,c)}function zot(t){this.e=t,this.b=this.e.a.entries(),this.a=[]}function jot(t){t.d=t.d-15,t.b=t.b-15,t.c=t.c+15,t.a=t.a+15}function H4t(t,e){var n;n=a(Ict(t.e,e),249),n&&(t.d=!0)}function Zc(t,e){return e==null?Ua(Ea(t.d,null)):LT(t.e,e)}function Ea(t,e){return b6t(t,e,wse(t,e==null?0:t.b.he(e)))}function G4t(t,e){return e===t?"(this Map)":e==null?tu:Yc(e)}function Gse(t,e){return t.a?e.pg().tc():a(e.pg(),64).oh()}function bL(t,e,n){return t.a=$h(t.a,0,e)+(""+n)+oL(t.a,e),t}function Gg(t,e){if(e==null)throw K(new i2);return Lfe(t,e)}function Wse(){return c7(),Y(Z(G1t,1),jt,391,0,[PK,H1t])}function $se(){return MN(),Y(Z($1t,1),jt,390,0,[W1t,IK])}function Vse(){return SN(),Y(Z(ggt,1),jt,387,0,[UK,cB])}function qse(){return gN(),Y(Z(E0t,1),jt,386,0,[M0t,pJ])}function Xse(){return L2(),Y(Z(C0t,1),jt,317,0,[M6,x6])}function Zse(){return uN(),Y(Z(V0t,1),jt,383,0,[kJ,$0t])}function Yse(){return iN(),Y(Z(Xbt,1),jt,388,0,[mQ,qbt])}function Kse(){return eN(),Y(Z(Vbt,1),jt,438,0,[gQ,$bt])}function Jse(){return kN(),Y(Z(Zbt,1),jt,447,0,[gF,OE])}function Qse(){return LL(),Y(Z(Rbt,1),jt,437,0,[Ibt,oF])}function toe(){return Sf(),Y(Z(TWt,1),jt,466,0,[Qm,Xp])}function eoe(){return Zh(),Y(Z(AWt,1),jt,465,0,[x0,rf])}function noe(){return vm(),Y(Z(f$t,1),jt,417,0,[sg,oy])}function ioe(){return hC(),Y(Z(vWt,1),jt,472,0,[rA,iA])}function roe(){return vN(),Y(Z(Kbt,1),jt,389,0,[Ybt,_Q])}function JD(t,e,n,i){return n>=0?t.Dg(e,n,i):t.lg(null,n,i)}function soe(t,e){var n;n=a(cn(e,(qT(),hA)),35),YNt(t,n)}function $$(t){var e;return e=fl(t.b),yo(e,t.c),yo(e,t.i),e}function Hot(t){return zt(t.a)===zt((WV(),ott))&&yye(t),t.a}function W4t(t){return t.b.b==0?t.a.Be():h$(t.b)}function Got(t){var e;return e=t.g,a(e||(t.g=new S8(t)),15)}function Zh(){Zh=P,x0=new ort(RY,0),rf=new ort("UP",1)}function V$(t,e){Pnt(this,new We(t.a,t.b)),Int(this,fl(e))}function $4t(t,e){bD.call(this),Wct(this),this.a=t,this.c=e}function Wot(t,e,n){ju(),fT.call(this,e),this.a=t,this.b=n}function q$(t,e,n){Ai(),Ba.call(this,t),this.b=e,this.a=n}function ooe(t,e){var n=xK[t.charCodeAt(0)];return n??t}function coe(t,e){var n;return n=uue(t.f,e),sr($W(n),t.f.d)}function V4t(t){var e;e=t.c.b.b,t.b=e,t.a=t.c.b,e.a=t.c.b.b=t}function aoe(t){return t.b==0?null:(Hn(t.b!=0),Ql(t,t.a.a))}function uoe(t){return so(Yd(Ka(pu(t,32)),32),Ka(pu(t,32)))}function q4t(t){return ct(t,62)&&(a(a(t,17),62).Bb&ca)!=0}function Tr(t){return Math.max(Math.min(t,qi),-2147483648)|0}function QD(t,e){return rct(e),Nae(t,dt(Gn,pi,22,e,15,1),e)}function loe(t,e){return A2(),t==io(n0(e))||t==io(Dm(e))}function X4t(t){var e;return e=pN(t),"n_"+(e??""+t.o)}function Z4t(t){this.b=(Ao(),Ao(),Ao(),gzt),this.a=a(si(t),43)}function Y4t(t){bD.call(this),Wct(this),this.a=t,this.c=!0}function K4t(t,e,n){this.d=t,this.b=new Dt,this.c=e,this.a=n}function X$(t,e,n,i){var r;r=new uTt,e.a[n.g]=r,x2(t.b,i,r)}function J4t(t,e){var n=t.a=t.a||[];return n[e]||(n[e]=t._d(e))}function wL(t,e){var n;n=t.q.getHours(),t.q.setDate(e),r4(t,n)}function Q4t(t){var e;return e=new T9(YV(t.length)),$L(e,t),e}function hoe(t){function e(){}return e.prototype=t||{},new e}function foe(t,e){return qPt(t,e)?($Lt(t),!0):!1}function tN(t){return t.Db>>16!=3?null:a(t.Cb,35)}function Tf(t){return t.Db>>16!=9?null:a(t.Cb,35)}function doe(t){if(t.p!=2)throw K(new na);return or(t.f)&qr}function poe(t){if(t.p!=2)throw K(new na);return or(t.k)&qr}function eN(){eN=P,gQ=new hrt(BBt,0),$bt=new hrt("FAN",1)}function Z$(t,e,n){var i;i=d6t(t,e,n),t.b=new zV(i.c.length)}function tc(t,e,n){return e==null?Cu(t.d,null,n):km(t.e,e,n)}function $ot(t,e){return Qg(so(Qg(a(t,149).a).a,a(e,149).a))}function tAt(){tAt=P,Pbt=u4t(Xt(1),Xt(4)),Lbt=u4t(Xt(1),Xt(2))}function eAt(){eAt=P,nWt=Xa(new as,(Mo(),Yo),(Po(),xB))}function nAt(){nAt=P,eWt=Xa(new as,(Mo(),Yo),(Po(),xB))}function iAt(){iAt=P,yWt=Ni(new as,(Mo(),Yo),(Po(),j4))}function Mu(){Mu=P,EWt=Ni(new as,(Mo(),Yo),(Po(),j4))}function rAt(){rAt=P,SWt=Ni(new as,(Mo(),Yo),(Po(),j4))}function Y$(){Y$=P,LWt=Ni(new as,(Mo(),Yo),(Po(),j4))}function sAt(){sAt=P,C$t=Xa(new as,(VM(),cA),(ZC(),oQ))}function oAt(t){return t.Db>>16!=6?null:a(t.Cb,105)}function cAt(t){return t.Db>>16!=7?null:a(t.Cb,207)}function aAt(t){return t.Db>>16!=7?null:a(t.Cb,253)}function io(t){return t.Db>>16!=11?null:a(t.Cb,35)}function Zb(t){return t.Db>>16!=17?null:a(t.Cb,24)}function uAt(t){return t.Db>>16!=3?null:a(t.Cb,139)}function EM(t){return t.Db>>16!=6?null:a(t.Cb,207)}function oC(t,e,n,i,r,c){return new Qd(t.e,e,t.pi(),n,i,r,c)}function Vot(t,e){return yCt(t.a,e)?lot(t,a(e,23).g,null):null}function goe(t,e){return vCt(Ka(t.q.getTime()),Ka(e.q.getTime()))}function moe(t,e){var n;n=t.q.getHours(),t.q.setMonth(e),r4(t,n)}function Hs(t,e){t.c&&Lc(t.c.f,t),t.c=e,t.c&&Ut(t.c.f,t)}function Ks(t,e){t.c&&Lc(t.c.a,t),t.c=e,t.c&&Ut(t.c.a,t)}function Ts(t,e){t.d&&Lc(t.d.d,t),t.d=e,t.d&&Ut(t.d.d,t)}function ds(t,e){t.g&&Lc(t.g.i,t),t.g=e,t.g&&Ut(t.g.i,t)}function lAt(t,e){return t.b+=e.b,t.c+=e.c,t.d+=e.d,t.a+=e.a,t}function qot(t){return sD(t.c),t.e=t.a=t.c,t.c=t.c.c,++t.d,t.a.f}function hAt(t){return sD(t.e),t.c=t.a=t.e,t.e=t.e.e,--t.d,t.a.f}function fAt(t,e){var n;return n=new dl(t),e.c[e.c.length]=n,n}function boe(t,e){var n,i;n=e.c,i=n!=null,i&&S2(t,new M2(e.c))}function woe(t){var e;e=sfe(a(cn(t,(tw(),xQ)),349)),e.Ef(t)}function K$(t,e){ct(t.Cb,96)&&JC(pl(a(t.Cb,96)),4),kh(t,e)}function nN(t,e){ct(t.Cb,248)&&(a(t.Cb,248).tb=null),kh(t,e)}function voe(t,e){eIt(t,e),ct(t.Cb,96)&&JC(pl(a(t.Cb,96)),2)}function _oe(t,e){iD(this),this.f=e,this.g=t,YD(this),this.Pd()}function C2(t){this.c=new Fr,this.b=t.b,this.d=t.c,this.a=t.a}function dAt(){this.a=new qa,this.e=new $r,this.g=0,this.i=0}function C1(t,e,n){B6t(e,n,t._b()),this.c=t,this.a=e,this.b=n-e}function Gs(t,e){this.a=t,H3.call(this,t),Qv(e,t._b()),this.b=e}function pAt(t){this.a=t,this.b=dt(bWt,wt,1637,t.e.length,0,2)}function Kv(t){this.a=y.Math.cos(t),this.b=y.Math.sin(t)}function Ei(t,e){this.b=(En(t),t),this.a=e&zm?e:e|64|Lf}function gAt(t,e,n){var i;B6t(e,n,t.c.length),i=n-e,Oit(t.c,e,i)}function mAt(t,e){var n;return n=a($M(gm(t.a),e),13),n?n._b():0}function bAt(t){var e,n;return n=(Y3(),e=new b1,e),wC(n,t),n}function wAt(t){var e,n;return n=(Y3(),e=new b1,e),wC(n,t),n}function Jv(t){return xT(),ct(t.g,8)?a(t.g,8):null}function yoe(t,e){var n;n=a(zi(t.g,e),57),pd(e.d,new xMt(t,n))}function Za(t,e){return Jo(),Fct(e)?new PD(e,t):new $5(e,t)}function Yl(t){return zo(Y(Z(ss,1),wt,9,0,[t.g.k,t.k,t.a]))}function xoe(){return LC(),Y(Z(Wjt,1),jt,412,0,[QK,tJ,JK])}function Moe(){return z1(),Y(Z(tf,1),jt,150,0,[U1t,Qh,bw])}function Eoe(){return tp(),Y(Z(fHt,1),jt,280,0,[T6,Q_,mx])}function Soe(){return DM(),Y(Z(W0t,1),jt,318,0,[CJ,AJ,RB])}function Toe(){return AN(),Y(Z(k0t,1),jt,319,0,[A0t,CB,mJ])}function Coe(){return RN(),Y(Z(P0t,1),jt,384,0,[bJ,L0t,wJ])}function Aoe(){return u_(),Y(Z(sHt,1),jt,406,0,[vJ,E6,H4])}function koe(){return Fo(),Y(Z(ZGt,1),jt,410,0,[eF,Ga,ba])}function Loe(){return e7(),Y(Z(Ebt,1),jt,345,0,[xbt,eQ,Mbt])}function Poe(){return PN(),Y(Z(Cbt,1),jt,347,0,[Tbt,nQ,Sbt])}function Ioe(){return zN(),Y(Z(kbt,1),jt,346,0,[iQ,rQ,W6])}function Roe(){return B2(),Y(Z(Abt,1),jt,385,0,[G6,j6,H6])}function Doe(){return gC(),Y(Z(Cgt,1),jt,348,0,[GK,HK,WK])}function Noe(){return ZL(),Y(Z(twt,1),jt,349,0,[mF,Jbt,Qbt])}function Ooe(){return t7(),Y(Z(I$t,1),jt,401,0,[vQ,bQ,wQ])}function Boe(){return Tm(),Y(Z(gWt,1),jt,413,0,[nF,nA,iF])}function Foe(){return hu(),Y(Z(UVt,1),jt,419,0,[jf,lb,fh])}function Uoe(){return Ha(),Y(Z(jVt,1),jt,420,0,[Fh,hb,dh])}function zoe(){return Kh(),Y(Z(mvt,1),jt,275,0,[ly,cb,LF])}function joe(){return DN(),Y(Z(dwt,1),jt,277,0,[EQ,fwt,hwt])}function Hoe(){return Ch(),Y(Z(Dw,1),jt,203,0,[lc,ta,hc])}function Goe(){return Kg(),Y(Z(fvt,1),jt,316,0,[kF,Ix,wA])}function vAt(){vAt=P,bzt=Vi((jv(),Y(Z(yK,1),jt,350,0,[h6,f6])))}function iN(){iN=P,mQ=new frt("DFS",0),qbt=new frt("BFS",1)}function A2(){A2=P,oB=new Dt,FK=(ts(),new vi),BK=new Dt}function _At(t,e,n){var i;i=new V,i.b=e,i.a=n,++e.b,Ut(t.d,i)}function yAt(t,e,n){Ba.call(this,25),this.b=t,this.a=e,this.c=n}function Eu(t){Ai(),Ba.call(this,t),this.c=!1,this.a=!1}function Woe(t){return t.a==(AM(),ZF)&&Unt(t,Lbe(t.g,t.b)),t.a}function cC(t){return t.d==(AM(),ZF)&&znt(t,Ove(t.g,t.b)),t.d}function $oe(t,e){var n;return n=(En(t),t).g,Rrt(!!n),En(e),n(e)}function J$(t,e){var n,i;return i=pM(t,e),n=t.a.fd(i),new H3t(t,n)}function SM(t){var e;return Vo(t)?(e=t,e==-0?0:e):iue(t)}function Voe(t){return t.Db>>16!=6?null:a(yX(t),207)}function H(t){return Hn(t.a=e)throw K(new Uc(Qge(t,e)));return t}function xAt(t,e,n){if(t<0||en)throw K(new Uc(Lge(t,e,n)))}function Zoe(t){return Ao(),S1(Hat((al(),e1t),S1(new om,91),t),93).a}function rN(t){return si(t),Yq((Ao(),new $d(id(Zd(t.a,new X)))))}function sN(t){return new Vu((Ah(t,dZ),NL(so(so(5,t),t/10|0))))}function Xot(t,e){return t&&t.equals?t.equals(e):zt(t)===zt(e)}function Zot(t,e){return e==0?!!t.o&&t.o.f!=0:Fq(t,e)}function Yoe(t,e){var n;n=lt(Yt(t.a.xe((dr(),CF)))),Y7t(t,e,n)}function MAt(t,e,n){var i;i=xr(t.d,e),i>=0?C7(t,i,n):jlt(t,e,n)}function tV(t,e,n){var i;i=t.d[e.o],t.d[e.o]=t.d[n.o],t.d[n.o]=i}function EAt(t,e){var n;for(n=t+"";n.length0&&t.a[--t.d]==0;);t.a[t.d++]==0&&(t.e=0)}function Koe(t){return!!t.u&&kc(t.u.a).i!=0&&!(t.n&&Wq(t.n))}function cN(t){nC(),this.a=(we(),ct(t,49)?new WG(t):new cD(t))}function SAt(){this.c=new ZEt,this.a=new aTt,this.b=new pEt,m3t()}function TAt(t,e,n){this.d=t,this.j=e,this.e=n,this.o=-1,this.p=3}function CAt(t,e,n){this.d=t,this.k=e,this.f=n,this.o=-1,this.p=5}function AAt(t,e,n,i,r,c){Vct.call(this,t,e,n,i,r),c&&(this.o=-2)}function kAt(t,e,n,i,r,c){qct.call(this,t,e,n,i,r),c&&(this.o=-2)}function LAt(t,e,n,i,r,c){gct.call(this,t,e,n,i,r),c&&(this.o=-2)}function PAt(t,e,n,i,r,c){Yct.call(this,t,e,n,i,r),c&&(this.o=-2)}function IAt(t,e,n,i,r,c){mct.call(this,t,e,n,i,r),c&&(this.o=-2)}function RAt(t,e,n,i,r,c){Xct.call(this,t,e,n,i,r),c&&(this.o=-2)}function DAt(t,e,n,i,r,c){Zct.call(this,t,e,n,i,r),c&&(this.o=-2)}function NAt(t,e,n,i,r,c){bct.call(this,t,e,n,i,r),c&&(this.o=-2)}function OAt(t,e,n,i){fT.call(this,n),this.b=t,this.c=e,this.d=i}function BAt(t,e){this.f=t,this.a=(AM(),XF),this.c=XF,this.b=e}function FAt(t,e){this.g=t,this.d=(AM(),ZF),this.a=ZF,this.b=e}function UAt(t,e){!t.c&&(t.c=new _s(t,0)),KX(t.c,(fr(),yI),e)}function oc(t,e,n,i,r,c){return WPt(t,e,n,c),$6t(t,i),V6t(t,r),t}function zAt(t,e){return ct(e,38)?Zq(t.a,a(e,38)):!1}function Joe(t){if(!("stack"in t))try{throw t}catch{}return t}function Qoe(t){if(t.p!=1)throw K(new na);return or(t.f)<<24>>24}function tce(t){if(t.p!=1)throw K(new na);return or(t.k)<<24>>24}function ece(t){if(t.p!=7)throw K(new na);return or(t.k)<<16>>16}function nce(t){if(t.p!=7)throw K(new na);return or(t.f)<<16>>16}function aN(t){Kut(),rSt(this,or(ns(E1(t,24),nO)),or(ns(t,nO)))}function jAt(){jAt=P,Yzt=Vi((C9(),Y(Z(agt,1),jt,439,0,[DK])))}function uN(){uN=P,kJ=new irt(w4,0),$0t=new irt("TOP_LEFT",1)}function HAt(t,e){var n;t.e=new cit,n=ow(e),gc(n,t.c),$Dt(t,n,0)}function pe(t,e,n,i){var r;r=new yR,r.a=e,r.b=n,r.c=i,Xi(t.b,r)}function Sa(t,e,n,i){var r;r=new yR,r.a=e,r.b=n,r.c=i,Xi(t.a,r)}function ice(t,e,n){var i;return i=a(t.Hc().Vb(e),13),!!i&&i.pc(n)}function GAt(t,e,n){var i;return i=a(t.Hc().Vb(e),13),!!i&&i.vc(n)}function WAt(t,e){var n;return n=1-e,t.a[n]=LN(t.a[n],n),LN(t,e)}function TM(t){return Hn(t.b.b!=t.d.a),t.c=t.b=t.b.b,--t.a,t.c.c}function $At(t){return LD(t),sD(t.c),t.e=t.a=t.c,t.c=t.c.b,++t.d,t.a}function VAt(t){return LD(t),sD(t.e),t.c=t.a=t.e,t.e=t.e.d,--t.d,t.a}function In(t){if(!Jn(t))throw K(new J);return t.c=t.b,t.b.ic()}function qAt(t,e){return ct(e,38)?Zq(t.a,a(e,38)):!1}function XAt(t,e){return ct(e,38)?Zq(t.a,a(e,38)):!1}function ZAt(t){var e;return Zv(t),e=new en,kst(t.a,new Jj(e)),e}function Kot(){var t,e,n;return e=(n=(t=new b1,t),n),Ut(Kvt,e),e}function rce(t){var e;return e=(mu(),mu(),$Wt),t.d&&pX(t),mQt(),e}function Jot(t){return t.j.c=dt(un,te,1,0,5,1),gL(t.c),yse(t.a),t}function as(){cxt.call(this),this.j.c=dt(un,te,1,0,5,1),this.a=-1}function YAt(t,e,n){this.b=new t9(this),this.c=t,this.f=e,this.d=n}function sce(t,e,n){t.d&&Lc(t.d.d,t),t.d=e,t.d&&pm(t.d.d,n,t)}function oce(t){return!!t.a&&Ya(t.a.a).i!=0&&!(t.b&&$q(t.b))}function cce(t){return Mu(),!ec(t)&&!(!ec(t)&&t.c.g.c==t.d.g.c)}function ace(t){return hN(),dm(itt,t)?a(zi(itt,t),337).Mf():null}function uC(t){return ct(t,13)?new lL((al(),a(t,13))):Wie(t.tc())}function uce(t,e,n){return n.f.c.length>0?fot(t.a,e,n):fot(t.b,e,n)}function KAt(t,e,n){var i;return i=NC(n),wr(t.b,i,e),wr(t.c,e,n),e}function _m(t,e){var n,i;return n=Gg(t,e),i=null,n&&(i=n.Vd()),i}function vL(t,e){var n,i;return n=Gg(t,e),i=null,n&&(i=n.Yd()),i}function CM(t,e){var n,i;return n=N2(t,e),i=null,n&&(i=n.Yd()),i}function Jd(t,e){var n,i;return n=Gg(t,e),i=null,n&&(i=H8t(n)),i}function Qot(t){var e;return e=t.Fh(t.i),t.i>0&&Aa(t.g,0,e,0,t.i),e}function _L(t){var e;return e=(si(t),new Eh((al(),t))),YC(e),iq(e)}function kc(t){return t.n||(pl(t),t.n=new QEt(Do,t),Bo(t)),t.n}function JAt(t,e){var n;return n=new Bb,t.wd(n),n.a+="..",e.xd(n),n.a}function QAt(t,e){L9();var n;return n=a(zi(WF,t),47),!n||n.Li(e)}function ym(t){return ct(t,13)?a(t,13).Wb():!t.tc().hc()}function lce(t){if(t.ee())return null;var e=t.n,n=qO[e];return n}function Yn(t){return Hn(t.b!=t.d.c),t.c=t.b,t.b=t.b.a,++t.a,t.c.c}function tct(t,e){En(e),Vr(t.a,t.c,e),t.c=t.c+1&t.a.length-1,rRt(t)}function lC(t,e){En(e),t.b=t.b-1&t.a.length-1,Vr(t.a,t.b,e),rRt(t)}function tkt(t){var e;e=t.pg(),this.a=ct(e,64)?a(e,64).oh():e.tc()}function hce(t,e,n){var i;i=_fe();try{return Zee(t,e,n)}finally{Qce(i)}}function ect(t,e,n,i){return ct(n,49)?new ESt(t,e,n,i):new iot(t,e,n,i)}function fce(){return _N(),Y(Z(tB,1),jt,278,0,[kK,O1t,B1t,F1t])}function dce(){return FM(),Y(Z(Ijt,1),jt,373,0,[Xm,vw,ww,Z_])}function pce(){return G2(),Y(Z(Vzt,1),jt,304,0,[p6,d6,g6,m6])}function gce(){return HC(),Y(Z(Xzt,1),jt,362,0,[b6,iB,rB,w6])}function mce(t){return lt(de(z(t,(Ft(),_w))))&&z(t,li)!=null}function bce(t){return lt(de(z(t,(Ft(),_w))))&&z(t,li)!=null}function k2(t){return xT(),ct(t.g,153)?a(t.g,153):null}function wce(t,e,n){var i;i=a(zi(t.g,n),57),Ut(t.a.c,new zs(e,i))}function ekt(t,e,n,i){var r;return r=i[e.g][n.g],lt(Yt(z(t.a,r)))}function nkt(t,e,n,i){this.e=i,this.d=null,this.c=t,this.a=e,this.b=n}function nct(t,e,n,i){this.d=t,this.n=e,this.g=n,this.o=i,this.p=-1}function ikt(t,e,n,i,r){this.c=t,this.e=e,this.d=n,this.b=i,this.a=r}function ict(t,e,n,i,r){this.i=t,this.a=e,this.e=n,this.j=i,this.f=r}function A1(t,e,n,i,r){Gi.call(this,t,e),this.a=n,this.b=i,this.c=r}function hC(){hC=P,rA=new rrt("UPPER",0),iA=new rrt("LOWER",1)}function vce(){return VM(),Y(Z(Nbt,1),jt,360,0,[aF,oA,$6,cA])}function _ce(){return d7(),Y(Z(lwt,1),jt,320,0,[MQ,awt,uwt,cwt])}function yce(){return ip(),Y(Z(evt,1),jt,226,0,[AF,gA,Px,mA])}function xce(){return gd(),Y(Z(GQ,1),jt,197,0,[HQ,jQ,zE,rb])}function Mce(){return Ku(),Y(Z(yA,1),jt,344,0,[cI,E0,oI,ub])}function Ece(){return Am(),Y(Z(fqt,1),jt,374,0,[hI,lI,KQ,JQ])}function Sce(){return r7(),Y(Z(Mvt,1),jt,288,0,[XQ,_vt,xvt,yvt])}function Tce(){return Tu(),Y(Z(NVt,1),jt,265,0,[uI,kd,ag,aI])}function Cce(){return nw(),Y(Z(JJ,1),jt,179,0,[JB,KJ,ry,iy])}function $u(t,e,n){return e<0?bX(t,n):a(n,61).aj().fj(t,t.Qg(),e)}function rkt(t,e){var n;for(n=t.j.c.length;n=0&&t.a[n]===e[n];n--);return n<0}function cct(t,e){var n;n=t.q.getHours(),t.q.setFullYear(e+Fm),r4(t,n)}function P2(t,e){return e==0||t.e==0?t:e>0?_It(t,e):CDt(t,-e)}function act(t,e){return e==0||t.e==0?t:e>0?CDt(t,e):_It(t,-e)}function uct(t){t.b!=t.c&&(t.a=dt(un,te,1,8,5,1),t.b=0,t.c=0)}function I2(t){return Hn(t.a0;)i+=t.a[n],n-=n&-n;return i}function Pkt(t,e){var n;for(n=e;n;)Gu(t,-n.i,-n.j),n=io(n);return t}function $g(t,e){return t.a?Ii(t.a,t.b):t.a=new ll(t.d),g2(t.a,e),t}function Ikt(t,e){for(En(e);t.a||(t.a=$v(t.c,t)),t.a;)e.ie(lN(t))}function sV(t){return t.c&&t.d?Yot(t.c)+"->"+Yot(t.d):"e_"+lm(t)}function Dce(t,e,n){return a(e==null?Cu(t.d,null,n):km(t.e,e,n),261)}function Nce(t,e,n){var i,r;i=Gg(t,n),r=null,i&&(r=H8t(i)),k0e(e,n,r)}function Oce(t,e){var n;n=new bT,zg(n,"x",e.a),zg(n,"y",e.b),S2(t,n)}function Bce(t,e){var n;n=new bT,zg(n,"x",e.a),zg(n,"y",e.b),S2(t,n)}function Fce(t,e){return Nme(t,e,ct(e,62)&&(a(a(e,17),62).Bb&ao)!=0)}function fd(t){return si(t),ct(t,13)?new Eh((al(),a(t,13))):l$(t.tc())}function Uce(){return Ht(),Y(Z(Ia,1),jt,69,0,[Wc,Tn,Qe,fi,on])}function zce(t){return x9(),function(){return hce(t,this,arguments);var e}}function jce(){return Date.now?Date.now():new Date().getTime()}function hct(t){if(!t.c.Cc())throw K(new J);return t.a=!0,t.c.Ec()}function oV(t,e){if(t<0||t>e)throw K(new Uc(flt(t,e,"index")));return t}function fct(t,e){return ct(e,180)?le(t.c,a(e,180).c):!1}function Hce(t){return t.d=3,t.c=Tue(t),t.d!=2?(t.d=0,!0):!1}function Rkt(t,e){var n,i;return n=(i=t.slice(0,e),pC(i,t)),n.length=e,n}function Kl(t,e,n){var i;return i=(mi(e,t.c.length),t.c[e]),t.c[e]=n,i}function cV(t,e,n,i){var r;return r=dt(Gn,pi,22,e,15,1),Qpe(r,t,e,n,i),r}function Dkt(t,e,n,i){this.e=t,this.b=new Dt,this.d=e,this.a=n,this.c=i}function Mm(t,e){this.b=Rc,this.d=t,this.e=e,this.c=this.d+(""+this.e)}function Nkt(){PW(this),this.b=new We(is,is),this.a=new We(Ps,Ps)}function AM(){AM=P;var t,e;XF=(Y3(),e=new x,e),ZF=(t=new NG,t)}function Okt(){wN(),this.b=(ts(),new vi),this.a=new vi,this.c=new Dt}function uu(t){var e;t.d=new TEt(t),t.e=new CEt(t),e=t[D_]|0,t[D_]=e+1}function fN(t,e){return(HM(t),Sat(new gi(t,new Tct(e,t.a)))).a!=null}function Gce(){return Mo(),Y(Z(Agt,1),jt,328,0,[Of,gx,aa,ua,Yo])}function Wce(){return $C(),Y(Z(x0t,1),jt,276,0,[fJ,dJ,lJ,y0t,hJ])}function $ce(){return bl(),Y(Z(imt,1),jt,178,0,[Mx,P6,xw,V4,Km])}function Vce(){return jC(),Y(Z(mbt,1),jt,292,0,[gbt,QJ,tQ,B6,F6])}function qce(){return G1(),Y(Z(_A,1),jt,225,0,[sb,$Q,dvt,vA,pvt])}function Xce(){return t0(),Y(Z(Jp,1),jt,163,0,[On,vc,Md,ib,og])}function Zce(){return Js(),Y(Z(pA,1),jt,110,0,[Ff,uh,ah,fp,cg])}function Yce(t,e){var n;return n=e!=null?Zc(t,e):Ua(Ea(t.d,null)),oM(n)}function Kce(t,e){var n;return n=e!=null?Zc(t,e):Ua(Ea(t.d,null)),oM(n)}function dct(t,e){var n;return n=a(D2(t.d,e),27),n||a(D2(t.e,e),27)}function pct(t,e){var n;return n=0,t&&(n+=t.f.a/2),e&&(n+=e.f.a/2),n}function pl(t){return t.t||(t.t=new xG(t),YL(new Nxt(t),0,t.t)),t.t}function Bkt(t){var e;return t.c||(e=t.r,ct(e,96)&&(t.c=a(e,24))),t.c}function Fkt(t,e){return dm(t.a,e)?(kM(t.a,e),!0):!1}function ec(t){return!t.c||!t.d?!1:!!t.c.g&&t.c.g==t.d.g}function Jce(t){return Ah(t,"size"),or(qG(Zg(t,8),K2)?Zg(t,8):K2),new Bb}function Bp(t,e){return xEt((nC(),new cN(Q6t(Y(Z(un,1),te,1,5,[t,e])))))}function Qce(t){t&&oue((Er(),o1t)),--XO,t&&ZO!=-1&&(ete(ZO),ZO=-1)}function tae(t,e){var n,i;n=a(Dfe(t.c,e),13),n&&(i=n._b(),n.Pb(),t.d-=i)}function fC(t){Ao();var e;for(e=0;t.hc();)t.ic(),e=so(e,1);return NL(e)}function aV(t){var e,n,i;return e=t&eu,n=t>>22&eu,i=t<0?sp:0,ia(e,n,i)}function Ukt(t,e){var n,i;return n=e.kc(),i=Tat(t,n),!!i&&au(i.e,e.lc())}function zkt(t){var e;return e=t.e+t.f,isNaN(e)&&vD(t.d)?t.d:e}function jkt(t){this.b=t,$n.call(this,t),this.a=a(an(this.b.a,4),116)}function Hkt(t){this.b=t,y2.call(this,t),this.a=a(an(this.b.a,4),116)}function Jl(t,e,n,i,r){Xkt.call(this,e,i,r),this.c=t,this.b=n}function gct(t,e,n,i,r){TAt.call(this,e,i,r),this.c=t,this.a=n}function mct(t,e,n,i,r){CAt.call(this,e,i,r),this.c=t,this.a=n}function bct(t,e,n,i,r){Xkt.call(this,e,i,r),this.c=t,this.a=n}function Gkt(t,e){this.d=new o2,this.a=t,this.b=e,this.e=new Oo(e.Qe())}function Fp(t,e){V1(),this.e=t,this.d=1,this.a=Y(Z(Gn,1),pi,22,15,[e])}function kM(t,e){return Es(e)?e==null?Alt(t.d,null):XPt(t.e,e):Alt(t.d,e)}function wct(t,e,n){var i;return i=t.rg(e),i>=0?t.ug(i,n,!0):q2(t,e,n)}function eae(t,e,n){var i;i=(si(t),new Eh((al(),t))),qpe(new hkt(i,e,n))}function xL(t,e,n){var i;i=(si(t),new Eh((al(),t))),rpe(new fkt(i,e,n))}function nae(t,e,n){var i;return i=NC(n),qC(t.d,i,e,!1),wr(t.e,e,n),e}function iae(t,e,n){var i;return i=NC(n),qC(t.j,i,e,!1),wr(t.k,e,n),e}function Wkt(t,e,n){var i;i=new Lrt(t.a),$V(i,t.a.a),Cu(i.d,e,n),t.a.a=i}function uV(t){var e;return e=new Np,Uo(e,t),Ct(e,(qt(),Ro),null),e}function Vg(t){var e,n;return si(t),e=nse(t.length),n=new Vu(e),$L(n,t),n}function dC(t){var e,n;++t.j,e=t.g,n=t.i,t.g=null,t.i=0,t.uh(n,e),t.th()}function ML(t,e){t.Eh(t.i+1),$T(t,t.i,t.Ch(t.i,e)),t.sh(t.i++,e),t.th()}function Em(t,e){var n;return n=(mi(e,t.c.length),t.c[e]),Oit(t.c,e,1),n}function lV(t,e,n,i){var r;return r=dt(Gn,pi,22,e+1,15,1),Rve(r,t,e,n,i),r}function vct(t,e,n,i){var r;for(r=0;re.o?-1:0}function Qv(t,e){if(t<0||t>e)throw K(new Uc("Index: "+t+", Size: "+e))}function Ect(t,e,n){if(t<0||e>n||e=e)throw K(new Uc("Index: "+t+", Size: "+e))}function aae(t,e){var n;n=t.q.getHours()+(e/60|0),t.q.setMinutes(e),r4(t,n)}function mN(t,e,n){this.a=t,this.b=e,this.c=n,Ut(t.q,this),Ut(e.g,this)}function EL(t,e,n,i){this.f=t,this.e=e,this.d=n,this.b=i,this.c=i?i.d:null}function Sct(t){t6t.call(this,t,0),CSt(this),this.b.b=this.b,this.b.a=this.b}function Tct(t,e){J9.call(this,e.rd(),e.qd()&-65),En(t),this.a=t,this.c=e}function _5t(t,e,n){this.d=(En(t),t),this.a=n&zm?n:n|64|Lf,this.c=e}function bN(){this.b=new Fr,this.a=new Fr,this.b=new Fr,this.a=new Fr}function y5t(){y5t=P,iWt=Xa(Ni(new as,(Mo(),Of),(Po(),rJ)),Yo,xB)}function x5t(){x5t=P,rWt=Ni(Ni(new as,(Mo(),Of),(Po(),z4)),aa,AE)}function fV(t,e){return!t.o&&(t.o=new lu((Ic(),pp),ug,t,0)),kq(t.o,e)}function uae(t,e){di(e,"Label management",1),oM(z(t,(hV(),Z6))),Vn(e)}function lae(t,e){var n;return n=t.c,e>0?a(Ee(n.a,e-1),8):null}function dV(t){var e;return e=t.b,e.b==0?null:a(H1(e,0),170).b}function Cct(t){var e,n,i,r;r=t.d,e=t.a,n=t.b,i=t.c,t.d=n,t.a=i,t.b=r,t.c=e}function hae(t,e){var n;t.A&&(n=a(js(t.b,e),114).n,n.d=t.A.d,n.a=t.A.a)}function pV(t,e,n){var i,r;if(n!=null)for(i=0;i=0,"Initial capacity must not be negative")}function S5t(t){this.b=(ts(),new vi),this.c=new vi,this.d=new vi,this.a=t}function T5t(t){t?(this.c=t,this.b=null):(this.c=null,this.b=new Dt)}function gV(t,e){D9.call(this,t,e),this.a=dt(w3e,te,398,2,0,1),this.b=!0}function mV(t,e,n){return WX(t,e,n,ct(e,62)&&(a(a(e,17),62).Bb&ao)!=0)}function xae(t,e,n){return s4(t,e,n,ct(e,62)&&(a(a(e,17),62).Bb&ao)!=0)}function Mae(t,e,n){return Ome(t,e,n,ct(e,62)&&(a(a(e,17),62).Bb&ao)!=0)}function Eae(t,e){return ro(lt(Yt(z(t,(Ft(),Ym)))),lt(Yt(z(e,Ym))))}function Sae(){return XM(),Y(Z(gJ,1),jt,290,0,[T0t,TB,SB,S0t,MB,EB])}function Tae(){return M7(),Y(Z(I0t,1),jt,241,0,[yJ,_J,MJ,xJ,EJ,AB])}function Cae(){return dP(),Y(Z(B0t,1),jt,255,0,[kB,D0t,O0t,R0t,N0t,SJ])}function Aae(){return YM(),Y(Z(G0t,1),jt,256,0,[G4,U0t,H0t,j0t,z0t,F0t])}function kae(){return _7(),Y(Z(pbt,1),jt,291,0,[YJ,fbt,ZJ,hbt,dbt,KB])}function Lae(){return Ls(),Y(Z(gvt,1),jt,83,0,[ob,dp,Dx,Rx,Sd,Gc])}function Pae(){return ZC(),Y(Z(g$t,1),jt,308,0,[uF,cQ,uQ,aQ,lQ,oQ])}function Iae(){return md(),Y(Z(bwt,1),jt,224,0,[TQ,Y6,K6,yF,vF,_F])}function Rae(){return y7(),Y(Z(cvt,1),jt,289,0,[WQ,rvt,ovt,nvt,svt,ivt])}function C5t(){C5t=P,A$t=OC(OC(Git(new as,(VM(),oA)),(ZC(),uF)),cQ)}function wN(){wN=P,new kr("org.eclipse.elk.addLayoutConfig"),q$t=new Sb}function A5t(){A5t=P,G7(),s_t=is,fXt=Ps,o_t=new Rb(is),dXt=new Rb(Ps)}function k5t(t,e,n){Ai();var i;return i=Z1(t,e),n&&i&&ese(t)&&(i=null),i}function dt(t,e,n,i,r,c){var l;return l=ERt(r,i),r!=10&&Y(Z(t,c),e,n,r,l),l}function Dae(t,e,n){return xEt((nC(),new cN(Q6t(Y(Z(un,1),te,1,5,[t,e,n])))))}function L5t(t,e){var n;return n=e.kc(),ts(),new I5(n,qRt(t.e,n,a(e.lc(),13)))}function P5t(t,e){var n,i;return n=t.a-e.a,i=t.b-e.b,y.Math.sqrt(n*n+i*i)}function Act(t,e,n){var i;i=t.b[n.c.o][n.o],i.b+=e.b,i.c+=e.c,i.a+=e.a,++i.a}function Nae(t,e,n){var i,r;return r=t.length,i=n=t.i)throw K(new SW(e,t.i));return t.g[e]}function R5t(t,e,n){if(CC(t,n),n!=null&&!t.Li(n))throw K(new T5);return n}function Cf(t,e){return A$(e,"Horizontal alignment cannot be null"),t.b=e,t}function TL(t,e){var n;return n=t.rg(e),n>=0?t.ug(n,!0,!0):q2(t,e,!0)}function CL(t,e,n){var i,r;return r=(i=QM(t.b,e),i),r?$7(DL(t,r),n):null}function Oae(t){return ct(t,159)?""+a(t,159).a:t==null?null:Yc(t)}function Bae(t){return ct(t,159)?""+a(t,159).a:t==null?null:Yc(t)}function PM(t){var e;return Vo(t)&&(e=0-t,!isNaN(e))?e:N1(BM(t))}function Fae(t){var e;return t=t>2?t:2,e=bat(t),t>e?(e<<=1,e>0?e:K2):e}function AL(t){var e,n;return e=t+128,n=(vTt(),f1t)[e],!n&&(n=f1t[e]=new zj(t)),n}function pC(t,e){return OL(e)!=10&&Y(fu(e),e.rl,e.__elementTypeId$,OL(e),t),t}function t_(t,e){return e.e==0||t.e==0?SE:(KM(),TX(t,e))}function Uae(t){for(;!t.a;)if(!jct(t.b,new Qj(t)))return!1;return!0}function zae(t){for(;!t.a;)if(!CTt(t.c,new nH(t)))return!1;return!0}function D5t(t,e){if(e.a)throw K(new sc(BOt));Ir(t.a,e),e.a=t,!t.j&&(t.j=e)}function bV(t,e,n,i,r,c){nct.call(this,e,i,r,c),this.c=t,this.b=n}function N5t(t,e,n,i,r,c){nct.call(this,e,i,r,c),this.c=t,this.a=n}function lu(t,e,n,i){this.Gi(),this.a=e,this.b=t,this.c=new aot(this,e,n,i)}function kL(t,e){this.e=e,this.a=cPt(t),this.a<54?this.f=SM(t):this.c=iP(t)}function jae(t,e){t.a.Ld(e.d,t.b)>0&&(Ut(t.c,new Fst(e.c,e.d,t.d)),t.b=e.d)}function wV(t){t.a=dt(Gn,pi,22,t.b+1,15,1),t.c=dt(Gn,pi,22,t.b,15,1),t.d=0}function O5t(){O5t=P,Bzt=Vi((_N(),Y(Z(tB,1),jt,278,0,[kK,O1t,B1t,F1t])))}function B5t(){B5t=P,VGt=Vi((nw(),Y(Z(JJ,1),jt,179,0,[JB,KJ,ry,iy])))}function F5t(){F5t=P,Rjt=Vi((FM(),Y(Z(Ijt,1),jt,373,0,[Xm,vw,ww,Z_])))}function U5t(){U5t=P,qzt=Vi((G2(),Y(Z(Vzt,1),jt,304,0,[p6,d6,g6,m6])))}function z5t(){z5t=P,Zzt=Vi((HC(),Y(Z(Xzt,1),jt,362,0,[b6,iB,rB,w6])))}function j5t(){j5t=P,p$t=Vi((VM(),Y(Z(Nbt,1),jt,360,0,[aF,oA,$6,cA])))}function H5t(){H5t=P,$$t=Vi((d7(),Y(Z(lwt,1),jt,320,0,[MQ,awt,uwt,cwt])))}function G5t(){G5t=P,bVt=Vi((ip(),Y(Z(evt,1),jt,226,0,[AF,gA,Px,mA])))}function W5t(){W5t=P,wVt=Vi((gd(),Y(Z(GQ,1),jt,197,0,[HQ,jQ,zE,rb])))}function $5t(){$5t=P,PVt=Vi((Ku(),Y(Z(yA,1),jt,344,0,[cI,E0,oI,ub])))}function V5t(){V5t=P,dqt=Vi((Am(),Y(Z(fqt,1),jt,374,0,[hI,lI,KQ,JQ])))}function q5t(){q5t=P,RVt=Vi((r7(),Y(Z(Mvt,1),jt,288,0,[XQ,_vt,xvt,yvt])))}function X5t(){X5t=P,OVt=Vi((Tu(),Y(Z(NVt,1),jt,265,0,[uI,kd,ag,aI])))}function hu(){hu=P,jf=new MW(hE,0),lb=new MW(w4,1),fh=new MW(fE,2)}function LL(){LL=P,Ibt=new crt(jm,0),oF=new crt("IMPROVE_STRAIGHTNESS",1)}function vN(){vN=P,Ybt=new urt("LEAF_NUMBER",0),_Q=new urt("NODE_SIZE",1)}function _N(){_N=P,kK=new N9("All",0),O1t=new OEt,B1t=new qEt,F1t=new BEt}function Ya(t){return t.b||(t.b=new tSt(Do,t),!t.a&&(t.a=new iL(t,t))),t.b}function PL(t,e){if(e<0)throw K(new Uc($Bt+e));return rkt(t,e+1),Ee(t.j,e)}function R2(t){var e;if(!a_(t))throw K(new J);return t.d=1,e=t.c,t.c=null,e}function yN(t){var e,n;return n=t.length,e=dt(el,Pf,22,n,15,1),NCt(t,0,n,e,0),e}function vV(t,e){var n;this.f=t,this.b=e,n=a(zi(t.b,e),264),this.c=n?n.b:null}function Hae(t,e,n){var i;return i=d6t(t,e,n),t.b=new zV(i.c.length),Klt(t,i)}function Gae(t,e){var n;return n=a($M(t.d,e),13),n?qRt(t.e,e,n):null}function Ict(t,e){var n;return n=a(kM(t.c,e),353),n?(Hst(n),n.e):null}function Wae(t){var e,n;if(!t.b)return null;for(n=t.b;e=n.a[0];)n=e;return n}function $ae(t,e,n){var i;return i=NC(n),qC(t.g,i,e,!1),qC(t.i,e,n,!1),e}function IL(t,e,n,i){var r;i=(xM(),i||k1t),r=t.slice(e,n),mlt(r,t,e,n,-e,i)}function qu(t,e,n,i,r){return e<0?q2(t,n,i):a(n,61).aj().cj(t,t.Qg(),e,i,r)}function Vae(t,e){return e0?qi:Pc(t,Vs)<0?Vs:or(t)}function Kae(t,e){if(!t)throw K(new yn(ube("Enum constant undefined: %s",e)))}function xN(t){iD(this),this.g=t?D4t(t,t.Od()):null,this.f=t,YD(this),this.Pd()}function Qd(t,e,n,i,r,c,l){OV.call(this,e,i,r,c,l),this.c=t,this.b=n}function dd(t,e,n){var i,r;for(i=10,r=0;r=0?(t.gd(n),!0):!1}function TV(t,e){var n;return n=xr(t.d,e),n>=0?h7(t,n,!0,!0):q2(t,e,!0)}function eue(t,e){var n;for(n=0;t.e!=t.i._b();)pee(e,ci(t),Xt(n)),n!=qi&&++n}function K5t(t,e){var n,i,r;for(r=0,i=t.tc();i.hc();)n=i.ic(),Vr(e,r++,n);return e}function P1(t,e,n){var i;if(e==null)throw K(new i2);return i=Gg(t,e),Ace(t,e,n),i}function I1(t){if(t<0)throw K(new yn("tolerance ("+t+") must be >= 0"));return t}function CV(t){var e;return e=t.b.c.length==0?null:Ee(t.b,0),e!=null&&sat(t,0),e}function J5t(t,e){var n,i,r;for(i=0,r=e.length;i=t.a.c.length;)Ut(t.a,new Fr);return a(Ee(t.a,e),15)}function iue(t){return But(t,(IM(),l1t))<0?-vee(BM(t)):t.l+t.m*nx+t.h*o0}function Q5t(t){var e,n;return e=t/60|0,n=t%60,n==0?""+e:""+e+":"+(""+n)}function rue(t,e){var n;return n=Xhe(t.e.c,e.e.c),n==0?ro(t.e.d,e.e.d):n}function N2(t,e){var n=t.a[e],i=(aq(),EK)[typeof n];return i?i(n):Nat(typeof n)}function tLt(t,e){return e==(c$(),c$(),Ozt)?t.toLocaleLowerCase():t.toLowerCase()}function OL(t){return t.__elementTypeCategory$==null?10:t.__elementTypeCategory$}function Uct(t){return(t.i&2?"interface ":t.i&1?"":"class ")+(Vd(t),t.o)}function sue(t,e,n){var i;return i=t.a.e[a(e.a,8).o]-t.a.e[a(n.a,8).o],Tr(YTt(i))}function eLt(t,e){var n;for(++t.d,++t.c[e],n=e+1;n=0&&et||t>e)throw K(new bit("fromIndex: 0, toIndex: "+t+oft+e))}function CN(t,e){var n,i;for(i=t.tc();i.hc();)n=a(i.ic(),68),Ct(n,(Ft(),_x),e)}function hue(t,e,n){var i;i=y.Math.max(0,t.b/2-.5),GC(n,i,1),Ut(e,new bMt(n,i))}function fue(t){var e;return e=lt(Yt(z(t,(qt(),up)))),e<0&&(e=0,Ct(t,up,e)),e}function i_(t){pD();var e,n;for(n=Zdt,e=0;en&&(n=t[e]);return n}function due(){Xxt();for(var t=bK,e=0;e=t.i)throw K(new SW(e,t.i));return t.zh(e,t.g[e])}function MLt(t,e,n){if(CC(t,n),!t.Nj()&&n!=null&&!t.Li(n))throw K(new T5);return n}function bC(t,e){var n;for(n=t;io(n);)if(n=io(n),n==e)return!0;return!1}function bue(t,e){return e&&t.b[e.g]==e?(Vr(t.b,e.g,null),--t.c,!0):!1}function Ql(t,e){var n;return n=e.c,e.a.b=e.b,e.b.a=e.a,e.a=e.b=null,e.c=null,--t.b,n}function pd(t,e){var n,i,r,c;for(En(e),i=t.c,r=0,c=i.length;r>5,r=e&31,i=ns(Vv(t.n[n][c],or(Yd(r,1))),3),i}function ELt(t,e){for(;e[0]=0;)++e[0]}function SLt(t,e){bD.call(this),Wct(this),this.a=t,this.c=!0,this.b=e.d,this.f=e.e}function TLt(t,e){return Ef(),I1(Y1),y.Math.abs(t-e)<=Y1||t==e||isNaN(t)&&isNaN(e)}function Gct(t){return t.a<54?t.f<0?-1:t.f>0?1:0:(!t.c&&(t.c=XL(t.f)),t.c).e}function CLt(t){return t.c&&t.d?t.c.g+"("+t.c+")->"+t.d.g+"("+t.d+")":"e_"+lm(t)}function ALt(t,e,n){var i,r;i=e;do r=lt(t.p[i.o])+n,t.p[i.o]=r,i=t.a[i.o];while(i!=e)}function vue(t,e,n){var i,r,c;for(r=e[n],i=0;i=14&&e<=16))),t}function LV(t,e){Ao();var n;for(si(t),si(e),n=!1;e.hc();)n=n|t.nc(e.ic());return n}function Ah(t,e){if(t<0)throw K(new yn(e+" cannot be negative but was: "+t));return t}function PV(t,e){var n,i;for(i=new j(t);i.an)throw K(new Wv(e,n));return new Tst(t,e)}function c_(t,e){var n;n=t.s,t.s=e,t.Db&4&&!(t.Db&1)&&Bi(t,new iV(t,4,n,t.s))}function RM(t,e){var n;n=t.t,t.t=e,t.Db&4&&!(t.Db&1)&&Bi(t,new iV(t,5,n,t.t))}function $ct(t,e){var n;n=t.d,t.d=e,t.Db&4&&!(t.Db&1)&&Bi(t,new iV(t,2,n,t.d))}function DV(t,e){var n;n=t.F,t.F=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,5,n,e))}function yue(t,e){var n,i,r;return n=(i=(am(),r=new GS,r),e&&xDt(i,e),i),XLt(n,t),n}function Tm(){Tm=P,nF=new gW("BARYCENTER",0),nA=new gW(pBt,1),iF=new gW(gBt,2)}function AN(){AN=P,A0t=new sW("ARD",0),CB=new sW("MSD",1),mJ=new sW("MANUAL",2)}function Fo(){Fo=P,eF=new lW(sx,0),Ga=new lW("INPUT",1),ba=new lW("OUTPUT",2)}function BLt(){Zl(),this.b=(ts(),new vi),this.f=new vi,this.g=new vi,this.e=new vi}function Vct(t,e,n,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=1,this.c=t,this.a=n}function qct(t,e,n,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=2,this.c=t,this.a=n}function Xct(t,e,n,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=6,this.c=t,this.a=n}function Zct(t,e,n,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=7,this.c=t,this.a=n}function Yct(t,e,n,i,r){this.d=e,this.j=i,this.e=r,this.o=-1,this.p=4,this.c=t,this.a=n}function Kct(t,e){return Ef(),I1(Y1),y.Math.abs(t-e)<=Y1||t==e||isNaN(t)&&isNaN(e)}function xue(){return F7(),Y(Z(cgt,1),jt,228,0,[ogt,ngt,igt,egt,RK,sgt,rgt,tgt,Q1t])}function Mue(){return r0(),Y(Z(to,1),jt,86,0,[kl,Uf,Pl,Bh,hh,lh,Du,Il,Ll])}function Eue(){return ma(),Y(Z(vvt,1),jt,239,0,[jE,xA,IF,MA,RF,DF,Ox,qQ,PF])}function FLt(){FLt=P,Tzt=Y(Z(Gn,1),pi,22,15,[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15])}function ULt(){ULt=P,dWt=Xa(Ni(Ni(new as,(Mo(),aa),(Po(),cJ)),ua,sJ),Yo,oJ)}function NV(){return SQ||(SQ=new nNt,EC(SQ,Y(Z(F4,1),te,154,0,[new yj]))),SQ}function _o(t,e,n){return zM(t,e),kh(t,n),c_(t,0),RM(t,1),f_(t,!0),h_(t,!0),t}function zLt(t,e){var n;return ct(e,38)?t.c.vc(e):(n=kq(t,e),sP(t,e),n)}function vr(t){var e;return ct(t,78)?t:(e=t&&t[gZ],e||(e=new uIt(t),Ki(e)),e)}function Jct(t){var e,n;if(t==0)return 32;for(n=0,e=1;!(e&t);e<<=1)++n;return n}function Sue(t,e){var n;return n=t.c,e=0),Bfe(t.d,t.c)<0&&(t.a=t.a-1&t.d.a.length-1,t.b=t.d.c),t.c=-1}function BV(t,e){t.j>0&&t.c0&&t.e!=0&&BV(t.g,e/t.j*t.g.d))}function VLt(t,e){var n;n=t.c,t.c=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,1,n,t.c))}function qLt(t,e){var n;n=t.b,t.b=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,0,n,t.b))}function zL(t,e){var n;n=t.k,t.k=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,2,n,t.k))}function eat(t,e){var n;n=t.f,t.f=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,8,n,t.f))}function nat(t,e){var n;n=t.i,t.i=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,7,n,t.i))}function XLt(t,e){var n;n=t.a,t.a=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,8,n,t.a))}function ZLt(t,e){var n;n=t.d,t.d=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,1,n,t.d))}function YLt(t,e){var n;n=t.c,t.c=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,1,n,t.c))}function iat(t,e){var n;n=t.c,t.c=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,4,n,t.c))}function FV(t,e){var n;n=t.D,t.D=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,2,n,t.D))}function KLt(t,e){var n;n=t.b,t.b=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,0,n,t.b))}function Lue(t,e,n){var i;t.b=e,t.a=n,i=(t.a&512)==512?new xxt:new jh,t.c=fwe(i,t.b,t.a)}function JLt(t,e){return Om(t.e,e)?(Jo(),Fct(e)?new PD(e,t):new $5(e,t)):new fEt(e,t)}function MC(t,e){return me(),Es(t)?Zst(t,hi(e)):Gb(t)?lCt(t,Yt(e)):Hb(t)?pre(t,de(e)):t.vd(e)}function Pue(t){var e=/function(?:\s+([\w$]+))?\s*\(/,n=e.exec(t);return n&&n[1]||mZ}function Iue(t,e){var n,i;return n=t.o+t.p,i=e.o+e.p,n>>31;i!=0&&(t[n]=i)}function cPt(t){var e;return Pc(t,0)<0&&(t=ist(t)),e=or(E1(t,32)),64-(e!=0?_P(e):_P(or(t))+32)}function Fue(t){var e,n;for(n=t.c.a.Xb().tc();n.hc();)e=a(n.ic(),204),Ant(e,new LCt(e.f))}function aPt(t){var e,n;for(n=t.c.a.Xb().tc();n.hc();)e=a(n.ic(),204),knt(e,new s8t(e.e))}function uPt(t){this.d=t,this.c=t.c.Tb().tc(),this.b=null,this.a=null,this.e=(Ao(),Ao(),r1t)}function lPt(t){this.e=t,this.d=new T9(YV(sot(this.e)._b())),this.c=this.e.a,this.b=this.e.c}function zV(t){this.b=t,this.a=dt(Gn,pi,22,t+1,15,1),this.c=dt(Gn,pi,22,t,15,1),this.d=0}function Uue(t){t.a=null,t.e=null,t.b.c=dt(un,te,1,0,5,1),t.f.c=dt(un,te,1,0,5,1),t.c=null}function nr(t,e){var n,i;i=(n=new tst,n),i.n=e,ni((!t.s&&(t.s=new Wt(Ra,t,21,17)),t.s),i)}function Cr(t,e){var n,i;n=(i=new NG,i),n.n=e,ni((!t.s&&(t.s=new Wt(Ra,t,21,17)),t.s),n)}function kh(t,e){var n;n=t.zb,t.zb=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,1,n,t.zb))}function jV(t,e){var n;n=t.xb,t.xb=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,3,n,t.xb))}function HV(t,e){var n;n=t.yb,t.yb=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,2,n,t.yb))}function GV(t,e,n){var i,r,c;return r=_m(e,"labels"),i=new ZMt(t,n),c=(bwe(i.a,i.b,r),r),c}function Rr(t,e,n,i,r,c,l,f,p,b,v,M,k){return K8t(t,e,n,i,r,c,l,f,p,b,v,M,k),$at(t,!1),t}function yo(t,e){var n,i,r;for(En(e),n=!1,r=e.tc();r.hc();)i=r.ic(),n=n|t.nc(i);return n}function hPt(t){if(t){if(t.Wb())throw K(new J);return t.cd(t._b()-1)}return okt(null.tc())}function zue(t){if(En(t),t.length==0)throw K(new yf("Zero length BigInteger"));Cwe(this,t)}function PN(){PN=P,Tbt=new fW("NO",0),nQ=new fW("GREEDY",1),Sbt=new fW("LOOK_BACK",2)}function WV(){WV=P,AA=new _xt,ott=Y(Z(Ra,1),W_,158,0,[]),Wqt=Y(Z(ph,1),zpt,53,0,[])}function fPt(){fPt=P,jjt=Vi((Ke(),Y(Z(ZK,1),jt,232,0,[gs,Hr,rs,uc,bu,Jc,ef])))}function jue(){return So(),Y(Z(TJ,1),jt,233,0,[LB,Al,W4,PB,K_,J_,S6,kE,LE,IB])}function Hue(t,e){return FM(),t==Xm&&e==vw||t==vw&&e==Xm||t==Z_&&e==ww||t==ww&&e==Z_}function Gue(t,e){return FM(),t==Xm&&e==ww||t==Xm&&e==Z_||t==vw&&e==Z_||t==vw&&e==ww}function dPt(t,e){return lt(Yt(UW(QL(Vh(new gi(null,new Ei(t.c.b,16)),new J8(t)),e))))}function aat(t,e){return lt(Yt(UW(QL(Vh(new gi(null,new Ei(t.c.b,16)),new Ys(t)),e))))}function pPt(t,e){e?t.B==null&&(t.B=t.D,t.D=null):t.B!=null&&(t.D=t.B,t.B=null)}function Wue(t){var e;return ct(t,182)?(e=a(t,182),new mit(e.a)):(Ao(),new l5(t))}function gPt(t){var e;return e=ZAt(t),zb(e.a,0)?(tM(),tM(),R1t):(tM(),new Xrt(e.b))}function mPt(t){var e;return e=ZAt(t),zb(e.a,0)?(tM(),tM(),R1t):(tM(),new Xrt(e.c))}function bPt(t){tot.call(this),this.b=lt(Yt(z(t,(qt(),nf)))),this.a=a(z(t,ig),197)}function wPt(){this.c=new A9(0),this.b=new A9(NBt),this.d=new A9(DBt),this.a=new A9(tY)}function IN(t){this.b=(si(t),new Eh((al(),t))),this.a=new Dt,this.d=new Dt,this.e=new go}function ep(){ep=P,KK=new Nr,YK=new mr,Rgt=new a1,Igt=new dc,Dgt=new vh,Ngt=new _g}function RN(){RN=P,bJ=new oW("GREEDY",0),L0t=new oW("DEPTH_FIRST",1),wJ=new oW(cY,2)}function Kh(){Kh=P,ly=new yW("OUTSIDE",0),cb=new yW("INSIDE",1),LF=new yW("FIXED",2)}function vPt(){vPt=P,pWt=OC(Mte(Ni(Ni(new as,(Mo(),aa),(Po(),cJ)),ua,sJ),Yo),oJ)}function $ue(t){return t.b.c.g.j==(Ke(),rs)?a(z(t.b.c.g,(Ft(),li)),11):t.b.c}function _Pt(t){return t.b.d.g.j==(Ke(),rs)?a(z(t.b.d.g,(Ft(),li)),11):t.b.d}function yPt(t){var e;if(t.b==-2){if(t.e==0)e=-1;else for(e=0;t.a[e]==0;e++);t.b=e}return t.b}function xPt(t){var e,n,i;for(e=0,i=t.tc();i.hc();)n=i.ic(),e+=n!=null?Yr(n):0,e=~~e;return e}function uat(t,e,n){var i,r;for(r=qn(t,0);r.b!=r.d.c;)i=a(Yn(r),9),i.a+=e,i.b+=n;return t}function jL(t){var e,n,i;for(e=0,i=t.tc();i.hc();)n=Yt(i.ic()),e+=(En(n),n);return e/t._b()}function MPt(t){var e;return t==0?"UTC":(t<0?(t=-t,e="UTC+"):e="UTC-",e+Q5t(t))}function Vue(t,e){we();var n,i;for(i=new Dt,n=0;n0&&(this.g=this.Fh(this.i+(this.i/8|0)+1),t.zc(this.g))}function SPt(t,e){return Ef(),I1(yd),y.Math.abs(0-e)<=yd||e==0||isNaN(0)&&isNaN(e)?0:t/e}function _s(t,e){CD.call(this,$qt,t,e),this.b=this,this.a=gu(t.mg(),Ve(this.e.mg(),this.c))}function HL(t,e){var n,i;for(i=e.length,n=0;nr&&e.ac&&e.b1||t.hc())return++t.a,t.g=0,e=t.i,t.hc(),e;throw K(new J)}function OPt(t){var e;t.d==null?(++t.e,t.f=0,D6t(null)):(++t.e,e=t.d,t.d=null,t.f=0,D6t(e))}function ON(t,e){var n;ct(e,109)?(a(t.c,81).ij(),n=a(e,109),tPt(t,n)):a(t.c,81).Gc(e)}function Cm(t){return ct(t,193)?_L(a(t,193)):ct(t,160)?a(t,160).a:ct(t,49)?new Lv(t):new nM(t)}function nle(t,e,n){return t==(Tm(),iF)?new Qf:pu(e,1)!=0?new Cit(n.length):new r3t(n.length)}function Bi(t,e){var n,i,r;if(n=t.cg(),n!=null&&t.fg())for(i=0,r=n.length;i=128?!1:t<64?ET(ns(Yd(1,t),n),0):ET(ns(Yd(1,t-64),e),0)}function ule(t){var e;return e=a(z(t,(Ft(),wc)),69),t.j==(Ke(),rs)&&(e==(Ht(),on)||e==Qe)}function ZV(t,e){var n;return ct(e,13)?(n=(al(),a(e,13)),t.oc(n)):LV(t,a(si(e),20).tc())}function lle(t){IEt();var e;return oMt(sQ,t)||(e=new vt,e.a=t,QW(sQ,t,e)),a(js(sQ,t),573)}function YV(t){return ts(),t<3?(Ah(t,"expectedSize"),t+1):t>22),r=t.h+e.h+(i>>22),ia(n&eu,i&eu,r&sp)}function VPt(t,e){var n,i,r;return n=t.l-e.l,i=t.m-e.m+(n>>22),r=t.h-e.h+(i>>22),ia(n&eu,i&eu,r&sp)}function JV(t,e,n,i){return n==1?(!t.n&&(t.n=new Wt(ic,t,1,7)),$s(t.n,e,i)):clt(t,e,n,i)}function qPt(t,e){if(e==null)return!1;for(;t.a!=t.b;)if(Fi(e,WN(t)))return!0;return!1}function pat(t){return t.a.hc()?!0:t.a!=t.d?!1:(t.a=new zot(t.e.d),t.a.hc())}function Or(t,e){var n,i;return n=e.yc(),i=n.length,i==0?!1:(Ust(t.c,t.c.length,n),!0)}function gle(t,e,n){var i,r;for(r=e.Tb().tc();r.hc();)i=a(r.ic(),38),t.Yb(i.kc(),i.lc(),n);return t}function XPt(t,e){var n;return n=t.a.get(e),n===void 0?++t.d:(t.a[UZ](e),--t.c,YW(t.b)),n}function NM(t,e){this.b=t,this.e=e,this.d=e.j,this.f=(Jo(),a(t,61).bj()),this.k=gu(e.e.mg(),t)}function ZPt(t){this.o=t,this.g=new Dt,this.j=new Fr,this.n=new Fr,this.e=new Dt,this.b=new Dt}function YPt(t){this.a=dt(hWt,wt,1704,t.length,0,2),this.b=dt(fWt,wt,1705,t.length,0,2),this.c=new yIt}function mle(t,e){t.d==(Js(),ah)||t.d==cg?a(e.a,57).c.nc(a(e.b,57)):a(e.b,57).c.nc(a(e.a,57))}function KPt(t,e){var n,i;for(i=new j(t.b);i.ae?1:t==e?0:isNaN(t)?isNaN(e)?0:1:-1}function QPt(t,e){return!t||!e||t==e?!1:OIt(t.d.c,e.d.c+e.d.b)&&OIt(e.d.c,t.d.c+t.d.b)}function t6t(t,e){_D(t>=0,"Negative initial capacity"),_D(e>=0,"Non-positive load factor"),uu(this)}function e6t(t){var e,n;return n=(e=new zk,e),kh(n,"T"),ni((!t.d&&(t.d=new Hu(wu,t,11)),t.d),n),n}function n6t(t,e){var n;return n=od(e.a._b()),qc(wLt(new gi(null,new Ei(e,1)),t.i),new $Mt(t,n)),n}function gat(t){var e,n,i;for(e=new Fr,i=qn(t.d,0);i.b!=i.d.c;)n=a(Yn(i),170),Xi(e,n.c);return e}function mat(t){var e,n,i,r;for(e=1,n=0,r=t._b();n>=1);return e}function wle(t){var e;return e=rw(t),e>nft?is:e<-34028234663852886e22?Ps:e}function Y(t,e,n,i,r){return r.ql=t,r.rl=e,r.sl=B,r.__elementTypeId$=n,r.__elementTypeCategory$=i,r}function OM(t,e,n,i,r){var c,l;for(l=n;l<=r;l++)for(c=e;c<=i;c++)p_(t,c,l)||U7(t,c,l,!0,!1)}function vle(t){var e,n,i,r;for(n=t.a,i=0,r=n.length;it.f,n=t.u+t.e[t.o.o]*t.d>t.f*t.s*t.d,e||n}function jN(t,e,n){var i,r;return i=new gV(e,n),r=new it,t.b=ODt(t,t.b,i,r),r.b||++t.c,t.b.b=!1,r.d}function yat(t){var e;return(!t.c||!(t.Bb&1)&&t.c.Db&64)&&(e=wl(t),ct(e,96)&&(t.c=a(e,24))),t.c}function F1(t){var e,n;for(n=new j(t.a.b);n.a=0&&t[i]===e[i];i--);return i<0?0:qG(ns(t[i],uo),ns(e[i],uo))?-1:1}function Lle(t){var e;return t==null?!0:(e=t.length,e>0&&t.charCodeAt(e-1)==58&&!sq(t,TA,CA))}function kC(t){switch(t.g){case 1:return DBt;default:case 2:return 0;case 3:return tY;case 4:return NBt}}function iq(t){switch(t._b()){case 0:return n1t;case 1:return new JSt(t.tc().ic());default:return new cN(t)}}function Ple(t,e){Ao();var n,i;for(Lot(e,"predicate"),i=0;t.hc();i++)if(n=t.ic(),e.Mb(n))return i;return-1}function Ile(t,e,n){if(si(e),n.hc())for(Vit(e,t.Lb(n.ic()));n.hc();)Vit(e,t.c),Vit(e,t.Lb(n.ic()));return e}function rq(t,e){var n;return e===t?!0:ct(e,238)?(n=a(e,238),Fi(t.Hc(),n.Hc())):!1}function Pc(t,e){var n;return Vo(t)&&Vo(e)&&(n=t-e,!isNaN(n))?n:But(Vo(t)?gl(t):t,Vo(e)?gl(e):e)}function XL(t){return V1(),t<0?t!=-1?new put(-1,-t):CK:t<=10?A1t[Tr(t)]:new put(1,t)}function Rle(){Ai();var t;return ftt||(t=See(Z1("M",!0)),t=BD(Z1("M",!1),t),ftt=t,ftt)}function l_(t,e,n){var i,r;return r=(i=new RG,i),_o(r,e,n),ni((!t.q&&(t.q=new Wt(ph,t,11,10)),t.q),r),r}function sq(t,e,n){var i,r;for(i=0,r=t.length;i=t.b.c.length||(kat(t,2*e+1),n=2*e+2,ne)throw K(new yn(iO+t+DOt+e));if(t<0||e>n)throw K(new bit(iO+t+cft+e+oft+n))}function Nle(t,e,n){if(e<0)throw K(new Uc($Bt+e));e0)return QT(e-1,t.a.c.length),Em(t.a,e-1);throw K(new F)}function S6t(t,e){var n;if(e.c.length!=0){for(;slt(t,e);)k7(t,e,!1);n=UN(e),t.a&&(t.a.If(n),S6t(t,n))}}function Ule(t,e){var n,i;for(i=qn(t,0);i.b!=i.d.c;)n=a(Yn(i),204),n.e.length>0&&(e.td(n),n.i&&bhe(n))}function hq(t,e,n){var i,r,c;for(i=new Fr,c=qn(n,0);c.b!=c.d.c;)r=a(Yn(c),9),Xi(i,new Oo(r));hhe(t,e,i)}function T6t(t,e){var n;return n=new IX((t.f&256)!=0,t.i,t.a,t.d,(t.f&16)!=0,t.j,t.g,e),t.e!=null||(n.c=t),n}function zle(t,e){var n,i;return n=a(t.d.$b(e),13),n?(i=t.e.Oc(),i.oc(n),t.e.d-=n._b(),n.Pb(),i):null}function HN(t){var e,n,i,r;for(r=0,n=0,i=t.length;n1||e>=0&&t.b<3)}function Qb(t){var e;++t.j,t.i==0?t.g=null:t.i>>0).toString(16):t.toString()}function fq(t,e){t.D==null&&t.B!=null&&(t.D=t.B,t.B=null),FV(t,e==null?null:(En(e),e)),t.C&&t.Kj(null)}function Gle(t,e){var n,i;for(n=t.a.length-1,t.c=t.c-1&n;e!=t.c;)i=e+1&n,Vr(t.a,e,t.a[i]),e=i;Vr(t.a,t.c,null)}function Wle(t,e){var n,i;for(n=t.a.length-1;e!=t.b;)i=e-1&n,Vr(t.a,e,t.a[i]),e=i;Vr(t.a,t.b,null),t.b=t.b+1&n}function $le(t,e){rD(!this.b),rD(!this.d),NW(Q3(t.c)==0),NW(e.d.c+e.e.c==0),NW(!0),this.b=t,this.d=this.ec(e)}function k6t(t,e,n,i,r){i?Ppe(t,e):(Vpe(t,e,r),r2e(t,e,n)),e.c.length>1&&(we(),gc(e,t.b),nve(t.c,e))}function Vle(t,e,n,i,r){e==0||i==0||(e==1?r[i]=hut(r,n,i,t[0]):i==1?r[e]=hut(r,t,e,n[0]):P0e(t,n,r,e,i))}function qle(t){var e,n;if(t==null)return null;for(e=0,n=t.length;e=t.c.b:t.a<=t.c.b))throw K(new J);return e=t.a,t.a+=t.c.c,++t.b,Xt(e)}function UM(t){var e,n;return t>-129&&t<128?(e=t+128,n=(yTt(),w1t)[e],!n&&(n=w1t[e]=new R8(t)),n):new R8(t)}function Xt(t){var e,n;return t>-129&&t<128?(e=t+128,n=(tTt(),p1t)[e],!n&&(n=p1t[e]=new P8(t)),n):new P8(t)}function pq(t,e){return!t||e&&!t.j||ct(t,114)&&a(t,114).a.b==0?0:t.Pf()}function GN(t,e){return!t||e&&!t.k||ct(t,114)&&a(t,114).a.a==0?0:t.Qf()}function Fi(t,e){return Es(t)?le(t,e):Gb(t)||Hb(t)?(En(t),t===e):Yst(t)?t.Fb(e):$st(t)?t===e:Xot(t,e)}function Yr(t){return Es(t)?j1(t):Gb(t)?Tr((En(t),t)):Hb(t)?(En(t),t?1231:1237):Yst(t)?t.Hb():$st(t)?lm(t):Bot(t)}function fu(t){return Es(t)?At:Gb(t)?To:Hb(t)?ho:Yst(t)||$st(t)?t.ql:t.ql||Array.isArray(t)&&Z(_zt,1)||_zt}function Yle(t){return t?t.i&1?t==Ol?ho:t==Gn?Io:t==Gw?EE:t==Os?To:t==k0?Vm:t==vy?qm:t==Da?fx:O4:t:null}function tw(){tw=P,G$t=(dr(),Lx),W$t=uy,yQ=(Plt(),O$t),xQ=B$t,swt=F$t,bF=U$t,wF=z$t,q6=j$t,owt=H$t}function gq(){gq=P,VK=Q4t(Y(Z(pA,1),jt,110,0,[(Js(),ah),uh])),qK=Q4t(Y(Z(pA,1),jt,110,0,[cg,fp]))}function LC(){LC=P,QK=new rW("MIRROR_X",0),tJ=new rW("TRANSPOSE",1),JK=new rW("MIRROR_AND_TRANSPOSE",2)}function Kle(t){var e;return e=new fLt(t),xL(t.a,Fjt,new zu(Y(Z(_6,1),te,341,0,[e]))),e.d&&Ut(e.f,e.d),e.f}function Jle(t){var e,n;for(n=new j(t.r);n.a=48&&t<58?t-48:t>=97&&t<97?t-97+10:t>=65&&t<65?t-65+10:-1}function Qle(t){var e,n;if(t==null)return!1;for(e=0,n=t.length;edw?t-n>dw:n-t>dw}function so(t,e){var n;return Vo(t)&&Vo(e)&&(n=t+e,zPi)throw K(new Wv(e,i));if(t.xh()&&t.pc(n))throw K(new yn(i6));t.mh(e,n)}function B6t(t,e,n){if(t<0||e>n)throw K(new Uc(iO+t+cft+e+", size: "+n));if(t>e)throw K(new yn(iO+t+DOt+e))}function Nat(t){throw aq(),K(new Txt("Unexpected typeof result '"+t+"'; please report this bug to the GWT team"))}function zp(t){switch($b(),t.c){case 0:return wM(),D4;case 1:return new a2(vme(new iM(t)));default:return new Sxt(t)}}function F6t(t){var e;return t.Db&64?nh(t):(e=new ul(nh(t)),e.a+=" (source: ",mo(e,t.d),e.a+=")",e.a)}function Ct(t,e,n){return n==null?(!t.p&&(t.p=(ts(),new vi)),kM(t.p,e)):(!t.p&&(t.p=(ts(),new vi)),wr(t.p,e,n)),t}function KL(t,e,n){return n==null?(!t.p&&(t.p=(ts(),new vi)),kM(t.p,e)):(!t.p&&(t.p=(ts(),new vi)),wr(t.p,e,n)),t}function JL(t,e,n){var i;t.Eh(t.i+1),i=t.Ch(e,n),e!=t.i&&Aa(t.g,e,t.g,e+1,t.i-e),Vr(t.g,e,i),++t.i,t.sh(e,n),t.th()}function wq(t,e,n){var i,r,c;for(i=0,c=qn(t,0);c.b!=c.d.c&&(r=lt(Yt(Yn(c))),!(r>n));)r>=e&&++i;return i}function vq(t,e){var n,i,r;for(n=0,r=ac(t,e).tc();r.hc();)i=a(r.ic(),11),n+=z(i,(Ft(),Ru))!=null?1:0;return n}function ohe(t){var e;return e=a(D2(t.c.c,""),199),e||(e=new C2(J3(K3(new Cb,""),"Other")),Pm(t.c.c,"",e)),e}function U6t(t){this.a=new qa,this.d=new qa,this.b=new qa,this.c=new qa,this.g=new qa,this.i=new qa,this.f=t}function Js(){Js=P,Ff=new H5(sx,0),uh=new H5(fE,1),ah=new H5(hE,2),fp=new H5(RY,3),cg=new H5("UP",4)}function Kg(){Kg=P,kF=new _W("INHERIT",0),Ix=new _W("INCLUDE_CHILDREN",1),wA=new _W("SEPARATE_CHILDREN",2)}function che(t,e,n){var i,r;return i=new Qd(t.e,3,13,null,(r=e.c,r||(ye(),Hf)),Hp(t,e),!1),n?n.Sh(i):n=i,n}function ahe(t,e,n){var i,r;return i=new Qd(t.e,4,13,(r=e.c,r||(ye(),Hf)),null,Hp(t,e),!1),n?n.Sh(i):n=i,n}function Oat(t,e,n){var i,r;return r=t.sb,t.sb=e,t.Db&4&&!(t.Db&1)&&(i=new fs(t,1,4,r,e),n?n.Sh(i):n=i),n}function Bat(t,e,n){var i,r;return r=t.r,t.r=e,t.Db&4&&!(t.Db&1)&&(i=new fs(t,1,8,r,t.r),n?n.Sh(i):n=i),n}function jp(t,e){var n,i;return n=a(e,614),i=n.Hj(),!i&&n.Ij(i=ct(e,96)?new aEt(t,a(e,24)):new BAt(t,a(e,140))),i}function Fat(t,e){var n;return t===e?!0:ct(e,89)?(n=a(e,89),t.e==n.e&&t.d==n.d&&Lce(t,n.a)):!1}function uhe(t,e){var n;if(n=EP(t,e),ct(n,335))return a(n,29);throw K(new yn(H_+e+"' is not a valid attribute"))}function QL(t,e){var n;return n=new ue,t.a.sd(n)?(uM(),new FG(En(Z5t(t,n.a,e)))):(Zv(t),uM(),uM(),I1t)}function z6t(t,e){var n;t.c.length!=0&&(n=a(xo(t,dt(Cl,Ih,8,t.c.length,0,1)),123),yrt(n,new f3),E9t(n,e))}function j6t(t,e){var n;t.c.length!=0&&(n=a(xo(t,dt(Cl,Ih,8,t.c.length,0,1)),123),yrt(n,new lv),E9t(n,e))}function jM(t,e){switch(e.g){case 2:case 1:return ac(t,e);case 3:case 4:return Cm(ac(t,e))}return we(),we(),fo}function Uat(t,e,n,i){switch(e){case 1:return!t.n&&(t.n=new Wt(ic,t,1,7)),t.n;case 2:return t.k}return Cut(t,e,n,i)}function lhe(t,e,n,i,r,c,l,f){var p;for(p=n;c=i||e=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:t>=48&&t<=57?t-48:0}function W6t(t){return t-=t>>1&1431655765,t=(t>>2&858993459)+(t&858993459),t=(t>>4)+t&252645135,t+=t>>8,t+=t>>16,t&63}function h_(t,e){var n;n=(t.Bb&256)!=0,e?t.Bb|=256:t.Bb&=-257,t.Db&4&&!(t.Db&1)&&Bi(t,new Jl(t,1,2,n,e))}function $6t(t,e){var n;n=(t.Bb&256)!=0,e?t.Bb|=256:t.Bb&=-257,t.Db&4&&!(t.Db&1)&&Bi(t,new Jl(t,1,8,n,e))}function zat(t,e){var n;n=(t.Bb&256)!=0,e?t.Bb|=256:t.Bb&=-257,t.Db&4&&!(t.Db&1)&&Bi(t,new Jl(t,1,8,n,e))}function V6t(t,e){var n;n=(t.Bb&512)!=0,e?t.Bb|=512:t.Bb&=-513,t.Db&4&&!(t.Db&1)&&Bi(t,new Jl(t,1,9,n,e))}function f_(t,e){var n;n=(t.Bb&512)!=0,e?t.Bb|=512:t.Bb&=-513,t.Db&4&&!(t.Db&1)&&Bi(t,new Jl(t,1,3,n,e))}function IC(t,e){var n;return t.b==-1&&t.a&&(n=t.a.Vi(),t.b=n?t.c.qg(t.a.pi(),n):xr(t.c.mg(),t.a)),t.c.hg(t.b,e)}function dhe(t,e,n){var i,r;return r=t.a,t.a=e,t.Db&4&&!(t.Db&1)&&(i=new fs(t,1,5,r,t.a),n?Xut(n,i):n=i),n}function phe(t,e){var n;if(n=kp(t.i,e),n==null)throw K(new xf("Node did not exist in input."));return hat(e,n),null}function ghe(t,e){var n;if(n=zi(t.k,e),n==null)throw K(new xf("Port did not exist in input."));return hat(e,n),null}function HM(t){if(t.c)HM(t.c);else if(t.d)throw K(new yc("Stream already terminated, can't be modified or used"))}function mhe(t){var e;if(!t.a)throw K(new yc("Cannot offset an unassigned cut."));e=t.c-t.b,t.b+=e,C4t(t,e),A4t(t,e)}function bhe(t){var e;t.g&&(e=t.c.pf()?t.f:t.a,Ylt(e.a,t.o,!0),Ylt(e.a,t.o,!1),Ct(t.o,(qt(),Qi),(Ls(),Rx)))}function whe(t){var e,n,i;for(e=a(z(t,(mc(),Obt)),15),i=e.tc();i.hc();)n=a(i.ic(),170),Xi(n.b.d,n),Xi(n.c.b,n)}function q6t(t){var e,n,i;for(i=0,n=(Ao(),new $d(id(Zd(t.a,new X))));Jn(n);)e=a(In(n),14),e.c.g==e.d.g||++i;return i}function X6t(t,e){var n,i;for(i=new $n(t);i.e!=i.i._b();)if(n=a(ci(i),24),zt(e)===zt(n))return!0;return!1}function Z6t(t,e){var n,i;for(i=new $n(t);i.e!=i.i._b();)if(n=a(ci(i),133),zt(e)===zt(n))return!0;return!1}function vhe(t,e,n){var i,r,c;return c=(r=QM(t.b,e),r),c&&(i=a($7(DL(t,c),""),24),i)?Blt(t,i,e,n):null}function _q(t,e,n){var i,r,c;return c=(r=QM(t.b,e),r),c&&(i=a($7(DL(t,c),""),24),i)?Flt(t,i,e,n):null}function jat(t){var e,n;return e=t.j,e==(Ke(),rs)?(n=a(z(t,(Ft(),wc)),69),n==(Ht(),Tn)||n==fi):!1}function Y6t(t){var e;return e=new om,e.a+="VerticalSegment ",Fa(e,t.e),e.a+=" ",Ii(e,OW(new A5(Rc),new j(t.k))),e.a}function _he(t){var e,n,i;for(e=new Dt,i=new j(t.b);i.a0&&(i+=r,++n);return n>1&&(i+=t.d*(n-1)),i}function Phe(t,e,n){var i,r;for(r=t.a.Xb().tc();r.hc();)if(i=a(r.ic(),8),O1(n,a(Ee(e,i.o),13)))return i;return null}function Eq(t,e,n,i){var r;if(r=t.length,e>=r)return r;for(e=e>0?e:0;e=1?uh:fp):n}function Rhe(t){var e,n,i;for(e=0,i=new j(t.c.a);i.a=64&&e<128&&(r=Xh(r,Yd(1,e-64)));return r}function iIt(t,e,n){var i,r,c;for(r=Rn(e?Rs(t):br(t));Jn(r);)i=a(In(r),14),c=e?i.c.g:i.d.g,c.j==(Ke(),bu)&&Ks(c,n)}function Dhe(t,e,n){var i;i=new Gkt(t,e),cr(t.r,e.ef(),i),n&&t.t!=(Kh(),LF)&&(i.c=new Y4t(t.d),pd(e.We(),new VH(i)))}function rIt(t,e,n){var i,r;return i=(am(),r=new I3,r),IV(i,e),RV(i,n),t&&ni((!t.a&&(t.a=new Ss(sf,t,5)),t.a),i),i}function Vn(t){if(t.i==null)throw K(new yc("The task has not begun yet."));t.b||(t.c0&&e.charCodeAt(0)==43?e.substr(1,e.length-1):e))}function Fhe(t){var e;return t==null?null:new y1((e=Hc(t,!0),e.length>0&&e.charCodeAt(0)==43?e.substr(1,e.length-1):e))}function qat(t){var e;return e=dt(el,Pf,22,2,15,1),t-=ao,e[0]=(t>>10)+jP&qr,e[1]=(t&1023)+56320&qr,ml(e,0,e.length)}function Uhe(t){var e,n;for(n=xme(Xu(Zb(t))).tc();n.hc();)if(e=hi(n.ic()),i4(t,e))return Kce((A3t(),Nqt),e);return null}function ml(t,e,n){var i,r,c,l;for(c=e+n,Ect(e,c,t.length),l="",r=e;re&&i.Ld(t[c-1],t[c])>0;--c)l=t[c],Vr(t,c,t[c-1]),Vr(t,c-1,l)}function jhe(t,e){var n;t.c=e,t.a=Zhe(e),t.a<54&&(t.f=(n=e.d>1?Xh(Yd(e.a[1],32),ns(e.a[0],uo)):ns(e.a[0],uo),SM(Zg(e.e,n))))}function Sq(){Kut();var t,e,n;n=b3e+++rae(),t=Tr(y.Math.floor(n*GP))&nO,e=Tr(n-t*sft),this.a=t^1502,this.b=e^zZ}function Hhe(t,e,n){t.n=Vb(k0,[wt,ift],[378,22],14,[n,Tr(y.Math.ceil(e/32))],2),t.o=e,t.p=n,t.j=e-1>>1,t.k=n-1>>1}function Ghe(t,e){var n,i,r;i=Jv(e),r=lt(Yt(WM(i,(qt(),nf)))),n=y.Math.max(0,r/2-.5),GC(e,n,1),Ut(t,new wMt(e,n))}function sIt(t,e){var n,i;for(n=qn(t,0);n.b!=n.d.c;){if(i=lt(Yt(Yn(n))),i==e)return;if(i>e){TM(n);break}}mM(n,e)}function He(t,e){var n,i,r,c,l;if(n=e.f,Pm(t.c.d,n,e),e.g!=null)for(r=e.g,c=0,l=r.length;ce?1:Q9(isNaN(t),isNaN(e))}function uIt(t){no(),iD(this),YD(this),this.e=t,t!=null&&SSt(t,gZ,this),this.g=t==null?tu:Yc(t),this.a="",this.b=t,this.a=""}function DC(t){var e;this.a=(e=a(t.e&&t.e(),10),new ja(e,a(cu(e,e.length),10),0)),this.b=dt(un,te,1,this.a.a.length,5,1)}function QN(t,e){var n,i;return n=t._b(),e.lengthn&&Vr(e,n,null),e}function Yat(t){var e,n,i;for(i=new Sp,i.a+="[",e=0,n=t._b();e>5,e=t&31,i=dt(Gn,pi,22,n+1,15,1),i[n]=1<c?e:c;return Xt(e)}function Qhe(t,e){var n,i;for(i=t.e.a.Xb().tc();i.hc();)if(n=a(i.ic(),247),cge(e,n.d)||h0e(e,n.d))return!0;return!1}function lIt(t,e){var n,i,r,c;for(c=t.g.ed(),n=0;c.hc();){if(i=lt(Yt(c.ic())),r=i-e,r>F_)return n;r>xO&&++n}return n}function hIt(t,e){var n,i,r;r=e.d.g,i=r.j,!(i==(Ke(),gs)||i==Jc||i==ef)&&(n=Rn(br(r)),Jn(n)&&wr(t.k,e,a(In(n),14)))}function fIt(t,e){var n,i;n=e==($C(),hJ),i=Jat(t),n&&!i||!n&&i?Ct(t,(qt(),Bf),(md(),K6)):Ct(t,(qt(),Bf),(md(),Y6))}function gd(){gd=P,HQ=new W9(sx,0),jQ=new W9("POLYLINE",1),zE=new W9("ORTHOGONAL",2),rb=new W9("SPLINES",3)}function t7(){t7=P,vQ=new wW("OVERLAP_REMOVAL",0),bQ=new wW("COMPACTION",1),wQ=new wW("GRAPH_SIZE_CALCULATION",2)}function e7(){e7=P,xbt=new hW("EQUALLY_DISTRIBUTED",0),eQ=new hW("NORTH_STACKED",1),Mbt=new hW("NORTH_SEQUENCE",2)}function tfe(t){var e,n,i,r,c;return c=Jut(t),n=I9(t.c),i=!n,i&&(r=new Rg,P1(c,"knownLayouters",r),e=new gG(r),vo(t.c,e)),c}function efe(t,e,n){var i,r;for(r=ct(e,62)&&a(a(e,17),62).Bb&ao?new TW(e,t):new NM(e,t),i=0;i3;)r*=10,--c;t=(t+(r>>1))/r|0}return i.i=t,!0}function U2(t,e,n){var i,r;for(r=t.tc();r.hc();)if(i=r.ic(),zt(e)===zt(i)||e!=null&&Fi(e,i))return n&&r.jc(),!0;return!1}function vIt(t,e){var n,i;if(e){for(n=0;n0&&(e.lengtht.i&&Vr(e,t.i,null),e}function _It(t,e){var n,i,r,c;return n=e>>5,e&=31,r=t.d+n+(e==0?0:1),i=dt(Gn,pi,22,r,15,1),C1e(i,t.a,n,e),c=new qv(t.e,r,i),aC(c),c}function i7(t,e){art();var n,i;return n=rL((Hh(),Hh(),N4)),i=null,e==n&&(i=a(Zc(c1t,t),556)),i||(i=new VCt(t),e==n&&tc(c1t,t,i)),i}function xr(t,e){var n,i,r;if(n=(t.i==null&&q1(t),t.i),i=e.pi(),i!=-1){for(r=n.length;i=0;--i)for(e=n[i],r=0;r0&&Pc(t,128)<0?(e=or(t)+128,n=(_Tt(),g1t)[e],!n&&(n=g1t[e]=new I8(t)),n):new I8(t)}function iP(t){return V1(),Pc(t,0)<0?Pc(t,-1)!=0?new Fut(-1,PM(t)):CK:Pc(t,10)<=0?A1t[or(t)]:new Fut(1,t)}function yIt(){pit.call(this,new Sct(16)),Ah(2,"expectedValuesPerKey"),this.b=2,this.a=new Tot(null,null,0,null),X3(this.a,this.a)}function r7(){r7=P,XQ=new V9("SIMPLE",0),_vt=new V9("GROUP_DEC",1),xvt=new V9("GROUP_MIXED",2),yvt=new V9("GROUP_INC",3)}function iut(){iut=P,wvt=new _2(15),AVt=new xc((dr(),ay),wvt),LVt=new xc(uy,15),kVt=new xc(FQ,Xt(0)),CVt=new xc(FE,uE)}function Aq(){Aq=P,att=new Fk,Gvt=new kz,Wvt=new Uk,$vt=new DR,Vvt=new NR,qvt=new OR,Xvt=new $S,Zvt=new Lz,Yvt=new BR}function xIt(t){this.e=dt(Gn,pi,22,t.length,15,1),this.c=dt(Ol,a0,22,t.length,16,1),this.b=dt(Ol,a0,22,t.length,16,1),this.f=0}function rut(t,e){this.n=Vb(k0,[wt,ift],[378,22],14,[e,Tr(y.Math.ceil(t/32))],2),this.o=t,this.p=e,this.j=t-1>>1,this.k=e-1>>1}function MIt(t,e,n){xLt(),pxt.call(this),this.a=Vb(BVt,[wt,Pft],[537,171],0,[NF,ZQ],2),this.c=new cM,this.g=t,this.f=e,this.d=n}function Kc(t,e,n){var i,r,c;return t.ti()?(i=t.i,c=t.ui(),JL(t,i,e),r=t.mi(3,null,e,i,c),n?n.Sh(r):n=r):JL(t,t.i,e),n}function Lh(t,e){var n,i,r;return t.f>0&&(t.Fi(),i=e==null?0:Yr(e),r=(i&qi)%t.d.length,n=xlt(t,r,i,e),n)?n.lc():null}function kq(t,e){var n,i,r;return t.f>0?(t.Fi(),i=e==null?0:Yr(e),r=(i&qi)%t.d.length,n=tDt(t,r,i,e),n!=-1):!1}function rP(t,e){var n,i,r,c;for(c=gu(t.e.mg(),e),n=a(t.g,124),r=0;r2e3&&(yzt=t,ZO=y.setTimeout(hte,10))),XO++==0?(cue((Er(),o1t)),!0):!1}function yfe(){return Error.stackTraceLimit>0?(y.Error.stackTraceLimit=Error.stackTraceLimit=64,!0):"stack"in new Error}function kIt(t,e){return t.e>e.e?1:t.ee.d?t.e:t.d=0?c=c.a[1]:(r=c,c=c.a[0])}return r}function NIt(t,e,n){var i,r,c;for(r=null,c=t.b;c;){if(i=t.a.Ld(e,c.d),n&&i==0)return c;i<=0?c=c.a[0]:(r=c,c=c.a[1])}return r}function Efe(t,e,n,i){var r,c,l;return r=!1,Gye(t.f,n,i)&&(zfe(t.f,t.a[e][n],t.a[e][i]),c=t.a[e],l=c[i],c[i]=c[n],c[n]=l,r=!0),r}function cut(t,e){var n,i,r;for(r=t.g.ed();r.hc();)if(n=lt(Yt(r.ic())),i=y.Math.abs(n-e),ie?1:Q9(isNaN(t),isNaN(e)))>0}function uut(t,e){return Ef(),Ef(),I1(Y1),(y.Math.abs(t-e)<=Y1||t==e||isNaN(t)&&isNaN(e)?0:te?1:Q9(isNaN(t),isNaN(e)))<0}function OIt(t,e){return Ef(),Ef(),I1(Y1),(y.Math.abs(t-e)<=Y1||t==e||isNaN(t)&&isNaN(e)?0:te?1:Q9(isNaN(t),isNaN(e)))<=0}function Cfe(t,e){if(e.c==t)return e.d;if(e.d==t)return e.c;throw K(new yn("Input edge is not connected to the input port."))}function s7(t,e){return En(t),e==null?!1:le(t,e)?!0:t.length==e.length&&le(t.toLowerCase(),e.toLowerCase())}function BIt(t){var e,n,i,r,c;if(t==null)return null;for(c=new Dt,n=oq(t),i=0,r=n.length;ie.e?1:t.fe.f?1:Yr(t)-Yr(e)}function $M(t,e){ts(),si(t);try{return t.Vb(e)}catch(n){if(n=vr(n),ct(n,177))return null;if(ct(n,169))return null;throw K(n)}}function Dfe(t,e){ts(),si(t);try{return t.$b(e)}catch(n){if(n=vr(n),ct(n,177))return null;if(ct(n,169))return null;throw K(n)}}function WIt(t){V1(),t.length==0?(this.e=0,this.d=1,this.a=Y(Z(Gn,1),pi,22,15,[0])):(this.e=1,this.d=t.length,this.a=t,aC(this))}function hut(t,e,n,i){KM();var r,c;for(r=0,c=0;c=c?(Gle(t,e),-1):(Wle(t,e),1)}function $It(t,e){var n,i,r;++t.j,i=t.g==null?0:t.g.length,e>i&&(r=t.g,n=i+(i/2|0)+4,nBZ)return n.zg();if(i=n.sg(),i||n==t)break}return i}function VIt(t,e){var n,i;return n=e.Yg(t.a),n&&(i=hi(Lh((!n.b&&(n.b=new xu((ye(),Ho),Dc,n)),n.b),Ti)),i!=null)?i:e.be()}function Ffe(t,e){var n,i;return n=e.Yg(t.a),n&&(i=hi(Lh((!n.b&&(n.b=new xu((ye(),Ho),Dc,n)),n.b),Ti)),i!=null)?i:e.be()}function Xe(t){var e;if(ct(t.a,4)){if(e=PIt(t.a),e==null)throw K(new yc(VBt+t.b+"'. "+opt+(Vd(mI),mI.k)+cpt));return e}else return t.a}function Ufe(t){var e;if(t==null)return null;if(e=Bme(Hc(t,!0)),e==null)throw K(new GG("Invalid hexBinary value: '"+t+"'"));return e}function qIt(t,e){var n,i,r;if(Ut(oB,t),e.nc(t),n=a(zi(FK,t),19),n)for(r=n.tc();r.hc();)i=a(r.ic(),35),nc(oB,i,0)!=-1||qIt(i,e)}function zfe(t,e,n){var i,r;aX(t.e,e,n,(Ht(),on)),aX(t.i,e,n,Qe),t.a&&(r=a(z(e,(Ft(),li)),11),i=a(z(n,li),11),tV(t.g,r,i))}function XIt(t){var e;zt(cn(t,(dr(),cy)))===zt((Kg(),kF))&&(io(t)?(e=a(cn(io(t),cy),316),ga(t,cy,e)):ga(t,cy,wA))}function fut(t,e,n){this.c=t,this.f=new Dt,this.e=new go,this.j=new Xst,this.n=new Xst,this.b=e,this.g=new qh(e.c,e.d,e.b,e.a),this.a=n}function dut(t,e,n,i,r,c){krt(this),this.e=t,this.f=e,this.d=n,this.c=i,this.g=r,this.b=c,this.j=lt(Yt(r.tc().ic())),this.i=lt(Yt(hPt(r)))}function jfe(t){var e;for(e=a(In(Rn(Rs(t))),14).c.g;e.j==(Ke(),Hr);)Ct(e,(Ft(),k6),(me(),me(),!0)),e=a(In(Rn(Rs(e))),14).c.g}function Hfe(t,e,n){var i,r,c,l;return c=e.i,l=n.i,c!=l?c.g-l.g:(i=t.f[e.o],r=t.f[n.o],i==0&&r==0?0:i==0?-1:r==0?1:ro(i,r))}function ci(t){var e;try{return e=t.i.cd(t.e),t.Bi(),t.g=t.e++,e}catch(n){throw n=vr(n),ct(n,79)?(t.Bi(),K(new J)):K(n)}}function Dq(t){var e;try{return e=t.c.yh(t.e),t.Bi(),t.g=t.e++,e}catch(n){throw n=vr(n),ct(n,79)?(t.Bi(),K(new J)):K(n)}}function H1(t,e){var n;n=t.fd(e);try{return n.ic()}catch(i){throw i=vr(i),ct(i,101)?K(new Uc("Can't get element "+e)):K(i)}}function ZIt(t,e){al(),si(t);try{return t.pc(e)}catch(n){if(n=vr(n),ct(n,177))return!1;if(ct(n,169))return!1;throw K(n)}}function Gfe(t,e){ts(),si(t);try{return t.Qb(e)}catch(n){if(n=vr(n),ct(n,177))return!1;if(ct(n,169))return!1;throw K(n)}}function YIt(t,e,n){return new qh(y.Math.min(t.a,e.a)-n/2,y.Math.min(t.b,e.b)-n/2,y.Math.abs(t.a-e.a)+n,y.Math.abs(t.b-e.b)+n)}function KIt(t,e){var n,i,r,c;for(n=0,r=new j(e.a);r.a0),e.a.cd(e.c=--e.b))}function t0(){t0=P,On=new j5("PARENTS",0),vc=new j5("NODES",1),Md=new j5("EDGES",2),ib=new j5("PORTS",3),og=new j5("LABELS",4)}function G1(){G1=P,sb=new G5("DISTRIBUTED",0),$Q=new G5("JUSTIFIED",1),dvt=new G5("BEGIN",2),vA=new G5(w4,3),pvt=new G5("END",4)}function UC(t,e,n){pxt.call(this),this.a=dt(BVt,Pft,171,(Ch(),Y(Z(Dw,1),jt,203,0,[lc,ta,hc])).length,0,1),this.b=t,this.d=e,this.c=n}function cP(t,e){var n,i;if(++t.j,e!=null&&(n=(i=t.a.Cb,ct(i,92)?a(i,92).cg():null),$0e(e,n))){BC(t.a,4,n);return}BC(t.a,4,a(e,116))}function Wfe(t,e){var n,i;return e!=null&&iw(e).length!=0&&(n=aht(t,e),n)?n:Nn.length!=0&&(i=aht(t,Nn),i)?i:null}function $fe(t){var e,n;if(t.j==(Ke(),Hr)){for(n=Rn(Jg(t));Jn(n);)if(e=a(In(n),14),!ec(e)&&t.c==eX(e,t).c)return!0}return!1}function c7(){c7=P,PK=new Yit("NUM_OF_EXTERNAL_SIDES_THAN_NUM_OF_EXTENSIONS_LAST",0),H1t=new Yit("CORNER_CASES_THAN_SINGLE_SIDE_LAST",1)}function Nq(){return Z7(),Y(Z(lqt,1),jt,147,0,[aqt,cqt,uqt,QVt,JVt,tqt,iqt,nqt,eqt,oqt,sqt,rqt,YVt,ZVt,KVt,qVt,VVt,XVt,WVt,GVt,$Vt,YQ])}function Oq(t,e){var n;switch(n=!t.v.pc((Ku(),E0))||t.q==(Ls(),Gc),t.t.g){case 1:n?lxe(t,e):z7t(t,e);break;case 0:n?C2e(t,e):O7t(t,e)}}function Vfe(t,e,n){var i;switch(i=n.q.getFullYear()-Fm+Fm,i<0&&(i=-i),e){case 1:t.a+=i;break;case 2:dd(t,i%100,2);break;default:dd(t,i,e)}}function qfe(t){var e;switch(e=t.Mh(null),e){case 10:return 0;case 15:return 1;case 14:return 2;case 11:return 3;case 21:return 4}return-1}function Bq(t){switch(t.g){case 1:return Js(),cg;case 4:return Js(),ah;case 2:return Js(),uh;case 3:return Js(),fp}return Js(),Ff}function Xfe(t,e,n,i){var r,c,l;return r=new Qd(t.e,1,13,(l=e.c,l||(ye(),Hf)),(c=n.c,c||(ye(),Hf)),Hp(t,e),!1),i?i.Sh(r):i=r,i}function qn(t,e){var n,i;if(Qv(e,t.b),e>=t.b>>1)for(i=t.c,n=t.b;n>e;--n)i=i.b;else for(i=t.a.a,n=0;n=0?t.Fg(r):bX(t,i)):n<0?bX(t,i):a(i,61).aj().fj(t,t.Qg(),n)}function QIt(t){var e,n,i;for(i=(!t.o&&(t.o=new lu((Ic(),pp),ug,t,0)),t.o),n=i.c.tc();n.e!=n.i._b();)e=a(n.Ci(),38),e.lc();return SL(i)}function tde(t){var e,n,i,r;for(i=dt(h3e,te,144,t.c.length,0,1),r=0,n=new j(t);n.a0&&(Ut(t.b,new ZTt(e.a,n)),i=e.a.length,0i&&(e.a+=NEt(dt(el,Pf,22,-i,15,1))))}function u7(t){switch(Dit(),this.c=new Dt,this.d=t,t.g){case 0:case 2:this.a=Aot(kgt),this.b=is;break;case 3:case 1:this.a=kgt,this.b=Ps}}function put(t,e){this.e=t,e.5&&c<50;)r=pDt(i),n=W2(i,r,!0),e=y.Math.abs(n.b),++c;return W2(t,r,!1)}function nRt(t){var e,n,i,r,c;for(i=XX(t),e=is,c=0,r=0;e>.5&&c<50;)r=dDt(i),n=W2(i,r,!0),e=y.Math.abs(n.a),++c;return W2(t,r,!1)}function rde(t,e){var n,i,r,c;for(c=0,i=qn(t,0);i.b!=i.d.c;)n=a(Yn(i),35),c+=y.Math.pow(n.g*n.f-e,2);return r=y.Math.sqrt(c/(t.b-1)),r}function iRt(t,e){var n,i,r;for(n=t.o,r=a(a(rr(t.r,e),19),60).tc();r.hc();)i=a(r.ic(),111),i.e.a=Qde(i,n.a),i.e.b=n.b*lt(Yt(i.b.xe(OF)))}function z2(t,e,n,i){var r;return n>=0?t.Bg(e,n,i):(t.yg()&&(i=(r=t.og(),r>=0?t.jg(i):t.yg().Cg(t,-1-r,null,i))),t.lg(e,n,i))}function j2(t,e,n){var i,r;if(r=t._b(),e>=r)throw K(new Wv(e,r));if(t.xh()&&(i=t.dd(n),i>=0&&i!=e))throw K(new yn(i6));return t.Ah(e,n)}function sde(t,e,n){var i,r,c,l;return i=t.dd(e),i!=-1&&(t.ti()?(c=t.ui(),l=ID(t,i),r=t.mi(4,l,null,i,c),n?n.Sh(r):n=r):ID(t,i)),n}function $s(t,e,n){var i,r,c,l;return i=t.dd(e),i!=-1&&(t.ti()?(c=t.ui(),l=H2(t,i),r=t.mi(4,l,null,i,c),n?n.Sh(r):n=r):H2(t,i)),n}function rRt(t){var e,n,i;t.b==t.c&&(i=t.a.length,n=bat(8>i?8:i)<<1,t.b!=0?(e=cu(t.a,n),oPt(t,e,i),t.a=e,t.b=0):kG(t.a,n),t.c=i)}function ode(t){var e,n;e=new Dt,n=t;do n=a(In(Rn(br(n))),14).d.g,n.j==(Ke(),Hr)&&(e.c[e.c.length]=n);while(n.j==(Ke(),Hr));return e}function sRt(t){var e,n;for(this.b=new Dt,this.c=t,this.a=!1,n=new j(t.a);n.a0||t==(Zr(),vK)||e==(co(),_K))throw K(new yn("Invalid range: "+JAt(t,e)))}function cde(t){switch(t.g){case 1:return Am(),hI;case 3:return Am(),lI;case 2:return Am(),JQ;case 4:return Am(),KQ;default:return null}}function zq(t){switch(t.g){case 0:return null;case 1:return new wPt;case 2:return new cit;default:throw K(new yn(BY+(t.f!=null?t.f:""+t.g)))}}function ade(t,e,n){if(t.e)switch(t.b){case 1:Pse(t.c,e,n);break;case 0:Ise(t.c,e,n)}else ckt(t.c,e,n);t.a[e.o][n.o]=t.c.i,t.a[n.o][e.o]=t.c.e}function nw(){nw=P,JB=new z9(jm,0),KJ=new z9("PORT_POSITION",1),ry=new z9("NODE_SIZE_WHERE_SPACE_PERMITS",2),iy=new z9("NODE_SIZE",3)}function aRt(t){var e,n,i;for(n=new j(t.a);n.a=0?t.ug(l,n,!0):q2(t,c,n)):a(c,61).aj().cj(t,t.Qg(),r,n,i)}function ude(t,e){var n,i,r,c;return c=t.o,n=t.p,c=0)return r;if(t.Rj()){for(i=0;ir&&Vr(e,r,null),e}function uRt(t,e){var n,i,r;for(r=t.a.length,e.lengthr&&Vr(e,r,null),e}function p_(t,e,n){try{return zb(AV(t,e,n),1)}catch(i){throw i=vr(i),ct(i,305)?K(new Uc(qZ+t.o+"*"+t.p+XZ+e+Rc+n+ZZ)):K(i)}}function lRt(t,e,n){try{return zb(AV(t,e,n),0)}catch(i){throw i=vr(i),ct(i,305)?K(new Uc(qZ+t.o+"*"+t.p+XZ+e+Rc+n+ZZ)):K(i)}}function hRt(t,e,n){try{return zb(AV(t,e,n),2)}catch(i){throw i=vr(i),ct(i,305)?K(new Uc(qZ+t.o+"*"+t.p+XZ+e+Rc+n+ZZ)):K(i)}}function fRt(t,e,n){var i;try{return p_(t,e+t.j,n+t.k)}catch(r){throw r=vr(r),ct(r,79)?(i=r,K(new Uc(i.g+sO+e+Rc+n+")."))):K(r)}}function lde(t,e,n){var i;try{return lRt(t,e+t.j,n+t.k)}catch(r){throw r=vr(r),ct(r,79)?(i=r,K(new Uc(i.g+sO+e+Rc+n+")."))):K(r)}}function hde(t,e,n){var i;try{return hRt(t,e+t.j,n+t.k)}catch(r){throw r=vr(r),ct(r,79)?(i=r,K(new Uc(i.g+sO+e+Rc+n+")."))):K(r)}}function dRt(t,e){if(t.g==-1)throw K(new na);t.Bi();try{t.d.hd(t.g,e),t.f=t.d.j}catch(n){throw n=vr(n),ct(n,79)?K(new C):K(n)}}function pRt(t,e,n){di(n,"Compound graph preprocessor",1),t.a=new Nv,B7t(t,e,null),G_e(t,e),pbe(t),Ct(e,(Ft(),K0t),t.a),t.a=null,uu(t.b),Vn(n)}function jq(t,e){var n,i;if(Rrt(e>0),(e&-e)==e)return Tr(e*pu(t,31)*4656612873077393e-25);do n=pu(t,31),i=n%e;while(n-i+(e-1)<0);return Tr(i)}function fde(t,e,n){switch(n.g){case 1:t.a=e.a/2,t.b=0;break;case 2:t.a=e.a,t.b=e.b/2;break;case 3:t.a=e.a/2,t.b=e.b;break;case 4:t.a=0,t.b=e.b/2}}function dde(t){var e,n;for(n=a(z(t,(Ft(),zB)),15).tc();n.hc();)if(e=a(n.ic(),68),Wb(e,(qt(),WB)))return a(z(e,WB),276);return null}function pde(t,e){var n,i,r;for(n=hm(new Ng,t),r=new j(e);r.a1&&(c=pde(t,e)),c}function wde(t,e){var n,i,r,c;for(c=new j(e.a);c.a102?-1:t<=57?t-48:t<65?-1:t<=70?t-65+10:t<97?-1:t-97+10}function vRt(t,e){var n,i,r;for(t.b[e.g]=1,i=qn(e.d,0);i.b!=i.d.c;)n=a(Yn(i),170),r=n.c,t.b[r.g]==1?Xi(t.a,n):t.b[r.g]==2?t.b[r.g]=1:vRt(t,r)}function _Rt(t,e){var n;return n=Y(Z(Os,1),Xo,22,15,[pq(t.a[0],e),pq(t.a[1],e),pq(t.a[2],e)]),t.d&&(n[0]=y.Math.max(n[0],n[2]),n[2]=n[0]),n}function yRt(t,e){var n;return n=Y(Z(Os,1),Xo,22,15,[GN(t.a[0],e),GN(t.a[1],e),GN(t.a[2],e)]),t.d&&(n[0]=y.Math.max(n[0],n[2]),n[2]=n[0]),n}function vde(t){var e,n,i;for(C5(t.b.a),t.a=dt(nB,te,57,t.c.c.a.b.c.length,0,1),e=0,i=new j(t.c.c.a.b);i.ai&&t.charCodeAt(e-1)<=32;)--e;return i>0||ec&&Vr(e,c,null),e}function Yq(t){Ao();var e;if(e=Hle(t),!Jn(t))throw K(new Uc("position (0) must be less than the number of elements that remained ("+e+")"));return In(t)}function Ude(t){var e;return e=(FLt(),Tzt),e[t>>>28]|e[t>>24&15]<<4|e[t>>20&15]<<8|e[t>>16&15]<<12|e[t>>12&15]<<16|e[t>>8&15]<<20|e[t>>4&15]<<24|e[t&15]<<28}function SRt(t){var e,n,i;for(i=t.f,t.k=dt(Os,Xo,22,i,15,1),t.d=dt(Os,Xo,22,i,15,1),e=0;e0&&(r.b+=e),r}function p7(t,e){var n,i,r;for(r=new go,i=t.tc();i.hc();)n=a(i.ic(),31),TP(n,0,r.b),r.b+=n.e.b+e,r.a=y.Math.max(r.a,n.e.a);return r.a>0&&(r.a+=e),r}function Wde(t,e){var n,i;if(e<0||e>=t._b())return null;for(n=e;n=t.i)throw K(new SW(e,t.i));return++t.j,n=t.g[e],i=t.i-e-1,i>0&&Aa(t.g,e+1,t.g,e,i),Vr(t.g,--t.i,null),t.vh(e,n),t.th(),n}function Jq(t,e){var n,i;return t.Db>>16==6?t.Cb.Cg(t,5,of,e):(i=jo(a(Ve((n=a(an(t,16),24),n||t.Rg()),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function Sut(t,e){var n,i;n=t.fd(e);try{return i=n.ic(),n.jc(),i}catch(r){throw r=vr(r),ct(r,101)?K(new Uc("Can't remove element "+e)):K(r)}}function Zde(t,e){var n,i,r;return r=new Ei(new zu(Y(Z(_3e,1),te,1700,0,[t,e])),16),i=new ETt(r),n=new gi(null,i),mot(n,new tH(t)),mot(n,new eH(e)),n}function Tut(t,e,n,i,r,c){var l,f,p;for(zt(t)===zt(n)&&(t=t.slice(e,e+r),e=0),f=e,p=e+r;f>22),r+=i>>22,r<0)?!1:(t.l=n&eu,t.m=i&eu,t.h=r&sp,!0)}function npe(t,e,n,i,r,c,l){var f,p;return!(e.je()&&(p=t.a.Ld(n,i),p<0||!r&&p==0)||e.ke()&&(f=t.a.Ld(n,c),f>0||!l&&f==0))}function G2(){G2=P,p6=new B9("NORTH",0),d6=new B9("EAST",1),g6=new B9("SOUTH",2),m6=new B9("WEST",3),p6.a=!1,d6.a=!0,g6.a=!1,m6.a=!0}function HC(){HC=P,b6=new F9("NORTH",0),iB=new F9("EAST",1),rB=new F9("SOUTH",2),w6=new F9("WEST",3),b6.a=!1,iB.a=!0,rB.a=!1,w6.a=!0}function Tu(){Tu=P,uI=new q9("UNKNOWN",0),kd=new q9("ABOVE",1),ag=new q9("BELOW",2),aI=new q9("INLINE",3),new es("org.eclipse.elk.labelSide",uI)}function W1(t,e,n){if(n&&(e<0||e>n.a.c.length))throw K(new yn("index must be >= 0 and <= layer node count"));t.c&&Lc(t.c.a,t),t.c=n,n&&pm(n.a,e,t)}function IRt(t){switch(t.g){case 0:return _J;case 1:return yJ;case 2:return xJ;case 3:return MJ;case 4:return AB;case 5:return EJ;default:return null}}function VM(){VM=P,aF=new j9("P1_TREEIFICATION",0),oA=new j9("P2_NODE_ORDERING",1),$6=new j9("P3_NODE_PLACEMENT",2),cA=new j9("P4_EDGE_ROUTING",3)}function Lo(t,e,n){var i,r;return i=(r=new DG,zM(r,e),kh(r,n),ni((!t.c&&(t.c=new Wt(Fw,t,12,10)),t.c),r),r),c_(i,0),RM(i,1),f_(i,!0),h_(i,!0),i}function RRt(t,e){var n,i;return t.Db>>16==17?t.Cb.Cg(t,21,Dl,e):(i=jo(a(Ve((n=a(an(t,16),24),n||t.Rg()),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function ipe(t,e){var n,i,r;if(i=new O9,r=new vat(i.q.getFullYear()-Fm,i.q.getMonth(),i.q.getDate()),n=__e(t,e,r),n==0||n>16==6?t.Cb.Cg(t,6,Xs,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(Ic(),BF)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function Put(t,e){var n,i;return t.Db>>16==7?t.Cb.Cg(t,1,fI,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(Ic(),Tvt)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function Iut(t,e){var n,i;return t.Db>>16==9?t.Cb.Cg(t,9,zr,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(Ic(),Avt)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function Rut(t,e){var n,i;return t.Db>>16==3?t.Cb.Cg(t,12,zr,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(Ic(),Svt)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function Dut(t,e){var n,i;return t.Db>>16==3?t.Cb.Cg(t,0,pI,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(ye(),S0)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function NRt(t,e){var n,i;return t.Db>>16==7?t.Cb.Cg(t,6,of,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(ye(),A0)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function ORt(t,e){var n,i;return t.Db>>16==5?t.Cb.Cg(t,9,VF,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(ye(),T0)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function qM(t,e){var n,i;if(e){if(e==t)return!0;for(n=0,i=a(e,42).yg();i&&i!=e;i=i.yg()){if(++n>BZ)return qM(t,i);if(i==t)return!0}}return!1}function mpe(t){var e,n;e=a(z(t,(Ph(),mjt)),21),e?(n=e.a,n==0?Ct(t,(R1(),lB),new Sq):Ct(t,(R1(),lB),new aN(n))):Ct(t,(R1(),lB),new aN(1))}function bpe(t,e){var n;switch(n=t.g,e.g){case 1:return-(t.k.b+t.n.b);case 2:return t.k.a-n.n.a;case 3:return t.k.b-n.n.b;case 4:return-(t.k.a+t.n.a)}return 0}function Nut(t,e,n,i){var r,c,l;if(t.a[e.o]==-1)for(t.a[e.o]=n,t.b[e.o]=i,c=Rn(br(e));Jn(c);)r=a(In(c),14),!ec(r)&&(l=r.d.g,Nut(t,l,n+1,i))}function wpe(t){switch(hD(),t.q.g){case 5:w9t(t,(Ht(),Tn)),w9t(t,fi);break;case 4:cDt(t,(Ht(),Tn)),cDt(t,fi);break;default:W7t(t,(Ht(),Tn)),W7t(t,fi)}}function vpe(t){switch(hD(),t.q.g){case 5:k9t(t,(Ht(),Qe)),k9t(t,on);break;case 4:iRt(t,(Ht(),Qe)),iRt(t,on);break;default:$7t(t,(Ht(),Qe)),$7t(t,on)}}function wl(t){var e;return!(t.Bb&1)&&t.r&&t.r.Eg()&&(e=a(t.r,42),t.r=a(B1(t,e),133),t.r!=e&&t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,9,8,e,t.r))),t.r}function GC(t,e,n){var i,r;i=e*n,ct(t.g,153)?(r=k2(t),r.f.d?r.f.a||(t.d.a+=i+yd):(t.d.d-=i+yd,t.d.a+=i+yd)):ct(t.g,8)&&(t.d.d-=i,t.d.a+=2*i)}function BRt(){N7(),this.c=new Dt,this.i=new Dt,this.e=new qa,this.f=new qa,this.g=new qa,this.j=new Dt,this.a=new Dt,this.b=(ts(),new vi),this.k=new vi}function _pe(t,e){var n,i,r,c;for(di(e,"Dull edge routing",1),c=qn(t.b,0);c.b!=c.d.c;)for(r=a(Yn(c),76),i=qn(r.d,0);i.b!=i.d.c;)n=a(Yn(i),170),ld(n.a)}function tX(t,e,n){var i;return i=Y(Z(Os,1),Xo,22,15,[ilt(t,(Ch(),lc),e,n),ilt(t,ta,e,n),ilt(t,hc,e,n)]),t.f&&(i[0]=y.Math.max(i[0],i[2]),i[2]=i[0]),i}function ype(){G7();var t,e;try{if(e=a(qut((v1(),Nl),wE),1698),e)return e}catch(n){if(n=vr(n),ct(n,104))t=n,Nst((Kn(),t));else throw K(n)}return new Pg}function xpe(){G7();var t,e;try{if(e=a(qut((v1(),Nl),xl),1635),e)return e}catch(n){if(n=vr(n),ct(n,104))t=n,Nst((Kn(),t));else throw K(n)}return new FR}function Mpe(){A5t();var t,e;try{if(e=a(qut((v1(),Nl),m0),1710),e)return e}catch(n){if(n=vr(n),ct(n,104))t=n,Nst((Kn(),t));else throw K(n)}return new XS}function Out(t,e){var n,i;return t.Db>>16==11?t.Cb.Cg(t,10,zr,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(Ic(),Cvt)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function FRt(t,e){var n,i;return t.Db>>16==10?t.Cb.Cg(t,11,Dl,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(ye(),C0)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function URt(t,e){var n,i;return t.Db>>16==10?t.Cb.Cg(t,12,ph,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(ye(),zw)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function Epe(t,e){var n,i,r,c,l;if(e)for(r=e.a.length,n=new Ug(r),l=(n.b-n.a)*n.c<0?(_1(),hg):new x1(n);l.hc();)c=a(l.ic(),21),i=CM(e,c.a),i&&Z9t(t,i)}function Spe(){Fit();var t,e;for(Kxe((T1(),Ae)),Wxe(Ae),Qq(Ae),Hvt=(ye(),Hf),e=new j(Kvt);e.a>19,b=e.h>>19,p!=b?b-p:(r=t.h,f=e.h,r!=f?r-f:(i=t.m,l=e.m,i!=l?i-l:(n=t.l,c=e.l,n-c)))}function Tpe(t,e){var n,i,r;if(i=t.b.d.d,t.a||(i+=t.b.d.a),r=e.b.d.d,e.a||(r+=e.b.d.a),n=ro(i,r),n==0){if(!t.a&&e.a)return-1;if(!e.a&&t.a)return 1}return n}function Cpe(t,e){var n,i,r;if(i=t.b.g.d,t.a||(i+=t.b.g.a),r=e.b.g.d,e.a||(r+=e.b.g.a),n=ro(i,r),n==0){if(!t.a&&e.a)return-1;if(!e.a&&t.a)return 1}return n}function Ape(t,e,n,i){var r,c,l,f;for(r=0;rl&&(f=l/i),r>c&&(p=c/r),hl(t,y.Math.min(f,p)),t}function Lpe(t,e,n){var i,r;return r=t.e,t.e=e,t.Db&4&&!(t.Db&1)&&(i=new fs(t,1,4,r,e),n?n.Sh(i):n=i),r!=e&&(e?n=rE(t,I7(t,e),n):n=rE(t,t.a,n)),n}function GRt(){O9.call(this),this.e=-1,this.a=!1,this.p=Vs,this.k=-1,this.c=-1,this.b=-1,this.g=!1,this.f=-1,this.j=-1,this.n=-1,this.i=-1,this.d=-1,this.o=Vs}function Ppe(t,e){var n,i;for(i=new j(e);i.a=0?(n=lP(t,eO),i=eP(t,eO)):(e=Vv(t,1),n=lP(e,5e8),i=eP(e,5e8),i=so(Yd(i,1),ns(t,1))),Xh(Yd(i,32),ns(n,uo))}function g7(){g7=P,J1t=(F7(),RK),K1t=new bn(aft,J1t),Y1t=(MN(),IK),Z1t=new bn(uft,Y1t),X1t=(c7(),PK),q1t=new bn(lft,X1t),V1t=new bn(hft,(me(),me(),!0))}function eX(t,e){if(e==t.c.g)return t.d.g;if(e==t.d.g)return t.c.g;throw K(new yn("'node' must either be the source node or target node of the edge."))}function Npe(t,e,n){var i,r;for(di(n,"Interactive node placement",1),t.a=a(z(e,(Ft(),yw)),266),r=new j(e.b);r.a0&&(l=(c&qi)%t.d.length,r=xlt(t,l,c,e),r)?(f=r.mc(n),f):(i=t.Ii(c,e,n),t.c.nc(i),null)}function jut(t,e){var n,i,r,c;switch(jp(t,e).lk()){case 3:case 2:{for(n=A_(e),r=0,c=n.i;r=0;i--)if(le(t[i].d,e)||le(t[i].d,n)){t.length>=i+1&&t.splice(0,i+1);break}return t}function Hut(t,e,n){this.b=new gD,this.i=new Dt,this.d=new $a(this),this.g=t,this.a=e.c.length,this.c=e,this.e=a(Ee(this.c,this.c.c.length-1),8),this.f=n,M_e(this)}function XRt(){this.a=new yz,this.g=new dD,this.j=new dD,this.b=(ts(),new vi),this.d=new dD,this.i=new dD,this.k=new vi,this.c=new vi,this.e=new vi,this.f=new vi}function Wpe(t){var e,n,i,r,c;for(i=new qg(new xp(t.b).a);i.b;)n=Sm(i),e=a(n.kc(),8),c=a(a(n.lc(),48).a,8),r=a(a(n.lc(),48).b,9),sr(Gh(e.k),sr(Xc(c.k),r))}function $C(){$C=P,fJ=new F5("MEDIAN_LAYER",0),dJ=new F5("WIDEST_LAYER",1),lJ=new F5("CENTER_LAYER",2),y0t=new F5("TAIL_LAYER",3),hJ=new F5("HEAD_LAYER",4)}function $pe(t){var e,n,i;for(n=new j(t.p);n.an);return r}function Wut(t,e,n){switch(e){case 1:!t.n&&(t.n=new Wt(ic,t,1,7)),Dr(t.n),!t.n&&(t.n=new Wt(ic,t,1,7)),Lr(t.n,a(n,13));return;case 2:zL(t,hi(n));return}Eat(t,e,n)}function $ut(t,e,n){switch(e){case 3:s_(t,lt(Yt(n)));return;case 4:o_(t,lt(Yt(n)));return;case 5:th(t,lt(Yt(n)));return;case 6:eh(t,lt(Yt(n)));return}Wut(t,e,n)}function b7(t,e,n){var i,r,c;c=(i=new DG,i),r=$1(c,e,null),r&&r.Th(),kh(c,n),ni((!t.c&&(t.c=new Wt(Fw,t,12,10)),t.c),c),c_(c,0),RM(c,1),f_(c,!0),h_(c,!0)}function Vut(t){var e;return t.Db&64?n7(t):(e=new ul(n7(t)),e.a+=" (abstract: ",Cp(e,(t.Bb&256)!=0),e.a+=", interface: ",Cp(e,(t.Bb&512)!=0),e.a+=")",e.a)}function qut(t,e){var n,i,r;return n=LT(t.e,e),ct(n,207)?(r=a(n,207),r.gh()==null,r.dh()):ct(n,456)?(i=a(n,1631),r=i.b,r):null}function JRt(t,e){var n;if(this.f=t,this.b=this.f.c,n=t.d,oV(e,n),e>=(n/2|0))for(this.e=t.e,this.d=n;e++0;)$At(this);this.a=null}function QRt(t,e,n,i,r,c,l){var f,p,b,v,M;if(v=r[c],b=c==l-1,f=b?i:0,M=ERt(f,v),i!=10&&Y(Z(t,l-c),e[c],n[c],f,M),!b)for(++c,p=0;p0&&bo(t,t.length-1)==33)try{return e=_9t($h(t,0,t.length-1)),e.e==null}catch(n){if(n=vr(n),!ct(n,30))throw K(n)}return!1}function n1e(t,e,n){var i,r,c,l;for(n=z2(e,t.e,-1-t.c,n),l=Sot(t.a),c=(i=new qg(new xp(l.a).a),new hT(i));c.a.b;)r=a(Sm(c.a).kc(),84),n=rE(r,I7(r,t.a),n);return n}function i1e(t,e,n){var i,r,c,l;for(n=JD(e,t.e,-1-t.c,n),l=Sot(t.a),c=(i=new qg(new xp(l.a).a),new hT(i));c.a.b;)r=a(Sm(c.a).kc(),84),n=rE(r,I7(r,t.a),n);return n}function t8t(t){var e,n,i;if(t==null)return null;if(n=a(t,15),n.Wb())return"";for(i=new Sp,e=n.tc();e.hc();)mo(i,(fr(),hi(e.ic()))),i.a+=" ";return R9(i,i.a.length-1)}function e8t(t){var e,n,i;if(t==null)return null;if(n=a(t,15),n.Wb())return"";for(i=new Sp,e=n.tc();e.hc();)mo(i,(fr(),hi(e.ic()))),i.a+=" ";return R9(i,i.a.length-1)}function r1e(t,e){KM();var n,i;for(i=(V1(),KO),n=t;e>1;e>>=1)e&1&&(i=t_(i,n)),n.d==1?n=t_(n,n):n=new WIt(bNt(n.a,n.d,dt(Gn,pi,22,n.d<<1,15,1)));return i=t_(i,n),i}function XC(t,e){return t.b.a=y.Math.min(t.b.a,e.c),t.b.b=y.Math.min(t.b.b,e.d),t.a.a=y.Math.max(t.a.a,e.c),t.a.b=y.Math.max(t.a.b,e.d),t.c[t.c.length]=e,!0}function s1e(t){var e,n,i,r;for(r=-1,i=0,n=new j(t);n.a=0&&le(t.substr(e,3),"GMT")||e>=0&&le(t.substr(e,3),"UTC"))&&(n[0]=e+3),pht(t,n,i)}function Kut(){Kut=P;var t,e,n,i;for(D1t=dt(Os,Xo,22,25,15,1),N1t=dt(Os,Xo,22,33,15,1),i=152587890625e-16,e=32;e>=0;e--)N1t[e]=i,i*=.5;for(n=1,t=24;t>=0;t--)D1t[t]=n,n*=.5}function c8t(t,e,n){var i,r;switch(i=(Hn(e.b!=0),a(Ql(e,e.a.a),9)),n.g){case 0:i.b=0;break;case 2:i.b=t.f;break;case 3:i.a=0;break;default:i.a=t.g}return r=qn(e,0),mM(r,i),e}function _7(){_7=P,YJ=new NT(kBt,0),fbt=new NT("LONGEST_PATH",1),ZJ=new NT("COFFMAN_GRAHAM",2),hbt=new NT(cY,3),dbt=new NT("STRETCH_WIDTH",4),KB=new NT("MIN_WIDTH",5)}function E1e(t,e){var n,i,r,c;for(n=0,i=0,c=new j(e.b);c.an;c--)t[c]|=e[c-n-1]>>>l,t[c-1]=e[c-n-1]<=t.f)break;c.c[c.c.length]=n}return c}function k1e(t,e,n){var i,r,c;return c=0,i=n[e],e>4&15,c=t[i]&15,l[r++]=kvt[n],l[r++]=kvt[c];return ml(l,0,l.length)}function l8t(t,e,n){var i,r,c,l,f;for(i=n._b(),$It(t,t.i+i),f=t.i-e,f>0&&Aa(t.g,e,t.g,e+i,f),l=n.tc(),t.i+=i,r=0;r=ao?(e=jP+(t-ao>>10&1023)&qr,n=56320+(t-ao&1023)&qr,String.fromCharCode(e)+(""+String.fromCharCode(n))):String.fromCharCode(t&qr)}function O1e(t){var e,n,i;for(i=t.e.c.length,t.a=Vb(Gn,[wt,pi],[37,22],15,[i,i],2),n=new j(t.c);n.a0&&LRt(this,this.c-1,(Ht(),Qe)),this.c1&&(e.c[e.c.length]=c))}function F1e(t){var e,n,i;for(n=new $n((!t.a&&(t.a=new Wt(zr,t,10,11)),t.a));n.e!=n.i._b();)if(e=a(ci(n),35),i=xP(e),!Jn((Ao(),new $d(id(Zd(i.a,new X))))))return e;return null}function h8t(t,e,n){var i,r;for(r=new $n((!t.a&&(t.a=new Wt(zr,t,10,11)),t.a));r.e!=r.i._b();)i=a(ci(r),35),Wd(i,i.i+e,i.j+n);vo((!t.b&&(t.b=new Wt(Xs,t,12,3)),t.b),new UMt(e,n))}function f8t(t,e,n,i,r){var c,l,f;for(c=jDt(t,e,n,i,r),f=!1;!c;)k7(t,r,!0),f=!0,c=jDt(t,e,n,i,r);f&&k7(t,r,!1),l=UN(r),l.c.length!=0&&(t.d&&t.d.If(l),f8t(t,r,n,i,l))}function nlt(t,e){var n;n=Zc((v1(),Nl),t),ct(n,456)?tc(Nl,t,new oEt(this,e)):tc(Nl,t,this),alt(this,e),e==(Y3(),jvt)?(this.wb=a(this,1633),a(e,1635)):this.wb=(T1(),Ae)}function U1e(t){var e,n,i;if(t==null)return null;for(e=null,n=0;n0;){if(n=i,i=(i-1)/2|0,t.a.Ld(Ee(t.b,i),e)<=0)return Kl(t.b,n,e),!0;Kl(t.b,n,Ee(t.b,i))}return Kl(t.b,i,e),!0}function W1e(t){for(var e,n,i,r;t.o.a.c.length!=0;)n=a(Lat(t.o),48),i=a(n.a,113),e=a(n.b,189),r=JN(e,i),e.e==i?(aD(r.g,e),i.e=r.e+e.a):(aD(r.b,e),i.e=r.e-e.a),Ut(t.e.a,i)}function ilt(t,e,n,i){var r,c;if(r=0,n)r=GN(t.a[n.g][e.g],i);else for(c=0;cBZ)return m8t(n);if(i=n,n==t)throw K(new yc("There is a cycle in the containment hierarchy of "+t))}return i}function b8t(){b8t=P,Izt=Y(Z(At,1),wt,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),Rzt=Y(Z(At,1),wt,2,6,["Jan","Feb","Mar","Apr",tx,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"])}function V1e(t,e,n,i){var r,c;for(c=e,r=c.d==null||t.a.Ld(n.d,c.d)>0?1:0;c.a[r]!=n;)c=c.a[r],r=t.a.Ld(n.d,c.d)>0?1:0;c.a[r]=i,i.b=n.b,i.a[0]=n.a[0],i.a[1]=n.a[1],n.a[0]=null,n.a[1]=null}function Mo(){Mo=P,Of=new O5("P1_CYCLE_BREAKING",0),gx=new O5("P2_LAYERING",1),aa=new O5("P3_NODE_ORDERING",2),ua=new O5("P4_NODE_PLACEMENT",3),Yo=new O5("P5_EDGE_ROUTING",4)}function w8t(t){var e,n;return n=y.Math.sqrt(t.f*(t.i==null&&(t.i=aat(t,new Wo)),lt(t.i))/(t.b*(t.g==null&&(t.g=dPt(t,new Wa)),lt(t.g)))),e=or(Ka(y.Math.round(n))),e=cm(e,t.f),e}function v8t(t){var e,n;n=t.k,e=sr(new We(n.a,n.b),t.n),this.d=y.Math.min(n.b,e.b),this.a=y.Math.max(n.b,e.b),this.b=y.Math.min(n.a,e.a),this.c=y.Math.max(n.a,e.a)}function q1e(t){var e,n;if(t.a>=t.c.c.length)return wM(),D4;if(n=H(t),t.a>=t.c.c.length)return new a2(n);e=new qa,Ir(e,si(n));do Ir(e,si(H(t)));while(t.a0&&ENt((mi(0,n.c.length),a(n.c[0],26)),t),n.c.length>1&&ENt(a(Ee(n,n.c.length-1),26),t),Vn(e)}function Y1e(t,e,n,i){var r,c,l,f,p;return l=PRt(t.a,e,n),f=a(l.a,21).a,c=a(l.b,21).a,i&&(p=a(z(e,(Ft(),Ru)),8),r=a(z(n,Ru),8),p&&r&&(ckt(t.b,p,r),f+=t.b.i,c+=t.b.e)),f>c}function y8t(t,e){var n,i,r;if(slt(t,e))return!0;for(i=new j(e);i.ac&&vre(b,tLt(n[f],P1t))&&(r=f,c=p);return r>=0&&(i[0]=e+c),r}function x7(t,e){var n,i,r;if(r=0,i=e[0],i>=t.length)return-1;for(n=t.charCodeAt(i);n>=48&&n<=57&&(r=r*10+(n-48),++i,!(i>=t.length));)n=t.charCodeAt(i);return i>e[0]?e[0]=i:r=-1,r}function Q1e(t,e){var n,i,r;return i=(HC(),b6),r=y.Math.abs(t.b),n=y.Math.abs(e.f-t.b),nKW(t.d).c?(t.i+=t.g.c,Pq(t.d)):KW(t.d).c>KW(t.g).c?(t.e+=t.d.c,Pq(t.g)):(t.i+=dCt(t.g),t.e+=dCt(t.d),Pq(t.g),Pq(t.d))}function YM(){YM=P,G4=new DT(jm,0),U0t=new DT(hE,1),H0t=new DT(fE,2),j0t=new DT("LEFT_RIGHT_CONSTRAINT_LOCKING",3),z0t=new DT("LEFT_RIGHT_CONNECTION_LOCKING",4),F0t=new DT(wBt,5)}function nge(t){var e,n,i,r,c,l;for(i=xNt(XX(t)),e=is,c=0,r=0;e>.5&&c<50;)r=pDt(i),n=W2(i,r,!0),e=y.Math.abs(n.b),++c;return l=Yt(H1(fl(t.g),fl(t.g).b-1)),W2(t,(En(l),l-r),!1)}function ige(t){var e,n,i,r,c,l;for(i=xNt(XX(t)),e=is,c=0,r=0;e>.5&&c<50;)r=dDt(i),n=W2(i,r,!0),e=y.Math.abs(n.a),++c;return l=Yt(H1(fl(t.g),fl(t.g).b-1)),W2(t,(En(l),l-r),!1)}function E8t(t,e,n,i){t.a.d=y.Math.min(e,n),t.a.a=y.Math.max(e,i)-t.a.d,ef&&(p=f/i),r>c&&(b=c/r),l=y.Math.min(p,b),t.a+=l*(e.a-t.a),t.b+=l*(e.b-t.b)}function cge(t,e){pD();var n,i,r,c;if(e.b<2)return!1;for(c=qn(e,0),n=a(Yn(c),9),i=n;c.b!=c.d.c;){if(r=a(Yn(c),9),lDt(t,i,r))return!0;i=r}return!!lDt(t,i,n)}function clt(t,e,n,i){var r,c;return n==0?(!t.o&&(t.o=new lu((Ic(),pp),ug,t,0)),yD(t.o,e,i)):(c=a(Ve((r=a(an(t,16),24),r||t.Rg()),n),61),c.aj().ej(t,ra(t),n-ei(t.Rg()),e,i))}function age(t,e){var n;e!=t.a?(n=null,t.a&&(n=a(t.a,42).Cg(t,4,of,null)),e&&(n=a(e,42).Ag(t,4,of,n)),n=Dat(t,e,n),n&&n.Th()):t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,1,e,e))}function C8t(t){var e;return t.Db&64?uX(t):(e=new ll(gpt),!t.a||Ii(Ii((e.a+=' "',e),t.a),'"'),Ii(um(Ii(um(Ii(um(Ii(um((e.a+=" (",e),t.i),","),t.j)," | "),t.g),","),t.f),")"),e.a)}function uge(t){var e,n,i,r,c,l,f,p,b;return b=Jut(t),n=t.e,c=n!=null,c&&JT(b,CO,t.e),f=t.k,l=!!f,l&&JT(b,"type",Q5(t.k)),i=I9(t.j),r=!i,r&&(p=new Rg,P1(b,YY,p),e=new mG(p),vo(t.j,e)),b}function lge(t,e){var n;if(e!=null&&!t.c.jj().Li(e))throw n=ct(e,51)?a(e,51).mg().zb:Og(fu(e)),K(new gT(H_+t.c.be()+"'s type '"+t.c.jj().be()+"' does not permit a value of type '"+n+"'"))}function hge(t,e){var n,i,r,c;if(En(e),c=t.a._b(),c>22-e,r=t.h<>22-e):e<44?(n=0,i=t.l<>44-e):(n=0,i=0,r=t.l<>>r|n[l+i+1]<>>r,++l}return c}function k8t(t){yut();var e,n,i,r;return i=a(z(t,(qt(),GB)),318),r=lt(de(z(t,jJ)))||zt(z(t,RE))===zt((L2(),x6)),e=a(z(t,Cmt),21).a,n=t.a.c.length,!r&&i!=(DM(),RB)&&(e==0||e>n)}function gge(t,e,n){var i,r;for(r=new Gs(t.b,0);r.b=l)return rn.a._b()?a(Ee(i,r-n.a._b()-1),8):null;return null}function alt(t,e){var n;e!=t.sb?(n=null,t.sb&&(n=a(t.sb,42).Cg(t,1,EA,null)),e&&(n=a(e,42).Ag(t,1,EA,n)),n=Oat(t,e,n),n&&n.Th()):t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,4,e,e))}function wge(t,e,n){var i,r,c,l,f;if(n)for(r=n.a.length,i=new Ug(r),f=(i.b-i.a)*i.c<0?(_1(),hg):new x1(i);f.hc();)l=a(f.ic(),21),c=CM(n,l.a),ypt in c.a||YY in c.a?jwe(t,c,e):Vxe(t,c,e)}function P8t(t){switch(t.g){case 0:return new UG((Tm(),nF));case 1:return new eT;default:throw K(new yn("No implementation is available for the crossing minimizer "+(t.f!=null?t.f:""+t.g)))}}function vge(t){Jlt();var e,n,i,r,c;if(t==null)return null;for(i=t.length,r=i*2,e=dt(el,Pf,22,r,15,1),n=0;n>4],e[n*2+1]=QF[c&15];return ml(e,0,e.length)}function Eo(){ep(),dst.call(this),this.i=(Ht(),Wc),this.a=new go,new ait,this.e=(Ah(2,Q2),new Vu(2)),this.d=(Ah(4,Q2),new Vu(4)),this.f=(Ah(4,Q2),new Vu(4)),this.c=new hMt(this.d,this.f)}function _ge(t,e){var n,i;return!(lt(de(z(e,(Ft(),eg))))||t==(bl(),P6)&&(i=e.c.g,i.j==(Ke(),bu)||(n=a(z(i,(qt(),la)),178),n==xw)))}function yge(t,e){var n,i;return!(lt(de(z(e,(Ft(),eg))))||t==(bl(),V4)&&(i=e.d.g,i.j==(Ke(),bu)||(n=a(z(i,(qt(),la)),178),n==Km)))}function xge(t,e){var n,i,r;n=Xie(e,t.e),i=a(zi(t.g.f,n),21).a,r=t.a.c.length-1,t.a.c.length!=0&&a(Ee(t.a,r),269).c==i?(++a(Ee(t.a,r),269).a,++a(Ee(t.a,r),269).b):Ut(t.a,new ASt(i))}function I8t(t,e,n,i,r){if(ii&&(t.a=i),t.br&&(t.b=r),t}function Mge(t){if(ct(t,180))return bbe(a(t,180));if(ct(t,199))return tfe(a(t,199));if(ct(t,27))return uge(a(t,27));throw K(new yn(Apt+Gp(new zu(Y(Z(un,1),te,1,5,[t])))))}function Ja(t,e){switch(e.g){case 1:return Xd(t.i,(ep(),Rgt));case 2:return Xd(t.i,(ep(),Igt));case 3:return Xd(t.i,(ep(),Dgt));case 4:return Xd(t.i,(ep(),Ngt));default:return we(),we(),fo}}function R8t(t){var e;this.a=t,e=(Ke(),Y(Z(ZK,1),jt,232,0,[gs,Hr,rs,uc,bu,Jc,ef])).length,this.b=Vb(pwt,[wt,LBt],[616,166],0,[e,e],2),this.c=Vb(pwt,[wt,LBt],[616,166],0,[e,e],2),L_e(this)}function Ege(t){var e,n;return n=a(z(t,(Ft(),Qc)),19),e=new as,(n.pc((So(),K_))||lt(de(z(t,(qt(),I6)))))&&(pa(e,jWt),n.pc(J_)&&pa(e,HWt)),n.pc(kE)&&pa(e,UWt),n.pc(LE)&&pa(e,zWt),e}function D8t(t,e,n){var i,r,c,l;if(e.b!=0){for(i=new Fr,l=qn(e,0);l.b!=l.d.c;)c=a(Yn(l),76),yo(i,gat(c)),r=c.e,r.a=a(z(c,(mc(),pQ)),21).a,r.b=a(z(c,Bbt),21).a;D8t(t,i,Ta(n,i.b/t.a|0))}}function pP(t){var e,n,i;for(i=new Va,Xi(i,new We(t.j,t.k)),n=new $n((!t.a&&(t.a=new Ss(sf,t,5)),t.a));n.e!=n.i._b();)e=a(ci(n),531),Xi(i,new We(e.a,e.b));return Xi(i,new We(t.b,t.c)),i}function Sge(t,e,n,i,r){var c,l,f,p,b,v;if(r)for(p=r.a.length,c=new Ug(p),v=(c.b-c.a)*c.c<0?(_1(),hg):new x1(c);v.hc();)b=a(v.ic(),21),f=CM(r,b.a),l=new w4t(t,e,n,i),Sve(l.a,l.b,l.c,l.d,f)}function x_(t){$b();var e,n,i;for(i=new qa,$L(i,t),n=i.a.Xb().tc();n.hc();)e=n.ic(),si(e);switch(i.a._b()){case 0:return wM(),D4;case 1:return new a2(i.a.Xb().tc().ic());default:return new QG(i)}}function ult(t,e){var n,i,r;for(r=qi,i=new j(d_(e));i.a1&&(t.e.b+=t.a)):(t.e.a+=n.a,t.e.b=y.Math.max(t.e.b,n.b),t.d.c.length>1&&(t.e.a+=t.a))}function N8t(t,e,n){var i,r,c,l;if(c=a(an(t.a,8),1629),c!=null)for(i=0,r=c.length;i1)throw K(new yn("In straight spline segments there may be only one edge."));i=t.a.c,n=t.a.c+t.a.b,Xi(a(e.a.Xb().tc().ic(),14).a,new We(i+(n-i)/2,t.b))}function O8t(t,e,n,i){var r;this.b=i,this.e=t==(Tm(),nA),r=e[n],this.d=Vb(Ol,[wt,a0],[221,22],16,[r.length,r.length],2),this.a=Vb(Gn,[wt,pi],[37,22],15,[r.length,r.length],2),this.c=new tlt(e,n)}function hX(t){var e,n,i;if(t.a==null)for(t.a=dt(Ol,a0,22,t.c.b.c.length,16,1),t.a[0]=!1,i=new j(t.c.b),i.a>>e,r=t.m>>e|n<<22-e,i=t.l>>e|t.m<<22-e):e<44?(c=0,r=n>>>e-22,i=t.m>>e-22|t.h<<44-e):(c=0,r=0,i=n>>>e-44),ia(i&eu,r&eu,c&sp)}function F8t(t,e,n){var i,r,c,l,f;for(f=gu(t.e.mg(),e),r=a(t.g,124),i=0,l=0;ln?flt(t,n,"start index"):e<0||e>n?flt(e,n,"end index"):yP("end index (%s) must not be less than start index (%s)",Y(Z(un,1),te,1,5,[Xt(e),Xt(t)]))}function U8t(t,e){var n,i,r;if(e===t)return!0;if(!ct(e,109)||(r=a(e,109),t._b()!=r._b()))return!1;for(i=r.Tb().tc();i.hc();)if(n=a(i.ic(),38),!t.Wc(n))return!1;return!0}function z8t(t,e){var n,i,r,c;for(i=0,r=t.length;i0?f[l-1]:dt(Cl,Ih,8,0,0,1),r=f[l],b=l0&&$8t(t,c,n));e.o=0}function zge(t,e){var n,i,r;for(r=new j(e.f);r.ae)throw K(new yn("Top must be smaller or equal to bottom."));if(0>t)throw K(new yn("Left must be smaller or equal to right."));this.d=0,this.c=t,this.a=e,this.b=0}function q8t(t,e){var n,i,r;if(e.c.length!=0){for(n=y8t(t,e),r=!1;!n;)k7(t,e,!0),r=!0,n=y8t(t,e);r&&k7(t,e,!1),i=UN(e),t.b&&t.b.If(i),t.a=R6t(t,(mi(0,e.c.length),a(e.c[0],35))),q8t(t,i)}}function De(t){var e;this.c=new Fr,this.f=t.e,this.e=t.d,this.i=t.g,this.d=t.c,this.b=t.b,this.k=t.j,this.a=t.a,t.i?this.j=t.i:this.j=(e=a(yu(Jp),10),new ja(e,a(cu(e,e.length),10),0)),this.g=t.f}function i0(){i0=P,gwt=new b2(sx,0),Ec=new b2("BOOLEAN",1),Pa=new b2("INT",2),X6=new b2("STRING",3),ha=new b2("DOUBLE",4),xs=new b2("ENUM",5),BE=new b2("ENUMSET",6),Ed=new b2("OBJECT",7)}function Qa(){Qa=P,t_t=Y(Z(At,1),wt,2,6,[Gpt,o6,FO,FUt,UO,oK,CO]),Qvt=Y(Z(At,1),wt,2,6,[Gpt,"empty",o6,s6,"elementOnly"]),e_t=Y(Z(At,1),wt,2,6,[Gpt,"preserve","replace",Nh]),eo=new tCt}function rr(t,e){var n;return n=a(t.c.Vb(e),13),!n&&(n=t.Pc(e)),ct(n,196)?new Ert(t,e,a(n,196)):ct(n,60)?new ZW(t,e,a(n,60)):ct(n,19)?new est(t,e,a(n,19)):ct(n,15)?ect(t,e,a(n,15),null):new EL(t,e,n,null)}function z(t,e){var n,i;return i=(!t.p&&(t.p=(ts(),new vi)),zi(t.p,e)),i??(n=e.Of(),ct(n,4)&&(n==null?(!t.p&&(t.p=(ts(),new vi)),kM(t.p,e)):(!t.p&&(t.p=(ts(),new vi)),wr(t.p,e,n))),n)}function jge(t,e){var n,i,r,c;if(t.e.c.length==0)return null;for(c=new cM,i=new j(t.e);i.a=(r/2|0))for(this.e=i?i.c:null,this.d=r;n++0;)qot(this);this.b=e,this.a=null}function $ge(t){var e,n,i,r,c;return r=a(t.a,21).a,c=a(t.b,21).a,e=(r<0?-r:r)>(c<0?-c:c)?r<0?-r:r:c<0?-c:c,r<=0&&r==c?(n=0,i=c-1):r==-e&&c!=e?(n=c,i=r,c>=0&&++n):(n=-c,i=r),new zs(Xt(n),Xt(i))}function Vge(t,e){var n;return t.c.length==0?!1:(n=SIt((mi(0,t.c.length),a(t.c[0],14)).c.g),Mu(),n==(nw(),ry)||n==iy?!0:fN(Vh(new gi(null,new Ei(t,16)),new S3),new DH(e)))}function dlt(t,e,n){var i,r,c;if(!t.b[e.g]){for(t.b[e.g]=!0,i=n,!n&&(i=new bN),Xi(i.b,e),c=t.a[e.g].tc();c.hc();)r=a(c.ic(),170),r.b!=e&&dlt(t,r.b,i),r.c!=e&&dlt(t,r.c,i),Xi(i.a,r);return i}return null}function qge(t){switch(t.g){case 0:case 1:case 2:return Ht(),Tn;case 3:case 4:case 5:return Ht(),fi;case 6:case 7:case 8:return Ht(),on;case 9:case 10:case 11:return Ht(),Qe;default:return Ht(),Wc}}function Xge(t){var e,n,i,r;for(e=0,i=t.length,r=i-4,n=0;n0)try{r=Au(e,Vs,qi)}catch(c){throw c=vr(c),ct(c,118)?(i=c,K(new xN(i))):K(c)}return n=(!t.a&&(t.a=new M5(t)),t.a),r=0?a(at(n,r),51):null}function n0e(t,e,n,i){var r;return r=y_(t,n,Y(Z(At,1),wt,2,6,[AZ,kZ,LZ,PZ,IZ,RZ,DZ]),e),r<0&&(r=y_(t,n,Y(Z(At,1),wt,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),e)),r<0?!1:(i.d=r,!0)}function i0e(t,e,n,i){var r;return r=y_(t,n,Y(Z(At,1),wt,2,6,[AZ,kZ,LZ,PZ,IZ,RZ,DZ]),e),r<0&&(r=y_(t,n,Y(Z(At,1),wt,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),e)),r<0?!1:(i.d=r,!0)}function r0e(t){var e,n,i;for(Ume(t),i=new Dt,n=new j(t.a.a.b);n.a>1),mlt(e,t,p,b,-r,c),mlt(e,t,b,f,-r,c),c.Ld(t[b-1],t[b])<=0){for(;n=0?(e||(e=new wT,i>0&&mo(e,t.substr(0,i))),e.a+="\\",gM(e,n&qr)):e&&gM(e,n&qr);return e?e.a:t}function c0e(t,e,n){var i,r,c,l;c=t.c,l=t.d,r=(zo(Y(Z(ss,1),wt,9,0,[c.g.k,c.k,c.a])).b+zo(Y(Z(ss,1),wt,9,0,[l.g.k,l.k,l.a])).b)/2,c.i==(Ht(),Qe)?i=new We(e+c.g.c.c.a+n,r):i=new We(e-n,r),lD(t.a,0,i)}function t9t(t,e){var n,i;return Jot(t.a),qb(t.a,(kN(),gF),gF),qb(t.a,OE,OE),i=new as,Ni(i,OE,(t7(),vQ)),zt(cn(e,(tw(),xQ)))!==zt((ZL(),mF))&&Ni(i,OE,bQ),Ni(i,OE,wQ),LEt(t.a,i),n=Aht(t.a,e),n}function e9t(t){if(!t)return _f(),Ezt;var e=t.valueOf?t.valueOf():t;if(e!==t){var n=EK[typeof e];return n?n(e):Nat(typeof e)}else return t instanceof Array||t instanceof y.Array?new A8(t):new nT(t)}function bP(t,e){var n;if(e<0)throw K(new _9("Negative exponent"));if(e==0)return KO;if(e==1||Fat(t,KO)||Fat(t,SE))return t;if(!N9t(t,0)){for(n=1;!N9t(t,n);)++n;return t_(Yhe(n*e),bP(act(t,n),e))}return r1e(t,e)}function a0e(t,e){var n,i,r;return ct(e.g,8)&&a(e.g,8).j==(Ke(),rs)?is:(r=k2(e),r?y.Math.max(0,t.b/2-.5):(n=Jv(e),n?(i=lt(Yt(WM(n,(qt(),lp)))),y.Math.max(0,i/2-.5)):is))}function u0e(t,e){var n,i,r;return ct(e.g,8)&&a(e.g,8).j==(Ke(),rs)?is:(r=k2(e),r?y.Math.max(0,t.b/2-.5):(n=Jv(e),n?(i=lt(Yt(WM(n,(qt(),lp)))),y.Math.max(0,i/2-.5)):is))}function l0e(t,e){var n,i,r,c,l;if(!e.Wb()){if(r=a(e.cd(0),125),e._b()==1){_Dt(t,r,r,1,0,e);return}for(n=1;nc.a&&!e&&(r.b=c.a),r.c=-(r.b-c.a)/2,n.g){case 1:r.d=-r.a;break;case 3:r.d=c.b}HX(i),GX(i)}function s9t(t,e,n){var i,r,c;switch(c=t.o,i=a(js(t.p,n),219),r=i.i,r.b=vP(i),r.a=wP(i),r.a=y.Math.max(r.a,c.b),r.a>c.b&&!e&&(r.a=c.b),r.d=-(r.a-c.b)/2,n.g){case 4:r.c=-r.b;break;case 2:r.c=c.a}HX(i),GX(i)}function JC(t,e){cNt(t,e),t.b&1&&(t.a.a=null),t.b&2&&(t.a.f=null),t.b&4&&(t.a.g=null,t.a.i=null),t.b&16&&(t.a.d=null,t.a.e=null),t.b&8&&(t.a.b=null),t.b&32&&(t.a.j=null,t.a.c=null)}function o9t(t){var e,n,i,r;if(n=a(t,42).Kg(),n)try{if(i=null,e=QM((v1(),Nl),ANt(rfe(n))),e&&(r=e.Lg(),r&&(i=r.gk(hi(lt(n.e))))),i&&i!=t)return o9t(i)}catch(c){if(c=vr(c),!ct(c,54))throw K(c)}return t}function c9t(t,e){var n;e.d?e.d.b=e.b:t.a=e.b,e.b?e.b.d=e.d:t.e=e.d,!e.e&&!e.c?(n=a(kM(t.b,e.a),264),n.a=0,++t.c):(n=a(zi(t.b,e.a),264),--n.a,e.e?e.e.c=e.c:n.b=e.c,e.c?e.c.e=e.e:n.c=e.e),--t.d}function wlt(t){var e,n;return t>-0x800000000000&&t<0x800000000000?t==0?0:(e=t<0,e&&(t=-t),n=Tr(y.Math.floor(y.Math.log(t)/.6931471805599453)),(!e||t!=y.Math.pow(2,n))&&++n,n):cPt(Ka(t))}function a9t(t,e){var n,i,r,c,l,f;for(n=t.b.c.length,r=Ee(t.b,e);e*2+10)for(l=t.c.d,f=t.d.d,r=hl(za(new We(f.a,f.b),l),1/(i+1)),c=new We(l.a,l.b),n=new j(t.a);n.a0&&(l+=n,++e);e>1&&(l+=t.c*(e-1))}else l=Kxt(gPt(mL(wo(dot(t.a),new Dk),new xv)));return l>0?l+t.n.d+t.n.a:0}function vP(t){var e,n,i,r,c,l;if(l=0,t.b==0)l=Kxt(gPt(mL(wo(dot(t.a),new bz),new Lg)));else{for(c=yRt(t,!0),e=0,i=0,r=c.length;i0&&(l+=n,++e);e>1&&(l+=t.c*(e-1))}return l>0?l+t.n.b+t.n.c:0}function d0e(t){var e,n;return n=-t.a,e=Y(Z(el,1),Pf,22,15,[43,48,48,48,48]),n<0&&(e[0]=45,n=-n),e[1]=e[1]+((n/60|0)/10|0)&qr,e[2]=e[2]+(n/60|0)%10&qr,e[3]=e[3]+(n%60/10|0)&qr,e[4]=e[4]+n%10&qr,ml(e,0,e.length)}function p0e(t){var e,n,i,r,c,l;for(l=jM(t.d,t.e),c=l.tc();c.hc();)for(r=a(c.ic(),11),i=t.e==(Ht(),on)?r.d:r.f,n=new j(i);n.a=0;c+=n?1:-1)l=l|e.c.qf(p,c,n,i),l=l|e.q.xf(p,c,n),l=l|TNt(t,p[c],n,i);return Ir(t.c,e),l}function h9t(t,e){var n,i,r,c,l,f;for(c=new j(t.b);c.a=0&&i0;){if(e=a(t.k.cd(t.n-1),75),n=e.nj(),ct(n,62)&&a(a(n,17),62).Bb&ca&&(!t.e||n.Vi()!=HE||n.pi()!=0)&&e.lc()!=null)return!0;--t.n}return!1}else return t.n>0}function vlt(t,e){var n,i,r,c;if(Ci(t),t.c!=0||t.a!=123)throw K(new ri(ai((Kn(),$Ft))));if(c=e==112,i=t.d,n=aM(t.i,125,i),n<0)throw K(new ri(ai((Kn(),VFt))));return r=$h(t.i,i,n),t.d=n+1,k5t(r,c,(t.e&512)==512)}function b0e(t){var e,n;return n=-t.a,e=Y(Z(el,1),Pf,22,15,[43,48,48,58,48,48]),n<0&&(e[0]=45,n=-n),e[1]=e[1]+((n/60|0)/10|0)&qr,e[2]=e[2]+(n/60|0)%10&qr,e[4]=e[4]+(n%60/10|0)&qr,e[5]=e[5]+n%10&qr,ml(e,0,e.length)}function w0e(t){var e;return e=Y(Z(el,1),Pf,22,15,[71,77,84,45,48,48,58,48,48]),t<=0&&(e[3]=43,t=-t),e[4]=e[4]+((t/60|0)/10|0)&qr,e[5]=e[5]+(t/60|0)%10&qr,e[7]=e[7]+(t%60/10|0)&qr,e[8]=e[8]+t%10&qr,ml(e,0,e.length)}function p9t(t,e){var n,i,r;return i=new Jh(t),Uo(i,e),Ct(i,(Ft(),FB),e),Ct(i,(qt(),Qi),(Ls(),Gc)),Ct(i,Bf,(md(),_F)),jl(i,(Ke(),rs)),n=new Eo,ds(n,i),yr(n,(Ht(),on)),r=new Eo,ds(r,i),yr(r,Qe),i}function g9t(t,e){var n,i,r,c,l;for(t.c[e.o]=!0,Ut(t.a,e),l=new j(e.i);l.a0&&(r=n),l=new j(t.f.e);l.a=c)l.Pb();else for(r=l.tc(),i=0;i0?vit():l<0&&ylt(t,e,-l),!0):!1}function M0e(t){var e,n,i,r,c,l,f,p,b,v;for(n=t.o,e=t.p,l=qi,r=Vs,f=qi,c=Vs,b=0;bb?r:b,f=fv?c:v);return p=r-l+1,i=c-f+1,new p4t(Xt(l),Xt(f),Xt(p),Xt(i))}function E0e(t,e){var n,i,r;return n=a(z(e,(Ph(),TE)),21).a-a(z(t,TE),21).a,n==0?(i=za(Xc(a(z(t,(R1(),v6)),9)),a(z(t,U4),9)),r=za(Xc(a(z(e,v6),9)),a(z(e,U4),9)),ro(i.a*i.b,r.a*r.b)):n}function S0e(t,e){var n,i,r;return n=a(z(e,(sw(),pF)),21).a-a(z(t,pF),21).a,n==0?(i=za(Xc(a(z(t,(mc(),V6)),9)),a(z(t,aA),9)),r=za(Xc(a(z(e,V6),9)),a(z(e,aA),9)),ro(i.a*i.b,r.a*r.b)):n}function T0e(t,e,n){var i,r,c,l,f,p;if(!t||t.c.length==0)return null;for(c=new $4t(e,!n),r=new j(t);r.a0)switch(e.g){case 2:c.n.c=t.s;break;case 4:c.n.b=t.s}}function bX(t,e){var n,i,r;if(r=iE((Qa(),eo),t.mg(),e),r)return Jo(),a(r,61).bj()||(r=cC(qo(eo,r))),i=(n=t.rg(r),a(n>=0?t.ug(n,!0,!0):q2(t,r,!0),184)),a(i,237).wk(e);throw K(new yn(H_+e.be()+wpt))}function k0e(t,e,n){var i,r,c,l;return c=w7t(NV(),e),i=null,c&&(l=f7t(c,n),r=null,l!=null&&(r=(l==null?(!t.o&&(t.o=new lu((Ic(),pp),ug,t,0)),sP(t.o,c)):(!t.o&&(t.o=new lu((Ic(),pp),ug,t,0)),fP(t.o,c,l)),t)),i=r),i}function xlt(t,e,n,i){var r,c,l,f,p;if(r=t.d[e],r){if(c=r.g,p=r.i,i!=null){for(f=0;f1||n==-1?(t.b=-1,!0):(e=wl(t),e&&(Jo(),e.Ri()==MUt)?(t.b=-1,!0):(t.b=1,!1));default:case 1:return!1}}function L0e(t,e){var n,i,r,c,l;for(i=(!e.s&&(e.s=new Wt(Ra,e,21,17)),e.s),c=null,r=0,l=i.i;rr)?(Hn(c.a!=null),a(c.a,8)):null}function D0e(t,e){Zl();var n,i,r,c,l,f;for(n=null,l=e.tc();l.hc();)c=a(l.ic(),125),!c.k&&(i=Yte(c.a),r=Zie(c.a),f=new o4(i,r,null,a(c.d.a.Xb().tc().ic(),14)),Ut(f.c,c.a),t.c[t.c.length]=f,n&&Ut(n.d,f),n=f)}function N0e(t,e,n){var i,r,c,l,f,p;for(i=a(rr(t.c,e),15),r=a(rr(t.c,n),15),c=i.fd(i._b()),l=r.fd(r._b());c.Cc()&&l.Cc();)if(f=a(c.Ec(),21),p=a(l.Ec(),21),f!=p)return Lp(f.a,p.a);return!c.hc()&&!l.hc()?0:c.hc()?1:-1}function QC(t,e,n,i,r){var c,l,f,p;return p=XW(t,a(r,51)),zt(p)!==zt(r)?(f=a(t.g[n],75),c=k1(e,p),$T(t,n,oX(t,n,c)),Xl(t.e)&&(l=Hg(t,9,c.nj(),r,p,i,!1),Xut(l,new Qd(t.e,9,t.c,f,c,i,!1)),yV(l)),p):r}function O0e(t,e,n){var i,r,c,l;for(r=n,c=QSt(mL(a(a(rr(t.r,e),19),60).xc(),new Ab)),l=0;c.a||(c.a=$v(c.c,c)),c.a;)if(r){lN(c),r=!1;continue}else i=lN(c),c.a||(c.a=$v(c.c,c)),c.a&&(l=y.Math.max(l,i));return l}function cr(t,e,n){var i;if(i=a(t.c.Vb(e),13),i)return i.nc(n)?(++t.d,!0):!1;if(i=t.Pc(e),i.nc(n))return++t.d,t.c.Zb(e,i),!0;throw K(new eV("New Collection violated the Collection spec"))}function B0e(t){var e,n,i,r,c,l;for(r=0,t.q=new Dt,e=new $r,l=new j(t.p);l.a>16),e=i>>16&16,n=16-e,t=t>>e,i=t-256,e=i>>16&8,n+=e,t<<=e,i=t-zm,e=i>>16&4,n+=e,t<<=e,i=t-Lf,e=i>>16&2,n+=e,t<<=e,i=t>>14,e=i&~(i>>1),n+2-e)}function U0e(t,e,n,i){var r,c,l,f,p,b;for(r=0;r=0&&b>=0&&p=0?t.ug(i,!0,!0):q2(t,c,!0),184)),a(r,237).sk(e,n);throw K(new yn(H_+e.be()+wpt))}function y9t(t){var e,n;if(Gd(a(z(t,(qt(),Qi)),83)))for(n=new j(t.i);n.a>24;return l}function W0e(t,e){var n,i,r,c,l;if(n=a(an(t.a,4),116),l=n==null?0:n.length,e>=l)throw K(new Wv(e,l));return r=n[e],l==1?i=null:(i=dt(rtt,rK,380,l-1,0,1),Aa(n,0,i,0,e),c=l-e-1,c>0&&Aa(n,e+1,i,e,c)),cP(t,i),N8t(t,e,r),r}function $0e(t,e){var n,i,r;if(zt(t)===zt(e))return!0;if(t==null||e==null||t.length!=e.length)return!1;for(n=0;n=null.tl()?(L7(t),Tlt(t)):e.hc()}function wX(t){var e,n;if(ym(t))throw K(new yn(RBt));for(n=qn(t,0);n.b!=n.d.c;)e=a(Yn(n),9),this.d=y.Math.min(this.d,e.b),this.c=y.Math.max(this.c,e.a),this.a=y.Math.max(this.a,e.b),this.b=y.Math.min(this.b,e.a)}function X0e(t){var e,n;return e=new as,pa(e,o$t),n=a(z(t,(Ft(),Qc)),19),n.pc((So(),S6))&&pa(e,h$t),n.pc(kE)&&pa(e,c$t),(n.pc(K_)||lt(de(z(t,(qt(),I6)))))&&(pa(e,u$t),n.pc(J_)&&pa(e,l$t)),n.pc(LE)&&pa(e,a$t),e}function vX(t){var e,n;if(e=hi(cn(t,(dr(),Mwt))),n=Wfe(NV(),e),!n)throw e==null||e.length==0?K(new k5("No layout algorithm has been specified ("+t+").")):K(new k5("Layout algorithm not found: "+e));return n}function X2(){X2=P,zx=a(at(Et((Mit(),_c).qb),6),29),Ux=a(at(Et(_c.qb),3),29),ltt=a(at(Et(_c.qb),4),29),htt=a(at(Et(_c.qb),5),17),w7(zx),w7(Ux),w7(ltt),w7(htt),Yqt=new zu(Y(Z(Ra,1),W_,158,0,[zx,Ux]))}function C9t(t){var e=(!xK&&(xK=yxe()),xK),n=t.replace(/[\x00-\x1f\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200b-\u200f\u2028-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb"\\]/g,function(i){return ooe(i,e)});return'"'+n+'"'}function Z0e(t){var e,n,i,r,c,l;for(r=t.e.c.length,i=dt(Sl,fw,15,r,0,1),l=new j(t.e);l.a=0;)i=n[c],l.Bk(i.nj())&&ni(r,i);!Exe(t,r)&&Xl(t.e)&&Wn(t,e.lj()?Hg(t,6,e,(we(),fo),null,-1,!1):Hg(t,e.Zi()?2:1,e,null,null,-1,!1))}function tme(t,e){var n,i,r,c,l;return t.a==(YM(),G4)?!0:(c=e.a.c,n=e.a.c+e.a.b,!(e.i&&(i=e.u,l=i.c.c.a-i.n.a/2,r=c-(i.k.a+i.n.a),r>l)||e.n&&(i=e.v,l=i.c.c.a-i.n.a/2,r=i.k.a-n,r>l)))}function P9t(t,e,n){var i,r,c,l,f,p;for(i=0,p=n,e||(i=n*(t.c.length-1),p*=-1),c=new j(t);c.a1?t.e*=lt(t.a):t.f/=lt(t.a),the(t),Ife(t),zwe(t),Ct(t.b,(zC(),sB),t.g)}function nme(t){A2();var e,n,i,r;for(oB=new Dt,FK=(ts(),new vi),BK=new Dt,e=(!t.a&&(t.a=new Wt(zr,t,10,11)),t.a),axe(e),r=new $n(e);r.e!=r.i._b();)i=a(ci(r),35),nc(oB,i,0)==-1&&(n=new Dt,Ut(BK,n),qIt(i,n));return BK}function ime(t,e){var n,i,r,c,l,f,p;if(i=W6t(t.Db&254),i==1)t.Eb=null;else if(c=r_(t.Eb),i==2)r=Kq(t,e),t.Eb=c[r==0?1:0];else{for(l=dt(un,te,1,i-1,5,1),n=2,f=0,p=0;n<=128;n<<=1)n==e?++f:t.Db&n&&(l[p++]=c[f++]);t.Eb=l}t.Db&=~e}function D9t(t,e,n){var i,r,c;t.ti()?(c=t.ui(),JL(t,e,n),i=t.mi(3,null,n,e,c),t.qi()?(r=t.ri(n,null),t.xi()&&(r=t.yi(n,r)),r?(r.Sh(i),r.Th()):t.ni(i)):t.ni(i)):(JL(t,e,n),t.qi()&&(r=t.ri(n,null),r&&r.Th()))}function _X(t,e){var n,i,r,c;t.ti()?(n=t.i,c=t.ui(),ML(t,e),i=t.mi(3,null,e,n,c),t.qi()?(r=t.ri(e,null),t.xi()&&(r=t.yi(e,r)),r?(r.Sh(i),r.Th()):t.ni(i)):t.ni(i)):(ML(t,e),t.qi()&&(r=t.ri(e,null),r&&r.Th()))}function klt(t,e){var n,i,r,c,l;if(e===t)return!0;if(!ct(e,15)||(l=a(e,15),t._b()!=l._b()))return!1;for(c=l.tc(),i=t.tc();i.hc();)if(n=i.ic(),r=c.ic(),!(zt(n)===zt(r)||n!=null&&Fi(n,r)))return!1;return!0}function N9t(t,e){var n,i,r;if(e==0)return(t.a[0]&1)!=0;if(e<0)throw K(new _9("Negative bit address"));if(r=e>>5,r>=t.d)return t.e<0;if(n=t.a[r],e=1<<(e&31),t.e<0){if(i=yPt(t),r=0?t.jg(null):t.yg().Cg(t,-1-e,null,null)),t.kg(a(r,42),n),i&&i.Th(),t.eg()&&t.fg()&&n>-1&&Bi(t,new fs(t,9,n,c,r)),r):c}function JM(){JM=P,ntt=new w2(vBt,0),jF=new w2("INSIDE_SELF_LOOPS",1),HF=new w2("MULTI_EDGES",2),zF=new w2("EDGE_LABELS",3),ett=new w2("PORTS",4),UF=new w2("COMPOUND",5),FF=new w2("CLUSTERS",6),ttt=new w2("DISCONNECTED",7)}function O9t(t){var e,n;if(t.f){for(;t.n>16)),15).dd(c),f0&&(!(zv(t.a.c)&&e.n.d)&&!(q5(t.a.c)&&e.n.b)&&(e.g.d+=y.Math.max(0,i/2-.5)),!(zv(t.a.c)&&e.n.a)&&!(q5(t.a.c)&&e.n.c)&&(e.g.a-=i-1))}function H9t(t,e,n){var i,r,c,l,f,p;c=a(Ee(e.d,0),14).c,i=c.g,r=i.j,p=a(Ee(n.f,0),14).d,l=p.g,f=l.j,r==(Ke(),Hr)?Ct(t,(Ft(),Pu),a(z(i,Pu),11)):Ct(t,(Ft(),Pu),c),f==Hr?Ct(t,(Ft(),Iu),a(z(l,Iu),11)):Ct(t,(Ft(),Iu),p)}function xX(t){var e,n,i;if(t.length==0)throw K(new yn(RBt));for(n=0,i=t.length;n>e,c=t.m>>e|n<<22-e,r=t.l>>e|t.m<<22-e):e<44?(l=i?sp:0,c=n>>e-22,r=t.m>>e-22|n<<44-e):(l=i?sp:0,c=i?eu:0,r=n>>e-44),ia(r&eu,c&eu,l&sp)}function MX(t){var e,n,i,r,c,l;for(this.c=new Dt,this.d=t,i=is,r=is,e=Ps,n=Ps,l=qn(t,0);l.b!=l.d.c;)c=a(Yn(l),9),i=y.Math.min(i,c.a),r=y.Math.min(r,c.b),e=y.Math.max(e,c.a),n=y.Math.max(n,c.b);this.a=new qh(i,r,e-i,n-r)}function Dlt(t){var e,n,i;this.c=t,i=a(z(t,(qt(),ch)),110),e=lt(Yt(z(t,jB))),n=lt(Yt(z(t,ibt))),i==(Js(),ah)||i==uh||i==Ff?this.b=e*n:this.b=1/(e*n),this.j=lt(Yt(z(t,Aw))),this.e=lt(Yt(z(t,lp))),this.f=t.b.c.length}function G9t(t){switch(t.g){case 0:return new Ev;case 1:return new _8;case 2:return new g1;case 3:return new RMt;case 4:return new b4t;default:throw K(new yn("No implementation is available for the node placer "+(t.f!=null?t.f:""+t.g)))}}function nh(t){var e;return e=new ll(Og(t.ql)),e.a+="@",Ii(e,(Yr(t)>>>0).toString(16)),t.Eg()?(e.a+=" (eProxyURI: ",Fa(e,t.Kg()),t.tg()&&(e.a+=" eClass: ",Fa(e,t.tg())),e.a+=")"):t.tg()&&(e.a+=" (eClass: ",Fa(e,t.tg()),e.a+=")"),e.a}function W9t(t,e){var n,i,r,c,l,f,p,b,v;if(t.a.f>0&&ct(e,38)&&(t.a.Fi(),b=a(e,38),p=b.kc(),c=p==null?0:Yr(p),l=cst(t.a,c),n=t.a.d[l],n)){for(i=a(n.g,339),v=n.i,f=0;f0&&r0):r<0&&-r0):!1}function T7(t,e,n,i,r){var c,l,f,p,b,v;for(c=i,b=a(a(rr(t.r,e),19),60).tc();b.hc();){if(p=a(b.ic(),111),c){c=!1;continue}l=0,r>0?l=r:p.c&&(l=AD(p.c)),l>0&&(n?(v=p.b.Re().a,l>v&&(f=(l-v)/2,p.d.b=f,p.d.c=f)):p.d.c=t.s+l)}}function Nlt(t,e,n){switch(e){case 7:!t.e&&(t.e=new pn(Xs,t,7,4)),Dr(t.e),!t.e&&(t.e=new pn(Xs,t,7,4)),Lr(t.e,a(n,13));return;case 8:!t.d&&(t.d=new pn(Xs,t,8,5)),Dr(t.d),!t.d&&(t.d=new pn(Xs,t,8,5)),Lr(t.d,a(n,13));return}$ut(t,e,n)}function hme(t){var e,n;if(t.c.length!=2)throw K(new yc("Order only allowed for two paths."));e=(mi(0,t.c.length),a(t.c[0],14)),n=(mi(1,t.c.length),a(t.c[1],14)),e.d.g!=n.c.g&&(t.c=dt(un,te,1,0,5,1),t.c[t.c.length]=n,t.c[t.c.length]=e)}function fme(t){var e,n,i,r;if(t==null)return null;if(i=Hc(t,!0),r=a6.length,le(i.substr(i.length-r,r),a6)){if(n=i.length,n==4){if(e=i.charCodeAt(0),e==43)return s_t;if(e==45)return fXt}else if(n==3)return s_t}return rw(i)}function dme(t,e,n){var i;i=null,e&&(i=e.d),XC(t,new sM(e.k.a-i.b+n.a,e.k.b-i.d+n.b)),XC(t,new sM(e.k.a-i.b+n.a,e.k.b+e.n.b+i.a+n.b)),XC(t,new sM(e.k.a+e.n.a+i.c+n.a,e.k.b-i.d+n.b)),XC(t,new sM(e.k.a+e.n.a+i.c+n.a,e.k.b+e.n.b+i.a+n.b))}function pme(t,e){var n,i,r,c,l;for(di(e,"Port side processing",1),l=new j(t.a);l.ap-n&&f=t.c.a.length)return e;for(i=Fa(Ii(new om,"expected one element but was: <"),e),n=0;n<4&&t.a=0?t.Mg(c,n):jlt(t,r,n);else throw K(new yn(H_+r.be()+HY));else throw K(new yn("The feature ID"+e+" is not a valid feature ID"));else Yu(t,i,r,n)}function EX(t,e,n,i,r){var c,l,f,p,b,v,M,k,I;return l=n-t,f=i-e,c=y.Math.atan2(l,f),p=c+tY,b=c-tY,v=r*y.Math.sin(p)+t,k=r*y.Math.cos(p)+e,M=r*y.Math.sin(b)+t,I=r*y.Math.cos(b)+e,Vg(Y(Z(ss,1),wt,9,0,[new We(v,k),new We(M,I)]))}function K9t(t){var e,n,i,r,c,l,f;for(c=0,r=t.f.e,n=0;n=0)return r;for(c=1,f=new j(e.i);f.ap+1?c:p+1);return cfe(t,e,c),c}function r0(){r0=P,kl=new Bv("H_LEFT",0),Uf=new Bv("H_CENTER",1),Pl=new Bv("H_RIGHT",2),Bh=new Bv("V_TOP",3),hh=new Bv("V_CENTER",4),lh=new Bv("V_BOTTOM",5),Du=new Bv("INSIDE",6),Il=new Bv("OUTSIDE",7),Ll=new Bv("H_PRIORITY",8)}function cn(t,e){var n,i;return i=(!t.o&&(t.o=new lu((Ic(),pp),ug,t,0)),Lh(t.o,e)),i??(n=e.Of(),ct(n,4)&&(n==null?(!t.o&&(t.o=new lu((Ic(),pp),ug,t,0)),sP(t.o,e)):(!t.o&&(t.o=new lu((Ic(),pp),ug,t,0)),fP(t.o,e,n))),n)}function xme(t){var e,n,i,r,c,l,f;if(e=t.Yg(xl),e&&(f=hi(Lh((!e.b&&(e.b=new xu((ye(),Ho),Dc,e)),e.b),"settingDelegates")),f!=null)){for(n=new Dt,r=Z2(f,"\\w+"),c=0,l=r.length;c0?(e-=1,n-=1):i>=0&&r<0?(e+=1,n+=1):i>0&&r>=0?(e-=1,n+=1):(e+=1,n-=1),new zs(Xt(e),Xt(n))}function Olt(t,e,n){var i,r,c;if(e!=n){i=e;do sr(t,i.c),r=a(z(i,(Ft(),tg)),8),r&&(c=i.d,Gu(t,c.b,c.d),sr(t,r.k),i=Mc(r));while(r);i=n;do za(t,i.c),r=a(z(i,(Ft(),tg)),8),r&&(c=i.d,eL(t,c.b,c.d),za(t,r.k),i=Mc(r));while(r)}}function Sme(t,e,n){var i,r,c,l,f,p;i=new Dt,i.c[i.c.length]=e,p=e,f=0;do p=K2e(t,p),p&&(i.c[i.c.length]=p),++f;while(p);for(l=(n-(i.c.length-1)*t.d.d)/i.c.length,c=new j(i);c.ae.c?1:t.be.b?1:t.a!=e.a?Yr(t.a)-Yr(e.a):t.d==(hC(),rA)&&e.d==iA?-1:t.d==iA&&e.d==rA?1:0}function SX(t){var e,n,i,r,c,l,f,p;for(r=is,i=Ps,n=new j(t.e.b);n.a=0;e-=2)for(n=0;n<=e;n+=2)(t.b[n]>t.b[n+2]||t.b[n]===t.b[n+2]&&t.b[n+1]>t.b[n+3])&&(i=t.b[n+2],t.b[n+2]=t.b[n],t.b[n]=i,i=t.b[n+3],t.b[n+3]=t.b[n+1],t.b[n+1]=i);t.c=!0}}function nDt(t,e){var n,i,r,c,l,f,p,b;for(l=e==1?qK:VK,c=l.a.Xb().tc();c.hc();)for(r=a(c.ic(),110),p=a(rr(t.f.c,r),19).tc();p.hc();)switch(f=a(p.ic(),48),i=a(f.b,80),b=a(f.a,172),n=b.c,r.g){case 2:case 1:i.g.d+=n;break;case 4:case 3:i.g.c+=n}}function Bme(t){Jlt();var e,n,i,r,c,l,f;if(t==null||(r=t.length,r%2!=0))return null;for(e=yN(t),c=r/2|0,n=dt(Da,G_,22,c,15,1),i=0;i>24}return n}function QM(t,e){var n,i,r;return n=e==null?Ua(Ea(t.d,null)):LT(t.e,e),ct(n,207)?(r=a(n,207),r.gh()==null,r):ct(n,456)?(i=a(n,1631),r=i.a,r&&(r.yb==null||(e==null?Cu(t.d,null,r):km(t.e,e,r))),r):null}function Fme(t,e){var n,i,r,c,l;if(i=e.nj(),Om(t.e,i)){if(i.xh()&&mV(t,i,e.lc()))return!1}else for(l=gu(t.e.mg(),i),n=a(t.g,124),r=0;r0&&(!(zv(t.a.c)&&e.n.d)&&!(q5(t.a.c)&&e.n.b)&&(e.g.d-=y.Math.max(0,i/2-.5)),!(zv(t.a.c)&&e.n.a)&&!(q5(t.a.c)&&e.n.c)&&(e.g.a+=y.Math.max(0,i-1)))}function iDt(t,e,n){var i,r;if((t.c-t.b&t.a.length-1)==2)e==(Ht(),Tn)||e==Qe?(CN(a(TC(t),15),(Tu(),kd)),CN(a(TC(t),15),ag)):(CN(a(TC(t),15),(Tu(),ag)),CN(a(TC(t),15),kd));else for(r=new sC(t);r.a!=r.b;)i=a(WN(r),15),CN(i,n)}function rDt(t){var e,n,i,r,c,l,f;if(t&&(e=t.Yg(xl),e&&(l=hi(Lh((!e.b&&(e.b=new xu((ye(),Ho),Dc,e)),e.b),"conversionDelegates")),l!=null))){for(f=new Dt,i=Z2(l,"\\w+"),r=0,c=i.length;r=2147483648&&(i-=FZ),i)}function sDt(t,e,n){var i,r,c,l;T4t(t,e)>T4t(t,n)?(i=ac(n,(Ht(),Qe)),t.d=i.Wb()?0:uL(a(i.cd(0),11)),l=ac(e,on),t.b=l.Wb()?0:uL(a(l.cd(0),11))):(r=ac(n,(Ht(),on)),t.d=r.Wb()?0:uL(a(r.cd(0),11)),c=ac(e,Qe),t.b=c.Wb()?0:uL(a(c.cd(0),11)))}function zme(t){var e,n,i,r,c,l;if(r=a(Ee(t.i,0),11),r.d.c.length+r.f.c.length==0)t.k.a=0;else{for(l=0,i=Rn(Bp(new zd(r),new kv(r)));Jn(i);)n=a(In(i),11),l+=n.g.k.a+n.k.a+n.a.a;e=a(z(t,(qt(),Sw)),9),c=e?e.a:0,t.k.a=l/(r.d.c.length+r.f.c.length)-c}}function oDt(t){switch(t.g){case 0:return new XEt;case 1:return new b8;case 2:return new IMt;case 3:return new X0;case 4:return new rTt;case 5:return new v8;default:throw K(new yn("No implementation is available for the layerer "+(t.f!=null?t.f:""+t.g)))}}function cDt(t,e){var n,i,r,c;for(n=t.o.a,c=a(a(rr(t.r,e),19),60).tc();c.hc();)r=a(c.ic(),111),r.e.a=n*lt(Yt(r.b.xe(OF))),r.e.b=(i=r.b,i.ye((dr(),nu))?i.ef()==(Ht(),Tn)?-i.Re().b-lt(Yt(i.xe(nu))):lt(Yt(i.xe(nu))):i.ef()==(Ht(),Tn)?-i.Re().b:0)}function TX(t,e){KM();var n,i,r,c,l,f,p,b,v;return e.d>t.d&&(f=t,t=e,e=f),e.d<63?Obe(t,e):(l=(t.d&-2)<<4,b=act(t,l),v=act(e,l),i=jX(t,P2(b,l)),r=jX(e,P2(v,l)),p=TX(b,v),n=TX(i,r),c=TX(jX(b,i),jX(r,v)),c=ZX(ZX(c,p),n),c=P2(c,l),p=P2(p,l<<1),ZX(ZX(p,c),n))}function aDt(t,e,n){var i,r,c;for(Gee.call(this,new Dt),this.a=e,this.b=n,this.e=t,i=(t.b&&VX(t),t.a),this.d=_4t(i.a,this.a),this.c=_4t(i.b,this.b),Hhe(this,this.d,this.c),_0e(this),c=this.e.e.a.Xb().tc();c.hc();)r=a(c.ic(),247),r.c.c.length>0&&wye(this,r)}function jme(t){var e,n,i,r;for(e=0,n=0,r=new j(t.i);r.a1||n>1)return 2;return e+n==1?2:0}function Hme(t,e,n){var i,r,c,l,f,p,b;i=n,r=e;do r=t.a[r.o],l=(b=t.g[r.o],lt(t.p[b.o])+lt(t.d[r.o])-r.d.d),f=lae(r,r.c?nc(r.c.a,r,0):-1),f&&(c=(p=t.g[f.o],lt(t.p[p.o])+lt(t.d[f.o])+f.n.b+f.d.a),i=y.Math.min(i,l-(c+Hv(t.k,r,f))));while(e!=r);return i}function Gme(t,e,n){var i,r,c,l,f,p,b;i=n,r=e;do r=t.a[r.o],c=(b=t.g[r.o],lt(t.p[b.o])+lt(t.d[r.o])+r.n.b+r.d.a),f=Sue(r,r.c?nc(r.c.a,r,0):-1),f&&(l=(p=t.g[f.o],lt(t.p[p.o])+lt(t.d[f.o])-f.d.d),i=y.Math.min(i,l-(c+Hv(t.k,r,f))));while(e!=r);return i}function Wme(t,e,n){var i,r,c,l;for(r=n,c=QSt(mL(a(a(rr(t.r,e),19),60).xc(),new _p)),l=0;c.a||(c.a=$v(c.c,c)),c.a;)if(r){Hn((c.a||(c.a=$v(c.c,c)),c.a)),c.a=!1,r=!1;continue}else i=lN(c),c.a||(c.a=$v(c.c,c)),c.a&&(l=y.Math.max(l,i));return l}function $me(t,e,n){var i,r,c,l,f,p,b,v;if(n)for(c=n.a.length,i=new Ug(c),f=(i.b-i.a)*i.c<0?(_1(),hg):new x1(i);f.hc();)l=a(f.ic(),21),r=CM(n,l.a),r&&(p=iae(t,(b=(am(),v=new hit,v),e&&mDt(b,e),b),r),zL(p,Jd(r,Df)),m7(r,p),hlt(r,p),GV(t,r,p))}function Vme(t){var e,n,i;return n=a(t.a,21).a,i=a(t.b,21).a,e=(n<0?-n:n)>(i<0?-i:i)?n<0?-n:n:i<0?-i:i,n=-e&&i==e?new zs(Xt(n-1),Xt(i)):new zs(Xt(n),Xt(i-1))}function uDt(t){var e,n,i,r,c,l;for(l=a(xo(t.a,dt(Cl,Ih,8,t.a.c.length,0,1)),123),yrt(l,new h3),n=null,r=0,c=l.length;ri.o?yr(r,fi):r.i==fi&&i.o>t.o&&yr(r,Tn);break}return i}function Ult(t,e,n){var i,r,c;for(c=new j(t.e);c.a0&&(i.b.c-=i.c,i.b.c<=0&&i.b.f>0&&Xi(e,i.b));for(r=new j(t.b);r.a0&&(i.a.f-=i.c,i.a.f<=0&&i.a.c>0&&Xi(n,i.a))}function zlt(t,e,n){var i,r,c;for(c=new j(t.q);c.a0&&(i.b.j-=i.c,i.b.j<=0&&i.b.r>0&&Xi(e,i.b));for(r=new j(t.g);r.a0&&(i.a.r-=i.c,i.a.r<=0&&i.a.j>0&&Xi(n,i.a))}function L7(t){var e,n,i,r,c;if(t.g==null&&(t.d=t.Gh(t.f),ni(t,t.d),t.c))return c=t.f,c;if(e=a(t.g[t.i-1],43),r=e.ic(),t.e=e,n=t.Gh(r),n.hc())t.d=n,ni(t,n);else for(t.d=null;!e.hc()&&(Vr(t.g,--t.i,null),t.i!=0);)i=a(t.g[t.i-1],43),e=i;return r}function yP(t,e){var n,i,r,c;for(t=t,n=new Bb,c=0,i=0;i=0?t.ug(i,!0,!0):q2(t,c,!0),184)),a(r,237).xk(e,n)}else throw K(new yn(H_+e.be()+HY))}function Hlt(t,e,n){switch(n.g){case 1:return new We(e.a,y.Math.min(t.d.b,e.b));case 2:return new We(y.Math.max(t.c.a,e.a),e.b);case 3:return new We(e.a,y.Math.max(t.c.b,e.b));case 4:return new We(y.Math.min(e.a,t.d.a),e.b)}return new We(e.a,e.b)}function xP(t){var e,n,i;for(e=od(1+(!t.c&&(t.c=new Wt(Rl,t,9,9)),t.c).i),Ut(e,(!t.d&&(t.d=new pn(Xs,t,8,5)),t.d)),i=new $n((!t.c&&(t.c=new Wt(Rl,t,9,9)),t.c));i.e!=i.i._b();)n=a(ci(i),121),Ut(e,(!n.d&&(n.d=new pn(Xs,n,8,5)),n.d));return si(e),new v2(e)}function Af(t){var e,n,i;for(e=od(1+(!t.c&&(t.c=new Wt(Rl,t,9,9)),t.c).i),Ut(e,(!t.e&&(t.e=new pn(Xs,t,7,4)),t.e)),i=new $n((!t.c&&(t.c=new Wt(Rl,t,9,9)),t.c));i.e!=i.i._b();)n=a(ci(i),121),Ut(e,(!n.e&&(n.e=new pn(Xs,n,7,4)),n.e));return si(e),new v2(e)}function Kme(t,e){var n,i,r,c,l;if(di(e,"Breaking Point Processor",1),E2e(t),lt(de(z(t,(qt(),abt))))){for(r=new j(t.b);r.a3&&dd(t,0,e-3))}function tbe(t){var e,n,i;return n=t.l,n&n-1||(i=t.m,i&i-1)||(e=t.h,e&e-1)||e==0&&i==0&&n==0?-1:e==0&&i==0&&n!=0?Jct(n):e==0&&i!=0&&n==0?Jct(i)+22:e!=0&&i==0&&n==0?Jct(e)+44:-1}function ebe(t,e){var n,i,r,c,l;for(di(e,"Edge joining",1),n=lt(de(z(t,(qt(),qJ)))),r=new j(t.b);r.a0),c.a.cd(c.c=--c.b),cd(c,r),Hn(c.bF_,p=vF_,p=vF_,p=vF_,p=v=0){if(e==n)return new zs(Xt(-e-1),Xt(-e-1));if(e==-n)return new zs(Xt(-e),Xt(n+1))}return(e<0?-e:e)>(n<0?-n:n)?e<0?new zs(Xt(-e),Xt(n)):new zs(Xt(-e),Xt(n+1)):new zs(Xt(e+1),Xt(n))}function abe(t,e,n){var i,r,c,l,f;return r=a(cn(e,(v7(),xwt)),21),!r&&(r=Xt(0)),c=a(cn(n,xwt),21),!c&&(c=Xt(0)),r.a>c.a?-1:r.a1)for(e=hm((n=new Ng,++t.b,n),t.d),f=qn(c,0);f.b!=f.d.c;)l=a(Yn(f),113),ih($l(Wl(Vl(Gl(new cl,1),0),e),l))}function fbe(t,e,n){var i,r,c,l,f;for(di(n,"Breaking Point Removing",1),t.a=a(z(e,(qt(),ig)),197),c=new j(e.b);c.a>16!=6&&e){if(qM(t,e))throw K(new yn(M4+x9t(t)));i=null,t.Cb&&(i=(n=t.Db>>16,n>=0?Lut(t,null):t.Cb.Cg(t,-1-n,null,null))),e&&(i=z2(e,t,6,i)),i=sst(t,e,i),i&&i.Th()}else t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,6,e,e))}function gDt(t,e){var n,i;if(e!=t.Cb||t.Db>>16!=3&&e){if(qM(t,e))throw K(new yn(M4+e7t(t)));i=null,t.Cb&&(i=(n=t.Db>>16,n>=0?Rut(t,null):t.Cb.Cg(t,-1-n,null,null))),e&&(i=z2(e,t,12,i)),i=rst(t,e,i),i&&i.Th()}else t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,3,e,e))}function mDt(t,e){var n,i;if(e!=t.Cb||t.Db>>16!=9&&e){if(qM(t,e))throw K(new yn(M4+lNt(t)));i=null,t.Cb&&(i=(n=t.Db>>16,n>=0?Iut(t,null):t.Cb.Cg(t,-1-n,null,null))),e&&(i=z2(e,t,9,i)),i=ost(t,e,i),i&&i.Th()}else t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,9,e,e))}function bDt(t,e){var n,i;if(e!=t.Cb||t.Db>>16!=11&&e){if(qM(t,e))throw K(new yn(M4+cht(t)));i=null,t.Cb&&(i=(n=t.Db>>16,n>=0?Out(t,null):t.Cb.Cg(t,-1-n,null,null))),e&&(i=z2(e,t,10,i)),i=pst(t,e,i),i&&i.Th()}else t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,11,e,e))}function mbe(t,e){if(ct(e,246))return phe(t,a(e,35));if(ct(e,187))return ghe(t,a(e,121));if(ct(e,263))return vse(t,a(e,137));if(ct(e,183))return Lwe(t,a(e,105));if(e)return null;throw K(new yn(Apt+Gp(new zu(Y(Z(un,1),te,1,5,[null])))))}function bbe(t){var e,n,i,r,c,l,f,p,b,v,M;return M=Jut(t),e=t.a,p=e!=null,p&&JT(M,"category",t.a),r=I9(new Sv(t.d)),l=!r,l&&(b=new Rg,P1(M,"knownOptions",b),n=new dG(b),vo(new Sv(t.d),n)),c=I9(t.g),f=!c,f&&(v=new Rg,P1(M,"supportedFeatures",v),i=new pG(v),vo(t.g,i)),M}function wbe(t,e,n){var i,r,c;for(r=new j(t.a.b);r.ap){for(v=t.d,t.d=dt(Pvt,Fpt,55,2*p+4,0,1),c=0;c=9223372036854776e3?(IM(),a1t):(r=!1,t<0&&(r=!0,t=-t),i=0,t>=o0&&(i=Tr(t/o0),t-=i*o0),n=0,t>=nx&&(n=Tr(t/nx),t-=n*nx),e=Tr(t),c=ia(e,n,i),r&&tq(c),c)}function wDt(t,e,n){var i,r,c,l,f,p;if(!ym(e)){for(p=Ta(n,(ct(e,13)?a(e,13)._b():fC(e.tc()))/t.a|0),di(p,OBt,1),f=new ol,l=0,c=e.tc();c.hc();)i=a(c.ic(),76),f=Bp(f,new Hd(i)),ldw,c=i-ldw,(r||c)&&(p=a(e.e,249).b,l=a(e.e,249).a,f=a(e.d,129),p==0&&l==0)))return f;return f}function vDt(t,e,n,i){var r,c,l,f;return l=new Jh(t),jl(l,(Ke(),Hr)),Ct(l,(Ft(),li),e),Ct(l,(qt(),Qi),(Ls(),Gc)),Ct(l,Pu,n),Ct(l,Iu,i),c=new Eo,yr(c,(Ht(),on)),ds(c,l),f=new Eo,yr(f,Qe),ds(f,l),Ts(e,c),r=new Np,Uo(r,e),Ct(r,Ro,null),Hs(r,f),Ts(r,i),l}function Tbe(t,e,n,i,r){var c,l;(!ec(e)&&e.c.g.c==e.d.g.c||!rPt(zo(Y(Z(ss,1),wt,9,0,[r.g.k,r.k,r.a])),n))&&(e.c==r?lD(e.a,0,new Oo(n)):Xi(e.a,new Oo(n)),i&&!TT(t.a,n)&&(l=a(z(e,(qt(),Ro)),74),l||(l=new Va,Ct(e,Ro,l)),c=new Oo(n),Ws(l,c,l.c.b,l.c),Ir(t.a,c)))}function Cbe(t,e){var n,i;if(i=HD(t.b,e.b),!i)throw K(new yc("Invalid hitboxes for scanline constraint calculation."));(QPt(e.b,a(Kee(t.b,e.b),57))||QPt(e.b,a(Yee(t.b,e.b),57)))&&(rd(),e.b+""),t.a[e.b.f]=a(i$(t.b,e.b),57),n=a(r$(t.b,e.b),57),n&&(t.a[n.f]=e.b)}function _Dt(t,e,n,i,r,c){var l,f,p,b,v,M,k,I,O,$,G,et;for(v=i,e.i&&e.k?(I=a(zi(t.f,e.u),57),$=I.d.c+I.d.b,--v):$=e.a.c+e.a.b,M=r,n.n&&n.k?(I=a(zi(t.f,n.v),57),b=I.d.c,++M):b=n.a.c,G=b-$,p=2>M-v?2:M-v,f=G/p,O=$+f,k=v;k>16!=7&&e){if(qM(t,e))throw K(new yn(M4+C8t(t)));i=null,t.Cb&&(i=(n=t.Db>>16,n>=0?Put(t,null):t.Cb.Cg(t,-1-n,null,null))),e&&(i=a(e,42).Ag(t,1,fI,i)),i=eot(t,e,i),i&&i.Th()}else t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,7,e,e))}function Abe(t,e){var n,i;if(e!=t.Cb||t.Db>>16!=3&&e){if(qM(t,e))throw K(new yn(M4+F6t(t)));i=null,t.Cb&&(i=(n=t.Db>>16,n>=0?Dut(t,null):t.Cb.Cg(t,-1-n,null,null))),e&&(i=a(e,42).Ag(t,0,pI,i)),i=not(t,e,i),i&&i.Th()}else t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,3,e,e))}function MDt(t){var e,n,i,r,c,l,f;for(c=new j(t.a.a);c.a0&&c>0?l.o=e++:i>0?l.o=n++:c>0?l.o=r++:l.o=n++}we(),gc(t.i,new Eg)}function EDt(t,e){var n,i,r;for(r=(!e.a&&(e.a=new Wt(zr,e,10,11)),e.a).i,i=new $n((!e.a&&(e.a=new Wt(zr,e,10,11)),e.a));i.e!=i.i._b();)n=a(ci(i),35),zt(cn(n,(dr(),cy)))!==zt((Kg(),wA))&&fct(vX(e),vX(n))&&((!n.a&&(n.a=new Wt(zr,n,10,11)),n.a).i==0||(r+=EDt(t,n)));return r}function Lbe(t,e){var n,i,r;return n=e.Yg(t.a),n&&(r=hi(Lh((!n.b&&(n.b=new xu((ye(),Ho),Dc,n)),n.b),"affiliation")),r!=null)?(i=BW(r,Ca(35)),i==-1?_q(t,tC(t,Xu(e.Wi())),r):i==0?_q(t,null,r.substr(1,r.length-1)):_q(t,r.substr(0,i),r.substr(i+1,r.length-(i+1)))):null}function Pbe(t){var e,n,i,r,c;if(c=new Dt,pd(t.b,new sH(c)),t.b.c=dt(un,te,1,0,5,1),c.c.length!=0){for(e=(mi(0,c.c.length),a(c.c[0],78)),n=1,i=c.c.length;n=t.a||!Yut(e,n))return-1;if(ym(a(i.Kb(e),20)))return 1;for(r=0,l=a(i.Kb(e),20).tc();l.hc();)if(c=a(l.ic(),14),p=c.c.g==e?c.d.g:c.c.g,f=Vlt(t,p,n,i),f==-1||(r=r>f?r:f,r>t.c-1))return-1;return r+1}function Ibe(t,e,n,i){var r,c,l,f,p,b,v,M,k;for(M=i?(Ht(),on):(Ht(),Qe),r=!1,p=e[n],b=0,v=p.length;b>5,e&=31,i>=t.d)return t.e<0?(V1(),CK):(V1(),SE);if(c=t.d-i,r=dt(Gn,pi,22,c+1,15,1),pge(r,c,t.a,i,e),t.e<0){for(n=0;n0&&t.a[n]<<32-e){for(n=0;n0&&(c=a(Ee(this.b,0),157),r+=c.o,i+=c.p),r*=2,i*=2,e>1?r=Tr(y.Math.ceil(r*e)):i=Tr(y.Math.ceil(i/e)),this.a=new rut(r,i)}function Zlt(t,e,n,i,r,c){var l,f,p,b,v,M;for(b=n.c.length,c&&(t.c=dt(Gn,pi,22,e.length,15,1)),l=r?0:e.length-1;r?l=0;l+=r?1:-1){for(f=e[l],p=i==(Ht(),Qe)?r?ac(f,i):Cm(ac(f,i)):r?Cm(ac(f,i)):ac(f,i),c&&(t.c[f.o]=p._b()),M=p.tc();M.hc();)v=a(M.ic(),11),t.d[v.o]=b++;Or(n,p)}}function IDt(t,e,n){var i,r,c,l,f,p,b,v;for(c=lt(Yt(t.b.tc().ic())),b=lt(Yt(hPt(e.b))),i=hl(Xc(t.a),b-n),r=hl(Xc(e.a),n-c),v=sr(i,r),hl(v,1/(b-c)),this.a=v,this.b=new Dt,f=!0,l=t.b.tc(),l.ic();l.hc();)p=lt(Yt(l.ic())),f&&p-n>F_&&(this.b.nc(n),f=!1),this.b.nc(p);f&&this.b.nc(n)}function Wbe(t){var e,n,i,r;if(Xwe(t,t.n),t.d.c.length>0){for(vT(t.c);Clt(t,a(H(new j(t.e.a)),113))=r&&(t.c=!1,t.a=!1),t.b[i++]=r,t.b[i]=c,t.c||M_(t)}}function RDt(t){var e,n,i,r;return r=Tf(t),n=new m1(r),i=new cH(r),e=new Dt,Or(e,(!t.d&&(t.d=new pn(Xs,t,8,5)),t.d)),Or(e,(!t.e&&(t.e=new pn(Xs,t,7,4)),t.e)),a(hd(Vh(wo(new gi(null,new Ei(e,16)),n),i),e_(new ti,new Qn,new Kt,new kt,Y(Z(tf,1),jt,150,0,[(z1(),bw),Qh]))),19)}function DDt(t){var e,n,i;if(n=a(z(t,(Ft(),Ru)),8),n?yr(t,a(z(n,wc),69)):t.d.c.length-t.f.c.length<0?yr(t,(Ht(),Qe)):yr(t,(Ht(),on)),!t.b)switch(i=t.n,e=t.a,t.i.g){case 1:e.a=i.a/2,e.b=0;break;case 2:e.a=i.a,e.b=i.b/2;break;case 3:e.a=i.a/2,e.b=i.b;break;case 4:e.a=0,e.b=i.b/2}}function $be(t,e,n){var i,r,c,l,f;for(di(n,"Longest path layering",1),t.a=e,f=t.a.a,t.b=dt(Gn,pi,22,f.c.length,15,1),i=0,l=new j(f);l.a=0?!1:(n=iE((Qa(),eo),r,e),n?(i=n.kj(),(i>1||i==-1)&&wm(qo(eo,n))!=3):!0)):!1}function Vbe(t,e){var n;switch(n=a(z(t,(qt(),Z4)),241),di(e,"Label side selection ("+n+")",1),n.g){case 0:h9t(t,(Tu(),kd));break;case 1:h9t(t,(Tu(),ag));break;case 2:SNt(t,(Tu(),kd));break;case 3:SNt(t,(Tu(),ag));break;case 4:HDt(t,(Tu(),kd));break;case 5:HDt(t,(Tu(),ag))}Vn(e)}function Ylt(t,e,n){var i,r,c,l,f,p;if(i=DQt(n,t.length),l=t[i],l[0].j==(Ke(),rs))for(c=t3t(n,l.length),p=e.i,r=0;r0&&(n[0]+=t.d,l-=n[0]),n[2]>0&&(n[2]+=t.d,l-=n[2]),c=y.Math.max(0,l),n[1]=y.Math.max(n[1],l),vct(t,ta,r.c+i.b+n[0]-(n[1]-l)/2,n),e==ta&&(t.c.b=c,t.c.c=r.c+i.b+(c-l)/2)}function Jbe(t,e){var n,i,r,c,l,f,p;for(n=Ps,f=(Ke(),gs),r=new j(e.a);r.a0?l=n:p.c&&(l=d$(p.c)),l>0&&(i&&(Fg(),p.a.B&&(!lt(de(p.a.e.xe((dr(),eI))))||p.b.ff()))?p.d.a=t.s+l:(v=p.b.Re().b,l>v&&(f=(l-v)/2,p.d.d=f,p.d.a=f)))}}function ewe(t,e){var n,i,r,c,l;return r=e.Yg(t.a),r&&(i=(!r.b&&(r.b=new xu((ye(),Ho),Dc,r)),r.b),n=hi(Lh(i,Ns)),n!=null&&(c=n.lastIndexOf("#"),l=c==-1?Jrt(t,e.Pi(),n):c==0?CL(t,null,n.substr(1,n.length-1)):CL(t,n.substr(0,c),n.substr(c+1,n.length-(c+1))),ct(l,140)))?a(l,140):null}function nwe(t,e){var n,i,r,c,l;return i=e.Yg(t.a),i&&(n=(!i.b&&(i.b=new xu((ye(),Ho),Dc,i)),i.b),c=hi(Lh(n,cK)),c!=null&&(r=c.lastIndexOf("#"),l=r==-1?Jrt(t,e.Pi(),c):r==0?CL(t,null,c.substr(1,c.length-1)):CL(t,c.substr(0,r),c.substr(r+1,c.length-(r+1))),ct(l,140)))?a(l,140):null}function jDt(t,e,n,i,r){var c,l,f,p,b,v;if(t.d&&t.d.If(r),c=a(r.cd(0),35),bRt(t,n,c,!1)||(l=a(r.cd(r._b()-1),35),bRt(t,i,l,!0))||slt(t,r))return!0;for(v=r.tc();v.hc();)for(b=a(v.ic(),35),p=e.tc();p.hc();)if(f=a(p.ic(),35),B7(t,b,f))return!0;return!1}function iwe(t,e,n){var i,r,c,l,f,p,b,v,M,k;k=e.c.length,M=(b=t.rg(n),a(b>=0?t.ug(b,!1,!0):q2(t,n,!1),52));t:for(c=M.tc();c.hc();){for(r=a(c.ic(),51),v=0;vt.d[l.o]&&(n+=Lkt(t.b,c),lC(t.a,Xt(c)));for(;!_it(t.a);)eLt(t.b,a(M$(t.a),21).a)}return n}function T_(t,e,n){var i,r;if((!t.a&&(t.a=new Wt(os,t,6,6)),t.a).i==0)return s6t(t);if(i=a(at((!t.a&&(t.a=new Wt(os,t,6,6)),t.a),0),270),e&&(Dr((!i.a&&(i.a=new Ss(sf,i,5)),i.a)),yC(i,0),xC(i,0),_C(i,0),vC(i,0)),n)for(r=(!t.a&&(t.a=new Wt(os,t,6,6)),t.a);r.i>1;)cw(r,r.i-1);return i}function cwe(t,e){var n,i,r,c;if(c=yNt(e),r=a(z(c,(Ft(),Qc)),19),s2e(e,r),r.pc((So(),Al)))for(i=new $n((!e.c&&(e.c=new Wt(Rl,e,9,9)),e.c));i.e!=i.i._b();)n=a(ci(i),121),p2e(t,e,c,n);return Fbe(e,c),lt(de(z(c,(qt(),Ymt))))&&r.nc(IB),zt(cn(e,Y4))===zt((Kg(),Ix))?_xe(t,e,c):d2e(t,e,c),c}function So(){So=P,LB=new jb("COMMENTS",0),Al=new jb("EXTERNAL_PORTS",1),W4=new jb("HYPEREDGES",2),PB=new jb("HYPERNODES",3),K_=new jb("NON_FREE_PORTS",4),J_=new jb("NORTH_SOUTH_PORTS",5),S6=new jb(vBt,6),kE=new jb("CENTER_LABELS",7),LE=new jb("END_LABELS",8),IB=new jb("PARTITIONS",9)}function GDt(t,e,n){var i,r,c,l;for(c=(!e.a&&(e.a=new Wt(zr,e,10,11)),e.a).i,r=new $n((!e.a&&(e.a=new Wt(zr,e,10,11)),e.a));r.e!=r.i._b();)i=a(ci(r),35),(!i.a&&(i.a=new Wt(zr,i,10,11)),i.a).i==0||(c+=GDt(t,i,!1));if(n)for(l=io(e);l;)c+=(!l.a&&(l.a=new Wt(zr,l,10,11)),l.a).i,l=io(l);return c}function cw(t,e){var n,i,r,c;return t.ti()?(i=null,r=t.ui(),t.xi()&&(i=t.zi(t.Dh(e),null)),n=t.mi(4,c=H2(t,e),null,e,r),t.qi()&&c!=null&&(i=t.si(c,i)),i?(i.Sh(n),i.Th()):t.ni(n),c):(c=H2(t,e),t.qi()&&c!=null&&(i=t.si(c,null),i&&i.Th()),c)}function awe(t){var e,n,i,r,c,l,f,p,b;for(l=is,p=is,f=null,n=new D$(new Qy(t.e));n.b!=n.c.a.b;)if(e=Lct(n),(zt(e.d)===zt((mu(),Zp))||zt(e.d)===zt(Lw))&&(i=a(e.e,249).a,b=a(e.e,249).b,r=l-i>dw,c=i-ldw,(r||c)&&(p=a(e.e,249).b,l=a(e.e,249).a,f=a(e.d,129),p==0&&l==0)))return f;return f}function uwe(t){var e,n,i,r,c,l,f,p,b,v;for(c=t.a,e=new $r,b=0,i=new j(t.d);i.ap.d&&(v=p.d+p.a+c));n.c.d=v,e.a.Zb(n,e),b=y.Math.max(b,n.c.d+n.c.a)}return b}function lwe(t,e,n,i,r){return i<0?(i=y_(t,r,Y(Z(At,1),wt,2,6,[bZ,wZ,vZ,_Z,tx,yZ,xZ,MZ,EZ,SZ,TZ,CZ]),e),i<0&&(i=y_(t,r,Y(Z(At,1),wt,2,6,["Jan","Feb","Mar","Apr",tx,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),e)),i<0?!1:(n.k=i,!0)):i>0?(n.k=i-1,!0):!1}function hwe(t,e,n,i,r){return i<0?(i=y_(t,r,Y(Z(At,1),wt,2,6,[bZ,wZ,vZ,_Z,tx,yZ,xZ,MZ,EZ,SZ,TZ,CZ]),e),i<0&&(i=y_(t,r,Y(Z(At,1),wt,2,6,["Jan","Feb","Mar","Apr",tx,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),e)),i<0?!1:(n.k=i,!0)):i>0?(n.k=i-1,!0):!1}function fwe(t,e,n){var i,r,c;if(t.e=n,t.d=0,t.b=0,t.f=1,t.i=e,(t.e&16)==16&&(t.i=Bwe(t.i)),t.j=t.i.length,Ci(t),c=Lm(t),t.d!=t.j)throw K(new ri(ai((Kn(),OFt))));if(t.g){for(i=0;iHBt?gc(p,t.b):i<=HBt&&i>GBt?gc(p,t.d):i<=GBt&&i>WBt?gc(p,t.c):i<=WBt&&gc(p,t.a),c=$Dt(t,p,c);return r}function VDt(t){p2(t,new __(f2(u2(h2(l2(new Z0,SO),"Randomizer"),'Distributes the nodes randomly on the plane, leading to very obfuscating layouts. Can be useful to demonstrate the power of "real" layout algorithms.'),new pz))),pe(t,SO,rx,wvt),pe(t,SO,lE,15),pe(t,SO,aO,Xt(0)),pe(t,SO,aE,uE)}function pwe(t,e){var n,i,r,c,l,f,p,b,v,M;for(p=e.a.length,f=Tr(y.Math.ceil(p/t.a)),M=e.a,l=0,b=f,c=0;cl?0:l)l?0:l:p,(0>(bl?0:l)l?0:l:p)),l=b,b+=f,i=a(Ee(t.c,c),8),n=new DW(v),n.n.b=e.n.b,cr(t.b,e,n),Ut(i.b,n);Lc(t.g.b,e),Ut(t.i,(r=new dMt(t,e),r))}function qDt(t,e,n){var i,r,c,l,f,p,b,v,M;for(e.o=1,c=e.c,M=ew(e,(Fo(),ba)).tc();M.hc();)for(v=a(M.ic(),11),r=new j(v.f);r.a=t.length||(f=t.charCodeAt(e[0]),f!=43&&f!=45)||(++e[0],i=x7(t,e),i<0))return!1;f==45&&(i=-i)}return f==32&&e[0]-n==2&&r.b==2&&(p=new O9,b=p.q.getFullYear()-Fm+Fm-80,l=b%100,c.a=i==l,i+=(b/100|0)*100+(i0){if(t.Fi(),e!=null){for(c=0;c=48;n--)kA[n]=n-48<<24>>24;for(i=70;i>=65;i--)kA[i]=i-65+10<<24>>24;for(r=102;r>=97;r--)kA[r]=r-97+10<<24>>24;for(c=0;c<10;c++)QF[c]=48+c&qr;for(t=10;t<=15;t++)QF[t]=65+t-10&qr}function JDt(t){var e,n,i,r;n=lt(Yt(z(t.a,(Ph(),wjt)))),i=t.a.c.d,r=t.a.d.d,e=t.d,i.a>=r.a?i.b>=r.b?(e.a=r.a+(i.a-r.a)/2+n,e.b=r.b+(i.b-r.b)/2-n):(e.a=r.a+(i.a-r.a)/2+n,e.b=i.b+(r.b-i.b)/2+n):i.b>=r.b?(e.a=i.a+(r.a-i.a)/2+n,e.b=r.b+(i.b-r.b)/2+n):(e.a=i.a+(r.a-i.a)/2+n,e.b=i.b+(r.b-i.b)/2-n)}function _we(t,e,n,i){var r,c,l,f,p;return f=zc(a(at((!e.b&&(e.b=new pn(Si,e,4,7)),e.b),0),97)),p=zc(a(at((!e.c&&(e.c=new pn(Si,e,5,8)),e.c),0),97)),io(f)==io(p)||bC(p,f)?null:(l=tN(e),l==n?i:(c=a(zi(t.a,l),8),c&&(r=a(z(c,(Ft(),xd)),31),r)?r:null))}function ywe(t,e,n,i){var r,c,l,f,p;for(c=t.i.c.length,p=dt(N3e,Pft,267,c,0,1),l=0;lk+p&&i.jc();for(l=new j(I);l.a>19)return"-"+tNt(BM(t));for(n=t,i="";!(n.l==0&&n.m==0&&n.h==0);){if(r=aV(eO),n=Lht(n,r,!0),e=""+l3t(Q1),!(n.l==0&&n.m==0&&n.h==0))for(c=9-e.length;c>0;c--)e="0"+e;i=e+i}return i}function Au(t,e,n){var i,r,c,l,f;if(t==null)throw K(new yf(tu));for(c=t.length,l=c>0&&(t.charCodeAt(0)==45||t.charCodeAt(0)==43)?1:0,i=l;in)throw K(new yf(Um+t+'"'));return f}function Mwe(){if(!Object.create||!Object.getOwnPropertyNames)return!1;var t="__proto__",e=Object.create(null);if(e[t]!==void 0)return!1;var n=Object.getOwnPropertyNames(e);return!(n.length!=0||(e[t]=42,e[t]!==42)||Object.getOwnPropertyNames(e).length==0)}function Ewe(t,e){var n,i,r,c;for(di(e,"Resize child graph to fit parent.",1),i=new j(t.b);i.a>24;case 97:case 98:case 99:case 100:case 101:case 102:return t-97+10<<24>>24;case 65:case 66:case 67:case 68:case 69:case 70:return t-65+10<<24>>24;default:throw K(new yf("Invalid hexadecimal"))}}function Lwe(t,e){var n,i,r,c,l,f,p,b,v;if(b=a(zi(t.c,e),191),!b)throw K(new xf("Edge did not exist in input."));return l=NC(b),v=new Rg,n=new FTt(t,l,v),fte((!e.a&&(e.a=new Wt(os,e,6,6)),e.a),n),P1(b,xpt,v),f=a(cn(e,(dr(),kx)),74),r=!f||y4t(f),c=!r,c&&(p=new Rg,i=new QH(p),vo(f,i),P1(b,"junctionPoints",p)),null}function Pwe(t,e,n){var i,r,c,l;di(n,"Orthogonally routing hierarchical port edges",1),t.a=0,i=V_e(e),Vye(e,i),bye(t,e,i),txe(e),r=a(z(e,(qt(),Qi)),83),c=e.b,F7t((mi(0,c.c.length),a(c.c[0],26)),r,e),F7t(a(Ee(c,c.c.length-1),26),r,e),l=e.b,$Nt((mi(0,l.c.length),a(l.c[0],26))),$Nt(a(Ee(l,l.c.length-1),26)),Vn(n)}function Iwe(t){var e,n,i;switch(e=a(z(t.d,(qt(),ig)),197),e.g){case 2:n=kxe(t);break;case 3:n=(i=new Dt,qc(wo(Vh(Yh(Yh(new gi(null,new Ei(t.d.b,16)),new zy),new jy),new E3),new Fy),new rm(i)),i);break;default:throw K(new yc("Compaction not supported for "+e+" edges."))}aye(t,n),vo(new Sv(t.g),new yH(t))}function Rwe(t,e,n,i){var r,c,l,f,p;for(r=!1,c=!1,f=new j(i.i);f.a1&&(n?l=ql(e.c)+1:l=ql(b.c)-1,f=a(Ee(t.a.b,l),26),Ks(b,f)),eht(t,b,n));return e}function eNt(t,e,n,i,r,c){if(this.b=n,this.d=r,t>=e.length)throw K(new Uc("Greedy SwitchDecider: Free layer not in graph."));this.c=e[t],this.e=new X5(i),UV(this.e,this.c,(Ht(),on)),this.i=new X5(i),UV(this.i,this.c,Qe),this.f=new mCt(this.c),this.a=!c&&r.i&&!r.s&&this.c[0].j==(Ke(),rs),this.a&&Bge(this,t,e.length)}function Dwe(t,e,n){var i,r,c,l;for(di(n,"Processor order nodes",2),t.a=lt(Yt(z(e,(sw(),Wbt)))),r=new Fr,l=qn(e.b,0);l.b!=l.d.c;)c=a(Yn(l),76),lt(de(z(c,(mc(),Rw))))&&Ws(r,c,r.c.b,r.c);i=(Hn(r.b!=0),a(r.a.a.c,76)),i7t(t,i),!n.b&&BV(n,1),sht(t,i,0-lt(Yt(z(i,(mc(),fF))))/2,0),!n.b&&BV(n,1),Vn(n)}function nNt(){this.b=(ts(),new xm),this.d=new xm,this.e=new xm,this.c=new xm,this.a=new vi,this.f=new vi,T2(ss,new YU,new KU),T2(mwt,new rz,new sz),T2(Lgt,new oz,new cz),T2(Pgt,new yv,new az),T2(d3e,new uz,new dz),T2(m3e,new Y0,new JU),T2(p3e,new QU,new tz),T2(g3e,new ez,new nz),T2(v3e,new K0,new iz)}function iNt(t,e,n,i){var r,c,l,f,p,b;for(p=rX(t,n),b=rX(e,n),r=!1;p&&b&&(i||$de(p,b,n));)l=rX(p,n),f=rX(b,n),RL(e),RL(t),c=p.c,iZ(p,!1),iZ(b,!1),n?(W1(e,b.o,c),e.o=b.o,W1(t,p.o+1,c),t.o=p.o):(W1(t,p.o,c),t.o=p.o,W1(e,b.o+1,c),e.o=b.o),Ks(p,null),Ks(b,null),p=l,b=f,r=!0;return r}function IX(t,e,n,i,r,c,l,f){var p,b,v;for(p=0,e!=null&&(p^=j1(e.toLowerCase())),n!=null&&(p^=j1(n)),i!=null&&(p^=j1(i)),l!=null&&(p^=j1(l)),f!=null&&(p^=j1(f)),b=0,v=c.length;bp?new TN(e,t,f-p):f>0&&p>0&&(new TN(t,e,0),new TN(e,t,0)))}function rNt(t){p2(t,new __(f2(u2(h2(l2(new Z0,e6),gFt),"Keeps the current layout as it is, without any automatic modification. Optional coordinates can be given for nodes and edge bend points."),new MR))),pe(t,e6,rx,hvt),pe(t,e6,yO,Xe(bA)),pe(t,e6,lpt,Xe(avt)),pe(t,e6,vO,Xe(uvt)),pe(t,e6,_O,Xe(lvt))}function sNt(t){var e,n,i;i=a(z(t,(qt(),Oh)),19),!i.Wb()&&(n=(e=a(yu(to),10),new ja(e,a(cu(e,e.length),10),0)),i.pc((r0(),Du))?Su(n,Du):Su(n,Il),i.pc(Ll)||Su(n,Ll),i.pc(kl)?Su(n,Bh):i.pc(Uf)?Su(n,hh):i.pc(Pl)&&Su(n,lh),i.pc(Bh)?Su(n,kl):i.pc(hh)?Su(n,Uf):i.pc(lh)&&Su(n,Pl),Ct(t,Oh,n))}function nht(t,e){var n,i,r,c;if(0<(ct(t,13)?a(t,13)._b():fC(t.tc()))){if(r=e,1=t.o)throw K(new m9);f=e>>5,l=e&31,c=Yd(1,or(Yd(l,1))),r?t.n[n][f]=Xh(t.n[n][f],c):t.n[n][f]=ns(t.n[n][f],ist(c)),c=Yd(c,1),i?t.n[n][f]=Xh(t.n[n][f],c):t.n[n][f]=ns(t.n[n][f],ist(c))}catch(p){throw p=vr(p),ct(p,305)?K(new Uc(qZ+t.o+"*"+t.p+XZ+e+Rc+n+ZZ)):K(p)}}function RX(t,e){var n,i,r,c,l,f,p;for(r=new Dt,p=new Dt,n=a(js(Y_,t),15).tc();n.hc();)i=a(n.ic(),151),HIt(r,i.b),HIt(r,TIt(i)),n.hc()&&(i=a(n.ic(),151),Or(p,TIt(i)),Or(p,i.b));for(PV(r,t.b),PV(p,t.a),f=new j(r);f.at.d[f.o]&&(n+=Lkt(t.b,c),lC(t.a,Xt(c)))):++l;for(n+=t.b.d*l;!_it(t.a);)eLt(t.b,a(M$(t.a),21).a)}return n}function Gwe(t){var e,n,i,r,c,l;if(r=t.g.ed(),i=t.b.ed(),t.e)for(n=0;nF_;){for(c=e,l=0;y.Math.abs(e-c)0&&(i=(!t.n&&(t.n=new Wt(ic,t,1,7)),a(a(at(t.n,0),137),263)).a,!i||Ii(Ii((e.a+=' "',e),i),'"'))),Ii(um(Ii(um(Ii(um(Ii(um((e.a+=" (",e),t.i),","),t.j)," | "),t.g),","),t.f),")"),e.a)}function lNt(t){var e,n,i;return t.Db&64?uX(t):(e=new ll(bpt),n=t.k,n?Ii(Ii((e.a+=' "',e),n),'"'):(!t.n&&(t.n=new Wt(ic,t,1,7)),t.n.i>0&&(i=(!t.n&&(t.n=new Wt(ic,t,1,7)),a(a(at(t.n,0),137),263)).a,!i||Ii(Ii((e.a+=' "',e),i),'"'))),Ii(um(Ii(um(Ii(um(Ii(um((e.a+=" (",e),t.i),","),t.j)," | "),t.g),","),t.f),")"),e.a)}function hNt(t){var e,n,i,r,c,l;return c=0,e=wl(t),e.Qi()&&(c|=4),t.Bb&La&&(c|=2),ct(t,62)?(n=a(t,17),r=jo(n),n.Bb&ca&&(c|=32),r&&(ei(Zb(r)),c|=8,l=r.t,(l>1||l==-1)&&(c|=16),r.Bb&ca&&(c|=64)),n.Bb&ao&&(c|=mw),c|=oh):ct(e,425)?c|=512:(i=e.Qi(),i&&i.i&1&&(c|=256)),t.Bb&512&&(c|=128),c}function aht(t,e){var n,i,r,c,l,f,p;if(e==null||e.length==0)return null;if(r=a(Zc(t.a,e),180),!r){for(i=(f=new vf(t.b).a.Tb().tc(),new nm(f));i.a.hc();)if(n=(c=a(i.a.ic(),38),a(c.lc(),180)),l=n.c,p=e.length,le(l.substr(l.length-p,p),e)&&(e.length==l.length||bo(l,l.length-e.length-1)==46)){if(r)return null;r=n}r&&tc(t.a,e,r)}return r}function $we(t,e){var n;return t.f==utt?(n=wm(qo((Qa(),eo),e)),t.e?n==4&&e!=(X2(),zx)&&e!=(X2(),Ux)&&e!=(X2(),ltt)&&e!=(X2(),htt):n==2):t.d&&(t.d.pc(e)||t.d.pc(cC(qo((Qa(),eo),e)))||t.d.pc(iE((Qa(),eo),t.b,e)))?!0:t.f&&Wlt((Qa(),t.f),pL(qo(eo,e)))?(n=wm(qo(eo,e)),t.e?n==4:n==2):!1}function Vwe(t,e,n,i){var r,c,l,f,p,b,v,M;return l=a(cn(n,(dr(),Lx)),9),p=l.a,v=l.b+t,r=y.Math.atan2(v,p),r<0&&(r+=ax),r+=e,r>ax&&(r-=ax),f=a(cn(i,Lx),9),b=f.a,M=f.b+t,c=y.Math.atan2(M,b),c<0&&(c+=ax),c+=e,c>ax&&(c-=ax),Ef(),I1(1e-10),y.Math.abs(r-c)<=1e-10||r==c||isNaN(r)&&isNaN(c)?0:rc?1:Q9(isNaN(r),isNaN(c))}function qwe(t,e,n,i){var r,c;for(Ape(t,e,n,i),_nt(e,t.j-e.j+n),vnt(e,t.k-e.k+i),c=new j(e.f);c.an.k&&fb&&i>b)b=lt(n.p[f.o])+lt(n.d[f.o])+f.n.b+f.d.a;else{r=!1,t.a&&rd();break}if(!r)break}return t.a&&rd(),r}function sve(t,e){var n,i,r,c,l;for(t.c==null||t.c.lengthc*2?(v=new IN(M),b=Wu(l)/Sh(l),p=sZ(v,e,new c2,n,i,r,b),sr(Gh(v.e),p),M.c=dt(un,te,1,0,5,1),M.c[M.c.length]=v,M.c[M.c.length]=l,c=Wu(v)*Sh(v)+Wu(l)*Sh(l)):(M.c[M.c.length]=l,c+=Wu(l)*Sh(l));return M}function eE(t){switch(t){case 100:return P_(R4,!0);case 68:return P_(R4,!1);case 119:return P_(fK,!0);case 87:return P_(fK,!1);case 115:return P_(dK,!0);case 83:return P_(dK,!1);case 99:return P_(pK,!0);case 67:return P_(pK,!1);case 105:return P_(gK,!0);case 73:return P_(gK,!1);default:throw K(new sc(ezt+t.toString(16)))}}function _Nt(t,e,n){var i,r,c,l,f,p,b,v;if(e.o==0){for(e.o=1,l=n,n||(r=new Dt,c=(i=a(yu(Ia),10),new ja(i,a(cu(i,i.length),10),0)),l=new zs(r,c)),a(l.a,15).nc(e),e.j==(Ke(),rs)&&a(l.b,19).nc(a(z(e,(Ft(),wc)),69)),p=new j(e.i);p.af&&(f=r,v.c=dt(un,te,1,0,5,1)),r==f&&Ut(v,new zs(n.c.g,n)));we(),gc(v,t.c),pm(t.b,p.o,v)}}function mve(t,e){var n,i,r,c,l,f,p,b,v;for(l=new j(e.b);l.af&&(f=r,v.c=dt(un,te,1,0,5,1)),r==f&&Ut(v,new zs(n.d.g,n)));we(),gc(v,t.c),pm(t.f,p.o,v)}}function bve(t,e,n,i){var r,c,l,f,p,b,v,M,k;for(p=new We(n,i),za(p,a(z(e,(R1(),U4)),9)),k=new j(e.e);k.a=40,l&&Yve(t),z_e(t),Wbe(t),n=K6t(t),i=0;n&&i0&&Xi(t.e,c)):(t.c[l]-=b+1,t.c[l]<=0&&t.a[l]>0&&Xi(t.d,c))))}function xNt(t){var e,n,i,r,c,l,f,p,b,v,M;for(f=new Dt,c=lt(Yt(t.g.cd(t.g._b()-1))),M=t.g.tc();M.hc();)v=Yt(M.ic()),pm(f,0,c-(En(v),v));for(l=AC(qV(t)),b=new Dt,r=new j(f),p=new Dt,e=0;e1)&&e==1&&a(t.a[t.b],8).j==(Ke(),bu)?Y2(a(t.a[t.b],8),(Tu(),kd)):i&&(!n||(t.c-t.b&t.a.length-1)>1)&&e==1&&a(t.a[t.c-1&t.a.length-1],8).j==(Ke(),bu)?Y2(a(t.a[t.c-1&t.a.length-1],8),(Tu(),ag)):(t.c-t.b&t.a.length-1)==2?(Y2(a(TC(t),8),(Tu(),kd)),Y2(a(TC(t),8),ag)):qme(t,r),uct(t)}function _ve(t){var e,n;if(!t.Wb()){for(n=a(t.cd(0),151).f,new bht(t),e=new Gs(n.i,0),v_((mu(),hp),e),m_(sy,e),oP((Ht(),Tn),e),RX(rg,e),m_(nb,e),E_(kw,e),v_(Zp,e),oP(Qe,e),RX(tb,e),v_(Lw,e),E_(eb,e),v_(nb,e),oP(fi,e),RX(Yp,e),v_(sy,e),E_(Iw,e),m_(Lw,e);e.b=0&&(f=epe(t,l),!(f&&(b<22?p.l|=1<>>1,l.m=v>>>1|(M&1)<<21,l.l=k>>>1|(v&1)<<21,--b;return n&&tq(p),c&&(i?(Q1=BM(t),r&&(Q1=VPt(Q1,(IM(),u1t)))):Q1=ia(t.l,t.m,t.h)),p}function kNt(t,e,n,i){var r,c,l,f,p,b,v,M;if(vue(t,e,n),c=e[n],M=i?(Ht(),on):(Ht(),Qe),aee(e.length,n,i)){for(r=e[i?n-1:n+1],Mct(t,r,i?(Fo(),ba):(Fo(),Ga)),p=0,v=c.length;p0){for(r=f.length;r>0&&f[r-1]=="";)--r;r=0&&f!=n&&(c=new fs(t,1,f,l,null),i?i.Sh(c):i=c),n>=0&&(c=new fs(t,1,n,f==n?l:null,e),i?i.Sh(c):i=c)),i}function Ive(t,e,n,i){var r,c,l,f,p,b,v;if(U0e(t,e,n,i))return!0;for(l=new j(e.f);l.a=r){for(l=1;l0){if(r=a(t.Ab.g,1627),e==null){for(c=0;c1)for(i=new j(r);i.ae.f?1:0:(i=t.e-e.e,n=(t.d>0?t.d:y.Math.floor((t.a-1)*kOt)+1)-(e.d>0?e.d:y.Math.floor((e.a-1)*kOt)+1),n>i+1?r:n0&&(l=t_(l,GNt(i))),kIt(c,l))):rp+O&&($=M.i+k.i,k.a=(k.i*k.a+M.i*M.a)/$,k.i=$,M.g=k,n=!0)),c=f,M=k;return n}function DNt(t,e){var n,i,r,c,l,f,p,b,v;if(r=t.g,l=r.n.a,c=r.n.b,l<=0&&c<=0)return Ht(),Wc;switch(b=t.k.a,v=t.k.b,f=t.n.a,n=t.n.b,e.g){case 2:case 1:if(b<0)return Ht(),on;if(b+f>l)return Ht(),Qe;break;case 4:case 3:if(v<0)return Ht(),Tn;if(v+n>c)return Ht(),fi}return p=(b+f/2)/l,i=(v+n/2)/c,p+i<=1&&p-i<=0?(Ht(),on):p+i>=1&&p-i>=0?(Ht(),Qe):i<.5?(Ht(),Tn):(Ht(),fi)}function pht(t,e,n){var i,r,c,l;if(e[0]>=t.length)return n.o=0,!0;switch(t.charCodeAt(e[0])){case 43:r=1;break;case 45:r=-1;break;default:return n.o=0,!0}if(++e[0],c=e[0],l=x7(t,e),l==0&&e[0]==c)return!1;if(e[0]=14&&n<=16));case 11:return e!=null&&typeof e===cZ;case 12:return e!=null&&(typeof e===NP||typeof e==cZ);case 0:return Uq(e,t.__elementTypeId$);case 2:return y$(e)&&e.sl!==B;case 1:return y$(e)&&e.sl!==B||Uq(e,t.__elementTypeId$);default:return!0}}function Y2(t,e){var n,i,r,c,l,f;if(t.j==(Ke(),bu)&&(n=Sat(wo(a(z(t,(Ft(),zB)),15).xc(),new H8(new CS))).a==null?(Tu(),aI):e,Ct(t,_x,n),n!=(Tu(),ag)))for(i=a(z(t,li),14),f=lt(Yt(z(i,(qt(),up)))),l=0,n==kd?l=t.n.b-y.Math.ceil(f/2):n==aI&&(t.n.b-=lt(Yt(z(Mc(t),N6))),l=(t.n.b-y.Math.ceil(f))/2),c=new j(t.i);c.a0&&(qL(p,!1,(Js(),ah)),qL(p,!0,uh)),pd(e.g,new MMt(t,n)),wr(t.g,e,n)}function Wve(t,e){var n,i,r,c,l,f,p;for(c=0,f=0,p=0,r=new j(t.f.e);r.a0&&t.d!=(gC(),WK)&&(f+=l*(i.d.a+t.a[e.b][i.b]*(e.d.a-i.d.a)/n)),n>0&&t.d!=(gC(),HK)&&(p+=l*(i.d.b+t.a[e.b][i.b]*(e.d.b-i.d.b)/n)));switch(t.d.g){case 1:return new We(f/c,e.d.b);case 2:return new We(e.d.a,p/c);default:return new We(f/c,p/c)}}function bht(t){y6t();var e,n,i,r,c,l,f,p,b,v;for(this.b=new _3,this.c=new Dt,this.a=new Dt,p=QV(),b=0,v=p.length;b0){for(l=0;l>16==-15&&t.Cb.Hg()&&yV(new bV(t.Cb,9,13,n,t.c,Hp(Ya(a(t.Cb,53)),t))):ct(t.Cb,96)&&t.Db>>16==-23&&t.Cb.Hg()&&(e=t.c,ct(e,96)||(e=(ye(),gh)),ct(n,96)||(n=(ye(),gh)),yV(new bV(t.Cb,9,10,n,e,Hp(kc(a(t.Cb,24)),t)))))),t.c}function aw(t){Ai();var e,n,i,r,c;if(t.e!=4&&t.e!=5)throw K(new yn("Token#complementRanges(): must be RANGE: "+t.e));for(M_(t),a4(t),i=t.b.length+2,t.b[0]==0&&(i-=2),n=t.b[t.b.length-1],n==yE&&(i-=2),r=(++Ar,new Eu(4)),r.b=dt(Gn,pi,22,i,15,1),c=0,t.b[0]>0&&(r.b[c++]=0,r.b[c++]=t.b[0]-1),e=1;e=65;n--)af[n]=n-65<<24>>24;for(i=122;i>=97;i--)af[i]=i-97+26<<24>>24;for(r=57;r>=48;r--)af[r]=r-48+52<<24>>24;for(af[43]=62,af[47]=63,c=0;c<=25;c++)t1[c]=65+c&qr;for(l=26,p=0;l<=51;++l,p++)t1[l]=97+p&qr;for(t=52,f=0;t<=61;++t,f++)t1[t]=48+f&qr;t1[62]=43,t1[63]=47}function Zve(t,e){var n,i,r,c,l,f,p,b,v,M;if(l=t.d,v=a(z(t,(Ft(),xx)),15),M=0,v){for(p=0,c=v.tc();c.hc();)r=a(c.ic(),8),p=y.Math.max(p,r.n.b),M+=r.n.a;M+=e/2*(v._b()-1),l.d+=p+e}if(n=a(z(t,bx),15),i=0,n){for(p=0,c=n.tc();c.hc();)r=a(c.ic(),8),p=y.Math.max(p,r.n.b),i+=r.n.a;i+=e/2*(n._b()-1),l.a+=p+e}f=y.Math.max(M,i),f>t.n.a&&(b=(f-t.n.a)/2,l.b=y.Math.max(l.b,b),l.c=y.Math.max(l.c,b))}function Yve(t){var e,n,i,r,c,l,f;for(t.o=new IG,i=new Fr,l=new j(t.e.a);l.a0,f=JN(e,c),Hrt(n?f.b:f.g,e),d_(f).c.length==1&&Ws(i,f,i.c.b,i.c),r=new zs(c,e),kEt(t.o,r),Lc(t.e.a,c))}function UNt(t,e){var n,i,r,c,l;for(e.d?r=t.a.c==(Sf(),Qm)?Rs(e.b):br(e.b):r=t.a.c==(Sf(),Xp)?Rs(e.b):br(e.b),c=!1,i=(Ao(),new $d(id(Zd(r.a,new X))));Jn(i);)if(n=a(In(i),14),l=lt(t.a.f[t.a.g[e.b.o].o]),!(!l&&!ec(n)&&n.c.g.c==n.d.g.c)&&!(lt(t.a.n[t.a.g[e.b.o].o])||lt(t.a.n[t.a.g[e.b.o].o]))&&(c=!0,TT(t.b,t.a.g[kde(n,e.b).o])))return e.c=!0,e.a=n,e;return e.c=c,e.a=null,e}function yht(t,e){var n,i,r,c,l,f,p;if(!Tf(t))throw K(new yc(mFt));if(i=Tf(t),c=i.g,r=i.f,c<=0&&r<=0)return Ht(),Wc;switch(f=t.i,p=t.j,e.g){case 2:case 1:if(f<0)return Ht(),on;if(f+t.g>c)return Ht(),Qe;break;case 4:case 3:if(p<0)return Ht(),Tn;if(p+t.f>r)return Ht(),fi}return l=(f+t.g/2)/c,n=(p+t.f/2)/r,l+n<=1&&l-n<=0?(Ht(),on):l+n>=1&&l-n>=0?(Ht(),Qe):n<.5?(Ht(),Tn):(Ht(),fi)}function Kve(t,e){var n,i,r,c,l,f,p,b,v,M,k,I;if(t.Wb())return new go;for(b=0,M=0,r=t.tc();r.hc();)i=a(r.ic(),31),c=i.e,b=y.Math.max(b,c.a),M+=c.a*c.b;for(b=y.Math.max(b,y.Math.sqrt(M)*lt(Yt(z(a(t.tc().ic(),31),(qt(),jB))))),k=0,I=0,p=0,n=e,f=t.tc();f.hc();)l=a(f.ic(),31),v=l.e,k+v.a>b&&(k=0,I+=p+e,p=0),TP(l,k,I),n=y.Math.max(n,k+v.a),p=y.Math.max(p,v.b),k+=v.a+e;return new We(n+e,I+p+e)}function zX(t,e,n){var i,r,c,l,f,p,b,v;if(i=n._b(),i==0)return!1;if(t.ti())if(b=t.ui(),l8t(t,e,n),l=i==1?t.mi(3,null,n.tc().ic(),e,b):t.mi(5,null,n,e,b),t.qi()){for(f=i<100?null:new w1(i),c=e+i,r=e;r1)for(i=qn(r,0);i.b!=i.d.c;)for(n=a(Yn(i),202),c=0,p=new j(n.e);p.af?1:-1:Cat(t.a,e.a,c),r==-1)M=-p,v=l==p?cV(e.a,f,t.a,c):lV(e.a,f,t.a,c);else if(M=l,l==p){if(r==0)return V1(),SE;v=cV(t.a,c,e.a,f)}else v=lV(t.a,c,e.a,f);return b=new qv(M,v.length,v),aC(b),b}function GNt(t){KM();var e,n,i,r;if(e=Tr(t),t1e6)throw K(new _9("power of ten too big"));if(t<=qi)return P2(bP(dx[1],e),e);for(i=bP(dx[1],qi),r=i,n=Ka(t-qi),e=Tr(t%qi);Pc(n,qi)>0;)r=t_(r,i),n=Yg(n,qi);for(r=t_(r,bP(dx[1],e)),r=P2(r,qi),n=Ka(t-qi);Pc(n,qi)>0;)r=P2(r,qi),n=Yg(n,qi);return r=P2(r,e),r}function e_e(t,e){var n,i,r,c,l,f,p,b,v,M,k,I,O,$,G;n=hm(new Ng,t.f),b=t.i[e.c.g.o],I=t.i[e.d.g.o],p=e.c,k=e.d,f=p.a.b,M=k.a.b,b.b||(f+=p.k.b),I.b||(M+=k.k.b),v=Tr(y.Math.max(0,f-M)),l=Tr(y.Math.max(0,M-f)),O=($=Mh(1,a(z(e,(qt(),Sx)),21).a),G=oct(e.c.g.j,e.d.g.j),$*G),r=ih($l(Wl(Gl(Vl(new cl,O),l),n),a(zi(t.k,e.c),113))),c=ih($l(Wl(Gl(Vl(new cl,O),v),n),a(zi(t.k,e.d),113))),i=new SMt(r,c),t.c[e.o]=i}function HX(t){var e,n,i,r,c,l,f,p,b,v,M,k,I;if(n=t.i,e=t.n,t.b==0)for(I=n.c+e.b,k=n.b-e.b-e.c,l=t.a,p=0,v=l.length;p0&&(M-=i[0]+t.c,i[0]+=t.c),i[2]>0&&(M-=i[2]+t.c),i[1]=y.Math.max(i[1],M),zD(t.a[1],n.c+e.b+i[0]-(i[1]-M)/2,i[1]);for(c=t.a,f=0,b=c.length;f0&&(e[0]+=t.c,M-=e[0]),e[2]>0&&(M-=e[2]+t.c),e[1]=y.Math.max(e[1],M),UD(t.a[1],i.d+n.d+e[0]-(e[1]-M)/2,e[1]);else for(O=i.d+n.d,I=i.a-n.d-n.a,l=t.a,p=0,v=l.length;p>>0).toString(16),n="\\x"+$h(e,e.length-2,e.length)):t>=ao?(e="0"+(t>>>0).toString(16),n="\\v"+$h(e,e.length-6,e.length)):n=""+String.fromCharCode(t&qr)}return n}function xht(t){var e,n,i,r,c,l;for(krt(this),n=t._b()-1;n<3;n++)t.bd(0,a(t.cd(0),9));if(t._b()<4)throw K(new yn("At (least dimension + 1) control points are necessary!"));for(this.c=3,this.e=!0,this.f=!0,this.d=!1,Ame(this,t._b()+this.c-1),l=new Dt,c=this.g.tc(),e=0;e=0&&c!=n))throw K(new yn(i6));for(r=0,p=0;plt(Wh(l.g,l.d[0]).a)?(Hn(p.b>0),p.a.cd(p.c=--p.b),cd(p,l),r=!0):f.e&&f.e._b()>0&&(c=(!f.e&&(f.e=new Dt),f.e).vc(e),b=(!f.e&&(f.e=new Dt),f.e).vc(n),(c||b)&&((!f.e&&(f.e=new Dt),f.e).nc(l),++l.c));r||(i.c[i.c.length]=l)}function o_e(t,e,n){var i,r,c,l,f,p;for(i=0,c=new $n((!t.a&&(t.a=new Wt(zr,t,10,11)),t.a));c.e!=c.i._b();)r=a(ci(c),35),l="",(!r.n&&(r.n=new Wt(ic,r,1,7)),r.n).i==0||(l=a(a(at((!r.n&&(r.n=new Wt(ic,r,1,7)),r.n),0),137),263).a),f=new YCt(l),Uo(f,r),Ct(f,(R1(),px),r),f.b=i++,f.d.a=r.i+r.g/2,f.d.b=r.j+r.f/2,f.e.a=y.Math.max(r.g,1),f.e.b=y.Math.max(r.f,1),Ut(e.e,f),Cu(n.d,r,f),p=a(cn(r,(Ph(),vgt)),83),p==(Ls(),ob)}function c_e(t,e,n,i){var r,c,l,f,p,b,v;if(n.c.g!=e.g)for(r=new Jh(t),jl(r,(Ke(),Hr)),Ct(r,(Ft(),li),n),Ct(r,(qt(),Qi),(Ls(),Gc)),i.c[i.c.length]=r,l=new Eo,ds(l,r),yr(l,(Ht(),on)),f=new Eo,ds(f,r),yr(f,Qe),Ts(n,l),c=new Np,Uo(c,n),Ct(c,Ro,null),Hs(c,f),Ts(c,e),H9t(r,l,f),b=new Gs(n.b,0);b.b0&&(p=f/60|0,b=f%60,r=t.q.getDate(),n=t.q.getHours(),n+p>=24&&++r,c=new y.Date(t.q.getFullYear(),t.q.getMonth(),r,e+p,t.q.getMinutes()+b,t.q.getSeconds(),t.q.getMilliseconds()),t.q.setTime(c.getTime()))),l=t.q.getTime(),t.q.setTime(l+36e5),t.q.getHours()!=e&&t.q.setTime(l)}function a_e(t,e){var n,i,r,c,l,f,p,b,v;for(di(e,"Layer constraint edge reversal",1),l=new j(t.b);l.an){Vn(e);return}switch(a(z(t,(qt(),XJ)),319).g){case 2:c=new Fc;break;case 0:c=new Bd;break;default:c=new mf}if(i=c.sf(t,r),!c.tf())switch(a(z(t,ubt),347).g){case 2:i=N_e(r,i);break;case 1:i=A1e(r,i)}Q_e(t,r,i),Vn(e)}function VNt(t,e,n){var i,r,c,l;return t.ti()?(r=null,c=t.ui(),i=t.mi(1,l=EV(t,e,n),n,e,c),t.qi()&&!(t.Bh()&&l!=null?Fi(l,n):zt(l)===zt(n))?(l!=null&&(r=t.si(l,null)),r=t.ri(n,r),t.xi()&&(r=t.Ai(l,n,r)),r?(r.Sh(i),r.Th()):t.ni(i)):(t.xi()&&(r=t.Ai(l,n,null)),r?(r.Sh(i),r.Th()):t.ni(i)),l):(l=EV(t,e,n),t.qi()&&!(t.Bh()&&l!=null?Fi(l,n):zt(l)===zt(n))&&(r=null,l!=null&&(r=t.si(l,null)),r=t.ri(n,r),r&&r.Th()),l)}function $X(t){var e,n,i,r,c,l,f;if(!t.d){if(f=new IR,e=AA,c=e.a.Zb(t,e),c==null){for(i=new $n(Bo(t));i.e!=i.i._b();)n=a(ci(i),24),Lr(f,$X(n));e.a.$b(t)!=null,e.a._b()==0}for(l=f.i,r=(!t.q&&(t.q=new Wt(ph,t,11,10)),new $n(t.q));r.e!=r.i._b();++l)a(ci(r),371);Lr(f,(!t.q&&(t.q=new Wt(ph,t,11,10)),t.q)),Qb(f),t.d=new Uv((a(at(Et((T1(),Ae).o),9),17),f.i),f.g),t.e=a(f.g,611),t.e==null&&(t.e=Wqt),pl(t).b&=-17}return t.d}function s4(t,e,n,i){var r,c,l,f,p,b;if(b=gu(t.e.mg(),e),p=0,r=a(t.g,124),Jo(),a(e,61).bj()){for(l=0;l1&&(p>Wu(f)*Sh(f)/2||l.b==0)&&(M=new IN(k),v=Wu(f)/Sh(f),b=sZ(M,e,new c2,n,i,r,v),sr(Gh(M.e),b),f=M,I.c[I.c.length]=M,p=0,k.c=dt(un,te,1,0,5,1)));return Or(I,k),I}function f_e(t,e){var n,i,r,c,l,f,p,b,v;for(di(e,"Hierarchical port dummy size processing",1),p=new Dt,v=new Dt,i=lt(Yt(z(t,(qt(),Tx)))),n=i*2,c=new j(t.b);c.a=G&&t.e[p.o]>O*t.b||pt>=n*G)&&(k.c[k.c.length]=f,f=new Dt,yo(l,c),c.a.Pb(),b-=v,I=y.Math.max(I,b*t.b+$),b+=pt,rt=pt,pt=0,v=0,$=0);return new zs(I,k)}function g_e(t){var e,n,i,r,c,l,f,p,b,v,M,k;for(e=z9t(t),v=(f=new Sv(e).a.Tb().tc(),new f5(f));v.a.hc();){for(b=(r=a(v.a.ic(),38),a(r.kc(),8)),M=b.d.d,k=b.n.b+b.d.a,t.d[b.o]=0,n=b;(c=t.a[n.o])!=b;)i=she(n,c),t.c==(Sf(),Xp)?p=i.d.k.b+i.d.a.b-i.c.k.b-i.c.a.b:p=i.c.k.b+i.c.a.b-i.d.k.b-i.d.a.b,l=lt(t.d[n.o])+p,t.d[c.o]=l,M=y.Math.max(M,c.d.d-l),k=y.Math.max(k,l+c.n.b+c.d.a),n=c;n=b;do t.d[n.o]=lt(t.d[n.o])+M,n=t.a[n.o];while(n!=b);t.b[b.o]=M+k}}function Mht(t,e,n){var i,r,c,l,f,p,b,v,M,k;for(m6t(this),n==(vm(),sg)?Ir(this.o,t):Ir(this.t,t),v=is,b=Ps,l=e.a.Xb().tc();l.hc();)r=a(l.ic(),48),f=a(r.a,417),i=a(r.b,14),p=i.c,p==t&&(p=i.d),f==sg?Ir(this.o,p):Ir(this.t,p),k=zo(Y(Z(ss,1),wt,9,0,[p.g.k,p.k,p.a])).b,v=y.Math.min(v,k),b=y.Math.max(b,k);for(M=zo(Y(Z(ss,1),wt,9,0,[t.g.k,t.k,t.a])).b,E8t(this,M,v,b),c=e.a.Xb().tc();c.hc();)r=a(c.ic(),48),A9t(this,a(r.b,14));this.k=!1}function m_e(t){var e,n,i,r;if(i=oZ((!t.c&&(t.c=XL(t.f)),t.c),0),t.e==0||t.a==0&&t.f!=-1&&t.e<0)return i;if(e=Gct(t)<0?1:0,n=t.e,r=(i.length+1+Z3(Tr(t.e)),new Bb),e==1&&(r.a+="-"),t.e>0)if(n-=i.length-e,n>=0){for(r.a+="0.";n>b0.length;n-=b0.length)XTt(r,b0);ISt(r,b0,Tr(n)),Ii(r,i.substr(e,i.length-e))}else n=e-n,Ii(r,$h(i,e,Tr(n))),r.a+=".",Ii(r,oL(i,Tr(n)));else{for(Ii(r,i.substr(e,i.length-e));n<-b0.length;n+=b0.length)XTt(r,b0);ISt(r,b0,Tr(-n))}return r.a}function Hc(t,e){var n,i,r,c,l,f,p;if(t==null)return null;if(c=t.length,c==0)return"";for(p=dt(el,Pf,22,c,15,1),Ect(0,c,t.length),Ect(0,c,p.length),NCt(t,0,c,p,0),n=null,f=e,r=0,l=0;r0?$h(n.a,0,c-1):""):t.substr(0,c-1):n?n.a:t}function b_e(t){var e,n,i,r,c,l,f,p,b,v,M,k,I;for(n=(b=new vf(t.c.b).a.Tb().tc(),new nm(b));n.a.hc();)e=(f=a(n.a.ic(),38),a(f.lc(),180)),r=e.a,r==null&&(r=""),i=Vee(t.c,r),!i&&r.length==0&&(i=ohe(t)),i&&!U2(i.c,e,!1)&&Xi(i.c,e);for(l=qn(t.a,0);l.b!=l.d.c;)c=a(Yn(l),436),v=dct(t.c,c.a),I=dct(t.c,c.b),v&&I&&Xi(v.c,new zs(I,c.c));for(ld(t.a),k=qn(t.b,0);k.b!=k.d.c;)M=a(Yn(k),436),e=$ee(t.c,M.a),p=dct(t.c,M.b),e&&p&&$Qt(e,p,M.c);ld(t.b)}function w_e(t,e,n){var i,r,c,l,f,p,b,v,M;for(p=n+e.c.c.a,M=new j(e.i);M.a1,f=new Up(v.c);Qo(f.a)||Qo(f.b);)l=a(Qo(f.a)?H(f.a):H(f.b),14),b=l.c==v?l.d:l.c,y.Math.abs(zo(Y(Z(ss,1),wt,9,0,[b.g.k,b.k,b.a])).b-c.b)>1&&Tbe(t,l,c,r,v)}}function c4(t){var e,n,i,r,c,l,f,p;if(!t.f){if(p=new PR,f=new PR,e=AA,l=e.a.Zb(t,e),l==null){for(c=new $n(Bo(t));c.e!=c.i._b();)r=a(ci(c),24),Lr(p,c4(r));e.a.$b(t)!=null,e.a._b()==0}for(i=(!t.s&&(t.s=new Wt(Ra,t,21,17)),new $n(t.s));i.e!=i.i._b();)n=a(ci(i),158),ct(n,62)&&ni(f,a(n,17));Qb(f),t.r=new QTt(t,(a(at(Et((T1(),Ae).o),6),17),f.i),f.g),Lr(p,t.r),Qb(p),t.f=new Uv((a(at(Et(Ae.o),5),17),p.i),p.g),pl(t).b&=-3}return t.f}function v_e(t){var e,n,i,r,c,l,f,p,b,v,M,k,I,O;for(l=t.o,i=dt(Gn,pi,22,l,15,1),r=dt(Gn,pi,22,l,15,1),n=t.p,e=dt(Gn,pi,22,n,15,1),c=dt(Gn,pi,22,n,15,1),b=0;b=0&&!p_(t,v,M);)--M;r[v]=M}for(I=0;I=0&&!p_(t,f,O);)--f;c[O]=f}for(p=0;pe[k]&&ki[p]&&U7(t,p,k,!1,!0)}function G7(){G7=P,kvt=Y(Z(el,1),Pf,22,15,[48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70]),yqt=new RegExp(`[ -\r\f]+`);try{SA=Y(Z(F3e,1),te,1699,0,[new n2((art(),i7("yyyy-MM-dd'T'HH:mm:ss'.'SSSZ",rL((Hh(),Hh(),N4))))),new n2(i7("yyyy-MM-dd'T'HH:mm:ss'.'SSS",rL(N4))),new n2(i7("yyyy-MM-dd'T'HH:mm:ss",rL(N4))),new n2(i7("yyyy-MM-dd'T'HH:mm",rL(N4))),new n2(i7("yyyy-MM-dd",rL(N4)))])}catch(t){if(t=vr(t),!ct(t,78))throw K(t)}}function qNt(t,e){var n,i,r,c,l;switch(c=new Va,t.a.g){case 1:case 3:yo(c,e.e.a),Xi(c,e.i.k),yo(c,Cm(e.j.a)),Xi(c,e.a.k),yo(c,e.f.a);break;default:yo(c,e.e.a),yo(c,Cm(e.j.a)),yo(c,e.f.a)}ld(e.f.a),yo(e.f.a,c),Hs(e.f,e.e.c),n=a(z(e.e,(qt(),Ro)),74),r=a(z(e.j,Ro),74),i=a(z(e.f,Ro),74),(n||r||i)&&(l=new Va,got(l,i),got(l,r),got(l,n),Ct(e.f,Ro,l)),Hs(e.j,null),Ts(e.j,null),Hs(e.e,null),Ts(e.e,null),Ks(e.a,null),Ks(e.i,null),e.g&&qNt(t,e.g)}function XNt(t){p2(t,new __(f2(u2(h2(l2(new Z0,c0),"ELK DisCo"),"Layouter for arranging unconnected subgraphs. The subgraphs themselves are, by default, not laid out."),new Bs))),pe(t,c0,JZ,Xe(dgt)),pe(t,c0,QZ,Xe(OK)),pe(t,c0,aE,Xe(tjt)),pe(t,c0,rx,Xe(fgt)),pe(t,c0,uft,Xe(rjt)),pe(t,c0,lft,Xe(ijt)),pe(t,c0,aft,Xe(sjt)),pe(t,c0,hft,Xe(njt)),pe(t,c0,dft,Xe(ejt)),pe(t,c0,pft,Xe(NK)),pe(t,c0,gft,Xe(hgt)),pe(t,c0,mft,Xe(sB))}function __e(t,e,n){var i,r,c,l,f,p,b,v,M;for(l=new GRt,b=Y(Z(Gn,1),pi,22,15,[0]),r=-1,c=0,i=0,p=0;p0){if(r<0&&v.a&&(r=p,c=b[0],i=0),r>=0){if(f=v.b,p==r&&(f-=i++,f==0))return 0;if(!Z7t(e,b,v,f,l)){p=r-1,b[0]=c;continue}}else if(r=-1,!Z7t(e,b,v,0,l))return 0}else{if(r=-1,v.c.charCodeAt(0)==32){if(M=b[0],ELt(e,b),b[0]>M)continue}else if(Rse(e,v.c,b[0])){b[0]+=v.c.length;continue}return 0}return V2e(l,n)?b[0]:0}function y_e(t,e,n){var i,r,c,l,f;if(i=a(z(t,(qt(),zJ)),19),n.a>e.a&&(i.pc((XM(),MB))?t.c.a+=(n.a-e.a)/2:i.pc(EB)&&(t.c.a+=n.a-e.a)),n.b>e.b&&(i.pc((XM(),TB))?t.c.b+=(n.b-e.b)/2:i.pc(SB)&&(t.c.b+=n.b-e.b)),a(z(t,(Ft(),Qc)),19).pc((So(),Al))&&(n.a>e.a||n.b>e.b))for(f=new j(t.a);f.ae.a&&(i.pc((XM(),MB))?t.c.a+=(n.a-e.a)/2:i.pc(EB)&&(t.c.a+=n.a-e.a)),n.b>e.b&&(i.pc((XM(),TB))?t.c.b+=(n.b-e.b)/2:i.pc(SB)&&(t.c.b+=n.b-e.b)),a(z(t,(Ft(),Qc)),19).pc((So(),Al))&&(n.a>e.a||n.b>e.b))for(l=new j(t.a);l.aI||i+r>b)throw K(new p9);if(!(M.i&1)&&k!=p)if(v=r_(t),c=r_(n),zt(t)===zt(n)&&ei;)Vr(c,f,v[--e]);else for(f=i+r;i0&&Tut(t,e,n,i,r,!0)}function E_e(t,e,n){var i,r,c,l,f,p,b,v,M,k;for(v=new GD(new Av(n)),f=dt(Ol,a0,22,t.f.e.c.length,16,1),hot(f,f.length),n[e.b]=0,b=new j(t.f.e);b.a=t.b.length?(c[r++]=l.b[i++],c[r++]=l.b[i++]):i>=l.b.length?(c[r++]=t.b[n++],c[r++]=t.b[n++]):l.b[i]=f?lV(t.a,c,e.a,f):lV(e.a,f,t.a,c);else{if(r=c!=f?c>f?1:-1:Cat(t.a,e.a,c),r==0)return V1(),SE;r==1?(k=l,M=cV(t.a,c,e.a,f)):(k=p,M=cV(e.a,f,t.a,c))}return b=new qv(k,M.length,M),aC(b),b}function KNt(t,e){var n,i,r,c,l,f;for(l=new qg(new xp(t.f.b).a);l.b;){if(c=Sm(l),r=a(c.kc(),536),e==1){if(r.Je()!=(Js(),cg)&&r.Je()!=fp)continue}else if(r.Je()!=(Js(),ah)&&r.Je()!=uh)continue;switch(i=a(a(c.lc(),48).b,80),f=a(a(c.lc(),48).a,172),n=f.c,r.Je().g){case 2:i.g.c=t.e.a,i.g.b=y.Math.max(1,i.g.b+n);break;case 1:i.g.c=i.g.c+n,i.g.b=y.Math.max(1,i.g.b-n);break;case 4:i.g.d=t.e.b,i.g.a=y.Math.max(1,i.g.a+n);break;case 3:i.g.d=i.g.d+n,i.g.a=y.Math.max(1,i.g.a-n)}}}function JNt(t,e,n,i){var r,c,l,f,p,b,v;if(c=YN(i),f=lt(de(z(i,(qt(),Wmt)))),(f||lt(de(z(t,VB))))&&!Gd(a(z(t,Qi),83)))r=nP(c),p=ght(t,n,n==(Fo(),ba)?r:tP(r));else switch(p=new Eo,ds(p,t),e?(v=p.k,v.a=e.a-t.k.a,v.b=e.b-t.k.b,I8t(v,0,0,t.n.a,t.n.b),yr(p,DNt(p,c))):(r=nP(c),yr(p,n==(Fo(),ba)?r:tP(r))),l=a(z(i,(Ft(),Qc)),19),b=p.i,c.g){case 2:case 1:(b==(Ht(),Tn)||b==fi)&&l.nc((So(),J_));break;case 4:case 3:(b==(Ht(),Qe)||b==on)&&l.nc((So(),J_))}return p}function A_e(t,e){var n,i,r,c,l,f,p,b,v,M,k,I,O,$;for(f=dt(Gn,pi,22,e.b.c.length,15,1),b=dt(ZK,jt,232,e.b.c.length,0,1),p=dt(Cl,Ih,8,e.b.c.length,0,1),M=t.a,k=0,I=M.length;k0&&p[i]&&(O=Hv(t.b,p[i],r)),$=y.Math.max($,r.c.c.b+O);for(c=new j(v.f);c.a"}p!=null&&(e.a+=""+p)}else t.e?(f=t.e.zb,f!=null&&(e.a+=""+f)):(e.a+="?",t.b?(e.a+=" super ",YX(t.b,e)):t.f&&(e.a+=" extends ",YX(t.f,e)))}function k_e(t,e){var n,i,r,c,l,f,p,b;for(t.f=e,t.d=a(z(t.f,(BL(),xgt)),348),t.g=a(z(t.f,Tgt),21).a,t.e=lt(Yt(z(t.f,Mgt))),t.c=lt(Yt(z(t.f,hB))),S$(t.b),i=new j(t.f.c);i.a=0)return!1;if(n.e&&r==(Ke(),Jc)&&r!=n.e)return!1;if(e.o=n.b,Ut(n.f,e),n.e=r,r==(Ke(),Hr)||r==uc||r==Jc){for(l=new j(e.i);l.a0&&i<=r?(b-=i,c=f,l=f):(t.a==null&&hX(t),t.a[l]&&(b+=r,c=l)),c>0){Ut(M,Xt(c)),f=-1,v=!1;do if(n.hc())p=Xt(a(n.ic(),21).a+b);else break t;while(p.a<=l)}}else if(t.a==null&&hX(t),t.a[l]&&(f=l),l==p.a)if(t.a==null&&hX(t),t.a[l])if(M.c[M.c.length]=p,f=-1,n.hc())p=Xt(a(n.ic(),21).a+b);else break;else v=!0;++l}return M}function e7t(t){var e,n,i,r;return t.Db&64?yq(t):(e=new ll(ppt),i=t.k,i?Ii(Ii((e.a+=' "',e),i),'"'):(!t.n&&(t.n=new Wt(ic,t,1,7)),t.n.i>0&&(r=(!t.n&&(t.n=new Wt(ic,t,1,7)),a(a(at(t.n,0),137),263)).a,!r||Ii(Ii((e.a+=' "',e),r),'"'))),n=(!t.b&&(t.b=new pn(Si,t,4,7)),!(t.b.i<=1&&(!t.c&&(t.c=new pn(Si,t,5,8)),t.c.i<=1))),n?e.a+=" [":e.a+=" ",Ii(e,OW(new A5(Rc),new $n(t.b))),n&&(e.a+="]"),e.a+=" -> ",n&&(e.a+="["),Ii(e,OW(new A5(Rc),new $n(t.c))),n&&(e.a+="]"),e.a)}function O_e(t){var e,n,i,r,c,l;for(r=new Dt,l=new j(t.c.i);l.at.n.b||(n=ac(t,Qe),f=e.d+e.a+(n._b()-1)*l,f>t.n.b)))}function tZ(t,e,n){var i,r,c,l,f,p,b,v;return i=t.a.o==(Zh(),rf)?is:Ps,f=UNt(t,new LMt(e,n)),!f.a&&f.c?(Xi(t.c,f),i):f.a?(r=f.a.c,p=f.a.d,n?(b=t.a.c==(Sf(),Qm)?p:r,c=t.a.c==Qm?r:p,l=t.a.g[c.g.o],v=lt(t.a.p[l.o])+lt(t.a.d[c.g.o])+c.k.b+c.a.b-lt(t.a.d[b.g.o])-b.k.b-b.a.b):(b=t.a.c==(Sf(),Xp)?p:r,c=t.a.c==Xp?r:p,v=lt(t.a.p[t.a.g[c.g.o].o])+lt(t.a.d[c.g.o])+c.k.b+c.a.b-lt(t.a.d[b.g.o])-b.k.b-b.a.b),t.a.n[t.a.g[r.g.o].o]=(me(),me(),!0),t.a.n[t.a.g[p.g.o].o]=!0,v):i}function eZ(t,e,n,i,r,c,l){var f,p,b,v,M,k,I;return M=lt(de(z(e,(qt(),$mt)))),k=null,c==(Fo(),Ga)&&i.c.g==n?k=i.c:c==ba&&i.d.g==n&&(k=i.d),b=l,!l||!M||k?(v=(Ht(),Wc),k?v=k.i:Gd(a(z(n,Qi),83))&&(v=c==Ga?on:Qe),p=Y_e(t,e,n,c,v,i),f=uV((Mc(n),i)),c==Ga?(Hs(f,a(Ee(p.i,0),11)),Ts(f,r)):(Hs(f,r),Ts(f,a(Ee(p.i,0),11))),b=new H6t(i,f,p,a(z(p,(Ft(),li)),11),c,!k)):(Ut(l.e,i),I=y.Math.max(lt(Yt(z(l.d,up))),lt(Yt(z(i,up)))),Ct(l.d,up,I)),cr(t.a,i,new MD(b.d,e,c)),b}function i7t(t,e){var n,i,r,c,l,f,p,b,v,M;if(Ct(e,(mc(),NE),0),p=a(z(e,hF),76),e.d.b==0)p?(v=lt(Yt(z(p,Kp)))+t.a+pct(p,e),Ct(e,Kp,v)):Ct(e,Kp,0);else{for(i=(c=qn(new Hd(e).a.d,0),new Ob(c));k9(i.a);)n=a(Yn(i.a),170).c,i7t(t,n);f=a(wD((l=qn(new Hd(e).a.d,0),new Ob(l))),76),M=a(mne((r=qn(new Hd(e).a.d,0),new Ob(r))),76),b=(lt(Yt(z(M,Kp)))+lt(Yt(z(f,Kp))))/2,p?(v=lt(Yt(z(p,Kp)))+t.a+pct(p,e),Ct(e,Kp,v),Ct(e,NE,lt(Yt(z(e,Kp)))-b),Hye(t,e)):Ct(e,Kp,b)}}function U_e(t,e){var n,i,r,c,l,f,p,b,v;if(b=a(z(t,(Ft(),wc)),69),i=a(Ee(t.i,0),11),b==(Ht(),Tn)?yr(i,fi):b==fi&&yr(i,Tn),a(z(e,(qt(),Ew)),185).pc((Ku(),E0))){if(p=lt(Yt(z(t,tA))),l=lt(Yt(z(t,Cx))),f=a(z(e,Ex),275),f==(Kh(),cb))for(n=p,v=t.n.a/2-i.k.a,c=new j(i.e);c.a0&&i>=-6?i>=0?bL(c,n-Tr(t.e),"."):(c.a=$h(c.a,0,e-1)+"0."+oL(c.a,e-1),bL(c,e+1,ml(b0,0,-Tr(i)-1))):(n-e>=1&&(bL(c,e,"."),++n),bL(c,n,"E"),i>0&&bL(c,++n,"+"),bL(c,++n,""+RD(Ka(i)))),t.g=c.a,t.g))}function s7t(t,e,n){var i,r,c,l;this.j=t,this.e=blt(t),this.o=a(z(this.j,(Ft(),tg)),8),this.i=!!this.o,this.p=this.i?a(Ee(n,Mc(this.o).o),204):null,r=a(z(t,Qc),19),this.g=r.pc((So(),Al)),this.b=new Dt,this.d=new xIt(this.e),l=a(z(this.j,IE),214),this.q=nle(e,l,this.e),this.k=new pAt(this),c=Vg(Y(Z(Kjt,1),te,208,0,[this,this.d,this.k,this.q])),e==(Tm(),nF)?(i=new YPt(this.e),c.c[c.c.length]=i,this.c=new YAt(i,l,a(this.q,422))):this.c=new EMt(e,this),Ut(c,this.c),n7t(c,this.e),this.s=xxe(this.k)}function j_e(t,e){var n,i,r,c;return n=new vn,i=a(hd(Vh(new gi(null,new Ei(t.f,16)),n),e_(new ti,new Qn,new Kt,new kt,Y(Z(tf,1),jt,150,0,[(z1(),bw),Qh]))),19),r=i._b(),r=r==2?1:0,r==1&&zb(eP(a(hd(wo(i.uc(),new he),kPt(Qg(0),new ki)),149).a,2),0)&&(r=0),i=a(hd(Vh(new gi(null,new Ei(e.f,16)),n),e_(new ti,new Qn,new Kt,new kt,Y(Z(tf,1),jt,150,0,[bw,Qh]))),19),c=i._b(),c=c==2?1:0,c==1&&zb(eP(a(hd(wo(i.uc(),new Mn),kPt(Qg(0),new ki)),149).a,2),0)&&(c=0),r=t.b[r+1])r+=2;else if(n0)for(i=new Eh(a(rr(t.a,c),19)),we(),gc(i,new $8(e)),r=new Gs(c.b,0);r.b=ao?mo(n,qat(i)):gM(n,i&qr),l=(++Ar,new q$(10,null,0)),Ore(t.a,l,f-1)):(n=(l.ll().length+c,new wT),mo(n,l.ll())),e.e==0?(i=e.jl(),i>=ao?mo(n,qat(i)):gM(n,i&qr)):mo(n,e.ll()),a(l,474).b=n.a}}function q_e(t,e){var n,i,r,c,l,f,p,b,v,M,k,I;if(di(e,"Edge splitting",1),t.b.c.length<=2){Vn(e);return}for(c=new Gs(t.b,0),l=(Hn(c.bIt)?(p=2,l=qi):p==0?(p=1,l=Zt):(p=0,l=Zt)):(I=Zt>=l||l-Zt0?(r=i+(O-1)*n,M&&(r+=i),r0){a7(t,n,0),n.a+=String.fromCharCode(i),r=dle(e,c),a7(t,n,r),c+=r-1;continue}i==39?c+10){if(e=new grt(t.i,t.g),n=t.i,c=n<100?null:new w1(n),t.xi())for(i=0;i0){for(f=t.g,b=t.i,dC(t),c=b<100?null:new w1(b),i=0;i0)if(e=new lat(t.Uh()),r=p<100?null:new w1(p),nL(t,p,e.g),i=p==1?t.mi(4,at(e,0),null,0,f):t.mi(6,e,null,-1,f),t.qi()){for(n=new $n(e);n.e!=n.i._b();)r=t.si(ci(n),r);r?(r.Sh(i),r.Th()):t.ni(i)}else r?(r.Sh(i),r.Th()):t.ni(i);else nL(t,t.hi(),t.ii()),t.ni(t.mi(6,(we(),fo),null,-1,f));else if(t.qi())if(p=t.hi(),p>0){for(l=t.ii(),nL(t,p,l),r=p<100?null:new w1(p),n=0;n>13|(t.m&15)<<9,r=t.m>>4&8191,c=t.m>>17|(t.h&255)<<5,l=(t.h&1048320)>>8,f=e.l&8191,p=e.l>>13|(e.m&15)<<9,b=e.m>>4&8191,v=e.m>>17|(e.h&255)<<5,M=(e.h&1048320)>>8,ce=n*f,ae=i*f,Te=r*f,Me=c*f,Bn=l*f,p!=0&&(ae+=n*p,Te+=i*p,Me+=r*p,Bn+=c*p),b!=0&&(Te+=n*b,Me+=i*b,Bn+=r*b),v!=0&&(Me+=n*v,Bn+=i*v),M!=0&&(Bn+=n*M),I=ce&eu,O=(ae&511)<<13,k=I+O,G=ce>>22,et=ae>>9,rt=(Te&262143)<<4,pt=(Me&31)<<17,$=G+et+rt+pt,It=Te>>18,Gt=Me>>5,Zt=(Bn&4095)<<8,_t=It+Gt+Zt,$+=k>>22,k&=eu,_t+=$>>22,$&=eu,_t&=sp,ia(k,$,_t)}function a7t(t,e){var n,i,r,c,l;n=lt(Yt(z(e,(qt(),nf)))),n<2&&Ct(e,nf,2),i=a(z(e,ch),110),i==(Js(),Ff)&&Ct(e,ch,YN(e)),r=a(z(e,GGt),21),r.a==0?Ct(e,(Ft(),IE),new Sq):Ct(e,(Ft(),IE),new aN(r.a)),c=de(z(e,K4)),c==null&&Ct(e,K4,(me(),zt(z(e,ig))===zt((gd(),zE)))),l=new R8t(e),Ct(e,(Ft(),yw),l),Jot(t.a),qb(t.a,(Mo(),Of),a(z(e,kmt),285)),qb(t.a,gx,a(z(e,Gmt),285)),qb(t.a,aa,a(z(e,RE),285)),qb(t.a,ua,a(z(e,XB),285)),qb(t.a,Yo,lle(a(z(e,ig),197))),LEt(t.a,Cxe(e)),Ct(e,NJ,Aht(t.a,e))}function u7t(t,e){var n,i,r,c,l,f,p,b,v,M;if(p=e.length-1,f=e.charCodeAt(p),f==93){if(l=Mf(e,Ca(91)),l>=0)return r=Ihe(t,e.substr(1,l-1)),v=e.substr(l+1,p-(l+1)),dxe(t,v,r)}else{if(n=-1,/\d/.test(String.fromCharCode(f))&&(n=lst(e,Ca(46),p-1),n>=0)){i=a(wct(t,pLt(t,e.substr(1,n-1)),!1),52);try{b=Au(e.substr(n+1,e.length-(n+1)),Vs,qi)}catch(k){throw k=vr(k),ct(k,118)?(c=k,K(new xN(c))):K(k)}if(b4)if(t.Li(e)){if(t.Dj()){if(r=a(e,42),i=r.ng(),p=i==t.e&&(t.Pj()?r.hg(r.og(),t.Lj())==t.Mj():-1-r.og()==t.pi()),t.Qj()&&!p&&!i&&r.sg()){for(c=0;c=G-1)return null;for(r=new Dt,r.c[r.c.length]=e,_t=e,l=n,O=-1,f=a(Ee(t.d.c.b,n),26),I=0;I1&&l0&&(b=t.k.a/c);break;case 2:case 4:r=t.g.n.b,r>0&&(b=t.k.b/r)}Ct(t,(Ft(),Ym),b)}if(p=t.n,l=t.a,i)l.a=i.a,l.b=i.b,t.b=!0;else if(e!=dp&&e!=ob&&f!=Wc)switch(f.g){case 1:l.a=p.a/2;break;case 2:l.a=p.a,l.b=p.b/2;break;case 3:l.a=p.a/2,l.b=p.b;break;case 4:l.b=p.b/2}else l.a=p.a/2,l.b=p.b/2}function hye(t,e,n){var i,r,c,l,f,p,b,v,M,k,I,O;for(di(n,dBt,1),t.c=e,k=t.c.a,c=0,b=new j(k);b.aO){for(I=1,r=f.n.a;r>l;)++I,r=(f.n.a-(I-1)*t.d)/I;Ut(i,new Dkt(t,f,I,r))}for(p=new j(i);p.a1&&Wu(l)*Sh(l)/2>f[0]){for(c=0;c<$.c.length-1&&Wu(l)*Sh(l)/2>f[c];)++c;O=new C1($,0,c+1),M=new IN(O),v=Wu(l)/Sh(l),p=sZ(M,e,new c2,n,i,r,v),sr(Gh(M.e),p),LM(ZM(k,M)),I=new C1($,c+1,$.c.length),zct(k,I),$.c=dt(un,te,1,0,5,1),b=0,SCt(f,f.length,0)}else G=k.b.c.length==0?null:Ee(k.b,0),G!=null&&sat(k,0),b>0&&(f[b]=f[b-1]),f[b]+=Wu(l)*Sh(l),++b,$.c[$.c.length]=l;return $}function Aht(t,e){var n,i,r,c,l,f,p,b,v,M,k;if(t.e&&t.c.c.5?et-=l*2*(O-.5):O<.5&&(et+=c*2*(.5-O)),r=f.d.b,etG.a-$-v&&(et=G.a-$-v),f.k.a=e+et}}function h7t(t,e){var n,i,r,c,l;for(l=new j(t.i);l.a0&&$8t(t,f,M);for(r=new j(M);r.a0&&(t.a=p+(I-1)*c,e.c.b+=t.a,e.e.b+=t.a)),O.a._b()!=0&&(k=new lX(1,c),I=Eht(k,e,O,$,e.e.b+p-e.c.b),I>0&&(e.e.b+=p+(I-1)*c))}function Lht(t,e,n){var i,r,c,l,f,p;if(e.l==0&&e.m==0&&e.h==0)throw K(new _9("divide by zero"));if(t.l==0&&t.m==0&&t.h==0)return n&&(Q1=ia(0,0,0)),ia(0,0,0);if(e.h==UP&&e.m==0&&e.l==0)return $he(t,n);if(p=!1,e.h>>19&&(e=BM(e),p=!0),l=tbe(e),c=!1,r=!1,i=!1,t.h==UP&&t.m==0&&t.l==0)if(r=!0,c=!0,l==-1)t=SEt((IM(),a1t)),i=!0,p=!p;else return f=Rlt(t,l),p&&tq(f),n&&(Q1=ia(0,0,0)),f;else t.h>>19&&(c=!0,t=BM(t),i=!0,p=!p);return l!=-1?Cle(t,l,p,c,n):But(t,e)<0?(n&&(c?Q1=BM(t):Q1=ia(t.l,t.m,t.h)),ia(0,0,0)):Eve(i?t:ia(t.l,t.m,t.h),e,p,c,r,n)}function wye(t,e){var n,i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt;for(b=e.c,r=Trt(t.e),M=hl(eL(Xc(Srt(t.e)),t.d*t.a,t.c*t.b),-.5),n=r.a-M.a,i=r.b-M.b,l=e.a,n=l.c-n,i=l.d-i,p=new j(b);p.a=0)return n;switch(wm(qo(t,n))){case 2:{if(le("",jp(t,n.Wi()).be())){if(p=pL(qo(t,n)),f=_M(qo(t,n)),v=Blt(t,e,p,f),v)return v;for(r=lht(t,e),l=0,M=r._b();le.e||e.f>t.e)){for(n=0,i=0,l=t.t.a.Xb().tc();l.hc();)r=a(l.ic(),11),bq(zo(Y(Z(ss,1),wt,9,0,[r.g.k,r.k,r.a])).b,e.f,e.e)&&++n;for(f=t.o.a.Xb().tc();f.hc();)r=a(f.ic(),11),bq(zo(Y(Z(ss,1),wt,9,0,[r.g.k,r.k,r.a])).b,e.f,e.e)&&--n;for(p=e.t.a.Xb().tc();p.hc();)r=a(p.ic(),11),bq(zo(Y(Z(ss,1),wt,9,0,[r.g.k,r.k,r.a])).b,t.f,t.e)&&++i;for(c=e.o.a.Xb().tc();c.hc();)r=a(c.ic(),11),bq(zo(Y(Z(ss,1),wt,9,0,[r.g.k,r.k,r.a])).b,t.f,t.e)&&--i;n0&&n.charCodeAt(0)!=47))throw K(new yn("invalid opaquePart: "+n));if(t&&!(e!=null&&ST($F,e.toLowerCase()))&&!(n==null||!sq(n,TA,CA)))throw K(new yn(hUt+n));if(t&&e!=null&&ST($F,e.toLowerCase())&&!e1e(n))throw K(new yn(hUt+n));if(!Lle(i))throw K(new yn("invalid device: "+i));if(!Qle(r))throw l=r==null?"invalid segments: null":"invalid segment: "+qle(r),K(new yn(l));if(!(c==null||Mf(c,Ca(35))==-1))throw K(new yn("invalid query: "+c))}function f7t(t,e){var n;if(e==null||le(e,tu)||e.length==0&&t.k!=(i0(),BE))return null;switch(t.k.g){case 1:return s7(e,pE)?(me(),ME):s7(e,zY)?(me(),$m):null;case 2:try{return Xt(Au(e,Vs,qi))}catch(i){if(i=vr(i),ct(i,118))return null;throw K(i)}case 4:try{return rw(e)}catch(i){if(i=vr(i),ct(i,118))return null;throw K(i)}case 3:return e;case 5:return x6t(t),f9t(t,e);case 6:return x6t(t),Rme(t,t.a,e);case 7:try{return n=J0e(t),n.gf(e),n}catch(i){if(i=vr(i),ct(i,30))return null;throw K(i)}default:throw K(new yc("Invalid type set for this layout option."))}}function Mye(t){var e,n,i,r,c,l,f,p,b,v,M;for(l=new j(t.d.b);l.a0&&qL(b,!0,(Js(),uh)),f.j==(Ke(),rs)&&r4t(b),wr(t.f,f,e)}}function Eye(t,e,n){var i,r,c,l,f,p,b,v;if(n._b()==0)return!1;if(f=(Jo(),a(e,61).bj()),c=f?n:new n_(n._b()),Om(t.e,e)){if(e.xh())for(b=n.tc();b.hc();)p=b.ic(),WX(t,e,p,ct(e,62)&&(a(a(e,17),62).Bb&ao)!=0)||(r=k1(e,p),c.pc(r)||c.nc(r));else if(!f)for(b=n.tc();b.hc();)p=b.ic(),r=k1(e,p),c.nc(r)}else{if(n._b()>1)throw K(new yn(uK));for(v=gu(t.e.mg(),e),i=a(t.g,124),l=0;l1&&l>1;)v=jNt(t,_t),f=a(Ee(t.d.c.b,l),26),M=a(Ee(t.d.c.b,l-1),26),Gt=a($.cd(k++),21).a,et=cm(Gt,M.a.c.length),W1(_t,et,M),W1(v,pt,f),pt=et,_t&&(r.c[r.c.length]=_t),_t=v,--It,++c,--l;for(rt=(i-(r.c.length-1)*t.d.d)/r.c.length,b=new j(r);b.a0&&T7(t,e,!1,!1,r),M=nX(t,e,!0,!1)):(T7(t,e,!1,p,0),M=nX(t,e,!0,!1)):v?(f=a(a(rr(t.r,e),19),60)._b(),c=u1e(t,e),M=c*f+t.u*(f-1),c>0&&T7(t,e,!0,!1,c)):(T7(t,e,!0,!1,0),M=nX(t,e,!0,!0)),kX(t,e)==(G1(),sb)&&(M+=2*t.u),n.a.a=M}function g7t(t,e){var n,i,r,c,l,f,p,b,v,M;if(n=a(js(t.b,e),114),a(a(rr(t.r,e),19),60).Wb()){n.n.d=0,n.n.a=0;return}n.n.d=t.A.d,n.n.a=t.A.a,r=t.v.pc((Ku(),E0)),v=a(a(rr(t.r,e),19),60)._b()==2,f=t.t==(Kh(),ly),b=t.w.pc((ma(),Ox)),M=t.w.pc(DF),i=0,!r||v&&f?i=iX(t,e,!1,!1):f?M?(c=O0e(t,e,b),c>0&&O7(t,e,c,!1,!1),i=iX(t,e,!0,!1)):(O7(t,e,0,!1,b),i=iX(t,e,!0,!1)):M?(p=a(a(rr(t.r,e),19),60)._b(),l=dbe(t,e),i=l*p+t.u*(p-1),l>0&&O7(t,e,l,!0,!1)):(O7(t,e,0,!0,!1),i=iX(t,e,!0,!0)),kX(t,e)==(G1(),sb)&&(i+=2*t.u),n.a.b=i}function fr(){fr=P,r_t=(Mit(),_c).b,Qqt=a(at(Et(_c.b),0),29),jw=a(at(Et(_c.b),1),29),Jqt=a(at(Et(_c.b),2),29),WE=_c.bb,a(at(Et(_c.bb),0),29),a(at(Et(_c.bb),1),29),$E=_c.fb,yI=a(at(Et(_c.fb),0),29),a(at(Et(_c.fb),1),29),a(at(Et(_c.fb),2),17),by=_c.qb,hXt=a(at(Et(_c.qb),0),29),a(at(Et(_c.qb),1),17),a(at(Et(_c.qb),2),17),KF=a(at(Et(_c.qb),3),29),JF=a(at(Et(_c.qb),4),29),MI=a(at(Et(_c.qb),6),29),xI=a(at(Et(_c.qb),5),17),tXt=_c.j,eXt=_c.k,nXt=_c.q,iXt=_c.w,rXt=_c.B,sXt=_c.A,oXt=_c.C,cXt=_c.D,aXt=_c._,uXt=_c.cb,lXt=_c.hb}function Tye(t,e,n){var i,r,c,l,f,p,b,v,M,k,I;t.c=0,t.b=0,i=2*e.c.a.c.length+1;t:for(M=n.tc();M.hc();){if(v=a(M.ic(),11),f=v.i==(Ht(),Tn)||v.i==fi,I=0,f){if(k=a(z(v,(Ft(),Ru)),8),!k)continue;I+=Rwe(t,i,v,k)}else{for(b=new j(v.f);b.a0?(t.f[v.o]=I/(v.d.c.length+v.f.c.length),t.c=y.Math.min(t.c,t.f[v.o]),t.b=y.Math.max(t.b,t.f[v.o])):f&&(t.f[v.o]=I)}}function Cye(t){t.b=null,t.bb=null,t.fb=null,t.qb=null,t.a=null,t.c=null,t.d=null,t.e=null,t.f=null,t.n=null,t.M=null,t.L=null,t.Q=null,t.R=null,t.K=null,t.db=null,t.eb=null,t.g=null,t.i=null,t.j=null,t.k=null,t.gb=null,t.o=null,t.p=null,t.q=null,t.r=null,t.$=null,t.ib=null,t.S=null,t.T=null,t.t=null,t.s=null,t.u=null,t.v=null,t.w=null,t.B=null,t.A=null,t.C=null,t.D=null,t.F=null,t.G=null,t.H=null,t.I=null,t.J=null,t.P=null,t.Z=null,t.U=null,t.V=null,t.W=null,t.X=null,t.Y=null,t._=null,t.ab=null,t.cb=null,t.hb=null,t.nb=null,t.lb=null,t.mb=null,t.ob=null,t.pb=null,t.jb=null,t.kb=null,t.N=!1,t.O=!1}function Aye(t,e){var n,i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt;if($=e.b.c.length,!($<3)){for(I=dt(Gn,pi,22,$,15,1),M=0,v=new j(e.b);v.al)&&Ir(t.c,a(G.b,14));++f}c=l}}}function Pht(t){var e;switch(t.d){case 1:{if(t.wi())return t.o!=-2;break}case 2:{if(t.wi())return t.o==-2;break}case 3:case 5:case 4:case 6:case 7:return t.o>-2;default:return!1}switch(e=t.vi(),t.p){case 0:return e!=null&<(de(e))!=ET(t.k,0);case 1:return e!=null&&a(e,192).a!=or(t.k)<<24>>24;case 2:return e!=null&&a(e,159).a!=(or(t.k)&qr);case 6:return e!=null&&ET(a(e,149).a,t.k);case 5:return e!=null&&a(e,21).a!=or(t.k);case 7:return e!=null&&a(e,168).a!=or(t.k)<<16>>16;case 3:return e!=null&<(Yt(e))!=t.j;case 4:return e!=null&&a(e,126).a!=t.j;default:return e==null?t.n!=null:!Fi(e,t.n)}}function nZ(t,e){var n,i,r,c;c=t.F,e==null?(t.F=null,fq(t,null)):(t.F=(En(e),e),i=Mf(e,Ca(60)),i!=-1?(r=e.substr(0,i),Mf(e,Ca(46))==-1&&!le(r,sE)&&!le(r,T4)&&!le(r,PO)&&!le(r,C4)&&!le(r,A4)&&!le(r,k4)&&!le(r,L4)&&!le(r,P4)&&(r=EUt),n=BW(e,Ca(62)),n!=-1&&(r+=""+e.substr(n+1,e.length-(n+1))),fq(t,r)):(r=e,Mf(e,Ca(46))==-1&&(i=Mf(e,Ca(91)),i!=-1&&(r=e.substr(0,i)),!le(r,sE)&&!le(r,T4)&&!le(r,PO)&&!le(r,C4)&&!le(r,A4)&&!le(r,k4)&&!le(r,L4)&&!le(r,P4)?(r=EUt,i!=-1&&(r+=""+e.substr(i,e.length-i))):r=e),fq(t,r),r==e&&(t.F=t.D))),t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,5,c,e))}function kye(t){mC();var e,n,i,r,c,l,f;for(f=new sm,n=new j(t);n.a=f.b.c)&&(f.b=e),(!f.c||e.c<=f.c.c)&&(f.d=f.c,f.c=e),(!f.e||e.d>=f.e.d)&&(f.e=e),(!f.f||e.d<=f.f.d)&&(f.f=e);return i=new u7((FM(),Xm)),xL(t,Bjt,new zu(Y(Z(_6,1),te,341,0,[i]))),l=new u7(vw),xL(t,Ojt,new zu(Y(Z(_6,1),te,341,0,[l]))),r=new u7(ww),xL(t,Njt,new zu(Y(Z(_6,1),te,341,0,[r]))),c=new u7(Z_),xL(t,Djt,new zu(Y(Z(_6,1),te,341,0,[c]))),CX(i.c,Xm),CX(r.c,ww),CX(c.c,Z_),CX(l.c,vw),f.a.c=dt(un,te,1,0,5,1),Or(f.a,i.c),Or(f.a,Cm(r.c)),Or(f.a,c.c),Or(f.a,Cm(l.c)),f}function RP(t,e,n){var i,r,c,l;return t.Rj()&&t.Qj()&&(l=v$(t,a(n,51)),zt(l)!==zt(n))?(t.ai(e),t.gi(e,R5t(t,e,l)),t.Dj()&&(c=(r=a(n,42),t.Pj()?t.Nj()?r.Cg(t.b,jo(a(Ve(da(t.b),t.pi()),17)).n,a(Ve(da(t.b),t.pi()).jj(),24).Qi(),null):r.Cg(t.b,xr(r.mg(),jo(a(Ve(da(t.b),t.pi()),17))),null,null):r.Cg(t.b,-1-t.pi(),null,null)),!a(l,42).yg()&&(c=(i=a(l,42),t.Pj()?t.Nj()?i.Ag(t.b,jo(a(Ve(da(t.b),t.pi()),17)).n,a(Ve(da(t.b),t.pi()).jj(),24).Qi(),c):i.Ag(t.b,xr(i.mg(),jo(a(Ve(da(t.b),t.pi()),17))),null,c):i.Ag(t.b,-1-t.pi(),null,c))),c&&c.Th()),Xl(t.b)&&t.ni(t.mi(9,n,l,e,!1)),l):n}function m7t(t,e,n){var i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t;for(v=lt(Yt(z(t,(qt(),y0)))),i=lt(Yt(z(t,nbt))),k=new Rk,Ct(k,y0,v+i),b=e,et=e.d,$=e.c.g,rt=e.d.g,G=ql($.c),pt=ql(rt.c),r=new Dt,M=G;M<=pt;M++)f=new Jh(t),jl(f,(Ke(),Hr)),Ct(f,(Ft(),li),b),Ct(f,Qi,(Ls(),Gc)),Ct(f,YB,k),I=a(Ee(t.b,M),26),M==G?W1(f,I.a.c.length-n,I):Ks(f,I),_t=lt(Yt(z(b,up))),_t<0&&(_t=0,Ct(b,up,_t)),f.n.b=_t,O=y.Math.floor(_t/2),l=new Eo,yr(l,(Ht(),on)),ds(l,f),l.k.b=O,p=new Eo,yr(p,Qe),ds(p,f),p.k.b=O,Ts(b,l),c=new Np,Uo(c,b),Ct(c,Ro,null),Hs(c,p),Ts(c,et),kpe(f,b,c),r.c[r.c.length]=c,b=c;return r}function Lye(t,e){var n,i,r,c,l,f,p,b,v,M;for(t.a=new ZCt(ele(pA)),i=new j(e.a);i.a0;){for($=(mi(0,p.c.length),a(p.c[0],14)),r=(mi(0,I.c.length),a(I.c[0],14)),rt=r.d.d,c=nc(rt,r,0),sce($,r.d,c),Hs(r,null),Ts(r,null),O=$.a,e&&Xi(O,new Oo(pt)),i=qn(r.a,0);i.b!=i.d.c;)n=a(Yn(i),9),Xi(O,new Oo(n));for(et=$.b,k=new j(r.b);k.a0?kV(this,this.f/this.a):Wh(e.g,e.d[0]).a!=null&&Wh(n.g,n.d[0]).a!=null?kV(this,(lt(Wh(e.g,e.d[0]).a)+lt(Wh(n.g,n.d[0]).a))/2):Wh(e.g,e.d[0]).a!=null?kV(this,Wh(e.g,e.d[0]).a):Wh(n.g,n.d[0]).a!=null&&kV(this,Wh(n.g,n.d[0]).a)}function Iht(t){var e;this.r=Ese(new ER,new mz),this.b=(ts(),new DC(a(si(Ia),274))),this.p=new DC(a(si(Ia),274)),this.i=new DC(a(si(lqt),274)),this.e=t,this.o=new Oo(t.Re()),this.B=t.bf()||lt(de(t.xe((dr(),xF)))),this.v=a(t.xe((dr(),UE)),19),this.w=a(t.xe(SF),19),this.q=a(t.xe(tI),83),this.t=a(t.xe(BQ),275),this.j=a(t.xe(EF),19),this.n=a(uP(t,uVt),119),this.k=lt(Yt(uP(t,CF))),this.d=lt(Yt(uP(t,Ywt))),this.u=lt(Yt(uP(t,tvt))),this.s=lt(Yt(uP(t,Kwt))),this.A=a(uP(t,Jwt),135),this.c=2*this.d,e=!this.w.pc((ma(),PF)),this.f=new UC(0,e,0),this.g=new UC(1,e,0),HG(this.f,(Ch(),ta),this.g)}function w7t(t,e){var n,i,r,c,l,f,p,b,v,M,k,I;if(e==null||e.length==0)return null;if(c=a(Zc(t.f,e),27),!c){for(r=(k=new vf(t.d).a.Tb().tc(),new nm(k));r.a.hc();)if(n=(l=a(r.a.ic(),38),a(l.lc(),27)),f=n.f,I=e.length,le(f.substr(f.length-I,I),e)&&(e.length==f.length||bo(f,f.length-e.length-1)==46)){if(c)return null;c=n}if(!c){for(i=(M=new vf(t.d).a.Tb().tc(),new nm(M));i.a.hc();)if(n=(l=a(i.a.ic(),38),a(l.lc(),27)),v=n.g,v!=null){for(p=0,b=v.length;p=1&&(G-l>0&&M>=0?(p.k.a+=$,p.k.b+=c*l):G-l<0&&v>=0&&(p.k.a+=$*G,p.k.b+=c));t.n.a=e.a,t.n.b=e.b,Ct(t,(qt(),Ew),(Ku(),i=a(yu(yA),10),new ja(i,a(cu(i,i.length),10),0)))}function y7t(t,e){var n,i,r,c,l,f,p,b,v,M;for(p=!0,r=0,b=t.f[e.o],v=e.n.b+t.n,n=t.c[e.o][2],Kl(t.a,b,Xt(a(Ee(t.a,b),21).a-1+n)),Kl(t.b,b,lt(Yt(Ee(t.b,b)))-v+n*t.e),++b,b>=t.i?(++t.i,Ut(t.a,Xt(1)),Ut(t.b,v)):(i=t.c[e.o][1],Kl(t.a,b,Xt(a(Ee(t.a,b),21).a+1-i)),Kl(t.b,b,lt(Yt(Ee(t.b,b)))+v-i*t.e)),(t.q==(S_(),U6)&&(a(Ee(t.a,b),21).a>t.j||a(Ee(t.a,b-1),21).a>t.j)||t.q==z6&&(lt(Yt(Ee(t.b,b)))>t.k||lt(Yt(Ee(t.b,b-1)))>t.k))&&(p=!1),l=Rn(Rs(e));Jn(l);)c=a(In(l),14),f=c.c.g,t.f[f.o]==b&&(M=y7t(t,f),r=r+a(M.a,21).a,p=p&<(de(M.b)));return t.f[e.o]=b,r=r+t.c[e.o][0],new zs(Xt(r),(me(),!!p))}function Rye(t){var e,n,i,r,c,l,f,p,b,v;for(b=new Fr,f=new Fr,c=new j(t);c.a-1){for(r=qn(f,0);r.b!=r.d.c;)i=a(Yn(r),125),i.s=l;for(;f.b!=0;)for(i=a(Sut(f,0),125),n=new j(i.g);n.a-1){for(c=new j(f);c.a0)&&(p.i=cm(p.i,r.i-1),--p.f,p.f==0&&(f.c[f.c.length]=p))}}function M7t(t,e){var n,i,r,c,l,f,p,b;if(!(e.b==null||t.b==null)){for(M_(t),a4(t),M_(e),a4(e),n=dt(Gn,pi,22,t.b.length+e.b.length,15,1),b=0,i=0,l=0;i=f&&r<=p)f<=r&&c<=p?(n[b++]=r,n[b++]=c,i+=2):f<=r?(n[b++]=r,n[b++]=p,t.b[i]=p+1,l+=2):c<=p?(n[b++]=f,n[b++]=c,i+=2):(n[b++]=f,n[b++]=p,t.b[i]=p+1);else if(pt.j&&(t.q=U6,nE(t,c));break;case 4:for(t.q=(S_(),tF),nE(t,c),b=0,r=new j(t.b);r.at.k&&(t.q=z6,nE(t,c));break;case 6:k=Tr(y.Math.ceil(t.f.length*v/100)),nE(t,new Z8(k));break;case 5:M=Tr(y.Math.ceil(t.d*v/100)),nE(t,new G3(M));break;default:nE(t,c)}owe(t,e),Vn(n)}function Fye(t){var e,n,i,r,c,l,f;for(e=new Dt,t.g=new Dt,t.d=new Dt,l=new qg(new xp(t.f.b).a);l.b;)c=Sm(l),Ut(e,a(a(c.lc(),48).b,80)),zv(a(c.kc(),536).Je())?Ut(t.d,a(c.lc(),48)):Ut(t.g,a(c.lc(),48));for(Cq(t,t.d),Cq(t,t.g),t.c=new S9t(t.b),kQt(t.c,(Iit(),kjt)),Mq(t,t.d),Mq(t,t.g),Or(e,t.c.a.b),t.e=new We(is,is),t.a=new We(Ps,Ps),i=new j(e);i.aY1)&&f<10);Eit(t.c,new c3),E7t(t),Ure(t.c),Pye(t.f)}function E7t(t){var e,n,i,r,c,l,f;for(e=0,c=new j(t.b.a);c.a=2){for(p=qn(n,0),l=a(Yn(p),9),f=a(Yn(p),9);f.a0&&(f=y.Math.max(f,SPt(t.A.b+i.d.b,r))),M=i,k=r,I=c;t.A&&t.A.c>0&&(O=I+t.A.c,v&&(O+=M.d.c),f=y.Math.max(f,(Ef(),I1(yd),y.Math.abs(k-1)<=yd||k==1||isNaN(k)&&isNaN(1)?0:O/(1-k)))),n.n.b=0,n.a.a=f}function T7t(t,e){var n,i,r,c,l,f,p,b,v,M,k,I,O,$;if(n=a(js(t.b,e),114),b=a(a(rr(t.r,e),19),60),b.Wb()){n.n.d=0,n.n.a=0;return}for(l=t.v.pc((Ku(),E0)),$=t.w.pc((ma(),Ox)),v=t.t==(Kh(),cb),f=0,p=b.tc(),M=null,I=0,k=0;p.hc();)i=a(p.ic(),111),c=lt(Yt(i.b.xe((hD(),OF)))),r=i.b.Re().b,l&&O7(t,e,0,v,!v&&$),M?(O=k+M.d.a+t.u+i.d.d,f=y.Math.max(f,(Ef(),I1(yd),y.Math.abs(I-c)<=yd||I==c||isNaN(I)&&isNaN(c)?0:O/(c-I)))):t.A&&t.A.d>0&&(f=y.Math.max(f,SPt(t.A.d+i.d.d,c))),M=i,I=c,k=r;t.A&&t.A.a>0&&(O=k+t.A.a,v&&(O+=M.d.a),f=y.Math.max(f,(Ef(),I1(yd),y.Math.abs(I-1)<=yd||I==1||isNaN(I)&&isNaN(1)?0:O/(1-I)))),n.n.d=0,n.a.b=f}function Gye(t,e,n){var i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It,Gt;return k=t.c[e],I=t.c[n],O=a(z(k,(Ft(),vx)),15),!!O&&O._b()!=0&&O.pc(I)||($=k.j!=(Ke(),Hr)&&I.j!=Hr,G=a(z(k,PE),8),et=a(z(I,PE),8),rt=G!=et,pt=!!G&&G!=k||!!et&&et!=I,_t=qq(k,(Ht(),Tn)),It=qq(I,fi),pt=pt|(qq(k,fi)||qq(I,Tn)),Gt=pt&&rt||_t||It,$&&Gt)||k.j==(Ke(),uc)&&I.j==gs||I.j==(Ke(),uc)&&k.j==gs?!1:(v=t.c[e],c=t.c[n],r=HRt(t.e,v,c,(Ht(),on)),p=HRt(t.i,v,c,Qe),ybe(t.f,v,c),b=E6t(t.b,v,c)+a(r.a,21).a+a(p.a,21).a+t.f.d,f=E6t(t.b,c,v)+a(r.b,21).a+a(p.b,21).a+t.f.b,t.a&&(M=a(z(v,li),11),l=a(z(c,li),11),i=PRt(t.g,M,l),b+=a(i.a,21).a,f+=a(i.b,21).a),b>f)}function C7t(t,e,n){var i,r,c,l,f,p,b,v,M;if(t.a!=e.Pi())throw K(new yn(bE+e.be()+Gm));if(i=jp((Qa(),eo),e).kk(),i)return i.Pi().dh().Zg(i,n);if(l=jp(eo,e).mk(),l){if(n==null)return null;if(f=a(n,15),f.Wb())return"";for(M=new Sp,c=f.tc();c.hc();)r=c.ic(),mo(M,l.Pi().dh().Zg(l,r)),M.a+=" ";return R9(M,M.a.length-1)}if(v=jp(eo,e).nk(),!v.Wb()){for(b=v.tc();b.hc();)if(p=a(b.ic(),140),p.Li(n))try{if(M=p.Pi().dh().Zg(p,n),M!=null)return M}catch(k){if(k=vr(k),!ct(k,104))throw K(k)}throw K(new yn("Invalid value: '"+n+"' for datatype :"+e.be()))}return a(e,737).Ui(),n==null?null:ct(n,159)?""+a(n,159).a:fu(n)==YO?YEt(SA[0],a(n,181)):Yc(n)}function Wye(t,e,n){var i,r,c,l,f,p,b,v,M,k,I,O,$,G;for(di(n,dBt,1),Gjt=lt(de(z(e,(qt(),X4)))),t.c=e,O=new Dt,f=new j(e.b);f.aG){for($=1,r=b.n.a;r>p;)++$,r=(b.n.a-($-1)*t.d)/$;Ut(i,new K4t(t,b,$))}for(v=new j(i);v.ab?0:b),1),l),t.c[i.a.d])),ih($l(Wl(Vl(Gl(new cl,0>-b?0:-b),1),l),t.c[f.a.d]))):(k=1,(ct(i.g,153)&&ct(f.g,8)||ct(f.g,153)&&ct(i.g,8))&&(k=2),ih($l(Wl(Vl(Gl(new cl,Tr(c)),k),t.c[i.a.d]),t.c[f.a.d]))))}function Vye(t,e){var n,i,r,c,l,f,p,b,v,M,k,I,O,$;for(n=a(z(t,(qt(),Qi)),83),l=t.e,c=t.d,f=l.a+c.b+c.c,p=0-c.d-t.c.b,v=l.b+c.d+c.a-t.c.b,b=new Dt,M=new Dt,r=new j(e);r.a0),a(v.a.cd(v.c=--v.b),14));c!=i&&v.b>0;)t.a[c.o]=!0,t.a[i.o]=!0,c=(Hn(v.b>0),a(v.a.cd(v.c=--v.b),14));v.b>0&&Th(v)}}function Xye(t){t.q||(t.q=!0,t.p=cc(t,0),t.a=cc(t,1),nr(t.a,0),t.f=cc(t,2),nr(t.f,1),Cr(t.f,2),t.n=cc(t,3),Cr(t.n,3),Cr(t.n,4),Cr(t.n,5),Cr(t.n,6),t.g=cc(t,4),nr(t.g,7),Cr(t.g,8),t.c=cc(t,5),nr(t.c,7),nr(t.c,8),t.i=cc(t,6),nr(t.i,9),nr(t.i,10),nr(t.i,11),nr(t.i,12),Cr(t.i,13),t.j=cc(t,7),nr(t.j,9),t.d=cc(t,8),nr(t.d,3),nr(t.d,4),nr(t.d,5),nr(t.d,6),Cr(t.d,7),Cr(t.d,8),Cr(t.d,9),Cr(t.d,10),t.b=cc(t,9),Cr(t.b,0),Cr(t.b,1),t.e=cc(t,10),Cr(t.e,1),Cr(t.e,2),Cr(t.e,3),Cr(t.e,4),nr(t.e,5),nr(t.e,6),nr(t.e,7),nr(t.e,8),nr(t.e,9),nr(t.e,10),Cr(t.e,11),t.k=cc(t,11),Cr(t.k,0),Cr(t.k,1),t.o=yi(t,12),t.s=yi(t,13))}function Zye(t,e){var n,i,r,c,l,f,p,b,v,M,k,I,O,$,G,et;for(di(e,"Interactive crossing minimization",1),l=0,c=new j(t.b);c.a0&&(n+=p.k.a+p.n.a/2,++M),O=new j(p.i);O.a=f&&r<=p)f<=r&&c<=p?i+=2:f<=r?(t.b[i]=p+1,l+=2):c<=p?(n[b++]=r,n[b++]=f-1,i+=2):(n[b++]=r,n[b++]=f-1,t.b[i]=p+1,l+=2);else if(p0),l.a.cd(l.c=--l.b),cd(l,i),mM(b,i),A7(i,p.i),TM(b),TM(b),r.a.$b(i)!=null}}function Jye(t,e){var n,i,r,c,l,f,p,b,v,M,k,I,O,$,G;for(di(e,"Spline SelfLoop pre-processing.",1),b=new qa,M=new j(t.a);M.a0?r-=864e5:r+=864e5,p=new qrt(so(Ka(e.q.getTime()),r))),v=new Bb,b=t.a.length,c=0;c=97&&i<=122||i>=65&&i<=90){for(l=c+1;l=b)throw K(new yn("Missing trailing '"));l+1=14&&b<=16))?e.a.Qb(i)?(n.a?Ii(n.a,n.b):n.a=new ll(n.d),g2(n.a,"[...]")):(l=r_(i),p=new lL(e),$g(n,k7t(l,p))):ct(i,221)?$g(n,Oge(a(i,221))):ct(i,173)?$g(n,Pge(a(i,173))):ct(i,176)?$g(n,G1e(a(i,176))):ct(i,1697)?$g(n,Nge(a(i,1697))):ct(i,37)?$g(n,Dge(a(i,37))):ct(i,378)?$g(n,Gge(a(i,378))):ct(i,736)?$g(n,Rge(a(i,736))):ct(i,106)&&$g(n,Ige(a(i,106))):$g(n,i==null?tu:Yc(i));return n.a?n.e.length==0?n.a.a:n.a.a+(""+n.e):n.c}function e2e(t,e,n){var i,r,c,l,f,p,b,v,M,k,I,O,$;if(lt(de(z(n,(qt(),ey)))))for(f=new j(n.i);f.a1))););(f>0||k==(Kh(),cb)&&(!c.n&&(c.n=new Wt(ic,c,1,7)),c.n).i>0)&&(p=!0),f>1&&(b=!0)}p&&e.nc((So(),Al)),b&&e.nc((So(),W4))}function L7t(t,e,n){var i,r,c;return r=new Iht(t),lbe(r,n),oNt(r,!1),pd(r.e.We(),new prt(r,!1)),X$(r,r.f,(Ch(),lc),(Ht(),Tn)),X$(r,r.f,hc,fi),X$(r,r.g,lc,on),X$(r,r.g,hc,Qe),oIt(r,Tn),oIt(r,fi),GCt(r,Qe),GCt(r,on),Fg(),i=r.v.pc((Ku(),ub))&&r.w.pc((ma(),xA))?sut(r):null,i&&jQt(r.a,i),gwe(r),qde(r),Xde(r),i2e(r),Wwe(r),wpe(r),Oq(r,Tn),Oq(r,fi),Hwe(r),C_e(r),e&&(nfe(r),vpe(r),Oq(r,Qe),Oq(r,on),c=r.w.pc((ma(),MA)),r9t(r,c,Tn),r9t(r,c,fi),s9t(r,c,Qe),s9t(r,c,on),qc(new gi(null,new Ei(new vf(r.i),0)),new wz),qc(wo(new gi(null,vot(r.r).wc()),new SR),new TR),_1e(r),r.e.Ue(r.o),qc(new gi(null,vot(r.r).wc()),new P3)),r.o}function o2e(t,e){var n,i,r,c,l,f,p,b,v,M,k,I,O;for(di(e,"Spline SelfLoop positioning",1),v=a(z(t,(qt(),Rmt)),345),b=new j(t.b);b.a2?(v=new Dt,Or(v,new C1(et,1,et.b)),c=sOt(v,pt+t.a),rt=new MX(c),Uo(rt,e),n.c[n.c.length]=rt):i?rt=a(zi(t.b,n0(e)),247):rt=a(zi(t.b,Dm(e)),247),p=n0(e),i&&(p=Dm(e)),l=Q1e(G,p),b=pt+t.a,l.a?(b+=y.Math.abs(G.b-M.b),$=new We(M.a,(M.b+G.b)/2)):(b+=y.Math.abs(G.a-M.a),$=new We((M.a+G.a)/2,M.b)),i?wr(t.d,e,new xut(rt,l,$,b)):wr(t.c,e,new xut(rt,l,$,b)),wr(t.b,e,rt),O=(!e.n&&(e.n=new Wt(ic,e,1,7)),e.n),I=new $n(O);I.e!=I.i._b();)k=a(ci(I),137),r=SP(t,k,!0,0,0),n.c[n.c.length]=r}function a2e(){bi(py,new Nz),bi(Ui,new GR),bi(Dl,new qR),bi(cf,new ZR),bi(stt,new Hz),bi(VF,new YR),bi(Qp,new KR),bi(EA,new td),bi(pI,new jk),bi(QQ,new UR),bi(Nw,new Hk),bi(ph,new Iz),bi(of,new Gk),bi(Fw,new oo),bi(Uw,new Rz),bi(Ra,new Dz),bi(Bw,new O3),bi(Dc,new zR),bi(Do,new Oz),bi(wu,new yp),bi(ho,new Bz),bi(Z(Da,1),new VS),bi(fx,new Wk),bi(O4,new jR),bi(YO,new HR),bi(g_t,new Fd),bi(To,new Lb),bi(Lvt,new $k),bi(Rvt,new qS),bi(n_t,new WR),bi(qF,new Vk),bi(EE,new $R),bi(Io,new qk),bi(Qpt,new Xk),bi(Vm,new Pb),bi(t1t,new Fz),bi(Jvt,new Ib),bi(m_t,new VR),bi(qm,new Zk),bi(At,new Uz),bi(Ivt,new zz),bi(b_t,new jz)}function u2e(t){var e,n,i,r,c,l,f,p;for(e=null,i=new j(t);i.a0&&n.c==0&&(!e&&(e=new Dt),e.c[e.c.length]=n);if(e)for(;e.c.length!=0;){if(n=a(Em(e,0),205),n.b&&n.b.c.length>0){for(c=(!n.b&&(n.b=new Dt),new j(n.b));c.anc(t,n,0))return new zs(r,n)}else if(lt(Wh(r.g,r.d[0]).a)>lt(Wh(n.g,n.d[0]).a))return new zs(r,n)}for(f=(!n.e&&(n.e=new Dt),n.e).tc();f.hc();)l=a(f.ic(),205),p=(!l.b&&(l.b=new Dt),l.b),Qv(0,p.c.length),B5(p.c,0,n),l.c==p.c.length&&(e.c[e.c.length]=l)}return null}function l2e(t,e){var n,i,r,c,l,f,p,b,v,M,k,I,O,$;for(di(e,"Label dummy insertions",1),M=new Dt,l=lt(Yt(z(t,(qt(),N6)))),b=lt(Yt(z(t,Cx))),v=a(z(t,ch),110),I=new j(t.a);I.a>16==-10?n=a(t.Cb,268).zj(e,n):t.Db>>16==-15&&(!e&&(e=(ye(),Hf)),!b&&(b=(ye(),Hf)),t.Cb.Hg()&&(p=new Qd(t.Cb,1,13,b,e,Hp(Ya(a(t.Cb,53)),t),!1),n?n.Sh(p):n=p));else if(ct(t.Cb,96))t.Db>>16==-23&&(ct(e,96)||(e=(ye(),gh)),ct(b,96)||(b=(ye(),gh)),t.Cb.Hg()&&(p=new Qd(t.Cb,1,10,b,e,Hp(kc(a(t.Cb,24)),t),!1),n?n.Sh(p):n=p));else if(ct(t.Cb,411))for(f=a(t.Cb,742),l=(!f.b&&(f.b=new lT(new OG)),f.b),c=(i=new qg(new xp(l.a).a),new hT(i));c.a.b;)r=a(Sm(c.a).kc(),84),n=rE(r,I7(r,f),n)}return n}function f2e(t,e,n){var i,r,c,l,f,p,b,v,M,k,I,O,$,G;for(di(n,"Depth-first cycle removal",1),v=e.a,$=v.c.length,t.a=dt(Gn,pi,22,$,15,1),Oxt(t.a),t.b=dt(Gn,pi,22,$,15,1),Oxt(t.b),l=0,b=new j(v);b.a=0){for(p=null,f=new Gs(v.a,b+1);f.b=b.c.c.length?v=oct((Ke(),gs),Hr):v=oct((Ke(),Hr),Hr),v*=2,c=n.a.g,n.a.g=y.Math.max(c,c+(v-c)),l=n.b.g,n.b.g=y.Math.max(l,l+(v-l)),r=e}}function O7t(t,e){var n,i,r,c,l,f,p,b,v;for(l=a(a(rr(t.r,e),19),60),v=l._b()==2||l._b()>2&&t.w.pc((ma(),Ox)),c=l.tc();c.hc();)if(r=a(c.ic(),111),!(!r.c||r.c.d.c.length<=0)){switch(b=r.b.Re(),f=r.c,p=f.i,p.b=(i=f.n,f.e.a+i.b+i.c),p.a=(n=f.n,f.e.b+n.d+n.a),e.g){case 1:v?(p.c=-p.b-t.s,Cf(f,(hu(),fh))):(p.c=b.a+t.s,Cf(f,(hu(),jf))),p.d=-p.a-t.s,qd(f,(Ha(),dh));break;case 3:v?(p.c=-p.b-t.s,Cf(f,(hu(),fh))):(p.c=b.a+t.s,Cf(f,(hu(),jf))),p.d=b.b+t.s,qd(f,(Ha(),Fh));break;case 2:p.c=b.a+t.s,v?(p.d=-p.a-t.s,qd(f,(Ha(),dh))):(p.d=b.b+t.s,qd(f,(Ha(),Fh))),Cf(f,(hu(),jf));break;case 4:p.c=-p.b-t.s,v?(p.d=-p.a-t.s,qd(f,(Ha(),dh))):(p.d=b.b+t.s,qd(f,(Ha(),Fh))),Cf(f,(hu(),fh))}v=!1}}function q7(t,e){var n;if(t.e)throw K(new yc((Vd(LK),GZ+LK.k+WZ)));if(!lte(t.a,e))throw K(new sc(UOt+e+zOt));if(e==t.d)return t;switch(n=t.d,t.d=e,n.g){case 0:switch(e.g){case 2:Rm(t);break;case 1:F1(t),Rm(t);break;case 4:b_(t),Rm(t);break;case 3:b_(t),F1(t),Rm(t)}break;case 2:switch(e.g){case 1:F1(t),NX(t);break;case 4:b_(t),Rm(t);break;case 3:b_(t),F1(t),Rm(t)}break;case 1:switch(e.g){case 2:F1(t),NX(t);break;case 4:F1(t),b_(t),Rm(t);break;case 3:F1(t),b_(t),F1(t),Rm(t)}break;case 4:switch(e.g){case 2:b_(t),Rm(t);break;case 1:b_(t),F1(t),Rm(t);break;case 3:F1(t),NX(t)}break;case 3:switch(e.g){case 2:F1(t),b_(t),Rm(t);break;case 1:F1(t),b_(t),F1(t),Rm(t);break;case 4:F1(t),NX(t)}}return t}function k_(t,e){var n;if(t.d)throw K(new yc((Vd(XK),GZ+XK.k+WZ)));if(!ute(t.a,e))throw K(new sc(UOt+e+zOt));if(e==t.c)return t;switch(n=t.c,t.c=e,n.g){case 0:switch(e.g){case 2:Xg(t);break;case 1:U1(t),Xg(t);break;case 4:w_(t),Xg(t);break;case 3:w_(t),U1(t),Xg(t)}break;case 2:switch(e.g){case 1:U1(t),OX(t);break;case 4:w_(t),Xg(t);break;case 3:w_(t),U1(t),Xg(t)}break;case 1:switch(e.g){case 2:U1(t),OX(t);break;case 4:U1(t),w_(t),Xg(t);break;case 3:U1(t),w_(t),U1(t),Xg(t)}break;case 4:switch(e.g){case 2:w_(t),Xg(t);break;case 1:w_(t),U1(t),Xg(t);break;case 3:U1(t),OX(t)}break;case 3:switch(e.g){case 2:U1(t),w_(t),Xg(t);break;case 1:U1(t),w_(t),U1(t),Xg(t);break;case 4:U1(t),OX(t)}}return t}function B7t(t,e,n){var i,r,c,l,f,p,b,v,M,k,I,O,$,G,et;for(r=new Dt,O=new j(e.a);O.aet?p:et,pt=new j(v.i);pt.a=b&&It>=G&&(k+=O.k.b+$.k.b+$.a.b-_t,++f));if(n)for(l=new j(rt.d);l.a=b&&It>=G&&(k+=O.k.b+$.k.b+$.a.b-_t,++f))}f>0&&(Gt+=k/f,++I)}I>0?(e.a=r*Gt/I,e.i=I):(e.a=0,e.i=0)}function M2e(t,e){var n,i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It,Gt,Zt;for(t.e=e,f=nme(e),Gt=new Dt,i=new j(f);i.a0&&(M.d+=b.n.d,M.d+=b.d),M.a>0&&(M.a+=b.n.a,M.a+=b.d),M.b>0&&(M.b+=b.n.b,M.b+=b.d),M.c>0&&(M.c+=b.n.c,M.c+=b.d),M}function k2e(t,e,n){var i;if(di(n,"StretchWidth layering",1),e.a.c.length==0){Vn(n);return}for(t.c=e,t.t=0,t.u=0,t.i=is,t.g=Ps,t.d=lt(Yt(z(e,(qt(),nf)))),yde(t),B0e(t),K1e(t),$pe(t),bfe(t),t.i=y.Math.max(1,t.i),t.g=y.Math.max(1,t.g),t.d=t.d/t.i,t.f=t.g/t.i,t.s=Rhe(t),i=new dl(t.c),Ut(t.c.b,i),t.r=fd(t.p),t.n=QD(t.k,t.k.length);t.r.c.length!=0;)t.o=Jle(t),!t.o||f6t(t)&&t.b.a._b()!=0?(Ode(t,i),i=new dl(t.c),Ut(t.c.b,i),yo(t.a,t.b),t.b.a.Pb(),t.t=t.u,t.u=0):f6t(t)?(t.c.b.c=dt(un,te,1,0,5,1),i=new dl(t.c),Ut(t.c.b,i),t.t=0,t.u=0,t.b.a.Pb(),t.a.a.Pb(),++t.f,t.r=fd(t.p),t.n=QD(t.k,t.k.length)):(Ks(t.o,i),Lc(t.r,t.o),Ir(t.b,t.o),t.t=t.t-t.k[t.o.o]*t.d+t.j[t.o.o],t.u+=t.e[t.o.o]*t.d);e.a.c=dt(un,te,1,0,5,1),YC(e.b),Vn(n)}function U7t(t){var e,n,i,r,c,l,f,p,b,v,M,k,I,O,$,G;for(O=new j(t);O.a0&&(t.a[e.c.o][e.o].d+=pu(t.f,24)*GP*.07000000029802322-.03500000014901161,t.a[e.c.o][e.o].a=t.a[e.c.o][e.o].d/t.a[e.c.o][e.o].b)}}function L2e(t,e,n,i,r){var c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn;Te=zi(t.e,i),Te==null&&(Te=new bT,I=a(Te,191),rt=e+"_s",pt=rt+r,k=new M2(pt),P1(I,Df,k)),ae=a(Te,191),S2(n,ae),Bn=new bT,zg(Bn,"x",i.j),zg(Bn,"y",i.k),P1(ae,PFt,Bn),Zt=new bT,zg(Zt,"x",i.b),zg(Zt,"y",i.c),P1(ae,"endPoint",Zt),M=I9((!i.a&&(i.a=new Ss(sf,i,5)),i.a)),O=!M,O&&(Gt=new Rg,c=new uG(Gt),vo((!i.a&&(i.a=new Ss(sf,i,5)),i.a),c),P1(ae,KY,Gt)),p=Hq(i),_t=!!p,_t&&elt(t.a,ae,Ept,dX(t,Hq(i))),et=Gq(i),It=!!et,It&&elt(t.a,ae,Mpt,dX(t,Gq(i))),b=(!i.e&&(i.e=new pn(os,i,10,9)),i.e).i==0,$=!b,$&&(ce=new Rg,l=new KMt(t,ce),vo((!i.e&&(i.e=new pn(os,i,10,9)),i.e),l),P1(ae,Tpt,ce)),v=(!i.g&&(i.g=new pn(os,i,9,10)),i.g).i==0,G=!v,G&&(Me=new Rg,f=new JMt(t,Me),vo((!i.g&&(i.g=new pn(os,i,9,10)),i.g),f),P1(ae,Spt,Me))}function X7(t){var e,n,i,r,c,l,f,p,b,v,M;if(t==null)throw K(new yf(tu));if(b=t,c=t.length,p=!1,c>0&&(e=t.charCodeAt(0),(e==45||e==43)&&(t=t.substr(1,t.length-1),--c,p=e==45)),c==0)throw K(new yf(Um+b+'"'));for(;t.length>0&&t.charCodeAt(0)==48;)t=t.substr(1,t.length-1),--c;if(c>(INt(),Czt)[10])throw K(new yf(Um+b+'"'));for(r=0;r0&&(M=-FEt(t.substr(0,i),10),t=t.substr(i,t.length-i),c-=i,n=!1);c>=l;){if(i=FEt(t.substr(0,l),10),t=t.substr(l,t.length-l),c-=l,n)n=!1;else{if(Pc(M,f)<0)throw K(new yf(Um+b+'"'));M=Zg(M,v)}M=Yg(M,i)}if(Pc(M,0)>0)throw K(new yf(Um+b+'"'));if(!p&&(M=PM(M),Pc(M,0)<0))throw K(new yf(Um+b+'"'));return M}function P2e(t,e,n,i,r){var c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It,Gt,Zt,ce,ae,Te;for(pt=0,O=0,I=0,k=1,rt=new $n((!t.a&&(t.a=new Wt(zr,t,10,11)),t.a));rt.e!=rt.i._b();)G=a(ci(rt),35),k+=Dp(Af(G)),ce=G.g,O=y.Math.max(O,ce),M=G.f,I=y.Math.max(I,M),pt+=ce*M;for($=(!t.a&&(t.a=new Wt(zr,t,10,11)),t.a).i,l=pt+2*i*i*k*$,c=y.Math.sqrt(l),p=y.Math.max(c*n,O),f=y.Math.max(c/n,I),et=new $n((!t.a&&(t.a=new Wt(zr,t,10,11)),t.a));et.e!=et.i._b();)G=a(ci(et),35),ae=r.b+(pu(e,26)*l4+pu(e,27)*h4)*(p-G.g),Te=r.b+(pu(e,26)*l4+pu(e,27)*h4)*(f-G.f),th(G,ae),eh(G,Te);for(Zt=p+(r.b+r.c),Gt=f+(r.d+r.a),It=new $n((!t.a&&(t.a=new Wt(zr,t,10,11)),t.a));It.e!=It.i._b();)for(_t=a(ci(It),35),v=Rn(Af(_t));Jn(v);)b=a(In(v),105),KC(b)||qxe(b,e,Zt,Gt);Zt+=r.b+r.c,Gt+=r.d+r.a,L_(t,Zt,Gt,!1,!0)}function I2e(t,e,n,i){var r,c,l,f,p,b,v,M,k,I,O,$,G,et;if($=t.k,G=t.n,k=t.d,e){for(M=i/2*(e._b()-1),I=0,b=e.tc();b.hc();)f=a(b.ic(),8),M+=f.n.a,I=y.Math.max(I,f.n.b);for(et=$.a-(M-G.a)/2,l=$.b-k.d+I,r=G.a/(e._b()+1),c=r,p=e.tc();p.hc();)f=a(p.ic(),8),f.k.a=et,f.k.b=l-f.n.b,et+=f.n.a+i/2,v=hDt(f),v.k.a=f.n.a/2-v.a.a,v.k.b=f.n.b,O=a(z(f,(Ft(),DB)),11),O.d.c.length+O.f.c.length==1&&(O.k.a=c-O.a.a,O.k.b=0,ds(O,t)),c+=r}if(n){for(M=i/2*(n._b()-1),I=0,b=n.tc();b.hc();)f=a(b.ic(),8),M+=f.n.a,I=y.Math.max(I,f.n.b);for(et=$.a-(M-G.a)/2,l=$.b+G.b+k.a-I,r=G.a/(n._b()+1),c=r,p=n.tc();p.hc();)f=a(p.ic(),8),f.k.a=et,f.k.b=l,et+=f.n.a+i/2,v=hDt(f),v.k.a=f.n.a/2-v.a.a,v.k.b=0,O=a(z(f,(Ft(),DB)),11),O.d.c.length+O.f.c.length==1&&(O.k.a=c-O.a.a,O.k.b=G.b,ds(O,t)),c+=r}}function R2e(t,e){var n,i,r,c,l,f,p,b,v,M,k;for(r=new j(t.a.b);r.aPs||e.o==x0&&v0&&th(et,_t*Gt),It>0&&eh(et,It*Zt);for(VV(t.b,new Mr),e=new Dt,f=new qg(new xp(t.c).a);f.b;)l=Sm(f),i=a(l.kc(),105),n=a(l.lc(),363).a,r=T_(i,!1,!1),M=c8t(n0(i),pP(r),n),LP(M,r),pt=p8t(i),pt&&nc(e,pt,0)==-1&&(e.c[e.c.length]=pt,f4t(pt,(Hn(M.b!=0),a(M.a.a.c,9)),n));for(G=new qg(new xp(t.d).a);G.b;)$=Sm(G),i=a($.kc(),105),n=a($.lc(),363).a,r=T_(i,!1,!1),M=c8t(Dm(i),AC(pP(r)),n),M=AC(M),LP(M,r),pt=g8t(i),pt&&nc(e,pt,0)==-1&&(e.c[e.c.length]=pt,f4t(pt,(Hn(M.b!=0),a(M.c.b.c,9)),n))}function F2e(t,e){var n,i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt;for(di(e,"Inverted port preprocessing",1),b=t.b,p=new Gs(b,0),n=null,rt=new Dt;p.b0&&(a(js(t.b,e),114).a.b=n)}function U2e(t,e,n,i,r){var c,l,f,p,b,v,M,k,I,O,$,G,et;switch(k=kC(t.i),O=kC(e.i),I=sr(Xc(t.k),t.a),$=sr(Xc(e.k),e.a),p=sr(new We(I.a,I.b),hl(new Kv(k),1.3*n)),G=sr(new We($.a,$.b),hl(new Kv(O),1.3*i)),f=y.Math.abs(p.a-G.a),fr+2&&XV(t.charCodeAt(r+1),Nvt,Ovt)&&XV(t.charCodeAt(r+2),Nvt,Ovt))if(n=Jie(t.charCodeAt(r+1),t.charCodeAt(r+2)),r+=2,i>0?(n&192)==128?e[f++]=n<<24>>24:i=0:n>=128&&((n&224)==192?(e[f++]=n<<24>>24,i=2):(n&240)==224?(e[f++]=n<<24>>24,i=3):(n&248)==240&&(e[f++]=n<<24>>24,i=4)),i>0){if(f==i){switch(f){case 2:{S1(p,((e[0]&31)<<6|e[1]&63)&qr);break}case 3:{S1(p,((e[0]&15)<<12|(e[1]&63)<<6|e[2]&63)&qr);break}}f=0,i=0}}else{for(c=0;c0&&Ut(t.p,v),Ut(t.o,v);e-=i,I=p+e,b+=e*t.e,Kl(t.a,f,Xt(I)),Kl(t.b,f,b),t.j=Mh(t.j,I),t.k=y.Math.max(t.k,b),t.d+=e,e+=$}}function H7t(){H7t=P;var t,e,n;for(new kL(1,0),new kL(10,0),new kL(0,0),Azt=dt(TK,wt,216,11,0,1),b0=dt(el,Pf,22,100,15,1),x1t=Y(Z(Os,1),Xo,22,15,[1,5,25,125,625,3125,15625,78125,390625,1953125,9765625,48828125,244140625,1220703125,6103515625,30517578125,152587890625,762939453125,3814697265625,19073486328125,95367431640625,476837158203125,0x878678326eac9]),M1t=dt(Gn,pi,22,x1t.length,15,1),E1t=Y(Z(Os,1),Xo,22,15,[1,10,100,hw,HP,BZ,1e6,1e7,1e8,eO,1e10,1e11,1e12,1e13,1e14,1e15,1e16]),S1t=dt(Gn,pi,22,E1t.length,15,1),T1t=dt(TK,wt,216,11,0,1),t=0;t1)for(I=new Mht(O,pt,i),vo(pt,new HMt(t,I)),l.c[l.c.length]=I,M=pt.a.Xb().tc();M.hc();)v=a(M.ic(),48),Lc(c,v.b);if(f.a._b()>1)for(I=new Mht(O,f,i),vo(f,new GMt(t,I)),l.c[l.c.length]=I,M=f.a.Xb().tc();M.hc();)v=a(M.ic(),48),Lc(c,v.b)}}function H2e(t,e){var n,i,r,c,l,f,p,b,v,M,k,I,O;for(di(e,"Label dummy switching",1),M=a(z(t,(qt(),WB)),276),i=a(hd(wo(Yh(new gi(null,new Ei(t.b,16)),new p3),new SS),RC(new Pe,new ge,new pr,Y(Z(tf,1),jt,150,0,[(z1(),Qh)]))),15),l=M==($C(),dJ)||M==lJ?zde(t):null,c=i.tc();c.hc();){switch(r=a(c.ic(),8),n=dde(r),!n&&(n=M),f=Nde(r),v=ode(r),k=null,n.g){case 2:k=bge(r,l,f,v);break;case 0:k=(I=f.a._b()+v.c.length+1,O=(I-1)/2|0,Of.a._b()?a(Ee(v,O-f.a._b()-1),8):null);break;case 1:k=R0e(r,l,f,v);break;case 4:fIt(r,n),k=(b=Jat(r),b?f.a._b()==0?null:a(f.a.cd(iC(f,0)),8):v.c.length==0?null:a(Ee(v,v.c.length-1),8));break;case 3:fIt(r,n),k=(p=Jat(r),p?v.c.length==0?null:a(Ee(v,v.c.length-1),8):f.a._b()==0?null:a(f.a.cd(iC(f,0)),8))}k&&dye(r,k),jfe(r)}Vn(e)}function Oht(t,e){var n,i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt;if(k=e.length,k>0&&(p=e.charCodeAt(0),p!=64)){if(p==37&&(M=e.lastIndexOf("%"),b=!1,M!=0&&(M==k-1||(b=e.charCodeAt(M+1)==46)))){if(l=e.substr(1,M-1),pt=le("%",l)?null:Nht(l),i=0,b)try{i=Au(e.substr(M+2,e.length-(M+2)),Vs,qi)}catch(_t){throw _t=vr(_t),ct(_t,118)?(f=_t,K(new xN(f))):K(_t)}for(G=cat(t.pg());G.hc();)if(O=NN(G),ct(O,469)&&(r=a(O,609),rt=r.d,(pt==null?rt==null:le(pt,rt))&&i--==0))return r;return null}if(v=e.lastIndexOf("."),I=v==-1?e:e.substr(0,v),n=0,v!=-1)try{n=Au(e.substr(v+1,e.length-(v+1)),Vs,qi)}catch(_t){if(_t=vr(_t),ct(_t,118))I=e;else throw K(_t)}for(I=le("%",I)?null:Nht(I),$=cat(t.pg());$.hc();)if(O=NN($),ct(O,174)&&(c=a(O,174),et=c.be(),(I==null?et==null:le(I,et))&&n--==0))return c;return null}return u7t(t,e)}function G2e(t){_ht();var e,n,i,r,c,l,f,p,b,v,M,k,I,O,$,G;if(t==null)return null;if(M=t.length*8,M==0)return"";for(f=M%24,I=M/24|0,k=f!=0?I+1:I,c=dt(el,Pf,22,k*4,15,1),l=0,r=0,p=0;p>24,b=(e&3)<<24>>24,O=e&-128?(e>>2^192)<<24>>24:e>>2<<24>>24,$=n&-128?(n>>4^240)<<24>>24:n>>4<<24>>24,G=i&-128?(i>>6^252)<<24>>24:i>>6<<24>>24,c[l++]=t1[O],c[l++]=t1[$|b<<4],c[l++]=t1[v<<2|G],c[l++]=t1[i&63];return f==8?(e=t[r],b=(e&3)<<24>>24,O=e&-128?(e>>2^192)<<24>>24:e>>2<<24>>24,c[l++]=t1[O],c[l++]=t1[b<<4],c[l++]=61,c[l++]=61):f==16&&(e=t[r],n=t[r+1],v=(n&15)<<24>>24,b=(e&3)<<24>>24,O=e&-128?(e>>2^192)<<24>>24:e>>2<<24>>24,$=n&-128?(n>>4^240)<<24>>24:n>>4<<24>>24,c[l++]=t1[O],c[l++]=t1[$|b<<4],c[l++]=t1[v<<2],c[l++]=61),ml(c,0,c.length)}function W2e(t,e){var n,i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It,Gt,Zt,ce,ae,Te;for(Gt=e.a.c,b=e.a.c+e.a.b,pt=t.c&&tme(t,e),i=pt?(Gt+b)/2:Gt+(e.s+1)*t.b,f=e.d.a.Xb().tc();f.hc();)if(l=a(f.ic(),14),p=a(zi(e.c,l),589),ae=p.f,Te=p.a,It=new We(i,ae),ce=new We(i,Te),_t=new We(Gt-10,ae),Zt=new We(b,Te),M=!1,k=!1,p.b&&(M=!0,_t.a=b),p.c&&(k=!0,Zt.a=Gt-10),I=p.d,O=p.e,!pt||!(I||O)||k||M)e.d.a._b()==1?EN(l.a,Y(Z(ss,1),wt,9,0,[_t,It,ce,Zt])):(n=new We(i,e.b),EN(l.a,Y(Z(ss,1),wt,9,0,[_t,It,n,ce,Zt])));else if(I&&O){for(v=0,$=0,rt=new j(l.d.g.i);rt.a=0&&lI&&(c&&(Bg(_t,k),Bg(Gt,Xt(b.a-1))),Me=n.b,Bn+=k+e,k=0,v=y.Math.max(v,n.b+n.c+Te)),th(f,Me),eh(f,Bn),v=y.Math.max(v,Me+Te+n.c),k=y.Math.max(k,M),Me+=Te+e;if(v=y.Math.max(v,i),ae=Bn+k+n.a,ae0&&(t.p=-(t.p-1)),t.p>Vs&&cct(e,t.p-Fm),l=e.q.getDate(),wL(e,1),t.k>=0&&moe(e,t.k),t.c>=0?wL(e,t.c):t.k>=0?(p=new vat(e.q.getFullYear()-Fm,e.q.getMonth(),35),i=35-p.q.getDate(),wL(e,i0&&t.f<12&&(t.f+=12),mee(e,t.f==24&&t.g?0:t.f),t.j>=0&&aae(e,t.j),t.n>=0&&_ae(e,t.n),t.i>=0&&iMt(e,so(Zg(lP(Ka(e.q.getTime()),hw),hw),t.i)),t.a&&(r=new O9,cct(r,r.q.getFullYear()-Fm-80),qG(Ka(e.q.getTime()),Ka(r.q.getTime()))&&cct(e,r.q.getFullYear()-Fm+100)),t.d>=0){if(t.c==-1)n=(7+t.d-e.q.getDay())%7,n>3&&(n-=7),f=e.q.getMonth(),wL(e,e.q.getDate()+n),e.q.getMonth()!=f&&wL(e,e.q.getDate()+(n>0?-7:7));else if(e.q.getDay()!=t.d)return!1}return t.o>Vs&&(c=e.q.getTimezoneOffset(),iMt(e,so(Ka(e.q.getTime()),(t.o-c)*60*hw))),!0}function G7t(){G7t=P,ps=new Nv,cr(ps,(Ht(),sI),Ad),cr(ps,nI,Td),cr(ps,iI,Cd),cr(ps,rI,zf),cr(ps,M0,ab),cr(ps,M0,Cd),cr(ps,M0,zf),cr(ps,ab,M0),cr(ps,ab,Ad),cr(ps,ab,Td),cr(ps,Nx,Nx),cr(ps,Nx,Cd),cr(ps,Nx,Ad),cr(ps,fy,fy),cr(ps,fy,Cd),cr(ps,fy,Td),cr(ps,dy,dy),cr(ps,dy,zf),cr(ps,dy,Ad),cr(ps,hy,hy),cr(ps,hy,zf),cr(ps,hy,Td),cr(ps,Cd,iI),cr(ps,Cd,M0),cr(ps,Cd,Nx),cr(ps,Cd,fy),cr(ps,Cd,Cd),cr(ps,Cd,Ad),cr(ps,Cd,Td),cr(ps,zf,rI),cr(ps,zf,M0),cr(ps,zf,dy),cr(ps,zf,hy),cr(ps,zf,zf),cr(ps,zf,Ad),cr(ps,zf,Td),cr(ps,Ad,sI),cr(ps,Ad,ab),cr(ps,Ad,Nx),cr(ps,Ad,dy),cr(ps,Ad,Cd),cr(ps,Ad,zf),cr(ps,Ad,Ad),cr(ps,Td,nI),cr(ps,Td,ab),cr(ps,Td,fy),cr(ps,Td,hy),cr(ps,Td,Cd),cr(ps,Td,zf),cr(ps,Td,Td)}function q2e(){bi(vI,new i8),bi(YF,new Q0),bi(_I,new QS),bi(i_t,new tj),bi(At,new nj),bi(Z(Da,1),new ij),bi(ho,new rj),bi(fx,new em),bi(At,new JR),bi(At,new QR),bi(At,new $z),bi(To,new t8),bi(At,new Ky),bi(Sl,new B3),bi(Sl,new Vz),bi(At,new e8),bi(EE,new n8),bi(At,new ZS),bi(At,new YS),bi(At,new Yk),bi(At,new KS),bi(At,new qz),bi(Z(Da,1),new r8),bi(At,new JS),bi(At,new s8),bi(Sl,new Kk),bi(Sl,new Xz),bi(At,new o8),bi(Io,new c8),bi(At,new a8),bi(Vm,new Zz),bi(At,new u8),bi(At,new Yz),bi(At,new Kz),bi(At,new tm),bi(Sl,new Jk),bi(Sl,new Qk),bi(At,new t5),bi(At,new Jy),bi(At,new cs),bi(At,new tT),bi(At,new e5),bi(At,new Mv),bi(qm,new Jz),bi(At,new n5),bi(At,new l8),bi(At,new zh),bi(qm,new Qz),bi(Vm,new h8),bi(At,new ej),bi(Io,new f8)}function X2e(t,e){var n,i,r,c,l,f,p,b,v,M,k,I;for(i=a(z(t,(Ft(),li)),35),th(i,t.k.a+e.a),eh(i,t.k.b+e.b),(a(cn(i,(qt(),Ew)),185)._b()!=0||z(t,xd)!=null||zt(z(Mc(t),XB))===zt((jC(),F6))&&PEt((nw(),(t.p?t.p:(we(),we(),ap)).Qb(Jm)?M=a(z(t,Jm),179):M=a(z(Mc(t),J4),179),M)))&&(o_(i,t.n.a),s_(i,t.n.b)),v=new j(t.i);v.a1;)e=y.Math.min(c,t.c),b=(M=new Jh(t.e.c),jl(M,(Ke(),Jc)),Ct(M,(qt(),Qi),a(z(b,Qi),83)),Ct(M,Oh,a(z(b,Oh),185)),M.o=t.e.b++,Ut(t.b,M),M.n.b=b.n.b,M.n.a=e,k=new Eo,yr(k,(Ht(),Qe)),ds(k,b),k.k.a=M.n.a,k.k.b=M.n.b/2,I=new Eo,yr(I,on),ds(I,M),I.k.b=M.n.b/2,I.k.a=-I.n.a,O=new Np,Hs(O,k),Ts(O,I),M),Ut(t.e.c.a,b),--v,c-=t.c+t.e.d;for(new Hut(t.d,t.b,t.c),f=new j(r);f.a=e.length)return{done:!0};var r=e[i++];return{value:[r,n.get(r)],done:!1}}}},Mwe()||(t.prototype.createObject=function(){return{}},t.prototype.get=function(e){return this.obj[":"+e]},t.prototype.set=function(e,n){this.obj[":"+e]=n},t.prototype[UZ]=function(e){delete this.obj[":"+e]},t.prototype.keys=function(){var e=[];for(var n in this.obj)n.charCodeAt(0)==58&&e.push(n.substring(1));return e}),t}function K2e(t,e){var n,i,r,c,l,f,p,b,v;if(Dp(Rs(e))!=1||a(rN(Rs(e)),14).c.g.j!=(Ke(),Hr))return null;for(n=a(rN(Rs(e)),14),i=n.c.g,jl(i,(Ke(),gs)),Ct(i,(Ft(),Pu),null),Ct(i,Iu,null),Ct(i,C6,a(z(e,C6),126)),Ct(i,_w,(me(),me(),!0)),Ct(i,li,z(e,li)),i.n.b=e.n.b,c=z(n.d,li),l=null,b=Ja(i,(Ht(),on)).tc();b.hc();)if(f=a(b.ic(),11),f.d.c.length!=0){Ct(f,li,c),v=n.d,f.n.a=v.n.a,f.n.b=v.n.b,f.a.a=v.a.a,f.a.b=v.a.b,Or(f.e,v.e),v.e.c=dt(un,te,1,0,5,1),l=f;break}if(Ct(n.d,li,null),Dp(Ja(e,on))>1)for(p=qn(fl(Ja(e,on)),0);p.b!=p.d.c;)f=a(Yn(p),11),f.d.c.length==0?(r=new Eo,yr(r,on),r.n.a=f.n.a,r.n.b=f.n.b,ds(r,i),Ct(r,li,z(f,li)),ds(f,null)):ds(l,i);return Ct(e,li,null),Ct(e,_w,!1),jl(e,Jc),Ct(i,(qt(),Qi),a(z(e,Qi),83)),Ct(i,Oh,a(z(e,Oh),185)),pm(t.b,0,i),i}function J2e(t,e,n){var i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt;for(di(n,"Polyline edge routing",1),I=lt(Yt(z(e,(qt(),Aw)))),r=lt(Yt(z(e,Tx))),i=y.Math.min(1,r/I),rt=0,e.b.c.length!=0&&(pt=j9t(a(Ee(e.b,0),26)),rt=.4*i*pt),f=new Gs(e.b,0);f.b0&&(rt-=I),kht(l,rt),v=0,k=new j(l.a);k.a0),f.a.cd(f.c=--f.b)),p=.4*i*v,!c&&f.b0||v.i==on&&v.d.c.length-v.f.c.length<0)){n=!1;break}if(v.i==on){for(r=new j(v.f);r.a=f){Hn(G.b>0),G.a.cd(G.c=--G.b);break}else O.a>p&&(r?(Or(r.b,O.b),r.a=y.Math.max(r.a,O.a),Th(G)):(Ut(O.b,v),O.c=y.Math.min(O.c,p),O.a=y.Math.max(O.a,f),r=O));r||(r=new rxt,r.c=p,r.a=f,cd(G,r),Ut(r.b,v))}for(l=e.b,b=0,$=new j(i);$.a<$.c.c.length;)for(O=a(H($),511),c=new dl(e),c.o=b++,l.c[l.c.length]=c,I=new j(O.b);I.a0&&Pc(i,-6)>=0){if(Pc(i,0)>=0){for(r=n+or(i),l=17;l>=r;l--)b[l+1]=b[l];return b[++r]=46,f&&(b[--n]=45),ml(b,n,18-n+1)}for(c=2;qG(c,so(PM(i),1));c++)b[--n]=48;return b[--n]=46,b[--n]=48,f&&(b[--n]=45),ml(b,n,18-n)}return k=n+1,v=new Bb,f&&(v.a+="-"),18-k>=1?(S1(v,b[n]),v.a+=".",v.a+=ml(b,n+1,18-n-1)):v.a+=ml(b,n,18-n),v.a+="E",Pc(i,0)>0&&(v.a+="+"),v.a+=""+RD(i),v.a}function X7t(t){var e,n,i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi,ls;for(M=a(z(t,(R1(),px)),35),et=qi,rt=qi,$=Vs,G=Vs,_t=new j(t.e);_t.a<_t.c.c.length;)pt=a(H(_t),146),ae=pt.d,Te=pt.e,et=y.Math.min(et,ae.a-Te.a/2),rt=y.Math.min(rt,ae.b-Te.b/2),$=y.Math.max($,ae.a+Te.a/2),G=y.Math.max(G,ae.b+Te.b/2);for(ce=a(cn(M,(Ph(),gjt)),119),Zt=new We(ce.b-et,ce.d-rt),f=new j(t.e);f.ae.d.c){if(I=t.c[e.a.d],G=t.c[M.a.d],I==G)continue;ih($l(Wl(Vl(Gl(new cl,1),100),I),G))}}}}}function rxe(t,e,n,i,r,c){var l,f,p,b,v,M;for(b=new Eo,Uo(b,e),yr(b,a(cn(e,(qt(),Q4)),69)),Ct(b,(Ft(),li),e),ds(b,n),M=b.n,M.a=e.g,M.b=e.f,v=b.k,v.a=e.i,v.b=e.j,wr(t.a,e,b),l=fN(Vh(Yh(new gi(null,(!e.e&&(e.e=new pn(Xs,e,7,4)),new Ei(e.e,16))),new _a),new $c),new lH(e)),l||(l=fN(Vh(Yh(new gi(null,(!e.d&&(e.d=new pn(Xs,e,8,5)),new Ei(e.d,16))),new ff),new ws),new hH(e))),l||(l=fN(new gi(null,(!e.e&&(e.e=new pn(Xs,e,7,4)),new Ei(e.e,16))),new Bl)),Ct(b,A6,(me(),!!l)),lye(b,c,r,a(cn(e,Sw),9)),p=new $n((!e.n&&(e.n=new Wt(ic,e,1,7)),e.n));p.e!=p.i._b();)f=a(ci(p),137),!lt(de(cn(f,v0)))&&f.a&&Ut(b.e,mq(f));switch((!e.d&&(e.d=new pn(Xs,e,8,5)),e.d).i+(!e.e&&(e.e=new pn(Xs,e,7,4)),e.e).i>1&&i.nc((So(),W4)),r.g){case 2:case 1:(b.i==(Ht(),Tn)||b.i==fi)&&i.nc((So(),J_));break;case 4:case 3:(b.i==(Ht(),Qe)||b.i==on)&&i.nc((So(),J_))}return b}function Z1(t,e){Ai();var n,i,r,c,l,f,p,b,v,M,k,I,O;if(Q3(qE)==0){for(M=dt(U3e,wt,112,gXt.length,0,1),l=0;lb&&(i.a+=NEt(dt(el,Pf,22,-b,15,1))),i.a+="Is",Mf(p,Ca(32))>=0)for(r=0;r0){if(l+i>t.length)return!1;f=x7(t.substr(0,l+i),e)}else f=x7(t,e);switch(c){case 71:return f=y_(t,l,Y(Z(At,1),wt,2,6,[MOt,EOt]),e),r.e=f,!0;case 77:return lwe(t,e,r,f,l);case 76:return hwe(t,e,r,f,l);case 69:return n0e(t,e,l,r);case 99:return i0e(t,e,l,r);case 97:return f=y_(t,l,Y(Z(At,1),wt,2,6,["AM","PM"]),e),r.b=f,!0;case 121:return wwe(t,e,l,f,n,r);case 100:return f<=0?!1:(r.c=f,!0);case 83:return f<0?!1:ffe(f,l,e[0],r);case 104:f==12&&(f=0);case 75:case 72:return f<0?!1:(r.f=f,r.g=!1,!0);case 107:return f<0?!1:(r.f=f,r.g=!0,!0);case 109:return f<0?!1:(r.j=f,!0);case 115:return f<0?!1:(r.n=f,!0);case 90:if(lce[p]&&(G=p),M=new j(t.b.b);M.a0?k=nP(f):k=tP(nP(f)),t.ze(Q4,k)),k.g){case 4:Ct(v,la,(bl(),xw)),Ct(v,PJ,(u_(),H4)),v.n.b=l.b,yr(M,(Ht(),Qe)),M.k.b=b.b;break;case 2:Ct(v,la,(bl(),Km)),Ct(v,PJ,(u_(),E6)),v.n.b=l.b,yr(M,(Ht(),on)),M.k.b=b.b;break;case 1:Ct(v,w0,(tp(),Q_)),v.n.a=l.a,yr(M,(Ht(),fi)),M.k.a=b.a;break;case 3:Ct(v,w0,(tp(),mx)),v.n.a=l.a,yr(M,(Ht(),Tn)),M.k.a=b.a}if(e==Rx||e==Sd||e==Gc){if(I=0,e==Rx&&t.ye(_0))switch(k.g){case 1:case 2:I=a(t.xe(_0),21).a;break;case 3:case 4:I=-a(t.xe(_0),21).a}else switch(k.g){case 4:case 2:I=c.b,e==Sd&&(I/=r.b);break;case 1:case 3:I=c.a,e==Sd&&(I/=r.a)}Ct(v,Ym,I)}return Ct(v,wc,k),v}function lxe(t,e){var n,i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It,Gt;if(k=a(a(rr(t.r,e),19),60),e==(Ht(),Qe)||e==on){z7t(t,e);return}for(c=e==Tn?(Am(),lI):(Am(),hI),_t=e==Tn?(Ha(),Fh):(Ha(),dh),n=a(js(t.b,e),114),i=n.i,r=i.c+i_(Y(Z(Os,1),Xo,22,15,[n.n.b,t.A.b,t.k])),et=i.c+i.b-i_(Y(Z(Os,1),Xo,22,15,[n.n.c,t.A.c,t.k])),l=kit(Ost(c),t.s),rt=e==Tn?NY:ox,M=k.tc();M.hc();)b=a(M.ic(),111),!(!b.c||b.c.d.c.length<=0)&&(G=b.b.Re(),$=b.e,I=b.c,O=I.i,O.b=(p=I.n,I.e.a+p.b+p.c),O.a=(f=I.n,I.e.b+f.d+f.a),A$(_t,dpt),I.f=_t,Cf(I,(hu(),fh)),O.c=$.a-(O.b-G.a)/2,It=y.Math.min(r,$.a),Gt=y.Math.max(et,$.a+G.a),O.cGt&&(O.c=Gt-O.b),Ut(l.d,new g$(O,Gat(l,O))),rt=e==Tn?y.Math.max(rt,$.b+b.b.Re().b):y.Math.min(rt,$.b));for(rt+=e==Tn?t.s:-t.s,pt=eut((l.e=rt,l)),pt>0&&(a(js(t.b,e),114).a.b=pt),v=k.tc();v.hc();)b=a(v.ic(),111),!(!b.c||b.c.d.c.length<=0)&&(O=b.c.i,O.c-=b.e.a,O.d-=b.e.b)}function Y7t(t,e,n){var i,r,c,l,f,p,b,v,M,k;if(i=new qh(e.Qe().a,e.Qe().b,e.Re().a,e.Re().b),r=new cM,t.c)for(l=new j(e.We());l.a=2){if((!t.a&&(t.a=new Wt(os,t,6,6)),t.a).i==0)n=(am(),r=new R3,r),ni((!t.a&&(t.a=new Wt(os,t,6,6)),t.a),n);else if((!t.a&&(t.a=new Wt(os,t,6,6)),t.a).i>1)for(k=new VT((!t.a&&(t.a=new Wt(os,t,6,6)),t.a));k.e!=k.i._b();)WC(k);LP(e,a(at((!t.a&&(t.a=new Wt(os,t,6,6)),t.a),0),270))}if(M)for(i=new $n((!t.a&&(t.a=new Wt(os,t,6,6)),t.a));i.e!=i.i._b();)for(n=a(ci(i),270),b=new $n((!n.a&&(n.a=new Ss(sf,n,5)),n.a));b.e!=b.i._b();)p=a(ci(b),531),f.a=y.Math.max(f.a,p.a),f.b=y.Math.max(f.b,p.b);for(l=new $n((!t.n&&(t.n=new Wt(ic,t,1,7)),t.n));l.e!=l.i._b();)c=a(ci(l),137),v=a(cn(c,bA),9),v&&Wd(c,v.a,v.b),M&&(f.a=y.Math.max(f.a,c.i+c.g),f.b=y.Math.max(f.b,c.j+c.f));return f}function hxe(t,e,n){var i,r,c,l,f,p,b,v,M,k,I;if(t.e.a.Pb(),t.f.a.Pb(),t.c.c=dt(un,te,1,0,5,1),t.i.c=dt(un,te,1,0,5,1),t.g.a.Pb(),e)for(l=new j(e.a);l.a>4)<<24>>24,M[k++]=((n&15)<<4|i>>2&15)<<24>>24,M[k++]=(i<<6|r)<<24>>24}return!R5(l=c[v++])||!R5(f=c[v++])?null:(e=af[l],n=af[f],p=c[v++],b=c[v++],af[p]==-1||af[b]==-1?p==61&&b==61?n&15?null:(G=dt(Da,G_,22,I*3+1,15,1),Aa(M,0,G,0,I*3),G[k]=(e<<2|n>>4)<<24>>24,G):p!=61&&b==61?(i=af[p],i&3?null:(G=dt(Da,G_,22,I*3+2,15,1),Aa(M,0,G,0,I*3),G[k++]=(e<<2|n>>4)<<24>>24,G[k]=((n&15)<<4|i>>2&15)<<24>>24,G)):null:(i=af[p],r=af[b],M[k++]=(e<<2|n>>4)<<24>>24,M[k++]=((n&15)<<4|i>>2&15)<<24>>24,M[k++]=(i<<6|r)<<24>>24,M))}function dxe(t,e,n){var i,r,c,l,f,p,b,v,M,k;for(p=new Dt,M=e.length,l=yat(n),b=0;bf&&(pt=0,_t+=l+et,l=0),bve($,n,pt,_t),e=y.Math.max(e,pt+G.a),l=y.Math.max(l,G.b),pt+=G.a+et;return $}function pxe(t,e,n){var i,r,c,l,f;switch(i=e.i,c=t.g.n,r=t.g.d,f=t.k,l=zo(Y(Z(ss,1),wt,9,0,[f,t.a])),t.i.g){case 1:qd(e,(Ha(),dh)),i.d=-r.d-n-i.a,a(a(yM(e.d).a.cd(0),271).xe((Ft(),_x)),265)==(Tu(),kd)?(Cf(e,(hu(),fh)),i.c=l.a-lt(Yt(z(t,ty)))-n-i.b):(Cf(e,(hu(),jf)),i.c=l.a+lt(Yt(z(t,ty)))+n);break;case 2:Cf(e,(hu(),jf)),i.c=c.a+r.c+n,a(a(yM(e.d).a.cd(0),271).xe((Ft(),_x)),265)==(Tu(),kd)?(qd(e,(Ha(),dh)),i.d=l.b-lt(Yt(z(t,ty)))-n-i.a):(qd(e,(Ha(),Fh)),i.d=l.b+lt(Yt(z(t,ty)))+n);break;case 3:qd(e,(Ha(),Fh)),i.d=c.b+r.a+n,a(a(yM(e.d).a.cd(0),271).xe((Ft(),_x)),265)==(Tu(),kd)?(Cf(e,(hu(),fh)),i.c=l.a-lt(Yt(z(t,ty)))-n-i.b):(Cf(e,(hu(),jf)),i.c=l.a+lt(Yt(z(t,ty)))+n);break;case 4:Cf(e,(hu(),fh)),i.c=-r.b-n-i.b,a(a(yM(e.d).a.cd(0),271).xe((Ft(),_x)),265)==(Tu(),kd)?(qd(e,(Ha(),dh)),i.d=l.b-lt(Yt(z(t,ty)))-n-i.a):(qd(e,(Ha(),Fh)),i.d=l.b+lt(Yt(z(t,ty)))+n)}}function Q7t(t,e){var n,i,r,c,l,f,p,b,v,M,k,I,O;switch(l=new aCt(t),f=fd(Xd(e,l)),we(),gc(f,new Ny),r=t.b,r.c){case 2:p=new Nb(r.a),n=zT(Xd(f,p)),a_(n)?b=a(R2(n),188).b:b=15,p=new Nb(Mut(r)),n=zT(Xd(f,p)),a_(n)?c=a(R2(n),188).b:c=15,p=new Nb(r.b),n=zT(Xd(f,p)),a_(n)?v=a(R2(n),188).b:v=15,i=rbe(t,b,c,v),Ir(e,new e4(i,t.c,t.e,t.a.c.g,r.a)),Ir(e,new e4(i,t.c,t.e,t.a.c.g,Mut(r))),Ir(e,new e4(i,t.c,t.e,t.a.c.g,r.b));break;case 1:p=new Nb(r.a),n=zT(Xd(f,p)),a_(n)?b=a(R2(n),188).b:b=15,p=new Nb(r.b),n=zT(Xd(f,p)),a_(n)?v=a(R2(n),188).b:v=15,i=Xme(t,b,v),Ir(e,new e4(i,t.c,t.e,t.a.c.g,r.a)),Ir(e,new e4(i,t.c,t.e,t.a.c.g,r.b));break;case 0:p=new Nb(r.a),n=zT(Xd(f,p)),a_(n)?b=a(R2(n),188).b:b=15,i=(M=t.b,k=kve(t.a.c,t.a.d,b),yo(t.a.a,Rq(k)),I=rlt(t.a.b,k.a,M),O=new yL((!k.k&&(k.k=new wX(qV(k))),k.k)),jot(O),I?_ot(O,I):O),Ir(e,new e4(i,t.c,t.e,t.a.c.g,r.a));break;default:throw K(new yn("The loopside must be defined."))}return i}function gxe(t,e){var n,i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It,Gt,Zt,ce,ae;for(di(e,"Compound graph postprocessor",1),n=lt(de(z(t,(qt(),qJ)))),f=a(z(t,(Ft(),K0t)),238),v=new $r,et=f.Xb().tc();et.hc();){for(G=a(et.ic(),14),l=new Eh(f.Mc(G)),we(),gc(l,new $8(t)),It=$ue((mi(0,l.c.length),a(l.c[0],234))),Zt=_Pt(a(Ee(l,l.c.length-1),234)),pt=It.g,GM(Zt.g,pt)?rt=a(z(pt,xd),31):rt=Mc(pt),M=nde(G,l),ld(G.a),k=null,c=new j(l);c.aop,ae=y.Math.abs(k.b-O.b)>op,(!n&&ce&&ae||n&&(ce||ae))&&Xi(G.a,_t)),yo(G.a,i),i.b==0?k=_t:k=(Hn(i.b!=0),a(i.c.b.c,9)),fle(I,M,$),_Pt(r)==Zt&&(Mc(Zt.g)!=r.a&&($=new go,Olt($,Mc(Zt.g),rt)),Ct(G,FJ,$)),gge(I,G,rt),v.a.Zb(I,v);Hs(G,It),Ts(G,Zt)}for(b=v.a.Xb().tc();b.hc();)p=a(b.ic(),14),Hs(p,null),Ts(p,null);Vn(e)}function mxe(t,e){var n,i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi;for(rt=new Gs(t.b,0),v=e.tc(),O=0,b=a(v.ic(),21).a,It=0,n=new $r,Zt=new qa;rt.b=t.a&&(i=Pve(t,rt),v=Mh(v,i.b),_t=Mh(_t,i.d),Ut(f,new zs(rt,i)));for(ce=new Dt,b=0;b0),G.a.cd(G.c=--G.b),ae=new dl(t.b),cd(G,ae),Hn(G.b=i.n.b/2}else rt=!M;rt?(et=a(z(i,(Ft(),xx)),15),et?k?c=et:(r=a(z(i,bx),15),r?et._b()<=r._b()?c=et:c=r:(c=new Dt,Ct(i,bx,c))):(c=new Dt,Ct(i,xx,c))):(r=a(z(i,(Ft(),bx)),15),r?M?c=r:(et=a(z(i,xx),15),et?r._b()<=et._b()?c=r:c=et:(c=new Dt,Ct(i,xx,c))):(c=new Dt,Ct(i,bx,c))),c.nc(t),Ct(t,(Ft(),DB),n),e.d==n?(Ts(e,null),n.d.c.length+n.f.c.length==0&&ds(n,null),Dle(n)):(Hs(e,null),n.d.c.length+n.f.c.length==0&&ds(n,null)),ld(e.a)}function vxe(t){var e,n,i,r,c,l,f,p,b,v,M,k,I,O;if(zt(z(t.c,(qt(),Qi)))===zt((Ls(),Sd))||zt(z(t.c,Qi))===zt(Gc)){for(v=new j(t.c.i);v.a0&&(r=a(Ee(G.c.a,Gt-1),8),l=t.i[r.o],ce=y.Math.ceil(Hv(t.n,r,G)),c=It.a.e-G.d.d-(l.a.e+r.n.b+r.d.a)-ce),b=is,Gt0&&Zt.a.e.e-Zt.a.a-(Zt.b.e.e-Zt.b.a)<0,O=pt.a.e.e-pt.a.a-(pt.b.e.e-pt.b.a)<0&&Zt.a.e.e-Zt.a.a-(Zt.b.e.e-Zt.b.a)>0,I=pt.a.e.e+pt.b.aZt.b.e.e+Zt.a.a,_t=0,!$&&!O&&(k?c+M>0?_t=M:b-i>0&&(_t=i):I&&(c+f>0?_t=f:b-rt>0&&(_t=rt))),It.a.e+=_t,It.b&&(It.d.e+=_t),!1))}function yxe(){var t=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F"];return t[34]='\\"',t[92]="\\\\",t[173]="\\u00ad",t[1536]="\\u0600",t[1537]="\\u0601",t[1538]="\\u0602",t[1539]="\\u0603",t[1757]="\\u06dd",t[1807]="\\u070f",t[6068]="\\u17b4",t[6069]="\\u17b5",t[8203]="\\u200b",t[8204]="\\u200c",t[8205]="\\u200d",t[8206]="\\u200e",t[8207]="\\u200f",t[8232]="\\u2028",t[8233]="\\u2029",t[8234]="\\u202a",t[8235]="\\u202b",t[8236]="\\u202c",t[8237]="\\u202d",t[8238]="\\u202e",t[8288]="\\u2060",t[8289]="\\u2061",t[8290]="\\u2062",t[8291]="\\u2063",t[8292]="\\u2064",t[8298]="\\u206a",t[8299]="\\u206b",t[8300]="\\u206c",t[8301]="\\u206d",t[8302]="\\u206e",t[8303]="\\u206f",t[65279]="\\ufeff",t[65529]="\\ufff9",t[65530]="\\ufffa",t[65531]="\\ufffb",t}function mu(){mu=P,rg=new A1("N",0,(Ht(),Tn),Tn,0),kw=new A1("EN",1,Qe,Tn,1),tb=new A1("E",2,Qe,Qe,0),eb=new A1("SE",3,fi,Qe,1),Yp=new A1("S",4,fi,fi,0),Iw=new A1("WS",5,on,fi,1),Pw=new A1("W",6,on,on,0),hp=new A1("NW",7,Tn,on,1),Zp=new A1("ENW",8,Qe,on,2),Lw=new A1("ESW",9,Qe,on,2),nb=new A1("SEN",10,fi,Tn,2),sy=new A1("SWN",11,fi,Tn,2),Ax=new A1(sx,12,Wc,Wc,3),GWt=Nfe(rg,kw,tb,eb,Yp,Iw,Y(Z(sA,1),jt,129,0,[Pw,hp,Zp,Lw,nb,sy])),$Wt=($b(),x_(Y(Z(un,1),te,1,5,[rg,tb,Yp,Pw]))),WWt=x_(Y(Z(un,1),te,1,5,[kw,eb,Iw,hp])),YWt=new a2(Tn),qWt=x_(Y(Z(un,1),te,1,5,[Qe,Tn])),VWt=new a2(Qe),QWt=x_(Y(Z(un,1),te,1,5,[fi,Qe])),JWt=new a2(fi),r$t=x_(Y(Z(un,1),te,1,5,[on,fi])),i$t=new a2(on),KWt=x_(Y(Z(un,1),te,1,5,[Tn,on])),XWt=x_(Y(Z(un,1),te,1,5,[Qe,Tn,on])),ZWt=x_(Y(Z(un,1),te,1,5,[Qe,fi,on])),e$t=x_(Y(Z(un,1),te,1,5,[fi,on,Tn])),t$t=x_(Y(Z(un,1),te,1,5,[fi,Qe,Tn])),n$t=(wM(),D4)}function xxe(t){var e,n,i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It,Gt,Zt,ce;if(n=lt(Yt(z(t.a.j,(qt(),Amt)))),n<-1||!t.a.i||YT(a(z(t.a.o,Qi),83))||ac(t.a.o,(Ht(),Qe))._b()<2&&ac(t.a.o,on)._b()<2)return!0;if(t.a.c.pf())return!1;for(_t=0,pt=0,rt=new Dt,p=t.a.e,b=0,v=p.length;b=n}function Mxe(t,e){var n,i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t;for(di(e,bBt,1),I=a(z(t,(qt(),ig)),197),r=new j(t.b);r.a=2){for(O=!0,M=new j(c.i),n=a(H(M),11);M.a0){for(k=v<100?null:new w1(v),b=new lat(e),O=b.g,et=dt(Gn,pi,22,v,15,1),i=0,_t=new n_(v),r=0;r=0;)if(f!=null?Fi(f,O[p]):O[p]==null){et.length<=i&&(G=et,et=dt(Gn,pi,22,2*et.length,15,1),Aa(G,0,et,0,i)),et[i++]=r,ni(_t,O[p]);break t}if(zt(f)===zt(f))break}}if(O=_t.g,i>et.length&&(G=et,et=dt(Gn,pi,22,i,15,1),Aa(G,0,et,0,i)),i>0){for(pt=!0,c=0;c=0;)H2(t,et[l]);if(i!=i){for(r=i;--r>=i;)H2(_t,r);G=et,et=dt(Gn,pi,22,i,15,1),Aa(G,0,et,0,i)}e=_t}}}else for(e=Jde(t,e),r=t.i;--r>=0;)e.pc(t.g[r])&&(H2(t,r),pt=!0);if(pt){if(et!=null){for(n=e._b(),M=n==1?oC(t,4,e.tc().ic(),null,et[0],$):oC(t,6,e,et,et[0],$),k=n<100?null:new w1(n),r=e.tc();r.hc();)I=r.ic(),k=Cst(t,a(I,75),k);k?(k.Sh(M),k.Th()):Bi(t.e,M)}else{for(k=one(e._b()),r=e.tc();r.hc();)I=r.ic(),k=Cst(t,a(I,75),k);k&&k.Th()}return!0}else return!1}function Sxe(t,e,n){var i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi,ls;for(di(n,"MinWidth layering",1),I=e.b,Zt=e.a,ls=a(z(e,(qt(),zmt)),21).a,f=a(z(e,jmt),21).a,t.b=lt(Yt(z(e,nf))),t.d=is,_t=new j(Zt);_t.a<_t.c.c.length;)rt=a(H(_t),8),rt.j==(Ke(),gs)&&(Te=rt.n.b,t.d=y.Math.min(t.d,Te));for(t.d=y.Math.max(1,t.d),ce=Zt.c.length,t.c=dt(Gn,pi,22,ce,15,1),t.f=dt(Gn,pi,22,ce,15,1),t.e=dt(Os,Xo,22,ce,15,1),b=0,t.a=0,It=new j(Zt);It.a0||n.o==rf&&r0?(M=a(Ee(k.c.a,l-1),8),ce=Hv(t.b,k,M),G=k.k.b-k.d.d-(M.k.b+M.n.b+M.d.a+ce)):G=k.k.b-k.d.d,b=y.Math.min(G,b),l=1&&(ce-b>0&&O>=0?(th(M,M.i+Zt),eh(M,M.j+p*b)):ce-b<0&&I>=0&&(th(M,M.i+Zt*ce),eh(M,M.j+p)));return ga(t,UE,(c=a(yu(yA),10),new ja(c,a(cu(c,c.length),10),0))),new We(ae,v)}function kxe(t){var e,n,i,r,c,l,f,p,b,v,M,k,I,O,$,G;for($=new Dt,k=new j(t.d.b);k.ar.d.d+r.d.a?v.f.d=!0:(v.f.d=!0,v.f.a=!0))),i.b!=i.d.c&&(e=n);v&&(c=a(zi(t.f,l.d.g),57),e.bc.d.d+c.d.a?v.f.d=!0:(v.f.d=!0,v.f.a=!0))}for(f=Rn(Rs(I));Jn(f);)l=a(In(f),14),l.a.b!=0&&(e=a(fD(l.a),9),l.d.i==(Ht(),Tn)&&(G=new o4(e,new We(e.a,r.d.d),r,l),G.f.a=!0,G.a=l.d,$.c[$.c.length]=G),l.d.i==fi&&(G=new o4(e,new We(e.a,r.d.d+r.d.a),r,l),G.f.d=!0,G.a=l.d,$.c[$.c.length]=G))}return $}function Lxe(){xit();function t(i){var r=this;this.dispatch=function(c){var l=c.data;switch(l.cmd){case"algorithms":var f=tut((we(),new Db(new vf(Ow.b))));i.postMessage({id:l.id,data:f});break;case"categories":var p=tut((we(),new Db(new vf(Ow.c))));i.postMessage({id:l.id,data:p});break;case"options":var b=tut((we(),new Db(new vf(Ow.d))));i.postMessage({id:l.id,data:b});break;case"register":$_e(l.algorithms),i.postMessage({id:l.id});break;case"layout":sbe(l.graph,l.options||{}),i.postMessage({id:l.id,data:l.graph});break}},this.saveDispatch=function(c){try{r.dispatch(c)}catch(l){delete l[gZ],i.postMessage({id:c.data.id,error:l.message})}}}function e(i){var r=this;this.dispatcher=new t({postMessage:function(c){r.onmessage({data:c})}}),this.postMessage=function(c){setTimeout(function(){r.dispatcher.saveDispatch({data:c})},0)}}if(typeof document===Lpt&&typeof self!==Lpt){var n=new t(self);self.onmessage=n.saveDispatch}else typeof m!==Lpt&&m.exports&&(Object.defineProperty(_,"__esModule",{value:!0}),m.exports={default:e,Worker:e})}function nOt(t,e){var n,i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t;if(rt=0,e.e.a==0)for(G=new j(t);G.a50?et.c[et.c.length]=r:r.k>0?rt.c[rt.c.length]=r:pt.c[pt.c.length]=r;if(rt.c.length==1&&et.c.length==0&&(Or(et,rt),rt.c=dt(un,te,1,0,5,1)),et.c.length!=0&&Pp(RW(t.a),(mu(),rg))&&Pp(RW(t.a),(mu(),Yp))?Vhe(t,et):Or(rt,et),rt.c.length==0||qhe(t,rt),pt.c.length!=0){if(n=IW(t.a),n.c!=0)for(v=new j(pt),p=(si(n),Vrt(new AEt(n).a));v.a1&&($=a(rat(p),129),FC(r,$,!0),eC(v),H4t(t.a,$))}for(k=pt.c.length,i=Ywe(t),I=new Dt,l=k/Crt(t.a).c|0,f=0;f3&&(Or(I,(mu(),mu(),WWt)),O-=4),O){case 3:Ut(I,MP(i));case 2:G=P7(MP(i));do G=P7(G);while(!Pp(RW(t.a),G));I.c[I.c.length]=G,G=Glt(MP(i));do G=Glt(G);while(!Pp(RW(t.a),G));I.c[I.c.length]=G;break;case 1:Ut(I,MP(i))}for(M=new j(I),b=new j(pt);M.a$&&(c&&(Bg(Gt,I),Bg(ce,Xt(v.b-1)),Ut(t.d,O),f.c=dt(un,te,1,0,5,1)),Pi=n.b,ls+=I+e,I=0,M=y.Math.max(M,n.b+n.c+Bn)),f.c[f.c.length]=p,tRt(p,Pi,ls),M=y.Math.max(M,Pi+Bn+n.c),I=y.Math.max(I,k),Pi+=Bn+e,O=p;if(Or(t.a,f),Ut(t.d,a(Ee(f,f.c.length-1),145)),M=y.Math.max(M,i),Me=ls+I+n.a,Me1&&(l=y.Math.min(l,y.Math.abs(a(H1(f.a,1),9).b-v.b)))));else for($=new j(e.i);$.a<$.c.c.length;)for(O=a(H($),11),p=new j(O.d);p.ar&&(c=k.a-r,l=qi,i.c=dt(un,te,1,0,5,1),r=k.a),k.a>=r&&(i.c[i.c.length]=f,f.a.b>1&&(l=y.Math.min(l,y.Math.abs(a(H1(f.a,f.a.b-2),9).b-k.b)))));if(i.c.length!=0&&c>e.n.a/2&&l>e.n.b/2){for(I=new Eo,ds(I,e),yr(I,(Ht(),Tn)),I.k.a=e.n.a/2,et=new Eo,ds(et,e),yr(et,fi),et.k.a=e.n.a/2,et.k.b=e.n.b,p=new j(i);p.a=b.b?Hs(f,et):Hs(f,I)):(b=a(Vie(f.a),9),G=f.a.b==0?Yl(f.c):a(fD(f.a),9),G.b>=b.b?Ts(f,et):Ts(f,I)),M=a(z(f,(qt(),Ro)),74),M&&U2(M,b,!0);e.k.a=r-e.n.a/2}}function Oxe(t,e,n){var i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It;for(f=new j(t.a.b);f.a0)if(i=M._b(),b=Tr(y.Math.floor((i+1)/2))-1,r=Tr(y.Math.ceil((i+1)/2))-1,e.o==rf)for(v=r;v>=b;v--)e.a[_t.o]==_t&&($=a(M.cd(v),48),O=a($.a,8),!TT(n,$.b)&&I>t.b.e[O.o]&&(e.a[O.o]=_t,e.g[_t.o]=e.g[O.o],e.a[_t.o]=e.g[_t.o],e.f[e.g[_t.o].o]=(me(),!!(lt(e.f[e.g[_t.o].o])&_t.j==(Ke(),Hr))),I=t.b.e[O.o]));else for(v=b;v<=r;v++)e.a[_t.o]==_t&&(et=a(M.cd(v),48),G=a(et.a,8),!TT(n,et.b)&&I=48&&e<=57){for(i=e-48;r=48&&e<=57;)if(i=i*10+e-48,i<0)throw K(new ri(ai((Kn(),Opt))))}else throw K(new ri(ai((Kn(),nUt))));if(n=i,e==44){if(r>=t.j)throw K(new ri(ai((Kn(),rUt))));if((e=bo(t.i,r++))>=48&&e<=57){for(n=e-48;r=48&&e<=57;)if(n=n*10+e-48,n<0)throw K(new ri(ai((Kn(),Opt))));if(i>n)throw K(new ri(ai((Kn(),sUt))))}else n=-1}if(e!=125)throw K(new ri(ai((Kn(),iUt))));t.Ck(r)?(c=(Ai(),Ai(),++Ar,new Yb(9,c)),t.d=r+1):(c=(Ai(),Ai(),++Ar,new Yb(3,c)),t.d=r),c.nl(i),c.ml(n),Ci(t)}}return c}function Bxe(t,e){var n,i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It,Gt,Zt,ce,ae,Te;return M=Kve(fa(t,(Ht(),bvt)),e),O=g_(fa(t,iI),e),_t=g_(fa(t,rI),e),ce=p7(fa(t,sI),e),k=p7(fa(t,nI),e),rt=g_(fa(t,Nx),e),$=g_(fa(t,fy),e),Gt=g_(fa(t,dy),e),It=g_(fa(t,hy),e),ae=p7(fa(t,ab),e),et=g_(fa(t,M0),e),pt=g_(fa(t,Cd),e),Zt=g_(fa(t,zf),e),Te=p7(fa(t,Ad),e),I=p7(fa(t,Td),e),G=g_(fa(t,VQ),e),n=i_(Y(Z(Os,1),Xo,22,15,[rt.a,ce.a,Gt.a,Te.a])),i=i_(Y(Z(Os,1),Xo,22,15,[O.a,M.a,_t.a,G.a])),r=et.a,c=i_(Y(Z(Os,1),Xo,22,15,[$.a,k.a,It.a,I.a])),b=i_(Y(Z(Os,1),Xo,22,15,[rt.b,O.b,$.b,pt.b])),p=i_(Y(Z(Os,1),Xo,22,15,[ce.b,M.b,k.b,G.b])),v=ae.b,f=i_(Y(Z(Os,1),Xo,22,15,[Gt.b,_t.b,It.b,Zt.b])),L1(fa(t,bvt),n+r,b+v),L1(fa(t,VQ),n+r,b+v),L1(fa(t,iI),n+r,0),L1(fa(t,rI),n+r,b+v+p),L1(fa(t,sI),0,b+v),L1(fa(t,nI),n+r+i,b+v),L1(fa(t,fy),n+r+i,0),L1(fa(t,dy),0,b+v+p),L1(fa(t,hy),n+r+i,b+v+p),L1(fa(t,ab),0,b),L1(fa(t,M0),n,0),L1(fa(t,zf),0,b+v+p),L1(fa(t,Td),n+r+i,0),l=new go,l.a=i_(Y(Z(Os,1),Xo,22,15,[n+i+r+c,ae.a,pt.a,Zt.a])),l.b=i_(Y(Z(Os,1),Xo,22,15,[b+p+v+f,et.b,Te.b,I.b])),l}function Ic(){Ic=P,Vxt(),vqt=ms.a,a(at(Et(ms.a),0),17),bqt=ms.f,a(at(Et(ms.f),0),17),a(at(Et(ms.f),1),29),wqt=ms.n,a(at(Et(ms.n),0),29),a(at(Et(ms.n),1),29),a(at(Et(ms.n),2),29),a(at(Et(ms.n),3),29),Tvt=ms.g,a(at(Et(ms.g),0),17),a(at(Et(ms.g),1),29),mqt=ms.c,a(at(Et(ms.c),0),17),a(at(Et(ms.c),1),17),Cvt=ms.i,a(at(Et(ms.i),0),17),a(at(Et(ms.i),1),17),a(at(Et(ms.i),2),17),a(at(Et(ms.i),3),17),a(at(Et(ms.i),4),29),Avt=ms.j,a(at(Et(ms.j),0),17),Svt=ms.d,a(at(Et(ms.d),0),17),a(at(Et(ms.d),1),17),a(at(Et(ms.d),2),17),a(at(Et(ms.d),3),17),a(at(Et(ms.d),4),29),a(at(Et(ms.d),5),29),a(at(Et(ms.d),6),29),a(at(Et(ms.d),7),29),gqt=ms.b,a(at(Et(ms.b),0),29),a(at(Et(ms.b),1),29),BF=ms.e,a(at(Et(ms.e),0),29),a(at(Et(ms.e),1),29),a(at(Et(ms.e),2),29),a(at(Et(ms.e),3),29),a(at(Et(ms.e),4),17),a(at(Et(ms.e),5),17),a(at(Et(ms.e),6),17),a(at(Et(ms.e),7),17),a(at(Et(ms.e),8),17),a(at(Et(ms.e),9),17),a(at(Et(ms.e),10),29),pp=ms.k,a(at(Et(ms.k),0),29),a(at(Et(ms.k),1),29)}function Fxe(t,e){var n,i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me;for(ae=new Fr,Gt=new Fr,G=-1,p=new j(t);p.a=O&&(rt>O&&(I.c=dt(un,te,1,0,5,1),O=rt),I.c[I.c.length]=l);I.c.length!=0&&(k=a(Ee(I,jq(e,I.c.length)),125),Me.a.$b(k)!=null,k.p=$++,zlt(k,ae,Gt),I.c=dt(un,te,1,0,5,1))}for(_t=t.c.length+1,f=new j(t);f.aTe.p&&(Th(n),Lc(Te.g,i),i.c>0&&(i.a=Te,Ut(Te.q,i),i.b=Zt,Ut(Zt.g,i)))}function Uxe(t,e,n){var i,r,c,l,f,p,b,v,M;if(di(n,"Network simplex node placement",1),t.e=e,t.n=a(z(e,(Ft(),yw)),266),H_e(t),f1e(t),qc(Yh(new gi(null,new Ei(t.e.b,16)),new Ak),new OH(t)),qc(wo(Yh(wo(Yh(new gi(null,new Ei(t.e.b,16)),new vv),new Xy),new w),new E),new NH(t)),lt(de(z(t.e,(qt(),K4))))&&(l=Ta(n,1),di(l,"Straight Edges Pre-Processing",1),y2e(t),Vn(l)),bde(t.f),c=a(z(e,O6),21).a*t.f.a.c.length,FX(Sit(Tit(o$(t.f),c),!1),Ta(n,1)),t.d.a._b()!=0){for(l=Ta(n,1),di(l,"Flexible Where Space Processing",1),f=a(UW(QL(Vh(new gi(null,new Ei(t.f.a,16)),new f1),(En(new Tg),new wn))),21).a,p=a(UW(OCt(Vh(new gi(null,new Ei(t.f.a,16)),new NS),new pc)),21).a,b=p-f,v=hm(new Ng,t.f),M=hm(new Ng,t.f),ih($l(Wl(Gl(Vl(new cl,2e4),b),v),M)),qc(wo(wo(dot(t.i),new T3),new C3),new d4t(f,v,b,M)),r=t.d.a.Xb().tc();r.hc();)i=a(r.ic(),189),i.g=1;FX(Sit(Tit(o$(t.f),c),!1),Ta(l,1)),Vn(l)}lt(de(z(e,K4)))&&(l=Ta(n,1),di(l,"Straight Edges Post-Processing",1),Hge(t),Vn(l)),n2e(t),t.e=null,t.f=null,t.i=null,t.c=null,uu(t.k),t.j=null,t.a=null,t.o=null,t.d.a.Pb(),Vn(n)}function iOt(t,e,n,i,r){var c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me;for($=new Vu(e.b),_t=new Vu(e.b),k=new Vu(e.b),ce=new Vu(e.b),G=new Vu(e.b),Zt=qn(e,0);Zt.b!=Zt.d.c;)for(It=a(Yn(Zt),11),f=new j(It.f);f.a0,et=It.f.c.length>0,b&&et?k.c[k.c.length]=It:b?$.c[$.c.length]=It:et&&(_t.c[_t.c.length]=It);for(O=new j($);O.a=0&&le(t.substr(f,2),"//")?(f+=2,p=Eq(t,f,TA,CA),i=t.substr(f,p-f),f=p):M!=null&&(f==t.length||t.charCodeAt(f)!=47)&&(l=!1,p=Prt(t,Ca(35),f),p==-1&&(p=t.length),i=t.substr(f,p-f),f=p);if(!n&&f0&&bo(v,v.length-1)==58&&(r=v,f=p)),f=k&&(_t>k&&(M.c=dt(un,te,1,0,5,1),k=_t),M.c[M.c.length]=G);M.c.length!=0&&(v=a(Ee(M,jq(e,M.c.length)),165),rC(Pi.a,v)!=null,v.d=I++,Ult(v,Me,ce),M.c=dt(un,te,1,0,5,1))}for(Gt=t.c.length+1,et=new j(t);et.aBn.d&&(Th(n),Lc(Bn.b,i),i.c>0&&(i.a=Bn,Ut(Bn.e,i),i.b=ae,Ut(ae.b,i)))}function Gxe(t,e,n){var i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me;for(rt=new Nv,pt=new Nv,v=_m(e,xpt),i=new v4t(t,n,rt,pt),Sge(i.a,i.b,i.c,i.d,v),p=(Gt=rt.i,Gt||(rt.i=ct(rt.c,122)?new Dv(rt,a(rt.c,122)):ct(rt.c,115)?new d2(rt,a(rt.c,115)):new hM(rt,rt.c))),ce=p.tc();ce.hc();)for(Zt=a(ce.ic(),270),r=a(rr(rt,Zt),19),$=r.tc();$.hc();)if(O=$.ic(),_t=a(kp(t.d,O),270),_t)f=(!Zt.e&&(Zt.e=new pn(os,Zt,10,9)),Zt.e),ni(f,_t);else throw l=Jd(e,Df),k=RFt+O+DFt+l,I=k+vE,K(new xf(I));for(b=(It=pt.i,It||(pt.i=ct(pt.c,122)?new Dv(pt,a(pt.c,122)):ct(pt.c,115)?new d2(pt,a(pt.c,115)):new hM(pt,pt.c))),Te=b.tc();Te.hc();)for(ae=a(Te.ic(),270),c=a(rr(pt,ae),19),et=c.tc();et.hc();)if(G=et.ic(),_t=a(kp(t.d,G),270),_t)M=(!ae.g&&(ae.g=new pn(os,ae,9,10)),ae.g),ni(M,_t);else throw l=Jd(e,Df),k=RFt+G+DFt+l,I=k+vE,K(new xf(I));!n.b&&(n.b=new pn(Si,n,4,7)),n.b.i!=0&&(!n.c&&(n.c=new pn(Si,n,5,8)),n.c.i!=0)&&(!n.b&&(n.b=new pn(Si,n,4,7)),n.b.i<=1&&(!n.c&&(n.c=new pn(Si,n,5,8)),n.c.i<=1))&&(!n.a&&(n.a=new Wt(os,n,6,6)),n.a).i==1&&(Me=a(at((!n.a&&(n.a=new Wt(os,n,6,6)),n.a),0),270),!Hq(Me)&&!Gq(Me)&&(eat(Me,a(at((!n.b&&(n.b=new pn(Si,n,4,7)),n.b),0),97)),nat(Me,a(at((!n.c&&(n.c=new pn(Si,n,5,8)),n.c),0),97))))}function rOt(t,e,n){var i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It,Gt,Zt,ce;for(t.d=new We(is,is),t.c=new We(Ps,Ps),k=e.tc();k.hc();)for(v=a(k.ic(),31),pt=new j(v.a);pt.a=It||!Xle(et,i))&&(i=fAt(e,v)),Ks(et,i),c=Rn(Rs(et));Jn(c);)r=a(In(c),14),!t.a[r.o]&&($=r.c.g,--t.e[$.o],t.e[$.o]==0&&LM(ZM(I,$)));for(b=v.c.length-1;b>=0;--b)Ut(e.b,(mi(b,v.c.length),a(v.c[b],26)));e.a.c=dt(un,te,1,0,5,1),Vn(n)}function Vxe(t,e,n){var i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi,ls,iu,wa,e1,Nu,fg,L0,uf,mh;if(Me=KAt(t,skt(n),e),zL(Me,Jd(e,Df)),Bn=a(kp(t.g,$2(Gg(e,$Y))),35),k=Gg(e,"sourcePort"),i=null,k&&(i=$2(k)),Pi=a(kp(t.j,i),121),!Bn)throw f=NC(e),O="An edge must have a source node (edge id: '"+f,$=O+vE,K(new xf($));if(Pi&&!Rp(Tf(Pi),Bn))throw p=Jd(e,Df),G="The source port of an edge must be a port of the edge's source node (edge id: '"+p,et=G+vE,K(new xf(et));if(ce=(!Me.b&&(Me.b=new pn(Si,Me,4,7)),Me.b),Pi?c=Pi:c=Bn,ni(ce,c),ls=a(kp(t.g,$2(Gg(e,kpt))),35),I=Gg(e,"targetPort"),r=null,I&&(r=$2(I)),iu=a(kp(t.j,r),121),!ls)throw M=NC(e),rt="An edge must have a target node (edge id: '"+M,pt=rt+vE,K(new xf(pt));if(iu&&!Rp(Tf(iu),ls))throw b=Jd(e,Df),_t="The target port of an edge must be a port of the edge's target node (edge id: '"+b,It=_t+vE,K(new xf(It));if(ae=(!Me.c&&(Me.c=new pn(Si,Me,5,8)),Me.c),iu?l=iu:l=ls,ni(ae,l),(!Me.b&&(Me.b=new pn(Si,Me,4,7)),Me.b).i==0||(!Me.c&&(Me.c=new pn(Si,Me,5,8)),Me.c).i==0)throw v=Jd(e,Df),Gt=IFt+v,Zt=Gt+vE,K(new xf(Zt));return m7(e,Me),wa=T_(Me,!0,!0),e1=vL(e,"sourcePoint"),Nu=new sG(wa),afe(Nu.a,e1),fg=vL(e,"targetPoint"),L0=new lG(wa),ufe(L0.a,fg),uf=_m(e,KY),mh=new hG(wa),h1e(mh.a,uf),Te=GV(t,e,Me),Te}function oZ(t,e){qX();var n,i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn;if(Zt=t.e,I=t.d,r=t.a,Zt==0)switch(e){case 0:return"0";case 1:return cE;case 2:return"0.00";case 3:return"0.000";case 4:return"0.0000";case 5:return"0.00000";case 6:return"0.000000";default:return It=new om,e<0?It.a+="0E+":It.a+="0E",It.a+=-e,It.a}if(rt=I*10+1+7,pt=dt(el,Pf,22,rt+1,15,1),n=rt,I==1)if(l=r[0],l<0){Bn=ns(l,uo);do O=Bn,Bn=lP(Bn,10),pt[--n]=48+or(Yg(O,Zg(Bn,10)))&qr;while(Pc(Bn,0)!=0)}else{Bn=l;do O=Bn,Bn=Bn/10|0,pt[--n]=48+(O-Bn*10)&qr;while(Bn!=0)}else{ae=dt(Gn,pi,22,I,15,1),Me=I,Aa(r,0,ae,0,I);t:for(;;){for(Gt=0,p=Me-1;p>=0;p--)Te=so(Yd(Gt,32),ns(ae[p],uo)),G=Dpe(Te),ae[p]=or(G),Gt=or(E1(G,32));et=or(Gt),$=n;do pt[--n]=48+et%10&qr;while((et=et/10|0)!=0&&n!=0);for(i=9-$+n,f=0;f0;f++)pt[--n]=48;for(v=Me-1;ae[v]==0;v--)if(v==0)break t;Me=v+1}for(;pt[n]==48;)++n}if(k=Zt<0,c=rt-n-e-1,e==0)return k&&(pt[--n]=45),ml(pt,n,rt-n);if(e>0&&c>=-6){if(c>=0){for(b=n+c,M=rt-1;M>=b;M--)pt[M+1]=pt[M];return pt[++b]=46,k&&(pt[--n]=45),ml(pt,n,rt-n+1)}for(v=2;v<-c+1;v++)pt[--n]=48;return pt[--n]=46,pt[--n]=48,k&&(pt[--n]=45),ml(pt,n,rt-n)}return ce=n+1,_t=new Bb,k&&(_t.a+="-"),rt-ce>=1?(S1(_t,pt[n]),_t.a+=".",_t.a+=ml(pt,n+1,rt-n-1)):_t.a+=ml(pt,n,rt-n),_t.a+="E",c>0&&(_t.a+="+"),_t.a+=""+c,_t.a}function qxe(t,e,n,i){var r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi,ls,iu,wa,e1,Nu,fg,L0,uf;if(pt=a(at((!t.b&&(t.b=new pn(Si,t,4,7)),t.b),0),97),It=pt.Yf(),Gt=pt.Zf(),_t=pt.Xf()/2,$=pt.Wf()/2,ct(pt,187)&&(rt=a(pt,121),It+=Tf(rt).i,It+=Tf(rt).i),It+=_t,Gt+=$,Me=a(at((!t.b&&(t.b=new pn(Si,t,4,7)),t.b),0),97),Pi=Me.Yf(),ls=Me.Zf(),Bn=Me.Xf()/2,Zt=Me.Wf()/2,ct(Me,187)&&(Te=a(Me,121),Pi+=Tf(Te).i,Pi+=Tf(Te).i),Pi+=Bn,ls+=Zt,(!t.a&&(t.a=new Wt(os,t,6,6)),t.a).i==0)f=(am(),b=new R3,b),ni((!t.a&&(t.a=new Wt(os,t,6,6)),t.a),f);else if((!t.a&&(t.a=new Wt(os,t,6,6)),t.a).i>1)for(O=new VT((!t.a&&(t.a=new Wt(os,t,6,6)),t.a));O.e!=O.i._b();)WC(O);for(l=a(at((!t.a&&(t.a=new Wt(os,t,6,6)),t.a),0),270),G=Pi,Pi>It+_t?G=It+_t:PiGt+$?et=Gt+$:lsIt-_t&&GGt-$&&etPi+Bn?ce=Pi+Bn:Itls+Zt?ae=ls+Zt:GtPi-Bn&&cels-Zt&&aen&&(k=n-1),I=fg+pu(e,24)*GP*M-M/2,I<0?I=1:I>i&&(I=i-1),r=(am(),p=new I3,p),IV(r,k),RV(r,I),ni((!l.a&&(l.a=new Ss(sf,l,5)),l.a),r)}function sOt(t,e){var n,i,r,c,l,f,p,b,v,M,k,I,O,$,G,et;for(i=new Dt,f=new Dt,G=e/2,I=t._b(),r=a(t.cd(0),9),et=a(t.cd(1),9),O=EX(r.a,r.b,et.a,et.b,G),Ut(i,(mi(0,O.c.length),a(O.c[0],9))),Ut(f,(mi(1,O.c.length),a(O.c[1],9))),b=2;b=0;p--)Xi(n,(mi(p,l.c.length),a(l.c[p],9)));return n}function Xxe(t){var e,n,i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn;if(Zt=a(z(t,(qt(),Qi)),83),Zt!=(Ls(),dp)&&Zt!=ob){for(O=t.b,I=O.c.length,v=new Vu((Ah(I+2,dZ),NL(so(so(5,I+2),(I+2)/10|0)))),$=new Vu((Ah(I+2,dZ),NL(so(so(5,I+2),(I+2)/10|0)))),Ut(v,new vi),Ut(v,new vi),Ut($,new Dt),Ut($,new Dt),Gt=new Dt,e=0;eMe?M:Me;for(i=new j(ae.f);i.aMe?ce:Me}Ct(_t,rF,Xt(M)),Ct(_t,sF,Xt(ce))}for(et=0,I=new j(e.b);I.a=t.j){t.a=-1,t.c=1;return}if(e=bo(t.i,t.d++),t.a=e,t.b==1){switch(e){case 92:if(i=10,t.d>=t.j)throw K(new ri(ai((Kn(),AO))));t.a=bo(t.i,t.d++);break;case 45:(t.e&512)==512&&t.d=t.j||bo(t.i,t.d)!=63)break;if(++t.d>=t.j)throw K(new ri(ai((Kn(),eK))));switch(e=bo(t.i,t.d++),e){case 58:i=13;break;case 61:i=14;break;case 33:i=15;break;case 91:i=19;break;case 62:i=18;break;case 60:if(t.d>=t.j)throw K(new ri(ai((Kn(),eK))));if(e=bo(t.i,t.d++),e==61)i=16;else if(e==33)i=17;else throw K(new ri(ai((Kn(),FFt))));break;case 35:for(;t.d=t.j)throw K(new ri(ai((Kn(),AO))));t.a=bo(t.i,t.d++);break;default:i=0}t.c=i}function oOt(t){var e,n,i,r,c,l,f,p,b;for(t.b=1,Ci(t),e=null,t.c==0&&t.a==94?(Ci(t),e=(Ai(),Ai(),++Ar,new Eu(4)),jc(e,0,yE),f=(++Ar,new Eu(4))):f=(Ai(),Ai(),++Ar,new Eu(4)),r=!0;(b=t.c)!=1;){if(b==0&&t.a==93&&!r){e&&(u4(e,f),f=e);break}if(n=t.a,i=!1,b==10)switch(n){case 100:case 68:case 119:case 87:case 115:case 83:uw(f,eE(n)),i=!0;break;case 105:case 73:case 99:case 67:n=(uw(f,eE(n)),-1),i=!0;break;case 112:case 80:if(p=vlt(t,n),!p)throw K(new ri(ai((Kn(),nK))));uw(f,p),i=!0;break;default:n=Qlt(t)}else if(b==24&&!r){if(e&&(u4(e,f),f=e),c=oOt(t),u4(f,c),t.c!=0||t.a!=93)throw K(new ri(ai((Kn(),XFt))));break}if(Ci(t),!i){if(b==0){if(n==91)throw K(new ri(ai((Kn(),Dpt))));if(n==93)throw K(new ri(ai((Kn(),Npt))));if(n==45&&!r&&t.a!=93)throw K(new ri(ai((Kn(),iK))))}if(t.c!=0||t.a!=45||n==45&&r)jc(f,n,n);else{if(Ci(t),(b=t.c)==1)throw K(new ri(ai((Kn(),kO))));if(b==0&&t.a==93)jc(f,n,n),jc(f,45,45);else{if(b==0&&t.a==93||b==24)throw K(new ri(ai((Kn(),iK))));if(l=t.a,b==0){if(l==91)throw K(new ri(ai((Kn(),Dpt))));if(l==93)throw K(new ri(ai((Kn(),Npt))));if(l==45)throw K(new ri(ai((Kn(),iK))))}else b==10&&(l=Qlt(t));if(Ci(t),n>l)throw K(new ri(ai((Kn(),KFt))));jc(f,n,l)}}}r=!1}if(t.c==1)throw K(new ri(ai((Kn(),kO))));return M_(f),a4(f),t.b=0,Ci(t),f}function Yxe(t,e,n){var i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi,ls,iu,wa;for(di(n,"Greedy cycle removal",1),rt=e.a,wa=rt.c.length,t.a=dt(Gn,pi,22,wa,15,1),t.c=dt(Gn,pi,22,wa,15,1),t.b=dt(Gn,pi,22,wa,15,1),p=0,G=new j(rt);G.a0?Te+1:1);for(c=new j(It.f);c.a0?Te+1:1)}t.c[p]==0?Xi(t.d,O):t.a[p]==0&&Xi(t.e,O),++p}for(I=-1,k=1,v=new Dt,Me=a(z(e,(Ft(),IE)),214);wa>0;){for(;t.d.b!=0;)Pi=a(h$(t.d),8),t.b[Pi.o]=I--,dht(t,Pi),--wa;for(;t.e.b!=0;)ls=a(h$(t.e),8),t.b[ls.o]=k++,dht(t,ls),--wa;if(wa>0){for(M=Vs,et=new j(rt);et.a=M&&(pt>M&&(v.c=dt(un,te,1,0,5,1),M=pt),v.c[v.c.length]=O));b=a(Ee(v,jq(Me,v.c.length)),8),t.b[b.o]=k++,dht(t,b),--wa}}for(Bn=rt.c.length+1,p=0;pt.b[iu]&&(X1(i,!0),Ct(e,OB,(me(),me(),!0)));t.a=null,t.c=null,t.b=null,ld(t.e),ld(t.d),Vn(n)}function Kxe(t){Xn(t.c,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#decimal"])),Xn(t.d,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#integer"])),Xn(t.e,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#boolean"])),Xn(t.f,ui,Y(Z(At,1),wt,2,6,[Ns,"EBoolean",Ti,"EBoolean:Object"])),Xn(t.i,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#byte"])),Xn(t.g,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#hexBinary"])),Xn(t.j,ui,Y(Z(At,1),wt,2,6,[Ns,"EByte",Ti,"EByte:Object"])),Xn(t.n,ui,Y(Z(At,1),wt,2,6,[Ns,"EChar",Ti,"EChar:Object"])),Xn(t.t,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#double"])),Xn(t.u,ui,Y(Z(At,1),wt,2,6,[Ns,"EDouble",Ti,"EDouble:Object"])),Xn(t.F,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#float"])),Xn(t.G,ui,Y(Z(At,1),wt,2,6,[Ns,"EFloat",Ti,"EFloat:Object"])),Xn(t.I,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#int"])),Xn(t.J,ui,Y(Z(At,1),wt,2,6,[Ns,"EInt",Ti,"EInt:Object"])),Xn(t.N,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#long"])),Xn(t.O,ui,Y(Z(At,1),wt,2,6,[Ns,"ELong",Ti,"ELong:Object"])),Xn(t.Z,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#short"])),Xn(t.$,ui,Y(Z(At,1),wt,2,6,[Ns,"EShort",Ti,"EShort:Object"])),Xn(t._,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#string"]))}function zht(t,e,n,i){var r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi;if(fNt(e),p=a(at((!e.b&&(e.b=new pn(Si,e,4,7)),e.b),0),97),v=a(at((!e.c&&(e.c=new pn(Si,e,5,8)),e.c),0),97),f=zc(p),b=zc(v),l=(!e.a&&(e.a=new Wt(os,e,6,6)),e.a).i==0?null:a(at((!e.a&&(e.a=new Wt(os,e,6,6)),e.a),0),270),Zt=a(zi(t.a,f),8),Me=a(zi(t.a,b),8),ce=null,Bn=null,ct(p,187)&&(Gt=a(zi(t.a,p),279),ct(Gt,11)?ce=a(Gt,11):ct(Gt,8)&&(Zt=a(Gt,8),ce=a(Ee(Zt.i,0),11))),ct(v,187)&&(Te=a(zi(t.a,v),279),ct(Te,11)?Bn=a(Te,11):ct(Te,8)&&(Me=a(Te,8),Bn=a(Ee(Me.i,0),11))),!Zt||!Me)return null;for($=new Np,Uo($,e),Ct($,(Ft(),li),e),Ct($,(qt(),Ro),null),I=a(z(i,Qc),19),Zt==Me&&I.nc((So(),S6)),ce||(It=(Fo(),ba),ae=null,l&&Gd(a(z(Zt,Qi),83))&&(ae=new We(l.j,l.k),ukt(ae,tN(e)),Pkt(ae,n),bC(b,f)&&(It=Ga,sr(ae,Zt.k))),ce=JNt(Zt,ae,It,i)),Bn||(It=(Fo(),Ga),Pi=null,l&&Gd(a(z(Me,Qi),83))&&(Pi=new We(l.b,l.c),ukt(Pi,tN(e)),Pkt(Pi,n)),Bn=JNt(Me,Pi,It,Mc(Me))),Hs($,ce),Ts($,Bn),k=new $n((!e.n&&(e.n=new Wt(ic,e,1,7)),e.n));k.e!=k.i._b();)if(M=a(ci(k),137),!lt(de(cn(M,v0)))&&M.a)switch(G=mq(M),Ut($.b,G),a(z(G,ng),226).g){case 2:case 3:I.nc((So(),LE));break;case 1:case 0:I.nc((So(),kE)),Ct(G,ng,(ip(),gA))}if(c=a(z(i,RE),317),et=a(z(i,XB),292),r=c==(L2(),x6)||et==(jC(),QJ),l&&(!l.a&&(l.a=new Ss(sf,l,5)),l.a).i!=0&&r){for(rt=pP(l),O=new Va,_t=qn(rt,0);_t.b!=_t.d.c;)pt=a(Yn(_t),9),Xi(O,new Oo(pt));Ct($,Q0t,O)}return $}function jht(t,e,n,i,r,c){var l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi;for(f=a(Ee(t.d.c.b,i),26),Me=new $r,I=new $r,k=0;kn&&(ce=I.a.Zb(et,I),ce==null);for(Bn=new $r,O=new $r,pt=Me.a.Xb().tc();pt.hc();)for(et=a(pt.ic(),8),l=e==1?br(et):Rs(et),b=(Ao(),new $d(id(Zd(l.a,new X))));Jn(b);)p=a(In(b),14),ql(et.c)!=ql(p.d.g.c)&&Ir(Bn,p.d.g);for(_t=I.a.Xb().tc();_t.hc();)for(et=a(_t.ic(),8),l=e==1?br(et):Rs(et),b=(Ao(),new $d(id(Zd(l.a,new X))));Jn(b);)p=a(In(b),14),ql(et.c)!=ql(p.d.g.c)&&Ir(O,p.d.g);for(Gjt&&rd(),Zt=a(Ee(t.d.c.b,i+(e==1?1:-1)),26),$=Vs,G=qi,M=0;MM?$:M:O.a.Qb(et)&&(G=GM&&(Me=0,Bn+=v+Zt,v=0),vbe(It,l,Me,Bn),e=y.Math.max(e,Me+Gt.a),v=y.Math.max(v,Gt.b),Me+=Gt.a+Zt;for(_t=new vi,n=new vi,ae=new j(t);ae.a=2){for(k=!0,rt=(mi(1,M.c.length),a(M.c[1],26)),$=new j(l.a);$.a<$.c.c.length;){if(I=a(H($),8),zt(z(I,(qt(),la)))===zt((bl(),Mx))){k=!1;break}for(r=Rn(br(I));Jn(r);)if(i=a(In(r),14),i.d.g.c==rt){k=!1;break}if(!k)break}if(k){for(et=a(xo(l.a,dt(Cl,Ih,8,l.a.c.length,0,1)),123),O=0,G=et.length;O=2){for(k=!0,pt=a(Ee(M,M.c.length-2),26),$=new j(p.a);$.a<$.c.c.length;){if(I=a(H($),8),zt(z(I,(qt(),la)))===zt((bl(),Mx))){k=!1;break}for(r=Rn(Rs(I));Jn(r);)if(i=a(In(r),14),i.c.g.c==pt){k=!1;break}if(!k)break}if(k){for(et=a(xo(p.a,dt(Cl,Ih,8,p.a.c.length,0,1)),123),O=0,G=et.length;OSX(c))&&(M=c);for(!M&&(M=(mi(0,G.c.length),a(G.c[0],164))),$=new j(e.b);$.a<$.c.c.length;)for(O=a(H($),26),_t=new j(O.a);_t.a<_t.c.c.length;)pt=a(H(_t),8),pt.k.b=lt(M.p[pt.o])+lt(M.d[pt.o]);for(t.a&&(rd(),""+z9t(M),""+Fge(M)),l=new j(G);l.a0?(O=(It+1)*t.d,O=0&&(bh+=(It+2)*t.d)}pt=Te,f=p}while(Te);for(r=new j(t.j);r.a=-1900?1:0,n>=4?Ii(t,Y(Z(At,1),wt,2,6,[MOt,EOt])[f]):Ii(t,Y(Z(At,1),wt,2,6,["BC","AD"])[f]);break;case 121:Vfe(t,n,i);break;case 77:lve(t,n,i);break;case 107:p=r.q.getHours(),p==0?dd(t,24,n):dd(t,p,n);break;case 83:Qme(t,n,r);break;case 69:v=i.q.getDay(),n==5?Ii(t,Y(Z(At,1),wt,2,6,["S","M","T","W","T","F","S"])[v]):n==4?Ii(t,Y(Z(At,1),wt,2,6,[AZ,kZ,LZ,PZ,IZ,RZ,DZ])[v]):Ii(t,Y(Z(At,1),wt,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[v]);break;case 97:r.q.getHours()>=12&&r.q.getHours()<24?Ii(t,Y(Z(At,1),wt,2,6,["AM","PM"])[1]):Ii(t,Y(Z(At,1),wt,2,6,["AM","PM"])[0]);break;case 104:M=r.q.getHours()%12,M==0?dd(t,12,n):dd(t,M,n);break;case 75:k=r.q.getHours()%12,dd(t,k,n);break;case 72:I=r.q.getHours(),dd(t,I,n);break;case 99:O=i.q.getDay(),n==5?Ii(t,Y(Z(At,1),wt,2,6,["S","M","T","W","T","F","S"])[O]):n==4?Ii(t,Y(Z(At,1),wt,2,6,[AZ,kZ,LZ,PZ,IZ,RZ,DZ])[O]):n==3?Ii(t,Y(Z(At,1),wt,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[O]):dd(t,O,1);break;case 76:$=i.q.getMonth(),n==5?Ii(t,Y(Z(At,1),wt,2,6,["J","F","M","A","M","J","J","A","S","O","N","D"])[$]):n==4?Ii(t,Y(Z(At,1),wt,2,6,[bZ,wZ,vZ,_Z,tx,yZ,xZ,MZ,EZ,SZ,TZ,CZ])[$]):n==3?Ii(t,Y(Z(At,1),wt,2,6,["Jan","Feb","Mar","Apr",tx,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"])[$]):dd(t,$+1,n);break;case 81:G=i.q.getMonth()/3|0,n<4?Ii(t,Y(Z(At,1),wt,2,6,["Q1","Q2","Q3","Q4"])[G]):Ii(t,Y(Z(At,1),wt,2,6,["1st quarter","2nd quarter","3rd quarter","4th quarter"])[G]);break;case 100:et=i.q.getDate(),dd(t,et,n);break;case 109:b=r.q.getMinutes(),dd(t,b,n);break;case 115:l=r.q.getSeconds(),dd(t,l,n);break;case 122:n<4?Ii(t,c.c[0]):Ii(t,c.c[1]);break;case 118:Ii(t,c.b);break;case 90:n<3?Ii(t,d0e(c)):n==3?Ii(t,b0e(c)):Ii(t,w0e(c.a));break;default:return!1}return!0}function Ght(){Ght=P;var t;omt=(t=a(yu(gJ),10),new ja(t,a(cu(t,t.length),10),0)),_Ht=new bn(Nft,omt),NHt=new bn(Oft,(me(),me(),!1)),dmt=(uN(),kJ),UHt=new bn(fO,dmt),QHt=new bn(Bft,!1),tGt=new bn(Fft,!0),Xt(1),_Gt=new bn(Uft,Xt(7)),yGt=new bn(zft,!1),dGt=new bn(jft,!1),umt=(RN(),bJ),THt=new bn(aY,umt),mmt=(_7(),YJ),KHt=new bn(QP,mmt),pmt=(bl(),Mx),WHt=new bn(Hft,pmt),bmt=(B2(),G6),JHt=new bn(Gft,bmt),Xt(-1),$Ht=new bn(uY,Xt(4)),Xt(-1),qHt=new bn(lY,Xt(2)),gmt=(S_(),QB),YHt=new bn(hY,gmt),Xt(0),ZHt=new bn(fY,Xt(0)),HHt=new bn(dY,Xt(qi)),amt=(L2(),M6),SHt=new bn(pY,amt),MHt=new bn(Wft,.1),EHt=new bn($ft,!1),Xt(0),yHt=new bn(Vft,Xt(40)),cmt=(DM(),AJ),xHt=new bn(qft,cmt),ymt=(jC(),B6),fGt=new bn(dE,ymt),sGt=new kr(gY),wmt=(LL(),oF),eGt=new bn(mY,wmt),vmt=(dP(),kB),iGt=new bn(bY,vmt),new W3,cGt=new bn(wY,.3),uGt=new kr(vY),_mt=(nw(),JB),lGt=new bn(Xft,_mt),fmt=(e7(),eQ),kHt=new bn(_Y,fmt),RHt=new bn(dO,!0),PHt=new bn(pO,.4),wGt=new bn(Zft,10),bGt=new bn(Yft,10),vGt=new bn(Kft,20),Xt(0),pGt=new bn(Jft,Xt(0)),Xt(0),gGt=new bn(Qft,Xt(0)),Xt(0),mGt=new bn(tdt,Xt(0)),bHt=new bn(yY,!1),smt=(YM(),G4),vHt=new bn(edt,smt),rmt=(gN(),pJ),wHt=new bn(ndt,rmt),BHt=new bn(gO,!1),Xt(0),OHt=new bn(xY,Xt(16)),Xt(0),FHt=new bn(MY,Xt(5)),Smt=(zN(),iQ),BGt=new bn(v4,Smt),xGt=new bn(idt,10),MGt=new bn(rdt,1),Mmt=(AN(),CB),AGt=new bn(mO,Mmt),EGt=new kr(EY),xmt=Xt(1),Xt(0),TGt=new bn(SY,xmt),Emt=(PN(),nQ),NGt=new bn(TY,Emt),PGt=new bn(bO,!0),kGt=new bn(wO,2),RGt=new bn(CY,!0),hmt=(M7(),AB),AHt=new bn(sdt,hmt),lmt=($C(),fJ),CHt=new bn(odt,lmt),jHt=wJ,zHt=x6,VHt=KB,XHt=KB,GHt=ZJ,oGt=F6,nGt=B6,rGt=B6,aGt=tQ,hGt=F6,LHt=(gd(),rb),DHt=rb,IHt=rb,SGt=mJ,CGt=CB,OGt=rQ,IGt=W6,LGt=W6,DGt=W6}function dr(){dr=P;var t,e;Mwt=new kr(XBt),Ewt=(md(),TQ),nVt=new bn(Edt,Ewt),new W3,FE=new bn(aE,null),iVt=new kr(lpt),kQ=new bn(kY,(me(),me(),!1)),Twt=(Js(),Ff),fA=new bn(PY,Twt),kwt=(gd(),HQ),Awt=new bn(t6,kwt),cVt=new bn(apt,!1),Iwt=(Kg(),kF),cy=new bn(Sdt,Iwt),zwt=new _2(12),ay=new bn(rx,zwt),PQ=new bn(uO,!1),$wt=(Ls(),ob),tI=new bn(rY,$wt),Lx=new kr(yO),TF=new kr(qP),FQ=new kr(aO),UQ=new kr(XP),Rwt=new Va,kx=new bn(Odt,Rwt),sVt=new bn(zdt,!1),aVt=new bn(jdt,!1),new kr(ZBt),Dwt=new o2,MF=new bn($dt,Dwt),IQ=new bn(xdt,!1),new W3,dVt=new bn(YBt,1),new bn(KBt,!0),Xt(0),new bn(JBt,Xt(100)),new bn(QBt,!1),Xt(0),new bn(tFt,Xt(4e3)),Xt(0),new bn(eFt,Xt(400)),new bn(nFt,!1),new bn(iFt,!0),new bn(rFt,!1),Swt=(r7(),XQ),rVt=new bn(upt,Swt),Xwt=new bn(JZ,12),pVt=new bn(pdt,10),Zwt=new bn(iY,2),gVt=new bn(gdt,10),Ywt=new bn(mdt,0),CF=new bn(wdt,5),Kwt=new bn(bdt,1),uy=new bn(lE,20),tvt=new bn(vdt,10),zQ=new kr(_dt),Qwt=new REt,Jwt=new bn(Vdt,Qwt),hVt=new kr(Wdt),jwt=!1,lVt=new bn(Gdt,jwt),Nwt=new _2(5),uVt=new bn(sFt,Nwt),Owt=(r0(),e=a(yu(to),10),new ja(e,a(cu(e,e.length),10),0)),EF=new bn(Adt,Owt),Gwt=(G1(),sb),Hwt=new bn(Pdt,Gwt),DQ=new kr(Idt),NQ=new kr(Rdt),OQ=new kr(Ddt),RQ=new kr(Ndt),Bwt=(t=a(yu(yA),10),new ja(t,a(cu(t,t.length),10),0)),UE=new bn(vO,Bwt),Uwt=qe((ma(),jE)),SF=new bn(LY,Uwt),Fwt=new We(0,0),Q6=new bn(_O,Fwt),Cwt=(ip(),AF),J6=new bn(Bdt,Cwt),oVt=new bn(Fdt,!1),new kr(oFt),Xt(1),new bn(cFt,null),Wwt=new kr(Hdt),fVt=new kr(Udt),qwt=(Ht(),Wc),dA=new bn(Mdt,qwt),nu=new kr(ydt),Vwt=(Kh(),ly),BQ=new bn(kdt,Vwt),eI=new bn(Ldt,!1),xF=new bn(Tdt,!1),LQ=new bn(Cdt,!1),Lwt=new bn(QZ,1),Pwt=(y7(),WQ),new bn(aFt,Pwt)}function i3e(t){t.gb||(t.gb=!0,t.b=cc(t,0),Cr(t.b,18),nr(t.b,19),t.a=cc(t,1),Cr(t.a,1),nr(t.a,2),nr(t.a,3),nr(t.a,4),nr(t.a,5),t.o=cc(t,2),Cr(t.o,8),Cr(t.o,9),nr(t.o,10),nr(t.o,11),nr(t.o,12),nr(t.o,13),nr(t.o,14),nr(t.o,15),nr(t.o,16),nr(t.o,17),nr(t.o,18),nr(t.o,19),nr(t.o,20),nr(t.o,21),nr(t.o,22),nr(t.o,23),ko(t.o),ko(t.o),ko(t.o),ko(t.o),ko(t.o),ko(t.o),ko(t.o),ko(t.o),ko(t.o),ko(t.o),t.p=cc(t,3),Cr(t.p,2),Cr(t.p,3),Cr(t.p,4),Cr(t.p,5),nr(t.p,6),nr(t.p,7),ko(t.p),ko(t.p),t.q=cc(t,4),Cr(t.q,8),t.v=cc(t,5),nr(t.v,9),ko(t.v),ko(t.v),ko(t.v),t.w=cc(t,6),Cr(t.w,2),Cr(t.w,3),Cr(t.w,4),nr(t.w,5),t.B=cc(t,7),nr(t.B,1),ko(t.B),ko(t.B),ko(t.B),t.Q=cc(t,8),nr(t.Q,0),ko(t.Q),t.R=cc(t,9),Cr(t.R,1),t.S=cc(t,10),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),t.T=cc(t,11),nr(t.T,10),nr(t.T,11),nr(t.T,12),nr(t.T,13),nr(t.T,14),ko(t.T),ko(t.T),t.U=cc(t,12),Cr(t.U,2),Cr(t.U,3),nr(t.U,4),nr(t.U,5),nr(t.U,6),nr(t.U,7),ko(t.U),t.V=cc(t,13),nr(t.V,10),t.W=cc(t,14),Cr(t.W,18),Cr(t.W,19),Cr(t.W,20),nr(t.W,21),nr(t.W,22),nr(t.W,23),t.bb=cc(t,15),Cr(t.bb,10),Cr(t.bb,11),Cr(t.bb,12),Cr(t.bb,13),Cr(t.bb,14),Cr(t.bb,15),Cr(t.bb,16),nr(t.bb,17),ko(t.bb),ko(t.bb),t.eb=cc(t,16),Cr(t.eb,2),Cr(t.eb,3),Cr(t.eb,4),Cr(t.eb,5),Cr(t.eb,6),Cr(t.eb,7),nr(t.eb,8),nr(t.eb,9),t.ab=cc(t,17),Cr(t.ab,0),Cr(t.ab,1),t.H=cc(t,18),nr(t.H,0),nr(t.H,1),nr(t.H,2),nr(t.H,3),nr(t.H,4),nr(t.H,5),ko(t.H),t.db=cc(t,19),nr(t.db,2),t.c=yi(t,20),t.d=yi(t,21),t.e=yi(t,22),t.f=yi(t,23),t.i=yi(t,24),t.g=yi(t,25),t.j=yi(t,26),t.k=yi(t,27),t.n=yi(t,28),t.r=yi(t,29),t.s=yi(t,30),t.t=yi(t,31),t.u=yi(t,32),t.fb=yi(t,33),t.A=yi(t,34),t.C=yi(t,35),t.D=yi(t,36),t.F=yi(t,37),t.G=yi(t,38),t.I=yi(t,39),t.J=yi(t,40),t.L=yi(t,41),t.M=yi(t,42),t.N=yi(t,43),t.O=yi(t,44),t.P=yi(t,45),t.X=yi(t,46),t.Y=yi(t,47),t.Z=yi(t,48),t.$=yi(t,49),t._=yi(t,50),t.cb=yi(t,51),t.K=yi(t,52))}function Ft(){Ft=P;var t,e;li=new kr(Mft),Y0t=new kr("coordinateOrigin"),NJ=new kr("processors"),Z0t=new es("compoundNode",(me(),me(),!1)),A6=new es("insideConnections",!1),xd=new kr("nestedLGraph"),tg=new kr("parentLNode"),Q0t=new kr("originalBendpoints"),tmt=new kr("originalDummyNodePosition"),emt=new kr("originalLabelEdge"),zB=new kr("representedLabels"),BB=new kr("endLabels"),_x=new es("labelSide",(Tu(),uI)),ty=new es("maxEdgeThickness",0),eg=new es("reversed",!1),IE=new kr(Eft),Pu=new es("longEdgeSource",null),Iu=new es("longEdgeTarget",null),yx=new es("longEdgeHasLabelDummies",!1),k6=new es("longEdgeBeforeLabelDummy",!1),PJ=new es("edgeConstraint",(u_(),vJ)),PE=new kr("inLayerLayoutUnit"),w0=new es("inLayerConstraint",(tp(),T6)),vx=new es("inLayerSuccessorConstraint",new Dt),Ru=new kr("portDummy"),NB=new es("crossingHint",Xt(0)),Qc=new es("graphProperties",(e=a(yu(TJ),10),new ja(e,a(cu(e,e.length),10),0))),wc=new es("externalPortSide",(Ht(),Wc)),J0t=new es("externalPortSize",new go),IJ=new kr("externalPortReplacedDummies"),FB=new kr("externalPortReplacedDummy"),wx=new es("externalPortConnections",(t=a(yu(Ia),10),new ja(t,a(cu(t,t.length),10),0))),Ym=new es(_Bt,0),q0t=new kr("barycenterAssociates"),xx=new kr("TopSideComments"),bx=new kr("BottomSideComments"),DB=new kr("CommentConnectionPort"),RJ=new es("inputCollect",!1),DJ=new es("outputCollect",!1),OB=new es("cyclic",!1),C6=new es("bigNodeOriginalSize",new Rb(0)),_w=new es("bigNodeInitial",!1),X0t=new es("org.eclipse.elk.alg.layered.bigNodeLabels",new Dt),LJ=new es("org.eclipse.elk.alg.layered.postProcess",null),K0t=new kr("crossHierarchyMap"),FJ=new kr("targetOffset"),gHt=new es("splineLabelSize",new go),L6=new es("splineLoopSide",(mu(),Ax)),BJ=new es("splineSelfLoopComponents",new Dt),nmt=new es("splineSelfLoopMargins",new o2),yw=new kr("spacings"),UB=new es("partitionConstraint",!1),Zm=new kr("breakingPoint.info"),$4=new kr("splines.route.start"),OJ=new kr("splines.edgeChain")}function Po(){Po=P,r0t=new Ur("LEFT_DIR_PREPROCESSOR",0),Wgt=new Ur("DOWN_DIR_PREPROCESSOR",1),w0t=new Ur("UP_DIR_PREPROCESSOR",2),Hgt=new Ur("COMMENT_PREPROCESSOR",3),z4=new Ur("EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER",4),p0t=new Ur("SPLINE_SELF_LOOP_PREPROCESSOR",5),rJ=new Ur("INTERACTIVE_EXTERNAL_PORT_POSITIONER",6),u0t=new Ur("PARTITION_PREPROCESSOR",7),nJ=new Ur("BIG_NODES_PREPROCESSOR",8),bB=new Ur("LABEL_DUMMY_INSERTER",9),Kgt=new Ur("HIGH_DEGREE_NODE_LAYER_PROCESSOR",10),a0t=new Ur("PARTITION_POSTPROCESSOR",11),o0t=new Ur("NODE_PROMOTION",12),AE=new Ur("LAYER_CONSTRAINT_PROCESSOR",13),Xgt=new Ur("HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR",14),eJ=new Ur("BIG_NODES_INTERMEDIATEPROCESSOR",15),h0t=new Ur("SEMI_INTERACTIVE_CROSSMIN_PROCESSOR",16),Bgt=new Ur("BREAKING_POINT_INSERTER",17),cJ=new Ur("LONG_EDGE_SPLITTER",18),uJ=new Ur("PORT_SIDE_PROCESSOR",19),mB=new Ur("INVERTED_PORT_PROCESSOR",20),l0t=new Ur("SELF_LOOP_PROCESSOR",21),aJ=new Ur("PORT_LIST_SORTER",22),yB=new Ur("NORTH_SOUTH_PORT_PREPROCESSOR",23),Fgt=new Ur("BREAKING_POINT_PROCESSOR",24),c0t=new Ur(pBt,25),m0t=new Ur(gBt,26),d0t=new Ur("SPLINE_SELF_LOOP_POSITIONER",27),f0t=new Ur("SINGLE_EDGE_GRAPH_WRAPPER",28),sJ=new Ur("IN_LAYER_CONSTRAINT_PROCESSOR",29),iJ=new Ur("BIG_NODES_SPLITTER",30),$gt=new Ur("END_NODE_PORT_LABEL_MANAGEMENT_PROCESSOR",31),e0t=new Ur("LABEL_AND_NODE_SIZE_PROCESSOR",32),g0t=new Ur("SPLINE_SELF_LOOP_ROUTER",33),s0t=new Ur("NODE_MARGIN_CALCULATOR",34),gB=new Ur("END_LABEL_PREPROCESSOR",35),vB=new Ur("LABEL_DUMMY_SWITCHER",36),zgt=new Ur("CENTER_LABEL_MANAGEMENT_PROCESSOR",37),CE=new Ur("LABEL_SIDE_SELECTOR",38),Qgt=new Ur("HYPEREDGE_DUMMY_MERGER",39),Zgt=new Ur("HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR",40),n0t=new Ur("LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR",41),j4=new Ur("HIERARCHICAL_PORT_POSITION_PROCESSOR",42),y6=new Ur("BIG_NODES_POSTPROCESSOR",43),jgt=new Ur("COMMENT_POSTPROCESSOR",44),t0t=new Ur("HYPERNODE_PROCESSOR",45),Ygt=new Ur("HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER",46),oJ=new Ur("LONG_EDGE_JOINER",47),Ugt=new Ur("BREAKING_POINT_REMOVER",48),_B=new Ur("NORTH_SOUTH_PORT_POSTPROCESSOR",49),Jgt=new Ur("HORIZONTAL_COMPACTOR",50),wB=new Ur("LABEL_DUMMY_REMOVER",51),Vgt=new Ur("FINAL_SPLINE_BENDPOINTS_CALCULATOR",52),xB=new Ur("REVERSED_EDGE_RESTORER",53),pB=new Ur("END_LABEL_POSTPROCESSOR",54),qgt=new Ur("HIERARCHICAL_NODE_RESIZER",55),i0t=new Ur("LEFT_DIR_POSTPROCESSOR",56),Ggt=new Ur("DOWN_DIR_POSTPROCESSOR",57),b0t=new Ur("UP_DIR_POSTPROCESSOR",58)}function r3e(t,e,n){var i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi,ls,iu,wa,e1,Nu,fg,L0,uf,mh,bh,ZE,EI,SI,Hx,ptt,IA,TXt,w_t,gb,RA,gtt,Gx,DA,Ww,NA,mtt,CXt;for(w_t=0,Bn=0,iu=e.length;Bn0&&(t.a[mh.o]=w_t++)}for(DA=0,Pi=0,wa=n.length;Pi0;){for(mh=(Hn(SI.b>0),a(SI.a.cd(SI.c=--SI.b),11)),EI=0,f=new j(mh.d);f.a0&&(mh.i==(Ht(),Tn)?(t.a[mh.o]=DA,++DA):(t.a[mh.o]=DA+e1+fg,++fg))}DA+=fg}for(ZE=(ts(),new vi),I=new qa,Me=0,ls=e.length;Meb.b&&(b.b=Hx)):mh.g.c==TXt&&(Hxb.c&&(b.c=Hx));for(IL(O,0,O.length,null),Gx=dt(Gn,pi,22,O.length,15,1),i=dt(Gn,pi,22,DA+1,15,1),G=0;G0;)Gt%2>0&&(r+=mtt[Gt+1]),Gt=(Gt-1)/2|0,++mtt[Gt];for(ce=dt(wWt,te,336,O.length*2,0,1),pt=0;pt'?":le(FFt,t)?"'(?<' or '(? toIndex: ",cft=", toIndex: ",NOt="org.eclipse.elk.alg.common.compaction",OOt="Scanline/EventHandler",vd="org.eclipse.elk.alg.common.compaction.oned",BOt="CNode belongs to another CGroup.",FOt="ISpacingsHandler/1",GZ="The ",WZ=" instance has been finished already.",UOt="The direction ",zOt=" is not supported by the CGraph instance.",jOt="OneDimensionalCompactor",HOt="OneDimensionalCompactor/lambda$0$Type",GOt="Quadruplet",WOt="ScanlineConstraintCalculator",$Ot="ScanlineConstraintCalculator/ConstraintsScanlineHandler",VOt="ScanlineConstraintCalculator/ConstraintsScanlineHandler/lambda$0$Type",qOt="ScanlineConstraintCalculator/Timestamp",XOt="ScanlineConstraintCalculator/lambda$0$Type",sh={138:1,56:1},$Z="org.eclipse.elk.alg.common.compaction.options",sa="org.eclipse.elk.core.data",aft="org.eclipse.elk.polyomino.traversalStrategy",uft="org.eclipse.elk.polyomino.lowLevelSort",lft="org.eclipse.elk.polyomino.highLevelSort",hft="org.eclipse.elk.polyomino.fill",_d={154:1},VZ="polyomino",If="org.eclipse.elk.alg.common.compaction.polyomino",rO="org.eclipse.elk.alg.common.compaction.polyomino.structures",fft="Direction",qZ="Grid is only of size ",XZ=". Requested point (",ZZ=") is out of bounds.",sO=" Given center based coordinates were (",$P="org.eclipse.elk.graph.properties",ZOt="IPropertyHolder",YZ={3:1,93:1,131:1},N_={244:1},f4="org.eclipse.elk.core",YOt="Connected Components Compaction",KOt="org.eclipse.elk.alg.disco",oO="org.eclipse.elk.alg.disco.graph",KZ="org.eclipse.elk.alg.disco.options",JOt="CompactionStrategy",dft="org.eclipse.elk.disco.componentCompaction.strategy",pft="org.eclipse.elk.disco.componentCompaction.componentLayoutAlgorithm",gft="org.eclipse.elk.disco.debug.discoGraph",mft="org.eclipse.elk.disco.debug.discoPolys",QOt="componentCompaction",c0="org.eclipse.elk.disco",JZ="org.eclipse.elk.spacing.componentComponent",QZ="org.eclipse.elk.edge.thickness",aE="org.eclipse.elk.aspectRatio",rx="org.eclipse.elk.padding",O_="org.eclipse.elk.alg.disco.transform",tY=1.5707963267948966,fw={3:1,4:1,5:1,175:1},a0={221:1,3:1,4:1},bft={3:1,6:1,4:1,5:1,63:1,73:1},wft="org.eclipse.elk.alg.force",vft="ComponentsProcessor",tBt="ComponentsProcessor/1",VP="org.eclipse.elk.alg.force.graph",eBt="Component Layout",_ft="org.eclipse.elk.alg.force.model",yd=.01,cO="org.eclipse.elk.force.model",yft="org.eclipse.elk.force.iterations",xft="org.eclipse.elk.force.repulsivePower",eY="org.eclipse.elk.force.temperature",op=.001,nY="org.eclipse.elk.force.repulsion",d4="org.eclipse.elk.alg.force.options",uE=1.600000023841858,Rf="org.eclipse.elk.force",qP="org.eclipse.elk.priority",lE="org.eclipse.elk.spacing.nodeNode",iY="org.eclipse.elk.spacing.edgeLabel",aO="org.eclipse.elk.randomSeed",XP="org.eclipse.elk.separateConnectedComponents",uO="org.eclipse.elk.interactive",rY="org.eclipse.elk.portConstraints",Mft="origin",Eft="random",nBt="boundingBox.upLeft",iBt="boundingBox.lowRight",Sft="org.eclipse.elk.stress.fixed",Tft="org.eclipse.elk.stress.desiredEdgeLength",Cft="org.eclipse.elk.stress.dimension",Aft="org.eclipse.elk.stress.epsilon",kft="org.eclipse.elk.stress.iterationLimit",p4="org.eclipse.elk.stress",rBt="ELK Stress",sY="org.eclipse.elk.alg.force.stress",sBt="Layered layout",ZP="org.eclipse.elk.alg.layered",YP="org.eclipse.elk.alg.layered.compaction.components",g4="org.eclipse.elk.alg.layered.compaction.oned",lO="org.eclipse.elk.alg.layered.compaction.oned.algs",u0="org.eclipse.elk.alg.layered.compaction.recthull",K1="org.eclipse.elk.alg.layered.components",oBt={3:1,6:1,4:1,5:1,85:1,63:1,73:1},hO="org.eclipse.elk.alg.layered.compound",_l={3:1,6:1,4:1,5:1,99:1,85:1,63:1,73:1},Br={50:1},oa="org.eclipse.elk.alg.layered.graph",Ih={3:1,6:1,4:1,5:1,85:1,123:1,148:1,63:1,73:1},cBt="Not supported by LGraph",aBt=`([{"' \r -`,uBt=`)]}"' \r -`,lBt="The given string contains parts that cannot be parsed as numbers.",KP="org.eclipse.elk.core.math",hBt={3:1,4:1,135:1,211:1,428:1},fBt={3:1,4:1,119:1,211:1,428:1},l0="org.eclipse.elk.alg.layered.graph.transform",Dn="org.eclipse.elk.alg.layered.intermediate",dBt="Big nodes pre-processing",Lft={3:1,6:1,4:1,5:1,85:1,619:1,148:1,63:1,73:1},Pft={3:1,4:1,5:1,537:1},pBt="ONE_SIDED_GREEDY_SWITCH",gBt="TWO_SIDED_GREEDY_SWITCH",oY="No implementation is available for the layout processor ",Ift="IntermediateProcessorStrategy",Rft="Node '",mBt="NodeMarginCalculator",bBt="Odd port side processing",dw=1e-8,Kr="org.eclipse.elk.alg.layered.intermediate.compaction",m4="org.eclipse.elk.alg.layered.intermediate.greedyswitch",h0="org.eclipse.elk.alg.layered.p3order.counting",JP={208:1},cp="org.eclipse.elk.alg.layered.intermediate.wrapping",b4="org.eclipse.elk.alg.layered.networksimplex",ka="org.eclipse.elk.alg.layered.options",cY="INTERACTIVE",jm="NONE",hE="LEFT",fE="RIGHT",wBt="EDGE_LENGTH",vBt="SELF_LOOPS",Dft="BOTTOM",w4="CENTER",_Bt="portRatioOrPosition",Nft="org.eclipse.elk.layered.contentAlignment",Oft="org.eclipse.elk.layered.feedbackEdges",fO="org.eclipse.elk.layered.interactiveReferencePoint",Bft="org.eclipse.elk.layered.mergeEdges",Fft="org.eclipse.elk.layered.mergeHierarchyEdges",Uft="org.eclipse.elk.layered.thoroughness",zft="org.eclipse.elk.layered.unnecessaryBendpoints",jft="org.eclipse.elk.layered.northOrSouthPort",aY="org.eclipse.elk.layered.cycleBreaking.strategy",QP="org.eclipse.elk.layered.layering.strategy",Hft="org.eclipse.elk.layered.layering.layerConstraint",Gft="org.eclipse.elk.layered.layering.wideNodesOnMultipleLayers",uY="org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth",lY="org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor",hY="org.eclipse.elk.layered.layering.nodePromotion.strategy",fY="org.eclipse.elk.layered.layering.nodePromotion.maxIterations",dY="org.eclipse.elk.layered.layering.coffmanGraham.layerBound",pY="org.eclipse.elk.layered.crossingMinimization.strategy",Wft="org.eclipse.elk.layered.crossingMinimization.hierarchicalSweepiness",$ft="org.eclipse.elk.layered.crossingMinimization.semiInteractive",Vft="org.eclipse.elk.layered.crossingMinimization.greedySwitch.activationThreshold",qft="org.eclipse.elk.layered.crossingMinimization.greedySwitch.type",dE="org.eclipse.elk.layered.nodePlacement.strategy",gY="org.eclipse.elk.layered.nodePlacement.favorStraightEdges",mY="org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening",bY="org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment",wY="org.eclipse.elk.layered.nodePlacement.linearSegments.deflectionDampening",vY="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility",Xft="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility.default",_Y="org.eclipse.elk.layered.edgeRouting.selfLoopPlacement",dO="org.eclipse.elk.layered.edgeRouting.sloppySplineRouting",pO="org.eclipse.elk.layered.edgeRouting.sloppySplineLayerSpacing",Zft="org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers",Yft="org.eclipse.elk.layered.spacing.edgeEdgeBetweenLayers",Kft="org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers",Jft="org.eclipse.elk.layered.priority.direction",Qft="org.eclipse.elk.layered.priority.shortness",tdt="org.eclipse.elk.layered.priority.straightness",yY="org.eclipse.elk.layered.compaction.connectedComponents",edt="org.eclipse.elk.layered.compaction.postCompaction.strategy",ndt="org.eclipse.elk.layered.compaction.postCompaction.constraints",gO="org.eclipse.elk.layered.highDegreeNodes.treatment",xY="org.eclipse.elk.layered.highDegreeNodes.threshold",MY="org.eclipse.elk.layered.highDegreeNodes.treeHeight",v4="org.eclipse.elk.layered.wrapping.strategy",idt="org.eclipse.elk.layered.wrapping.additionalEdgeSpacing",rdt="org.eclipse.elk.layered.wrapping.correctionFactor",mO="org.eclipse.elk.layered.wrapping.cutting.strategy",EY="org.eclipse.elk.layered.wrapping.cutting.cuts",SY="org.eclipse.elk.layered.wrapping.cutting.msd.freedom",TY="org.eclipse.elk.layered.wrapping.singleEdge.validify.strategy",bO="org.eclipse.elk.layered.wrapping.multiEdge.improveCuts",wO="org.eclipse.elk.layered.wrapping.multiEdge.distancePenalty",CY="org.eclipse.elk.layered.wrapping.multiEdge.improveWrappedEdges",sdt="org.eclipse.elk.layered.edgeLabels.sideSelection",odt="org.eclipse.elk.layered.edgeLabels.centerLabelPlacementStrategy",cdt="layering",yBt="layering.minWidth",xBt="layering.nodePromotion",adt="crossingMinimization",MBt="crossingMinimization.greedySwitch",EBt="nodePlacement",SBt="nodePlacement.bk",udt="edgeRouting",t6="org.eclipse.elk.edgeRouting",J1="spacing",ldt="priority",TBt="compaction.postCompaction",CBt="Specifies whether and how post-process compaction is applied.",hdt="highDegreeNodes",fdt="wrapping",ABt="wrapping.cutting",ddt="wrapping.multiEdge",AY="edgeLabels",Nn="org.eclipse.elk.layered",pdt="org.eclipse.elk.spacing.edgeEdge",gdt="org.eclipse.elk.spacing.edgeNode",mdt="org.eclipse.elk.spacing.labelLabel",bdt="org.eclipse.elk.spacing.labelPort",wdt="org.eclipse.elk.spacing.labelNode",vdt="org.eclipse.elk.spacing.portPort",_dt="org.eclipse.elk.spacing.individualOverride",ydt="org.eclipse.elk.port.borderOffset",xdt="org.eclipse.elk.noLayout",Mdt="org.eclipse.elk.port.side",kY="org.eclipse.elk.debugMode",Edt="org.eclipse.elk.alignment",Sdt="org.eclipse.elk.hierarchyHandling",Tdt="org.eclipse.elk.insideSelfLoops.activate",Cdt="org.eclipse.elk.insideSelfLoops.yo",vO="org.eclipse.elk.nodeSize.constraints",LY="org.eclipse.elk.nodeSize.options",PY="org.eclipse.elk.direction",Adt="org.eclipse.elk.nodeLabels.placement",kdt="org.eclipse.elk.portLabels.placement",Ldt="org.eclipse.elk.portLabels.nextToPortIfPossible",Pdt="org.eclipse.elk.portAlignment.default",Idt="org.eclipse.elk.portAlignment.north",Rdt="org.eclipse.elk.portAlignment.south",Ddt="org.eclipse.elk.portAlignment.west",Ndt="org.eclipse.elk.portAlignment.east",_O="org.eclipse.elk.nodeSize.minimum",Odt="org.eclipse.elk.junctionPoints",Bdt="org.eclipse.elk.edgeLabels.placement",Fdt="org.eclipse.elk.edgeLabels.inline",Udt="org.eclipse.elk.port.index",zdt="org.eclipse.elk.commentBox",jdt="org.eclipse.elk.hypernode",Hdt="org.eclipse.elk.port.anchor",Gdt="org.eclipse.elk.partitioning.activate",Wdt="org.eclipse.elk.partitioning.partition",yO="org.eclipse.elk.position",$dt="org.eclipse.elk.margins",Vdt="org.eclipse.elk.spacing.portsSurrounding",kBt="NETWORK_SIMPLEX",sx="UNDEFINED",LBt={3:1,4:1,5:1,616:1},Lu={141:1,50:1},qdt="org.eclipse.elk.alg.layered.p1cycles",pw="org.eclipse.elk.alg.layered.p2layers",Xdt={422:1,208:1},PBt={736:1,3:1,4:1},Ju="org.eclipse.elk.alg.layered.p3order",lo="org.eclipse.elk.alg.layered.p4nodes",IBt={3:1,4:1,5:1,745:1},IY=1e-5,RY="DOWN",$p="org.eclipse.elk.alg.layered.p4nodes.bk",ox=17976931348623157e292,B_="org.eclipse.elk.alg.layered.p5edges",f0="org.eclipse.elk.alg.layered.p5edges.splines",F_=1e-6,xO=-1e-6,RBt="The list of vectors may not be empty.",Zdt=-17976931348623157e292,DY=.09999999999999998,DBt=4.71238898038469,NBt=3.141592653589793,_4="org.eclipse.elk.alg.mrtree",y4="org.eclipse.elk.alg.mrtree.graph",cx="org.eclipse.elk.alg.mrtree.intermediate",OBt="Set neighbors in level",BBt="DESCENDANTS",Ydt="org.eclipse.elk.mrtree.weighting",Kdt="org.eclipse.elk.mrtree.searchOrder",MO="org.eclipse.elk.alg.mrtree.options",U_="org.eclipse.elk.mrtree",FBt="org.eclipse.elk.tree",Jdt="org.eclipse.elk.alg.radial",ax=6.283185307179586,NY=5e-324,UBt="org.eclipse.elk.alg.radial.intermediate",OY="org.eclipse.elk.alg.radial.intermediate.compaction",zBt={3:1,4:1,5:1,63:1},Qdt="org.eclipse.elk.alg.radial.intermediate.optimization",BY="No implementation is available for the layout option ",x4="org.eclipse.elk.alg.radial.options",tpt="org.eclipse.elk.radial.orderId",ept="org.eclipse.elk.radial.radius",FY="org.eclipse.elk.radial.compactor",UY="org.eclipse.elk.radial.compactionStepSize",npt="org.eclipse.elk.radial.sorter",ipt="org.eclipse.elk.radial.wedgeCriteria",rpt="org.eclipse.elk.radial.optimizationCriteria",Hm="org.eclipse.elk.radial",jBt="org.eclipse.elk.alg.radial.p1position.wedge",spt="org.eclipse.elk.alg.radial.sorting",HBt=5.497787143782138,GBt=3.9269908169872414,WBt=2.356194490192345,Rh="org.eclipse.elk.core.util",$Bt="Invalid index: ",ux="org.eclipse.elk.core.alg",lx={337:1},z_={284:1},opt="Make sure it's type is registered with the ",cpt=" utility class.",pE="true",zY="false",VBt="Couldn't clone property '",Dh="org.eclipse.elk.core.options",qBt=1.2999999523162842,gw="org.eclipse.elk.box",apt="org.eclipse.elk.expandNodes",upt="org.eclipse.elk.box.packingMode",XBt="org.eclipse.elk.algorithm",lpt="org.eclipse.elk.bendPoints",ZBt="org.eclipse.elk.labelManager",YBt="org.eclipse.elk.scaleFactor",KBt="org.eclipse.elk.animate",JBt="org.eclipse.elk.animTimeFactor",QBt="org.eclipse.elk.layoutAncestors",tFt="org.eclipse.elk.maxAnimTime",eFt="org.eclipse.elk.minAnimTime",nFt="org.eclipse.elk.progressBar",iFt="org.eclipse.elk.validateOptions",rFt="org.eclipse.elk.zoomToFit",sFt="org.eclipse.elk.nodeLabels.padding",oFt="org.eclipse.elk.font.name",cFt="org.eclipse.elk.font.size",aFt="org.eclipse.elk.edge.type",uFt="de.cau.cs.kieler.labelSpacing",lFt="partitioning",hFt="nodeLabels",EO="portAlignment",hpt="nodeSize",jY="port",fFt="portLabels",dFt="insideSelfLoops",pFt="de.cau.cs.kieler.selfLoopInside",e6="org.eclipse.elk.fixed",gFt="Fixed Layout",SO="org.eclipse.elk.random",mFt="port must have a parent node to calculate the port side",n6="org.eclipse.elk.core.util.adapters",fpt="org.eclipse.elk.core.util.nodespacing",d0="org.eclipse.elk.core.util.nodespacing.cellsystem",bFt={171:1,307:1},dpt="Vertical alignment cannot be null",TO="org.eclipse.elk.core.util.nodespacing.internal",gE="org.eclipse.elk.core.util.nodespacing.internal.algorithm",mE="org.eclipse.elk.core.util.overlaps",Qu="org.eclipse.emf.ecore",j_="org.eclipse.elk.graph",wFt="EMapPropertyHolder",vFt="ElkBendPoint",_Ft="ElkGraphElement",yFt="ElkConnectableShape",ppt="ElkEdge",xFt="ElkEdgeSection",MFt="EModelElement",EFt="ENamedElement",gpt="ElkLabel",mpt="ElkNode",bpt="ElkPort",SFt={91:1,87:1},hx="org.eclipse.emf.common.notify.impl",H_="The feature '",HY="' is not a valid changeable feature",TFt="Expecting null",wpt="' is not a valid feature",ca=32768,CFt={95:1,91:1,87:1,51:1,42:1,92:1},Re="org.eclipse.emf.ecore.impl",p0="org.eclipse.elk.graph.impl",M4="Recursive containment not allowed for ",bE="The datatype '",Gm="' is not a valid classifier",GY="The value '",G_={173:1,3:1,4:1},WY="The class '",wE="http://www.eclipse.org/elk/ElkGraph",vpt="property",E4="value",$Y="source",AFt="properties",kFt="identifier",VY="height",qY="width",XY="parent",ZY="text",_pt="children",LFt="hierarchical",ypt="sources",YY="targets",xpt="sections",KY="bendPoints",Mpt="outgoingShape",Ept="incomingShape",Spt="outgoingSections",Tpt="incomingSections",qs="org.eclipse.emf.common.util",Cpt="Severe implementation error in the Json to ElkGraph importer.",Df="id",Ds="org.eclipse.elk.graph.json",Apt="Unhandled parameter types: ",PFt="startPoint",IFt="An edge must have at least one source and one target (edge id: '",vE="').",RFt="Referenced edge section does not exist: ",DFt=" (edge id: '",kpt="target",CO="group",Ti="name",NFt="connectableShape cannot be null",JY="Passed edge is not 'simple'.",i6="The 'no duplicates' constraint is violated",Nf={3:1,4:1,20:1,25:1,41:1,13:1,15:1,49:1,59:1,55:1,52:1},QY={3:1,4:1,20:1,25:1,41:1,13:1,43:1,15:1,49:1,59:1,55:1,52:1,532:1},tK="org.eclipse.elk.graph.util",Lpt="undefined",OFt="parser.parse.1",BFt="parser.parse.2",AO="parser.next.1",eK="parser.next.2",FFt="parser.next.3",UFt="parser.next.4",g0="parser.factor.1",Ppt="parser.factor.2",zFt="parser.factor.3",jFt="parser.factor.4",HFt="parser.factor.5",GFt="parser.factor.6",WFt="parser.atom.1",$Ft="parser.atom.2",VFt="parser.atom.3",Ipt="parser.atom.4",nK="parser.atom.5",Rpt="parser.cc.1",kO="parser.cc.2",qFt="parser.cc.3",XFt="parser.cc.5",Dpt="parser.cc.6",Npt="parser.cc.7",iK="parser.cc.8",ZFt="parser.ope.1",YFt="parser.ope.2",KFt="parser.ope.3",Vp="parser.descape.1",JFt="parser.descape.2",QFt="parser.descape.3",tUt="parser.descape.4",eUt="parser.descape.5",tl="parser.process.1",nUt="parser.quantifier.1",iUt="parser.quantifier.2",rUt="parser.quantifier.3",sUt="parser.quantifier.4",Opt="parser.quantifier.5",oUt="org.eclipse.emf.common.notify",Bpt={380:1,610:1},cUt={3:1,4:1,20:1,25:1,41:1,13:1,15:1,59:1,52:1},r6={338:1,136:1},S4="index=",LO=", size=",rK={3:1,4:1,5:1,116:1},aUt={3:1,4:1,20:1,25:1,41:1,13:1,15:1,49:1,59:1,52:1},Fpt={3:1,6:1,4:1,5:1,175:1},uUt={3:1,4:1,5:1,339:1},lUt=";/?:@&=+$,",hUt="invalid authority: ",fUt="EAnnotation",dUt="ETypedElement",pUt="EStructuralFeature",gUt="EAttribute",mUt="EClassifier",bUt="EEnumLiteral",wUt="EGenericType",vUt="EOperation",_Ut="EParameter",yUt="EReference",xUt="ETypeParameter",hr="org.eclipse.emf.ecore.util",Upt={3:1,20:1,13:1,15:1,52:1,533:1,81:1,64:1},MUt="org.eclipse.emf.ecore.util.FeatureMap$Entry",oh=1024,La=8192,mw=2048,T4="byte",PO="char",C4="double",A4="float",k4="int",L4="long",P4="short",EUt="java.lang.Object",W_={3:1,4:1,5:1,222:1},zpt={3:1,4:1,5:1,611:1},SUt={3:1,4:1,20:1,25:1,41:1,13:1,15:1,49:1,59:1,55:1,52:1,64:1},Zo={3:1,4:1,20:1,25:1,41:1,13:1,15:1,49:1,59:1,55:1,52:1,81:1,64:1},s6="mixed",ui="http:///org/eclipse/emf/ecore/util/ExtendedMetaData",yl="kind",TUt={3:1,4:1,5:1,612:1},jpt={3:1,4:1,20:1,25:1,41:1,13:1,15:1,59:1,52:1,81:1,64:1},IO={20:1,25:1,41:1,13:1,15:1,52:1,64:1},RO={43:1,120:1,260:1},DO={75:1,311:1},NO="The value of type '",OO="' must be of type '",$_=1365,xl="http://www.eclipse.org/emf/2002/Ecore",BO=-32768,Wm="constraints",Ns="baseType",CUt="getEStructuralFeature",AUt="getFeatureID",I4="feature",kUt="getOperationID",Hpt="operation",LUt="defaultValue",PUt="eTypeParameters",IUt="isInstance",RUt="getEEnumLiteral",DUt="eContainingClass",wi={47:1},NUt={3:1,4:1,5:1,124:1},OUt="org.eclipse.emf.ecore.resource",BUt={91:1,87:1,534:1,1628:1},sK="org.eclipse.emf.ecore.resource.impl",Gpt="unspecified",o6="simple",FO="attribute",FUt="attributeWildcard",UO="element",oK="elementWildcard",Nh="collapse",cK="itemType",zO="namespace",c6="##targetNamespace",Ml="whiteSpace",Wpt="wildcards",m0="http://www.eclipse.org/emf/2003/XMLType",aK="##any",_E="uninitialized",uK="The multiplicity constraint is violated",jO="org.eclipse.emf.ecore.xml.type",UUt="ProcessingInstruction",zUt="SimpleAnyType",jUt="XMLTypeDocumentRoot",Xr="org.eclipse.emf.ecore.xml.type.impl",a6="INF",HUt="processing",GUt="ENTITIES_._base",$pt="minLength",Vpt="ENTITY",HO="NCName",WUt="IDREFS_._base",qpt="integer",lK="token",hK="pattern",$Ut="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*",Xpt="\\i\\c*",VUt="[\\i-[:]][\\c-[:]]*",qUt="nonPositiveInteger",u6="maxInclusive",Zpt="NMTOKEN",XUt="NMTOKENS_._base",Ypt="nonNegativeInteger",l6="minInclusive",ZUt="normalizedString",YUt="unsignedByte",KUt="unsignedInt",JUt="18446744073709551615",QUt="unsignedShort",tzt="processingInstruction",qp="org.eclipse.emf.ecore.xml.type.internal",yE=1114111,ezt="Internal Error: shorthands: \\u",R4="xml:isDigit",fK="xml:isWord",dK="xml:isSpace",pK="xml:isNameChar",gK="xml:isInitialNameChar",nzt="09\u0660\u0669\u06F0\u06F9\u0966\u096F\u09E6\u09EF\u0A66\u0A6F\u0AE6\u0AEF\u0B66\u0B6F\u0BE7\u0BEF\u0C66\u0C6F\u0CE6\u0CEF\u0D66\u0D6F\u0E50\u0E59\u0ED0\u0ED9\u0F20\u0F29",izt="AZaz\xC0\xD6\xD8\xF6\xF8\u0131\u0134\u013E\u0141\u0148\u014A\u017E\u0180\u01C3\u01CD\u01F0\u01F4\u01F5\u01FA\u0217\u0250\u02A8\u02BB\u02C1\u0386\u0386\u0388\u038A\u038C\u038C\u038E\u03A1\u03A3\u03CE\u03D0\u03D6\u03DA\u03DA\u03DC\u03DC\u03DE\u03DE\u03E0\u03E0\u03E2\u03F3\u0401\u040C\u040E\u044F\u0451\u045C\u045E\u0481\u0490\u04C4\u04C7\u04C8\u04CB\u04CC\u04D0\u04EB\u04EE\u04F5\u04F8\u04F9\u0531\u0556\u0559\u0559\u0561\u0586\u05D0\u05EA\u05F0\u05F2\u0621\u063A\u0641\u064A\u0671\u06B7\u06BA\u06BE\u06C0\u06CE\u06D0\u06D3\u06D5\u06D5\u06E5\u06E6\u0905\u0939\u093D\u093D\u0958\u0961\u0985\u098C\u098F\u0990\u0993\u09A8\u09AA\u09B0\u09B2\u09B2\u09B6\u09B9\u09DC\u09DD\u09DF\u09E1\u09F0\u09F1\u0A05\u0A0A\u0A0F\u0A10\u0A13\u0A28\u0A2A\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59\u0A5C\u0A5E\u0A5E\u0A72\u0A74\u0A85\u0A8B\u0A8D\u0A8D\u0A8F\u0A91\u0A93\u0AA8\u0AAA\u0AB0\u0AB2\u0AB3\u0AB5\u0AB9\u0ABD\u0ABD\u0AE0\u0AE0\u0B05\u0B0C\u0B0F\u0B10\u0B13\u0B28\u0B2A\u0B30\u0B32\u0B33\u0B36\u0B39\u0B3D\u0B3D\u0B5C\u0B5D\u0B5F\u0B61\u0B85\u0B8A\u0B8E\u0B90\u0B92\u0B95\u0B99\u0B9A\u0B9C\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8\u0BAA\u0BAE\u0BB5\u0BB7\u0BB9\u0C05\u0C0C\u0C0E\u0C10\u0C12\u0C28\u0C2A\u0C33\u0C35\u0C39\u0C60\u0C61\u0C85\u0C8C\u0C8E\u0C90\u0C92\u0CA8\u0CAA\u0CB3\u0CB5\u0CB9\u0CDE\u0CDE\u0CE0\u0CE1\u0D05\u0D0C\u0D0E\u0D10\u0D12\u0D28\u0D2A\u0D39\u0D60\u0D61\u0E01\u0E2E\u0E30\u0E30\u0E32\u0E33\u0E40\u0E45\u0E81\u0E82\u0E84\u0E84\u0E87\u0E88\u0E8A\u0E8A\u0E8D\u0E8D\u0E94\u0E97\u0E99\u0E9F\u0EA1\u0EA3\u0EA5\u0EA5\u0EA7\u0EA7\u0EAA\u0EAB\u0EAD\u0EAE\u0EB0\u0EB0\u0EB2\u0EB3\u0EBD\u0EBD\u0EC0\u0EC4\u0F40\u0F47\u0F49\u0F69\u10A0\u10C5\u10D0\u10F6\u1100\u1100\u1102\u1103\u1105\u1107\u1109\u1109\u110B\u110C\u110E\u1112\u113C\u113C\u113E\u113E\u1140\u1140\u114C\u114C\u114E\u114E\u1150\u1150\u1154\u1155\u1159\u1159\u115F\u1161\u1163\u1163\u1165\u1165\u1167\u1167\u1169\u1169\u116D\u116E\u1172\u1173\u1175\u1175\u119E\u119E\u11A8\u11A8\u11AB\u11AB\u11AE\u11AF\u11B7\u11B8\u11BA\u11BA\u11BC\u11C2\u11EB\u11EB\u11F0\u11F0\u11F9\u11F9\u1E00\u1E9B\u1EA0\u1EF9\u1F00\u1F15\u1F18\u1F1D\u1F20\u1F45\u1F48\u1F4D\u1F50\u1F57\u1F59\u1F59\u1F5B\u1F5B\u1F5D\u1F5D\u1F5F\u1F7D\u1F80\u1FB4\u1FB6\u1FBC\u1FBE\u1FBE\u1FC2\u1FC4\u1FC6\u1FCC\u1FD0\u1FD3\u1FD6\u1FDB\u1FE0\u1FEC\u1FF2\u1FF4\u1FF6\u1FFC\u2126\u2126\u212A\u212B\u212E\u212E\u2180\u2182\u3007\u3007\u3021\u3029\u3041\u3094\u30A1\u30FA\u3105\u312C\u4E00\u9FA5\uAC00\uD7A3",rzt="Private Use",mK="ASSIGNED",szt="\0\x7F\x80\xFF\u0100\u017F\u0180\u024F\u0250\u02AF\u02B0\u02FF\u0300\u036F\u0370\u03FF\u0400\u04FF\u0530\u058F\u0590\u05FF\u0600\u06FF\u0700\u074F\u0780\u07BF\u0900\u097F\u0980\u09FF\u0A00\u0A7F\u0A80\u0AFF\u0B00\u0B7F\u0B80\u0BFF\u0C00\u0C7F\u0C80\u0CFF\u0D00\u0D7F\u0D80\u0DFF\u0E00\u0E7F\u0E80\u0EFF\u0F00\u0FFF\u1000\u109F\u10A0\u10FF\u1100\u11FF\u1200\u137F\u13A0\u13FF\u1400\u167F\u1680\u169F\u16A0\u16FF\u1780\u17FF\u1800\u18AF\u1E00\u1EFF\u1F00\u1FFF\u2000\u206F\u2070\u209F\u20A0\u20CF\u20D0\u20FF\u2100\u214F\u2150\u218F\u2190\u21FF\u2200\u22FF\u2300\u23FF\u2400\u243F\u2440\u245F\u2460\u24FF\u2500\u257F\u2580\u259F\u25A0\u25FF\u2600\u26FF\u2700\u27BF\u2800\u28FF\u2E80\u2EFF\u2F00\u2FDF\u2FF0\u2FFF\u3000\u303F\u3040\u309F\u30A0\u30FF\u3100\u312F\u3130\u318F\u3190\u319F\u31A0\u31BF\u3200\u32FF\u3300\u33FF\u3400\u4DB5\u4E00\u9FFF\uA000\uA48F\uA490\uA4CF\uAC00\uD7A3\uE000\uF8FF\uF900\uFAFF\uFB00\uFB4F\uFB50\uFDFF\uFE20\uFE2F\uFE30\uFE4F\uFE50\uFE6F\uFE70\uFEFE\uFEFF\uFEFF\uFF00\uFFEF",Kpt="UNASSIGNED",xE={3:1,112:1},ozt="org.eclipse.emf.ecore.xml.type.util",GO={3:1,4:1,5:1,342:1},Jpt="org.eclipse.xtext.xbase.lib",czt="Cannot add elements to a Range",azt="Cannot set elements in a Range",uzt="Cannot remove elements from a Range",WO="locale",$O="default",VO="user.agent",u,qO,bK,u3e=-1;ife(),T(1,null,{},U),u.Fb=function(e){return this===e},u.Gb=function(){return this.ql},u.Hb=function(){return lm(this)},u.Ib=function(){return Og(fu(this))+"@"+(Yr(this)>>>0).toString(16)},u.equals=function(t){return this.Fb(t)},u.hashCode=function(){return this.Hb()},u.toString=function(){return this.Ib()};var lzt,hzt,fzt;T(274,1,{274:1,1712:1},_at),u._d=function(e){var n;return n=new _at,n.i=4,e>1?n.c=J4t(this,e-1):n.c=this,n},u.ae=function(){return Vd(this),this.b},u.be=function(){return Og(this)},u.ce=function(){return Vd(this),this.k},u.de=function(){return(this.i&4)!=0},u.ee=function(){return(this.i&1)!=0},u.Ib=function(){return Uct(this)},u.i=0;var l3e=1,un=A(bc,"Object",1),Qpt=A(bc,"Class",274);T(1692,1,{3:1});var J5e=A(I_,"Optional",1692);T(1060,1692,{3:1},W),u.Fb=function(e){return e===this},u.Hb=function(){return 2040732332},u.Ib=function(){return"Optional.absent()"},u.Jb=function(e){return si(e),Wr(),wK};var wK,Q5e=A(I_,"Absent",1060),h3e=Sr(I_,"Function");T(393,1,{},A5),u.Lb=function(e){return zCt(e)};var tLe=A(I_,"Joiner",393);T(875,393,{},$Tt),u.Lb=function(e){return e==null?this.b:zCt(e)};var eLe=A(I_,"Joiner/1",875);T(874,1,{},Vj);var nLe=A(I_,"Joiner/MapJoiner",874),f3e=Sr(I_,"Predicate"),dzt;T(494,1,{138:1,494:1,3:1,56:1},Ej),u.Nb=function(e){return this.Mb(e)},u.Mb=function(e){var n;for(n=0;n0},u.ic=function(){if(this.b>=this.c)throw K(new J);return u3t(this,this.b++)},u.Dc=function(){return this.b},u.Ec=function(){if(this.b<=0)throw K(new J);return u3t(this,--this.b)},u.Fc=function(){return this.b-1},u.b=0,u.c=0;var _Le=A(Le,"AbstractIndexedListIterator",847);T(949,257,Q7),u.hc=function(){return a_(this)},u.ic=function(){return R2(this)},u.d=1;var yLe=A(Le,"AbstractIterator",949);T(1677,1,{238:1}),u.Hc=function(){var e;return e=this.f,e||(this.f=this.Ic())},u.Jc=function(){return new JG(this.Hc())},u.Lc=function(){return new _5t(this.Kc(),this._b(),ct(this,475)?1:0)},u.Fb=function(e){return rq(this,e)},u.Hb=function(){return Yr(this.Hc())},u.Wb=function(){return this._b()==0},u.Xb=function(){return sot(this)},u.Ib=function(){return Yc(this.Hc())};var xLe=A(Le,"AbstractMultimap",1677);T(654,1677,uZ),u.Pb=function(){Qct(this)},u.Qb=function(e){return this.c.Qb(e)},u.Ic=function(){return ct(this.c,122)?new ZT(this,a(this.c,122)):ct(this.c,115)?new fM(this,a(this.c,115)):new eM(this,this.c)},u.Pc=function(e){return this.Oc()},u.Jc=function(){return ct(this.c,122)?new Dv(this,a(this.c,122)):ct(this.c,115)?new d2(this,a(this.c,115)):new hM(this,this.c)},u.Qc=function(){return tpe(this.Oc())},u.Kc=function(){return new Ext(this)},u.Lc=function(){return Qut(this.c.Tb().wc(),new gt,64,this.d)},u.Mc=function(e){return rr(this,e)},u.Nc=function(e){return t4(this,e)},u._b=function(){return this.d},u.Rc=function(){return new Mxt(this)},u.Sc=function(){return Qut(this.c.ac().wc(),new q,64,this.d)},u.d=0;var MLe=A(Le,"AbstractMapBasedMultimap",654);T(1483,654,uZ),u.Oc=function(){return new Vu(this.a)},u.Qc=function(){return nC(),nC(),n1t},u.Mc=function(e){return a(rr(this,e),15)},u.Nc=function(e){return a(t4(this,e),15)},u.Hc=function(){var e;return e=this.f,e||(this.f=ct(this.c,122)?new ZT(this,a(this.c,122)):ct(this.c,115)?new fM(this,a(this.c,115)):new eM(this,this.c))},u.Fb=function(e){return rq(this,e)},u.Tc=function(e){return a(rr(this,e),15)},u.Uc=function(e){return a(t4(this,e),15)};var ELe=A(Le,"AbstractListMultimap",1483);T(661,1,Cs),u.gc=function(e){ks(this,e)},u.hc=function(){return this.c.hc()||this.e.hc()},u.ic=function(){var e;return this.e.hc()||(e=a(this.c.ic(),38),this.b=e.kc(),this.a=a(e.lc(),13),this.e=this.a.tc()),this.Vc(this.b,this.e.ic())},u.jc=function(){this.e.jc(),this.a.Wb()&&this.c.jc(),--this.d.d};var SLe=A(Le,"AbstractMapBasedMultimap/Itr",661);T(970,661,Cs,Mxt),u.Vc=function(e,n){return n};var TLe=A(Le,"AbstractMapBasedMultimap/1",970);T(971,1,ys,q),u.Kb=function(e){return a(e,13).wc()};var CLe=A(Le,"AbstractMapBasedMultimap/1methodref$spliterator$Type",971);T(972,661,Cs,Ext),u.Vc=function(e,n){return ts(),new I5(e,n)};var ALe=A(Le,"AbstractMapBasedMultimap/2",972);T(1666,1,oE),u.Ub=function(e){VV(this,e)},u.Yb=function(e,n,i){return Vat(this,e,n,i)},u.Pb=function(){this.Tb().Pb()},u.Wc=function(e){return Zq(this,e)},u.Qb=function(e){return!!Zut(this,e,!1)},u.Rb=function(e){var n,i,r;for(i=this.Tb().tc();i.hc();)if(n=a(i.ic(),38),r=n.lc(),zt(e)===zt(r)||e!=null&&Fi(e,r))return!0;return!1},u.Fb=function(e){return U8t(this,e)},u.Vb=function(e){return Ua(Zut(this,e,!1))},u.Hb=function(){return wat(this.Tb())},u.Wb=function(){return this._b()==0},u.Xb=function(){return new Sv(this)},u.Zb=function(e,n){throw K(new Tp("Put not supported on this map"))},u.$b=function(e){return Ua(Zut(this,e,!0))},u._b=function(){return this.Tb()._b()},u.Ib=function(){var e,n,i;for(i=new Mm("{","}"),n=this.Tb().tc();n.hc();)e=a(n.ic(),38),$g(i,G4t(this,e.kc())+"="+G4t(this,e.lc()));return i.a?i.e.length==0?i.a.a:i.a.a+(""+i.e):i.c},u.ac=function(){return new vf(this)};var kLe=A(ii,"AbstractMap",1666);T(1678,1666,oE),u.Jc=function(){return new JG(this)},u.Tb=function(){return rot(this)},u.Xb=function(){var e;return e=this.g,e||(this.g=this.Jc())},u.ac=function(){var e;return e=this.i,e||(this.i=new tMt(this))};var LLe=A(Le,"Maps/ViewCachingAbstractMap",1678);T(357,1678,oE,eM),u.Vb=function(e){return Gae(this,e)},u.$b=function(e){return zle(this,e)},u.Pb=function(){this.d==this.e.c?this.e.Pb():qD(new Vst(this))},u.Qb=function(e){return Gfe(this.d,e)},u.Yc=function(){return new Sj(this)},u.Xc=function(){return this.Yc()},u.Fb=function(e){return this===e||Fi(this.d,e)},u.Hb=function(){return Yr(this.d)},u.Xb=function(){return this.e.Xb()},u._b=function(){return this.d._b()},u.Ib=function(){return Yc(this.d)};var PLe=A(Le,"AbstractMapBasedMultimap/AsMap",357);T(25,1,R_),u.sc=function(e){vo(this,e)},u.uc=function(){return new gi(null,this.wc())},u.wc=function(){return new Ei(this,0)},u.xc=function(){return new gi(null,this.wc())},u.nc=function(e){throw K(new Tp("Add not supported on this collection"))},u.oc=function(e){return yo(this,e)},u.Pb=function(){gL(this)},u.pc=function(e){return U2(this,e,!1)},u.qc=function(e){return O1(this,e)},u.Wb=function(){return this._b()==0},u.vc=function(e){return U2(this,e,!0)},u.yc=function(){return b$(this)},u.zc=function(e){return aP(this,e)},u.Ib=function(){return Gp(this)};var ILe=A(ii,"AbstractCollection",25);T(bd,25,vl),u.wc=function(){return new Ei(this,1)},u.Fb=function(e){return bIt(this,e)},u.Hb=function(){return wat(this)};var RLe=A(ii,"AbstractSet",bd);T(1660,bd,vl);var DLe=A(Le,"Sets/ImprovedAbstractSet",1660);T(1679,1660,vl),u.Pb=function(){this.Zc().Pb()},u.pc=function(e){return EIt(this,e)},u.Wb=function(){return this.Zc().Wb()},u.vc=function(e){var n;return this.pc(e)?(n=a(e,38),this.Zc().Xb().vc(n.kc())):!1},u._b=function(){return this.Zc()._b()};var NLe=A(Le,"Maps/EntrySet",1679);T(968,1679,vl,Sj),u.pc=function(e){return ZIt(this.a.d.Tb(),e)},u.tc=function(){return new Vst(this.a)},u.Zc=function(){return this.a},u.vc=function(e){var n;return ZIt(this.a.d.Tb(),e)?(n=a(e,38),tae(this.a.e,n.kc()),!0):!1},u.wc=function(){return f$(this.a.d.Tb().wc(),new Tj(this.a))};var OLe=A(Le,"AbstractMapBasedMultimap/AsMap/AsMapEntries",968);T(969,1,ys,Tj),u.Kb=function(e){return L5t(this.a,a(e,38))};var BLe=A(Le,"AbstractMapBasedMultimap/AsMap/AsMapEntries/0methodref$wrapEntry$Type",969);T(659,1,Cs,Vst),u.gc=function(e){ks(this,e)},u.ic=function(){var e;return e=a(this.b.ic(),38),this.a=a(e.lc(),13),L5t(this.c,e)},u.hc=function(){return this.b.hc()},u.jc=function(){this.b.jc(),this.c.e.d-=this.a._b(),this.a.Pb()};var FLe=A(Le,"AbstractMapBasedMultimap/AsMap/AsMapIterator",659);T(541,1660,vl,JG),u.Pb=function(){this.b.Pb()},u.pc=function(e){return this.b.Qb(e)},u.sc=function(e){si(e),this.b.Ub(new Pj(e))},u.Wb=function(){return this.b.Wb()},u.tc=function(){return ts(),KT(this.b.Tb().tc(),(jv(),h6))},u.vc=function(e){return this.b.Qb(e)?(this.b.$b(e),!0):!1},u._b=function(){return this.b._b()};var ULe=A(Le,"Maps/KeySet",541);T(356,541,vl,hM),u.Pb=function(){var e;qD((e=this.b.Tb().tc(),new zit(this,e)))},u.qc=function(e){return this.b.Xb().qc(e)},u.Fb=function(e){return this===e||Fi(this.b.Xb(),e)},u.Hb=function(){return Yr(this.b.Xb())},u.tc=function(){var e;return e=this.b.Tb().tc(),new zit(this,e)},u.vc=function(e){var n,i;return i=0,n=a(this.b.$b(e),13),n&&(i=n._b(),n.Pb(),this.a.d-=i),i>0},u.wc=function(){return this.b.Xb().wc()};var zLe=A(Le,"AbstractMapBasedMultimap/KeySet",356);T(660,1,Cs,zit),u.gc=function(e){ks(this,e)},u.hc=function(){return this.c.hc()},u.ic=function(){return this.a=a(this.c.ic(),38),this.a.kc()},u.jc=function(){var e;M1(!!this.a,lw),e=a(this.a.lc(),13),this.c.jc(),this.b.a.d-=e._b(),e.Pb()};var jLe=A(Le,"AbstractMapBasedMultimap/KeySet/1",660);T(358,357,{109:1,115:1},fM),u.Jc=function(){return this.$c()},u.Xb=function(){return this._c()},u.$c=function(){return new d2(this.c,this.ad())},u._c=function(){var e;return e=this.b,e||(this.b=this.$c())},u.ad=function(){return a(this.d,115)};var HLe=A(Le,"AbstractMapBasedMultimap/SortedAsMap",358);T(396,358,pOt,ZT),u.$c=function(){return new Dv(this.a,a(a(this.d,115),122))},u.Xb=function(){var e;return e=this.b,a(e||(this.b=new Dv(this.a,a(a(this.d,115),122))),196)},u._c=function(){var e;return e=this.b,a(e||(this.b=new Dv(this.a,a(a(this.d,115),122))),196)},u.ad=function(){return a(a(this.d,115),122)};var GLe=A(Le,"AbstractMapBasedMultimap/NavigableAsMap",396);T(327,356,gOt,d2),u.wc=function(){return this.b.Xb().wc()};var WLe=A(Le,"AbstractMapBasedMultimap/SortedKeySet",327);T(299,327,Vht,Dv);var $Le=A(Le,"AbstractMapBasedMultimap/NavigableKeySet",299);T(448,25,R_,EL),u.nc=function(e){var n,i;return du(this),i=this.d.Wb(),n=this.d.nc(e),n&&(++this.f.d,i&&mD(this)),n},u.oc=function(e){var n,i,r;return e.Wb()?!1:(r=(du(this),this.d._b()),n=this.d.oc(e),n&&(i=this.d._b(),this.f.d+=i-r,r==0&&mD(this)),n)},u.Pb=function(){var e;e=(du(this),this.d._b()),e!=0&&(this.d.Pb(),this.f.d-=e,jD(this))},u.pc=function(e){return du(this),this.d.pc(e)},u.qc=function(e){return du(this),this.d.qc(e)},u.Fb=function(e){return e===this?!0:(du(this),Fi(this.d,e))},u.Hb=function(){return du(this),Yr(this.d)},u.tc=function(){return du(this),new Dst(this)},u.vc=function(e){var n;return du(this),n=this.d.vc(e),n&&(--this.f.d,jD(this)),n},u._b=function(){return vEt(this)},u.wc=function(){return du(this),this.d.wc()},u.Ib=function(){return du(this),Yc(this.d)};var VLe=A(Le,"AbstractMapBasedMultimap/WrappedCollection",448),Sl=Sr(ii,"List");T(657,448,{20:1,25:1,13:1,15:1},iot),u.jd=function(e){D1(this,e)},u.wc=function(){return du(this),this.d.wc()},u.bd=function(e,n){var i;du(this),i=this.d.Wb(),a(this.d,15).bd(e,n),++this.a.d,i&&mD(this)},u.cd=function(e){return du(this),a(this.d,15).cd(e)},u.dd=function(e){return du(this),a(this.d,15).dd(e)},u.ed=function(){return du(this),new HEt(this)},u.fd=function(e){return du(this),new S4t(this,e)},u.gd=function(e){var n;return du(this),n=a(this.d,15).gd(e),--this.a.d,jD(this),n},u.hd=function(e,n){return du(this),a(this.d,15).hd(e,n)},u.kd=function(e,n){return du(this),ect(this.a,this.e,a(this.d,15).kd(e,n),this.b?this.b:this)};var qLe=A(Le,"AbstractMapBasedMultimap/WrappedList",657);T(967,657,{20:1,25:1,13:1,15:1,49:1},ESt);var XLe=A(Le,"AbstractMapBasedMultimap/RandomAccessWrappedList",967);T(558,1,Cs,Dst),u.gc=function(e){ks(this,e)},u.hc=function(){return vM(this),this.b.hc()},u.ic=function(){return vM(this),this.b.ic()},u.jc=function(){fSt(this)};var ZLe=A(Le,"AbstractMapBasedMultimap/WrappedCollection/WrappedIterator",558);T(658,558,kf,HEt,S4t),u.jc=function(){fSt(this)},u.Bc=function(e){var n;n=vEt(this.a)==0,(vM(this),a(this.b,120)).Bc(e),++this.a.a.d,n&&mD(this.a)},u.Cc=function(){return(vM(this),a(this.b,120)).Cc()},u.Dc=function(){return(vM(this),a(this.b,120)).Dc()},u.Ec=function(){return(vM(this),a(this.b,120)).Ec()},u.Fc=function(){return(vM(this),a(this.b,120)).Fc()},u.Gc=function(e){(vM(this),a(this.b,120)).Gc(e)};var YLe=A(Le,"AbstractMapBasedMultimap/WrappedList/WrappedListIterator",658);T(559,448,gOt,ZW),u.wc=function(){return du(this),this.d.wc()};var KLe=A(Le,"AbstractMapBasedMultimap/WrappedSortedSet",559);T(656,559,Vht,Ert);var JLe=A(Le,"AbstractMapBasedMultimap/WrappedNavigableSet",656);T(655,448,vl,est),u.wc=function(){return du(this),this.d.wc()};var QLe=A(Le,"AbstractMapBasedMultimap/WrappedSet",655);T(974,1,ys,gt),u.Kb=function(e){var n,i;return n=e.kc(),i=a(e.lc(),13),f$(i.wc(),new Cj(n))};var tPe=A(Le,"AbstractMapBasedMultimap/lambda$0$Type",974);T(973,1,ys,Cj),u.Kb=function(e){return tee(this.a,e)};var ePe=A(Le,"AbstractMapBasedMultimap/lambda$2$Type",973);T(392,1,lZ),u.Fb=function(e){var n;return ct(e,38)?(n=a(e,38),Rp(this.kc(),n.kc())&&Rp(this.lc(),n.lc())):!1},u.Hb=function(){var e,n;return e=this.kc(),n=this.lc(),(e==null?0:Yr(e))^(n==null?0:Yr(n))},u.mc=function(e){throw K(new Oi)},u.Ib=function(){return this.kc()+"="+this.lc()};var nPe=A(Le,mOt,392);T(1680,25,R_),u.Pb=function(){this.ld().Pb()},u.pc=function(e){var n;return ct(e,38)?(n=a(e,38),ice(this.ld(),n.kc(),n.lc())):!1},u.vc=function(e){var n;return ct(e,38)?(n=a(e,38),GAt(this.ld(),n.kc(),n.lc())):!1},u._b=function(){return this.ld()._b()};var iPe=A(Le,"Multimaps/Entries",1680);T(975,1680,R_),u.tc=function(){return this.a.Kc()},u.ld=function(){return this.a},u.wc=function(){return this.a.Lc()};var rPe=A(Le,"AbstractMultimap/Entries",975);T(662,975,vl,T8),u.wc=function(){return this.a.Lc()},u.Fb=function(e){return Y8t(this,e)},u.Hb=function(){return xPt(this)};var sPe=A(Le,"AbstractMultimap/EntrySet",662);T(663,25,R_,Ud),u.Pb=function(){this.a.Pb()},u.pc=function(e){return Ole(this.a,e)},u.tc=function(){return this.a.Rc()},u._b=function(){return this.a.d},u.wc=function(){return this.a.Sc()};var oPe=A(Le,"AbstractMultimap/Values",663);T(1681,25,{738:1,20:1,25:1,13:1}),u.sc=function(e){si(e),Xb(this).sc(new Uj(e))},u.wc=function(){var e;return e=Xb(this).wc(),Qut(e,new se,64|e.qd()&1296,dq(this))},u.nc=function(e){return vit(),!0},u.oc=function(e){return H1e(this,e)},u.Pb=function(){qD(new git(rot(gm(this.a)).tc()))},u.pc=function(e){var n;return n=a($M(gm(this.a),e),13),(n?n._b():0)>0},u.Fb=function(e){return Pme(this,e)},u.Hb=function(){return Yr(Xb(this))},u.Wb=function(){return Xb(this).Wb()},u.tc=function(){return new W3t(this,Xb(this).tc())},u.vc=function(e){return ylt(this,e,1)>0},u._b=function(){return dq(this)},u.Ib=function(){return Yc(Xb(this))};var cPe=A(Le,"AbstractMultiset",1681);T(557,654,OP),u.Oc=function(){return this.md()},u.Qc=function(){return this.nd()},u.Mc=function(e){return this.od(e)},u.Nc=function(e){return this.pd(e)},u.Hc=function(){var e;return e=this.f,e||(this.f=ct(this.c,122)?new ZT(this,a(this.c,122)):ct(this.c,115)?new fM(this,a(this.c,115)):new eM(this,this.c))},u.nd=function(){return $b(),wM(),D4},u.Fb=function(e){return rq(this,e)},u.od=function(e){return a(rr(this,e),19)},u.pd=function(e){return a(t4(this,e),19)};var aPe=A(Le,"AbstractSetMultimap",557);T(1413,557,OP),u.md=function(){return new Ub(this.b)},u.nd=function(){var e;return e=this.b,e?Hse(this.b):(we(),new Z5(new Ub(this.b)))},u.Mc=function(e){return a(a(rr(this,e),19),60)},u.od=function(e){return a(a(rr(this,e),19),60)},u.Nc=function(e){return a(a(t4(this,e),19),60)},u.pd=function(e){return a(a(t4(this,e),19),60)},u.Hc=function(){var e;return e=this.f,e||(this.f=ct(this.c,122)?new ZT(this,a(this.c,122)):ct(this.c,115)?new fM(this,a(this.c,115)):new eM(this,this.c))};var uPe=A(Le,"AbstractSortedSetMultimap",1413);T(1414,1413,OP),u.Hc=function(){var e;return e=this.f,a(a(e||(this.f=ct(this.c,122)?new ZT(this,a(this.c,122)):ct(this.c,115)?new fM(this,a(this.c,115)):new eM(this,this.c)),115),122)},u.Xb=function(){var e;return e=this.i,a(a(e||(this.i=ct(this.c,122)?new Dv(this,a(this.c,122)):ct(this.c,115)?new d2(this,a(this.c,115)):new hM(this,this.c)),60),196)};var lPe=A(Le,"AbstractSortedKeySortedSetMultimap",1414);T(521,1483,uZ,gD),u.a=0;var hPe=A(Le,"ArrayListMultimap",521);T(1156,1,Wp,I3t),u.qd=function(){return this.a.qd()&-262},u.rd=function(){return this.a.rd()},u.gc=function(e){this.a.gc(new D3t(e,this.b))},u.sd=function(e){return this.a.sd(new R3t(e,this.b))};var fPe=A(Le,"CollectSpliterators/1",1156);T(1157,1,{},R3t),u.td=function(e){this.a.td(this.b.Kb(e))};var dPe=A(Le,"CollectSpliterators/1/lambda$0$Type",1157);T(1158,1,{},D3t),u.td=function(e){this.a.td(this.b.Kb(e))};var pPe=A(Le,"CollectSpliterators/1/lambda$1$Type",1158);T(1159,1,Wp,nkt),u.qd=function(){return this.a},u.rd=function(){return this.d&&(this.b=EEt(this.b,this.d.rd())),EEt(this.b,0)},u.gc=function(e){this.d&&(this.d.gc(e),this.d=null),this.c.gc(new O3t(this.e,e)),this.b=0},u.sd=function(e){for(;;){if(this.d&&this.d.sd(e))return ET(this.b,tO)&&(this.b=Yg(this.b,1)),!0;if(this.d=null,!this.c.sd(new N3t(this,this.e)))return!1}},u.a=0,u.b=0;var gPe=A(Le,"CollectSpliterators/1FlatMapSpliterator",1159);T(1160,1,{},N3t),u.td=function(e){une(this.a,this.b,e)};var mPe=A(Le,"CollectSpliterators/1FlatMapSpliterator/lambda$0$Type",1160);T(1161,1,{},O3t),u.td=function(e){ree(this.b,this.a,e)};var bPe=A(Le,"CollectSpliterators/1FlatMapSpliterator/lambda$1$Type",1161),e1t;T(844,1,rh,kj),u.Fb=function(e){return this===e},u.Kb=function(e){return zt(e)===zt(this.a)?dOt:e};var wPe=A(Le,"Collections2/1",844);T(220,1,hZ),u.vd=function(e){return this.ud(a(e,220))},u.ud=function(e){var n;return e==(co(),_K)?1:e==(Zr(),vK)?-1:(n=(TD(),MC(this.a,e.a)),n!=0?n:ct(this,467)==ct(e,467)?0:ct(this,467)?1:-1)},u.yd=function(){return this.a},u.Fb=function(e){return out(this,e)};var vPe=A(Le,"Cut",220);T(1508,220,hZ,Zxt),u.ud=function(e){return e==this?0:1},u.wd=function(e){throw K(new g9)},u.xd=function(e){e.a+="+\u221E)"},u.yd=function(){throw K(new yc(bOt))},u.zd=function(e){return!1},u.Ib=function(){return"+\u221E"};var vK,_Pe=A(Le,"Cut/AboveAll",1508);T(467,220,{220:1,467:1,3:1,34:1},gSt),u.wd=function(e){Fa((e.a+="(",e),this.a)},u.xd=function(e){S1(Fa(e,this.a),93)},u.Hb=function(){return~Yr(this.a)},u.zd=function(e){return TD(),MC(this.a,e)<0},u.Ib=function(){return"/"+this.a+"\\"};var yPe=A(Le,"Cut/AboveValue",467);T(1507,220,hZ,Yxt),u.ud=function(e){return e==this?0:-1},u.wd=function(e){e.a+="(-\u221E"},u.xd=function(e){throw K(new g9)},u.yd=function(){throw K(new yc(bOt))},u.zd=function(e){return!0},u.Ib=function(){return"-\u221E"};var _K,xPe=A(Le,"Cut/BelowAll",1507);T(1509,220,hZ,mSt),u.wd=function(e){Fa((e.a+="[",e),this.a)},u.xd=function(e){S1(Fa(e,this.a),41)},u.Hb=function(){return Yr(this.a)},u.zd=function(e){return TD(),MC(this.a,e)<=0},u.Ib=function(){return"\\"+this.a+"/"};var MPe=A(Le,"Cut/BelowValue",1509);T(482,1,wd),u.sc=function(e){vo(this,e)},u.Ib=function(){return Zoe(a(Lot(this,"use Optional.orNull() instead of Optional.or(null)"),20).tc())};var EPe=A(Le,"FluentIterable",482);T(325,482,wd,v2),u.tc=function(){return Rn(this)};var SPe=A(Le,"FluentIterable/2",325);T(1670,25,wOt),u.tc=function(){return this.Ad()},u.nc=function(e){throw K(new Oi)},u.oc=function(e){throw K(new Oi)},u.Pb=function(){throw K(new Oi)},u.pc=function(e){return e!=null&&U2(this,e,!1)},u.vc=function(e){throw K(new Oi)};var TPe=A(Le,"ImmutableCollection",1670);T(912,1670,wOt,Lj),u.tc=function(){return O2((we(),Rv(),X_))},u.pc=function(e){return!1},u.qc=function(e){return O1(this.a,e)},u.Wb=function(){return!0},u.Ad=function(){return O2((we(),Rv(),X_))},u._b=function(){return 0},u.yc=function(){return b$(this.a)},u.zc=function(e){return aP(this.a,e)},u.Ib=function(){return Gp(this.a)};var CPe=A(Le,"ForwardingImmutableCollection",912);T(193,1670,fZ),u.tc=function(){return this.Ad()},u.ed=function(){return new C$(this,this._b(),0)},u.fd=function(e){return new C$(this,this._b(),e)},u.jd=function(e){D1(this,e)},u.wc=function(){return new Ei(this,16)},u.kd=function(e,n){return this.Bd(e,n)},u.bd=function(e,n){throw K(new Oi)},u.Fb=function(e){return bme(this,e)},u.Hb=function(){return ale(this)},u.dd=function(e){return e==null?-1:Rde(this,e)},u.Ad=function(){return new C$(this,this._b(),0)},u.gd=function(e){throw K(new Oi)},u.hd=function(e,n){throw K(new Oi)},u.Bd=function(e,n){var i;return iq((i=new $3t(this),new C1(i,e,n)))};var n1t,APe=A(Le,"ImmutableList",193);T(1675,193,fZ),u.tc=function(){return O2(this.Cd().tc())},u.kd=function(e,n){return iq(this.Cd().kd(e,n))},u.pc=function(e){return e!=null&&this.Cd().pc(e)},u.qc=function(e){return this.Cd().qc(e)},u.Fb=function(e){return Fi(this.Cd(),e)},u.cd=function(e){return this.Cd().cd(e)},u.Hb=function(){return Yr(this.Cd())},u.dd=function(e){return this.Cd().dd(e)},u.Wb=function(){return this.Cd().Wb()},u.Ad=function(){return O2(this.Cd().tc())},u._b=function(){return this.Cd()._b()},u.Bd=function(e,n){return iq(this.Cd().kd(e,n))},u.yc=function(){return this.Cd().zc(dt(un,te,1,this.Cd()._b(),5,1))},u.zc=function(e){return this.Cd().zc(e)},u.Ib=function(){return Yc(this.Cd())};var kPe=A(Le,"ForwardingImmutableList",1675);T(1671,1670,BP),u.tc=function(){return this.Ad()},u.wc=function(){return new Ei(this,1)},u.Fb=function(e){return Y8t(this,e)},u.Hb=function(){return xPt(this)};var LPe=A(Le,"ImmutableSet",1671);T(550,1671,BP),u.tc=function(){return this.Ad()},u.pc=function(e){return e!=null&&ST(this.b,e)},u.qc=function(e){return Hit(this.b,e)},u.Hb=function(){return Yr(this.b.b)},u.Wb=function(){return this.b.b.Wb()},u.Ad=function(){return O2(new Dg(this.b.b.tc()))},u._b=function(){return this.b.b._b()},u.yc=function(){return this.b.b.yc()},u.zc=function(e){return V3t(this.b,e)},u.Ib=function(){return Yc(this.b.b)};var PPe=A(Le,"ForwardingImmutableSet",550);T(1664,1663,vOt),u.Ac=function(){return we(),new Z5(this.a)},u.wc=function(){return new N5(this)};var IPe=A(Le,"ForwardingSortedSet",1664);T(481,632,Y7,dD),u.ec=function(e){return new gTt(this,e,this)},u.Zb=function(e,n){return qC(this,e,n,!1)};var RPe=A(Le,"HashBiMap",481);T(892,633,Y7,gTt),u.dc=function(){return new lSt(this,this.a.b.Tb().tc())};var DPe=A(Le,"HashBiMap/1",892);T(479,1,Cs),u.gc=function(e){ks(this,e)},u.hc=function(){return this.b.hc()},u.ic=function(){return hEt(this)},u.jc=function(){this.b.jc()};var NPe=A(Le,"TransformedIterator",479);T(893,479,Cs,lSt),u.Ed=function(e){return new UCt(this,a(e,38))},u.Dd=function(t){return this.Ed(t)};var OPe=A(Le,"HashBiMap/1/1",893);T(894,392,lZ,UCt),u.kc=function(){return this.c},u.lc=function(){return this.a.a.b.Vb(this.c)},u.mc=function(e){var n;return M1(Lit(VD(this.a.a),this),$ht),n=this.a.a.b.Vb(this.c),zt(e)===zt(n)||e!=null&&Fi(e,n)?e:(qC(this.a.a,this.c,e,!0),n)};var BPe=A(Le,"HashBiMap/1/1/1",894);T(298,557,OP,Nv),u.md=function(){return new T9(YV(this.a))},u.a=2;var FPe=A(Le,"HashMultimap",298);T(372,392,{392:1,372:1,3:1,38:1},I5),u.kc=function(){return this.g},u.lc=function(){return this.i},u.mc=function(e){throw K(new Oi)};var UPe=A(Le,"ImmutableEntry",372);T(903,550,BP,Sxt);var zPe=A(Le,"ImmutableEnumSet",903);T(544,847,aZ,C$);var jPe=A(Le,"ImmutableList/1",544);T(1561,550,_Ot),u.tc=function(){return O2(new Dg(this.b.b.tc()))},u.wc=function(){return new N5(this)},u.pc=function(e){try{return e!=null&&ST(this.a,e)}catch(n){if(n=vr(n),ct(n,177))return!1;throw K(n)}},u.qc=function(e){var n,i;for(i=e.tc();i.hc();)if(n=i.ic(),n==null)return!1;try{return Hit(this.a,e)}catch(r){if(r=vr(r),ct(r,177))return!1;throw K(r)}},u.Ad=function(){return O2(new Dg(this.b.b.tc()))},u.yc=function(){return K5t(this,dt(un,te,1,this.b.b._b(),5,1))},u.zc=function(e){return QN(this,e)};var pzt,i1t,HPe=A(Le,"ImmutableSortedSet",1561);T(904,482,wd,AEt),u.tc=function(){return Vrt(this.a)},u.Ib=function(){return Gp(this.a)+" (cycled)"};var GPe=A(Le,"Iterables/1",904);T(200,1,rh,X),u.Kb=function(e){return a(e,20).tc()},u.Fb=function(e){return this===e};var WPe=A(Le,"Iterables/12",200);T(905,482,wd,iCt),u.sc=function(e){si(e),this.b.sc(new B3t(this.a,e))},u.tc=function(){return zT(this)};var $Pe=A(Le,"Iterables/4",905);T(906,1,{},B3t),u.td=function(e){nte(this.b,this.a,e)};var VPe=A(Le,"Iterables/4/lambda$0$Type",906);T(907,482,wd,rCt),u.sc=function(e){si(e),this.a.sc(new F3t(e,this.b))},u.tc=function(){return id(this)};var qPe=A(Le,"Iterables/5",907);T(908,1,{},F3t),u.td=function(e){this.a.td(this.b.Kb(e))};var XPe=A(Le,"Iterables/5/lambda$0$Type",908),gzt,r1t;T(945,1665,aZ,xt),u.hc=function(){return!1},u.Cc=function(){return!1},u.ic=function(){throw K(new J)},u.Dc=function(){return 0},u.Ec=function(){throw K(new J)},u.Fc=function(){return-1};var ZPe=A(Le,"Iterators/1",945);T(555,257,Q7,l5),u.hc=function(){return!this.a},u.ic=function(){if(this.a)throw K(new J);return this.a=!0,this.b},u.a=!1;var YPe=A(Le,"Iterators/11",555);T(946,1,Cs,Bt),u.gc=function(e){ks(this,e)},u.hc=function(){return!1},u.ic=function(){throw K(new J)},u.jc=function(){M1(!1,lw)};var KPe=A(Le,"Iterators/2",946);T(947,257,Q7,u5),u.hc=function(){return this.a.hc()},u.ic=function(){return this.a.ic()};var JPe=A(Le,"Iterators/3",947);T(948,1,Cs,MTt),u.gc=function(e){ks(this,e)},u.hc=function(){return this.a.hc()||this.b.tc().hc()},u.ic=function(){return rat(this)},u.jc=function(){this.a.jc()};var QPe=A(Le,"Iterators/4",948);T(950,949,Q7,U3t);var t6e=A(Le,"Iterators/6",950);T(951,479,Cs,hSt),u.Dd=function(e){return this.a.Kb(e)};var e6e=A(Le,"Iterators/7",951);T(647,1,Cs),u.gc=function(e){ks(this,e)},u.hc=function(){return Jn(this)},u.ic=function(){return In(this)},u.jc=function(){M1(!!this.c,lw),this.c.jc(),this.c=null};var n6e=A(Le,"MultitransformedIterator",647);T(182,647,{182:1,43:1},$d),u.Fd=function(e){return a(e,43)};var i6e=A(Le,"Iterators/ConcatenatedIterator",182);T(648,647,Cs,mit),u.Fd=function(e){return Wue(a(e,43))};var r6e=A(Le,"Iterators/ConcatenatedIterator/1",648);T(1540,557,OP,yIt),u.Pb=function(){Qct(this),X3(this.a,this.a)},u.md=function(){return new zrt(this.b)},u.Pc=function(e){return new _6t(this,e,this.b)},u.Kc=function(){return new Brt(this)},u.Lc=function(){var e;return new Ei((e=this.g,a(e||(this.g=new T8(this)),19)),17)},u.Xb=function(){var e;return e=this.i,e||(this.i=ct(this.c,122)?new Dv(this,a(this.c,122)):ct(this.c,115)?new d2(this,a(this.c,115)):new hM(this,this.c))},u.Rc=function(){return ts(),KT(new Brt(this),(jv(),f6))},u.Sc=function(){var e;return f$(new Ei((e=this.g,a(e||(this.g=new T8(this)),19)),17),new Ot)},u.b=2;var s6e=A(Le,"LinkedHashMultimap",1540);T(1543,1,ys,Ot),u.Kb=function(e){return a(e,38).lc()};var o6e=A(Le,"LinkedHashMultimap/0methodref$getValue$Type",1543);T(728,1,Cs,Brt),u.gc=function(e){ks(this,e)},u.ic=function(){return aue(this)},u.hc=function(){return this.a!=this.b.a},u.jc=function(){M1(!!this.c,lw),GAt(this.b,this.c.g,this.c.i),this.c=null};var c6e=A(Le,"LinkedHashMultimap/1",728);T(310,372,{392:1,372:1,310:1,1706:1,3:1,38:1},Tot),u.Gd=function(){return this.f},u.Hd=function(e){this.c=e},u.Id=function(e){this.f=e},u.d=0;var mzt=A(Le,"LinkedHashMultimap/ValueEntry",310);T(1541,1660,{1706:1,20:1,25:1,13:1,19:1},_6t),u.nc=function(e){var n,i,r,c,l;for(l=qht*Eot((e==null?0:Yr(e))*Xht,15),n=l&this.b.length-1,c=this.b[n],i=c;i;i=i.a)if(i.d==l&&Rp(i.i,e))return!1;return r=new Tot(this.c,e,l,c),e3t(this.d,r),r.f=this,this.d=r,X3(this.g.a.b,r),X3(r,this.g.a),this.b[n]=r,++this.f,++this.e,Hpe(this),!0},u.Pb=function(){var e,n;for(tW(this.b,null),this.f=0,e=this.a;e!=this;e=e.Gd())n=a(e,310),X3(n.b,n.e);this.a=this,this.d=this,++this.e},u.pc=function(e){var n,i;for(i=qht*Eot((e==null?0:Yr(e))*Xht,15),n=this.b[i&this.b.length-1];n;n=n.a)if(n.d==i&&Rp(n.i,e))return!0;return!1},u.sc=function(e){var n;for(si(e),n=this.a;n!=this;n=n.Gd())e.td(a(n,310).i)},u.Gd=function(){return this.a},u.tc=function(){return new QCt(this)},u.vc=function(e){return v9t(this,e)},u.Hd=function(e){this.d=e},u.Id=function(e){this.a=e},u._b=function(){return this.f},u.e=0,u.f=0;var a6e=A(Le,"LinkedHashMultimap/ValueSet",1541);T(1542,1,Cs,QCt),u.gc=function(e){ks(this,e)},u.hc=function(){return Gst(this),this.b!=this.c},u.ic=function(){var e,n;if(Gst(this),this.b==this.c)throw K(new J);return e=a(this.b,310),n=e.i,this.d=e,this.b=e.f,n},u.jc=function(){Gst(this),M1(!!this.d,lw),v9t(this.c,this.d.i),this.a=this.c.e,this.d=null},u.a=0;var u6e=A(Le,"LinkedHashMultimap/ValueSet/1",1542);T(689,1677,uZ,$it),u.Hc=function(){return gm(this)},u.Fb=function(e){return rq(this,e)},u.Mc=function(e){return new ZG(this,e)},u.Nc=function(e){return nV(this,e)},u.Pb=function(){S$(this)},u.Qb=function(e){return Pit(this,e)},u.Ic=function(){return new Wit(this)},u.Jc=function(){return new Aj(this)},u.Kc=function(){throw K(new eV("should never be called"))},u.Tc=function(e){return new ZG(this,e)},u.Wb=function(){return!this.a},u.Uc=function(e){return nV(this,e)},u._b=function(){return this.d},u.c=0,u.d=0;var l6e=A(Le,"LinkedListMultimap",689);T(41,25,J2),u.jd=function(e){D1(this,e)},u.wc=function(){return new Ei(this,16)},u.bd=function(e,n){throw K(new Tp("Add not supported on this list"))},u.nc=function(e){return this.bd(this._b(),e),!0},u.Pb=function(){this.Jd(0,this._b())},u.Fb=function(e){return klt(this,e)},u.Hb=function(){return Mat(this)},u.dd=function(e){return jLt(this,e)},u.tc=function(){return new H3(this)},u.ed=function(){return this.fd(0)},u.fd=function(e){return new Gs(this,e)},u.gd=function(e){throw K(new Tp("Remove not supported on this list"))},u.Jd=function(e,n){var i,r;for(r=this.fd(e),i=e;i0||this.c.hc()},u.ic=function(){if(!(this.d>0||this.c.hc()))throw K(new J);return this.d==0&&(this.b=a(this.c.ic(),312),this.f=this.d=a(this.b.a.lc(),13)._b()),--this.d,this.a=!0,this.b.a.kc()},u.jc=function(){M1(this.a,lw),this.f==1?this.c.jc():ylt(this.e,this.b.a.kc(),1)>0,--this.f,this.a=!1},u.a=!1,u.d=0,u.f=0;var V6e=A(Le,"Multisets/MultisetIteratorImpl",981);T(667,1,ys,se),u.Kb=function(e){return new Ei(Vue(a(a(e,300).a.lc(),13)._b(),a(e,300).a.kc()),16)};var q6e=A(Le,"Multisets/lambda$0$Type",667);T(1684,1,jr),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var X6e=A(Le,"Ordering",1684);T(1565,1684,pZ,ot),u.Ld=function(e,n){return Hee(a(e,34),a(n,34))},u.Ib=function(){return"Ordering.natural()"};var wzt,Z6e=A(Le,"NaturalOrdering",1565);T(464,1,{138:1,464:1,3:1,56:1},gut),u.Mb=function(e){return Ere(this,a(e,34))},u.Nb=function(e){return this.Mb(e)},u.Fb=function(e){var n;return ct(e,464)?(n=a(e,464),out(this.a,n.a)&&out(this.b,n.b)):!1},u.Hb=function(){return Yr(this.a)*31+Yr(this.b)},u.Ib=function(){return JAt(this.a,this.b)};var Y6e=A(Le,"Range",464);T(485,1675,fZ,cN),u.Cd=function(){return this.a};var K6e=A(Le,"RegularImmutableList",485);T(554,550,BP,QG);var D4,J6e=A(Le,"RegularImmutableSet",554);T(729,1561,_Ot,Cot);var Q6e=A(Le,"RegularImmutableSortedSet",729);T(543,1664,{543:1,3:1,20:1,13:1,196:1,19:1,60:1},eMt);var tIe=A(Le,"Sets/UnmodifiableNavigableSet",543);T(1165,1675,fZ,JSt),u.Cd=function(){return this.a};var eIe=A(Le,"SingletonImmutableList",1165);T(326,1671,BP,a2),u.tc=function(){return Ao(),new l5(this.a)},u.pc=function(e){return Fi(this.a,e)},u.Ad=function(){return Ao(),new l5(this.a)},u._b=function(){return 1};var nIe=A(Le,"SingletonImmutableSet",326);T(1415,1414,OP,R4t),u.Hc=function(){var e;return e=this.f,a(a(e||(this.f=ct(this.c,122)?new ZT(this,a(this.c,122)):ct(this.c,115)?new fM(this,a(this.c,115)):new eM(this,this.c)),115),122)},u.Xb=function(){var e;return e=this.i,a(a(e||(this.i=ct(this.c,122)?new Dv(this,a(this.c,122)):ct(this.c,115)?new d2(this,a(this.c,115)):new hM(this,this.c)),60),196)},u.Pc=function(e){return e==null&&this.a.Ld(null,null),new Ub(this.b)};var iIe=A(Le,"TreeMultimap",1415);T(78,1,{3:1,78:1}),u.Nd=function(e){return new y.Error(e)},u.Od=function(){return this.g},u.Pd=function(){var e,n,i;i=this.g==null?null:this.g.replace(new y.RegExp(` -`,"g")," "),n=(e=Og(this.ql),i==null?e:e+": "+i),Qee(this,Joe(this.Nd(n))),Ki(this)},u.Ib=function(){return D4t(this,this.Od())},u.e=xOt,u.i=!1,u.n=!0;var vzt=A(bc,"Throwable",78);T(104,78,{3:1,104:1,78:1});var rIe=A(bc,"Exception",104);T(54,104,rp,Ep,sc);var sIe=A(bc,"RuntimeException",54);T(539,54,rp);var oIe=A(bc,"JsException",539);T(760,539,rp);var cIe=A(FP,"JavaScriptExceptionBase",760);T(435,760,{435:1,3:1,104:1,54:1,78:1},uIt),u.Od=function(){return o1e(this),this.c},u.Qd=function(){return zt(this.b)===zt(s1t)?null:this.b};var s1t,aIe=A(Kht,"JavaScriptException",435),_zt=A(Kht,"JavaScriptObject$",0),xK;T(1640,1,{});var uIe=A(Kht,"Scheduler",1640),XO=0,yzt=0,ZO=-1;T(787,1640,{},nt);var o1t,lIe=A(FP,"SchedulerImpl",787),MK;T(1653,1,{});var hIe=A(FP,"StackTraceCreator/Collector",1653);T(761,1653,{},Q),u.Rd=function(e){var n={},i,r=[];e[Jht]=r;for(var c=arguments.callee.caller;c;){var l=(MM(),c.name||(c.name=Pue(c.toString())));r.push(l);var f=":"+l,p=n[f];if(p){var b,v;for(b=0,v=p.length;b=0?"+":"")+(i/60|0),n=(i<0?-i:i)%60<10?"0"+(i<0?-i:i)%60:""+(i<0?-i:i)%60,(b8t(),Izt)[this.q.getDay()]+" "+Rzt[this.q.getMonth()]+" "+CW(this.q.getDate())+" "+CW(this.q.getHours())+":"+CW(this.q.getMinutes())+":"+CW(this.q.getSeconds())+" GMT"+e+n+" "+this.q.getFullYear()};var YO=A(ii,"Date",181);T(1622,181,COt,GRt),u.a=!1,u.b=0,u.c=0,u.d=0,u.e=0,u.f=0,u.g=!1,u.i=0,u.j=0,u.k=0,u.n=0,u.o=0,u.p=0;var MIe=A("com.google.gwt.i18n.shared.impl","DateRecord",1622);T(1659,1,{}),u.Vd=function(){return null},u.Wd=function(){return null},u.Xd=function(){return null},u.Yd=function(){return null},u.Zd=function(){return null};var EIe=A(ex,"JSONValue",1659);T(209,1659,{209:1},Rg,A8),u.Fb=function(e){return ct(e,209)?Xot(this.a,a(e,209).a):!1},u.Ud=function(){return Ynt},u.Hb=function(){return Bot(this.a)},u.Vd=function(){return this},u.Ib=function(){var e,n,i;for(i=new ll("["),n=0,e=this.a.length;n0&&(i.a+=","),Fa(i,N2(this,n));return i.a+="]",i.a};var SIe=A(ex,"JSONArray",209);T(443,1659,{443:1},k8),u.Ud=function(){return Knt},u.Wd=function(){return this},u.Ib=function(){return me(),""+this.a},u.a=!1;var xzt,Mzt,TIe=A(ex,"JSONBoolean",443);T(877,54,rp,Txt);var CIe=A(ex,"JSONException",877);T(913,1659,{},Fn),u.Ud=function(){return f9},u.Ib=function(){return tu};var Ezt,AIe=A(ex,"JSONNull",913);T(259,1659,{259:1},h5),u.Fb=function(e){return ct(e,259)?this.a==a(e,259).a:!1},u.Ud=function(){return TG},u.Hb=function(){return Tr(lt(this.a))},u.Xd=function(){return this},u.Ib=function(){return this.a+""},u.a=0;var kIe=A(ex,"JSONNumber",259);T(191,1659,{191:1},bT,nT),u.Fb=function(e){return ct(e,191)?Xot(this.a,a(e,191).a):!1},u.Ud=function(){return Jnt},u.Hb=function(){return Bot(this.a)},u.Yd=function(){return this},u.Ib=function(){var e,n,i,r,c,l;for(l=new ll("{"),e=!0,c=oat(this,dt(At,wt,2,0,6,1)),i=0,r=c.length;i=0?":"+this.c:"")+")"},u.c=0;var v1t=A(bc,"StackTraceElement",287);fzt={3:1,476:1,34:1,2:1};var At=A(bc,Yht,2);T(100,381,{476:1},Sp,wT,ul);var YIe=A(bc,"StringBuffer",100);T(98,381,{476:1},om,Bb,ll);var KIe=A(bc,"StringBuilder",98);T(763,79,OZ,kxt);var JIe=A(bc,"StringIndexOutOfBoundsException",763);T(1722,1,{});var _1t,y1t;T(46,54,{3:1,104:1,54:1,78:1,46:1},Oi,Tp);var QIe=A(bc,"UnsupportedOperationException",46);T(216,210,{3:1,34:1,210:1,216:1},kL,wit),u.vd=function(e){return RNt(this,a(e,216))},u.$d=function(){return rw(r7t(this))},u.Fb=function(e){var n;return this===e?!0:ct(e,216)?(n=a(e,216),this.e==n.e&&RNt(this,n)==0):!1},u.Hb=function(){var e;return this.b!=0?this.b:this.a<54?(e=Ka(this.f),this.b=or(ns(e,-1)),this.b=33*this.b+or(ns(E1(e,32),-1)),this.b=17*this.b+Tr(this.e),this.b):(this.b=17*L6t(this.c)+Tr(this.e),this.b)},u.Ib=function(){return r7t(this)},u.a=0,u.b=0,u.d=0,u.e=0,u.f=0;var Azt,b0,x1t,M1t,E1t,S1t,T1t,C1t,TK=A("java.math","BigDecimal",216);T(89,210,{3:1,34:1,210:1,89:1},put,Fp,qv,Fut,WIt,y1),u.vd=function(e){return kIt(this,a(e,89))},u.$d=function(){return rw(oZ(this,0))},u.Fb=function(e){return Fat(this,e)},u.Hb=function(){return L6t(this)},u.Ib=function(){return oZ(this,0)},u.b=-2,u.c=0,u.d=0,u.e=0;var CK,KO,A1t,AK,JO,SE,q_=A("java.math","BigInteger",89),kzt,Lzt,dx,B4;T(441,1666,oE),u.Pb=function(){uu(this)},u.Qb=function(e){return dm(this,e)},u.Rb=function(e){return w6t(this,e,this.e)||w6t(this,e,this.d)},u.Tb=function(){return new xp(this)},u.Vb=function(e){return zi(this,e)},u.Zb=function(e,n){return wr(this,e,n)},u.$b=function(e){return kM(this,e)},u._b=function(){return Q3(this)};var tRe=A(ii,"AbstractHashMap",441);T(242,bd,vl,xp),u.Pb=function(){this.a.Pb()},u.pc=function(e){return zAt(this,e)},u.tc=function(){return new qg(this.a)},u.vc=function(e){var n;return zAt(this,e)?(n=a(e,38).kc(),this.a.$b(n),!0):!1},u._b=function(){return this.a._b()};var eRe=A(ii,"AbstractHashMap/EntrySet",242);T(243,1,Cs,qg),u.gc=function(e){ks(this,e)},u.ic=function(){return Sm(this)},u.hc=function(){return this.b},u.jc=function(){M5t(this)},u.b=!1;var nRe=A(ii,"AbstractHashMap/EntrySetIterator",243);T(433,1,Cs,H3),u.gc=function(e){ks(this,e)},u.hc=function(){return P9(this)},u.ic=function(){return h4t(this)},u.jc=function(){Th(this)},u.b=0,u.c=-1;var iRe=A(ii,"AbstractList/IteratorImpl",433);T(94,433,kf,Gs),u.jc=function(){Th(this)},u.Bc=function(e){cd(this,e)},u.Cc=function(){return this.b>0},u.Dc=function(){return this.b},u.Ec=function(){return Hn(this.b>0),this.a.cd(this.c=--this.b)},u.Fc=function(){return this.b-1},u.Gc=function(e){Gv(this.c!=-1),this.a.hd(this.c,e)};var rRe=A(ii,"AbstractList/ListIteratorImpl",94);T(227,41,J2,C1),u.bd=function(e,n){Qv(e,this.b),this.c.bd(this.a+e,n),++this.b},u.cd=function(e){return mi(e,this.b),this.c.cd(this.a+e)},u.gd=function(e){var n;return mi(e,this.b),n=this.c.gd(this.a+e),--this.b,n},u.hd=function(e,n){return mi(e,this.b),this.c.hd(this.a+e,n)},u._b=function(){return this.b},u.a=0,u.b=0;var sRe=A(ii,"AbstractList/SubList",227);T(352,bd,vl,Sv),u.Pb=function(){this.a.Pb()},u.pc=function(e){return this.a.Qb(e)},u.tc=function(){var e;return e=this.a.Tb().tc(),new f5(e)},u.vc=function(e){return this.a.Qb(e)?(this.a.$b(e),!0):!1},u._b=function(){return this.a._b()};var oRe=A(ii,"AbstractMap/1",352);T(542,1,Cs,f5),u.gc=function(e){ks(this,e)},u.hc=function(){return this.a.hc()},u.ic=function(){var e;return e=a(this.a.ic(),38),e.kc()},u.jc=function(){this.a.jc()};var cRe=A(ii,"AbstractMap/1/1",542);T(223,25,R_,vf),u.Pb=function(){this.a.Pb()},u.pc=function(e){return this.a.Rb(e)},u.tc=function(){var e;return e=this.a.Tb().tc(),new nm(e)},u._b=function(){return this.a._b()};var aRe=A(ii,"AbstractMap/2",223);T(321,1,Cs,nm),u.gc=function(e){ks(this,e)},u.hc=function(){return this.a.hc()},u.ic=function(){var e;return e=a(this.a.ic(),38),e.lc()},u.jc=function(){this.a.jc()};var uRe=A(ii,"AbstractMap/2/1",321);T(440,1,{440:1,38:1}),u.Fb=function(e){var n;return ct(e,38)?(n=a(e,38),au(this.d,n.kc())&&au(this.e,n.lc())):!1},u.kc=function(){return this.d},u.lc=function(){return this.e},u.Hb=function(){return nD(this.d)^nD(this.e)},u.mc=function(e){return nst(this,e)},u.Ib=function(){return this.d+"="+this.e};var lRe=A(ii,"AbstractMap/AbstractEntry",440);T(351,440,{440:1,351:1,38:1},D9);var hRe=A(ii,"AbstractMap/SimpleEntry",351);T(1672,1,K7),u.Fb=function(e){var n;return ct(e,38)?(n=a(e,38),au(this.kc(),n.kc())&&au(this.lc(),n.lc())):!1},u.Hb=function(){return nD(this.kc())^nD(this.lc())},u.Ib=function(){return this.kc()+"="+this.lc()};var fRe=A(ii,mOt,1672);T(1685,1666,pOt),u.Wc=function(e){return Ukt(this,e)},u.Qb=function(e){return eW(this,e)},u.Tb=function(){return new F8(this)},u.Vb=function(e){return Ua(Tat(this,e))},u.Xb=function(){return new Tv(this)};var dRe=A(ii,"AbstractNavigableMap",1685);T(668,bd,vl,F8),u.pc=function(e){return ct(e,38)&&Ukt(this.b,a(e,38))},u.tc=function(){return new sL(this.b)},u.vc=function(e){var n;return ct(e,38)?(n=a(e,38),E5t(this.b,n)):!1},u._b=function(){return this.b.c};var pRe=A(ii,"AbstractNavigableMap/EntrySet",668);T(488,bd,Vht,Tv),u.wc=function(){return new N5(this)},u.Pb=function(){C5(this.a)},u.pc=function(e){return eW(this.a,e)},u.tc=function(){var e;return e=new sL(new Y5(this.a).b),new iT(e)},u.vc=function(e){return eW(this.a,e)?(rC(this.a,e),!0):!1},u._b=function(){return this.a.c};var gRe=A(ii,"AbstractNavigableMap/NavigableKeySet",488);T(489,1,Cs,iT),u.gc=function(e){ks(this,e)},u.hc=function(){return P9(this.a.a)},u.ic=function(){var e;return e=zW(this.a),e.kc()},u.jc=function(){RTt(this.a)};var mRe=A(ii,"AbstractNavigableMap/NavigableKeySet/1",489);T(1693,25,R_),u.nc=function(e){return LM(ZM(this,e)),!0},u.oc=function(e){return En(e),_D(e!=this,"Can't add a queue to itself"),yo(this,e)},u.Pb=function(){for(;CV(this)!=null;);};var bRe=A(ii,"AbstractQueue",1693);T(407,25,{4:1,20:1,25:1,13:1},$3,FCt),u.nc=function(e){return tct(this,e),!0},u.Pb=function(){uct(this)},u.pc=function(e){return qPt(new sC(this),e)},u.Wb=function(){return _it(this)},u.tc=function(){return new sC(this)},u.vc=function(e){return foe(new sC(this),e)},u._b=function(){return this.c-this.b&this.a.length-1},u.wc=function(){return new Ei(this,272)},u.zc=function(e){var n,i;return i=this.c-this.b&this.a.length-1,e.lengthi&&Vr(e,i,null),e},u.b=0,u.c=0;var wRe=A(ii,"ArrayDeque",407);T(408,1,Cs,sC),u.gc=function(e){ks(this,e)},u.hc=function(){return this.a!=this.b},u.ic=function(){return WN(this)},u.jc=function(){$Lt(this)},u.a=0,u.b=0,u.c=-1;var vRe=A(ii,"ArrayDeque/IteratorImpl",408);T(12,41,LOt,Dt,Vu,Eh),u.bd=function(e,n){pm(this,e,n)},u.nc=function(e){return Ut(this,e)},u.oc=function(e){return Or(this,e)},u.Pb=function(){this.c=dt(un,te,1,0,5,1)},u.pc=function(e){return nc(this,e,0)!=-1},u.sc=function(e){pd(this,e)},u.cd=function(e){return Ee(this,e)},u.dd=function(e){return nc(this,e,0)},u.Wb=function(){return this.c.length==0},u.tc=function(){return new j(this)},u.gd=function(e){return Em(this,e)},u.vc=function(e){return Lc(this,e)},u.Jd=function(e,n){gAt(this,e,n)},u.hd=function(e,n){return Kl(this,e,n)},u._b=function(){return this.c.length},u.jd=function(e){gc(this,e)},u.yc=function(){return GW(this)},u.zc=function(e){return xo(this,e)};var d3e=A(ii,"ArrayList",12);T(7,1,Cs,j),u.gc=function(e){ks(this,e)},u.hc=function(){return Qo(this)},u.ic=function(){return H(this)},u.jc=function(){eC(this)},u.a=0,u.b=-1;var _Re=A(ii,"ArrayList/1",7);T(155,41,POt,zu),u.pc=function(e){return jLt(this,e)!=-1},u.sc=function(e){var n,i,r,c;for(En(e),i=this.a,r=0,c=i.length;r=0},u.qc=function(e){return O1(this.b,e)},u.tc=function(){return new Dg(yM(this.b).b.tc())},u.vc=function(e){return sPt(this,e)},u._b=function(){return this.b.c.length},u.wc=function(){return new Ei(this,256)},u.yc=function(){return GW(this.b)},u.zc=function(e){return xo(this.b,e)};var h8e=A(ii,"PriorityQueue",453);T(214,1,{214:1},Sq,aN),u.a=0,u.b=0;var D1t,N1t,b3e=0,f8e=A(ii,"Random",214);T(39,1,Wp,Ei,E2,_5t),u.qd=function(){return this.a},u.rd=function(){return oot(this),this.c},u.gc=function(e){oot(this),this.d.gc(e)},u.sd=function(e){return jct(this,e)},u.a=0,u.c=0;var d8e=A(ii,"Spliterators/IteratorSpliterator",39);T(382,39,Wp,N5);var p8e=A(ii,"SortedSet/1",382);T(625,1,{},U8),u.ie=function(e){this.a.td(e)};var g8e=A(ii,"Spliterator/OfDouble/0methodref$accept$Type",625);T(626,1,{},z8),u.ie=function(e){this.a.td(e)};var m8e=A(ii,"Spliterator/OfDouble/1methodref$accept$Type",626);T(642,1,Wp),u.gc=function(e){E3t(this,e)},u.qd=function(){return this.d},u.rd=function(){return this.e},u.d=0,u.e=0;var b8e=A(ii,"Spliterators/BaseSpliterator",642);T(929,642,Wp),u.gc=function(e){ct(e,273)?kst(this,a(e,273)):kst(this,new z8(e))},u.sd=function(e){return ct(e,273)?$v(this,a(e,273)):$v(this,new U8(e))};var w8e=A(ii,"Spliterators/AbstractDoubleSpliterator",929);T(446,642,Wp);var v8e=A(ii,"Spliterators/AbstractSpliterator",446);T(790,1,Wp),u.gc=function(e){E3t(this,e)},u.qd=function(){return this.b},u.rd=function(){return this.d-this.c},u.b=0,u.c=0,u.d=0;var _8e=A(ii,"Spliterators/BaseArraySpliterator",790);T(791,790,Wp,g4t),u.gc=function(e){hse(this,e)},u.sd=function(e){return yae(this,e)};var y8e=A(ii,"Spliterators/ArraySpliterator",791);T(789,1,Cs,d3t),u.gc=function(e){ct(e,273)?Ikt(this,a(e,273)):Ikt(this,new sT(e))},u.ic=function(){return lN(this)},u.jc=function(){Rxt()},u.ie=function(e){this.b=e},u.hc=function(){return this.a||(this.a=$v(this.c,this)),this.a},u.a=!1,u.b=0;var x8e=A(ii,"Spliterators/DoubleConsumerIterator",789);T(523,41,ROt,nd),u.bd=function(e,n){QT(e,this.a.c.length+1),pm(this.a,e,n)},u.nc=function(e){return Ut(this.a,e)},u.oc=function(e){return Or(this.a,e)},u.Pb=function(){this.a.c=dt(un,te,1,0,5,1)},u.pc=function(e){return nc(this.a,e,0)!=-1},u.qc=function(e){return O1(this.a,e)},u.sc=function(e){pd(this.a,e)},u.cd=function(e){return QT(e,this.a.c.length),Ee(this.a,e)},u.dd=function(e){return nc(this.a,e,0)},u.Wb=function(){return this.a.c.length==0},u.tc=function(){return new j(this.a)},u.gd=function(e){return QT(e,this.a.c.length),Em(this.a,e)},u.Jd=function(e,n){gAt(this.a,e,n)},u.hd=function(e,n){return QT(e,this.a.c.length),Kl(this.a,e,n)},u._b=function(){return this.a.c.length},u.jd=function(e){gc(this.a,e)},u.kd=function(e,n){return new C1(this.a,e,n)},u.yc=function(){return GW(this.a)},u.zc=function(e){return xo(this.a,e)},u.Ib=function(){return Gp(this.a)};var M8e=A(ii,"Vector",523);T(596,523,ROt,IG);var E8e=A(ii,"Stack",596);T(254,1,{},Mm),u.Ib=function(){return this.a?this.e.length==0?this.a.a:this.a.a+(""+this.e):this.c};var S8e=A(ii,"StringJoiner",254);T(487,1685,{3:1,109:1,122:1,115:1},X3t,w$),u.Pb=function(){C5(this)},u.Tb=function(){return new Y5(this)},u.Zb=function(e,n){return jN(this,e,n)},u.$b=function(e){return rC(this,e)},u._b=function(){return this.c},u.c=0;var T8e=A(ii,"TreeMap",487);T(397,1,Cs,sL),u.gc=function(e){ks(this,e)},u.ic=function(){return zW(this)},u.hc=function(){return P9(this.a)},u.jc=function(){RTt(this)};var C8e=A(ii,"TreeMap/EntryIterator",397);T(449,668,vl,Y5),u.Pb=function(){C5(this.a)};var A8e=A(ii,"TreeMap/EntrySet",449);T(398,351,{440:1,351:1,38:1,398:1},gV),u.b=!1;var w3e=A(ii,"TreeMap/Node",398);T(560,1,{},it),u.Ib=function(){return"State: mv="+this.c+" value="+this.d+" done="+this.a+" found="+this.b},u.a=!1,u.b=!1,u.c=!1;var k8e=A(ii,"TreeMap/State",560);T(278,23,jZ,N9),u.je=function(){return!1},u.ke=function(){return!1};var kK,O1t,B1t,F1t,tB=Ri(ii,"TreeMap/SubMapType",278,ji,fce,_ne);T(982,278,jZ,OEt),u.ke=function(){return!0};var L8e=Ri(ii,"TreeMap/SubMapType/1",982,tB,null,null);T(983,278,jZ,qEt),u.je=function(){return!0},u.ke=function(){return!0};var P8e=Ri(ii,"TreeMap/SubMapType/2",983,tB,null,null);T(984,278,jZ,BEt),u.je=function(){return!0};var I8e=Ri(ii,"TreeMap/SubMapType/3",984,tB,null,null),Bzt;T(212,bd,{3:1,20:1,25:1,13:1,196:1,19:1,60:1,212:1},eit,Ub),u.wc=function(){return new N5(this)},u.nc=function(e){return HD(this,e)},u.Pb=function(){C5(this.a)},u.pc=function(e){return eW(this.a,e)},u.tc=function(){var e;return e=new sL(new Y5(new Tv(this.a).a).b),new iT(e)},u.vc=function(e){return jrt(this,e)},u._b=function(){return this.a.c};var v3e=A(ii,"TreeSet",212);T(845,1,{},qj),u.le=function(e,n){return Wee(this.a,e,n)};var R8e=A(HZ,"BinaryOperator/lambda$0$Type",845);T(846,1,{},wn),u.le=function(e,n){return Lp(a(e,21).a,a(n,21).a)<=0?e:n};var D8e=A(HZ,"BinaryOperator/lambda$1$Type",846);T(843,1,ys,ut),u.Kb=function(e){return e};var N8e=A(HZ,"Function/lambda$0$Type",843);T(627,1,us,H8),u.Nb=function(e){return!this.a.Nb(e)};var O8e=A(HZ,"Predicate/lambda$0$Type",627);T(150,23,{3:1,34:1,23:1,150:1},nW);var U1t,Qh,bw,tf=Ri(Qs,"Collector/Characteristics",150,ji,Moe,yne),Fzt;T(684,1,{},OTt,n8t);var B8e=A(Qs,"Collector/CollectorImpl",684);T(1053,1,ys,Xj),u.Kb=function(e){return me(),!!sct(e)};var F8e=A(Qs,"Collectors/12methodref$test$Type",1053);T(365,1,{},ge),u.Kd=function(e,n){a(e,13).nc(n)};var U8e=A(Qs,"Collectors/20methodref$add$Type",365);T(367,1,{},Pe),u.ne=function(){return new Dt};var z8e=A(Qs,"Collectors/21methodref$ctor$Type",367);T(331,1,{},ti),u.ne=function(){return new $r};var j8e=A(Qs,"Collectors/23methodref$ctor$Type",331);T(332,1,{},Qn),u.Kd=function(e,n){Ir(a(e,67),n)};var H8e=A(Qs,"Collectors/24methodref$add$Type",332);T(1050,1,{},Yi),u.le=function(e,n){return Z3t(a(e,15),a(n,13))};var G8e=A(Qs,"Collectors/4methodref$addAll$Type",1050);T(683,1,{},ki),u.le=function(e,n){return $ot(e,n)};var W8e=A(Qs,"Collectors/lambda$1$Type",683);T(1055,1,{},Zj),u.ne=function(){return Y(Z(un,1),te,1,5,[this.a])};var $8e=A(Qs,"Collectors/lambda$10$Type",1055);T(1056,1,{},g5),u.Kd=function(e,n){ire(this.a,e)};var V8e=A(Qs,"Collectors/lambda$11$Type",1056);T(1057,1,{},W8),u.le=function(e,n){return kre(this.a,e,n)};var q8e=A(Qs,"Collectors/lambda$12$Type",1057);T(1058,1,ys,lr),u.Kb=function(e){return r_(e)[0]};var X8e=A(Qs,"Collectors/lambda$13$Type",1058);T(366,1,{},pr),u.le=function(e,n){return a(e,13).oc(a(n,13)),a(e,13)};var Z8e=A(Qs,"Collectors/lambda$21$Type",366);T(333,1,{},Kt),u.le=function(e,n){return yo(a(e,67),a(n,67)),a(e,67)};var Y8e=A(Qs,"Collectors/lambda$25$Type",333);T(334,1,ys,kt),u.Kb=function(e){return a(e,67)};var K8e=A(Qs,"Collectors/lambda$26$Type",334);T(1049,1,{},Yj),u.Kd=function(e,n){kle(this.a,e,n)};var J8e=A(Qs,"Collectors/lambda$3$Type",1049);T(1051,1,{},Nt),u.le=function(e,n){return gle(a(e,109),a(n,109),new Yi)};var Q8e=A(Qs,"Collectors/lambda$4$Type",1051);T(1052,1,ys,Kj),u.Kb=function(e){return Ohe(this.a,e)};var t9e=A(Qs,"Collectors/lambda$5$Type",1052);T(1054,1,{},ie),u.ne=function(){var e;return e=new xm,Pm(e,(me(),me(),!1),new Dt),Pm(e,!0,new Dt),e};var e9e=A(Qs,"Collectors/lambda$8$Type",1054);T(645,1,{}),u.d=!1;var n9e=A(Qs,"TerminatableStream",645);T(1416,645,{607:1,1701:1},GSt);var i9e=A(Qs,"DoubleStream/DoubleStreamSource",1416);T(1417,1,{},Jj),u.ie=function(e){AIt(this.a,e)};var r9e=A(Qs,"DoubleStream/DoubleStreamSource/lambda$2$Type",1417),_3e=Sr(Qs,"Stream");T(940,446,Wp,ETt),u.sd=function(e){for(;Uae(this);){if(this.a.sd(e))return!0;this.a=null}return!1};var s9e=A(Qs,"Stream/2",940);T(941,1,{},Qj),u.td=function(e){_ee(this.a,e)};var o9e=A(Qs,"Stream/2/lambda$0$Type",941);T(942,1,WP,tH),u.fe=function(){R$(this.a)};var c9e=A(Qs,"Stream/3methodref$close$Type",942);T(943,1,WP,eH),u.fe=function(){R$(this.a)};var a9e=A(Qs,"Stream/4methodref$close$Type",943);T(644,446,Wp,Tct),u.sd=function(e){for(this.b=!1;!this.b&&this.c.sd(new cMt(this,e)););return this.b},u.b=!1;var u9e=A(Qs,"Stream/FilterSpliterator",644);T(932,1,{},cMt),u.td=function(e){Lre(this.a,this.b,e)};var l9e=A(Qs,"Stream/FilterSpliterator/lambda$0$Type",932);T(930,929,Wp,Vkt);var h9e=A(Qs,"Stream/MapToDoubleSpliterator",930);T(646,1,{},Xit),u.td=function(e){cte(this.a,this.b,e)};var f9e=A(Qs,"Stream/MapToDoubleSpliterator/lambda$0$Type",646);T(643,446,Wp,yct),u.sd=function(e){return CTt(this,e)};var d9e=A(Qs,"Stream/MapToObjSpliterator",643);T(931,1,{},aMt),u.td=function(e){ate(this.a,this.b,e)};var p9e=A(Qs,"Stream/MapToObjSpliterator/lambda$0$Type",931);T(45,645,{607:1,1701:1,1700:1},gi);var g9e=A(Qs,"Stream/StreamSource",45);T(936,446,Wp,STt),u.sd=function(e){for(;zae(this);){if(this.a.sd(e))return!0;R$(this.b),this.b=null,this.a=null}return!1};var m9e=A(Qs,"Stream/StreamSource/1",936);T(937,1,{},nH),u.td=function(e){qie(this.a,e)};var b9e=A(Qs,"Stream/StreamSource/1/lambda$0$Type",937);T(938,446,Wp,E4t),u.sd=function(e){var n;return this.a||(n=new Dt,this.b.a.gc(new iH(n)),we(),gc(n,this.c),this.a=new Ei(n,16)),jct(this.a,e)},u.a=null;var w9e=A(Qs,"Stream/StreamSource/5",938);T(939,1,{},iH),u.td=function(e){Ut(this.a,e)};var v9e=A(Qs,"Stream/StreamSource/5/2methodref$add$Type",939);T(933,1,{},yt),u.td=function(e){};var _9e=A(Qs,"Stream/StreamSource/lambda$0$Type",933);T(934,1,{},rH),u.le=function(e,n){return iee(this.a,e,n)};var y9e=A(Qs,"Stream/StreamSource/lambda$3$Type",934);T(935,1,{},uMt),u.td=function(e){Ote(this.b,this.a,e)};var x9e=A(Qs,"Stream/StreamSource/lambda$4$Type",935);T(553,1,{},ue),u.td=function(e){D8(this,e)};var M9e=A(Qs,"Stream/ValueConsumer",553);T(944,1,{},sH),u.td=function(e){yle(this.a,e)};var E9e=A(Qs,"TerminatableStream/lambda$0$Type",944),y3e=0,z1t,j1t=0,eB;T(1480,1,{},hkt);var S9e=A(NOt,"Scanline",1480),x3e=Sr(NOt,OOt);T(1450,1,{},hLt);var T9e=A(vd,"CGraph",1450);T(309,1,{309:1},dAt),u.b=0,u.c=0,u.d=0,u.g=0,u.i=0,u.k=Ps;var C9e=A(vd,"CGroup",309);T(723,1,{},nit);var A9e=A(vd,"CGroup/CGroupBuilder",723);T(57,1,{57:1},eTt),u.Ib=function(){return this.j?hi(this.j.Kb(this)):(Vd(nB),nB.o+"@"+(lm(this)>>>0).toString(16))},u.f=0,u.i=Ps;var nB=A(vd,"CNode",57);T(722,1,{},iit);var k9e=A(vd,"CNode/CNodeBuilder",722),Uzt;T(1236,1,{},fn),u.se=function(e,n){return 0},u.te=function(e,n){return 0};var L9e=A(vd,FOt,1236);T(1505,1,{},An),u.pe=function(e){var n,i,r,c,l,f,p,b,v,M,k,I,O,$,G;for(v=is,r=new j(e.a.b);r.ar.d.c||r.d.c==l.d.c&&r.d.b=0?"b"+e+"["+sV(this.a)+"]":"b["+sV(this.a)+"]"):"b_"+lm(this)};var BDe=A(VP,"FBendpoint",497);T(262,131,{3:1,262:1,93:1,131:1},oTt),u.Ib=function(){return sV(this)};var FDe=A(VP,"FEdge",262);T(202,131,{3:1,202:1,93:1,131:1},dN);var E3e=A(VP,"FGraph",202);T(454,329,{3:1,454:1,329:1,93:1,131:1},lkt),u.Ib=function(){return this.b==null||this.b.length==0?"l["+sV(this.a)+"]":"l_"+this.b};var UDe=A(VP,"FLabel",454);T(146,329,{3:1,146:1,329:1,93:1,131:1},YCt),u.Ib=function(){return Yot(this)},u.b=0;var zDe=A(VP,"FNode",146);T(1691,1,{}),u.Ee=function(e){vht(this,e)},u.Fe=function(){TRt(this)},u.d=0;var jDe=A(_ft,"AbstractForceModel",1691);T(568,1691,{568:1},BPt),u.De=function(e,n){var i,r,c,l,f;return l9t(this.f,e,n),c=za(Xc(n.d),e.d),f=y.Math.sqrt(c.a*c.a+c.b*c.b),r=y.Math.max(0,f-I$(e.e)/2-I$(n.e)/2),i=$Pt(this.e,e,n),i>0?l=-Bre(r,this.c)*i:l=Dee(r,this.b)*a(z(e,(Ph(),TE)),21).a,hl(c,l/f),c},u.Ee=function(e){vht(this,e),this.a=a(z(e,(Ph(),aB)),21).a,this.c=lt(Yt(z(e,uB))),this.b=lt(Yt(z(e,zK)))},u.Ge=function(e){return e0&&(l-=fQt(r,this.a)*i),hl(c,l*this.b/f),c},u.Ee=function(e){var n,i,r,c,l,f,p;for(vht(this,e),this.b=lt(Yt(z(e,(Ph(),jK)))),this.c=this.b/a(z(e,aB),21).a,r=e.e.c.length,l=0,c=0,p=new j(e.e);p.a0},u.a=0,u.b=0,u.c=0;var GDe=A(_ft,"FruchtermanReingoldModel",569);T(748,1,_d,aj),u.ue=function(e){He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,cO),""),"Force Model"),"Determines the model for force calculation."),pgt),(i0(),xs)),ggt),qe((t0(),On))))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,yft),""),"Iterations"),"The number of iterations on the force model."),Xt(300)),Pa),Io),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,xft),""),"Repulsive Power"),"Determines how many bend points are added to the edge; such bend points are regarded as repelling particles in the force model"),Xt(0)),Pa),Io),qe(Md)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,eY),""),"FR Temperature"),"The temperature is used as a scaling factor for particle displacements."),op),ha),To),qe(On)))),Sa(e,eY,cO,fjt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,nY),""),"Eades Repulsion"),"Factor for repulsive forces in Eades' model."),5),ha),To),qe(On)))),Sa(e,nY,cO,ujt),D7t((new lj,e))};var ojt,cjt,pgt,ajt,ujt,ljt,hjt,fjt,WDe=A(d4,"ForceMetaDataProvider",748);T(387,23,{3:1,34:1,23:1,387:1},Qit);var UK,cB,ggt=Ri(d4,"ForceModelStrategy",387,ji,Vse,Tne),djt;T(880,1,_d,lj),u.ue=function(e){D7t(e)};var pjt,mgt,aB,bgt,gjt,wgt,vgt,TE,mjt,zK,_gt,bjt,wjt,uB,jK,$De=A(d4,"ForceOptions",880);T(881,1,{},rv),u.Be=function(){var e;return e=new rit,e},u.Ce=function(e){};var VDe=A(d4,"ForceOptions/ForceFactory",881),v6,U4,px,lB;T(749,1,_d,g8),u.ue=function(e){He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Sft),""),"Fixed Position"),"Prevent that the node is moved by the layout algorithm."),(me(),me(),!1)),(i0(),Ec)),ho),qe((t0(),vc))))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Tft),""),"Desired Edge Length"),"Either specified for parent nodes or for individual edges, where the latter takes higher precedence."),100),ha),To),ur(On,Y(Z(Jp,1),jt,163,0,[Md]))))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Cft),""),"Layout Dimension"),"Dimensions that are permitted to be altered during layout."),ygt),xs),Cgt),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Aft),""),"Stress Epsilon"),"Termination criterion for the iterative process."),op),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,kft),""),"Iteration Limit"),"Maximum number of performed iterations. Takes higher precedence than 'epsilon'."),Xt(qi)),Pa),Io),qe(On)))),QNt((new uj,e))};var vjt,_jt,ygt,yjt,xjt,Mjt,qDe=A(d4,"StressMetaDataProvider",749);T(884,1,_d,uj),u.ue=function(e){QNt(e)};var hB,xgt,Mgt,Egt,Sgt,Tgt,XDe=A(d4,"StressOptions",884);T(885,1,{},z0),u.Be=function(){var e;return e=new cTt,e},u.Ce=function(e){};var ZDe=A(d4,"StressOptions/StressFactory",885);T(959,244,N_,cTt),u.Ae=function(e,n){var i,r,c,l;for(di(n,rBt,1),lt(de(cn(e,(BL(),Sgt))))||W8t(new rit,e,Ta(n,1)),r=a6t(e),i=zNt(this.a,r),l=i.tc();l.hc();)c=a(l.ic(),202),k_e(this.b,c),y0e(this.b);r=J7t(i),X7t(r),Vn(n)};var YDe=A(sY,"StressLayoutProvider",959);T(882,1,{},LG),u.c=0,u.e=0,u.g=0;var KDe=A(sY,"StressMajorization",882);T(348,23,{3:1,34:1,23:1,348:1},iW);var HK,GK,WK,Cgt=Ri(sY,"StressMajorization/Dimension",348,ji,Doe,Cne),Ejt;T(883,1,jr,Av),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return tne(this.a,e,n)};var JDe=A(sY,"StressMajorization/lambda$0$Type",883);T(985,1,{},SAt);var QDe=A(ZP,"ElkLayered",985);T(986,1,{},Us),u.td=function(e){Jae(this.a,e)};var tNe=A(ZP,"ElkLayered/lambda$0$Type",986);T(987,1,{},j0),u.td=function(e){Ct(a(e,31),(qt(),GB),(DM(),RB))};var eNe=A(ZP,"ElkLayered/lambda$1$Type",987);T(1033,1,{},ZEt);var Sjt,Tjt,Cjt,nNe=A(ZP,"GraphConfigurator",1033);T(958,244,N_,_u),u.Ae=function(e,n){var i;i=cwe(new gEt,e),zt(cn(e,(qt(),Y4)))===zt((Kg(),Ix))?Ehe(this.a,i,n):I0e(this.a,i,n),q7t(new m8,i)};var iNe=A(ZP,"LayeredLayoutProvider",958);T(328,23,{3:1,34:1,23:1,328:1},O5);var Of,gx,aa,ua,Yo,Agt=Ri(ZP,"LayeredPhases",328,ji,Gce,Ane),Ajt;T(1407,1,{},LPt),u.i=0;var kjt,rNe=A(YP,"ComponentsToCGraphTransformer",1407),Ljt;T(1408,1,{},sv),u.He=function(e,n){return y.Math.min(e.a!=null?lt(e.a):e.c.i,n.a!=null?lt(n.a):n.c.i)},u.Ie=function(e,n){return y.Math.min(e.a!=null?lt(e.a):e.c.i,n.a!=null?lt(n.a):n.c.i)};var sNe=A(YP,"ComponentsToCGraphTransformer/1",1408);T(80,1,{80:1}),u.i=0,u.k=!0,u.o=Ps;var $K=A(g4,"CNode",80);T(282,80,{282:1,80:1},Wrt,fut),u.Ib=function(){return""};var oNe=A(YP,"ComponentsToCGraphTransformer/CRectNode",282);T(1391,1,{},vg);var VK,qK,cNe=A(YP,"OneDimensionalComponentsCompaction",1391);T(1392,1,rh,ov),u.Fb=function(e){return this===e},u.Kb=function(e){return gq(),me(),a(a(e,48).a,80).d.e!=0};var aNe=A(YP,"OneDimensionalComponentsCompaction/lambda$0$Type",1392);T(1393,1,rh,c3),u.Fb=function(e){return this===e},u.Kb=function(e){return gq(),me(),!!(cIt(a(a(e,48).a,80).j,a(a(e,48).b,110))||a(a(e,48).a,80).d.e!=0&&cIt(a(a(e,48).a,80).j,a(a(e,48).b,110)))};var uNe=A(YP,"OneDimensionalComponentsCompaction/lambda$1$Type",1393);T(1410,1,{},ZCt);var lNe=A(g4,"CGraph",1410);T(172,1,{172:1},Lq),u.b=0,u.c=0,u.e=0,u.g=!0,u.i=Ps;var hNe=A(g4,"CGroup",172);T(1409,1,{},Rt),u.He=function(e,n){return y.Math.max(e.a!=null?lt(e.a):e.c.i,n.a!=null?lt(n.a):n.c.i)},u.Ie=function(e,n){return y.Math.max(e.a!=null?lt(e.a):e.c.i,n.a!=null?lt(n.a):n.c.i)};var fNe=A(g4,FOt,1409);T(1411,1,{},S9t),u.d=!1;var Pjt,XK=A(g4,jOt,1411);T(1412,1,rh,ve),u.Fb=function(e){return this===e},u.Kb=function(e){return Rit(),me(),a(a(e,48).a,80).d.e!=0};var dNe=A(g4,HOt,1412);T(726,1,{},Xst),u.a=!1,u.b=!1,u.c=!1,u.d=!1;var pNe=A(g4,GOt,726);T(1521,1,{},MCt);var gNe=A(lO,WOt,1521),_6=Sr(u0,OOt);T(1522,1,{341:1},N4t),u.Ne=function(e){Zbe(this,a(e,524))};var mNe=A(lO,$Ot,1522);T(1523,1,jr,Je),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return ro(a(e,282).g.c+a(e,282).g.b/2,a(n,282).g.c+a(n,282).g.b/2)};var bNe=A(lO,VOt,1523);T(524,1,{524:1},trt),u.a=!1;var wNe=A(lO,qOt,524);T(1524,1,jr,tn),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Cpe(e,n)};var vNe=A(lO,XOt,1524);T(102,1,{102:1},sM,Fst),u.Fb=function(e){var n;return e==null||S3e!=fu(e)?!1:(n=a(e,102),au(this.c,n.c)&&au(this.d,n.d))},u.Hb=function(){return eq(Y(Z(un,1),te,1,5,[this.c,this.d]))},u.Ib=function(){return"("+this.c+Rc+this.d+(this.a?"cx":"")+this.b+")"},u.a=!0,u.c=0,u.d=0;var S3e=A(u0,"Point",102);T(373,23,{3:1,34:1,23:1,373:1},U9);var Xm,ww,Z_,vw,Ijt=Ri(u0,"Point/Quadrant",373,ji,dce,kne),Rjt;T(1398,1,{},sm),u.b=null,u.c=null,u.d=null,u.e=null,u.f=null;var Djt,Njt,Ojt,Bjt,Fjt,_Ne=A(u0,"RectilinearConvexHull",1398);T(516,1,{341:1},u7),u.Ne=function(e){jae(this,a(e,102))},u.b=0;var kgt,yNe=A(u0,"RectilinearConvexHull/MaximalElementsEventHandler",516);T(1400,1,jr,Hi),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Dit(),ro(lt(Yt(e)),lt(Yt(n)))};var xNe=A(u0,"RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type",1400);T(1399,1,{341:1},fLt),u.Ne=function(e){Mbe(this,a(e,102))},u.a=0,u.b=null,u.c=null,u.d=null,u.e=null;var MNe=A(u0,"RectilinearConvexHull/RectangleEventHandler",1399);T(1401,1,jr,Pr),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return mC(),a(e,102).c==a(n,102).c?ro(a(n,102).d,a(e,102).d):ro(a(e,102).c,a(n,102).c)};var ENe=A(u0,"RectilinearConvexHull/lambda$0$Type",1401);T(1402,1,jr,Gr),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return mC(),a(e,102).c==a(n,102).c?ro(a(e,102).d,a(n,102).d):ro(a(e,102).c,a(n,102).c)};var SNe=A(u0,"RectilinearConvexHull/lambda$1$Type",1402);T(1403,1,jr,Ze),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return mC(),a(e,102).c==a(n,102).c?ro(a(n,102).d,a(e,102).d):ro(a(n,102).c,a(e,102).c)};var TNe=A(u0,"RectilinearConvexHull/lambda$2$Type",1403);T(1404,1,jr,hs),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return mC(),a(e,102).c==a(n,102).c?ro(a(e,102).d,a(n,102).d):ro(a(n,102).c,a(e,102).c)};var CNe=A(u0,"RectilinearConvexHull/lambda$3$Type",1404);T(1405,1,jr,Fs),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return $1e(e,n)};var ANe=A(u0,"RectilinearConvexHull/lambda$4$Type",1405);T(1406,1,{},fkt);var kNe=A(u0,"Scanline",1406);T(1694,1,{});var LNe=A(K1,"AbstractGraphPlacer",1694);T(458,1,{458:1},nCt);var ps,PNe=A(K1,"ComponentGroup",458);T(1076,1694,{},v9),u.Oe=function(e,n){var i,r,c,l,f,p,b,v,M,k,I,O,$;if(this.a.c=dt(un,te,1,0,5,1),n.a.c=dt(un,te,1,0,5,1),e.Wb()){n.e.a=0,n.e.b=0;return}for(f=a(e.cd(0),31),Uo(n,f),c=e.tc();c.hc();)r=a(c.ic(),31),Ahe(this,r);for($=new go,l=lt(Yt(z(f,(qt(),$J)))),v=new j(this.a);v.aO&&(Gt=0,Zt+=I+c,I=0),et=f.c,TP(f,Gt+et.a,Zt+et.b),Gh(et),i=y.Math.max(i,Gt+pt.a),I=y.Math.max(I,pt.b),Gt+=pt.a+c;if(n.e.a=i,n.e.b=Zt+I,lt(de(z(l,UJ)))){for(r=new Ms,rOt(r,e,c),k=e.tc();k.hc();)M=a(k.ic(),31),sr(Gh(M.c),r.e);sr(Gh(n.e),r.a)}I5t(n,e)};var HNe=A(K1,"SimpleRowGraphPlacer",1074);T(1075,1,jr,Tc),u.Ld=function(e,n){return rle(a(e,31),a(n,31))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var GNe=A(K1,"SimpleRowGraphPlacer/1",1075),Ujt;T(1032,1,sh,rl),u.Mb=function(e){var n;return n=a(z(a(e,234).b,(qt(),Ro)),74),!!n&&n.b!=0},u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)};var WNe=A(hO,"CompoundGraphPostprocessor/1",1032);T(1031,1,Br,pEt),u.Pe=function(e,n){pRt(this,a(e,31),n)};var $Ne=A(hO,"CompoundGraphPreprocessor",1031);T(400,1,{400:1},H6t),u.c=!1;var VNe=A(hO,"CompoundGraphPreprocessor/ExternalPort",400);T(234,1,{234:1},MD),u.Ib=function(){return Q5(this.c)+":"+CLt(this.b)};var qNe=A(hO,"CrossHierarchyEdge",234);T(687,1,jr,$8),u.Ld=function(e,n){return lpe(this,a(e,234),a(n,234))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var XNe=A(hO,"CrossHierarchyEdgeComparator",687);T(279,131,{3:1,279:1,93:1,131:1}),u.o=0;var ZNe=A(oa,"LGraphElement",279);T(14,279,{3:1,14:1,279:1,93:1,131:1},Np),u.Ib=function(){return CLt(this)};var Tl=A(oa,"LEdge",14);T(31,279,{3:1,20:1,31:1,279:1,93:1,131:1},tat),u.sc=function(e){vo(this,e)},u.tc=function(){return new j(this.b)},u.Ib=function(){return this.b.c.length==0?"G-unlayered"+Gp(this.a):this.a.c.length==0?"G-layered"+Gp(this.b):"G[layerless"+Gp(this.a)+", layers"+Gp(this.b)+"]"};var zjt=A(oa,"LGraph",31);T(591,1,{}),u.Qe=function(){return this.e.k},u.xe=function(e){return z(this.e,e)},u.Re=function(){return this.e.n},u.Se=function(){return this.e.o},u.ye=function(e){return Wb(this.e,e)},u.Te=function(e){this.e.k.a=e.a,this.e.k.b=e.b},u.Ue=function(e){this.e.n.a=e.a,this.e.n.b=e.b},u.Ve=function(e){this.e.o=e};var YNe=A(oa,"LGraphAdapters/AbstractLShapeAdapter",591);T(520,1,{741:1},xh),u.We=function(){var e,n;if(!this.b)for(this.b=od(this.a.b.c.length),n=new j(this.a.b);n.a0&&DPt(e.charCodeAt(n-1),uBt);)--n;if(l "+this.a+" "+Q5(this.c)},u.a=0,u.b=0,u.d=0;var ABe=A(Dn,"SplineSelfLoopRouter/LoopPadding",188);T(1294,1,sh,aCt),u.Mb=function(e){return Yfe(this,a(e,188))},u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)},u.a=0,u.c=0;var kBe=A(Dn,"SplineSelfLoopRouter/LoopPadding/EnclosingPredicate",1294);T(1293,1,jr,Ny),u.Ld=function(e,n){return wte(a(e,188),a(n,188))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var LBe=A(Dn,"SplineSelfLoopRouter/LoopPadding/MarginComparator",1293);T(415,1,sh,Nb),u.Mb=function(e){return a(e,188).c==this.a},u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)};var PBe=A(Dn,"SplineSelfLoopRouter/LoopPadding/PortSidePredicate",415);T(414,1,{414:1},ikt),u.c=0,u.d=0,u.e=0;var IBe=A(Dn,"SplineSelfLoopRouter/SelfLoopEdge",414);T(1292,1,jr,yk),u.Ld=function(e,n){return IQt(a(e,414),a(n,414))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var RBe=A(Dn,"SplineSelfLoopRouter/SelfLoopEdge/StepSizeComparator",1292);T(1451,715,{},bPt),u.qe=function(e){var n,i,r,c;switch(this.c=e,this.a.g){case 2:n=new Dt,qc(wo(new gi(null,new Ei(this.c.a.b,16)),new By),new yMt(this,n)),mP(this,new Ek),pd(n,new xk),n.c=dt(un,te,1,0,5,1),qc(wo(new gi(null,new Ei(this.c.a.b,16)),new Yf),new Y8(n)),mP(this,new Fu),pd(n,new M3),n.c=dt(un,te,1,0,5,1),i=WEt(mPt(mL(new gi(null,new Ei(this.c.a.b,16)),new aT(this))),new pf),qc(new gi(null,new Ei(this.c.a.a,16)),new gMt(i,n)),mP(this,new IS),pd(n,new V0),n.c=dt(un,te,1,0,5,1);break;case 3:r=new Dt,mP(this,new Oy),c=WEt(mPt(mL(new gi(null,new Ei(this.c.a.b,16)),new wH(this))),new Mk),qc(wo(new gi(null,new Ei(this.c.a.b,16)),new x3),new _Mt(c,r)),mP(this,new dv),pd(r,new RS),r.c=dt(un,te,1,0,5,1);break;default:throw K(new mt)}},u.b=0;var DBe=A(Kr,"EdgeAwareScanlineConstraintCalculation",1451);T(1452,1,sh,Oy),u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)},u.Mb=function(e){return ct(a(e,57).g,153)};var NBe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$0$Type",1452);T(1453,1,{},wH),u.oe=function(e){return a0e(this.a,e)};var OBe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$1$Type",1453);T(1464,1,{},xk),u.td=function(e){a(e,340).fe()};var BBe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$10$Type",1464);T(1465,1,us,Yf),u.Nb=function(e){return ct(a(e,57).g,8)};var FBe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$11$Type",1465);T(1467,1,{},Y8),u.td=function(e){Ghe(this.a,e)};var UBe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$12$Type",1467);T(1468,1,sh,Fu),u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)},u.Mb=function(e){return ct(a(e,57).g,8)};var zBe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$13$Type",1468);T(1469,1,{},M3),u.td=function(e){a(e,340).fe()};var jBe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$14$Type",1469);T(1470,1,{},aT),u.oe=function(e){return u0e(this.a,e)};var HBe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$15$Type",1470);T(1471,1,{},pf),u.me=function(){return 0};var GBe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$16$Type",1471);T(1473,1,{},gMt),u.td=function(e){yre(this.a,this.b,e)},u.a=0;var WBe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$17$Type",1473);T(1474,1,sh,IS),u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)},u.Mb=function(e){return!0};var $Be=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$18$Type",1474);T(1475,1,{},V0),u.td=function(e){a(e,340).fe()};var VBe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$19$Type",1475);T(1454,1,{},Mk),u.me=function(){return 0};var qBe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$2$Type",1454);T(1456,1,WP,mMt),u.fe=function(){GC(this.b,this.a,-1)},u.a=0;var XBe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$20$Type",1456);T(1461,1,WP,bMt),u.fe=function(){GC(this.a,this.b,-1)},u.b=0;var ZBe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$21$Type",1461);T(1466,1,WP,wMt),u.fe=function(){GC(this.b,this.a,-1)},u.a=0;var YBe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$22$Type",1466);T(1472,1,WP,vMt),u.fe=function(){Y9t(this.a,this.b,-1)},u.b=0;var KBe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$23$Type",1472);T(1455,1,us,x3),u.Nb=function(e){return ct(a(e,57).g,8)};var JBe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$3$Type",1455);T(1457,1,{},_Mt),u.td=function(e){xre(this.a,this.b,e)},u.a=0;var QBe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$4$Type",1457);T(1458,1,sh,dv),u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)},u.Mb=function(e){return!0};var tFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$5$Type",1458);T(1459,1,{},RS),u.td=function(e){a(e,340).fe()};var eFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$6$Type",1459);T(1460,1,us,By),u.Nb=function(e){return ct(a(e,57).g,153)};var nFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$7$Type",1460);T(1462,1,{},yMt),u.td=function(e){hue(this.a,this.b,e)};var iFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$8$Type",1462);T(1463,1,sh,Ek),u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)},u.Mb=function(e){return ct(a(e,57).g,153)};var rFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$9$Type",1463);T(1232,1,Br,xSt),u.Pe=function(e,n){tye(this,a(e,31),n)};var Xjt,sFe=A(Kr,"HorizontalGraphCompactor",1232);T(1233,1,{},t2),u.se=function(e,n){var i,r,c;return zt(z(this.a.a,(qt(),ig)))===zt((gd(),rb))&&(ct(e.g,153)&&ct(n.g,8)||ct(n.g,153)&&ct(e.g,8))?lt(de(z(this.a.a,$B)))?0:10:Dct(e,n)||(i=Jv(e),r=Jv(n),i&&i.j==(Ke(),rs)||r&&r.j==(Ke(),rs))?0:(c=a(z(this.a.a,(Ft(),yw)),266),Mee(c,i?i.j:(Ke(),Hr),r?r.j:(Ke(),Hr)))},u.te=function(e,n){var i,r,c;return Dct(e,n)?1:(i=Jv(e),r=Jv(n),c=a(z(this.a.a,(Ft(),yw)),266),Grt(c,i?i.j:(Ke(),Hr),r?r.j:(Ke(),Hr)))};var oFe=A(Kr,"HorizontalGraphCompactor/1",1233);T(1234,1,{},gf),u.re=function(e,n){return xT(),e.a.i==0};var cFe=A(Kr,"HorizontalGraphCompactor/lambda$0$Type",1234);T(1235,1,{},jd),u.re=function(e,n){return Cse(this.a,e,n)};var aFe=A(Kr,"HorizontalGraphCompactor/lambda$1$Type",1235);T(1422,1,{},BLt);var Zjt,Yjt,uFe=A(Kr,"LGraphToCGraphTransformer",1422);T(1430,1,us,Fy),u.Nb=function(e){return e!=null};var lFe=A(Kr,"LGraphToCGraphTransformer/0methodref$nonNull$Type",1430);T(1423,1,ys,Sk),u.Kb=function(e){return Zl(),Yc(z(a(a(e,57).g,8),(Ft(),li)))};var hFe=A(Kr,"LGraphToCGraphTransformer/lambda$0$Type",1423);T(1424,1,ys,pv),u.Kb=function(e){return Zl(),Y6t(a(a(e,57).g,153))};var fFe=A(Kr,"LGraphToCGraphTransformer/lambda$1$Type",1424);T(1435,1,us,DS),u.Nb=function(e){return Zl(),ct(a(e,57).g,153)};var dFe=A(Kr,"LGraphToCGraphTransformer/lambda$10$Type",1435);T(1439,1,{},Fl),u.td=function(e){var n,i;Zl(),n=e.d.c-e.e.c,i=a(e.g,153),pd(i.b,new xH(n)),pd(i.c,new MH(n)),vo(i.i,new K8(n))};var pFe=A(Kr,"LGraphToCGraphTransformer/lambda$11$Type",1439);T(1440,1,ys,Uy),u.Kb=function(e){return Zl(),new gi(null,new E2(Rn(br(a(e,8)))))};var gFe=A(Kr,"LGraphToCGraphTransformer/lambda$12$Type",1440);T(1441,1,us,_b),u.Nb=function(e){return Zl(),ec(a(e,14))};var mFe=A(Kr,"LGraphToCGraphTransformer/lambda$13$Type",1441);T(1442,1,{},vH),u.td=function(e){Qae(this.a,e)};var bFe=A(Kr,"LGraphToCGraphTransformer/lambda$14$Type",1442);T(1443,1,ys,Tk),u.Kb=function(e){return Zl(),new gi(null,new Ei(a(e,26).a,16))};var wFe=A(Kr,"LGraphToCGraphTransformer/lambda$15$Type",1443);T(1444,1,ys,l1),u.Kb=function(e){return Zl(),new gi(null,new E2(Rn(br(a(e,8)))))};var vFe=A(Kr,"LGraphToCGraphTransformer/lambda$16$Type",1444);T(1445,1,ys,h1),u.Kb=function(e){return Zl(),a(z(a(e,14),(Ft(),$4)),15)};var _Fe=A(Kr,"LGraphToCGraphTransformer/lambda$17$Type",1445);T(1446,1,us,Kf),u.Nb=function(e){return Zl(),!!a(e,15)&&!a(e,15).Wb()};var yFe=A(Kr,"LGraphToCGraphTransformer/lambda$18$Type",1446);T(1447,1,{},_H),u.td=function(e){l0e(this.a,a(e,15))};var xFe=A(Kr,"LGraphToCGraphTransformer/lambda$19$Type",1447);T(1426,1,{},yH),u.td=function(e){yoe(this.a,e)};var MFe=A(Kr,"LGraphToCGraphTransformer/lambda$2$Type",1426);T(1425,1,{},xMt),u.td=function(e){wce(this.a,this.b,e)};var EFe=A(Kr,"LGraphToCGraphTransformer/lambda$20$Type",1425);T(1436,1,{},xH),u.td=function(e){Ite(this.a,e)},u.a=0;var SFe=A(Kr,"LGraphToCGraphTransformer/lambda$21$Type",1436);T(1437,1,{},MH),u.td=function(e){Rte(this.a,e)},u.a=0;var TFe=A(Kr,"LGraphToCGraphTransformer/lambda$22$Type",1437);T(1438,1,{},K8),u.td=function(e){Dte(this.a,e)},u.a=0;var CFe=A(Kr,"LGraphToCGraphTransformer/lambda$23$Type",1438);T(1427,1,ys,zy),u.Kb=function(e){return Zl(),new gi(null,new Ei(a(e,26).a,16))};var AFe=A(Kr,"LGraphToCGraphTransformer/lambda$3$Type",1427);T(1428,1,ys,jy),u.Kb=function(e){return Zl(),new gi(null,new E2(Rn(br(a(e,8)))))};var kFe=A(Kr,"LGraphToCGraphTransformer/lambda$4$Type",1428);T(1429,1,ys,E3),u.Kb=function(e){return Zl(),a(z(a(e,14),(Ft(),$4)),15)};var LFe=A(Kr,"LGraphToCGraphTransformer/lambda$5$Type",1429);T(1431,1,{},rm),u.td=function(e){D0e(this.a,e)};var PFe=A(Kr,"LGraphToCGraphTransformer/lambda$6$Type",1431);T(1432,1,{},MMt),u.td=function(e){Ute(this.a,this.b,e)};var IFe=A(Kr,"LGraphToCGraphTransformer/lambda$7$Type",1432);T(1433,1,us,Hy),u.Nb=function(e){return Zl(),ct(a(e,57).g,8)};var RFe=A(Kr,"LGraphToCGraphTransformer/lambda$8$Type",1433);T(1434,1,{},yb),u.td=function(e){var n;Zl(),n=a(e.g,8),n.k.a=e.d.c+n.d.b};var DFe=A(Kr,"LGraphToCGraphTransformer/lambda$9$Type",1434);T(1421,1,{},Gy),u.pe=function(e){var n,i,r,c,l;for(this.a=e,this.d=new PG,this.c=dt(_0t,te,113,this.a.a.a.c.length,0,1),this.b=0,i=new j(this.a.a.a);i.a{var sMe=Object.create;var P_t=Object.defineProperty;var oMe=Object.getOwnPropertyDescriptor;var cMe=Object.getOwnPropertyNames;var aMe=Object.getPrototypeOf,uMe=Object.prototype.hasOwnProperty;var kI=(d=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(d,{get:(s,h)=>(typeof require<"u"?require:s)[h]}):d)(function(d){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+d+'" is not supported')});var Ld=(d,s)=>()=>(s||d((s={exports:{}}).exports,s),s.exports),lMe=(d,s)=>{for(var h in s)P_t(d,h,{get:s[h],enumerable:!0})},hMe=(d,s,h,p)=>{if(s&&typeof s=="object"||typeof s=="function")for(let m of cMe(s))!uMe.call(d,m)&&m!==h&&P_t(d,m,{get:()=>s[m],enumerable:!(p=oMe(s,m))||p.enumerable});return d};var FXt=(d,s,h)=>(h=d!=null?sMe(aMe(d)):{},hMe(s||!d||!d.__esModule?P_t(h,"default",{value:d,enumerable:!0}):h,d));var zXt=Ld((ytt,UXt)=>{(function(d,s){typeof ytt=="object"&&typeof UXt<"u"?s(ytt):typeof define=="function"&&define.amd?define(["exports"],s):(d=typeof globalThis<"u"?globalThis:d||self,s(d.leaflet={}))})(ytt,function(d){"use strict";var s="1.9.4";function h(w){var S,D,q,st;for(D=1,q=arguments.length;D"u"||!L||!L.Mixin)){w=X(w)?w:[w];for(var S=0;S0?Math.floor(w):Math.ceil(w)};re.prototype={clone:function(){return new re(this.x,this.y)},add:function(w){return this.clone()._add(Se(w))},_add:function(w){return this.x+=w.x,this.y+=w.y,this},subtract:function(w){return this.clone()._subtract(Se(w))},_subtract:function(w){return this.x-=w.x,this.y-=w.y,this},divideBy:function(w){return this.clone()._divideBy(w)},_divideBy:function(w){return this.x/=w,this.y/=w,this},multiplyBy:function(w){return this.clone()._multiplyBy(w)},_multiplyBy:function(w){return this.x*=w,this.y*=w,this},scaleBy:function(w){return new re(this.x*w.x,this.y*w.y)},unscaleBy:function(w){return new re(this.x/w.x,this.y/w.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=hn(this.x),this.y=hn(this.y),this},distanceTo:function(w){w=Se(w);var S=w.x-this.x,D=w.y-this.y;return Math.sqrt(S*S+D*D)},equals:function(w){return w=Se(w),w.x===this.x&&w.y===this.y},contains:function(w){return w=Se(w),Math.abs(w.x)<=Math.abs(this.x)&&Math.abs(w.y)<=Math.abs(this.y)},toString:function(){return"Point("+B(this.x)+", "+B(this.y)+")"}};function Se(w,S,D){return w instanceof re?w:X(w)?new re(w[0],w[1]):w==null?w:typeof w=="object"&&"x"in w&&"y"in w?new re(w.x,w.y):new re(w,S,D)}function ke(w,S){if(w)for(var D=S?[w,S]:w,q=0,st=D.length;q=this.min.x&&D.x<=this.max.x&&S.y>=this.min.y&&D.y<=this.max.y},intersects:function(w){w=mn(w);var S=this.min,D=this.max,q=w.min,st=w.max,vt=st.x>=S.x&&q.x<=D.x,$t=st.y>=S.y&&q.y<=D.y;return vt&&$t},overlaps:function(w){w=mn(w);var S=this.min,D=this.max,q=w.min,st=w.max,vt=st.x>S.x&&q.xS.y&&q.y=S.lat&&st.lat<=D.lat&&q.lng>=S.lng&&st.lng<=D.lng},intersects:function(w){w=Qn(w);var S=this._southWest,D=this._northEast,q=w.getSouthWest(),st=w.getNorthEast(),vt=st.lat>=S.lat&&q.lat<=D.lat,$t=st.lng>=S.lng&&q.lng<=D.lng;return vt&&$t},overlaps:function(w){w=Qn(w);var S=this._southWest,D=this._northEast,q=w.getSouthWest(),st=w.getNorthEast(),vt=st.lat>S.lat&&q.latS.lng&&q.lng1,oi=function(){var w=!1;try{var S=Object.defineProperty({},"passive",{get:function(){w=!0}});window.addEventListener("testPassiveEventSupport",N,S),window.removeEventListener("testPassiveEventSupport",N,S)}catch{}return w}(),Jr=function(){return!!document.createElement("canvas").getContext}(),Bs=!!(document.createElementNS&&ut("svg").createSVGRect),Oc=!!Bs&&function(){var w=document.createElement("div");return w.innerHTML="",(w.firstChild&&w.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),ru=!Bs&&function(){try{var w=document.createElement("div");w.innerHTML='';var S=w.firstChild;return S.style.behavior="url(#default#VML)",S&&typeof S.adj=="object"}catch{return!1}}(),fc=navigator.platform.indexOf("Mac")===0,il=navigator.platform.indexOf("Linux")===0;function va(w){return navigator.userAgent.toLowerCase().indexOf(w)>=0}var Mr={ie,ielt9:rn,edge:Pn,webkit:Tt,android:yt,android23:ue,androidStock:An,opera:zn,chrome:Li,gecko:xi,safari:Jt,phantom:nn,opera12:vn,win:he,ie3d:Mn,webkit3d:Sn,gecko3d:gn,any3d:Ce,mobile:dn,mobileWebkit:jn,mobileWebkit3d:ar,msPointer:gr,pointer:tr,touch:Qt,touchNative:Ln,mobileOpera:Mi,mobileGecko:sn,retina:Zn,passiveEvents:oi,canvas:Jr,svg:Bs,vml:ru,inlineSvg:Oc,mac:fc,linux:il},rv=Mr.msPointer?"MSPointerDown":"pointerdown",U0=Mr.msPointer?"MSPointerMove":"pointermove",sv=Mr.msPointer?"MSPointerUp":"pointerup",z0=Mr.msPointer?"MSPointerCancel":"pointercancel",j0={touchstart:rv,touchmove:U0,touchend:sv,touchcancel:z0},ov={touchstart:Pr,touchmove:Hi,touchend:Hi,touchcancel:Hi},vg={},cv=!1;function l3(w,S,D){return S==="touchstart"&&Ze(),ov[S]?(D=ov[S].bind(this,D),w.addEventListener(j0[S],D,!1),D):(console.warn("wrong event specified:",S),N)}function Rt(w,S,D){if(!j0[S]){console.warn("wrong event specified:",S);return}w.removeEventListener(j0[S],D,!1)}function ve(w){vg[w.pointerId]=w}function Je(w){vg[w.pointerId]&&(vg[w.pointerId]=w)}function tn(w){delete vg[w.pointerId]}function Ze(){cv||(document.addEventListener(rv,ve,!0),document.addEventListener(U0,Je,!0),document.addEventListener(sv,tn,!0),document.addEventListener(z0,tn,!0),cv=!0)}function Hi(w,S){if(S.pointerType!==(S.MSPOINTER_TYPE_MOUSE||"mouse")){S.touches=[];for(var D in vg)S.touches.push(vg[D]);S.changedTouches=[S],w(S)}}function Pr(w,S){S.MSPOINTER_TYPE_TOUCH&&S.pointerType===S.MSPOINTER_TYPE_TOUCH&&sl(S),Hi(w,S)}function Gr(w){var S={},D,q;for(q in w)D=w[q],S[q]=D&&D.bind?D.bind(w):D;return w=S,S.type="dblclick",S.detail=2,S.isTrusted=!1,S._simulated=!0,S}var hs=200;function Fs(w,S){w.addEventListener("dblclick",S);var D=0,q;function st(vt){if(vt.detail!==1){q=vt.detail;return}if(!(vt.pointerType==="mouse"||vt.sourceCapabilities&&!vt.sourceCapabilities.firesTouchEvents)){var $t=Bc(vt);if(!($t.some(function(Ye){return Ye instanceof HTMLLabelElement&&Ye.attributes.for})&&!$t.some(function(Ye){return Ye instanceof HTMLInputElement||Ye instanceof HTMLSelectElement}))){var _e=Date.now();_e-D<=hs?(q++,q===2&&S(Gr(vt))):q=1,D=_e}}}return w.addEventListener("click",st),{dblclick:S,simDblclick:st}}function Ms(w,S){w.removeEventListener("dblclick",S.dblclick),w.removeEventListener("click",S.simDblclick)}var bs=u1(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Tc=u1(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),rl=Tc==="webkitTransition"||Tc==="OTransition"?Tc+"End":"transitionend";function Oa(w){return typeof w=="string"?document.getElementById(w):w}function wh(w,S){var D=w.style[S]||w.currentStyle&&w.currentStyle[S];if((!D||D==="auto")&&document.defaultView){var q=document.defaultView.getComputedStyle(w,null);D=q?q[S]:null}return D==="auto"?null:D}function Nr(w,S,D){var q=document.createElement(w);return q.className=S||"",D&&D.appendChild(q),q}function mr(w){var S=w.parentNode;S&&S.removeChild(w)}function a1(w){for(;w.firstChild;)w.removeChild(w.firstChild)}function dc(w){var S=w.parentNode;S&&S.lastChild!==w&&S.appendChild(w)}function vh(w){var S=w.parentNode;S&&S.firstChild!==w&&S.insertBefore(w,S.firstChild)}function _g(w,S){if(w.classList!==void 0)return w.classList.contains(S);var D=ff(w);return D.length>0&&new RegExp("(^|\\s)"+S+"(\\s|$)").test(D)}function ws(w,S){if(w.classList!==void 0)for(var D=U(S),q=0,st=D.length;q0?2*window.devicePixelRatio:1;function SS(w){return Mr.edge?w.wheelDeltaY/2:w.deltaY&&w.deltaMode===0?-w.deltaY/yk:w.deltaY&&w.deltaMode===1?-w.deltaY*20:w.deltaY&&w.deltaMode===2?-w.deltaY*60:w.deltaX||w.deltaZ?0:w.wheelDelta?(w.wheelDeltaY||w.wheelDelta)/2:w.detail&&Math.abs(w.detail)<32765?-w.detail*20:w.detail?w.detail/-32765*60:0}function m3(w,S){var D=S.relatedTarget;if(!D)return!0;try{for(;D&&D!==w;)D=D.parentNode}catch{return!1}return D!==w}var xk={__proto__:null,on:As,off:Vc,stopPropagation:W0,disableScrollPropagation:g3,disableClickPropagation:hv,preventDefault:sl,stop:rc,getPropagationPath:Bc,getMousePosition:ES,getWheelDelta:SS,isExternalTarget:m3,addListener:As,removeListener:Vc},TS=xe.extend({run:function(w,S,D,q){this.stop(),this._el=w,this._inProgress=!0,this._duration=D||.25,this._easeOutPower=1/Math.max(q||.5,.2),this._startPos=yg(w),this._offset=S.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=ot(this._animate,this),this._step()},_step:function(w){var S=+new Date-this._startTime,D=this._duration*1e3;Sthis.options.maxZoom)?this.setZoom(w):this},panInsideBounds:function(w,S){this._enforcingBounds=!0;var D=this.getCenter(),q=this._limitCenter(D,this._zoom,Qn(w));return D.equals(q)||this.panTo(q,S),this._enforcingBounds=!1,this},panInside:function(w,S){S=S||{};var D=Se(S.paddingTopLeft||S.padding||[0,0]),q=Se(S.paddingBottomRight||S.padding||[0,0]),st=this.project(this.getCenter()),vt=this.project(w),$t=this.getPixelBounds(),_e=mn([$t.min.add(D),$t.max.subtract(q)]),Ye=_e.getSize();if(!_e.contains(vt)){this._enforcingBounds=!0;var Un=vt.subtract(_e.getCenter()),Ji=_e.extend(vt).getSize().subtract(Ye);st.x+=Un.x<0?-Ji.x:Ji.x,st.y+=Un.y<0?-Ji.y:Ji.y,this.panTo(this.unproject(st),S),this._enforcingBounds=!1}return this},invalidateSize:function(w){if(!this._loaded)return this;w=h({animate:!1,pan:!0},w===!0?{animate:!0}:w);var S=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var D=this.getSize(),q=S.divideBy(2).round(),st=D.divideBy(2).round(),vt=q.subtract(st);return!vt.x&&!vt.y?this:(w.animate&&w.pan?this.panBy(vt):(w.pan&&this._rawPanBy(vt),this.fire("move"),w.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(m(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:S,newSize:D}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(w){if(w=this._locateOptions=h({timeout:1e4,watch:!1},w),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var S=m(this._handleGeolocationResponse,this),D=m(this._handleGeolocationError,this);return w.watch?this._locationWatchId=navigator.geolocation.watchPosition(S,D,w):navigator.geolocation.getCurrentPosition(S,D,w),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(w){if(this._container._leaflet_id){var S=w.code,D=w.message||(S===1?"permission denied":S===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:S,message:"Geolocation error: "+D+"."})}},_handleGeolocationResponse:function(w){if(this._container._leaflet_id){var S=w.coords.latitude,D=w.coords.longitude,q=new ge(S,D),st=q.toBounds(w.coords.accuracy*2),vt=this._locateOptions;if(vt.setView){var $t=this.getBoundsZoom(st);this.setView(q,vt.maxZoom?Math.min($t,vt.maxZoom):$t)}var _e={latlng:q,bounds:st,timestamp:w.timestamp};for(var Ye in w.coords)typeof w.coords[Ye]=="number"&&(_e[Ye]=w.coords[Ye]);this.fire("locationfound",_e)}},addHandler:function(w,S){if(!S)return this;var D=this[w]=new S(this);return this._handlers.push(D),this.options[w]&&D.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),mr(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(Lt(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var w;for(w in this._layers)this._layers[w].remove();for(w in this._panes)mr(this._panes[w]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(w,S){var D="leaflet-pane"+(w?" leaflet-"+w.replace("Pane","")+"-pane":""),q=Nr("div",D,S||this._mapPane);return w&&(this._panes[w]=q),q},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var w=this.getPixelBounds(),S=this.unproject(w.getBottomLeft()),D=this.unproject(w.getTopRight());return new en(S,D)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(w,S,D){w=Qn(w),D=Se(D||[0,0]);var q=this.getZoom()||0,st=this.getMinZoom(),vt=this.getMaxZoom(),$t=w.getNorthWest(),_e=w.getSouthEast(),Ye=this.getSize().subtract(D),Un=mn(this.project(_e,q),this.project($t,q)).getSize(),Ji=Mr.any3d?this.options.zoomSnap:1,Qr=Ye.x/Un.x,Is=Ye.y/Un.y,ol=S?Math.max(Qr,Is):Math.min(Qr,Is);return q=this.getScaleZoom(ol,q),Ji&&(q=Math.round(q/(Ji/100))*(Ji/100),q=S?Math.ceil(q/Ji)*Ji:Math.floor(q/Ji)*Ji),Math.max(st,Math.min(vt,q))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new re(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(w,S){var D=this._getTopLeftPoint(w,S);return new ke(D,D.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(w){return this.options.crs.getProjectedBounds(w===void 0?this.getZoom():w)},getPane:function(w){return typeof w=="string"?this._panes[w]:w},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(w,S){var D=this.options.crs;return S=S===void 0?this._zoom:S,D.scale(w)/D.scale(S)},getScaleZoom:function(w,S){var D=this.options.crs;S=S===void 0?this._zoom:S;var q=D.zoom(w*D.scale(S));return isNaN(q)?1/0:q},project:function(w,S){return S=S===void 0?this._zoom:S,this.options.crs.latLngToPoint(Pe(w),S)},unproject:function(w,S){return S=S===void 0?this._zoom:S,this.options.crs.pointToLatLng(Se(w),S)},layerPointToLatLng:function(w){var S=Se(w).add(this.getPixelOrigin());return this.unproject(S)},latLngToLayerPoint:function(w){var S=this.project(Pe(w))._round();return S._subtract(this.getPixelOrigin())},wrapLatLng:function(w){return this.options.crs.wrapLatLng(Pe(w))},wrapLatLngBounds:function(w){return this.options.crs.wrapLatLngBounds(Qn(w))},distance:function(w,S){return this.options.crs.distance(Pe(w),Pe(S))},containerPointToLayerPoint:function(w){return Se(w).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(w){return Se(w).add(this._getMapPanePos())},containerPointToLatLng:function(w){var S=this.containerPointToLayerPoint(Se(w));return this.layerPointToLatLng(S)},latLngToContainerPoint:function(w){return this.layerPointToContainerPoint(this.latLngToLayerPoint(Pe(w)))},mouseEventToContainerPoint:function(w){return ES(w,this._container)},mouseEventToLayerPoint:function(w){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(w))},mouseEventToLatLng:function(w){return this.layerPointToLatLng(this.mouseEventToLayerPoint(w))},_initContainer:function(w){var S=this._container=Oa(w);if(S){if(S._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");As(S,"scroll",this._onScroll,this),this._containerId=E(S)},_initLayout:function(){var w=this._container;this._fadeAnimated=this.options.fadeAnimation&&Mr.any3d,ws(w,"leaflet-container"+(Mr.touch?" leaflet-touch":"")+(Mr.retina?" leaflet-retina":"")+(Mr.ielt9?" leaflet-oldie":"")+(Mr.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var S=wh(w,"position");S!=="absolute"&&S!=="relative"&&S!=="fixed"&&S!=="sticky"&&(w.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var w=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ya(this._mapPane,new re(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ws(w.markerPane,"leaflet-zoom-hide"),ws(w.shadowPane,"leaflet-zoom-hide"))},_resetView:function(w,S,D){ya(this._mapPane,new re(0,0));var q=!this._loaded;this._loaded=!0,S=this._limitZoom(S),this.fire("viewprereset");var st=this._zoom!==S;this._moveStart(st,D)._move(w,S)._moveEnd(st),this.fire("viewreset"),q&&this.fire("load")},_moveStart:function(w,S){return w&&this.fire("zoomstart"),S||this.fire("movestart"),this},_move:function(w,S,D,q){S===void 0&&(S=this._zoom);var st=this._zoom!==S;return this._zoom=S,this._lastCenter=w,this._pixelOrigin=this._getNewPixelOrigin(w),q?D&&D.pinch&&this.fire("zoom",D):((st||D&&D.pinch)&&this.fire("zoom",D),this.fire("move",D)),this},_moveEnd:function(w){return w&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return Lt(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(w){ya(this._mapPane,this._getMapPanePos().subtract(w))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(w){this._targets={},this._targets[E(this._container)]=this;var S=w?Vc:As;S(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&S(window,"resize",this._onResize,this),Mr.any3d&&this.options.transform3DLimit&&(w?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){Lt(this._resizeRequest),this._resizeRequest=ot(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var w=this._getMapPanePos();Math.max(Math.abs(w.x),Math.abs(w.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(w,S){for(var D=[],q,st=S==="mouseout"||S==="mouseover",vt=w.target||w.srcElement,$t=!1;vt;){if(q=this._targets[E(vt)],q&&(S==="click"||S==="preclick")&&this._draggableMoved(q)){$t=!0;break}if(q&&q.listens(S,!0)&&(st&&!m3(vt,w)||(D.push(q),st))||vt===this._container)break;vt=vt.parentNode}return!D.length&&!$t&&!st&&this.listens(S,!0)&&(D=[this]),D},_isClickDisabled:function(w){for(;w&&w!==this._container;){if(w._leaflet_disable_click)return!0;w=w.parentNode}},_handleDOMEvent:function(w){var S=w.target||w.srcElement;if(!(!this._loaded||S._leaflet_disable_events||w.type==="click"&&this._isClickDisabled(S))){var D=w.type;D==="mousedown"&&Py(S),this._fireDOMEvent(w,D)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(w,S,D){if(w.type==="click"){var q=h({},w);q.type="preclick",this._fireDOMEvent(q,q.type,D)}var st=this._findEventTargets(w,S);if(D){for(var vt=[],$t=0;$t0?Math.round(w-S)/2:Math.max(0,Math.ceil(w))-Math.max(0,Math.floor(S))},_limitZoom:function(w){var S=this.getMinZoom(),D=this.getMaxZoom(),q=Mr.any3d?this.options.zoomSnap:1;return q&&(w=Math.round(w/q)*q),Math.max(S,Math.min(D,w))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){$c(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(w,S){var D=this._getCenterOffset(w)._trunc();return(S&&S.animate)!==!0&&!this.getSize().contains(D)?!1:(this.panBy(D,S),!0)},_createAnimProxy:function(){var w=this._proxy=Nr("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(w),this.on("zoomanim",function(S){var D=bs,q=this._proxy.style[D];Nd(this._proxy,this.project(S.center,S.zoom),this.getZoomScale(S.zoom,1)),q===this._proxy.style[D]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){mr(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var w=this.getCenter(),S=this.getZoom();Nd(this._proxy,this.project(w,S),this.getZoomScale(S,1))},_catchTransitionEnd:function(w){this._animatingZoom&&w.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(w,S,D){if(this._animatingZoom)return!0;if(D=D||{},!this._zoomAnimated||D.animate===!1||this._nothingToAnimate()||Math.abs(S-this._zoom)>this.options.zoomAnimationThreshold)return!1;var q=this.getZoomScale(S),st=this._getCenterOffset(w)._divideBy(1-1/q);return D.animate!==!0&&!this.getSize().contains(st)?!1:(ot(function(){this._moveStart(!0,D.noMoveStart||!1)._animateZoom(w,S,!0)},this),!0)},_animateZoom:function(w,S,D,q){this._mapPane&&(D&&(this._animatingZoom=!0,this._animateToCenter=w,this._animateToZoom=S,ws(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:w,zoom:S,noUpdate:q}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(m(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&$c(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Mk(w,S){return new Co(w,S)}var Cc=ln.extend({options:{position:"topright"},initialize:function(w){j(this,w)},getPosition:function(){return this.options.position},setPosition:function(w){var S=this._map;return S&&S.removeControl(this),this.options.position=w,S&&S.addControl(this),this},getContainer:function(){return this._container},addTo:function(w){this.remove(),this._map=w;var S=this._container=this.onAdd(w),D=this.getPosition(),q=w._controlCorners[D];return ws(S,"leaflet-control"),D.indexOf("bottom")!==-1?q.insertBefore(S,q.firstChild):q.appendChild(S),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(mr(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(w){this._map&&w&&w.screenX>0&&w.screenY>0&&this._map.getContainer().focus()}}),$0=function(w){return new Cc(w)};Co.include({addControl:function(w){return w.addTo(this),this},removeControl:function(w){return w.remove(),this},_initControlPos:function(){var w=this._controlCorners={},S="leaflet-",D=this._controlContainer=Nr("div",S+"control-container",this._container);function q(st,vt){var $t=S+st+" "+S+vt;w[st+vt]=Nr("div",$t,D)}q("top","left"),q("top","right"),q("bottom","left"),q("bottom","right")},_clearControlPos:function(){for(var w in this._controlCorners)mr(this._controlCorners[w]);mr(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Mg=Cc.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(w,S,D,q){return D1,this._baseLayersList.style.display=w?"":"none"),this._separator.style.display=S&&w?"":"none",this},_onLayerChange:function(w){this._handlingClick||this._update();var S=this._getLayer(E(w.target)),D=S.overlay?w.type==="add"?"overlayadd":"overlayremove":w.type==="add"?"baselayerchange":null;D&&this._map.fire(D,S)},_createRadioElement:function(w,S){var D='",q=document.createElement("div");return q.innerHTML=D,q.firstChild},_addItem:function(w){var S=document.createElement("label"),D=this._map.hasLayer(w.layer),q;w.overlay?(q=document.createElement("input"),q.type="checkbox",q.className="leaflet-control-layers-selector",q.defaultChecked=D):q=this._createRadioElement("leaflet-base-layers_"+E(this),D),this._layerControlInputs.push(q),q.layerId=E(w.layer),As(q,"click",this._onInputClick,this);var st=document.createElement("span");st.innerHTML=" "+w.name;var vt=document.createElement("span");S.appendChild(vt),vt.appendChild(q),vt.appendChild(st);var $t=w.overlay?this._overlaysList:this._baseLayersList;return $t.appendChild(S),this._checkDisabledLayers(),S},_onInputClick:function(){if(!this._preventClick){var w=this._layerControlInputs,S,D,q=[],st=[];this._handlingClick=!0;for(var vt=w.length-1;vt>=0;vt--)S=w[vt],D=this._getLayer(S.layerId).layer,S.checked?q.push(D):S.checked||st.push(D);for(vt=0;vt=0;st--)S=w[st],D=this._getLayer(S.layerId).layer,S.disabled=D.options.minZoom!==void 0&&qD.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var w=this._section;this._preventClick=!0,As(w,"click",sl),this.expand();var S=this;setTimeout(function(){Vc(w,"click",sl),S._preventClick=!1})}}),CS=function(w,S,D){return new Mg(w,S,D)},fv=Cc.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(w){var S="leaflet-control-zoom",D=Nr("div",S+" leaflet-bar"),q=this.options;return this._zoomInButton=this._createButton(q.zoomInText,q.zoomInTitle,S+"-in",D,this._zoomIn),this._zoomOutButton=this._createButton(q.zoomOutText,q.zoomOutTitle,S+"-out",D,this._zoomOut),this._updateDisabled(),w.on("zoomend zoomlevelschange",this._updateDisabled,this),D},onRemove:function(w){w.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(w){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(w.shiftKey?3:1))},_createButton:function(w,S,D,q,st){var vt=Nr("a",D,q);return vt.innerHTML=w,vt.href="#",vt.title=S,vt.setAttribute("role","button"),vt.setAttribute("aria-label",S),hv(vt),As(vt,"click",rc),As(vt,"click",st,this),As(vt,"click",this._refocusOnMap,this),vt},_updateDisabled:function(){var w=this._map,S="leaflet-disabled";$c(this._zoomInButton,S),$c(this._zoomOutButton,S),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||w._zoom===w.getMinZoom())&&(ws(this._zoomOutButton,S),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||w._zoom===w.getMaxZoom())&&(ws(this._zoomInButton,S),this._zoomInButton.setAttribute("aria-disabled","true"))}});Co.mergeOptions({zoomControl:!0}),Co.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new fv,this.addControl(this.zoomControl))});var Xf=function(w){return new fv(w)},b3=Cc.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(w){var S="leaflet-control-scale",D=Nr("div",S),q=this.options;return this._addScales(q,S+"-line",D),w.on(q.updateWhenIdle?"moveend":"move",this._update,this),w.whenReady(this._update,this),D},onRemove:function(w){w.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(w,S,D){w.metric&&(this._mScale=Nr("div",S,D)),w.imperial&&(this._iScale=Nr("div",S,D))},_update:function(){var w=this._map,S=w.getSize().y/2,D=w.distance(w.containerPointToLatLng([0,S]),w.containerPointToLatLng([this.options.maxWidth,S]));this._updateScales(D)},_updateScales:function(w){this.options.metric&&w&&this._updateMetric(w),this.options.imperial&&w&&this._updateImperial(w)},_updateMetric:function(w){var S=this._getRoundNum(w),D=S<1e3?S+" m":S/1e3+" km";this._updateScale(this._mScale,D,S/w)},_updateImperial:function(w){var S=w*3.2808399,D,q,st;S>5280?(D=S/5280,q=this._getRoundNum(D),this._updateScale(this._iScale,q+" mi",q/D)):(st=this._getRoundNum(S),this._updateScale(this._iScale,st+" ft",st/S))},_updateScale:function(w,S,D){w.style.width=Math.round(this.options.maxWidth*D)+"px",w.innerHTML=S},_getRoundNum:function(w){var S=Math.pow(10,(Math.floor(w)+"").length-1),D=w/S;return D=D>=10?10:D>=5?5:D>=3?3:D>=2?2:1,S*D}}),AS=function(w){return new b3(w)},kS='',Iy=Cc.extend({options:{position:"bottomright",prefix:''+(Mr.inlineSvg?kS+" ":"")+"Leaflet"},initialize:function(w){j(this,w),this._attributions={}},onAdd:function(w){w.attributionControl=this,this._container=Nr("div","leaflet-control-attribution"),hv(this._container);for(var S in w._layers)w._layers[S].getAttribution&&this.addAttribution(w._layers[S].getAttribution());return this._update(),w.on("layeradd",this._addAttribution,this),this._container},onRemove:function(w){w.off("layeradd",this._addAttribution,this)},_addAttribution:function(w){w.layer.getAttribution&&(this.addAttribution(w.layer.getAttribution()),w.layer.once("remove",function(){this.removeAttribution(w.layer.getAttribution())},this))},setPrefix:function(w){return this.options.prefix=w,this._update(),this},addAttribution:function(w){return w?(this._attributions[w]||(this._attributions[w]=0),this._attributions[w]++,this._update(),this):this},removeAttribution:function(w){return w?(this._attributions[w]&&(this._attributions[w]--,this._update()),this):this},_update:function(){if(this._map){var w=[];for(var S in this._attributions)this._attributions[S]&&w.push(S);var D=[];this.options.prefix&&D.push(this.options.prefix),w.length&&D.push(w.join(", ")),this._container.innerHTML=D.join(' ')}}});Co.mergeOptions({attributionControl:!0}),Co.addInitHook(function(){this.options.attributionControl&&new Iy().addTo(this)});var LS=function(w){return new Iy(w)};Cc.Layers=Mg,Cc.Zoom=fv,Cc.Scale=b3,Cc.Attribution=Iy,$0.layers=CS,$0.zoom=Xf,$0.scale=AS,$0.attribution=LS;var Od=ln.extend({initialize:function(w){this._map=w},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Od.addTo=function(w,S){return w.addHandler(S,this),this};var df={Events:ne},PS=Mr.touch?"touchstart mousedown":"mousedown",su=xe.extend({options:{clickTolerance:3},initialize:function(w,S,D,q){j(this,q),this._element=w,this._dragStartTarget=S||w,this._preventOutline=D},enable:function(){this._enabled||(As(this._dragStartTarget,PS,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(su._dragging===this&&this.finishDrag(!0),Vc(this._dragStartTarget,PS,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(w){if(this._enabled&&(this._moved=!1,!_g(this._element,"leaflet-zoom-anim"))){if(w.touches&&w.touches.length!==1){su._dragging===this&&this.finishDrag();return}if(!(su._dragging||w.shiftKey||w.which!==1&&w.button!==1&&!w.touches)&&(su._dragging=this,this._preventOutline&&Py(this._element),ky(),H0(),!this._moving)){this.fire("down");var S=w.touches?w.touches[0]:w,D=xS(this._element);this._startPoint=new re(S.clientX,S.clientY),this._startPos=yg(this._element),this._parentScale=f3(D);var q=w.type==="mousedown";As(document,q?"mousemove":"touchmove",this._onMove,this),As(document,q?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(w){if(this._enabled){if(w.touches&&w.touches.length>1){this._moved=!0;return}var S=w.touches&&w.touches.length===1?w.touches[0]:w,D=new re(S.clientX,S.clientY)._subtract(this._startPoint);!D.x&&!D.y||Math.abs(D.x)+Math.abs(D.y)vt&&($t=_e,vt=Ye);vt>D&&(S[$t]=1,_3(w,S,D,q,$t),_3(w,S,D,$t,st))}function y3(w,S){for(var D=[w[0]],q=1,st=0,vt=w.length;qS&&(D.push(w[q]),st=q);return stS.max.x&&(D|=2),w.yS.max.y&&(D|=8),D}function Oy(w,S){var D=S.x-w.x,q=S.y-w.y;return D*D+q*q}function vp(w,S,D,q){var st=S.x,vt=S.y,$t=D.x-st,_e=D.y-vt,Ye=$t*$t+_e*_e,Un;return Ye>0&&(Un=((w.x-st)*$t+(w.y-vt)*_e)/Ye,Un>1?(st=D.x,vt=D.y):Un>0&&(st+=$t*Un,vt+=_e*Un)),$t=w.x-st,_e=w.y-vt,q?$t*$t+_e*_e:new re(st,vt)}function Zf(w){return!X(w[0])||typeof w[0][0]!="object"&&typeof w[0][0]<"u"}function x3(w){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Zf(w)}function M3(w,S){var D,q,st,vt,$t,_e,Ye,Un;if(!w||w.length===0)throw new Error("latlngs not passed");Zf(w)||(console.warn("latlngs are not flat! Only the first ring will be used"),w=w[0]);var Ji=Pe([0,0]),Qr=Qn(w),Is=Qr.getNorthWest().distanceTo(Qr.getSouthWest())*Qr.getNorthEast().distanceTo(Qr.getNorthWest());Is<1700&&(Ji=wp(w));var ol=w.length,xa=[];for(D=0;Dq){Ye=(vt-q)/st,Un=[_e.x-Ye*(_e.x-$t.x),_e.y-Ye*(_e.y-$t.y)];break}var zu=S.unproject(Se(Un));return Pe([zu.lat+Ji.lat,zu.lng+Ji.lng])}var E3={__proto__:null,simplify:Dy,pointToSegmentDistance:ea,closestPointOnSegment:Eg,clipSegment:DS,_getEdgeIntersection:Ny,_getBitCode:Sg,_sqClosestPointOnSegment:vp,isFlat:Zf,_flat:x3,polylineCenter:M3},dv={project:function(w){return new re(w.lng,w.lat)},unproject:function(w){return new ge(w.y,w.x)},bounds:new ke([-180,-90],[180,90])},By={R:6378137,R_MINOR:6356752314245179e-9,bounds:new ke([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(w){var S=Math.PI/180,D=this.R,q=w.lat*S,st=this.R_MINOR/D,vt=Math.sqrt(1-st*st),$t=vt*Math.sin(q),_e=Math.tan(Math.PI/4-q/2)/Math.pow((1-$t)/(1+$t),vt/2);return q=-D*Math.log(Math.max(_e,1e-10)),new re(w.lng*S*D,q)},unproject:function(w){for(var S=180/Math.PI,D=this.R,q=this.R_MINOR/D,st=Math.sqrt(1-q*q),vt=Math.exp(-w.y/D),$t=Math.PI/2-2*Math.atan(vt),_e=0,Ye=.1,Un;_e<15&&Math.abs(Ye)>1e-7;_e++)Un=st*Math.sin($t),Un=Math.pow((1-Un)/(1+Un),st/2),Ye=Math.PI/2-2*Math.atan(vt*Un)-$t,$t+=Ye;return new ge($t*S,w.x*S/D)}},Ek={__proto__:null,LonLat:dv,Mercator:By,SphericalMercator:lr},S3=h({},Yi,{code:"EPSG:3395",projection:By,transformation:function(){var w=.5/(Math.PI*By.R);return Kt(w,.5,-w,.5)}()}),Fy=h({},Yi,{code:"EPSG:4326",projection:dv,transformation:Kt(1/180,1,-1/180,.5)}),Sk=h({},ti,{projection:dv,transformation:Kt(1,0,-1,0),scale:function(w){return Math.pow(2,w)},zoom:function(w){return Math.log(w)/Math.LN2},distance:function(w,S){var D=S.lng-w.lng,q=S.lat-w.lat;return Math.sqrt(D*D+q*q)},infinite:!0});ti.Earth=Yi,ti.EPSG3395=S3,ti.EPSG3857=wn,ti.EPSG900913=it,ti.EPSG4326=Fy,ti.Simple=Sk;var Yf=xe.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(w){return w.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(w){return w&&w.removeLayer(this),this},getPane:function(w){return this._map.getPane(w?this.options[w]||w:this.options.pane)},addInteractiveTarget:function(w){return this._map._targets[E(w)]=this,this},removeInteractiveTarget:function(w){return delete this._map._targets[E(w)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(w){var S=w.target;if(S.hasLayer(this)){if(this._map=S,this._zoomAnimated=S._zoomAnimated,this.getEvents){var D=this.getEvents();S.on(D,this),this.once("remove",function(){S.off(D,this)},this)}this.onAdd(S),this.fire("add"),S.fire("layeradd",{layer:this})}}});Co.include({addLayer:function(w){if(!w._layerAdd)throw new Error("The provided object is not a Layer.");var S=E(w);return this._layers[S]?this:(this._layers[S]=w,w._mapToAdd=this,w.beforeAdd&&w.beforeAdd(this),this.whenReady(w._layerAdd,w),this)},removeLayer:function(w){var S=E(w);return this._layers[S]?(this._loaded&&w.onRemove(this),delete this._layers[S],this._loaded&&(this.fire("layerremove",{layer:w}),w.fire("remove")),w._map=w._mapToAdd=null,this):this},hasLayer:function(w){return E(w)in this._layers},eachLayer:function(w,S){for(var D in this._layers)w.call(S,this._layers[D]);return this},_addLayers:function(w){w=w?X(w)?w:[w]:[];for(var S=0,D=w.length;Sthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&S[0]instanceof ge&&S[0].equals(S[D-1])&&S.pop(),S},_setLatLngs:function(w){Fl.prototype._setLatLngs.call(this,w),Zf(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Zf(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var w=this._renderer._bounds,S=this.options.weight,D=new re(S,S);if(w=new ke(w.min.subtract(D),w.max.add(D)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(w))){if(this.options.noClip){this._parts=this._rings;return}for(var q=0,st=this._rings.length,vt;qw.y!=st.y>w.y&&w.x<(st.x-q.x)*(w.y-q.y)/(st.y-q.y)+q.x&&(S=!S);return S||Fl.prototype._containsPoint.call(this,w,!0)}});function kk(w,S){return new _b(w,S)}var l1=pf.extend({initialize:function(w,S){j(this,S),this._layers={},w&&this.addData(w)},addData:function(w){var S=X(w)?w:w.features,D,q,st;if(S){for(D=0,q=S.length;D0&&st.push(st[0].slice()),st}function yb(w,S){return w.feature?h({},w.feature,{geometry:S}):$y(S)}function $y(w){return w.type==="Feature"||w.type==="FeatureCollection"?w:{type:"Feature",properties:{},geometry:w}}var Bd={toGeoJSON:function(w){return yb(this,{type:"Point",coordinates:C3(this.getLatLng(),w)})}};Uy.include(Bd),gv.include(Bd),zy.include(Bd),Fl.include({toGeoJSON:function(w){var S=!Zf(this._latlngs),D=Wy(this._latlngs,S?1:0,!1,w);return yb(this,{type:(S?"Multi":"")+"LineString",coordinates:D})}}),_b.include({toGeoJSON:function(w){var S=!Zf(this._latlngs),D=S&&!Zf(this._latlngs[0]),q=Wy(this._latlngs,D?2:S?1:0,!0,w);return S||(q=[q]),yb(this,{type:(D?"Multi":"")+"Polygon",coordinates:q})}}),Uu.include({toMultiPoint:function(w){var S=[];return this.eachLayer(function(D){S.push(D.toGeoJSON(w).geometry.coordinates)}),yb(this,{type:"MultiPoint",coordinates:S})},toGeoJSON:function(w){var S=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(S==="MultiPoint")return this.toMultiPoint(w);var D=S==="GeometryCollection",q=[];return this.eachLayer(function(st){if(st.toGeoJSON){var vt=st.toGeoJSON(w);if(D)q.push(vt.geometry);else{var $t=$y(vt);$t.type==="FeatureCollection"?q.push.apply(q,$t.features):q.push($t)}}}),D?yb(this,{geometries:q,type:"GeometryCollection"}):{type:"FeatureCollection",features:q}}});function oe(w,S){return new l1(w,S)}var _n=oe,$e=Yf.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(w,S,D){this._url=w,this._bounds=Qn(S),j(this,D)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ws(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){mr(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(w){return this.options.opacity=w,this._image&&this._updateOpacity(),this},setStyle:function(w){return w.opacity&&this.setOpacity(w.opacity),this},bringToFront:function(){return this._map&&dc(this._image),this},bringToBack:function(){return this._map&&vh(this._image),this},setUrl:function(w){return this._url=w,this._image&&(this._image.src=w),this},setBounds:function(w){return this._bounds=Qn(w),this._map&&this._reset(),this},getEvents:function(){var w={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(w.zoomanim=this._animateZoom),w},setZIndex:function(w){return this.options.zIndex=w,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var w=this._url.tagName==="IMG",S=this._image=w?this._url:Nr("img");if(ws(S,"leaflet-image-layer"),this._zoomAnimated&&ws(S,"leaflet-zoom-animated"),this.options.className&&ws(S,this.options.className),S.onselectstart=N,S.onmousemove=N,S.onload=m(this.fire,this,"load"),S.onerror=m(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(S.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),w){this._url=S.src;return}S.src=this._url,S.alt=this.options.alt},_animateZoom:function(w){var S=this._map.getZoomScale(w.zoom),D=this._map._latLngBoundsToNewLayerBounds(this._bounds,w.zoom,w.center).min;Nd(this._image,D,S)},_reset:function(){var w=this._image,S=new ke(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),D=S.getSize();ya(w,S.min),w.style.width=D.x+"px",w.style.height=D.y+"px"},_updateOpacity:function(){Bl(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var w=this.options.errorOverlayUrl;w&&this._url!==w&&(this._url=w,this._image.src=w)},getCenter:function(){return this._bounds.getCenter()}}),er=function(w,S,D){return new $e(w,S,D)},vs=$e.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var w=this._url.tagName==="VIDEO",S=this._image=w?this._url:Nr("video");if(ws(S,"leaflet-image-layer"),this._zoomAnimated&&ws(S,"leaflet-zoom-animated"),this.options.className&&ws(S,this.options.className),S.onselectstart=N,S.onmousemove=N,S.onloadeddata=m(this.fire,this,"load"),w){for(var D=S.getElementsByTagName("source"),q=[],st=0;st0?q:[S.src];return}X(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(S.style,"objectFit")&&(S.style.objectFit="fill"),S.autoplay=!!this.options.autoplay,S.loop=!!this.options.loop,S.muted=!!this.options.muted,S.playsInline=!!this.options.playsInline;for(var vt=0;vtst?(S.height=st+"px",ws(w,vt)):$c(w,vt),this._containerWidth=this._container.offsetWidth},_animateZoom:function(w){var S=this._map._latLngToNewLayerPoint(this._latlng,w.zoom,w.center),D=this._getAnchor();ya(this._container,S.add(D))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var w=this._map,S=parseInt(wh(this._container,"marginBottom"),10)||0,D=this._container.offsetHeight+S,q=this._containerWidth,st=new re(this._containerLeft,-D-this._containerBottom);st._add(yg(this._container));var vt=w.layerPointToContainerPoint(st),$t=Se(this.options.autoPanPadding),_e=Se(this.options.autoPanPaddingTopLeft||$t),Ye=Se(this.options.autoPanPaddingBottomRight||$t),Un=w.getSize(),Ji=0,Qr=0;vt.x+q+Ye.x>Un.x&&(Ji=vt.x+q-Un.x+Ye.x),vt.x-Ji-_e.x<0&&(Ji=vt.x-_e.x),vt.y+D+Ye.y>Un.y&&(Qr=vt.y+D-Un.y+Ye.y),vt.y-Qr-_e.y<0&&(Qr=vt.y-_e.y),(Ji||Qr)&&(this.options.keepInView&&(this._autopanning=!0),w.fire("autopanstart").panBy([Ji,Qr]))}},_getAnchor:function(){return Se(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Jf=function(w,S){return new Vy(w,S)};Co.mergeOptions({closePopupOnClick:!0}),Co.include({openPopup:function(w,S,D){return this._initOverlay(Vy,w,S,D).openOn(this),this},closePopup:function(w){return w=arguments.length?w:this._popup,w&&w.close(),this}}),Yf.include({bindPopup:function(w,S){return this._popup=this._initOverlay(Vy,this._popup,w,S),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(w){return this._popup&&(this instanceof pf||(this._popup._source=this),this._popup._prepareOpen(w||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(w){return this._popup&&this._popup.setContent(w),this},getPopup:function(){return this._popup},_openPopup:function(w){if(!(!this._popup||!this._map)){rc(w);var S=w.layer||w.target;if(this._popup._source===S&&!(S instanceof gf)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(w.latlng);return}this._popup._source=S,this.openPopup(w.latlng)}},_movePopup:function(w){this._popup.setLatLng(w.latlng)},_onKeyPress:function(w){w.originalEvent.keyCode===13&&this._openPopup(w)}});var q0=mf.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(w){mf.prototype.onAdd.call(this,w),this.setOpacity(this.options.opacity),w.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(w){mf.prototype.onRemove.call(this,w),w.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var w=mf.prototype.getEvents.call(this);return this.options.permanent||(w.preclick=this.close),w},_initLayout:function(){var w="leaflet-tooltip",S=w+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Nr("div",S),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+E(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(w){var S,D,q=this._map,st=this._container,vt=q.latLngToContainerPoint(q.getCenter()),$t=q.layerPointToContainerPoint(w),_e=this.options.direction,Ye=st.offsetWidth,Un=st.offsetHeight,Ji=Se(this.options.offset),Qr=this._getAnchor();_e==="top"?(S=Ye/2,D=Un):_e==="bottom"?(S=Ye/2,D=0):_e==="center"?(S=Ye/2,D=Un/2):_e==="right"?(S=0,D=Un/2):_e==="left"?(S=Ye,D=Un/2):$t.xthis.options.maxZoom||Dq?this._retainParent(st,vt,$t,q):!1)},_retainChildren:function(w,S,D,q){for(var st=2*w;st<2*w+2;st++)for(var vt=2*S;vt<2*S+2;vt++){var $t=new re(st,vt);$t.z=D+1;var _e=this._tileCoordsToKey($t),Ye=this._tiles[_e];if(Ye&&Ye.active){Ye.retain=!0;continue}else Ye&&Ye.loaded&&(Ye.retain=!0);D+1this.options.maxZoom||this.options.minZoom!==void 0&&st1){this._setView(w,D);return}for(var Qr=st.min.y;Qr<=st.max.y;Qr++)for(var Is=st.min.x;Is<=st.max.x;Is++){var ol=new re(Is,Qr);if(ol.z=this._tileZoom,!!this._isValidTile(ol)){var xa=this._tiles[this._tileCoordsToKey(ol)];xa?xa.current=!0:$t.push(ol)}}if($t.sort(function(zu,d1){return zu.distanceTo(vt)-d1.distanceTo(vt)}),$t.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Ul=document.createDocumentFragment();for(Is=0;Is<$t.length;Is++)this._addTile($t[Is],Ul);this._level.el.appendChild(Ul)}}}},_isValidTile:function(w){var S=this._map.options.crs;if(!S.infinite){var D=this._globalTileRange;if(!S.wrapLng&&(w.xD.max.x)||!S.wrapLat&&(w.yD.max.y))return!1}if(!this.options.bounds)return!0;var q=this._tileCoordsToBounds(w);return Qn(this.options.bounds).overlaps(q)},_keyToBounds:function(w){return this._tileCoordsToBounds(this._keyToTileCoords(w))},_tileCoordsToNwSe:function(w){var S=this._map,D=this.getTileSize(),q=w.scaleBy(D),st=q.add(D),vt=S.unproject(q,w.z),$t=S.unproject(st,w.z);return[vt,$t]},_tileCoordsToBounds:function(w){var S=this._tileCoordsToNwSe(w),D=new en(S[0],S[1]);return this.options.noWrap||(D=this._map.wrapLatLngBounds(D)),D},_tileCoordsToKey:function(w){return w.x+":"+w.y+":"+w.z},_keyToTileCoords:function(w){var S=w.split(":"),D=new re(+S[0],+S[1]);return D.z=+S[2],D},_removeTile:function(w){var S=this._tiles[w];S&&(mr(S.el),delete this._tiles[w],this.fire("tileunload",{tile:S.el,coords:this._keyToTileCoords(w)}))},_initTile:function(w){ws(w,"leaflet-tile");var S=this.getTileSize();w.style.width=S.x+"px",w.style.height=S.y+"px",w.onselectstart=N,w.onmousemove=N,Mr.ielt9&&this.options.opacity<1&&Bl(w,this.options.opacity)},_addTile:function(w,S){var D=this._getTilePos(w),q=this._tileCoordsToKey(w),st=this.createTile(this._wrapCoords(w),m(this._tileReady,this,w));this._initTile(st),this.createTile.length<2&&ot(m(this._tileReady,this,w,null,st)),ya(st,D),this._tiles[q]={el:st,coords:w,current:!0},S.appendChild(st),this.fire("tileloadstart",{tile:st,coords:w})},_tileReady:function(w,S,D){S&&this.fire("tileerror",{error:S,tile:D,coords:w});var q=this._tileCoordsToKey(w);D=this._tiles[q],D&&(D.loaded=+new Date,this._map._fadeAnimated?(Bl(D.el,0),Lt(this._fadeFrame),this._fadeFrame=ot(this._updateOpacity,this)):(D.active=!0,this._pruneTiles()),S||(ws(D.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:D.el,coords:w})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Mr.ielt9||!this._map._fadeAnimated?ot(this._pruneTiles,this):setTimeout(m(this._pruneTiles,this),250)))},_getTilePos:function(w){return w.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(w){var S=new re(this._wrapX?I(w.x,this._wrapX):w.x,this._wrapY?I(w.y,this._wrapY):w.y);return S.z=w.z,S},_pxBoundsToTileRange:function(w){var S=this.getTileSize();return new ke(w.min.unscaleBy(S).floor(),w.max.unscaleBy(S).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var w in this._tiles)if(!this._tiles[w].loaded)return!1;return!0}});function pc(w){return new Tg(w)}var xb=Tg.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(w,S){this._url=w,S=j(this,S),S.detectRetina&&Mr.retina&&S.maxZoom>0?(S.tileSize=Math.floor(S.tileSize/2),S.zoomReverse?(S.zoomOffset--,S.minZoom=Math.min(S.maxZoom,S.minZoom+1)):(S.zoomOffset++,S.maxZoom=Math.max(S.minZoom,S.maxZoom-1)),S.minZoom=Math.max(0,S.minZoom)):S.zoomReverse?S.minZoom=Math.min(S.maxZoom,S.minZoom):S.maxZoom=Math.max(S.minZoom,S.maxZoom),typeof S.subdomains=="string"&&(S.subdomains=S.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(w,S){return this._url===w&&S===void 0&&(S=!0),this._url=w,S||this.redraw(),this},createTile:function(w,S){var D=document.createElement("img");return As(D,"load",m(this._tileOnLoad,this,S,D)),As(D,"error",m(this._tileOnError,this,S,D)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(D.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(D.referrerPolicy=this.options.referrerPolicy),D.alt="",D.src=this.getTileUrl(w),D},getTileUrl:function(w){var S={r:Mr.retina?"@2x":"",s:this._getSubdomain(w),x:w.x,y:w.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var D=this._globalTileRange.max.y-w.y;this.options.tms&&(S.y=D),S["-y"]=D}return Q(this._url,h(S,this.options))},_tileOnLoad:function(w,S){Mr.ielt9?setTimeout(m(w,this,null,S),0):w(null,S)},_tileOnError:function(w,S,D){var q=this.options.errorTileUrl;q&&S.getAttribute("src")!==q&&(S.src=q),w(D,S)},_onTileRemove:function(w){w.tile.onload=null},_getZoomForUrl:function(){var w=this._tileZoom,S=this.options.maxZoom,D=this.options.zoomReverse,q=this.options.zoomOffset;return D&&(w=S-w),w+q},_getSubdomain:function(w){var S=Math.abs(w.x+w.y)%this.options.subdomains.length;return this.options.subdomains[S]},_abortLoading:function(){var w,S;for(w in this._tiles)if(this._tiles[w].coords.z!==this._tileZoom&&(S=this._tiles[w].el,S.onload=N,S.onerror=N,!S.complete)){S.src=ft;var D=this._tiles[w].coords;mr(S),delete this._tiles[w],this.fire("tileabort",{tile:S,coords:D})}},_removeTile:function(w){var S=this._tiles[w];if(S)return S.el.setAttribute("src",ft),Tg.prototype._removeTile.call(this,w)},_tileReady:function(w,S,D){if(!(!this._map||D&&D.getAttribute("src")===ft))return Tg.prototype._tileReady.call(this,w,S,D)}});function A3(w,S){return new xb(w,S)}var mv=xb.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(w,S){this._url=w;var D=h({},this.defaultWmsParams);for(var q in S)q in this.options||(D[q]=S[q]);S=j(this,S);var st=S.detectRetina&&Mr.retina?2:1,vt=this.getTileSize();D.width=vt.x*st,D.height=vt.y*st,this.wmsParams=D},onAdd:function(w){this._crs=this.options.crs||w.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var S=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[S]=this._crs.code,xb.prototype.onAdd.call(this,w)},getTileUrl:function(w){var S=this._tileCoordsToNwSe(w),D=this._crs,q=mn(D.project(S[0]),D.project(S[1])),st=q.min,vt=q.max,$t=(this._wmsVersion>=1.3&&this._crs===Fy?[st.y,st.x,vt.y,vt.x]:[st.x,st.y,vt.x,vt.y]).join(","),_e=xb.prototype.getTileUrl.call(this,w);return _e+V(this.wmsParams,_e,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+$t},setParams:function(w,S){return h(this.wmsParams,w),S||this.redraw(),this}});function Pk(w,S){return new mv(w,S)}xb.WMS=mv,A3.wms=Pk;var f1=Yf.extend({options:{padding:.1},initialize:function(w){j(this,w),E(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),ws(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var w={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(w.zoomanim=this._onAnimZoom),w},_onAnimZoom:function(w){this._updateTransform(w.center,w.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(w,S){var D=this._map.getZoomScale(S,this._zoom),q=this._map.getSize().multiplyBy(.5+this.options.padding),st=this._map.project(this._center,S),vt=q.multiplyBy(-D).add(st).subtract(this._map._getNewPixelOrigin(w,S));Mr.any3d?Nd(this._container,vt,D):ya(this._container,vt)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var w in this._layers)this._layers[w]._reset()},_onZoomEnd:function(){for(var w in this._layers)this._layers[w]._project()},_updatePaths:function(){for(var w in this._layers)this._layers[w]._update()},_update:function(){var w=this.options.padding,S=this._map.getSize(),D=this._map.containerPointToLayerPoint(S.multiplyBy(-w)).round();this._bounds=new ke(D,D.add(S.multiplyBy(1+w*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),FS=f1.extend({options:{tolerance:0},getEvents:function(){var w=f1.prototype.getEvents.call(this);return w.viewprereset=this._onViewPreReset,w},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){f1.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var w=this._container=document.createElement("canvas");As(w,"mousemove",this._onMouseMove,this),As(w,"click dblclick mousedown mouseup contextmenu",this._onClick,this),As(w,"mouseout",this._handleMouseOut,this),w._leaflet_disable_events=!0,this._ctx=w.getContext("2d")},_destroyContainer:function(){Lt(this._redrawRequest),delete this._ctx,mr(this._container),Vc(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var w;this._redrawBounds=null;for(var S in this._layers)w=this._layers[S],w._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){f1.prototype._update.call(this);var w=this._bounds,S=this._container,D=w.getSize(),q=Mr.retina?2:1;ya(S,w.min),S.width=q*D.x,S.height=q*D.y,S.style.width=D.x+"px",S.style.height=D.y+"px",Mr.retina&&this._ctx.scale(2,2),this._ctx.translate(-w.min.x,-w.min.y),this.fire("update")}},_reset:function(){f1.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(w){this._updateDashArray(w),this._layers[E(w)]=w;var S=w._order={layer:w,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=S),this._drawLast=S,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(w){this._requestRedraw(w)},_removePath:function(w){var S=w._order,D=S.next,q=S.prev;D?D.prev=q:this._drawLast=q,q?q.next=D:this._drawFirst=D,delete w._order,delete this._layers[E(w)],this._requestRedraw(w)},_updatePath:function(w){this._extendRedrawBounds(w),w._project(),w._update(),this._requestRedraw(w)},_updateStyle:function(w){this._updateDashArray(w),this._requestRedraw(w)},_updateDashArray:function(w){if(typeof w.options.dashArray=="string"){var S=w.options.dashArray.split(/[, ]+/),D=[],q,st;for(st=0;st')}}catch{}return function(w){return document.createElement("<"+w+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Xy={_initContainer:function(){this._container=Nr("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(f1.prototype._update.call(this),this.fire("update"))},_initPath:function(w){var S=w._container=Qf("shape");ws(S,"leaflet-vml-shape "+(this.options.className||"")),S.coordsize="1 1",w._path=Qf("path"),S.appendChild(w._path),this._updateStyle(w),this._layers[E(w)]=w},_addPath:function(w){var S=w._container;this._container.appendChild(S),w.options.interactive&&w.addInteractiveTarget(S)},_removePath:function(w){var S=w._container;mr(S),w.removeInteractiveTarget(S),delete this._layers[E(w)]},_updateStyle:function(w){var S=w._stroke,D=w._fill,q=w.options,st=w._container;st.stroked=!!q.stroke,st.filled=!!q.fill,q.stroke?(S||(S=w._stroke=Qf("stroke")),st.appendChild(S),S.weight=q.weight+"px",S.color=q.color,S.opacity=q.opacity,q.dashArray?S.dashStyle=X(q.dashArray)?q.dashArray.join(" "):q.dashArray.replace(/( *, *)/g," "):S.dashStyle="",S.endcap=q.lineCap.replace("butt","flat"),S.joinstyle=q.lineJoin):S&&(st.removeChild(S),w._stroke=null),q.fill?(D||(D=w._fill=Qf("fill")),st.appendChild(D),D.color=q.fillColor||q.color,D.opacity=q.fillOpacity):D&&(st.removeChild(D),w._fill=null)},_updateCircle:function(w){var S=w._point.round(),D=Math.round(w._radius),q=Math.round(w._radiusY||D);this._setPath(w,w._empty()?"M0 0":"AL "+S.x+","+S.y+" "+D+","+q+" 0,"+65535*360)},_setPath:function(w,S){w._path.v=S},_bringToFront:function(w){dc(w._container)},_bringToBack:function(w){vh(w._container)}},wv=Mr.vml?Qf:ut,Cg=f1.extend({_initContainer:function(){this._container=wv("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=wv("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){mr(this._container),Vc(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){f1.prototype._update.call(this);var w=this._bounds,S=w.getSize(),D=this._container;(!this._svgSize||!this._svgSize.equals(S))&&(this._svgSize=S,D.setAttribute("width",S.x),D.setAttribute("height",S.y)),ya(D,w.min),D.setAttribute("viewBox",[w.min.x,w.min.y,S.x,S.y].join(" ")),this.fire("update")}},_initPath:function(w){var S=w._path=wv("path");w.options.className&&ws(S,w.options.className),w.options.interactive&&ws(S,"leaflet-interactive"),this._updateStyle(w),this._layers[E(w)]=w},_addPath:function(w){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(w._path),w.addInteractiveTarget(w._path)},_removePath:function(w){mr(w._path),w.removeInteractiveTarget(w._path),delete this._layers[E(w)]},_updatePath:function(w){w._project(),w._update()},_updateStyle:function(w){var S=w._path,D=w.options;S&&(D.stroke?(S.setAttribute("stroke",D.color),S.setAttribute("stroke-opacity",D.opacity),S.setAttribute("stroke-width",D.weight),S.setAttribute("stroke-linecap",D.lineCap),S.setAttribute("stroke-linejoin",D.lineJoin),D.dashArray?S.setAttribute("stroke-dasharray",D.dashArray):S.removeAttribute("stroke-dasharray"),D.dashOffset?S.setAttribute("stroke-dashoffset",D.dashOffset):S.removeAttribute("stroke-dashoffset")):S.setAttribute("stroke","none"),D.fill?(S.setAttribute("fill",D.fillColor||D.color),S.setAttribute("fill-opacity",D.fillOpacity),S.setAttribute("fill-rule",D.fillRule||"evenodd")):S.setAttribute("fill","none"))},_updatePoly:function(w,S){this._setPath(w,kt(w._parts,S))},_updateCircle:function(w){var S=w._point,D=Math.max(Math.round(w._radius),1),q=Math.max(Math.round(w._radiusY),1)||D,st="a"+D+","+q+" 0 1,0 ",vt=w._empty()?"M0 0":"M"+(S.x-D)+","+S.y+st+D*2+",0 "+st+-D*2+",0 ";this._setPath(w,vt)},_setPath:function(w,S){w._path.setAttribute("d",S)},_bringToFront:function(w){dc(w._path)},_bringToBack:function(w){vh(w._path)}});Mr.vml&&Cg.include(Xy);function k3(w){return Mr.svg||Mr.vml?new Cg(w):null}Co.include({getRenderer:function(w){var S=w.options.renderer||this._getPaneRenderer(w.options.pane)||this.options.renderer||this._renderer;return S||(S=this._renderer=this._createRenderer()),this.hasLayer(S)||this.addLayer(S),S},_getPaneRenderer:function(w){if(w==="overlayPane"||w===void 0)return!1;var S=this._paneRenderers[w];return S===void 0&&(S=this._createRenderer({pane:w}),this._paneRenderers[w]=S),S},_createRenderer:function(w){return this.options.preferCanvas&&bv(w)||k3(w)}});var L3=_b.extend({initialize:function(w,S){_b.prototype.initialize.call(this,this._boundsToLatLngs(w),S)},setBounds:function(w){return this.setLatLngs(this._boundsToLatLngs(w))},_boundsToLatLngs:function(w){return w=Qn(w),[w.getSouthWest(),w.getNorthWest(),w.getNorthEast(),w.getSouthEast()]}});function Zy(w,S){return new L3(w,S)}Cg.create=wv,Cg.pointsToPath=kt,l1.geometryToLayer=h1,l1.coordsToLatLng=Hy,l1.coordsToLatLngs=Gy,l1.latLngToCoords=C3,l1.latLngsToCoords=Wy,l1.getFeature=yb,l1.asFeature=$y,Co.mergeOptions({boxZoom:!0});var P3=Od.extend({initialize:function(w){this._map=w,this._container=w._container,this._pane=w._panes.overlayPane,this._resetStateTimeout=0,w.on("unload",this._destroy,this)},addHooks:function(){As(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Vc(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){mr(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(w){if(!w.shiftKey||w.which!==1&&w.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),H0(),ky(),this._startPoint=this._map.mouseEventToContainerPoint(w),As(document,{contextmenu:rc,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(w){this._moved||(this._moved=!0,this._box=Nr("div","leaflet-zoom-box",this._container),ws(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(w);var S=new ke(this._point,this._startPoint),D=S.getSize();ya(this._box,S.min),this._box.style.width=D.x+"px",this._box.style.height=D.y+"px"},_finish:function(){this._moved&&(mr(this._box),$c(this._container,"leaflet-crosshair")),G0(),h3(),Vc(document,{contextmenu:rc,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(w){if(!(w.which!==1&&w.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(m(this._resetState,this),0);var S=new en(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(S).fire("boxzoomend",{boxZoomBounds:S})}},_onKeyDown:function(w){w.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Co.addInitHook("addHandler","boxZoom",P3),Co.mergeOptions({doubleClickZoom:!0});var Mb=Od.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(w){var S=this._map,D=S.getZoom(),q=S.options.zoomDelta,st=w.originalEvent.shiftKey?D-q:D+q;S.options.doubleClickZoom==="center"?S.setZoom(st):S.setZoomAround(w.containerPoint,st)}});Co.addInitHook("addHandler","doubleClickZoom",Mb),Co.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Ag=Od.extend({addHooks:function(){if(!this._draggable){var w=this._map;this._draggable=new su(w._mapPane,w._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),w.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),w.on("zoomend",this._onZoomEnd,this),w.whenReady(this._onZoomEnd,this))}ws(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){$c(this._map._container,"leaflet-grab"),$c(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var w=this._map;if(w._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var S=Qn(this._map.options.maxBounds);this._offsetLimit=mn(this._map.latLngToContainerPoint(S.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(S.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;w.fire("movestart").fire("dragstart"),w.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(w){if(this._map.options.inertia){var S=this._lastTime=+new Date,D=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(D),this._times.push(S),this._prunePositions(S)}this._map.fire("move",w).fire("drag",w)},_prunePositions:function(w){for(;this._positions.length>1&&w-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var w=this._map.getSize().divideBy(2),S=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=S.subtract(w).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(w,S){return w-(w-S)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var w=this._draggable._newPos.subtract(this._draggable._startPos),S=this._offsetLimit;w.xS.max.x&&(w.x=this._viscousLimit(w.x,S.max.x)),w.y>S.max.y&&(w.y=this._viscousLimit(w.y,S.max.y)),this._draggable._newPos=this._draggable._startPos.add(w)}},_onPreDragWrap:function(){var w=this._worldWidth,S=Math.round(w/2),D=this._initialWorldOffset,q=this._draggable._newPos.x,st=(q-S+D)%w+S-D,vt=(q+S+D)%w-S-D,$t=Math.abs(st+D)0?vt:-vt))-S;this._delta=0,this._startTime=null,$t&&(w.options.scrollWheelZoom==="center"?w.setZoom(S+$t):w.setZoomAround(this._lastMousePos,S+$t))}});Co.addInitHook("addHandler","scrollWheelZoom",US);var Ik=600;Co.mergeOptions({tapHold:Mr.touchNative&&Mr.safari&&Mr.mobile,tapTolerance:15});var zS=Od.extend({addHooks:function(){As(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Vc(this._map._container,"touchstart",this._onDown,this)},_onDown:function(w){if(clearTimeout(this._holdTimeout),w.touches.length===1){var S=w.touches[0];this._startPos=this._newPos=new re(S.clientX,S.clientY),this._holdTimeout=setTimeout(m(function(){this._cancel(),this._isTapValid()&&(As(document,"touchend",sl),As(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",S))},this),Ik),As(document,"touchend touchcancel contextmenu",this._cancel,this),As(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function w(){Vc(document,"touchend",sl),Vc(document,"touchend touchcancel",w)},_cancel:function(){clearTimeout(this._holdTimeout),Vc(document,"touchend touchcancel contextmenu",this._cancel,this),Vc(document,"touchmove",this._onMove,this)},_onMove:function(w){var S=w.touches[0];this._newPos=new re(S.clientX,S.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(w,S){var D=new MouseEvent(w,{bubbles:!0,cancelable:!0,view:window,screenX:S.screenX,screenY:S.screenY,clientX:S.clientX,clientY:S.clientY});D._simulated=!0,S.target.dispatchEvent(D)}});Co.addInitHook("addHandler","tapHold",zS),Co.mergeOptions({touchZoom:Mr.touch,bounceAtZoomLimits:!0});var _v=Od.extend({addHooks:function(){ws(this._map._container,"leaflet-touch-zoom"),As(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){$c(this._map._container,"leaflet-touch-zoom"),Vc(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(w){var S=this._map;if(!(!w.touches||w.touches.length!==2||S._animatingZoom||this._zooming)){var D=S.mouseEventToContainerPoint(w.touches[0]),q=S.mouseEventToContainerPoint(w.touches[1]);this._centerPoint=S.getSize()._divideBy(2),this._startLatLng=S.containerPointToLatLng(this._centerPoint),S.options.touchZoom!=="center"&&(this._pinchStartLatLng=S.containerPointToLatLng(D.add(q)._divideBy(2))),this._startDist=D.distanceTo(q),this._startZoom=S.getZoom(),this._moved=!1,this._zooming=!0,S._stop(),As(document,"touchmove",this._onTouchMove,this),As(document,"touchend touchcancel",this._onTouchEnd,this),sl(w)}},_onTouchMove:function(w){if(!(!w.touches||w.touches.length!==2||!this._zooming)){var S=this._map,D=S.mouseEventToContainerPoint(w.touches[0]),q=S.mouseEventToContainerPoint(w.touches[1]),st=D.distanceTo(q)/this._startDist;if(this._zoom=S.getScaleZoom(st,this._startZoom),!S.options.bounceAtZoomLimits&&(this._zoomS.getMaxZoom()&&st>1)&&(this._zoom=S._limitZoom(this._zoom)),S.options.touchZoom==="center"){if(this._center=this._startLatLng,st===1)return}else{var vt=D._add(q)._divideBy(2)._subtract(this._centerPoint);if(st===1&&vt.x===0&&vt.y===0)return;this._center=S.unproject(S.project(this._pinchStartLatLng,this._zoom).subtract(vt),this._zoom)}this._moved||(S._moveStart(!0,!1),this._moved=!0),Lt(this._animRequest);var $t=m(S._move,S,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=ot($t,this,!0),sl(w)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,Lt(this._animRequest),Vc(document,"touchmove",this._onTouchMove,this),Vc(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});Co.addInitHook("addHandler","touchZoom",_v),Co.BoxZoom=P3,Co.DoubleClickZoom=Mb,Co.Drag=Ag,Co.Keyboard=vv,Co.ScrollWheelZoom=US,Co.TapHold=zS,Co.TouchZoom=_v,d.Bounds=ke,d.Browser=Mr,d.CRS=ti,d.Canvas=FS,d.Circle=gv,d.CircleMarker=zy,d.Class=ln,d.Control=Cc,d.DivIcon=X0,d.DivOverlay=mf,d.DomEvent=xk,d.DomUtil=_k,d.Draggable=su,d.Evented=xe,d.FeatureGroup=pf,d.GeoJSON=l1,d.GridLayer=Tg,d.Handler=Od,d.Icon=V0,d.ImageOverlay=$e,d.LatLng=ge,d.LatLngBounds=en,d.Layer=Yf,d.LayerGroup=Uu,d.LineUtil=E3,d.Map=Co,d.Marker=Uy,d.Mixin=df,d.Path=gf,d.Point=re,d.PolyUtil=Ry,d.Polygon=_b,d.Polyline=Fl,d.Popup=Vy,d.PosAnimation=TS,d.Projection=Ek,d.Rectangle=L3,d.Renderer=f1,d.SVG=Cg,d.SVGOverlay=Wa,d.TileLayer=xb,d.Tooltip=q0,d.Transformation=pr,d.Util=be,d.VideoOverlay=vs,d.bind=m,d.bounds=mn,d.canvas=bv,d.circle=BS,d.circleMarker=Ak,d.control=$0,d.divIcon=qy,d.extend=h,d.featureGroup=NS,d.geoJSON=oe,d.geoJson=_n,d.gridLayer=pc,d.icon=Tk,d.imageOverlay=er,d.latLng=Pe,d.latLngBounds=Qn,d.layerGroup=T3,d.map=Mk,d.marker=Ck,d.point=Se,d.polygon=kk,d.polyline=jy,d.popup=Jf,d.rectangle=Zy,d.setOptions=j,d.stamp=E,d.svg=k3,d.svgOverlay=Fc,d.tileLayer=A3,d.tooltip=Lk,d.transformation=Kt,d.version=s,d.videoOverlay=Wo;var Yy=window.L;d.noConflict=function(){return window.L=Yy,this},window.L=d})});var HXt=Ld((jXt,I_t)=>{(function(d){if(typeof jXt=="object"&&typeof I_t<"u")I_t.exports=d();else if(typeof define=="function"&&define.amd)define([],d);else{var s;typeof window<"u"?s=window:typeof global<"u"?s=global:typeof self<"u"?s=self:s=this,s.ELK=d()}})(function(){var d,s,h;return function p(m,_,E){function y(B,P){if(!_[B]){if(!m[B]){var U=typeof kI=="function"&&kI;if(!P&&U)return U(B,!0);if(I)return I(B,!0);var j=new Error("Cannot find module '"+B+"'");throw j.code="MODULE_NOT_FOUND",j}var V=_[B]={exports:{}};m[B][0].call(V.exports,function(tt){var Q=m[B][1][tt];return y(Q||tt)},V,V.exports,p,m,_,E)}return _[B].exports}for(var I=typeof kI=="function"&&kI,N=0;N0&&arguments[0]!==void 0?arguments[0]:{},j=U.defaultLayoutOptions,V=j===void 0?{}:j,tt=U.algorithms,Q=tt===void 0?["layered","stress","mrtree","radial","force","disco"]:tt,X=U.workerFactory,gt=U.workerUrl;if(y(this,B),this.defaultLayoutOptions=V,this.initialized=!1,typeof gt>"u"&&typeof X>"u")throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.");var ft=X;typeof gt<"u"&&typeof X>"u"&&(ft=function(Ot){return new Worker(Ot)});var xt=ft(gt);if(typeof xt.postMessage!="function")throw new TypeError("Created worker does not provide the required 'postMessage' function.");this.worker=new N(xt),this.worker.postMessage({cmd:"register",algorithms:Q}).then(function(Bt){return P.initialized=!0}).catch(console.err)}return E(B,[{key:"layout",value:function(U){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},V=j.layoutOptions,tt=V===void 0?this.defaultLayoutOptions:V;return U?this.worker.postMessage({cmd:"layout",graph:U,options:tt}):Promise.reject(new Error("Missing mandatory parameter 'graph'."))}},{key:"knownLayoutAlgorithms",value:function(){return this.worker.postMessage({cmd:"algorithms"})}},{key:"knownLayoutOptions",value:function(){return this.worker.postMessage({cmd:"options"})}},{key:"knownLayoutCategories",value:function(){return this.worker.postMessage({cmd:"categories"})}},{key:"terminateWorker",value:function(){this.worker.terminate()}}]),B}();_.default=I;var N=function(){function B(P){var U=this;if(y(this,B),P===void 0)throw new Error("Missing mandatory parameter 'worker'.");this.resolvers={},this.worker=P,this.worker.onmessage=function(j){setTimeout(function(){U.receive(U,j)},0)}}return E(B,[{key:"postMessage",value:function(U){var j=this.id||0;this.id=j+1,U.id=j;var V=this;return new Promise(function(tt,Q){V.resolvers[j]=function(X,gt){X?Q(X):tt(gt)},V.worker.postMessage(U)})}},{key:"receive",value:function(U,j){var V=j.data,tt=U.resolvers[V.id];tt&&(delete U.resolvers[V.id],V.error?tt(V.error):tt(null,V.data))}},{key:"terminate",value:function(){this.worker.terminate&&this.worker.terminate()}}]),B}()},{}],2:[function(p,m,_){(function(E){var y;typeof window<"u"?y=window:typeof E<"u"?y=E:typeof self<"u"&&(y=self);var I,N;function B(){}function P(){}function U(){}function j(){}function V(){}function tt(){}function Q(){}function X(){}function gt(){}function ft(){}function xt(){}function Bt(){}function Ot(){}function Pt(){}function se(){}function ot(){}function Lt(){}function be(){}function ln(){}function Fn(){}function ne(){}function xe(){}function re(){}function hn(){}function Se(){}function ke(){}function mn(){}function en(){}function Qn(){}function ge(){}function Pe(){}function ti(){}function Yi(){}function ki(){}function lr(){}function pr(){}function Kt(){}function wn(){}function it(){}function ut(){}function kt(){}function Nt(){}function ie(){}function rn(){}function Pn(){}function Tt(){}function yt(){}function ue(){}function fn(){}function An(){}function zn(){}function Li(){}function xi(){}function Jt(){}function nn(){}function vn(){}function he(){}function Mn(){}function Sn(){}function gn(){}function Ce(){}function dn(){}function jn(){}function ar(){}function gr(){}function tr(){}function Ln(){}function Qt(){}function Mi(){}function sn(){}function Zn(){}function oi(){}function Jr(){}function Bs(){}function Oc(){}function ru(){}function fc(){}function il(){}function va(){}function Mr(){}function rv(){}function U0(){}function sv(){}function z0(){}function j0(){}function ov(){}function vg(){}function cv(){}function l3(){}function Rt(){}function ve(){}function Je(){}function tn(){}function Ze(){}function Hi(){}function Pr(){}function Gr(){}function hs(){}function Fs(){}function Ms(){}function bs(){}function Tc(){}function rl(){}function Oa(){}function wh(){}function Nr(){}function mr(){}function a1(){}function dc(){}function vh(){}function _g(){}function ws(){}function $c(){}function _a(){}function ff(){}function Bl(){}function _h(){}function u1(){}function Nd(){}function ya(){}function yg(){}function H0(){}function G0(){}function xg(){}function vb(){}function ky(){}function h3(){}function av(){}function Ly(){}function Py(){}function uv(){}function xS(){}function f3(){}function _k(){}function As(){}function bp(){}function Vc(){}function MS(){}function d3(){}function lv(){}function p3(){}function W0(){}function g3(){}function hv(){}function sl(){}function rc(){}function Bc(){}function ES(){}function yk(){}function SS(){}function m3(){}function xk(){}function TS(){}function Co(){}function Mk(){}function Cc(){}function $0(){}function Mg(){}function CS(){}function fv(){}function Xf(){}function b3(){}function AS(){}function kS(){}function Iy(){}function LS(){}function Od(){}function df(){}function PS(){}function su(){}function IS(){}function w3(){}function wp(){}function Ry(){}function Dy(){}function ea(){}function Eg(){}function v3(){}function _3(){}function y3(){}function RS(){}function DS(){}function Ny(){}function Sg(){}function Oy(){}function vp(){}function Zf(){}function x3(){}function M3(){}function E3(){}function dv(){}function By(){}function Ek(){}function S3(){}function Fy(){}function Sk(){}function Yf(){}function Uu(){}function T3(){}function pf(){}function NS(){}function V0(){}function Tk(){}function pv(){}function OS(){}function Uy(){}function Ck(){}function gf(){}function zy(){}function Ak(){}function gv(){}function BS(){}function Fl(){}function jy(){}function _b(){}function kk(){}function l1(){}function h1(){}function Kf(){}function Hy(){}function Gy(){}function C3(){}function Wy(){}function yb(){}function $y(){}function Bd(){}function oe(){}function _n(){}function $e(){}function er(){}function vs(){}function Wo(){}function Wa(){}function Fc(){}function mf(){}function Vy(){}function Jf(){}function q0(){}function Lk(){}function X0(){}function qy(){}function Tg(){}function pc(){}function xb(){}function A3(){}function mv(){}function Pk(){}function f1(){}function FS(){}function bv(){}function Qf(){}function Xy(){}function wv(){}function Cg(){}function k3(){}function L3(){}function Zy(){}function P3(){}function Mb(){}function Ag(){}function vv(){}function US(){}function Ik(){}function zS(){}function _v(){}function Yy(){}function w(){}function S(){}function D(){}function q(){}function st(){}function vt(){}function $t(){}function _e(){}function Ye(){}function Un(){}function Ji(){}function Qr(){}function Is(){}function ol(){}function xa(){}function Ul(){}function zu(){}function d1(){}function Eb(){}function Rk(){}function Dk(){}function jS(){}function Nk(){}function HS(){}function Ma(){}function kg(){}function GS(){}function Mt(){}function Sb(){}function Tb(){}function bf(){}function po(){}function KU(){}function JU(){}function QU(){}function yv(){}function Z0(){}function Cb(){}function SR(){}function tz(){}function ez(){}function Y0(){}function nz(){}function iz(){}function rz(){}function sz(){}function oz(){}function K0(){}function cz(){}function az(){}function uz(){}function lz(){}function hz(){}function xv(){}function fz(){}function dz(){}function p1(){}function pz(){}function gz(){}function mz(){}function bz(){}function Ie(){}function TR(){}function CR(){}function wz(){}function vz(){}function Ok(){}function I3(){}function R3(){}function _z(){}function AR(){}function yz(){}function Lg(){}function Bk(){}function Mv(){}function _p(){}function xz(){}function kR(){}function LR(){}function D3(){}function Ab(){}function PR(){}function Mz(){}function WS(){}function Ez(){}function N3(){}function yh(){}function $S(){}function O3(){}function Pg(){}function VS(){}function qS(){}function J0(){}function IR(){}function zl(){}function Fk(){}function Sz(){}function Tz(){}function Cz(){}function Ky(){}function Az(){}function B3(){}function RR(){}function kz(){}function DR(){}function F3(){}function Uk(){}function NR(){}function zk(){}function OR(){}function Lz(){}function Pz(){}function Iz(){}function BR(){}function jk(){}function Rz(){}function Hk(){}function FR(){}function UR(){}function zR(){}function XS(){}function Dz(){}function jR(){}function kb(){}function Gk(){}function HR(){}function Nz(){}function Wk(){}function GR(){}function $k(){}function Oz(){}function Vk(){}function oo(){}function Bz(){}function Fz(){}function U3(){}function WR(){}function Uz(){}function zz(){}function yp(){}function jz(){}function ZS(){}function qk(){}function $R(){}function VR(){}function Fd(){}function Lb(){}function Xk(){}function qR(){}function YS(){}function XR(){}function Zk(){}function ZR(){}function Yk(){}function Kk(){}function Pb(){}function Hz(){}function Ib(){}function YR(){}function KR(){}function Jk(){}function Gz(){}function Wz(){}function $z(){}function JR(){}function QR(){}function Vz(){}function t8(){}function e8(){}function td(){}function Ig(){}function qz(){}function Xz(){}function KS(){}function Jy(){}function n8(){}function i8(){}function Zz(){}function r8(){}function Qy(){}function z3(){}function Yz(){}function s8(){}function o8(){}function JS(){}function c8(){}function QS(){}function Qk(){}function tT(){}function Kz(){}function a8(){}function eT(){}function u8(){}function t5(){}function Jz(){}function l8(){}function Q0(){}function h8(){}function f8(){}function Qz(){}function d8(){}function tj(){}function ej(){}function tm(){}function e5(){}function n5(){}function i5(){}function nT(){}function t2(){}function cs(){}function iT(){}function r5(){}function Ev(){}function nj(){}function s5(){}function p8(){}function zh(){}function ij(){}function rj(){}function g8(){}function sj(){}function m8(){}function oj(){}function cj(){}function aj(){}function em(){}function jh(){}function o5(){}function uj(){}function lj(t){}function lxt(t){}function c5(){Wr()}function j3(){v7()}function b8(){hq()}function w8(){GC()}function hj(){eft()}function fj(){wlt()}function dj(){zL()}function pj(){Ph()}function v8(){zut()}function _8(){R5()}function gj(){lL()}function a5(){P5t()}function y8(){YRt()}function H3(){C3t()}function u5(){qit()}function x8(){qt()}function M8(){lAt()}function rT(){ZLt()}function E8(){dAt()}function g1(){URt()}function Sv(){pAt()}function mj(){Eat()}function S8(){_6t()}function bj(){sw()}function wj(){gAt()}function vj(){B5t()}function _j(){wNt()}function yj(){A3t()}function xj(){Glt()}function Mj(){tw()}function wf(){CTt()}function Ej(){M7()}function Sj(){dr()}function T8(){q7()}function C8(){jN()}function A8(){gut()}function l5(){XV()}function Tj(){Aht()}function Cj(t){this.a=t}function Aj(t){this.a=t}function G3(t){this.a=t}function kj(t){this.a=t}function Lj(t){this.a=t}function Pj(t){this.a=t}function k8(t){this.a=t}function Ij(t){this.a=t}function L8(t){this.a=t}function Ud(t){this.a=t}function Rj(t){this.a=t}function h5(t){this.a=t}function Dj(t){this.a=t}function P8(t){this.a=t}function Nj(t){this.a=t}function Oj(t){this.a=t}function Bj(t){this.a=t}function Fj(t){this.a=t}function f5(t){this.a=t}function d5(t){this.b=t}function Uj(t){this.a=t}function zj(t){this.a=t}function jj(t){this.a=t}function Hj(t){this.a=t}function Gj(t){this.a=t}function I8(t){this.a=t}function R8(t){this.a=t}function p5(t){this.a=t}function sT(t){this.a=t}function W3(t){this.a=t}function Wj(t){this.a=t}function D8(t){this.a=t}function Rb(t){this.a=t}function N8(t){this.a=t}function O8(t){this.a=t}function B8(t){this.a=t}function xp(t){this.a=t}function Tv(t){this.a=t}function g5(t){this.a=t}function vf(t){this.a=t}function nm(t){this.a=t}function $3(t){this.d=t}function Rg(){this.a=[]}function vi(){uu(this)}function Pnt(t,e){t.i=e}function Int(t,e){t.g=e}function Rnt(t,e){t.b=e}function Dnt(t,e){t.b=e}function Nnt(t,e){t.a=e}function F8(t,e){t.a=e}function Ont(t,e){t.c=e}function m5(t,e){t.c=e}function Bnt(t,e){t.b=e}function Fnt(t,e){t.d=e}function Unt(t,e){t.d=e}function jl(t,e){t.j=e}function znt(t,e){t.a=e}function jnt(t,e){t.f=e}function Hnt(t,e){t.f=e}function $j(t,e){t.e=e}function U8(t,e){t.k=e}function Gnt(t,e){t.a=e}function Wnt(t,e){t.b=e}function z8(t,e){t.g=e}function j8(t,e){t.j=e}function $nt(t,e){t.n=e}function Vnt(t,e){t.a=e}function qnt(t,e){t.a=e}function Vj(t,e){t.c=e}function qj(t,e){t.c=e}function Xnt(t,e){t.d=e}function Znt(t,e){t.e=e}function Ynt(t,e){t.g=e}function Knt(t,e){t.a=e}function b5(t,e){t.c=e}function Jnt(t,e){t.d=e}function Qnt(t,e){t.e=e}function tit(t,e){t.f=e}function eit(t,e){t.j=e}function nit(t,e){t.a=e}function iit(t,e){t.a=e}function rit(t,e){t.b=e}function Xj(t){t.b=t.a}function Zj(t){t.c=t.d.d}function Yj(t){hi(si(t))}function H8(t){this.b=t}function Cv(t){this.a=t}function oT(t){this.a=t}function cT(t){this.a=t}function Db(t){this.b=t}function Dg(t){this.b=t}function G8(t){this.a=t}function W8(t){this.a=t}function _r(t){this.a=t}function $8(t){this.a=t}function V8(t){this.a=t}function Kj(t){this.a=t}function q8(t){this.a=t}function e2(t){this.a=t}function aT(t){this.a=t}function Jj(t){this.a=t}function Qj(t){this.a=t}function w5(t){this.a=t}function X8(t){this.a=t}function tH(t){this.a=t}function eH(t){this.a=t}function nH(t){this.a=t}function iH(t){this.a=t}function rH(t){this.a=t}function sH(t){this.a=t}function oH(t){this.a=t}function cH(t){this.a=t}function aH(t){this.a=t}function uH(t){this.a=t}function lH(t){this.a=t}function Av(t){this.a=t}function m1(t){this.a=t}function hH(t){this.a=t}function fH(t){this.a=t}function kv(t){this.a=t}function Us(t){this.a=t}function Z8(t){this.a=t}function xh(t){this.a=t}function H(t){this.c=t}function uT(t){this.e=t}function zd(t){this.a=t}function dH(t){this.a=t}function Lv(t){this.a=t}function Y8(t){this.a=t}function pH(t){this.a=t}function gH(t){this.a=t}function v5(t){this.a=t}function mH(t){this.a=t}function im(t){this.a=t}function K8(t){this.a=t}function lT(t){this.a=t}function $a(t){this.a=t}function ou(t){this.a=t}function J8(t){this.a=t}function _5(t){this.a=t}function bH(t){this.a=t}function wH(t){this.a=t}function vH(t){this.a=t}function _H(t){this.a=t}function yH(t){this.a=t}function Q8(t){this.a=t}function V3(t){this.a=t}function Nb(t){this.a=t}function xH(t){this.a=t}function t9(t){this.a=t}function hT(t){this.a=t}function jd(t){this.a=t}function n2(t){this.a=t}function MH(t){this.a=t}function EH(t){this.a=t}function SH(t){this.a=t}function TH(t){this.a=t}function CH(t){this.a=t}function e9(t){this.a=t}function rm(t){this.a=t}function Ys(t){this.a=t}function n9(t){this.a=t}function Mp(t){this.a=t}function i9(t){this.a=t}function AH(t){this.b=t}function Ac(t){this.a=t}function kH(t){this.a=t}function r9(t){this.a=t}function s9(t){this.c=t}function y5(t){this.a=t}function LH(t){this.a=t}function PH(t){this.a=t}function IH(t){this.a=t}function RH(t){this.a=t}function DH(t){this.a=t}function NH(t){this.a=t}function OH(t){this.a=t}function BH(t){this.a=t}function FH(t){this.a=t}function UH(t){this.a=t}function zH(t){this.a=t}function jH(t){this.a=t}function x5(t){this.a=t}function HH(t){this.a=t}function M5(t){this.a=t}function GH(t){this.a=t}function WH(t){this.a=t}function $H(t){this.a=t}function Hl(t){this.a=t}function ed(t){this.a=t}function Hd(t){this.a=t}function Ob(t){this.a=t}function VH(t){this.a=t}function o9(t){this.a=t}function qH(t){this.a=t}function XH(t){this.a=t}function fT(t){this.a=t}function c9(t){this.f=t}function ZH(t){this.i=t}function E5(t){this.a=t}function YH(t){this.a=t}function a9(t){this.a=t}function u9(t){this.a=t}function KH(t){this.a=t}function JH(t){this.a=t}function QH(t){this.a=t}function tG(t){this.a=t}function i2(t){this.a=t}function eG(t){this.a=t}function nG(t){this.a=t}function iG(t){this.a=t}function rG(t){this.a=t}function sG(t){this.a=t}function l9(t){this.a=t}function h9(t){this.a=t}function oG(t){this.a=t}function cG(t){this.a=t}function aG(t){this.a=t}function uG(t){this.a=t}function lG(t){this.a=t}function hG(t){this.a=t}function fG(t){this.a=t}function dG(t){this.a=t}function pG(t){this.a=t}function gG(t){this.a=t}function mG(t){this.a=t}function bG(t){this.a=t}function wG(t){this.a=t}function vG(t){this.a=t}function _G(t){this.a=t}function f9(t){this.a=t}function kr(t){this.b=t}function yG(t){this.a=t}function xG(t){this.a=t}function MG(t){this.a=t}function EG(t){this.a=t}function SG(t){this.a=t}function TG(t){this.a=t}function CG(t){this.a=t}function AG(t){this.b=t}function S5(t){this.a=t}function r2(t){this.a=t}function d9(t){this.a=t}function dT(t){this.a=t}function pT(t){this.a=t}function T5(t){this.a=t}function C5(t){this.a=t}function kG(t){this.d=t}function p9(t){this.c=t}function gT(t){this.e=t}function Ba(t){this.e=t}function mT(t){this.a=t}function g9(t){this.a=t}function q3(){this.a=0}function X3(){ZEt(this)}function Dt(){NW(this)}function Z3(){p4t(this)}function sit(){Dit(),Xxe()}function m9(){return null}function oit(){return null}function cit(t){return t.a}function ait(t){return t.a}function uit(t){return t.a}function LG(t){return t.a}function lit(t){return t.a}function K(t){return t.e}function b1(){this.c=t_t}function A5(){this.a=this}function bT(t){this.a=Ole(t)}function b9(){Ep.call(this)}function Y3(){Ep.call(this)}function na(){Ep.call(this)}function w9(){Ep.call(this)}function k5(){Ep.call(this)}function v9(){RSt.call(this)}function Ep(){RSt.call(this)}function s2(){Ep.call(this)}function Oi(){Ep.call(this)}function _9(){w9.call(this)}function hit(t){t.b.Te(t.e)}function PG(t,e){e.jd(t.a)}function o2(t,e){t.a=e-t.a}function c2(t,e){t.b=e-t.b}function IG(t,e){t.b+=e}function fit(t,e){t.d.b.$b(e)}function K3(t,e){t.e=e,e.b=t}function RG(t,e){t.length=e}function y9(t){t.a=new Fr}function x9(){x9=P,new vi}function DG(){this.b=new irt}function x(){this.Bb|=256}function C(){Ep.call(this)}function F(){Ep.call(this)}function J(){Ep.call(this)}function mt(){Ep.call(this)}function St(t){k7(t.c,t.b)}function Vt(t,e){xlt(t.c,e)}function ee(t,e){m7(t.a,e)}function fe(t,e){Tq(t.a,e)}function Cn(t,e){Ut(t.a,e)}function kn(t,e){Ir(t.b,e)}function Wn(t,e){Bi(t.e,e)}function Ki(t){TM(),CK.Rd(t)}function Er(){Er=P,w1t=new tt}function Wr(){Wr=P,xK=new j}function no(){no=P,b1t=new U}function Zr(){Zr=P,MK=new s3t}function co(){co=P,EK=new o3t}function $o(){$o=P,Azt=new ot}function Hh(){Hh=P,F4=new Lt}function _f(){_f=P,Dzt=new Fn}function $r(){this.a=new vi}function yu(){this.a=new NAt}function nd(){this.a=new Dt}function sm(){this.a=new Dt}function M9(){this.a=new Dt}function hxt(){this.a=new Dt}function fxt(){this.a=new Dt}function dxt(){this.a=new $r}function dit(){this.a=new rMt}function pit(){this.a=new MAt}function git(){this.a=new hTt}function mit(){this.a=new rv}function cl(){this.a=new Jf}function NG(){this.a=new Dt}function bit(){this.a=new Dt}function pxt(){this.b=new Dt}function wit(){this.f=new Dt}function gxt(){this.d=new Dt}function mxt(){this.a=new Dt}function Ng(){this.a=new c5t}function vit(){this.a=new Mt}function bxt(){this.j=new Dt}function Va(){Fr.call(this)}function wxt(){Dt.call(this)}function OG(){nd.call(this)}function _it(){a2.call(this)}function a2(){wh.call(this)}function u2(){wh.call(this)}function yit(){u2.call(this)}function vxt(){vi.call(this)}function _xt(){vi.call(this)}function yxt(){vi.call(this)}function xxt(){X4t.call(this)}function Mxt(){X4t.call(this)}function Ext(){yD.call(this)}function Sxt(){jxt.call(this)}function Txt(){jxt.call(this)}function xit(){yh.call(this)}function Mit(){yh.call(this)}function BG(){Xrt.call(this)}function FG(){Xrt.call(this)}function UG(){tPt.call(this)}function Eit(){zl.call(this)}function Cxt(){zl.call(this)}function Axt(){Eit.call(this)}function kxt(){x.call(this)}function Lxt(){$r.call(this)}function Sit(){vi.call(this)}function zG(){vi.call(this)}function Pxt(){vi.call(this)}function Ixt(){jh.call(this)}function CQt(t){K3t.call(this,t)}function Tit(t){K3t.call(this,t)}function AQt(t){Tit.call(this,t)}function Rxt(t){vPt.call(this,t)}function Dxt(t){vPt.call(this,t)}function Nxt(t){Rst.call(this,t)}function Cit(t){tW.call(this,t)}function Ait(t){sAt.call(this,t)}function Pv(t){sM.call(this,t)}function sc(t){WCt.call(this,t)}function Oxt(t){sc.call(this,t)}function E9(t){sc.call(this,t)}function Uc(t){sc.call(this,t)}function Bxt(t){sc.call(this,t)}function jG(t){WCt.call(this,t)}function kit(t){Uc.call(this,t)}function wT(t){sc.call(this,t)}function yn(t){sc.call(this,t)}function yc(t){sc.call(this,t)}function Fxt(t){sc.call(this,t)}function vT(t){sc.call(this,t)}function yf(t){yn.call(this,t)}function _T(){sT.call(this,{})}function Sp(){W3.call(this,"")}function yT(){W3.call(this,"")}function om(){W3.call(this,"")}function Bb(){W3.call(this,"")}function Uxt(t){Uc.call(this,t)}function Tp(t){sc.call(this,t)}function Lit(t){J7t(),Cxe(this,t)}function HG(t){fM(),this.a=t}function L5(t){t.b=null,t.c=0}function kQt(t,e){t.a=e,x0e(t)}function LQt(t,e){return t*t/e}function J3(t){return t<0?-t:t}function GG(t){kPt(),this.a=t}function WG(t){_$(),this.f=t}function $G(t){_$(),this.f=t}function VG(t,e,n){t.a[e.g]=n}function PQt(t,e,n){e1e(n,t,e)}function IQt(t,e,n){b2e(n,t,e)}function RQt(t,e,n){bde(t,n,e)}function zxt(){this.d=new Dt}function jxt(){this.a=new Az}function Hxt(){throw K(new Oi)}function Pit(){throw K(new Oi)}function DQt(){throw K(new Oi)}function NQt(){throw K(new Oi)}function OQt(){throw K(new Oi)}function Gxt(){throw K(new Oi)}function P5(t){this.c=hi(si(t))}function BQt(t){return new p5(t)}function FQt(t){return new S2(t)}function Z(t,e){return aAt(t,e)}function UQt(t,e){return t.a-e.a}function zQt(t,e){return t.a-e.a}function jQt(t,e){return t.a-e.a}function Wxt(t,e){return t.g-e.g}function Mh(t,e){return t>e?t:e}function cm(t,e){return t0}function KG(t,e){return Pc(t,e)<0}function nM(t){return t.d.c+t.e.c}function go(){this.a=0,this.b=0}function A9(t){TD.call(this,t)}function w1(t){i_.call(this,t)}function y3t(t){$$.call(this,t)}function x3t(t){$$.call(this,t)}function k9(t){l6t.call(this,t,0)}function M3t(t){this.c=(En(t),t)}function L9(t){this.a=new k9(t)}function Ub(t){this.a=new x$(t)}function cte(){throw K(new J)}function ate(){throw K(new J)}function iM(){iM=P,$1t=new MEt}function Dv(){Dv=P,Z_=new re}function E3t(){E3t=P,Zzt=new fn}function P9(){P9=P,FK=new jSt}function Wit(){Wit=P,Ujt=new ov}function S3t(){S3t=P,zjt=new Rt}function $it(){$it=P,jjt=new RCt}function Vit(){Vit=P,jgt=new Hi}function T3t(){T3t=P,Zjt=new rl}function ST(){ST=P,rHt=new $y}function C3t(){C3t=P,iHt=new CS}function qit(){qit=P,P0t=new _3}function R5(){R5=P,Jjt=new go}function A3t(){A3t=P,z$t=new as}function k3t(){this.b=new IX(qbt)}function L3t(){this.a=new IX(cwt)}function P3t(){this.a=(Js(),Ff)}function I3t(){this.a=(Js(),Ff)}function I9(t){this.a=0,this.b=t}function R9(t){return t.b!=t.d.c}function R3t(t,e){return t.d[e.o]}function D3t(t,e){for(;t.sd(e););}function Xit(t,e,n){t.splice(e,n)}function ute(t,e,n){tc(t.d,e.f,n)}function lte(t,e){EX(Et(t.a),e)}function hte(t,e){EX(Et(t.a),e)}function N3t(t){t.c?sNt(t):oNt(t)}function O3t(){O3t=P,Lqt=new RR}function B3t(){B3t=P,Wqt=new _xt}function F3t(){F3t=P,$qt=new yxt}function v1(){v1=P,Nl=new Sit}function Zit(){Zit=P,Jvt=new Pxt}function D9(){D9=P,XF=new vi}function Yit(){Yit=P,u_t=new Dt}function _1(){_1=P,hg=new uj}function TT(){TT=P,htt=new cSt}function Ap(){Ap=P,yI=new aSt}function JG(){JG=P,iXt=new Ig}function Jo(){Jo=P,sXt=new qz}function D5(t){this.a=new iMt(t)}function U3t(t){this.a=a(si(t),13)}function z3t(t,e){this.b=t,this.c=e}function j3t(t,e){this.b=t,this.a=e}function Kit(t,e){this.b=t,this.d=e}function rM(t,e){this.e=t,this.d=e}function Jit(t,e){this.b=t,this.c=e}function H3t(t,e){this.a=t,this.b=e}function G3t(t,e){this.a=t,this.b=e}function W3t(t,e){this.a=t,this.b=e}function $3t(t,e){this.a=t,this.b=e}function V3t(t,e){this.b=t,this.a=e}function g2(t,e){pM.call(this,t,e)}function Nv(t,e){g2.call(this,t,e)}function q3t(t,e){this.b=t,this.a=e}function X3t(t,e){this.a=t,this.b=e}function N5(t,e){this.g=t,this.i=e}function Z3t(t,e){this.b=t,this.a=e}function QG(t,e){this.a=t,this.b=e}function Y3t(t,e){this.a=t,this.f=e}function K3t(t){UW(t.Wb()),this.c=t}function J3t(t,e){this.b=t,this.c=e}function Gi(t,e){this.f=t,this.g=e}function Q3t(t,e){Gi.call(this,t,e)}function tMt(t,e){this.e=t,this.c=e}function tW(t){this.b=a(si(t),43)}function eMt(t){this.a=a(si(t),15)}function sM(t){this.a=a(si(t),15)}function Qit(t,e){this.a=t,this.b=e}function fte(t,e){return t>e&&e0?t:e}function NEt(t){return ia(t.l,t.m,t.h)}function PW(t){return t<10?"0"+t:""+t}function qte(t){return t==Xm||t==vw}function Xte(t){return t==Xm||t==ww}function ql(t){return nc(t.b.b,t,0)}function OEt(t){this.a=$Mt(),this.b=t}function BEt(t){this.a=$Mt(),this.b=t}function y2(t){this.a=t,c5.call(this)}function FEt(t){this.a=t,c5.call(this)}function Rrt(t,e){NL(t,0,t.length,e)}function UEt(t,e){return Ut(t.a,e),e}function Zte(t,e){return Ut(t.c,e),t}function zEt(t,e){return pa(t.a,e),t}function Yte(t,e){return Zl(),e.a+=t}function Kte(t,e){return Zl(),e.c+=t}function Jte(t,e){return Zl(),e.a+=t}function jEt(t){return t==sy||t==ry}function jv(t){return t==ah||t==uh}function Y5(t){return t==cg||t==fp}function Gd(t){return t!=dp&&t!=ob}function Xl(t){return t.eg()&&t.fg()}function rD(t){return pa(new as,t)}function HEt(){HEt=P,uQ=new BC(qQ)}function qa(){q8.call(this,new xm)}function GEt(){JD.call(this,0,0,0,0)}function lM(){qh.call(this,0,0,0,0)}function Drt(t){gEt.call(this,t,!0)}function Oo(t){this.a=t.a,this.b=t.b}function Wd(t,e,n){th(t,e),eh(t,n)}function sD(t,e,n){c_(t,e),o_(t,n)}function Nrt(t,e,n){OV(t,e),BV(t,n)}function IW(t,e,n){MC(t,e),xC(t,n)}function RW(t,e,n){EC(t,e),SC(t,n)}function DW(t,e){mq(t,e),FV(t,t.D)}function WEt(t,e){return new FM(e,t)}function Qte(t,e){return new FM(e,t)}function Lp(t,e){return te?1:0}function GT(t){return yot(t.b.tc(),t.a)}function id(t){return tC(t.a.tc(),t.b)}function $Et(t){return ml(t,0,t.length)}function oD(t){return t!=null?Yr(t):0}function $d(t){sAt.call(this,new Ait(t))}function VEt(){U9.call(this,"Head",1)}function qEt(){U9.call(this,"Tail",3)}function Ort(t,e,n){QW.call(this,t,e,n)}function tee(t,e,n){F8(t,e.le(t.a,n))}function XEt(t,e){return parseInt(t,e)}function eee(t,e){return _C(e,Tf(t))}function nee(t,e){return _C(e,Tf(t))}function x2(t){JD.call(this,t,t,t,t)}function NW(t){t.c=dt(un,te,1,0,5,1)}function ZEt(t){t.a=dt(un,te,1,8,5,1)}function Brt(t){return t.b&&YX(t),t.a}function Frt(t){return t.b&&YX(t),t.c}function OW(t){return t.d&&wX(t),t.c}function BW(t){return t.d&&wX(t),t.b}function Urt(t){return t.d&&wX(t),t.a}function zrt(t,e,n){return Vr(t,e,n),n}function YEt(t,e,n){Vr(t.c[e.g],e.g,n)}function iee(t,e,n){return wr(t.g,n,e)}function ree(t,e,n){return wr(t.k,n,e)}function see(t,e,n){Wd(n,n.i+t,n.j+e)}function xc(t,e){es.call(this,t.b,e)}function WT(t){Ai(),Ba.call(this,t)}function Hu(){Hu=P,lg=(O3t(),Lqt)}function Kn(){Kn=P,new KEt,new Dt}function KEt(){new vi,new vi,new vi}function Ao(){Ao=P,Szt=new xt,m1t=new Bt}function Hv(){Hv=P,p6=new fMt,g6=new PEt}function al(){al=P,d1t=Nee(new P5(Rc))}function ts(){ts=P,new Yj((al(),"="))}function cD(t){t.j=dt(P1t,wt,287,0,0,1)}function JEt(t){this.a=t,Vst.call(this,t)}function oee(t){return t==null?0:Yr(t)}function $T(t){return t==null?tu:Yc(t)}function bo(t,e){return t.charCodeAt(e)}function hM(t,e,n){return Grt(t,Ca(e),n)}function ia(t,e,n){return{l:t,m:e,h:n}}function Qo(t){return t.ae-1?0:e-1}function Tee(t,e,n){return n?e!=0:e!=t-1}function HW(t,e,n){return t.a[e.g][n.g]}function Cee(t,e){return t.e[e.c.o][e.o]}function Aee(t,e){return t.a[e.c.o][e.o]}function Wh(t,e){return t.a[e.c.o][e.o]}function kee(t,e){return t.j[e.o]=sbe(e)}function Lee(t,e){return ro(t.c.d,e.c.d)}function Pee(t,e){return ro(t.c.c,e.c.c)}function Iee(t,e,n){X2e(t.a,t.b,t.c,e,n)}function Ree(t,e,n,i){Vr(t.a[e.g],n.g,i)}function XT(t,e,n){return Vr(t.g,e,n),n}function hl(t,e){return t.a*=e,t.b*=e,t}function Dee(t,e){t.q.setHours(e),c4(t,e)}function Ss(t,e,n){hL.call(this,t,e,n)}function lD(t,e,n){Ss.call(this,t,e,n)}function Gu(t,e,n){Ss.call(this,t,e,n)}function mSt(t,e,n){lD.call(this,t,e,n)}function Vrt(t,e,n){PD.call(this,t,e,n)}function bSt(t,e,n){PD.call(this,t,e,n)}function wSt(t,e,n){Vrt.call(this,t,e,n)}function vSt(t,e,n){qrt.call(this,t,e,n)}function qrt(t,e,n){hL.call(this,t,e,n)}function dM(t,e,n){hL.call(this,t,e,n)}function pM(t,e){this.a=t,nW.call(this,e)}function $n(t){this.i=t,this.f=this.i.j}function x1(t){this.c=t,this.a=this.c.a}function Xrt(){this.Bb|=256,this.Bb|=512}function _St(t,e){this.a=t,tW.call(this,e)}function ySt(t,e){this.a=e,tW.call(this,t)}function Zrt(t){this.b=t,this.a=this.b.a.e}function xSt(t){t.b.jc(),--t.d.f.d,$D(t.d)}function MSt(t){t.a=a(an(t.b.a,4),116)}function ESt(t){t.a=a(an(t.b.a,4),116)}function SSt(t){h5.call(this,a(si(t),34))}function TSt(t){h5.call(this,a(si(t),34))}function Nee(t){return si(tu),new eCt(t,t)}function CSt(t,e){return new r9t(t.a,t.b,e)}function $h(t,e,n){return t.substr(e,n-e)}function Oee(t){return t==null?null:t.name}function Bee(t){return t.l+t.m*rx+t.h*o0}function Gb(t){return typeof t=="number"}function Vo(t){return typeof t=="number"}function Pp(t,e){return!!e&&t.b[e.g]==e}function Yrt(t,e){var n;n=t[N_],e[N_]=n}function hD(t){Db.call(this,t),this.a=t}function Krt(t){Dg.call(this,t),this.a=t}function J5(t){Iv.call(this,t),this.a=t}function Jrt(t){q8.call(this,new Bct(t))}function ASt(t){if(!t)throw K(new C)}function Hn(t){if(!t)throw K(new J)}function Vd(t){t.o==null&&Ome(t)}function GW(t){return Hn(t.a!=null),t.a}function kSt(t,e){return Ut(e.a,t.a),t.a}function LSt(t,e){return Ut(e.b,t.a),t.a}function Fee(t,e){e&&(t.a=(Yv(e),e.a))}function Qrt(t,e){return cC(t.a,e)!=null}function fa(t,e){return a(rr(t.a,e),15)}function WW(t){return t.b=a(y4t(t.a),38)}function lm(t){return t.$H||(t.$H=++U3e)}function $W(t){return Qo(t.a)||Qo(t.b)}function Wb(t,e){return!!t.p&&dm(t.p,e)}function Uee(t,e){return t.k.b=(En(e),e)}function zee(t,e){return t.k.b=(En(e),e)}function fD(t,e){return++t.b,Ut(t.a,e)}function tst(t,e){return++t.b,Lc(t.a,e)}function jee(t,e,n){return hkt(t,e,n,t.b)}function est(t,e,n){return hkt(t,e,n,t.c)}function nst(t,e){Eut.call(this,t,e,null)}function PSt(t,e){this.a=e,tW.call(this,t)}function Q5(t){this.a=t,H8.call(this,t)}function ISt(){ST(),this.b=new n2(this)}function VW(t,e){_$(),this.f=e,this.d=t}function RSt(){cD(this),tN(this),this.Pd()}function ZT(t){this.d=t,$n.call(this,t)}function M2(t){this.c=t,$n.call(this,t)}function tL(t){this.c=t,ZT.call(this,t)}function Hee(t,e,n){Tq(t.a,n),m7(t.a,e)}function ist(t,e,n){a(DL(t,e),19).nc(n)}function hm(t,e){return Ut(e.a,t.a),t.a}function sd(t){var e;e=t.a,t.a=t.b,t.b=e}function eL(t,e){TT(),this.a=t,this.b=e}function dD(t,e){Ap(),this.b=t,this.c=e}function DSt(t,e,n,i){got.call(this,t,e,n,i)}function pD(t,e,n){var i;i=t.fd(e),i.Bc(n)}function NSt(t,e,n){try{t[e]=n}catch{}}function gD(){gD=P,zF=new es(LBt,0)}function YT(){YT=P,pA=new kr("root")}function KT(){KT=P,_I=new Txt,new Sxt}function Gee(t){return++Ar,new Yb(3,t)}function od(t){return Ah(t,ex),new qu(t)}function rst(t){return Ao(),si(t),new RTt(t)}function Wee(t){return Hv(),$i((kAt(),Czt),t)}function OSt(t){return TM(),parseInt(t)||-1}function $ee(t,e){return me(),t==e?0:t?1:-1}function Vee(t){return t==null?null:Yc(t)}function qee(t){return t==null?null:Yc(t)}function nL(t){return t.f!=null?t.f:""+t.g}function qW(t){return kot(t.c,t.c.length)}function BSt(t){t.b=new zSt(t),t.c=new vi}function sst(t){this.q=new y.Date(AM(t))}function FSt(t){this.c=t,this.a=1,this.b=1}function ost(t){iM(),this.b=t,this.a=!0}function USt(){this.a=new Ov,this.b=new Ov}function zSt(t){Zst.call(this,t,null,null)}function jSt(){Gi.call(this,"POLYOMINO",0)}function iL(t){ct(t,142)&&a(t,142).Xg()}function XW(t){return Hn(t.b!=0),t.a.a.c}function mD(t){return Hn(t.b!=0),t.c.b.c}function Wu(t,e,n){return t.a+=e,t.b+=n,t}function Xee(t,e,n){return t.a*=e,t.b*=n,t}function rL(t,e,n){return t.a-=e,t.b-=n,t}function HSt(t,e,n){return t.a+=ml(e,0,n),t}function ZW(t){return t.a=-t.a,t.b=-t.b,t}function YW(t){return J3(t.d.e-t.e.e)-t.a}function Zee(t,e){return t.c.nc(a(e,134))}function Yee(t,e,n){return Ut(e,wIt(t,n))}function Kee(t,e){return t>0?e*e/t:e*e*100}function Jee(t,e){return t>0?e/(t*t):e*100}function Qee(t,e,n){QL(kc(t.a),e,CAt(n))}function tne(t,e,n){QL(Ya(t.a),e,AAt(n))}function Mu(t,e,n){lu.call(this,t,e,n,2)}function GSt(t,e){TT(),eL.call(this,t,e)}function cst(t,e){Ap(),dD.call(this,t,e)}function WSt(t,e){Ap(),dD.call(this,t,e)}function $St(t,e){Ap(),cst.call(this,t,e)}function KW(t,e){Hu(),UD.call(this,t,e)}function ast(t,e){Hu(),UD.call(this,t,e)}function VSt(t,e){Hu(),KW.call(this,t,e)}function ust(t,e){Hu(),KW.call(this,t,e)}function qSt(t,e){Hu(),ust.call(this,t,e)}function XSt(t,e){Hu(),ast.call(this,t,e)}function ZSt(t,e){Hu(),UD.call(this,t,e)}function ene(t,e,n){return e.ak(t.e,t.c,n)}function nne(t,e,n){return e.bk(t.e,t.c,n)}function lst(t,e,n){return Z7(BL(t,e),n)}function JW(t,e){return B1(t.e,a(e,42))}function ine(t){return t==null?null:cxe(t)}function rne(t){return t==null?null:Bge(t)}function YSt(t){this.c=t,th(t,0),eh(t,0)}function gM(t,e){this.c=t,rM.call(this,t,e)}function JT(t,e){this.a=t,gM.call(this,t,e)}function hst(t){this.a=t,this.b=e4t(this.a.d)}function sne(t,e){this.d=t,Zj(this),this.b=e}function fst(){tPt.call(this),this.Bb|=ao}function bD(){uhe.call(this,new xm,new vi)}function QW(t,e,n){CL.call(this,t,e,n,null)}function dst(t,e,n){CL.call(this,t,e,n,null)}function cd(t,e){t.a.bd(t.b,e),++t.b,t.c=-1}function pst(t,e){var n;return n=t.e,t.e=e,n}function de(t){return qT(t==null||Hb(t)),t}function Yt(t){return qT(t==null||Gb(t)),t}function hi(t){return qT(t==null||Es(t)),t}function one(t,e){return si(t),si(e),TC(t,e)}function KSt(t){return t>8?0:t+1}function JSt(t){uu(t.c),t.b.b=t.b,t.b.a=t.b}function QSt(t,e){O5t.call(this,t),this.a=e}function gi(t,e){O5t.call(this,t),this.a=e}function cne(t){mut.call(this,0,0),this.f=t}function t$(t){var e;e=t[N_]|0,t[N_]=e+1}function ane(t,e,n){return t.Ld(e,n)<=0?n:e}function une(t,e){return a(O2(t.b,e),180)}function lne(t,e){return a(O2(t.c,e),199)}function e$(t){return a(Ee(t.a,t.b),269)}function tTt(t){return new We(t.c,t.d+t.a)}function gst(t){return N1(Jre(Vo(t)?gl(t):t))}function eTt(t){return Eu(),jEt(a(t,179))}function Fg(){Fg=P,Ovt=qe((Ju(),E0))}function wD(){wD=P,y.Math.pow(2,-65)}function sL(t,e,n){++t.j,t.Yh(),wV(t,e,n)}function nTt(t,e,n){++t.j,t.Vh(e,t.Ch(e,n))}function mst(t,e,n){return n=Lu(t,e,3,n),n}function bst(t,e,n){return n=Lu(t,e,6,n),n}function wst(t,e,n){return n=Lu(t,e,9,n),n}function qd(t,e){return I$(e,Spt),t.f=e,t}function vst(t,e){return(e&qi)%t.d.length}function hne(t,e){return R5(),VM(e.d.g,t)}function iTt(t,e){return wr(t.a,e,"")==null}function rTt(t,e,n){return Bht(t.c,t.b,e,n)}function fne(t,e,n){var i;i=t.fd(e),i.Bc(n)}function sTt(t,e){this.a=t,AG.call(this,e)}function oL(t,e){this.a=t,AG.call(this,e)}function oTt(t,e){this.c=t,i_.call(this,e)}function cTt(t){this.b=t,this.a=this.b.b.Tb()}function _st(t,e){p9.call(this,t),this.a=e}function n$(t,e){p9.call(this,t),this.a=e}function es(t,e){kr.call(this,t),this.a=e}function $v(t,e){Uc.call(this,A4+t+DO+e)}function vD(){CQt.call(this,new vi),this.a=3}function cL(t){return!t.a&&(t.a=new ln),t.a}function _D(t){t.b?_D(t.b):t.f.c.Zb(t.e,t.d)}function aTt(t){this.a=(we(),new cT(si(t)))}function M1(t,e){if(!t)throw K(new yc(e))}function yst(t,e){if(!t)throw K(new yn(e))}function xst(t,e,n){return t.lastIndexOf(e,n)}function dne(t,e,n){return t.apply(e,n);var i}function i$(t,e,n){return E2(t,a(e,23),n)}function pne(t,e){return YG(WIt(t.a,e,!0))}function gne(t,e){return YG($It(t.a,e,!0))}function uTt(t){return new M3t((Yv(t),t.a))}function r$(t){return String.fromCharCode(t)}function mne(t){return t==null?null:t.message}function bne(t,e){t.e=e,e!=null&&NSt(e,vZ,t)}function wne(t,e,n){return ro(t[e.b],t[n.b])}function Mst(t,e,n,i){JD.call(this,t,e,n,i)}function aL(t){Sle.call(this,t,(EN(),RK))}function vne(t,e){return t.k.a=(En(e),e+10)}function _ne(t,e){return t.k.a=(En(e),e+10)}function yne(t,e){return R5(),!VM(e.d.g,t)}function lTt(){lTt=P,T1t=dt(Io,wt,21,256,0,1)}function me(){me=P,$m=(me(),!1),TE=!0}function hTt(){this.b=new go,this.c=new Dt}function Est(){this.d=new go,this.e=new go}function Sst(){this.k=new go,this.n=new go}function fTt(){this.b=new k3t,this.a=new _e}function dTt(){this.b=new vi,this.a=new vi}function pTt(){this.b=new $r,this.a=new $r}function gTt(){this.a=new Dt,this.d=new Dt}function mTt(){this.a=new Dt,this.b=new Dt}function bTt(){this.a=new rv,this.b=new DG}function wTt(){this.a=new M9,this.c=new bs}function yD(){this.n=new u2,this.i=new lM}function vTt(){yD.call(this),this.a=new go}function Tst(t,e,n){return n=Lu(t,e,11,n),n}function sr(t,e){return t.a+=e.a,t.b+=e.b,t}function za(t,e){return t.a-=e.a,t.b-=e.b,t}function xne(t,e){var n;return n=e.Yg(t.a),n}function Cst(t,e){return a(t.b.cd(e),190).a}function Mne(t,e){return e==t||ZC(B7(e),t)}function Ene(t){return t<100?null:new w1(t)}function Sne(t,e,n){n!=null&&dat(e,Jq(t,n))}function Tne(t,e,n){n!=null&&pat(e,Jq(t,n))}function mM(t,e,n,i){Wt.call(this,t,e,n,i)}function Ast(t,e,n,i){Wt.call(this,t,e,n,i)}function _Tt(t,e,n,i){Ast.call(this,t,e,n,i)}function yTt(t,e,n,i){XD.call(this,t,e,n,i)}function s$(t,e,n,i){XD.call(this,t,e,n,i)}function kst(t,e,n,i){XD.call(this,t,e,n,i)}function xTt(t,e,n,i){s$.call(this,t,e,n,i)}function Lst(t,e,n,i){s$.call(this,t,e,n,i)}function pn(t,e,n,i){kst.call(this,t,e,n,i)}function MTt(t,e,n,i){Lst.call(this,t,e,n,i)}function ETt(t,e,n,i){_ot.call(this,t,e,n,i)}function STt(t,e,n){this.a=t,Kit.call(this,e,n)}function Cne(t,e,n){return t.d=a(e.Kb(n),206)}function TTt(t,e){return t.Pi().dh().Zg(t,e)}function Pst(t,e){return t.Pi().dh()._g(t,e)}function o$(t,e){return Ao(),Zle(t.tc(),e)!=-1}function Ane(t,e){return ts(),new PSt(t.tc(),e)}function xD(t){return Ao(),t.hc()?t.ic():null}function Ist(t){return Gb(t)?(En(t),t):t.$d()}function MD(t){return!isNaN(t)&&!isFinite(t)}function Rst(t){$b(),this.b=(we(),new Iv(t))}function $b(){$b=P,new Dj((we(),we(),fo))}function CTt(){CTt=P,Jqt=dt(un,te,1,0,5,1)}function Dst(){Dst=P,Qqt=dt(un,te,1,0,5,1)}function ATt(){ATt=P,Oqt=dt(un,te,1,0,5,1)}function kTt(){kTt=P,E1t=dt(px,wt,192,256,0,1)}function LTt(){LTt=P,C1t=dt(Vm,wt,149,256,0,1)}function PTt(){PTt=P,L1t=dt(qm,wt,168,256,0,1)}function ITt(){ITt=P,S1t=dt(U4,wt,159,128,0,1)}function RTt(t){this.b=t,this.a=(Ao(),Ao(),m1t)}function DTt(t){this.b=t,nD.call(this,rO,0)}function NTt(t){this.c=t,nD.call(this,rO,0)}function OTt(t){return t.c?nc(t.c.a,t,0):-1}function c$(t,e){return YG($It(t.a,e,!1))}function a$(t,e){return YG(WIt(t.a,e,!1))}function Vv(t,e){return t.b.sd(new ort(t,e))}function BTt(t,e){return t.b.sd(new wMt(t,e))}function ED(t,e){if(!t)throw K(new yn(e))}function Nst(t,e){if(!t)throw K(new Bxt(e))}function Ost(t,e){y9(this),this.e=t,this.f=e}function Bst(){y9(this),this.e=0,this.f=!0}function Fst(t,e){this.c=t,A$.call(this,t,e)}function FTt(t,e){return ct(e,15)&&rNt(t.c,e)}function SD(t,e,n){return a(t.c,64).yj(e,n)}function kne(t,e,n){return a(t.c,64).xj(e,n)}function Lne(t,e,n){return ene(t,a(e,311),n)}function Ust(t,e,n){return nne(t,a(e,311),n)}function Pne(t,e,n){return w8t(t,a(e,311),n)}function UTt(t,e,n){return mge(t,a(e,311),n)}function Ine(t,e){return rd(),ni(Et(t.a),e)}function Rne(t,e){return rd(),ni(Et(t.a),e)}function Dne(t){return Ao(),R9(t.a)?mkt(t):null}function zTt(t,e){return t.b.Qb(e)?l4t(t,e):null}function uL(t,e){return t.substr(e,t.length-e)}function jTt(t){return a(t,11).f.c.length!=0}function HTt(t){return a(t,11).d.c.length!=0}function QT(t){return t==Nx||t==Sd||t==Gc}function GTt(t){Th(t.a),D5t(t.c,t.b),t.b=null}function Eh(t){NW(this),Kst(this.c,0,t.yc())}function TD(t){eSt(this),ld(this),yo(this,t)}function WTt(t,e,n){this.d=t,this.b=n,this.a=e}function ja(t,e,n){this.a=t,this.b=e,this.c=n}function $Tt(t,e,n){this.a=t,this.b=e,this.c=n}function VTt(t,e,n){this.c=t,this.a=e,this.b=n}function Nne(t,e,n,i){t.d.b.$b(n),t.d.b.Zb(i,e)}function tC(t,e){return Ao(),si(e),new ySt(t,e)}function One(t){return h7(),$i((Mkt(),Qzt),t)}function Bne(t){return CN(),$i((Ekt(),tjt),t)}function Fne(t){return EN(),$i((V5t(),qzt),t)}function Une(t){return z1(),$i((e5t(),Xzt),t)}function zne(t){return H7(),$i((XPt(),ejt),t)}function jne(t){return $2(),$i((Z5t(),ijt),t)}function Hne(t){return $C(),$i((Y5t(),sjt),t)}function Gne(t){return P9(),$i((KAt(),ojt),t)}function Wne(t){return kN(),$i((Skt(),Mjt),t)}function $ne(t){return wC(),$i((w5t(),Djt),t)}function Vne(t){return Mo(),$i((bLt(),Fjt),t)}function qne(t){return jM(),$i((X5t(),Gjt),t)}function Xne(t){return Ke(),$i((xPt(),Kjt),t)}function u$(t){JD.call(this,t.d,t.c,t.a,t.b)}function zst(t){JD.call(this,t.d,t.c,t.a,t.b)}function Zne(t){return RC(),$i((v5t(),eHt),t)}function Yne(t){return Po(),$i((qMt(),nHt),t)}function Kne(t){return XC(),$i((gLt(),uHt),t)}function Jne(t){return vN(),$i((Tkt(),lHt),t)}function Qne(t){return KM(),$i(($Lt(),hHt),t)}function tie(t){return I2(),$i((Ckt(),fHt),t)}function eie(t){return IN(),$i((u5t(),dHt),t)}function nie(t){return BN(),$i((a5t(),pHt),t)}function iie(t){return l_(),$i((l5t(),mHt),t)}function rie(t){return C7(),$i((HLt(),bHt),t)}function sie(t){return mP(),$i((GLt(),wHt),t)}function oie(t){return QM(),$i((WLt(),vHt),t)}function cie(t){return So(),$i((v6t(),_Ht),t)}function aie(t){return BM(),$i((m5t(),yHt),t)}function uie(t){return tp(),$i((b5t(),MHt),t)}function lie(t){return dN(),$i((Akt(),EHt),t)}function hie(t){return bl(),$i((mLt(),THt),t)}function fie(t){return E7(),$i((VLt(),eWt),t)}function die(t){return nw(),$i((q5t(),nWt),t)}function pie(t){return WC(),$i((pLt(),iWt),t)}function gie(t){return T_(),$i((OPt(),rWt),t)}function mie(t){return Fo(),$i((h5t(),oWt),t)}function bie(t){return s7(),$i((f5t(),cWt),t)}function wie(t){return NN(),$i((d5t(),aWt),t)}function vie(t){return U2(),$i((g5t(),uWt),t)}function _ie(t){return WN(),$i((p5t(),lWt),t)}function jst(t,e){for(;t.b.sd(new ort(t,e)););}function CD(t,e,n){this.b=t,this.a=e,this.c=n}function Hst(t,e,n){this.a=t,this.b=e,this.c=n}function qTt(t,e,n){this.a=t,this.b=e,this.c=n}function AD(t,e,n){this.e=e,this.b=t,this.d=n}function l$(t){var e;return e=new q0,e.e=t,e}function yie(t){return!t.e&&(t.e=new Dt),t.e}function Zl(){Zl=P,sHt=new Ak,oHt=new gv}function h$(){h$=P,G1t=new Pn,Vzt=new Tt}function lL(){lL=P,mB=new Bc,bB=new ES}function xie(t){return pC(),$i((Bkt(),LWt),t)}function Mie(t){return Tm(),$i((_5t(),TWt),t)}function Eie(t){return ZM(),$i((K5t(),E$t),t)}function Sie(t){return JC(),$i((ULt(),T$t),t)}function Tie(t){return Sf(),$i((Lkt(),BWt),t)}function Cie(t){return Zh(),$i((kkt(),UWt),t)}function Aie(t){return RL(),$i((Pkt(),jWt),t)}function kie(t){return mu(),$i((XMt(),g$t),t)}function Lie(t){return JL(),$i((x5t(),$$t),t)}function Pie(t){return MN(),$i((Okt(),W$t),t)}function Iie(t){return vm(),$i((Ikt(),M$t),t)}function Rie(t){return sN(),$i((Dkt(),N$t),t)}function Die(t){return cN(),$i((Nkt(),O$t),t)}function Nie(t){return RN(),$i((Rkt(),j$t),t)}function Oie(t){return r7(),$i((y5t(),G$t),t)}function Bie(t){return b7(),$i((J5t(),eVt),t)}function Fie(t){return FN(),$i((M5t(),nVt),t)}function Uie(t){return t0(),$i((vLt(),rVt),t)}function zie(t){return i0(),$i((BPt(),oVt),t)}function jie(t){return md(),$i((zLt(),cVt),t)}function Hie(t){return Kh(),$i((E5t(),NVt),t)}function Gie(t){return Ht(),$i((oLt(),OVt),t)}function Wie(t){return Ls(),$i((PLt(),DVt),t)}function $ie(t){return Kg(),$i((T5t(),PVt),t)}function Vie(t){return r0(),$i((YPt(),IVt),t)}function qie(t){return G1(),$i((wLt(),RVt),t)}function Xie(t){return Js(),$i((_Lt(),TVt),t)}function Zie(t){return ip(),$i((Q5t(),CVt),t)}function Yie(t){return gd(),$i((tLt(),AVt),t)}function Kie(t){return S7(),$i((jLt(),kVt),t)}function Jie(t){return Ju(),$i((eLt(),jVt),t)}function Qie(t){return ma(),$i((ZPt(),HVt),t)}function tre(t){return a7(),$i((iLt(),GVt),t)}function ere(t){return Cu(),$i((rLt(),VVt),t)}function nre(t){return Ch(),$i((S5t(),XVt),t)}function ire(t){return hu(),$i((C5t(),YVt),t)}function rre(t){return Ha(),$i((A5t(),JVt),t)}function sre(t){return Q7(),$i((AEt(),yqt),t)}function ore(t){return Am(),$i((nLt(),Mqt),t)}function cre(t){return eE(),$i((FPt(),Nqt),t)}function f$(t,e,n){return t=e)throw K(new _9)}function Dre(t,e){var n;for(n=0;n0?1:0}function aot(t){return!Array.isArray(t)&&t.sl===B}function LCt(t){return t!=null&&S$(t)&&t.sl!==B}function uot(t,e){return ct(e,23)&&Pp(t,a(e,23))}function PCt(t,e){return ct(e,23)&&Nue(t,a(e,23))}function Fre(t,e){return t.a.get(e)!==void 0}function lot(t){return pu(t,26)*d4+pu(t,27)*p4}function ICt(t,e){return $ue(new ie,new Jj(t),e)}function hot(t,e){if(t==null)throw K(new vT(e))}function E2(t,e,n){return Tu(t.a,e),xot(t,e.g,n)}function HD(t,e,n){R6t(0,e,t.length),NL(t,0,e,n)}function pm(t,e,n){t_(e,t.c.length),z5(t.c,e,n)}function Ure(t,e,n){oDt(n,t,1),Ut(e,new kMt(n,t))}function zre(t,e,n){VC(n,t,1),Ut(e,new TMt(n,t))}function fot(){this.d=new xi,this.e=new V4t(this)}function RCt(){this.b=new tn,this.c=new $4t(this)}function DCt(){hAt(),this.e=new Fr,this.d=new Fr}function v$(t,e){this.b=new Fr,this.a=t,this.c=e}function Xv(t,e,n){V1(),this.e=t,this.d=e,this.a=n}function GD(t,e,n){var i;t&&(i=t.i,i.d=e,i.a=n)}function WD(t,e,n){var i;t&&(i=t.i,i.c=e,i.b=n)}function NCt(t,e,n){var i;for(i=0;i0?y.Math.log(t/e):-100}function nse(t,e){return ro(t.c.c+t.c.b,e.c.c+e.c.b)}function A$(t,e){this.d=t,$n.call(this,t),this.e=e}function qb(t,e,n){return Qle(t,e.g,n),Tu(t.c,e),t}function ise(t){return L_(t,(Js(),ah)),t.d=!0,t}function si(t){if(t==null)throw K(new s2);return t}function S2(t){if(t==null)throw K(new s2);this.a=t}function k$(t){t.a=null,t.e=null,uu(t.b),t.d=0,++t.c}function L$(t){return!t.j&&eit(t,Sve(t.g,t.b)),t.j}function rse(t){return t.b.k.a+=t.a.f*(t.a.a-1),null}function rC(t){Wv(t.b!=-1),Em(t.c,t.a=t.b),t.b=-1}function XCt(t){ZEt(this),RG(this.a,kat(8>t?8:t)<<1)}function Tot(t,e){Ba.call(this,1),this.a=t,this.b=e}function P$(t,e,n){this.a=t,lV(n,e),this.c=e,this.b=n}function ZCt(t,e){this.a=t,this.b=e,this.c=this.b.lc()}function mL(t,e){hSt(t,ct(e,184)?e:a(e,1630).rk())}function YCt(t){return si(t),ct(t,476)?a(t,476):Yc(t)}function Cot(t,e){return e?yo(t,e):!1}function wM(t,e){return t.a+=String.fromCharCode(e),t}function S1(t,e){return t.a+=String.fromCharCode(e),t}function sse(t,e,n,i){return t.a+=""+e.substr(n,i-n),t}function ose(t,e,n){var i;return i=B2(t,e),Fkt(t,e,n),i}function cse(t,e,n){var i;for(i=0;i=t.g}function xse(t,e){return L2(),t==n0(e)?Dm(e):n0(e)}function wr(t,e,n){return Es(e)?tc(t,e,n):Au(t.d,e,n)}function N$(t,e,n){var i;return i=GV(t,e,n),wht(t,i)}function oC(t,e){var n;return n=t.a._b(),fce(e,n),n-1-e}function Iot(t,e){var n;return n=new EL(t),cut(n,e),n}function Vr(t,e,n){return vee(n==null||o_e(t,n)),t[e]=n}function C2(t,e){var n;n=t.a.length,B2(t,n),Fkt(t,n,e)}function r4t(t,e){var n;++t.j,n=t.hi(),t.Wh(t.Ch(n,e))}function Mse(t,e){C2(t,new S2(e.f!=null?e.f:""+e.g))}function Ese(t,e){C2(t,new S2(e.f!=null?e.f:""+e.g))}function s4t(t){this.b=new Dt,this.a=new Dt,this.c=t}function dl(t){this.c=new go,this.a=new Dt,this.b=t}function o4t(t){Est.call(this),this.a=new go,this.c=t}function Rot(t,e,n){gT.call(this,e),this.a=t,this.b=n}function Dot(t,e,n){Ba.call(this,t),this.a=e,this.b=n}function Not(t,e,n){this.a=t,p9.call(this,e),this.b=n}function c4t(t,e,n){this.a=t,pct.call(this,8,e,null,n)}function a4t(t){this.c=t,this.a=new Fr,this.b=new Fr}function u4t(t){this.c=t,this.b=this.c.a,this.a=this.c.e}function Sse(t){this.a=(En(ui),ui),this.b=t,new Sit}function mm(t){return!t.d&&(t.d=new Ss(Do,t,1)),t.d}function l4t(t,e){var n;return n=t.b.$b(e),t.d.b.$b(n),n}function Oot(t,e){for(;e-- >0;)t=t<<1|(t<0?1:0);return t}function Rp(t,e){return zt(t)===zt(e)||t!=null&&Fi(t,e)}function bm(t,e){return nC(e,t.a.c.length),Ee(t.a,e)}function O$(t){return y.Math.sqrt(t.a*t.a+t.b*t.b)}function Tse(t){return String.fromCharCode.apply(null,t)}function Dp(t){return ct(t,13)?a(t,13)._b():gC(t.tc())}function h4t(t){return ct(t,543)?t:new hMt(t)}function Mc(t){return!t.a&&t.c?t.c.b:t.a}function B$(t){t.c?B$(t.c):(t.d=!0,Zbe(t))}function Yv(t){t.c?Yv(t.c):($M(t),t.d=!0)}function f4t(t){wL(t.a),t.b=dt(un,te,1,t.b.length,5,1)}function F$(t){this.c=t,this.b=t.a.b.a,Yrt(t.a.c,this)}function Cse(t,e){t.c<0||t.b.b0?new Ost(t-1,e):new Ost(t,e)}function v4t(t,e){return LD(),new Cut(new TSt(t),new SSt(e))}function xM(t){if(du(t.d),t.d.d!=t.c)throw K(new C)}function Ose(t,e){var n;return n=t.a.get(e),n??[]}function Bse(t,e){var n;return n=zi(t.f,e),Mat(e,n),null}function _i(t,e,n,i){return t6t(t,e,n,!1),Jat(t,i),t}function Fse(t,e){return t.a=$h(t.a,0,e)+""+uL(t.a,e+1),t}function Use(t){return t.j.c=dt(un,te,1,0,5,1),t.a=-1,t}function zse(t){return!t.c&&(t.c=new pn(Si,t,5,8)),t.c}function jse(t){return!t.b&&(t.b=new pn(Si,t,4,7)),t.b}function j$(t){return!t.n&&(t.n=new Wt(ic,t,1,7)),t.n}function jot(t){return!t.c&&(t.c=new Wt(Rl,t,9,9)),t.c}function MM(t){return t.e==ME&&Qnt(t,nde(t.g,t.b)),t.e}function bL(t){return t.f==ME&&tit(t,Lpe(t.g,t.b)),t.f}function _4t(t){return qT(t==null||S$(t)&&t.sl!==B),t}function Hot(t,e){if(t==null)throw K(new vT(e));return t}function Xb(t){var e;return e=t.b,!e&&(t.b=e=new jj(t)),e}function Got(t){var e;return e=t.Gh(t.f),ni(t,e),e.hc()}function wL(t){var e;for(e=t.tc();e.hc();)e.ic(),e.jc()}function y4t(t){return Hn(t.bi&&++i,i}function Kd(t){var e,n;return n=(e=new b1,e),yC(n,t),n}function W$(t){var e,n;return n=(e=new b1,e),I8t(n,t),n}function Vse(t){if(t.p!=5)throw K(new na);return or(t.f)}function qse(t){if(t.p!=5)throw K(new na);return or(t.k)}function P4t(t){return t?t.Wb():!null.tc().hc()}function tN(t){return t.n&&(t.e!==IOt&&t.Pd(),t.j=null),t}function Xse(t){return t!=null&&AT(ZF,t.toLowerCase())}function $$(t){this.f=t,this.c=this.f.e,t.f>0&&e8t(this)}function jg(t,e,n,i){this.e=t,this.a=e,this.c=n,this.d=i}function I4t(t,e,n,i){Hu(),i5t.call(this,e,n,i),this.a=t}function R4t(t,e,n,i){Hu(),i5t.call(this,e,n,i),this.a=t}function D4t(t,e,n,i){this.b=t,this.c=i,nD.call(this,e,n)}function N4t(t,e){this.a=t,sne.call(this,t,a(t.d,15).fd(e))}function ld(t){t.a.a=t.c,t.c.b=t.a,t.a.b=t.c.a=null,t.b=0}function $ot(t,e){return t.b=e.b,t.c=e.c,t.d=e.d,t.a=e.a,t}function Zse(t,e,n){t.i=0,t.e=0,e!=n&&E6t(t,e,n)}function Yse(t,e,n){t.i=0,t.e=0,e!=n&&S6t(t,e,n)}function O4t(t,e){var n;return n=EV(e),a(zi(t.c,n),21).a}function Kse(t,e,n){return n>=0&&le(t.substr(n,e.length),e)}function V$(t,e){return e==null?!!Ea(t.d,null):Fre(t.e,e)}function B4t(t,e){t.d&&!t.d.a&&(IG(t.d,e),B4t(t.d,e))}function F4t(t,e){t.e&&!t.e.a&&(IG(t.e,e),F4t(t.e,e))}function U4t(t,e){this.g=t,this.d=Y(Z(Cl,1),Ih,8,0,[e])}function Vot(t,e){new Fr,this.a=new Va,this.b=t,this.c=e}function z4t(){_lt(this,new T8),this.wb=(T1(),Ae),Q3()}function j4t(t,e){return ct(e,166)&&le(t.b,a(e,166).Lf())}function Jse(t,e){return fu(t),fu(e),Wxt(a(t,23),a(e,23))}function qot(t,e,n,i,r,c){$5t.call(this,t,e,n,i,r,c?-2:-1)}function H4t(t,e,n,i){Art.call(this,e,n),this.b=t,this.a=i}function G4t(t,e){AQt.call(this,new x$(t)),this.a=t,this.b=e}function Xot(t){this.b=t,this.c=t,t.e=null,t.c=null,this.a=1}function W4t(t,e){var n;return n=Og(t.ql),e==null?n:n+": "+e}function ns(t,e){return N1(Wre(Vo(t)?gl(t):t,Vo(e)?gl(e):e))}function Xh(t,e){return N1($re(Vo(t)?gl(t):t,Vo(e)?gl(e):e))}function Qse(t,e){return N1(Vre(Vo(t)?gl(t):t,Vo(e)?gl(e):e))}function Zot(t){return t&&t.hashCode?t.hashCode():lm(t)}function EM(t){return we(),ct(t,49)?new XG(t):new hD(t)}function we(){we=P,fo=new xe,ap=new hn,iB=new Se}function SM(){SM=P,j1t=new ke,jzt=new ke,H1t=new mn}function Yot(){Yot=P,Yzt=new An,Jzt=new fot,Kzt=new zn}function TM(){TM=P;var t,e;e=!Ufe(),t=new ft,CK=e?new Q:t}function $4t(t){this.c=t,this.b=new Ub(a(si(new Je),65))}function V4t(t){this.c=t,this.b=new Ub(a(si(new Li),65))}function Np(){this.a=new Va,this.b=(Ah(3,ex),new qu(3))}function q$(t,e,n){this.a=t,this.e=!1,this.d=e,this.c=n}function q4t(t,e,n){return t.f?t.f.re(e,n):!1}function Et(t){return!t.s&&(t.s=new Wt(Ra,t,21,17)),t.s}function Wi(t){return!t.q&&(t.q=new Wt(ph,t,11,10)),t.q}function Kot(t){return!t.a&&(t.a=new Wt(zr,t,10,11)),t.a}function toe(t,e){var n;return n=Wrt(t.a,e),n&&(e.d=null),n}function Kv(t,e,n,i){Vr(t.c[e.g],n.g,i),Vr(t.c[n.g],e.g,i)}function eN(t,e,n,i){Vr(t.c[e.g],e.g,n),Vr(t.b[e.g],e.g,i)}function A2(t,e,n){gN(),t&&wr(ctt,t,e),t&&wr(wI,t,n)}function eoe(t,e){pSt(t,or(ns(E1(e,24),oO)),or(ns(e,oO)))}function da(t){var e;return e=a(an(t,16),24),e||t.Rg()}function noe(t){if(t.p!=0)throw K(new na);return CT(t.f,0)}function ioe(t){if(t.p!=0)throw K(new na);return CT(t.k,0)}function Bo(t){return t.u||(pl(t),t.u=new sTt(t,t)),t.u}function roe(t){return t==hp||t==Zp}function soe(t){T9(),y.setTimeout(function(){throw t},0)}function X$(t){this.c=t.c,this.d=t.d,this.b=t.b,this.a=t.a}function Op(t,e){this.e=t,this.a=un,this.b=yNt(e),this.c=e}function X4t(){this.b=new $r,this.c=new Fr,this.d=new OG}function Sf(){Sf=P,Qm=new brt(gE,0),Xp=new brt(pE,1)}function vm(){vm=P,sg=new xrt(pE,0),cy=new xrt(gE,1)}function Z4t(){Z4t=P,$b(),g1t=($o(),Azt),Ezt=new Uot(new Ub(g1t))}function ooe(t){return Z4t(),si(t),g1t==t?Ezt:new Uot(new Ub(t))}function Hg(t,e,n,i,r,c,l){return new aV(t.e,e,n,i,r,c,l)}function Y4t(t,e,n,i,r,c){this.a=t,zV.call(this,e,n,i,r,c)}function K4t(t,e,n,i,r,c){this.a=t,zV.call(this,e,n,i,r,c)}function Jot(t){this.e=t,this.b=this.e.a.entries(),this.a=[]}function Qot(t){t.d=t.d-15,t.b=t.b-15,t.c=t.c+15,t.a=t.a+15}function J4t(t,e){var n;n=a(Wct(t.e,e),249),n&&(t.d=!0)}function Zc(t,e){return e==null?Ua(Ea(t.d,null)):RT(t.e,e)}function Ea(t,e){return C6t(t,e,Ose(t,e==null?0:t.b.he(e)))}function Q4t(t,e){return e===t?"(this Map)":e==null?tu:Yc(e)}function coe(t,e){return t.a?e.pg().tc():a(e.pg(),64).oh()}function _L(t,e,n){return t.a=$h(t.a,0,e)+(""+n)+uL(t.a,e),t}function Gg(t,e){if(e==null)throw K(new s2);return Xfe(t,e)}function aoe(){return h7(),Y(Z(egt,1),jt,391,0,[NK,tgt])}function uoe(){return CN(),Y(Z(igt,1),jt,390,0,[ngt,OK])}function loe(){return kN(),Y(Z(Cgt,1),jt,387,0,[GK,hB])}function hoe(){return vN(),Y(Z(O0t,1),jt,386,0,[N0t,wJ])}function foe(){return I2(),Y(Z(U0t,1),jt,317,0,[T6,S6])}function doe(){return dN(),Y(Z(rmt,1),jt,383,0,[RJ,imt])}function poe(){return cN(),Y(Z(owt,1),jt,388,0,[_Q,swt])}function goe(){return sN(),Y(Z(rwt,1),jt,438,0,[vQ,iwt])}function moe(){return RN(),Y(Z(cwt,1),jt,447,0,[vF,UE])}function boe(){return RL(),Y(Z($bt,1),jt,437,0,[Wbt,lF])}function woe(){return Sf(),Y(Z(OWt,1),jt,466,0,[Qm,Xp])}function voe(){return Zh(),Y(Z(FWt,1),jt,465,0,[x0,rf])}function _oe(){return vm(),Y(Z(x$t,1),jt,417,0,[sg,cy])}function yoe(){return pC(),Y(Z(kWt,1),jt,472,0,[cA,oA])}function xoe(){return MN(),Y(Z(uwt,1),jt,389,0,[awt,EQ])}function nN(t,e,n,i){return n>=0?t.Dg(e,n,i):t.lg(null,n,i)}function Moe(t,e){var n;n=a(cn(e,(YT(),pA)),35),o7t(t,n)}function Z$(t){var e;return e=fl(t.b),yo(e,t.c),yo(e,t.i),e}function tct(t){return zt(t.a)===zt((XV(),ltt))&&Uye(t),t.a}function tAt(t){return t.b.b==0?t.a.Be():g$(t.b)}function ect(t){var e;return e=t.g,a(e||(t.g=new k8(t)),15)}function Zh(){Zh=P,x0=new wrt(BY,0),rf=new wrt("UP",1)}function Y$(t,e){Gnt(this,new We(t.a,t.b)),Wnt(this,fl(e))}function eAt(t,e){yD.call(this),nat(this),this.a=t,this.c=e}function nct(t,e,n){Hu(),gT.call(this,e),this.a=t,this.b=n}function K$(t,e,n){Ai(),Ba.call(this,t),this.b=e,this.a=n}function Eoe(t,e){var n=TK[t.charCodeAt(0)];return n??t}function Soe(t,e){var n;return n=Cue(t.f,e),sr(ZW(n),t.f.d)}function nAt(t){var e;e=t.c.b.b,t.b=e,t.a=t.c.b,e.a=t.c.b.b=t}function Toe(t){return t.b==0?null:(Hn(t.b!=0),Ql(t,t.a.a))}function Coe(t){return so(Yd(Ka(pu(t,32)),32),Ka(pu(t,32)))}function iAt(t){return ct(t,62)&&(a(a(t,17),62).Bb&ca)!=0}function Tr(t){return Math.max(Math.min(t,qi),-2147483648)|0}function iN(t,e){return mct(e),Qae(t,dt(Gn,pi,22,e,15,1),e)}function Aoe(t,e){return L2(),t==io(n0(e))||t==io(Dm(e))}function rAt(t){var e;return e=wN(t),"n_"+(e??""+t.o)}function sAt(t){this.b=(Ao(),Ao(),Ao(),Szt),this.a=a(si(t),43)}function oAt(t){yD.call(this),nat(this),this.a=t,this.c=!0}function cAt(t,e,n){this.d=t,this.b=new Dt,this.c=e,this.a=n}function J$(t,e,n,i){var r;r=new vTt,e.a[n.g]=r,E2(t.b,i,r)}function aAt(t,e){var n=t.a=t.a||[];return n[e]||(n[e]=t._d(e))}function yL(t,e){var n;n=t.q.getHours(),t.q.setDate(e),c4(t,n)}function uAt(t){var e;return e=new L9(tq(t.length)),XL(e,t),e}function koe(t){function e(){}return e.prototype=t||{},new e}function Loe(t,e){return i6t(t,e)?(ePt(t),!0):!1}function rN(t){return t.Db>>16!=3?null:a(t.Cb,35)}function Tf(t){return t.Db>>16!=9?null:a(t.Cb,35)}function Poe(t){if(t.p!=2)throw K(new na);return or(t.f)&qr}function Ioe(t){if(t.p!=2)throw K(new na);return or(t.k)&qr}function sN(){sN=P,vQ=new Mrt(qBt,0),iwt=new Mrt("FAN",1)}function Q$(t,e,n){var i;i=M6t(t,e,n),t.b=new WV(i.c.length)}function tc(t,e,n){return e==null?Au(t.d,null,n):km(t.e,e,n)}function ict(t,e){return Qg(so(Qg(a(t,149).a).a,a(e,149).a))}function lAt(){lAt=P,Gbt=v4t(Xt(1),Xt(4)),Hbt=v4t(Xt(1),Xt(2))}function hAt(){hAt=P,fWt=Xa(new as,(Mo(),Yo),(Po(),TB))}function fAt(){fAt=P,hWt=Xa(new as,(Mo(),Yo),(Po(),TB))}function dAt(){dAt=P,PWt=Ni(new as,(Mo(),Yo),(Po(),W4))}function Eu(){Eu=P,DWt=Ni(new as,(Mo(),Yo),(Po(),W4))}function pAt(){pAt=P,NWt=Ni(new as,(Mo(),Yo),(Po(),W4))}function tV(){tV=P,zWt=Ni(new as,(Mo(),Yo),(Po(),W4))}function gAt(){gAt=P,B$t=Xa(new as,(ZM(),lA),(JC(),lQ))}function mAt(t){return t.Db>>16!=6?null:a(t.Cb,105)}function bAt(t){return t.Db>>16!=7?null:a(t.Cb,207)}function wAt(t){return t.Db>>16!=7?null:a(t.Cb,253)}function io(t){return t.Db>>16!=11?null:a(t.Cb,35)}function Zb(t){return t.Db>>16!=17?null:a(t.Cb,24)}function vAt(t){return t.Db>>16!=3?null:a(t.Cb,139)}function CM(t){return t.Db>>16!=6?null:a(t.Cb,207)}function uC(t,e,n,i,r,c){return new Qd(t.e,e,t.pi(),n,i,r,c)}function rct(t,e){return PCt(t.a,e)?xot(t,a(e,23).g,null):null}function Roe(t,e){return kCt(Ka(t.q.getTime()),Ka(e.q.getTime()))}function Doe(t,e){var n;n=t.q.getHours(),t.q.setMonth(e),c4(t,n)}function Hs(t,e){t.c&&Lc(t.c.f,t),t.c=e,t.c&&Ut(t.c.f,t)}function Ks(t,e){t.c&&Lc(t.c.a,t),t.c=e,t.c&&Ut(t.c.a,t)}function Ts(t,e){t.d&&Lc(t.d.d,t),t.d=e,t.d&&Ut(t.d.d,t)}function ds(t,e){t.g&&Lc(t.g.i,t),t.g=e,t.g&&Ut(t.g.i,t)}function _At(t,e){return t.b+=e.b,t.c+=e.c,t.d+=e.d,t.a+=e.a,t}function sct(t){return uD(t.c),t.e=t.a=t.c,t.c=t.c.c,++t.d,t.a.f}function yAt(t){return uD(t.e),t.c=t.a=t.e,t.e=t.e.e,--t.d,t.a.f}function xAt(t,e){var n;return n=new dl(t),e.c[e.c.length]=n,n}function Noe(t,e){var n,i;n=e.c,i=n!=null,i&&C2(t,new S2(e.c))}function Ooe(t){var e;e=Mfe(a(cn(t,(tw(),TQ)),349)),e.Ef(t)}function eV(t,e){ct(t.Cb,96)&&e4(pl(a(t.Cb,96)),4),kh(t,e)}function oN(t,e){ct(t.Cb,248)&&(a(t.Cb,248).tb=null),kh(t,e)}function Boe(t,e){hIt(t,e),ct(t.Cb,96)&&e4(pl(a(t.Cb,96)),2)}function Foe(t,e){cD(this),this.f=e,this.g=t,tN(this),this.Pd()}function k2(t){this.c=new Fr,this.b=t.b,this.d=t.c,this.a=t.a}function MAt(){this.a=new qa,this.e=new $r,this.g=0,this.i=0}function C1(t,e,n){q6t(e,n,t._b()),this.c=t,this.a=e,this.b=n-e}function Gs(t,e){this.a=t,$3.call(this,t),t_(e,t._b()),this.b=e}function EAt(t){this.a=t,this.b=dt(CWt,wt,1637,t.e.length,0,2)}function Jv(t){this.a=y.Math.cos(t),this.b=y.Math.sin(t)}function Ei(t,e){this.b=(En(t),t),this.a=e&zm?e:e|64|Lf}function SAt(t,e,n){var i;q6t(e,n,t.c.length),i=n-e,Xit(t.c,e,i)}function TAt(t,e){var n;return n=a(XM(gm(t.a),e),13),n?n._b():0}function CAt(t){var e,n;return n=(Q3(),e=new b1,e),yC(n,t),n}function AAt(t){var e,n;return n=(Q3(),e=new b1,e),yC(n,t),n}function Qv(t){return ST(),ct(t.g,8)?a(t.g,8):null}function Uoe(t,e){var n;n=a(zi(t.g,e),57),pd(e.d,new IMt(t,n))}function Za(t,e){return Jo(),Yct(e)?new ND(e,t):new X5(e,t)}function Yl(t){return zo(Y(Z(ss,1),wt,9,0,[t.g.k,t.k,t.a]))}function zoe(){return RC(),Y(Z(tHt,1),jt,412,0,[iJ,rJ,nJ])}function joe(){return z1(),Y(Z(tf,1),jt,150,0,[K1t,Qh,bw])}function Hoe(){return tp(),Y(Z(xHt,1),jt,280,0,[k6,ty,wx])}function Goe(){return BM(),Y(Z(nmt,1),jt,318,0,[PJ,IJ,BB])}function Woe(){return IN(),Y(Z(j0t,1),jt,319,0,[z0t,PB,_J])}function $oe(){return BN(),Y(Z(G0t,1),jt,384,0,[yJ,H0t,xJ])}function Voe(){return l_(),Y(Z(gHt,1),jt,406,0,[MJ,C6,$4])}function qoe(){return Fo(),Y(Z(sWt,1),jt,410,0,[sF,Ga,ba])}function Xoe(){return s7(),Y(Z(Obt,1),jt,345,0,[Dbt,sQ,Nbt])}function Zoe(){return NN(),Y(Z(Ubt,1),jt,347,0,[Fbt,oQ,Bbt])}function Yoe(){return WN(),Y(Z(jbt,1),jt,346,0,[cQ,aQ,q6])}function Koe(){return U2(),Y(Z(zbt,1),jt,385,0,[V6,W6,$6])}function Joe(){return wC(),Y(Z(Ugt,1),jt,348,0,[qK,VK,XK])}function Qoe(){return JL(),Y(Z(fwt,1),jt,349,0,[_F,lwt,hwt])}function tce(){return r7(),Y(Z(H$t,1),jt,401,0,[MQ,yQ,xQ])}function ece(){return Tm(),Y(Z(SWt,1),jt,413,0,[oF,sA,cF])}function nce(){return hu(),Y(Z(ZVt,1),jt,419,0,[jf,lb,fh])}function ice(){return Ha(),Y(Z(KVt,1),jt,420,0,[Fh,hb,dh])}function rce(){return Kh(),Y(Z(Avt,1),jt,275,0,[hy,cb,DF])}function sce(){return FN(),Y(Z(Swt,1),jt,277,0,[AQ,Ewt,Mwt])}function oce(){return Ch(),Y(Z(Dw,1),jt,203,0,[lc,ta,hc])}function cce(){return Kg(),Y(Z(Evt,1),jt,316,0,[RF,Dx,yA])}function kAt(){kAt=P,Czt=Vi((Hv(),Y(Z(SK,1),jt,350,0,[p6,g6])))}function cN(){cN=P,_Q=new Ert("DFS",0),swt=new Ert("BFS",1)}function L2(){L2=P,lB=new Dt,HK=(ts(),new vi),jK=new Dt}function LAt(t,e,n){var i;i=new q,i.b=e,i.a=n,++e.b,Ut(t.d,i)}function PAt(t,e,n){Ba.call(this,25),this.b=t,this.a=e,this.c=n}function Su(t){Ai(),Ba.call(this,t),this.c=!1,this.a=!1}function ace(t){return t.a==(PM(),QF)&&Knt(t,Xbe(t.g,t.b)),t.a}function lC(t){return t.d==(PM(),QF)&&Jnt(t,t_e(t.g,t.b)),t.d}function uce(t,e){var n;return n=(En(t),t).g,$rt(!!n),En(e),n(e)}function nV(t,e){var n,i;return i=bM(t,e),n=t.a.fd(i),new J3t(t,n)}function AM(t){var e;return Vo(t)?(e=t,e==-0?0:e):yue(t)}function lce(t){return t.Db>>16!=6?null:a(SX(t),207)}function G(t){return Hn(t.a=e)throw K(new Uc(b0e(t,e)));return t}function IAt(t,e,n){if(t<0||en)throw K(new Uc(Xge(t,e,n)))}function dce(t){return Ao(),S1(tut((al(),d1t),S1(new om,91),t),93).a}function aN(t){return si(t),tX((Ao(),new $d(id(Zd(t.a,new X)))))}function uN(t){return new qu((Ah(t,bZ),FL(so(so(5,t),t/10|0))))}function oct(t,e){return t&&t.equals?t.equals(e):zt(t)===zt(e)}function cct(t,e){return e==0?!!t.o&&t.o.f!=0:Hq(t,e)}function pce(t,e){var n;n=lt(Yt(t.a.xe((dr(),PF)))),oOt(t,e,n)}function RAt(t,e,n){var i;i=xr(t.d,e),i>=0?P7(t,i,n):Qlt(t,e,n)}function rV(t,e,n){var i;i=t.d[e.o],t.d[e.o]=t.d[n.o],t.d[n.o]=i}function DAt(t,e){var n;for(n=t+"";n.length0&&t.a[--t.d]==0;);t.a[t.d++]==0&&(t.e=0)}function gce(t){return!!t.u&&kc(t.u.a).i!=0&&!(t.n&&Xq(t.n))}function hN(t){sC(),this.a=(we(),ct(t,49)?new XG(t):new hD(t))}function NAt(){this.c=new sSt,this.a=new wTt,this.b=new EEt,T3t()}function OAt(t,e,n){this.d=t,this.j=e,this.e=n,this.o=-1,this.p=3}function BAt(t,e,n){this.d=t,this.k=e,this.f=n,this.o=-1,this.p=5}function FAt(t,e,n,i,r,c){rat.call(this,t,e,n,i,r),c&&(this.o=-2)}function UAt(t,e,n,i,r,c){sat.call(this,t,e,n,i,r),c&&(this.o=-2)}function zAt(t,e,n,i,r,c){Cct.call(this,t,e,n,i,r),c&&(this.o=-2)}function jAt(t,e,n,i,r,c){aat.call(this,t,e,n,i,r),c&&(this.o=-2)}function HAt(t,e,n,i,r,c){Act.call(this,t,e,n,i,r),c&&(this.o=-2)}function GAt(t,e,n,i,r,c){oat.call(this,t,e,n,i,r),c&&(this.o=-2)}function WAt(t,e,n,i,r,c){cat.call(this,t,e,n,i,r),c&&(this.o=-2)}function $At(t,e,n,i,r,c){kct.call(this,t,e,n,i,r),c&&(this.o=-2)}function VAt(t,e,n,i){gT.call(this,n),this.b=t,this.c=e,this.d=i}function qAt(t,e){this.f=t,this.a=(PM(),JF),this.c=JF,this.b=e}function XAt(t,e){this.g=t,this.d=(PM(),QF),this.a=QF,this.b=e}function ZAt(t,e){!t.c&&(t.c=new _s(t,0)),eZ(t.c,(fr(),EI),e)}function oc(t,e,n,i,r,c){return t6t(t,e,n,c),eIt(t,i),nIt(t,r),t}function YAt(t,e){return ct(e,38)?Qq(t.a,a(e,38)):!1}function mce(t){if(!("stack"in t))try{throw t}catch{}return t}function bce(t){if(t.p!=1)throw K(new na);return or(t.f)<<24>>24}function wce(t){if(t.p!=1)throw K(new na);return or(t.k)<<24>>24}function vce(t){if(t.p!=7)throw K(new na);return or(t.k)<<16>>16}function _ce(t){if(t.p!=7)throw K(new na);return or(t.f)<<16>>16}function fN(t){ult(),pSt(this,or(ns(E1(t,24),oO)),or(ns(t,oO)))}function KAt(){KAt=P,ojt=Vi((P9(),Y(Z(_gt,1),jt,439,0,[FK])))}function dN(){dN=P,RJ=new grt(y4,0),imt=new grt("TOP_LEFT",1)}function JAt(t,e){var n;t.e=new vit,n=ow(e),gc(n,t.c),eNt(t,n,0)}function pe(t,e,n,i){var r;r=new SR,r.a=e,r.b=n,r.c=i,Xi(t.b,r)}function Sa(t,e,n,i){var r;r=new SR,r.a=e,r.b=n,r.c=i,Xi(t.a,r)}function yce(t,e,n){var i;return i=a(t.Hc().Vb(e),13),!!i&&i.pc(n)}function QAt(t,e,n){var i;return i=a(t.Hc().Vb(e),13),!!i&&i.vc(n)}function tkt(t,e){var n;return n=1-e,t.a[n]=DN(t.a[n],n),DN(t,e)}function kM(t){return Hn(t.b.b!=t.d.a),t.c=t.b=t.b.b,--t.a,t.c.c}function ekt(t){return DD(t),uD(t.c),t.e=t.a=t.c,t.c=t.c.b,++t.d,t.a}function nkt(t){return DD(t),uD(t.e),t.c=t.a=t.e,t.e=t.e.d,--t.d,t.a}function In(t){if(!Jn(t))throw K(new J);return t.c=t.b,t.b.ic()}function ikt(t,e){return ct(e,38)?Qq(t.a,a(e,38)):!1}function rkt(t,e){return ct(e,38)?Qq(t.a,a(e,38)):!1}function skt(t){var e;return Yv(t),e=new en,jst(t.a,new nH(e)),e}function uct(){var t,e,n;return e=(n=(t=new b1,t),n),Ut(u_t,e),e}function xce(t){var e;return e=(mu(),mu(),e$t),t.d&&wX(t),DQt(),e}function lct(t){return t.j.c=dt(un,te,1,0,5,1),wL(t.c),Use(t.a),t}function as(){bxt.call(this),this.j.c=dt(un,te,1,0,5,1),this.a=-1}function okt(t,e,n){this.b=new r9(this),this.c=t,this.f=e,this.d=n}function Mce(t,e,n){t.d&&Lc(t.d.d,t),t.d=e,t.d&&pm(t.d.d,n,t)}function Ece(t){return!!t.a&&Ya(t.a.a).i!=0&&!(t.b&&Zq(t.b))}function Sce(t){return Eu(),!ec(t)&&!(!ec(t)&&t.c.g.c==t.d.g.c)}function Tce(t){return gN(),dm(ctt,t)?a(zi(ctt,t),337).Mf():null}function fC(t){return ct(t,13)?new dL((al(),a(t,13))):are(t.tc())}function Cce(t,e,n){return n.f.c.length>0?Eot(t.a,e,n):Eot(t.b,e,n)}function ckt(t,e,n){var i;return i=FC(n),wr(t.b,i,e),wr(t.c,e,n),e}function _m(t,e){var n,i;return n=Gg(t,e),i=null,n&&(i=n.Vd()),i}function xL(t,e){var n,i;return n=Gg(t,e),i=null,n&&(i=n.Yd()),i}function LM(t,e){var n,i;return n=B2(t,e),i=null,n&&(i=n.Yd()),i}function Jd(t,e){var n,i;return n=Gg(t,e),i=null,n&&(i=J8t(n)),i}function hct(t){var e;return e=t.Fh(t.i),t.i>0&&Aa(t.g,0,e,0,t.i),e}function ML(t){var e;return e=(si(t),new Eh((al(),t))),QC(e),cq(e)}function kc(t){return t.n||(pl(t),t.n=new uSt(Do,t),Bo(t)),t.n}function akt(t,e){var n;return n=new Bb,t.wd(n),n.a+="..",e.xd(n),n.a}function ukt(t,e){D9();var n;return n=a(zi(XF,t),47),!n||n.Li(e)}function ym(t){return ct(t,13)?a(t,13).Wb():!t.tc().hc()}function Ace(t){if(t.ee())return null;var e=t.n,n=KO[e];return n}function Yn(t){return Hn(t.b!=t.d.c),t.c=t.b,t.b=t.b.a,++t.a,t.c.c}function fct(t,e){En(e),Vr(t.a,t.c,e),t.c=t.c+1&t.a.length-1,pRt(t)}function dC(t,e){En(e),t.b=t.b-1&t.a.length-1,Vr(t.a,t.b,e),pRt(t)}function lkt(t){var e;e=t.pg(),this.a=ct(e,64)?a(e,64).oh():e.tc()}function kce(t,e,n){var i;i=Ffe();try{return dne(t,e,n)}finally{bae(i)}}function dct(t,e,n,i){return ct(n,49)?new DSt(t,e,n,i):new got(t,e,n,i)}function Lce(){return EN(),Y(Z(rB,1),jt,278,0,[RK,X1t,Z1t,Y1t])}function Pce(){return jM(),Y(Z(Hjt,1),jt,373,0,[Xm,vw,ww,Y_])}function Ice(){return $2(),Y(Z(njt,1),jt,304,0,[b6,m6,w6,v6])}function Rce(){return $C(),Y(Z(rjt,1),jt,362,0,[_6,cB,aB,y6])}function Dce(t){return lt(de(z(t,(Ft(),_w))))&&z(t,li)!=null}function Nce(t){return lt(de(z(t,(Ft(),_w))))&&z(t,li)!=null}function P2(t){return ST(),ct(t.g,153)?a(t.g,153):null}function Oce(t,e,n){var i;i=a(zi(t.g,n),57),Ut(t.a.c,new zs(e,i))}function hkt(t,e,n,i){var r;return r=i[e.g][n.g],lt(Yt(z(t.a,r)))}function fkt(t,e,n,i){this.e=i,this.d=null,this.c=t,this.a=e,this.b=n}function pct(t,e,n,i){this.d=t,this.n=e,this.g=n,this.o=i,this.p=-1}function dkt(t,e,n,i,r){this.c=t,this.e=e,this.d=n,this.b=i,this.a=r}function gct(t,e,n,i,r){this.i=t,this.a=e,this.e=n,this.j=i,this.f=r}function A1(t,e,n,i,r){Gi.call(this,t,e),this.a=n,this.b=i,this.c=r}function pC(){pC=P,cA=new mrt("UPPER",0),oA=new mrt("LOWER",1)}function Bce(){return ZM(),Y(Z(qbt,1),jt,360,0,[fF,uA,X6,lA])}function Fce(){return b7(),Y(Z(xwt,1),jt,320,0,[CQ,_wt,ywt,vwt])}function Uce(){return ip(),Y(Z(dvt,1),jt,226,0,[IF,wA,Rx,vA])}function zce(){return gd(),Y(Z(qQ,1),jt,197,0,[VQ,$Q,GE,rb])}function jce(){return Ju(),Y(Z(EA,1),jt,344,0,[lI,E0,uI,ub])}function Hce(){return Am(),Y(Z(xqt,1),jt,374,0,[pI,dI,ett,ntt])}function Gce(){return a7(),Y(Z(Nvt,1),jt,288,0,[JQ,Ivt,Dvt,Rvt])}function Wce(){return Cu(),Y(Z($Vt,1),jt,265,0,[fI,kd,ag,hI])}function $ce(){return nw(),Y(Z(nQ,1),jt,179,0,[nF,eQ,sy,ry])}function Vu(t,e,n){return e<0?yX(t,n):a(n,61).aj().fj(t,t.Qg(),e)}function pkt(t,e){var n;for(n=t.j.c.length;n=0&&t.a[n]===e[n];n--);return n<0}function vct(t,e){var n;n=t.q.getHours(),t.q.setFullYear(e+Fm),c4(t,n)}function R2(t,e){return e==0||t.e==0?t:e>0?LIt(t,e):BDt(t,-e)}function _ct(t,e){return e==0||t.e==0?t:e>0?BDt(t,e):LIt(t,-e)}function yct(t){t.b!=t.c&&(t.a=dt(un,te,1,8,5,1),t.b=0,t.c=0)}function D2(t){return Hn(t.a0;)i+=t.a[n],n-=n&-n;return i}function jkt(t,e){var n;for(n=e;n;)Wu(t,-n.i,-n.j),n=io(n);return t}function $g(t,e){return t.a?Ii(t.a,t.b):t.a=new ll(t.d),b2(t.a,e),t}function Hkt(t,e){for(En(e);t.a||(t.a=Vv(t.c,t)),t.a;)e.ie(pN(t))}function uV(t){return t.c&&t.d?act(t.c)+"->"+act(t.d):"e_"+lm(t)}function Jce(t,e,n){return a(e==null?Au(t.d,null,n):km(t.e,e,n),261)}function Qce(t,e,n){var i,r;i=Gg(t,n),r=null,i&&(r=J8t(i)),q0e(e,n,r)}function tae(t,e){var n;n=new _T,zg(n,"x",e.a),zg(n,"y",e.b),C2(t,n)}function eae(t,e){var n;n=new _T,zg(n,"x",e.a),zg(n,"y",e.b),C2(t,n)}function nae(t,e){return Qme(t,e,ct(e,62)&&(a(a(e,17),62).Bb&ao)!=0)}function fd(t){return si(t),ct(t,13)?new Eh((al(),a(t,13))):p$(t.tc())}function iae(){return Ht(),Y(Z(Ia,1),jt,69,0,[Wc,Tn,Qe,fi,on])}function rae(t){return T9(),function(){return kce(t,this,arguments);var e}}function sae(){return Date.now?Date.now():new Date().getTime()}function Mct(t){if(!t.c.Cc())throw K(new J);return t.a=!0,t.c.Ec()}function lV(t,e){if(t<0||t>e)throw K(new Uc(Elt(t,e,"index")));return t}function Ect(t,e){return ct(e,180)?le(t.c,a(e,180).c):!1}function oae(t){return t.d=3,t.c=Wue(t),t.d!=2?(t.d=0,!0):!1}function Gkt(t,e){var n,i;return n=(i=t.slice(0,e),bC(i,t)),n.length=e,n}function Kl(t,e,n){var i;return i=(mi(e,t.c.length),t.c[e]),t.c[e]=n,i}function hV(t,e,n,i){var r;return r=dt(Gn,pi,22,e,15,1),b1e(r,t,e,n,i),r}function Wkt(t,e,n,i){this.e=t,this.b=new Dt,this.d=e,this.a=n,this.c=i}function Mm(t,e){this.b=Rc,this.d=t,this.e=e,this.c=this.d+(""+this.e)}function $kt(){NW(this),this.b=new We(is,is),this.a=new We(Ps,Ps)}function PM(){PM=P;var t,e;JF=(Q3(),e=new x,e),QF=(t=new UG,t)}function Vkt(){xN(),this.b=(ts(),new vi),this.a=new vi,this.c=new Dt}function uu(t){var e;t.d=new OEt(t),t.e=new BEt(t),e=t[N_]|0,t[N_]=e+1}function mN(t,e){return($M(t),Bat(new gi(t,new Fct(e,t.a)))).a!=null}function cae(){return Mo(),Y(Z(zgt,1),jt,328,0,[Of,bx,aa,ua,Yo])}function aae(){return XC(),Y(Z(D0t,1),jt,276,0,[mJ,bJ,pJ,R0t,gJ])}function uae(){return bl(),Y(Z(gmt,1),jt,178,0,[Sx,D6,xw,Z4,Km])}function lae(){return WC(),Y(Z(Abt,1),jt,292,0,[Cbt,iQ,rQ,z6,j6])}function hae(){return G1(),Y(Z(MA,1),jt,225,0,[sb,ZQ,Svt,xA,Tvt])}function fae(){return t0(),Y(Z(Jp,1),jt,163,0,[On,vc,Md,ib,og])}function dae(){return Js(),Y(Z(bA,1),jt,110,0,[Ff,uh,ah,fp,cg])}function pae(t,e){var n;return n=e!=null?Zc(t,e):Ua(Ea(t.d,null)),uM(n)}function gae(t,e){var n;return n=e!=null?Zc(t,e):Ua(Ea(t.d,null)),uM(n)}function Sct(t,e){var n;return n=a(O2(t.d,e),27),n||a(O2(t.e,e),27)}function Tct(t,e){var n;return n=0,t&&(n+=t.f.a/2),e&&(n+=e.f.a/2),n}function pl(t){return t.t||(t.t=new TG(t),QL(new $xt(t),0,t.t)),t.t}function qkt(t){var e;return t.c||(e=t.r,ct(e,96)&&(t.c=a(e,24))),t.c}function Xkt(t,e){return dm(t.a,e)?(IM(t.a,e),!0):!1}function ec(t){return!t.c||!t.d?!1:!!t.c.g&&t.c.g==t.d.g}function mae(t){return Ah(t,"size"),or(KG(Zg(t,8),Q2)?Zg(t,8):Q2),new Bb}function Bp(t,e){return IEt((sC(),new hN(uIt(Y(Z(un,1),te,1,5,[t,e])))))}function bae(t){t&&Eue((Er(),w1t)),--JO,t&&QO!=-1&&(vte(QO),QO=-1)}function wae(t,e){var n,i;n=a(Jfe(t.c,e),13),n&&(i=n._b(),n.Pb(),t.d-=i)}function gC(t){Ao();var e;for(e=0;t.hc();)t.ic(),e=so(e,1);return FL(e)}function fV(t){var e,n,i;return e=t&eu,n=t>>22&eu,i=t<0?sp:0,ia(e,n,i)}function Zkt(t,e){var n,i;return n=e.kc(),i=Fat(t,n),!!i&&au(i.e,e.lc())}function Ykt(t){var e;return e=t.e+t.f,isNaN(e)&&MD(t.d)?t.d:e}function Kkt(t){this.b=t,$n.call(this,t),this.a=a(an(this.b.a,4),116)}function Jkt(t){this.b=t,M2.call(this,t),this.a=a(an(this.b.a,4),116)}function Jl(t,e,n,i,r){r5t.call(this,e,i,r),this.c=t,this.b=n}function Cct(t,e,n,i,r){OAt.call(this,e,i,r),this.c=t,this.a=n}function Act(t,e,n,i,r){BAt.call(this,e,i,r),this.c=t,this.a=n}function kct(t,e,n,i,r){r5t.call(this,e,i,r),this.c=t,this.a=n}function Qkt(t,e){this.d=new a2,this.a=t,this.b=e,this.e=new Oo(e.Qe())}function Fp(t,e){V1(),this.e=t,this.d=1,this.a=Y(Z(Gn,1),pi,22,15,[e])}function IM(t,e){return Es(e)?e==null?zlt(t.d,null):r6t(t.e,e):zlt(t.d,e)}function Lct(t,e,n){var i;return i=t.rg(e),i>=0?t.ug(i,n,!0):Z2(t,e,n)}function vae(t,e,n){var i;i=(si(t),new Eh((al(),t))),h1e(new ykt(i,e,n))}function SL(t,e,n){var i;i=(si(t),new Eh((al(),t))),xpe(new xkt(i,e,n))}function _ae(t,e,n){var i;return i=FC(n),YC(t.d,i,e,!1),wr(t.e,e,n),e}function yae(t,e,n){var i;return i=FC(n),YC(t.j,i,e,!1),wr(t.k,e,n),e}function t5t(t,e,n){var i;i=new Hrt(t.a),ZV(i,t.a.a),Au(i.d,e,n),t.a.a=i}function dV(t){var e;return e=new Np,Uo(e,t),Ct(e,(qt(),Ro),null),e}function Vg(t){var e,n;return si(t),e=_se(t.length),n=new qu(e),XL(n,t),n}function mC(t){var e,n;++t.j,e=t.g,n=t.i,t.g=null,t.i=0,t.uh(n,e),t.th()}function TL(t,e){t.Eh(t.i+1),XT(t,t.i,t.Ch(t.i,e)),t.sh(t.i++,e),t.th()}function Em(t,e){var n;return n=(mi(e,t.c.length),t.c[e]),Xit(t.c,e,1),n}function pV(t,e,n,i){var r;return r=dt(Gn,pi,22,e+1,15,1),Kve(r,t,e,n,i),r}function Pct(t,e,n,i){var r;for(r=0;re.o?-1:0}function t_(t,e){if(t<0||t>e)throw K(new Uc("Index: "+t+", Size: "+e))}function Oct(t,e,n){if(t<0||e>n||e=e)throw K(new Uc("Index: "+t+", Size: "+e))}function Tae(t,e){var n;n=t.q.getHours()+(e/60|0),t.q.setMinutes(e),c4(t,n)}function _N(t,e,n){this.a=t,this.b=e,this.c=n,Ut(t.q,this),Ut(e.g,this)}function CL(t,e,n,i){this.f=t,this.e=e,this.d=n,this.b=i,this.c=i?i.d:null}function Bct(t){l6t.call(this,t,0),BSt(this),this.b.b=this.b,this.b.a=this.b}function Fct(t,e){nD.call(this,e.rd(),e.qd()&-65),En(t),this.a=t,this.c=e}function L5t(t,e,n){this.d=(En(t),t),this.a=n&zm?n:n|64|Lf,this.c=e}function yN(){this.b=new Fr,this.a=new Fr,this.b=new Fr,this.a=new Fr}function P5t(){P5t=P,dWt=Xa(Ni(new as,(Mo(),Of),(Po(),aJ)),Yo,TB)}function I5t(){I5t=P,pWt=Ni(Ni(new as,(Mo(),Of),(Po(),G4)),aa,PE)}function mV(t,e){return!t.o&&(t.o=new lu((Ic(),pp),ug,t,0)),Rq(t.o,e)}function Cae(t,e){di(e,"Label management",1),uM(z(t,(gV(),J6))),Vn(e)}function Aae(t,e){var n;return n=t.c,e>0?a(Ee(n.a,e-1),8):null}function bV(t){var e;return e=t.b,e.b==0?null:a(H1(e,0),170).b}function Uct(t){var e,n,i,r;r=t.d,e=t.a,n=t.b,i=t.c,t.d=n,t.a=i,t.b=r,t.c=e}function kae(t,e){var n;t.A&&(n=a(js(t.b,e),114).n,n.d=t.A.d,n.a=t.A.a)}function wV(t,e,n){var i,r;if(n!=null)for(i=0;i=0,"Initial capacity must not be negative")}function N5t(t){this.b=(ts(),new vi),this.c=new vi,this.d=new vi,this.a=t}function O5t(t){t?(this.c=t,this.b=null):(this.c=null,this.b=new Dt)}function vV(t,e){F9.call(this,t,e),this.a=dt(O3e,te,398,2,0,1),this.b=!0}function _V(t,e,n){return XX(t,e,n,ct(e,62)&&(a(a(e,17),62).Bb&ao)!=0)}function zae(t,e,n){return a4(t,e,n,ct(e,62)&&(a(a(e,17),62).Bb&ao)!=0)}function jae(t,e,n){return tbe(t,e,n,ct(e,62)&&(a(a(e,17),62).Bb&ao)!=0)}function Hae(t,e){return ro(lt(Yt(z(t,(Ft(),Ym)))),lt(Yt(z(e,Ym))))}function Gae(){return KM(),Y(Z(vJ,1),jt,290,0,[F0t,LB,kB,B0t,CB,AB])}function Wae(){return C7(),Y(Z(W0t,1),jt,241,0,[SJ,EJ,CJ,TJ,AJ,IB])}function $ae(){return mP(),Y(Z(Z0t,1),jt,255,0,[RB,V0t,X0t,$0t,q0t,kJ])}function Vae(){return QM(),Y(Z(emt,1),jt,256,0,[V4,K0t,tmt,Q0t,J0t,Y0t])}function qae(){return E7(),Y(Z(Tbt,1),jt,291,0,[tQ,Ebt,QJ,Mbt,Sbt,eF])}function Xae(){return Ls(),Y(Z(Cvt,1),jt,83,0,[ob,dp,Ox,Nx,Sd,Gc])}function Zae(){return JC(),Y(Z(S$t,1),jt,308,0,[dF,hQ,dQ,fQ,pQ,lQ])}function Yae(){return md(),Y(Z(kwt,1),jt,224,0,[LQ,Q6,tI,SF,MF,EF])}function Kae(){return S7(),Y(Z(vvt,1),jt,289,0,[XQ,mvt,wvt,pvt,bvt,gvt])}function B5t(){B5t=P,F$t=UC(UC(ert(new as,(ZM(),uA)),(JC(),dF)),hQ)}function xN(){xN=P,new kr("org.eclipse.elk.addLayoutConfig"),iVt=new Sb}function F5t(){F5t=P,q7(),b_t=is,xXt=Ps,w_t=new Rb(is),MXt=new Rb(Ps)}function U5t(t,e,n){Ai();var i;return i=Z1(t,e),n&&i&&vse(t)&&(i=null),i}function dt(t,e,n,i,r,c){var l;return l=DRt(r,i),r!=10&&Y(Z(t,c),e,n,r,l),l}function Jae(t,e,n){return IEt((sC(),new hN(uIt(Y(Z(un,1),te,1,5,[t,e,n])))))}function z5t(t,e){var n;return n=e.kc(),ts(),new N5(n,i8t(t.e,n,a(e.lc(),13)))}function j5t(t,e){var n,i;return n=t.a-e.a,i=t.b-e.b,y.Math.sqrt(n*n+i*i)}function zct(t,e,n){var i;i=t.b[n.c.o][n.o],i.b+=e.b,i.c+=e.c,i.a+=e.a,++i.a}function Qae(t,e,n){var i,r;return r=t.length,i=n=t.i)throw K(new kW(e,t.i));return t.g[e]}function G5t(t,e,n){if(LC(t,n),n!=null&&!t.Li(n))throw K(new k5);return n}function Cf(t,e){return I$(e,"Horizontal alignment cannot be null"),t.b=e,t}function kL(t,e){var n;return n=t.rg(e),n>=0?t.ug(n,!0,!0):Z2(t,e,!0)}function LL(t,e,n){var i,r;return r=(i=nE(t.b,e),i),r?Z7(BL(t,r),n):null}function tue(t){return ct(t,159)?""+a(t,159).a:t==null?null:Yc(t)}function eue(t){return ct(t,159)?""+a(t,159).a:t==null?null:Yc(t)}function DM(t){var e;return Vo(t)&&(e=0-t,!isNaN(e))?e:N1(zM(t))}function nue(t){var e;return t=t>2?t:2,e=kat(t),t>e?(e<<=1,e>0?e:Q2):e}function PL(t){var e,n;return e=t+128,n=(kTt(),E1t)[e],!n&&(n=E1t[e]=new Wj(t)),n}function bC(t,e){return UL(e)!=10&&Y(fu(e),e.rl,e.__elementTypeId$,UL(e),t),t}function e_(t,e){return e.e==0||t.e==0?AE:(tE(),LX(t,e))}function iue(t){for(;!t.a;)if(!Qct(t.b,new iH(t)))return!1;return!0}function rue(t){for(;!t.a;)if(!BTt(t.c,new oH(t)))return!1;return!0}function W5t(t,e){if(e.a)throw K(new sc(qOt));Ir(t.a,e),e.a=t,!t.j&&(t.j=e)}function yV(t,e,n,i,r,c){pct.call(this,e,i,r,c),this.c=t,this.b=n}function $5t(t,e,n,i,r,c){pct.call(this,e,i,r,c),this.c=t,this.a=n}function lu(t,e,n,i){this.Gi(),this.a=e,this.b=t,this.c=new _ot(this,e,n,i)}function IL(t,e){this.e=e,this.a=bPt(t),this.a<54?this.f=AM(t):this.c=oP(t)}function sue(t,e){t.a.Ld(e.d,t.b)>0&&(Ut(t.c,new Yst(e.c,e.d,t.d)),t.b=e.d)}function xV(t){t.a=dt(Gn,pi,22,t.b+1,15,1),t.c=dt(Gn,pi,22,t.b,15,1),t.d=0}function V5t(){V5t=P,qzt=Vi((EN(),Y(Z(rB,1),jt,278,0,[RK,X1t,Z1t,Y1t])))}function q5t(){q5t=P,nWt=Vi((nw(),Y(Z(nQ,1),jt,179,0,[nF,eQ,sy,ry])))}function X5t(){X5t=P,Gjt=Vi((jM(),Y(Z(Hjt,1),jt,373,0,[Xm,vw,ww,Y_])))}function Z5t(){Z5t=P,ijt=Vi(($2(),Y(Z(njt,1),jt,304,0,[b6,m6,w6,v6])))}function Y5t(){Y5t=P,sjt=Vi(($C(),Y(Z(rjt,1),jt,362,0,[_6,cB,aB,y6])))}function K5t(){K5t=P,E$t=Vi((ZM(),Y(Z(qbt,1),jt,360,0,[fF,uA,X6,lA])))}function J5t(){J5t=P,eVt=Vi((b7(),Y(Z(xwt,1),jt,320,0,[CQ,_wt,ywt,vwt])))}function Q5t(){Q5t=P,CVt=Vi((ip(),Y(Z(dvt,1),jt,226,0,[IF,wA,Rx,vA])))}function tLt(){tLt=P,AVt=Vi((gd(),Y(Z(qQ,1),jt,197,0,[VQ,$Q,GE,rb])))}function eLt(){eLt=P,jVt=Vi((Ju(),Y(Z(EA,1),jt,344,0,[lI,E0,uI,ub])))}function nLt(){nLt=P,Mqt=Vi((Am(),Y(Z(xqt,1),jt,374,0,[pI,dI,ett,ntt])))}function iLt(){iLt=P,GVt=Vi((a7(),Y(Z(Nvt,1),jt,288,0,[JQ,Ivt,Dvt,Rvt])))}function rLt(){rLt=P,VVt=Vi((Cu(),Y(Z($Vt,1),jt,265,0,[fI,kd,ag,hI])))}function hu(){hu=P,jf=new CW(pE,0),lb=new CW(y4,1),fh=new CW(gE,2)}function RL(){RL=P,Wbt=new vrt(jm,0),lF=new vrt("IMPROVE_STRAIGHTNESS",1)}function MN(){MN=P,awt=new yrt("LEAF_NUMBER",0),EQ=new yrt("NODE_SIZE",1)}function EN(){EN=P,RK=new U9("All",0),X1t=new VEt,Z1t=new iSt,Y1t=new qEt}function Ya(t){return t.b||(t.b=new lSt(Do,t),!t.a&&(t.a=new oL(t,t))),t.b}function DL(t,e){if(e<0)throw K(new Uc(eFt+e));return pkt(t,e+1),Ee(t.j,e)}function N2(t){var e;if(!u_(t))throw K(new J);return t.d=1,e=t.c,t.c=null,e}function SN(t){var e,n;return n=t.length,e=dt(nl,Pf,22,n,15,1),$Ct(t,0,n,e,0),e}function MV(t,e){var n;this.f=t,this.b=e,n=a(zi(t.b,e),264),this.c=n?n.b:null}function oue(t,e,n){var i;return i=M6t(t,e,n),t.b=new WV(i.c.length),uht(t,i)}function cue(t,e){var n;return n=a(XM(t.d,e),13),n?i8t(t.e,e,n):null}function Wct(t,e){var n;return n=a(IM(t.c,e),353),n?(tot(n),n.e):null}function aue(t){var e,n;if(!t.b)return null;for(n=t.b;e=n.a[0];)n=e;return n}function uue(t,e,n){var i;return i=FC(n),YC(t.g,i,e,!1),YC(t.i,e,n,!1),e}function NL(t,e,n,i){var r;i=(SM(),i||j1t),r=t.slice(e,n),Alt(r,t,e,n,-e,i)}function Xu(t,e,n,i,r){return e<0?Z2(t,n,i):a(n,61).aj().cj(t,t.Qg(),e,i,r)}function lue(t,e){return e0?qi:Pc(t,Vs)<0?Vs:or(t)}function gue(t,e){if(!t)throw K(new yn(Cbe("Enum constant undefined: %s",e)))}function TN(t){cD(this),this.g=t?W4t(t,t.Od()):null,this.f=t,tN(this),this.Pd()}function Qd(t,e,n,i,r,c,l){zV.call(this,e,i,r,c,l),this.c=t,this.b=n}function dd(t,e,n){var i,r;for(i=10,r=0;r=0?(t.gd(n),!0):!1}function LV(t,e){var n;return n=xr(t.d,e),n>=0?g7(t,n,!0,!0):Z2(t,e,!0)}function vue(t,e){var n;for(n=0;t.e!=t.i._b();)Iee(e,ci(t),Xt(n)),n!=qi&&++n}function cLt(t,e){var n,i,r;for(r=0,i=t.tc();i.hc();)n=i.ic(),Vr(e,r++,n);return e}function P1(t,e,n){var i;if(e==null)throw K(new s2);return i=Gg(t,e),Vce(t,e,n),i}function I1(t){if(t<0)throw K(new yn("tolerance ("+t+") must be >= 0"));return t}function PV(t){var e;return e=t.b.c.length==0?null:Ee(t.b,0),e!=null&&bat(t,0),e}function aLt(t,e){var n,i,r;for(i=0,r=e.length;i=t.a.c.length;)Ut(t.a,new Fr);return a(Ee(t.a,e),15)}function yue(t){return Zut(t,(NM(),x1t))<0?-Bee(zM(t)):t.l+t.m*rx+t.h*o0}function uLt(t){var e,n;return e=t/60|0,n=t%60,n==0?""+e:""+e+":"+(""+n)}function xue(t,e){var n;return n=ffe(t.e.c,e.e.c),n==0?ro(t.e.d,e.e.d):n}function B2(t,e){var n=t.a[e],i=(fq(),AK)[typeof n];return i?i(n):qat(typeof n)}function lLt(t,e){return e==(h$(),h$(),Vzt)?t.toLocaleLowerCase():t.toLowerCase()}function UL(t){return t.__elementTypeCategory$==null?10:t.__elementTypeCategory$}function Kct(t){return(t.i&2?"interface ":t.i&1?"":"class ")+(Vd(t),t.o)}function Mue(t,e,n){var i;return i=t.a.e[a(e.a,8).o]-t.a.e[a(n.a,8).o],Tr(oCt(i))}function hLt(t,e){var n;for(++t.d,++t.c[e],n=e+1;n=0&&et||t>e)throw K(new kit("fromIndex: 0, toIndex: "+t+wft+e))}function PN(t,e){var n,i;for(i=t.tc();i.hc();)n=a(i.ic(),68),Ct(n,(Ft(),xx),e)}function kue(t,e,n){var i;i=y.Math.max(0,t.b/2-.5),VC(n,i,1),Ut(e,new CMt(n,i))}function Lue(t){var e;return e=lt(Yt(z(t,(qt(),up)))),e<0&&(e=0,Ct(t,up,e)),e}function r_(t){wD();var e,n;for(n=cpt,e=0;en&&(n=t[e]);return n}function Pue(){r3t();for(var t=yK,e=0;e=t.i)throw K(new kW(e,t.i));return t.zh(e,t.g[e])}function RLt(t,e,n){if(LC(t,n),!t.Nj()&&n!=null&&!t.Li(n))throw K(new k5);return n}function _C(t,e){var n;for(n=t;io(n);)if(n=io(n),n==e)return!0;return!1}function Nue(t,e){return e&&t.b[e.g]==e?(Vr(t.b,e.g,null),--t.c,!0):!1}function Ql(t,e){var n;return n=e.c,e.a.b=e.b,e.b.a=e.a,e.a=e.b=null,e.c=null,--t.b,n}function pd(t,e){var n,i,r,c;for(En(e),i=t.c,r=0,c=i.length;r>5,r=e&31,i=ns(qv(t.n[n][c],or(Yd(r,1))),3),i}function DLt(t,e){for(;e[0]=0;)++e[0]}function NLt(t,e){yD.call(this),nat(this),this.a=t,this.c=!0,this.b=e.d,this.f=e.e}function OLt(t,e){return Ef(),I1(Y1),y.Math.abs(t-e)<=Y1||t==e||isNaN(t)&&isNaN(e)}function eat(t){return t.a<54?t.f<0?-1:t.f>0?1:0:(!t.c&&(t.c=KL(t.f)),t.c).e}function BLt(t){return t.c&&t.d?t.c.g+"("+t.c+")->"+t.d.g+"("+t.d+")":"e_"+lm(t)}function FLt(t,e,n){var i,r;i=e;do r=lt(t.p[i.o])+n,t.p[i.o]=r,i=t.a[i.o];while(i!=e)}function Bue(t,e,n){var i,r,c;for(r=e[n],i=0;i=14&&e<=16))),t}function DV(t,e){Ao();var n;for(si(t),si(e),n=!1;e.hc();)n=n|t.nc(e.ic());return n}function Ah(t,e){if(t<0)throw K(new yn(e+" cannot be negative but was: "+t));return t}function NV(t,e){var n,i;for(i=new H(t);i.an)throw K(new $v(e,n));return new Fst(t,e)}function a_(t,e){var n;n=t.s,t.s=e,t.Db&4&&!(t.Db&1)&&Bi(t,new cV(t,4,n,t.s))}function OM(t,e){var n;n=t.t,t.t=e,t.Db&4&&!(t.Db&1)&&Bi(t,new cV(t,5,n,t.t))}function iat(t,e){var n;n=t.d,t.d=e,t.Db&4&&!(t.Db&1)&&Bi(t,new cV(t,2,n,t.d))}function FV(t,e){var n;n=t.F,t.F=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,5,n,e))}function Uue(t,e){var n,i,r;return n=(i=(am(),r=new VS,r),e&&IDt(i,e),i),rPt(n,t),n}function Tm(){Tm=P,oF=new vW("BARYCENTER",0),sA=new vW(EBt,1),cF=new vW(SBt,2)}function IN(){IN=P,z0t=new uW("ARD",0),PB=new uW("MSD",1),_J=new uW("MANUAL",2)}function Fo(){Fo=P,sF=new pW(cx,0),Ga=new pW("INPUT",1),ba=new pW("OUTPUT",2)}function qLt(){Zl(),this.b=(ts(),new vi),this.f=new vi,this.g=new vi,this.e=new vi}function rat(t,e,n,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=1,this.c=t,this.a=n}function sat(t,e,n,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=2,this.c=t,this.a=n}function oat(t,e,n,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=6,this.c=t,this.a=n}function cat(t,e,n,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=7,this.c=t,this.a=n}function aat(t,e,n,i,r){this.d=e,this.j=i,this.e=r,this.o=-1,this.p=4,this.c=t,this.a=n}function uat(t,e){return Ef(),I1(Y1),y.Math.abs(t-e)<=Y1||t==e||isNaN(t)&&isNaN(e)}function zue(){return H7(),Y(Z(vgt,1),jt,228,0,[wgt,pgt,ggt,dgt,BK,bgt,mgt,fgt,hgt])}function jue(){return r0(),Y(Z(to,1),jt,86,0,[kl,Uf,Pl,Bh,hh,lh,Nu,Il,Ll])}function Hue(){return ma(),Y(Z(Pvt,1),jt,239,0,[WE,SA,OF,TA,BF,FF,Fx,KQ,NF])}function XLt(){XLt=P,Ozt=Y(Z(Gn,1),pi,22,15,[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15])}function ZLt(){ZLt=P,MWt=Xa(Ni(Ni(new as,(Mo(),aa),(Po(),hJ)),ua,uJ),Yo,lJ)}function UV(){return kQ||(kQ=new fNt,CC(kQ,Y(Z(j4,1),te,154,0,[new Sj]))),kQ}function _o(t,e,n){return GM(t,e),kh(t,n),a_(t,0),OM(t,1),d_(t,!0),f_(t,!0),t}function YLt(t,e){var n;return ct(e,38)?t.c.vc(e):(n=Rq(t,e),aP(t,e),n)}function vr(t){var e;return ct(t,78)?t:(e=t&&t[vZ],e||(e=new vIt(t),Ki(e)),e)}function lat(t){var e,n;if(t==0)return 32;for(n=0,e=1;!(e&t);e<<=1)++n;return n}function Gue(t,e){var n;return n=t.c,e=0),ede(t.d,t.c)<0&&(t.a=t.a-1&t.d.a.length-1,t.b=t.d.c),t.c=-1}function jV(t,e){t.j>0&&t.c0&&t.e!=0&&jV(t.g,e/t.j*t.g.d))}function nPt(t,e){var n;n=t.c,t.c=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,1,n,t.c))}function iPt(t,e){var n;n=t.b,t.b=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,0,n,t.b))}function GL(t,e){var n;n=t.k,t.k=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,2,n,t.k))}function dat(t,e){var n;n=t.f,t.f=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,8,n,t.f))}function pat(t,e){var n;n=t.i,t.i=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,7,n,t.i))}function rPt(t,e){var n;n=t.a,t.a=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,8,n,t.a))}function sPt(t,e){var n;n=t.d,t.d=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,1,n,t.d))}function oPt(t,e){var n;n=t.c,t.c=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,1,n,t.c))}function gat(t,e){var n;n=t.c,t.c=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,4,n,t.c))}function HV(t,e){var n;n=t.D,t.D=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,2,n,t.D))}function cPt(t,e){var n;n=t.b,t.b=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,0,n,t.b))}function Xue(t,e,n){var i;t.b=e,t.a=n,i=(t.a&512)==512?new Ixt:new jh,t.c=Lwe(i,t.b,t.a)}function aPt(t,e){return Om(t.e,e)?(Jo(),Yct(e)?new ND(e,t):new X5(e,t)):new xEt(e,t)}function TC(t,e){return me(),Es(t)?cot(t,hi(e)):Gb(t)?_Ct(t,Yt(e)):Hb(t)?Ire(t,de(e)):t.vd(e)}function Zue(t){var e=/function(?:\s+([\w$]+))?\s*\(/,n=e.exec(t);return n&&n[1]||_Z}function Yue(t,e){var n,i;return n=t.o+t.p,i=e.o+e.p,n>>31;i!=0&&(t[n]=i)}function bPt(t){var e;return Pc(t,0)<0&&(t=gst(t)),e=or(E1(t,32)),64-(e!=0?MP(e):MP(or(t))+32)}function nle(t){var e,n;for(n=t.c.a.Xb().tc();n.hc();)e=a(n.ic(),204),znt(e,new zCt(e.f))}function wPt(t){var e,n;for(n=t.c.a.Xb().tc();n.hc();)e=a(n.ic(),204),jnt(e,new g8t(e.e))}function vPt(t){this.d=t,this.c=t.c.Tb().tc(),this.b=null,this.a=null,this.e=(Ao(),Ao(),m1t)}function _Pt(t){this.e=t,this.d=new L9(tq(bot(this.e)._b())),this.c=this.e.a,this.b=this.e.c}function WV(t){this.b=t,this.a=dt(Gn,pi,22,t+1,15,1),this.c=dt(Gn,pi,22,t,15,1),this.d=0}function ile(t){t.a=null,t.e=null,t.b.c=dt(un,te,1,0,5,1),t.f.c=dt(un,te,1,0,5,1),t.c=null}function nr(t,e){var n,i;i=(n=new fst,n),i.n=e,ni((!t.s&&(t.s=new Wt(Ra,t,21,17)),t.s),i)}function Cr(t,e){var n,i;n=(i=new UG,i),n.n=e,ni((!t.s&&(t.s=new Wt(Ra,t,21,17)),t.s),n)}function kh(t,e){var n;n=t.zb,t.zb=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,1,n,t.zb))}function $V(t,e){var n;n=t.xb,t.xb=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,3,n,t.xb))}function VV(t,e){var n;n=t.yb,t.yb=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,2,n,t.yb))}function qV(t,e,n){var i,r,c;return r=_m(e,"labels"),i=new sEt(t,n),c=(Nwe(i.a,i.b,r),r),c}function Rr(t,e,n,i,r,c,l,f,g,b,v,M,k){return c9t(t,e,n,i,r,c,l,f,g,b,v,M,k),iut(t,!1),t}function yo(t,e){var n,i,r;for(En(e),n=!1,r=e.tc();r.hc();)i=r.ic(),n=n|t.nc(i);return n}function yPt(t){if(t){if(t.Wb())throw K(new J);return t.cd(t._b()-1)}return mkt(null.tc())}function rle(t){if(En(t),t.length==0)throw K(new yf("Zero length BigInteger"));$we(this,t)}function NN(){NN=P,Fbt=new mW("NO",0),oQ=new mW("GREEDY",1),Bbt=new mW("LOOK_BACK",2)}function XV(){XV=P,PA=new Lxt,ltt=Y(Z(Ra,1),$_,158,0,[]),tXt=Y(Z(ph,1),Jpt,53,0,[])}function xPt(){xPt=P,Kjt=Vi((Ke(),Y(Z(QK,1),jt,232,0,[gs,Hr,rs,uc,bu,Jc,ef])))}function sle(){return So(),Y(Z(LJ,1),jt,233,0,[DB,Al,q4,NB,J_,Q_,A6,IE,RE,OB])}function ole(t,e){return jM(),t==Xm&&e==vw||t==vw&&e==Xm||t==Y_&&e==ww||t==ww&&e==Y_}function cle(t,e){return jM(),t==Xm&&e==ww||t==Xm&&e==Y_||t==vw&&e==Y_||t==vw&&e==ww}function MPt(t,e){return lt(Yt(GW(nP(Vh(new gi(null,new Ei(t.c.b,16)),new n9(t)),e))))}function _at(t,e){return lt(Yt(GW(nP(Vh(new gi(null,new Ei(t.c.b,16)),new Ys(t)),e))))}function EPt(t,e){e?t.B==null&&(t.B=t.D,t.D=null):t.B!=null&&(t.D=t.B,t.B=null)}function ale(t){var e;return ct(t,182)?(e=a(t,182),new Ait(e.a)):(Ao(),new d5(t))}function SPt(t){var e;return e=skt(t),zb(e.a,0)?(iM(),iM(),$1t):(iM(),new ost(e.b))}function TPt(t){var e;return e=skt(t),zb(e.a,0)?(iM(),iM(),$1t):(iM(),new ost(e.c))}function CPt(t){fot.call(this),this.b=lt(Yt(z(t,(qt(),nf)))),this.a=a(z(t,ig),197)}function APt(){this.c=new I9(0),this.b=new I9($Bt),this.d=new I9(WBt),this.a=new I9(rY)}function ON(t){this.b=(si(t),new Eh((al(),t))),this.a=new Dt,this.d=new Dt,this.e=new go}function ep(){ep=P,eJ=new Nr,tJ=new mr,$gt=new a1,Wgt=new dc,Vgt=new vh,qgt=new _g}function BN(){BN=P,yJ=new lW("GREEDY",0),H0t=new lW("DEPTH_FIRST",1),xJ=new lW(hY,2)}function Kh(){Kh=P,hy=new SW("OUTSIDE",0),cb=new SW("INSIDE",1),DF=new SW("FIXED",2)}function kPt(){kPt=P,EWt=UC(jte(Ni(Ni(new as,(Mo(),aa),(Po(),hJ)),ua,uJ),Yo),lJ)}function ule(t){return t.b.c.g.j==(Ke(),rs)?a(z(t.b.c.g,(Ft(),li)),11):t.b.c}function LPt(t){return t.b.d.g.j==(Ke(),rs)?a(z(t.b.d.g,(Ft(),li)),11):t.b.d}function PPt(t){var e;if(t.b==-2){if(t.e==0)e=-1;else for(e=0;t.a[e]==0;e++);t.b=e}return t.b}function IPt(t){var e,n,i;for(e=0,i=t.tc();i.hc();)n=i.ic(),e+=n!=null?Yr(n):0,e=~~e;return e}function yat(t,e,n){var i,r;for(r=qn(t,0);r.b!=r.d.c;)i=a(Yn(r),9),i.a+=e,i.b+=n;return t}function WL(t){var e,n,i;for(e=0,i=t.tc();i.hc();)n=Yt(i.ic()),e+=(En(n),n);return e/t._b()}function RPt(t){var e;return t==0?"UTC":(t<0?(t=-t,e="UTC+"):e="UTC-",e+uLt(t))}function lle(t,e){we();var n,i;for(i=new Dt,n=0;n0&&(this.g=this.Fh(this.i+(this.i/8|0)+1),t.zc(this.g))}function NPt(t,e){return Ef(),I1(yd),y.Math.abs(0-e)<=yd||e==0||isNaN(0)&&isNaN(e)?0:t/e}function _s(t,e){PD.call(this,eXt,t,e),this.b=this,this.a=gu(t.mg(),Ve(this.e.mg(),this.c))}function $L(t,e){var n,i;for(i=e.length,n=0;nr&&e.ac&&e.b1||t.hc())return++t.a,t.g=0,e=t.i,t.hc(),e;throw K(new J)}function VPt(t){var e;t.d==null?(++t.e,t.f=0,W6t(null)):(++t.e,e=t.d,t.d=null,t.f=0,W6t(e))}function zN(t,e){var n;ct(e,109)?(a(t.c,81).ij(),n=a(e,109),lPt(t,n)):a(t.c,81).Gc(e)}function Cm(t){return ct(t,193)?ML(a(t,193)):ct(t,160)?a(t,160).a:ct(t,49)?new Pv(t):new sM(t)}function _le(t,e,n){return t==(Tm(),cF)?new Qf:pu(e,1)!=0?new Uit(n.length):new p3t(n.length)}function Bi(t,e){var n,i,r;if(n=t.cg(),n!=null&&t.fg())for(i=0,r=n.length;i=128?!1:t<64?CT(ns(Yd(1,t),n),0):CT(ns(Yd(1,t-64),e),0)}function Cle(t){var e;return e=a(z(t,(Ft(),wc)),69),t.j==(Ke(),rs)&&(e==(Ht(),on)||e==Qe)}function QV(t,e){var n;return ct(e,13)?(n=(al(),a(e,13)),t.oc(n)):DV(t,a(si(e),20).tc())}function Ale(t){HEt();var e;return mMt(uQ,t)||(e=new vt,e.a=t,i$(uQ,t,e)),a(js(uQ,t),573)}function tq(t){return ts(),t<3?(Ah(t,"expectedSize"),t+1):t>22),r=t.h+e.h+(i>>22),ia(n&eu,i&eu,r&sp)}function n6t(t,e){var n,i,r;return n=t.l-e.l,i=t.m-e.m+(n>>22),r=t.h-e.h+(i>>22),ia(n&eu,i&eu,r&sp)}function nq(t,e,n,i){return n==1?(!t.n&&(t.n=new Wt(ic,t,1,7)),$s(t.n,e,i)):vlt(t,e,n,i)}function i6t(t,e){if(e==null)return!1;for(;t.a!=t.b;)if(Fi(e,XN(t)))return!0;return!1}function Tat(t){return t.a.hc()?!0:t.a!=t.d?!1:(t.a=new Jot(t.e.d),t.a.hc())}function Or(t,e){var n,i;return n=e.yc(),i=n.length,i==0?!1:(Kst(t.c,t.c.length,n),!0)}function Rle(t,e,n){var i,r;for(r=e.Tb().tc();r.hc();)i=a(r.ic(),38),t.Yb(i.kc(),i.lc(),n);return t}function r6t(t,e){var n;return n=t.a.get(e),n===void 0?++t.d:(t.a[GZ](e),--t.c,t$(t.b)),n}function FM(t,e){this.b=t,this.e=e,this.d=e.j,this.f=(Jo(),a(t,61).bj()),this.k=gu(e.e.mg(),t)}function s6t(t){this.o=t,this.g=new Dt,this.j=new Fr,this.n=new Fr,this.e=new Dt,this.b=new Dt}function o6t(t){this.a=dt(yWt,wt,1704,t.length,0,2),this.b=dt(xWt,wt,1705,t.length,0,2),this.c=new PIt}function Dle(t,e){t.d==(Js(),ah)||t.d==cg?a(e.a,57).c.nc(a(e.b,57)):a(e.b,57).c.nc(a(e.a,57))}function c6t(t,e){var n,i;for(i=new H(t.b);i.ae?1:t==e?0:isNaN(t)?isNaN(e)?0:1:-1}function u6t(t,e){return!t||!e||t==e?!1:VIt(t.d.c,e.d.c+e.d.b)&&VIt(e.d.c,t.d.c+t.d.b)}function l6t(t,e){ED(t>=0,"Negative initial capacity"),ED(e>=0,"Non-positive load factor"),uu(this)}function h6t(t){var e,n;return n=(e=new Gk,e),kh(n,"T"),ni((!t.d&&(t.d=new Gu(wu,t,11)),t.d),n),n}function f6t(t,e){var n;return n=od(e.a._b()),qc(ALt(new gi(null,new Ei(e,1)),t.i),new eEt(t,n)),n}function Cat(t){var e,n,i;for(e=new Fr,i=qn(t.d,0);i.b!=i.d.c;)n=a(Yn(i),170),Xi(e,n.c);return e}function Aat(t){var e,n,i,r;for(e=1,n=0,r=t._b();n>=1);return e}function Ole(t){var e;return e=rw(t),e>pft?is:e<-34028234663852886e22?Ps:e}function Y(t,e,n,i,r){return r.ql=t,r.rl=e,r.sl=B,r.__elementTypeId$=n,r.__elementTypeCategory$=i,r}function UM(t,e,n,i,r){var c,l;for(l=n;l<=r;l++)for(c=e;c<=i;c++)g_(t,c,l)||G7(t,c,l,!0,!1)}function Ble(t){var e,n,i,r;for(n=t.a,i=0,r=n.length;it.f,n=t.u+t.e[t.o.o]*t.d>t.f*t.s*t.d,e||n}function $N(t,e,n){var i,r;return i=new vV(e,n),r=new it,t.b=VDt(t,t.b,i,r),r.b||++t.c,t.b.b=!1,r.d}function Rat(t){var e;return(!t.c||!(t.Bb&1)&&t.c.Db&64)&&(e=wl(t),ct(e,96)&&(t.c=a(e,24))),t.c}function F1(t){var e,n;for(n=new H(t.a.b);n.a=0&&t[i]===e[i];i--);return i<0?0:KG(ns(t[i],uo),ns(e[i],uo))?-1:1}function Xle(t){var e;return t==null?!0:(e=t.length,e>0&&t.charCodeAt(e-1)==58&&!uq(t,kA,LA))}function IC(t){switch(t.g){case 1:return WBt;default:case 2:return 0;case 3:return rY;case 4:return $Bt}}function cq(t){switch(t._b()){case 0:return p1t;case 1:return new aTt(t.tc().ic());default:return new hN(t)}}function Zle(t,e){Ao();var n,i;for(Hot(e,"predicate"),i=0;t.hc();i++)if(n=t.ic(),e.Mb(n))return i;return-1}function Yle(t,e,n){if(si(e),n.hc())for(rrt(e,t.Lb(n.ic()));n.hc();)rrt(e,t.c),rrt(e,t.Lb(n.ic()));return e}function aq(t,e){var n;return e===t?!0:ct(e,238)?(n=a(e,238),Fi(t.Hc(),n.Hc())):!1}function Pc(t,e){var n;return Vo(t)&&Vo(e)&&(n=t-e,!isNaN(n))?n:Zut(Vo(t)?gl(t):t,Vo(e)?gl(e):e)}function KL(t){return V1(),t<0?t!=-1?new Tut(-1,-t):PK:t<=10?z1t[Tr(t)]:new Tut(1,t)}function Kle(){Ai();var t;return mtt||(t=Gee(Z1("M",!0)),t=jD(Z1("M",!1),t),mtt=t,mtt)}function h_(t,e,n){var i,r;return r=(i=new BG,i),_o(r,e,n),ni((!t.q&&(t.q=new Wt(ph,t,11,10)),t.q),r),r}function uq(t,e,n){var i,r;for(i=0,r=t.length;i=t.b.c.length||(jat(t,2*e+1),n=2*e+2,ne)throw K(new yn(cO+t+WOt+e));if(t<0||e>n)throw K(new kit(cO+t+vft+e+wft+n))}function Qle(t,e,n){if(e<0)throw K(new Uc(eFt+e));e0)return nC(e-1,t.a.c.length),Em(t.a,e-1);throw K(new F)}function N6t(t,e){var n;if(e.c.length!=0){for(;blt(t,e);)R7(t,e,!1);n=GN(e),t.a&&(t.a.If(n),N6t(t,n))}}function ihe(t,e){var n,i;for(i=qn(t,0);i.b!=i.d.c;)n=a(Yn(i),204),n.e.length>0&&(e.td(n),n.i&&Nhe(n))}function gq(t,e,n){var i,r,c;for(i=new Fr,c=qn(n,0);c.b!=c.d.c;)r=a(Yn(c),9),Xi(i,new Oo(r));khe(t,e,i)}function O6t(t,e){var n;return n=new OX((t.f&256)!=0,t.i,t.a,t.d,(t.f&16)!=0,t.j,t.g,e),t.e!=null||(n.c=t),n}function rhe(t,e){var n,i;return n=a(t.d.$b(e),13),n?(i=t.e.Oc(),i.oc(n),t.e.d-=n._b(),n.Pb(),i):null}function VN(t){var e,n,i,r;for(r=0,n=0,i=t.length;n1||e>=0&&t.b<3)}function Qb(t){var e;++t.j,t.i==0?t.g=null:t.i>>0).toString(16):t.toString()}function mq(t,e){t.D==null&&t.B!=null&&(t.D=t.B,t.B=null),HV(t,e==null?null:(En(e),e)),t.C&&t.Kj(null)}function che(t,e){var n,i;for(n=t.a.length-1,t.c=t.c-1&n;e!=t.c;)i=e+1&n,Vr(t.a,e,t.a[i]),e=i;Vr(t.a,t.c,null)}function ahe(t,e){var n,i;for(n=t.a.length-1;e!=t.b;)i=e-1&n,Vr(t.a,e,t.a[i]),e=i;Vr(t.a,t.b,null),t.b=t.b+1&n}function uhe(t,e){aD(!this.b),aD(!this.d),UW(nM(t.c)==0),UW(e.d.c+e.e.c==0),UW(!0),this.b=t,this.d=this.ec(e)}function U6t(t,e,n,i,r){i?Zpe(t,e):(l1e(t,e,r),x2e(t,e,n)),e.c.length>1&&(we(),gc(e,t.b),_ve(t.c,e))}function lhe(t,e,n,i,r){e==0||i==0||(e==1?r[i]=Mut(r,n,i,t[0]):i==1?r[e]=Mut(r,t,e,n[0]):Z0e(t,n,r,e,i))}function hhe(t){var e,n;if(t==null)return null;for(e=0,n=t.length;e=t.c.b:t.a<=t.c.b))throw K(new J);return e=t.a,t.a+=t.c.c,++t.b,Xt(e)}function HM(t){var e,n;return t>-129&&t<128?(e=t+128,n=(PTt(),L1t)[e],!n&&(n=L1t[e]=new B8(t)),n):new B8(t)}function Xt(t){var e,n;return t>-129&&t<128?(e=t+128,n=(lTt(),T1t)[e],!n&&(n=T1t[e]=new N8(t)),n):new N8(t)}function wq(t,e){return!t||e&&!t.j||ct(t,114)&&a(t,114).a.b==0?0:t.Pf()}function qN(t,e){return!t||e&&!t.k||ct(t,114)&&a(t,114).a.a==0?0:t.Qf()}function Fi(t,e){return Es(t)?le(t,e):Gb(t)||Hb(t)?(En(t),t===e):aot(t)?t.Fb(e):iot(t)?t===e:oct(t,e)}function Yr(t){return Es(t)?j1(t):Gb(t)?Tr((En(t),t)):Hb(t)?(En(t),t?1231:1237):aot(t)?t.Hb():iot(t)?lm(t):Zot(t)}function fu(t){return Es(t)?At:Gb(t)?To:Hb(t)?ho:aot(t)||iot(t)?t.ql:t.ql||Array.isArray(t)&&Z(Lzt,1)||Lzt}function phe(t){return t?t.i&1?t==Ol?ho:t==Gn?Io:t==Gw?CE:t==Os?To:t==k0?Vm:t==_y?qm:t==Da?px:U4:t:null}function tw(){tw=P,Q$t=(dr(),Ix),tVt=ly,SQ=(Glt(),V$t),TQ=q$t,bwt=X$t,yF=Z$t,xF=Y$t,Y6=K$t,wwt=J$t}function vq(){vq=P,YK=uAt(Y(Z(bA,1),jt,110,0,[(Js(),ah),uh])),KK=uAt(Y(Z(bA,1),jt,110,0,[cg,fp]))}function RC(){RC=P,iJ=new aW("MIRROR_X",0),rJ=new aW("TRANSPOSE",1),nJ=new aW("MIRROR_AND_TRANSPOSE",2)}function ghe(t){var e;return e=new xLt(t),SL(t.a,Xjt,new ju(Y(Z(M6,1),te,341,0,[e]))),e.d&&Ut(e.f,e.d),e.f}function mhe(t){var e,n;for(n=new H(t.r);n.a=48&&t<58?t-48:t>=97&&t<97?t-97+10:t>=65&&t<65?t-65+10:-1}function bhe(t){var e,n;if(t==null)return!1;for(e=0,n=t.length;edw?t-n>dw:n-t>dw}function so(t,e){var n;return Vo(t)&&Vo(e)&&(n=t+e,GPi)throw K(new $v(e,i));if(t.xh()&&t.pc(n))throw K(new yn(o6));t.mh(e,n)}function q6t(t,e,n){if(t<0||e>n)throw K(new Uc(cO+t+vft+e+", size: "+n));if(t>e)throw K(new yn(cO+t+WOt+e))}function qat(t){throw fq(),K(new Oxt("Unexpected typeof result '"+t+"'; please report this bug to the GWT team"))}function zp(t){switch($b(),t.c){case 0:return yM(),B4;case 1:return new l2(Bme(new oM(t)));default:return new Nxt(t)}}function X6t(t){var e;return t.Db&64?nh(t):(e=new ul(nh(t)),e.a+=" (source: ",mo(e,t.d),e.a+=")",e.a)}function Ct(t,e,n){return n==null?(!t.p&&(t.p=(ts(),new vi)),IM(t.p,e)):(!t.p&&(t.p=(ts(),new vi)),wr(t.p,e,n)),t}function tP(t,e,n){return n==null?(!t.p&&(t.p=(ts(),new vi)),IM(t.p,e)):(!t.p&&(t.p=(ts(),new vi)),wr(t.p,e,n)),t}function eP(t,e,n){var i;t.Eh(t.i+1),i=t.Ch(e,n),e!=t.i&&Aa(t.g,e,t.g,e+1,t.i-e),Vr(t.g,e,i),++t.i,t.sh(e,n),t.th()}function xq(t,e,n){var i,r,c;for(i=0,c=qn(t,0);c.b!=c.d.c&&(r=lt(Yt(Yn(c))),!(r>n));)r>=e&&++i;return i}function Mq(t,e){var n,i,r;for(n=0,r=ac(t,e).tc();r.hc();)i=a(r.ic(),11),n+=z(i,(Ft(),Du))!=null?1:0;return n}function Ehe(t){var e;return e=a(O2(t.c.c,""),199),e||(e=new k2(eM(tM(new Cb,""),"Other")),Pm(t.c.c,"",e)),e}function Z6t(t){this.a=new qa,this.d=new qa,this.b=new qa,this.c=new qa,this.g=new qa,this.i=new qa,this.f=t}function Js(){Js=P,Ff=new $5(cx,0),uh=new $5(gE,1),ah=new $5(pE,2),fp=new $5(BY,3),cg=new $5("UP",4)}function Kg(){Kg=P,RF=new EW("INHERIT",0),Dx=new EW("INCLUDE_CHILDREN",1),yA=new EW("SEPARATE_CHILDREN",2)}function She(t,e,n){var i,r;return i=new Qd(t.e,3,13,null,(r=e.c,r||(ye(),Hf)),Hp(t,e),!1),n?n.Sh(i):n=i,n}function The(t,e,n){var i,r;return i=new Qd(t.e,4,13,(r=e.c,r||(ye(),Hf)),null,Hp(t,e),!1),n?n.Sh(i):n=i,n}function Xat(t,e,n){var i,r;return r=t.sb,t.sb=e,t.Db&4&&!(t.Db&1)&&(i=new fs(t,1,4,r,e),n?n.Sh(i):n=i),n}function Zat(t,e,n){var i,r;return r=t.r,t.r=e,t.Db&4&&!(t.Db&1)&&(i=new fs(t,1,8,r,t.r),n?n.Sh(i):n=i),n}function jp(t,e){var n,i;return n=a(e,614),i=n.Hj(),!i&&n.Ij(i=ct(e,96)?new wEt(t,a(e,24)):new qAt(t,a(e,140))),i}function Yat(t,e){var n;return t===e?!0:ct(e,89)?(n=a(e,89),t.e==n.e&&t.d==n.d&&Xce(t,n.a)):!1}function Che(t,e){var n;if(n=CP(t,e),ct(n,335))return a(n,29);throw K(new yn(G_+e+"' is not a valid attribute"))}function nP(t,e){var n;return n=new ue,t.a.sd(n)?(fM(),new HG(En(sLt(t,n.a,e)))):(Yv(t),fM(),fM(),W1t)}function Y6t(t,e){var n;t.c.length!=0&&(n=a(xo(t,dt(Cl,Ih,8,t.c.length,0,1)),123),Rrt(n,new g3),D9t(n,e))}function K6t(t,e){var n;t.c.length!=0&&(n=a(xo(t,dt(Cl,Ih,8,t.c.length,0,1)),123),Rrt(n,new hv),D9t(n,e))}function WM(t,e){switch(e.g){case 2:case 1:return ac(t,e);case 3:case 4:return Cm(ac(t,e))}return we(),we(),fo}function Kat(t,e,n,i){switch(e){case 1:return!t.n&&(t.n=new Wt(ic,t,1,7)),t.n;case 2:return t.k}return Uut(t,e,n,i)}function Ahe(t,e,n,i,r,c,l,f){var g;for(g=n;c=i||e=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:t>=48&&t<=57?t-48:0}function tIt(t){return t-=t>>1&1431655765,t=(t>>2&858993459)+(t&858993459),t=(t>>4)+t&252645135,t+=t>>8,t+=t>>16,t&63}function f_(t,e){var n;n=(t.Bb&256)!=0,e?t.Bb|=256:t.Bb&=-257,t.Db&4&&!(t.Db&1)&&Bi(t,new Jl(t,1,2,n,e))}function eIt(t,e){var n;n=(t.Bb&256)!=0,e?t.Bb|=256:t.Bb&=-257,t.Db&4&&!(t.Db&1)&&Bi(t,new Jl(t,1,8,n,e))}function Jat(t,e){var n;n=(t.Bb&256)!=0,e?t.Bb|=256:t.Bb&=-257,t.Db&4&&!(t.Db&1)&&Bi(t,new Jl(t,1,8,n,e))}function nIt(t,e){var n;n=(t.Bb&512)!=0,e?t.Bb|=512:t.Bb&=-513,t.Db&4&&!(t.Db&1)&&Bi(t,new Jl(t,1,9,n,e))}function d_(t,e){var n;n=(t.Bb&512)!=0,e?t.Bb|=512:t.Bb&=-513,t.Db&4&&!(t.Db&1)&&Bi(t,new Jl(t,1,3,n,e))}function NC(t,e){var n;return t.b==-1&&t.a&&(n=t.a.Vi(),t.b=n?t.c.qg(t.a.pi(),n):xr(t.c.mg(),t.a)),t.c.hg(t.b,e)}function Phe(t,e,n){var i,r;return r=t.a,t.a=e,t.Db&4&&!(t.Db&1)&&(i=new fs(t,1,5,r,t.a),n?olt(n,i):n=i),n}function Ihe(t,e){var n;if(n=kp(t.i,e),n==null)throw K(new xf("Node did not exist in input."));return Mat(e,n),null}function Rhe(t,e){var n;if(n=zi(t.k,e),n==null)throw K(new xf("Port did not exist in input."));return Mat(e,n),null}function $M(t){if(t.c)$M(t.c);else if(t.d)throw K(new yc("Stream already terminated, can't be modified or used"))}function Dhe(t){var e;if(!t.a)throw K(new yc("Cannot offset an unassigned cut."));e=t.c-t.b,t.b+=e,B4t(t,e),F4t(t,e)}function Nhe(t){var e;t.g&&(e=t.c.pf()?t.f:t.a,aht(e.a,t.o,!0),aht(e.a,t.o,!1),Ct(t.o,(qt(),Qi),(Ls(),Nx)))}function Ohe(t){var e,n,i;for(e=a(z(t,(mc(),Xbt)),15),i=e.tc();i.hc();)n=a(i.ic(),170),Xi(n.b.d,n),Xi(n.c.b,n)}function iIt(t){var e,n,i;for(i=0,n=(Ao(),new $d(id(Zd(t.a,new X))));Jn(n);)e=a(In(n),14),e.c.g==e.d.g||++i;return i}function rIt(t,e){var n,i;for(i=new $n(t);i.e!=i.i._b();)if(n=a(ci(i),24),zt(e)===zt(n))return!0;return!1}function sIt(t,e){var n,i;for(i=new $n(t);i.e!=i.i._b();)if(n=a(ci(i),133),zt(e)===zt(n))return!0;return!1}function Bhe(t,e,n){var i,r,c;return c=(r=nE(t.b,e),r),c&&(i=a(Z7(BL(t,c),""),24),i)?Zlt(t,i,e,n):null}function Eq(t,e,n){var i,r,c;return c=(r=nE(t.b,e),r),c&&(i=a(Z7(BL(t,c),""),24),i)?Ylt(t,i,e,n):null}function Qat(t){var e,n;return e=t.j,e==(Ke(),rs)?(n=a(z(t,(Ft(),wc)),69),n==(Ht(),Tn)||n==fi):!1}function oIt(t){var e;return e=new om,e.a+="VerticalSegment ",Fa(e,t.e),e.a+=" ",Ii(e,zW(new P5(Rc),new H(t.k))),e.a}function Fhe(t){var e,n,i;for(e=new Dt,i=new H(t.b);i.a0&&(i+=r,++n);return n>1&&(i+=t.d*(n-1)),i}function Zhe(t,e,n){var i,r;for(r=t.a.Xb().tc();r.hc();)if(i=a(r.ic(),8),O1(n,a(Ee(e,i.o),13)))return i;return null}function Aq(t,e,n,i){var r;if(r=t.length,e>=r)return r;for(e=e>0?e:0;e=1?uh:fp):n}function Khe(t){var e,n,i;for(e=0,i=new H(t.c.a);i.a=64&&e<128&&(r=Xh(r,Yd(1,e-64)));return r}function dIt(t,e,n){var i,r,c;for(r=Rn(e?Rs(t):br(t));Jn(r);)i=a(In(r),14),c=e?i.c.g:i.d.g,c.j==(Ke(),bu)&&Ks(c,n)}function Jhe(t,e,n){var i;i=new Qkt(t,e),cr(t.r,e.ef(),i),n&&t.t!=(Kh(),DF)&&(i.c=new oAt(t.d),pd(e.We(),new YH(i)))}function pIt(t,e,n){var i,r;return i=(am(),r=new N3,r),OV(i,e),BV(i,n),t&&ni((!t.a&&(t.a=new Ss(sf,t,5)),t.a),i),i}function Vn(t){if(t.i==null)throw K(new yc("The task has not begun yet."));t.b||(t.c0&&e.charCodeAt(0)==43?e.substr(1,e.length-1):e))}function nfe(t){var e;return t==null?null:new y1((e=Hc(t,!0),e.length>0&&e.charCodeAt(0)==43?e.substr(1,e.length-1):e))}function sut(t){var e;return e=dt(nl,Pf,22,2,15,1),t-=ao,e[0]=(t>>10)+WP&qr,e[1]=(t&1023)+56320&qr,ml(e,0,e.length)}function ife(t){var e,n;for(n=zme(Zu(Zb(t))).tc();n.hc();)if(e=hi(n.ic()),o4(t,e))return gae((F3t(),$qt),e);return null}function ml(t,e,n){var i,r,c,l;for(c=e+n,Oct(e,c,t.length),l="",r=e;re&&i.Ld(t[c-1],t[c])>0;--c)l=t[c],Vr(t,c,t[c-1]),Vr(t,c-1,l)}function sfe(t,e){var n;t.c=e,t.a=dfe(e),t.a<54&&(t.f=(n=e.d>1?Xh(Yd(e.a[1],32),ns(e.a[0],uo)):ns(e.a[0],uo),AM(Zg(e.e,n))))}function kq(){ult();var t,e,n;n=N3e+++xae(),t=Tr(y.Math.floor(n*VP))&oO,e=Tr(n-t*bft),this.a=t^1502,this.b=e^WZ}function ofe(t,e,n){t.n=Vb(k0,[wt,gft],[378,22],14,[n,Tr(y.Math.ceil(e/32))],2),t.o=e,t.p=n,t.j=e-1>>1,t.k=n-1>>1}function cfe(t,e){var n,i,r;i=Qv(e),r=lt(Yt(qM(i,(qt(),nf)))),n=y.Math.max(0,r/2-.5),VC(e,n,1),Ut(t,new AMt(e,n))}function gIt(t,e){var n,i;for(n=qn(t,0);n.b!=n.d.c;){if(i=lt(Yt(Yn(n))),i==e)return;if(i>e){kM(n);break}}vM(n,e)}function He(t,e){var n,i,r,c,l;if(n=e.f,Pm(t.c.d,n,e),e.g!=null)for(r=e.g,c=0,l=r.length;ce?1:iD(isNaN(t),isNaN(e))}function vIt(t){no(),cD(this),tN(this),this.e=t,t!=null&&NSt(t,vZ,this),this.g=t==null?tu:Yc(t),this.a="",this.b=t,this.a=""}function BC(t){var e;this.a=(e=a(t.e&&t.e(),10),new ja(e,a(cu(e,e.length),10),0)),this.b=dt(un,te,1,this.a.a.length,5,1)}function i7(t,e){var n,i;return n=t._b(),e.lengthn&&Vr(e,n,null),e}function aut(t){var e,n,i;for(i=new Sp,i.a+="[",e=0,n=t._b();e>5,e=t&31,i=dt(Gn,pi,22,n+1,15,1),i[n]=1<c?e:c;return Xt(e)}function bfe(t,e){var n,i;for(i=t.e.a.Xb().tc();i.hc();)if(n=a(i.ic(),247),Sge(e,n.d)||k0e(e,n.d))return!0;return!1}function _It(t,e){var n,i,r,c;for(c=t.g.ed(),n=0;c.hc();){if(i=lt(Yt(c.ic())),r=i-e,r>U_)return n;r>TO&&++n}return n}function yIt(t,e){var n,i,r;r=e.d.g,i=r.j,!(i==(Ke(),gs)||i==Jc||i==ef)&&(n=Rn(br(r)),Jn(n)&&wr(t.k,e,a(In(n),14)))}function xIt(t,e){var n,i;n=e==(XC(),gJ),i=lut(t),n&&!i||!n&&i?Ct(t,(qt(),Bf),(md(),tI)):Ct(t,(qt(),Bf),(md(),Q6))}function gd(){gd=P,VQ=new X9(cx,0),$Q=new X9("POLYLINE",1),GE=new X9("ORTHOGONAL",2),rb=new X9("SPLINES",3)}function r7(){r7=P,MQ=new xW("OVERLAP_REMOVAL",0),yQ=new xW("COMPACTION",1),xQ=new xW("GRAPH_SIZE_CALCULATION",2)}function s7(){s7=P,Dbt=new gW("EQUALLY_DISTRIBUTED",0),sQ=new gW("NORTH_STACKED",1),Nbt=new gW("NORTH_SEQUENCE",2)}function wfe(t){var e,n,i,r,c;return c=llt(t),n=O9(t.c),i=!n,i&&(r=new Rg,P1(c,"knownLayouters",r),e=new vG(r),vo(t.c,e)),c}function vfe(t,e,n){var i,r;for(r=ct(e,62)&&a(a(e,17),62).Bb&ao?new LW(e,t):new FM(e,t),i=0;i3;)r*=10,--c;t=(t+(r>>1))/r|0}return i.i=t,!0}function j2(t,e,n){var i,r;for(r=t.tc();r.hc();)if(i=r.ic(),zt(e)===zt(i)||e!=null&&Fi(e,i))return n&&r.jc(),!0;return!1}function kIt(t,e){var n,i;if(e){for(n=0;n0&&(e.lengtht.i&&Vr(e,t.i,null),e}function LIt(t,e){var n,i,r,c;return n=e>>5,e&=31,r=t.d+n+(e==0?0:1),i=dt(Gn,pi,22,r,15,1),$1e(i,t.a,n,e),c=new Xv(t.e,r,i),hC(c),c}function c7(t,e){_rt();var n,i;return n=cL((Hh(),Hh(),F4)),i=null,e==n&&(i=a(Zc(v1t,t),556)),i||(i=new n4t(t),e==n&&tc(v1t,t,i)),i}function xr(t,e){var n,i,r;if(n=(t.i==null&&q1(t),t.i),i=e.pi(),i!=-1){for(r=n.length;i=0;--i)for(e=n[i],r=0;r0&&Pc(t,128)<0?(e=or(t)+128,n=(LTt(),C1t)[e],!n&&(n=C1t[e]=new O8(t)),n):new O8(t)}function oP(t){return V1(),Pc(t,0)<0?Pc(t,-1)!=0?new Yut(-1,DM(t)):PK:Pc(t,10)<=0?z1t[or(t)]:new Yut(1,t)}function PIt(){Tit.call(this,new Bct(16)),Ah(2,"expectedValuesPerKey"),this.b=2,this.a=new Fot(null,null,0,null),K3(this.a,this.a)}function a7(){a7=P,JQ=new Y9("SIMPLE",0),Ivt=new Y9("GROUP_DEC",1),Dvt=new Y9("GROUP_MIXED",2),Rvt=new Y9("GROUP_INC",3)}function gut(){gut=P,Lvt=new x2(15),FVt=new xc((dr(),uy),Lvt),zVt=new xc(ly,15),UVt=new xc(HQ,Xt(0)),BVt=new xc(jE,fE)}function Iq(){Iq=P,ftt=new jk,e_t=new Rz,n_t=new Hk,i_t=new FR,r_t=new UR,s_t=new zR,o_t=new XS,c_t=new Dz,a_t=new jR}function IIt(t){this.e=dt(Gn,pi,22,t.length,15,1),this.c=dt(Ol,a0,22,t.length,16,1),this.b=dt(Ol,a0,22,t.length,16,1),this.f=0}function mut(t,e){this.n=Vb(k0,[wt,gft],[378,22],14,[e,Tr(y.Math.ceil(t/32))],2),this.o=t,this.p=e,this.j=t-1>>1,this.k=e-1>>1}function RIt(t,e,n){ILt(),Ext.call(this),this.a=Vb(qVt,[wt,Gft],[537,171],0,[UF,QQ],2),this.c=new lM,this.g=t,this.f=e,this.d=n}function Kc(t,e,n){var i,r,c;return t.ti()?(i=t.i,c=t.ui(),eP(t,i,e),r=t.mi(3,null,e,i,c),n?n.Sh(r):n=r):eP(t,t.i,e),n}function Lh(t,e){var n,i,r;return t.f>0&&(t.Fi(),i=e==null?0:Yr(e),r=(i&qi)%t.d.length,n=Dlt(t,r,i,e),n)?n.lc():null}function Rq(t,e){var n,i,r;return t.f>0?(t.Fi(),i=e==null?0:Yr(e),r=(i&qi)%t.d.length,n=lDt(t,r,i,e),n!=-1):!1}function cP(t,e){var n,i,r,c;for(c=gu(t.e.mg(),e),n=a(t.g,124),r=0;r2e3&&(Pzt=t,QO=y.setTimeout(kte,10))),JO++==0?(Sue((Er(),w1t)),!0):!1}function Ufe(){return Error.stackTraceLimit>0?(y.Error.stackTraceLimit=Error.stackTraceLimit=64,!0):"stack"in new Error}function UIt(t,e){return t.e>e.e?1:t.ee.d?t.e:t.d=0?c=c.a[1]:(r=c,c=c.a[0])}return r}function $It(t,e,n){var i,r,c;for(r=null,c=t.b;c;){if(i=t.a.Ld(e,c.d),n&&i==0)return c;i<=0?c=c.a[0]:(r=c,c=c.a[1])}return r}function Hfe(t,e,n,i){var r,c,l;return r=!1,c2e(t.f,n,i)&&(rde(t.f,t.a[e][n],t.a[e][i]),c=t.a[e],l=c[i],c[i]=c[n],c[n]=l,r=!0),r}function vut(t,e){var n,i,r;for(r=t.g.ed();r.hc();)if(n=lt(Yt(r.ic())),i=y.Math.abs(n-e),ie?1:iD(isNaN(t),isNaN(e)))>0}function yut(t,e){return Ef(),Ef(),I1(Y1),(y.Math.abs(t-e)<=Y1||t==e||isNaN(t)&&isNaN(e)?0:te?1:iD(isNaN(t),isNaN(e)))<0}function VIt(t,e){return Ef(),Ef(),I1(Y1),(y.Math.abs(t-e)<=Y1||t==e||isNaN(t)&&isNaN(e)?0:te?1:iD(isNaN(t),isNaN(e)))<=0}function $fe(t,e){if(e.c==t)return e.d;if(e.d==t)return e.c;throw K(new yn("Input edge is not connected to the input port."))}function u7(t,e){return En(t),e==null?!1:le(t,e)?!0:t.length==e.length&&le(t.toLowerCase(),e.toLowerCase())}function qIt(t){var e,n,i,r,c;if(t==null)return null;for(c=new Dt,n=lq(t),i=0,r=n.length;ie.e?1:t.fe.f?1:Yr(t)-Yr(e)}function XM(t,e){ts(),si(t);try{return t.Vb(e)}catch(n){if(n=vr(n),ct(n,177))return null;if(ct(n,169))return null;throw K(n)}}function Jfe(t,e){ts(),si(t);try{return t.$b(e)}catch(n){if(n=vr(n),ct(n,177))return null;if(ct(n,169))return null;throw K(n)}}function tRt(t){V1(),t.length==0?(this.e=0,this.d=1,this.a=Y(Z(Gn,1),pi,22,15,[0])):(this.e=1,this.d=t.length,this.a=t,hC(this))}function Mut(t,e,n,i){tE();var r,c;for(r=0,c=0;c=c?(che(t,e),-1):(ahe(t,e),1)}function eRt(t,e){var n,i,r;++t.j,i=t.g==null?0:t.g.length,e>i&&(r=t.g,n=i+(i/2|0)+4,njZ)return n.zg();if(i=n.sg(),i||n==t)break}return i}function nRt(t,e){var n,i;return n=e.Yg(t.a),n&&(i=hi(Lh((!n.b&&(n.b=new Mu((ye(),Ho),Dc,n)),n.b),Ti)),i!=null)?i:e.be()}function nde(t,e){var n,i;return n=e.Yg(t.a),n&&(i=hi(Lh((!n.b&&(n.b=new Mu((ye(),Ho),Dc,n)),n.b),Ti)),i!=null)?i:e.be()}function Xe(t){var e;if(ct(t.a,4)){if(e=jIt(t.a),e==null)throw K(new yc(nFt+t.b+"'. "+wpt+(Vd(vI),vI.k)+vpt));return e}else return t.a}function ide(t){var e;if(t==null)return null;if(e=ebe(Hc(t,!0)),e==null)throw K(new qG("Invalid hexBinary value: '"+t+"'"));return e}function iRt(t,e){var n,i,r;if(Ut(lB,t),e.nc(t),n=a(zi(HK,t),19),n)for(r=n.tc();r.hc();)i=a(r.ic(),35),nc(lB,i,0)!=-1||iRt(i,e)}function rde(t,e,n){var i,r;fX(t.e,e,n,(Ht(),on)),fX(t.i,e,n,Qe),t.a&&(r=a(z(e,(Ft(),li)),11),i=a(z(n,li),11),rV(t.g,r,i))}function rRt(t){var e;zt(cn(t,(dr(),ay)))===zt((Kg(),RF))&&(io(t)?(e=a(cn(io(t),ay),316),ga(t,ay,e)):ga(t,ay,yA))}function Eut(t,e,n){this.c=t,this.f=new Dt,this.e=new go,this.j=new oot,this.n=new oot,this.b=e,this.g=new qh(e.c,e.d,e.b,e.a),this.a=n}function Sut(t,e,n,i,r,c){jrt(this),this.e=t,this.f=e,this.d=n,this.c=i,this.g=r,this.b=c,this.j=lt(Yt(r.tc().ic())),this.i=lt(Yt(yPt(r)))}function sde(t){var e;for(e=a(In(Rn(Rs(t))),14).c.g;e.j==(Ke(),Hr);)Ct(e,(Ft(),I6),(me(),me(),!0)),e=a(In(Rn(Rs(e))),14).c.g}function ode(t,e,n){var i,r,c,l;return c=e.i,l=n.i,c!=l?c.g-l.g:(i=t.f[e.o],r=t.f[n.o],i==0&&r==0?0:i==0?-1:r==0?1:ro(i,r))}function ci(t){var e;try{return e=t.i.cd(t.e),t.Bi(),t.g=t.e++,e}catch(n){throw n=vr(n),ct(n,79)?(t.Bi(),K(new J)):K(n)}}function Fq(t){var e;try{return e=t.c.yh(t.e),t.Bi(),t.g=t.e++,e}catch(n){throw n=vr(n),ct(n,79)?(t.Bi(),K(new J)):K(n)}}function H1(t,e){var n;n=t.fd(e);try{return n.ic()}catch(i){throw i=vr(i),ct(i,101)?K(new Uc("Can't get element "+e)):K(i)}}function sRt(t,e){al(),si(t);try{return t.pc(e)}catch(n){if(n=vr(n),ct(n,177))return!1;if(ct(n,169))return!1;throw K(n)}}function cde(t,e){ts(),si(t);try{return t.Qb(e)}catch(n){if(n=vr(n),ct(n,177))return!1;if(ct(n,169))return!1;throw K(n)}}function oRt(t,e,n){return new qh(y.Math.min(t.a,e.a)-n/2,y.Math.min(t.b,e.b)-n/2,y.Math.abs(t.a-e.a)+n,y.Math.abs(t.b-e.b)+n)}function cRt(t,e){var n,i,r,c;for(n=0,r=new H(e.a);r.a0),e.a.cd(e.c=--e.b))}function t0(){t0=P,On=new W5("PARENTS",0),vc=new W5("NODES",1),Md=new W5("EDGES",2),ib=new W5("PORTS",3),og=new W5("LABELS",4)}function G1(){G1=P,sb=new V5("DISTRIBUTED",0),ZQ=new V5("JUSTIFIED",1),Svt=new V5("BEGIN",2),xA=new V5(y4,3),Tvt=new V5("END",4)}function HC(t,e,n){Ext.call(this),this.a=dt(qVt,Gft,171,(Ch(),Y(Z(Dw,1),jt,203,0,[lc,ta,hc])).length,0,1),this.b=t,this.d=e,this.c=n}function lP(t,e){var n,i;if(++t.j,e!=null&&(n=(i=t.a.Cb,ct(i,92)?a(i,92).cg():null),ume(e,n))){zC(t.a,4,n);return}zC(t.a,4,a(e,116))}function ade(t,e){var n,i;return e!=null&&iw(e).length!=0&&(n=_ht(t,e),n)?n:Nn.length!=0&&(i=_ht(t,Nn),i)?i:null}function ude(t){var e,n;if(t.j==(Ke(),Hr)){for(n=Rn(Jg(t));Jn(n);)if(e=a(In(n),14),!ec(e)&&t.c==sX(e,t).c)return!0}return!1}function h7(){h7=P,NK=new art("NUM_OF_EXTERNAL_SIDES_THAN_NUM_OF_EXTENSIONS_LAST",0),tgt=new art("CORNER_CASES_THAN_SINGLE_SIDE_LAST",1)}function Uq(){return Q7(),Y(Z(_qt,1),jt,147,0,[wqt,bqt,vqt,uqt,aqt,lqt,dqt,fqt,hqt,mqt,gqt,pqt,oqt,sqt,cqt,iqt,nqt,rqt,tqt,QVt,eqt,ttt])}function zq(t,e){var n;switch(n=!t.v.pc((Ju(),E0))||t.q==(Ls(),Gc),t.t.g){case 1:n?Axe(t,e):Y7t(t,e);break;case 0:n?$2e(t,e):V7t(t,e)}}function lde(t,e,n){var i;switch(i=n.q.getFullYear()-Fm+Fm,i<0&&(i=-i),e){case 1:t.a+=i;break;case 2:dd(t,i%100,2);break;default:dd(t,i,e)}}function hde(t){var e;switch(e=t.Mh(null),e){case 10:return 0;case 15:return 1;case 14:return 2;case 11:return 3;case 21:return 4}return-1}function jq(t){switch(t.g){case 1:return Js(),cg;case 4:return Js(),ah;case 2:return Js(),uh;case 3:return Js(),fp}return Js(),Ff}function fde(t,e,n,i){var r,c,l;return r=new Qd(t.e,1,13,(l=e.c,l||(ye(),Hf)),(c=n.c,c||(ye(),Hf)),Hp(t,e),!1),i?i.Sh(r):i=r,i}function qn(t,e){var n,i;if(t_(e,t.b),e>=t.b>>1)for(i=t.c,n=t.b;n>e;--n)i=i.b;else for(i=t.a.a,n=0;n=0?t.Fg(r):yX(t,i)):n<0?yX(t,i):a(i,61).aj().fj(t,t.Qg(),n)}function uRt(t){var e,n,i;for(i=(!t.o&&(t.o=new lu((Ic(),pp),ug,t,0)),t.o),n=i.c.tc();n.e!=n.i._b();)e=a(n.Ci(),38),e.lc();return AL(i)}function wde(t){var e,n,i,r;for(i=dt(k3e,te,144,t.c.length,0,1),r=0,n=new H(t);n.a0&&(Ut(t.b,new sCt(e.a,n)),i=e.a.length,0i&&(e.a+=$Et(dt(nl,Pf,22,-i,15,1))))}function d7(t){switch(Vit(),this.c=new Dt,this.d=t,t.g){case 0:case 2:this.a=zot(jgt),this.b=is;break;case 3:case 1:this.a=jgt,this.b=Ps}}function Tut(t,e){this.e=t,e.5&&c<50;)r=EDt(i),n=V2(i,r,!0),e=y.Math.abs(n.b),++c;return V2(t,r,!1)}function fRt(t){var e,n,i,r,c;for(i=JX(t),e=is,c=0,r=0;e>.5&&c<50;)r=MDt(i),n=V2(i,r,!0),e=y.Math.abs(n.a),++c;return V2(t,r,!1)}function xde(t,e){var n,i,r,c;for(c=0,i=qn(t,0);i.b!=i.d.c;)n=a(Yn(i),35),c+=y.Math.pow(n.g*n.f-e,2);return r=y.Math.sqrt(c/(t.b-1)),r}function dRt(t,e){var n,i,r;for(n=t.o,r=a(a(rr(t.r,e),19),60).tc();r.hc();)i=a(r.ic(),111),i.e.a=bpe(i,n.a),i.e.b=n.b*lt(Yt(i.b.xe(zF)))}function H2(t,e,n,i){var r;return n>=0?t.Bg(e,n,i):(t.yg()&&(i=(r=t.og(),r>=0?t.jg(i):t.yg().Cg(t,-1-r,null,i))),t.lg(e,n,i))}function G2(t,e,n){var i,r;if(r=t._b(),e>=r)throw K(new $v(e,r));if(t.xh()&&(i=t.dd(n),i>=0&&i!=e))throw K(new yn(o6));return t.Ah(e,n)}function Mde(t,e,n){var i,r,c,l;return i=t.dd(e),i!=-1&&(t.ti()?(c=t.ui(),l=OD(t,i),r=t.mi(4,l,null,i,c),n?n.Sh(r):n=r):OD(t,i)),n}function $s(t,e,n){var i,r,c,l;return i=t.dd(e),i!=-1&&(t.ti()?(c=t.ui(),l=W2(t,i),r=t.mi(4,l,null,i,c),n?n.Sh(r):n=r):W2(t,i)),n}function pRt(t){var e,n,i;t.b==t.c&&(i=t.a.length,n=kat(8>i?8:i)<<1,t.b!=0?(e=cu(t.a,n),mPt(t,e,i),t.a=e,t.b=0):RG(t.a,n),t.c=i)}function Ede(t){var e,n;e=new Dt,n=t;do n=a(In(Rn(br(n))),14).d.g,n.j==(Ke(),Hr)&&(e.c[e.c.length]=n);while(n.j==(Ke(),Hr));return e}function gRt(t){var e,n;for(this.b=new Dt,this.c=t,this.a=!1,n=new H(t.a);n.a0||t==(Zr(),MK)||e==(co(),EK))throw K(new yn("Invalid range: "+akt(t,e)))}function Sde(t){switch(t.g){case 1:return Am(),pI;case 3:return Am(),dI;case 2:return Am(),ntt;case 4:return Am(),ett;default:return null}}function Wq(t){switch(t.g){case 0:return null;case 1:return new APt;case 2:return new vit;default:throw K(new yn(jY+(t.f!=null?t.f:""+t.g)))}}function Tde(t,e,n){if(t.e)switch(t.b){case 1:Zse(t.c,e,n);break;case 0:Yse(t.c,e,n)}else bkt(t.c,e,n);t.a[e.o][n.o]=t.c.i,t.a[n.o][e.o]=t.c.e}function nw(){nw=P,nF=new W9(jm,0),eQ=new W9("PORT_POSITION",1),sy=new W9("NODE_SIZE_WHERE_SPACE_PERMITS",2),ry=new W9("NODE_SIZE",3)}function wRt(t){var e,n,i;for(n=new H(t.a);n.a=0?t.ug(l,n,!0):Z2(t,c,n)):a(c,61).aj().cj(t,t.Qg(),r,n,i)}function Cde(t,e){var n,i,r,c;return c=t.o,n=t.p,c=0)return r;if(t.Rj()){for(i=0;ir&&Vr(e,r,null),e}function vRt(t,e){var n,i,r;for(r=t.a.length,e.lengthr&&Vr(e,r,null),e}function g_(t,e,n){try{return zb(IV(t,e,n),1)}catch(i){throw i=vr(i),ct(i,305)?K(new Uc(KZ+t.o+"*"+t.p+JZ+e+Rc+n+QZ)):K(i)}}function _Rt(t,e,n){try{return zb(IV(t,e,n),0)}catch(i){throw i=vr(i),ct(i,305)?K(new Uc(KZ+t.o+"*"+t.p+JZ+e+Rc+n+QZ)):K(i)}}function yRt(t,e,n){try{return zb(IV(t,e,n),2)}catch(i){throw i=vr(i),ct(i,305)?K(new Uc(KZ+t.o+"*"+t.p+JZ+e+Rc+n+QZ)):K(i)}}function xRt(t,e,n){var i;try{return g_(t,e+t.j,n+t.k)}catch(r){throw r=vr(r),ct(r,79)?(i=r,K(new Uc(i.g+uO+e+Rc+n+")."))):K(r)}}function Ade(t,e,n){var i;try{return _Rt(t,e+t.j,n+t.k)}catch(r){throw r=vr(r),ct(r,79)?(i=r,K(new Uc(i.g+uO+e+Rc+n+")."))):K(r)}}function kde(t,e,n){var i;try{return yRt(t,e+t.j,n+t.k)}catch(r){throw r=vr(r),ct(r,79)?(i=r,K(new Uc(i.g+uO+e+Rc+n+")."))):K(r)}}function MRt(t,e){if(t.g==-1)throw K(new na);t.Bi();try{t.d.hd(t.g,e),t.f=t.d.j}catch(n){throw n=vr(n),ct(n,79)?K(new C):K(n)}}function ERt(t,e,n){di(n,"Compound graph preprocessor",1),t.a=new Ov,q7t(t,e,null),cye(t,e),Ibe(t),Ct(e,(Ft(),umt),t.a),t.a=null,uu(t.b),Vn(n)}function $q(t,e){var n,i;if($rt(e>0),(e&-e)==e)return Tr(e*pu(t,31)*4656612873077393e-25);do n=pu(t,31),i=n%e;while(n-i+(e-1)<0);return Tr(i)}function Lde(t,e,n){switch(n.g){case 1:t.a=e.a/2,t.b=0;break;case 2:t.a=e.a,t.b=e.b/2;break;case 3:t.a=e.a/2,t.b=e.b;break;case 4:t.a=0,t.b=e.b/2}}function Pde(t){var e,n;for(n=a(z(t,(Ft(),WB)),15).tc();n.hc();)if(e=a(n.ic(),68),Wb(e,(qt(),XB)))return a(z(e,XB),276);return null}function Ide(t,e){var n,i,r;for(n=hm(new Ng,t),r=new H(e);r.a1&&(c=Ide(t,e)),c}function Ode(t,e){var n,i,r,c;for(c=new H(e.a);c.a102?-1:t<=57?t-48:t<65?-1:t<=70?t-65+10:t<97?-1:t-97+10}function kRt(t,e){var n,i,r;for(t.b[e.g]=1,i=qn(e.d,0);i.b!=i.d.c;)n=a(Yn(i),170),r=n.c,t.b[r.g]==1?Xi(t.a,n):t.b[r.g]==2?t.b[r.g]=1:kRt(t,r)}function LRt(t,e){var n;return n=Y(Z(Os,1),Xo,22,15,[wq(t.a[0],e),wq(t.a[1],e),wq(t.a[2],e)]),t.d&&(n[0]=y.Math.max(n[0],n[2]),n[2]=n[0]),n}function PRt(t,e){var n;return n=Y(Z(Os,1),Xo,22,15,[qN(t.a[0],e),qN(t.a[1],e),qN(t.a[2],e)]),t.d&&(n[0]=y.Math.max(n[0],n[2]),n[2]=n[0]),n}function Bde(t){var e,n,i;for(L5(t.b.a),t.a=dt(oB,te,57,t.c.c.a.b.c.length,0,1),e=0,i=new H(t.c.c.a.b);i.ai&&t.charCodeAt(e-1)<=32;)--e;return i>0||ec&&Vr(e,c,null),e}function tX(t){Ao();var e;if(e=ohe(t),!Jn(t))throw K(new Uc("position (0) must be less than the number of elements that remained ("+e+")"));return In(t)}function ipe(t){var e;return e=(XLt(),Ozt),e[t>>>28]|e[t>>24&15]<<4|e[t>>20&15]<<8|e[t>>16&15]<<12|e[t>>12&15]<<16|e[t>>8&15]<<20|e[t>>4&15]<<24|e[t&15]<<28}function NRt(t){var e,n,i;for(i=t.f,t.k=dt(Os,Xo,22,i,15,1),t.d=dt(Os,Xo,22,i,15,1),e=0;e0&&(r.b+=e),r}function w7(t,e){var n,i,r;for(r=new go,i=t.tc();i.hc();)n=a(i.ic(),31),kP(n,0,r.b),r.b+=n.e.b+e,r.a=y.Math.max(r.a,n.e.a);return r.a>0&&(r.a+=e),r}function ape(t,e){var n,i;if(e<0||e>=t._b())return null;for(n=e;n=t.i)throw K(new kW(e,t.i));return++t.j,n=t.g[e],i=t.i-e-1,i>0&&Aa(t.g,e+1,t.g,e,i),Vr(t.g,--t.i,null),t.vh(e,n),t.th(),n}function nX(t,e){var n,i;return t.Db>>16==6?t.Cb.Cg(t,5,of,e):(i=jo(a(Ve((n=a(an(t,16),24),n||t.Rg()),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function But(t,e){var n,i;n=t.fd(e);try{return i=n.ic(),n.jc(),i}catch(r){throw r=vr(r),ct(r,101)?K(new Uc("Can't remove element "+e)):K(r)}}function dpe(t,e){var n,i,r;return r=new Ei(new ju(Y(Z(F3e,1),te,1700,0,[t,e])),16),i=new DTt(r),n=new gi(null,i),Aot(n,new rH(t)),Aot(n,new sH(e)),n}function Fut(t,e,n,i,r,c){var l,f,g;for(zt(t)===zt(n)&&(t=t.slice(e,e+r),e=0),f=e,g=e+r;f>22),r+=i>>22,r<0)?!1:(t.l=n&eu,t.m=i&eu,t.h=r&sp,!0)}function _pe(t,e,n,i,r,c,l){var f,g;return!(e.je()&&(g=t.a.Ld(n,i),g<0||!r&&g==0)||e.ke()&&(f=t.a.Ld(n,c),f>0||!l&&f==0))}function $2(){$2=P,b6=new j9("NORTH",0),m6=new j9("EAST",1),w6=new j9("SOUTH",2),v6=new j9("WEST",3),b6.a=!1,m6.a=!0,w6.a=!1,v6.a=!0}function $C(){$C=P,_6=new H9("NORTH",0),cB=new H9("EAST",1),aB=new H9("SOUTH",2),y6=new H9("WEST",3),_6.a=!1,cB.a=!0,aB.a=!1,y6.a=!0}function Cu(){Cu=P,fI=new K9("UNKNOWN",0),kd=new K9("ABOVE",1),ag=new K9("BELOW",2),hI=new K9("INLINE",3),new es("org.eclipse.elk.labelSide",fI)}function W1(t,e,n){if(n&&(e<0||e>n.a.c.length))throw K(new yn("index must be >= 0 and <= layer node count"));t.c&&Lc(t.c.a,t),t.c=n,n&&pm(n.a,e,t)}function HRt(t){switch(t.g){case 0:return EJ;case 1:return SJ;case 2:return TJ;case 3:return CJ;case 4:return IB;case 5:return AJ;default:return null}}function ZM(){ZM=P,fF=new $9("P1_TREEIFICATION",0),uA=new $9("P2_NODE_ORDERING",1),X6=new $9("P3_NODE_PLACEMENT",2),lA=new $9("P4_EDGE_ROUTING",3)}function Lo(t,e,n){var i,r;return i=(r=new FG,GM(r,e),kh(r,n),ni((!t.c&&(t.c=new Wt(Fw,t,12,10)),t.c),r),r),a_(i,0),OM(i,1),d_(i,!0),f_(i,!0),i}function GRt(t,e){var n,i;return t.Db>>16==17?t.Cb.Cg(t,21,Dl,e):(i=jo(a(Ve((n=a(an(t,16),24),n||t.Rg()),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function ype(t,e){var n,i,r;if(i=new z9,r=new Pat(i.q.getFullYear()-Fm,i.q.getMonth(),i.q.getDate()),n=F_e(t,e,r),n==0||n>16==6?t.Cb.Cg(t,6,Xs,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(Ic(),jF)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function Gut(t,e){var n,i;return t.Db>>16==7?t.Cb.Cg(t,1,gI,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(Ic(),Fvt)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function Wut(t,e){var n,i;return t.Db>>16==9?t.Cb.Cg(t,9,zr,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(Ic(),zvt)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function $ut(t,e){var n,i;return t.Db>>16==3?t.Cb.Cg(t,12,zr,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(Ic(),Bvt)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function Vut(t,e){var n,i;return t.Db>>16==3?t.Cb.Cg(t,0,bI,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(ye(),S0)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function $Rt(t,e){var n,i;return t.Db>>16==7?t.Cb.Cg(t,6,of,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(ye(),A0)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function VRt(t,e){var n,i;return t.Db>>16==5?t.Cb.Cg(t,9,YF,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(ye(),T0)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function YM(t,e){var n,i;if(e){if(e==t)return!0;for(n=0,i=a(e,42).yg();i&&i!=e;i=i.yg()){if(++n>jZ)return YM(t,i);if(i==t)return!0}}return!1}function Dpe(t){var e,n;e=a(z(t,(Ph(),Tjt)),21),e?(n=e.a,n==0?Ct(t,(R1(),pB),new kq):Ct(t,(R1(),pB),new fN(n))):Ct(t,(R1(),pB),new fN(1))}function Npe(t,e){var n;switch(n=t.g,e.g){case 1:return-(t.k.b+t.n.b);case 2:return t.k.a-n.n.a;case 3:return t.k.b-n.n.b;case 4:return-(t.k.a+t.n.a)}return 0}function qut(t,e,n,i){var r,c,l;if(t.a[e.o]==-1)for(t.a[e.o]=n,t.b[e.o]=i,c=Rn(br(e));Jn(c);)r=a(In(c),14),!ec(r)&&(l=r.d.g,qut(t,l,n+1,i))}function Ope(t){switch(gD(),t.q.g){case 5:A9t(t,(Ht(),Tn)),A9t(t,fi);break;case 4:bDt(t,(Ht(),Tn)),bDt(t,fi);break;default:tOt(t,(Ht(),Tn)),tOt(t,fi)}}function Bpe(t){switch(gD(),t.q.g){case 5:U9t(t,(Ht(),Qe)),U9t(t,on);break;case 4:dRt(t,(Ht(),Qe)),dRt(t,on);break;default:eOt(t,(Ht(),Qe)),eOt(t,on)}}function wl(t){var e;return!(t.Bb&1)&&t.r&&t.r.Eg()&&(e=a(t.r,42),t.r=a(B1(t,e),133),t.r!=e&&t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,9,8,e,t.r))),t.r}function VC(t,e,n){var i,r;i=e*n,ct(t.g,153)?(r=P2(t),r.f.d?r.f.a||(t.d.a+=i+yd):(t.d.d-=i+yd,t.d.a+=i+yd)):ct(t.g,8)&&(t.d.d-=i,t.d.a+=2*i)}function qRt(){U7(),this.c=new Dt,this.i=new Dt,this.e=new qa,this.f=new qa,this.g=new qa,this.j=new Dt,this.a=new Dt,this.b=(ts(),new vi),this.k=new vi}function Fpe(t,e){var n,i,r,c;for(di(e,"Dull edge routing",1),c=qn(t.b,0);c.b!=c.d.c;)for(r=a(Yn(c),76),i=qn(r.d,0);i.b!=i.d.c;)n=a(Yn(i),170),ld(n.a)}function rX(t,e,n){var i;return i=Y(Z(Os,1),Xo,22,15,[glt(t,(Ch(),lc),e,n),glt(t,ta,e,n),glt(t,hc,e,n)]),t.f&&(i[0]=y.Math.max(i[0],i[2]),i[2]=i[0]),i}function Upe(){q7();var t,e;try{if(e=a(slt((v1(),Nl),yE),1698),e)return e}catch(n){if(n=vr(n),ct(n,104))t=n,qst((Kn(),t));else throw K(n)}return new Pg}function zpe(){q7();var t,e;try{if(e=a(slt((v1(),Nl),xl),1635),e)return e}catch(n){if(n=vr(n),ct(n,104))t=n,qst((Kn(),t));else throw K(n)}return new HR}function jpe(){F5t();var t,e;try{if(e=a(slt((v1(),Nl),m0),1710),e)return e}catch(n){if(n=vr(n),ct(n,104))t=n,qst((Kn(),t));else throw K(n)}return new KS}function Xut(t,e){var n,i;return t.Db>>16==11?t.Cb.Cg(t,10,zr,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(Ic(),Uvt)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function XRt(t,e){var n,i;return t.Db>>16==10?t.Cb.Cg(t,11,Dl,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(ye(),C0)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function ZRt(t,e){var n,i;return t.Db>>16==10?t.Cb.Cg(t,12,ph,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(ye(),zw)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function Hpe(t,e){var n,i,r,c,l;if(e)for(r=e.a.length,n=new Ug(r),l=(n.b-n.a)*n.c<0?(_1(),hg):new x1(n);l.hc();)c=a(l.ic(),21),i=LM(e,c.a),i&&sDt(t,i)}function Gpe(){Yit();var t,e;for(g3e((T1(),Ae)),a3e(Ae),iX(Ae),t_t=(ye(),Hf),e=new H(u_t);e.a>19,b=e.h>>19,g!=b?b-g:(r=t.h,f=e.h,r!=f?r-f:(i=t.m,l=e.m,i!=l?i-l:(n=t.l,c=e.l,n-c)))}function Wpe(t,e){var n,i,r;if(i=t.b.d.d,t.a||(i+=t.b.d.a),r=e.b.d.d,e.a||(r+=e.b.d.a),n=ro(i,r),n==0){if(!t.a&&e.a)return-1;if(!e.a&&t.a)return 1}return n}function $pe(t,e){var n,i,r;if(i=t.b.g.d,t.a||(i+=t.b.g.a),r=e.b.g.d,e.a||(r+=e.b.g.a),n=ro(i,r),n==0){if(!t.a&&e.a)return-1;if(!e.a&&t.a)return 1}return n}function Vpe(t,e,n,i){var r,c,l,f;for(r=0;rl&&(f=l/i),r>c&&(g=c/r),hl(t,y.Math.min(f,g)),t}function Xpe(t,e,n){var i,r;return r=t.e,t.e=e,t.Db&4&&!(t.Db&1)&&(i=new fs(t,1,4,r,e),n?n.Sh(i):n=i),r!=e&&(e?n=cE(t,O7(t,e),n):n=cE(t,t.a,n)),n}function QRt(){z9.call(this),this.e=-1,this.a=!1,this.p=Vs,this.k=-1,this.c=-1,this.b=-1,this.g=!1,this.f=-1,this.j=-1,this.n=-1,this.i=-1,this.d=-1,this.o=Vs}function Zpe(t,e){var n,i;for(i=new H(e);i.a=0?(n=dP(t,sO),i=rP(t,sO)):(e=qv(t,1),n=dP(e,5e8),i=rP(e,5e8),i=so(Yd(i,1),ns(t,1))),Xh(Yd(i,32),ns(n,uo))}function v7(){v7=P,lgt=(H7(),BK),ugt=new bn(_ft,lgt),agt=(CN(),OK),cgt=new bn(yft,agt),ogt=(h7(),NK),sgt=new bn(xft,ogt),rgt=new bn(Mft,(me(),me(),!0))}function sX(t,e){if(e==t.c.g)return t.d.g;if(e==t.d.g)return t.c.g;throw K(new yn("'node' must either be the source node or target node of the edge."))}function Qpe(t,e,n){var i,r;for(di(n,"Interactive node placement",1),t.a=a(z(e,(Ft(),yw)),266),r=new H(e.b);r.a0&&(l=(c&qi)%t.d.length,r=Dlt(t,l,c,e),r)?(f=r.mc(n),f):(i=t.Ii(c,e,n),t.c.nc(i),null)}function Qut(t,e){var n,i,r,c;switch(jp(t,e).lk()){case 3:case 2:{for(n=k_(e),r=0,c=n.i;r=0;i--)if(le(t[i].d,e)||le(t[i].d,n)){t.length>=i+1&&t.splice(0,i+1);break}return t}function tlt(t,e,n){this.b=new vD,this.i=new Dt,this.d=new $a(this),this.g=t,this.a=e.c.length,this.c=e,this.e=a(Ee(this.c,this.c.c.length-1),8),this.f=n,j_e(this)}function r8t(){this.a=new Sz,this.g=new bD,this.j=new bD,this.b=(ts(),new vi),this.d=new bD,this.i=new bD,this.k=new vi,this.c=new vi,this.e=new vi,this.f=new vi}function a1e(t){var e,n,i,r,c;for(i=new qg(new xp(t.b).a);i.b;)n=Sm(i),e=a(n.kc(),8),c=a(a(n.lc(),48).a,8),r=a(a(n.lc(),48).b,9),sr(Gh(e.k),sr(Xc(c.k),r))}function XC(){XC=P,mJ=new j5("MEDIAN_LAYER",0),bJ=new j5("WIDEST_LAYER",1),pJ=new j5("CENTER_LAYER",2),R0t=new j5("TAIL_LAYER",3),gJ=new j5("HEAD_LAYER",4)}function u1e(t){var e,n,i;for(n=new H(t.p);n.an);return r}function nlt(t,e,n){switch(e){case 1:!t.n&&(t.n=new Wt(ic,t,1,7)),Dr(t.n),!t.n&&(t.n=new Wt(ic,t,1,7)),Lr(t.n,a(n,13));return;case 2:GL(t,hi(n));return}Oat(t,e,n)}function ilt(t,e,n){switch(e){case 3:o_(t,lt(Yt(n)));return;case 4:c_(t,lt(Yt(n)));return;case 5:th(t,lt(Yt(n)));return;case 6:eh(t,lt(Yt(n)));return}nlt(t,e,n)}function y7(t,e,n){var i,r,c;c=(i=new FG,i),r=$1(c,e,null),r&&r.Th(),kh(c,n),ni((!t.c&&(t.c=new Wt(Fw,t,12,10)),t.c),c),a_(c,0),OM(c,1),d_(c,!0),f_(c,!0)}function rlt(t){var e;return t.Db&64?o7(t):(e=new ul(o7(t)),e.a+=" (abstract: ",Cp(e,(t.Bb&256)!=0),e.a+=", interface: ",Cp(e,(t.Bb&512)!=0),e.a+=")",e.a)}function slt(t,e){var n,i,r;return n=RT(t.e,e),ct(n,207)?(r=a(n,207),r.gh()==null,r.dh()):ct(n,456)?(i=a(n,1631),r=i.b,r):null}function a8t(t,e){var n;if(this.f=t,this.b=this.f.c,n=t.d,lV(e,n),e>=(n/2|0))for(this.e=t.e,this.d=n;e++0;)ekt(this);this.a=null}function u8t(t,e,n,i,r,c,l){var f,g,b,v,M;if(v=r[c],b=c==l-1,f=b?i:0,M=DRt(f,v),i!=10&&Y(Z(t,l-c),e[c],n[c],f,M),!b)for(++c,g=0;g0&&bo(t,t.length-1)==33)try{return e=L9t($h(t,0,t.length-1)),e.e==null}catch(n){if(n=vr(n),!ct(n,30))throw K(n)}return!1}function _1e(t,e,n){var i,r,c,l;for(n=H2(e,t.e,-1-t.c,n),l=Bot(t.a),c=(i=new qg(new xp(l.a).a),new pT(i));c.a.b;)r=a(Sm(c.a).kc(),84),n=cE(r,O7(r,t.a),n);return n}function y1e(t,e,n){var i,r,c,l;for(n=nN(e,t.e,-1-t.c,n),l=Bot(t.a),c=(i=new qg(new xp(l.a).a),new pT(i));c.a.b;)r=a(Sm(c.a).kc(),84),n=cE(r,O7(r,t.a),n);return n}function l8t(t){var e,n,i;if(t==null)return null;if(n=a(t,15),n.Wb())return"";for(i=new Sp,e=n.tc();e.hc();)mo(i,(fr(),hi(e.ic()))),i.a+=" ";return B9(i,i.a.length-1)}function h8t(t){var e,n,i;if(t==null)return null;if(n=a(t,15),n.Wb())return"";for(i=new Sp,e=n.tc();e.hc();)mo(i,(fr(),hi(e.ic()))),i.a+=" ";return B9(i,i.a.length-1)}function x1e(t,e){tE();var n,i;for(i=(V1(),eB),n=t;e>1;e>>=1)e&1&&(i=e_(i,n)),n.d==1?n=e_(n,n):n=new tRt(CNt(n.a,n.d,dt(Gn,pi,22,n.d<<1,15,1)));return i=e_(i,n),i}function KC(t,e){return t.b.a=y.Math.min(t.b.a,e.c),t.b.b=y.Math.min(t.b.b,e.d),t.a.a=y.Math.max(t.a.a,e.c),t.a.b=y.Math.max(t.a.b,e.d),t.c[t.c.length]=e,!0}function M1e(t){var e,n,i,r;for(r=-1,i=0,n=new H(t);n.a=0&&le(t.substr(e,3),"GMT")||e>=0&&le(t.substr(e,3),"UTC"))&&(n[0]=e+3),Tht(t,n,i)}function ult(){ult=P;var t,e,n,i;for(V1t=dt(Os,Xo,22,25,15,1),q1t=dt(Os,Xo,22,33,15,1),i=152587890625e-16,e=32;e>=0;e--)q1t[e]=i,i*=.5;for(n=1,t=24;t>=0;t--)V1t[t]=n,n*=.5}function b8t(t,e,n){var i,r;switch(i=(Hn(e.b!=0),a(Ql(e,e.a.a),9)),n.g){case 0:i.b=0;break;case 2:i.b=t.f;break;case 3:i.a=0;break;default:i.a=t.g}return r=qn(e,0),vM(r,i),e}function E7(){E7=P,tQ=new FT(UBt,0),Ebt=new FT("LONGEST_PATH",1),QJ=new FT("COFFMAN_GRAHAM",2),Mbt=new FT(hY,3),Sbt=new FT("STRETCH_WIDTH",4),eF=new FT("MIN_WIDTH",5)}function H1e(t,e){var n,i,r,c;for(n=0,i=0,c=new H(e.b);c.an;c--)t[c]|=e[c-n-1]>>>l,t[c-1]=e[c-n-1]<=t.f)break;c.c[c.c.length]=n}return c}function q1e(t,e,n){var i,r,c;return c=0,i=n[e],e>4&15,c=t[i]&15,l[r++]=jvt[n],l[r++]=jvt[c];return ml(l,0,l.length)}function _8t(t,e,n){var i,r,c,l,f;for(i=n._b(),eRt(t,t.i+i),f=t.i-e,f>0&&Aa(t.g,e,t.g,e+i,f),l=n.tc(),t.i+=i,r=0;r=ao?(e=WP+(t-ao>>10&1023)&qr,n=56320+(t-ao&1023)&qr,String.fromCharCode(e)+(""+String.fromCharCode(n))):String.fromCharCode(t&qr)}function tge(t){var e,n,i;for(i=t.e.c.length,t.a=Vb(Gn,[wt,pi],[37,22],15,[i,i],2),n=new H(t.c);n.a0&&zRt(this,this.c-1,(Ht(),Qe)),this.c1&&(e.c[e.c.length]=c))}function nge(t){var e,n,i;for(n=new $n((!t.a&&(t.a=new Wt(zr,t,10,11)),t.a));n.e!=n.i._b();)if(e=a(ci(n),35),i=SP(e),!Jn((Ao(),new $d(id(Zd(i.a,new X))))))return e;return null}function y8t(t,e,n){var i,r;for(r=new $n((!t.a&&(t.a=new Wt(zr,t,10,11)),t.a));r.e!=r.i._b();)i=a(ci(r),35),Wd(i,i.i+e,i.j+n);vo((!t.b&&(t.b=new Wt(Xs,t,12,3)),t.b),new ZMt(e,n))}function x8t(t,e,n,i,r){var c,l,f;for(c=KDt(t,e,n,i,r),f=!1;!c;)R7(t,r,!0),f=!0,c=KDt(t,e,n,i,r);f&&R7(t,r,!1),l=GN(r),l.c.length!=0&&(t.d&&t.d.If(l),x8t(t,r,n,i,l))}function plt(t,e){var n;n=Zc((v1(),Nl),t),ct(n,456)?tc(Nl,t,new mEt(this,e)):tc(Nl,t,this),_lt(this,e),e==(Q3(),Qvt)?(this.wb=a(this,1633),a(e,1635)):this.wb=(T1(),Ae)}function ige(t){var e,n,i;if(t==null)return null;for(e=null,n=0;n0;){if(n=i,i=(i-1)/2|0,t.a.Ld(Ee(t.b,i),e)<=0)return Kl(t.b,n,e),!0;Kl(t.b,n,Ee(t.b,i))}return Kl(t.b,i,e),!0}function age(t){for(var e,n,i,r;t.o.a.c.length!=0;)n=a(Hat(t.o),48),i=a(n.a,113),e=a(n.b,189),r=n7(e,i),e.e==i?(fD(r.g,e),i.e=r.e+e.a):(fD(r.b,e),i.e=r.e-e.a),Ut(t.e.a,i)}function glt(t,e,n,i){var r,c;if(r=0,n)r=qN(t.a[n.g][e.g],i);else for(c=0;cjZ)return T8t(n);if(i=n,n==t)throw K(new yc("There is a cycle in the containment hierarchy of "+t))}return i}function C8t(){C8t=P,Hzt=Y(Z(At,1),wt,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),Gzt=Y(Z(At,1),wt,2,6,["Jan","Feb","Mar","Apr",nx,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"])}function lge(t,e,n,i){var r,c;for(c=e,r=c.d==null||t.a.Ld(n.d,c.d)>0?1:0;c.a[r]!=n;)c=c.a[r],r=t.a.Ld(n.d,c.d)>0?1:0;c.a[r]=i,i.b=n.b,i.a[0]=n.a[0],i.a[1]=n.a[1],n.a[0]=null,n.a[1]=null}function Mo(){Mo=P,Of=new U5("P1_CYCLE_BREAKING",0),bx=new U5("P2_LAYERING",1),aa=new U5("P3_NODE_ORDERING",2),ua=new U5("P4_NODE_PLACEMENT",3),Yo=new U5("P5_EDGE_ROUTING",4)}function A8t(t){var e,n;return n=y.Math.sqrt(t.f*(t.i==null&&(t.i=_at(t,new Wo)),lt(t.i))/(t.b*(t.g==null&&(t.g=MPt(t,new Wa)),lt(t.g)))),e=or(Ka(y.Math.round(n))),e=cm(e,t.f),e}function k8t(t){var e,n;n=t.k,e=sr(new We(n.a,n.b),t.n),this.d=y.Math.min(n.b,e.b),this.a=y.Math.max(n.b,e.b),this.b=y.Math.min(n.a,e.a),this.c=y.Math.max(n.a,e.a)}function hge(t){var e,n;if(t.a>=t.c.c.length)return yM(),B4;if(n=G(t),t.a>=t.c.c.length)return new l2(n);e=new qa,Ir(e,si(n));do Ir(e,si(G(t)));while(t.a0&&DNt((mi(0,n.c.length),a(n.c[0],26)),t),n.c.length>1&&DNt(a(Ee(n,n.c.length-1),26),t),Vn(e)}function pge(t,e,n,i){var r,c,l,f,g;return l=jRt(t.a,e,n),f=a(l.a,21).a,c=a(l.b,21).a,i&&(g=a(z(e,(Ft(),Du)),8),r=a(z(n,Du),8),g&&r&&(bkt(t.b,g,r),f+=t.b.i,c+=t.b.e)),f>c}function P8t(t,e){var n,i,r;if(blt(t,e))return!0;for(i=new H(e);i.ac&&Bre(b,lLt(n[f],G1t))&&(r=f,c=g);return r>=0&&(i[0]=e+c),r}function T7(t,e){var n,i,r;if(r=0,i=e[0],i>=t.length)return-1;for(n=t.charCodeAt(i);n>=48&&n<=57&&(r=r*10+(n-48),++i,!(i>=t.length));)n=t.charCodeAt(i);return i>e[0]?e[0]=i:r=-1,r}function bge(t,e){var n,i,r;return i=($C(),_6),r=y.Math.abs(t.b),n=y.Math.abs(e.f-t.b),ne$(t.d).c?(t.i+=t.g.c,Nq(t.d)):e$(t.d).c>e$(t.g).c?(t.e+=t.d.c,Nq(t.g)):(t.i+=MCt(t.g),t.e+=MCt(t.d),Nq(t.g),Nq(t.d))}function QM(){QM=P,V4=new BT(jm,0),K0t=new BT(pE,1),tmt=new BT(gE,2),Q0t=new BT("LEFT_RIGHT_CONSTRAINT_LOCKING",3),J0t=new BT("LEFT_RIGHT_CONNECTION_LOCKING",4),Y0t=new BT(ABt,5)}function _ge(t){var e,n,i,r,c,l;for(i=INt(JX(t)),e=is,c=0,r=0;e>.5&&c<50;)r=EDt(i),n=V2(i,r,!0),e=y.Math.abs(n.b),++c;return l=Yt(H1(fl(t.g),fl(t.g).b-1)),V2(t,(En(l),l-r),!1)}function yge(t){var e,n,i,r,c,l;for(i=INt(JX(t)),e=is,c=0,r=0;e>.5&&c<50;)r=MDt(i),n=V2(i,r,!0),e=y.Math.abs(n.a),++c;return l=Yt(H1(fl(t.g),fl(t.g).b-1)),V2(t,(En(l),l-r),!1)}function D8t(t,e,n,i){t.a.d=y.Math.min(e,n),t.a.a=y.Math.max(e,i)-t.a.d,ef&&(g=f/i),r>c&&(b=c/r),l=y.Math.min(g,b),t.a+=l*(e.a-t.a),t.b+=l*(e.b-t.b)}function Sge(t,e){wD();var n,i,r,c;if(e.b<2)return!1;for(c=qn(e,0),n=a(Yn(c),9),i=n;c.b!=c.d.c;){if(r=a(Yn(c),9),_Dt(t,i,r))return!0;i=r}return!!_Dt(t,i,n)}function vlt(t,e,n,i){var r,c;return n==0?(!t.o&&(t.o=new lu((Ic(),pp),ug,t,0)),SD(t.o,e,i)):(c=a(Ve((r=a(an(t,16),24),r||t.Rg()),n),61),c.aj().ej(t,ra(t),n-ei(t.Rg()),e,i))}function Tge(t,e){var n;e!=t.a?(n=null,t.a&&(n=a(t.a,42).Cg(t,4,of,null)),e&&(n=a(e,42).Ag(t,4,of,n)),n=Vat(t,e,n),n&&n.Th()):t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,1,e,e))}function B8t(t){var e;return t.Db&64?dX(t):(e=new ll(Cpt),!t.a||Ii(Ii((e.a+=' "',e),t.a),'"'),Ii(um(Ii(um(Ii(um(Ii(um((e.a+=" (",e),t.i),","),t.j)," | "),t.g),","),t.f),")"),e.a)}function Cge(t){var e,n,i,r,c,l,f,g,b;return b=llt(t),n=t.e,c=n!=null,c&&eC(b,PO,t.e),f=t.k,l=!!f,l&&eC(b,"type",nL(t.k)),i=O9(t.j),r=!i,r&&(g=new Rg,P1(b,tK,g),e=new _G(g),vo(t.j,e)),b}function Age(t,e){var n;if(e!=null&&!t.c.jj().Li(e))throw n=ct(e,51)?a(e,51).mg().zb:Og(fu(e)),K(new wT(G_+t.c.be()+"'s type '"+t.c.jj().be()+"' does not permit a value of type '"+n+"'"))}function kge(t,e){var n,i,r,c;if(En(e),c=t.a._b(),c>22-e,r=t.h<>22-e):e<44?(n=0,i=t.l<>44-e):(n=0,i=0,r=t.l<>>r|n[l+i+1]<>>r,++l}return c}function U8t(t){Rut();var e,n,i,r;return i=a(z(t,(qt(),qB)),318),r=lt(de(z(t,$J)))||zt(z(t,OE))===zt((I2(),S6)),e=a(z(t,Umt),21).a,n=t.a.c.length,!r&&i!=(BM(),BB)&&(e==0||e>n)}function Rge(t,e,n){var i,r;for(r=new Gs(t.b,0);r.b=l)return rn.a._b()?a(Ee(i,r-n.a._b()-1),8):null;return null}function _lt(t,e){var n;e!=t.sb?(n=null,t.sb&&(n=a(t.sb,42).Cg(t,1,CA,null)),e&&(n=a(e,42).Ag(t,1,CA,n)),n=Xat(t,e,n),n&&n.Th()):t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,4,e,e))}function Oge(t,e,n){var i,r,c,l,f;if(n)for(r=n.a.length,i=new Ug(r),f=(i.b-i.a)*i.c<0?(_1(),hg):new x1(i);f.hc();)l=a(f.ic(),21),c=LM(n,l.a),Rpt in c.a||tK in c.a?sve(t,c,e):l3e(t,c,e)}function j8t(t){switch(t.g){case 0:return new GG((Tm(),oF));case 1:return new rT;default:throw K(new yn("No implementation is available for the crossing minimizer "+(t.f!=null?t.f:""+t.g)))}}function Bge(t){lht();var e,n,i,r,c;if(t==null)return null;for(i=t.length,r=i*2,e=dt(nl,Pf,22,r,15,1),n=0;n>4],e[n*2+1]=iU[c&15];return ml(e,0,e.length)}function Eo(){ep(),Sst.call(this),this.i=(Ht(),Wc),this.a=new go,new _it,this.e=(Ah(2,ex),new qu(2)),this.d=(Ah(4,ex),new qu(4)),this.f=(Ah(4,ex),new qu(4)),this.c=new yMt(this.d,this.f)}function Fge(t,e){var n,i;return!(lt(de(z(e,(Ft(),eg))))||t==(bl(),D6)&&(i=e.c.g,i.j==(Ke(),bu)||(n=a(z(i,(qt(),la)),178),n==xw)))}function Uge(t,e){var n,i;return!(lt(de(z(e,(Ft(),eg))))||t==(bl(),Z4)&&(i=e.d.g,i.j==(Ke(),bu)||(n=a(z(i,(qt(),la)),178),n==Km)))}function zge(t,e){var n,i,r;n=fre(e,t.e),i=a(zi(t.g.f,n),21).a,r=t.a.c.length-1,t.a.c.length!=0&&a(Ee(t.a,r),269).c==i?(++a(Ee(t.a,r),269).a,++a(Ee(t.a,r),269).b):Ut(t.a,new FSt(i))}function H8t(t,e,n,i,r){if(ii&&(t.a=i),t.br&&(t.b=r),t}function jge(t){if(ct(t,180))return Nbe(a(t,180));if(ct(t,199))return wfe(a(t,199));if(ct(t,27))return Cge(a(t,27));throw K(new yn(zpt+Gp(new ju(Y(Z(un,1),te,1,5,[t])))))}function Ja(t,e){switch(e.g){case 1:return Xd(t.i,(ep(),$gt));case 2:return Xd(t.i,(ep(),Wgt));case 3:return Xd(t.i,(ep(),Vgt));case 4:return Xd(t.i,(ep(),qgt));default:return we(),we(),fo}}function G8t(t){var e;this.a=t,e=(Ke(),Y(Z(QK,1),jt,232,0,[gs,Hr,rs,uc,bu,Jc,ef])).length,this.b=Vb(Twt,[wt,zBt],[616,166],0,[e,e],2),this.c=Vb(Twt,[wt,zBt],[616,166],0,[e,e],2),X_e(this)}function Hge(t){var e,n;return n=a(z(t,(Ft(),Qc)),19),e=new as,(n.pc((So(),J_))||lt(de(z(t,(qt(),N6)))))&&(pa(e,KWt),n.pc(Q_)&&pa(e,JWt)),n.pc(IE)&&pa(e,ZWt),n.pc(RE)&&pa(e,YWt),e}function W8t(t,e,n){var i,r,c,l;if(e.b!=0){for(i=new Fr,l=qn(e,0);l.b!=l.d.c;)c=a(Yn(l),76),yo(i,Cat(c)),r=c.e,r.a=a(z(c,(mc(),wQ)),21).a,r.b=a(z(c,Zbt),21).a;W8t(t,i,Ta(n,i.b/t.a|0))}}function bP(t){var e,n,i;for(i=new Va,Xi(i,new We(t.j,t.k)),n=new $n((!t.a&&(t.a=new Ss(sf,t,5)),t.a));n.e!=n.i._b();)e=a(ci(n),531),Xi(i,new We(e.a,e.b));return Xi(i,new We(t.b,t.c)),i}function Gge(t,e,n,i,r){var c,l,f,g,b,v;if(r)for(g=r.a.length,c=new Ug(g),v=(c.b-c.a)*c.c<0?(_1(),hg):new x1(c);v.hc();)b=a(v.ic(),21),f=LM(r,b.a),l=new A4t(t,e,n,i),Gve(l.a,l.b,l.c,l.d,f)}function M_(t){$b();var e,n,i;for(i=new qa,XL(i,t),n=i.a.Xb().tc();n.hc();)e=n.ic(),si(e);switch(i.a._b()){case 0:return yM(),B4;case 1:return new l2(i.a.Xb().tc().ic());default:return new iW(i)}}function ylt(t,e){var n,i,r;for(r=qi,i=new H(p_(e));i.a1&&(t.e.b+=t.a)):(t.e.a+=n.a,t.e.b=y.Math.max(t.e.b,n.b),t.d.c.length>1&&(t.e.a+=t.a))}function $8t(t,e,n){var i,r,c,l;if(c=a(an(t.a,8),1629),c!=null)for(i=0,r=c.length;i1)throw K(new yn("In straight spline segments there may be only one edge."));i=t.a.c,n=t.a.c+t.a.b,Xi(a(e.a.Xb().tc().ic(),14).a,new We(i+(n-i)/2,t.b))}function V8t(t,e,n,i){var r;this.b=i,this.e=t==(Tm(),sA),r=e[n],this.d=Vb(Ol,[wt,a0],[221,22],16,[r.length,r.length],2),this.a=Vb(Gn,[wt,pi],[37,22],15,[r.length,r.length],2),this.c=new flt(e,n)}function gX(t){var e,n,i;if(t.a==null)for(t.a=dt(Ol,a0,22,t.c.b.c.length,16,1),t.a[0]=!1,i=new H(t.c.b),i.a>>e,r=t.m>>e|n<<22-e,i=t.l>>e|t.m<<22-e):e<44?(c=0,r=n>>>e-22,i=t.m>>e-22|t.h<<44-e):(c=0,r=0,i=n>>>e-44),ia(i&eu,r&eu,c&sp)}function X8t(t,e,n){var i,r,c,l,f;for(f=gu(t.e.mg(),e),r=a(t.g,124),i=0,l=0;ln?Elt(t,n,"start index"):e<0||e>n?Elt(e,n,"end index"):EP("end index (%s) must not be less than start index (%s)",Y(Z(un,1),te,1,5,[Xt(e),Xt(t)]))}function Z8t(t,e){var n,i,r;if(e===t)return!0;if(!ct(e,109)||(r=a(e,109),t._b()!=r._b()))return!1;for(i=r.Tb().tc();i.hc();)if(n=a(i.ic(),38),!t.Wc(n))return!1;return!0}function Y8t(t,e){var n,i,r,c;for(i=0,r=t.length;i0?f[l-1]:dt(Cl,Ih,8,0,0,1),r=f[l],b=l0&&e9t(t,c,n));e.o=0}function r0e(t,e){var n,i,r;for(r=new H(e.f);r.ae)throw K(new yn("Top must be smaller or equal to bottom."));if(0>t)throw K(new yn("Left must be smaller or equal to right."));this.d=0,this.c=t,this.a=e,this.b=0}function i9t(t,e){var n,i,r;if(e.c.length!=0){for(n=P8t(t,e),r=!1;!n;)R7(t,e,!0),r=!0,n=P8t(t,e);r&&R7(t,e,!1),i=GN(e),t.b&&t.b.If(i),t.a=G6t(t,(mi(0,e.c.length),a(e.c[0],35))),i9t(t,i)}}function De(t){var e;this.c=new Fr,this.f=t.e,this.e=t.d,this.i=t.g,this.d=t.c,this.b=t.b,this.k=t.j,this.a=t.a,t.i?this.j=t.i:this.j=(e=a(xu(Jp),10),new ja(e,a(cu(e,e.length),10),0)),this.g=t.f}function i0(){i0=P,Cwt=new v2(cx,0),Ec=new v2("BOOLEAN",1),Pa=new v2("INT",2),K6=new v2("STRING",3),ha=new v2("DOUBLE",4),xs=new v2("ENUM",5),zE=new v2("ENUMSET",6),Ed=new v2("OBJECT",7)}function Qa(){Qa=P,f_t=Y(Z(At,1),wt,2,6,[e1t,u6,HO,XUt,GO,lK,PO]),h_t=Y(Z(At,1),wt,2,6,[e1t,"empty",u6,a6,"elementOnly"]),d_t=Y(Z(At,1),wt,2,6,[e1t,"preserve","replace",Nh]),eo=new lCt}function rr(t,e){var n;return n=a(t.c.Vb(e),13),!n&&(n=t.Pc(e)),ct(n,196)?new Ort(t,e,a(n,196)):ct(n,60)?new QW(t,e,a(n,60)):ct(n,19)?new dst(t,e,a(n,19)):ct(n,15)?dct(t,e,a(n,15),null):new CL(t,e,n,null)}function z(t,e){var n,i;return i=(!t.p&&(t.p=(ts(),new vi)),zi(t.p,e)),i??(n=e.Of(),ct(n,4)&&(n==null?(!t.p&&(t.p=(ts(),new vi)),IM(t.p,e)):(!t.p&&(t.p=(ts(),new vi)),wr(t.p,e,n))),n)}function s0e(t,e){var n,i,r,c;if(t.e.c.length==0)return null;for(c=new lM,i=new H(t.e);i.a=(r/2|0))for(this.e=i?i.c:null,this.d=r;n++0;)sct(this);this.b=e,this.a=null}function u0e(t){var e,n,i,r,c;return r=a(t.a,21).a,c=a(t.b,21).a,e=(r<0?-r:r)>(c<0?-c:c)?r<0?-r:r:c<0?-c:c,r<=0&&r==c?(n=0,i=c-1):r==-e&&c!=e?(n=c,i=r,c>=0&&++n):(n=-c,i=r),new zs(Xt(n),Xt(i))}function l0e(t,e){var n;return t.c.length==0?!1:(n=NIt((mi(0,t.c.length),a(t.c[0],14)).c.g),Eu(),n==(nw(),sy)||n==ry?!0:mN(Vh(new gi(null,new Ei(t,16)),new A3),new FH(e)))}function Slt(t,e,n){var i,r,c;if(!t.b[e.g]){for(t.b[e.g]=!0,i=n,!n&&(i=new yN),Xi(i.b,e),c=t.a[e.g].tc();c.hc();)r=a(c.ic(),170),r.b!=e&&Slt(t,r.b,i),r.c!=e&&Slt(t,r.c,i),Xi(i.a,r);return i}return null}function h0e(t){switch(t.g){case 0:case 1:case 2:return Ht(),Tn;case 3:case 4:case 5:return Ht(),fi;case 6:case 7:case 8:return Ht(),on;case 9:case 10:case 11:return Ht(),Qe;default:return Ht(),Wc}}function f0e(t){var e,n,i,r;for(e=0,i=t.length,r=i-4,n=0;n0)try{r=ku(e,Vs,qi)}catch(c){throw c=vr(c),ct(c,118)?(i=c,K(new TN(i))):K(c)}return n=(!t.a&&(t.a=new T5(t)),t.a),r=0?a(at(n,r),51):null}function _0e(t,e,n,i){var r;return r=x_(t,n,Y(Z(At,1),wt,2,6,[IZ,RZ,DZ,NZ,OZ,BZ,FZ]),e),r<0&&(r=x_(t,n,Y(Z(At,1),wt,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),e)),r<0?!1:(i.d=r,!0)}function y0e(t,e,n,i){var r;return r=x_(t,n,Y(Z(At,1),wt,2,6,[IZ,RZ,DZ,NZ,OZ,BZ,FZ]),e),r<0&&(r=x_(t,n,Y(Z(At,1),wt,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),e)),r<0?!1:(i.d=r,!0)}function x0e(t){var e,n,i;for(ibe(t),i=new Dt,n=new H(t.a.a.b);n.a>1),Alt(e,t,g,b,-r,c),Alt(e,t,b,f,-r,c),c.Ld(t[b-1],t[b])<=0){for(;n=0?(e||(e=new yT,i>0&&mo(e,t.substr(0,i))),e.a+="\\",wM(e,n&qr)):e&&wM(e,n&qr);return e?e.a:t}function S0e(t,e,n){var i,r,c,l;c=t.c,l=t.d,r=(zo(Y(Z(ss,1),wt,9,0,[c.g.k,c.k,c.a])).b+zo(Y(Z(ss,1),wt,9,0,[l.g.k,l.k,l.a])).b)/2,c.i==(Ht(),Qe)?i=new We(e+c.g.c.c.a+n,r):i=new We(e-n,r),pD(t.a,0,i)}function l9t(t,e){var n,i;return lct(t.a),qb(t.a,(RN(),vF),vF),qb(t.a,UE,UE),i=new as,Ni(i,UE,(r7(),MQ)),zt(cn(e,(tw(),TQ)))!==zt((JL(),_F))&&Ni(i,UE,yQ),Ni(i,UE,xQ),zEt(t.a,i),n=zht(t.a,e),n}function h9t(t){if(!t)return _f(),Dzt;var e=t.valueOf?t.valueOf():t;if(e!==t){var n=AK[typeof e];return n?n(e):qat(typeof e)}else return t instanceof Array||t instanceof y.Array?new I8(t):new sT(t)}function _P(t,e){var n;if(e<0)throw K(new E9("Negative exponent"));if(e==0)return eB;if(e==1||Yat(t,eB)||Yat(t,AE))return t;if(!$9t(t,0)){for(n=1;!$9t(t,n);)++n;return e_(pfe(n*e),_P(_ct(t,n),e))}return x1e(t,e)}function T0e(t,e){var n,i,r;return ct(e.g,8)&&a(e.g,8).j==(Ke(),rs)?is:(r=P2(e),r?y.Math.max(0,t.b/2-.5):(n=Qv(e),n?(i=lt(Yt(qM(n,(qt(),lp)))),y.Math.max(0,i/2-.5)):is))}function C0e(t,e){var n,i,r;return ct(e.g,8)&&a(e.g,8).j==(Ke(),rs)?is:(r=P2(e),r?y.Math.max(0,t.b/2-.5):(n=Qv(e),n?(i=lt(Yt(qM(n,(qt(),lp)))),y.Math.max(0,i/2-.5)):is))}function A0e(t,e){var n,i,r,c,l;if(!e.Wb()){if(r=a(e.cd(0),125),e._b()==1){LDt(t,r,r,1,0,e);return}for(n=1;nc.a&&!e&&(r.b=c.a),r.c=-(r.b-c.a)/2,n.g){case 1:r.d=-r.a;break;case 3:r.d=c.b}VX(i),qX(i)}function g9t(t,e,n){var i,r,c;switch(c=t.o,i=a(js(t.p,n),219),r=i.i,r.b=xP(i),r.a=yP(i),r.a=y.Math.max(r.a,c.b),r.a>c.b&&!e&&(r.a=c.b),r.d=-(r.a-c.b)/2,n.g){case 4:r.c=-r.b;break;case 2:r.c=c.a}VX(i),qX(i)}function e4(t,e){bNt(t,e),t.b&1&&(t.a.a=null),t.b&2&&(t.a.f=null),t.b&4&&(t.a.g=null,t.a.i=null),t.b&16&&(t.a.d=null,t.a.e=null),t.b&8&&(t.a.b=null),t.b&32&&(t.a.j=null,t.a.c=null)}function m9t(t){var e,n,i,r;if(n=a(t,42).Kg(),n)try{if(i=null,e=nE((v1(),Nl),FNt(xfe(n))),e&&(r=e.Lg(),r&&(i=r.gk(hi(lt(n.e))))),i&&i!=t)return m9t(i)}catch(c){if(c=vr(c),!ct(c,54))throw K(c)}return t}function b9t(t,e){var n;e.d?e.d.b=e.b:t.a=e.b,e.b?e.b.d=e.d:t.e=e.d,!e.e&&!e.c?(n=a(IM(t.b,e.a),264),n.a=0,++t.c):(n=a(zi(t.b,e.a),264),--n.a,e.e?e.e.c=e.c:n.b=e.c,e.c?e.c.e=e.e:n.c=e.e),--t.d}function Llt(t){var e,n;return t>-0x800000000000&&t<0x800000000000?t==0?0:(e=t<0,e&&(t=-t),n=Tr(y.Math.floor(y.Math.log(t)/.6931471805599453)),(!e||t!=y.Math.pow(2,n))&&++n,n):bPt(Ka(t))}function w9t(t,e){var n,i,r,c,l,f;for(n=t.b.c.length,r=Ee(t.b,e);e*2+10)for(l=t.c.d,f=t.d.d,r=hl(za(new We(f.a,f.b),l),1/(i+1)),c=new We(l.a,l.b),n=new H(t.a);n.a0&&(l+=n,++e);e>1&&(l+=t.c*(e-1))}else l=c3t(SPt(vL(wo(Sot(t.a),new Bk),new Mv)));return l>0?l+t.n.d+t.n.a:0}function xP(t){var e,n,i,r,c,l;if(l=0,t.b==0)l=c3t(SPt(vL(wo(Sot(t.a),new yz),new Lg)));else{for(c=PRt(t,!0),e=0,i=0,r=c.length;i0&&(l+=n,++e);e>1&&(l+=t.c*(e-1))}return l>0?l+t.n.b+t.n.c:0}function P0e(t){var e,n;return n=-t.a,e=Y(Z(nl,1),Pf,22,15,[43,48,48,48,48]),n<0&&(e[0]=45,n=-n),e[1]=e[1]+((n/60|0)/10|0)&qr,e[2]=e[2]+(n/60|0)%10&qr,e[3]=e[3]+(n%60/10|0)&qr,e[4]=e[4]+n%10&qr,ml(e,0,e.length)}function I0e(t){var e,n,i,r,c,l;for(l=WM(t.d,t.e),c=l.tc();c.hc();)for(r=a(c.ic(),11),i=t.e==(Ht(),on)?r.d:r.f,n=new H(i);n.a=0;c+=n?1:-1)l=l|e.c.qf(g,c,n,i),l=l|e.q.xf(g,c,n),l=l|ONt(t,g[c],n,i);return Ir(t.c,e),l}function y9t(t,e){var n,i,r,c,l,f;for(c=new H(t.b);c.a=0&&i0;){if(e=a(t.k.cd(t.n-1),75),n=e.nj(),ct(n,62)&&a(a(n,17),62).Bb&ca&&(!t.e||n.Vi()!=$E||n.pi()!=0)&&e.lc()!=null)return!0;--t.n}return!1}else return t.n>0}function Plt(t,e){var n,i,r,c;if(Ci(t),t.c!=0||t.a!=123)throw K(new ri(ai((Kn(),eUt))));if(c=e==112,i=t.d,n=hM(t.i,125,i),n<0)throw K(new ri(ai((Kn(),nUt))));return r=$h(t.i,i,n),t.d=n+1,U5t(r,c,(t.e&512)==512)}function N0e(t){var e,n;return n=-t.a,e=Y(Z(nl,1),Pf,22,15,[43,48,48,58,48,48]),n<0&&(e[0]=45,n=-n),e[1]=e[1]+((n/60|0)/10|0)&qr,e[2]=e[2]+(n/60|0)%10&qr,e[4]=e[4]+(n%60/10|0)&qr,e[5]=e[5]+n%10&qr,ml(e,0,e.length)}function O0e(t){var e;return e=Y(Z(nl,1),Pf,22,15,[71,77,84,45,48,48,58,48,48]),t<=0&&(e[3]=43,t=-t),e[4]=e[4]+((t/60|0)/10|0)&qr,e[5]=e[5]+(t/60|0)%10&qr,e[7]=e[7]+(t%60/10|0)&qr,e[8]=e[8]+t%10&qr,ml(e,0,e.length)}function E9t(t,e){var n,i,r;return i=new Jh(t),Uo(i,e),Ct(i,(Ft(),HB),e),Ct(i,(qt(),Qi),(Ls(),Gc)),Ct(i,Bf,(md(),EF)),jl(i,(Ke(),rs)),n=new Eo,ds(n,i),yr(n,(Ht(),on)),r=new Eo,ds(r,i),yr(r,Qe),i}function S9t(t,e){var n,i,r,c,l;for(t.c[e.o]=!0,Ut(t.a,e),l=new H(e.i);l.a0&&(r=n),l=new H(t.f.e);l.a=c)l.Pb();else for(r=l.tc(),i=0;i0?Pit():l<0&&Rlt(t,e,-l),!0):!1}function j0e(t){var e,n,i,r,c,l,f,g,b,v;for(n=t.o,e=t.p,l=qi,r=Vs,f=qi,c=Vs,b=0;bb?r:b,f=fv?c:v);return g=r-l+1,i=c-f+1,new E4t(Xt(l),Xt(f),Xt(g),Xt(i))}function H0e(t,e){var n,i,r;return n=a(z(e,(Ph(),kE)),21).a-a(z(t,kE),21).a,n==0?(i=za(Xc(a(z(t,(R1(),x6)),9)),a(z(t,H4),9)),r=za(Xc(a(z(e,x6),9)),a(z(e,H4),9)),ro(i.a*i.b,r.a*r.b)):n}function G0e(t,e){var n,i,r;return n=a(z(e,(sw(),wF)),21).a-a(z(t,wF),21).a,n==0?(i=za(Xc(a(z(t,(mc(),Z6)),9)),a(z(t,hA),9)),r=za(Xc(a(z(e,Z6),9)),a(z(e,hA),9)),ro(i.a*i.b,r.a*r.b)):n}function W0e(t,e,n){var i,r,c,l,f,g;if(!t||t.c.length==0)return null;for(c=new eAt(e,!n),r=new H(t);r.a0)switch(e.g){case 2:c.n.c=t.s;break;case 4:c.n.b=t.s}}function yX(t,e){var n,i,r;if(r=oE((Qa(),eo),t.mg(),e),r)return Jo(),a(r,61).bj()||(r=lC(qo(eo,r))),i=(n=t.rg(r),a(n>=0?t.ug(n,!0,!0):Z2(t,r,!0),184)),a(i,237).wk(e);throw K(new yn(G_+e.be()+Lpt))}function q0e(t,e,n){var i,r,c,l;return c=A7t(UV(),e),i=null,c&&(l=x7t(c,n),r=null,l!=null&&(r=(l==null?(!t.o&&(t.o=new lu((Ic(),pp),ug,t,0)),aP(t.o,c)):(!t.o&&(t.o=new lu((Ic(),pp),ug,t,0)),gP(t.o,c,l)),t)),i=r),i}function Dlt(t,e,n,i){var r,c,l,f,g;if(r=t.d[e],r){if(c=r.g,g=r.i,i!=null){for(f=0;f1||n==-1?(t.b=-1,!0):(e=wl(t),e&&(Jo(),e.Ri()==RUt)?(t.b=-1,!0):(t.b=1,!1));default:case 1:return!1}}function X0e(t,e){var n,i,r,c,l;for(i=(!e.s&&(e.s=new Wt(Ra,e,21,17)),e.s),c=null,r=0,l=i.i;rr)?(Hn(c.a!=null),a(c.a,8)):null}function J0e(t,e){Zl();var n,i,r,c,l,f;for(n=null,l=e.tc();l.hc();)c=a(l.ic(),125),!c.k&&(i=pee(c.a),r=dre(c.a),f=new u4(i,r,null,a(c.d.a.Xb().tc().ic(),14)),Ut(f.c,c.a),t.c[t.c.length]=f,n&&Ut(n.d,f),n=f)}function Q0e(t,e,n){var i,r,c,l,f,g;for(i=a(rr(t.c,e),15),r=a(rr(t.c,n),15),c=i.fd(i._b()),l=r.fd(r._b());c.Cc()&&l.Cc();)if(f=a(c.Ec(),21),g=a(l.Ec(),21),f!=g)return Lp(f.a,g.a);return!c.hc()&&!l.hc()?0:c.hc()?1:-1}function n4(t,e,n,i,r){var c,l,f,g;return g=JW(t,a(r,51)),zt(g)!==zt(r)?(f=a(t.g[n],75),c=k1(e,g),XT(t,n,lX(t,n,c)),Xl(t.e)&&(l=Hg(t,9,c.nj(),r,g,i,!1),olt(l,new Qd(t.e,9,t.c,f,c,i,!1)),SV(l)),g):r}function tme(t,e,n){var i,r,c,l;for(r=n,c=uTt(vL(a(a(rr(t.r,e),19),60).xc(),new Ab)),l=0;c.a||(c.a=Vv(c.c,c)),c.a;)if(r){pN(c),r=!1;continue}else i=pN(c),c.a||(c.a=Vv(c.c,c)),c.a&&(l=y.Math.max(l,i));return l}function cr(t,e,n){var i;if(i=a(t.c.Vb(e),13),i)return i.nc(n)?(++t.d,!0):!1;if(i=t.Pc(e),i.nc(n))return++t.d,t.c.Zb(e,i),!0;throw K(new sV("New Collection violated the Collection spec"))}function eme(t){var e,n,i,r,c,l;for(r=0,t.q=new Dt,e=new $r,l=new H(t.p);l.a>16),e=i>>16&16,n=16-e,t=t>>e,i=t-256,e=i>>16&8,n+=e,t<<=e,i=t-zm,e=i>>16&4,n+=e,t<<=e,i=t-Lf,e=i>>16&2,n+=e,t<<=e,i=t>>14,e=i&~(i>>1),n+2-e)}function ime(t,e,n,i){var r,c,l,f,g,b;for(r=0;r=0&&b>=0&&g=0?t.ug(i,!0,!0):Z2(t,c,!0),184)),a(r,237).sk(e,n);throw K(new yn(G_+e.be()+Lpt))}function P9t(t){var e,n;if(Gd(a(z(t,(qt(),Qi)),83)))for(n=new H(t.i);n.a>24;return l}function ame(t,e){var n,i,r,c,l;if(n=a(an(t.a,4),116),l=n==null?0:n.length,e>=l)throw K(new $v(e,l));return r=n[e],l==1?i=null:(i=dt(att,aK,380,l-1,0,1),Aa(n,0,i,0,e),c=l-e-1,c>0&&Aa(n,e+1,i,e,c)),lP(t,i),$8t(t,e,r),r}function ume(t,e){var n,i,r;if(zt(t)===zt(e))return!0;if(t==null||e==null||t.length!=e.length)return!1;for(n=0;n=null.tl()?(D7(t),Flt(t)):e.hc()}function xX(t){var e,n;if(ym(t))throw K(new yn(GBt));for(n=qn(t,0);n.b!=n.d.c;)e=a(Yn(n),9),this.d=y.Math.min(this.d,e.b),this.c=y.Math.max(this.c,e.a),this.a=y.Math.max(this.a,e.b),this.b=y.Math.min(this.b,e.a)}function fme(t){var e,n;return e=new as,pa(e,m$t),n=a(z(t,(Ft(),Qc)),19),n.pc((So(),A6))&&pa(e,y$t),n.pc(IE)&&pa(e,b$t),(n.pc(J_)||lt(de(z(t,(qt(),N6)))))&&(pa(e,v$t),n.pc(Q_)&&pa(e,_$t)),n.pc(RE)&&pa(e,w$t),e}function MX(t){var e,n;if(e=hi(cn(t,(dr(),Nwt))),n=ade(UV(),e),!n)throw e==null||e.length==0?K(new I5("No layout algorithm has been specified ("+t+").")):K(new I5("Layout algorithm not found: "+e));return n}function Y2(){Y2=P,Hx=a(at(Et((Nit(),_c).qb),6),29),jx=a(at(Et(_c.qb),3),29),ptt=a(at(Et(_c.qb),4),29),gtt=a(at(Et(_c.qb),5),17),x7(Hx),x7(jx),x7(ptt),x7(gtt),oXt=new ju(Y(Z(Ra,1),$_,158,0,[Hx,jx]))}function B9t(t){var e=(!TK&&(TK=Uxe()),TK),n=t.replace(/[\x00-\x1f\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200b-\u200f\u2028-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb"\\]/g,function(i){return Eoe(i,e)});return'"'+n+'"'}function dme(t){var e,n,i,r,c,l;for(r=t.e.c.length,i=dt(Sl,fw,15,r,0,1),l=new H(t.e);l.a=0;)i=n[c],l.Bk(i.nj())&&ni(r,i);!Hxe(t,r)&&Xl(t.e)&&Wn(t,e.lj()?Hg(t,6,e,(we(),fo),null,-1,!1):Hg(t,e.Zi()?2:1,e,null,null,-1,!1))}function wme(t,e){var n,i,r,c,l;return t.a==(QM(),V4)?!0:(c=e.a.c,n=e.a.c+e.a.b,!(e.i&&(i=e.u,l=i.c.c.a-i.n.a/2,r=c-(i.k.a+i.n.a),r>l)||e.n&&(i=e.v,l=i.c.c.a-i.n.a/2,r=i.k.a-n,r>l)))}function j9t(t,e,n){var i,r,c,l,f,g;for(i=0,g=n,e||(i=n*(t.c.length-1),g*=-1),c=new H(t);c.a1?t.e*=lt(t.a):t.f/=lt(t.a),whe(t),Yfe(t),rve(t),Ct(t.b,(GC(),uB),t.g)}function _me(t){L2();var e,n,i,r;for(lB=new Dt,HK=(ts(),new vi),jK=new Dt,e=(!t.a&&(t.a=new Wt(zr,t,10,11)),t.a),Txe(e),r=new $n(e);r.e!=r.i._b();)i=a(ci(r),35),nc(lB,i,0)==-1&&(n=new Dt,Ut(jK,n),iRt(i,n));return jK}function yme(t,e){var n,i,r,c,l,f,g;if(i=tIt(t.Db&254),i==1)t.Eb=null;else if(c=s_(t.Eb),i==2)r=eX(t,e),t.Eb=c[r==0?1:0];else{for(l=dt(un,te,1,i-1,5,1),n=2,f=0,g=0;n<=128;n<<=1)n==e?++f:t.Db&n&&(l[g++]=c[f++]);t.Eb=l}t.Db&=~e}function W9t(t,e,n){var i,r,c;t.ti()?(c=t.ui(),eP(t,e,n),i=t.mi(3,null,n,e,c),t.qi()?(r=t.ri(n,null),t.xi()&&(r=t.yi(n,r)),r?(r.Sh(i),r.Th()):t.ni(i)):t.ni(i)):(eP(t,e,n),t.qi()&&(r=t.ri(n,null),r&&r.Th()))}function EX(t,e){var n,i,r,c;t.ti()?(n=t.i,c=t.ui(),TL(t,e),i=t.mi(3,null,e,n,c),t.qi()?(r=t.ri(e,null),t.xi()&&(r=t.yi(e,r)),r?(r.Sh(i),r.Th()):t.ni(i)):t.ni(i)):(TL(t,e),t.qi()&&(r=t.ri(e,null),r&&r.Th()))}function jlt(t,e){var n,i,r,c,l;if(e===t)return!0;if(!ct(e,15)||(l=a(e,15),t._b()!=l._b()))return!1;for(c=l.tc(),i=t.tc();i.hc();)if(n=i.ic(),r=c.ic(),!(zt(n)===zt(r)||n!=null&&Fi(n,r)))return!1;return!0}function $9t(t,e){var n,i,r;if(e==0)return(t.a[0]&1)!=0;if(e<0)throw K(new E9("Negative bit address"));if(r=e>>5,r>=t.d)return t.e<0;if(n=t.a[r],e=1<<(e&31),t.e<0){if(i=PPt(t),r=0?t.jg(null):t.yg().Cg(t,-1-e,null,null)),t.kg(a(r,42),n),i&&i.Th(),t.eg()&&t.fg()&&n>-1&&Bi(t,new fs(t,9,n,c,r)),r):c}function eE(){eE=P,ott=new _2(kBt,0),$F=new _2("INSIDE_SELF_LOOPS",1),VF=new _2("MULTI_EDGES",2),WF=new _2("EDGE_LABELS",3),stt=new _2("PORTS",4),GF=new _2("COMPOUND",5),HF=new _2("CLUSTERS",6),rtt=new _2("DISCONNECTED",7)}function V9t(t){var e,n;if(t.f){for(;t.n>16)),15).dd(c),f0&&(!(jv(t.a.c)&&e.n.d)&&!(Y5(t.a.c)&&e.n.b)&&(e.g.d+=y.Math.max(0,i/2-.5)),!(jv(t.a.c)&&e.n.a)&&!(Y5(t.a.c)&&e.n.c)&&(e.g.a-=i-1))}function J9t(t,e,n){var i,r,c,l,f,g;c=a(Ee(e.d,0),14).c,i=c.g,r=i.j,g=a(Ee(n.f,0),14).d,l=g.g,f=l.j,r==(Ke(),Hr)?Ct(t,(Ft(),Iu),a(z(i,Iu),11)):Ct(t,(Ft(),Iu),c),f==Hr?Ct(t,(Ft(),Ru),a(z(l,Ru),11)):Ct(t,(Ft(),Ru),g)}function TX(t){var e,n,i;if(t.length==0)throw K(new yn(GBt));for(n=0,i=t.length;n>e,c=t.m>>e|n<<22-e,r=t.l>>e|t.m<<22-e):e<44?(l=i?sp:0,c=n>>e-22,r=t.m>>e-22|n<<44-e):(l=i?sp:0,c=i?eu:0,r=n>>e-44),ia(r&eu,c&eu,l&sp)}function CX(t){var e,n,i,r,c,l;for(this.c=new Dt,this.d=t,i=is,r=is,e=Ps,n=Ps,l=qn(t,0);l.b!=l.d.c;)c=a(Yn(l),9),i=y.Math.min(i,c.a),r=y.Math.min(r,c.b),e=y.Math.max(e,c.a),n=y.Math.max(n,c.b);this.a=new qh(i,r,e-i,n-r)}function Vlt(t){var e,n,i;this.c=t,i=a(z(t,(qt(),ch)),110),e=lt(Yt(z(t,$B))),n=lt(Yt(z(t,gbt))),i==(Js(),ah)||i==uh||i==Ff?this.b=e*n:this.b=1/(e*n),this.j=lt(Yt(z(t,Aw))),this.e=lt(Yt(z(t,lp))),this.f=t.b.c.length}function Q9t(t){switch(t.g){case 0:return new Sv;case 1:return new E8;case 2:return new g1;case 3:return new GMt;case 4:return new C4t;default:throw K(new yn("No implementation is available for the node placer "+(t.f!=null?t.f:""+t.g)))}}function nh(t){var e;return e=new ll(Og(t.ql)),e.a+="@",Ii(e,(Yr(t)>>>0).toString(16)),t.Eg()?(e.a+=" (eProxyURI: ",Fa(e,t.Kg()),t.tg()&&(e.a+=" eClass: ",Fa(e,t.tg())),e.a+=")"):t.tg()&&(e.a+=" (eClass: ",Fa(e,t.tg()),e.a+=")"),e.a}function tDt(t,e){var n,i,r,c,l,f,g,b,v;if(t.a.f>0&&ct(e,38)&&(t.a.Fi(),b=a(e,38),g=b.kc(),c=g==null?0:Yr(g),l=vst(t.a,c),n=t.a.d[l],n)){for(i=a(n.g,339),v=n.i,f=0;f0&&r0):r<0&&-r0):!1}function L7(t,e,n,i,r){var c,l,f,g,b,v;for(c=i,b=a(a(rr(t.r,e),19),60).tc();b.hc();){if(g=a(b.ic(),111),c){c=!1;continue}l=0,r>0?l=r:g.c&&(l=ID(g.c)),l>0&&(n?(v=g.b.Re().a,l>v&&(f=(l-v)/2,g.d.b=f,g.d.c=f)):g.d.c=t.s+l)}}function qlt(t,e,n){switch(e){case 7:!t.e&&(t.e=new pn(Xs,t,7,4)),Dr(t.e),!t.e&&(t.e=new pn(Xs,t,7,4)),Lr(t.e,a(n,13));return;case 8:!t.d&&(t.d=new pn(Xs,t,8,5)),Dr(t.d),!t.d&&(t.d=new pn(Xs,t,8,5)),Lr(t.d,a(n,13));return}ilt(t,e,n)}function kme(t){var e,n;if(t.c.length!=2)throw K(new yc("Order only allowed for two paths."));e=(mi(0,t.c.length),a(t.c[0],14)),n=(mi(1,t.c.length),a(t.c[1],14)),e.d.g!=n.c.g&&(t.c=dt(un,te,1,0,5,1),t.c[t.c.length]=n,t.c[t.c.length]=e)}function Lme(t){var e,n,i,r;if(t==null)return null;if(i=Hc(t,!0),r=h6.length,le(i.substr(i.length-r,r),h6)){if(n=i.length,n==4){if(e=i.charCodeAt(0),e==43)return b_t;if(e==45)return xXt}else if(n==3)return b_t}return rw(i)}function Pme(t,e,n){var i;i=null,e&&(i=e.d),KC(t,new aM(e.k.a-i.b+n.a,e.k.b-i.d+n.b)),KC(t,new aM(e.k.a-i.b+n.a,e.k.b+e.n.b+i.a+n.b)),KC(t,new aM(e.k.a+e.n.a+i.c+n.a,e.k.b-i.d+n.b)),KC(t,new aM(e.k.a+e.n.a+i.c+n.a,e.k.b+e.n.b+i.a+n.b))}function Ime(t,e){var n,i,r,c,l;for(di(e,"Port side processing",1),l=new H(t.a);l.ag-n&&f=t.c.a.length)return e;for(i=Fa(Ii(new om,"expected one element but was: <"),e),n=0;n<4&&t.a=0?t.Mg(c,n):Qlt(t,r,n);else throw K(new yn(G_+r.be()+VY));else throw K(new yn("The feature ID"+e+" is not a valid feature ID"));else Ku(t,i,r,n)}function AX(t,e,n,i,r){var c,l,f,g,b,v,M,k,R;return l=n-t,f=i-e,c=y.Math.atan2(l,f),g=c+rY,b=c-rY,v=r*y.Math.sin(g)+t,k=r*y.Math.cos(g)+e,M=r*y.Math.sin(b)+t,R=r*y.Math.cos(b)+e,Vg(Y(Z(ss,1),wt,9,0,[new We(v,k),new We(M,R)]))}function cDt(t){var e,n,i,r,c,l,f;for(c=0,r=t.f.e,n=0;n=0)return r;for(c=1,f=new H(e.i);f.ag+1?c:g+1);return Sfe(t,e,c),c}function r0(){r0=P,kl=new Fv("H_LEFT",0),Uf=new Fv("H_CENTER",1),Pl=new Fv("H_RIGHT",2),Bh=new Fv("V_TOP",3),hh=new Fv("V_CENTER",4),lh=new Fv("V_BOTTOM",5),Nu=new Fv("INSIDE",6),Il=new Fv("OUTSIDE",7),Ll=new Fv("H_PRIORITY",8)}function cn(t,e){var n,i;return i=(!t.o&&(t.o=new lu((Ic(),pp),ug,t,0)),Lh(t.o,e)),i??(n=e.Of(),ct(n,4)&&(n==null?(!t.o&&(t.o=new lu((Ic(),pp),ug,t,0)),aP(t.o,e)):(!t.o&&(t.o=new lu((Ic(),pp),ug,t,0)),gP(t.o,e,n))),n)}function zme(t){var e,n,i,r,c,l,f;if(e=t.Yg(xl),e&&(f=hi(Lh((!e.b&&(e.b=new Mu((ye(),Ho),Dc,e)),e.b),"settingDelegates")),f!=null)){for(n=new Dt,r=K2(f,"\\w+"),c=0,l=r.length;c0?(e-=1,n-=1):i>=0&&r<0?(e+=1,n+=1):i>0&&r>=0?(e-=1,n+=1):(e+=1,n-=1),new zs(Xt(e),Xt(n))}function Xlt(t,e,n){var i,r,c;if(e!=n){i=e;do sr(t,i.c),r=a(z(i,(Ft(),tg)),8),r&&(c=i.d,Wu(t,c.b,c.d),sr(t,r.k),i=Mc(r));while(r);i=n;do za(t,i.c),r=a(z(i,(Ft(),tg)),8),r&&(c=i.d,rL(t,c.b,c.d),za(t,r.k),i=Mc(r));while(r)}}function Gme(t,e,n){var i,r,c,l,f,g;i=new Dt,i.c[i.c.length]=e,g=e,f=0;do g=gxe(t,g),g&&(i.c[i.c.length]=g),++f;while(g);for(l=(n-(i.c.length-1)*t.d.d)/i.c.length,c=new H(i);c.ae.c?1:t.be.b?1:t.a!=e.a?Yr(t.a)-Yr(e.a):t.d==(pC(),cA)&&e.d==oA?-1:t.d==oA&&e.d==cA?1:0}function kX(t){var e,n,i,r,c,l,f,g;for(r=is,i=Ps,n=new H(t.e.b);n.a=0;e-=2)for(n=0;n<=e;n+=2)(t.b[n]>t.b[n+2]||t.b[n]===t.b[n+2]&&t.b[n+1]>t.b[n+3])&&(i=t.b[n+2],t.b[n+2]=t.b[n],t.b[n]=i,i=t.b[n+3],t.b[n+3]=t.b[n+1],t.b[n+1]=i);t.c=!0}}function fDt(t,e){var n,i,r,c,l,f,g,b;for(l=e==1?KK:YK,c=l.a.Xb().tc();c.hc();)for(r=a(c.ic(),110),g=a(rr(t.f.c,r),19).tc();g.hc();)switch(f=a(g.ic(),48),i=a(f.b,80),b=a(f.a,172),n=b.c,r.g){case 2:case 1:i.g.d+=n;break;case 4:case 3:i.g.c+=n}}function ebe(t){lht();var e,n,i,r,c,l,f;if(t==null||(r=t.length,r%2!=0))return null;for(e=SN(t),c=r/2|0,n=dt(Da,W_,22,c,15,1),i=0;i>24}return n}function nE(t,e){var n,i,r;return n=e==null?Ua(Ea(t.d,null)):RT(t.e,e),ct(n,207)?(r=a(n,207),r.gh()==null,r):ct(n,456)?(i=a(n,1631),r=i.a,r&&(r.yb==null||(e==null?Au(t.d,null,r):km(t.e,e,r))),r):null}function nbe(t,e){var n,i,r,c,l;if(i=e.nj(),Om(t.e,i)){if(i.xh()&&_V(t,i,e.lc()))return!1}else for(l=gu(t.e.mg(),i),n=a(t.g,124),r=0;r0&&(!(jv(t.a.c)&&e.n.d)&&!(Y5(t.a.c)&&e.n.b)&&(e.g.d-=y.Math.max(0,i/2-.5)),!(jv(t.a.c)&&e.n.a)&&!(Y5(t.a.c)&&e.n.c)&&(e.g.a+=y.Math.max(0,i-1)))}function dDt(t,e,n){var i,r;if((t.c-t.b&t.a.length-1)==2)e==(Ht(),Tn)||e==Qe?(PN(a(kC(t),15),(Cu(),kd)),PN(a(kC(t),15),ag)):(PN(a(kC(t),15),(Cu(),ag)),PN(a(kC(t),15),kd));else for(r=new aC(t);r.a!=r.b;)i=a(XN(r),15),PN(i,n)}function pDt(t){var e,n,i,r,c,l,f;if(t&&(e=t.Yg(xl),e&&(l=hi(Lh((!e.b&&(e.b=new Mu((ye(),Ho),Dc,e)),e.b),"conversionDelegates")),l!=null))){for(f=new Dt,i=K2(l,"\\w+"),r=0,c=i.length;r=2147483648&&(i-=HZ),i)}function gDt(t,e,n){var i,r,c,l;O4t(t,e)>O4t(t,n)?(i=ac(n,(Ht(),Qe)),t.d=i.Wb()?0:fL(a(i.cd(0),11)),l=ac(e,on),t.b=l.Wb()?0:fL(a(l.cd(0),11))):(r=ac(n,(Ht(),on)),t.d=r.Wb()?0:fL(a(r.cd(0),11)),c=ac(e,Qe),t.b=c.Wb()?0:fL(a(c.cd(0),11)))}function rbe(t){var e,n,i,r,c,l;if(r=a(Ee(t.i,0),11),r.d.c.length+r.f.c.length==0)t.k.a=0;else{for(l=0,i=Rn(Bp(new zd(r),new Lv(r)));Jn(i);)n=a(In(i),11),l+=n.g.k.a+n.k.a+n.a.a;e=a(z(t,(qt(),Sw)),9),c=e?e.a:0,t.k.a=l/(r.d.c.length+r.f.c.length)-c}}function mDt(t){switch(t.g){case 0:return new rSt;case 1:return new y8;case 2:return new HMt;case 3:return new X0;case 4:return new pTt;case 5:return new M8;default:throw K(new yn("No implementation is available for the layerer "+(t.f!=null?t.f:""+t.g)))}}function bDt(t,e){var n,i,r,c;for(n=t.o.a,c=a(a(rr(t.r,e),19),60).tc();c.hc();)r=a(c.ic(),111),r.e.a=n*lt(Yt(r.b.xe(zF))),r.e.b=(i=r.b,i.ye((dr(),nu))?i.ef()==(Ht(),Tn)?-i.Re().b-lt(Yt(i.xe(nu))):lt(Yt(i.xe(nu))):i.ef()==(Ht(),Tn)?-i.Re().b:0)}function LX(t,e){tE();var n,i,r,c,l,f,g,b,v;return e.d>t.d&&(f=t,t=e,e=f),e.d<63?twe(t,e):(l=(t.d&-2)<<4,b=_ct(t,l),v=_ct(e,l),i=$X(t,R2(b,l)),r=$X(e,R2(v,l)),g=LX(b,v),n=LX(i,r),c=LX($X(b,i),$X(r,v)),c=QX(QX(c,g),n),c=R2(c,l),g=R2(g,l<<1),QX(QX(g,c),n))}function wDt(t,e,n){var i,r,c;for(cne.call(this,new Dt),this.a=e,this.b=n,this.e=t,i=(t.b&&YX(t),t.a),this.d=L4t(i.a,this.a),this.c=L4t(i.b,this.b),ofe(this,this.d,this.c),F0e(this),c=this.e.e.a.Xb().tc();c.hc();)r=a(c.ic(),247),r.c.c.length>0&&Oye(this,r)}function sbe(t){var e,n,i,r;for(e=0,n=0,r=new H(t.i);r.a1||n>1)return 2;return e+n==1?2:0}function obe(t,e,n){var i,r,c,l,f,g,b;i=n,r=e;do r=t.a[r.o],l=(b=t.g[r.o],lt(t.p[b.o])+lt(t.d[r.o])-r.d.d),f=Aae(r,r.c?nc(r.c.a,r,0):-1),f&&(c=(g=t.g[f.o],lt(t.p[g.o])+lt(t.d[f.o])+f.n.b+f.d.a),i=y.Math.min(i,l-(c+Gv(t.k,r,f))));while(e!=r);return i}function cbe(t,e,n){var i,r,c,l,f,g,b;i=n,r=e;do r=t.a[r.o],c=(b=t.g[r.o],lt(t.p[b.o])+lt(t.d[r.o])+r.n.b+r.d.a),f=Gue(r,r.c?nc(r.c.a,r,0):-1),f&&(l=(g=t.g[f.o],lt(t.p[g.o])+lt(t.d[f.o])-f.d.d),i=y.Math.min(i,l-(c+Gv(t.k,r,f))));while(e!=r);return i}function abe(t,e,n){var i,r,c,l;for(r=n,c=uTt(vL(a(a(rr(t.r,e),19),60).xc(),new _p)),l=0;c.a||(c.a=Vv(c.c,c)),c.a;)if(r){Hn((c.a||(c.a=Vv(c.c,c)),c.a)),c.a=!1,r=!1;continue}else i=pN(c),c.a||(c.a=Vv(c.c,c)),c.a&&(l=y.Math.max(l,i));return l}function ube(t,e,n){var i,r,c,l,f,g,b,v;if(n)for(c=n.a.length,i=new Ug(c),f=(i.b-i.a)*i.c<0?(_1(),hg):new x1(i);f.hc();)l=a(f.ic(),21),r=LM(n,l.a),r&&(g=yae(t,(b=(am(),v=new Mit,v),e&&TDt(b,e),b),r),GL(g,Jd(r,Df)),_7(r,g),Mlt(r,g),qV(t,r,g))}function lbe(t){var e,n,i;return n=a(t.a,21).a,i=a(t.b,21).a,e=(n<0?-n:n)>(i<0?-i:i)?n<0?-n:n:i<0?-i:i,n=-e&&i==e?new zs(Xt(n-1),Xt(i)):new zs(Xt(n),Xt(i-1))}function vDt(t){var e,n,i,r,c,l;for(l=a(xo(t.a,dt(Cl,Ih,8,t.a.c.length,0,1)),123),Rrt(l,new p3),n=null,r=0,c=l.length;ri.o?yr(r,fi):r.i==fi&&i.o>t.o&&yr(r,Tn);break}return i}function Klt(t,e,n){var i,r,c;for(c=new H(t.e);c.a0&&(i.b.c-=i.c,i.b.c<=0&&i.b.f>0&&Xi(e,i.b));for(r=new H(t.b);r.a0&&(i.a.f-=i.c,i.a.f<=0&&i.a.c>0&&Xi(n,i.a))}function Jlt(t,e,n){var i,r,c;for(c=new H(t.q);c.a0&&(i.b.j-=i.c,i.b.j<=0&&i.b.r>0&&Xi(e,i.b));for(r=new H(t.g);r.a0&&(i.a.r-=i.c,i.a.r<=0&&i.a.j>0&&Xi(n,i.a))}function D7(t){var e,n,i,r,c;if(t.g==null&&(t.d=t.Gh(t.f),ni(t,t.d),t.c))return c=t.f,c;if(e=a(t.g[t.i-1],43),r=e.ic(),t.e=e,n=t.Gh(r),n.hc())t.d=n,ni(t,n);else for(t.d=null;!e.hc()&&(Vr(t.g,--t.i,null),t.i!=0);)i=a(t.g[t.i-1],43),e=i;return r}function EP(t,e){var n,i,r,c;for(t=t,n=new Bb,c=0,i=0;i=0?t.ug(i,!0,!0):Z2(t,c,!0),184)),a(r,237).xk(e,n)}else throw K(new yn(G_+e.be()+VY))}function tht(t,e,n){switch(n.g){case 1:return new We(e.a,y.Math.min(t.d.b,e.b));case 2:return new We(y.Math.max(t.c.a,e.a),e.b);case 3:return new We(e.a,y.Math.max(t.c.b,e.b));case 4:return new We(y.Math.min(e.a,t.d.a),e.b)}return new We(e.a,e.b)}function SP(t){var e,n,i;for(e=od(1+(!t.c&&(t.c=new Wt(Rl,t,9,9)),t.c).i),Ut(e,(!t.d&&(t.d=new pn(Xs,t,8,5)),t.d)),i=new $n((!t.c&&(t.c=new Wt(Rl,t,9,9)),t.c));i.e!=i.i._b();)n=a(ci(i),121),Ut(e,(!n.d&&(n.d=new pn(Xs,n,8,5)),n.d));return si(e),new y2(e)}function Af(t){var e,n,i;for(e=od(1+(!t.c&&(t.c=new Wt(Rl,t,9,9)),t.c).i),Ut(e,(!t.e&&(t.e=new pn(Xs,t,7,4)),t.e)),i=new $n((!t.c&&(t.c=new Wt(Rl,t,9,9)),t.c));i.e!=i.i._b();)n=a(ci(i),121),Ut(e,(!n.e&&(n.e=new pn(Xs,n,7,4)),n.e));return si(e),new y2(e)}function gbe(t,e){var n,i,r,c,l;if(di(e,"Breaking Point Processor",1),H2e(t),lt(de(z(t,(qt(),_bt))))){for(r=new H(t.b);r.a3&&dd(t,0,e-3))}function wbe(t){var e,n,i;return n=t.l,n&n-1||(i=t.m,i&i-1)||(e=t.h,e&e-1)||e==0&&i==0&&n==0?-1:e==0&&i==0&&n!=0?lat(n):e==0&&i!=0&&n==0?lat(i)+22:e!=0&&i==0&&n==0?lat(e)+44:-1}function vbe(t,e){var n,i,r,c,l;for(di(e,"Edge joining",1),n=lt(de(z(t,(qt(),KJ)))),r=new H(t.b);r.a0),c.a.cd(c.c=--c.b),cd(c,r),Hn(c.bU_,g=vU_,g=vU_,g=vU_,g=v=0){if(e==n)return new zs(Xt(-e-1),Xt(-e-1));if(e==-n)return new zs(Xt(-e),Xt(n+1))}return(e<0?-e:e)>(n<0?-n:n)?e<0?new zs(Xt(-e),Xt(n)):new zs(Xt(-e),Xt(n+1)):new zs(Xt(e+1),Xt(n))}function Tbe(t,e,n){var i,r,c,l,f;return r=a(cn(e,(M7(),Dwt)),21),!r&&(r=Xt(0)),c=a(cn(n,Dwt),21),!c&&(c=Xt(0)),r.a>c.a?-1:r.a1)for(e=hm((n=new Ng,++t.b,n),t.d),f=qn(c,0);f.b!=f.d.c;)l=a(Yn(f),113),ih($l(Wl(Vl(Gl(new cl,1),0),e),l))}function Lbe(t,e,n){var i,r,c,l,f;for(di(n,"Breaking Point Removing",1),t.a=a(z(e,(qt(),ig)),197),c=new H(e.b);c.a>16!=6&&e){if(YM(t,e))throw K(new yn(T4+I9t(t)));i=null,t.Cb&&(i=(n=t.Db>>16,n>=0?Hut(t,null):t.Cb.Cg(t,-1-n,null,null))),e&&(i=H2(e,t,6,i)),i=bst(t,e,i),i&&i.Th()}else t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,6,e,e))}function SDt(t,e){var n,i;if(e!=t.Cb||t.Db>>16!=3&&e){if(YM(t,e))throw K(new yn(T4+h7t(t)));i=null,t.Cb&&(i=(n=t.Db>>16,n>=0?$ut(t,null):t.Cb.Cg(t,-1-n,null,null))),e&&(i=H2(e,t,12,i)),i=mst(t,e,i),i&&i.Th()}else t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,3,e,e))}function TDt(t,e){var n,i;if(e!=t.Cb||t.Db>>16!=9&&e){if(YM(t,e))throw K(new yn(T4+_Nt(t)));i=null,t.Cb&&(i=(n=t.Db>>16,n>=0?Wut(t,null):t.Cb.Cg(t,-1-n,null,null))),e&&(i=H2(e,t,9,i)),i=wst(t,e,i),i&&i.Th()}else t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,9,e,e))}function CDt(t,e){var n,i;if(e!=t.Cb||t.Db>>16!=11&&e){if(YM(t,e))throw K(new yn(T4+vht(t)));i=null,t.Cb&&(i=(n=t.Db>>16,n>=0?Xut(t,null):t.Cb.Cg(t,-1-n,null,null))),e&&(i=H2(e,t,10,i)),i=Tst(t,e,i),i&&i.Th()}else t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,11,e,e))}function Dbe(t,e){if(ct(e,246))return Ihe(t,a(e,35));if(ct(e,187))return Rhe(t,a(e,121));if(ct(e,263))return Bse(t,a(e,137));if(ct(e,183))return Xwe(t,a(e,105));if(e)return null;throw K(new yn(zpt+Gp(new ju(Y(Z(un,1),te,1,5,[null])))))}function Nbe(t){var e,n,i,r,c,l,f,g,b,v,M;return M=llt(t),e=t.a,g=e!=null,g&&eC(M,"category",t.a),r=O9(new Tv(t.d)),l=!r,l&&(b=new Rg,P1(M,"knownOptions",b),n=new bG(b),vo(new Tv(t.d),n)),c=O9(t.g),f=!c,f&&(v=new Rg,P1(M,"supportedFeatures",v),i=new wG(v),vo(t.g,i)),M}function Obe(t,e,n){var i,r,c;for(r=new H(t.a.b);r.ag){for(v=t.d,t.d=dt(Gvt,Ypt,55,2*g+4,0,1),c=0;c=9223372036854776e3?(NM(),_1t):(r=!1,t<0&&(r=!0,t=-t),i=0,t>=o0&&(i=Tr(t/o0),t-=i*o0),n=0,t>=rx&&(n=Tr(t/rx),t-=n*rx),e=Tr(t),c=ia(e,n,i),r&&rq(c),c)}function ADt(t,e,n){var i,r,c,l,f,g;if(!ym(e)){for(g=Ta(n,(ct(e,13)?a(e,13)._b():gC(e.tc()))/t.a|0),di(g,VBt,1),f=new ol,l=0,c=e.tc();c.hc();)i=a(c.ic(),76),f=Bp(f,new Hd(i)),ldw,c=i-ldw,(r||c)&&(g=a(e.e,249).b,l=a(e.e,249).a,f=a(e.d,129),g==0&&l==0)))return f;return f}function kDt(t,e,n,i){var r,c,l,f;return l=new Jh(t),jl(l,(Ke(),Hr)),Ct(l,(Ft(),li),e),Ct(l,(qt(),Qi),(Ls(),Gc)),Ct(l,Iu,n),Ct(l,Ru,i),c=new Eo,yr(c,(Ht(),on)),ds(c,l),f=new Eo,yr(f,Qe),ds(f,l),Ts(e,c),r=new Np,Uo(r,e),Ct(r,Ro,null),Hs(r,f),Ts(r,i),l}function Wbe(t,e,n,i,r){var c,l;(!ec(e)&&e.c.g.c==e.d.g.c||!pPt(zo(Y(Z(ss,1),wt,9,0,[r.g.k,r.k,r.a])),n))&&(e.c==r?pD(e.a,0,new Oo(n)):Xi(e.a,new Oo(n)),i&&!kT(t.a,n)&&(l=a(z(e,(qt(),Ro)),74),l||(l=new Va,Ct(e,Ro,l)),c=new Oo(n),Ws(l,c,l.c.b,l.c),Ir(t.a,c)))}function $be(t,e){var n,i;if(i=VD(t.b,e.b),!i)throw K(new yc("Invalid hitboxes for scanline constraint calculation."));(u6t(e.b,a(gne(t.b,e.b),57))||u6t(e.b,a(pne(t.b,e.b),57)))&&(rd(),e.b+""),t.a[e.b.f]=a(c$(t.b,e.b),57),n=a(a$(t.b,e.b),57),n&&(t.a[n.f]=e.b)}function LDt(t,e,n,i,r,c){var l,f,g,b,v,M,k,R,O,$,W,nt;for(v=i,e.i&&e.k?(R=a(zi(t.f,e.u),57),$=R.d.c+R.d.b,--v):$=e.a.c+e.a.b,M=r,n.n&&n.k?(R=a(zi(t.f,n.v),57),b=R.d.c,++M):b=n.a.c,W=b-$,g=2>M-v?2:M-v,f=W/g,O=$+f,k=v;k>16!=7&&e){if(YM(t,e))throw K(new yn(T4+B8t(t)));i=null,t.Cb&&(i=(n=t.Db>>16,n>=0?Gut(t,null):t.Cb.Cg(t,-1-n,null,null))),e&&(i=a(e,42).Ag(t,1,gI,i)),i=dot(t,e,i),i&&i.Th()}else t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,7,e,e))}function Vbe(t,e){var n,i;if(e!=t.Cb||t.Db>>16!=3&&e){if(YM(t,e))throw K(new yn(T4+X6t(t)));i=null,t.Cb&&(i=(n=t.Db>>16,n>=0?Vut(t,null):t.Cb.Cg(t,-1-n,null,null))),e&&(i=a(e,42).Ag(t,0,bI,i)),i=pot(t,e,i),i&&i.Th()}else t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,3,e,e))}function RDt(t){var e,n,i,r,c,l,f;for(c=new H(t.a.a);c.a0&&c>0?l.o=e++:i>0?l.o=n++:c>0?l.o=r++:l.o=n++}we(),gc(t.i,new Eg)}function DDt(t,e){var n,i,r;for(r=(!e.a&&(e.a=new Wt(zr,e,10,11)),e.a).i,i=new $n((!e.a&&(e.a=new Wt(zr,e,10,11)),e.a));i.e!=i.i._b();)n=a(ci(i),35),zt(cn(n,(dr(),ay)))!==zt((Kg(),yA))&&Ect(MX(e),MX(n))&&((!n.a&&(n.a=new Wt(zr,n,10,11)),n.a).i==0||(r+=DDt(t,n)));return r}function Xbe(t,e){var n,i,r;return n=e.Yg(t.a),n&&(r=hi(Lh((!n.b&&(n.b=new Mu((ye(),Ho),Dc,n)),n.b),"affiliation")),r!=null)?(i=jW(r,Ca(35)),i==-1?Eq(t,iC(t,Zu(e.Wi())),r):i==0?Eq(t,null,r.substr(1,r.length-1)):Eq(t,r.substr(0,i),r.substr(i+1,r.length-(i+1)))):null}function Zbe(t){var e,n,i,r,c;if(c=new Dt,pd(t.b,new uH(c)),t.b.c=dt(un,te,1,0,5,1),c.c.length!=0){for(e=(mi(0,c.c.length),a(c.c[0],78)),n=1,i=c.c.length;n=t.a||!alt(e,n))return-1;if(ym(a(i.Kb(e),20)))return 1;for(r=0,l=a(i.Kb(e),20).tc();l.hc();)if(c=a(l.ic(),14),g=c.c.g==e?c.d.g:c.c.g,f=rht(t,g,n,i),f==-1||(r=r>f?r:f,r>t.c-1))return-1;return r+1}function Ybe(t,e,n,i){var r,c,l,f,g,b,v,M,k;for(M=i?(Ht(),on):(Ht(),Qe),r=!1,g=e[n],b=0,v=g.length;b>5,e&=31,i>=t.d)return t.e<0?(V1(),PK):(V1(),AE);if(c=t.d-i,r=dt(Gn,pi,22,c+1,15,1),Ige(r,c,t.a,i,e),t.e<0){for(n=0;n0&&t.a[n]<<32-e){for(n=0;n0&&(c=a(Ee(this.b,0),157),r+=c.o,i+=c.p),r*=2,i*=2,e>1?r=Tr(y.Math.ceil(r*e)):i=Tr(y.Math.ceil(i/e)),this.a=new mut(r,i)}function cht(t,e,n,i,r,c){var l,f,g,b,v,M;for(b=n.c.length,c&&(t.c=dt(Gn,pi,22,e.length,15,1)),l=r?0:e.length-1;r?l=0;l+=r?1:-1){for(f=e[l],g=i==(Ht(),Qe)?r?ac(f,i):Cm(ac(f,i)):r?Cm(ac(f,i)):ac(f,i),c&&(t.c[f.o]=g._b()),M=g.tc();M.hc();)v=a(M.ic(),11),t.d[v.o]=b++;Or(n,g)}}function HDt(t,e,n){var i,r,c,l,f,g,b,v;for(c=lt(Yt(t.b.tc().ic())),b=lt(Yt(yPt(e.b))),i=hl(Xc(t.a),b-n),r=hl(Xc(e.a),n-c),v=sr(i,r),hl(v,1/(b-c)),this.a=v,this.b=new Dt,f=!0,l=t.b.tc(),l.ic();l.hc();)g=lt(Yt(l.ic())),f&&g-n>U_&&(this.b.nc(n),f=!1),this.b.nc(g);f&&this.b.nc(n)}function awe(t){var e,n,i,r;if(fve(t,t.n),t.d.c.length>0){for(xT(t.c);Ult(t,a(G(new H(t.e.a)),113))=r&&(t.c=!1,t.a=!1),t.b[i++]=r,t.b[i]=c,t.c||E_(t)}}function GDt(t){var e,n,i,r;return r=Tf(t),n=new m1(r),i=new hH(r),e=new Dt,Or(e,(!t.d&&(t.d=new pn(Xs,t,8,5)),t.d)),Or(e,(!t.e&&(t.e=new pn(Xs,t,7,4)),t.e)),a(hd(Vh(wo(new gi(null,new Ei(e,16)),n),i),n_(new ti,new Qn,new Kt,new kt,Y(Z(tf,1),jt,150,0,[(z1(),bw),Qh]))),19)}function WDt(t){var e,n,i;if(n=a(z(t,(Ft(),Du)),8),n?yr(t,a(z(n,wc),69)):t.d.c.length-t.f.c.length<0?yr(t,(Ht(),Qe)):yr(t,(Ht(),on)),!t.b)switch(i=t.n,e=t.a,t.i.g){case 1:e.a=i.a/2,e.b=0;break;case 2:e.a=i.a,e.b=i.b/2;break;case 3:e.a=i.a/2,e.b=i.b;break;case 4:e.a=0,e.b=i.b/2}}function uwe(t,e,n){var i,r,c,l,f;for(di(n,"Longest path layering",1),t.a=e,f=t.a.a,t.b=dt(Gn,pi,22,f.c.length,15,1),i=0,l=new H(f);l.a=0?!1:(n=oE((Qa(),eo),r,e),n?(i=n.kj(),(i>1||i==-1)&&wm(qo(eo,n))!=3):!0)):!1}function lwe(t,e){var n;switch(n=a(z(t,(qt(),J4)),241),di(e,"Label side selection ("+n+")",1),n.g){case 0:y9t(t,(Cu(),kd));break;case 1:y9t(t,(Cu(),ag));break;case 2:NNt(t,(Cu(),kd));break;case 3:NNt(t,(Cu(),ag));break;case 4:JDt(t,(Cu(),kd));break;case 5:JDt(t,(Cu(),ag))}Vn(e)}function aht(t,e,n){var i,r,c,l,f,g;if(i=JQt(n,t.length),l=t[i],l[0].j==(Ke(),rs))for(c=l3t(n,l.length),g=e.i,r=0;r0&&(n[0]+=t.d,l-=n[0]),n[2]>0&&(n[2]+=t.d,l-=n[2]),c=y.Math.max(0,l),n[1]=y.Math.max(n[1],l),Pct(t,ta,r.c+i.b+n[0]-(n[1]-l)/2,n),e==ta&&(t.c.b=c,t.c.c=r.c+i.b+(c-l)/2)}function mwe(t,e){var n,i,r,c,l,f,g;for(n=Ps,f=(Ke(),gs),r=new H(e.a);r.a0?l=n:g.c&&(l=b$(g.c)),l>0&&(i&&(Fg(),g.a.B&&(!lt(de(g.a.e.xe((dr(),rI))))||g.b.ff()))?g.d.a=t.s+l:(v=g.b.Re().b,l>v&&(f=(l-v)/2,g.d.d=f,g.d.a=f)))}}function vwe(t,e){var n,i,r,c,l;return r=e.Yg(t.a),r&&(i=(!r.b&&(r.b=new Mu((ye(),Ho),Dc,r)),r.b),n=hi(Lh(i,Ns)),n!=null&&(c=n.lastIndexOf("#"),l=c==-1?lst(t,e.Pi(),n):c==0?LL(t,null,n.substr(1,n.length-1)):LL(t,n.substr(0,c),n.substr(c+1,n.length-(c+1))),ct(l,140)))?a(l,140):null}function _we(t,e){var n,i,r,c,l;return i=e.Yg(t.a),i&&(n=(!i.b&&(i.b=new Mu((ye(),Ho),Dc,i)),i.b),c=hi(Lh(n,hK)),c!=null&&(r=c.lastIndexOf("#"),l=r==-1?lst(t,e.Pi(),c):r==0?LL(t,null,c.substr(1,c.length-1)):LL(t,c.substr(0,r),c.substr(r+1,c.length-(r+1))),ct(l,140)))?a(l,140):null}function KDt(t,e,n,i,r){var c,l,f,g,b,v;if(t.d&&t.d.If(r),c=a(r.cd(0),35),CRt(t,n,c,!1)||(l=a(r.cd(r._b()-1),35),CRt(t,i,l,!0))||blt(t,r))return!0;for(v=r.tc();v.hc();)for(b=a(v.ic(),35),g=e.tc();g.hc();)if(f=a(g.ic(),35),j7(t,b,f))return!0;return!1}function ywe(t,e,n){var i,r,c,l,f,g,b,v,M,k;k=e.c.length,M=(b=t.rg(n),a(b>=0?t.ug(b,!1,!0):Z2(t,n,!1),52));t:for(c=M.tc();c.hc();){for(r=a(c.ic(),51),v=0;vt.d[l.o]&&(n+=zkt(t.b,c),dC(t.a,Xt(c)));for(;!Iit(t.a);)hLt(t.b,a(C$(t.a),21).a)}return n}function C_(t,e,n){var i,r;if((!t.a&&(t.a=new Wt(os,t,6,6)),t.a).i==0)return g6t(t);if(i=a(at((!t.a&&(t.a=new Wt(os,t,6,6)),t.a),0),270),e&&(Dr((!i.a&&(i.a=new Ss(sf,i,5)),i.a)),EC(i,0),SC(i,0),MC(i,0),xC(i,0)),n)for(r=(!t.a&&(t.a=new Wt(os,t,6,6)),t.a);r.i>1;)cw(r,r.i-1);return i}function Swe(t,e){var n,i,r,c;if(c=PNt(e),r=a(z(c,(Ft(),Qc)),19),M2e(e,r),r.pc((So(),Al)))for(i=new $n((!e.c&&(e.c=new Wt(Rl,e,9,9)),e.c));i.e!=i.i._b();)n=a(ci(i),121),I2e(t,e,c,n);return nwe(e,c),lt(de(z(c,(qt(),abt))))&&r.nc(OB),zt(cn(e,Q4))===zt((Kg(),Dx))?Fxe(t,e,c):P2e(t,e,c),c}function So(){So=P,DB=new jb("COMMENTS",0),Al=new jb("EXTERNAL_PORTS",1),q4=new jb("HYPEREDGES",2),NB=new jb("HYPERNODES",3),J_=new jb("NON_FREE_PORTS",4),Q_=new jb("NORTH_SOUTH_PORTS",5),A6=new jb(kBt,6),IE=new jb("CENTER_LABELS",7),RE=new jb("END_LABELS",8),OB=new jb("PARTITIONS",9)}function QDt(t,e,n){var i,r,c,l;for(c=(!e.a&&(e.a=new Wt(zr,e,10,11)),e.a).i,r=new $n((!e.a&&(e.a=new Wt(zr,e,10,11)),e.a));r.e!=r.i._b();)i=a(ci(r),35),(!i.a&&(i.a=new Wt(zr,i,10,11)),i.a).i==0||(c+=QDt(t,i,!1));if(n)for(l=io(e);l;)c+=(!l.a&&(l.a=new Wt(zr,l,10,11)),l.a).i,l=io(l);return c}function cw(t,e){var n,i,r,c;return t.ti()?(i=null,r=t.ui(),t.xi()&&(i=t.zi(t.Dh(e),null)),n=t.mi(4,c=W2(t,e),null,e,r),t.qi()&&c!=null&&(i=t.si(c,i)),i?(i.Sh(n),i.Th()):t.ni(n),c):(c=W2(t,e),t.qi()&&c!=null&&(i=t.si(c,null),i&&i.Th()),c)}function Twe(t){var e,n,i,r,c,l,f,g,b;for(l=is,g=is,f=null,n=new F$(new e2(t.e));n.b!=n.c.a.b;)if(e=Hct(n),(zt(e.d)===zt((mu(),Zp))||zt(e.d)===zt(Lw))&&(i=a(e.e,249).a,b=a(e.e,249).b,r=l-i>dw,c=i-ldw,(r||c)&&(g=a(e.e,249).b,l=a(e.e,249).a,f=a(e.d,129),g==0&&l==0)))return f;return f}function Cwe(t){var e,n,i,r,c,l,f,g,b,v;for(c=t.a,e=new $r,b=0,i=new H(t.d);i.ag.d&&(v=g.d+g.a+c));n.c.d=v,e.a.Zb(n,e),b=y.Math.max(b,n.c.d+n.c.a)}return b}function Awe(t,e,n,i,r){return i<0?(i=x_(t,r,Y(Z(At,1),wt,2,6,[yZ,xZ,MZ,EZ,nx,SZ,TZ,CZ,AZ,kZ,LZ,PZ]),e),i<0&&(i=x_(t,r,Y(Z(At,1),wt,2,6,["Jan","Feb","Mar","Apr",nx,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),e)),i<0?!1:(n.k=i,!0)):i>0?(n.k=i-1,!0):!1}function kwe(t,e,n,i,r){return i<0?(i=x_(t,r,Y(Z(At,1),wt,2,6,[yZ,xZ,MZ,EZ,nx,SZ,TZ,CZ,AZ,kZ,LZ,PZ]),e),i<0&&(i=x_(t,r,Y(Z(At,1),wt,2,6,["Jan","Feb","Mar","Apr",nx,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),e)),i<0?!1:(n.k=i,!0)):i>0?(n.k=i-1,!0):!1}function Lwe(t,e,n){var i,r,c;if(t.e=n,t.d=0,t.b=0,t.f=1,t.i=e,(t.e&16)==16&&(t.i=eve(t.i)),t.j=t.i.length,Ci(t),c=Lm(t),t.d!=t.j)throw K(new ri(ai((Kn(),VFt))));if(t.g){for(i=0;iJBt?gc(g,t.b):i<=JBt&&i>QBt?gc(g,t.d):i<=QBt&&i>tFt?gc(g,t.c):i<=tFt&&gc(g,t.a),c=eNt(t,g,c);return r}function nNt(t){m2(t,new y_(p2(h2(d2(f2(new Z0,kO),"Randomizer"),'Distributes the nodes randomly on the plane, leading to very obfuscating layouts. Can be useful to demonstrate the power of "real" layout algorithms.'),new wz))),pe(t,kO,ox,Lvt),pe(t,kO,dE,15),pe(t,kO,fO,Xt(0)),pe(t,kO,hE,fE)}function Iwe(t,e){var n,i,r,c,l,f,g,b,v,M;for(g=e.a.length,f=Tr(y.Math.ceil(g/t.a)),M=e.a,l=0,b=f,c=0;cl?0:l)l?0:l:g,(0>(bl?0:l)l?0:l:g)),l=b,b+=f,i=a(Ee(t.c,c),8),n=new FW(v),n.n.b=e.n.b,cr(t.b,e,n),Ut(i.b,n);Lc(t.g.b,e),Ut(t.i,(r=new MMt(t,e),r))}function iNt(t,e,n){var i,r,c,l,f,g,b,v,M;for(e.o=1,c=e.c,M=ew(e,(Fo(),ba)).tc();M.hc();)for(v=a(M.ic(),11),r=new H(v.f);r.a=t.length||(f=t.charCodeAt(e[0]),f!=43&&f!=45)||(++e[0],i=T7(t,e),i<0))return!1;f==45&&(i=-i)}return f==32&&e[0]-n==2&&r.b==2&&(g=new z9,b=g.q.getFullYear()-Fm+Fm-80,l=b%100,c.a=i==l,i+=(b/100|0)*100+(i0){if(t.Fi(),e!=null){for(c=0;c=48;n--)IA[n]=n-48<<24>>24;for(i=70;i>=65;i--)IA[i]=i-65+10<<24>>24;for(r=102;r>=97;r--)IA[r]=r-97+10<<24>>24;for(c=0;c<10;c++)iU[c]=48+c&qr;for(t=10;t<=15;t++)iU[t]=65+t-10&qr}function aNt(t){var e,n,i,r;n=lt(Yt(z(t.a,(Ph(),Ajt)))),i=t.a.c.d,r=t.a.d.d,e=t.d,i.a>=r.a?i.b>=r.b?(e.a=r.a+(i.a-r.a)/2+n,e.b=r.b+(i.b-r.b)/2-n):(e.a=r.a+(i.a-r.a)/2+n,e.b=i.b+(r.b-i.b)/2+n):i.b>=r.b?(e.a=i.a+(r.a-i.a)/2+n,e.b=r.b+(i.b-r.b)/2+n):(e.a=i.a+(r.a-i.a)/2+n,e.b=i.b+(r.b-i.b)/2-n)}function Fwe(t,e,n,i){var r,c,l,f,g;return f=zc(a(at((!e.b&&(e.b=new pn(Si,e,4,7)),e.b),0),97)),g=zc(a(at((!e.c&&(e.c=new pn(Si,e,5,8)),e.c),0),97)),io(f)==io(g)||_C(g,f)?null:(l=rN(e),l==n?i:(c=a(zi(t.a,l),8),c&&(r=a(z(c,(Ft(),xd)),31),r)?r:null))}function Uwe(t,e,n,i){var r,c,l,f,g;for(c=t.i.c.length,g=dt(Q3e,Gft,267,c,0,1),l=0;lk+g&&i.jc();for(l=new H(R);l.a>19)return"-"+lNt(zM(t));for(n=t,i="";!(n.l==0&&n.m==0&&n.h==0);){if(r=fV(sO),n=Hht(n,r,!0),e=""+_3t(Q1),!(n.l==0&&n.m==0&&n.h==0))for(c=9-e.length;c>0;c--)e="0"+e;i=e+i}return i}function ku(t,e,n){var i,r,c,l,f;if(t==null)throw K(new yf(tu));for(c=t.length,l=c>0&&(t.charCodeAt(0)==45||t.charCodeAt(0)==43)?1:0,i=l;in)throw K(new yf(Um+t+'"'));return f}function jwe(){if(!Object.create||!Object.getOwnPropertyNames)return!1;var t="__proto__",e=Object.create(null);if(e[t]!==void 0)return!1;var n=Object.getOwnPropertyNames(e);return!(n.length!=0||(e[t]=42,e[t]!==42)||Object.getOwnPropertyNames(e).length==0)}function Hwe(t,e){var n,i,r,c;for(di(e,"Resize child graph to fit parent.",1),i=new H(t.b);i.a>24;case 97:case 98:case 99:case 100:case 101:case 102:return t-97+10<<24>>24;case 65:case 66:case 67:case 68:case 69:case 70:return t-65+10<<24>>24;default:throw K(new yf("Invalid hexadecimal"))}}function Xwe(t,e){var n,i,r,c,l,f,g,b,v;if(b=a(zi(t.c,e),191),!b)throw K(new xf("Edge did not exist in input."));return l=FC(b),v=new Rg,n=new XTt(t,l,v),Lte((!e.a&&(e.a=new Wt(os,e,6,6)),e.a),n),P1(b,Dpt,v),f=a(cn(e,(dr(),Px)),74),r=!f||P4t(f),c=!r,c&&(g=new Rg,i=new iG(g),vo(f,i),P1(b,"junctionPoints",g)),null}function Zwe(t,e,n){var i,r,c,l;di(n,"Orthogonally routing hierarchical port edges",1),t.a=0,i=lye(e),l2e(e,i),Nye(t,e,i),wxe(e),r=a(z(e,(qt(),Qi)),83),c=e.b,X7t((mi(0,c.c.length),a(c.c[0],26)),r,e),X7t(a(Ee(c,c.c.length-1),26),r,e),l=e.b,e7t((mi(0,l.c.length),a(l.c[0],26))),e7t(a(Ee(l,l.c.length-1),26)),Vn(n)}function Ywe(t){var e,n,i;switch(e=a(z(t.d,(qt(),ig)),197),e.g){case 2:n=qxe(t);break;case 3:n=(i=new Dt,qc(wo(Vh(Yh(Yh(new gi(null,new Ei(t.d.b,16)),new Hy),new Gy),new C3),new zy),new rm(i)),i);break;default:throw K(new yc("Compaction not supported for "+e+" edges."))}Tye(t,n),vo(new Tv(t.g),new SH(t))}function Kwe(t,e,n,i){var r,c,l,f,g;for(r=!1,c=!1,f=new H(i.i);f.a1&&(n?l=ql(e.c)+1:l=ql(b.c)-1,f=a(Ee(t.a.b,l),26),Ks(b,f)),dht(t,b,n));return e}function hNt(t,e,n,i,r,c){if(this.b=n,this.d=r,t>=e.length)throw K(new Uc("Greedy SwitchDecider: Free layer not in graph."));this.c=e[t],this.e=new K5(i),GV(this.e,this.c,(Ht(),on)),this.i=new K5(i),GV(this.i,this.c,Qe),this.f=new TCt(this.c),this.a=!c&&r.i&&!r.s&&this.c[0].j==(Ke(),rs),this.a&&e0e(this,t,e.length)}function Jwe(t,e,n){var i,r,c,l;for(di(n,"Processor order nodes",2),t.a=lt(Yt(z(e,(sw(),nwt)))),r=new Fr,l=qn(e.b,0);l.b!=l.d.c;)c=a(Yn(l),76),lt(de(z(c,(mc(),Rw))))&&Ws(r,c,r.c.b,r.c);i=(Hn(r.b!=0),a(r.a.a.c,76)),d7t(t,i),!n.b&&jV(n,1),bht(t,i,0-lt(Yt(z(i,(mc(),mF))))/2,0),!n.b&&jV(n,1),Vn(n)}function fNt(){this.b=(ts(),new xm),this.d=new xm,this.e=new xm,this.c=new xm,this.a=new vi,this.f=new vi,A2(ss,new tz,new ez),A2(Awt,new az,new uz),A2(Hgt,new lz,new hz),A2(Ggt,new xv,new fz),A2(P3e,new dz,new bz),A2(D3e,new Y0,new nz),A2(I3e,new iz,new rz),A2(R3e,new sz,new oz),A2(B3e,new K0,new cz)}function dNt(t,e,n,i){var r,c,l,f,g,b;for(g=aX(t,n),b=aX(e,n),r=!1;g&&b&&(i||upe(g,b,n));)l=aX(g,n),f=aX(b,n),OL(e),OL(t),c=g.c,cZ(g,!1),cZ(b,!1),n?(W1(e,b.o,c),e.o=b.o,W1(t,g.o+1,c),t.o=g.o):(W1(t,g.o,c),t.o=g.o,W1(e,b.o+1,c),e.o=b.o),Ks(g,null),Ks(b,null),g=l,b=f,r=!0;return r}function OX(t,e,n,i,r,c,l,f){var g,b,v;for(g=0,e!=null&&(g^=j1(e.toLowerCase())),n!=null&&(g^=j1(n)),i!=null&&(g^=j1(i)),l!=null&&(g^=j1(l)),f!=null&&(g^=j1(f)),b=0,v=c.length;bg?new LN(e,t,f-g):f>0&&g>0&&(new LN(t,e,0),new LN(e,t,0)))}function pNt(t){m2(t,new y_(p2(h2(d2(f2(new Z0,r6),SFt),"Keeps the current layout as it is, without any automatic modification. Optional coordinates can be given for nodes and edge bend points."),new CR))),pe(t,r6,ox,Mvt),pe(t,r6,SO,Xe(_A)),pe(t,r6,xpt,Xe(_vt)),pe(t,r6,MO,Xe(yvt)),pe(t,r6,EO,Xe(xvt))}function gNt(t){var e,n,i;i=a(z(t,(qt(),Oh)),19),!i.Wb()&&(n=(e=a(xu(to),10),new ja(e,a(cu(e,e.length),10),0)),i.pc((r0(),Nu))?Tu(n,Nu):Tu(n,Il),i.pc(Ll)||Tu(n,Ll),i.pc(kl)?Tu(n,Bh):i.pc(Uf)?Tu(n,hh):i.pc(Pl)&&Tu(n,lh),i.pc(Bh)?Tu(n,kl):i.pc(hh)?Tu(n,Uf):i.pc(lh)&&Tu(n,Pl),Ct(t,Oh,n))}function pht(t,e){var n,i,r,c;if(0<(ct(t,13)?a(t,13)._b():gC(t.tc()))){if(r=e,1=t.o)throw K(new _9);f=e>>5,l=e&31,c=Yd(1,or(Yd(l,1))),r?t.n[n][f]=Xh(t.n[n][f],c):t.n[n][f]=ns(t.n[n][f],gst(c)),c=Yd(c,1),i?t.n[n][f]=Xh(t.n[n][f],c):t.n[n][f]=ns(t.n[n][f],gst(c))}catch(g){throw g=vr(g),ct(g,305)?K(new Uc(KZ+t.o+"*"+t.p+JZ+e+Rc+n+QZ)):K(g)}}function BX(t,e){var n,i,r,c,l,f,g;for(r=new Dt,g=new Dt,n=a(js(K_,t),15).tc();n.hc();)i=a(n.ic(),151),JIt(r,i.b),JIt(r,OIt(i)),n.hc()&&(i=a(n.ic(),151),Or(g,OIt(i)),Or(g,i.b));for(NV(r,t.b),NV(g,t.a),f=new H(r);f.at.d[f.o]&&(n+=zkt(t.b,c),dC(t.a,Xt(c)))):++l;for(n+=t.b.d*l;!Iit(t.a);)hLt(t.b,a(C$(t.a),21).a)}return n}function cve(t){var e,n,i,r,c,l;if(r=t.g.ed(),i=t.b.ed(),t.e)for(n=0;nU_;){for(c=e,l=0;y.Math.abs(e-c)0&&(i=(!t.n&&(t.n=new Wt(ic,t,1,7)),a(a(at(t.n,0),137),263)).a,!i||Ii(Ii((e.a+=' "',e),i),'"'))),Ii(um(Ii(um(Ii(um(Ii(um((e.a+=" (",e),t.i),","),t.j)," | "),t.g),","),t.f),")"),e.a)}function _Nt(t){var e,n,i;return t.Db&64?dX(t):(e=new ll(kpt),n=t.k,n?Ii(Ii((e.a+=' "',e),n),'"'):(!t.n&&(t.n=new Wt(ic,t,1,7)),t.n.i>0&&(i=(!t.n&&(t.n=new Wt(ic,t,1,7)),a(a(at(t.n,0),137),263)).a,!i||Ii(Ii((e.a+=' "',e),i),'"'))),Ii(um(Ii(um(Ii(um(Ii(um((e.a+=" (",e),t.i),","),t.j)," | "),t.g),","),t.f),")"),e.a)}function yNt(t){var e,n,i,r,c,l;return c=0,e=wl(t),e.Qi()&&(c|=4),t.Bb&La&&(c|=2),ct(t,62)?(n=a(t,17),r=jo(n),n.Bb&ca&&(c|=32),r&&(ei(Zb(r)),c|=8,l=r.t,(l>1||l==-1)&&(c|=16),r.Bb&ca&&(c|=64)),n.Bb&ao&&(c|=mw),c|=oh):ct(e,425)?c|=512:(i=e.Qi(),i&&i.i&1&&(c|=256)),t.Bb&512&&(c|=128),c}function _ht(t,e){var n,i,r,c,l,f,g;if(e==null||e.length==0)return null;if(r=a(Zc(t.a,e),180),!r){for(i=(f=new vf(t.b).a.Tb().tc(),new nm(f));i.a.hc();)if(n=(c=a(i.a.ic(),38),a(c.lc(),180)),l=n.c,g=e.length,le(l.substr(l.length-g,g),e)&&(e.length==l.length||bo(l,l.length-e.length-1)==46)){if(r)return null;r=n}r&&tc(t.a,e,r)}return r}function uve(t,e){var n;return t.f==dtt?(n=wm(qo((Qa(),eo),e)),t.e?n==4&&e!=(Y2(),Hx)&&e!=(Y2(),jx)&&e!=(Y2(),ptt)&&e!=(Y2(),gtt):n==2):t.d&&(t.d.pc(e)||t.d.pc(lC(qo((Qa(),eo),e)))||t.d.pc(oE((Qa(),eo),t.b,e)))?!0:t.f&&nht((Qa(),t.f),bL(qo(eo,e)))?(n=wm(qo(eo,e)),t.e?n==4:n==2):!1}function lve(t,e,n,i){var r,c,l,f,g,b,v,M;return l=a(cn(n,(dr(),Ix)),9),g=l.a,v=l.b+t,r=y.Math.atan2(v,g),r<0&&(r+=lx),r+=e,r>lx&&(r-=lx),f=a(cn(i,Ix),9),b=f.a,M=f.b+t,c=y.Math.atan2(M,b),c<0&&(c+=lx),c+=e,c>lx&&(c-=lx),Ef(),I1(1e-10),y.Math.abs(r-c)<=1e-10||r==c||isNaN(r)&&isNaN(c)?0:rc?1:iD(isNaN(r),isNaN(c))}function hve(t,e,n,i){var r,c;for(Vpe(t,e,n,i),Int(e,t.j-e.j+n),Pnt(e,t.k-e.k+i),c=new H(e.f);c.an.k&&fb&&i>b)b=lt(n.p[f.o])+lt(n.d[f.o])+f.n.b+f.d.a;else{r=!1,t.a&&rd();break}if(!r)break}return t.a&&rd(),r}function Mve(t,e){var n,i,r,c,l;for(t.c==null||t.c.lengthc*2?(v=new ON(M),b=$u(l)/Sh(l),g=uZ(v,e,new u2,n,i,r,b),sr(Gh(v.e),g),M.c=dt(un,te,1,0,5,1),M.c[M.c.length]=v,M.c[M.c.length]=l,c=$u(v)*Sh(v)+$u(l)*Sh(l)):(M.c[M.c.length]=l,c+=$u(l)*Sh(l));return M}function rE(t){switch(t){case 100:return I_(O4,!0);case 68:return I_(O4,!1);case 119:return I_(mK,!0);case 87:return I_(mK,!1);case 115:return I_(bK,!0);case 83:return I_(bK,!1);case 99:return I_(wK,!0);case 67:return I_(wK,!1);case 105:return I_(vK,!0);case 73:return I_(vK,!1);default:throw K(new sc(hzt+t.toString(16)))}}function LNt(t,e,n){var i,r,c,l,f,g,b,v;if(e.o==0){for(e.o=1,l=n,n||(r=new Dt,c=(i=a(xu(Ia),10),new ja(i,a(cu(i,i.length),10),0)),l=new zs(r,c)),a(l.a,15).nc(e),e.j==(Ke(),rs)&&a(l.b,19).nc(a(z(e,(Ft(),wc)),69)),g=new H(e.i);g.af&&(f=r,v.c=dt(un,te,1,0,5,1)),r==f&&Ut(v,new zs(n.c.g,n)));we(),gc(v,t.c),pm(t.b,g.o,v)}}function Dve(t,e){var n,i,r,c,l,f,g,b,v;for(l=new H(e.b);l.af&&(f=r,v.c=dt(un,te,1,0,5,1)),r==f&&Ut(v,new zs(n.d.g,n)));we(),gc(v,t.c),pm(t.f,g.o,v)}}function Nve(t,e,n,i){var r,c,l,f,g,b,v,M,k;for(g=new We(n,i),za(g,a(z(e,(R1(),H4)),9)),k=new H(e.e);k.a=40,l&&p_e(t),rye(t),awe(t),n=cIt(t),i=0;n&&i0&&Xi(t.e,c)):(t.c[l]-=b+1,t.c[l]<=0&&t.a[l]>0&&Xi(t.d,c))))}function INt(t){var e,n,i,r,c,l,f,g,b,v,M;for(f=new Dt,c=lt(Yt(t.g.cd(t.g._b()-1))),M=t.g.tc();M.hc();)v=Yt(M.ic()),pm(f,0,c-(En(v),v));for(l=PC(KV(t)),b=new Dt,r=new H(f),g=new Dt,e=0;e1)&&e==1&&a(t.a[t.b],8).j==(Ke(),bu)?J2(a(t.a[t.b],8),(Cu(),kd)):i&&(!n||(t.c-t.b&t.a.length-1)>1)&&e==1&&a(t.a[t.c-1&t.a.length-1],8).j==(Ke(),bu)?J2(a(t.a[t.c-1&t.a.length-1],8),(Cu(),ag)):(t.c-t.b&t.a.length-1)==2?(J2(a(kC(t),8),(Cu(),kd)),J2(a(kC(t),8),ag)):hbe(t,r),yct(t)}function Fve(t){var e,n;if(!t.Wb()){for(n=a(t.cd(0),151).f,new kht(t),e=new Gs(n.i,0),__((mu(),hp),e),b_(oy,e),uP((Ht(),Tn),e),BX(rg,e),b_(nb,e),S_(kw,e),__(Zp,e),uP(Qe,e),BX(tb,e),__(Lw,e),S_(eb,e),__(nb,e),uP(fi,e),BX(Yp,e),__(oy,e),S_(Iw,e),b_(Lw,e);e.b=0&&(f=vpe(t,l),!(f&&(b<22?g.l|=1<>>1,l.m=v>>>1|(M&1)<<21,l.l=k>>>1|(v&1)<<21,--b;return n&&rq(g),c&&(i?(Q1=zM(t),r&&(Q1=n6t(Q1,(NM(),y1t)))):Q1=ia(t.l,t.m,t.h)),g}function UNt(t,e,n,i){var r,c,l,f,g,b,v,M;if(Bue(t,e,n),c=e[n],M=i?(Ht(),on):(Ht(),Qe),Tee(e.length,n,i)){for(r=e[i?n-1:n+1],Nct(t,r,i?(Fo(),ba):(Fo(),Ga)),g=0,v=c.length;g0){for(r=f.length;r>0&&f[r-1]=="";)--r;r=0&&f!=n&&(c=new fs(t,1,f,l,null),i?i.Sh(c):i=c),n>=0&&(c=new fs(t,1,n,f==n?l:null,e),i?i.Sh(c):i=c)),i}function Yve(t,e,n,i){var r,c,l,f,g,b,v;if(ime(t,e,n,i))return!0;for(l=new H(e.f);l.a=r){for(l=1;l0){if(r=a(t.Ab.g,1627),e==null){for(c=0;c1)for(i=new H(r);i.ae.f?1:0:(i=t.e-e.e,n=(t.d>0?t.d:y.Math.floor((t.a-1)*UOt)+1)-(e.d>0?e.d:y.Math.floor((e.a-1)*UOt)+1),n>i+1?r:n0&&(l=e_(l,QNt(i))),UIt(c,l))):rg+O&&($=M.i+k.i,k.a=(k.i*k.a+M.i*M.a)/$,k.i=$,M.g=k,n=!0)),c=f,M=k;return n}function WNt(t,e){var n,i,r,c,l,f,g,b,v;if(r=t.g,l=r.n.a,c=r.n.b,l<=0&&c<=0)return Ht(),Wc;switch(b=t.k.a,v=t.k.b,f=t.n.a,n=t.n.b,e.g){case 2:case 1:if(b<0)return Ht(),on;if(b+f>l)return Ht(),Qe;break;case 4:case 3:if(v<0)return Ht(),Tn;if(v+n>c)return Ht(),fi}return g=(b+f/2)/l,i=(v+n/2)/c,g+i<=1&&g-i<=0?(Ht(),on):g+i>=1&&g-i>=0?(Ht(),Qe):i<.5?(Ht(),Tn):(Ht(),fi)}function Tht(t,e,n){var i,r,c,l;if(e[0]>=t.length)return n.o=0,!0;switch(t.charCodeAt(e[0])){case 43:r=1;break;case 45:r=-1;break;default:return n.o=0,!0}if(++e[0],c=e[0],l=T7(t,e),l==0&&e[0]==c)return!1;if(e[0]=14&&n<=16));case 11:return e!=null&&typeof e===hZ;case 12:return e!=null&&(typeof e===FP||typeof e==hZ);case 0:return Gq(e,t.__elementTypeId$);case 2:return S$(e)&&e.sl!==B;case 1:return S$(e)&&e.sl!==B||Gq(e,t.__elementTypeId$);default:return!0}}function J2(t,e){var n,i,r,c,l,f;if(t.j==(Ke(),bu)&&(n=Bat(wo(a(z(t,(Ft(),WB)),15).xc(),new V8(new LS))).a==null?(Cu(),hI):e,Ct(t,xx,n),n!=(Cu(),ag)))for(i=a(z(t,li),14),f=lt(Yt(z(i,(qt(),up)))),l=0,n==kd?l=t.n.b-y.Math.ceil(f/2):n==hI&&(t.n.b-=lt(Yt(z(Mc(t),F6))),l=(t.n.b-y.Math.ceil(f))/2),c=new H(t.i);c.a0&&(YL(g,!1,(Js(),ah)),YL(g,!0,uh)),pd(e.g,new RMt(t,n)),wr(t.g,e,n)}function a_e(t,e){var n,i,r,c,l,f,g;for(c=0,f=0,g=0,r=new H(t.f.e);r.a0&&t.d!=(wC(),XK)&&(f+=l*(i.d.a+t.a[e.b][i.b]*(e.d.a-i.d.a)/n)),n>0&&t.d!=(wC(),VK)&&(g+=l*(i.d.b+t.a[e.b][i.b]*(e.d.b-i.d.b)/n)));switch(t.d.g){case 1:return new We(f/c,e.d.b);case 2:return new We(e.d.a,g/c);default:return new We(f/c,g/c)}}function kht(t){P6t();var e,n,i,r,c,l,f,g,b,v;for(this.b=new M3,this.c=new Dt,this.a=new Dt,g=iq(),b=0,v=g.length;b0){for(l=0;l>16==-15&&t.Cb.Hg()&&SV(new yV(t.Cb,9,13,n,t.c,Hp(Ya(a(t.Cb,53)),t))):ct(t.Cb,96)&&t.Db>>16==-23&&t.Cb.Hg()&&(e=t.c,ct(e,96)||(e=(ye(),gh)),ct(n,96)||(n=(ye(),gh)),SV(new yV(t.Cb,9,10,n,e,Hp(kc(a(t.Cb,24)),t)))))),t.c}function aw(t){Ai();var e,n,i,r,c;if(t.e!=4&&t.e!=5)throw K(new yn("Token#complementRanges(): must be RANGE: "+t.e));for(E_(t),h4(t),i=t.b.length+2,t.b[0]==0&&(i-=2),n=t.b[t.b.length-1],n==EE&&(i-=2),r=(++Ar,new Su(4)),r.b=dt(Gn,pi,22,i,15,1),c=0,t.b[0]>0&&(r.b[c++]=0,r.b[c++]=t.b[0]-1),e=1;e=65;n--)af[n]=n-65<<24>>24;for(i=122;i>=97;i--)af[i]=i-97+26<<24>>24;for(r=57;r>=48;r--)af[r]=r-48+52<<24>>24;for(af[43]=62,af[47]=63,c=0;c<=25;c++)t1[c]=65+c&qr;for(l=26,g=0;l<=51;++l,g++)t1[l]=97+g&qr;for(t=52,f=0;t<=61;++t,f++)t1[t]=48+f&qr;t1[62]=43,t1[63]=47}function d_e(t,e){var n,i,r,c,l,f,g,b,v,M;if(l=t.d,v=a(z(t,(Ft(),Ex)),15),M=0,v){for(g=0,c=v.tc();c.hc();)r=a(c.ic(),8),g=y.Math.max(g,r.n.b),M+=r.n.a;M+=e/2*(v._b()-1),l.d+=g+e}if(n=a(z(t,vx),15),i=0,n){for(g=0,c=n.tc();c.hc();)r=a(c.ic(),8),g=y.Math.max(g,r.n.b),i+=r.n.a;i+=e/2*(n._b()-1),l.a+=g+e}f=y.Math.max(M,i),f>t.n.a&&(b=(f-t.n.a)/2,l.b=y.Math.max(l.b,b),l.c=y.Math.max(l.c,b))}function p_e(t){var e,n,i,r,c,l,f;for(t.o=new OG,i=new Fr,l=new H(t.e.a);l.a0,f=n7(e,c),tst(n?f.b:f.g,e),p_(f).c.length==1&&Ws(i,f,i.c.b,i.c),r=new zs(c,e),UEt(t.o,r),Lc(t.e.a,c))}function ZNt(t,e){var n,i,r,c,l;for(e.d?r=t.a.c==(Sf(),Qm)?Rs(e.b):br(e.b):r=t.a.c==(Sf(),Xp)?Rs(e.b):br(e.b),c=!1,i=(Ao(),new $d(id(Zd(r.a,new X))));Jn(i);)if(n=a(In(i),14),l=lt(t.a.f[t.a.g[e.b.o].o]),!(!l&&!ec(n)&&n.c.g.c==n.d.g.c)&&!(lt(t.a.n[t.a.g[e.b.o].o])||lt(t.a.n[t.a.g[e.b.o].o]))&&(c=!0,kT(t.b,t.a.g[qde(n,e.b).o])))return e.c=!0,e.a=n,e;return e.c=c,e.a=null,e}function Rht(t,e){var n,i,r,c,l,f,g;if(!Tf(t))throw K(new yc(TFt));if(i=Tf(t),c=i.g,r=i.f,c<=0&&r<=0)return Ht(),Wc;switch(f=t.i,g=t.j,e.g){case 2:case 1:if(f<0)return Ht(),on;if(f+t.g>c)return Ht(),Qe;break;case 4:case 3:if(g<0)return Ht(),Tn;if(g+t.f>r)return Ht(),fi}return l=(f+t.g/2)/c,n=(g+t.f/2)/r,l+n<=1&&l-n<=0?(Ht(),on):l+n>=1&&l-n>=0?(Ht(),Qe):n<.5?(Ht(),Tn):(Ht(),fi)}function g_e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R;if(t.Wb())return new go;for(b=0,M=0,r=t.tc();r.hc();)i=a(r.ic(),31),c=i.e,b=y.Math.max(b,c.a),M+=c.a*c.b;for(b=y.Math.max(b,y.Math.sqrt(M)*lt(Yt(z(a(t.tc().ic(),31),(qt(),$B))))),k=0,R=0,g=0,n=e,f=t.tc();f.hc();)l=a(f.ic(),31),v=l.e,k+v.a>b&&(k=0,R+=g+e,g=0),kP(l,k,R),n=y.Math.max(n,k+v.a),g=y.Math.max(g,v.b),k+=v.a+e;return new We(n+e,R+g+e)}function WX(t,e,n){var i,r,c,l,f,g,b,v;if(i=n._b(),i==0)return!1;if(t.ti())if(b=t.ui(),_8t(t,e,n),l=i==1?t.mi(3,null,n.tc().ic(),e,b):t.mi(5,null,n,e,b),t.qi()){for(f=i<100?null:new w1(i),c=e+i,r=e;r1)for(i=qn(r,0);i.b!=i.d.c;)for(n=a(Yn(i),202),c=0,g=new H(n.e);g.af?1:-1:Uat(t.a,e.a,c),r==-1)M=-g,v=l==g?hV(e.a,f,t.a,c):pV(e.a,f,t.a,c);else if(M=l,l==g){if(r==0)return V1(),AE;v=hV(t.a,c,e.a,f)}else v=pV(t.a,c,e.a,f);return b=new Xv(M,v.length,v),hC(b),b}function QNt(t){tE();var e,n,i,r;if(e=Tr(t),t1e6)throw K(new E9("power of ten too big"));if(t<=qi)return R2(_P(gx[1],e),e);for(i=_P(gx[1],qi),r=i,n=Ka(t-qi),e=Tr(t%qi);Pc(n,qi)>0;)r=e_(r,i),n=Yg(n,qi);for(r=e_(r,_P(gx[1],e)),r=R2(r,qi),n=Ka(t-qi);Pc(n,qi)>0;)r=R2(r,qi),n=Yg(n,qi);return r=R2(r,e),r}function v_e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W;n=hm(new Ng,t.f),b=t.i[e.c.g.o],R=t.i[e.d.g.o],g=e.c,k=e.d,f=g.a.b,M=k.a.b,b.b||(f+=g.k.b),R.b||(M+=k.k.b),v=Tr(y.Math.max(0,f-M)),l=Tr(y.Math.max(0,M-f)),O=($=Mh(1,a(z(e,(qt(),Cx)),21).a),W=wct(e.c.g.j,e.d.g.j),$*W),r=ih($l(Wl(Gl(Vl(new cl,O),l),n),a(zi(t.k,e.c),113))),c=ih($l(Wl(Gl(Vl(new cl,O),v),n),a(zi(t.k,e.d),113))),i=new NMt(r,c),t.c[e.o]=i}function VX(t){var e,n,i,r,c,l,f,g,b,v,M,k,R;if(n=t.i,e=t.n,t.b==0)for(R=n.c+e.b,k=n.b-e.b-e.c,l=t.a,g=0,v=l.length;g0&&(M-=i[0]+t.c,i[0]+=t.c),i[2]>0&&(M-=i[2]+t.c),i[1]=y.Math.max(i[1],M),WD(t.a[1],n.c+e.b+i[0]-(i[1]-M)/2,i[1]);for(c=t.a,f=0,b=c.length;f0&&(e[0]+=t.c,M-=e[0]),e[2]>0&&(M-=e[2]+t.c),e[1]=y.Math.max(e[1],M),GD(t.a[1],i.d+n.d+e[0]-(e[1]-M)/2,e[1]);else for(O=i.d+n.d,R=i.a-n.d-n.a,l=t.a,g=0,v=l.length;g>>0).toString(16),n="\\x"+$h(e,e.length-2,e.length)):t>=ao?(e="0"+(t>>>0).toString(16),n="\\v"+$h(e,e.length-6,e.length)):n=""+String.fromCharCode(t&qr)}return n}function Dht(t){var e,n,i,r,c,l;for(jrt(this),n=t._b()-1;n<3;n++)t.bd(0,a(t.cd(0),9));if(t._b()<4)throw K(new yn("At (least dimension + 1) control points are necessary!"));for(this.c=3,this.e=!0,this.f=!0,this.d=!1,Vme(this,t._b()+this.c-1),l=new Dt,c=this.g.tc(),e=0;e=0&&c!=n))throw K(new yn(o6));for(r=0,g=0;glt(Wh(l.g,l.d[0]).a)?(Hn(g.b>0),g.a.cd(g.c=--g.b),cd(g,l),r=!0):f.e&&f.e._b()>0&&(c=(!f.e&&(f.e=new Dt),f.e).vc(e),b=(!f.e&&(f.e=new Dt),f.e).vc(n),(c||b)&&((!f.e&&(f.e=new Dt),f.e).nc(l),++l.c));r||(i.c[i.c.length]=l)}function E_e(t,e,n){var i,r,c,l,f,g;for(i=0,c=new $n((!t.a&&(t.a=new Wt(zr,t,10,11)),t.a));c.e!=c.i._b();)r=a(ci(c),35),l="",(!r.n&&(r.n=new Wt(ic,r,1,7)),r.n).i==0||(l=a(a(at((!r.n&&(r.n=new Wt(ic,r,1,7)),r.n),0),137),263).a),f=new o4t(l),Uo(f,r),Ct(f,(R1(),mx),r),f.b=i++,f.d.a=r.i+r.g/2,f.d.b=r.j+r.f/2,f.e.a=y.Math.max(r.g,1),f.e.b=y.Math.max(r.f,1),Ut(e.e,f),Au(n.d,r,f),g=a(cn(r,(Ph(),Pgt)),83),g==(Ls(),ob)}function S_e(t,e,n,i){var r,c,l,f,g,b,v;if(n.c.g!=e.g)for(r=new Jh(t),jl(r,(Ke(),Hr)),Ct(r,(Ft(),li),n),Ct(r,(qt(),Qi),(Ls(),Gc)),i.c[i.c.length]=r,l=new Eo,ds(l,r),yr(l,(Ht(),on)),f=new Eo,ds(f,r),yr(f,Qe),Ts(n,l),c=new Np,Uo(c,n),Ct(c,Ro,null),Hs(c,f),Ts(c,e),J9t(r,l,f),b=new Gs(n.b,0);b.b0&&(g=f/60|0,b=f%60,r=t.q.getDate(),n=t.q.getHours(),n+g>=24&&++r,c=new y.Date(t.q.getFullYear(),t.q.getMonth(),r,e+g,t.q.getMinutes()+b,t.q.getSeconds(),t.q.getMilliseconds()),t.q.setTime(c.getTime()))),l=t.q.getTime(),t.q.setTime(l+36e5),t.q.getHours()!=e&&t.q.setTime(l)}function T_e(t,e){var n,i,r,c,l,f,g,b,v;for(di(e,"Layer constraint edge reversal",1),l=new H(t.b);l.an){Vn(e);return}switch(a(z(t,(qt(),JJ)),319).g){case 2:c=new Fc;break;case 0:c=new Bd;break;default:c=new mf}if(i=c.sf(t,r),!c.tf())switch(a(z(t,ybt),347).g){case 2:i=Q_e(r,i);break;case 1:i=V1e(r,i)}bye(t,r,i),Vn(e)}function n7t(t,e,n){var i,r,c,l;return t.ti()?(r=null,c=t.ui(),i=t.mi(1,l=AV(t,e,n),n,e,c),t.qi()&&!(t.Bh()&&l!=null?Fi(l,n):zt(l)===zt(n))?(l!=null&&(r=t.si(l,null)),r=t.ri(n,r),t.xi()&&(r=t.Ai(l,n,r)),r?(r.Sh(i),r.Th()):t.ni(i)):(t.xi()&&(r=t.Ai(l,n,null)),r?(r.Sh(i),r.Th()):t.ni(i)),l):(l=AV(t,e,n),t.qi()&&!(t.Bh()&&l!=null?Fi(l,n):zt(l)===zt(n))&&(r=null,l!=null&&(r=t.si(l,null)),r=t.ri(n,r),r&&r.Th()),l)}function ZX(t){var e,n,i,r,c,l,f;if(!t.d){if(f=new OR,e=PA,c=e.a.Zb(t,e),c==null){for(i=new $n(Bo(t));i.e!=i.i._b();)n=a(ci(i),24),Lr(f,ZX(n));e.a.$b(t)!=null,e.a._b()==0}for(l=f.i,r=(!t.q&&(t.q=new Wt(ph,t,11,10)),new $n(t.q));r.e!=r.i._b();++l)a(ci(r),371);Lr(f,(!t.q&&(t.q=new Wt(ph,t,11,10)),t.q)),Qb(f),t.d=new zv((a(at(Et((T1(),Ae).o),9),17),f.i),f.g),t.e=a(f.g,611),t.e==null&&(t.e=tXt),pl(t).b&=-17}return t.d}function a4(t,e,n,i){var r,c,l,f,g,b;if(b=gu(t.e.mg(),e),g=0,r=a(t.g,124),Jo(),a(e,61).bj()){for(l=0;l1&&(g>$u(f)*Sh(f)/2||l.b==0)&&(M=new ON(k),v=$u(f)/Sh(f),b=uZ(M,e,new u2,n,i,r,v),sr(Gh(M.e),b),f=M,R.c[R.c.length]=M,g=0,k.c=dt(un,te,1,0,5,1)));return Or(R,k),R}function L_e(t,e){var n,i,r,c,l,f,g,b,v;for(di(e,"Hierarchical port dummy size processing",1),g=new Dt,v=new Dt,i=lt(Yt(z(t,(qt(),Ax)))),n=i*2,c=new H(t.b);c.a=W&&t.e[g.o]>O*t.b||pt>=n*W)&&(k.c[k.c.length]=f,f=new Dt,yo(l,c),c.a.Pb(),b-=v,R=y.Math.max(R,b*t.b+$),b+=pt,rt=pt,pt=0,v=0,$=0);return new zs(R,k)}function R_e(t){var e,n,i,r,c,l,f,g,b,v,M,k;for(e=Y9t(t),v=(f=new Tv(e).a.Tb().tc(),new g5(f));v.a.hc();){for(b=(r=a(v.a.ic(),38),a(r.kc(),8)),M=b.d.d,k=b.n.b+b.d.a,t.d[b.o]=0,n=b;(c=t.a[n.o])!=b;)i=Mhe(n,c),t.c==(Sf(),Xp)?g=i.d.k.b+i.d.a.b-i.c.k.b-i.c.a.b:g=i.c.k.b+i.c.a.b-i.d.k.b-i.d.a.b,l=lt(t.d[n.o])+g,t.d[c.o]=l,M=y.Math.max(M,c.d.d-l),k=y.Math.max(k,l+c.n.b+c.d.a),n=c;n=b;do t.d[n.o]=lt(t.d[n.o])+M,n=t.a[n.o];while(n!=b);t.b[b.o]=M+k}}function Nht(t,e,n){var i,r,c,l,f,g,b,v,M,k;for(T6t(this),n==(vm(),sg)?Ir(this.o,t):Ir(this.t,t),v=is,b=Ps,l=e.a.Xb().tc();l.hc();)r=a(l.ic(),48),f=a(r.a,417),i=a(r.b,14),g=i.c,g==t&&(g=i.d),f==sg?Ir(this.o,g):Ir(this.t,g),k=zo(Y(Z(ss,1),wt,9,0,[g.g.k,g.k,g.a])).b,v=y.Math.min(v,k),b=y.Math.max(b,k);for(M=zo(Y(Z(ss,1),wt,9,0,[t.g.k,t.k,t.a])).b,D8t(this,M,v,b),c=e.a.Xb().tc();c.hc();)r=a(c.ic(),48),F9t(this,a(r.b,14));this.k=!1}function D_e(t){var e,n,i,r;if(i=lZ((!t.c&&(t.c=KL(t.f)),t.c),0),t.e==0||t.a==0&&t.f!=-1&&t.e<0)return i;if(e=eat(t)<0?1:0,n=t.e,r=(i.length+1+J3(Tr(t.e)),new Bb),e==1&&(r.a+="-"),t.e>0)if(n-=i.length-e,n>=0){for(r.a+="0.";n>b0.length;n-=b0.length)rCt(r,b0);HSt(r,b0,Tr(n)),Ii(r,i.substr(e,i.length-e))}else n=e-n,Ii(r,$h(i,e,Tr(n))),r.a+=".",Ii(r,uL(i,Tr(n)));else{for(Ii(r,i.substr(e,i.length-e));n<-b0.length;n+=b0.length)rCt(r,b0);HSt(r,b0,Tr(-n))}return r.a}function Hc(t,e){var n,i,r,c,l,f,g;if(t==null)return null;if(c=t.length,c==0)return"";for(g=dt(nl,Pf,22,c,15,1),Oct(0,c,t.length),Oct(0,c,g.length),$Ct(t,0,c,g,0),n=null,f=e,r=0,l=0;r0?$h(n.a,0,c-1):""):t.substr(0,c-1):n?n.a:t}function N_e(t){var e,n,i,r,c,l,f,g,b,v,M,k,R;for(n=(b=new vf(t.c.b).a.Tb().tc(),new nm(b));n.a.hc();)e=(f=a(n.a.ic(),38),a(f.lc(),180)),r=e.a,r==null&&(r=""),i=lne(t.c,r),!i&&r.length==0&&(i=Ehe(t)),i&&!j2(i.c,e,!1)&&Xi(i.c,e);for(l=qn(t.a,0);l.b!=l.d.c;)c=a(Yn(l),436),v=Sct(t.c,c.a),R=Sct(t.c,c.b),v&&R&&Xi(v.c,new zs(R,c.c));for(ld(t.a),k=qn(t.b,0);k.b!=k.d.c;)M=a(Yn(k),436),e=une(t.c,M.a),g=Sct(t.c,M.b),e&&g&&ute(e,g,M.c);ld(t.b)}function O_e(t,e,n){var i,r,c,l,f,g,b,v,M;for(g=n+e.c.c.a,M=new H(e.i);M.a1,f=new Up(v.c);Qo(f.a)||Qo(f.b);)l=a(Qo(f.a)?G(f.a):G(f.b),14),b=l.c==v?l.d:l.c,y.Math.abs(zo(Y(Z(ss,1),wt,9,0,[b.g.k,b.k,b.a])).b-c.b)>1&&Wbe(t,l,c,r,v)}}function l4(t){var e,n,i,r,c,l,f,g;if(!t.f){if(g=new NR,f=new NR,e=PA,l=e.a.Zb(t,e),l==null){for(c=new $n(Bo(t));c.e!=c.i._b();)r=a(ci(c),24),Lr(g,l4(r));e.a.$b(t)!=null,e.a._b()==0}for(i=(!t.s&&(t.s=new Wt(Ra,t,21,17)),new $n(t.s));i.e!=i.i._b();)n=a(ci(i),158),ct(n,62)&&ni(f,a(n,17));Qb(f),t.r=new uCt(t,(a(at(Et((T1(),Ae).o),6),17),f.i),f.g),Lr(g,t.r),Qb(g),t.f=new zv((a(at(Et(Ae.o),5),17),g.i),g.g),pl(t).b&=-3}return t.f}function B_e(t){var e,n,i,r,c,l,f,g,b,v,M,k,R,O;for(l=t.o,i=dt(Gn,pi,22,l,15,1),r=dt(Gn,pi,22,l,15,1),n=t.p,e=dt(Gn,pi,22,n,15,1),c=dt(Gn,pi,22,n,15,1),b=0;b=0&&!g_(t,v,M);)--M;r[v]=M}for(R=0;R=0&&!g_(t,f,O);)--f;c[O]=f}for(g=0;ge[k]&&ki[g]&&G7(t,g,k,!1,!0)}function q7(){q7=P,jvt=Y(Z(nl,1),Pf,22,15,[48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70]),Pqt=new RegExp(`[ +\r\f]+`);try{AA=Y(Z(nMe,1),te,1699,0,[new r2((_rt(),c7("yyyy-MM-dd'T'HH:mm:ss'.'SSSZ",cL((Hh(),Hh(),F4))))),new r2(c7("yyyy-MM-dd'T'HH:mm:ss'.'SSS",cL(F4))),new r2(c7("yyyy-MM-dd'T'HH:mm:ss",cL(F4))),new r2(c7("yyyy-MM-dd'T'HH:mm",cL(F4))),new r2(c7("yyyy-MM-dd",cL(F4)))])}catch(t){if(t=vr(t),!ct(t,78))throw K(t)}}function i7t(t,e){var n,i,r,c,l;switch(c=new Va,t.a.g){case 1:case 3:yo(c,e.e.a),Xi(c,e.i.k),yo(c,Cm(e.j.a)),Xi(c,e.a.k),yo(c,e.f.a);break;default:yo(c,e.e.a),yo(c,Cm(e.j.a)),yo(c,e.f.a)}ld(e.f.a),yo(e.f.a,c),Hs(e.f,e.e.c),n=a(z(e.e,(qt(),Ro)),74),r=a(z(e.j,Ro),74),i=a(z(e.f,Ro),74),(n||r||i)&&(l=new Va,Cot(l,i),Cot(l,r),Cot(l,n),Ct(e.f,Ro,l)),Hs(e.j,null),Ts(e.j,null),Hs(e.e,null),Ts(e.e,null),Ks(e.a,null),Ks(e.i,null),e.g&&i7t(t,e.g)}function r7t(t){m2(t,new y_(p2(h2(d2(f2(new Z0,c0),"ELK DisCo"),"Layouter for arranging unconnected subgraphs. The subgraphs themselves are, by default, not laid out."),new Bs))),pe(t,c0,nY,Xe(Sgt)),pe(t,c0,iY,Xe(zK)),pe(t,c0,hE,Xe(ljt)),pe(t,c0,ox,Xe(Egt)),pe(t,c0,yft,Xe(pjt)),pe(t,c0,xft,Xe(djt)),pe(t,c0,_ft,Xe(gjt)),pe(t,c0,Mft,Xe(fjt)),pe(t,c0,Sft,Xe(hjt)),pe(t,c0,Tft,Xe(UK)),pe(t,c0,Cft,Xe(Mgt)),pe(t,c0,Aft,Xe(uB))}function F_e(t,e,n){var i,r,c,l,f,g,b,v,M;for(l=new QRt,b=Y(Z(Gn,1),pi,22,15,[0]),r=-1,c=0,i=0,g=0;g0){if(r<0&&v.a&&(r=g,c=b[0],i=0),r>=0){if(f=v.b,g==r&&(f-=i++,f==0))return 0;if(!sOt(e,b,v,f,l)){g=r-1,b[0]=c;continue}}else if(r=-1,!sOt(e,b,v,0,l))return 0}else{if(r=-1,v.c.charCodeAt(0)==32){if(M=b[0],DLt(e,b),b[0]>M)continue}else if(Kse(e,v.c,b[0])){b[0]+=v.c.length;continue}return 0}return lxe(l,n)?b[0]:0}function U_e(t,e,n){var i,r,c,l,f;if(i=a(z(t,(qt(),WJ)),19),n.a>e.a&&(i.pc((KM(),CB))?t.c.a+=(n.a-e.a)/2:i.pc(AB)&&(t.c.a+=n.a-e.a)),n.b>e.b&&(i.pc((KM(),LB))?t.c.b+=(n.b-e.b)/2:i.pc(kB)&&(t.c.b+=n.b-e.b)),a(z(t,(Ft(),Qc)),19).pc((So(),Al))&&(n.a>e.a||n.b>e.b))for(f=new H(t.a);f.ae.a&&(i.pc((KM(),CB))?t.c.a+=(n.a-e.a)/2:i.pc(AB)&&(t.c.a+=n.a-e.a)),n.b>e.b&&(i.pc((KM(),LB))?t.c.b+=(n.b-e.b)/2:i.pc(kB)&&(t.c.b+=n.b-e.b)),a(z(t,(Ft(),Qc)),19).pc((So(),Al))&&(n.a>e.a||n.b>e.b))for(l=new H(t.a);l.aR||i+r>b)throw K(new w9);if(!(M.i&1)&&k!=g)if(v=s_(t),c=s_(n),zt(t)===zt(n)&&ei;)Vr(c,f,v[--e]);else for(f=i+r;i0&&Fut(t,e,n,i,r,!0)}function H_e(t,e,n){var i,r,c,l,f,g,b,v,M,k;for(v=new qD(new kv(n)),f=dt(Ol,a0,22,t.f.e.c.length,16,1),Mot(f,f.length),n[e.b]=0,b=new H(t.f.e);b.a=t.b.length?(c[r++]=l.b[i++],c[r++]=l.b[i++]):i>=l.b.length?(c[r++]=t.b[n++],c[r++]=t.b[n++]):l.b[i]=f?pV(t.a,c,e.a,f):pV(e.a,f,t.a,c);else{if(r=c!=f?c>f?1:-1:Uat(t.a,e.a,c),r==0)return V1(),AE;r==1?(k=l,M=hV(t.a,c,e.a,f)):(k=g,M=hV(e.a,f,t.a,c))}return b=new Xv(k,M.length,M),hC(b),b}function c7t(t,e){var n,i,r,c,l,f;for(l=new qg(new xp(t.f.b).a);l.b;){if(c=Sm(l),r=a(c.kc(),536),e==1){if(r.Je()!=(Js(),cg)&&r.Je()!=fp)continue}else if(r.Je()!=(Js(),ah)&&r.Je()!=uh)continue;switch(i=a(a(c.lc(),48).b,80),f=a(a(c.lc(),48).a,172),n=f.c,r.Je().g){case 2:i.g.c=t.e.a,i.g.b=y.Math.max(1,i.g.b+n);break;case 1:i.g.c=i.g.c+n,i.g.b=y.Math.max(1,i.g.b-n);break;case 4:i.g.d=t.e.b,i.g.a=y.Math.max(1,i.g.a+n);break;case 3:i.g.d=i.g.d+n,i.g.a=y.Math.max(1,i.g.a-n)}}}function a7t(t,e,n,i){var r,c,l,f,g,b,v;if(c=t7(i),f=lt(de(z(i,(qt(),nbt)))),(f||lt(de(z(t,YB))))&&!Gd(a(z(t,Qi),83)))r=sP(c),g=Cht(t,n,n==(Fo(),ba)?r:iP(r));else switch(g=new Eo,ds(g,t),e?(v=g.k,v.a=e.a-t.k.a,v.b=e.b-t.k.b,H8t(v,0,0,t.n.a,t.n.b),yr(g,WNt(g,c))):(r=sP(c),yr(g,n==(Fo(),ba)?r:iP(r))),l=a(z(i,(Ft(),Qc)),19),b=g.i,c.g){case 2:case 1:(b==(Ht(),Tn)||b==fi)&&l.nc((So(),Q_));break;case 4:case 3:(b==(Ht(),Qe)||b==on)&&l.nc((So(),Q_))}return g}function V_e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$;for(f=dt(Gn,pi,22,e.b.c.length,15,1),b=dt(QK,jt,232,e.b.c.length,0,1),g=dt(Cl,Ih,8,e.b.c.length,0,1),M=t.a,k=0,R=M.length;k0&&g[i]&&(O=Gv(t.b,g[i],r)),$=y.Math.max($,r.c.c.b+O);for(c=new H(v.f);c.a"}g!=null&&(e.a+=""+g)}else t.e?(f=t.e.zb,f!=null&&(e.a+=""+f)):(e.a+="?",t.b?(e.a+=" super ",tZ(t.b,e)):t.f&&(e.a+=" extends ",tZ(t.f,e)))}function q_e(t,e){var n,i,r,c,l,f,g,b;for(t.f=e,t.d=a(z(t.f,(zL(),Dgt)),348),t.g=a(z(t.f,Fgt),21).a,t.e=lt(Yt(z(t.f,Ngt))),t.c=lt(Yt(z(t.f,gB))),k$(t.b),i=new H(t.f.c);i.a=0)return!1;if(n.e&&r==(Ke(),Jc)&&r!=n.e)return!1;if(e.o=n.b,Ut(n.f,e),n.e=r,r==(Ke(),Hr)||r==uc||r==Jc){for(l=new H(e.i);l.a0&&i<=r?(b-=i,c=f,l=f):(t.a==null&&gX(t),t.a[l]&&(b+=r,c=l)),c>0){Ut(M,Xt(c)),f=-1,v=!1;do if(n.hc())g=Xt(a(n.ic(),21).a+b);else break t;while(g.a<=l)}}else if(t.a==null&&gX(t),t.a[l]&&(f=l),l==g.a)if(t.a==null&&gX(t),t.a[l])if(M.c[M.c.length]=g,f=-1,n.hc())g=Xt(a(n.ic(),21).a+b);else break;else v=!0;++l}return M}function h7t(t){var e,n,i,r;return t.Db&64?Sq(t):(e=new ll(Tpt),i=t.k,i?Ii(Ii((e.a+=' "',e),i),'"'):(!t.n&&(t.n=new Wt(ic,t,1,7)),t.n.i>0&&(r=(!t.n&&(t.n=new Wt(ic,t,1,7)),a(a(at(t.n,0),137),263)).a,!r||Ii(Ii((e.a+=' "',e),r),'"'))),n=(!t.b&&(t.b=new pn(Si,t,4,7)),!(t.b.i<=1&&(!t.c&&(t.c=new pn(Si,t,5,8)),t.c.i<=1))),n?e.a+=" [":e.a+=" ",Ii(e,zW(new P5(Rc),new $n(t.b))),n&&(e.a+="]"),e.a+=" -> ",n&&(e.a+="["),Ii(e,zW(new P5(Rc),new $n(t.c))),n&&(e.a+="]"),e.a)}function tye(t){var e,n,i,r,c,l;for(r=new Dt,l=new H(t.c.i);l.at.n.b||(n=ac(t,Qe),f=e.d+e.a+(n._b()-1)*l,f>t.n.b)))}function rZ(t,e,n){var i,r,c,l,f,g,b,v;return i=t.a.o==(Zh(),rf)?is:Ps,f=ZNt(t,new zMt(e,n)),!f.a&&f.c?(Xi(t.c,f),i):f.a?(r=f.a.c,g=f.a.d,n?(b=t.a.c==(Sf(),Qm)?g:r,c=t.a.c==Qm?r:g,l=t.a.g[c.g.o],v=lt(t.a.p[l.o])+lt(t.a.d[c.g.o])+c.k.b+c.a.b-lt(t.a.d[b.g.o])-b.k.b-b.a.b):(b=t.a.c==(Sf(),Xp)?g:r,c=t.a.c==Xp?r:g,v=lt(t.a.p[t.a.g[c.g.o].o])+lt(t.a.d[c.g.o])+c.k.b+c.a.b-lt(t.a.d[b.g.o])-b.k.b-b.a.b),t.a.n[t.a.g[r.g.o].o]=(me(),me(),!0),t.a.n[t.a.g[g.g.o].o]=!0,v):i}function sZ(t,e,n,i,r,c,l){var f,g,b,v,M,k,R;return M=lt(de(z(e,(qt(),ibt)))),k=null,c==(Fo(),Ga)&&i.c.g==n?k=i.c:c==ba&&i.d.g==n&&(k=i.d),b=l,!l||!M||k?(v=(Ht(),Wc),k?v=k.i:Gd(a(z(n,Qi),83))&&(v=c==Ga?on:Qe),g=pye(t,e,n,c,v,i),f=dV((Mc(n),i)),c==Ga?(Hs(f,a(Ee(g.i,0),11)),Ts(f,r)):(Hs(f,r),Ts(f,a(Ee(g.i,0),11))),b=new J6t(i,f,g,a(z(g,(Ft(),li)),11),c,!k)):(Ut(l.e,i),R=y.Math.max(lt(Yt(z(l.d,up))),lt(Yt(z(i,up)))),Ct(l.d,up,R)),cr(t.a,i,new CD(b.d,e,c)),b}function d7t(t,e){var n,i,r,c,l,f,g,b,v,M;if(Ct(e,(mc(),FE),0),g=a(z(e,gF),76),e.d.b==0)g?(v=lt(Yt(z(g,Kp)))+t.a+Tct(g,e),Ct(e,Kp,v)):Ct(e,Kp,0);else{for(i=(c=qn(new Hd(e).a.d,0),new Ob(c));R9(i.a);)n=a(Yn(i.a),170).c,d7t(t,n);f=a(xD((l=qn(new Hd(e).a.d,0),new Ob(l))),76),M=a(Dne((r=qn(new Hd(e).a.d,0),new Ob(r))),76),b=(lt(Yt(z(M,Kp)))+lt(Yt(z(f,Kp))))/2,g?(v=lt(Yt(z(g,Kp)))+t.a+Tct(g,e),Ct(e,Kp,v),Ct(e,FE,lt(Yt(z(e,Kp)))-b),o2e(t,e)):Ct(e,Kp,b)}}function iye(t,e){var n,i,r,c,l,f,g,b,v;if(b=a(z(t,(Ft(),wc)),69),i=a(Ee(t.i,0),11),b==(Ht(),Tn)?yr(i,fi):b==fi&&yr(i,Tn),a(z(e,(qt(),Ew)),185).pc((Ju(),E0))){if(g=lt(Yt(z(t,iA))),l=lt(Yt(z(t,kx))),f=a(z(e,Tx),275),f==(Kh(),cb))for(n=g,v=t.n.a/2-i.k.a,c=new H(i.e);c.a0&&i>=-6?i>=0?_L(c,n-Tr(t.e),"."):(c.a=$h(c.a,0,e-1)+"0."+uL(c.a,e-1),_L(c,e+1,ml(b0,0,-Tr(i)-1))):(n-e>=1&&(_L(c,e,"."),++n),_L(c,n,"E"),i>0&&_L(c,++n,"+"),_L(c,++n,""+BD(Ka(i)))),t.g=c.a,t.g))}function g7t(t,e,n){var i,r,c,l;this.j=t,this.e=klt(t),this.o=a(z(this.j,(Ft(),tg)),8),this.i=!!this.o,this.p=this.i?a(Ee(n,Mc(this.o).o),204):null,r=a(z(t,Qc),19),this.g=r.pc((So(),Al)),this.b=new Dt,this.d=new IIt(this.e),l=a(z(this.j,NE),214),this.q=_le(e,l,this.e),this.k=new EAt(this),c=Vg(Y(Z(cHt,1),te,208,0,[this,this.d,this.k,this.q])),e==(Tm(),oF)?(i=new o6t(this.e),c.c[c.c.length]=i,this.c=new okt(i,l,a(this.q,422))):this.c=new DMt(e,this),Ut(c,this.c),f7t(c,this.e),this.s=zxe(this.k)}function sye(t,e){var n,i,r,c;return n=new vn,i=a(hd(Vh(new gi(null,new Ei(t.f,16)),n),n_(new ti,new Qn,new Kt,new kt,Y(Z(tf,1),jt,150,0,[(z1(),bw),Qh]))),19),r=i._b(),r=r==2?1:0,r==1&&zb(rP(a(hd(wo(i.uc(),new he),UPt(Qg(0),new ki)),149).a,2),0)&&(r=0),i=a(hd(Vh(new gi(null,new Ei(e.f,16)),n),n_(new ti,new Qn,new Kt,new kt,Y(Z(tf,1),jt,150,0,[bw,Qh]))),19),c=i._b(),c=c==2?1:0,c==1&&zb(rP(a(hd(wo(i.uc(),new Mn),UPt(Qg(0),new ki)),149).a,2),0)&&(c=0),r=t.b[r+1])r+=2;else if(n0)for(i=new Eh(a(rr(t.a,c),19)),we(),gc(i,new Z8(e)),r=new Gs(c.b,0);r.b=ao?mo(n,sut(i)):wM(n,i&qr),l=(++Ar,new K$(10,null,0)),tse(t.a,l,f-1)):(n=(l.ll().length+c,new yT),mo(n,l.ll())),e.e==0?(i=e.jl(),i>=ao?mo(n,sut(i)):wM(n,i&qr)):mo(n,e.ll()),a(l,474).b=n.a}}function hye(t,e){var n,i,r,c,l,f,g,b,v,M,k,R;if(di(e,"Edge splitting",1),t.b.c.length<=2){Vn(e);return}for(c=new Gs(t.b,0),l=(Hn(c.bIt)?(g=2,l=qi):g==0?(g=1,l=Zt):(g=0,l=Zt)):(R=Zt>=l||l-Zt0?(r=i+(O-1)*n,M&&(r+=i),r0){f7(t,n,0),n.a+=String.fromCharCode(i),r=Ple(e,c),f7(t,n,r),c+=r-1;continue}i==39?c+10){if(e=new Crt(t.i,t.g),n=t.i,c=n<100?null:new w1(n),t.xi())for(i=0;i0){for(f=t.g,b=t.i,mC(t),c=b<100?null:new w1(b),i=0;i0)if(e=new xat(t.Uh()),r=g<100?null:new w1(g),sL(t,g,e.g),i=g==1?t.mi(4,at(e,0),null,0,f):t.mi(6,e,null,-1,f),t.qi()){for(n=new $n(e);n.e!=n.i._b();)r=t.si(ci(n),r);r?(r.Sh(i),r.Th()):t.ni(i)}else r?(r.Sh(i),r.Th()):t.ni(i);else sL(t,t.hi(),t.ii()),t.ni(t.mi(6,(we(),fo),null,-1,f));else if(t.qi())if(g=t.hi(),g>0){for(l=t.ii(),sL(t,g,l),r=g<100?null:new w1(g),n=0;n>13|(t.m&15)<<9,r=t.m>>4&8191,c=t.m>>17|(t.h&255)<<5,l=(t.h&1048320)>>8,f=e.l&8191,g=e.l>>13|(e.m&15)<<9,b=e.m>>4&8191,v=e.m>>17|(e.h&255)<<5,M=(e.h&1048320)>>8,ce=n*f,ae=i*f,Te=r*f,Me=c*f,Bn=l*f,g!=0&&(ae+=n*g,Te+=i*g,Me+=r*g,Bn+=c*g),b!=0&&(Te+=n*b,Me+=i*b,Bn+=r*b),v!=0&&(Me+=n*v,Bn+=i*v),M!=0&&(Bn+=n*M),R=ce&eu,O=(ae&511)<<13,k=R+O,W=ce>>22,nt=ae>>9,rt=(Te&262143)<<4,pt=(Me&31)<<17,$=W+nt+rt+pt,It=Te>>18,Gt=Me>>5,Zt=(Bn&4095)<<8,_t=It+Gt+Zt,$+=k>>22,k&=eu,_t+=$>>22,$&=eu,_t&=sp,ia(k,$,_t)}function w7t(t,e){var n,i,r,c,l;n=lt(Yt(z(e,(qt(),nf)))),n<2&&Ct(e,nf,2),i=a(z(e,ch),110),i==(Js(),Ff)&&Ct(e,ch,t7(e)),r=a(z(e,QGt),21),r.a==0?Ct(e,(Ft(),NE),new kq):Ct(e,(Ft(),NE),new fN(r.a)),c=de(z(e,tA)),c==null&&Ct(e,tA,(me(),zt(z(e,ig))===zt((gd(),GE)))),l=new G8t(e),Ct(e,(Ft(),yw),l),lct(t.a),qb(t.a,(Mo(),Of),a(z(e,jmt),285)),qb(t.a,bx,a(z(e,ebt),285)),qb(t.a,aa,a(z(e,OE),285)),qb(t.a,ua,a(z(e,JB),285)),qb(t.a,Yo,Ale(a(z(e,ig),197))),zEt(t.a,$xe(e)),Ct(e,UJ,zht(t.a,e))}function v7t(t,e){var n,i,r,c,l,f,g,b,v,M;if(g=e.length-1,f=e.charCodeAt(g),f==93){if(l=Mf(e,Ca(91)),l>=0)return r=Yhe(t,e.substr(1,l-1)),v=e.substr(l+1,g-(l+1)),Pxe(t,v,r)}else{if(n=-1,/\d/.test(String.fromCharCode(f))&&(n=xst(e,Ca(46),g-1),n>=0)){i=a(Lct(t,ELt(t,e.substr(1,n-1)),!1),52);try{b=ku(e.substr(n+1,e.length-(n+1)),Vs,qi)}catch(k){throw k=vr(k),ct(k,118)?(c=k,K(new TN(c))):K(k)}if(b4)if(t.Li(e)){if(t.Dj()){if(r=a(e,42),i=r.ng(),g=i==t.e&&(t.Pj()?r.hg(r.og(),t.Lj())==t.Mj():-1-r.og()==t.pi()),t.Qj()&&!g&&!i&&r.sg()){for(c=0;c=W-1)return null;for(r=new Dt,r.c[r.c.length]=e,_t=e,l=n,O=-1,f=a(Ee(t.d.c.b,n),26),R=0;R1&&l0&&(b=t.k.a/c);break;case 2:case 4:r=t.g.n.b,r>0&&(b=t.k.b/r)}Ct(t,(Ft(),Ym),b)}if(g=t.n,l=t.a,i)l.a=i.a,l.b=i.b,t.b=!0;else if(e!=dp&&e!=ob&&f!=Wc)switch(f.g){case 1:l.a=g.a/2;break;case 2:l.a=g.a,l.b=g.b/2;break;case 3:l.a=g.a/2,l.b=g.b;break;case 4:l.b=g.b/2}else l.a=g.a/2,l.b=g.b/2}function kye(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O;for(di(n,MBt,1),t.c=e,k=t.c.a,c=0,b=new H(k);b.aO){for(R=1,r=f.n.a;r>l;)++R,r=(f.n.a-(R-1)*t.d)/R;Ut(i,new Wkt(t,f,R,r))}for(g=new H(i);g.a1&&$u(l)*Sh(l)/2>f[0]){for(c=0;c<$.c.length-1&&$u(l)*Sh(l)/2>f[c];)++c;O=new C1($,0,c+1),M=new ON(O),v=$u(l)/Sh(l),g=uZ(M,e,new u2,n,i,r,v),sr(Gh(M.e),g),RM(JM(k,M)),R=new C1($,c+1,$.c.length),Jct(k,R),$.c=dt(un,te,1,0,5,1),b=0,NCt(f,f.length,0)}else W=k.b.c.length==0?null:Ee(k.b,0),W!=null&&bat(k,0),b>0&&(f[b]=f[b-1]),f[b]+=$u(l)*Sh(l),++b,$.c[$.c.length]=l;return $}function zht(t,e){var n,i,r,c,l,f,g,b,v,M,k;if(t.e&&t.c.c.5?nt-=l*2*(O-.5):O<.5&&(nt+=c*2*(.5-O)),r=f.d.b,ntW.a-$-v&&(nt=W.a-$-v),f.k.a=e+nt}}function y7t(t,e){var n,i,r,c,l;for(l=new H(t.i);l.a0&&e9t(t,f,M);for(r=new H(M);r.a0&&(t.a=g+(R-1)*c,e.c.b+=t.a,e.e.b+=t.a)),O.a._b()!=0&&(k=new pX(1,c),R=Oht(k,e,O,$,e.e.b+g-e.c.b),R>0&&(e.e.b+=g+(R-1)*c))}function Hht(t,e,n){var i,r,c,l,f,g;if(e.l==0&&e.m==0&&e.h==0)throw K(new E9("divide by zero"));if(t.l==0&&t.m==0&&t.h==0)return n&&(Q1=ia(0,0,0)),ia(0,0,0);if(e.h==HP&&e.m==0&&e.l==0)return ufe(t,n);if(g=!1,e.h>>19&&(e=zM(e),g=!0),l=wbe(e),c=!1,r=!1,i=!1,t.h==HP&&t.m==0&&t.l==0)if(r=!0,c=!0,l==-1)t=NEt((NM(),_1t)),i=!0,g=!g;else return f=$lt(t,l),g&&rq(f),n&&(Q1=ia(0,0,0)),f;else t.h>>19&&(c=!0,t=zM(t),i=!0,g=!g);return l!=-1?$le(t,l,g,c,n):Zut(t,e)<0?(n&&(c?Q1=zM(t):Q1=ia(t.l,t.m,t.h)),ia(0,0,0)):Hve(i?t:ia(t.l,t.m,t.h),e,g,c,r,n)}function Oye(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt;for(b=e.c,r=Frt(t.e),M=hl(rL(Xc(Brt(t.e)),t.d*t.a,t.c*t.b),-.5),n=r.a-M.a,i=r.b-M.b,l=e.a,n=l.c-n,i=l.d-i,g=new H(b);g.a=0)return n;switch(wm(qo(t,n))){case 2:{if(le("",jp(t,n.Wi()).be())){if(g=bL(qo(t,n)),f=MM(qo(t,n)),v=Zlt(t,e,g,f),v)return v;for(r=xht(t,e),l=0,M=r._b();le.e||e.f>t.e)){for(n=0,i=0,l=t.t.a.Xb().tc();l.hc();)r=a(l.ic(),11),yq(zo(Y(Z(ss,1),wt,9,0,[r.g.k,r.k,r.a])).b,e.f,e.e)&&++n;for(f=t.o.a.Xb().tc();f.hc();)r=a(f.ic(),11),yq(zo(Y(Z(ss,1),wt,9,0,[r.g.k,r.k,r.a])).b,e.f,e.e)&&--n;for(g=e.t.a.Xb().tc();g.hc();)r=a(g.ic(),11),yq(zo(Y(Z(ss,1),wt,9,0,[r.g.k,r.k,r.a])).b,t.f,t.e)&&++i;for(c=e.o.a.Xb().tc();c.hc();)r=a(c.ic(),11),yq(zo(Y(Z(ss,1),wt,9,0,[r.g.k,r.k,r.a])).b,t.f,t.e)&&--i;n0&&n.charCodeAt(0)!=47))throw K(new yn("invalid opaquePart: "+n));if(t&&!(e!=null&&AT(ZF,e.toLowerCase()))&&!(n==null||!uq(n,kA,LA)))throw K(new yn(yUt+n));if(t&&e!=null&&AT(ZF,e.toLowerCase())&&!v1e(n))throw K(new yn(yUt+n));if(!Xle(i))throw K(new yn("invalid device: "+i));if(!bhe(r))throw l=r==null?"invalid segments: null":"invalid segment: "+hhe(r),K(new yn(l));if(!(c==null||Mf(c,Ca(35))==-1))throw K(new yn("invalid query: "+c))}function x7t(t,e){var n;if(e==null||le(e,tu)||e.length==0&&t.k!=(i0(),zE))return null;switch(t.k.g){case 1:return u7(e,bE)?(me(),TE):u7(e,WY)?(me(),$m):null;case 2:try{return Xt(ku(e,Vs,qi))}catch(i){if(i=vr(i),ct(i,118))return null;throw K(i)}case 4:try{return rw(e)}catch(i){if(i=vr(i),ct(i,118))return null;throw K(i)}case 3:return e;case 5:return I6t(t),x9t(t,e);case 6:return I6t(t),Kme(t,t.a,e);case 7:try{return n=mme(t),n.gf(e),n}catch(i){if(i=vr(i),ct(i,30))return null;throw K(i)}default:throw K(new yc("Invalid type set for this layout option."))}}function jye(t){var e,n,i,r,c,l,f,g,b,v,M;for(l=new H(t.d.b);l.a0&&YL(b,!0,(Js(),uh)),f.j==(Ke(),rs)&&p4t(b),wr(t.f,f,e)}}function Hye(t,e,n){var i,r,c,l,f,g,b,v;if(n._b()==0)return!1;if(f=(Jo(),a(e,61).bj()),c=f?n:new i_(n._b()),Om(t.e,e)){if(e.xh())for(b=n.tc();b.hc();)g=b.ic(),XX(t,e,g,ct(e,62)&&(a(a(e,17),62).Bb&ao)!=0)||(r=k1(e,g),c.pc(r)||c.nc(r));else if(!f)for(b=n.tc();b.hc();)g=b.ic(),r=k1(e,g),c.nc(r)}else{if(n._b()>1)throw K(new yn(dK));for(v=gu(t.e.mg(),e),i=a(t.g,124),l=0;l1&&l>1;)v=KNt(t,_t),f=a(Ee(t.d.c.b,l),26),M=a(Ee(t.d.c.b,l-1),26),Gt=a($.cd(k++),21).a,nt=cm(Gt,M.a.c.length),W1(_t,nt,M),W1(v,pt,f),pt=nt,_t&&(r.c[r.c.length]=_t),_t=v,--It,++c,--l;for(rt=(i-(r.c.length-1)*t.d.d)/r.c.length,b=new H(r);b.a0&&L7(t,e,!1,!1,r),M=oX(t,e,!0,!1)):(L7(t,e,!1,g,0),M=oX(t,e,!0,!1)):v?(f=a(a(rr(t.r,e),19),60)._b(),c=C1e(t,e),M=c*f+t.u*(f-1),c>0&&L7(t,e,!0,!1,c)):(L7(t,e,!0,!1,0),M=oX(t,e,!0,!0)),RX(t,e)==(G1(),sb)&&(M+=2*t.u),n.a.a=M}function S7t(t,e){var n,i,r,c,l,f,g,b,v,M;if(n=a(js(t.b,e),114),a(a(rr(t.r,e),19),60).Wb()){n.n.d=0,n.n.a=0;return}n.n.d=t.A.d,n.n.a=t.A.a,r=t.v.pc((Ju(),E0)),v=a(a(rr(t.r,e),19),60)._b()==2,f=t.t==(Kh(),hy),b=t.w.pc((ma(),Fx)),M=t.w.pc(FF),i=0,!r||v&&f?i=cX(t,e,!1,!1):f?M?(c=tme(t,e,b),c>0&&z7(t,e,c,!1,!1),i=cX(t,e,!0,!1)):(z7(t,e,0,!1,b),i=cX(t,e,!0,!1)):M?(g=a(a(rr(t.r,e),19),60)._b(),l=Pbe(t,e),i=l*g+t.u*(g-1),l>0&&z7(t,e,l,!0,!1)):(z7(t,e,0,!0,!1),i=cX(t,e,!0,!0)),RX(t,e)==(G1(),sb)&&(i+=2*t.u),n.a.b=i}function fr(){fr=P,m_t=(Nit(),_c).b,uXt=a(at(Et(_c.b),0),29),jw=a(at(Et(_c.b),1),29),aXt=a(at(Et(_c.b),2),29),qE=_c.bb,a(at(Et(_c.bb),0),29),a(at(Et(_c.bb),1),29),XE=_c.fb,EI=a(at(Et(_c.fb),0),29),a(at(Et(_c.fb),1),29),a(at(Et(_c.fb),2),17),wy=_c.qb,yXt=a(at(Et(_c.qb),0),29),a(at(Et(_c.qb),1),17),a(at(Et(_c.qb),2),17),eU=a(at(Et(_c.qb),3),29),nU=a(at(Et(_c.qb),4),29),TI=a(at(Et(_c.qb),6),29),SI=a(at(Et(_c.qb),5),17),lXt=_c.j,hXt=_c.k,fXt=_c.q,dXt=_c.w,pXt=_c.B,gXt=_c.A,mXt=_c.C,bXt=_c.D,wXt=_c._,vXt=_c.cb,_Xt=_c.hb}function Wye(t,e,n){var i,r,c,l,f,g,b,v,M,k,R;t.c=0,t.b=0,i=2*e.c.a.c.length+1;t:for(M=n.tc();M.hc();){if(v=a(M.ic(),11),f=v.i==(Ht(),Tn)||v.i==fi,R=0,f){if(k=a(z(v,(Ft(),Du)),8),!k)continue;R+=Kwe(t,i,v,k)}else{for(b=new H(v.f);b.a0?(t.f[v.o]=R/(v.d.c.length+v.f.c.length),t.c=y.Math.min(t.c,t.f[v.o]),t.b=y.Math.max(t.b,t.f[v.o])):f&&(t.f[v.o]=R)}}function $ye(t){t.b=null,t.bb=null,t.fb=null,t.qb=null,t.a=null,t.c=null,t.d=null,t.e=null,t.f=null,t.n=null,t.M=null,t.L=null,t.Q=null,t.R=null,t.K=null,t.db=null,t.eb=null,t.g=null,t.i=null,t.j=null,t.k=null,t.gb=null,t.o=null,t.p=null,t.q=null,t.r=null,t.$=null,t.ib=null,t.S=null,t.T=null,t.t=null,t.s=null,t.u=null,t.v=null,t.w=null,t.B=null,t.A=null,t.C=null,t.D=null,t.F=null,t.G=null,t.H=null,t.I=null,t.J=null,t.P=null,t.Z=null,t.U=null,t.V=null,t.W=null,t.X=null,t.Y=null,t._=null,t.ab=null,t.cb=null,t.hb=null,t.nb=null,t.lb=null,t.mb=null,t.ob=null,t.pb=null,t.jb=null,t.kb=null,t.N=!1,t.O=!1}function Vye(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt;if($=e.b.c.length,!($<3)){for(R=dt(Gn,pi,22,$,15,1),M=0,v=new H(e.b);v.al)&&Ir(t.c,a(W.b,14));++f}c=l}}}function Ght(t){var e;switch(t.d){case 1:{if(t.wi())return t.o!=-2;break}case 2:{if(t.wi())return t.o==-2;break}case 3:case 5:case 4:case 6:case 7:return t.o>-2;default:return!1}switch(e=t.vi(),t.p){case 0:return e!=null&<(de(e))!=CT(t.k,0);case 1:return e!=null&&a(e,192).a!=or(t.k)<<24>>24;case 2:return e!=null&&a(e,159).a!=(or(t.k)&qr);case 6:return e!=null&&CT(a(e,149).a,t.k);case 5:return e!=null&&a(e,21).a!=or(t.k);case 7:return e!=null&&a(e,168).a!=or(t.k)<<16>>16;case 3:return e!=null&<(Yt(e))!=t.j;case 4:return e!=null&&a(e,126).a!=t.j;default:return e==null?t.n!=null:!Fi(e,t.n)}}function oZ(t,e){var n,i,r,c;c=t.F,e==null?(t.F=null,mq(t,null)):(t.F=(En(e),e),i=Mf(e,Ca(60)),i!=-1?(r=e.substr(0,i),Mf(e,Ca(46))==-1&&!le(r,aE)&&!le(r,k4)&&!le(r,NO)&&!le(r,L4)&&!le(r,P4)&&!le(r,I4)&&!le(r,R4)&&!le(r,D4)&&(r=DUt),n=jW(e,Ca(62)),n!=-1&&(r+=""+e.substr(n+1,e.length-(n+1))),mq(t,r)):(r=e,Mf(e,Ca(46))==-1&&(i=Mf(e,Ca(91)),i!=-1&&(r=e.substr(0,i)),!le(r,aE)&&!le(r,k4)&&!le(r,NO)&&!le(r,L4)&&!le(r,P4)&&!le(r,I4)&&!le(r,R4)&&!le(r,D4)?(r=DUt,i!=-1&&(r+=""+e.substr(i,e.length-i))):r=e),mq(t,r),r==e&&(t.F=t.D))),t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,5,c,e))}function qye(t){vC();var e,n,i,r,c,l,f;for(f=new sm,n=new H(t);n.a=f.b.c)&&(f.b=e),(!f.c||e.c<=f.c.c)&&(f.d=f.c,f.c=e),(!f.e||e.d>=f.e.d)&&(f.e=e),(!f.f||e.d<=f.f.d)&&(f.f=e);return i=new d7((jM(),Xm)),SL(t,qjt,new ju(Y(Z(M6,1),te,341,0,[i]))),l=new d7(vw),SL(t,Vjt,new ju(Y(Z(M6,1),te,341,0,[l]))),r=new d7(ww),SL(t,$jt,new ju(Y(Z(M6,1),te,341,0,[r]))),c=new d7(Y_),SL(t,Wjt,new ju(Y(Z(M6,1),te,341,0,[c]))),PX(i.c,Xm),PX(r.c,ww),PX(c.c,Y_),PX(l.c,vw),f.a.c=dt(un,te,1,0,5,1),Or(f.a,i.c),Or(f.a,Cm(r.c)),Or(f.a,c.c),Or(f.a,Cm(l.c)),f}function OP(t,e,n){var i,r,c,l;return t.Rj()&&t.Qj()&&(l=M$(t,a(n,51)),zt(l)!==zt(n))?(t.ai(e),t.gi(e,G5t(t,e,l)),t.Dj()&&(c=(r=a(n,42),t.Pj()?t.Nj()?r.Cg(t.b,jo(a(Ve(da(t.b),t.pi()),17)).n,a(Ve(da(t.b),t.pi()).jj(),24).Qi(),null):r.Cg(t.b,xr(r.mg(),jo(a(Ve(da(t.b),t.pi()),17))),null,null):r.Cg(t.b,-1-t.pi(),null,null)),!a(l,42).yg()&&(c=(i=a(l,42),t.Pj()?t.Nj()?i.Ag(t.b,jo(a(Ve(da(t.b),t.pi()),17)).n,a(Ve(da(t.b),t.pi()).jj(),24).Qi(),c):i.Ag(t.b,xr(i.mg(),jo(a(Ve(da(t.b),t.pi()),17))),null,c):i.Ag(t.b,-1-t.pi(),null,c))),c&&c.Th()),Xl(t.b)&&t.ni(t.mi(9,n,l,e,!1)),l):n}function T7t(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t;for(v=lt(Yt(z(t,(qt(),y0)))),i=lt(Yt(z(t,pbt))),k=new Ok,Ct(k,y0,v+i),b=e,nt=e.d,$=e.c.g,rt=e.d.g,W=ql($.c),pt=ql(rt.c),r=new Dt,M=W;M<=pt;M++)f=new Jh(t),jl(f,(Ke(),Hr)),Ct(f,(Ft(),li),b),Ct(f,Qi,(Ls(),Gc)),Ct(f,tF,k),R=a(Ee(t.b,M),26),M==W?W1(f,R.a.c.length-n,R):Ks(f,R),_t=lt(Yt(z(b,up))),_t<0&&(_t=0,Ct(b,up,_t)),f.n.b=_t,O=y.Math.floor(_t/2),l=new Eo,yr(l,(Ht(),on)),ds(l,f),l.k.b=O,g=new Eo,yr(g,Qe),ds(g,f),g.k.b=O,Ts(b,l),c=new Np,Uo(c,b),Ct(c,Ro,null),Hs(c,g),Ts(c,nt),qpe(f,b,c),r.c[r.c.length]=c,b=c;return r}function Xye(t,e){var n,i,r,c,l,f,g,b,v,M;for(t.a=new s4t(vle(bA)),i=new H(e.a);i.a0;){for($=(mi(0,g.c.length),a(g.c[0],14)),r=(mi(0,R.c.length),a(R.c[0],14)),rt=r.d.d,c=nc(rt,r,0),Mce($,r.d,c),Hs(r,null),Ts(r,null),O=$.a,e&&Xi(O,new Oo(pt)),i=qn(r.a,0);i.b!=i.d.c;)n=a(Yn(i),9),Xi(O,new Oo(n));for(nt=$.b,k=new H(r.b);k.a0?RV(this,this.f/this.a):Wh(e.g,e.d[0]).a!=null&&Wh(n.g,n.d[0]).a!=null?RV(this,(lt(Wh(e.g,e.d[0]).a)+lt(Wh(n.g,n.d[0]).a))/2):Wh(e.g,e.d[0]).a!=null?RV(this,Wh(e.g,e.d[0]).a):Wh(n.g,n.d[0]).a!=null&&RV(this,Wh(n.g,n.d[0]).a)}function Wht(t){var e;this.r=Hse(new AR,new _z),this.b=(ts(),new BC(a(si(Ia),274))),this.p=new BC(a(si(Ia),274)),this.i=new BC(a(si(_qt),274)),this.e=t,this.o=new Oo(t.Re()),this.B=t.bf()||lt(de(t.xe((dr(),TF)))),this.v=a(t.xe((dr(),HE)),19),this.w=a(t.xe(kF),19),this.q=a(t.xe(iI),83),this.t=a(t.xe(jQ),275),this.j=a(t.xe(AF),19),this.n=a(fP(t,vVt),119),this.k=lt(Yt(fP(t,PF))),this.d=lt(Yt(fP(t,avt))),this.u=lt(Yt(fP(t,fvt))),this.s=lt(Yt(fP(t,uvt))),this.A=a(fP(t,lvt),135),this.c=2*this.d,e=!this.w.pc((ma(),NF)),this.f=new HC(0,e,0),this.g=new HC(1,e,0),VG(this.f,(Ch(),ta),this.g)}function A7t(t,e){var n,i,r,c,l,f,g,b,v,M,k,R;if(e==null||e.length==0)return null;if(c=a(Zc(t.f,e),27),!c){for(r=(k=new vf(t.d).a.Tb().tc(),new nm(k));r.a.hc();)if(n=(l=a(r.a.ic(),38),a(l.lc(),27)),f=n.f,R=e.length,le(f.substr(f.length-R,R),e)&&(e.length==f.length||bo(f,f.length-e.length-1)==46)){if(c)return null;c=n}if(!c){for(i=(M=new vf(t.d).a.Tb().tc(),new nm(M));i.a.hc();)if(n=(l=a(i.a.ic(),38),a(l.lc(),27)),v=n.g,v!=null){for(g=0,b=v.length;g=1&&(W-l>0&&M>=0?(g.k.a+=$,g.k.b+=c*l):W-l<0&&v>=0&&(g.k.a+=$*W,g.k.b+=c));t.n.a=e.a,t.n.b=e.b,Ct(t,(qt(),Ew),(Ju(),i=a(xu(EA),10),new ja(i,a(cu(i,i.length),10),0)))}function P7t(t,e){var n,i,r,c,l,f,g,b,v,M;for(g=!0,r=0,b=t.f[e.o],v=e.n.b+t.n,n=t.c[e.o][2],Kl(t.a,b,Xt(a(Ee(t.a,b),21).a-1+n)),Kl(t.b,b,lt(Yt(Ee(t.b,b)))-v+n*t.e),++b,b>=t.i?(++t.i,Ut(t.a,Xt(1)),Ut(t.b,v)):(i=t.c[e.o][1],Kl(t.a,b,Xt(a(Ee(t.a,b),21).a+1-i)),Kl(t.b,b,lt(Yt(Ee(t.b,b)))+v-i*t.e)),(t.q==(T_(),H6)&&(a(Ee(t.a,b),21).a>t.j||a(Ee(t.a,b-1),21).a>t.j)||t.q==G6&&(lt(Yt(Ee(t.b,b)))>t.k||lt(Yt(Ee(t.b,b-1)))>t.k))&&(g=!1),l=Rn(Rs(e));Jn(l);)c=a(In(l),14),f=c.c.g,t.f[f.o]==b&&(M=P7t(t,f),r=r+a(M.a,21).a,g=g&<(de(M.b)));return t.f[e.o]=b,r=r+t.c[e.o][0],new zs(Xt(r),(me(),!!g))}function Kye(t){var e,n,i,r,c,l,f,g,b,v;for(b=new Fr,f=new Fr,c=new H(t);c.a-1){for(r=qn(f,0);r.b!=r.d.c;)i=a(Yn(r),125),i.s=l;for(;f.b!=0;)for(i=a(But(f,0),125),n=new H(i.g);n.a-1){for(c=new H(f);c.a0)&&(g.i=cm(g.i,r.i-1),--g.f,g.f==0&&(f.c[f.c.length]=g))}}function R7t(t,e){var n,i,r,c,l,f,g,b;if(!(e.b==null||t.b==null)){for(E_(t),h4(t),E_(e),h4(e),n=dt(Gn,pi,22,t.b.length+e.b.length,15,1),b=0,i=0,l=0;i=f&&r<=g)f<=r&&c<=g?(n[b++]=r,n[b++]=c,i+=2):f<=r?(n[b++]=r,n[b++]=g,t.b[i]=g+1,l+=2):c<=g?(n[b++]=f,n[b++]=c,i+=2):(n[b++]=f,n[b++]=g,t.b[i]=g+1);else if(gt.j&&(t.q=H6,sE(t,c));break;case 4:for(t.q=(T_(),rF),sE(t,c),b=0,r=new H(t.b);r.at.k&&(t.q=G6,sE(t,c));break;case 6:k=Tr(y.Math.ceil(t.f.length*v/100)),sE(t,new Q8(k));break;case 5:M=Tr(y.Math.ceil(t.d*v/100)),sE(t,new V3(M));break;default:sE(t,c)}Ewe(t,e),Vn(n)}function n2e(t){var e,n,i,r,c,l,f;for(e=new Dt,t.g=new Dt,t.d=new Dt,l=new qg(new xp(t.f.b).a);l.b;)c=Sm(l),Ut(e,a(a(c.lc(),48).b,80)),jv(a(c.kc(),536).Je())?Ut(t.d,a(c.lc(),48)):Ut(t.g,a(c.lc(),48));for(Pq(t,t.d),Pq(t,t.g),t.c=new N9t(t.b),qQt(t.c,(Wit(),Ujt)),Cq(t,t.d),Cq(t,t.g),Or(e,t.c.a.b),t.e=new We(is,is),t.a=new We(Ps,Ps),i=new H(e);i.aY1)&&f<10);Oit(t.c,new l3),D7t(t),ise(t.c),Zye(t.f)}function D7t(t){var e,n,i,r,c,l,f;for(e=0,c=new H(t.b.a);c.a=2){for(g=qn(n,0),l=a(Yn(g),9),f=a(Yn(g),9);f.a0&&(f=y.Math.max(f,NPt(t.A.b+i.d.b,r))),M=i,k=r,R=c;t.A&&t.A.c>0&&(O=R+t.A.c,v&&(O+=M.d.c),f=y.Math.max(f,(Ef(),I1(yd),y.Math.abs(k-1)<=yd||k==1||isNaN(k)&&isNaN(1)?0:O/(1-k)))),n.n.b=0,n.a.a=f}function O7t(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$;if(n=a(js(t.b,e),114),b=a(a(rr(t.r,e),19),60),b.Wb()){n.n.d=0,n.n.a=0;return}for(l=t.v.pc((Ju(),E0)),$=t.w.pc((ma(),Fx)),v=t.t==(Kh(),cb),f=0,g=b.tc(),M=null,R=0,k=0;g.hc();)i=a(g.ic(),111),c=lt(Yt(i.b.xe((gD(),zF)))),r=i.b.Re().b,l&&z7(t,e,0,v,!v&&$),M?(O=k+M.d.a+t.u+i.d.d,f=y.Math.max(f,(Ef(),I1(yd),y.Math.abs(R-c)<=yd||R==c||isNaN(R)&&isNaN(c)?0:O/(c-R)))):t.A&&t.A.d>0&&(f=y.Math.max(f,NPt(t.A.d+i.d.d,c))),M=i,R=c,k=r;t.A&&t.A.a>0&&(O=k+t.A.a,v&&(O+=M.d.a),f=y.Math.max(f,(Ef(),I1(yd),y.Math.abs(R-1)<=yd||R==1||isNaN(R)&&isNaN(1)?0:O/(1-R)))),n.n.d=0,n.a.b=f}function c2e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt;return k=t.c[e],R=t.c[n],O=a(z(k,(Ft(),yx)),15),!!O&&O._b()!=0&&O.pc(R)||($=k.j!=(Ke(),Hr)&&R.j!=Hr,W=a(z(k,DE),8),nt=a(z(R,DE),8),rt=W!=nt,pt=!!W&&W!=k||!!nt&&nt!=R,_t=Kq(k,(Ht(),Tn)),It=Kq(R,fi),pt=pt|(Kq(k,fi)||Kq(R,Tn)),Gt=pt&&rt||_t||It,$&&Gt)||k.j==(Ke(),uc)&&R.j==gs||R.j==(Ke(),uc)&&k.j==gs?!1:(v=t.c[e],c=t.c[n],r=JRt(t.e,v,c,(Ht(),on)),g=JRt(t.i,v,c,Qe),Ube(t.f,v,c),b=D6t(t.b,v,c)+a(r.a,21).a+a(g.a,21).a+t.f.d,f=D6t(t.b,c,v)+a(r.b,21).a+a(g.b,21).a+t.f.b,t.a&&(M=a(z(v,li),11),l=a(z(c,li),11),i=jRt(t.g,M,l),b+=a(i.a,21).a,f+=a(i.b,21).a),b>f)}function B7t(t,e,n){var i,r,c,l,f,g,b,v,M;if(t.a!=e.Pi())throw K(new yn(_E+e.be()+Gm));if(i=jp((Qa(),eo),e).kk(),i)return i.Pi().dh().Zg(i,n);if(l=jp(eo,e).mk(),l){if(n==null)return null;if(f=a(n,15),f.Wb())return"";for(M=new Sp,c=f.tc();c.hc();)r=c.ic(),mo(M,l.Pi().dh().Zg(l,r)),M.a+=" ";return B9(M,M.a.length-1)}if(v=jp(eo,e).nk(),!v.Wb()){for(b=v.tc();b.hc();)if(g=a(b.ic(),140),g.Li(n))try{if(M=g.Pi().dh().Zg(g,n),M!=null)return M}catch(k){if(k=vr(k),!ct(k,104))throw K(k)}throw K(new yn("Invalid value: '"+n+"' for datatype :"+e.be()))}return a(e,737).Ui(),n==null?null:ct(n,159)?""+a(n,159).a:fu(n)==tB?oSt(AA[0],a(n,181)):Yc(n)}function a2e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W;for(di(n,MBt,1),Qjt=lt(de(z(e,(qt(),K4)))),t.c=e,O=new Dt,f=new H(e.b);f.aW){for($=1,r=b.n.a;r>g;)++$,r=(b.n.a-($-1)*t.d)/$;Ut(i,new cAt(t,b,$))}for(v=new H(i);v.ab?0:b),1),l),t.c[i.a.d])),ih($l(Wl(Vl(Gl(new cl,0>-b?0:-b),1),l),t.c[f.a.d]))):(k=1,(ct(i.g,153)&&ct(f.g,8)||ct(f.g,153)&&ct(i.g,8))&&(k=2),ih($l(Wl(Vl(Gl(new cl,Tr(c)),k),t.c[i.a.d]),t.c[f.a.d]))))}function l2e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$;for(n=a(z(t,(qt(),Qi)),83),l=t.e,c=t.d,f=l.a+c.b+c.c,g=0-c.d-t.c.b,v=l.b+c.d+c.a-t.c.b,b=new Dt,M=new Dt,r=new H(e);r.a0),a(v.a.cd(v.c=--v.b),14));c!=i&&v.b>0;)t.a[c.o]=!0,t.a[i.o]=!0,c=(Hn(v.b>0),a(v.a.cd(v.c=--v.b),14));v.b>0&&Th(v)}}function f2e(t){t.q||(t.q=!0,t.p=cc(t,0),t.a=cc(t,1),nr(t.a,0),t.f=cc(t,2),nr(t.f,1),Cr(t.f,2),t.n=cc(t,3),Cr(t.n,3),Cr(t.n,4),Cr(t.n,5),Cr(t.n,6),t.g=cc(t,4),nr(t.g,7),Cr(t.g,8),t.c=cc(t,5),nr(t.c,7),nr(t.c,8),t.i=cc(t,6),nr(t.i,9),nr(t.i,10),nr(t.i,11),nr(t.i,12),Cr(t.i,13),t.j=cc(t,7),nr(t.j,9),t.d=cc(t,8),nr(t.d,3),nr(t.d,4),nr(t.d,5),nr(t.d,6),Cr(t.d,7),Cr(t.d,8),Cr(t.d,9),Cr(t.d,10),t.b=cc(t,9),Cr(t.b,0),Cr(t.b,1),t.e=cc(t,10),Cr(t.e,1),Cr(t.e,2),Cr(t.e,3),Cr(t.e,4),nr(t.e,5),nr(t.e,6),nr(t.e,7),nr(t.e,8),nr(t.e,9),nr(t.e,10),Cr(t.e,11),t.k=cc(t,11),Cr(t.k,0),Cr(t.k,1),t.o=yi(t,12),t.s=yi(t,13))}function d2e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt;for(di(e,"Interactive crossing minimization",1),l=0,c=new H(t.b);c.a0&&(n+=g.k.a+g.n.a/2,++M),O=new H(g.i);O.a=f&&r<=g)f<=r&&c<=g?i+=2:f<=r?(t.b[i]=g+1,l+=2):c<=g?(n[b++]=r,n[b++]=f-1,i+=2):(n[b++]=r,n[b++]=f-1,t.b[i]=g+1,l+=2);else if(g0),l.a.cd(l.c=--l.b),cd(l,i),vM(b,i),I7(i,g.i),kM(b),kM(b),r.a.$b(i)!=null}}function m2e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W;for(di(e,"Spline SelfLoop pre-processing.",1),b=new qa,M=new H(t.a);M.a0?r-=864e5:r+=864e5,g=new sst(so(Ka(e.q.getTime()),r))),v=new Bb,b=t.a.length,c=0;c=97&&i<=122||i>=65&&i<=90){for(l=c+1;l=b)throw K(new yn("Missing trailing '"));l+1=14&&b<=16))?e.a.Qb(i)?(n.a?Ii(n.a,n.b):n.a=new ll(n.d),b2(n.a,"[...]")):(l=s_(i),g=new dL(e),$g(n,U7t(l,g))):ct(i,221)?$g(n,t0e(a(i,221))):ct(i,173)?$g(n,Zge(a(i,173))):ct(i,176)?$g(n,cge(a(i,176))):ct(i,1697)?$g(n,Qge(a(i,1697))):ct(i,37)?$g(n,Jge(a(i,37))):ct(i,378)?$g(n,c0e(a(i,378))):ct(i,736)?$g(n,Kge(a(i,736))):ct(i,106)&&$g(n,Yge(a(i,106))):$g(n,i==null?tu:Yc(i));return n.a?n.e.length==0?n.a.a:n.a.a+(""+n.e):n.c}function v2e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$;if(lt(de(z(n,(qt(),ny)))))for(f=new H(n.i);f.a1))););(f>0||k==(Kh(),cb)&&(!c.n&&(c.n=new Wt(ic,c,1,7)),c.n).i>0)&&(g=!0),f>1&&(b=!0)}g&&e.nc((So(),Al)),b&&e.nc((So(),q4))}function z7t(t,e,n){var i,r,c;return r=new Wht(t),Abe(r,n),mNt(r,!1),pd(r.e.We(),new Trt(r,!1)),J$(r,r.f,(Ch(),lc),(Ht(),Tn)),J$(r,r.f,hc,fi),J$(r,r.g,lc,on),J$(r,r.g,hc,Qe),mIt(r,Tn),mIt(r,fi),QCt(r,Qe),QCt(r,on),Fg(),i=r.v.pc((Ju(),ub))&&r.w.pc((ma(),SA))?but(r):null,i&&ste(r.a,i),Rwe(r),hpe(r),fpe(r),y2e(r),ave(r),Ope(r),zq(r,Tn),zq(r,fi),ove(r),$_e(r),e&&(_fe(r),Bpe(r),zq(r,Qe),zq(r,on),c=r.w.pc((ma(),TA)),p9t(r,c,Tn),p9t(r,c,fi),g9t(r,c,Qe),g9t(r,c,on),qc(new gi(null,new Ei(new vf(r.i),0)),new xz),qc(wo(new gi(null,Pot(r.r).wc()),new kR),new LR),F1e(r),r.e.Ue(r.o),qc(new gi(null,Pot(r.r).wc()),new D3)),r.o}function E2e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O;for(di(e,"Spline SelfLoop positioning",1),v=a(z(t,(qt(),$mt)),345),b=new H(t.b);b.a2?(v=new Dt,Or(v,new C1(nt,1,nt.b)),c=gOt(v,pt+t.a),rt=new CX(c),Uo(rt,e),n.c[n.c.length]=rt):i?rt=a(zi(t.b,n0(e)),247):rt=a(zi(t.b,Dm(e)),247),g=n0(e),i&&(g=Dm(e)),l=bge(W,g),b=pt+t.a,l.a?(b+=y.Math.abs(W.b-M.b),$=new We(M.a,(M.b+W.b)/2)):(b+=y.Math.abs(W.a-M.a),$=new We((M.a+W.a)/2,M.b)),i?wr(t.d,e,new Dut(rt,l,$,b)):wr(t.c,e,new Dut(rt,l,$,b)),wr(t.b,e,rt),O=(!e.n&&(e.n=new Wt(ic,e,1,7)),e.n),R=new $n(O);R.e!=R.i._b();)k=a(ci(R),137),r=AP(t,k,!0,0,0),n.c[n.c.length]=r}function T2e(){bi(gy,new Uz),bi(Ui,new qR),bi(Dl,new KR),bi(cf,new QR),bi(utt,new Vz),bi(YF,new t8),bi(Qp,new e8),bi(CA,new td),bi(bI,new Wk),bi(itt,new GR),bi(Nw,new $k),bi(ph,new Oz),bi(of,new Vk),bi(Fw,new oo),bi(Uw,new Bz),bi(Ra,new Fz),bi(Bw,new U3),bi(Dc,new WR),bi(Do,new zz),bi(wu,new yp),bi(ho,new jz),bi(Z(Da,1),new ZS),bi(px,new qk),bi(U4,new $R),bi(tB,new VR),bi(C_t,new Fd),bi(To,new Lb),bi(Hvt,new Xk),bi($vt,new YS),bi(p_t,new XR),bi(KF,new Zk),bi(CE,new ZR),bi(Io,new Yk),bi(h1t,new Kk),bi(Vm,new Pb),bi(f1t,new Hz),bi(l_t,new Ib),bi(A_t,new YR),bi(qm,new Jk),bi(At,new Gz),bi(Wvt,new Wz),bi(k_t,new $z)}function C2e(t){var e,n,i,r,c,l,f,g;for(e=null,i=new H(t);i.a0&&n.c==0&&(!e&&(e=new Dt),e.c[e.c.length]=n);if(e)for(;e.c.length!=0;){if(n=a(Em(e,0),205),n.b&&n.b.c.length>0){for(c=(!n.b&&(n.b=new Dt),new H(n.b));c.anc(t,n,0))return new zs(r,n)}else if(lt(Wh(r.g,r.d[0]).a)>lt(Wh(n.g,n.d[0]).a))return new zs(r,n)}for(f=(!n.e&&(n.e=new Dt),n.e).tc();f.hc();)l=a(f.ic(),205),g=(!l.b&&(l.b=new Dt),l.b),t_(0,g.c.length),z5(g.c,0,n),l.c==g.c.length&&(e.c[e.c.length]=l)}return null}function A2e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$;for(di(e,"Label dummy insertions",1),M=new Dt,l=lt(Yt(z(t,(qt(),F6)))),b=lt(Yt(z(t,kx))),v=a(z(t,ch),110),R=new H(t.a);R.a>16==-10?n=a(t.Cb,268).zj(e,n):t.Db>>16==-15&&(!e&&(e=(ye(),Hf)),!b&&(b=(ye(),Hf)),t.Cb.Hg()&&(g=new Qd(t.Cb,1,13,b,e,Hp(Ya(a(t.Cb,53)),t),!1),n?n.Sh(g):n=g));else if(ct(t.Cb,96))t.Db>>16==-23&&(ct(e,96)||(e=(ye(),gh)),ct(b,96)||(b=(ye(),gh)),t.Cb.Hg()&&(g=new Qd(t.Cb,1,10,b,e,Hp(kc(a(t.Cb,24)),t),!1),n?n.Sh(g):n=g));else if(ct(t.Cb,411))for(f=a(t.Cb,742),l=(!f.b&&(f.b=new dT(new zG)),f.b),c=(i=new qg(new xp(l.a).a),new pT(i));c.a.b;)r=a(Sm(c.a).kc(),84),n=cE(r,O7(r,f),n)}return n}function L2e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W;for(di(n,"Depth-first cycle removal",1),v=e.a,$=v.c.length,t.a=dt(Gn,pi,22,$,15,1),Vxt(t.a),t.b=dt(Gn,pi,22,$,15,1),Vxt(t.b),l=0,b=new H(v);b.a=0){for(g=null,f=new Gs(v.a,b+1);f.b=b.c.c.length?v=wct((Ke(),gs),Hr):v=wct((Ke(),Hr),Hr),v*=2,c=n.a.g,n.a.g=y.Math.max(c,c+(v-c)),l=n.b.g,n.b.g=y.Math.max(l,l+(v-l)),r=e}}function V7t(t,e){var n,i,r,c,l,f,g,b,v;for(l=a(a(rr(t.r,e),19),60),v=l._b()==2||l._b()>2&&t.w.pc((ma(),Fx)),c=l.tc();c.hc();)if(r=a(c.ic(),111),!(!r.c||r.c.d.c.length<=0)){switch(b=r.b.Re(),f=r.c,g=f.i,g.b=(i=f.n,f.e.a+i.b+i.c),g.a=(n=f.n,f.e.b+n.d+n.a),e.g){case 1:v?(g.c=-g.b-t.s,Cf(f,(hu(),fh))):(g.c=b.a+t.s,Cf(f,(hu(),jf))),g.d=-g.a-t.s,qd(f,(Ha(),dh));break;case 3:v?(g.c=-g.b-t.s,Cf(f,(hu(),fh))):(g.c=b.a+t.s,Cf(f,(hu(),jf))),g.d=b.b+t.s,qd(f,(Ha(),Fh));break;case 2:g.c=b.a+t.s,v?(g.d=-g.a-t.s,qd(f,(Ha(),dh))):(g.d=b.b+t.s,qd(f,(Ha(),Fh))),Cf(f,(hu(),jf));break;case 4:g.c=-g.b-t.s,v?(g.d=-g.a-t.s,qd(f,(Ha(),dh))):(g.d=b.b+t.s,qd(f,(Ha(),Fh))),Cf(f,(hu(),fh))}v=!1}}function K7(t,e){var n;if(t.e)throw K(new yc((Vd(DK),qZ+DK.k+XZ)));if(!Ate(t.a,e))throw K(new sc(ZOt+e+YOt));if(e==t.d)return t;switch(n=t.d,t.d=e,n.g){case 0:switch(e.g){case 2:Rm(t);break;case 1:F1(t),Rm(t);break;case 4:w_(t),Rm(t);break;case 3:w_(t),F1(t),Rm(t)}break;case 2:switch(e.g){case 1:F1(t),UX(t);break;case 4:w_(t),Rm(t);break;case 3:w_(t),F1(t),Rm(t)}break;case 1:switch(e.g){case 2:F1(t),UX(t);break;case 4:F1(t),w_(t),Rm(t);break;case 3:F1(t),w_(t),F1(t),Rm(t)}break;case 4:switch(e.g){case 2:w_(t),Rm(t);break;case 1:w_(t),F1(t),Rm(t);break;case 3:F1(t),UX(t)}break;case 3:switch(e.g){case 2:F1(t),w_(t),Rm(t);break;case 1:F1(t),w_(t),F1(t),Rm(t);break;case 4:F1(t),UX(t)}}return t}function L_(t,e){var n;if(t.d)throw K(new yc((Vd(JK),qZ+JK.k+XZ)));if(!Cte(t.a,e))throw K(new sc(ZOt+e+YOt));if(e==t.c)return t;switch(n=t.c,t.c=e,n.g){case 0:switch(e.g){case 2:Xg(t);break;case 1:U1(t),Xg(t);break;case 4:v_(t),Xg(t);break;case 3:v_(t),U1(t),Xg(t)}break;case 2:switch(e.g){case 1:U1(t),zX(t);break;case 4:v_(t),Xg(t);break;case 3:v_(t),U1(t),Xg(t)}break;case 1:switch(e.g){case 2:U1(t),zX(t);break;case 4:U1(t),v_(t),Xg(t);break;case 3:U1(t),v_(t),U1(t),Xg(t)}break;case 4:switch(e.g){case 2:v_(t),Xg(t);break;case 1:v_(t),U1(t),Xg(t);break;case 3:U1(t),zX(t)}break;case 3:switch(e.g){case 2:U1(t),v_(t),Xg(t);break;case 1:U1(t),v_(t),U1(t),Xg(t);break;case 4:U1(t),zX(t)}}return t}function q7t(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt;for(r=new Dt,O=new H(e.a);O.ant?g:nt,pt=new H(v.i);pt.a=b&&It>=W&&(k+=O.k.b+$.k.b+$.a.b-_t,++f));if(n)for(l=new H(rt.d);l.a=b&&It>=W&&(k+=O.k.b+$.k.b+$.a.b-_t,++f))}f>0&&(Gt+=k/f,++R)}R>0?(e.a=r*Gt/R,e.i=R):(e.a=0,e.i=0)}function j2e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt;for(t.e=e,f=_me(e),Gt=new Dt,i=new H(f);i.a0&&(M.d+=b.n.d,M.d+=b.d),M.a>0&&(M.a+=b.n.a,M.a+=b.d),M.b>0&&(M.b+=b.n.b,M.b+=b.d),M.c>0&&(M.c+=b.n.c,M.c+=b.d),M}function q2e(t,e,n){var i;if(di(n,"StretchWidth layering",1),e.a.c.length==0){Vn(n);return}for(t.c=e,t.t=0,t.u=0,t.i=is,t.g=Ps,t.d=lt(Yt(z(e,(qt(),nf)))),Ude(t),eme(t),gge(t),u1e(t),Nfe(t),t.i=y.Math.max(1,t.i),t.g=y.Math.max(1,t.g),t.d=t.d/t.i,t.f=t.g/t.i,t.s=Khe(t),i=new dl(t.c),Ut(t.c.b,i),t.r=fd(t.p),t.n=iN(t.k,t.k.length);t.r.c.length!=0;)t.o=mhe(t),!t.o||x6t(t)&&t.b.a._b()!=0?(tpe(t,i),i=new dl(t.c),Ut(t.c.b,i),yo(t.a,t.b),t.b.a.Pb(),t.t=t.u,t.u=0):x6t(t)?(t.c.b.c=dt(un,te,1,0,5,1),i=new dl(t.c),Ut(t.c.b,i),t.t=0,t.u=0,t.b.a.Pb(),t.a.a.Pb(),++t.f,t.r=fd(t.p),t.n=iN(t.k,t.k.length)):(Ks(t.o,i),Lc(t.r,t.o),Ir(t.b,t.o),t.t=t.t-t.k[t.o.o]*t.d+t.j[t.o.o],t.u+=t.e[t.o.o]*t.d);e.a.c=dt(un,te,1,0,5,1),QC(e.b),Vn(n)}function Z7t(t){var e,n,i,r,c,l,f,g,b,v,M,k,R,O,$,W;for(O=new H(t);O.a0&&(t.a[e.c.o][e.o].d+=pu(t.f,24)*VP*.07000000029802322-.03500000014901161,t.a[e.c.o][e.o].a=t.a[e.c.o][e.o].d/t.a[e.c.o][e.o].b)}}function X2e(t,e,n,i,r){var c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn;Te=zi(t.e,i),Te==null&&(Te=new _T,R=a(Te,191),rt=e+"_s",pt=rt+r,k=new S2(pt),P1(R,Df,k)),ae=a(Te,191),C2(n,ae),Bn=new _T,zg(Bn,"x",i.j),zg(Bn,"y",i.k),P1(ae,jFt,Bn),Zt=new _T,zg(Zt,"x",i.b),zg(Zt,"y",i.c),P1(ae,"endPoint",Zt),M=O9((!i.a&&(i.a=new Ss(sf,i,5)),i.a)),O=!M,O&&(Gt=new Rg,c=new dG(Gt),vo((!i.a&&(i.a=new Ss(sf,i,5)),i.a),c),P1(ae,eK,Gt)),g=Vq(i),_t=!!g,_t&&dlt(t.a,ae,Opt,bX(t,Vq(i))),nt=qq(i),It=!!nt,It&&dlt(t.a,ae,Npt,bX(t,qq(i))),b=(!i.e&&(i.e=new pn(os,i,10,9)),i.e).i==0,$=!b,$&&(ce=new Rg,l=new cEt(t,ce),vo((!i.e&&(i.e=new pn(os,i,10,9)),i.e),l),P1(ae,Fpt,ce)),v=(!i.g&&(i.g=new pn(os,i,9,10)),i.g).i==0,W=!v,W&&(Me=new Rg,f=new aEt(t,Me),vo((!i.g&&(i.g=new pn(os,i,9,10)),i.g),f),P1(ae,Bpt,Me))}function J7(t){var e,n,i,r,c,l,f,g,b,v,M;if(t==null)throw K(new yf(tu));if(b=t,c=t.length,g=!1,c>0&&(e=t.charCodeAt(0),(e==45||e==43)&&(t=t.substr(1,t.length-1),--c,g=e==45)),c==0)throw K(new yf(Um+b+'"'));for(;t.length>0&&t.charCodeAt(0)==48;)t=t.substr(1,t.length-1),--c;if(c>(HNt(),Bzt)[10])throw K(new yf(Um+b+'"'));for(r=0;r0&&(M=-XEt(t.substr(0,i),10),t=t.substr(i,t.length-i),c-=i,n=!1);c>=l;){if(i=XEt(t.substr(0,l),10),t=t.substr(l,t.length-l),c-=l,n)n=!1;else{if(Pc(M,f)<0)throw K(new yf(Um+b+'"'));M=Zg(M,v)}M=Yg(M,i)}if(Pc(M,0)>0)throw K(new yf(Um+b+'"'));if(!g&&(M=DM(M),Pc(M,0)<0))throw K(new yf(Um+b+'"'));return M}function Z2e(t,e,n,i,r){var c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te;for(pt=0,O=0,R=0,k=1,rt=new $n((!t.a&&(t.a=new Wt(zr,t,10,11)),t.a));rt.e!=rt.i._b();)W=a(ci(rt),35),k+=Dp(Af(W)),ce=W.g,O=y.Math.max(O,ce),M=W.f,R=y.Math.max(R,M),pt+=ce*M;for($=(!t.a&&(t.a=new Wt(zr,t,10,11)),t.a).i,l=pt+2*i*i*k*$,c=y.Math.sqrt(l),g=y.Math.max(c*n,O),f=y.Math.max(c/n,R),nt=new $n((!t.a&&(t.a=new Wt(zr,t,10,11)),t.a));nt.e!=nt.i._b();)W=a(ci(nt),35),ae=r.b+(pu(e,26)*d4+pu(e,27)*p4)*(g-W.g),Te=r.b+(pu(e,26)*d4+pu(e,27)*p4)*(f-W.f),th(W,ae),eh(W,Te);for(Zt=g+(r.b+r.c),Gt=f+(r.d+r.a),It=new $n((!t.a&&(t.a=new Wt(zr,t,10,11)),t.a));It.e!=It.i._b();)for(_t=a(ci(It),35),v=Rn(Af(_t));Jn(v);)b=a(In(v),105),t4(b)||h3e(b,e,Zt,Gt);Zt+=r.b+r.c,Gt+=r.d+r.a,P_(t,Zt,Gt,!1,!0)}function Y2e(t,e,n,i){var r,c,l,f,g,b,v,M,k,R,O,$,W,nt;if($=t.k,W=t.n,k=t.d,e){for(M=i/2*(e._b()-1),R=0,b=e.tc();b.hc();)f=a(b.ic(),8),M+=f.n.a,R=y.Math.max(R,f.n.b);for(nt=$.a-(M-W.a)/2,l=$.b-k.d+R,r=W.a/(e._b()+1),c=r,g=e.tc();g.hc();)f=a(g.ic(),8),f.k.a=nt,f.k.b=l-f.n.b,nt+=f.n.a+i/2,v=yDt(f),v.k.a=f.n.a/2-v.a.a,v.k.b=f.n.b,O=a(z(f,(Ft(),FB)),11),O.d.c.length+O.f.c.length==1&&(O.k.a=c-O.a.a,O.k.b=0,ds(O,t)),c+=r}if(n){for(M=i/2*(n._b()-1),R=0,b=n.tc();b.hc();)f=a(b.ic(),8),M+=f.n.a,R=y.Math.max(R,f.n.b);for(nt=$.a-(M-W.a)/2,l=$.b+W.b+k.a-R,r=W.a/(n._b()+1),c=r,g=n.tc();g.hc();)f=a(g.ic(),8),f.k.a=nt,f.k.b=l,nt+=f.n.a+i/2,v=yDt(f),v.k.a=f.n.a/2-v.a.a,v.k.b=0,O=a(z(f,(Ft(),FB)),11),O.d.c.length+O.f.c.length==1&&(O.k.a=c-O.a.a,O.k.b=W.b,ds(O,t)),c+=r}}function K2e(t,e){var n,i,r,c,l,f,g,b,v,M,k;for(r=new H(t.a.b);r.aPs||e.o==x0&&v0&&th(nt,_t*Gt),It>0&&eh(nt,It*Zt);for(YV(t.b,new Mr),e=new Dt,f=new qg(new xp(t.c).a);f.b;)l=Sm(f),i=a(l.kc(),105),n=a(l.lc(),363).a,r=C_(i,!1,!1),M=b8t(n0(i),bP(r),n),RP(M,r),pt=E8t(i),pt&&nc(e,pt,0)==-1&&(e.c[e.c.length]=pt,x4t(pt,(Hn(M.b!=0),a(M.a.a.c,9)),n));for(W=new qg(new xp(t.d).a);W.b;)$=Sm(W),i=a($.kc(),105),n=a($.lc(),363).a,r=C_(i,!1,!1),M=b8t(Dm(i),PC(bP(r)),n),M=PC(M),RP(M,r),pt=S8t(i),pt&&nc(e,pt,0)==-1&&(e.c[e.c.length]=pt,x4t(pt,(Hn(M.b!=0),a(M.c.b.c,9)),n))}function nxe(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt;for(di(e,"Inverted port preprocessing",1),b=t.b,g=new Gs(b,0),n=null,rt=new Dt;g.b0&&(a(js(t.b,e),114).a.b=n)}function ixe(t,e,n,i,r){var c,l,f,g,b,v,M,k,R,O,$,W,nt;switch(k=IC(t.i),O=IC(e.i),R=sr(Xc(t.k),t.a),$=sr(Xc(e.k),e.a),g=sr(new We(R.a,R.b),hl(new Jv(k),1.3*n)),W=sr(new We($.a,$.b),hl(new Jv(O),1.3*i)),f=y.Math.abs(g.a-W.a),fr+2&&JV(t.charCodeAt(r+1),qvt,Xvt)&&JV(t.charCodeAt(r+2),qvt,Xvt))if(n=mre(t.charCodeAt(r+1),t.charCodeAt(r+2)),r+=2,i>0?(n&192)==128?e[f++]=n<<24>>24:i=0:n>=128&&((n&224)==192?(e[f++]=n<<24>>24,i=2):(n&240)==224?(e[f++]=n<<24>>24,i=3):(n&248)==240&&(e[f++]=n<<24>>24,i=4)),i>0){if(f==i){switch(f){case 2:{S1(g,((e[0]&31)<<6|e[1]&63)&qr);break}case 3:{S1(g,((e[0]&15)<<12|(e[1]&63)<<6|e[2]&63)&qr);break}}f=0,i=0}}else{for(c=0;c0&&Ut(t.p,v),Ut(t.o,v);e-=i,R=g+e,b+=e*t.e,Kl(t.a,f,Xt(R)),Kl(t.b,f,b),t.j=Mh(t.j,R),t.k=y.Math.max(t.k,b),t.d+=e,e+=$}}function J7t(){J7t=P;var t,e,n;for(new IL(1,0),new IL(10,0),new IL(0,0),Fzt=dt(LK,wt,216,11,0,1),b0=dt(nl,Pf,22,100,15,1),D1t=Y(Z(Os,1),Xo,22,15,[1,5,25,125,625,3125,15625,78125,390625,1953125,9765625,48828125,244140625,1220703125,6103515625,30517578125,152587890625,762939453125,3814697265625,19073486328125,95367431640625,476837158203125,0x878678326eac9]),N1t=dt(Gn,pi,22,D1t.length,15,1),O1t=Y(Z(Os,1),Xo,22,15,[1,10,100,hw,$P,jZ,1e6,1e7,1e8,sO,1e10,1e11,1e12,1e13,1e14,1e15,1e16]),B1t=dt(Gn,pi,22,O1t.length,15,1),F1t=dt(LK,wt,216,11,0,1),t=0;t1)for(R=new Nht(O,pt,i),vo(pt,new JMt(t,R)),l.c[l.c.length]=R,M=pt.a.Xb().tc();M.hc();)v=a(M.ic(),48),Lc(c,v.b);if(f.a._b()>1)for(R=new Nht(O,f,i),vo(f,new QMt(t,R)),l.c[l.c.length]=R,M=f.a.Xb().tc();M.hc();)v=a(M.ic(),48),Lc(c,v.b)}}function oxe(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O;for(di(e,"Label dummy switching",1),M=a(z(t,(qt(),XB)),276),i=a(hd(wo(Yh(new gi(null,new Ei(t.b,16)),new b3),new AS),OC(new Pe,new ge,new pr,Y(Z(tf,1),jt,150,0,[(z1(),Qh)]))),15),l=M==(XC(),bJ)||M==pJ?rpe(t):null,c=i.tc();c.hc();){switch(r=a(c.ic(),8),n=Pde(r),!n&&(n=M),f=Qde(r),v=Ede(r),k=null,n.g){case 2:k=Nge(r,l,f,v);break;case 0:k=(R=f.a._b()+v.c.length+1,O=(R-1)/2|0,Of.a._b()?a(Ee(v,O-f.a._b()-1),8):null);break;case 1:k=K0e(r,l,f,v);break;case 4:xIt(r,n),k=(b=lut(r),b?f.a._b()==0?null:a(f.a.cd(oC(f,0)),8):v.c.length==0?null:a(Ee(v,v.c.length-1),8));break;case 3:xIt(r,n),k=(g=lut(r),g?v.c.length==0?null:a(Ee(v,v.c.length-1),8):f.a._b()==0?null:a(f.a.cd(oC(f,0)),8))}k&&Pye(r,k),sde(r)}Vn(e)}function Xht(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt;if(k=e.length,k>0&&(g=e.charCodeAt(0),g!=64)){if(g==37&&(M=e.lastIndexOf("%"),b=!1,M!=0&&(M==k-1||(b=e.charCodeAt(M+1)==46)))){if(l=e.substr(1,M-1),pt=le("%",l)?null:qht(l),i=0,b)try{i=ku(e.substr(M+2,e.length-(M+2)),Vs,qi)}catch(_t){throw _t=vr(_t),ct(_t,118)?(f=_t,K(new TN(f))):K(_t)}for(W=vat(t.pg());W.hc();)if(O=UN(W),ct(O,469)&&(r=a(O,609),rt=r.d,(pt==null?rt==null:le(pt,rt))&&i--==0))return r;return null}if(v=e.lastIndexOf("."),R=v==-1?e:e.substr(0,v),n=0,v!=-1)try{n=ku(e.substr(v+1,e.length-(v+1)),Vs,qi)}catch(_t){if(_t=vr(_t),ct(_t,118))R=e;else throw K(_t)}for(R=le("%",R)?null:qht(R),$=vat(t.pg());$.hc();)if(O=UN($),ct(O,174)&&(c=a(O,174),nt=c.be(),(R==null?nt==null:le(R,nt))&&n--==0))return c;return null}return v7t(t,e)}function cxe(t){Iht();var e,n,i,r,c,l,f,g,b,v,M,k,R,O,$,W;if(t==null)return null;if(M=t.length*8,M==0)return"";for(f=M%24,R=M/24|0,k=f!=0?R+1:R,c=dt(nl,Pf,22,k*4,15,1),l=0,r=0,g=0;g>24,b=(e&3)<<24>>24,O=e&-128?(e>>2^192)<<24>>24:e>>2<<24>>24,$=n&-128?(n>>4^240)<<24>>24:n>>4<<24>>24,W=i&-128?(i>>6^252)<<24>>24:i>>6<<24>>24,c[l++]=t1[O],c[l++]=t1[$|b<<4],c[l++]=t1[v<<2|W],c[l++]=t1[i&63];return f==8?(e=t[r],b=(e&3)<<24>>24,O=e&-128?(e>>2^192)<<24>>24:e>>2<<24>>24,c[l++]=t1[O],c[l++]=t1[b<<4],c[l++]=61,c[l++]=61):f==16&&(e=t[r],n=t[r+1],v=(n&15)<<24>>24,b=(e&3)<<24>>24,O=e&-128?(e>>2^192)<<24>>24:e>>2<<24>>24,$=n&-128?(n>>4^240)<<24>>24:n>>4<<24>>24,c[l++]=t1[O],c[l++]=t1[$|b<<4],c[l++]=t1[v<<2],c[l++]=61),ml(c,0,c.length)}function axe(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te;for(Gt=e.a.c,b=e.a.c+e.a.b,pt=t.c&&wme(t,e),i=pt?(Gt+b)/2:Gt+(e.s+1)*t.b,f=e.d.a.Xb().tc();f.hc();)if(l=a(f.ic(),14),g=a(zi(e.c,l),589),ae=g.f,Te=g.a,It=new We(i,ae),ce=new We(i,Te),_t=new We(Gt-10,ae),Zt=new We(b,Te),M=!1,k=!1,g.b&&(M=!0,_t.a=b),g.c&&(k=!0,Zt.a=Gt-10),R=g.d,O=g.e,!pt||!(R||O)||k||M)e.d.a._b()==1?AN(l.a,Y(Z(ss,1),wt,9,0,[_t,It,ce,Zt])):(n=new We(i,e.b),AN(l.a,Y(Z(ss,1),wt,9,0,[_t,It,n,ce,Zt])));else if(R&&O){for(v=0,$=0,rt=new H(l.d.g.i);rt.a=0&&lR&&(c&&(Bg(_t,k),Bg(Gt,Xt(b.a-1))),Me=n.b,Bn+=k+e,k=0,v=y.Math.max(v,n.b+n.c+Te)),th(f,Me),eh(f,Bn),v=y.Math.max(v,Me+Te+n.c),k=y.Math.max(k,M),Me+=Te+e;if(v=y.Math.max(v,i),ae=Bn+k+n.a,ae0&&(t.p=-(t.p-1)),t.p>Vs&&vct(e,t.p-Fm),l=e.q.getDate(),yL(e,1),t.k>=0&&Doe(e,t.k),t.c>=0?yL(e,t.c):t.k>=0?(g=new Pat(e.q.getFullYear()-Fm,e.q.getMonth(),35),i=35-g.q.getDate(),yL(e,i0&&t.f<12&&(t.f+=12),Dee(e,t.f==24&&t.g?0:t.f),t.j>=0&&Tae(e,t.j),t.n>=0&&Fae(e,t.n),t.i>=0&&dMt(e,so(Zg(dP(Ka(e.q.getTime()),hw),hw),t.i)),t.a&&(r=new z9,vct(r,r.q.getFullYear()-Fm-80),KG(Ka(e.q.getTime()),Ka(r.q.getTime()))&&vct(e,r.q.getFullYear()-Fm+100)),t.d>=0){if(t.c==-1)n=(7+t.d-e.q.getDay())%7,n>3&&(n-=7),f=e.q.getMonth(),yL(e,e.q.getDate()+n),e.q.getMonth()!=f&&yL(e,e.q.getDate()+(n>0?-7:7));else if(e.q.getDay()!=t.d)return!1}return t.o>Vs&&(c=e.q.getTimezoneOffset(),dMt(e,so(Ka(e.q.getTime()),(t.o-c)*60*hw))),!0}function Q7t(){Q7t=P,ps=new Ov,cr(ps,(Ht(),aI),Ad),cr(ps,sI,Td),cr(ps,oI,Cd),cr(ps,cI,zf),cr(ps,M0,ab),cr(ps,M0,Cd),cr(ps,M0,zf),cr(ps,ab,M0),cr(ps,ab,Ad),cr(ps,ab,Td),cr(ps,Bx,Bx),cr(ps,Bx,Cd),cr(ps,Bx,Ad),cr(ps,dy,dy),cr(ps,dy,Cd),cr(ps,dy,Td),cr(ps,py,py),cr(ps,py,zf),cr(ps,py,Ad),cr(ps,fy,fy),cr(ps,fy,zf),cr(ps,fy,Td),cr(ps,Cd,oI),cr(ps,Cd,M0),cr(ps,Cd,Bx),cr(ps,Cd,dy),cr(ps,Cd,Cd),cr(ps,Cd,Ad),cr(ps,Cd,Td),cr(ps,zf,cI),cr(ps,zf,M0),cr(ps,zf,py),cr(ps,zf,fy),cr(ps,zf,zf),cr(ps,zf,Ad),cr(ps,zf,Td),cr(ps,Ad,aI),cr(ps,Ad,ab),cr(ps,Ad,Bx),cr(ps,Ad,py),cr(ps,Ad,Cd),cr(ps,Ad,zf),cr(ps,Ad,Ad),cr(ps,Td,sI),cr(ps,Td,ab),cr(ps,Td,dy),cr(ps,Td,fy),cr(ps,Td,Cd),cr(ps,Td,zf),cr(ps,Td,Td)}function hxe(){bi(xI,new c8),bi(tU,new Q0),bi(MI,new nT),bi(g_t,new rj),bi(At,new oj),bi(Z(Da,1),new cj),bi(ho,new aj),bi(px,new em),bi(At,new n8),bi(At,new i8),bi(At,new Zz),bi(To,new r8),bi(At,new Qy),bi(Sl,new z3),bi(Sl,new Yz),bi(At,new s8),bi(CE,new o8),bi(At,new JS),bi(At,new QS),bi(At,new Qk),bi(At,new tT),bi(At,new Kz),bi(Z(Da,1),new a8),bi(At,new eT),bi(At,new u8),bi(Sl,new t5),bi(Sl,new Jz),bi(At,new l8),bi(Io,new h8),bi(At,new f8),bi(Vm,new Qz),bi(At,new d8),bi(At,new tj),bi(At,new ej),bi(At,new tm),bi(Sl,new e5),bi(Sl,new n5),bi(At,new i5),bi(At,new t2),bi(At,new cs),bi(At,new iT),bi(At,new r5),bi(At,new Ev),bi(qm,new nj),bi(At,new s5),bi(At,new p8),bi(At,new zh),bi(qm,new ij),bi(Vm,new g8),bi(At,new sj),bi(Io,new m8)}function fxe(t,e){var n,i,r,c,l,f,g,b,v,M,k,R;for(i=a(z(t,(Ft(),li)),35),th(i,t.k.a+e.a),eh(i,t.k.b+e.b),(a(cn(i,(qt(),Ew)),185)._b()!=0||z(t,xd)!=null||zt(z(Mc(t),JB))===zt((WC(),j6))&&jEt((nw(),(t.p?t.p:(we(),we(),ap)).Qb(Jm)?M=a(z(t,Jm),179):M=a(z(Mc(t),eA),179),M)))&&(c_(i,t.n.a),o_(i,t.n.b)),v=new H(t.i);v.a1;)e=y.Math.min(c,t.c),b=(M=new Jh(t.e.c),jl(M,(Ke(),Jc)),Ct(M,(qt(),Qi),a(z(b,Qi),83)),Ct(M,Oh,a(z(b,Oh),185)),M.o=t.e.b++,Ut(t.b,M),M.n.b=b.n.b,M.n.a=e,k=new Eo,yr(k,(Ht(),Qe)),ds(k,b),k.k.a=M.n.a,k.k.b=M.n.b/2,R=new Eo,yr(R,on),ds(R,M),R.k.b=M.n.b/2,R.k.a=-R.n.a,O=new Np,Hs(O,k),Ts(O,R),M),Ut(t.e.c.a,b),--v,c-=t.c+t.e.d;for(new tlt(t.d,t.b,t.c),f=new H(r);f.a=e.length)return{done:!0};var r=e[i++];return{value:[r,n.get(r)],done:!1}}}},jwe()||(t.prototype.createObject=function(){return{}},t.prototype.get=function(e){return this.obj[":"+e]},t.prototype.set=function(e,n){this.obj[":"+e]=n},t.prototype[GZ]=function(e){delete this.obj[":"+e]},t.prototype.keys=function(){var e=[];for(var n in this.obj)n.charCodeAt(0)==58&&e.push(n.substring(1));return e}),t}function gxe(t,e){var n,i,r,c,l,f,g,b,v;if(Dp(Rs(e))!=1||a(aN(Rs(e)),14).c.g.j!=(Ke(),Hr))return null;for(n=a(aN(Rs(e)),14),i=n.c.g,jl(i,(Ke(),gs)),Ct(i,(Ft(),Iu),null),Ct(i,Ru,null),Ct(i,L6,a(z(e,L6),126)),Ct(i,_w,(me(),me(),!0)),Ct(i,li,z(e,li)),i.n.b=e.n.b,c=z(n.d,li),l=null,b=Ja(i,(Ht(),on)).tc();b.hc();)if(f=a(b.ic(),11),f.d.c.length!=0){Ct(f,li,c),v=n.d,f.n.a=v.n.a,f.n.b=v.n.b,f.a.a=v.a.a,f.a.b=v.a.b,Or(f.e,v.e),v.e.c=dt(un,te,1,0,5,1),l=f;break}if(Ct(n.d,li,null),Dp(Ja(e,on))>1)for(g=qn(fl(Ja(e,on)),0);g.b!=g.d.c;)f=a(Yn(g),11),f.d.c.length==0?(r=new Eo,yr(r,on),r.n.a=f.n.a,r.n.b=f.n.b,ds(r,i),Ct(r,li,z(f,li)),ds(f,null)):ds(l,i);return Ct(e,li,null),Ct(e,_w,!1),jl(e,Jc),Ct(i,(qt(),Qi),a(z(e,Qi),83)),Ct(i,Oh,a(z(e,Oh),185)),pm(t.b,0,i),i}function mxe(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt;for(di(n,"Polyline edge routing",1),R=lt(Yt(z(e,(qt(),Aw)))),r=lt(Yt(z(e,Ax))),i=y.Math.min(1,r/R),rt=0,e.b.c.length!=0&&(pt=K9t(a(Ee(e.b,0),26)),rt=.4*i*pt),f=new Gs(e.b,0);f.b0&&(rt-=R),jht(l,rt),v=0,k=new H(l.a);k.a0),f.a.cd(f.c=--f.b)),g=.4*i*v,!c&&f.b0||v.i==on&&v.d.c.length-v.f.c.length<0)){n=!1;break}if(v.i==on){for(r=new H(v.f);r.a=f){Hn(W.b>0),W.a.cd(W.c=--W.b);break}else O.a>g&&(r?(Or(r.b,O.b),r.a=y.Math.max(r.a,O.a),Th(W)):(Ut(O.b,v),O.c=y.Math.min(O.c,g),O.a=y.Math.max(O.a,f),r=O));r||(r=new pxt,r.c=g,r.a=f,cd(W,r),Ut(r.b,v))}for(l=e.b,b=0,$=new H(i);$.a<$.c.c.length;)for(O=a(G($),511),c=new dl(e),c.o=b++,l.c[l.c.length]=c,R=new H(O.b);R.a0&&Pc(i,-6)>=0){if(Pc(i,0)>=0){for(r=n+or(i),l=17;l>=r;l--)b[l+1]=b[l];return b[++r]=46,f&&(b[--n]=45),ml(b,n,18-n+1)}for(c=2;KG(c,so(DM(i),1));c++)b[--n]=48;return b[--n]=46,b[--n]=48,f&&(b[--n]=45),ml(b,n,18-n)}return k=n+1,v=new Bb,f&&(v.a+="-"),18-k>=1?(S1(v,b[n]),v.a+=".",v.a+=ml(b,n+1,18-n-1)):v.a+=ml(b,n,18-n),v.a+="E",Pc(i,0)>0&&(v.a+="+"),v.a+=""+BD(i),v.a}function rOt(t){var e,n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi,ls;for(M=a(z(t,(R1(),mx)),35),nt=qi,rt=qi,$=Vs,W=Vs,_t=new H(t.e);_t.a<_t.c.c.length;)pt=a(G(_t),146),ae=pt.d,Te=pt.e,nt=y.Math.min(nt,ae.a-Te.a/2),rt=y.Math.min(rt,ae.b-Te.b/2),$=y.Math.max($,ae.a+Te.a/2),W=y.Math.max(W,ae.b+Te.b/2);for(ce=a(cn(M,(Ph(),Sjt)),119),Zt=new We(ce.b-nt,ce.d-rt),f=new H(t.e);f.ae.d.c){if(R=t.c[e.a.d],W=t.c[M.a.d],R==W)continue;ih($l(Wl(Vl(Gl(new cl,1),100),R),W))}}}}}function xxe(t,e,n,i,r,c){var l,f,g,b,v,M;for(b=new Eo,Uo(b,e),yr(b,a(cn(e,(qt(),nA)),69)),Ct(b,(Ft(),li),e),ds(b,n),M=b.n,M.a=e.g,M.b=e.f,v=b.k,v.a=e.i,v.b=e.j,wr(t.a,e,b),l=mN(Vh(Yh(new gi(null,(!e.e&&(e.e=new pn(Xs,e,7,4)),new Ei(e.e,16))),new _a),new $c),new pH(e)),l||(l=mN(Vh(Yh(new gi(null,(!e.d&&(e.d=new pn(Xs,e,8,5)),new Ei(e.d,16))),new ff),new ws),new gH(e))),l||(l=mN(new gi(null,(!e.e&&(e.e=new pn(Xs,e,7,4)),new Ei(e.e,16))),new Bl)),Ct(b,P6,(me(),!!l)),Aye(b,c,r,a(cn(e,Sw),9)),g=new $n((!e.n&&(e.n=new Wt(ic,e,1,7)),e.n));g.e!=g.i._b();)f=a(ci(g),137),!lt(de(cn(f,v0)))&&f.a&&Ut(b.e,_q(f));switch((!e.d&&(e.d=new pn(Xs,e,8,5)),e.d).i+(!e.e&&(e.e=new pn(Xs,e,7,4)),e.e).i>1&&i.nc((So(),q4)),r.g){case 2:case 1:(b.i==(Ht(),Tn)||b.i==fi)&&i.nc((So(),Q_));break;case 4:case 3:(b.i==(Ht(),Qe)||b.i==on)&&i.nc((So(),Q_))}return b}function Z1(t,e){Ai();var n,i,r,c,l,f,g,b,v,M,k,R,O;if(nM(YE)==0){for(M=dt(iMe,wt,112,SXt.length,0,1),l=0;lb&&(i.a+=$Et(dt(nl,Pf,22,-b,15,1))),i.a+="Is",Mf(g,Ca(32))>=0)for(r=0;r0){if(l+i>t.length)return!1;f=T7(t.substr(0,l+i),e)}else f=T7(t,e);switch(c){case 71:return f=x_(t,l,Y(Z(At,1),wt,2,6,[ROt,DOt]),e),r.e=f,!0;case 77:return Awe(t,e,r,f,l);case 76:return kwe(t,e,r,f,l);case 69:return _0e(t,e,l,r);case 99:return y0e(t,e,l,r);case 97:return f=x_(t,l,Y(Z(At,1),wt,2,6,["AM","PM"]),e),r.b=f,!0;case 121:return Owe(t,e,l,f,n,r);case 100:return f<=0?!1:(r.c=f,!0);case 83:return f<0?!1:Lfe(f,l,e[0],r);case 104:f==12&&(f=0);case 75:case 72:return f<0?!1:(r.f=f,r.g=!1,!0);case 107:return f<0?!1:(r.f=f,r.g=!0,!0);case 109:return f<0?!1:(r.j=f,!0);case 115:return f<0?!1:(r.n=f,!0);case 90:if(lce[g]&&(W=g),M=new H(t.b.b);M.a0?k=sP(f):k=iP(sP(f)),t.ze(nA,k)),k.g){case 4:Ct(v,la,(bl(),xw)),Ct(v,NJ,(l_(),$4)),v.n.b=l.b,yr(M,(Ht(),Qe)),M.k.b=b.b;break;case 2:Ct(v,la,(bl(),Km)),Ct(v,NJ,(l_(),C6)),v.n.b=l.b,yr(M,(Ht(),on)),M.k.b=b.b;break;case 1:Ct(v,w0,(tp(),ty)),v.n.a=l.a,yr(M,(Ht(),fi)),M.k.a=b.a;break;case 3:Ct(v,w0,(tp(),wx)),v.n.a=l.a,yr(M,(Ht(),Tn)),M.k.a=b.a}if(e==Nx||e==Sd||e==Gc){if(R=0,e==Nx&&t.ye(_0))switch(k.g){case 1:case 2:R=a(t.xe(_0),21).a;break;case 3:case 4:R=-a(t.xe(_0),21).a}else switch(k.g){case 4:case 2:R=c.b,e==Sd&&(R/=r.b);break;case 1:case 3:R=c.a,e==Sd&&(R/=r.a)}Ct(v,Ym,R)}return Ct(v,wc,k),v}function Axe(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt;if(k=a(a(rr(t.r,e),19),60),e==(Ht(),Qe)||e==on){Y7t(t,e);return}for(c=e==Tn?(Am(),dI):(Am(),pI),_t=e==Tn?(Ha(),Fh):(Ha(),dh),n=a(js(t.b,e),114),i=n.i,r=i.c+r_(Y(Z(Os,1),Xo,22,15,[n.n.b,t.A.b,t.k])),nt=i.c+i.b-r_(Y(Z(Os,1),Xo,22,15,[n.n.c,t.A.c,t.k])),l=jit(Xst(c),t.s),rt=e==Tn?UY:ax,M=k.tc();M.hc();)b=a(M.ic(),111),!(!b.c||b.c.d.c.length<=0)&&(W=b.b.Re(),$=b.e,R=b.c,O=R.i,O.b=(g=R.n,R.e.a+g.b+g.c),O.a=(f=R.n,R.e.b+f.d+f.a),I$(_t,Spt),R.f=_t,Cf(R,(hu(),fh)),O.c=$.a-(O.b-W.a)/2,It=y.Math.min(r,$.a),Gt=y.Math.max(nt,$.a+W.a),O.cGt&&(O.c=Gt-O.b),Ut(l.d,new v$(O,eut(l,O))),rt=e==Tn?y.Math.max(rt,$.b+b.b.Re().b):y.Math.min(rt,$.b));for(rt+=e==Tn?t.s:-t.s,pt=dut((l.e=rt,l)),pt>0&&(a(js(t.b,e),114).a.b=pt),v=k.tc();v.hc();)b=a(v.ic(),111),!(!b.c||b.c.d.c.length<=0)&&(O=b.c.i,O.c-=b.e.a,O.d-=b.e.b)}function oOt(t,e,n){var i,r,c,l,f,g,b,v,M,k;if(i=new qh(e.Qe().a,e.Qe().b,e.Re().a,e.Re().b),r=new lM,t.c)for(l=new H(e.We());l.a=2){if((!t.a&&(t.a=new Wt(os,t,6,6)),t.a).i==0)n=(am(),r=new O3,r),ni((!t.a&&(t.a=new Wt(os,t,6,6)),t.a),n);else if((!t.a&&(t.a=new Wt(os,t,6,6)),t.a).i>1)for(k=new ZT((!t.a&&(t.a=new Wt(os,t,6,6)),t.a));k.e!=k.i._b();)qC(k);RP(e,a(at((!t.a&&(t.a=new Wt(os,t,6,6)),t.a),0),270))}if(M)for(i=new $n((!t.a&&(t.a=new Wt(os,t,6,6)),t.a));i.e!=i.i._b();)for(n=a(ci(i),270),b=new $n((!n.a&&(n.a=new Ss(sf,n,5)),n.a));b.e!=b.i._b();)g=a(ci(b),531),f.a=y.Math.max(f.a,g.a),f.b=y.Math.max(f.b,g.b);for(l=new $n((!t.n&&(t.n=new Wt(ic,t,1,7)),t.n));l.e!=l.i._b();)c=a(ci(l),137),v=a(cn(c,_A),9),v&&Wd(c,v.a,v.b),M&&(f.a=y.Math.max(f.a,c.i+c.g),f.b=y.Math.max(f.b,c.j+c.f));return f}function kxe(t,e,n){var i,r,c,l,f,g,b,v,M,k,R;if(t.e.a.Pb(),t.f.a.Pb(),t.c.c=dt(un,te,1,0,5,1),t.i.c=dt(un,te,1,0,5,1),t.g.a.Pb(),e)for(l=new H(e.a);l.a>4)<<24>>24,M[k++]=((n&15)<<4|i>>2&15)<<24>>24,M[k++]=(i<<6|r)<<24>>24}return!O5(l=c[v++])||!O5(f=c[v++])?null:(e=af[l],n=af[f],g=c[v++],b=c[v++],af[g]==-1||af[b]==-1?g==61&&b==61?n&15?null:(W=dt(Da,W_,22,R*3+1,15,1),Aa(M,0,W,0,R*3),W[k]=(e<<2|n>>4)<<24>>24,W):g!=61&&b==61?(i=af[g],i&3?null:(W=dt(Da,W_,22,R*3+2,15,1),Aa(M,0,W,0,R*3),W[k++]=(e<<2|n>>4)<<24>>24,W[k]=((n&15)<<4|i>>2&15)<<24>>24,W)):null:(i=af[g],r=af[b],M[k++]=(e<<2|n>>4)<<24>>24,M[k++]=((n&15)<<4|i>>2&15)<<24>>24,M[k++]=(i<<6|r)<<24>>24,M))}function Pxe(t,e,n){var i,r,c,l,f,g,b,v,M,k;for(g=new Dt,M=e.length,l=Rat(n),b=0;bf&&(pt=0,_t+=l+nt,l=0),Nve($,n,pt,_t),e=y.Math.max(e,pt+W.a),l=y.Math.max(l,W.b),pt+=W.a+nt;return $}function Ixe(t,e,n){var i,r,c,l,f;switch(i=e.i,c=t.g.n,r=t.g.d,f=t.k,l=zo(Y(Z(ss,1),wt,9,0,[f,t.a])),t.i.g){case 1:qd(e,(Ha(),dh)),i.d=-r.d-n-i.a,a(a(EM(e.d).a.cd(0),271).xe((Ft(),xx)),265)==(Cu(),kd)?(Cf(e,(hu(),fh)),i.c=l.a-lt(Yt(z(t,ey)))-n-i.b):(Cf(e,(hu(),jf)),i.c=l.a+lt(Yt(z(t,ey)))+n);break;case 2:Cf(e,(hu(),jf)),i.c=c.a+r.c+n,a(a(EM(e.d).a.cd(0),271).xe((Ft(),xx)),265)==(Cu(),kd)?(qd(e,(Ha(),dh)),i.d=l.b-lt(Yt(z(t,ey)))-n-i.a):(qd(e,(Ha(),Fh)),i.d=l.b+lt(Yt(z(t,ey)))+n);break;case 3:qd(e,(Ha(),Fh)),i.d=c.b+r.a+n,a(a(EM(e.d).a.cd(0),271).xe((Ft(),xx)),265)==(Cu(),kd)?(Cf(e,(hu(),fh)),i.c=l.a-lt(Yt(z(t,ey)))-n-i.b):(Cf(e,(hu(),jf)),i.c=l.a+lt(Yt(z(t,ey)))+n);break;case 4:Cf(e,(hu(),fh)),i.c=-r.b-n-i.b,a(a(EM(e.d).a.cd(0),271).xe((Ft(),xx)),265)==(Cu(),kd)?(qd(e,(Ha(),dh)),i.d=l.b-lt(Yt(z(t,ey)))-n-i.a):(qd(e,(Ha(),Fh)),i.d=l.b+lt(Yt(z(t,ey)))+n)}}function uOt(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O;switch(l=new wCt(t),f=fd(Xd(e,l)),we(),gc(f,new By),r=t.b,r.c){case 2:g=new Nb(r.a),n=GT(Xd(f,g)),u_(n)?b=a(N2(n),188).b:b=15,g=new Nb(Nut(r)),n=GT(Xd(f,g)),u_(n)?c=a(N2(n),188).b:c=15,g=new Nb(r.b),n=GT(Xd(f,g)),u_(n)?v=a(N2(n),188).b:v=15,i=xbe(t,b,c,v),Ir(e,new r4(i,t.c,t.e,t.a.c.g,r.a)),Ir(e,new r4(i,t.c,t.e,t.a.c.g,Nut(r))),Ir(e,new r4(i,t.c,t.e,t.a.c.g,r.b));break;case 1:g=new Nb(r.a),n=GT(Xd(f,g)),u_(n)?b=a(N2(n),188).b:b=15,g=new Nb(r.b),n=GT(Xd(f,g)),u_(n)?v=a(N2(n),188).b:v=15,i=fbe(t,b,v),Ir(e,new r4(i,t.c,t.e,t.a.c.g,r.a)),Ir(e,new r4(i,t.c,t.e,t.a.c.g,r.b));break;case 0:g=new Nb(r.a),n=GT(Xd(f,g)),u_(n)?b=a(N2(n),188).b:b=15,i=(M=t.b,k=qve(t.a.c,t.a.d,b),yo(t.a.a,Bq(k)),R=mlt(t.a.b,k.a,M),O=new EL((!k.k&&(k.k=new xX(KV(k))),k.k)),Qot(O),R?Iot(O,R):O),Ir(e,new r4(i,t.c,t.e,t.a.c.g,r.a));break;default:throw K(new yn("The loopside must be defined."))}return i}function Rxe(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae;for(di(e,"Compound graph postprocessor",1),n=lt(de(z(t,(qt(),KJ)))),f=a(z(t,(Ft(),umt)),238),v=new $r,nt=f.Xb().tc();nt.hc();){for(W=a(nt.ic(),14),l=new Eh(f.Mc(W)),we(),gc(l,new Z8(t)),It=ule((mi(0,l.c.length),a(l.c[0],234))),Zt=LPt(a(Ee(l,l.c.length-1),234)),pt=It.g,VM(Zt.g,pt)?rt=a(z(pt,xd),31):rt=Mc(pt),M=_de(W,l),ld(W.a),k=null,c=new H(l);c.aop,ae=y.Math.abs(k.b-O.b)>op,(!n&&ce&&ae||n&&(ce||ae))&&Xi(W.a,_t)),yo(W.a,i),i.b==0?k=_t:k=(Hn(i.b!=0),a(i.c.b.c,9)),Lle(R,M,$),LPt(r)==Zt&&(Mc(Zt.g)!=r.a&&($=new go,Xlt($,Mc(Zt.g),rt)),Ct(W,HJ,$)),Rge(R,W,rt),v.a.Zb(R,v);Hs(W,It),Ts(W,Zt)}for(b=v.a.Xb().tc();b.hc();)g=a(b.ic(),14),Hs(g,null),Ts(g,null);Vn(e)}function Dxe(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi;for(rt=new Gs(t.b,0),v=e.tc(),O=0,b=a(v.ic(),21).a,It=0,n=new $r,Zt=new qa;rt.b=t.a&&(i=Zve(t,rt),v=Mh(v,i.b),_t=Mh(_t,i.d),Ut(f,new zs(rt,i)));for(ce=new Dt,b=0;b0),W.a.cd(W.c=--W.b),ae=new dl(t.b),cd(W,ae),Hn(W.b=i.n.b/2}else rt=!M;rt?(nt=a(z(i,(Ft(),Ex)),15),nt?k?c=nt:(r=a(z(i,vx),15),r?nt._b()<=r._b()?c=nt:c=r:(c=new Dt,Ct(i,vx,c))):(c=new Dt,Ct(i,Ex,c))):(r=a(z(i,(Ft(),vx)),15),r?M?c=r:(nt=a(z(i,Ex),15),nt?r._b()<=nt._b()?c=r:c=nt:(c=new Dt,Ct(i,Ex,c))):(c=new Dt,Ct(i,vx,c))),c.nc(t),Ct(t,(Ft(),FB),n),e.d==n?(Ts(e,null),n.d.c.length+n.f.c.length==0&&ds(n,null),Jle(n)):(Hs(e,null),n.d.c.length+n.f.c.length==0&&ds(n,null)),ld(e.a)}function Bxe(t){var e,n,i,r,c,l,f,g,b,v,M,k,R,O;if(zt(z(t.c,(qt(),Qi)))===zt((Ls(),Sd))||zt(z(t.c,Qi))===zt(Gc)){for(v=new H(t.c.i);v.a0&&(r=a(Ee(W.c.a,Gt-1),8),l=t.i[r.o],ce=y.Math.ceil(Gv(t.n,r,W)),c=It.a.e-W.d.d-(l.a.e+r.n.b+r.d.a)-ce),b=is,Gt0&&Zt.a.e.e-Zt.a.a-(Zt.b.e.e-Zt.b.a)<0,O=pt.a.e.e-pt.a.a-(pt.b.e.e-pt.b.a)<0&&Zt.a.e.e-Zt.a.a-(Zt.b.e.e-Zt.b.a)>0,R=pt.a.e.e+pt.b.aZt.b.e.e+Zt.a.a,_t=0,!$&&!O&&(k?c+M>0?_t=M:b-i>0&&(_t=i):R&&(c+f>0?_t=f:b-rt>0&&(_t=rt))),It.a.e+=_t,It.b&&(It.d.e+=_t),!1))}function Uxe(){var t=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F"];return t[34]='\\"',t[92]="\\\\",t[173]="\\u00ad",t[1536]="\\u0600",t[1537]="\\u0601",t[1538]="\\u0602",t[1539]="\\u0603",t[1757]="\\u06dd",t[1807]="\\u070f",t[6068]="\\u17b4",t[6069]="\\u17b5",t[8203]="\\u200b",t[8204]="\\u200c",t[8205]="\\u200d",t[8206]="\\u200e",t[8207]="\\u200f",t[8232]="\\u2028",t[8233]="\\u2029",t[8234]="\\u202a",t[8235]="\\u202b",t[8236]="\\u202c",t[8237]="\\u202d",t[8238]="\\u202e",t[8288]="\\u2060",t[8289]="\\u2061",t[8290]="\\u2062",t[8291]="\\u2063",t[8292]="\\u2064",t[8298]="\\u206a",t[8299]="\\u206b",t[8300]="\\u206c",t[8301]="\\u206d",t[8302]="\\u206e",t[8303]="\\u206f",t[65279]="\\ufeff",t[65529]="\\ufff9",t[65530]="\\ufffa",t[65531]="\\ufffb",t}function mu(){mu=P,rg=new A1("N",0,(Ht(),Tn),Tn,0),kw=new A1("EN",1,Qe,Tn,1),tb=new A1("E",2,Qe,Qe,0),eb=new A1("SE",3,fi,Qe,1),Yp=new A1("S",4,fi,fi,0),Iw=new A1("WS",5,on,fi,1),Pw=new A1("W",6,on,on,0),hp=new A1("NW",7,Tn,on,1),Zp=new A1("ENW",8,Qe,on,2),Lw=new A1("ESW",9,Qe,on,2),nb=new A1("SEN",10,fi,Tn,2),oy=new A1("SWN",11,fi,Tn,2),Lx=new A1(cx,12,Wc,Wc,3),QWt=Qfe(rg,kw,tb,eb,Yp,Iw,Y(Z(aA,1),jt,129,0,[Pw,hp,Zp,Lw,nb,oy])),e$t=($b(),M_(Y(Z(un,1),te,1,5,[rg,tb,Yp,Pw]))),t$t=M_(Y(Z(un,1),te,1,5,[kw,eb,Iw,hp])),o$t=new l2(Tn),i$t=M_(Y(Z(un,1),te,1,5,[Qe,Tn])),n$t=new l2(Qe),u$t=M_(Y(Z(un,1),te,1,5,[fi,Qe])),a$t=new l2(fi),p$t=M_(Y(Z(un,1),te,1,5,[on,fi])),d$t=new l2(on),c$t=M_(Y(Z(un,1),te,1,5,[Tn,on])),r$t=M_(Y(Z(un,1),te,1,5,[Qe,Tn,on])),s$t=M_(Y(Z(un,1),te,1,5,[Qe,fi,on])),h$t=M_(Y(Z(un,1),te,1,5,[fi,on,Tn])),l$t=M_(Y(Z(un,1),te,1,5,[fi,Qe,Tn])),f$t=(yM(),B4)}function zxe(t){var e,n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce;if(n=lt(Yt(z(t.a.j,(qt(),zmt)))),n<-1||!t.a.i||QT(a(z(t.a.o,Qi),83))||ac(t.a.o,(Ht(),Qe))._b()<2&&ac(t.a.o,on)._b()<2)return!0;if(t.a.c.pf())return!1;for(_t=0,pt=0,rt=new Dt,g=t.a.e,b=0,v=g.length;b=n}function jxe(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t;for(di(e,CBt,1),R=a(z(t,(qt(),ig)),197),r=new H(t.b);r.a=2){for(O=!0,M=new H(c.i),n=a(G(M),11);M.a0){for(k=v<100?null:new w1(v),b=new xat(e),O=b.g,nt=dt(Gn,pi,22,v,15,1),i=0,_t=new i_(v),r=0;r=0;)if(f!=null?Fi(f,O[g]):O[g]==null){nt.length<=i&&(W=nt,nt=dt(Gn,pi,22,2*nt.length,15,1),Aa(W,0,nt,0,i)),nt[i++]=r,ni(_t,O[g]);break t}if(zt(f)===zt(f))break}}if(O=_t.g,i>nt.length&&(W=nt,nt=dt(Gn,pi,22,i,15,1),Aa(W,0,nt,0,i)),i>0){for(pt=!0,c=0;c=0;)W2(t,nt[l]);if(i!=i){for(r=i;--r>=i;)W2(_t,r);W=nt,nt=dt(Gn,pi,22,i,15,1),Aa(W,0,nt,0,i)}e=_t}}}else for(e=mpe(t,e),r=t.i;--r>=0;)e.pc(t.g[r])&&(W2(t,r),pt=!0);if(pt){if(nt!=null){for(n=e._b(),M=n==1?uC(t,4,e.tc().ic(),null,nt[0],$):uC(t,6,e,nt,nt[0],$),k=n<100?null:new w1(n),r=e.tc();r.hc();)R=r.ic(),k=Ust(t,a(R,75),k);k?(k.Sh(M),k.Th()):Bi(t.e,M)}else{for(k=Ene(e._b()),r=e.tc();r.hc();)R=r.ic(),k=Ust(t,a(R,75),k);k&&k.Th()}return!0}else return!1}function Gxe(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi,ls;for(di(n,"MinWidth layering",1),R=e.b,Zt=e.a,ls=a(z(e,(qt(),Jmt)),21).a,f=a(z(e,Qmt),21).a,t.b=lt(Yt(z(e,nf))),t.d=is,_t=new H(Zt);_t.a<_t.c.c.length;)rt=a(G(_t),8),rt.j==(Ke(),gs)&&(Te=rt.n.b,t.d=y.Math.min(t.d,Te));for(t.d=y.Math.max(1,t.d),ce=Zt.c.length,t.c=dt(Gn,pi,22,ce,15,1),t.f=dt(Gn,pi,22,ce,15,1),t.e=dt(Os,Xo,22,ce,15,1),b=0,t.a=0,It=new H(Zt);It.a0||n.o==rf&&r0?(M=a(Ee(k.c.a,l-1),8),ce=Gv(t.b,k,M),W=k.k.b-k.d.d-(M.k.b+M.n.b+M.d.a+ce)):W=k.k.b-k.d.d,b=y.Math.min(W,b),l=1&&(ce-b>0&&O>=0?(th(M,M.i+Zt),eh(M,M.j+g*b)):ce-b<0&&R>=0&&(th(M,M.i+Zt*ce),eh(M,M.j+g)));return ga(t,HE,(c=a(xu(EA),10),new ja(c,a(cu(c,c.length),10),0))),new We(ae,v)}function qxe(t){var e,n,i,r,c,l,f,g,b,v,M,k,R,O,$,W;for($=new Dt,k=new H(t.d.b);k.ar.d.d+r.d.a?v.f.d=!0:(v.f.d=!0,v.f.a=!0))),i.b!=i.d.c&&(e=n);v&&(c=a(zi(t.f,l.d.g),57),e.bc.d.d+c.d.a?v.f.d=!0:(v.f.d=!0,v.f.a=!0))}for(f=Rn(Rs(R));Jn(f);)l=a(In(f),14),l.a.b!=0&&(e=a(mD(l.a),9),l.d.i==(Ht(),Tn)&&(W=new u4(e,new We(e.a,r.d.d),r,l),W.f.a=!0,W.a=l.d,$.c[$.c.length]=W),l.d.i==fi&&(W=new u4(e,new We(e.a,r.d.d+r.d.a),r,l),W.f.d=!0,W.a=l.d,$.c[$.c.length]=W))}return $}function Xxe(){Dit();function t(i){var r=this;this.dispatch=function(c){var l=c.data;switch(l.cmd){case"algorithms":var f=fut((we(),new Db(new vf(Ow.b))));i.postMessage({id:l.id,data:f});break;case"categories":var g=fut((we(),new Db(new vf(Ow.c))));i.postMessage({id:l.id,data:g});break;case"options":var b=fut((we(),new Db(new vf(Ow.d))));i.postMessage({id:l.id,data:b});break;case"register":uye(l.algorithms),i.postMessage({id:l.id});break;case"layout":Mbe(l.graph,l.options||{}),i.postMessage({id:l.id,data:l.graph});break}},this.saveDispatch=function(c){try{r.dispatch(c)}catch(l){delete l[vZ],i.postMessage({id:c.data.id,error:l.message})}}}function e(i){var r=this;this.dispatcher=new t({postMessage:function(c){r.onmessage({data:c})}}),this.postMessage=function(c){setTimeout(function(){r.dispatcher.saveDispatch({data:c})},0)}}if(typeof document===Hpt&&typeof self!==Hpt){var n=new t(self);self.onmessage=n.saveDispatch}else typeof m!==Hpt&&m.exports&&(Object.defineProperty(_,"__esModule",{value:!0}),m.exports={default:e,Worker:e})}function fOt(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t;if(rt=0,e.e.a==0)for(W=new H(t);W.a50?nt.c[nt.c.length]=r:r.k>0?rt.c[rt.c.length]=r:pt.c[pt.c.length]=r;if(rt.c.length==1&&nt.c.length==0&&(Or(nt,rt),rt.c=dt(un,te,1,0,5,1)),nt.c.length!=0&&Pp(BW(t.a),(mu(),rg))&&Pp(BW(t.a),(mu(),Yp))?lfe(t,nt):Or(rt,nt),rt.c.length==0||hfe(t,rt),pt.c.length!=0){if(n=OW(t.a),n.c!=0)for(v=new H(pt),g=(si(n),rst(new FEt(n).a));v.a1&&($=a(mat(g),129),jC(r,$,!0),rC(v),J4t(t.a,$))}for(k=pt.c.length,i=pve(t),R=new Dt,l=k/Urt(t.a).c|0,f=0;f3&&(Or(R,(mu(),mu(),t$t)),O-=4),O){case 3:Ut(R,TP(i));case 2:W=N7(TP(i));do W=N7(W);while(!Pp(BW(t.a),W));R.c[R.c.length]=W,W=eht(TP(i));do W=eht(W);while(!Pp(BW(t.a),W));R.c[R.c.length]=W;break;case 1:Ut(R,TP(i))}for(M=new H(R),b=new H(pt);M.a$&&(c&&(Bg(Gt,R),Bg(ce,Xt(v.b-1)),Ut(t.d,O),f.c=dt(un,te,1,0,5,1)),Pi=n.b,ls+=R+e,R=0,M=y.Math.max(M,n.b+n.c+Bn)),f.c[f.c.length]=g,lRt(g,Pi,ls),M=y.Math.max(M,Pi+Bn+n.c),R=y.Math.max(R,k),Pi+=Bn+e,O=g;if(Or(t.a,f),Ut(t.d,a(Ee(f,f.c.length-1),145)),M=y.Math.max(M,i),Me=ls+R+n.a,Me1&&(l=y.Math.min(l,y.Math.abs(a(H1(f.a,1),9).b-v.b)))));else for($=new H(e.i);$.a<$.c.c.length;)for(O=a(G($),11),g=new H(O.d);g.ar&&(c=k.a-r,l=qi,i.c=dt(un,te,1,0,5,1),r=k.a),k.a>=r&&(i.c[i.c.length]=f,f.a.b>1&&(l=y.Math.min(l,y.Math.abs(a(H1(f.a,f.a.b-2),9).b-k.b)))));if(i.c.length!=0&&c>e.n.a/2&&l>e.n.b/2){for(R=new Eo,ds(R,e),yr(R,(Ht(),Tn)),R.k.a=e.n.a/2,nt=new Eo,ds(nt,e),yr(nt,fi),nt.k.a=e.n.a/2,nt.k.b=e.n.b,g=new H(i);g.a=b.b?Hs(f,nt):Hs(f,R)):(b=a(lre(f.a),9),W=f.a.b==0?Yl(f.c):a(mD(f.a),9),W.b>=b.b?Ts(f,nt):Ts(f,R)),M=a(z(f,(qt(),Ro)),74),M&&j2(M,b,!0);e.k.a=r-e.n.a/2}}function t3e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It;for(f=new H(t.a.b);f.a0)if(i=M._b(),b=Tr(y.Math.floor((i+1)/2))-1,r=Tr(y.Math.ceil((i+1)/2))-1,e.o==rf)for(v=r;v>=b;v--)e.a[_t.o]==_t&&($=a(M.cd(v),48),O=a($.a,8),!kT(n,$.b)&&R>t.b.e[O.o]&&(e.a[O.o]=_t,e.g[_t.o]=e.g[O.o],e.a[_t.o]=e.g[_t.o],e.f[e.g[_t.o].o]=(me(),!!(lt(e.f[e.g[_t.o].o])&_t.j==(Ke(),Hr))),R=t.b.e[O.o]));else for(v=b;v<=r;v++)e.a[_t.o]==_t&&(nt=a(M.cd(v),48),W=a(nt.a,8),!kT(n,nt.b)&&R=48&&e<=57){for(i=e-48;r=48&&e<=57;)if(i=i*10+e-48,i<0)throw K(new ri(ai((Kn(),Xpt))))}else throw K(new ri(ai((Kn(),fUt))));if(n=i,e==44){if(r>=t.j)throw K(new ri(ai((Kn(),pUt))));if((e=bo(t.i,r++))>=48&&e<=57){for(n=e-48;r=48&&e<=57;)if(n=n*10+e-48,n<0)throw K(new ri(ai((Kn(),Xpt))));if(i>n)throw K(new ri(ai((Kn(),gUt))))}else n=-1}if(e!=125)throw K(new ri(ai((Kn(),dUt))));t.Ck(r)?(c=(Ai(),Ai(),++Ar,new Yb(9,c)),t.d=r+1):(c=(Ai(),Ai(),++Ar,new Yb(3,c)),t.d=r),c.nl(i),c.ml(n),Ci(t)}}return c}function e3e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te;return M=g_e(fa(t,(Ht(),kvt)),e),O=m_(fa(t,oI),e),_t=m_(fa(t,cI),e),ce=w7(fa(t,aI),e),k=w7(fa(t,sI),e),rt=m_(fa(t,Bx),e),$=m_(fa(t,dy),e),Gt=m_(fa(t,py),e),It=m_(fa(t,fy),e),ae=w7(fa(t,ab),e),nt=m_(fa(t,M0),e),pt=m_(fa(t,Cd),e),Zt=m_(fa(t,zf),e),Te=w7(fa(t,Ad),e),R=w7(fa(t,Td),e),W=m_(fa(t,YQ),e),n=r_(Y(Z(Os,1),Xo,22,15,[rt.a,ce.a,Gt.a,Te.a])),i=r_(Y(Z(Os,1),Xo,22,15,[O.a,M.a,_t.a,W.a])),r=nt.a,c=r_(Y(Z(Os,1),Xo,22,15,[$.a,k.a,It.a,R.a])),b=r_(Y(Z(Os,1),Xo,22,15,[rt.b,O.b,$.b,pt.b])),g=r_(Y(Z(Os,1),Xo,22,15,[ce.b,M.b,k.b,W.b])),v=ae.b,f=r_(Y(Z(Os,1),Xo,22,15,[Gt.b,_t.b,It.b,Zt.b])),L1(fa(t,kvt),n+r,b+v),L1(fa(t,YQ),n+r,b+v),L1(fa(t,oI),n+r,0),L1(fa(t,cI),n+r,b+v+g),L1(fa(t,aI),0,b+v),L1(fa(t,sI),n+r+i,b+v),L1(fa(t,dy),n+r+i,0),L1(fa(t,py),0,b+v+g),L1(fa(t,fy),n+r+i,b+v+g),L1(fa(t,ab),0,b),L1(fa(t,M0),n,0),L1(fa(t,zf),0,b+v+g),L1(fa(t,Td),n+r+i,0),l=new go,l.a=r_(Y(Z(Os,1),Xo,22,15,[n+i+r+c,ae.a,pt.a,Zt.a])),l.b=r_(Y(Z(Os,1),Xo,22,15,[b+g+v+f,nt.b,Te.b,R.b])),l}function Ic(){Ic=P,n3t(),kqt=ms.a,a(at(Et(ms.a),0),17),Cqt=ms.f,a(at(Et(ms.f),0),17),a(at(Et(ms.f),1),29),Aqt=ms.n,a(at(Et(ms.n),0),29),a(at(Et(ms.n),1),29),a(at(Et(ms.n),2),29),a(at(Et(ms.n),3),29),Fvt=ms.g,a(at(Et(ms.g),0),17),a(at(Et(ms.g),1),29),Tqt=ms.c,a(at(Et(ms.c),0),17),a(at(Et(ms.c),1),17),Uvt=ms.i,a(at(Et(ms.i),0),17),a(at(Et(ms.i),1),17),a(at(Et(ms.i),2),17),a(at(Et(ms.i),3),17),a(at(Et(ms.i),4),29),zvt=ms.j,a(at(Et(ms.j),0),17),Bvt=ms.d,a(at(Et(ms.d),0),17),a(at(Et(ms.d),1),17),a(at(Et(ms.d),2),17),a(at(Et(ms.d),3),17),a(at(Et(ms.d),4),29),a(at(Et(ms.d),5),29),a(at(Et(ms.d),6),29),a(at(Et(ms.d),7),29),Sqt=ms.b,a(at(Et(ms.b),0),29),a(at(Et(ms.b),1),29),jF=ms.e,a(at(Et(ms.e),0),29),a(at(Et(ms.e),1),29),a(at(Et(ms.e),2),29),a(at(Et(ms.e),3),29),a(at(Et(ms.e),4),17),a(at(Et(ms.e),5),17),a(at(Et(ms.e),6),17),a(at(Et(ms.e),7),17),a(at(Et(ms.e),8),17),a(at(Et(ms.e),9),17),a(at(Et(ms.e),10),29),pp=ms.k,a(at(Et(ms.k),0),29),a(at(Et(ms.k),1),29)}function n3e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me;for(ae=new Fr,Gt=new Fr,W=-1,g=new H(t);g.a=O&&(rt>O&&(R.c=dt(un,te,1,0,5,1),O=rt),R.c[R.c.length]=l);R.c.length!=0&&(k=a(Ee(R,$q(e,R.c.length)),125),Me.a.$b(k)!=null,k.p=$++,Jlt(k,ae,Gt),R.c=dt(un,te,1,0,5,1))}for(_t=t.c.length+1,f=new H(t);f.aTe.p&&(Th(n),Lc(Te.g,i),i.c>0&&(i.a=Te,Ut(Te.q,i),i.b=Zt,Ut(Zt.g,i)))}function i3e(t,e,n){var i,r,c,l,f,g,b,v,M;if(di(n,"Network simplex node placement",1),t.e=e,t.n=a(z(e,(Ft(),yw)),266),oye(t),L1e(t),qc(Yh(new gi(null,new Ei(t.e.b,16)),new Pk),new zH(t)),qc(wo(Yh(wo(Yh(new gi(null,new Ei(t.e.b,16)),new _v),new Yy),new w),new S),new UH(t)),lt(de(z(t.e,(qt(),tA))))&&(l=Ta(n,1),di(l,"Straight Edges Pre-Processing",1),U2e(t),Vn(l)),Nde(t.f),c=a(z(e,U6),21).a*t.f.a.c.length,HX(Bit(Fit(l$(t.f),c),!1),Ta(n,1)),t.d.a._b()!=0){for(l=Ta(n,1),di(l,"Flexible Where Space Processing",1),f=a(GW(nP(Vh(new gi(null,new Ei(t.f.a,16)),new f1),(En(new Tg),new wn))),21).a,g=a(GW(VCt(Vh(new gi(null,new Ei(t.f.a,16)),new FS),new pc)),21).a,b=g-f,v=hm(new Ng,t.f),M=hm(new Ng,t.f),ih($l(Wl(Gl(Vl(new cl,2e4),b),v),M)),qc(wo(wo(Sot(t.i),new k3),new L3),new M4t(f,v,b,M)),r=t.d.a.Xb().tc();r.hc();)i=a(r.ic(),189),i.g=1;HX(Bit(Fit(l$(t.f),c),!1),Ta(l,1)),Vn(l)}lt(de(z(e,tA)))&&(l=Ta(n,1),di(l,"Straight Edges Post-Processing",1),o0e(t),Vn(l)),_2e(t),t.e=null,t.f=null,t.i=null,t.c=null,uu(t.k),t.j=null,t.a=null,t.o=null,t.d.a.Pb(),Vn(n)}function dOt(t,e,n,i,r){var c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me;for($=new qu(e.b),_t=new qu(e.b),k=new qu(e.b),ce=new qu(e.b),W=new qu(e.b),Zt=qn(e,0);Zt.b!=Zt.d.c;)for(It=a(Yn(Zt),11),f=new H(It.f);f.a0,nt=It.f.c.length>0,b&&nt?k.c[k.c.length]=It:b?$.c[$.c.length]=It:nt&&(_t.c[_t.c.length]=It);for(O=new H($);O.a=0&&le(t.substr(f,2),"//")?(f+=2,g=Aq(t,f,kA,LA),i=t.substr(f,g-f),f=g):M!=null&&(f==t.length||t.charCodeAt(f)!=47)&&(l=!1,g=Grt(t,Ca(35),f),g==-1&&(g=t.length),i=t.substr(f,g-f),f=g);if(!n&&f0&&bo(v,v.length-1)==58&&(r=v,f=g)),f=k&&(_t>k&&(M.c=dt(un,te,1,0,5,1),k=_t),M.c[M.c.length]=W);M.c.length!=0&&(v=a(Ee(M,$q(e,M.c.length)),165),cC(Pi.a,v)!=null,v.d=R++,Klt(v,Me,ce),M.c=dt(un,te,1,0,5,1))}for(Gt=t.c.length+1,nt=new H(t);nt.aBn.d&&(Th(n),Lc(Bn.b,i),i.c>0&&(i.a=Bn,Ut(Bn.e,i),i.b=ae,Ut(ae.b,i)))}function c3e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me;for(rt=new Ov,pt=new Ov,v=_m(e,Dpt),i=new k4t(t,n,rt,pt),Gge(i.a,i.b,i.c,i.d,v),g=(Gt=rt.i,Gt||(rt.i=ct(rt.c,122)?new Nv(rt,a(rt.c,122)):ct(rt.c,115)?new g2(rt,a(rt.c,115)):new pM(rt,rt.c))),ce=g.tc();ce.hc();)for(Zt=a(ce.ic(),270),r=a(rr(rt,Zt),19),$=r.tc();$.hc();)if(O=$.ic(),_t=a(kp(t.d,O),270),_t)f=(!Zt.e&&(Zt.e=new pn(os,Zt,10,9)),Zt.e),ni(f,_t);else throw l=Jd(e,Df),k=GFt+O+WFt+l,R=k+xE,K(new xf(R));for(b=(It=pt.i,It||(pt.i=ct(pt.c,122)?new Nv(pt,a(pt.c,122)):ct(pt.c,115)?new g2(pt,a(pt.c,115)):new pM(pt,pt.c))),Te=b.tc();Te.hc();)for(ae=a(Te.ic(),270),c=a(rr(pt,ae),19),nt=c.tc();nt.hc();)if(W=nt.ic(),_t=a(kp(t.d,W),270),_t)M=(!ae.g&&(ae.g=new pn(os,ae,9,10)),ae.g),ni(M,_t);else throw l=Jd(e,Df),k=GFt+W+WFt+l,R=k+xE,K(new xf(R));!n.b&&(n.b=new pn(Si,n,4,7)),n.b.i!=0&&(!n.c&&(n.c=new pn(Si,n,5,8)),n.c.i!=0)&&(!n.b&&(n.b=new pn(Si,n,4,7)),n.b.i<=1&&(!n.c&&(n.c=new pn(Si,n,5,8)),n.c.i<=1))&&(!n.a&&(n.a=new Wt(os,n,6,6)),n.a).i==1&&(Me=a(at((!n.a&&(n.a=new Wt(os,n,6,6)),n.a),0),270),!Vq(Me)&&!qq(Me)&&(dat(Me,a(at((!n.b&&(n.b=new pn(Si,n,4,7)),n.b),0),97)),pat(Me,a(at((!n.c&&(n.c=new pn(Si,n,5,8)),n.c),0),97))))}function pOt(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce;for(t.d=new We(is,is),t.c=new We(Ps,Ps),k=e.tc();k.hc();)for(v=a(k.ic(),31),pt=new H(v.a);pt.a=It||!fhe(nt,i))&&(i=xAt(e,v)),Ks(nt,i),c=Rn(Rs(nt));Jn(c);)r=a(In(c),14),!t.a[r.o]&&($=r.c.g,--t.e[$.o],t.e[$.o]==0&&RM(JM(R,$)));for(b=v.c.length-1;b>=0;--b)Ut(e.b,(mi(b,v.c.length),a(v.c[b],26)));e.a.c=dt(un,te,1,0,5,1),Vn(n)}function l3e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi,ls,iu,wa,e1,Ou,fg,L0,uf,mh;if(Me=ckt(t,gkt(n),e),GL(Me,Jd(e,Df)),Bn=a(kp(t.g,q2(Gg(e,ZY))),35),k=Gg(e,"sourcePort"),i=null,k&&(i=q2(k)),Pi=a(kp(t.j,i),121),!Bn)throw f=FC(e),O="An edge must have a source node (edge id: '"+f,$=O+xE,K(new xf($));if(Pi&&!Rp(Tf(Pi),Bn))throw g=Jd(e,Df),W="The source port of an edge must be a port of the edge's source node (edge id: '"+g,nt=W+xE,K(new xf(nt));if(ce=(!Me.b&&(Me.b=new pn(Si,Me,4,7)),Me.b),Pi?c=Pi:c=Bn,ni(ce,c),ls=a(kp(t.g,q2(Gg(e,jpt))),35),R=Gg(e,"targetPort"),r=null,R&&(r=q2(R)),iu=a(kp(t.j,r),121),!ls)throw M=FC(e),rt="An edge must have a target node (edge id: '"+M,pt=rt+xE,K(new xf(pt));if(iu&&!Rp(Tf(iu),ls))throw b=Jd(e,Df),_t="The target port of an edge must be a port of the edge's target node (edge id: '"+b,It=_t+xE,K(new xf(It));if(ae=(!Me.c&&(Me.c=new pn(Si,Me,5,8)),Me.c),iu?l=iu:l=ls,ni(ae,l),(!Me.b&&(Me.b=new pn(Si,Me,4,7)),Me.b).i==0||(!Me.c&&(Me.c=new pn(Si,Me,5,8)),Me.c).i==0)throw v=Jd(e,Df),Gt=HFt+v,Zt=Gt+xE,K(new xf(Zt));return _7(e,Me),wa=C_(Me,!0,!0),e1=xL(e,"sourcePoint"),Ou=new uG(wa),Tfe(Ou.a,e1),fg=xL(e,"targetPoint"),L0=new pG(wa),Cfe(L0.a,fg),uf=_m(e,eK),mh=new gG(wa),k1e(mh.a,uf),Te=qV(t,e,Me),Te}function lZ(t,e){KX();var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn;if(Zt=t.e,R=t.d,r=t.a,Zt==0)switch(e){case 0:return"0";case 1:return lE;case 2:return"0.00";case 3:return"0.000";case 4:return"0.0000";case 5:return"0.00000";case 6:return"0.000000";default:return It=new om,e<0?It.a+="0E+":It.a+="0E",It.a+=-e,It.a}if(rt=R*10+1+7,pt=dt(nl,Pf,22,rt+1,15,1),n=rt,R==1)if(l=r[0],l<0){Bn=ns(l,uo);do O=Bn,Bn=dP(Bn,10),pt[--n]=48+or(Yg(O,Zg(Bn,10)))&qr;while(Pc(Bn,0)!=0)}else{Bn=l;do O=Bn,Bn=Bn/10|0,pt[--n]=48+(O-Bn*10)&qr;while(Bn!=0)}else{ae=dt(Gn,pi,22,R,15,1),Me=R,Aa(r,0,ae,0,R);t:for(;;){for(Gt=0,g=Me-1;g>=0;g--)Te=so(Yd(Gt,32),ns(ae[g],uo)),W=Jpe(Te),ae[g]=or(W),Gt=or(E1(W,32));nt=or(Gt),$=n;do pt[--n]=48+nt%10&qr;while((nt=nt/10|0)!=0&&n!=0);for(i=9-$+n,f=0;f0;f++)pt[--n]=48;for(v=Me-1;ae[v]==0;v--)if(v==0)break t;Me=v+1}for(;pt[n]==48;)++n}if(k=Zt<0,c=rt-n-e-1,e==0)return k&&(pt[--n]=45),ml(pt,n,rt-n);if(e>0&&c>=-6){if(c>=0){for(b=n+c,M=rt-1;M>=b;M--)pt[M+1]=pt[M];return pt[++b]=46,k&&(pt[--n]=45),ml(pt,n,rt-n+1)}for(v=2;v<-c+1;v++)pt[--n]=48;return pt[--n]=46,pt[--n]=48,k&&(pt[--n]=45),ml(pt,n,rt-n)}return ce=n+1,_t=new Bb,k&&(_t.a+="-"),rt-ce>=1?(S1(_t,pt[n]),_t.a+=".",_t.a+=ml(pt,n+1,rt-n-1)):_t.a+=ml(pt,n,rt-n),_t.a+="E",c>0&&(_t.a+="+"),_t.a+=""+c,_t.a}function h3e(t,e,n,i){var r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi,ls,iu,wa,e1,Ou,fg,L0,uf;if(pt=a(at((!t.b&&(t.b=new pn(Si,t,4,7)),t.b),0),97),It=pt.Yf(),Gt=pt.Zf(),_t=pt.Xf()/2,$=pt.Wf()/2,ct(pt,187)&&(rt=a(pt,121),It+=Tf(rt).i,It+=Tf(rt).i),It+=_t,Gt+=$,Me=a(at((!t.b&&(t.b=new pn(Si,t,4,7)),t.b),0),97),Pi=Me.Yf(),ls=Me.Zf(),Bn=Me.Xf()/2,Zt=Me.Wf()/2,ct(Me,187)&&(Te=a(Me,121),Pi+=Tf(Te).i,Pi+=Tf(Te).i),Pi+=Bn,ls+=Zt,(!t.a&&(t.a=new Wt(os,t,6,6)),t.a).i==0)f=(am(),b=new O3,b),ni((!t.a&&(t.a=new Wt(os,t,6,6)),t.a),f);else if((!t.a&&(t.a=new Wt(os,t,6,6)),t.a).i>1)for(O=new ZT((!t.a&&(t.a=new Wt(os,t,6,6)),t.a));O.e!=O.i._b();)qC(O);for(l=a(at((!t.a&&(t.a=new Wt(os,t,6,6)),t.a),0),270),W=Pi,Pi>It+_t?W=It+_t:PiGt+$?nt=Gt+$:lsIt-_t&&WGt-$&&ntPi+Bn?ce=Pi+Bn:Itls+Zt?ae=ls+Zt:GtPi-Bn&&cels-Zt&&aen&&(k=n-1),R=fg+pu(e,24)*VP*M-M/2,R<0?R=1:R>i&&(R=i-1),r=(am(),g=new N3,g),OV(r,k),BV(r,R),ni((!l.a&&(l.a=new Ss(sf,l,5)),l.a),r)}function gOt(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt;for(i=new Dt,f=new Dt,W=e/2,R=t._b(),r=a(t.cd(0),9),nt=a(t.cd(1),9),O=AX(r.a,r.b,nt.a,nt.b,W),Ut(i,(mi(0,O.c.length),a(O.c[0],9))),Ut(f,(mi(1,O.c.length),a(O.c[1],9))),b=2;b=0;g--)Xi(n,(mi(g,l.c.length),a(l.c[g],9)));return n}function f3e(t){var e,n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn;if(Zt=a(z(t,(qt(),Qi)),83),Zt!=(Ls(),dp)&&Zt!=ob){for(O=t.b,R=O.c.length,v=new qu((Ah(R+2,bZ),FL(so(so(5,R+2),(R+2)/10|0)))),$=new qu((Ah(R+2,bZ),FL(so(so(5,R+2),(R+2)/10|0)))),Ut(v,new vi),Ut(v,new vi),Ut($,new Dt),Ut($,new Dt),Gt=new Dt,e=0;eMe?M:Me;for(i=new H(ae.f);i.aMe?ce:Me}Ct(_t,aF,Xt(M)),Ct(_t,uF,Xt(ce))}for(nt=0,R=new H(e.b);R.a=t.j){t.a=-1,t.c=1;return}if(e=bo(t.i,t.d++),t.a=e,t.b==1){switch(e){case 92:if(i=10,t.d>=t.j)throw K(new ri(ai((Kn(),IO))));t.a=bo(t.i,t.d++);break;case 45:(t.e&512)==512&&t.d=t.j||bo(t.i,t.d)!=63)break;if(++t.d>=t.j)throw K(new ri(ai((Kn(),sK))));switch(e=bo(t.i,t.d++),e){case 58:i=13;break;case 61:i=14;break;case 33:i=15;break;case 91:i=19;break;case 62:i=18;break;case 60:if(t.d>=t.j)throw K(new ri(ai((Kn(),sK))));if(e=bo(t.i,t.d++),e==61)i=16;else if(e==33)i=17;else throw K(new ri(ai((Kn(),XFt))));break;case 35:for(;t.d=t.j)throw K(new ri(ai((Kn(),IO))));t.a=bo(t.i,t.d++);break;default:i=0}t.c=i}function mOt(t){var e,n,i,r,c,l,f,g,b;for(t.b=1,Ci(t),e=null,t.c==0&&t.a==94?(Ci(t),e=(Ai(),Ai(),++Ar,new Su(4)),jc(e,0,EE),f=(++Ar,new Su(4))):f=(Ai(),Ai(),++Ar,new Su(4)),r=!0;(b=t.c)!=1;){if(b==0&&t.a==93&&!r){e&&(f4(e,f),f=e);break}if(n=t.a,i=!1,b==10)switch(n){case 100:case 68:case 119:case 87:case 115:case 83:uw(f,rE(n)),i=!0;break;case 105:case 73:case 99:case 67:n=(uw(f,rE(n)),-1),i=!0;break;case 112:case 80:if(g=Plt(t,n),!g)throw K(new ri(ai((Kn(),oK))));uw(f,g),i=!0;break;default:n=hht(t)}else if(b==24&&!r){if(e&&(f4(e,f),f=e),c=mOt(t),f4(f,c),t.c!=0||t.a!=93)throw K(new ri(ai((Kn(),rUt))));break}if(Ci(t),!i){if(b==0){if(n==91)throw K(new ri(ai((Kn(),Vpt))));if(n==93)throw K(new ri(ai((Kn(),qpt))));if(n==45&&!r&&t.a!=93)throw K(new ri(ai((Kn(),cK))))}if(t.c!=0||t.a!=45||n==45&&r)jc(f,n,n);else{if(Ci(t),(b=t.c)==1)throw K(new ri(ai((Kn(),RO))));if(b==0&&t.a==93)jc(f,n,n),jc(f,45,45);else{if(b==0&&t.a==93||b==24)throw K(new ri(ai((Kn(),cK))));if(l=t.a,b==0){if(l==91)throw K(new ri(ai((Kn(),Vpt))));if(l==93)throw K(new ri(ai((Kn(),qpt))));if(l==45)throw K(new ri(ai((Kn(),cK))))}else b==10&&(l=hht(t));if(Ci(t),n>l)throw K(new ri(ai((Kn(),cUt))));jc(f,n,l)}}}r=!1}if(t.c==1)throw K(new ri(ai((Kn(),RO))));return E_(f),h4(f),t.b=0,Ci(t),f}function p3e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi,ls,iu,wa;for(di(n,"Greedy cycle removal",1),rt=e.a,wa=rt.c.length,t.a=dt(Gn,pi,22,wa,15,1),t.c=dt(Gn,pi,22,wa,15,1),t.b=dt(Gn,pi,22,wa,15,1),g=0,W=new H(rt);W.a0?Te+1:1);for(c=new H(It.f);c.a0?Te+1:1)}t.c[g]==0?Xi(t.d,O):t.a[g]==0&&Xi(t.e,O),++g}for(R=-1,k=1,v=new Dt,Me=a(z(e,(Ft(),NE)),214);wa>0;){for(;t.d.b!=0;)Pi=a(g$(t.d),8),t.b[Pi.o]=R--,Sht(t,Pi),--wa;for(;t.e.b!=0;)ls=a(g$(t.e),8),t.b[ls.o]=k++,Sht(t,ls),--wa;if(wa>0){for(M=Vs,nt=new H(rt);nt.a=M&&(pt>M&&(v.c=dt(un,te,1,0,5,1),M=pt),v.c[v.c.length]=O));b=a(Ee(v,$q(Me,v.c.length)),8),t.b[b.o]=k++,Sht(t,b),--wa}}for(Bn=rt.c.length+1,g=0;gt.b[iu]&&(X1(i,!0),Ct(e,zB,(me(),me(),!0)));t.a=null,t.c=null,t.b=null,ld(t.e),ld(t.d),Vn(n)}function g3e(t){Xn(t.c,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#decimal"])),Xn(t.d,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#integer"])),Xn(t.e,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#boolean"])),Xn(t.f,ui,Y(Z(At,1),wt,2,6,[Ns,"EBoolean",Ti,"EBoolean:Object"])),Xn(t.i,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#byte"])),Xn(t.g,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#hexBinary"])),Xn(t.j,ui,Y(Z(At,1),wt,2,6,[Ns,"EByte",Ti,"EByte:Object"])),Xn(t.n,ui,Y(Z(At,1),wt,2,6,[Ns,"EChar",Ti,"EChar:Object"])),Xn(t.t,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#double"])),Xn(t.u,ui,Y(Z(At,1),wt,2,6,[Ns,"EDouble",Ti,"EDouble:Object"])),Xn(t.F,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#float"])),Xn(t.G,ui,Y(Z(At,1),wt,2,6,[Ns,"EFloat",Ti,"EFloat:Object"])),Xn(t.I,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#int"])),Xn(t.J,ui,Y(Z(At,1),wt,2,6,[Ns,"EInt",Ti,"EInt:Object"])),Xn(t.N,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#long"])),Xn(t.O,ui,Y(Z(At,1),wt,2,6,[Ns,"ELong",Ti,"ELong:Object"])),Xn(t.Z,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#short"])),Xn(t.$,ui,Y(Z(At,1),wt,2,6,[Ns,"EShort",Ti,"EShort:Object"])),Xn(t._,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#string"]))}function Jht(t,e,n,i){var r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi;if(xNt(e),g=a(at((!e.b&&(e.b=new pn(Si,e,4,7)),e.b),0),97),v=a(at((!e.c&&(e.c=new pn(Si,e,5,8)),e.c),0),97),f=zc(g),b=zc(v),l=(!e.a&&(e.a=new Wt(os,e,6,6)),e.a).i==0?null:a(at((!e.a&&(e.a=new Wt(os,e,6,6)),e.a),0),270),Zt=a(zi(t.a,f),8),Me=a(zi(t.a,b),8),ce=null,Bn=null,ct(g,187)&&(Gt=a(zi(t.a,g),279),ct(Gt,11)?ce=a(Gt,11):ct(Gt,8)&&(Zt=a(Gt,8),ce=a(Ee(Zt.i,0),11))),ct(v,187)&&(Te=a(zi(t.a,v),279),ct(Te,11)?Bn=a(Te,11):ct(Te,8)&&(Me=a(Te,8),Bn=a(Ee(Me.i,0),11))),!Zt||!Me)return null;for($=new Np,Uo($,e),Ct($,(Ft(),li),e),Ct($,(qt(),Ro),null),R=a(z(i,Qc),19),Zt==Me&&R.nc((So(),A6)),ce||(It=(Fo(),ba),ae=null,l&&Gd(a(z(Zt,Qi),83))&&(ae=new We(l.j,l.k),vkt(ae,rN(e)),jkt(ae,n),_C(b,f)&&(It=Ga,sr(ae,Zt.k))),ce=a7t(Zt,ae,It,i)),Bn||(It=(Fo(),Ga),Pi=null,l&&Gd(a(z(Me,Qi),83))&&(Pi=new We(l.b,l.c),vkt(Pi,rN(e)),jkt(Pi,n)),Bn=a7t(Me,Pi,It,Mc(Me))),Hs($,ce),Ts($,Bn),k=new $n((!e.n&&(e.n=new Wt(ic,e,1,7)),e.n));k.e!=k.i._b();)if(M=a(ci(k),137),!lt(de(cn(M,v0)))&&M.a)switch(W=_q(M),Ut($.b,W),a(z(W,ng),226).g){case 2:case 3:R.nc((So(),RE));break;case 1:case 0:R.nc((So(),IE)),Ct(W,ng,(ip(),wA))}if(c=a(z(i,OE),317),nt=a(z(i,JB),292),r=c==(I2(),S6)||nt==(WC(),iQ),l&&(!l.a&&(l.a=new Ss(sf,l,5)),l.a).i!=0&&r){for(rt=bP(l),O=new Va,_t=qn(rt,0);_t.b!=_t.d.c;)pt=a(Yn(_t),9),Xi(O,new Oo(pt));Ct($,hmt,O)}return $}function Qht(t,e,n,i,r,c){var l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi;for(f=a(Ee(t.d.c.b,i),26),Me=new $r,R=new $r,k=0;kn&&(ce=R.a.Zb(nt,R),ce==null);for(Bn=new $r,O=new $r,pt=Me.a.Xb().tc();pt.hc();)for(nt=a(pt.ic(),8),l=e==1?br(nt):Rs(nt),b=(Ao(),new $d(id(Zd(l.a,new X))));Jn(b);)g=a(In(b),14),ql(nt.c)!=ql(g.d.g.c)&&Ir(Bn,g.d.g);for(_t=R.a.Xb().tc();_t.hc();)for(nt=a(_t.ic(),8),l=e==1?br(nt):Rs(nt),b=(Ao(),new $d(id(Zd(l.a,new X))));Jn(b);)g=a(In(b),14),ql(nt.c)!=ql(g.d.g.c)&&Ir(O,g.d.g);for(Qjt&&rd(),Zt=a(Ee(t.d.c.b,i+(e==1?1:-1)),26),$=Vs,W=qi,M=0;MM?$:M:O.a.Qb(nt)&&(W=WM&&(Me=0,Bn+=v+Zt,v=0),Bbe(It,l,Me,Bn),e=y.Math.max(e,Me+Gt.a),v=y.Math.max(v,Gt.b),Me+=Gt.a+Zt;for(_t=new vi,n=new vi,ae=new H(t);ae.a=2){for(k=!0,rt=(mi(1,M.c.length),a(M.c[1],26)),$=new H(l.a);$.a<$.c.c.length;){if(R=a(G($),8),zt(z(R,(qt(),la)))===zt((bl(),Sx))){k=!1;break}for(r=Rn(br(R));Jn(r);)if(i=a(In(r),14),i.d.g.c==rt){k=!1;break}if(!k)break}if(k){for(nt=a(xo(l.a,dt(Cl,Ih,8,l.a.c.length,0,1)),123),O=0,W=nt.length;O=2){for(k=!0,pt=a(Ee(M,M.c.length-2),26),$=new H(g.a);$.a<$.c.c.length;){if(R=a(G($),8),zt(z(R,(qt(),la)))===zt((bl(),Sx))){k=!1;break}for(r=Rn(Rs(R));Jn(r);)if(i=a(In(r),14),i.c.g.c==pt){k=!1;break}if(!k)break}if(k){for(nt=a(xo(g.a,dt(Cl,Ih,8,g.a.c.length,0,1)),123),O=0,W=nt.length;OkX(c))&&(M=c);for(!M&&(M=(mi(0,W.c.length),a(W.c[0],164))),$=new H(e.b);$.a<$.c.c.length;)for(O=a(G($),26),_t=new H(O.a);_t.a<_t.c.c.length;)pt=a(G(_t),8),pt.k.b=lt(M.p[pt.o])+lt(M.d[pt.o]);for(t.a&&(rd(),""+Y9t(M),""+n0e(M)),l=new H(W);l.a0?(O=(It+1)*t.d,O=0&&(bh+=(It+2)*t.d)}pt=Te,f=g}while(Te);for(r=new H(t.j);r.a=-1900?1:0,n>=4?Ii(t,Y(Z(At,1),wt,2,6,[ROt,DOt])[f]):Ii(t,Y(Z(At,1),wt,2,6,["BC","AD"])[f]);break;case 121:lde(t,n,i);break;case 77:Ave(t,n,i);break;case 107:g=r.q.getHours(),g==0?dd(t,24,n):dd(t,g,n);break;case 83:bbe(t,n,r);break;case 69:v=i.q.getDay(),n==5?Ii(t,Y(Z(At,1),wt,2,6,["S","M","T","W","T","F","S"])[v]):n==4?Ii(t,Y(Z(At,1),wt,2,6,[IZ,RZ,DZ,NZ,OZ,BZ,FZ])[v]):Ii(t,Y(Z(At,1),wt,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[v]);break;case 97:r.q.getHours()>=12&&r.q.getHours()<24?Ii(t,Y(Z(At,1),wt,2,6,["AM","PM"])[1]):Ii(t,Y(Z(At,1),wt,2,6,["AM","PM"])[0]);break;case 104:M=r.q.getHours()%12,M==0?dd(t,12,n):dd(t,M,n);break;case 75:k=r.q.getHours()%12,dd(t,k,n);break;case 72:R=r.q.getHours(),dd(t,R,n);break;case 99:O=i.q.getDay(),n==5?Ii(t,Y(Z(At,1),wt,2,6,["S","M","T","W","T","F","S"])[O]):n==4?Ii(t,Y(Z(At,1),wt,2,6,[IZ,RZ,DZ,NZ,OZ,BZ,FZ])[O]):n==3?Ii(t,Y(Z(At,1),wt,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[O]):dd(t,O,1);break;case 76:$=i.q.getMonth(),n==5?Ii(t,Y(Z(At,1),wt,2,6,["J","F","M","A","M","J","J","A","S","O","N","D"])[$]):n==4?Ii(t,Y(Z(At,1),wt,2,6,[yZ,xZ,MZ,EZ,nx,SZ,TZ,CZ,AZ,kZ,LZ,PZ])[$]):n==3?Ii(t,Y(Z(At,1),wt,2,6,["Jan","Feb","Mar","Apr",nx,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"])[$]):dd(t,$+1,n);break;case 81:W=i.q.getMonth()/3|0,n<4?Ii(t,Y(Z(At,1),wt,2,6,["Q1","Q2","Q3","Q4"])[W]):Ii(t,Y(Z(At,1),wt,2,6,["1st quarter","2nd quarter","3rd quarter","4th quarter"])[W]);break;case 100:nt=i.q.getDate(),dd(t,nt,n);break;case 109:b=r.q.getMinutes(),dd(t,b,n);break;case 115:l=r.q.getSeconds(),dd(t,l,n);break;case 122:n<4?Ii(t,c.c[0]):Ii(t,c.c[1]);break;case 118:Ii(t,c.b);break;case 90:n<3?Ii(t,P0e(c)):n==3?Ii(t,N0e(c)):Ii(t,O0e(c.a));break;default:return!1}return!0}function eft(){eft=P;var t;wmt=(t=a(xu(vJ),10),new ja(t,a(cu(t,t.length),10),0)),LHt=new bn(qft,wmt),$Ht=new bn(Xft,(me(),me(),!1)),Smt=(dN(),RJ),ZHt=new bn(mO,Smt),uGt=new bn(Zft,!1),lGt=new bn(Yft,!0),Xt(1),LGt=new bn(Kft,Xt(7)),PGt=new bn(Jft,!1),MGt=new bn(Qft,!1),ymt=(BN(),yJ),OHt=new bn(fY,ymt),Amt=(E7(),tQ),cGt=new bn(n6,Amt),Tmt=(bl(),Sx),tGt=new bn(tdt,Tmt),kmt=(U2(),V6),aGt=new bn(edt,kmt),Xt(-1),eGt=new bn(dY,Xt(4)),Xt(-1),iGt=new bn(pY,Xt(2)),Cmt=(T_(),iF),oGt=new bn(gY,Cmt),Xt(0),sGt=new bn(mY,Xt(0)),JHt=new bn(bY,Xt(qi)),_mt=(I2(),T6),NHt=new bn(wY,_mt),RHt=new bn(ndt,.1),DHt=new bn(idt,!1),Xt(0),PHt=new bn(rdt,Xt(40)),vmt=(BM(),IJ),IHt=new bn(sdt,vmt),Rmt=(WC(),z6),xGt=new bn(mE,Rmt),gGt=new kr(vY),Lmt=(RL(),lF),hGt=new bn(_Y,Lmt),Pmt=(mP(),RB),dGt=new bn(yY,Pmt),new q3,bGt=new bn(xY,.3),vGt=new kr(MY),Imt=(nw(),nF),_Gt=new bn(odt,Imt),Emt=(s7(),sQ),UHt=new bn(EY,Emt),GHt=new bn(bO,!0),jHt=new bn(wO,.4),AGt=new bn(cdt,10),CGt=new bn(adt,10),kGt=new bn(udt,20),Xt(0),EGt=new bn(ldt,Xt(0)),Xt(0),SGt=new bn(hdt,Xt(0)),Xt(0),TGt=new bn(fdt,Xt(0)),CHt=new bn(SY,!1),bmt=(QM(),V4),kHt=new bn(ddt,bmt),mmt=(vN(),wJ),AHt=new bn(pdt,mmt),qHt=new bn(vO,!1),Xt(0),VHt=new bn(TY,Xt(16)),Xt(0),XHt=new bn(CY,Xt(5)),Bmt=(WN(),cQ),qGt=new bn(x4,Bmt),IGt=new bn(gdt,10),RGt=new bn(mdt,1),Nmt=(IN(),PB),FGt=new bn(_O,Nmt),DGt=new kr(AY),Dmt=Xt(1),Xt(0),OGt=new bn(kY,Dmt),Omt=(NN(),oQ),$Gt=new bn(LY,Omt),jGt=new bn(yO,!0),UGt=new bn(xO,2),GGt=new bn(PY,!0),Mmt=(C7(),IB),FHt=new bn(bdt,Mmt),xmt=(XC(),mJ),BHt=new bn(wdt,xmt),KHt=xJ,YHt=S6,nGt=eF,rGt=eF,QHt=QJ,mGt=j6,fGt=z6,pGt=z6,wGt=rQ,yGt=j6,zHt=(gd(),rb),WHt=rb,HHt=rb,NGt=_J,BGt=PB,VGt=aQ,HGt=q6,zGt=q6,WGt=q6}function dr(){dr=P;var t,e;Nwt=new kr(rFt),Owt=(md(),LQ),fVt=new bn(Odt,Owt),new q3,jE=new bn(hE,null),dVt=new kr(xpt),RQ=new bn(RY,(me(),me(),!1)),Fwt=(Js(),Ff),gA=new bn(NY,Fwt),jwt=(gd(),VQ),zwt=new bn(i6,jwt),bVt=new bn(_pt,!1),Wwt=(Kg(),RF),ay=new bn(Bdt,Wwt),Jwt=new x2(12),uy=new bn(ox,Jwt),NQ=new bn(dO,!1),ivt=(Ls(),ob),iI=new bn(aY,ivt),Ix=new kr(SO),LF=new kr(YP),HQ=new kr(fO),GQ=new kr(KP),$wt=new Va,Px=new bn(Xdt,$wt),gVt=new bn(Jdt,!1),wVt=new bn(Qdt,!1),new kr(sFt),Vwt=new a2,CF=new bn(ipt,Vwt),OQ=new bn(Ddt,!1),new q3,MVt=new bn(oFt,1),new bn(cFt,!0),Xt(0),new bn(aFt,Xt(100)),new bn(uFt,!1),Xt(0),new bn(lFt,Xt(4e3)),Xt(0),new bn(hFt,Xt(400)),new bn(fFt,!1),new bn(dFt,!0),new bn(pFt,!1),Bwt=(a7(),JQ),pVt=new bn(ypt,Bwt),ovt=new bn(nY,12),EVt=new bn(Tdt,10),cvt=new bn(cY,2),SVt=new bn(Cdt,10),avt=new bn(Adt,0),PF=new bn(Ldt,5),uvt=new bn(kdt,1),ly=new bn(dE,20),fvt=new bn(Pdt,10),WQ=new kr(Idt),hvt=new GEt,lvt=new bn(rpt,hvt),yVt=new kr(npt),Qwt=!1,_Vt=new bn(ept,Qwt),qwt=new x2(5),vVt=new bn(gFt,qwt),Xwt=(r0(),e=a(xu(to),10),new ja(e,a(cu(e,e.length),10),0)),AF=new bn(zdt,Xwt),evt=(G1(),sb),tvt=new bn(Gdt,evt),FQ=new kr(Wdt),UQ=new kr($dt),zQ=new kr(Vdt),BQ=new kr(qdt),Zwt=(t=a(xu(EA),10),new ja(t,a(cu(t,t.length),10),0)),HE=new bn(MO,Zwt),Kwt=qe((ma(),WE)),kF=new bn(DY,Kwt),Ywt=new We(0,0),nI=new bn(EO,Ywt),Uwt=(ip(),IF),eI=new bn(Zdt,Uwt),mVt=new bn(Ydt,!1),new kr(mFt),Xt(1),new bn(bFt,null),nvt=new kr(tpt),xVt=new kr(Kdt),svt=(Ht(),Wc),mA=new bn(Ndt,svt),nu=new kr(Rdt),rvt=(Kh(),hy),jQ=new bn(jdt,rvt),rI=new bn(Hdt,!1),TF=new bn(Fdt,!1),DQ=new bn(Udt,!1),Hwt=new bn(iY,1),Gwt=(S7(),XQ),new bn(wFt,Gwt)}function y3e(t){t.gb||(t.gb=!0,t.b=cc(t,0),Cr(t.b,18),nr(t.b,19),t.a=cc(t,1),Cr(t.a,1),nr(t.a,2),nr(t.a,3),nr(t.a,4),nr(t.a,5),t.o=cc(t,2),Cr(t.o,8),Cr(t.o,9),nr(t.o,10),nr(t.o,11),nr(t.o,12),nr(t.o,13),nr(t.o,14),nr(t.o,15),nr(t.o,16),nr(t.o,17),nr(t.o,18),nr(t.o,19),nr(t.o,20),nr(t.o,21),nr(t.o,22),nr(t.o,23),ko(t.o),ko(t.o),ko(t.o),ko(t.o),ko(t.o),ko(t.o),ko(t.o),ko(t.o),ko(t.o),ko(t.o),t.p=cc(t,3),Cr(t.p,2),Cr(t.p,3),Cr(t.p,4),Cr(t.p,5),nr(t.p,6),nr(t.p,7),ko(t.p),ko(t.p),t.q=cc(t,4),Cr(t.q,8),t.v=cc(t,5),nr(t.v,9),ko(t.v),ko(t.v),ko(t.v),t.w=cc(t,6),Cr(t.w,2),Cr(t.w,3),Cr(t.w,4),nr(t.w,5),t.B=cc(t,7),nr(t.B,1),ko(t.B),ko(t.B),ko(t.B),t.Q=cc(t,8),nr(t.Q,0),ko(t.Q),t.R=cc(t,9),Cr(t.R,1),t.S=cc(t,10),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),t.T=cc(t,11),nr(t.T,10),nr(t.T,11),nr(t.T,12),nr(t.T,13),nr(t.T,14),ko(t.T),ko(t.T),t.U=cc(t,12),Cr(t.U,2),Cr(t.U,3),nr(t.U,4),nr(t.U,5),nr(t.U,6),nr(t.U,7),ko(t.U),t.V=cc(t,13),nr(t.V,10),t.W=cc(t,14),Cr(t.W,18),Cr(t.W,19),Cr(t.W,20),nr(t.W,21),nr(t.W,22),nr(t.W,23),t.bb=cc(t,15),Cr(t.bb,10),Cr(t.bb,11),Cr(t.bb,12),Cr(t.bb,13),Cr(t.bb,14),Cr(t.bb,15),Cr(t.bb,16),nr(t.bb,17),ko(t.bb),ko(t.bb),t.eb=cc(t,16),Cr(t.eb,2),Cr(t.eb,3),Cr(t.eb,4),Cr(t.eb,5),Cr(t.eb,6),Cr(t.eb,7),nr(t.eb,8),nr(t.eb,9),t.ab=cc(t,17),Cr(t.ab,0),Cr(t.ab,1),t.H=cc(t,18),nr(t.H,0),nr(t.H,1),nr(t.H,2),nr(t.H,3),nr(t.H,4),nr(t.H,5),ko(t.H),t.db=cc(t,19),nr(t.db,2),t.c=yi(t,20),t.d=yi(t,21),t.e=yi(t,22),t.f=yi(t,23),t.i=yi(t,24),t.g=yi(t,25),t.j=yi(t,26),t.k=yi(t,27),t.n=yi(t,28),t.r=yi(t,29),t.s=yi(t,30),t.t=yi(t,31),t.u=yi(t,32),t.fb=yi(t,33),t.A=yi(t,34),t.C=yi(t,35),t.D=yi(t,36),t.F=yi(t,37),t.G=yi(t,38),t.I=yi(t,39),t.J=yi(t,40),t.L=yi(t,41),t.M=yi(t,42),t.N=yi(t,43),t.O=yi(t,44),t.P=yi(t,45),t.X=yi(t,46),t.Y=yi(t,47),t.Z=yi(t,48),t.$=yi(t,49),t._=yi(t,50),t.cb=yi(t,51),t.K=yi(t,52))}function Ft(){Ft=P;var t,e;li=new kr(Nft),amt=new kr("coordinateOrigin"),UJ=new kr("processors"),cmt=new es("compoundNode",(me(),me(),!1)),P6=new es("insideConnections",!1),xd=new kr("nestedLGraph"),tg=new kr("parentLNode"),hmt=new kr("originalBendpoints"),fmt=new kr("originalDummyNodePosition"),dmt=new kr("originalLabelEdge"),WB=new kr("representedLabels"),jB=new kr("endLabels"),xx=new es("labelSide",(Cu(),fI)),ey=new es("maxEdgeThickness",0),eg=new es("reversed",!1),NE=new kr(Oft),Iu=new es("longEdgeSource",null),Ru=new es("longEdgeTarget",null),Mx=new es("longEdgeHasLabelDummies",!1),I6=new es("longEdgeBeforeLabelDummy",!1),NJ=new es("edgeConstraint",(l_(),MJ)),DE=new kr("inLayerLayoutUnit"),w0=new es("inLayerConstraint",(tp(),k6)),yx=new es("inLayerSuccessorConstraint",new Dt),Du=new kr("portDummy"),UB=new es("crossingHint",Xt(0)),Qc=new es("graphProperties",(e=a(xu(LJ),10),new ja(e,a(cu(e,e.length),10),0))),wc=new es("externalPortSide",(Ht(),Wc)),lmt=new es("externalPortSize",new go),OJ=new kr("externalPortReplacedDummies"),HB=new kr("externalPortReplacedDummy"),_x=new es("externalPortConnections",(t=a(xu(Ia),10),new ja(t,a(cu(t,t.length),10),0))),Ym=new es(LBt,0),smt=new kr("barycenterAssociates"),Ex=new kr("TopSideComments"),vx=new kr("BottomSideComments"),FB=new kr("CommentConnectionPort"),BJ=new es("inputCollect",!1),FJ=new es("outputCollect",!1),zB=new es("cyclic",!1),L6=new es("bigNodeOriginalSize",new Rb(0)),_w=new es("bigNodeInitial",!1),omt=new es("org.eclipse.elk.alg.layered.bigNodeLabels",new Dt),DJ=new es("org.eclipse.elk.alg.layered.postProcess",null),umt=new kr("crossHierarchyMap"),HJ=new kr("targetOffset"),SHt=new es("splineLabelSize",new go),R6=new es("splineLoopSide",(mu(),Lx)),jJ=new es("splineSelfLoopComponents",new Dt),pmt=new es("splineSelfLoopMargins",new a2),yw=new kr("spacings"),GB=new es("partitionConstraint",!1),Zm=new kr("breakingPoint.info"),X4=new kr("splines.route.start"),zJ=new kr("splines.edgeChain")}function Po(){Po=P,m0t=new Ur("LEFT_DIR_PREPROCESSOR",0),n0t=new Ur("DOWN_DIR_PREPROCESSOR",1),L0t=new Ur("UP_DIR_PREPROCESSOR",2),t0t=new Ur("COMMENT_PREPROCESSOR",3),G4=new Ur("EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER",4),T0t=new Ur("SPLINE_SELF_LOOP_PREPROCESSOR",5),aJ=new Ur("INTERACTIVE_EXTERNAL_PORT_POSITIONER",6),y0t=new Ur("PARTITION_PREPROCESSOR",7),oJ=new Ur("BIG_NODES_PREPROCESSOR",8),yB=new Ur("LABEL_DUMMY_INSERTER",9),u0t=new Ur("HIGH_DEGREE_NODE_LAYER_PROCESSOR",10),_0t=new Ur("PARTITION_POSTPROCESSOR",11),w0t=new Ur("NODE_PROMOTION",12),PE=new Ur("LAYER_CONSTRAINT_PROCESSOR",13),o0t=new Ur("HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR",14),sJ=new Ur("BIG_NODES_INTERMEDIATEPROCESSOR",15),M0t=new Ur("SEMI_INTERACTIVE_CROSSMIN_PROCESSOR",16),Zgt=new Ur("BREAKING_POINT_INSERTER",17),hJ=new Ur("LONG_EDGE_SPLITTER",18),dJ=new Ur("PORT_SIDE_PROCESSOR",19),_B=new Ur("INVERTED_PORT_PROCESSOR",20),x0t=new Ur("SELF_LOOP_PROCESSOR",21),fJ=new Ur("PORT_LIST_SORTER",22),SB=new Ur("NORTH_SOUTH_PORT_PREPROCESSOR",23),Ygt=new Ur("BREAKING_POINT_PROCESSOR",24),v0t=new Ur(EBt,25),A0t=new Ur(SBt,26),S0t=new Ur("SPLINE_SELF_LOOP_POSITIONER",27),E0t=new Ur("SINGLE_EDGE_GRAPH_WRAPPER",28),uJ=new Ur("IN_LAYER_CONSTRAINT_PROCESSOR",29),cJ=new Ur("BIG_NODES_SPLITTER",30),i0t=new Ur("END_NODE_PORT_LABEL_MANAGEMENT_PROCESSOR",31),d0t=new Ur("LABEL_AND_NODE_SIZE_PROCESSOR",32),C0t=new Ur("SPLINE_SELF_LOOP_ROUTER",33),b0t=new Ur("NODE_MARGIN_CALCULATOR",34),vB=new Ur("END_LABEL_PREPROCESSOR",35),MB=new Ur("LABEL_DUMMY_SWITCHER",36),Jgt=new Ur("CENTER_LABEL_MANAGEMENT_PROCESSOR",37),LE=new Ur("LABEL_SIDE_SELECTOR",38),h0t=new Ur("HYPEREDGE_DUMMY_MERGER",39),c0t=new Ur("HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR",40),p0t=new Ur("LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR",41),W4=new Ur("HIERARCHICAL_PORT_POSITION_PROCESSOR",42),E6=new Ur("BIG_NODES_POSTPROCESSOR",43),Qgt=new Ur("COMMENT_POSTPROCESSOR",44),f0t=new Ur("HYPERNODE_PROCESSOR",45),a0t=new Ur("HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER",46),lJ=new Ur("LONG_EDGE_JOINER",47),Kgt=new Ur("BREAKING_POINT_REMOVER",48),EB=new Ur("NORTH_SOUTH_PORT_POSTPROCESSOR",49),l0t=new Ur("HORIZONTAL_COMPACTOR",50),xB=new Ur("LABEL_DUMMY_REMOVER",51),r0t=new Ur("FINAL_SPLINE_BENDPOINTS_CALCULATOR",52),TB=new Ur("REVERSED_EDGE_RESTORER",53),wB=new Ur("END_LABEL_POSTPROCESSOR",54),s0t=new Ur("HIERARCHICAL_NODE_RESIZER",55),g0t=new Ur("LEFT_DIR_POSTPROCESSOR",56),e0t=new Ur("DOWN_DIR_POSTPROCESSOR",57),k0t=new Ur("UP_DIR_POSTPROCESSOR",58)}function x3e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi,ls,iu,wa,e1,Ou,fg,L0,uf,mh,bh,JE,CI,AI,Wx,wtt,NA,OXt,L_t,gb,OA,vtt,$x,BA,Ww,FA,_tt,BXt;for(L_t=0,Bn=0,iu=e.length;Bn0&&(t.a[mh.o]=L_t++)}for(BA=0,Pi=0,wa=n.length;Pi0;){for(mh=(Hn(AI.b>0),a(AI.a.cd(AI.c=--AI.b),11)),CI=0,f=new H(mh.d);f.a0&&(mh.i==(Ht(),Tn)?(t.a[mh.o]=BA,++BA):(t.a[mh.o]=BA+e1+fg,++fg))}BA+=fg}for(JE=(ts(),new vi),R=new qa,Me=0,ls=e.length;Meb.b&&(b.b=Wx)):mh.g.c==OXt&&(Wxb.c&&(b.c=Wx));for(NL(O,0,O.length,null),$x=dt(Gn,pi,22,O.length,15,1),i=dt(Gn,pi,22,BA+1,15,1),W=0;W0;)Gt%2>0&&(r+=_tt[Gt+1]),Gt=(Gt-1)/2|0,++_tt[Gt];for(ce=dt(AWt,te,336,O.length*2,0,1),pt=0;pt'?":le(XFt,t)?"'(?<' or '(? toIndex: ",vft=", toIndex: ",$Ot="org.eclipse.elk.alg.common.compaction",VOt="Scanline/EventHandler",vd="org.eclipse.elk.alg.common.compaction.oned",qOt="CNode belongs to another CGroup.",XOt="ISpacingsHandler/1",qZ="The ",XZ=" instance has been finished already.",ZOt="The direction ",YOt=" is not supported by the CGraph instance.",KOt="OneDimensionalCompactor",JOt="OneDimensionalCompactor/lambda$0$Type",QOt="Quadruplet",tBt="ScanlineConstraintCalculator",eBt="ScanlineConstraintCalculator/ConstraintsScanlineHandler",nBt="ScanlineConstraintCalculator/ConstraintsScanlineHandler/lambda$0$Type",iBt="ScanlineConstraintCalculator/Timestamp",rBt="ScanlineConstraintCalculator/lambda$0$Type",sh={138:1,56:1},ZZ="org.eclipse.elk.alg.common.compaction.options",sa="org.eclipse.elk.core.data",_ft="org.eclipse.elk.polyomino.traversalStrategy",yft="org.eclipse.elk.polyomino.lowLevelSort",xft="org.eclipse.elk.polyomino.highLevelSort",Mft="org.eclipse.elk.polyomino.fill",_d={154:1},YZ="polyomino",If="org.eclipse.elk.alg.common.compaction.polyomino",aO="org.eclipse.elk.alg.common.compaction.polyomino.structures",Eft="Direction",KZ="Grid is only of size ",JZ=". Requested point (",QZ=") is out of bounds.",uO=" Given center based coordinates were (",XP="org.eclipse.elk.graph.properties",sBt="IPropertyHolder",tY={3:1,93:1,131:1},O_={244:1},g4="org.eclipse.elk.core",oBt="Connected Components Compaction",cBt="org.eclipse.elk.alg.disco",lO="org.eclipse.elk.alg.disco.graph",eY="org.eclipse.elk.alg.disco.options",aBt="CompactionStrategy",Sft="org.eclipse.elk.disco.componentCompaction.strategy",Tft="org.eclipse.elk.disco.componentCompaction.componentLayoutAlgorithm",Cft="org.eclipse.elk.disco.debug.discoGraph",Aft="org.eclipse.elk.disco.debug.discoPolys",uBt="componentCompaction",c0="org.eclipse.elk.disco",nY="org.eclipse.elk.spacing.componentComponent",iY="org.eclipse.elk.edge.thickness",hE="org.eclipse.elk.aspectRatio",ox="org.eclipse.elk.padding",B_="org.eclipse.elk.alg.disco.transform",rY=1.5707963267948966,fw={3:1,4:1,5:1,175:1},a0={221:1,3:1,4:1},kft={3:1,6:1,4:1,5:1,63:1,73:1},Lft="org.eclipse.elk.alg.force",Pft="ComponentsProcessor",lBt="ComponentsProcessor/1",ZP="org.eclipse.elk.alg.force.graph",hBt="Component Layout",Ift="org.eclipse.elk.alg.force.model",yd=.01,hO="org.eclipse.elk.force.model",Rft="org.eclipse.elk.force.iterations",Dft="org.eclipse.elk.force.repulsivePower",sY="org.eclipse.elk.force.temperature",op=.001,oY="org.eclipse.elk.force.repulsion",m4="org.eclipse.elk.alg.force.options",fE=1.600000023841858,Rf="org.eclipse.elk.force",YP="org.eclipse.elk.priority",dE="org.eclipse.elk.spacing.nodeNode",cY="org.eclipse.elk.spacing.edgeLabel",fO="org.eclipse.elk.randomSeed",KP="org.eclipse.elk.separateConnectedComponents",dO="org.eclipse.elk.interactive",aY="org.eclipse.elk.portConstraints",Nft="origin",Oft="random",fBt="boundingBox.upLeft",dBt="boundingBox.lowRight",Bft="org.eclipse.elk.stress.fixed",Fft="org.eclipse.elk.stress.desiredEdgeLength",Uft="org.eclipse.elk.stress.dimension",zft="org.eclipse.elk.stress.epsilon",jft="org.eclipse.elk.stress.iterationLimit",b4="org.eclipse.elk.stress",pBt="ELK Stress",uY="org.eclipse.elk.alg.force.stress",gBt="Layered layout",JP="org.eclipse.elk.alg.layered",QP="org.eclipse.elk.alg.layered.compaction.components",w4="org.eclipse.elk.alg.layered.compaction.oned",pO="org.eclipse.elk.alg.layered.compaction.oned.algs",u0="org.eclipse.elk.alg.layered.compaction.recthull",K1="org.eclipse.elk.alg.layered.components",mBt={3:1,6:1,4:1,5:1,85:1,63:1,73:1},gO="org.eclipse.elk.alg.layered.compound",_l={3:1,6:1,4:1,5:1,99:1,85:1,63:1,73:1},Br={50:1},oa="org.eclipse.elk.alg.layered.graph",Ih={3:1,6:1,4:1,5:1,85:1,123:1,148:1,63:1,73:1},bBt="Not supported by LGraph",wBt=`([{"' \r +`,vBt=`)]}"' \r +`,_Bt="The given string contains parts that cannot be parsed as numbers.",t6="org.eclipse.elk.core.math",yBt={3:1,4:1,135:1,211:1,428:1},xBt={3:1,4:1,119:1,211:1,428:1},l0="org.eclipse.elk.alg.layered.graph.transform",Dn="org.eclipse.elk.alg.layered.intermediate",MBt="Big nodes pre-processing",Hft={3:1,6:1,4:1,5:1,85:1,619:1,148:1,63:1,73:1},Gft={3:1,4:1,5:1,537:1},EBt="ONE_SIDED_GREEDY_SWITCH",SBt="TWO_SIDED_GREEDY_SWITCH",lY="No implementation is available for the layout processor ",Wft="IntermediateProcessorStrategy",$ft="Node '",TBt="NodeMarginCalculator",CBt="Odd port side processing",dw=1e-8,Kr="org.eclipse.elk.alg.layered.intermediate.compaction",v4="org.eclipse.elk.alg.layered.intermediate.greedyswitch",h0="org.eclipse.elk.alg.layered.p3order.counting",e6={208:1},cp="org.eclipse.elk.alg.layered.intermediate.wrapping",_4="org.eclipse.elk.alg.layered.networksimplex",ka="org.eclipse.elk.alg.layered.options",hY="INTERACTIVE",jm="NONE",pE="LEFT",gE="RIGHT",ABt="EDGE_LENGTH",kBt="SELF_LOOPS",Vft="BOTTOM",y4="CENTER",LBt="portRatioOrPosition",qft="org.eclipse.elk.layered.contentAlignment",Xft="org.eclipse.elk.layered.feedbackEdges",mO="org.eclipse.elk.layered.interactiveReferencePoint",Zft="org.eclipse.elk.layered.mergeEdges",Yft="org.eclipse.elk.layered.mergeHierarchyEdges",Kft="org.eclipse.elk.layered.thoroughness",Jft="org.eclipse.elk.layered.unnecessaryBendpoints",Qft="org.eclipse.elk.layered.northOrSouthPort",fY="org.eclipse.elk.layered.cycleBreaking.strategy",n6="org.eclipse.elk.layered.layering.strategy",tdt="org.eclipse.elk.layered.layering.layerConstraint",edt="org.eclipse.elk.layered.layering.wideNodesOnMultipleLayers",dY="org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth",pY="org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor",gY="org.eclipse.elk.layered.layering.nodePromotion.strategy",mY="org.eclipse.elk.layered.layering.nodePromotion.maxIterations",bY="org.eclipse.elk.layered.layering.coffmanGraham.layerBound",wY="org.eclipse.elk.layered.crossingMinimization.strategy",ndt="org.eclipse.elk.layered.crossingMinimization.hierarchicalSweepiness",idt="org.eclipse.elk.layered.crossingMinimization.semiInteractive",rdt="org.eclipse.elk.layered.crossingMinimization.greedySwitch.activationThreshold",sdt="org.eclipse.elk.layered.crossingMinimization.greedySwitch.type",mE="org.eclipse.elk.layered.nodePlacement.strategy",vY="org.eclipse.elk.layered.nodePlacement.favorStraightEdges",_Y="org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening",yY="org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment",xY="org.eclipse.elk.layered.nodePlacement.linearSegments.deflectionDampening",MY="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility",odt="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility.default",EY="org.eclipse.elk.layered.edgeRouting.selfLoopPlacement",bO="org.eclipse.elk.layered.edgeRouting.sloppySplineRouting",wO="org.eclipse.elk.layered.edgeRouting.sloppySplineLayerSpacing",cdt="org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers",adt="org.eclipse.elk.layered.spacing.edgeEdgeBetweenLayers",udt="org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers",ldt="org.eclipse.elk.layered.priority.direction",hdt="org.eclipse.elk.layered.priority.shortness",fdt="org.eclipse.elk.layered.priority.straightness",SY="org.eclipse.elk.layered.compaction.connectedComponents",ddt="org.eclipse.elk.layered.compaction.postCompaction.strategy",pdt="org.eclipse.elk.layered.compaction.postCompaction.constraints",vO="org.eclipse.elk.layered.highDegreeNodes.treatment",TY="org.eclipse.elk.layered.highDegreeNodes.threshold",CY="org.eclipse.elk.layered.highDegreeNodes.treeHeight",x4="org.eclipse.elk.layered.wrapping.strategy",gdt="org.eclipse.elk.layered.wrapping.additionalEdgeSpacing",mdt="org.eclipse.elk.layered.wrapping.correctionFactor",_O="org.eclipse.elk.layered.wrapping.cutting.strategy",AY="org.eclipse.elk.layered.wrapping.cutting.cuts",kY="org.eclipse.elk.layered.wrapping.cutting.msd.freedom",LY="org.eclipse.elk.layered.wrapping.singleEdge.validify.strategy",yO="org.eclipse.elk.layered.wrapping.multiEdge.improveCuts",xO="org.eclipse.elk.layered.wrapping.multiEdge.distancePenalty",PY="org.eclipse.elk.layered.wrapping.multiEdge.improveWrappedEdges",bdt="org.eclipse.elk.layered.edgeLabels.sideSelection",wdt="org.eclipse.elk.layered.edgeLabels.centerLabelPlacementStrategy",vdt="layering",PBt="layering.minWidth",IBt="layering.nodePromotion",_dt="crossingMinimization",RBt="crossingMinimization.greedySwitch",DBt="nodePlacement",NBt="nodePlacement.bk",ydt="edgeRouting",i6="org.eclipse.elk.edgeRouting",J1="spacing",xdt="priority",OBt="compaction.postCompaction",BBt="Specifies whether and how post-process compaction is applied.",Mdt="highDegreeNodes",Edt="wrapping",FBt="wrapping.cutting",Sdt="wrapping.multiEdge",IY="edgeLabels",Nn="org.eclipse.elk.layered",Tdt="org.eclipse.elk.spacing.edgeEdge",Cdt="org.eclipse.elk.spacing.edgeNode",Adt="org.eclipse.elk.spacing.labelLabel",kdt="org.eclipse.elk.spacing.labelPort",Ldt="org.eclipse.elk.spacing.labelNode",Pdt="org.eclipse.elk.spacing.portPort",Idt="org.eclipse.elk.spacing.individualOverride",Rdt="org.eclipse.elk.port.borderOffset",Ddt="org.eclipse.elk.noLayout",Ndt="org.eclipse.elk.port.side",RY="org.eclipse.elk.debugMode",Odt="org.eclipse.elk.alignment",Bdt="org.eclipse.elk.hierarchyHandling",Fdt="org.eclipse.elk.insideSelfLoops.activate",Udt="org.eclipse.elk.insideSelfLoops.yo",MO="org.eclipse.elk.nodeSize.constraints",DY="org.eclipse.elk.nodeSize.options",NY="org.eclipse.elk.direction",zdt="org.eclipse.elk.nodeLabels.placement",jdt="org.eclipse.elk.portLabels.placement",Hdt="org.eclipse.elk.portLabels.nextToPortIfPossible",Gdt="org.eclipse.elk.portAlignment.default",Wdt="org.eclipse.elk.portAlignment.north",$dt="org.eclipse.elk.portAlignment.south",Vdt="org.eclipse.elk.portAlignment.west",qdt="org.eclipse.elk.portAlignment.east",EO="org.eclipse.elk.nodeSize.minimum",Xdt="org.eclipse.elk.junctionPoints",Zdt="org.eclipse.elk.edgeLabels.placement",Ydt="org.eclipse.elk.edgeLabels.inline",Kdt="org.eclipse.elk.port.index",Jdt="org.eclipse.elk.commentBox",Qdt="org.eclipse.elk.hypernode",tpt="org.eclipse.elk.port.anchor",ept="org.eclipse.elk.partitioning.activate",npt="org.eclipse.elk.partitioning.partition",SO="org.eclipse.elk.position",ipt="org.eclipse.elk.margins",rpt="org.eclipse.elk.spacing.portsSurrounding",UBt="NETWORK_SIMPLEX",cx="UNDEFINED",zBt={3:1,4:1,5:1,616:1},Pu={141:1,50:1},spt="org.eclipse.elk.alg.layered.p1cycles",pw="org.eclipse.elk.alg.layered.p2layers",opt={422:1,208:1},jBt={736:1,3:1,4:1},Qu="org.eclipse.elk.alg.layered.p3order",lo="org.eclipse.elk.alg.layered.p4nodes",HBt={3:1,4:1,5:1,745:1},OY=1e-5,BY="DOWN",$p="org.eclipse.elk.alg.layered.p4nodes.bk",ax=17976931348623157e292,F_="org.eclipse.elk.alg.layered.p5edges",f0="org.eclipse.elk.alg.layered.p5edges.splines",U_=1e-6,TO=-1e-6,GBt="The list of vectors may not be empty.",cpt=-17976931348623157e292,FY=.09999999999999998,WBt=4.71238898038469,$Bt=3.141592653589793,M4="org.eclipse.elk.alg.mrtree",E4="org.eclipse.elk.alg.mrtree.graph",ux="org.eclipse.elk.alg.mrtree.intermediate",VBt="Set neighbors in level",qBt="DESCENDANTS",apt="org.eclipse.elk.mrtree.weighting",upt="org.eclipse.elk.mrtree.searchOrder",CO="org.eclipse.elk.alg.mrtree.options",z_="org.eclipse.elk.mrtree",XBt="org.eclipse.elk.tree",lpt="org.eclipse.elk.alg.radial",lx=6.283185307179586,UY=5e-324,ZBt="org.eclipse.elk.alg.radial.intermediate",zY="org.eclipse.elk.alg.radial.intermediate.compaction",YBt={3:1,4:1,5:1,63:1},hpt="org.eclipse.elk.alg.radial.intermediate.optimization",jY="No implementation is available for the layout option ",S4="org.eclipse.elk.alg.radial.options",fpt="org.eclipse.elk.radial.orderId",dpt="org.eclipse.elk.radial.radius",HY="org.eclipse.elk.radial.compactor",GY="org.eclipse.elk.radial.compactionStepSize",ppt="org.eclipse.elk.radial.sorter",gpt="org.eclipse.elk.radial.wedgeCriteria",mpt="org.eclipse.elk.radial.optimizationCriteria",Hm="org.eclipse.elk.radial",KBt="org.eclipse.elk.alg.radial.p1position.wedge",bpt="org.eclipse.elk.alg.radial.sorting",JBt=5.497787143782138,QBt=3.9269908169872414,tFt=2.356194490192345,Rh="org.eclipse.elk.core.util",eFt="Invalid index: ",hx="org.eclipse.elk.core.alg",fx={337:1},j_={284:1},wpt="Make sure it's type is registered with the ",vpt=" utility class.",bE="true",WY="false",nFt="Couldn't clone property '",Dh="org.eclipse.elk.core.options",iFt=1.2999999523162842,gw="org.eclipse.elk.box",_pt="org.eclipse.elk.expandNodes",ypt="org.eclipse.elk.box.packingMode",rFt="org.eclipse.elk.algorithm",xpt="org.eclipse.elk.bendPoints",sFt="org.eclipse.elk.labelManager",oFt="org.eclipse.elk.scaleFactor",cFt="org.eclipse.elk.animate",aFt="org.eclipse.elk.animTimeFactor",uFt="org.eclipse.elk.layoutAncestors",lFt="org.eclipse.elk.maxAnimTime",hFt="org.eclipse.elk.minAnimTime",fFt="org.eclipse.elk.progressBar",dFt="org.eclipse.elk.validateOptions",pFt="org.eclipse.elk.zoomToFit",gFt="org.eclipse.elk.nodeLabels.padding",mFt="org.eclipse.elk.font.name",bFt="org.eclipse.elk.font.size",wFt="org.eclipse.elk.edge.type",vFt="de.cau.cs.kieler.labelSpacing",_Ft="partitioning",yFt="nodeLabels",AO="portAlignment",Mpt="nodeSize",$Y="port",xFt="portLabels",MFt="insideSelfLoops",EFt="de.cau.cs.kieler.selfLoopInside",r6="org.eclipse.elk.fixed",SFt="Fixed Layout",kO="org.eclipse.elk.random",TFt="port must have a parent node to calculate the port side",s6="org.eclipse.elk.core.util.adapters",Ept="org.eclipse.elk.core.util.nodespacing",d0="org.eclipse.elk.core.util.nodespacing.cellsystem",CFt={171:1,307:1},Spt="Vertical alignment cannot be null",LO="org.eclipse.elk.core.util.nodespacing.internal",wE="org.eclipse.elk.core.util.nodespacing.internal.algorithm",vE="org.eclipse.elk.core.util.overlaps",tl="org.eclipse.emf.ecore",H_="org.eclipse.elk.graph",AFt="EMapPropertyHolder",kFt="ElkBendPoint",LFt="ElkGraphElement",PFt="ElkConnectableShape",Tpt="ElkEdge",IFt="ElkEdgeSection",RFt="EModelElement",DFt="ENamedElement",Cpt="ElkLabel",Apt="ElkNode",kpt="ElkPort",NFt={91:1,87:1},dx="org.eclipse.emf.common.notify.impl",G_="The feature '",VY="' is not a valid changeable feature",OFt="Expecting null",Lpt="' is not a valid feature",ca=32768,BFt={95:1,91:1,87:1,51:1,42:1,92:1},Re="org.eclipse.emf.ecore.impl",p0="org.eclipse.elk.graph.impl",T4="Recursive containment not allowed for ",_E="The datatype '",Gm="' is not a valid classifier",qY="The value '",W_={173:1,3:1,4:1},XY="The class '",yE="http://www.eclipse.org/elk/ElkGraph",Ppt="property",C4="value",ZY="source",FFt="properties",UFt="identifier",YY="height",KY="width",JY="parent",QY="text",Ipt="children",zFt="hierarchical",Rpt="sources",tK="targets",Dpt="sections",eK="bendPoints",Npt="outgoingShape",Opt="incomingShape",Bpt="outgoingSections",Fpt="incomingSections",qs="org.eclipse.emf.common.util",Upt="Severe implementation error in the Json to ElkGraph importer.",Df="id",Ds="org.eclipse.elk.graph.json",zpt="Unhandled parameter types: ",jFt="startPoint",HFt="An edge must have at least one source and one target (edge id: '",xE="').",GFt="Referenced edge section does not exist: ",WFt=" (edge id: '",jpt="target",PO="group",Ti="name",$Ft="connectableShape cannot be null",nK="Passed edge is not 'simple'.",o6="The 'no duplicates' constraint is violated",Nf={3:1,4:1,20:1,25:1,41:1,13:1,15:1,49:1,59:1,55:1,52:1},iK={3:1,4:1,20:1,25:1,41:1,13:1,43:1,15:1,49:1,59:1,55:1,52:1,532:1},rK="org.eclipse.elk.graph.util",Hpt="undefined",VFt="parser.parse.1",qFt="parser.parse.2",IO="parser.next.1",sK="parser.next.2",XFt="parser.next.3",ZFt="parser.next.4",g0="parser.factor.1",Gpt="parser.factor.2",YFt="parser.factor.3",KFt="parser.factor.4",JFt="parser.factor.5",QFt="parser.factor.6",tUt="parser.atom.1",eUt="parser.atom.2",nUt="parser.atom.3",Wpt="parser.atom.4",oK="parser.atom.5",$pt="parser.cc.1",RO="parser.cc.2",iUt="parser.cc.3",rUt="parser.cc.5",Vpt="parser.cc.6",qpt="parser.cc.7",cK="parser.cc.8",sUt="parser.ope.1",oUt="parser.ope.2",cUt="parser.ope.3",Vp="parser.descape.1",aUt="parser.descape.2",uUt="parser.descape.3",lUt="parser.descape.4",hUt="parser.descape.5",el="parser.process.1",fUt="parser.quantifier.1",dUt="parser.quantifier.2",pUt="parser.quantifier.3",gUt="parser.quantifier.4",Xpt="parser.quantifier.5",mUt="org.eclipse.emf.common.notify",Zpt={380:1,610:1},bUt={3:1,4:1,20:1,25:1,41:1,13:1,15:1,59:1,52:1},c6={338:1,136:1},A4="index=",DO=", size=",aK={3:1,4:1,5:1,116:1},wUt={3:1,4:1,20:1,25:1,41:1,13:1,15:1,49:1,59:1,52:1},Ypt={3:1,6:1,4:1,5:1,175:1},vUt={3:1,4:1,5:1,339:1},_Ut=";/?:@&=+$,",yUt="invalid authority: ",xUt="EAnnotation",MUt="ETypedElement",EUt="EStructuralFeature",SUt="EAttribute",TUt="EClassifier",CUt="EEnumLiteral",AUt="EGenericType",kUt="EOperation",LUt="EParameter",PUt="EReference",IUt="ETypeParameter",hr="org.eclipse.emf.ecore.util",Kpt={3:1,20:1,13:1,15:1,52:1,533:1,81:1,64:1},RUt="org.eclipse.emf.ecore.util.FeatureMap$Entry",oh=1024,La=8192,mw=2048,k4="byte",NO="char",L4="double",P4="float",I4="int",R4="long",D4="short",DUt="java.lang.Object",$_={3:1,4:1,5:1,222:1},Jpt={3:1,4:1,5:1,611:1},NUt={3:1,4:1,20:1,25:1,41:1,13:1,15:1,49:1,59:1,55:1,52:1,64:1},Zo={3:1,4:1,20:1,25:1,41:1,13:1,15:1,49:1,59:1,55:1,52:1,81:1,64:1},a6="mixed",ui="http:///org/eclipse/emf/ecore/util/ExtendedMetaData",yl="kind",OUt={3:1,4:1,5:1,612:1},Qpt={3:1,4:1,20:1,25:1,41:1,13:1,15:1,59:1,52:1,81:1,64:1},OO={20:1,25:1,41:1,13:1,15:1,52:1,64:1},BO={43:1,120:1,260:1},FO={75:1,311:1},UO="The value of type '",zO="' must be of type '",V_=1365,xl="http://www.eclipse.org/emf/2002/Ecore",jO=-32768,Wm="constraints",Ns="baseType",BUt="getEStructuralFeature",FUt="getFeatureID",N4="feature",UUt="getOperationID",t1t="operation",zUt="defaultValue",jUt="eTypeParameters",HUt="isInstance",GUt="getEEnumLiteral",WUt="eContainingClass",wi={47:1},$Ut={3:1,4:1,5:1,124:1},VUt="org.eclipse.emf.ecore.resource",qUt={91:1,87:1,534:1,1628:1},uK="org.eclipse.emf.ecore.resource.impl",e1t="unspecified",u6="simple",HO="attribute",XUt="attributeWildcard",GO="element",lK="elementWildcard",Nh="collapse",hK="itemType",WO="namespace",l6="##targetNamespace",Ml="whiteSpace",n1t="wildcards",m0="http://www.eclipse.org/emf/2003/XMLType",fK="##any",ME="uninitialized",dK="The multiplicity constraint is violated",$O="org.eclipse.emf.ecore.xml.type",ZUt="ProcessingInstruction",YUt="SimpleAnyType",KUt="XMLTypeDocumentRoot",Xr="org.eclipse.emf.ecore.xml.type.impl",h6="INF",JUt="processing",QUt="ENTITIES_._base",i1t="minLength",r1t="ENTITY",VO="NCName",tzt="IDREFS_._base",s1t="integer",pK="token",gK="pattern",ezt="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*",o1t="\\i\\c*",nzt="[\\i-[:]][\\c-[:]]*",izt="nonPositiveInteger",f6="maxInclusive",c1t="NMTOKEN",rzt="NMTOKENS_._base",a1t="nonNegativeInteger",d6="minInclusive",szt="normalizedString",ozt="unsignedByte",czt="unsignedInt",azt="18446744073709551615",uzt="unsignedShort",lzt="processingInstruction",qp="org.eclipse.emf.ecore.xml.type.internal",EE=1114111,hzt="Internal Error: shorthands: \\u",O4="xml:isDigit",mK="xml:isWord",bK="xml:isSpace",wK="xml:isNameChar",vK="xml:isInitialNameChar",fzt="09\u0660\u0669\u06F0\u06F9\u0966\u096F\u09E6\u09EF\u0A66\u0A6F\u0AE6\u0AEF\u0B66\u0B6F\u0BE7\u0BEF\u0C66\u0C6F\u0CE6\u0CEF\u0D66\u0D6F\u0E50\u0E59\u0ED0\u0ED9\u0F20\u0F29",dzt="AZaz\xC0\xD6\xD8\xF6\xF8\u0131\u0134\u013E\u0141\u0148\u014A\u017E\u0180\u01C3\u01CD\u01F0\u01F4\u01F5\u01FA\u0217\u0250\u02A8\u02BB\u02C1\u0386\u0386\u0388\u038A\u038C\u038C\u038E\u03A1\u03A3\u03CE\u03D0\u03D6\u03DA\u03DA\u03DC\u03DC\u03DE\u03DE\u03E0\u03E0\u03E2\u03F3\u0401\u040C\u040E\u044F\u0451\u045C\u045E\u0481\u0490\u04C4\u04C7\u04C8\u04CB\u04CC\u04D0\u04EB\u04EE\u04F5\u04F8\u04F9\u0531\u0556\u0559\u0559\u0561\u0586\u05D0\u05EA\u05F0\u05F2\u0621\u063A\u0641\u064A\u0671\u06B7\u06BA\u06BE\u06C0\u06CE\u06D0\u06D3\u06D5\u06D5\u06E5\u06E6\u0905\u0939\u093D\u093D\u0958\u0961\u0985\u098C\u098F\u0990\u0993\u09A8\u09AA\u09B0\u09B2\u09B2\u09B6\u09B9\u09DC\u09DD\u09DF\u09E1\u09F0\u09F1\u0A05\u0A0A\u0A0F\u0A10\u0A13\u0A28\u0A2A\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59\u0A5C\u0A5E\u0A5E\u0A72\u0A74\u0A85\u0A8B\u0A8D\u0A8D\u0A8F\u0A91\u0A93\u0AA8\u0AAA\u0AB0\u0AB2\u0AB3\u0AB5\u0AB9\u0ABD\u0ABD\u0AE0\u0AE0\u0B05\u0B0C\u0B0F\u0B10\u0B13\u0B28\u0B2A\u0B30\u0B32\u0B33\u0B36\u0B39\u0B3D\u0B3D\u0B5C\u0B5D\u0B5F\u0B61\u0B85\u0B8A\u0B8E\u0B90\u0B92\u0B95\u0B99\u0B9A\u0B9C\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8\u0BAA\u0BAE\u0BB5\u0BB7\u0BB9\u0C05\u0C0C\u0C0E\u0C10\u0C12\u0C28\u0C2A\u0C33\u0C35\u0C39\u0C60\u0C61\u0C85\u0C8C\u0C8E\u0C90\u0C92\u0CA8\u0CAA\u0CB3\u0CB5\u0CB9\u0CDE\u0CDE\u0CE0\u0CE1\u0D05\u0D0C\u0D0E\u0D10\u0D12\u0D28\u0D2A\u0D39\u0D60\u0D61\u0E01\u0E2E\u0E30\u0E30\u0E32\u0E33\u0E40\u0E45\u0E81\u0E82\u0E84\u0E84\u0E87\u0E88\u0E8A\u0E8A\u0E8D\u0E8D\u0E94\u0E97\u0E99\u0E9F\u0EA1\u0EA3\u0EA5\u0EA5\u0EA7\u0EA7\u0EAA\u0EAB\u0EAD\u0EAE\u0EB0\u0EB0\u0EB2\u0EB3\u0EBD\u0EBD\u0EC0\u0EC4\u0F40\u0F47\u0F49\u0F69\u10A0\u10C5\u10D0\u10F6\u1100\u1100\u1102\u1103\u1105\u1107\u1109\u1109\u110B\u110C\u110E\u1112\u113C\u113C\u113E\u113E\u1140\u1140\u114C\u114C\u114E\u114E\u1150\u1150\u1154\u1155\u1159\u1159\u115F\u1161\u1163\u1163\u1165\u1165\u1167\u1167\u1169\u1169\u116D\u116E\u1172\u1173\u1175\u1175\u119E\u119E\u11A8\u11A8\u11AB\u11AB\u11AE\u11AF\u11B7\u11B8\u11BA\u11BA\u11BC\u11C2\u11EB\u11EB\u11F0\u11F0\u11F9\u11F9\u1E00\u1E9B\u1EA0\u1EF9\u1F00\u1F15\u1F18\u1F1D\u1F20\u1F45\u1F48\u1F4D\u1F50\u1F57\u1F59\u1F59\u1F5B\u1F5B\u1F5D\u1F5D\u1F5F\u1F7D\u1F80\u1FB4\u1FB6\u1FBC\u1FBE\u1FBE\u1FC2\u1FC4\u1FC6\u1FCC\u1FD0\u1FD3\u1FD6\u1FDB\u1FE0\u1FEC\u1FF2\u1FF4\u1FF6\u1FFC\u2126\u2126\u212A\u212B\u212E\u212E\u2180\u2182\u3007\u3007\u3021\u3029\u3041\u3094\u30A1\u30FA\u3105\u312C\u4E00\u9FA5\uAC00\uD7A3",pzt="Private Use",_K="ASSIGNED",gzt="\0\x7F\x80\xFF\u0100\u017F\u0180\u024F\u0250\u02AF\u02B0\u02FF\u0300\u036F\u0370\u03FF\u0400\u04FF\u0530\u058F\u0590\u05FF\u0600\u06FF\u0700\u074F\u0780\u07BF\u0900\u097F\u0980\u09FF\u0A00\u0A7F\u0A80\u0AFF\u0B00\u0B7F\u0B80\u0BFF\u0C00\u0C7F\u0C80\u0CFF\u0D00\u0D7F\u0D80\u0DFF\u0E00\u0E7F\u0E80\u0EFF\u0F00\u0FFF\u1000\u109F\u10A0\u10FF\u1100\u11FF\u1200\u137F\u13A0\u13FF\u1400\u167F\u1680\u169F\u16A0\u16FF\u1780\u17FF\u1800\u18AF\u1E00\u1EFF\u1F00\u1FFF\u2000\u206F\u2070\u209F\u20A0\u20CF\u20D0\u20FF\u2100\u214F\u2150\u218F\u2190\u21FF\u2200\u22FF\u2300\u23FF\u2400\u243F\u2440\u245F\u2460\u24FF\u2500\u257F\u2580\u259F\u25A0\u25FF\u2600\u26FF\u2700\u27BF\u2800\u28FF\u2E80\u2EFF\u2F00\u2FDF\u2FF0\u2FFF\u3000\u303F\u3040\u309F\u30A0\u30FF\u3100\u312F\u3130\u318F\u3190\u319F\u31A0\u31BF\u3200\u32FF\u3300\u33FF\u3400\u4DB5\u4E00\u9FFF\uA000\uA48F\uA490\uA4CF\uAC00\uD7A3\uE000\uF8FF\uF900\uFAFF\uFB00\uFB4F\uFB50\uFDFF\uFE20\uFE2F\uFE30\uFE4F\uFE50\uFE6F\uFE70\uFEFE\uFEFF\uFEFF\uFF00\uFFEF",u1t="UNASSIGNED",SE={3:1,112:1},mzt="org.eclipse.emf.ecore.xml.type.util",qO={3:1,4:1,5:1,342:1},l1t="org.eclipse.xtext.xbase.lib",bzt="Cannot add elements to a Range",wzt="Cannot set elements in a Range",vzt="Cannot remove elements from a Range",XO="locale",ZO="default",YO="user.agent",u,KO,yK,C3e=-1;yfe(),T(1,null,{},U),u.Fb=function(e){return this===e},u.Gb=function(){return this.ql},u.Hb=function(){return lm(this)},u.Ib=function(){return Og(fu(this))+"@"+(Yr(this)>>>0).toString(16)},u.equals=function(t){return this.Fb(t)},u.hashCode=function(){return this.Hb()},u.toString=function(){return this.Ib()};var _zt,yzt,xzt;T(274,1,{274:1,1712:1},Iat),u._d=function(e){var n;return n=new Iat,n.i=4,e>1?n.c=aAt(this,e-1):n.c=this,n},u.ae=function(){return Vd(this),this.b},u.be=function(){return Og(this)},u.ce=function(){return Vd(this),this.k},u.de=function(){return(this.i&4)!=0},u.ee=function(){return(this.i&1)!=0},u.Ib=function(){return Kct(this)},u.i=0;var A3e=1,un=A(bc,"Object",1),h1t=A(bc,"Class",274);T(1692,1,{3:1});var mLe=A(R_,"Optional",1692);T(1060,1692,{3:1},j),u.Fb=function(e){return e===this},u.Hb=function(){return 2040732332},u.Ib=function(){return"Optional.absent()"},u.Jb=function(e){return si(e),Wr(),xK};var xK,bLe=A(R_,"Absent",1060),k3e=Sr(R_,"Function");T(393,1,{},P5),u.Lb=function(e){return YCt(e)};var wLe=A(R_,"Joiner",393);T(875,393,{},eCt),u.Lb=function(e){return e==null?this.b:YCt(e)};var vLe=A(R_,"Joiner/1",875);T(874,1,{},Yj);var _Le=A(R_,"Joiner/MapJoiner",874),L3e=Sr(R_,"Predicate"),Mzt;T(494,1,{138:1,494:1,3:1,56:1},Aj),u.Nb=function(e){return this.Mb(e)},u.Mb=function(e){var n;for(n=0;n0},u.ic=function(){if(this.b>=this.c)throw K(new J);return v3t(this,this.b++)},u.Dc=function(){return this.b},u.Ec=function(){if(this.b<=0)throw K(new J);return v3t(this,--this.b)},u.Fc=function(){return this.b-1},u.b=0,u.c=0;var FLe=A(Le,"AbstractIndexedListIterator",847);T(949,257,iO),u.hc=function(){return u_(this)},u.ic=function(){return N2(this)},u.d=1;var ULe=A(Le,"AbstractIterator",949);T(1677,1,{238:1}),u.Hc=function(){var e;return e=this.f,e||(this.f=this.Ic())},u.Jc=function(){return new nW(this.Hc())},u.Lc=function(){return new L5t(this.Kc(),this._b(),ct(this,475)?1:0)},u.Fb=function(e){return aq(this,e)},u.Hb=function(){return Yr(this.Hc())},u.Wb=function(){return this._b()==0},u.Xb=function(){return bot(this)},u.Ib=function(){return Yc(this.Hc())};var zLe=A(Le,"AbstractMultimap",1677);T(654,1677,dZ),u.Pb=function(){hat(this)},u.Qb=function(e){return this.c.Qb(e)},u.Ic=function(){return ct(this.c,122)?new JT(this,a(this.c,122)):ct(this.c,115)?new gM(this,a(this.c,115)):new rM(this,this.c)},u.Pc=function(e){return this.Oc()},u.Jc=function(){return ct(this.c,122)?new Nv(this,a(this.c,122)):ct(this.c,115)?new g2(this,a(this.c,115)):new pM(this,this.c)},u.Qc=function(){return wpe(this.Oc())},u.Kc=function(){return new Dxt(this)},u.Lc=function(){return hlt(this.c.Tb().wc(),new gt,64,this.d)},u.Mc=function(e){return rr(this,e)},u.Nc=function(e){return i4(this,e)},u._b=function(){return this.d},u.Rc=function(){return new Rxt(this)},u.Sc=function(){return hlt(this.c.ac().wc(),new V,64,this.d)},u.d=0;var jLe=A(Le,"AbstractMapBasedMultimap",654);T(1483,654,dZ),u.Oc=function(){return new qu(this.a)},u.Qc=function(){return sC(),sC(),p1t},u.Mc=function(e){return a(rr(this,e),15)},u.Nc=function(e){return a(i4(this,e),15)},u.Hc=function(){var e;return e=this.f,e||(this.f=ct(this.c,122)?new JT(this,a(this.c,122)):ct(this.c,115)?new gM(this,a(this.c,115)):new rM(this,this.c))},u.Fb=function(e){return aq(this,e)},u.Tc=function(e){return a(rr(this,e),15)},u.Uc=function(e){return a(i4(this,e),15)};var HLe=A(Le,"AbstractListMultimap",1483);T(661,1,Cs),u.gc=function(e){ks(this,e)},u.hc=function(){return this.c.hc()||this.e.hc()},u.ic=function(){var e;return this.e.hc()||(e=a(this.c.ic(),38),this.b=e.kc(),this.a=a(e.lc(),13),this.e=this.a.tc()),this.Vc(this.b,this.e.ic())},u.jc=function(){this.e.jc(),this.a.Wb()&&this.c.jc(),--this.d.d};var GLe=A(Le,"AbstractMapBasedMultimap/Itr",661);T(970,661,Cs,Rxt),u.Vc=function(e,n){return n};var WLe=A(Le,"AbstractMapBasedMultimap/1",970);T(971,1,ys,V),u.Kb=function(e){return a(e,13).wc()};var $Le=A(Le,"AbstractMapBasedMultimap/1methodref$spliterator$Type",971);T(972,661,Cs,Dxt),u.Vc=function(e,n){return ts(),new N5(e,n)};var VLe=A(Le,"AbstractMapBasedMultimap/2",972);T(1666,1,uE),u.Ub=function(e){YV(this,e)},u.Yb=function(e,n,i){return rut(this,e,n,i)},u.Pb=function(){this.Tb().Pb()},u.Wc=function(e){return Qq(this,e)},u.Qb=function(e){return!!clt(this,e,!1)},u.Rb=function(e){var n,i,r;for(i=this.Tb().tc();i.hc();)if(n=a(i.ic(),38),r=n.lc(),zt(e)===zt(r)||e!=null&&Fi(e,r))return!0;return!1},u.Fb=function(e){return Z8t(this,e)},u.Vb=function(e){return Ua(clt(this,e,!1))},u.Hb=function(){return Lat(this.Tb())},u.Wb=function(){return this._b()==0},u.Xb=function(){return new Tv(this)},u.Zb=function(e,n){throw K(new Tp("Put not supported on this map"))},u.$b=function(e){return Ua(clt(this,e,!0))},u._b=function(){return this.Tb()._b()},u.Ib=function(){var e,n,i;for(i=new Mm("{","}"),n=this.Tb().tc();n.hc();)e=a(n.ic(),38),$g(i,Q4t(this,e.kc())+"="+Q4t(this,e.lc()));return i.a?i.e.length==0?i.a.a:i.a.a+(""+i.e):i.c},u.ac=function(){return new vf(this)};var qLe=A(ii,"AbstractMap",1666);T(1678,1666,uE),u.Jc=function(){return new nW(this)},u.Tb=function(){return mot(this)},u.Xb=function(){var e;return e=this.g,e||(this.g=this.Jc())},u.ac=function(){var e;return e=this.i,e||(this.i=new lMt(this))};var XLe=A(Le,"Maps/ViewCachingAbstractMap",1678);T(357,1678,uE,rM),u.Vb=function(e){return cue(this,e)},u.$b=function(e){return rhe(this,e)},u.Pb=function(){this.d==this.e.c?this.e.Pb():KD(new rot(this))},u.Qb=function(e){return cde(this.d,e)},u.Yc=function(){return new kj(this)},u.Xc=function(){return this.Yc()},u.Fb=function(e){return this===e||Fi(this.d,e)},u.Hb=function(){return Yr(this.d)},u.Xb=function(){return this.e.Xb()},u._b=function(){return this.d._b()},u.Ib=function(){return Yc(this.d)};var ZLe=A(Le,"AbstractMapBasedMultimap/AsMap",357);T(25,1,D_),u.sc=function(e){vo(this,e)},u.uc=function(){return new gi(null,this.wc())},u.wc=function(){return new Ei(this,0)},u.xc=function(){return new gi(null,this.wc())},u.nc=function(e){throw K(new Tp("Add not supported on this collection"))},u.oc=function(e){return yo(this,e)},u.Pb=function(){wL(this)},u.pc=function(e){return j2(this,e,!1)},u.qc=function(e){return O1(this,e)},u.Wb=function(){return this._b()==0},u.vc=function(e){return j2(this,e,!0)},u.yc=function(){return y$(this)},u.zc=function(e){return hP(this,e)},u.Ib=function(){return Gp(this)};var YLe=A(ii,"AbstractCollection",25);T(bd,25,vl),u.wc=function(){return new Ei(this,1)},u.Fb=function(e){return CIt(this,e)},u.Hb=function(){return Lat(this)};var KLe=A(ii,"AbstractSet",bd);T(1660,bd,vl);var JLe=A(Le,"Sets/ImprovedAbstractSet",1660);T(1679,1660,vl),u.Pb=function(){this.Zc().Pb()},u.pc=function(e){return DIt(this,e)},u.Wb=function(){return this.Zc().Wb()},u.vc=function(e){var n;return this.pc(e)?(n=a(e,38),this.Zc().Xb().vc(n.kc())):!1},u._b=function(){return this.Zc()._b()};var QLe=A(Le,"Maps/EntrySet",1679);T(968,1679,vl,kj),u.pc=function(e){return sRt(this.a.d.Tb(),e)},u.tc=function(){return new rot(this.a)},u.Zc=function(){return this.a},u.vc=function(e){var n;return sRt(this.a.d.Tb(),e)?(n=a(e,38),wae(this.a.e,n.kc()),!0):!1},u.wc=function(){return m$(this.a.d.Tb().wc(),new Lj(this.a))};var tPe=A(Le,"AbstractMapBasedMultimap/AsMap/AsMapEntries",968);T(969,1,ys,Lj),u.Kb=function(e){return z5t(this.a,a(e,38))};var ePe=A(Le,"AbstractMapBasedMultimap/AsMap/AsMapEntries/0methodref$wrapEntry$Type",969);T(659,1,Cs,rot),u.gc=function(e){ks(this,e)},u.ic=function(){var e;return e=a(this.b.ic(),38),this.a=a(e.lc(),13),z5t(this.c,e)},u.hc=function(){return this.b.hc()},u.jc=function(){this.b.jc(),this.c.e.d-=this.a._b(),this.a.Pb()};var nPe=A(Le,"AbstractMapBasedMultimap/AsMap/AsMapIterator",659);T(541,1660,vl,nW),u.Pb=function(){this.b.Pb()},u.pc=function(e){return this.b.Qb(e)},u.sc=function(e){si(e),this.b.Ub(new Nj(e))},u.Wb=function(){return this.b.Wb()},u.tc=function(){return ts(),tC(this.b.Tb().tc(),(Hv(),p6))},u.vc=function(e){return this.b.Qb(e)?(this.b.$b(e),!0):!1},u._b=function(){return this.b._b()};var iPe=A(Le,"Maps/KeySet",541);T(356,541,vl,pM),u.Pb=function(){var e;KD((e=this.b.Tb().tc(),new Jit(this,e)))},u.qc=function(e){return this.b.Xb().qc(e)},u.Fb=function(e){return this===e||Fi(this.b.Xb(),e)},u.Hb=function(){return Yr(this.b.Xb())},u.tc=function(){var e;return e=this.b.Tb().tc(),new Jit(this,e)},u.vc=function(e){var n,i;return i=0,n=a(this.b.$b(e),13),n&&(i=n._b(),n.Pb(),this.a.d-=i),i>0},u.wc=function(){return this.b.Xb().wc()};var rPe=A(Le,"AbstractMapBasedMultimap/KeySet",356);T(660,1,Cs,Jit),u.gc=function(e){ks(this,e)},u.hc=function(){return this.c.hc()},u.ic=function(){return this.a=a(this.c.ic(),38),this.a.kc()},u.jc=function(){var e;M1(!!this.a,lw),e=a(this.a.lc(),13),this.c.jc(),this.b.a.d-=e._b(),e.Pb()};var sPe=A(Le,"AbstractMapBasedMultimap/KeySet/1",660);T(358,357,{109:1,115:1},gM),u.Jc=function(){return this.$c()},u.Xb=function(){return this._c()},u.$c=function(){return new g2(this.c,this.ad())},u._c=function(){var e;return e=this.b,e||(this.b=this.$c())},u.ad=function(){return a(this.d,115)};var oPe=A(Le,"AbstractMapBasedMultimap/SortedAsMap",358);T(396,358,EOt,JT),u.$c=function(){return new Nv(this.a,a(a(this.d,115),122))},u.Xb=function(){var e;return e=this.b,a(e||(this.b=new Nv(this.a,a(a(this.d,115),122))),196)},u._c=function(){var e;return e=this.b,a(e||(this.b=new Nv(this.a,a(a(this.d,115),122))),196)},u.ad=function(){return a(a(this.d,115),122)};var cPe=A(Le,"AbstractMapBasedMultimap/NavigableAsMap",396);T(327,356,SOt,g2),u.wc=function(){return this.b.Xb().wc()};var aPe=A(Le,"AbstractMapBasedMultimap/SortedKeySet",327);T(299,327,rft,Nv);var uPe=A(Le,"AbstractMapBasedMultimap/NavigableKeySet",299);T(448,25,D_,CL),u.nc=function(e){var n,i;return du(this),i=this.d.Wb(),n=this.d.nc(e),n&&(++this.f.d,i&&_D(this)),n},u.oc=function(e){var n,i,r;return e.Wb()?!1:(r=(du(this),this.d._b()),n=this.d.oc(e),n&&(i=this.d._b(),this.f.d+=i-r,r==0&&_D(this)),n)},u.Pb=function(){var e;e=(du(this),this.d._b()),e!=0&&(this.d.Pb(),this.f.d-=e,$D(this))},u.pc=function(e){return du(this),this.d.pc(e)},u.qc=function(e){return du(this),this.d.qc(e)},u.Fb=function(e){return e===this?!0:(du(this),Fi(this.d,e))},u.Hb=function(){return du(this),Yr(this.d)},u.tc=function(){return du(this),new Vst(this)},u.vc=function(e){var n;return du(this),n=this.d.vc(e),n&&(--this.f.d,$D(this)),n},u._b=function(){return kEt(this)},u.wc=function(){return du(this),this.d.wc()},u.Ib=function(){return du(this),Yc(this.d)};var lPe=A(Le,"AbstractMapBasedMultimap/WrappedCollection",448),Sl=Sr(ii,"List");T(657,448,{20:1,25:1,13:1,15:1},got),u.jd=function(e){D1(this,e)},u.wc=function(){return du(this),this.d.wc()},u.bd=function(e,n){var i;du(this),i=this.d.Wb(),a(this.d,15).bd(e,n),++this.a.d,i&&_D(this)},u.cd=function(e){return du(this),a(this.d,15).cd(e)},u.dd=function(e){return du(this),a(this.d,15).dd(e)},u.ed=function(){return du(this),new JEt(this)},u.fd=function(e){return du(this),new N4t(this,e)},u.gd=function(e){var n;return du(this),n=a(this.d,15).gd(e),--this.a.d,$D(this),n},u.hd=function(e,n){return du(this),a(this.d,15).hd(e,n)},u.kd=function(e,n){return du(this),dct(this.a,this.e,a(this.d,15).kd(e,n),this.b?this.b:this)};var hPe=A(Le,"AbstractMapBasedMultimap/WrappedList",657);T(967,657,{20:1,25:1,13:1,15:1,49:1},DSt);var fPe=A(Le,"AbstractMapBasedMultimap/RandomAccessWrappedList",967);T(558,1,Cs,Vst),u.gc=function(e){ks(this,e)},u.hc=function(){return xM(this),this.b.hc()},u.ic=function(){return xM(this),this.b.ic()},u.jc=function(){xSt(this)};var dPe=A(Le,"AbstractMapBasedMultimap/WrappedCollection/WrappedIterator",558);T(658,558,kf,JEt,N4t),u.jc=function(){xSt(this)},u.Bc=function(e){var n;n=kEt(this.a)==0,(xM(this),a(this.b,120)).Bc(e),++this.a.a.d,n&&_D(this.a)},u.Cc=function(){return(xM(this),a(this.b,120)).Cc()},u.Dc=function(){return(xM(this),a(this.b,120)).Dc()},u.Ec=function(){return(xM(this),a(this.b,120)).Ec()},u.Fc=function(){return(xM(this),a(this.b,120)).Fc()},u.Gc=function(e){(xM(this),a(this.b,120)).Gc(e)};var pPe=A(Le,"AbstractMapBasedMultimap/WrappedList/WrappedListIterator",658);T(559,448,SOt,QW),u.wc=function(){return du(this),this.d.wc()};var gPe=A(Le,"AbstractMapBasedMultimap/WrappedSortedSet",559);T(656,559,rft,Ort);var mPe=A(Le,"AbstractMapBasedMultimap/WrappedNavigableSet",656);T(655,448,vl,dst),u.wc=function(){return du(this),this.d.wc()};var bPe=A(Le,"AbstractMapBasedMultimap/WrappedSet",655);T(974,1,ys,gt),u.Kb=function(e){var n,i;return n=e.kc(),i=a(e.lc(),13),m$(i.wc(),new Pj(n))};var wPe=A(Le,"AbstractMapBasedMultimap/lambda$0$Type",974);T(973,1,ys,Pj),u.Kb=function(e){return wee(this.a,e)};var vPe=A(Le,"AbstractMapBasedMultimap/lambda$2$Type",973);T(392,1,pZ),u.Fb=function(e){var n;return ct(e,38)?(n=a(e,38),Rp(this.kc(),n.kc())&&Rp(this.lc(),n.lc())):!1},u.Hb=function(){var e,n;return e=this.kc(),n=this.lc(),(e==null?0:Yr(e))^(n==null?0:Yr(n))},u.mc=function(e){throw K(new Oi)},u.Ib=function(){return this.kc()+"="+this.lc()};var _Pe=A(Le,TOt,392);T(1680,25,D_),u.Pb=function(){this.ld().Pb()},u.pc=function(e){var n;return ct(e,38)?(n=a(e,38),yce(this.ld(),n.kc(),n.lc())):!1},u.vc=function(e){var n;return ct(e,38)?(n=a(e,38),QAt(this.ld(),n.kc(),n.lc())):!1},u._b=function(){return this.ld()._b()};var yPe=A(Le,"Multimaps/Entries",1680);T(975,1680,D_),u.tc=function(){return this.a.Kc()},u.ld=function(){return this.a},u.wc=function(){return this.a.Lc()};var xPe=A(Le,"AbstractMultimap/Entries",975);T(662,975,vl,L8),u.wc=function(){return this.a.Lc()},u.Fb=function(e){return o9t(this,e)},u.Hb=function(){return IPt(this)};var MPe=A(Le,"AbstractMultimap/EntrySet",662);T(663,25,D_,Ud),u.Pb=function(){this.a.Pb()},u.pc=function(e){return the(this.a,e)},u.tc=function(){return this.a.Rc()},u._b=function(){return this.a.d},u.wc=function(){return this.a.Sc()};var EPe=A(Le,"AbstractMultimap/Values",663);T(1681,25,{738:1,20:1,25:1,13:1}),u.sc=function(e){si(e),Xb(this).sc(new Gj(e))},u.wc=function(){var e;return e=Xb(this).wc(),hlt(e,new se,64|e.qd()&1296,bq(this))},u.nc=function(e){return Pit(),!0},u.oc=function(e){return oge(this,e)},u.Pb=function(){KD(new Cit(mot(gm(this.a)).tc()))},u.pc=function(e){var n;return n=a(XM(gm(this.a),e),13),(n?n._b():0)>0},u.Fb=function(e){return Zme(this,e)},u.Hb=function(){return Yr(Xb(this))},u.Wb=function(){return Xb(this).Wb()},u.tc=function(){return new tMt(this,Xb(this).tc())},u.vc=function(e){return Rlt(this,e,1)>0},u._b=function(){return bq(this)},u.Ib=function(){return Yc(Xb(this))};var SPe=A(Le,"AbstractMultiset",1681);T(557,654,UP),u.Oc=function(){return this.md()},u.Qc=function(){return this.nd()},u.Mc=function(e){return this.od(e)},u.Nc=function(e){return this.pd(e)},u.Hc=function(){var e;return e=this.f,e||(this.f=ct(this.c,122)?new JT(this,a(this.c,122)):ct(this.c,115)?new gM(this,a(this.c,115)):new rM(this,this.c))},u.nd=function(){return $b(),yM(),B4},u.Fb=function(e){return aq(this,e)},u.od=function(e){return a(rr(this,e),19)},u.pd=function(e){return a(i4(this,e),19)};var TPe=A(Le,"AbstractSetMultimap",557);T(1413,557,UP),u.md=function(){return new Ub(this.b)},u.nd=function(){var e;return e=this.b,e?ooe(this.b):(we(),new J5(new Ub(this.b)))},u.Mc=function(e){return a(a(rr(this,e),19),60)},u.od=function(e){return a(a(rr(this,e),19),60)},u.Nc=function(e){return a(a(i4(this,e),19),60)},u.pd=function(e){return a(a(i4(this,e),19),60)},u.Hc=function(){var e;return e=this.f,e||(this.f=ct(this.c,122)?new JT(this,a(this.c,122)):ct(this.c,115)?new gM(this,a(this.c,115)):new rM(this,this.c))};var CPe=A(Le,"AbstractSortedSetMultimap",1413);T(1414,1413,UP),u.Hc=function(){var e;return e=this.f,a(a(e||(this.f=ct(this.c,122)?new JT(this,a(this.c,122)):ct(this.c,115)?new gM(this,a(this.c,115)):new rM(this,this.c)),115),122)},u.Xb=function(){var e;return e=this.i,a(a(e||(this.i=ct(this.c,122)?new Nv(this,a(this.c,122)):ct(this.c,115)?new g2(this,a(this.c,115)):new pM(this,this.c)),60),196)};var APe=A(Le,"AbstractSortedKeySortedSetMultimap",1414);T(521,1483,dZ,vD),u.a=0;var kPe=A(Le,"ArrayListMultimap",521);T(1156,1,Wp,H3t),u.qd=function(){return this.a.qd()&-262},u.rd=function(){return this.a.rd()},u.gc=function(e){this.a.gc(new W3t(e,this.b))},u.sd=function(e){return this.a.sd(new G3t(e,this.b))};var LPe=A(Le,"CollectSpliterators/1",1156);T(1157,1,{},G3t),u.td=function(e){this.a.td(this.b.Kb(e))};var PPe=A(Le,"CollectSpliterators/1/lambda$0$Type",1157);T(1158,1,{},W3t),u.td=function(e){this.a.td(this.b.Kb(e))};var IPe=A(Le,"CollectSpliterators/1/lambda$1$Type",1158);T(1159,1,Wp,fkt),u.qd=function(){return this.a},u.rd=function(){return this.d&&(this.b=DEt(this.b,this.d.rd())),DEt(this.b,0)},u.gc=function(e){this.d&&(this.d.gc(e),this.d=null),this.c.gc(new V3t(this.e,e)),this.b=0},u.sd=function(e){for(;;){if(this.d&&this.d.sd(e))return CT(this.b,rO)&&(this.b=Yg(this.b,1)),!0;if(this.d=null,!this.c.sd(new $3t(this,this.e)))return!1}},u.a=0,u.b=0;var RPe=A(Le,"CollectSpliterators/1FlatMapSpliterator",1159);T(1160,1,{},$3t),u.td=function(e){Cne(this.a,this.b,e)};var DPe=A(Le,"CollectSpliterators/1FlatMapSpliterator/lambda$0$Type",1160);T(1161,1,{},V3t),u.td=function(e){xee(this.b,this.a,e)};var NPe=A(Le,"CollectSpliterators/1FlatMapSpliterator/lambda$1$Type",1161),d1t;T(844,1,rh,Rj),u.Fb=function(e){return this===e},u.Kb=function(e){return zt(e)===zt(this.a)?MOt:e};var OPe=A(Le,"Collections2/1",844);T(220,1,gZ),u.vd=function(e){return this.ud(a(e,220))},u.ud=function(e){var n;return e==(co(),EK)?1:e==(Zr(),MK)?-1:(n=(LD(),TC(this.a,e.a)),n!=0?n:ct(this,467)==ct(e,467)?0:ct(this,467)?1:-1)},u.yd=function(){return this.a},u.Fb=function(e){return wut(this,e)};var BPe=A(Le,"Cut",220);T(1508,220,gZ,s3t),u.ud=function(e){return e==this?0:1},u.wd=function(e){throw K(new v9)},u.xd=function(e){e.a+="+\u221E)"},u.yd=function(){throw K(new yc(COt))},u.zd=function(e){return!1},u.Ib=function(){return"+\u221E"};var MK,FPe=A(Le,"Cut/AboveAll",1508);T(467,220,{220:1,467:1,3:1,34:1},SSt),u.wd=function(e){Fa((e.a+="(",e),this.a)},u.xd=function(e){S1(Fa(e,this.a),93)},u.Hb=function(){return~Yr(this.a)},u.zd=function(e){return LD(),TC(this.a,e)<0},u.Ib=function(){return"/"+this.a+"\\"};var UPe=A(Le,"Cut/AboveValue",467);T(1507,220,gZ,o3t),u.ud=function(e){return e==this?0:-1},u.wd=function(e){e.a+="(-\u221E"},u.xd=function(e){throw K(new v9)},u.yd=function(){throw K(new yc(COt))},u.zd=function(e){return!0},u.Ib=function(){return"-\u221E"};var EK,zPe=A(Le,"Cut/BelowAll",1507);T(1509,220,gZ,TSt),u.wd=function(e){Fa((e.a+="[",e),this.a)},u.xd=function(e){S1(Fa(e,this.a),41)},u.Hb=function(){return Yr(this.a)},u.zd=function(e){return LD(),TC(this.a,e)<=0},u.Ib=function(){return"\\"+this.a+"/"};var jPe=A(Le,"Cut/BelowValue",1509);T(482,1,wd),u.sc=function(e){vo(this,e)},u.Ib=function(){return dce(a(Hot(this,"use Optional.orNull() instead of Optional.or(null)"),20).tc())};var HPe=A(Le,"FluentIterable",482);T(325,482,wd,y2),u.tc=function(){return Rn(this)};var GPe=A(Le,"FluentIterable/2",325);T(1670,25,AOt),u.tc=function(){return this.Ad()},u.nc=function(e){throw K(new Oi)},u.oc=function(e){throw K(new Oi)},u.Pb=function(){throw K(new Oi)},u.pc=function(e){return e!=null&&j2(this,e,!1)},u.vc=function(e){throw K(new Oi)};var WPe=A(Le,"ImmutableCollection",1670);T(912,1670,AOt,Dj),u.tc=function(){return F2((we(),Dv(),Z_))},u.pc=function(e){return!1},u.qc=function(e){return O1(this.a,e)},u.Wb=function(){return!0},u.Ad=function(){return F2((we(),Dv(),Z_))},u._b=function(){return 0},u.yc=function(){return y$(this.a)},u.zc=function(e){return hP(this.a,e)},u.Ib=function(){return Gp(this.a)};var $Pe=A(Le,"ForwardingImmutableCollection",912);T(193,1670,mZ),u.tc=function(){return this.Ad()},u.ed=function(){return new P$(this,this._b(),0)},u.fd=function(e){return new P$(this,this._b(),e)},u.jd=function(e){D1(this,e)},u.wc=function(){return new Ei(this,16)},u.kd=function(e,n){return this.Bd(e,n)},u.bd=function(e,n){throw K(new Oi)},u.Fb=function(e){return Nme(this,e)},u.Hb=function(){return Tle(this)},u.dd=function(e){return e==null?-1:Kde(this,e)},u.Ad=function(){return new P$(this,this._b(),0)},u.gd=function(e){throw K(new Oi)},u.hd=function(e,n){throw K(new Oi)},u.Bd=function(e,n){var i;return cq((i=new eMt(this),new C1(i,e,n)))};var p1t,VPe=A(Le,"ImmutableList",193);T(1675,193,mZ),u.tc=function(){return F2(this.Cd().tc())},u.kd=function(e,n){return cq(this.Cd().kd(e,n))},u.pc=function(e){return e!=null&&this.Cd().pc(e)},u.qc=function(e){return this.Cd().qc(e)},u.Fb=function(e){return Fi(this.Cd(),e)},u.cd=function(e){return this.Cd().cd(e)},u.Hb=function(){return Yr(this.Cd())},u.dd=function(e){return this.Cd().dd(e)},u.Wb=function(){return this.Cd().Wb()},u.Ad=function(){return F2(this.Cd().tc())},u._b=function(){return this.Cd()._b()},u.Bd=function(e,n){return cq(this.Cd().kd(e,n))},u.yc=function(){return this.Cd().zc(dt(un,te,1,this.Cd()._b(),5,1))},u.zc=function(e){return this.Cd().zc(e)},u.Ib=function(){return Yc(this.Cd())};var qPe=A(Le,"ForwardingImmutableList",1675);T(1671,1670,zP),u.tc=function(){return this.Ad()},u.wc=function(){return new Ei(this,1)},u.Fb=function(e){return o9t(this,e)},u.Hb=function(){return IPt(this)};var XPe=A(Le,"ImmutableSet",1671);T(550,1671,zP),u.tc=function(){return this.Ad()},u.pc=function(e){return e!=null&&AT(this.b,e)},u.qc=function(e){return trt(this.b,e)},u.Hb=function(){return Yr(this.b.b)},u.Wb=function(){return this.b.b.Wb()},u.Ad=function(){return F2(new Dg(this.b.b.tc()))},u._b=function(){return this.b.b._b()},u.yc=function(){return this.b.b.yc()},u.zc=function(e){return nMt(this.b,e)},u.Ib=function(){return Yc(this.b.b)};var ZPe=A(Le,"ForwardingImmutableSet",550);T(1664,1663,kOt),u.Ac=function(){return we(),new J5(this.a)},u.wc=function(){return new F5(this)};var YPe=A(Le,"ForwardingSortedSet",1664);T(481,632,tO,bD),u.ec=function(e){return new STt(this,e,this)},u.Zb=function(e,n){return YC(this,e,n,!1)};var KPe=A(Le,"HashBiMap",481);T(892,633,tO,STt),u.dc=function(){return new _St(this,this.a.b.Tb().tc())};var JPe=A(Le,"HashBiMap/1",892);T(479,1,Cs),u.gc=function(e){ks(this,e)},u.hc=function(){return this.b.hc()},u.ic=function(){return yEt(this)},u.jc=function(){this.b.jc()};var QPe=A(Le,"TransformedIterator",479);T(893,479,Cs,_St),u.Ed=function(e){return new ZCt(this,a(e,38))},u.Dd=function(t){return this.Ed(t)};var t6e=A(Le,"HashBiMap/1/1",893);T(894,392,pZ,ZCt),u.kc=function(){return this.c},u.lc=function(){return this.a.a.b.Vb(this.c)},u.mc=function(e){var n;return M1(Hit(YD(this.a.a),this),ift),n=this.a.a.b.Vb(this.c),zt(e)===zt(n)||e!=null&&Fi(e,n)?e:(YC(this.a.a,this.c,e,!0),n)};var e6e=A(Le,"HashBiMap/1/1/1",894);T(298,557,UP,Ov),u.md=function(){return new L9(tq(this.a))},u.a=2;var n6e=A(Le,"HashMultimap",298);T(372,392,{392:1,372:1,3:1,38:1},N5),u.kc=function(){return this.g},u.lc=function(){return this.i},u.mc=function(e){throw K(new Oi)};var i6e=A(Le,"ImmutableEntry",372);T(903,550,zP,Nxt);var r6e=A(Le,"ImmutableEnumSet",903);T(544,847,fZ,P$);var s6e=A(Le,"ImmutableList/1",544);T(1561,550,LOt),u.tc=function(){return F2(new Dg(this.b.b.tc()))},u.wc=function(){return new F5(this)},u.pc=function(e){try{return e!=null&&AT(this.a,e)}catch(n){if(n=vr(n),ct(n,177))return!1;throw K(n)}},u.qc=function(e){var n,i;for(i=e.tc();i.hc();)if(n=i.ic(),n==null)return!1;try{return trt(this.a,e)}catch(r){if(r=vr(r),ct(r,177))return!1;throw K(r)}},u.Ad=function(){return F2(new Dg(this.b.b.tc()))},u.yc=function(){return cLt(this,dt(un,te,1,this.b.b._b(),5,1))},u.zc=function(e){return i7(this,e)};var Ezt,g1t,o6e=A(Le,"ImmutableSortedSet",1561);T(904,482,wd,FEt),u.tc=function(){return rst(this.a)},u.Ib=function(){return Gp(this.a)+" (cycled)"};var c6e=A(Le,"Iterables/1",904);T(200,1,rh,X),u.Kb=function(e){return a(e,20).tc()},u.Fb=function(e){return this===e};var a6e=A(Le,"Iterables/12",200);T(905,482,wd,dCt),u.sc=function(e){si(e),this.b.sc(new q3t(this.a,e))},u.tc=function(){return GT(this)};var u6e=A(Le,"Iterables/4",905);T(906,1,{},q3t),u.td=function(e){_te(this.b,this.a,e)};var l6e=A(Le,"Iterables/4/lambda$0$Type",906);T(907,482,wd,pCt),u.sc=function(e){si(e),this.a.sc(new X3t(e,this.b))},u.tc=function(){return id(this)};var h6e=A(Le,"Iterables/5",907);T(908,1,{},X3t),u.td=function(e){this.a.td(this.b.Kb(e))};var f6e=A(Le,"Iterables/5/lambda$0$Type",908),Szt,m1t;T(945,1665,fZ,xt),u.hc=function(){return!1},u.Cc=function(){return!1},u.ic=function(){throw K(new J)},u.Dc=function(){return 0},u.Ec=function(){throw K(new J)},u.Fc=function(){return-1};var d6e=A(Le,"Iterators/1",945);T(555,257,iO,d5),u.hc=function(){return!this.a},u.ic=function(){if(this.a)throw K(new J);return this.a=!0,this.b},u.a=!1;var p6e=A(Le,"Iterators/11",555);T(946,1,Cs,Bt),u.gc=function(e){ks(this,e)},u.hc=function(){return!1},u.ic=function(){throw K(new J)},u.jc=function(){M1(!1,lw)};var g6e=A(Le,"Iterators/2",946);T(947,257,iO,f5),u.hc=function(){return this.a.hc()},u.ic=function(){return this.a.ic()};var m6e=A(Le,"Iterators/3",947);T(948,1,Cs,RTt),u.gc=function(e){ks(this,e)},u.hc=function(){return this.a.hc()||this.b.tc().hc()},u.ic=function(){return mat(this)},u.jc=function(){this.a.jc()};var b6e=A(Le,"Iterators/4",948);T(950,949,iO,Z3t);var w6e=A(Le,"Iterators/6",950);T(951,479,Cs,ySt),u.Dd=function(e){return this.a.Kb(e)};var v6e=A(Le,"Iterators/7",951);T(647,1,Cs),u.gc=function(e){ks(this,e)},u.hc=function(){return Jn(this)},u.ic=function(){return In(this)},u.jc=function(){M1(!!this.c,lw),this.c.jc(),this.c=null};var _6e=A(Le,"MultitransformedIterator",647);T(182,647,{182:1,43:1},$d),u.Fd=function(e){return a(e,43)};var y6e=A(Le,"Iterators/ConcatenatedIterator",182);T(648,647,Cs,Ait),u.Fd=function(e){return ale(a(e,43))};var x6e=A(Le,"Iterators/ConcatenatedIterator/1",648);T(1540,557,UP,PIt),u.Pb=function(){hat(this),K3(this.a,this.a)},u.md=function(){return new Jrt(this.b)},u.Pc=function(e){return new L6t(this,e,this.b)},u.Kc=function(){return new Zrt(this)},u.Lc=function(){var e;return new Ei((e=this.g,a(e||(this.g=new L8(this)),19)),17)},u.Xb=function(){var e;return e=this.i,e||(this.i=ct(this.c,122)?new Nv(this,a(this.c,122)):ct(this.c,115)?new g2(this,a(this.c,115)):new pM(this,this.c))},u.Rc=function(){return ts(),tC(new Zrt(this),(Hv(),g6))},u.Sc=function(){var e;return m$(new Ei((e=this.g,a(e||(this.g=new L8(this)),19)),17),new Ot)},u.b=2;var M6e=A(Le,"LinkedHashMultimap",1540);T(1543,1,ys,Ot),u.Kb=function(e){return a(e,38).lc()};var E6e=A(Le,"LinkedHashMultimap/0methodref$getValue$Type",1543);T(728,1,Cs,Zrt),u.gc=function(e){ks(this,e)},u.ic=function(){return Tue(this)},u.hc=function(){return this.a!=this.b.a},u.jc=function(){M1(!!this.c,lw),QAt(this.b,this.c.g,this.c.i),this.c=null};var S6e=A(Le,"LinkedHashMultimap/1",728);T(310,372,{392:1,372:1,310:1,1706:1,3:1,38:1},Fot),u.Gd=function(){return this.f},u.Hd=function(e){this.c=e},u.Id=function(e){this.f=e},u.d=0;var Tzt=A(Le,"LinkedHashMultimap/ValueEntry",310);T(1541,1660,{1706:1,20:1,25:1,13:1,19:1},L6t),u.nc=function(e){var n,i,r,c,l;for(l=sft*Oot((e==null?0:Yr(e))*oft,15),n=l&this.b.length-1,c=this.b[n],i=c;i;i=i.a)if(i.d==l&&Rp(i.i,e))return!1;return r=new Fot(this.c,e,l,c),h3t(this.d,r),r.f=this,this.d=r,K3(this.g.a.b,r),K3(r,this.g.a),this.b[n]=r,++this.f,++this.e,o1e(this),!0},u.Pb=function(){var e,n;for(rW(this.b,null),this.f=0,e=this.a;e!=this;e=e.Gd())n=a(e,310),K3(n.b,n.e);this.a=this,this.d=this,++this.e},u.pc=function(e){var n,i;for(i=sft*Oot((e==null?0:Yr(e))*oft,15),n=this.b[i&this.b.length-1];n;n=n.a)if(n.d==i&&Rp(n.i,e))return!0;return!1},u.sc=function(e){var n;for(si(e),n=this.a;n!=this;n=n.Gd())e.td(a(n,310).i)},u.Gd=function(){return this.a},u.tc=function(){return new u4t(this)},u.vc=function(e){return k9t(this,e)},u.Hd=function(e){this.d=e},u.Id=function(e){this.a=e},u._b=function(){return this.f},u.e=0,u.f=0;var T6e=A(Le,"LinkedHashMultimap/ValueSet",1541);T(1542,1,Cs,u4t),u.gc=function(e){ks(this,e)},u.hc=function(){return eot(this),this.b!=this.c},u.ic=function(){var e,n;if(eot(this),this.b==this.c)throw K(new J);return e=a(this.b,310),n=e.i,this.d=e,this.b=e.f,n},u.jc=function(){eot(this),M1(!!this.d,lw),k9t(this.c,this.d.i),this.a=this.c.e,this.d=null},u.a=0;var C6e=A(Le,"LinkedHashMultimap/ValueSet/1",1542);T(689,1677,dZ,irt),u.Hc=function(){return gm(this)},u.Fb=function(e){return aq(this,e)},u.Mc=function(e){return new QG(this,e)},u.Nc=function(e){return oV(this,e)},u.Pb=function(){k$(this)},u.Qb=function(e){return Git(this,e)},u.Ic=function(){return new nrt(this)},u.Jc=function(){return new Ij(this)},u.Kc=function(){throw K(new sV("should never be called"))},u.Tc=function(e){return new QG(this,e)},u.Wb=function(){return!this.a},u.Uc=function(e){return oV(this,e)},u._b=function(){return this.d},u.c=0,u.d=0;var A6e=A(Le,"LinkedListMultimap",689);T(41,25,tx),u.jd=function(e){D1(this,e)},u.wc=function(){return new Ei(this,16)},u.bd=function(e,n){throw K(new Tp("Add not supported on this list"))},u.nc=function(e){return this.bd(this._b(),e),!0},u.Pb=function(){this.Jd(0,this._b())},u.Fb=function(e){return jlt(this,e)},u.Hb=function(){return Nat(this)},u.dd=function(e){return KLt(this,e)},u.tc=function(){return new $3(this)},u.ed=function(){return this.fd(0)},u.fd=function(e){return new Gs(this,e)},u.gd=function(e){throw K(new Tp("Remove not supported on this list"))},u.Jd=function(e,n){var i,r;for(r=this.fd(e),i=e;i0||this.c.hc()},u.ic=function(){if(!(this.d>0||this.c.hc()))throw K(new J);return this.d==0&&(this.b=a(this.c.ic(),312),this.f=this.d=a(this.b.a.lc(),13)._b()),--this.d,this.a=!0,this.b.a.kc()},u.jc=function(){M1(this.a,lw),this.f==1?this.c.jc():Rlt(this.e,this.b.a.kc(),1)>0,--this.f,this.a=!1},u.a=!1,u.d=0,u.f=0;var lIe=A(Le,"Multisets/MultisetIteratorImpl",981);T(667,1,ys,se),u.Kb=function(e){return new Ei(lle(a(a(e,300).a.lc(),13)._b(),a(e,300).a.kc()),16)};var hIe=A(Le,"Multisets/lambda$0$Type",667);T(1684,1,jr),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var fIe=A(Le,"Ordering",1684);T(1565,1684,wZ,ot),u.Ld=function(e,n){return one(a(e,34),a(n,34))},u.Ib=function(){return"Ordering.natural()"};var Azt,dIe=A(Le,"NaturalOrdering",1565);T(464,1,{138:1,464:1,3:1,56:1},Cut),u.Mb=function(e){return Hre(this,a(e,34))},u.Nb=function(e){return this.Mb(e)},u.Fb=function(e){var n;return ct(e,464)?(n=a(e,464),wut(this.a,n.a)&&wut(this.b,n.b)):!1},u.Hb=function(){return Yr(this.a)*31+Yr(this.b)},u.Ib=function(){return akt(this.a,this.b)};var pIe=A(Le,"Range",464);T(485,1675,mZ,hN),u.Cd=function(){return this.a};var gIe=A(Le,"RegularImmutableList",485);T(554,550,zP,iW);var B4,mIe=A(Le,"RegularImmutableSet",554);T(729,1561,LOt,Uot);var bIe=A(Le,"RegularImmutableSortedSet",729);T(543,1664,{543:1,3:1,20:1,13:1,196:1,19:1,60:1},hMt);var wIe=A(Le,"Sets/UnmodifiableNavigableSet",543);T(1165,1675,mZ,aTt),u.Cd=function(){return this.a};var vIe=A(Le,"SingletonImmutableList",1165);T(326,1671,zP,l2),u.tc=function(){return Ao(),new d5(this.a)},u.pc=function(e){return Fi(this.a,e)},u.Ad=function(){return Ao(),new d5(this.a)},u._b=function(){return 1};var _Ie=A(Le,"SingletonImmutableSet",326);T(1415,1414,UP,G4t),u.Hc=function(){var e;return e=this.f,a(a(e||(this.f=ct(this.c,122)?new JT(this,a(this.c,122)):ct(this.c,115)?new gM(this,a(this.c,115)):new rM(this,this.c)),115),122)},u.Xb=function(){var e;return e=this.i,a(a(e||(this.i=ct(this.c,122)?new Nv(this,a(this.c,122)):ct(this.c,115)?new g2(this,a(this.c,115)):new pM(this,this.c)),60),196)},u.Pc=function(e){return e==null&&this.a.Ld(null,null),new Ub(this.b)};var yIe=A(Le,"TreeMultimap",1415);T(78,1,{3:1,78:1}),u.Nd=function(e){return new y.Error(e)},u.Od=function(){return this.g},u.Pd=function(){var e,n,i;i=this.g==null?null:this.g.replace(new y.RegExp(` +`,"g")," "),n=(e=Og(this.ql),i==null?e:e+": "+i),bne(this,mce(this.Nd(n))),Ki(this)},u.Ib=function(){return W4t(this,this.Od())},u.e=IOt,u.i=!1,u.n=!0;var kzt=A(bc,"Throwable",78);T(104,78,{3:1,104:1,78:1});var xIe=A(bc,"Exception",104);T(54,104,rp,Ep,sc);var MIe=A(bc,"RuntimeException",54);T(539,54,rp);var EIe=A(bc,"JsException",539);T(760,539,rp);var SIe=A(jP,"JavaScriptExceptionBase",760);T(435,760,{435:1,3:1,104:1,54:1,78:1},vIt),u.Od=function(){return E1e(this),this.c},u.Qd=function(){return zt(this.b)===zt(b1t)?null:this.b};var b1t,TIe=A(uft,"JavaScriptException",435),Lzt=A(uft,"JavaScriptObject$",0),TK;T(1640,1,{});var CIe=A(uft,"Scheduler",1640),JO=0,Pzt=0,QO=-1;T(787,1640,{},tt);var w1t,AIe=A(jP,"SchedulerImpl",787),CK;T(1653,1,{});var kIe=A(jP,"StackTraceCreator/Collector",1653);T(761,1653,{},Q),u.Rd=function(e){var n={},i,r=[];e[lft]=r;for(var c=arguments.callee.caller;c;){var l=(TM(),c.name||(c.name=Zue(c.toString())));r.push(l);var f=":"+l,g=n[f];if(g){var b,v;for(b=0,v=g.length;b=0?"+":"")+(i/60|0),n=(i<0?-i:i)%60<10?"0"+(i<0?-i:i)%60:""+(i<0?-i:i)%60,(C8t(),Hzt)[this.q.getDay()]+" "+Gzt[this.q.getMonth()]+" "+PW(this.q.getDate())+" "+PW(this.q.getHours())+":"+PW(this.q.getMinutes())+":"+PW(this.q.getSeconds())+" GMT"+e+n+" "+this.q.getFullYear()};var tB=A(ii,"Date",181);T(1622,181,BOt,QRt),u.a=!1,u.b=0,u.c=0,u.d=0,u.e=0,u.f=0,u.g=!1,u.i=0,u.j=0,u.k=0,u.n=0,u.o=0,u.p=0;var jIe=A("com.google.gwt.i18n.shared.impl","DateRecord",1622);T(1659,1,{}),u.Vd=function(){return null},u.Wd=function(){return null},u.Xd=function(){return null},u.Yd=function(){return null},u.Zd=function(){return null};var HIe=A(ix,"JSONValue",1659);T(209,1659,{209:1},Rg,I8),u.Fb=function(e){return ct(e,209)?oct(this.a,a(e,209).a):!1},u.Ud=function(){return ait},u.Hb=function(){return Zot(this.a)},u.Vd=function(){return this},u.Ib=function(){var e,n,i;for(i=new ll("["),n=0,e=this.a.length;n0&&(i.a+=","),Fa(i,B2(this,n));return i.a+="]",i.a};var GIe=A(ix,"JSONArray",209);T(443,1659,{443:1},R8),u.Ud=function(){return uit},u.Wd=function(){return this},u.Ib=function(){return me(),""+this.a},u.a=!1;var Izt,Rzt,WIe=A(ix,"JSONBoolean",443);T(877,54,rp,Oxt);var $Ie=A(ix,"JSONException",877);T(913,1659,{},Fn),u.Ud=function(){return m9},u.Ib=function(){return tu};var Dzt,VIe=A(ix,"JSONNull",913);T(259,1659,{259:1},p5),u.Fb=function(e){return ct(e,259)?this.a==a(e,259).a:!1},u.Ud=function(){return LG},u.Hb=function(){return Tr(lt(this.a))},u.Xd=function(){return this},u.Ib=function(){return this.a+""},u.a=0;var qIe=A(ix,"JSONNumber",259);T(191,1659,{191:1},_T,sT),u.Fb=function(e){return ct(e,191)?oct(this.a,a(e,191).a):!1},u.Ud=function(){return lit},u.Hb=function(){return Zot(this.a)},u.Yd=function(){return this},u.Ib=function(){var e,n,i,r,c,l;for(l=new ll("{"),e=!0,c=wat(this,dt(At,wt,2,0,6,1)),i=0,r=c.length;i=0?":"+this.c:"")+")"},u.c=0;var P1t=A(bc,"StackTraceElement",287);xzt={3:1,476:1,34:1,2:1};var At=A(bc,aft,2);T(100,381,{476:1},Sp,yT,ul);var pRe=A(bc,"StringBuffer",100);T(98,381,{476:1},om,Bb,ll);var gRe=A(bc,"StringBuilder",98);T(763,79,zZ,Uxt);var mRe=A(bc,"StringIndexOutOfBoundsException",763);T(1722,1,{});var I1t,R1t;T(46,54,{3:1,104:1,54:1,78:1,46:1},Oi,Tp);var bRe=A(bc,"UnsupportedOperationException",46);T(216,210,{3:1,34:1,210:1,216:1},IL,Lit),u.vd=function(e){return GNt(this,a(e,216))},u.$d=function(){return rw(p7t(this))},u.Fb=function(e){var n;return this===e?!0:ct(e,216)?(n=a(e,216),this.e==n.e&&GNt(this,n)==0):!1},u.Hb=function(){var e;return this.b!=0?this.b:this.a<54?(e=Ka(this.f),this.b=or(ns(e,-1)),this.b=33*this.b+or(ns(E1(e,32),-1)),this.b=17*this.b+Tr(this.e),this.b):(this.b=17*z6t(this.c)+Tr(this.e),this.b)},u.Ib=function(){return p7t(this)},u.a=0,u.b=0,u.d=0,u.e=0,u.f=0;var Fzt,b0,D1t,N1t,O1t,B1t,F1t,U1t,LK=A("java.math","BigDecimal",216);T(89,210,{3:1,34:1,210:1,89:1},Tut,Fp,Xv,Yut,tRt,y1),u.vd=function(e){return UIt(this,a(e,89))},u.$d=function(){return rw(lZ(this,0))},u.Fb=function(e){return Yat(this,e)},u.Hb=function(){return z6t(this)},u.Ib=function(){return lZ(this,0)},u.b=-2,u.c=0,u.d=0,u.e=0;var PK,eB,z1t,IK,nB,AE,X_=A("java.math","BigInteger",89),Uzt,zzt,gx,z4;T(441,1666,uE),u.Pb=function(){uu(this)},u.Qb=function(e){return dm(this,e)},u.Rb=function(e){return A6t(this,e,this.e)||A6t(this,e,this.d)},u.Tb=function(){return new xp(this)},u.Vb=function(e){return zi(this,e)},u.Zb=function(e,n){return wr(this,e,n)},u.$b=function(e){return IM(this,e)},u._b=function(){return nM(this)};var wRe=A(ii,"AbstractHashMap",441);T(242,bd,vl,xp),u.Pb=function(){this.a.Pb()},u.pc=function(e){return YAt(this,e)},u.tc=function(){return new qg(this.a)},u.vc=function(e){var n;return YAt(this,e)?(n=a(e,38).kc(),this.a.$b(n),!0):!1},u._b=function(){return this.a._b()};var vRe=A(ii,"AbstractHashMap/EntrySet",242);T(243,1,Cs,qg),u.gc=function(e){ks(this,e)},u.ic=function(){return Sm(this)},u.hc=function(){return this.b},u.jc=function(){R5t(this)},u.b=!1;var _Re=A(ii,"AbstractHashMap/EntrySetIterator",243);T(433,1,Cs,$3),u.gc=function(e){ks(this,e)},u.hc=function(){return N9(this)},u.ic=function(){return y4t(this)},u.jc=function(){Th(this)},u.b=0,u.c=-1;var yRe=A(ii,"AbstractList/IteratorImpl",433);T(94,433,kf,Gs),u.jc=function(){Th(this)},u.Bc=function(e){cd(this,e)},u.Cc=function(){return this.b>0},u.Dc=function(){return this.b},u.Ec=function(){return Hn(this.b>0),this.a.cd(this.c=--this.b)},u.Fc=function(){return this.b-1},u.Gc=function(e){Wv(this.c!=-1),this.a.hd(this.c,e)};var xRe=A(ii,"AbstractList/ListIteratorImpl",94);T(227,41,tx,C1),u.bd=function(e,n){t_(e,this.b),this.c.bd(this.a+e,n),++this.b},u.cd=function(e){return mi(e,this.b),this.c.cd(this.a+e)},u.gd=function(e){var n;return mi(e,this.b),n=this.c.gd(this.a+e),--this.b,n},u.hd=function(e,n){return mi(e,this.b),this.c.hd(this.a+e,n)},u._b=function(){return this.b},u.a=0,u.b=0;var MRe=A(ii,"AbstractList/SubList",227);T(352,bd,vl,Tv),u.Pb=function(){this.a.Pb()},u.pc=function(e){return this.a.Qb(e)},u.tc=function(){var e;return e=this.a.Tb().tc(),new g5(e)},u.vc=function(e){return this.a.Qb(e)?(this.a.$b(e),!0):!1},u._b=function(){return this.a._b()};var ERe=A(ii,"AbstractMap/1",352);T(542,1,Cs,g5),u.gc=function(e){ks(this,e)},u.hc=function(){return this.a.hc()},u.ic=function(){var e;return e=a(this.a.ic(),38),e.kc()},u.jc=function(){this.a.jc()};var SRe=A(ii,"AbstractMap/1/1",542);T(223,25,D_,vf),u.Pb=function(){this.a.Pb()},u.pc=function(e){return this.a.Rb(e)},u.tc=function(){var e;return e=this.a.Tb().tc(),new nm(e)},u._b=function(){return this.a._b()};var TRe=A(ii,"AbstractMap/2",223);T(321,1,Cs,nm),u.gc=function(e){ks(this,e)},u.hc=function(){return this.a.hc()},u.ic=function(){var e;return e=a(this.a.ic(),38),e.lc()},u.jc=function(){this.a.jc()};var CRe=A(ii,"AbstractMap/2/1",321);T(440,1,{440:1,38:1}),u.Fb=function(e){var n;return ct(e,38)?(n=a(e,38),au(this.d,n.kc())&&au(this.e,n.lc())):!1},u.kc=function(){return this.d},u.lc=function(){return this.e},u.Hb=function(){return oD(this.d)^oD(this.e)},u.mc=function(e){return pst(this,e)},u.Ib=function(){return this.d+"="+this.e};var ARe=A(ii,"AbstractMap/AbstractEntry",440);T(351,440,{440:1,351:1,38:1},F9);var kRe=A(ii,"AbstractMap/SimpleEntry",351);T(1672,1,eO),u.Fb=function(e){var n;return ct(e,38)?(n=a(e,38),au(this.kc(),n.kc())&&au(this.lc(),n.lc())):!1},u.Hb=function(){return oD(this.kc())^oD(this.lc())},u.Ib=function(){return this.kc()+"="+this.lc()};var LRe=A(ii,TOt,1672);T(1685,1666,EOt),u.Wc=function(e){return Zkt(this,e)},u.Qb=function(e){return sW(this,e)},u.Tb=function(){return new H8(this)},u.Vb=function(e){return Ua(Fat(this,e))},u.Xb=function(){return new Cv(this)};var PRe=A(ii,"AbstractNavigableMap",1685);T(668,bd,vl,H8),u.pc=function(e){return ct(e,38)&&Zkt(this.b,a(e,38))},u.tc=function(){return new aL(this.b)},u.vc=function(e){var n;return ct(e,38)?(n=a(e,38),D5t(this.b,n)):!1},u._b=function(){return this.b.c};var IRe=A(ii,"AbstractNavigableMap/EntrySet",668);T(488,bd,rft,Cv),u.wc=function(){return new F5(this)},u.Pb=function(){L5(this.a)},u.pc=function(e){return sW(this.a,e)},u.tc=function(){var e;return e=new aL(new Q5(this.a).b),new oT(e)},u.vc=function(e){return sW(this.a,e)?(cC(this.a,e),!0):!1},u._b=function(){return this.a.c};var RRe=A(ii,"AbstractNavigableMap/NavigableKeySet",488);T(489,1,Cs,oT),u.gc=function(e){ks(this,e)},u.hc=function(){return N9(this.a.a)},u.ic=function(){var e;return e=WW(this.a),e.kc()},u.jc=function(){GTt(this.a)};var DRe=A(ii,"AbstractNavigableMap/NavigableKeySet/1",489);T(1693,25,D_),u.nc=function(e){return RM(JM(this,e)),!0},u.oc=function(e){return En(e),ED(e!=this,"Can't add a queue to itself"),yo(this,e)},u.Pb=function(){for(;PV(this)!=null;);};var NRe=A(ii,"AbstractQueue",1693);T(407,25,{4:1,20:1,25:1,13:1},X3,XCt),u.nc=function(e){return fct(this,e),!0},u.Pb=function(){yct(this)},u.pc=function(e){return i6t(new aC(this),e)},u.Wb=function(){return Iit(this)},u.tc=function(){return new aC(this)},u.vc=function(e){return Loe(new aC(this),e)},u._b=function(){return this.c-this.b&this.a.length-1},u.wc=function(){return new Ei(this,272)},u.zc=function(e){var n,i;return i=this.c-this.b&this.a.length-1,e.lengthi&&Vr(e,i,null),e},u.b=0,u.c=0;var ORe=A(ii,"ArrayDeque",407);T(408,1,Cs,aC),u.gc=function(e){ks(this,e)},u.hc=function(){return this.a!=this.b},u.ic=function(){return XN(this)},u.jc=function(){ePt(this)},u.a=0,u.b=0,u.c=-1;var BRe=A(ii,"ArrayDeque/IteratorImpl",408);T(12,41,zOt,Dt,qu,Eh),u.bd=function(e,n){pm(this,e,n)},u.nc=function(e){return Ut(this,e)},u.oc=function(e){return Or(this,e)},u.Pb=function(){this.c=dt(un,te,1,0,5,1)},u.pc=function(e){return nc(this,e,0)!=-1},u.sc=function(e){pd(this,e)},u.cd=function(e){return Ee(this,e)},u.dd=function(e){return nc(this,e,0)},u.Wb=function(){return this.c.length==0},u.tc=function(){return new H(this)},u.gd=function(e){return Em(this,e)},u.vc=function(e){return Lc(this,e)},u.Jd=function(e,n){SAt(this,e,n)},u.hd=function(e,n){return Kl(this,e,n)},u._b=function(){return this.c.length},u.jd=function(e){gc(this,e)},u.yc=function(){return qW(this)},u.zc=function(e){return xo(this,e)};var P3e=A(ii,"ArrayList",12);T(7,1,Cs,H),u.gc=function(e){ks(this,e)},u.hc=function(){return Qo(this)},u.ic=function(){return G(this)},u.jc=function(){rC(this)},u.a=0,u.b=-1;var FRe=A(ii,"ArrayList/1",7);T(155,41,jOt,ju),u.pc=function(e){return KLt(this,e)!=-1},u.sc=function(e){var n,i,r,c;for(En(e),i=this.a,r=0,c=i.length;r=0},u.qc=function(e){return O1(this.b,e)},u.tc=function(){return new Dg(EM(this.b).b.tc())},u.vc=function(e){return gPt(this,e)},u._b=function(){return this.b.c.length},u.wc=function(){return new Ei(this,256)},u.yc=function(){return qW(this.b)},u.zc=function(e){return xo(this.b,e)};var k8e=A(ii,"PriorityQueue",453);T(214,1,{214:1},kq,fN),u.a=0,u.b=0;var V1t,q1t,N3e=0,L8e=A(ii,"Random",214);T(39,1,Wp,Ei,T2,L5t),u.qd=function(){return this.a},u.rd=function(){return wot(this),this.c},u.gc=function(e){wot(this),this.d.gc(e)},u.sd=function(e){return Qct(this,e)},u.a=0,u.c=0;var P8e=A(ii,"Spliterators/IteratorSpliterator",39);T(382,39,Wp,F5);var I8e=A(ii,"SortedSet/1",382);T(625,1,{},G8),u.ie=function(e){this.a.td(e)};var R8e=A(ii,"Spliterator/OfDouble/0methodref$accept$Type",625);T(626,1,{},W8),u.ie=function(e){this.a.td(e)};var D8e=A(ii,"Spliterator/OfDouble/1methodref$accept$Type",626);T(642,1,Wp),u.gc=function(e){D3t(this,e)},u.qd=function(){return this.d},u.rd=function(){return this.e},u.d=0,u.e=0;var N8e=A(ii,"Spliterators/BaseSpliterator",642);T(929,642,Wp),u.gc=function(e){ct(e,273)?jst(this,a(e,273)):jst(this,new W8(e))},u.sd=function(e){return ct(e,273)?Vv(this,a(e,273)):Vv(this,new G8(e))};var O8e=A(ii,"Spliterators/AbstractDoubleSpliterator",929);T(446,642,Wp);var B8e=A(ii,"Spliterators/AbstractSpliterator",446);T(790,1,Wp),u.gc=function(e){D3t(this,e)},u.qd=function(){return this.b},u.rd=function(){return this.d-this.c},u.b=0,u.c=0,u.d=0;var F8e=A(ii,"Spliterators/BaseArraySpliterator",790);T(791,790,Wp,S4t),u.gc=function(e){kse(this,e)},u.sd=function(e){return Uae(this,e)};var U8e=A(ii,"Spliterators/ArraySpliterator",791);T(789,1,Cs,M3t),u.gc=function(e){ct(e,273)?Hkt(this,a(e,273)):Hkt(this,new aT(e))},u.ic=function(){return pN(this)},u.jc=function(){Gxt()},u.ie=function(e){this.b=e},u.hc=function(){return this.a||(this.a=Vv(this.c,this)),this.a},u.a=!1,u.b=0;var z8e=A(ii,"Spliterators/DoubleConsumerIterator",789);T(523,41,GOt,nd),u.bd=function(e,n){nC(e,this.a.c.length+1),pm(this.a,e,n)},u.nc=function(e){return Ut(this.a,e)},u.oc=function(e){return Or(this.a,e)},u.Pb=function(){this.a.c=dt(un,te,1,0,5,1)},u.pc=function(e){return nc(this.a,e,0)!=-1},u.qc=function(e){return O1(this.a,e)},u.sc=function(e){pd(this.a,e)},u.cd=function(e){return nC(e,this.a.c.length),Ee(this.a,e)},u.dd=function(e){return nc(this.a,e,0)},u.Wb=function(){return this.a.c.length==0},u.tc=function(){return new H(this.a)},u.gd=function(e){return nC(e,this.a.c.length),Em(this.a,e)},u.Jd=function(e,n){SAt(this.a,e,n)},u.hd=function(e,n){return nC(e,this.a.c.length),Kl(this.a,e,n)},u._b=function(){return this.a.c.length},u.jd=function(e){gc(this.a,e)},u.kd=function(e,n){return new C1(this.a,e,n)},u.yc=function(){return qW(this.a)},u.zc=function(e){return xo(this.a,e)},u.Ib=function(){return Gp(this.a)};var j8e=A(ii,"Vector",523);T(596,523,GOt,OG);var H8e=A(ii,"Stack",596);T(254,1,{},Mm),u.Ib=function(){return this.a?this.e.length==0?this.a.a:this.a.a+(""+this.e):this.c};var G8e=A(ii,"StringJoiner",254);T(487,1685,{3:1,109:1,122:1,115:1},rMt,x$),u.Pb=function(){L5(this)},u.Tb=function(){return new Q5(this)},u.Zb=function(e,n){return $N(this,e,n)},u.$b=function(e){return cC(this,e)},u._b=function(){return this.c},u.c=0;var W8e=A(ii,"TreeMap",487);T(397,1,Cs,aL),u.gc=function(e){ks(this,e)},u.ic=function(){return WW(this)},u.hc=function(){return N9(this.a)},u.jc=function(){GTt(this)};var $8e=A(ii,"TreeMap/EntryIterator",397);T(449,668,vl,Q5),u.Pb=function(){L5(this.a)};var V8e=A(ii,"TreeMap/EntrySet",449);T(398,351,{440:1,351:1,38:1,398:1},vV),u.b=!1;var O3e=A(ii,"TreeMap/Node",398);T(560,1,{},it),u.Ib=function(){return"State: mv="+this.c+" value="+this.d+" done="+this.a+" found="+this.b},u.a=!1,u.b=!1,u.c=!1;var q8e=A(ii,"TreeMap/State",560);T(278,23,$Z,U9),u.je=function(){return!1},u.ke=function(){return!1};var RK,X1t,Z1t,Y1t,rB=Ri(ii,"TreeMap/SubMapType",278,ji,Lce,Fne);T(982,278,$Z,VEt),u.ke=function(){return!0};var X8e=Ri(ii,"TreeMap/SubMapType/1",982,rB,null,null);T(983,278,$Z,iSt),u.je=function(){return!0},u.ke=function(){return!0};var Z8e=Ri(ii,"TreeMap/SubMapType/2",983,rB,null,null);T(984,278,$Z,qEt),u.je=function(){return!0};var Y8e=Ri(ii,"TreeMap/SubMapType/3",984,rB,null,null),qzt;T(212,bd,{3:1,20:1,25:1,13:1,196:1,19:1,60:1,212:1},dit,Ub),u.wc=function(){return new F5(this)},u.nc=function(e){return VD(this,e)},u.Pb=function(){L5(this.a)},u.pc=function(e){return sW(this.a,e)},u.tc=function(){var e;return e=new aL(new Q5(new Cv(this.a).a).b),new oT(e)},u.vc=function(e){return Qrt(this,e)},u._b=function(){return this.a.c};var B3e=A(ii,"TreeSet",212);T(845,1,{},Kj),u.le=function(e,n){return ane(this.a,e,n)};var K8e=A(VZ,"BinaryOperator/lambda$0$Type",845);T(846,1,{},wn),u.le=function(e,n){return Lp(a(e,21).a,a(n,21).a)<=0?e:n};var J8e=A(VZ,"BinaryOperator/lambda$1$Type",846);T(843,1,ys,ut),u.Kb=function(e){return e};var Q8e=A(VZ,"Function/lambda$0$Type",843);T(627,1,us,V8),u.Nb=function(e){return!this.a.Nb(e)};var t9e=A(VZ,"Predicate/lambda$0$Type",627);T(150,23,{3:1,34:1,23:1,150:1},oW);var K1t,Qh,bw,tf=Ri(Qs,"Collector/Characteristics",150,ji,joe,Une),Xzt;T(684,1,{},VTt,f8t);var e9e=A(Qs,"Collector/CollectorImpl",684);T(1053,1,ys,Jj),u.Kb=function(e){return me(),!!bct(e)};var n9e=A(Qs,"Collectors/12methodref$test$Type",1053);T(365,1,{},ge),u.Kd=function(e,n){a(e,13).nc(n)};var i9e=A(Qs,"Collectors/20methodref$add$Type",365);T(367,1,{},Pe),u.ne=function(){return new Dt};var r9e=A(Qs,"Collectors/21methodref$ctor$Type",367);T(331,1,{},ti),u.ne=function(){return new $r};var s9e=A(Qs,"Collectors/23methodref$ctor$Type",331);T(332,1,{},Qn),u.Kd=function(e,n){Ir(a(e,67),n)};var o9e=A(Qs,"Collectors/24methodref$add$Type",332);T(1050,1,{},Yi),u.le=function(e,n){return sMt(a(e,15),a(n,13))};var c9e=A(Qs,"Collectors/4methodref$addAll$Type",1050);T(683,1,{},ki),u.le=function(e,n){return ict(e,n)};var a9e=A(Qs,"Collectors/lambda$1$Type",683);T(1055,1,{},Qj),u.ne=function(){return Y(Z(un,1),te,1,5,[this.a])};var u9e=A(Qs,"Collectors/lambda$10$Type",1055);T(1056,1,{},w5),u.Kd=function(e,n){yre(this.a,e)};var l9e=A(Qs,"Collectors/lambda$11$Type",1056);T(1057,1,{},X8),u.le=function(e,n){return qre(this.a,e,n)};var h9e=A(Qs,"Collectors/lambda$12$Type",1057);T(1058,1,ys,lr),u.Kb=function(e){return s_(e)[0]};var f9e=A(Qs,"Collectors/lambda$13$Type",1058);T(366,1,{},pr),u.le=function(e,n){return a(e,13).oc(a(n,13)),a(e,13)};var d9e=A(Qs,"Collectors/lambda$21$Type",366);T(333,1,{},Kt),u.le=function(e,n){return yo(a(e,67),a(n,67)),a(e,67)};var p9e=A(Qs,"Collectors/lambda$25$Type",333);T(334,1,ys,kt),u.Kb=function(e){return a(e,67)};var g9e=A(Qs,"Collectors/lambda$26$Type",334);T(1049,1,{},tH),u.Kd=function(e,n){qle(this.a,e,n)};var m9e=A(Qs,"Collectors/lambda$3$Type",1049);T(1051,1,{},Nt),u.le=function(e,n){return Rle(a(e,109),a(n,109),new Yi)};var b9e=A(Qs,"Collectors/lambda$4$Type",1051);T(1052,1,ys,eH),u.Kb=function(e){return tfe(this.a,e)};var w9e=A(Qs,"Collectors/lambda$5$Type",1052);T(1054,1,{},ie),u.ne=function(){var e;return e=new xm,Pm(e,(me(),me(),!1),new Dt),Pm(e,!0,new Dt),e};var v9e=A(Qs,"Collectors/lambda$8$Type",1054);T(645,1,{}),u.d=!1;var _9e=A(Qs,"TerminatableStream",645);T(1416,645,{607:1,1701:1},QSt);var y9e=A(Qs,"DoubleStream/DoubleStreamSource",1416);T(1417,1,{},nH),u.ie=function(e){FIt(this.a,e)};var x9e=A(Qs,"DoubleStream/DoubleStreamSource/lambda$2$Type",1417),F3e=Sr(Qs,"Stream");T(940,446,Wp,DTt),u.sd=function(e){for(;iue(this);){if(this.a.sd(e))return!0;this.a=null}return!1};var M9e=A(Qs,"Stream/2",940);T(941,1,{},iH),u.td=function(e){Fee(this.a,e)};var E9e=A(Qs,"Stream/2/lambda$0$Type",941);T(942,1,qP,rH),u.fe=function(){B$(this.a)};var S9e=A(Qs,"Stream/3methodref$close$Type",942);T(943,1,qP,sH),u.fe=function(){B$(this.a)};var T9e=A(Qs,"Stream/4methodref$close$Type",943);T(644,446,Wp,Fct),u.sd=function(e){for(this.b=!1;!this.b&&this.c.sd(new bMt(this,e)););return this.b},u.b=!1;var C9e=A(Qs,"Stream/FilterSpliterator",644);T(932,1,{},bMt),u.td=function(e){Xre(this.a,this.b,e)};var A9e=A(Qs,"Stream/FilterSpliterator/lambda$0$Type",932);T(930,929,Wp,n5t);var k9e=A(Qs,"Stream/MapToDoubleSpliterator",930);T(646,1,{},ort),u.td=function(e){Ste(this.a,this.b,e)};var L9e=A(Qs,"Stream/MapToDoubleSpliterator/lambda$0$Type",646);T(643,446,Wp,Rct),u.sd=function(e){return BTt(this,e)};var P9e=A(Qs,"Stream/MapToObjSpliterator",643);T(931,1,{},wMt),u.td=function(e){Tte(this.a,this.b,e)};var I9e=A(Qs,"Stream/MapToObjSpliterator/lambda$0$Type",931);T(45,645,{607:1,1701:1,1700:1},gi);var R9e=A(Qs,"Stream/StreamSource",45);T(936,446,Wp,NTt),u.sd=function(e){for(;rue(this);){if(this.a.sd(e))return!0;B$(this.b),this.b=null,this.a=null}return!1};var D9e=A(Qs,"Stream/StreamSource/1",936);T(937,1,{},oH),u.td=function(e){hre(this.a,e)};var N9e=A(Qs,"Stream/StreamSource/1/lambda$0$Type",937);T(938,446,Wp,D4t),u.sd=function(e){var n;return this.a||(n=new Dt,this.b.a.gc(new cH(n)),we(),gc(n,this.c),this.a=new Ei(n,16)),Qct(this.a,e)},u.a=null;var O9e=A(Qs,"Stream/StreamSource/5",938);T(939,1,{},cH),u.td=function(e){Ut(this.a,e)};var B9e=A(Qs,"Stream/StreamSource/5/2methodref$add$Type",939);T(933,1,{},yt),u.td=function(e){};var F9e=A(Qs,"Stream/StreamSource/lambda$0$Type",933);T(934,1,{},aH),u.le=function(e,n){return yee(this.a,e,n)};var U9e=A(Qs,"Stream/StreamSource/lambda$3$Type",934);T(935,1,{},vMt),u.td=function(e){tee(this.b,this.a,e)};var z9e=A(Qs,"Stream/StreamSource/lambda$4$Type",935);T(553,1,{},ue),u.td=function(e){F8(this,e)};var j9e=A(Qs,"Stream/ValueConsumer",553);T(944,1,{},uH),u.td=function(e){Ule(this.a,e)};var H9e=A(Qs,"TerminatableStream/lambda$0$Type",944),U3e=0,J1t,Q1t=0,sB;T(1480,1,{},ykt);var G9e=A($Ot,"Scanline",1480),z3e=Sr($Ot,VOt);T(1450,1,{},yLt);var W9e=A(vd,"CGraph",1450);T(309,1,{309:1},MAt),u.b=0,u.c=0,u.d=0,u.g=0,u.i=0,u.k=Ps;var $9e=A(vd,"CGroup",309);T(723,1,{},pit);var V9e=A(vd,"CGroup/CGroupBuilder",723);T(57,1,{57:1},hTt),u.Ib=function(){return this.j?hi(this.j.Kb(this)):(Vd(oB),oB.o+"@"+(lm(this)>>>0).toString(16))},u.f=0,u.i=Ps;var oB=A(vd,"CNode",57);T(722,1,{},git);var q9e=A(vd,"CNode/CNodeBuilder",722),Zzt;T(1236,1,{},fn),u.se=function(e,n){return 0},u.te=function(e,n){return 0};var X9e=A(vd,XOt,1236);T(1505,1,{},An),u.pe=function(e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W;for(v=is,r=new H(e.a.b);r.ar.d.c||r.d.c==l.d.c&&r.d.b=0?"b"+e+"["+uV(this.a)+"]":"b["+uV(this.a)+"]"):"b_"+lm(this)};var eNe=A(ZP,"FBendpoint",497);T(262,131,{3:1,262:1,93:1,131:1},mTt),u.Ib=function(){return uV(this)};var nNe=A(ZP,"FEdge",262);T(202,131,{3:1,202:1,93:1,131:1},bN);var H3e=A(ZP,"FGraph",202);T(454,329,{3:1,454:1,329:1,93:1,131:1},_kt),u.Ib=function(){return this.b==null||this.b.length==0?"l["+uV(this.a)+"]":"l_"+this.b};var iNe=A(ZP,"FLabel",454);T(146,329,{3:1,146:1,329:1,93:1,131:1},o4t),u.Ib=function(){return act(this)},u.b=0;var rNe=A(ZP,"FNode",146);T(1691,1,{}),u.Ee=function(e){Pht(this,e)},u.Fe=function(){ORt(this)},u.d=0;var sNe=A(Ift,"AbstractForceModel",1691);T(568,1691,{568:1},qPt),u.De=function(e,n){var i,r,c,l,f;return _9t(this.f,e,n),c=za(Xc(n.d),e.d),f=y.Math.sqrt(c.a*c.a+c.b*c.b),r=y.Math.max(0,f-O$(e.e)/2-O$(n.e)/2),i=e6t(this.e,e,n),i>0?l=-ese(r,this.c)*i:l=Jee(r,this.b)*a(z(e,(Ph(),kE)),21).a,hl(c,l/f),c},u.Ee=function(e){Pht(this,e),this.a=a(z(e,(Ph(),fB)),21).a,this.c=lt(Yt(z(e,dB))),this.b=lt(Yt(z(e,WK)))},u.Ge=function(e){return e0&&(l-=LQt(r,this.a)*i),hl(c,l*this.b/f),c},u.Ee=function(e){var n,i,r,c,l,f,g;for(Pht(this,e),this.b=lt(Yt(z(e,(Ph(),$K)))),this.c=this.b/a(z(e,fB),21).a,r=e.e.c.length,l=0,c=0,g=new H(e.e);g.a0},u.a=0,u.b=0,u.c=0;var cNe=A(Ift,"FruchtermanReingoldModel",569);T(748,1,_d,fj),u.ue=function(e){He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,hO),""),"Force Model"),"Determines the model for force calculation."),Tgt),(i0(),xs)),Cgt),qe((t0(),On))))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Rft),""),"Iterations"),"The number of iterations on the force model."),Xt(300)),Pa),Io),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Dft),""),"Repulsive Power"),"Determines how many bend points are added to the edge; such bend points are regarded as repelling particles in the force model"),Xt(0)),Pa),Io),qe(Md)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,sY),""),"FR Temperature"),"The temperature is used as a scaling factor for particle displacements."),op),ha),To),qe(On)))),Sa(e,sY,hO,xjt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,oY),""),"Eades Repulsion"),"Factor for repulsive forces in Eades' model."),5),ha),To),qe(On)))),Sa(e,oY,hO,vjt),W7t((new pj,e))};var mjt,bjt,Tgt,wjt,vjt,_jt,yjt,xjt,aNe=A(m4,"ForceMetaDataProvider",748);T(387,23,{3:1,34:1,23:1,387:1},hrt);var GK,hB,Cgt=Ri(m4,"ForceModelStrategy",387,ji,loe,Wne),Mjt;T(880,1,_d,pj),u.ue=function(e){W7t(e)};var Ejt,Agt,fB,kgt,Sjt,Lgt,Pgt,kE,Tjt,WK,Igt,Cjt,Ajt,dB,$K,uNe=A(m4,"ForceOptions",880);T(881,1,{},sv),u.Be=function(){var e;return e=new mit,e},u.Ce=function(e){};var lNe=A(m4,"ForceOptions/ForceFactory",881),x6,H4,mx,pB;T(749,1,_d,v8),u.ue=function(e){He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Bft),""),"Fixed Position"),"Prevent that the node is moved by the layout algorithm."),(me(),me(),!1)),(i0(),Ec)),ho),qe((t0(),vc))))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Fft),""),"Desired Edge Length"),"Either specified for parent nodes or for individual edges, where the latter takes higher precedence."),100),ha),To),ur(On,Y(Z(Jp,1),jt,163,0,[Md]))))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Uft),""),"Layout Dimension"),"Dimensions that are permitted to be altered during layout."),Rgt),xs),Ugt),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,zft),""),"Stress Epsilon"),"Termination criterion for the iterative process."),op),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,jft),""),"Iteration Limit"),"Maximum number of performed iterations. Takes higher precedence than 'epsilon'."),Xt(qi)),Pa),Io),qe(On)))),u7t((new dj,e))};var kjt,Ljt,Rgt,Pjt,Ijt,Rjt,hNe=A(m4,"StressMetaDataProvider",749);T(884,1,_d,dj),u.ue=function(e){u7t(e)};var gB,Dgt,Ngt,Ogt,Bgt,Fgt,fNe=A(m4,"StressOptions",884);T(885,1,{},z0),u.Be=function(){var e;return e=new bTt,e},u.Ce=function(e){};var dNe=A(m4,"StressOptions/StressFactory",885);T(959,244,O_,bTt),u.Ae=function(e,n){var i,r,c,l;for(di(n,pBt,1),lt(de(cn(e,(zL(),Bgt))))||t9t(new mit,e,Ta(n,1)),r=w6t(e),i=YNt(this.a,r),l=i.tc();l.hc();)c=a(l.ic(),202),q_e(this.b,c),U0e(this.b);r=aOt(i),rOt(r),Vn(n)};var pNe=A(uY,"StressLayoutProvider",959);T(882,1,{},DG),u.c=0,u.e=0,u.g=0;var gNe=A(uY,"StressMajorization",882);T(348,23,{3:1,34:1,23:1,348:1},cW);var VK,qK,XK,Ugt=Ri(uY,"StressMajorization/Dimension",348,ji,Joe,$ne),Djt;T(883,1,jr,kv),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return wne(this.a,e,n)};var mNe=A(uY,"StressMajorization/lambda$0$Type",883);T(985,1,{},NAt);var bNe=A(JP,"ElkLayered",985);T(986,1,{},Us),u.td=function(e){mue(this.a,e)};var wNe=A(JP,"ElkLayered/lambda$0$Type",986);T(987,1,{},j0),u.td=function(e){Ct(a(e,31),(qt(),qB),(BM(),BB))};var vNe=A(JP,"ElkLayered/lambda$1$Type",987);T(1033,1,{},sSt);var Njt,Ojt,Bjt,_Ne=A(JP,"GraphConfigurator",1033);T(958,244,O_,yu),u.Ae=function(e,n){var i;i=Swe(new SEt,e),zt(cn(e,(qt(),Q4)))===zt((Kg(),Dx))?Hhe(this.a,i,n):Y0e(this.a,i,n),iOt(new _8,i)};var yNe=A(JP,"LayeredLayoutProvider",958);T(328,23,{3:1,34:1,23:1,328:1},U5);var Of,bx,aa,ua,Yo,zgt=Ri(JP,"LayeredPhases",328,ji,cae,Vne),Fjt;T(1407,1,{},zPt),u.i=0;var Ujt,xNe=A(QP,"ComponentsToCGraphTransformer",1407),zjt;T(1408,1,{},ov),u.He=function(e,n){return y.Math.min(e.a!=null?lt(e.a):e.c.i,n.a!=null?lt(n.a):n.c.i)},u.Ie=function(e,n){return y.Math.min(e.a!=null?lt(e.a):e.c.i,n.a!=null?lt(n.a):n.c.i)};var MNe=A(QP,"ComponentsToCGraphTransformer/1",1408);T(80,1,{80:1}),u.i=0,u.k=!0,u.o=Ps;var ZK=A(w4,"CNode",80);T(282,80,{282:1,80:1},nst,Eut),u.Ib=function(){return""};var ENe=A(QP,"ComponentsToCGraphTransformer/CRectNode",282);T(1391,1,{},vg);var YK,KK,SNe=A(QP,"OneDimensionalComponentsCompaction",1391);T(1392,1,rh,cv),u.Fb=function(e){return this===e},u.Kb=function(e){return vq(),me(),a(a(e,48).a,80).d.e!=0};var TNe=A(QP,"OneDimensionalComponentsCompaction/lambda$0$Type",1392);T(1393,1,rh,l3),u.Fb=function(e){return this===e},u.Kb=function(e){return vq(),me(),!!(bIt(a(a(e,48).a,80).j,a(a(e,48).b,110))||a(a(e,48).a,80).d.e!=0&&bIt(a(a(e,48).a,80).j,a(a(e,48).b,110)))};var CNe=A(QP,"OneDimensionalComponentsCompaction/lambda$1$Type",1393);T(1410,1,{},s4t);var ANe=A(w4,"CGraph",1410);T(172,1,{172:1},Dq),u.b=0,u.c=0,u.e=0,u.g=!0,u.i=Ps;var kNe=A(w4,"CGroup",172);T(1409,1,{},Rt),u.He=function(e,n){return y.Math.max(e.a!=null?lt(e.a):e.c.i,n.a!=null?lt(n.a):n.c.i)},u.Ie=function(e,n){return y.Math.max(e.a!=null?lt(e.a):e.c.i,n.a!=null?lt(n.a):n.c.i)};var LNe=A(w4,XOt,1409);T(1411,1,{},N9t),u.d=!1;var jjt,JK=A(w4,KOt,1411);T(1412,1,rh,ve),u.Fb=function(e){return this===e},u.Kb=function(e){return $it(),me(),a(a(e,48).a,80).d.e!=0};var PNe=A(w4,JOt,1412);T(726,1,{},oot),u.a=!1,u.b=!1,u.c=!1,u.d=!1;var INe=A(w4,QOt,726);T(1521,1,{},RCt);var RNe=A(pO,tBt,1521),M6=Sr(u0,VOt);T(1522,1,{341:1},$4t),u.Ne=function(e){dwe(this,a(e,524))};var DNe=A(pO,eBt,1522);T(1523,1,jr,Je),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return ro(a(e,282).g.c+a(e,282).g.b/2,a(n,282).g.c+a(n,282).g.b/2)};var NNe=A(pO,nBt,1523);T(524,1,{524:1},frt),u.a=!1;var ONe=A(pO,iBt,524);T(1524,1,jr,tn),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return $pe(e,n)};var BNe=A(pO,rBt,1524);T(102,1,{102:1},aM,Yst),u.Fb=function(e){var n;return e==null||G3e!=fu(e)?!1:(n=a(e,102),au(this.c,n.c)&&au(this.d,n.d))},u.Hb=function(){return sq(Y(Z(un,1),te,1,5,[this.c,this.d]))},u.Ib=function(){return"("+this.c+Rc+this.d+(this.a?"cx":"")+this.b+")"},u.a=!0,u.c=0,u.d=0;var G3e=A(u0,"Point",102);T(373,23,{3:1,34:1,23:1,373:1},G9);var Xm,ww,Y_,vw,Hjt=Ri(u0,"Point/Quadrant",373,ji,Pce,qne),Gjt;T(1398,1,{},sm),u.b=null,u.c=null,u.d=null,u.e=null,u.f=null;var Wjt,$jt,Vjt,qjt,Xjt,FNe=A(u0,"RectilinearConvexHull",1398);T(516,1,{341:1},d7),u.Ne=function(e){sue(this,a(e,102))},u.b=0;var jgt,UNe=A(u0,"RectilinearConvexHull/MaximalElementsEventHandler",516);T(1400,1,jr,Hi),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Vit(),ro(lt(Yt(e)),lt(Yt(n)))};var zNe=A(u0,"RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type",1400);T(1399,1,{341:1},xLt),u.Ne=function(e){jbe(this,a(e,102))},u.a=0,u.b=null,u.c=null,u.d=null,u.e=null;var jNe=A(u0,"RectilinearConvexHull/RectangleEventHandler",1399);T(1401,1,jr,Pr),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return vC(),a(e,102).c==a(n,102).c?ro(a(n,102).d,a(e,102).d):ro(a(e,102).c,a(n,102).c)};var HNe=A(u0,"RectilinearConvexHull/lambda$0$Type",1401);T(1402,1,jr,Gr),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return vC(),a(e,102).c==a(n,102).c?ro(a(e,102).d,a(n,102).d):ro(a(e,102).c,a(n,102).c)};var GNe=A(u0,"RectilinearConvexHull/lambda$1$Type",1402);T(1403,1,jr,Ze),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return vC(),a(e,102).c==a(n,102).c?ro(a(n,102).d,a(e,102).d):ro(a(n,102).c,a(e,102).c)};var WNe=A(u0,"RectilinearConvexHull/lambda$2$Type",1403);T(1404,1,jr,hs),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return vC(),a(e,102).c==a(n,102).c?ro(a(e,102).d,a(n,102).d):ro(a(n,102).c,a(e,102).c)};var $Ne=A(u0,"RectilinearConvexHull/lambda$3$Type",1404);T(1405,1,jr,Fs),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return uge(e,n)};var VNe=A(u0,"RectilinearConvexHull/lambda$4$Type",1405);T(1406,1,{},xkt);var qNe=A(u0,"Scanline",1406);T(1694,1,{});var XNe=A(K1,"AbstractGraphPlacer",1694);T(458,1,{458:1},fCt);var ps,ZNe=A(K1,"ComponentGroup",458);T(1076,1694,{},M9),u.Oe=function(e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$;if(this.a.c=dt(un,te,1,0,5,1),n.a.c=dt(un,te,1,0,5,1),e.Wb()){n.e.a=0,n.e.b=0;return}for(f=a(e.cd(0),31),Uo(n,f),c=e.tc();c.hc();)r=a(c.ic(),31),Vhe(this,r);for($=new go,l=lt(Yt(z(f,(qt(),ZJ)))),v=new H(this.a);v.aO&&(Gt=0,Zt+=R+c,R=0),nt=f.c,kP(f,Gt+nt.a,Zt+nt.b),Gh(nt),i=y.Math.max(i,Gt+pt.a),R=y.Math.max(R,pt.b),Gt+=pt.a+c;if(n.e.a=i,n.e.b=Zt+R,lt(de(z(l,GJ)))){for(r=new Ms,pOt(r,e,c),k=e.tc();k.hc();)M=a(k.ic(),31),sr(Gh(M.c),r.e);sr(Gh(n.e),r.a)}H5t(n,e)};var o7e=A(K1,"SimpleRowGraphPlacer",1074);T(1075,1,jr,Tc),u.Ld=function(e,n){return xle(a(e,31),a(n,31))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var c7e=A(K1,"SimpleRowGraphPlacer/1",1075),Zjt;T(1032,1,sh,rl),u.Mb=function(e){var n;return n=a(z(a(e,234).b,(qt(),Ro)),74),!!n&&n.b!=0},u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)};var a7e=A(gO,"CompoundGraphPostprocessor/1",1032);T(1031,1,Br,EEt),u.Pe=function(e,n){ERt(this,a(e,31),n)};var u7e=A(gO,"CompoundGraphPreprocessor",1031);T(400,1,{400:1},J6t),u.c=!1;var l7e=A(gO,"CompoundGraphPreprocessor/ExternalPort",400);T(234,1,{234:1},CD),u.Ib=function(){return nL(this.c)+":"+BLt(this.b)};var h7e=A(gO,"CrossHierarchyEdge",234);T(687,1,jr,Z8),u.Ld=function(e,n){return Ape(this,a(e,234),a(n,234))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var f7e=A(gO,"CrossHierarchyEdgeComparator",687);T(279,131,{3:1,279:1,93:1,131:1}),u.o=0;var d7e=A(oa,"LGraphElement",279);T(14,279,{3:1,14:1,279:1,93:1,131:1},Np),u.Ib=function(){return BLt(this)};var Tl=A(oa,"LEdge",14);T(31,279,{3:1,20:1,31:1,279:1,93:1,131:1},fat),u.sc=function(e){vo(this,e)},u.tc=function(){return new H(this.b)},u.Ib=function(){return this.b.c.length==0?"G-unlayered"+Gp(this.a):this.a.c.length==0?"G-layered"+Gp(this.b):"G[layerless"+Gp(this.a)+", layers"+Gp(this.b)+"]"};var Yjt=A(oa,"LGraph",31);T(591,1,{}),u.Qe=function(){return this.e.k},u.xe=function(e){return z(this.e,e)},u.Re=function(){return this.e.n},u.Se=function(){return this.e.o},u.ye=function(e){return Wb(this.e,e)},u.Te=function(e){this.e.k.a=e.a,this.e.k.b=e.b},u.Ue=function(e){this.e.n.a=e.a,this.e.n.b=e.b},u.Ve=function(e){this.e.o=e};var p7e=A(oa,"LGraphAdapters/AbstractLShapeAdapter",591);T(520,1,{741:1},xh),u.We=function(){var e,n;if(!this.b)for(this.b=od(this.a.b.c.length),n=new H(this.a.b);n.a0&&WPt(e.charCodeAt(n-1),vBt);)--n;if(l "+this.a+" "+nL(this.c)},u.a=0,u.b=0,u.d=0;var VBe=A(Dn,"SplineSelfLoopRouter/LoopPadding",188);T(1294,1,sh,wCt),u.Mb=function(e){return pde(this,a(e,188))},u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)},u.a=0,u.c=0;var qBe=A(Dn,"SplineSelfLoopRouter/LoopPadding/EnclosingPredicate",1294);T(1293,1,jr,By),u.Ld=function(e,n){return Ote(a(e,188),a(n,188))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var XBe=A(Dn,"SplineSelfLoopRouter/LoopPadding/MarginComparator",1293);T(415,1,sh,Nb),u.Mb=function(e){return a(e,188).c==this.a},u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)};var ZBe=A(Dn,"SplineSelfLoopRouter/LoopPadding/PortSidePredicate",415);T(414,1,{414:1},dkt),u.c=0,u.d=0,u.e=0;var YBe=A(Dn,"SplineSelfLoopRouter/SelfLoopEdge",414);T(1292,1,jr,Ek),u.Ld=function(e,n){return YQt(a(e,414),a(n,414))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var KBe=A(Dn,"SplineSelfLoopRouter/SelfLoopEdge/StepSizeComparator",1292);T(1451,715,{},CPt),u.qe=function(e){var n,i,r,c;switch(this.c=e,this.a.g){case 2:n=new Dt,qc(wo(new gi(null,new Ei(this.c.a.b,16)),new Uy),new PMt(this,n)),vP(this,new Ck),pd(n,new Sk),n.c=dt(un,te,1,0,5,1),qc(wo(new gi(null,new Ei(this.c.a.b,16)),new Yf),new t9(n)),vP(this,new Uu),pd(n,new T3),n.c=dt(un,te,1,0,5,1),i=tSt(TPt(vL(new gi(null,new Ei(this.c.a.b,16)),new hT(this))),new pf),qc(new gi(null,new Ei(this.c.a.a,16)),new SMt(i,n)),vP(this,new NS),pd(n,new V0),n.c=dt(un,te,1,0,5,1);break;case 3:r=new Dt,vP(this,new Fy),c=tSt(TPt(vL(new gi(null,new Ei(this.c.a.b,16)),new xH(this))),new Tk),qc(wo(new gi(null,new Ei(this.c.a.b,16)),new S3),new LMt(c,r)),vP(this,new pv),pd(r,new OS),r.c=dt(un,te,1,0,5,1);break;default:throw K(new mt)}},u.b=0;var JBe=A(Kr,"EdgeAwareScanlineConstraintCalculation",1451);T(1452,1,sh,Fy),u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)},u.Mb=function(e){return ct(a(e,57).g,153)};var QBe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$0$Type",1452);T(1453,1,{},xH),u.oe=function(e){return T0e(this.a,e)};var tFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$1$Type",1453);T(1464,1,{},Sk),u.td=function(e){a(e,340).fe()};var eFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$10$Type",1464);T(1465,1,us,Yf),u.Nb=function(e){return ct(a(e,57).g,8)};var nFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$11$Type",1465);T(1467,1,{},t9),u.td=function(e){cfe(this.a,e)};var iFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$12$Type",1467);T(1468,1,sh,Uu),u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)},u.Mb=function(e){return ct(a(e,57).g,8)};var rFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$13$Type",1468);T(1469,1,{},T3),u.td=function(e){a(e,340).fe()};var sFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$14$Type",1469);T(1470,1,{},hT),u.oe=function(e){return C0e(this.a,e)};var oFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$15$Type",1470);T(1471,1,{},pf),u.me=function(){return 0};var cFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$16$Type",1471);T(1473,1,{},SMt),u.td=function(e){Ure(this.a,this.b,e)},u.a=0;var aFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$17$Type",1473);T(1474,1,sh,NS),u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)},u.Mb=function(e){return!0};var uFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$18$Type",1474);T(1475,1,{},V0),u.td=function(e){a(e,340).fe()};var lFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$19$Type",1475);T(1454,1,{},Tk),u.me=function(){return 0};var hFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$2$Type",1454);T(1456,1,qP,TMt),u.fe=function(){VC(this.b,this.a,-1)},u.a=0;var fFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$20$Type",1456);T(1461,1,qP,CMt),u.fe=function(){VC(this.a,this.b,-1)},u.b=0;var dFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$21$Type",1461);T(1466,1,qP,AMt),u.fe=function(){VC(this.b,this.a,-1)},u.a=0;var pFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$22$Type",1466);T(1472,1,qP,kMt),u.fe=function(){oDt(this.a,this.b,-1)},u.b=0;var gFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$23$Type",1472);T(1455,1,us,S3),u.Nb=function(e){return ct(a(e,57).g,8)};var mFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$3$Type",1455);T(1457,1,{},LMt),u.td=function(e){zre(this.a,this.b,e)},u.a=0;var bFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$4$Type",1457);T(1458,1,sh,pv),u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)},u.Mb=function(e){return!0};var wFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$5$Type",1458);T(1459,1,{},OS),u.td=function(e){a(e,340).fe()};var vFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$6$Type",1459);T(1460,1,us,Uy),u.Nb=function(e){return ct(a(e,57).g,153)};var _Fe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$7$Type",1460);T(1462,1,{},PMt),u.td=function(e){kue(this.a,this.b,e)};var yFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$8$Type",1462);T(1463,1,sh,Ck),u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)},u.Mb=function(e){return ct(a(e,57).g,153)};var xFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$9$Type",1463);T(1232,1,Br,ISt),u.Pe=function(e,n){wye(this,a(e,31),n)};var rHt,MFe=A(Kr,"HorizontalGraphCompactor",1232);T(1233,1,{},n2),u.se=function(e,n){var i,r,c;return zt(z(this.a.a,(qt(),ig)))===zt((gd(),rb))&&(ct(e.g,153)&&ct(n.g,8)||ct(n.g,153)&&ct(e.g,8))?lt(de(z(this.a.a,ZB)))?0:10:Vct(e,n)||(i=Qv(e),r=Qv(n),i&&i.j==(Ke(),rs)||r&&r.j==(Ke(),rs))?0:(c=a(z(this.a.a,(Ft(),yw)),266),jee(c,i?i.j:(Ke(),Hr),r?r.j:(Ke(),Hr)))},u.te=function(e,n){var i,r,c;return Vct(e,n)?1:(i=Qv(e),r=Qv(n),c=a(z(this.a.a,(Ft(),yw)),266),est(c,i?i.j:(Ke(),Hr),r?r.j:(Ke(),Hr)))};var EFe=A(Kr,"HorizontalGraphCompactor/1",1233);T(1234,1,{},gf),u.re=function(e,n){return ST(),e.a.i==0};var SFe=A(Kr,"HorizontalGraphCompactor/lambda$0$Type",1234);T(1235,1,{},jd),u.re=function(e,n){return $se(this.a,e,n)};var TFe=A(Kr,"HorizontalGraphCompactor/lambda$1$Type",1235);T(1422,1,{},qLt);var sHt,oHt,CFe=A(Kr,"LGraphToCGraphTransformer",1422);T(1430,1,us,zy),u.Nb=function(e){return e!=null};var AFe=A(Kr,"LGraphToCGraphTransformer/0methodref$nonNull$Type",1430);T(1423,1,ys,Ak),u.Kb=function(e){return Zl(),Yc(z(a(a(e,57).g,8),(Ft(),li)))};var kFe=A(Kr,"LGraphToCGraphTransformer/lambda$0$Type",1423);T(1424,1,ys,gv),u.Kb=function(e){return Zl(),oIt(a(a(e,57).g,153))};var LFe=A(Kr,"LGraphToCGraphTransformer/lambda$1$Type",1424);T(1435,1,us,BS),u.Nb=function(e){return Zl(),ct(a(e,57).g,153)};var PFe=A(Kr,"LGraphToCGraphTransformer/lambda$10$Type",1435);T(1439,1,{},Fl),u.td=function(e){var n,i;Zl(),n=e.d.c-e.e.c,i=a(e.g,153),pd(i.b,new TH(n)),pd(i.c,new CH(n)),vo(i.i,new e9(n))};var IFe=A(Kr,"LGraphToCGraphTransformer/lambda$11$Type",1439);T(1440,1,ys,jy),u.Kb=function(e){return Zl(),new gi(null,new T2(Rn(br(a(e,8)))))};var RFe=A(Kr,"LGraphToCGraphTransformer/lambda$12$Type",1440);T(1441,1,us,_b),u.Nb=function(e){return Zl(),ec(a(e,14))};var DFe=A(Kr,"LGraphToCGraphTransformer/lambda$13$Type",1441);T(1442,1,{},MH),u.td=function(e){bue(this.a,e)};var NFe=A(Kr,"LGraphToCGraphTransformer/lambda$14$Type",1442);T(1443,1,ys,kk),u.Kb=function(e){return Zl(),new gi(null,new Ei(a(e,26).a,16))};var OFe=A(Kr,"LGraphToCGraphTransformer/lambda$15$Type",1443);T(1444,1,ys,l1),u.Kb=function(e){return Zl(),new gi(null,new T2(Rn(br(a(e,8)))))};var BFe=A(Kr,"LGraphToCGraphTransformer/lambda$16$Type",1444);T(1445,1,ys,h1),u.Kb=function(e){return Zl(),a(z(a(e,14),(Ft(),X4)),15)};var FFe=A(Kr,"LGraphToCGraphTransformer/lambda$17$Type",1445);T(1446,1,us,Kf),u.Nb=function(e){return Zl(),!!a(e,15)&&!a(e,15).Wb()};var UFe=A(Kr,"LGraphToCGraphTransformer/lambda$18$Type",1446);T(1447,1,{},EH),u.td=function(e){A0e(this.a,a(e,15))};var zFe=A(Kr,"LGraphToCGraphTransformer/lambda$19$Type",1447);T(1426,1,{},SH),u.td=function(e){Uoe(this.a,e)};var jFe=A(Kr,"LGraphToCGraphTransformer/lambda$2$Type",1426);T(1425,1,{},IMt),u.td=function(e){Oce(this.a,this.b,e)};var HFe=A(Kr,"LGraphToCGraphTransformer/lambda$20$Type",1425);T(1436,1,{},TH),u.td=function(e){Yte(this.a,e)},u.a=0;var GFe=A(Kr,"LGraphToCGraphTransformer/lambda$21$Type",1436);T(1437,1,{},CH),u.td=function(e){Kte(this.a,e)},u.a=0;var WFe=A(Kr,"LGraphToCGraphTransformer/lambda$22$Type",1437);T(1438,1,{},e9),u.td=function(e){Jte(this.a,e)},u.a=0;var $Fe=A(Kr,"LGraphToCGraphTransformer/lambda$23$Type",1438);T(1427,1,ys,Hy),u.Kb=function(e){return Zl(),new gi(null,new Ei(a(e,26).a,16))};var VFe=A(Kr,"LGraphToCGraphTransformer/lambda$3$Type",1427);T(1428,1,ys,Gy),u.Kb=function(e){return Zl(),new gi(null,new T2(Rn(br(a(e,8)))))};var qFe=A(Kr,"LGraphToCGraphTransformer/lambda$4$Type",1428);T(1429,1,ys,C3),u.Kb=function(e){return Zl(),a(z(a(e,14),(Ft(),X4)),15)};var XFe=A(Kr,"LGraphToCGraphTransformer/lambda$5$Type",1429);T(1431,1,{},rm),u.td=function(e){J0e(this.a,e)};var ZFe=A(Kr,"LGraphToCGraphTransformer/lambda$6$Type",1431);T(1432,1,{},RMt),u.td=function(e){iee(this.a,this.b,e)};var YFe=A(Kr,"LGraphToCGraphTransformer/lambda$7$Type",1432);T(1433,1,us,Wy),u.Nb=function(e){return Zl(),ct(a(e,57).g,8)};var KFe=A(Kr,"LGraphToCGraphTransformer/lambda$8$Type",1433);T(1434,1,{},yb),u.td=function(e){var n;Zl(),n=a(e.g,8),n.k.a=e.d.c+n.d.b};var JFe=A(Kr,"LGraphToCGraphTransformer/lambda$9$Type",1434);T(1421,1,{},$y),u.pe=function(e){var n,i,r,c,l;for(this.a=e,this.d=new NG,this.c=dt(I0t,te,113,this.a.a.a.c.length,0,1),this.b=0,i=new H(this.a.a.a);i.ac-f?0:c-f;I<=cm(n.f-1,c+f);I++){if(G=rt/(I+1),et=0,M=1,l=new Dt,pt=Ps,k=0,p=0,$=b[0],I==0)pt=rt,p=(n.g==null&&(n.g=dPt(n,new Wa)),lt(n.g));else{for(;M=G&&(Ut(l,Xt(M)),pt=y.Math.max(pt,_t[M-1]-k),p+=$,et+=_t[M-1]-et,k=_t[M-1],$=b[M]),$=y.Math.max($,b[M]),++M;p+=$}O=y.Math.min(1/pt,1/n.b/p),O>r&&(r=O,i=l)}return i},u.tf=function(){return!1};var rUe=A(cp,"MSDCutIndexHeuristic",714);T(1279,1,Br,Wy),u.Pe=function(e,n){u_e(a(e,31),n)};var sUe=A(cp,"SingleEdgeGraphWrapper",1279);T(189,1,{189:1},Jf),u.Ib=function(){return"NEdge[id="+this.b+" w="+this.g+" d="+this.a+"]"},u.a=1,u.b=0,u.c=0,u.f=!1,u.g=0;var Jjt=A(b4,"NEdge",189);T(162,1,{},cl);var oUe=A(b4,"NEdge/NEdgeBuilder",162);T(592,1,{},PG);var cUe=A(b4,"NGraph",592);T(113,1,{113:1},Kkt),u.c=-1,u.d=0,u.e=0,u.i=-1,u.j=!1;var _0t=A(b4,"NNode",113);T(717,1,IOt,sit),u.sc=function(e){vo(this,e)},u.uc=function(){return this.xc()},u.jd=function(e){D1(this,e)},u.wc=function(){return new Ei(this,16)},u.xc=function(){return new gi(null,this.wc())},u.bd=function(e,n){++this.b,pm(this.a,e,n)},u.nc=function(e){return aD(this,e)},u.oc=function(e){return++this.b,Or(this.a,e)},u.Pb=function(){++this.b,this.a.c=dt(un,te,1,0,5,1)},u.pc=function(e){return nc(this.a,e,0)!=-1},u.qc=function(e){return O1(this.a,e)},u.cd=function(e){return Ee(this.a,e)},u.dd=function(e){return nc(this.a,e,0)},u.Wb=function(){return this.a.c.length==0},u.tc=function(){return O2(new j(this.a))},u.ed=function(){throw K(new Oi)},u.fd=function(e){throw K(new Oi)},u.gd=function(e){return++this.b,Em(this.a,e)},u.vc=function(e){return Hrt(this,e)},u.hd=function(e,n){return++this.b,Kl(this.a,e,n)},u._b=function(){return this.a.c.length},u.kd=function(e,n){return new C1(this.a,e,n)},u.yc=function(){return GW(this.a)},u.zc=function(e){return xo(this.a,e)},u.b=0;var aUe=A(b4,"NNode/ChangeAwareArrayList",717);T(251,1,{},Ng);var uUe=A(b4,"NNode/NNodeBuilder",251);T(1482,1,{},q0),u.a=!1,u.f=qi,u.j=0;var lUe=A(b4,"NetworkSimplex",1482);T(276,23,{3:1,34:1,23:1,276:1},F5);var lJ,hJ,fJ,y0t,dJ,x0t=Ri(ka,"CenterEdgeLabelPlacementStrategy",276,ji,Wce,Rne),Qjt;T(386,23,{3:1,34:1,23:1,386:1},ert);var M0t,pJ,E0t=Ri(ka,"ConstraintCalculationStrategy",386,ji,qse,Dne),tHt;T(290,23,{3:1,34:1,23:1,290:1},PT);var MB,S0t,EB,SB,TB,T0t,gJ=Ri(ka,"ContentAlignment",290,ji,Sae,Nne),eHt;T(317,23,{3:1,34:1,23:1,317:1,285:1,286:1},nrt),u.hf=function(){return P8t(this)},u.uf=function(){return P8t(this)};var x6,M6,C0t=Ri(ka,"CrossingMinimizationStrategy",317,ji,Xse,One),nHt;T(319,23,{3:1,34:1,23:1,319:1},sW);var A0t,mJ,CB,k0t=Ri(ka,"CuttingStrategy",319,ji,Toe,Bne),iHt;T(384,23,{3:1,34:1,23:1,384:1,285:1,286:1},oW),u.hf=function(){return B8t(this)},u.uf=function(){return B8t(this)};var L0t,bJ,wJ,P0t=Ri(ka,"CycleBreakingStrategy",384,ji,Coe,Fne),rHt;T(406,23,{3:1,34:1,23:1,406:1},cW);var E6,vJ,H4,sHt=Ri(ka,"EdgeConstraint",406,ji,Aoe,Une),oHt;T(241,23,{3:1,34:1,23:1,241:1},IT);var _J,yJ,xJ,MJ,AB,EJ,I0t=Ri(ka,"EdgeLabelSideSelection",241,ji,Tae,zne),cHt;T(255,23,{3:1,34:1,23:1,255:1},RT);var SJ,R0t,D0t,kB,N0t,O0t,B0t=Ri(ka,"FixedAlignment",255,ji,Cae,jne),aHt;T(256,23,{3:1,34:1,23:1,256:1},DT);var F0t,U0t,z0t,j0t,G4,H0t,G0t=Ri(ka,"GraphCompactionStrategy",256,ji,Aae,Hne),uHt;T(233,23,{3:1,34:1,23:1,233:1},jb);var kE,LB,LE,Al,W4,PB,K_,J_,IB,S6,TJ=Ri(ka,"GraphProperties",233,ji,jue,Gne),lHt;T(318,23,{3:1,34:1,23:1,318:1},aW);var RB,CJ,AJ,W0t=Ri(ka,"GreedySwitchType",318,ji,Soe,Wne),hHt;T(280,23,{3:1,34:1,23:1,280:1},uW);var mx,T6,Q_,fHt=Ri(ka,"InLayerConstraint",280,ji,Eoe,$ne),dHt;T(383,23,{3:1,34:1,23:1,383:1},irt);var kJ,$0t,V0t=Ri(ka,"InteractiveReferencePoint",383,ji,Zse,Vne),pHt,q0t,X0t,LJ,_w,C6,bx,Zm,DB,Z0t,Y0t,NB,K0t,OB,PJ,BB,wx,IJ,FB,wc,J0t,Qc,RJ,A6,w0,PE,vx,_x,k6,yx,Pu,Iu,ty,xd,li,Q0t,tmt,emt,DJ,tg,UB,Ru,Ym,NJ,IE,zB,eg,yw,OJ,gHt,L6,$4,BJ,nmt,FJ,xx;T(178,23,{3:1,34:1,23:1,178:1},U5);var P6,xw,V4,Km,Mx,imt=Ri(ka,"LayerConstraint",178,ji,$ce,qne),mHt;T(747,1,_d,cj),u.ue=function(e){He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Nft),""),"Content Alignment"),"Specifies how the content of compound nodes is to be aligned, e.g. top-left."),omt),(i0(),BE)),gJ),qe((t0(),On))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.contentAlignment"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Oft),""),"Feedback Edges"),"Whether feedback edges should be highlighted by routing around the nodes."),(me(),me(),!1)),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.feedBackEdges"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,fO),""),"Interactive Reference Point"),"Determines which point of a node is considered by interactive layout phases."),dmt),xs),V0t),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.interactiveReferencePoint"])))),Sa(e,fO,aY,jHt),Sa(e,fO,pY,zHt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Bft),""),"Merge Edges"),"Edges that have no ports are merged so they touch the connected nodes at the same points. When this option is disabled, one port is created for each edge directly connected to a node. When it is enabled, all such incoming edges share an input port, and all outgoing edges share an output port."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.mergeEdges"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Fft),""),"Merge Hierarchy-Crossing Edges"),"If hierarchical layout is active, hierarchy-crossing edges use as few hierarchical ports as possible. They are broken by the algorithm, with hierarchical ports inserted as required. Usually, one such port is created for each edge at each hierarchy crossing point. With this option set to true, we try to create as few hierarchical ports as possible in the process. In particular, all edges that form a hyperedge can share a port."),!0),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.mergeHierarchyEdges"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Uft),""),"Thoroughness"),"How much effort should be spent to produce a nice layout."),Xt(7)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.thoroughness"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,zft),""),"Add Unnecessary Bendpoints"),"Adds bend points even if an edge does not change direction. If true, each long edge dummy will contribute a bend point to its edges and hierarchy-crossing edges will always get a bend point where they cross hierarchy boundaries. By default, bend points are only added where an edge changes direction."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.unnecessaryBendpoints"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,jft),""),"North or South Port"),"Specifies that this port can either be placed on the north side of a node or on the south side (if port constraints permit)"),!1),Ec),ho),qe(ib)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.northOrSouthPort"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,aY),"cycleBreaking"),"Cycle Breaking Strategy"),"Strategy for cycle breaking. Cycle breaking looks for cycles in the graph and determines which edges to reverse to break the cycles. Reversed edges will end up pointing to the opposite direction of regular edges (that is, reversed edges will point left if edges usually point right)."),umt),xs),P0t),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.cycleBreaking"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,QP),cdt),"Node Layering Strategy"),"Strategy for node layering."),mmt),xs),pbt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.nodeLayering"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Hft),cdt),"Layer Constraint"),"Determines a constraint on the placement of the node regarding the layering."),pmt),xs),imt),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.layerConstraint"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Gft),cdt),"Wide Nodes on Multiple Layers"),"Strategy to distribute wide nodes over multiple layers."),bmt),xs),Abt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.wideNodesOnMultipleLayers"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,uY),yBt),"Upper Bound On Width [MinWidth Layerer]"),"Defines a loose upper bound on the width of the MinWidth layerer. If set to '-1' multiple values are tested and the best result is selected."),Xt(4)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.minWidthUpperBoundOnWidth"])))),Sa(e,uY,QP,VHt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,lY),yBt),"Upper Layer Estimation Scaling Factor [MinWidth Layerer]"),"Multiplied with Upper Bound On Width for defining an upper bound on the width of layers which haven't been determined yet, but whose maximum width had been (roughly) estimated by the MinWidth algorithm. Compensates for too high estimations. If set to '-1' multiple values are tested and the best result is selected."),Xt(2)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.minWidthUpperLayerEstimationScalingFactor"])))),Sa(e,lY,QP,XHt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,hY),xBt),"Node Promotion Strategy"),"Reduces number of dummy nodes after layering phase (if possible)."),gmt),xs),ybt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.nodePromotion"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,fY),xBt),"Max Node Promotion Iterations"),"Limits the number of iterations for node promotion."),Xt(0)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.nodePromotionBoundary"])))),Sa(e,fY,hY,null),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,dY),"layering.coffmanGraham"),"Layer Bound"),"The maximum number of nodes allowed per layer."),Xt(qi)),Pa),Io),qe(On)))),Sa(e,dY,QP,GHt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,pY),adt),"Crossing Minimization Strategy"),"Strategy for crossing minimization."),amt),xs),C0t),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.crossMin"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Wft),adt),"Hierarchical Sweepiness"),"How likely it is to use cross-hierarchy (1) vs bottom-up (-1)."),.1),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,$ft),adt),"Semi-Interactive Crossing Minimization"),"Preserves the order of nodes within a layer but still minimizes crossings between edges connecting long edge dummies. Derives the desired order from positions specified by the 'org.eclipse.elk.position' layout option. Requires a crossing minimization strategy that is able to process 'in-layer' constraints."),!1),Ec),ho),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Vft),MBt),"Greedy Switch Activation Threshold"),"By default it is decided automatically if the greedy switch is activated or not. The decision is based on whether the size of the input graph (without dummy nodes) is smaller than the value of this option. A '0' enforces the activation."),Xt(40)),Pa),Io),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,qft),MBt),"Greedy Switch Crossing Minimization"),"Greedy Switch strategy for crossing minimization. The greedy switch heuristic is executed after the regular layer sweep as a post-processor."),cmt),xs),W0t),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.greedySwitch"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,dE),EBt),"Node Placement Strategy"),"Strategy for node placement."),ymt),xs),mbt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.nodePlace"])))),He(e,new De(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,gY),EBt),"Favor Straight Edges Over Balancing"),"Favor straight edges over a balanced node placement. The default behavior is determined automatically based on the used 'edgeRouting'. For an orthogonal style it is set to true, for all other styles to false."),Ec),ho),qe(On)))),Sa(e,gY,dE,oGt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,mY),SBt),"BK Edge Straightening"),"Specifies whether the Brandes Koepf node placer tries to increase the number of straight edges at the expense of diagram size. There is a subtle difference to the 'favorStraightEdges' option, which decides whether a balanced placement of the nodes is desired, or not. In bk terms this means combining the four alignments into a single balanced one, or not. This option on the other hand tries to straighten additional edges during the creation of each of the four alignments."),wmt),xs),Rbt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.nodeplace.compactionStrategy"])))),Sa(e,mY,dE,nGt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,bY),SBt),"BK Fixed Alignment"),"Tells the BK node placer to use a certain alignment (out of its four) instead of the one producing the smallest height, or the combination of all four."),vmt),xs),B0t),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.fixedAlignment"])))),Sa(e,bY,dE,rGt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,wY),"nodePlacement.linearSegments"),"Linear Segments Deflection Dampening"),"Dampens the movement of nodes to keep the diagram from getting too large."),.3),ha),To),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.linearSegmentsDeflectionDampening"])))),Sa(e,wY,dE,aGt),He(e,new De(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,vY),"nodePlacement.networkSimplex"),"Node Flexibility"),"Aims at shorter and straighter edges. Two configurations are possible: (a) allow ports to move freely on the side they are assigned to (the order is always defined beforehand), (b) additionally allow to enlarge a node wherever it helps. If this option is not configured for a node, the 'nodeFlexibility.default' value is used, which is specified for the node's parent."),xs),JJ),qe(vc)))),Sa(e,vY,dE,hGt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Xft),"nodePlacement.networkSimplex.nodeFlexibility"),"Node Flexibility Default"),"Default value of the 'nodeFlexibility' option for the children of a hierarchical node."),_mt),xs),JJ),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,_Y),udt),"Spline Self-Loop Placement"),null),fmt),xs),Ebt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.splines.selfLoopPlacement"])))),Sa(e,_Y,t6,LHt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,dO),udt),"Sloppy Spline Routing"),"Use less spline control points at the start and end of an edge. Might lead to crossings edge/node overlap."),!0),Ec),ho),qe(On)))),Sa(e,dO,t6,DHt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,pO),udt),"Sloppy Spline Layer Spacing Factor"),"Spacing factor for routing area between layers when using sloppy spline routing."),.4),ha),To),qe(On)))),Sa(e,pO,t6,IHt),Sa(e,pO,dO,!0),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Zft),J1),"Edge Node Between Layers Spacing"),"The spacing to be preserved between nodes and edges that are routed next to the node's layer. For the spacing between nodes and edges that cross the node's layer 'spacing.edgeNode' is used."),10),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Yft),J1),"Edge Edge Between Layer Spacing"),"Spacing to be preserved between pairs of edges that are routed between the same pair of layers. Note that 'spacing.edgeEdge' is used for the spacing between pairs of edges crossing the same layer."),10),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Kft),J1),"Node Node Between Layers Spacing"),"The spacing to be preserved between any pair of nodes of two adjacent layers. Note that 'spacing.nodeNode' is used for the spacing between nodes within the layer itself."),20),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Jft),ldt),"Direction Priority"),"Defines how important it is to have a certain edge point into the direction of the overall layout. This option is evaluated during the cycle breaking phase."),Xt(0)),Pa),Io),qe(Md)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Qft),ldt),"Shortness Priority"),"Defines how important it is to keep an edge as short as possible. This option is evaluated during the layering phase."),Xt(0)),Pa),Io),qe(Md)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,tdt),ldt),"Straightness Priority"),"Defines how important it is to keep an edge straight, i.e. aligned with one of the two axes. This option is evaluated during node placement."),Xt(0)),Pa),Io),qe(Md)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,yY),"compaction"),YOt),"Tries to further compact components (disconnected sub-graphs)."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.components.compact"])))),Sa(e,yY,XP,!0),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,edt),TBt),"Post Compaction Strategy"),CBt),smt),xs),G0t),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.postCompaction"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,ndt),TBt),"Post Compaction Constraint Calculation"),CBt),rmt),xs),E0t),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.postCompaction.constraints"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,gO),hdt),"High Degree Node Treatment"),"Makes room around high degree nodes to place leafs and trees."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.highDegreeNode.treatment"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,xY),hdt),"High Degree Node Threshold"),"Whether a node is considered to have a high degree."),Xt(16)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.highDegreeNode.threshold"])))),Sa(e,xY,gO,!0),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,MY),hdt),"High Degree Node Maximum Tree Height"),"Maximum height of a subtree connected to a high degree node to be moved to separate layers."),Xt(5)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.highDegreeNode.treeHeight"])))),Sa(e,MY,gO,!0),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,v4),fdt),"Graph Wrapping Strategy"),"For certain graphs and certain prescribed drawing areas it may be desirable to split the laid out graph into chunks that are placed side by side. The edges that connect different chunks are 'wrapped' around from the end of one chunk to the start of the other chunk. The points between the chunks are referred to as 'cuts'."),Smt),xs),kbt),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,idt),fdt),"Additional Wrapped Edges Spacing"),"To visually separate edges that are wrapped from regularly routed edges an additional spacing value can be specified in form of this layout option. The spacing is added to the regular edgeNode spacing."),10),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,rdt),fdt),"Correction factor for the wrapping"),"At times and for certain types of graphs the executed wrapping may produce results that are consistently biased in the same fashion: either wrapping to often or to rarely. This factor can be used to correct the bias. Internally, it is simplay multiplied with the 'aspect ratio' layout option."),1),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,mO),ABt),"Cutting Strategy"),"The strategy by which the layer indexes are determined at which the layering crumbles into chunks."),Mmt),xs),k0t),qe(On)))),He(e,new De(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,EY),ABt),"Manually Specified Cuts"),"Allows the user to specify her own cuts for a certain graph."),Ed),Sl),qe(On)))),Sa(e,EY,mO,SGt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,SY),"wrapping.cutting.msd"),"MSD Freedom"),"The MSD cutting strategy starts with an initial guess on the number of chunks the graph should be split into. The freedom specifies how much the strategy may deviate from this guess. E.g. if an initial number of 3 is computed, a freedom of 1 allows 2, 3, and 4 cuts."),xmt),Pa),Io),qe(On)))),Sa(e,SY,mO,CGt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,TY),"wrapping.singleEdge.validify"),"Path-Like Validify Strategy"),"When wrapping path-like graphs, the graph must not be split between any pair of layers. The validify strategy makes sure every computed split point is allowed."),Emt),xs),Cbt),qe(On)))),Sa(e,TY,v4,OGt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,bO),ddt),"Improve Cuts"),"For general graphs it is important that not too many edges wrap backwards. Thus a compromise between evenly-distributed cuts and the total number of cut edges is sought."),!0),Ec),ho),qe(On)))),Sa(e,bO,v4,IGt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,wO),ddt),"Distance Penalty When Improving Cuts"),null),2),ha),To),qe(On)))),Sa(e,wO,v4,LGt),Sa(e,wO,bO,!0),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,CY),ddt),"Improve Wrapped Edges"),"The initial wrapping is performed in a very simple way. As a consequence, edges that wrap from one chunk to another may be unnecessarily long. Activating this option tries to shorten such edges."),!0),Ec),ho),qe(On)))),Sa(e,CY,v4,DGt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,sdt),AY),"Edge Label Side Selection"),"Method to decide on edge label sides."),hmt),xs),I0t),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.edgeLabelSideSelection"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,odt),AY),"Edge Center Label Placement Strategy"),"Determines in which layer center labels of long edges should be placed."),lmt),xs),x0t),ur(On,Y(Z(Jp,1),jt,163,0,[og]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.edgeLabelPlacementStrategy"])))),cOt((new w8,e))};var bHt,wHt,rmt,vHt,smt,_Ht,omt,yHt,xHt,cmt,MHt,EHt,SHt,amt,THt,umt,CHt,lmt,AHt,hmt,kHt,fmt,LHt,PHt,IHt,RHt,DHt,NHt,OHt,BHt,FHt,UHt,dmt,zHt,jHt,HHt,GHt,WHt,pmt,$Ht,VHt,qHt,XHt,ZHt,YHt,gmt,KHt,mmt,JHt,bmt,QHt,tGt,eGt,wmt,nGt,iGt,vmt,rGt,sGt,oGt,cGt,aGt,uGt,lGt,_mt,hGt,fGt,ymt,dGt,pGt,gGt,mGt,bGt,wGt,vGt,_Gt,yGt,xGt,MGt,EGt,SGt,TGt,xmt,CGt,AGt,Mmt,kGt,LGt,PGt,IGt,RGt,DGt,NGt,Emt,OGt,BGt,Smt,hUe=A(ka,"LayeredMetaDataProvider",747);T(878,1,_d,w8),u.ue=function(e){cOt(e)};var Bf,jB,q4,UJ,Tmt,HB,zJ,Cmt,GB,Amt,jJ,RE,kmt,X4,ch,Lmt,WB,Pmt,ng,Z4,ig,Imt,Rmt,Dmt,$B,up,I6,Y4,Nmt,Omt,Bmt,VB,ey,Mw,Fmt,Ro,Umt,la,zmt,jmt,Hmt,HJ,Gmt,R6,qB,Wmt,$mt,Oh,Vmt,GJ,K4,qmt,Jm,J4,XB,Ew,DE,ZB,WJ,v0,Xmt,Zmt,Ymt,Kmt,Jmt,FGt,UGt,zGt,jGt,Sw,Tw,Qi,_0,Qmt,Ex,Q4,Cw,HGt,D6,tbt,Sx,GGt,WGt,$J,nf,Tx,N6,y0,ny,YB,Cx,ebt,tA,lp,Aw,VJ,eA,O6,qJ,nbt,ibt,rbt,sbt,XJ,obt,cbt,abt,ubt,lbt,fUe=A(ka,"LayeredOptions",878);T(879,1,{},Ck),u.Be=function(){var e;return e=new _u,e},u.Ce=function(e){};var dUe=A(ka,"LayeredOptions/LayeredFactory",879);T(291,23,{3:1,34:1,23:1,291:1,285:1,286:1},NT),u.hf=function(){return oDt(this)},u.uf=function(){return oDt(this)};var ZJ,hbt,fbt,KB,YJ,dbt,pbt=Ri(ka,"LayeringStrategy",291,ji,kae,Xne),$Gt;T(179,23,{3:1,34:1,23:1,179:1},z9);var iy,ry,JB,KJ,JJ=Ri(ka,"NodeFlexibility",179,ji,Cce,Zne),VGt;T(292,23,{3:1,34:1,23:1,292:1,285:1,286:1},z5),u.hf=function(){return G9t(this)},u.uf=function(){return G9t(this)};var B6,QJ,tQ,F6,gbt,mbt=Ri(ka,"NodePlacementStrategy",292,ji,Vce,Yne),qGt;T(240,23,{3:1,34:1,23:1,240:1},m2);var bbt,U6,wbt,vbt,z6,_bt,QB,tF,ybt=Ri(ka,"NodePromotionStrategy",240,ji,pue,Kne),XGt;T(410,23,{3:1,34:1,23:1,410:1},lW);var Ga,ba,eF,ZGt=Ri(ka,"PortType",410,ji,koe,Jne),YGt;T(345,23,{3:1,34:1,23:1,345:1},hW);var xbt,Mbt,eQ,Ebt=Ri(ka,"SelfLoopPlacement",345,ji,Loe,Qne),KGt;T(266,1,{266:1},R8t);var pUe=A(ka,"Spacings",266);T(347,23,{3:1,34:1,23:1,347:1},fW);var nQ,Sbt,Tbt,Cbt=Ri(ka,"ValidifyStrategy",347,ji,Poe,tie),JGt;T(385,23,{3:1,34:1,23:1,385:1},dW);var j6,H6,G6,Abt=Ri(ka,"WideNodesStrategy",385,ji,Roe,eie),QGt;T(346,23,{3:1,34:1,23:1,346:1},pW);var W6,iQ,rQ,kbt=Ri(ka,"WrappingStrategy",346,ji,Ioe,nie),tWt;T(1296,1,Lu,PMt),u.vf=function(e){return a(e,31),eWt},u.Pe=function(e,n){f2e(this,a(e,31),n)};var eWt,gUe=A(qdt,"DepthFirstCycleBreaker",1296);T(1295,1,Lu,ECt),u.vf=function(e){return a(e,31),nWt},u.Pe=function(e,n){Yxe(this,a(e,31),n)};var nWt,mUe=A(qdt,"GreedyCycleBreaker",1295);T(1297,1,Lu,s5),u.vf=function(e){return a(e,31),iWt},u.Pe=function(e,n){mye(this,a(e,31),n)};var iWt,bUe=A(qdt,"InteractiveCycleBreaker",1297);T(1300,1,Lu,IMt),u.vf=function(e){return a(e,31),rWt},u.Pe=function(e,n){$xe(this,a(e,31),n)};var rWt,wUe=A(pw,"CoffmanGrahamLayerer",1300);T(1301,1,jr,Mp),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return N0e(this.a,a(e,8),a(n,8))};var vUe=A(pw,"CoffmanGrahamLayerer/lambda$0$Type",1301);T(1302,1,jr,Q8),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return bre(this.a,e,n)};var _Ue=A(pw,"CoffmanGrahamLayerer/lambda$1$Type",1302);T(1303,1,Lu,X0),u.vf=function(e){return a(e,31),Ni(Ni(new as,(Mo(),Of),(Po(),rJ)),aa,AE)},u.Pe=function(e,n){exe(this,a(e,31),n)};var yUe=A(pw,"InteractiveLayerer",1303);T(511,1,{511:1},rxt),u.a=0,u.c=0;var xUe=A(pw,"InteractiveLayerer/LayerSpan",511);T(1299,1,Lu,b8),u.vf=function(e){return mfe(a(e,31))},u.Pe=function(e,n){$be(this,a(e,31),n)};var sWt,oWt,cWt,MUe=A(pw,"LongestPathLayerer",1299);T(1306,1,Lu,v8),u.vf=function(e){return a(e,31),Ni(Ni(new as,(Mo(),Of),(Po(),z4)),aa,AE)},u.Pe=function(e,n){Sxe(this,a(e,31),n)},u.a=0,u.b=0,u.d=0;var Lbt,Pbt,EUe=A(pw,"MinWidthLayerer",1306);T(1307,1,jr,Ac),u.Ld=function(e,n){return sle(this,a(e,8),a(n,8))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var SUe=A(pw,"MinWidthLayerer/MinOutgoingEdgesComparator",1307);T(1298,1,Lu,XEt),u.vf=function(e){return gpe(this,a(e,31))},u.Pe=function(e,n){B_e(this,a(e,31),n)};var aWt,uWt,lWt,TUe=A(pw,"NetworkSimplexLayerer",1298);T(1304,1,Lu,rTt),u.vf=function(e){return a(e,31),Ni(Ni(new as,(Mo(),Of),(Po(),z4)),aa,AE)},u.Pe=function(e,n){k2e(this,a(e,31),n)},u.d=0,u.f=0,u.g=0,u.i=0,u.s=0,u.t=0,u.u=0;var CUe=A(pw,"StretchWidthLayerer",1304);T(1305,1,jr,mv),u.Ld=function(e,n){return cae(a(e,8),a(n,8))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var AUe=A(pw,"StretchWidthLayerer/1",1305);T(422,1,Xdt),u.lf=function(e,n,i,r,c,l){},u.xf=function(e,n,i){return kNt(this,e,n,i)},u.kf=function(){this.g=dt(Gw,PBt,22,this.d,15,1),this.f=dt(Gw,PBt,22,this.d,15,1)},u.mf=function(e,n){this.e[e]=dt(Gn,pi,22,n[e].length,15,1)},u.nf=function(e,n,i){var r;r=i[e][n],r.o=n,this.e[e][n]=n},u.of=function(e,n,i,r){a(Ee(r[e][n].i,i),11).o=this.d++},u.b=0,u.c=0,u.d=0;var kUe=A(Ju,"AbstractBarycenterPortDistributor",422);T(1484,1,jr,SH),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Hfe(this.a,e,n)};var LUe=A(Ju,"AbstractBarycenterPortDistributor/lambda$0$Type",1484);T(1532,1,JP,YAt),u.lf=function(e,n,i,r,c,l){},u.nf=function(e,n,i){},u.of=function(e,n,i,r){},u.jf=function(){return!1},u.kf=function(){this.a=this.c.a,this.e=this.d.g},u.mf=function(e,n){n[e][0].c.o=e},u.pf=function(){return!1},u.qf=function(e,n,i,r){var c,l,f,p,b,v,M;for(n!=sSt(i,e.length)&&(l=e[n-(i?1:-1)],Mct(this.d,l,i?(Fo(),ba):(Fo(),Ga))),c=e[n][0],M=!r||c.j==(Ke(),rs),v=Vg(e[n]),k6t(this,v,M,!1,i),f=0,b=new j(v);b.a"),e0?Z$(this.a,e[n-1],e[n]):!i&&n1&&(c.i==(Ht(),Qe)?this.b[e]=!0:c.i==on&&e>0&&(this.b[e-1]=!0))},u.f=0;var XUe=A(h0,"AllCrossingsCounter",1528);T(602,1,{},zV),u.b=0,u.d=0;var ZUe=A(h0,"BinaryIndexedTree",602);T(473,1,{},X5);var YUe=A(h0,"CrossingsCounter",473);T(1557,1,jr,kH),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return sre(this.a,e,n)};var KUe=A(h0,"CrossingsCounter/lambda$0$Type",1557);T(1558,1,jr,LH),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return ore(this.a,e,n)};var JUe=A(h0,"CrossingsCounter/lambda$1$Type",1558);T(1559,1,jr,PH),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return cre(this.a,e,n)};var QUe=A(h0,"CrossingsCounter/lambda$2$Type",1559);T(1560,1,jr,IH),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return are(this.a,e,n)};var tze=A(h0,"CrossingsCounter/lambda$3$Type",1560);T(1555,1,{},RH);var eze=A(h0,"HyperedgeCrossingsCounter",1555);T(426,1,{34:1,426:1},sTt),u.vd=function(e){return Rfe(this,a(e,426))},u.b=0,u.c=0,u.e=0,u.f=0;var A3e=A(h0,"HyperedgeCrossingsCounter/Hyperedge",426);T(336,1,{34:1,336:1},ZD),u.vd=function(e){return Ime(this,a(e,336))},u.b=0,u.c=0;var wWt=A(h0,"HyperedgeCrossingsCounter/HyperedgeCorner",336);T(472,23,{3:1,34:1,23:1,472:1},rrt);var iA,rA,vWt=Ri(h0,"HyperedgeCrossingsCounter/HyperedgeCorner/Type",472,ji,ioe,rie),_Wt;T(1556,1,{},$H),u.e=!0,u.f=0,u.g=0;var nze=A(h0,"NorthSouthEdgeAllCrossingsCounter",1556);T(1311,1,Lu,_8),u.vf=function(e){return a(z(a(e,31),(Ft(),Qc)),19).pc((So(),Al))?yWt:null},u.Pe=function(e,n){Npe(this,a(e,31),n)};var yWt,ize=A(lo,"InteractiveNodePlacer",1311);T(1312,1,Lu,g1),u.vf=function(e){return a(z(a(e,31),(Ft(),Qc)),19).pc((So(),Al))?xWt:null},u.Pe=function(e,n){Ide(this,a(e,31),n)};var xWt,rF,sF,rze=A(lo,"LinearSegmentsNodePlacer",1312);T(235,1,{34:1,235:1},oit),u.vd=function(e){return NQt(this,a(e,235))},u.Fb=function(e){var n;return ct(e,235)?(n=a(e,235),this.b==n.b):!1},u.Hb=function(){return this.b},u.Ib=function(){return"ls"+Gp(this.f)},u.a=0,u.b=0,u.c=-1,u.d=-1,u.i=0;var MWt=A(lo,"LinearSegmentsNodePlacer/LinearSegment",235);T(1314,1,Lu,b4t),u.vf=function(e){return a(z(a(e,31),(Ft(),Qc)),19).pc((So(),Al))?EWt:null},u.Pe=function(e,n){Uxe(this,a(e,31),n)},u.b=0,u.g=0;var EWt,sze=A(lo,"NetworkSimplexPlacer",1314);T(1333,1,jr,Tg),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Lp(a(e,21).a,a(n,21).a)};var oze=A(lo,"NetworkSimplexPlacer/0methodref$compare$Type",1333);T(1335,1,jr,pc),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Lp(a(e,21).a,a(n,21).a)};var cze=A(lo,"NetworkSimplexPlacer/1methodref$compare$Type",1335);T(584,1,{584:1},SMt);var k3e=A(lo,"NetworkSimplexPlacer/EdgeRep",584);T(416,1,{416:1},Iot),u.b=!1;var L3e=A(lo,"NetworkSimplexPlacer/NodeRep",416);T(460,12,{3:1,4:1,20:1,25:1,41:1,12:1,13:1,15:1,49:1,460:1},axt);var aze=A(lo,"NetworkSimplexPlacer/Path",460);T(1315,1,ys,xb),u.Kb=function(e){return a(e,14).d.g.j};var uze=A(lo,"NetworkSimplexPlacer/Path/lambda$0$Type",1315);T(1316,1,us,$y),u.Nb=function(e){return a(e,232)==(Ke(),Hr)};var lze=A(lo,"NetworkSimplexPlacer/Path/lambda$1$Type",1316);T(1317,1,ys,S3),u.Kb=function(e){return a(e,14).d.g};var hze=A(lo,"NetworkSimplexPlacer/Path/lambda$2$Type",1317);T(1318,1,us,DH),u.Nb=function(e){return $St(SIt(a(e,8)))};var fze=A(lo,"NetworkSimplexPlacer/Path/lambda$3$Type",1318);T(1319,1,us,gv),u.Nb=function(e){return Mu(),(Ht(),ab).pc(a(e,11).i)};var dze=A(lo,"NetworkSimplexPlacer/lambda$0$Type",1319);T(1320,1,{},TMt),u.td=function(e){zte(this.a,this.b,e)};var pze=A(lo,"NetworkSimplexPlacer/lambda$1$Type",1320);T(1329,1,{},NH),u.td=function(e){f0e(this.a,e)};var gze=A(lo,"NetworkSimplexPlacer/lambda$10$Type",1329);T(1330,1,ys,Ak),u.Kb=function(e){return Mu(),new gi(null,new Ei(a(e,26).a,16))};var mze=A(lo,"NetworkSimplexPlacer/lambda$11$Type",1330);T(1331,1,{},OH),u.td=function(e){xwe(this.a,e)};var bze=A(lo,"NetworkSimplexPlacer/lambda$12$Type",1331);T(1332,1,ys,f1),u.Kb=function(e){return Mu(),Xt(a(e,113).e)};var wze=A(lo,"NetworkSimplexPlacer/lambda$13$Type",1332);T(1334,1,ys,NS),u.Kb=function(e){return Mu(),Xt(a(e,113).e)};var vze=A(lo,"NetworkSimplexPlacer/lambda$14$Type",1334);T(1336,1,us,T3),u.Nb=function(e){return Mu(),a(e,416).c.j==(Ke(),gs)};var _ze=A(lo,"NetworkSimplexPlacer/lambda$15$Type",1336);T(1337,1,us,C3),u.Nb=function(e){return Mu(),a(e,416).c.i.c.length>1};var yze=A(lo,"NetworkSimplexPlacer/lambda$16$Type",1337);T(1338,1,{},d4t),u.td=function(e){lfe(this.c,this.b,this.d,this.a,e)},u.c=0,u.d=0;var xze=A(lo,"NetworkSimplexPlacer/lambda$17$Type",1338);T(1339,1,{},BH),u.td=function(e){Qte(this.a,e)},u.a=0;var Mze=A(lo,"NetworkSimplexPlacer/lambda$18$Type",1339);T(1340,1,ys,qy),u.Kb=function(e){return Mu(),new gi(null,new Ei(a(e,26).a,16))};var Eze=A(lo,"NetworkSimplexPlacer/lambda$19$Type",1340);T(1321,1,ys,A3),u.Kb=function(e){return Mu(),new gi(null,new Ei(a(e,26).a,16))};var Sze=A(lo,"NetworkSimplexPlacer/lambda$2$Type",1321);T(1341,1,{},v5),u.td=function(e){hee(this.a,e)};var Tze=A(lo,"NetworkSimplexPlacer/lambda$20$Type",1341);T(1342,1,us,Mb),u.Nb=function(e){return $St(e)};var Cze=A(lo,"NetworkSimplexPlacer/lambda$21$Type",1342);T(1343,1,ys,Ag),u.Kb=function(e){return Mu(),new gi(null,new Ei(a(e,26).a,16))};var Aze=A(lo,"NetworkSimplexPlacer/lambda$22$Type",1343);T(1344,1,us,FH),u.Nb=function(e){return xte(this.a,e)};var kze=A(lo,"NetworkSimplexPlacer/lambda$23$Type",1344);T(1345,1,{},CMt),u.td=function(e){B1e(this.a,this.b,e)};var Lze=A(lo,"NetworkSimplexPlacer/lambda$24$Type",1345);T(1346,1,us,wv),u.Nb=function(e){return Mu(),!ec(a(e,14))};var Pze=A(lo,"NetworkSimplexPlacer/lambda$25$Type",1346);T(1347,1,us,OS),u.Nb=function(e){return Mu(),!ec(a(e,14))};var Ize=A(lo,"NetworkSimplexPlacer/lambda$26$Type",1347);T(1348,1,{},_5),u.le=function(e,n){return Jte(this.a,e,n)};var Rze=A(lo,"NetworkSimplexPlacer/lambda$27$Type",1348);T(1322,1,ys,kk),u.Kb=function(e){return Mu(),new gi(null,new E2(Rn(br(a(e,8)))))};var Dze=A(lo,"NetworkSimplexPlacer/lambda$3$Type",1322);T(1323,1,us,BS),u.Nb=function(e){return Mu(),cce(a(e,14))};var Nze=A(lo,"NetworkSimplexPlacer/lambda$4$Type",1323);T(1324,1,{},UH),u.td=function(e){e_e(this.a,a(e,14))};var Oze=A(lo,"NetworkSimplexPlacer/lambda$5$Type",1324);T(1325,1,ys,vv),u.Kb=function(e){return Mu(),new gi(null,new Ei(a(e,26).a,16))};var Bze=A(lo,"NetworkSimplexPlacer/lambda$6$Type",1325);T(1326,1,us,Xy),u.Nb=function(e){return Mu(),a(e,8).j==(Ke(),gs)};var Fze=A(lo,"NetworkSimplexPlacer/lambda$7$Type",1326);T(1327,1,ys,w),u.Kb=function(e){return Mu(),new gi(null,new E2(Rn(Jg(a(e,8)))))};var Uze=A(lo,"NetworkSimplexPlacer/lambda$8$Type",1327);T(1328,1,us,E),u.Nb=function(e){return Mu(),nre(a(e,14))};var zze=A(lo,"NetworkSimplexPlacer/lambda$9$Type",1328);T(1310,1,Lu,Ev),u.vf=function(e){return a(z(a(e,31),(Ft(),Qc)),19).pc((So(),Al))?SWt:null},u.Pe=function(e,n){I_e(a(e,31),n)};var SWt,jze=A(lo,"SimpleNodePlacer",1310);T(164,1,{164:1},C_),u.Ib=function(){var e;return e="",this.c==(Sf(),Qm)?e+=fE:this.c==Xp&&(e+=hE),this.o==(Zh(),x0)?e+=RY:this.o==rf?e+="UP":e+="BALANCED",e};var Hze=A($p,"BKAlignedLayout",164);T(466,23,{3:1,34:1,23:1,466:1},srt);var Xp,Qm,TWt=Ri($p,"BKAlignedLayout/HDirection",466,ji,toe,aie),CWt;T(465,23,{3:1,34:1,23:1,465:1},ort);var x0,rf,AWt=Ri($p,"BKAlignedLayout/VDirection",465,ji,eoe,uie),kWt;T(1485,1,{},AMt);var Gze=A($p,"BKAligner",1485);T(1488,1,{},VRt);var Wze=A($p,"BKCompactor",1488);T(593,1,{593:1},V),u.a=0;var $ze=A($p,"BKCompactor/ClassEdge",593);T(423,1,{423:1},sxt),u.a=null,u.b=0;var Vze=A($p,"BKCompactor/ClassNode",423);T(1313,1,Lu,RMt),u.vf=function(e){return a(z(a(e,31),(Ft(),Qc)),19).pc((So(),Al))?LWt:null},u.Pe=function(e,n){t3e(this,a(e,31),n)},u.a=!1,u.e=!1;var LWt,qze=A($p,"BKNodePlacer",1313);T(437,23,{3:1,34:1,23:1,437:1},crt);var oF,Ibt,Rbt=Ri($p,"EdgeStraighteningStrategy",437,ji,Qse,lie),PWt;T(1486,1,{},st),u.d=0;var Xze=A($p,"NeighborhoodInformation",1486);T(1487,1,jr,zH),u.Ld=function(e,n){return sue(this,a(e,48),a(n,48))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var Zze=A($p,"NeighborhoodInformation/NeighborComparator",1487);T(724,1,{});var Yze=A($p,"ThresholdStrategy",724);T(1510,724,{},fxt),u.yf=function(e,n,i){return this.a.o==(Zh(),rf)?is:Ps},u.zf=function(){};var Kze=A($p,"ThresholdStrategy/NullThresholdStrategy",1510);T(522,1,{522:1},LMt),u.c=!1,u.d=!1;var Jze=A($p,"ThresholdStrategy/Postprocessable",522);T(1511,724,{},dxt),u.yf=function(e,n,i){var r,c,l;return c=n==i,r=this.a.a[i.o]==n,c||r?(l=e,this.a.c==(Sf(),Qm)?(c&&(l=tZ(this,n,!0)),!isNaN(l)&&!isFinite(l)&&r&&(l=tZ(this,i,!1))):(c&&(l=tZ(this,n,!0)),!isNaN(l)&&!isFinite(l)&&r&&(l=tZ(this,i,!1))),l):e},u.zf=function(){for(var e,n,i,r,c;this.c.b!=0;)c=a(aoe(this.c),522),r=UNt(this,c),r.a&&(e=r.a,i=lt(this.a.f[this.a.g[c.b.o].o]),!(!i&&!ec(e)&&e.c.g.c==e.d.g.c)&&(n=V9t(this,c),n||kEt(this.d,c)));for(;this.d.a.c.length!=0;)V9t(this,a(Lat(this.d),522))};var Qze=A($p,"ThresholdStrategy/SimpleThresholdStrategy",1511);T(573,1,{573:1,285:1,286:1},vt),u.hf=function(){return HPt(this)},u.uf=function(){return HPt(this)};var sQ,tje=A(B_,"EdgeRouterFactory",573);T(1356,1,Lu,mj),u.vf=function(e){return Kbe(a(e,31))},u.Pe=function(e,n){K_e(a(e,31),n)};var IWt,RWt,DWt,NWt,OWt,Dbt,BWt,FWt,eje=A(B_,"OrthogonalEdgeRouter",1356);T(594,1,{},lX),u.a=0,u.c=0;var nje=A(B_,"OrthogonalRoutingGenerator",594);T(252,1,{252:1},TN),u.Ib=function(){return this.a+"->"+this.b},u.c=0;var ije=A(B_,"OrthogonalRoutingGenerator/Dependency",252);T(165,1,{34:1,165:1},ZPt),u.vd=function(e){return OQt(this,a(e,165))},u.Fb=function(e){var n;return ct(e,165)?(n=a(e,165),this.d==n.d):!1},u.Hb=function(){return this.d},u.Ib=function(){var e,n,i,r;for(e=new ll("{"),r=new j(this.g);r.aop&&(c=new We(b,k),Xi(i.a,c),CP(this.a,i,e,c,!1),l=new We(M,k),Xi(i.a,l),CP(this.a,i,e,l,!1))},u.Bf=function(e){return e.g.k.a+e.k.a+e.a.a},u.Cf=function(){return Ht(),fi},u.Df=function(){return Ht(),Tn};var sje=A(B_,"OrthogonalRoutingGenerator/NorthToSouthRoutingStrategy",1490);T(1491,1,{},Hl),u.Af=function(e,n){var i,r,c,l,f,p,b,v,M,k;for(k=n-e.i*this.a.c,p=new j(e.g);p.aop&&(c=new We(b,k),Xi(i.a,c),CP(this.a,i,e,c,!1),l=new We(M,k),Xi(i.a,l),CP(this.a,i,e,l,!1))},u.Bf=function(e){return e.g.k.a+e.k.a+e.a.a},u.Cf=function(){return Ht(),Tn},u.Df=function(){return Ht(),fi};var oje=A(B_,"OrthogonalRoutingGenerator/SouthToNorthRoutingStrategy",1491);T(1489,1,{},ed),u.Af=function(e,n){var i,r,c,l,f,p,b,v,M,k;for(k=n+e.i*this.a.c,p=new j(e.g);p.aop&&(c=new We(k,b),Xi(i.a,c),CP(this.a,i,e,c,!0),l=new We(k,M),Xi(i.a,l),CP(this.a,i,e,l,!0))},u.Bf=function(e){return e.g.k.b+e.k.b+e.a.b},u.Cf=function(){return Ht(),Qe},u.Df=function(){return Ht(),on};var cje=A(B_,"OrthogonalRoutingGenerator/WestToEastRoutingStrategy",1489);T(1351,1,Lu,DMt),u.vf=function(e){return Ege(a(e,31))},u.Pe=function(e,n){J2e(this,a(e,31),n)};var UWt,zWt,jWt,HWt,cF,aje=A(B_,"PolylineEdgeRouter",1351);T(1352,1,sh,D),u.Mb=function(e){return ule(a(e,8))},u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)};var uje=A(B_,"PolylineEdgeRouter/1",1352);T(151,1,{151:1},U6t),u.Ib=function(){var e,n,i,r;for(i=new om,this.e&&Ii(Ii(i,Q5(this.e)),": "),n=qn($$(this),0);n.b!=n.d.c;)e=a(Yn(n),11),Ii(Ii(S1(Ii(i,(r=Zkt(e),r==null?"p_"+e.o:"p_"+r)),32),Q5(e.i))," / ");return R9(i,i.a.length-2-1)},u.j=0,u.k=0;var lje=A(f0,"ConnectedSelfLoopComponent",151);T(129,23,{3:1,34:1,23:1,129:1},A1),u.c=0;var GWt,WWt,$Wt,tb,kw,Zp,Lw,rg,hp,Yp,eb,nb,VWt,qWt,XWt,ZWt,YWt,KWt,JWt,QWt,t$t,e$t,n$t,i$t,r$t,sy,Ax,Pw,Iw,sA=Ri(f0,"LoopSide",129,ji,QV,hie),s$t;T(424,1,{},CIt,xht,dut),u.Ib=function(){return this.b.Ib()},u.c=0,u.d=!1,u.e=!1,u.f=!1,u.i=0,u.j=0;var hje=A(f0,"NubSpline",424);T(190,1,{190:1},IDt,V$);var fje=A(f0,"NubSpline/PolarCP",190);T(599,424,{},F$);var dje=A(f0,"NubsSelfLoop",599);T(236,1,{},V8t,wX,v8t,yL,xX),u.a=Zdt,u.b=ox,u.c=Zdt,u.d=ox;var pje=A(f0,"Rectangle",236);T(1353,1,Lu,BRt),u.vf=function(e){return X0e(a(e,31))},u.Pe=function(e,n){e3e(this,a(e,31),n)},u.d=3;var o$t,c$t,a$t,u$t,l$t,h$t,gje=A(f0,"SplineEdgeRouter",1353);T(250,1,{250:1},mN),u.Ib=function(){return this.a+" ->("+this.c+") "+this.b},u.c=0;var mje=A(f0,"SplineEdgeRouter/Dependency",250);T(417,23,{3:1,34:1,23:1,417:1},lrt);var sg,oy,f$t=Ri(f0,"SplineEdgeRouter/SideToProcess",417,ji,noe,pie),d$t;T(1354,1,{},HMt),u.td=function(e){Yie(this.a,this.b,e)};var bje=A(f0,"SplineEdgeRouter/lambda$0$Type",1354);T(1355,1,{},GMt),u.td=function(e){Kie(this.a,this.b,e)};var wje=A(f0,"SplineEdgeRouter/lambda$1$Type",1355);T(125,1,{34:1,125:1},i9t,Mht),u.vd=function(e){return BQt(this,a(e,125))},u.b=0,u.e=0,u.f=0,u.i=!1,u.j=0,u.k=!1,u.n=!1,u.p=0,u.r=0,u.s=0;var vje=A(f0,"SplineSegment",125);T(589,1,{589:1},$t),u.a=0,u.b=!1,u.c=!1,u.d=!1,u.e=!1,u.f=0;var _je=A(f0,"SplineSegment/EdgeInformation",589);T(990,1,{},_e);var yje=A(_4,vft,990);T(991,1,jr,Ye),u.Ld=function(e,n){return S0e(a(e,128),a(n,128))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var xje=A(_4,tBt,991);T(989,1,{},v3t);var Mje=A(_4,"MrTree",989);T(360,23,{3:1,34:1,23:1,360:1,285:1,286:1},j9),u.hf=function(){return b9t(this)},u.uf=function(){return b9t(this)};var aF,oA,$6,cA,Nbt=Ri(_4,"TreeLayoutPhases",360,ji,vce,oie),p$t;T(960,244,N_,nTt),u.Ae=function(e,n){var i,r,c,l,f,p;for(l=(f=new bN,Uo(f,e),Ct(f,(mc(),lA),e),p=new vi,Nve(e,f,p),Mve(e,f,p),f),c=Fve(this.a,l),r=new j(c);r.a"+oN(this.c):"e_"+Yr(this)};var Aje=A(y4,"TEdge",170);T(128,131,{3:1,128:1,93:1,131:1},bN),u.Ib=function(){var e,n,i,r,c;for(c=null,r=qn(this.b,0);r.b!=r.d.c;)i=a(Yn(r),76),c+=(i.c==null||i.c.length==0?"n_"+i.g:"n_"+i.c)+` -`;for(n=qn(this.a,0);n.b!=n.d.c;)e=a(Yn(n),170),c+=(e.b&&e.c?oN(e.b)+"->"+oN(e.c):"e_"+Yr(e))+` -`;return c};var P3e=A(y4,"TGraph",128);T(570,452,{3:1,452:1,570:1,93:1,131:1});var kje=A(y4,"TShape",570);T(76,570,{3:1,452:1,76:1,570:1,93:1,131:1},nq),u.Ib=function(){return oN(this)};var I3e=A(y4,"TNode",76);T(231,1,wd,Hd),u.sc=function(e){vo(this,e)},u.tc=function(){var e;return e=qn(this.a.d,0),new Ob(e)};var Lje=A(y4,"TNode/2",231);T(330,1,Cs,Ob),u.gc=function(e){ks(this,e)},u.ic=function(){return a(Yn(this.a),170).c},u.hc=function(){return k9(this.a)},u.jc=function(){Hct(this.a)};var Pje=A(y4,"TNode/2/1",330);T(1545,1,Br,iTt),u.Pe=function(e,n){Xve(this,a(e,128),n)};var Ije=A(cx,"FanProcessor",1545);T(308,23,{3:1,34:1,23:1,308:1,286:1},OT),u.hf=function(){switch(this.g){case 0:return new oxt;case 1:return new iTt;case 2:return new xa;case 3:return new Is;case 4:return new Qr;case 5:return new Uu;default:throw K(new yn(oY+(this.f!=null?this.f:""+this.g)))}};var oQ,cQ,aQ,uQ,lQ,uF,g$t=Ri(cx,Ift,308,ji,Pae,cie),m$t;T(1548,1,Br,Is),u.Pe=function(e,n){Lme(this,a(e,128),n)},u.a=0;var Rje=A(cx,"LevelHeightProcessor",1548);T(1549,1,wd,ol),u.sc=function(e){vo(this,e)},u.tc=function(){return we(),Rv(),X_};var Dje=A(cx,"LevelHeightProcessor/1",1549);T(1546,1,Br,xa),u.Pe=function(e,n){Kge(this,a(e,128),n)},u.a=0;var Nje=A(cx,"NeighborsProcessor",1546);T(1547,1,wd,Ul),u.sc=function(e){vo(this,e)},u.tc=function(){return we(),Rv(),X_};var Oje=A(cx,"NeighborsProcessor/1",1547);T(1550,1,Br,Qr),u.Pe=function(e,n){kme(this,a(e,128),n)},u.a=0;var Bje=A(cx,"NodePositionProcessor",1550);T(1544,1,Br,oxt),u.Pe=function(e,n){pye(this,a(e,128))};var Fje=A(cx,"RootProcessor",1544);T(1551,1,Br,Uu),u.Pe=function(e,n){whe(a(e,128))};var Uje=A(cx,"Untreeifyer",1551),V6,aA,b$t,hQ,lF,uA,fQ,hF,fF,NE,lA,dF,Kp,Obt,w$t,dQ,Rw,pQ,Bbt;T(750,1,_d,fj),u.ue=function(e){He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Ydt),""),"Weighting of Nodes"),"Which weighting to use when computing a node order."),Ubt),(i0(),xs)),Vbt),qe((t0(),On))))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Kdt),""),"Search Order"),"Which search order to use when computing a spanning tree."),Fbt),xs),Xbt),qe(On)))),o7t((new dj,e))};var v$t,Fbt,_$t,Ubt,zje=A(MO,"MrTreeMetaDataProvider",750);T(886,1,_d,dj),u.ue=function(e){o7t(e)};var y$t,zbt,jbt,x$t,Hbt,pF,Gbt,M$t,Wbt,E$t,jje=A(MO,"MrTreeOptions",886);T(887,1,{},US),u.Be=function(){var e;return e=new nTt,e},u.Ce=function(e){};var Hje=A(MO,"MrTreeOptions/MrtreeFactory",887);T(438,23,{3:1,34:1,23:1,438:1},hrt);var gQ,$bt,Vbt=Ri(MO,"OrderWeighting",438,ji,Kse,gie),S$t;T(388,23,{3:1,34:1,23:1,388:1},frt);var qbt,mQ,Xbt=Ri(MO,"TreeifyingOrder",388,ji,Yse,mie),T$t;T(1357,1,Lu,pj),u.vf=function(e){return a(e,128),C$t},u.Pe=function(e,n){Xue(this,a(e,128),n)};var C$t,Gje=A("org.eclipse.elk.alg.mrtree.p1treeify","DFSTreeifyer",1357);T(1358,1,Lu,gj),u.vf=function(e){return a(e,128),A$t},u.Pe=function(e,n){Jge(this,a(e,128),n)};var A$t,Wje=A("org.eclipse.elk.alg.mrtree.p2order","NodeOrderer",1358);T(1359,1,Lu,y8),u.vf=function(e){return a(e,128),k$t},u.Pe=function(e,n){Dwe(this,a(e,128),n)},u.a=0;var k$t,$je=A("org.eclipse.elk.alg.mrtree.p3place","NodePlacer",1359);T(1360,1,Lu,bj),u.vf=function(e){return a(e,128),L$t},u.Pe=function(e,n){_pe(a(e,128),n)};var L$t,Vje=A("org.eclipse.elk.alg.mrtree.p4route","EdgeRouter",1360),hA;T(447,23,{3:1,34:1,23:1,447:1,285:1,286:1},drt),u.hf=function(){return dIt(this)},u.uf=function(){return dIt(this)};var gF,OE,Zbt=Ri(Jdt,"RadialLayoutPhases",447,ji,Jse,bie),P$t;T(961,244,N_,_3t),u.Ae=function(e,n){var i,r,c,l,f,p,b;if(r=t9t(this,e),di(n,"Radial layout",r.c.length),b=F1e(e),ga(e,(qT(),hA),b),!b)throw K(new yn("The given graph is not a tree!"));for(l=lt(Yt(cn(e,(tw(),wF)))),l==0&&(l=m9t(e)),ga(e,wF,l),i=new zG(e),pd(CRt(i),new L3),c=new y5(i),gIt(c),p=new j(t9t(this,e));p.a0&&NPt(e.charCodeAt(n-1),uBt);)--n;if(r>=n)throw K(new yn("The given string does not contain any numbers."));if(c=Z2(e.substr(r,n-r),`,|;|\r| -`),c.length!=2)throw K(new yn("Exactly two numbers are expected, "+c.length+" were found."));try{this.a=rw(iw(c[0])),this.b=rw(iw(c[1]))}catch(l){throw l=vr(l),ct(l,118)?(i=l,K(new yn(lBt+i))):K(l)}},u.Ib=function(){return"("+this.a+","+this.b+")"},u.a=0,u.b=0;var ss=A(KP,"KVector",9);T(74,66,{3:1,4:1,20:1,25:1,41:1,13:1,66:1,15:1,74:1,428:1},Va,E9),u.gf=function(e){var n,i,r,c,l,f;r=Z2(e,`,|;|\\(|\\)|\\[|\\]|\\{|\\}| | | -`),ld(this);try{for(i=0,l=0,c=0,f=0;i0&&(l%2==0?c=rw(r[i]):f=rw(r[i]),l>0&&l%2!=0&&Xi(this,new We(c,f)),++l),++i}catch(p){throw p=vr(p),ct(p,118)?(n=p,K(new yn("The given string does not match the expected format for vectors."+n))):K(p)}},u.Ib=function(){var e,n,i;for(e=new ll("("),n=qn(this,0);n.b!=n.d.c;)i=a(Yn(n),9),Ii(e,i.a+","+i.b),n.b!=n.d.c&&(e.a+="; ");return(e.a+=")",e).a};var mwt=A(KP,"KVectorChain",74);T(224,23,{3:1,34:1,23:1,224:1},BT);var TQ,vF,_F,Y6,K6,yF,bwt=Ri(Dh,"Alignment",224,ji,Iae,Mie),K$t;T(855,1,_d,_j),u.ue=function(e){MNt(e)};var wwt,CQ,vwt,_wt,J$t,AQ,Q$t,tVt,ywt,xwt,eVt,iGe=A(Dh,"BoxLayouterOptions",855);T(856,1,{},xR),u.Be=function(){var e;return e=new gz,e},u.Ce=function(e){};var rGe=A(Dh,"BoxLayouterOptions/BoxFactory",856);T(785,1,_d,yj),u.ue=function(e){He(e,new De(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,XBt),""),"Layout Algorithm"),"Select a specific layout algorithm."),(i0(),X6)),At),qe((t0(),On))))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Edt),""),"Alignment"),"Alignment of the selected node relative to other nodes, the exact meaning depends on the used algorithm."),Ewt),xs),bwt),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.alignment"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,aE),""),"Aspect Ratio"),"The desired aspect ratio of the drawing, that is the quotient of width by height."),ha),To),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.aspectRatio"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,lpt),""),"Bend Points"),"A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points."),Ed),mwt),qe(Md)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.bendPoints"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,kY),""),"Debug Mode"),"Whether additional debug information shall be generated."),(me(),me(),!1)),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.debugMode"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,PY),""),fft),"Overall direction of edges: horizontal (right / left) or vertical (down / up)."),Twt),xs),pA),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.direction"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,t6),""),"Edge Routing"),"What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline."),kwt),xs),GQ),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.edgeRouting"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,apt),""),"Expand Nodes"),"If active, nodes are expanded to fill the area of their parent."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.expandNodes"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Sdt),""),"Hierarchy Handling"),"If this option is set to SEPARATE_CHILDREN, each hierarchy level of the graph is processed independently, possibly by different layout algorithms, beginning with the lowest level. If it is set to INCLUDE_CHILDREN, the algorithm is responsible to process all hierarchy levels that are contained in the associated parent node. If the root node is set to inherit (or not set at all), the default behavior is SEPARATE_CHILDREN."),Iwt),xs),fvt),ur(On,Y(Z(Jp,1),jt,163,0,[vc]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.hierarchyHandling"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,rx),""),"Padding"),"The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately."),zwt),Ed),Pgt),ur(On,Y(Z(Jp,1),jt,163,0,[vc]))))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,uO),""),"Interactive"),"Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible."),!1),Ec),ho),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,rY),""),"Port Constraints"),"Defines constraints of the position of the ports of a node."),$wt),xs),gvt),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portConstraints"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,yO),""),"Position"),"The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position."),Ed),ss),ur(vc,Y(Z(Jp,1),jt,163,0,[ib,og]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.position"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,qP),""),"Priority"),"Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used."),Pa),Io),ur(vc,Y(Z(Jp,1),jt,163,0,[Md]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.priority"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,aO),""),"Randomization Seed"),"Seed used for pseudo-random number generators to control the layout algorithm. If the value is 0, the seed shall be determined pseudo-randomly (e.g. from the system time)."),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.randomSeed"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,XP),""),"Separate Connected Components"),"Whether each connected component should be processed separately."),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.separateConnComp"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Odt),""),"Junction Points"),"This option is not used as option, but as output of the layout algorithms. It is attached to edges and determines the points where junction symbols should be drawn in order to represent hyperedges with orthogonal routing. Whether such points are computed depends on the chosen layout algorithm and edge routing style. The points are put into the vector chain with no specific order."),Rwt),Ed),mwt),qe(Md)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.junctionPoints"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,zdt),""),"Comment Box"),"Whether the node should be regarded as a comment box instead of a regular node. In that case its placement should be similar to how labels are handled. Any edges incident to a comment box specify to which graph elements the comment is related."),!1),Ec),ho),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.commentBox"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,jdt),""),"Hypernode"),"Whether the node should be handled as a hypernode."),!1),Ec),ho),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.hypernode"])))),He(e,new De(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,ZBt),""),"Label Manager"),"Label managers can shorten labels upon a layout algorithm's request."),Ed),z3e),ur(On,Y(Z(Jp,1),jt,163,0,[og]))))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,$dt),""),"Margins"),"Margins define additional space around the actual bounds of a graph element. For instance, ports or labels being placed on the outside of a node's border might introduce such a margin. The margin is used to guarantee non-overlap of other graph elements with those ports or labels."),Dwt),Ed),Lgt),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.margins"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,xdt),""),"No Layout"),"No layout is done for the associated element. This is used to mark parts of a diagram to avoid their inclusion in the layout graph, or to mark parts of the layout graph to prevent layout engines from processing them. If you wish to exclude the contents of a compound node from automatic layout, while the node itself is still considered on its own layer, use the 'Fixed Layout' algorithm for that node."),!1),Ec),ho),ur(vc,Y(Z(Jp,1),jt,163,0,[Md,ib,og]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.noLayout"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,YBt),""),"Scale Factor"),"The scaling factor to be applied to the corresponding node in recursive layout. It causes the corresponding node's size to be adjusted, and its ports and labels to be sized and placed accordingly after the layout of that node has been determined (and before the node itself and its siblings are arranged). The scaling is not reverted afterwards, so the resulting layout graph contains the adjusted size and position data. This option is currently not supported if 'Layout Hierarchy' is set."),1),ha),To),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.scaleFactor"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,KBt),""),"Animate"),"Whether the shift from the old layout to the new computed layout shall be animated."),!0),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.animate"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,JBt),""),"Animation Time Factor"),"Factor for computation of animation time. The higher the value, the longer the animation time. If the value is 0, the resulting time is always equal to the minimum defined by 'Minimal Animation Time'."),Xt(100)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.animTimeFactor"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,QBt),""),"Layout Ancestors"),"Whether the hierarchy levels on the path from the selected element to the root of the diagram shall be included in the layout process."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.layoutAncestors"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,tFt),""),"Maximal Animation Time"),"The maximal time for animations, in milliseconds."),Xt(4e3)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.maxAnimTime"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,eFt),""),"Minimal Animation Time"),"The minimal time for animations, in milliseconds."),Xt(400)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.minAnimTime"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,nFt),""),"Progress Bar"),"Whether a progress bar shall be displayed during layout computations."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.progressBar"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,iFt),""),"Validate Options"),"Whether layout options shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."),!0),Ec),ho),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,rFt),""),"Zoom to Fit"),"Whether the zoom level shall be set to view the whole diagram after layout."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.zoomToFit"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,upt),"box"),"Box Layout Mode"),"Configures the packing mode used by the {@link BoxLayoutProvider}. If SIMPLE is not required (neither priorities are used nor the interactive mode), GROUP_DEC can improve the packing and decrease the area. GROUP_MIXED and GROUP_INC may, in very specific scenarios, work better."),Swt),xs),Mvt),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,JZ),J1),"Components Spacing"),"Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated."),12),ha),To),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.borderSpacing"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,pdt),J1),"Edge Spacing"),"Spacing to be preserved between any two edges. Note that while this can somewhat easily be satisfied for the segments of orthogonally drawn edges, it is harder for general polylines or splines."),10),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,iY),J1),"Edge Label Spacing"),"The minimal distance to be preserved between a label and the edge it is associated with. Note that the placement of a label is influenced by the 'edgelabels.placement' option."),2),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,gdt),J1),"Edge Node Spacing"),"Spacing to be preserved between nodes and edges."),10),ha),To),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,mdt),J1),"Label Spacing"),"Determines the amount of space to be left between two labels of the same graph element."),0),ha),To),qe(On)),Y(Z(At,1),wt,2,6,[uFt])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,wdt),J1),"Label Node Spacing"),"Spacing to be preserved between labels and the border of node they are associated with. Note that the placement of a label is influenced by the 'nodelabels.placement' option."),5),ha),To),qe(On)),Y(Z(At,1),wt,2,6,[uFt])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,bdt),J1),"Label Port Spacing"),"Spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),ha),To),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,lE),J1),"Node Spacing"),"The minimal distance to be preserved between each two nodes."),20),ha),To),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.spacing"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,vdt),J1),"Port Spacing"),"Spacing between pairs of ports of the same node."),10),ha),To),ur(On,Y(Z(Jp,1),jt,163,0,[vc]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portSpacing"])))),He(e,new De(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,_dt),J1),"Individual Spacing Override"),"In general spacing values apply to the children of the hierarchical node (possibly the root node) for which the values are actually specified. Hereby, the children include ports, edges, and labels."),Ed),D3e),ur(vc,Y(Z(Jp,1),jt,163,0,[Md,ib,og]))))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Vdt),J1),"Additional Port Space"),"Additional space around the sets of ports on each node side. For each side of a node, this option can reserve additional space before and after the ports on each side. For example, a top spacing of 20 makes sure that the first port on the western and eastern side is 20 units away from the northern border."),Qwt),Ed),Lgt),qe(On)))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,Wdt),lFt),"Layout Partition"),"Partition to which the node belongs to. If 'layoutPartitions' is true, all nodes are expected to have a partition."),Pa),Io),ur(On,Y(Z(Jp,1),jt,163,0,[vc]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.partition"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Gdt),lFt),"Layout Partitioning"),"Whether to activate partitioned layout."),jwt),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.layoutPartitions"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,sFt),hFt),"Node Label Padding"),"Define padding for node labels that are placed inside of a node."),Nwt),Ed),Pgt),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.nodeLabelInset"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Adt),hFt),"Node Label Placement"),"Hints for where node labels are to be placed; if empty, the node label's position is not modified."),Owt),BE),to),ur(vc,Y(Z(Jp,1),jt,163,0,[og]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.nodeLabelPlacement"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Pdt),EO),"Port Alignment"),"Defines the default port distribution for a node. May be overridden for each side individually."),Gwt),xs),_A),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portAlignment"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,Idt),EO),"Port Alignment (North)"),"Defines how ports on the northern side are placed, overriding the node's general port alignment."),xs),_A),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portAlignment.north"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,Rdt),EO),"Port Alignment (South)"),"Defines how ports on the southern side are placed, overriding the node's general port alignment."),xs),_A),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portAlignment.south"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,Ddt),EO),"Port Alignment (West)"),"Defines how ports on the western side are placed, overriding the node's general port alignment."),xs),_A),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portAlignment.west"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,Ndt),EO),"Port Alignment (East)"),"Defines how ports on the eastern side are placed, overriding the node's general port alignment."),xs),_A),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portAlignment.east"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,vO),hpt),"Node Size Constraints"),"Constraints for determining node sizes. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to node sizes being fixed."),Bwt),BE),yA),qe(vc)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,LY),hpt),"Node Size Options"),"Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications."),Uwt),BE),vvt),qe(vc)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,_O),hpt),"Node Size Minimum"),"The minimal size to which a node can be reduced."),Fwt),Ed),ss),qe(vc)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Bdt),AY),"Edge Label Placement"),"Gives a hint on where to put edge labels."),Cwt),xs),evt),qe(og)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.edgeLabelPlacement"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Fdt),AY),"Inline Edge Labels"),"If true, an edge label is placed directly on its edge. May only apply to center edge labels. This kind of label placement is only advisable if the label's rendering is such that it is not crossed by its edge and thus stays legible."),!1),Ec),ho),qe(og)))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,oFt),"font"),"Font Name"),"Font name used for a label."),X6),At),qe(og)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.fontName"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,cFt),"font"),"Font Size"),"Font size used for a label."),Pa),Io),qe(og)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.fontSize"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,Hdt),jY),"Port Anchor Offset"),"The offset to the port position where connections shall be attached."),Ed),ss),qe(ib)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portAnchor"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,Udt),jY),"Port Index"),"The index of a port in the fixed order around a node. The order is assumed as clockwise, starting with the leftmost port on the top side. This option must be set if 'Port Constraints' is set to FIXED_ORDER and no specific positions are given for the ports. Additionally, the option 'Port Side' must be defined in this case."),Pa),Io),qe(ib)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portIndex"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Mdt),jY),"Port Side"),"The side of a node on which a port is situated. This option must be set if 'Port Constraints' is set to FIXED_SIDE or FIXED_ORDER and no specific positions are given for the ports."),qwt),xs),Ia),qe(ib)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portSide"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,ydt),jY),"Port Border Offset"),"The offset of ports on the node border. With a positive offset the port is moved outside of the node, while with a negative offset the port is moved towards the inside. An offset of 0 means that the port is placed directly on the node border, i.e. if the port side is north, the port's south border touches the nodes's north border; if the port side is east, the port's west border touches the nodes's east border; if the port side is south, the port's north border touches the node's south border; if the port side is west, the port's east border touches the node's west border."),ha),To),qe(ib)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.offset"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,kdt),fFt),"Port Label Placement"),"Decides on a placement method for port labels."),Vwt),xs),mvt),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portLabelPlacement"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Ldt),fFt),"Port Labels Next to Port"),"Usually, inside port labels of hierarchical nodes are placed not next to their port, but with an offset to avoid edge-label crossings. The offset is not necessary if the port has no connections that would cross the label, but is usually applied anyway to keep things uniform. Setting this option to true places labels next to their ports if they won't be crossed by edges."),!1),Ec),ho),qe(vc)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Tdt),dFt),"Activate Inside Self Loops"),"Whether this node allows to route self loops inside of it instead of around it. If set to true, this will make the node a compound node if it isn't already, and will require the layout algorithm to support compound nodes with hierarchical ports."),!1),Ec),ho),qe(vc)),Y(Z(At,1),wt,2,6,[pFt])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Cdt),dFt),"Inside Self Loop"),"Whether a self loop should be routed inside a node instead of around that node."),!1),Ec),ho),qe(Md)),Y(Z(At,1),wt,2,6,[pFt])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,QZ),"edge"),"Edge Thickness"),"The thickness of an edge. This is a hint on the line width used to draw an edge, possibly requiring more space to be reserved for it."),1),ha),To),qe(Md)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.thickness"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,aFt),"edge"),"Edge Type"),"The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations."),Pwt),xs),cvt),qe(Md)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.edgeType"])))),AT(e,new C2(yT(J3(K3(new Cb,Nn),"Layered"),'The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called "hierarchies", and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.'))),AT(e,new C2(yT(J3(K3(new Cb,"org.eclipse.elk.orthogonal"),"Orthogonal"),`Orthogonal methods that follow the "topology-shape-metrics" approach by Batini, Nardelli and Tamassia '86. The first phase determines the topology of the drawing by applying a planarization technique, which results in a planar representation of the graph. The orthogonal shape is computed in the second phase, which aims at minimizing the number of edge bends, and is called orthogonalization. The third phase leads to concrete coordinates for nodes and edge bend points by applying a compaction method, thus defining the metrics.`))),AT(e,new C2(yT(J3(K3(new Cb,Rf),"Force"),"Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. The first successful method of this kind was proposed by Eades in 1984."))),AT(e,new C2(yT(J3(K3(new Cb,"org.eclipse.elk.circle"),"Circle"),"Circular layout algorithms emphasize cycles or biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent OPTIONS of the graph."))),AT(e,new C2(yT(J3(K3(new Cb,FBt),"Tree"),"Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type."))),AT(e,new C2(yT(J3(K3(new Cb,"org.eclipse.elk.planar"),"Planar"),"Algorithms that require a planar or upward planar graph. Most of these algorithms are theoretically interesting, but not practically usable."))),AT(e,new C2(yT(J3(K3(new Cb,Hm),"Radial"),"Radial layout algorithms usually position the nodes of the graph on concentric circles."))),rNt((new M8,e)),MNt((new _j,e)),VDt((new E8,e))};var Mwt,nVt,Ewt,FE,iVt,rVt,Swt,sVt,kQ,fA,Twt,oVt,J6,Cwt,Awt,kwt,Lwt,Pwt,cVt,cy,Iwt,aVt,xF,LQ,PQ,kx,Rwt,MF,Dwt,uVt,Nwt,EF,Owt,UE,Bwt,Q6,Fwt,SF,Uwt,IQ,ay,zwt,lVt,jwt,hVt,Hwt,Gwt,RQ,DQ,NQ,OQ,Wwt,nu,tI,$wt,fVt,eI,BQ,Vwt,dA,qwt,Lx,TF,FQ,dVt,UQ,Xwt,pVt,Zwt,gVt,zQ,Ywt,CF,Kwt,uy,Jwt,Qwt,tvt,sGe=A(Dh,"CoreOptions",785);T(110,23,{3:1,34:1,23:1,110:1},H5);var fp,ah,uh,Ff,cg,pA=Ri(Dh,fft,110,ji,Zce,Lie),mVt;T(226,23,{3:1,34:1,23:1,226:1},G9);var gA,Px,mA,AF,evt=Ri(Dh,"EdgeLabelPlacement",226,ji,yce,Pie),bVt;T(197,23,{3:1,34:1,23:1,197:1},W9);var zE,jQ,rb,HQ,GQ=Ri(Dh,"EdgeRouting",197,ji,xce,Iie),wVt;T(289,23,{3:1,34:1,23:1,289:1},FT);var nvt,ivt,rvt,svt,WQ,ovt,cvt=Ri(Dh,"EdgeType",289,ji,Rae,Rie),vVt;T(853,1,_d,M8),u.ue=function(e){rNt(e)};var avt,uvt,lvt,_Vt,hvt,bA,oGe=A(Dh,"FixedLayouterOptions",853);T(854,1,{},MR),u.Be=function(){var e;return e=new p1,e},u.Ce=function(e){};var cGe=A(Dh,"FixedLayouterOptions/FixedFactory",854);T(316,23,{3:1,34:1,23:1,316:1},_W);var Ix,kF,wA,fvt=Ri(Dh,"HierarchyHandling",316,ji,Goe,Cie),yVt;T(86,23,{3:1,34:1,23:1,86:1},Bv);var Uf,kl,Ll,Pl,Du,Il,lh,hh,Bh,to=Ri(Dh,"NodeLabelPlacement",86,ji,Mue,Aie),xVt;T(225,23,{3:1,34:1,23:1,225:1},G5);var dvt,vA,sb,pvt,$Q,_A=Ri(Dh,"PortAlignment",225,ji,qce,kie),MVt;T(83,23,{3:1,34:1,23:1,83:1},UT);var Rx,Gc,Sd,Dx,dp,ob,gvt=Ri(Dh,"PortConstraints",83,ji,Lae,Tie),EVt;T(275,23,{3:1,34:1,23:1,275:1},yW);var LF,cb,ly,mvt=Ri(Dh,"PortLabelPlacement",275,ji,zoe,Eie),SVt;T(69,23,{3:1,34:1,23:1,69:1},W5);var Qe,Tn,nI,hy,zf,ab,bvt,iI,fy,Td,VQ,Cd,M0,Ad,Nx,rI,dy,sI,fi,Wc,on,Ia=Ri(Dh,"PortSide",69,ji,Uce,Sie),TVt;T(857,1,_d,E8),u.ue=function(e){VDt(e)};var CVt,AVt,wvt,kVt,LVt,aGe=A(Dh,"RandomLayouterOptions",857);T(858,1,{},pz),u.Be=function(){var e;return e=new k3,e},u.Ce=function(e){};var uGe=A(Dh,"RandomLayouterOptions/RandomFactory",858);T(344,23,{3:1,34:1,23:1,344:1},$9);var ub,oI,cI,E0,yA=Ri(Dh,"SizeConstraint",344,ji,Mce,Die),PVt;T(239,23,{3:1,34:1,23:1,239:1},Fv);var PF,IF,jE,qQ,xA,MA,RF,Ox,DF,vvt=Ri(Dh,"SizeOptions",239,ji,Eue,Nie),IVt;T(313,1,{},SD,Sst,Est),u.b=!1,u.c=0,u.d=-1,u.e=0,u.f=!1,u.j=0;var lGe=A(Rh,"BasicProgressMonitor",313);T(848,244,N_,gz),u.Ae=function(e,n){var i,r,c,l,f,p,b,v,M,k;switch(di(n,"Box layout",2),l=lt(Yt(cn(e,(v7(),eVt)))),f=a(cn(e,tVt),119),i=lt(de(cn(e,vwt))),r=lt(de(cn(e,_wt))),c=a(cn(e,CQ),288),c.g){case 0:p=(b=new xD((!e.a&&(e.a=new Wt(zr,e,10,11)),e.a)),we(),D1(b,new GH(r)),b),v=a(cn(e,AQ),9),v.a=y.Math.max(v.a-f.b-f.c,0),v.b=y.Math.max(v.b-f.d-f.a,0),M=Yt(cn(e,wwt)),(M==null||(En(M),M<=0))&&(M=1.3),k=$2e(p,l,f,v.a,v.b,i,(En(M),M)),L_(e,k.a,k.b,!1,!0);break;default:nye(e,l,f,i)}Vn(n)};var hGe=A(Rh,"BoxLayoutProvider",848);T(849,1,jr,GH),u.Ld=function(e,n){return abe(this,a(e,35),a(n,35))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.a=!1;var fGe=A(Rh,"BoxLayoutProvider/1",849);T(145,1,{145:1},IN,zSt),u.Ib=function(){return this.c?cht(this.c):Gp(this.b)};var dGe=A(Rh,"BoxLayoutProvider/Group",145);T(288,23,{3:1,34:1,23:1,288:1},V9);var _vt,yvt,xvt,XQ,Mvt=Ri(Rh,"BoxLayoutProvider/PackingMode",288,ji,Sce,Oie),RVt;T(850,1,jr,lz),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return-ro(V5(a(e,145)),V5(a(n,145)))};var pGe=A(Rh,"BoxLayoutProvider/lambda$0$Type",850);T(851,1,jr,hz),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return ro(V5(a(e,145)),V5(a(n,145)))};var gGe=A(Rh,"BoxLayoutProvider/lambda$1$Type",851);T(852,1,jr,fz),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return ro(V5(a(e,145)),V5(a(n,145)))};var mGe=A(Rh,"BoxLayoutProvider/lambda$2$Type",852);T(833,1,{},UMt),u.td=function(e){H0e(this.a,this.b,e)},u.a=0,u.b=0;var bGe=A(Rh,"ElkUtil/lambda$0$Type",833);T(834,1,{},zMt),u.td=function(e){dQt(this.a,this.b,e)},u.a=0,u.b=0;var wGe=A(Rh,"ElkUtil/lambda$1$Type",834);T(835,1,{},jMt),u.td=function(e){jte(this.a,this.b,e)},u.a=0,u.b=0;var vGe=A(Rh,"ElkUtil/lambda$2$Type",835);T(322,1,{34:1,322:1},W3),u.vd=function(e){return Xte(this,a(e,210))},u.Fb=function(e){var n;return ct(e,322)?(n=a(e,322),this.a==n.a):!1},u.Hb=function(){return Tr(this.a)},u.Ib=function(){return this.a+" (exclusive)"},u.a=0;var _Ge=A(Rh,"ExclusiveBounds/ExclusiveLowerBound",322);T(963,244,N_,p1),u.Ae=function(e,n){var i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt,pt,_t,It,Gt,Zt,ce,ae,Te;for(di(n,gFt,1),l=a(cn(e,(dr(),Awt)),197),I=0,O=0,_t=new $n((!e.a&&(e.a=new Wt(zr,e,10,11)),e.a));_t.e!=_t.i._b();){for(rt=a(ci(_t),35),Te=a(cn(rt,(BN(),bA)),9),Te&&(Wd(rt,Te.a,Te.b),a(cn(rt,uvt),185).pc((Ku(),ub))&&($=a(cn(rt,lvt),9),$.a>0&&$.b>0&&L_(rt,$.a,$.b,!0,!0))),I=y.Math.max(I,rt.i+rt.g),O=y.Math.max(O,rt.j+rt.f),M=new $n((!rt.n&&(rt.n=new Wt(ic,rt,1,7)),rt.n));M.e!=M.i._b();)b=a(ci(M),137),Te=a(cn(b,bA),9),Te&&Wd(b,Te.a,Te.b),I=y.Math.max(I,rt.i+b.i+b.g),O=y.Math.max(O,rt.j+b.j+b.f);for(Zt=new $n((!rt.c&&(rt.c=new Wt(Rl,rt,9,9)),rt.c));Zt.e!=Zt.i._b();)for(Gt=a(ci(Zt),121),Te=a(cn(Gt,bA),9),Te&&Wd(Gt,Te.a,Te.b),ce=rt.i+Gt.i,ae=rt.j+Gt.j,I=y.Math.max(I,ce+Gt.g),O=y.Math.max(O,ae+Gt.f),v=new $n((!Gt.n&&(Gt.n=new Wt(ic,Gt,1,7)),Gt.n));v.e!=v.i._b();)b=a(ci(v),137),Te=a(cn(b,bA),9),Te&&Wd(b,Te.a,Te.b),I=y.Math.max(I,ce+b.i+b.g),O=y.Math.max(O,ae+b.j+b.f);for(c=Rn(Af(rt));Jn(c);)i=a(In(c),105),k=K7t(i),I=y.Math.max(I,k.a),O=y.Math.max(O,k.b);for(r=Rn(xP(rt));Jn(r);)i=a(In(r),105),zc(a(at((!i.b&&(i.b=new pn(Si,i,4,7)),i.b),0),97))!=e&&(k=K7t(i),I=y.Math.max(I,k.a),O=y.Math.max(O,k.b))}if(l==(gd(),zE))for(pt=new $n((!e.a&&(e.a=new Wt(zr,e,10,11)),e.a));pt.e!=pt.i._b();)for(rt=a(ci(pt),35),r=Rn(Af(rt));Jn(r);)i=a(In(r),105),p=(f=new Va,f),p.b==0?ga(i,kx,null):ga(i,kx,p);It=a(cn(e,(BN(),_Vt)),119),et=I+It.b+It.c,G=O+It.d+It.a,L_(e,et,G,!0,!0),Vn(n)};var yGe=A(Rh,"FixedLayoutProvider",963);T(786,131,YZ,Rk);var D3e=A(Rh,"IndividualSpacings",786);T(635,1,{},bCt),u.c=0;var xGe=A(Rh,"InstancePool",635);T(48,1,{20:1,48:1},zs),u.sc=function(e){vo(this,e)},u.Fb=function(e){var n,i,r;return ct(e,48)?(i=a(e,48),n=this.a==null?i.a==null:Fi(this.a,i.a),r=this.b==null?i.b==null:Fi(this.b,i.b),n&&r):!1},u.Hb=function(){var e,n,i,r,c,l;return i=this.a==null?0:Yr(this.a),e=i&qr,n=i&-65536,l=this.b==null?0:Yr(this.b),r=l&qr,c=l&-65536,e^c>>16&qr|n^r<<16},u.tc=function(){return new WH(this)},u.Ib=function(){return this.a==null&&this.b==null?"pair(null,null)":this.a==null?"pair(null,"+Yc(this.b)+")":this.b==null?"pair("+Yc(this.a)+",null)":"pair("+Yc(this.a)+","+Yc(this.b)+")"};var MGe=A(Rh,"Pair",48);T(859,1,Cs,WH),u.gc=function(e){ks(this,e)},u.hc=function(){return!this.c&&(!this.b&&this.a.a!=null||this.a.b!=null)},u.ic=function(){if(!this.c&&!this.b&&this.a.a!=null)return this.b=!0,this.a.a;if(!this.c&&this.a.b!=null)return this.c=!0,this.a.b;throw K(new J)},u.jc=function(){throw this.c&&this.a.b!=null?this.a.b=null:this.b&&this.a.a!=null&&(this.a.a=null),K(new na)},u.b=!1,u.c=!1;var EGe=A(Rh,"Pair/1",859);T(404,1,{404:1},p4t),u.Fb=function(e){return au(this.a,a(e,404).a)&&au(this.c,a(e,404).c)&&au(this.d,a(e,404).d)&&au(this.b,a(e,404).b)},u.Hb=function(){return eq(Y(Z(un,1),te,1,5,[this.a,this.c,this.d,this.b]))},u.Ib=function(){return"("+this.a+Rc+this.c+Rc+this.d+Rc+this.b+")"};var SGe=A(Rh,"Quadruple",404);T(957,244,N_,k3),u.Ae=function(e,n){var i,r,c,l,f;if(di(n,"Random Layout",1),(!e.a&&(e.a=new Wt(zr,e,10,11)),e.a).i==0){Vn(n);return}l=a(cn(e,(iut(),kVt)),21),l&&l.a!=0?c=new aN(l.a):c=new Sq,i=lt(Yt(cn(e,CVt))),f=lt(Yt(cn(e,LVt))),r=a(cn(e,AVt),119),P2e(e,c,i,f,r),Vn(n)};var TGe=A(Rh,"RandomLayoutProvider",957);T(490,1,{}),u.Qe=function(){return new We(this.f.i,this.f.j)},u.xe=function(e){return P4t(e,(dr(),nu))?cn(this.f,DVt):cn(this.f,e)},u.Re=function(){return new We(this.f.g,this.f.f)},u.Se=function(){return this.g},u.ye=function(e){return fV(this.f,e)},u.Te=function(e){th(this.f,e.a),eh(this.f,e.b)},u.Ue=function(e){o_(this.f,e.a),s_(this.f,e.b)},u.Ve=function(e){this.g=e},u.g=0;var DVt,CGe=A(n6,"ElkGraphAdapters/AbstractElkGraphElementAdapter",490);T(491,1,{741:1},uT),u.We=function(){var e,n;if(!this.b)for(this.b=sN(B$(this.a).i),n=new $n(B$(this.a));n.e!=n.i._b();)e=a(ci(n),137),Ut(this.b,new jG(e));return this.b},u.b=null;var AGe=A(n6,"ElkGraphAdapters/ElkEdgeAdapter",491);T(562,490,{},zG),u.Xe=function(){return CRt(this)},u.a=null;var kGe=A(n6,"ElkGraphAdapters/ElkGraphAdapter",562);T(564,490,{271:1},jG);var LGe=A(n6,"ElkGraphAdapters/ElkLabelAdapter",564);T(563,490,{739:1},HW),u.We=function(){return Hde(this)},u.$e=function(){var e;return e=a(cn(this.f,(dr(),MF)),135),!e&&(e=new o2),e},u.af=function(){return Gde(this)},u.cf=function(e){var n;n=new s$(e),ga(this.f,(dr(),MF),n)},u.df=function(e){ga(this.f,(dr(),ay),new Ast(e))},u.Ye=function(){return this.d},u.Ze=function(){var e,n;if(!this.a)for(this.a=new Dt,n=Rn(xP(a(this.f,35)));Jn(n);)e=a(In(n),105),Ut(this.a,new uT(e));return this.a},u._e=function(){var e,n;if(!this.c)for(this.c=new Dt,n=Rn(Af(a(this.f,35)));Jn(n);)e=a(In(n),105),Ut(this.c,new uT(e));return this.c},u.bf=function(){return Uot(a(this.f,35)).i!=0||lt(de(a(this.f,35).xe((dr(),xF))))},u.a=null,u.b=null,u.c=null,u.d=null,u.e=null;var PGe=A(n6,"ElkGraphAdapters/ElkNodeAdapter",563);T(997,490,{740:1},i9),u.We=function(){return Kde(this)},u.Ze=function(){var e,n;if(!this.a)for(this.a=od(a(this.f,121).Tf().i),n=new $n(a(this.f,121).Tf());n.e!=n.i._b();)e=a(ci(n),105),Ut(this.a,new uT(e));return this.a},u._e=function(){var e,n;if(!this.c)for(this.c=od(a(this.f,121).Uf().i),n=new $n(a(this.f,121).Uf());n.e!=n.i._b();)e=a(ci(n),105),Ut(this.c,new uT(e));return this.c},u.ef=function(){return a(a(this.f,121).xe((dr(),dA)),69)},u.ff=function(){var e,n,i,r,c,l,f,p;for(r=Tf(a(this.f,121)),i=new $n(a(this.f,121).Uf());i.e!=i.i._b();)for(e=a(ci(i),105),p=new $n((!e.c&&(e.c=new pn(Si,e,5,8)),e.c));p.e!=p.i._b();){if(f=a(ci(p),97),bC(zc(f),r))return!0;if(zc(f)==r&<(de(cn(e,(dr(),LQ)))))return!0}for(n=new $n(a(this.f,121).Tf());n.e!=n.i._b();)for(e=a(ci(n),105),l=new $n((!e.b&&(e.b=new pn(Si,e,4,7)),e.b));l.e!=l.i._b();)if(c=a(ci(l),97),bC(zc(c),r))return!0;return!1},u.a=null,u.b=null,u.c=null;var IGe=A(n6,"ElkGraphAdapters/ElkPortAdapter",997);T(265,23,{3:1,34:1,23:1,265:1},q9);var kd,ag,aI,uI,NVt=Ri(fpt,"LabelSide",265,ji,Tce,Bie),OVt;T(676,1,{},L3),u.td=function(e){L7t(a(e,739),!0,!1)};var RGe=A(fpt,"NodeLabelAndSizeCalculator/lambda$0$Type",676);T(571,1,{},y5),u.b=!0,u.c=!0,u.d=!0,u.e=!0;var DGe=A(fpt,mBt,571);T(171,1,{171:1}),u.j=!1,u.k=!1;var BVt=A(d0,"Cell",171);T(114,171,{114:1,171:1},uTt),u.Pf=function(){return kD(this)},u.Qf=function(){var e;return e=this.n,this.a.a+e.b+e.c};var NGe=A(d0,"AtomicCell",114);T(203,23,{3:1,34:1,23:1,203:1},xW);var lc,ta,hc,Dw=Ri(d0,"ContainerArea",203,ji,Hoe,Fie),FVt;T(307,171,bFt);var OGe=A(d0,"ContainerCell",307);T(1179,307,bFt,MIt),u.Pf=function(){var e;return e=0,this.e?this.b?e=this.b.b:this.a[1][1]&&(e=this.a[1][1].Pf()):e=Wat(this,ARt(this,!0)),e>0?e+this.n.d+this.n.a:0},u.Qf=function(){var e,n,i,r,c;if(c=0,this.e)this.b?c=this.b.a:this.a[1][1]&&(c=this.a[1][1].Qf());else if(this.g)c=Wat(this,tX(this,null,!0));else for(n=(Ch(),Y(Z(Dw,1),jt,203,0,[lc,ta,hc])),i=0,r=n.length;i0?c+this.n.b+this.n.c:0},u.Rf=function(){var e,n,i,r,c;if(this.g)for(e=tX(this,null,!1),i=(Ch(),Y(Z(Dw,1),jt,203,0,[lc,ta,hc])),r=0,c=i.length;r0&&(r[0]+=this.d,i-=r[0]),r[2]>0&&(r[2]+=this.d,i-=r[2]),this.c.a=y.Math.max(0,i),this.c.d=n.d+e.d+(this.c.a-i)/2,r[1]=y.Math.max(r[1],i),_ct(this,ta,n.d+e.d+r[0]-(r[1]-i)/2,r)},u.b=null,u.d=0,u.e=!1,u.f=!1,u.g=!1;var ZQ=0,NF=0,BGe=A(d0,"GridContainerCell",1179);T(419,23,{3:1,34:1,23:1,419:1},MW);var lb,jf,fh,UVt=Ri(d0,"HorizontalLabelAlignment",419,ji,Foe,Uie),zVt;T(267,171,{171:1,267:1},Y4t,SLt,$4t),u.Pf=function(){return d$(this)},u.Qf=function(){return AD(this)},u.a=0,u.c=!1;var N3e=A(d0,"LabelCell",267);T(219,307,{171:1,307:1,219:1},UC),u.Pf=function(){return wP(this)},u.Qf=function(){return vP(this)},u.Rf=function(){HX(this)},u.Sf=function(){GX(this)},u.b=0,u.c=0,u.d=!1;var FGe=A(d0,"StripContainerCell",219);T(1394,1,us,bz),u.Nb=function(e){return!!a(e,171)&&a(e,171).k};var UGe=A(d0,"StripContainerCell/lambda$0$Type",1394);T(1395,1,{},Lg),u.oe=function(e){return a(e,171).Qf()};var zGe=A(d0,"StripContainerCell/lambda$1$Type",1395);T(1396,1,us,Dk),u.Nb=function(e){return!!a(e,171)&&a(e,171).j};var jGe=A(d0,"StripContainerCell/lambda$2$Type",1396);T(1397,1,{},xv),u.oe=function(e){return a(e,171).Pf()};var HGe=A(d0,"StripContainerCell/lambda$3$Type",1397);T(420,23,{3:1,34:1,23:1,420:1},EW);var dh,hb,Fh,jVt=Ri(d0,"VerticalLabelAlignment",420,ji,Uoe,zie),HVt;T(697,1,{},Iht),u.c=0,u.d=0,u.k=0,u.s=0,u.u=0,u.B=!1;var GGe=A(TO,"NodeContext",697);T(1177,1,jr,ER),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return bEt(a(e,69),a(n,69))};var WGe=A(TO,"NodeContext/0methodref$comparePortSides$Type",1177);T(1178,1,jr,mz),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return P1e(a(e,111),a(n,111))};var $Ge=A(TO,"NodeContext/1methodref$comparePortContexts$Type",1178);T(147,23,{3:1,34:1,23:1,147:1},Zu);var GVt,WVt,$Vt,VVt,qVt,XVt,ZVt,YVt,KVt,JVt,QVt,tqt,eqt,nqt,iqt,rqt,sqt,oqt,cqt,aqt,uqt,YQ,lqt=Ri(TO,"NodeLabelLocation",147,ji,Nq,jie),hqt;T(111,1,{111:1},Gkt);var VGe=A(TO,"PortContext",111);T(1182,1,{},_p),u.oe=function(e){return a(e,111).c?AD(a(e,111).c):0};var qGe=A(gE,"HorizontalPortPlacementSizeCalculator/lambda$0$Type",1182);T(1184,1,{},wz),u.td=function(e){S3t(a(e,267))};var XGe=A(gE,"LabelPlacer/lambda$0$Type",1184);T(1185,1,us,SR),u.Nb=function(e){return!!a(e,111).c};var ZGe=A(gE,"LabelPlacer/lambda$1$Type",1185);T(1186,1,{},TR),u.td=function(e){S3t(a(e,111).c)};var YGe=A(gE,"LabelPlacer/lambda$2$Type",1186),Evt;T(1181,1,{},P3),u.td=function(e){Fg(),Qnt(a(e,111))};var KGe=A(gE,"NodeLabelAndSizeUtilities/lambda$0$Type",1181);T(698,1,{},prt),u.td=function(e){gQt(this.a,this.b,e)},u.b=!1;var JGe=A(gE,"NodeLabelCellCreator/lambda$0$Type",698);T(1180,1,{},VH),u.td=function(e){Vt(this.a,e)};var QGe=A(gE,"PortContextCreator/lambda$0$Type",1180),OF;T(1183,1,{},Ab),u.oe=function(e){return a(e,111).c?d$(a(e,111).c):0};var tWe=A(gE,"VerticalPortPlacementSizeCalculator/lambda$0$Type",1183);T(1525,1,{},CR);var eWe=A(mE,"GreedyRectangleStripOverlapRemover",1525);T(1526,1,jr,vz),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return fee(a(e,194),a(n,194))};var nWe=A(mE,"GreedyRectangleStripOverlapRemover/0methodref$compareByYCoordinate$Type",1526);T(1497,1,{},Lxt),u.a=5,u.e=0;var iWe=A(mE,"RectangleStripOverlapRemover",1497);T(1498,1,jr,jS),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return dee(a(e,194),a(n,194))};var rWe=A(mE,"RectangleStripOverlapRemover/0methodref$compareLeftRectangleBorders$Type",1498);T(1500,1,jr,_z),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Fre(a(e,194),a(n,194))};var sWe=A(mE,"RectangleStripOverlapRemover/1methodref$compareRightRectangleBorders$Type",1500);T(374,23,{3:1,34:1,23:1,374:1},X9);var lI,KQ,JQ,hI,fqt=Ri(mE,"RectangleStripOverlapRemover/OverlapRemovalDirection",374,ji,Ece,Hie),dqt;T(194,1,{194:1},g$);var oWe=A(mE,"RectangleStripOverlapRemover/RectangleNode",194);T(1499,1,{},r9),u.td=function(e){Fde(this.a,a(e,194))};var cWe=A(mE,"RectangleStripOverlapRemover/lambda$0$Type",1499),Nw=Sr(Qu,"EObject"),HE=Sr(j_,wFt),sf=Sr(j_,vFt),fI=Sr(j_,_Ft),dI=Sr(j_,"ElkShape"),Si=Sr(j_,yFt),Xs=Sr(j_,ppt),os=Sr(j_,xFt),pI=Sr(Qu,MFt),EA=Sr(Qu,"EFactory"),pqt,QQ=Sr(Qu,EFt),of=Sr(Qu,"EPackage"),ms,gqt,mqt,Svt,BF,bqt,Tvt,Cvt,Avt,pp,wqt,vqt,ic=Sr(j_,gpt),zr=Sr(j_,mpt),Rl=Sr(j_,bpt);T(87,1,SFt),u.cg=function(){return this.dg(),null},u.dg=function(){return null},u.eg=function(){return this.dg(),!1},u.fg=function(){return!1},u.gg=function(e){Bi(this,e)};var aWe=A(hx,"BasicNotifierImpl",87);T(92,87,CFt),u.Hg=function(){return Xl(this)},u.hg=function(e,n){return e},u.ig=function(){throw K(new Oi)},u.jg=function(e){var n;return n=jo(a(Ve(this.mg(),this.og()),17)),this.yg().Cg(this,n.n,n.f,e)},u.kg=function(e,n){throw K(new Oi)},u.lg=function(e,n,i){return ku(this,e,n,i)},u.mg=function(){var e;return this.ig()&&(e=this.ig().pj(),e)?e:this.Rg()},u.ng=function(){return yX(this)},u.og=function(){throw K(new Oi)},u.pg=function(){var e,n;return n=this.Jg().qj(),!n&&this.ig().vj(n=(MT(),e=Hot(q1(this.mg())),e==null?ctt:new J5(this,e))),n},u.qg=function(e,n){return e},u.rg=function(e){var n;return n=e.Vi(),n?e.pi():xr(this.mg(),e)},u.sg=function(){var e;return e=this.ig(),e?e.sj():null},u.tg=function(){return this.ig()?this.ig().pj():null},u.ug=function(e,n,i){return h7(this,e,n,i)},u.vg=function(e){return TL(this,e)},u.wg=function(e,n){return wct(this,e,n)},u.xg=function(){var e;return e=this.ig(),!!e&&e.tj()},u.yg=function(){throw K(new Oi)},u.zg=function(){return o7(this)},u.Ag=function(e,n,i,r){return z2(this,e,n,r)},u.Bg=function(e,n,i){var r;return r=a(Ve(this.mg(),n),61),r.aj().dj(this,this.Qg(),n-this.Sg(),e,i)},u.Cg=function(e,n,i,r){return JD(this,e,n,r)},u.Dg=function(e,n,i){var r;return r=a(Ve(this.mg(),n),61),r.aj().ej(this,this.Qg(),n-this.Sg(),e,i)},u.Eg=function(){return!!this.ig()&&(this.ig().rj(),!1)},u.Fg=function(e){return Fq(this,e)},u.Gg=function(e){var n;return n=this.rg(e),n>=0?this.Fg(n):bX(this,e)},u.Ig=function(e){return u7t(this,e)},u.Jg=function(){throw K(new Oi)},u.Kg=function(){return this.ig()?this.ig().rj():null},u.Lg=function(){return o7(this)},u.Mg=function(e,n){C7(this,e,n)},u.Ng=function(e){this.Jg().uj(e)},u.Og=function(e){this.Jg().wj(e)},u.Pg=function(e,n){var i,r,c,l;return l=this.sg(),l&&e&&(n=$s(l.fk(),this,n),l.jk(this)),r=this.yg(),r&&(DX(this,this.yg(),this.og()).Bb&ao?(c=r.zg(),c&&(e?!l&&c.jk(this):c.ik(this))):(n=(i=this.og(),i>=0?this.jg(n):this.yg().Cg(this,-1-i,null,n)),n=this.lg(null,-1,n))),this.Og(e),n},u.Qg=function(){return Bct(this)},u.Rg=function(){return(T1(),Ae).S},u.Sg=function(){return ei(this.Rg())},u.Ib=function(){return nh(this)};var uWe=A(Re,"BasicEObjectImpl",92),_qt;T(107,92,{95:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1}),u.Tg=function(e){var n;return n=Oct(this),n[e]},u.Ug=function(e,n){var i;i=Oct(this),Vr(i,e,n)},u.Vg=function(e){var n;n=Oct(this),Vr(n,e,null)},u.cg=function(){return a(an(this,4),116)},u.dg=function(){throw K(new Oi)},u.eg=function(){return(this.Db&4)!=0},u.ig=function(){throw K(new Oi)},u.Wg=function(e){BC(this,2,e)},u.kg=function(e,n){this.Db=n<<16|this.Db&255,this.Wg(e)},u.mg=function(){return da(this)},u.og=function(){return this.Db>>16},u.pg=function(){var e,n;return MT(),n=Hot(q1((e=a(an(this,16),24),e||this.Rg()))),n==null?ctt:new J5(this,n)},u.fg=function(){return(this.Db&1)==0},u.sg=function(){return a(an(this,128),1628)},u.tg=function(){return a(an(this,16),24)},u.xg=function(){return(this.Db&32)!=0},u.yg=function(){return a(an(this,2),42)},u.Eg=function(){return(this.Db&64)!=0},u.Jg=function(){throw K(new Oi)},u.Kg=function(){return a(an(this,64),261)},u.Ng=function(e){BC(this,16,e)},u.Og=function(e){BC(this,128,e)},u.Qg=function(){return ra(this)},u.Db=0;var lWe=A(Re,"MinimalEObjectImpl",107);T(108,107,{95:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1}),u.Wg=function(e){this.Cb=e},u.yg=function(){return this.Cb};var hWe=A(Re,"MinimalEObjectImpl/Container",108);T(1676,108,{95:1,379:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1}),u.ve=function(e){return!this.o&&(this.o=new lu((Ic(),pp),ug,this,0)),tPt(this.o,e.p?e.p:(we(),we(),ap)),this},u.ug=function(e,n,i){return Cut(this,e,n,i)},u.Dg=function(e,n,i){return clt(this,e,n,i)},u.Fg=function(e){return Zot(this,e)},u.Mg=function(e,n){Eat(this,e,n)},u.Rg=function(){return Ic(),vqt},u.we=function(){return QIt(this)},u.xe=function(e){return cn(this,e)},u.ye=function(e){return fV(this,e)},u.ze=function(e,n){return ga(this,e,n)};var fWe=A(p0,"EMapPropertyHolderImpl",1676);T(502,108,{95:1,531:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1},I3),u.ug=function(e,n,i){switch(e){case 0:return this.a;case 1:return this.b}return h7(this,e,n,i)},u.Fg=function(e){switch(e){case 0:return this.a!=0;case 1:return this.b!=0}return Fq(this,e)},u.Mg=function(e,n){switch(e){case 0:IV(this,lt(Yt(n)));return;case 1:RV(this,lt(Yt(n)));return}C7(this,e,n)},u.Rg=function(){return Ic(),gqt},u.Ib=function(){var e;return this.Db&64?nh(this):(e=new ul(nh(this)),e.a+=" (x: ",Iv(e,this.a),e.a+=", y: ",Iv(e,this.b),e.a+=")",e.a)},u.a=0,u.b=0;var dWe=A(p0,"ElkBendPointImpl",502);T(651,1676,{95:1,379:1,253:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1}),u.ug=function(e,n,i){return Uat(this,e,n,i)},u.Bg=function(e,n,i){return cX(this,e,n,i)},u.Dg=function(e,n,i){return JV(this,e,n,i)},u.Fg=function(e){return dat(this,e)},u.Mg=function(e,n){Wut(this,e,n)},u.Rg=function(){return Ic(),bqt},u.Vf=function(){return B$(this)},u.Ib=function(){return yq(this)},u.k=null;var pWe=A(p0,"ElkGraphElementImpl",651);T(652,651,{95:1,379:1,253:1,429:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1}),u.ug=function(e,n,i){return Xat(this,e,n,i)},u.Fg=function(e){return Qat(this,e)},u.Mg=function(e,n){$ut(this,e,n)},u.Rg=function(){return Ic(),wqt},u.Wf=function(){return this.f},u.Xf=function(){return this.g},u.Yf=function(){return this.i},u.Zf=function(){return this.j},u.$f=function(e,n){eD(this,e,n)},u._f=function(e,n){Wd(this,e,n)},u.ag=function(e){th(this,e)},u.bg=function(e){eh(this,e)},u.Ib=function(){return uX(this)},u.f=0,u.g=0,u.i=0,u.j=0;var gWe=A(p0,"ElkShapeImpl",652);T(653,652,{95:1,379:1,97:1,253:1,429:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1}),u.ug=function(e,n,i){return vut(this,e,n,i)},u.Bg=function(e,n,i){return Uut(this,e,n,i)},u.Dg=function(e,n,i){return zut(this,e,n,i)},u.Fg=function(e){return xat(this,e)},u.Mg=function(e,n){Nlt(this,e,n)},u.Rg=function(){return Ic(),mqt},u.Tf=function(){return!this.d&&(this.d=new pn(Xs,this,8,5)),this.d},u.Uf=function(){return!this.e&&(this.e=new pn(Xs,this,7,4)),this.e};var mWe=A(p0,"ElkConnectableShapeImpl",653);T(183,651,{95:1,379:1,105:1,253:1,183:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1},HS),u.jg=function(e){return Rut(this,e)},u.ug=function(e,n,i){switch(e){case 3:return tN(this);case 4:return!this.b&&(this.b=new pn(Si,this,4,7)),this.b;case 5:return!this.c&&(this.c=new pn(Si,this,5,8)),this.c;case 6:return!this.a&&(this.a=new Wt(os,this,6,6)),this.a;case 7:return me(),!this.b&&(this.b=new pn(Si,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new pn(Si,this,5,8)),this.c.i<=1));case 8:return me(),!!KC(this);case 9:return me(),!!Nm(this);case 10:return me(),!this.b&&(this.b=new pn(Si,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new pn(Si,this,5,8)),this.c.i!=0)}return Uat(this,e,n,i)},u.Bg=function(e,n,i){var r;switch(n){case 3:return this.Cb&&(i=(r=this.Db>>16,r>=0?Rut(this,i):this.Cb.Cg(this,-1-r,null,i))),rst(this,a(e,35),i);case 4:return!this.b&&(this.b=new pn(Si,this,4,7)),Kc(this.b,e,i);case 5:return!this.c&&(this.c=new pn(Si,this,5,8)),Kc(this.c,e,i);case 6:return!this.a&&(this.a=new Wt(os,this,6,6)),Kc(this.a,e,i)}return cX(this,e,n,i)},u.Dg=function(e,n,i){switch(n){case 3:return rst(this,null,i);case 4:return!this.b&&(this.b=new pn(Si,this,4,7)),$s(this.b,e,i);case 5:return!this.c&&(this.c=new pn(Si,this,5,8)),$s(this.c,e,i);case 6:return!this.a&&(this.a=new Wt(os,this,6,6)),$s(this.a,e,i)}return JV(this,e,n,i)},u.Fg=function(e){switch(e){case 3:return!!tN(this);case 4:return!!this.b&&this.b.i!=0;case 5:return!!this.c&&this.c.i!=0;case 6:return!!this.a&&this.a.i!=0;case 7:return!this.b&&(this.b=new pn(Si,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new pn(Si,this,5,8)),this.c.i<=1));case 8:return KC(this);case 9:return Nm(this);case 10:return!this.b&&(this.b=new pn(Si,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new pn(Si,this,5,8)),this.c.i!=0)}return dat(this,e)},u.Mg=function(e,n){switch(e){case 3:gDt(this,a(n,35));return;case 4:!this.b&&(this.b=new pn(Si,this,4,7)),Dr(this.b),!this.b&&(this.b=new pn(Si,this,4,7)),Lr(this.b,a(n,13));return;case 5:!this.c&&(this.c=new pn(Si,this,5,8)),Dr(this.c),!this.c&&(this.c=new pn(Si,this,5,8)),Lr(this.c,a(n,13));return;case 6:!this.a&&(this.a=new Wt(os,this,6,6)),Dr(this.a),!this.a&&(this.a=new Wt(os,this,6,6)),Lr(this.a,a(n,13));return}Wut(this,e,n)},u.Rg=function(){return Ic(),Svt},u.Ib=function(){return e7t(this)};var bWe=A(p0,"ElkEdgeImpl",183);T(405,1676,{95:1,379:1,270:1,405:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1},R3),u.jg=function(e){return Lut(this,e)},u.ug=function(e,n,i){switch(e){case 1:return this.j;case 2:return this.k;case 3:return this.b;case 4:return this.c;case 5:return!this.a&&(this.a=new Ss(sf,this,5)),this.a;case 6:return oAt(this);case 7:return n?Gq(this):this.i;case 8:return n?Hq(this):this.f;case 9:return!this.g&&(this.g=new pn(os,this,9,10)),this.g;case 10:return!this.e&&(this.e=new pn(os,this,10,9)),this.e;case 11:return this.d}return Cut(this,e,n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 6:return this.Cb&&(i=(c=this.Db>>16,c>=0?Lut(this,i):this.Cb.Cg(this,-1-c,null,i))),sst(this,a(e,105),i);case 9:return!this.g&&(this.g=new pn(os,this,9,10)),Kc(this.g,e,i);case 10:return!this.e&&(this.e=new pn(os,this,10,9)),Kc(this.e,e,i)}return l=a(Ve((r=a(an(this,16),24),r||(Ic(),BF)),n),61),l.aj().dj(this,ra(this),n-ei((Ic(),BF)),e,i)},u.Dg=function(e,n,i){switch(n){case 5:return!this.a&&(this.a=new Ss(sf,this,5)),$s(this.a,e,i);case 6:return sst(this,null,i);case 9:return!this.g&&(this.g=new pn(os,this,9,10)),$s(this.g,e,i);case 10:return!this.e&&(this.e=new pn(os,this,10,9)),$s(this.e,e,i)}return clt(this,e,n,i)},u.Fg=function(e){switch(e){case 1:return this.j!=0;case 2:return this.k!=0;case 3:return this.b!=0;case 4:return this.c!=0;case 5:return!!this.a&&this.a.i!=0;case 6:return!!oAt(this);case 7:return!!this.i;case 8:return!!this.f;case 9:return!!this.g&&this.g.i!=0;case 10:return!!this.e&&this.e.i!=0;case 11:return this.d!=null}return Zot(this,e)},u.Mg=function(e,n){switch(e){case 1:yC(this,lt(Yt(n)));return;case 2:xC(this,lt(Yt(n)));return;case 3:_C(this,lt(Yt(n)));return;case 4:vC(this,lt(Yt(n)));return;case 5:!this.a&&(this.a=new Ss(sf,this,5)),Dr(this.a),!this.a&&(this.a=new Ss(sf,this,5)),Lr(this.a,a(n,13));return;case 6:gbe(this,a(n,105));return;case 7:nat(this,a(n,97));return;case 8:eat(this,a(n,97));return;case 9:!this.g&&(this.g=new pn(os,this,9,10)),Dr(this.g),!this.g&&(this.g=new pn(os,this,9,10)),Lr(this.g,a(n,13));return;case 10:!this.e&&(this.e=new pn(os,this,10,9)),Dr(this.e),!this.e&&(this.e=new pn(os,this,10,9)),Lr(this.e,a(n,13));return;case 11:ePt(this,hi(n));return}Eat(this,e,n)},u.Rg=function(){return Ic(),BF},u.Ib=function(){return x9t(this)},u.b=0,u.c=0,u.d=null,u.j=0,u.k=0;var wWe=A(p0,"ElkEdgeSectionImpl",405);T(142,108,{95:1,91:1,87:1,139:1,51:1,103:1,42:1,92:1,142:1,107:1,108:1}),u.ug=function(e,n,i){var r;return e==0?(!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab):qu(this,e-ei(this.Rg()),Ve((r=a(an(this,16),24),r||this.Rg()),e),n,i)},u.Bg=function(e,n,i){var r,c;return n==0?(!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i)):(c=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),c.aj().dj(this,ra(this),n-ei(this.Rg()),e,i))},u.Dg=function(e,n,i){var r,c;return n==0?(!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i)):(c=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),c.aj().ej(this,ra(this),n-ei(this.Rg()),e,i))},u.Fg=function(e){var n;return e==0?!!this.Ab&&this.Ab.i!=0:$u(this,e-ei(this.Rg()),Ve((n=a(an(this,16),24),n||this.Rg()),e))},u.Ig=function(e){return Oht(this,e)},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return}Yu(this,e-ei(this.Rg()),Ve((i=a(an(this,16),24),i||this.Rg()),e),n)},u.Og=function(e){BC(this,128,e)},u.Rg=function(){return ye(),Fqt},u.Xg=function(){this.Bb|=1},u.Yg=function(e){return i4(this,e)},u.Bb=0;var vWe=A(Re,"EModelElementImpl",142);T(638,142,{95:1,91:1,87:1,430:1,139:1,51:1,103:1,42:1,92:1,142:1,107:1,108:1},x8),u.Zg=function(e,n){return C7t(this,e,n)},u.$g=function(e){var n,i,r,c,l;if(this.a!=Xu(e)||e.Bb&256)throw K(new yn(WY+e.zb+Gm));for(r=Bo(e);kc(r.a).i!=0;){if(i=a(RP(r,0,(n=a(at(kc(r.a),0),84),l=n.c,ct(l,96)?a(l,24):(ye(),gh))),24),Im(i))return c=Xu(i).dh().$g(i),a(c,42).Ng(e),c;r=Bo(i)}return(e.D!=null?e.D:e.B)=="java.util.Map$Entry"?new uCt(e):new zst(e)},u._g=function(e,n){return Bm(this,e,n)},u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.a}return qu(this,e-ei((ye(),pb)),Ve((r=a(an(this,16),24),r||pb),e),n,i)},u.Bg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 1:return this.a&&(i=a(this.a,42).Cg(this,4,of,i)),Dat(this,a(e,207),i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),pb)),n),61),c.aj().dj(this,ra(this),n-ei((ye(),pb)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 1:return Dat(this,null,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),pb)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),pb)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return!!this.a}return $u(this,e-ei((ye(),pb)),Ve((n=a(an(this,16),24),n||pb),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:age(this,a(n,207));return}Yu(this,e-ei((ye(),pb)),Ve((i=a(an(this,16),24),i||pb),e),n)},u.Rg=function(){return ye(),pb};var SA,kvt,yqt,_We=A(Re,"EFactoryImpl",638);T(914,638,{95:1,1698:1,91:1,87:1,430:1,139:1,51:1,103:1,42:1,92:1,142:1,107:1,108:1},Pg),u.Zg=function(e,n){switch(e.Ni()){case 12:return a(n,166).Lf();case 13:return Yc(n);default:throw K(new yn(bE+e.be()+Gm))}},u.$g=function(e){var n,i,r,c,l,f,p,b;switch(e.G==-1&&(e.G=(n=Xu(e),n?Hp(n.bh(),e):-1)),e.G){case 4:return l=new GS,l;case 6:return f=new lit,f;case 7:return p=new hit,p;case 8:return r=new HS,r;case 9:return i=new I3,i;case 10:return c=new R3,c;case 11:return b=new Nk,b;default:throw K(new yn(WY+e.zb+Gm))}},u._g=function(e,n){switch(e.Ni()){case 13:case 12:return null;default:throw K(new yn(bE+e.be()+Gm))}};var yWe=A(p0,"ElkGraphFactoryImpl",914);T(399,142,{95:1,91:1,87:1,139:1,174:1,51:1,103:1,42:1,92:1,142:1,107:1,108:1}),u.pg=function(){var e,n;return n=(e=a(an(this,16),24),Hot(q1(e||this.Rg()))),n==null?(MT(),MT(),ctt):new RSt(this,n)},u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.be()}return qu(this,e-ei(this.Rg()),Ve((r=a(an(this,16),24),r||this.Rg()),e),n,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null}return $u(this,e-ei(this.Rg()),Ve((n=a(an(this,16),24),n||this.Rg()),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:this.ah(hi(n));return}Yu(this,e-ei(this.Rg()),Ve((i=a(an(this,16),24),i||this.Rg()),e),n)},u.Rg=function(){return ye(),Uqt},u.be=function(){return this.zb},u.ah=function(e){kh(this,e)},u.Ib=function(){return PC(this)},u.zb=null;var xWe=A(Re,"ENamedElementImpl",399);T(248,399,{95:1,91:1,87:1,139:1,174:1,51:1,207:1,103:1,42:1,92:1,142:1,248:1,107:1,108:1,613:1},L4t),u.jg=function(e){return NRt(this,e)},u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.yb;case 3:return this.xb;case 4:return this.sb;case 5:return!this.rb&&(this.rb=new Xv(this,cf,this)),this.rb;case 6:return!this.vb&&(this.vb=new dM(of,this,6,7)),this.vb;case 7:return n?this.Db>>16==7?a(this.Cb,207):null:cAt(this)}return qu(this,e-ei((ye(),A0)),Ve((r=a(an(this,16),24),r||A0),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 4:return this.sb&&(i=a(this.sb,42).Cg(this,1,EA,i)),Oat(this,a(e,430),i);case 5:return!this.rb&&(this.rb=new Xv(this,cf,this)),Kc(this.rb,e,i);case 6:return!this.vb&&(this.vb=new dM(of,this,6,7)),Kc(this.vb,e,i);case 7:return this.Cb&&(i=(c=this.Db>>16,c>=0?NRt(this,i):this.Cb.Cg(this,-1-c,null,i))),ku(this,e,7,i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),A0)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),A0)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 4:return Oat(this,null,i);case 5:return!this.rb&&(this.rb=new Xv(this,cf,this)),$s(this.rb,e,i);case 6:return!this.vb&&(this.vb=new dM(of,this,6,7)),$s(this.vb,e,i);case 7:return ku(this,null,7,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),A0)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),A0)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.yb!=null;case 3:return this.xb!=null;case 4:return!!this.sb;case 5:return!!this.rb&&this.rb.i!=0;case 6:return!!this.vb&&this.vb.i!=0;case 7:return!!cAt(this)}return $u(this,e-ei((ye(),A0)),Ve((n=a(an(this,16),24),n||A0),e))},u.Ig=function(e){var n;return n=Ebe(this,e),n||Oht(this,e)},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:kh(this,hi(n));return;case 2:HV(this,hi(n));return;case 3:jV(this,hi(n));return;case 4:alt(this,a(n,430));return;case 5:!this.rb&&(this.rb=new Xv(this,cf,this)),Dr(this.rb),!this.rb&&(this.rb=new Xv(this,cf,this)),Lr(this.rb,a(n,13));return;case 6:!this.vb&&(this.vb=new dM(of,this,6,7)),Dr(this.vb),!this.vb&&(this.vb=new dM(of,this,6,7)),Lr(this.vb,a(n,13));return}Yu(this,e-ei((ye(),A0)),Ve((i=a(an(this,16),24),i||A0),e),n)},u.Rg=function(){return ye(),A0},u.Xg=function(){Qq(this)},u.bh=function(){return!this.rb&&(this.rb=new Xv(this,cf,this)),this.rb},u.dh=function(){return this.sb},u.eh=function(){return this.ub},u.fh=function(){return this.xb},u.gh=function(){return this.yb},u.hh=function(e){this.ub=e},u.Ib=function(){var e;return this.Db&64?PC(this):(e=new ul(PC(this)),e.a+=" (nsURI: ",mo(e,this.yb),e.a+=", nsPrefix: ",mo(e,this.xb),e.a+=")",e.a)},u.xb=null,u.yb=null;var xqt,MWe=A(Re,"EPackageImpl",248);T(506,248,{95:1,1702:1,506:1,91:1,87:1,139:1,174:1,51:1,207:1,103:1,42:1,92:1,142:1,248:1,107:1,108:1,613:1},B9t),u.q=!1,u.r=!1;var Mqt=!1,EWe=A(p0,"ElkGraphPackageImpl",506);T(263,652,{95:1,379:1,253:1,137:1,429:1,263:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1},GS),u.jg=function(e){return Put(this,e)},u.ug=function(e,n,i){switch(e){case 7:return aAt(this);case 8:return this.a}return Xat(this,e,n,i)},u.Bg=function(e,n,i){var r;switch(n){case 7:return this.Cb&&(i=(r=this.Db>>16,r>=0?Put(this,i):this.Cb.Cg(this,-1-r,null,i))),eot(this,a(e,253),i)}return cX(this,e,n,i)},u.Dg=function(e,n,i){return n==7?eot(this,null,i):JV(this,e,n,i)},u.Fg=function(e){switch(e){case 7:return!!aAt(this);case 8:return!le("",this.a)}return Qat(this,e)},u.Mg=function(e,n){switch(e){case 7:xDt(this,a(n,253));return;case 8:XLt(this,hi(n));return}$ut(this,e,n)},u.Rg=function(){return Ic(),Tvt},u.Ib=function(){return C8t(this)},u.a="";var SWe=A(p0,"ElkLabelImpl",263);T(246,653,{95:1,379:1,97:1,253:1,35:1,429:1,246:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1},lit),u.jg=function(e){return Out(this,e)},u.ug=function(e,n,i){switch(e){case 9:return!this.c&&(this.c=new Wt(Rl,this,9,9)),this.c;case 10:return!this.a&&(this.a=new Wt(zr,this,10,11)),this.a;case 11:return io(this);case 12:return!this.b&&(this.b=new Wt(Xs,this,12,3)),this.b;case 13:return me(),!this.a&&(this.a=new Wt(zr,this,10,11)),this.a.i>0}return vut(this,e,n,i)},u.Bg=function(e,n,i){var r;switch(n){case 9:return!this.c&&(this.c=new Wt(Rl,this,9,9)),Kc(this.c,e,i);case 10:return!this.a&&(this.a=new Wt(zr,this,10,11)),Kc(this.a,e,i);case 11:return this.Cb&&(i=(r=this.Db>>16,r>=0?Out(this,i):this.Cb.Cg(this,-1-r,null,i))),pst(this,a(e,35),i);case 12:return!this.b&&(this.b=new Wt(Xs,this,12,3)),Kc(this.b,e,i)}return Uut(this,e,n,i)},u.Dg=function(e,n,i){switch(n){case 9:return!this.c&&(this.c=new Wt(Rl,this,9,9)),$s(this.c,e,i);case 10:return!this.a&&(this.a=new Wt(zr,this,10,11)),$s(this.a,e,i);case 11:return pst(this,null,i);case 12:return!this.b&&(this.b=new Wt(Xs,this,12,3)),$s(this.b,e,i)}return zut(this,e,n,i)},u.Fg=function(e){switch(e){case 9:return!!this.c&&this.c.i!=0;case 10:return!!this.a&&this.a.i!=0;case 11:return!!io(this);case 12:return!!this.b&&this.b.i!=0;case 13:return!this.a&&(this.a=new Wt(zr,this,10,11)),this.a.i>0}return xat(this,e)},u.Mg=function(e,n){switch(e){case 9:!this.c&&(this.c=new Wt(Rl,this,9,9)),Dr(this.c),!this.c&&(this.c=new Wt(Rl,this,9,9)),Lr(this.c,a(n,13));return;case 10:!this.a&&(this.a=new Wt(zr,this,10,11)),Dr(this.a),!this.a&&(this.a=new Wt(zr,this,10,11)),Lr(this.a,a(n,13));return;case 11:bDt(this,a(n,35));return;case 12:!this.b&&(this.b=new Wt(Xs,this,12,3)),Dr(this.b),!this.b&&(this.b=new Wt(Xs,this,12,3)),Lr(this.b,a(n,13));return}Nlt(this,e,n)},u.Rg=function(){return Ic(),Cvt},u.Ib=function(){return cht(this)};var TWe=A(p0,"ElkNodeImpl",246);T(187,653,{95:1,379:1,97:1,253:1,121:1,429:1,187:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1},hit),u.jg=function(e){return Iut(this,e)},u.ug=function(e,n,i){return e==9?Tf(this):vut(this,e,n,i)},u.Bg=function(e,n,i){var r;switch(n){case 9:return this.Cb&&(i=(r=this.Db>>16,r>=0?Iut(this,i):this.Cb.Cg(this,-1-r,null,i))),ost(this,a(e,35),i)}return Uut(this,e,n,i)},u.Dg=function(e,n,i){return n==9?ost(this,null,i):zut(this,e,n,i)},u.Fg=function(e){return e==9?!!Tf(this):xat(this,e)},u.Mg=function(e,n){switch(e){case 9:mDt(this,a(n,35));return}Nlt(this,e,n)},u.Rg=function(){return Ic(),Avt},u.Ib=function(){return lNt(this)};var CWe=A(p0,"ElkPortImpl",187),Eqt=Sr(qs,"BasicEMap/Entry");T(966,108,{95:1,38:1,91:1,87:1,134:1,51:1,103:1,42:1,92:1,107:1,108:1},Nk),u.Fb=function(e){return this===e},u.kc=function(){return this.b},u.Hb=function(){return lm(this)},u.kh=function(e){qLt(this,a(e,166))},u.ug=function(e,n,i){switch(e){case 0:return this.b;case 1:return this.c}return h7(this,e,n,i)},u.Fg=function(e){switch(e){case 0:return!!this.b;case 1:return this.c!=null}return Fq(this,e)},u.Mg=function(e,n){switch(e){case 0:qLt(this,a(n,166));return;case 1:VLt(this,n);return}C7(this,e,n)},u.Rg=function(){return Ic(),pp},u.ih=function(){var e;return this.a==-1&&(e=this.b,this.a=e?Yr(e):0),this.a},u.lc=function(){return this.c},u.jh=function(e){this.a=e},u.mc=function(e){var n;return n=this.c,VLt(this,e),n},u.Ib=function(){var e;return this.Db&64?nh(this):(e=new om,Ii(Ii(Ii(e,this.b?this.b.Lf():tu)," -> "),HT(this.c)),e.a)},u.a=-1,u.c=null;var ug=A(p0,"ElkPropertyToValueMapEntryImpl",966);T(876,1,{},yz);var AWe=A(Ds,"JsonAdapter",876);T(186,54,rp,xf);var kWe=A(Ds,"JsonImportException",186);T(754,1,{},XRt);var LWe=A(Ds,"JsonImporter",754);T(792,1,{},VMt);var PWe=A(Ds,"JsonImporter/lambda$0$Type",792);T(793,1,{},qMt);var IWe=A(Ds,"JsonImporter/lambda$1$Type",793);T(816,1,{},s9);var RWe=A(Ds,"JsonImporter/lambda$10$Type",816);T(818,1,{},qH);var DWe=A(Ds,"JsonImporter/lambda$11$Type",818);T(819,1,{},XMt),u.td=function(e){Nce(this.b,this.a,e)};var NWe=A(Ds,"JsonImporter/lambda$12$Type",819);T(820,1,{},ZMt);var OWe=A(Ds,"JsonImporter/lambda$13$Type",820);T(821,1,{},YMt);var BWe=A(Ds,"JsonImporter/lambda$14$Type",821);T(822,1,{},XH);var FWe=A(Ds,"JsonImporter/lambda$15$Type",822);T(823,1,{},ZH);var UWe=A(Ds,"JsonImporter/lambda$16$Type",823);T(824,1,{},YH);var zWe=A(Ds,"JsonImporter/lambda$17$Type",824);T(825,1,{},e2);var jWe=A(Ds,"JsonImporter/lambda$18$Type",825);T(756,1,{},KH);var HWe=A(Ds,"JsonImporter/lambda$19$Type",756);T(794,1,{},JH);var GWe=A(Ds,"JsonImporter/lambda$2$Type",794);T(829,1,{},FTt);var WWe=A(Ds,"JsonImporter/lambda$20$Type",829);T(830,1,{},QH),u.td=function(e){Oce(this.a,e)};var $We=A(Ds,"JsonImporter/lambda$21$Type",830);T(795,1,{},tG);var VWe=A(Ds,"JsonImporter/lambda$22$Type",795);T(796,1,{},eG);var qWe=A(Ds,"JsonImporter/lambda$23$Type",796);T(798,1,{},o9);var XWe=A(Ds,"JsonImporter/lambda$24$Type",798);T(799,1,{},c9);var ZWe=A(Ds,"JsonImporter/lambda$25$Type",799);T(801,1,{},nG);var YWe=A(Ds,"JsonImporter/lambda$26$Type",801);T(809,1,{},w4t);var KWe=A(Ds,"JsonImporter/lambda$27$Type",809);T(811,1,{},iG);var JWe=A(Ds,"JsonImporter/lambda$28$Type",811);T(812,1,{},rG);var QWe=A(Ds,"JsonImporter/lambda$29$Type",812);T(797,1,{},sG);var t$e=A(Ds,"JsonImporter/lambda$3$Type",797);T(814,1,{},oG);var e$e=A(Ds,"JsonImporter/lambda$30$Type",814);T(815,1,{},cG);var n$e=A(Ds,"JsonImporter/lambda$31$Type",815);T(817,1,{},aG);var i$e=A(Ds,"JsonImporter/lambda$32$Type",817);T(826,1,{},uG),u.td=function(e){Bce(this.a,e)};var r$e=A(Ds,"JsonImporter/lambda$33$Type",826);T(827,1,{},KMt),u.td=function(e){dte(this.a,this.b,e)};var s$e=A(Ds,"JsonImporter/lambda$34$Type",827);T(828,1,{},JMt),u.td=function(e){pte(this.a,this.b,e)};var o$e=A(Ds,"JsonImporter/lambda$35$Type",828);T(805,1,{},QMt);var c$e=A(Ds,"JsonImporter/lambda$36$Type",805);T(806,1,{},tEt);var a$e=A(Ds,"JsonImporter/lambda$37$Type",806);T(807,1,{},iEt);var u$e=A(Ds,"JsonImporter/lambda$38$Type",807);T(808,1,{},rEt);var l$e=A(Ds,"JsonImporter/lambda$39$Type",808);T(800,1,{},lG);var h$e=A(Ds,"JsonImporter/lambda$4$Type",800);T(802,1,{},hG);var f$e=A(Ds,"JsonImporter/lambda$5$Type",802);T(803,1,{},eEt);var d$e=A(Ds,"JsonImporter/lambda$6$Type",803);T(804,1,{},nEt);var p$e=A(Ds,"JsonImporter/lambda$7$Type",804);T(810,1,{},v4t);var g$e=A(Ds,"JsonImporter/lambda$8$Type",810);T(813,1,{},fG);var m$e=A(Ds,"JsonImporter/lambda$9$Type",813);T(864,1,{},dG),u.td=function(e){S2(this.a,new M2(hi(e)))};var b$e=A(Ds,"JsonMetaDataConverter/lambda$0$Type",864);T(865,1,{},pG),u.td=function(e){ose(this.a,e)};var w$e=A(Ds,"JsonMetaDataConverter/lambda$1$Type",865);T(866,1,{},gG),u.td=function(e){boe(this.a,e)};var v$e=A(Ds,"JsonMetaDataConverter/lambda$2$Type",866);T(867,1,{},mG),u.td=function(e){sse(this.a,e)};var _$e=A(Ds,"JsonMetaDataConverter/lambda$3$Type",867);T(229,23,{3:1,34:1,23:1,229:1},w2);var FF,UF,ttt,zF,jF,HF,ett,ntt,GF=Ri($P,"GraphFeature",229,ji,mue,Gie),Sqt;T(16,1,{34:1,166:1},kr,es,bn,xc),u.vd=function(e){return qte(this,a(e,166))},u.Fb=function(e){return P4t(this,e)},u.Of=function(){return Xe(this)},u.Lf=function(){return this.b},u.Hb=function(){return j1(this.b)},u.Ib=function(){return this.b};var y$e=A($P,"Property",16);T(727,1,jr,a9),u.Ld=function(e,n){return Mhe(this,a(e,93),a(n,93))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var x$e=A($P,"PropertyHolderComparator",727),Lvt=Sr(qs,"EList");T(59,41,{20:1,25:1,41:1,13:1,15:1,59:1,52:1}),u.bd=function(e,n){YL(this,e,n)},u.nc=function(e){return ni(this,e)},u.oc=function(e){return Lr(this,e)},u.oh=function(){return new y2(this)},u.ph=function(){return new K5(this)},u.qh=function(e){return UL(this,e)},u.rh=function(){return!0},u.sh=function(e,n){},u.th=function(){},u.uh=function(e,n){pV(this,e,n)},u.vh=function(e,n){},u.wh=function(e,n,i){},u.Fb=function(e){return XDt(this,e)},u.Hb=function(){return mat(this)},u.xh=function(){return!1},u.tc=function(){return new $n(this)},u.ed=function(){return new VT(this)},u.fd=function(e){var n;if(n=this._b(),e<0||e>n)throw K(new Wv(e,n));return new E$(this,e)},u.vc=function(e){return SV(this,e)},u.zh=function(e,n){return n},u.hd=function(e,n){return j2(this,e,n)},u.Ib=function(){return Yat(this)},u.Bh=function(){return!0},u.Ch=function(e,n){return CC(this,n)};var M$e=A(qs,"AbstractEList",59);T(55,59,Nf,J0,n_,lat),u.lh=function(e){return xRt(this,e)},u.mh=function(e,n){JL(this,e,n)},u.nh=function(e){ML(this,e)},u.Dh=function(e){return Pct(this,e)},u.Pb=function(){dC(this)},u.pc=function(e){return VC(this,e)},u.cd=function(e){return at(this,e)},u.Eh=function(e){$It(this,e)},u.dd=function(e){return DRt(this,e)},u.Wb=function(){return this.i==0},u.Fh=function(e){return dt(un,te,1,e,5,1)},u.yh=function(e){return this.g[e]},u.gd=function(e){return H2(this,e)},u.Ah=function(e,n){return EV(this,e,n)},u._b=function(){return this.i},u.yc=function(){return Qot(this)},u.zc=function(e){return nut(this,e)},u.i=0;var Pvt=A(qs,"BasicEList",55),Ivt=Sr(qs,"TreeIterator");T(629,55,QY),u.gc=function(e){ks(this,e)},u.hc=function(){return this.g==null&&!this.c?Pot(this):this.g==null||this.i!=0&&a(this.g[this.i-1],43).hc()},u.ic=function(){return L7(this)},u.jc=function(){if(!this.e)throw K(new yc("There is no valid object to remove."));this.e.jc()},u.c=!1;var E$e=A(qs,"AbstractTreeIterator",629);T(621,629,QY,xrt),u.Gh=function(e){var n;return n=a(e,51).pg().tc(),ct(n,260)&&a(n,260).Zj(new AR),n};var S$e=A(tK,"ElkGraphUtil/PropertiesSkippingTreeIterator",621);T(868,1,{},AR);var T$e=A(tK,"ElkGraphUtil/PropertiesSkippingTreeIterator/1",868),gI,itt,mI=A(tK,"ElkReflect",null);T(784,1,z_,WS),u.Nf=function(e){return hN(),vae(a(e,185))};var C$e=A(tK,"ElkReflect/lambda$0$Type",784),Ow,A$e=Sr(qs,"ResourceLocator");T(953,1,{});var k$e=A(qs,"DelegatingResourceLocator",953);T(954,953,{});var L$e=A("org.eclipse.emf.common","EMFPlugin",954),rtt=Sr(oUt,"Adapter"),O3e=Sr(oUt,"Notification");T(1016,1,Bpt),u.Hh=function(){return this.d},u.Ih=function(e){},u.Jh=function(e){this.d=e},u.Kh=function(e){this.d==e&&(this.d=null)},u.d=null;var P$e=A(hx,"AdapterImpl",1016);T(1688,59,cUt),u.lh=function(e){var n,i,r;if(++this.j,e.Wb())return!1;for(n=this.hi(),r=e.tc();r.hc();)i=r.ic(),this.Wh(this.Ch(n,i)),++n;return!0},u.mh=function(e,n){VSt(this,e,n)},u.nh=function(e){XCt(this,e)},u.Uh=function(){return this.Xh()},u.Pb=function(){nL(this,this.hi(),this.ii())},u.pc=function(e){return this.Zh(e)},u.qc=function(e){return this.$h(e)},u.Vh=function(e,n){this.ei().tl()},u.Wh=function(e){this.ei().tl()},u.Xh=function(){return this.ei()},u.Yh=function(){this.ei().tl()},u.Zh=function(e){return this.ei().tl()},u.$h=function(e){return this.ei().tl()},u._h=function(e){return this.ei().tl()},u.ai=function(e){return this.ei().tl()},u.bi=function(){return this.ei().tl()},u.ci=function(e){return this.ei().tl()},u.di=function(){return this.ei().tl()},u.fi=function(e){return this.ei().tl()},u.gi=function(e,n){return this.ei().tl()},u.hi=function(){return this.ei().tl()},u.ii=function(){return this.ei().tl()},u.ji=function(e){return this.ei().tl()},u.ki=function(){return this.ei().tl()},u.Fb=function(e){return this._h(e)},u.cd=function(e){return this.zh(e,this.ai(e))},u.Hb=function(){return this.bi()},u.dd=function(e){return this.ci(e)},u.Wb=function(){return this.di()},u.yh=function(e){return this.ai(e)},u.gd=function(e){return ID(this,e)},u.vc=function(e){var n;return n=this.dd(e),n>=0?(this.gd(n),!0):!1},u.Ah=function(e,n){return this.gi(e,this.Ch(e,n))},u._b=function(){return this.hi()},u.yc=function(){return this.ii()},u.zc=function(e){return this.ji(e)},u.Ib=function(){return this.ki()};var I$e=A(qs,"DelegatingEList",1688);T(1689,1688,cUt),u.li=function(e,n){return wht(this,e,n)},u.lh=function(e){return this.li(this.hi(),e)},u.mh=function(e,n){F9t(this,e,n)},u.nh=function(e){L9t(this,e)},u.rh=function(){return!this.qi()},u.Pb=function(){V7(this)},u.mi=function(e,n,i,r,c){return new z4t(this,e,n,i,r,c)},u.ni=function(e){Bi(this.Oh(),e)},u.oi=function(){return null},u.pi=function(){return-1},u.Oh=function(){return null},u.qi=function(){return!1},u.ri=function(e,n){return n},u.si=function(e,n){return n},u.ti=function(){return!1},u.ui=function(){return!this.di()},u.gd=function(e){var n,i,r,c;return this.ti()?(r=this.ui(),n=this.mi(4,c=ID(this,e),null,e,r),this.qi()&&c?(i=this.si(c,null),i?(i.Sh(n),i.Th()):this.ni(n)):this.ni(n),c):(c=ID(this,e),this.qi()&&c&&(i=this.si(c,null),i&&i.Th()),c)},u.Ah=function(e,n){return LNt(this,e,n)};var R$e=A(hx,"DelegatingNotifyingListImpl",1689);T(136,1,r6),u.Sh=function(e){return Xut(this,e)},u.Th=function(){yV(this)},u.Lh=function(){return this.d},u.oi=function(){return null},u.vi=function(){return null},u.Mh=function(e){return-1},u.Nh=function(){return TDt(this)},u.Oh=function(){return null},u.Ph=function(){return qlt(this)},u.Qh=function(){return this.o<0?this.o<-2?-2-this.o-1:-1:this.o},u.wi=function(){return!1},u.Rh=function(e){var n,i,r,c,l,f,p,b,v,M,k;switch(this.d){case 1:case 2:switch(c=e.Lh(),c){case 1:case 2:if(l=e.Oh(),zt(l)===zt(this.Oh())&&this.Mh(null)==e.Mh(null))return this.g=e.Nh(),e.Lh()==1&&(this.d=1),!0}case 4:{switch(c=e.Lh(),c){case 4:{if(l=e.Oh(),zt(l)===zt(this.Oh())&&this.Mh(null)==e.Mh(null))return v=Pht(this),b=this.o<0?this.o<-2?-2-this.o-1:-1:this.o,f=e.Qh(),this.d=6,k=new n_(2),b<=f?(ni(k,this.n),ni(k,e.Ph()),this.g=Y(Z(Gn,1),pi,22,15,[this.o=b,f+1])):(ni(k,e.Ph()),ni(k,this.n),this.g=Y(Z(Gn,1),pi,22,15,[this.o=f,b])),this.n=k,v||(this.o=-2-this.o-1),!0;break}}break}case 6:{switch(c=e.Lh(),c){case 4:{if(l=e.Oh(),zt(l)===zt(this.Oh())&&this.Mh(null)==e.Mh(null)){for(v=Pht(this),f=e.Qh(),M=a(this.g,37),r=dt(Gn,pi,22,M.length+1,15,1),n=0;n>>0).toString(16)),i.a+=" (eventType: ",this.d){case 1:{i.a+="SET";break}case 2:{i.a+="UNSET";break}case 3:{i.a+="ADD";break}case 5:{i.a+="ADD_MANY";break}case 4:{i.a+="REMOVE";break}case 6:{i.a+="REMOVE_MANY";break}case 7:{i.a+="MOVE";break}case 8:{i.a+="REMOVING_ADAPTER";break}case 9:{i.a+="RESOLVE";break}default:{$G(i,this.d);break}}if(mNt(this)&&(i.a+=", touch: true"),i.a+=", position: ",$G(i,this.o<0?this.o<-2?-2-this.o-1:-1:this.o),i.a+=", notifier: ",kT(i,this.Oh()),i.a+=", feature: ",kT(i,this.oi()),i.a+=", oldValue: ",kT(i,qlt(this)),i.a+=", newValue: ",this.d==6&&ct(this.g,37)){for(n=a(this.g,37),i.a+="[",e=0;e10?((!this.b||this.c.j!=this.a)&&(this.b=new lL(this),this.a=this.j),TT(this.b,e)):VC(this,e)},u.Bh=function(){return!0},u.a=0;var z$e=A(qs,"AbstractEList/1",869);T(295,79,OZ,Wv);var j$e=A(qs,"AbstractEList/BasicIndexOutOfBoundsException",295);T(36,1,Cs,$n),u.gc=function(e){ks(this,e)},u.Bi=function(){if(this.i.j!=this.f)throw K(new C)},u.Ci=function(){return ci(this)},u.hc=function(){return this.e!=this.i._b()},u.ic=function(){return this.Ci()},u.jc=function(){WC(this)},u.e=0,u.f=0,u.g=-1;var H$e=A(qs,"AbstractEList/EIterator",36);T(296,36,kf,VT,E$),u.jc=function(){WC(this)},u.Bc=function(e){mIt(this,e)},u.Di=function(){var e;try{return e=this.d.cd(--this.e),this.Bi(),this.g=this.e,e}catch(n){throw n=vr(n),ct(n,79)?(this.Bi(),K(new J)):K(n)}},u.Ei=function(e){dRt(this,e)},u.Cc=function(){return this.e!=0},u.Dc=function(){return this.e},u.Ec=function(){return this.Di()},u.Fc=function(){return this.e-1},u.Gc=function(e){this.Ei(e)};var G$e=A(qs,"AbstractEList/EListIterator",296);T(324,36,Cs,y2),u.Ci=function(){return Dq(this)},u.jc=function(){throw K(new Oi)};var W$e=A(qs,"AbstractEList/NonResolvingEIterator",324);T(355,296,kf,K5,Tst),u.Bc=function(e){throw K(new Oi)},u.Ci=function(){var e;try{return e=this.c.yh(this.e),this.Bi(),this.g=this.e++,e}catch(n){throw n=vr(n),ct(n,79)?(this.Bi(),K(new J)):K(n)}},u.Di=function(){var e;try{return e=this.c.yh(--this.e),this.Bi(),this.g=this.e,e}catch(n){throw n=vr(n),ct(n,79)?(this.Bi(),K(new J)):K(n)}},u.jc=function(){throw K(new Oi)},u.Gc=function(e){throw K(new Oi)};var $$e=A(qs,"AbstractEList/NonResolvingEListIterator",355);T(1673,59,aUt),u.lh=function(e){var n,i,r,c,l,f,p,b,v;if(r=e._b(),r!=0){for(b=(i=a(an(this.a,4),116),i==null?0:i.length),v=b+r,n=Aat(this,v),p=e.tc(),l=b;li)throw K(new Wv(e,i));return new o4t(this,e)},u.Pb=function(){var e,n;++this.j,e=a(an(this.a,4),116),n=e==null?0:e.length,cP(this,null),pV(this,n,e)},u.pc=function(e){var n,i,r,c;if(n=a(an(this.a,4),116),n!=null){if(e!=null){for(r=0,c=n.length;r=i)throw K(new Wv(e,i));return n[e]},u.dd=function(e){var n,i,r;if(n=a(an(this.a,4),116),n!=null){if(e!=null){for(i=0,r=n.length;ii)throw K(new Wv(e,i));return new s4t(this,e)},u.yh=function(e){return a(an(this.a,4),116)[e]},u.gd=function(e){return W0e(this,e)},u.Ah=function(e,n){var i,r;return i=kfe(this),r=i[e],Art(i,e,CC(this,n)),cP(this,i),r},u._b=function(){var e;return e=a(an(this.a,4),116),e==null?0:e.length},u.yc=function(){var e,n,i;return e=a(an(this.a,4),116),i=e==null?0:e.length,n=dt(rtt,rK,380,i,0,1),i>0&&Aa(e,0,n,0,i),n},u.zc=function(e){var n,i,r;return n=a(an(this.a,4),116),r=n==null?0:n.length,r>0&&(e.lengthr&&Vr(e,r,null),e};var Tqt,V$e=A(qs,"ArrayDelegatingEList",1673);T(927,36,Cs,jkt),u.Bi=function(){if(this.b.j!=this.f||zt(a(an(this.b.a,4),116))!==zt(this.a))throw K(new C)},u.jc=function(){WC(this),this.a=a(an(this.b.a,4),116)};var q$e=A(qs,"ArrayDelegatingEList/EIterator",927);T(640,296,kf,PCt,s4t),u.Bi=function(){if(this.b.j!=this.f||zt(a(an(this.b.a,4),116))!==zt(this.a))throw K(new C)},u.Ei=function(e){dRt(this,e),this.a=a(an(this.b.a,4),116)},u.jc=function(){WC(this),this.a=a(an(this.b.a,4),116)};var X$e=A(qs,"ArrayDelegatingEList/EListIterator",640);T(928,324,Cs,Hkt),u.Bi=function(){if(this.b.j!=this.f||zt(a(an(this.b.a,4),116))!==zt(this.a))throw K(new C)};var Z$e=A(qs,"ArrayDelegatingEList/NonResolvingEIterator",928);T(641,355,kf,ICt,o4t),u.Bi=function(){if(this.b.j!=this.f||zt(a(an(this.b.a,4),116))!==zt(this.a))throw K(new C)};var Y$e=A(qs,"ArrayDelegatingEList/NonResolvingEListIterator",641);T(549,295,OZ,SW);var K$e=A(qs,"BasicEList/BasicIndexOutOfBoundsException",549);T(630,55,Nf,grt),u.bd=function(e,n){throw K(new Oi)},u.nc=function(e){throw K(new Oi)},u.oc=function(e){throw K(new Oi)},u.Pb=function(){throw K(new Oi)},u.Eh=function(e){throw K(new Oi)},u.tc=function(){return this.oh()},u.ed=function(){return this.ph()},u.fd=function(e){return this.qh(e)},u.gd=function(e){throw K(new Oi)},u.vc=function(e){throw K(new Oi)},u.hd=function(e,n){throw K(new Oi)};var J$e=A(qs,"BasicEList/UnmodifiableEList",630);T(639,1,{3:1,20:1,13:1,15:1,52:1,533:1}),u.bd=function(e,n){Kte(this,e,a(n,38))},u.nc=function(e){return Pee(this,a(e,38))},u.sc=function(e){vo(this,e)},u.cd=function(e){return a(at(this.c,e),134)},u.uc=function(){return this.xc()},u.gd=function(e){return a(this.c.gd(e),38)},u.hd=function(e,n){return Qre(this,e,a(n,38))},u.jd=function(e){D1(this,e)},u.wc=function(){return new Ei(this,16)},u.xc=function(){return new gi(null,this.wc())},u.oc=function(e){return this.c.oc(e)},u.Pb=function(){this.c.Pb()},u.pc=function(e){return this.c.pc(e)},u.qc=function(e){return O1(this.c,e)},u.Fi=function(){var e,n,i;if(this.d==null){for(this.d=dt(Pvt,Fpt,55,2*this.f+1,0,1),i=this.e,this.f=0,n=this.c.tc();n.e!=n.i._b();)e=a(n.Ci(),134),f7(this,e);this.e=i}},u.Fb=function(e){return ATt(this,e)},u.Hb=function(){return mat(this.c)},u.dd=function(e){return this.c.dd(e)},u.Gi=function(){this.c=new bG(this)},u.Wb=function(){return this.f==0},u.tc=function(){return this.c.tc()},u.ed=function(){return this.c.ed()},u.fd=function(e){return this.c.fd(e)},u.Hi=function(){return SL(this)},u.Ii=function(e,n,i){return new UTt(e,n,i)},u.Ji=function(){return new Mz},u.vc=function(e){return zLt(this,e)},u._b=function(){return this.f},u.kd=function(e,n){return new C1(this.c,e,n)},u.yc=function(){return this.c.yc()},u.zc=function(e){return this.c.zc(e)},u.Ib=function(){return Yat(this.c)},u.e=0,u.f=0;var Q$e=A(qs,"BasicEMap",639);T(922,55,Nf,bG),u.sh=function(e,n){ee(this,a(n,134))},u.vh=function(e,n){fe(this,a(n,134))},u.wh=function(e,n,i){Eee(this,a(n,134),a(i,134))},u.uh=function(e,n){OPt(this.a)};var tVe=A(qs,"BasicEMap/1",922);T(923,55,Nf,Mz),u.Fh=function(e){return dt(B3e,uUt,551,e,0,1)};var eVe=A(qs,"BasicEMap/2",923);T(924,bd,vl,wG),u.Pb=function(){this.a.c.Pb()},u.pc=function(e){return kq(this.a,e)},u.tc=function(){return this.a.f==0?(XT(),bI.a):new h3t(this.a)},u.vc=function(e){var n;return n=this.a.f,sP(this.a,e),this.a.f!=n},u._b=function(){return this.a.f};var nVe=A(qs,"BasicEMap/3",924);T(925,25,R_,vG),u.Pb=function(){this.a.c.Pb()},u.pc=function(e){return KDt(this.a,e)},u.tc=function(){return this.a.f==0?(XT(),bI.a):new f3t(this.a)},u._b=function(){return this.a.f};var iVe=A(qs,"BasicEMap/4",925);T(926,bd,vl,_G),u.Pb=function(){this.a.c.Pb()},u.pc=function(e){var n,i,r,c,l,f,p,b,v;if(this.a.f>0&&ct(e,38)&&(this.a.Fi(),b=a(e,38),p=b.kc(),c=p==null?0:Yr(p),l=cst(this.a,c),n=this.a.d[l],n)){for(i=a(n.g,339),v=n.i,f=0;f"+this.c},u.a=0;var B3e=A(qs,"BasicEMap/EntryImpl",551);T(484,1,{},Zy);var uVe=A(qs,"BasicEMap/View",484),bI;T(695,1,{}),u.Fb=function(e){return klt((we(),fo),e)},u.Hb=function(){return Mat((we(),fo))},u.Ib=function(){return Gp((we(),fo))};var lVe=A(qs,"ECollections/BasicEmptyUnmodifiableEList",695);T(1164,1,kf,Ez),u.gc=function(e){ks(this,e)},u.Bc=function(e){throw K(new Oi)},u.hc=function(){return!1},u.Cc=function(){return!1},u.ic=function(){throw K(new J)},u.Dc=function(){return 0},u.Ec=function(){throw K(new J)},u.Fc=function(){return-1},u.jc=function(){throw K(new Oi)},u.Gc=function(e){throw K(new Oi)};var hVe=A(qs,"ECollections/BasicEmptyUnmodifiableEList/1",1164);T(1162,695,{20:1,13:1,15:1,52:1},mxt),u.bd=function(e,n){Fxt()},u.nc=function(e){return Uxt()},u.oc=function(e){return zxt()},u.Pb=function(){jxt()},u.pc=function(e){return!1},u.qc=function(e){return!1},u.sc=function(e){vo(this,e)},u.cd=function(e){return _rt((we(),e)),null},u.dd=function(e){return-1},u.Wb=function(){return!0},u.tc=function(){return this.a},u.ed=function(){return this.a},u.fd=function(e){return this.a},u.uc=function(){return this.xc()},u.gd=function(e){return Hxt()},u.vc=function(e){return Gxt()},u.hd=function(e,n){return Wxt()},u._b=function(){return 0},u.jd=function(e){D1(this,e)},u.wc=function(){return new Ei(this,16)},u.xc=function(){return new gi(null,this.wc())},u.kd=function(e,n){return we(),new C1(fo,e,n)},u.yc=function(){return b$((we(),fo))},u.zc=function(e){return we(),aP(fo,e)};var fVe=A(qs,"ECollections/EmptyUnmodifiableEList",1162);T(1163,695,{20:1,13:1,15:1,52:1,533:1},gxt),u.bd=function(e,n){Fxt()},u.nc=function(e){return Uxt()},u.oc=function(e){return zxt()},u.Pb=function(){jxt()},u.pc=function(e){return!1},u.qc=function(e){return!1},u.sc=function(e){vo(this,e)},u.cd=function(e){return _rt((we(),e)),null},u.dd=function(e){return-1},u.Wb=function(){return!0},u.tc=function(){return this.a},u.ed=function(){return this.a},u.fd=function(e){return this.a},u.uc=function(){return this.xc()},u.gd=function(e){return Hxt()},u.vc=function(e){return Gxt()},u.hd=function(e,n){return Wxt()},u._b=function(){return 0},u.jd=function(e){D1(this,e)},u.wc=function(){return new Ei(this,16)},u.xc=function(){return new gi(null,this.wc())},u.kd=function(e,n){return we(),new C1(fo,e,n)},u.yc=function(){return b$((we(),fo))},u.zc=function(e){return we(),aP(fo,e)},u.Hi=function(){return we(),we(),ap};var dVe=A(qs,"ECollections/EmptyUnmodifiableEMap",1163),Rvt=Sr(qs,"Enumerator"),WF;T(261,1,{261:1},IX),u.Fb=function(e){var n;return this===e?!0:ct(e,261)?(n=a(e,261),this.f==n.f&&lre(this.i,n.i)&&p$(this.a,this.f&256?n.f&256?n.a:null:n.f&256?null:n.a)&&p$(this.d,n.d)&&p$(this.g,n.g)&&p$(this.e,n.e)&&Jfe(this,n)):!1},u.Hb=function(){return this.f},u.Ib=function(){return ANt(this)},u.f=0;var Cqt=0,Aqt=0,kqt=0,Lqt=0,Dvt=0,Nvt=0,Ovt=0,Bvt=0,Fvt=0,Pqt,TA=0,CA=0,Iqt=0,Rqt=0,$F,Uvt,pVe=A(qs,"URI",261);T(965,44,ix,uxt),u.Zb=function(e,n){return a(tc(this,hi(e),a(n,261)),261)};var gVe=A(qs,"URI/URICache",965);T(451,55,Nf,D3,DD),u.xh=function(){return!0};var mVe=A(qs,"UniqueEList",451);T(526,54,rp,xN);var bVe=A(qs,"WrappedException",526),Ui=Sr(Qu,fUt),Bw=Sr(Qu,dUt),Ra=Sr(Qu,pUt),py=Sr(Qu,gUt),cf=Sr(Qu,mUt),Dl=Sr(Qu,"EClass"),stt=Sr(Qu,"EDataType"),Dqt;T(1096,44,ix,lxt),u.Vb=function(e){return Es(e)?Zc(this,e):Ua(Ea(this.d,e))};var wVe=A(Qu,"EDataType/Internal/ConversionDelegate/Factory/Registry/Impl",1096),VF=Sr(Qu,"EEnum"),Qp=Sr(Qu,bUt),Do=Sr(Qu,wUt),ph=Sr(Qu,vUt),Nl,Fw=Sr(Qu,_Ut),Uw=Sr(Qu,yUt);T(918,1,{},kR),u.Ib=function(){return"NIL"};var vVe=A(Qu,"EStructuralFeature/Internal/DynamicValueHolder/1",918),Nqt;T(917,44,ix,hxt),u.Vb=function(e){return Es(e)?Zc(this,e):Ua(Ea(this.d,e))};var _Ve=A(Qu,"EStructuralFeature/Internal/SettingDelegate/Factory/Registry/Impl",917),wu=Sr(Qu,xUt),Bx=Sr(Qu,"EValidator/PatternMatcher"),zvt,jvt,Ae,S0,Fx,fb,Oqt,Bqt,db,T0,pb,gy,Hf,Fqt,Uqt,gh,C0,A0,zw,GE,Ho,zqt,jqt,my,qF=Sr(hr,"FeatureMap/Entry");T(483,1,{75:1},Z9),u.nj=function(){return this.a},u.lc=function(){return this.b};var yVe=A(Re,"BasicEObjectImpl/1",483);T(1674,1,{103:1}),u.oj=function(e){this.e=e==0?Hqt:dt(un,te,1,e,5,1)},u.Tg=function(e){return this.e[e]},u.Ug=function(e,n){this.e[e]=n},u.Vg=function(e){this.e[e]=null},u.pj=function(){return this.c},u.qj=function(){throw K(new Oi)},u.rj=function(){throw K(new Oi)},u.sj=function(){return this.d},u.tj=function(){return this.e!=null},u.uj=function(e){this.c=e},u.vj=function(e){throw K(new Oi)},u.wj=function(e){this.d=e};var Hqt,xVe=A(Re,"BasicEObjectImpl/EPropertiesHolderBaseImpl",1674);T(201,1674,{103:1},wf),u.qj=function(){return this.a},u.rj=function(){return this.b},u.vj=function(e){this.a=e};var MVe=A(Re,"BasicEObjectImpl/EPropertiesHolderImpl",201);T(463,92,CFt,zl),u.dg=function(){return this.f},u.ig=function(){return this.k},u.kg=function(e,n){this.g=e,this.i=n},u.mg=function(){return this.j&2?this.Jg().pj():this.Rg()},u.og=function(){return this.i},u.fg=function(){return(this.j&1)!=0},u.yg=function(){return this.g},u.Eg=function(){return(this.j&4)!=0},u.Jg=function(){return!this.k&&(this.k=new wf),this.k},u.Ng=function(e){this.Jg().uj(e),e?this.j|=2:this.j&=-3},u.Rg=function(){return(T1(),Ae).S},u.i=0,u.j=1;var EVe=A(Re,"EObjectImpl",463);T(710,463,{95:1,91:1,87:1,51:1,103:1,42:1,92:1},zst),u.Tg=function(e){return this.e[e]},u.Ug=function(e,n){this.e[e]=n},u.Vg=function(e){this.e[e]=null},u.mg=function(){return this.d},u.rg=function(e){return xr(this.d,e)},u.tg=function(){return this.d},u.xg=function(){return this.e!=null},u.Jg=function(){return!this.k&&(this.k=new Sz),this.k},u.Ng=function(e){this.d=e},u.Qg=function(){var e;return this.e==null&&(e=ei(this.d),this.e=e==0?Gqt:dt(un,te,1,e,5,1)),this},u.Sg=function(){return 0};var Gqt,SVe=A(Re,"DynamicEObjectImpl",710);T(1389,710,{95:1,38:1,91:1,87:1,134:1,51:1,103:1,42:1,92:1},uCt),u.Fb=function(e){return this===e},u.Hb=function(){return lm(this)},u.Ng=function(e){this.d=e,this.b=EP(e,"key"),this.c=EP(e,E4)},u.ih=function(){var e;return this.a==-1&&(e=TV(this,this.b),this.a=e==null?0:Yr(e)),this.a},u.kc=function(){return TV(this,this.b)},u.lc=function(){return TV(this,this.c)},u.jh=function(e){this.a=e},u.kh=function(e){MAt(this,this.b,e)},u.mc=function(e){var n;return n=TV(this,this.c),MAt(this,this.c,e),n},u.a=0;var TVe=A(Re,"DynamicEObjectImpl/BasicEMapEntry",1389);T(1390,1,{103:1},Sz),u.oj=function(e){throw K(new Oi)},u.Tg=function(e){throw K(new Oi)},u.Ug=function(e,n){throw K(new Oi)},u.Vg=function(e){throw K(new Oi)},u.pj=function(){throw K(new Oi)},u.qj=function(){return this.a},u.rj=function(){return this.b},u.sj=function(){return this.c},u.tj=function(){throw K(new Oi)},u.uj=function(e){throw K(new Oi)},u.vj=function(e){this.a=e},u.wj=function(e){this.c=e};var CVe=A(Re,"DynamicEObjectImpl/DynamicEPropertiesHolderImpl",1390);T(469,142,{95:1,91:1,87:1,609:1,139:1,51:1,103:1,42:1,92:1,469:1,142:1,107:1,108:1},LR),u.jg=function(e){return Dut(this,e)},u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.d;case 2:return i?(!this.b&&(this.b=new xu((ye(),Ho),Dc,this)),this.b):(!this.b&&(this.b=new xu((ye(),Ho),Dc,this)),SL(this.b));case 3:return uAt(this);case 4:return!this.a&&(this.a=new Ss(Nw,this,4)),this.a;case 5:return!this.c&&(this.c=new lM(Nw,this,5)),this.c}return qu(this,e-ei((ye(),S0)),Ve((r=a(an(this,16),24),r||S0),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 3:return this.Cb&&(i=(c=this.Db>>16,c>=0?Dut(this,i):this.Cb.Cg(this,-1-c,null,i))),not(this,a(e,139),i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),S0)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),S0)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 2:return!this.b&&(this.b=new xu((ye(),Ho),Dc,this)),yD(this.b,e,i);case 3:return not(this,null,i);case 4:return!this.a&&(this.a=new Ss(Nw,this,4)),$s(this.a,e,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),S0)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),S0)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.d!=null;case 2:return!!this.b&&this.b.f!=0;case 3:return!!uAt(this);case 4:return!!this.a&&this.a.i!=0;case 5:return!!this.c&&this.c.i!=0}return $u(this,e-ei((ye(),S0)),Ve((n=a(an(this,16),24),n||S0),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:hre(this,hi(n));return;case 2:!this.b&&(this.b=new xu((ye(),Ho),Dc,this)),ON(this.b,n);return;case 3:Abe(this,a(n,139));return;case 4:!this.a&&(this.a=new Ss(Nw,this,4)),Dr(this.a),!this.a&&(this.a=new Ss(Nw,this,4)),Lr(this.a,a(n,13));return;case 5:!this.c&&(this.c=new lM(Nw,this,5)),Dr(this.c),!this.c&&(this.c=new lM(Nw,this,5)),Lr(this.c,a(n,13));return}Yu(this,e-ei((ye(),S0)),Ve((i=a(an(this,16),24),i||S0),e),n)},u.Rg=function(){return ye(),S0},u.Ib=function(){return F6t(this)},u.d=null;var AVe=A(Re,"EAnnotationImpl",469);T(143,639,Upt,lu),u.xj=function(e,n){return hne(this,a(e,38),n)},u.Dh=function(e){return a(a(this.c,64).Dh(e),134)},u.oh=function(){return a(this.c,64).oh()},u.ph=function(){return a(this.c,64).ph()},u.qh=function(e){return a(this.c,64).qh(e)},u.yj=function(e,n){return yD(this,e,n)},u.hj=function(e){return a(this.c,81).hj(e)},u.Gi=function(){},u.ui=function(){return a(this.c,81).ui()},u.Ii=function(e,n,i){var r;return r=a(Xu(this.b).dh().$g(this.b),134),r.jh(e),r.kh(n),r.mc(i),r},u.Ji=function(){return new dT(this)},u.Gc=function(e){ON(this,e)},u.ij=function(){a(this.c,81).ij()};var kVe=A(hr,"EcoreEMap",143);T(152,143,Upt,xu),u.Fi=function(){var e,n,i,r,c,l;if(this.d==null){for(l=dt(Pvt,Fpt,55,2*this.f+1,0,1),i=this.c.tc();i.e!=i.i._b();)n=a(i.Ci(),134),r=n.ih(),c=(r&qi)%l.length,e=l[c],!e&&(e=l[c]=new dT(this)),e.nc(n);this.d=l}};var LVe=A(Re,"EAnnotationImpl/1",152);T(268,399,{95:1,91:1,87:1,139:1,174:1,51:1,103:1,431:1,42:1,92:1,142:1,268:1,107:1,108:1}),u.ug=function(e,n,i){var r,c;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return me(),!!(this.Bb&256);case 3:return me(),!!(this.Bb&512);case 4:return Xt(this.s);case 5:return Xt(this.t);case 6:return me(),!!this.lj();case 7:return me(),c=this.s,c>=1;case 8:return n?wl(this):this.r;case 9:return this.q}return qu(this,e-ei(this.Rg()),Ve((r=a(an(this,16),24),r||this.Rg()),e),n,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 9:return k$(this,i)}return c=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),c.aj().ej(this,ra(this),n-ei(this.Rg()),e,i)},u.Fg=function(e){var n,i;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.lj();case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&mm(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&mm(this.q).i==0)}return $u(this,e-ei(this.Rg()),Ve((n=a(an(this,16),24),n||this.Rg()),e))},u.Mg=function(e,n){var i,r;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:this.ah(hi(n));return;case 2:h_(this,lt(de(n)));return;case 3:f_(this,lt(de(n)));return;case 4:c_(this,a(n,21).a);return;case 5:this.Aj(a(n,21).a);return;case 8:zM(this,a(n,133));return;case 9:r=$1(this,a(n,84),null),r&&r.Th();return}Yu(this,e-ei(this.Rg()),Ve((i=a(an(this,16),24),i||this.Rg()),e),n)},u.Rg=function(){return ye(),jqt},u.Xg=function(){wl(this),this.Bb|=1},u.jj=function(){return wl(this)},u.kj=function(){return this.t},u.lj=function(){var e;return e=this.t,e>1||e==-1},u.xh=function(){return(this.Bb&512)!=0},u.zj=function(e,n){return Bat(this,e,n)},u.Aj=function(e){RM(this,e)},u.Ib=function(){return Slt(this)},u.s=0,u.t=1;var PVe=A(Re,"ETypedElementImpl",268);T(418,268,{95:1,91:1,87:1,139:1,174:1,51:1,158:1,61:1,103:1,431:1,42:1,92:1,142:1,418:1,268:1,107:1,108:1,615:1}),u.jg=function(e){return RRt(this,e)},u.ug=function(e,n,i){var r,c;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return me(),!!(this.Bb&256);case 3:return me(),!!(this.Bb&512);case 4:return Xt(this.s);case 5:return Xt(this.t);case 6:return me(),!!this.lj();case 7:return me(),c=this.s,c>=1;case 8:return n?wl(this):this.r;case 9:return this.q;case 10:return me(),!!(this.Bb&oh);case 11:return me(),!!(this.Bb&mw);case 12:return me(),!!(this.Bb&zm);case 13:return this.j;case 14:return tE(this);case 15:return me(),!!(this.Bb&La);case 16:return me(),!!(this.Bb&Lf);case 17:return Zb(this)}return qu(this,e-ei(this.Rg()),Ve((r=a(an(this,16),24),r||this.Rg()),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 17:return this.Cb&&(i=(c=this.Db>>16,c>=0?RRt(this,i):this.Cb.Cg(this,-1-c,null,i))),ku(this,e,17,i)}return l=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),l.aj().dj(this,ra(this),n-ei(this.Rg()),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 9:return k$(this,i);case 17:return ku(this,null,17,i)}return c=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),c.aj().ej(this,ra(this),n-ei(this.Rg()),e,i)},u.Fg=function(e){var n,i;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.lj();case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&mm(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&mm(this.q).i==0);case 10:return(this.Bb&oh)==0;case 11:return(this.Bb&mw)!=0;case 12:return(this.Bb&zm)!=0;case 13:return this.j!=null;case 14:return tE(this)!=null;case 15:return(this.Bb&La)!=0;case 16:return(this.Bb&Lf)!=0;case 17:return!!Zb(this)}return $u(this,e-ei(this.Rg()),Ve((n=a(an(this,16),24),n||this.Rg()),e))},u.Mg=function(e,n){var i,r;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:K$(this,hi(n));return;case 2:h_(this,lt(de(n)));return;case 3:f_(this,lt(de(n)));return;case 4:c_(this,a(n,21).a);return;case 5:this.Aj(a(n,21).a);return;case 8:zM(this,a(n,133));return;case 9:r=$1(this,a(n,84),null),r&&r.Th();return;case 10:VN(this,lt(de(n)));return;case 11:$N(this,lt(de(n)));return;case 12:XN(this,lt(de(n)));return;case 13:wrt(this,hi(n));return;case 15:qN(this,lt(de(n)));return;case 16:ZN(this,lt(de(n)));return}Yu(this,e-ei(this.Rg()),Ve((i=a(an(this,16),24),i||this.Rg()),e),n)},u.Rg=function(){return ye(),zqt},u.Xg=function(){_M(qo((Qa(),eo),this)),wl(this),this.Bb|=1},u.Vi=function(){return this.f},u.Oi=function(){return tE(this)},u.Wi=function(){return Zb(this)},u.$i=function(){return null},u.Bj=function(){return this.k},u.pi=function(){return this.n},u._i=function(){return w7(this)},u.aj=function(){var e,n,i,r,c,l,f,p,b;return this.p||(i=Zb(this),(i.i==null&&q1(i),i.i).length,r=this.$i(),r&&ei(Zb(r)),c=wl(this),f=c.Qi(),e=f?f.i&1?f==Ol?ho:f==Gn?Io:f==Gw?EE:f==Os?To:f==k0?Vm:f==vy?qm:f==Da?fx:O4:f:null,n=tE(this),p=c.Oi(),Uhe(this),this.Bb&Lf&&((l=jut((Qa(),eo),i))&&l!=this||(l=cC(qo(eo,this))))?this.p=new cEt(this,l):this.lj()?this.Dj()?r?this.Bb&La?e?this.Ej()?this.p=new jg(47,e,this,r):this.p=new jg(5,e,this,r):this.Ej()?this.p=new Wg(46,this,r):this.p=new Wg(4,this,r):e?this.Ej()?this.p=new jg(49,e,this,r):this.p=new jg(7,e,this,r):this.Ej()?this.p=new Wg(48,this,r):this.p=new Wg(6,this,r):this.Bb&La?e?e==V_?this.p=new Ip(50,Eqt,this):this.Ej()?this.p=new Ip(43,e,this):this.p=new Ip(1,e,this):this.Ej()?this.p=new Op(42,this):this.p=new Op(0,this):e?e==V_?this.p=new Ip(41,Eqt,this):this.Ej()?this.p=new Ip(45,e,this):this.p=new Ip(3,e,this):this.Ej()?this.p=new Op(44,this):this.p=new Op(2,this):ct(c,140)?e==qF?this.p=new Op(40,this):this.Bb&512?this.Bb&La?e?this.p=new Ip(9,e,this):this.p=new Op(8,this):e?this.p=new Ip(11,e,this):this.p=new Op(10,this):this.Bb&La?e?this.p=new Ip(13,e,this):this.p=new Op(12,this):e?this.p=new Ip(15,e,this):this.p=new Op(14,this):r?(b=r.t,b>1||b==-1?this.Ej()?this.Bb&La?e?this.p=new jg(25,e,this,r):this.p=new Wg(24,this,r):e?this.p=new jg(27,e,this,r):this.p=new Wg(26,this,r):this.Bb&La?e?this.p=new jg(29,e,this,r):this.p=new Wg(28,this,r):e?this.p=new jg(31,e,this,r):this.p=new Wg(30,this,r):this.Ej()?this.Bb&La?e?this.p=new jg(33,e,this,r):this.p=new Wg(32,this,r):e?this.p=new jg(35,e,this,r):this.p=new Wg(34,this,r):this.Bb&La?e?this.p=new jg(37,e,this,r):this.p=new Wg(36,this,r):e?this.p=new jg(39,e,this,r):this.p=new Wg(38,this,r)):this.Ej()?this.Bb&La?e?this.p=new Ip(17,e,this):this.p=new Op(16,this):e?this.p=new Ip(19,e,this):this.p=new Op(18,this):this.Bb&La?e?this.p=new Ip(21,e,this):this.p=new Op(20,this):e?this.p=new Ip(23,e,this):this.p=new Op(22,this):this.Cj()?this.Ej()?this.p=new zTt(a(c,24),this,r):this.p=new Wot(a(c,24),this,r):ct(c,140)?e==qF?this.p=new Op(40,this):this.Bb&La?e?this.p=new CCt(n,p,this,(Aq(),f==Gn?Xvt:f==Ol?Gvt:f==k0?Zvt:f==Gw?qvt:f==Os?Vvt:f==vy?Yvt:f==Da?Wvt:f==el?$vt:att)):this.p=new M4t(a(c,140),n,p,this):e?this.p=new TCt(n,p,this,(Aq(),f==Gn?Xvt:f==Ol?Gvt:f==k0?Zvt:f==Gw?qvt:f==Os?Vvt:f==vy?Yvt:f==Da?Wvt:f==el?$vt:att)):this.p=new x4t(a(c,140),n,p,this):this.Dj()?r?this.Bb&La?this.Ej()?this.p=new HTt(a(c,24),this,r):this.p=new Ist(a(c,24),this,r):this.Ej()?this.p=new jTt(a(c,24),this,r):this.p=new u$(a(c,24),this,r):this.Bb&La?this.Ej()?this.p=new BSt(a(c,24),this):this.p=new Krt(a(c,24),this):this.Ej()?this.p=new OSt(a(c,24),this):this.p=new qW(a(c,24),this):this.Ej()?r?this.Bb&La?this.p=new GTt(a(c,24),this,r):this.p=new Pst(a(c,24),this,r):this.Bb&La?this.p=new FSt(a(c,24),this):this.p=new Yrt(a(c,24),this):r?this.Bb&La?this.p=new WTt(a(c,24),this,r):this.p=new Rst(a(c,24),this,r):this.Bb&La?this.p=new USt(a(c,24),this):this.p=new ND(a(c,24),this)),this.p},u.Xi=function(){return(this.Bb&oh)!=0},u.Cj=function(){return!1},u.Dj=function(){return!1},u.Yi=function(){return(this.Bb&Lf)!=0},u.bj=function(){return Fct(this)},u.Ej=function(){return!1},u.Zi=function(){return(this.Bb&La)!=0},u.Fj=function(e){this.k=e},u.ah=function(e){K$(this,e)},u.Ib=function(){return z7(this)},u.e=!1,u.n=0;var IVe=A(Re,"EStructuralFeatureImpl",418);T(335,418,{95:1,91:1,87:1,29:1,139:1,174:1,51:1,158:1,61:1,103:1,431:1,42:1,92:1,335:1,142:1,418:1,268:1,107:1,108:1,615:1},NG),u.ug=function(e,n,i){var r,c;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return me(),!!(this.Bb&256);case 3:return me(),!!(this.Bb&512);case 4:return Xt(this.s);case 5:return Xt(this.t);case 6:return me(),!!Mlt(this);case 7:return me(),c=this.s,c>=1;case 8:return n?wl(this):this.r;case 9:return this.q;case 10:return me(),!!(this.Bb&oh);case 11:return me(),!!(this.Bb&mw);case 12:return me(),!!(this.Bb&zm);case 13:return this.j;case 14:return tE(this);case 15:return me(),!!(this.Bb&La);case 16:return me(),!!(this.Bb&Lf);case 17:return Zb(this);case 18:return me(),!!(this.Bb&ca);case 19:return n?KV(this):v5t(this)}return qu(this,e-ei((ye(),Fx)),Ve((r=a(an(this,16),24),r||Fx),e),n,i)},u.Fg=function(e){var n,i;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return Mlt(this);case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&mm(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&mm(this.q).i==0);case 10:return(this.Bb&oh)==0;case 11:return(this.Bb&mw)!=0;case 12:return(this.Bb&zm)!=0;case 13:return this.j!=null;case 14:return tE(this)!=null;case 15:return(this.Bb&La)!=0;case 16:return(this.Bb&Lf)!=0;case 17:return!!Zb(this);case 18:return(this.Bb&ca)!=0;case 19:return!!v5t(this)}return $u(this,e-ei((ye(),Fx)),Ve((n=a(an(this,16),24),n||Fx),e))},u.Mg=function(e,n){var i,r;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:K$(this,hi(n));return;case 2:h_(this,lt(de(n)));return;case 3:f_(this,lt(de(n)));return;case 4:c_(this,a(n,21).a);return;case 5:c3t(this,a(n,21).a);return;case 8:zM(this,a(n,133));return;case 9:r=$1(this,a(n,84),null),r&&r.Th();return;case 10:VN(this,lt(de(n)));return;case 11:$N(this,lt(de(n)));return;case 12:XN(this,lt(de(n)));return;case 13:wrt(this,hi(n));return;case 15:qN(this,lt(de(n)));return;case 16:ZN(this,lt(de(n)));return;case 18:$at(this,lt(de(n)));return}Yu(this,e-ei((ye(),Fx)),Ve((i=a(an(this,16),24),i||Fx),e),n)},u.Rg=function(){return ye(),Fx},u.Xg=function(){KV(this),_M(qo((Qa(),eo),this)),wl(this),this.Bb|=1},u.lj=function(){return Mlt(this)},u.zj=function(e,n){return this.b=0,this.a=null,Bat(this,e,n)},u.Aj=function(e){c3t(this,e)},u.Ib=function(){var e;return this.Db&64?z7(this):(e=new ul(z7(this)),e.a+=" (iD: ",Cp(e,(this.Bb&ca)!=0),e.a+=")",e.a)},u.b=0;var RVe=A(Re,"EAttributeImpl",335);T(672,399,{95:1,91:1,87:1,133:1,139:1,174:1,51:1,103:1,42:1,92:1,142:1,107:1,108:1,614:1}),u.Gj=function(e){return e.mg()==this},u.jg=function(e){return Jq(this,e)},u.kg=function(e,n){this.w=null,this.Db=n<<16|this.Db&255,this.Cb=e},u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return Im(this);case 4:return this.Oi();case 5:return this.F;case 6:return n?Xu(this):EM(this);case 7:return!this.A&&(this.A=new Hu(wu,this,7)),this.A}return qu(this,e-ei(this.Rg()),Ve((r=a(an(this,16),24),r||this.Rg()),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 6:return this.Cb&&(i=(c=this.Db>>16,c>=0?Jq(this,i):this.Cb.Cg(this,-1-c,null,i))),ku(this,e,6,i)}return l=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),l.aj().dj(this,ra(this),n-ei(this.Rg()),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 6:return ku(this,null,6,i);case 7:return!this.A&&(this.A=new Hu(wu,this,7)),$s(this.A,e,i)}return c=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),c.aj().ej(this,ra(this),n-ei(this.Rg()),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!Im(this);case 4:return this.Oi()!=null;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!EM(this);case 7:return!!this.A&&this.A.i!=0}return $u(this,e-ei(this.Rg()),Ve((n=a(an(this,16),24),n||this.Rg()),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:nN(this,hi(n));return;case 2:LW(this,hi(n));return;case 5:nZ(this,hi(n));return;case 7:!this.A&&(this.A=new Hu(wu,this,7)),Dr(this.A),!this.A&&(this.A=new Hu(wu,this,7)),Lr(this.A,a(n,13));return}Yu(this,e-ei(this.Rg()),Ve((i=a(an(this,16),24),i||this.Rg()),e),n)},u.Rg=function(){return ye(),Oqt},u.Ni=function(){var e;return this.G==-1&&(this.G=(e=Xu(this),e?Hp(e.bh(),this):-1)),this.G},u.Oi=function(){return null},u.Pi=function(){return Xu(this)},u.Hj=function(){return this.v},u.Qi=function(){return Im(this)},u.Ri=function(){return this.D!=null?this.D:this.B},u.Si=function(){return this.F},u.Li=function(e){return UX(this,e)},u.Ij=function(e){this.v=e},u.Jj=function(e){pPt(this,e)},u.Kj=function(e){this.C=e},u.ah=function(e){nN(this,e)},u.Ib=function(){return n7(this)},u.C=null,u.D=null,u.G=-1;var DVe=A(Re,"EClassifierImpl",672);T(96,672,{95:1,91:1,87:1,24:1,133:1,139:1,174:1,51:1,103:1,42:1,92:1,96:1,142:1,432:1,107:1,108:1,614:1},c5),u.Gj=function(e){return sne(this,e.mg())},u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return Im(this);case 4:return null;case 5:return this.F;case 6:return n?Xu(this):EM(this);case 7:return!this.A&&(this.A=new Hu(wu,this,7)),this.A;case 8:return me(),!!(this.Bb&256);case 9:return me(),!!(this.Bb&512);case 10:return Bo(this);case 11:return!this.q&&(this.q=new Wt(ph,this,11,10)),this.q;case 12:return A_(this);case 13:return c4(this);case 14:return c4(this),this.r;case 15:return A_(this),this.k;case 16:return plt(this);case 17:return $X(this);case 18:return q1(this);case 19:return R7(this);case 20:return A_(this),this.o;case 21:return!this.s&&(this.s=new Wt(Ra,this,21,17)),this.s;case 22:return kc(this);case 23:return PX(this)}return qu(this,e-ei((ye(),fb)),Ve((r=a(an(this,16),24),r||fb),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 6:return this.Cb&&(i=(c=this.Db>>16,c>=0?Jq(this,i):this.Cb.Cg(this,-1-c,null,i))),ku(this,e,6,i);case 11:return!this.q&&(this.q=new Wt(ph,this,11,10)),Kc(this.q,e,i);case 21:return!this.s&&(this.s=new Wt(Ra,this,21,17)),Kc(this.s,e,i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),fb)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),fb)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 6:return ku(this,null,6,i);case 7:return!this.A&&(this.A=new Hu(wu,this,7)),$s(this.A,e,i);case 11:return!this.q&&(this.q=new Wt(ph,this,11,10)),$s(this.q,e,i);case 21:return!this.s&&(this.s=new Wt(Ra,this,21,17)),$s(this.s,e,i);case 22:return $s(kc(this),e,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),fb)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),fb)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!Im(this);case 4:return!1;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!EM(this);case 7:return!!this.A&&this.A.i!=0;case 8:return(this.Bb&256)!=0;case 9:return(this.Bb&512)!=0;case 10:return!!this.u&&kc(this.u.a).i!=0&&!(this.n&&Wq(this.n));case 11:return!!this.q&&this.q.i!=0;case 12:return A_(this).i!=0;case 13:return c4(this).i!=0;case 14:return c4(this),this.r.i!=0;case 15:return A_(this),this.k.i!=0;case 16:return plt(this).i!=0;case 17:return $X(this).i!=0;case 18:return q1(this).i!=0;case 19:return R7(this).i!=0;case 20:return A_(this),!!this.o;case 21:return!!this.s&&this.s.i!=0;case 22:return!!this.n&&Wq(this.n);case 23:return PX(this).i!=0}return $u(this,e-ei((ye(),fb)),Ve((n=a(an(this,16),24),n||fb),e))},u.Ig=function(e){var n;return n=this.i==null||this.q&&this.q.i!=0?null:EP(this,e),n||Oht(this,e)},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:nN(this,hi(n));return;case 2:LW(this,hi(n));return;case 5:nZ(this,hi(n));return;case 7:!this.A&&(this.A=new Hu(wu,this,7)),Dr(this.A),!this.A&&(this.A=new Hu(wu,this,7)),Lr(this.A,a(n,13));return;case 8:$6t(this,lt(de(n)));return;case 9:V6t(this,lt(de(n)));return;case 10:V7(Bo(this)),Lr(Bo(this),a(n,13));return;case 11:!this.q&&(this.q=new Wt(ph,this,11,10)),Dr(this.q),!this.q&&(this.q=new Wt(ph,this,11,10)),Lr(this.q,a(n,13));return;case 21:!this.s&&(this.s=new Wt(Ra,this,21,17)),Dr(this.s),!this.s&&(this.s=new Wt(Ra,this,21,17)),Lr(this.s,a(n,13));return;case 22:Dr(kc(this)),Lr(kc(this),a(n,13));return}Yu(this,e-ei((ye(),fb)),Ve((i=a(an(this,16),24),i||fb),e),n)},u.Rg=function(){return ye(),fb},u.Xg=function(){var e,n;if(A_(this),c4(this),plt(this),$X(this),q1(this),R7(this),PX(this),dC($ie(pl(this))),this.s)for(e=0,n=this.s.i;e=0;--e)at(this,e);return Qot(this)},u.zc=function(e){var n;if(this.Qj())for(n=this.i-1;n>=0;--n)at(this,n);return nut(this,e)},u.ij=function(){Dr(this)},u.Ch=function(e,n){return MLt(this,e,n)};var BVe=A(hr,"EcoreEList",565);T(450,565,Zo,aL),u.rh=function(){return!1},u.pi=function(){return this.c},u.qi=function(){return!1},u.Rj=function(){return!0},u.xh=function(){return!0},u.zh=function(e,n){return n},u.Bh=function(){return!1},u.c=0;var FVe=A(hr,"EObjectEList",450);T(88,450,Zo,Ss),u.qi=function(){return!0},u.Pj=function(){return!1},u.Dj=function(){return!0};var UVe=A(hr,"EObjectContainmentEList",88);T(493,88,Zo,oD),u.th=function(){this.a=!0},u.ui=function(){return this.a},u.ij=function(){var e;Dr(this),Xl(this.e)?(e=this.a,this.a=!1,Bi(this.e,new Jl(this.e,2,this.c,e,!1))):this.a=!1},u.a=!1;var zVe=A(hr,"EObjectContainmentEList/Unsettable",493);T(1003,493,Zo,QEt),u.yi=function(e,n){return gfe(this,a(e,84),n)},u.zi=function(e,n){return pfe(this,a(e,84),n)},u.Ai=function(e,n,i){return Jpe(this,a(e,84),a(n,84),i)},u.mi=function(e,n,i,r,c){switch(e){case 3:return oC(this,3,n,i,r,this.i>1);case 5:return oC(this,5,n,i,r,this.i-a(i,15)._b()>0);default:return new Qd(this.e,e,this.c,n,i,r,!0)}},u.xi=function(){return!0},u.ui=function(){return Wq(this)},u.ij=function(){Dr(this)};var jVe=A(Re,"EClassImpl/1",1003);T(1017,1016,Bpt),u.Ih=function(e){var n,i,r,c,l,f,p;if(i=e.Lh(),i!=8){if(r=qfe(e),r==0)switch(i){case 1:case 9:{p=e.Ph(),p!=null&&(n=pl(a(p,432)),!n.c&&(n.c=new kb),SV(n.c,e.Oh())),f=e.Nh(),f!=null&&(c=a(f,432),c.Bb&1||(n=pl(c),!n.c&&(n.c=new kb),ni(n.c,a(e.Oh(),24))));break}case 3:{f=e.Nh(),f!=null&&(c=a(f,432),c.Bb&1||(n=pl(c),!n.c&&(n.c=new kb),ni(n.c,a(e.Oh(),24))));break}case 5:{if(f=e.Nh(),f!=null)for(l=a(f,13).tc();l.hc();)c=a(l.ic(),432),c.Bb&1||(n=pl(c),!n.c&&(n.c=new kb),ni(n.c,a(e.Oh(),24)));break}case 4:{p=e.Ph(),p!=null&&(c=a(p,432),c.Bb&1||(n=pl(c),!n.c&&(n.c=new kb),SV(n.c,e.Oh())));break}case 6:{if(p=e.Ph(),p!=null)for(l=a(p,13).tc();l.hc();)c=a(l.ic(),432),c.Bb&1||(n=pl(c),!n.c&&(n.c=new kb),SV(n.c,e.Oh()));break}}this.Tj(r)}},u.Tj=function(e){cNt(this,e)},u.b=63;var HVe=A(Re,"ESuperAdapter",1017);T(1018,1017,Bpt,xG),u.Tj=function(e){JC(this,e)};var GVe=A(Re,"EClassImpl/10",1018);T(1007,630,Zo),u.lh=function(e){return xRt(this,e)},u.mh=function(e,n){JL(this,e,n)},u.nh=function(e){ML(this,e)},u.Dh=function(e){return Pct(this,e)},u.Ah=function(e,n){return EV(this,e,n)},u.xj=function(e,n){throw K(new Oi)},u.oh=function(){return new y2(this)},u.ph=function(){return new K5(this)},u.qh=function(e){return UL(this,e)},u.yj=function(e,n){throw K(new Oi)},u.hj=function(e){return this},u.ui=function(){return this.i!=0},u.Gc=function(e){throw K(new Oi)},u.ij=function(){throw K(new Oi)};var WVe=A(hr,"EcoreEList/UnmodifiableEList",1007);T(301,1007,Zo,Uv),u.Bh=function(){return!1};var $Ve=A(hr,"EcoreEList/UnmodifiableEList/FastCompare",301);T(1010,301,Zo,h6t),u.dd=function(e){var n,i,r;if(ct(e,158)&&(n=a(e,158),i=n.pi(),i!=-1)){for(r=this.i;i4)if(this.Li(e)){if(this.Dj()){if(r=a(e,42),i=r.ng(),p=i==this.b&&(this.Pj()?r.hg(r.og(),a(Ve(da(this.b),this.pi()).jj(),24).Qi())==jo(a(Ve(da(this.b),this.pi()),17)).n:-1-r.og()==this.pi()),this.Qj()&&!p&&!i&&r.sg()){for(c=0;c1||r==-1)):!1},u.Pj=function(){var e,n,i;return n=Ve(da(this.b),this.pi()),ct(n,62)?(e=a(n,17),i=jo(e),!!i):!1},u.Qj=function(){var e,n;return n=Ve(da(this.b),this.pi()),ct(n,62)?(e=a(n,17),(e.Bb&ao)!=0):!1},u.dd=function(e){var n,i,r,c;if(r=this.ci(e),r>=0)return r;if(this.Rj()){for(i=0,c=this.hi();i=0;--e)RP(this,e,this.ai(e));return this.ii()},u.zc=function(e){var n;if(this.Qj())for(n=this.hi()-1;n>=0;--n)RP(this,n,this.ai(n));return this.ji(e)},u.ij=function(){V7(this)},u.Ch=function(e,n){return R5t(this,e,n)};var iqe=A(hr,"DelegatingEcoreEList",674);T(1013,674,jpt,ZSt),u.Vh=function(e,n){Nee(this,e,a(n,24))},u.Wh=function(e){Gte(this,a(e,24))},u.ai=function(e){var n,i;return n=a(at(kc(this.a),e),84),i=n.c,ct(i,96)?a(i,24):(ye(),gh)},u.fi=function(e){var n,i;return n=a(cw(kc(this.a),e),84),i=n.c,ct(i,96)?a(i,24):(ye(),gh)},u.gi=function(e,n){return Cde(this,e,a(n,24))},u.rh=function(){return!1},u.mi=function(e,n,i,r,c){return null},u.Xh=function(){return new x5(this)},u.Yh=function(){Dr(kc(this.a))},u.Zh=function(e){return X6t(this,e)},u.$h=function(e){var n,i;for(i=e.tc();i.hc();)if(n=i.ic(),!X6t(this,n))return!1;return!0},u._h=function(e){var n,i,r;if(ct(e,15)&&(r=a(e,15),r._b()==kc(this.a).i)){for(n=r.tc(),i=new $n(this);n.hc();)if(zt(n.ic())!==zt(ci(i)))return!1;return!0}return!1},u.bi=function(){var e,n,i,r,c;for(i=1,n=new $n(kc(this.a));n.e!=n.i._b();)e=a(ci(n),84),r=(c=e.c,ct(c,96)?a(c,24):(ye(),gh)),i=31*i+(r?lm(r):0);return i},u.ci=function(e){var n,i,r,c;for(r=0,i=new $n(kc(this.a));i.e!=i.i._b();){if(n=a(ci(i),84),zt(e)===zt((c=n.c,ct(c,96)?a(c,24):(ye(),gh))))return r;++r}return-1},u.di=function(){return kc(this.a).i==0},u.ei=function(){return null},u.hi=function(){return kc(this.a).i},u.ii=function(){var e,n,i,r,c,l;for(l=kc(this.a).i,c=dt(un,te,1,l,5,1),i=0,n=new $n(kc(this.a));n.e!=n.i._b();)e=a(ci(n),84),c[i++]=(r=e.c,ct(r,96)?a(r,24):(ye(),gh));return c},u.ji=function(e){var n,i,r,c,l,f,p;for(p=kc(this.a).i,e.lengthp&&Vr(e,p,null),r=0,i=new $n(kc(this.a));i.e!=i.i._b();)n=a(ci(i),84),l=(f=n.c,ct(f,96)?a(f,24):(ye(),gh)),Vr(e,r++,l);return e},u.ki=function(){var e,n,i,r,c;for(c=new Sp,c.a+="[",e=kc(this.a),n=0,r=kc(this.a).i;n>16,c>=0?Jq(this,i):this.Cb.Cg(this,-1-c,null,i))),ku(this,e,6,i);case 9:return!this.a&&(this.a=new Wt(Qp,this,9,5)),Kc(this.a,e,i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),db)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),db)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 6:return ku(this,null,6,i);case 7:return!this.A&&(this.A=new Hu(wu,this,7)),$s(this.A,e,i);case 9:return!this.a&&(this.a=new Wt(Qp,this,9,5)),$s(this.a,e,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),db)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),db)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!Im(this);case 4:return!!Iat(this);case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!EM(this);case 7:return!!this.A&&this.A.i!=0;case 8:return(this.Bb&256)==0;case 9:return!!this.a&&this.a.i!=0}return $u(this,e-ei((ye(),db)),Ve((n=a(an(this,16),24),n||db),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:nN(this,hi(n));return;case 2:LW(this,hi(n));return;case 5:nZ(this,hi(n));return;case 7:!this.A&&(this.A=new Hu(wu,this,7)),Dr(this.A),!this.A&&(this.A=new Hu(wu,this,7)),Lr(this.A,a(n,13));return;case 8:zat(this,lt(de(n)));return;case 9:!this.a&&(this.a=new Wt(Qp,this,9,5)),Dr(this.a),!this.a&&(this.a=new Wt(Qp,this,9,5)),Lr(this.a,a(n,13));return}Yu(this,e-ei((ye(),db)),Ve((i=a(an(this,16),24),i||db),e),n)},u.Rg=function(){return ye(),db},u.Xg=function(){var e,n;if(this.a)for(e=0,n=this.a.i;e>16==5?a(this.Cb,608):null}return qu(this,e-ei((ye(),T0)),Ve((r=a(an(this,16),24),r||T0),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 5:return this.Cb&&(i=(c=this.Db>>16,c>=0?ORt(this,i):this.Cb.Cg(this,-1-c,null,i))),ku(this,e,5,i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),T0)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),T0)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 5:return ku(this,null,5,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),T0)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),T0)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.d!=0;case 3:return!!this.b;case 4:return this.c!=null;case 5:return!!(this.Db>>16==5&&a(this.Cb,608))}return $u(this,e-ei((ye(),T0)),Ve((n=a(an(this,16),24),n||T0),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:kh(this,hi(n));return;case 2:$ct(this,a(n,21).a);return;case 3:q0e(this,a(n,1634));return;case 4:iat(this,hi(n));return}Yu(this,e-ei((ye(),T0)),Ve((i=a(an(this,16),24),i||T0),e),n)},u.Rg=function(){return ye(),T0},u.Ib=function(){var e;return e=this.c,e??this.zb},u.b=null,u.c=null,u.d=0;var lqe=A(Re,"EEnumLiteralImpl",525),F3e=Sr(Re,"EFactoryImpl/InternalEDateTimeFormat");T(445,1,{1699:1},n2);var hqe=A(Re,"EFactoryImpl/1ClientInternalEDateTimeFormat",445);T(217,108,{95:1,91:1,87:1,84:1,51:1,103:1,42:1,92:1,217:1,107:1,108:1},b1),u.lg=function(e,n,i){var r;return i=ku(this,e,n,i),this.e&&ct(e,158)&&(r=I7(this,this.e),r!=this.c&&(i=rE(this,r,i))),i},u.ug=function(e,n,i){var r;switch(e){case 0:return this.f;case 1:return!this.d&&(this.d=new Ss(Do,this,1)),this.d;case 2:return n?H7(this):this.c;case 3:return this.b;case 4:return this.e;case 5:return n?Vq(this):this.a}return qu(this,e-ei((ye(),gy)),Ve((r=a(an(this,16),24),r||gy),e),n,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return O6t(this,null,i);case 1:return!this.d&&(this.d=new Ss(Do,this,1)),$s(this.d,e,i);case 3:return N6t(this,null,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),gy)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),gy)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.f;case 1:return!!this.d&&this.d.i!=0;case 2:return!!this.c;case 3:return!!this.b;case 4:return!!this.e;case 5:return!!this.a}return $u(this,e-ei((ye(),gy)),Ve((n=a(an(this,16),24),n||gy),e))},u.Mg=function(e,n){var i;switch(e){case 0:y1e(this,a(n,84));return;case 1:!this.d&&(this.d=new Ss(Do,this,1)),Dr(this.d),!this.d&&(this.d=new Ss(Do,this,1)),Lr(this.d,a(n,13));return;case 3:r8t(this,a(n,84));return;case 4:x8t(this,a(n,742));return;case 5:wC(this,a(n,133));return}Yu(this,e-ei((ye(),gy)),Ve((i=a(an(this,16),24),i||gy),e),n)},u.Rg=function(){return ye(),gy},u.Ib=function(){var e;return e=new ll(nh(this)),e.a+=" (expression: ",YX(this,e),e.a+=")",e.a};var Hvt,fqe=A(Re,"EGenericTypeImpl",217);T(1667,1657,IO),u.xj=function(e,n){return Xee(this,this._b(),e),n},u.Dh=function(e){return H1(this.Uh(),e)},u.oh=function(){return this.ph()},u.Uh=function(){return new E5(this)},u.ph=function(){return this.qh(0)},u.qh=function(e){return this.Uh().fd(e)},u.yj=function(e,n){return U2(this,e,!0),n};var dqe=A(hr,"AbstractSequentialInternalEList",1667);T(444,1667,IO,J5),u.Dh=function(e){return H1(this.Uh(),e)},u.oh=function(){return this.b==null?(Ap(),Ap(),wI):this.Vj()},u.Uh=function(){return new _Et(this.a,this.b)},u.ph=function(){return this.b==null?(Ap(),Ap(),wI):this.Vj()},u.qh=function(e){var n,i;if(this.b==null){if(e<0||e>1)throw K(new Uc(S4+e+", size=0"));return Ap(),Ap(),wI}for(i=this.Vj(),n=0;n0;)if(n=this.c[--this.d],(!this.e||n.Vi()!=HE||n.pi()!=0)&&(!this.Yj()||this.b.Gg(n))){if(l=this.b.wg(n,this.Xj()),this.f=(Jo(),a(n,61).bj()),this.f||n.lj()){if(this.Xj()?(r=a(l,15),this.k=r):(r=a(l,64),this.k=this.j=r),ct(this.k,49)?(this.o=this.k._b(),this.n=this.o):this.p=this.j?this.j.qh(this.k._b()):this.k.fd(this.k._b()),this.p?Q8t(this,this.p):d9t(this))return c=this.p?this.p.Ec():this.j?this.j.Dh(--this.n):this.k.cd(--this.n),this.f?(e=a(c,75),e.nj(),i=e.lc(),this.i=i):this.i=c,this.g=-3,!0}else if(l!=null)return this.k=null,this.p=null,this.i=l,this.g=-2,!0}return this.k=null,this.p=null,this.g=-1,!1}else return c=this.p?this.p.Ec():this.j?this.j.Dh(--this.n):this.k.cd(--this.n),this.f?(e=a(c,75),e.nj(),i=e.lc(),this.i=i):this.i=c,this.g=-3,!0}},u.ic=function(){return NN(this)},u.Dc=function(){return this.a},u.Ec=function(){var e;if(this.g<-1||this.Cc())return--this.a,this.g=0,e=this.i,this.Cc(),e;throw K(new J)},u.Fc=function(){return this.a-1},u.jc=function(){throw K(new Oi)},u.Xj=function(){return!1},u.Gc=function(e){throw K(new Oi)},u.Yj=function(){return!0},u.a=0,u.d=0,u.f=!1,u.g=0,u.n=0,u.o=0;var wI,mqe=A(hr,"EContentsEList/FeatureIteratorImpl",260);T(631,260,RO,Zrt),u.Xj=function(){return!0};var bqe=A(hr,"EContentsEList/ResolvingFeatureIteratorImpl",631);T(1020,631,RO,NSt),u.Yj=function(){return!1};var wqe=A(Re,"ENamedElementImpl/1/1",1020);T(1021,260,RO,DSt),u.Yj=function(){return!1};var vqe=A(Re,"ENamedElementImpl/1/2",1021);T(32,136,r6,Kb,iV,fs,bV,Qd,Jl,Vct,AAt,qct,kAt,gct,LAt,Yct,PAt,mct,IAt,Xct,RAt,fL,Not,Zct,DAt,bct,NAt),u.oi=function(){return kct(this)},u.vi=function(){var e;return e=kct(this),e?e.Oi():null},u.Mh=function(e){return this.b==-1&&this.a&&(this.b=this.c.qg(this.a.pi(),this.a.Vi())),this.c.hg(this.b,e)},u.Oh=function(){return this.c},u.wi=function(){var e;return e=kct(this),e?e.Zi():!1},u.b=-1;var _qe=A(Re,"ENotificationImpl",32);T(371,268,{95:1,91:1,87:1,139:1,174:1,51:1,53:1,103:1,431:1,42:1,92:1,142:1,371:1,268:1,107:1,108:1},RG),u.jg=function(e){return FRt(this,e)},u.ug=function(e,n,i){var r,c,l;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return me(),!!(this.Bb&256);case 3:return me(),!!(this.Bb&512);case 4:return Xt(this.s);case 5:return Xt(this.t);case 6:return me(),l=this.t,l>1||l==-1;case 7:return me(),c=this.s,c>=1;case 8:return n?wl(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?a(this.Cb,24):null;case 11:return!this.d&&(this.d=new Hu(wu,this,11)),this.d;case 12:return!this.c&&(this.c=new Wt(Fw,this,12,10)),this.c;case 13:return!this.a&&(this.a=new iL(this,this)),this.a;case 14:return Ya(this)}return qu(this,e-ei((ye(),C0)),Ve((r=a(an(this,16),24),r||C0),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 10:return this.Cb&&(i=(c=this.Db>>16,c>=0?FRt(this,i):this.Cb.Cg(this,-1-c,null,i))),ku(this,e,10,i);case 12:return!this.c&&(this.c=new Wt(Fw,this,12,10)),Kc(this.c,e,i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),C0)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),C0)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 9:return k$(this,i);case 10:return ku(this,null,10,i);case 11:return!this.d&&(this.d=new Hu(wu,this,11)),$s(this.d,e,i);case 12:return!this.c&&(this.c=new Wt(Fw,this,12,10)),$s(this.c,e,i);case 14:return $s(Ya(this),e,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),C0)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),C0)),e,i)},u.Fg=function(e){var n,i,r;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return r=this.t,r>1||r==-1;case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&mm(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&mm(this.q).i==0);case 10:return!!(this.Db>>16==10&&a(this.Cb,24));case 11:return!!this.d&&this.d.i!=0;case 12:return!!this.c&&this.c.i!=0;case 13:return!!this.a&&Ya(this.a.a).i!=0&&!(this.b&&$q(this.b));case 14:return!!this.b&&$q(this.b)}return $u(this,e-ei((ye(),C0)),Ve((n=a(an(this,16),24),n||C0),e))},u.Mg=function(e,n){var i,r;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:kh(this,hi(n));return;case 2:h_(this,lt(de(n)));return;case 3:f_(this,lt(de(n)));return;case 4:c_(this,a(n,21).a);return;case 5:RM(this,a(n,21).a);return;case 8:zM(this,a(n,133));return;case 9:r=$1(this,a(n,84),null),r&&r.Th();return;case 11:!this.d&&(this.d=new Hu(wu,this,11)),Dr(this.d),!this.d&&(this.d=new Hu(wu,this,11)),Lr(this.d,a(n,13));return;case 12:!this.c&&(this.c=new Wt(Fw,this,12,10)),Dr(this.c),!this.c&&(this.c=new Wt(Fw,this,12,10)),Lr(this.c,a(n,13));return;case 13:!this.a&&(this.a=new iL(this,this)),V7(this.a),!this.a&&(this.a=new iL(this,this)),Lr(this.a,a(n,13));return;case 14:Dr(Ya(this)),Lr(Ya(this),a(n,13));return}Yu(this,e-ei((ye(),C0)),Ve((i=a(an(this,16),24),i||C0),e),n)},u.Rg=function(){return ye(),C0},u.Xg=function(){var e,n;if(this.c)for(e=0,n=this.c.i;ep&&Vr(e,p,null),r=0,i=new $n(Ya(this.a));i.e!=i.i._b();)n=a(ci(i),84),l=(f=n.c,f||(ye(),Hf)),Vr(e,r++,l);return e},u.ki=function(){var e,n,i,r,c;for(c=new Sp,c.a+="[",e=Ya(this.a),n=0,r=Ya(this.a).i;n1);case 5:return oC(this,5,n,i,r,this.i-a(i,15)._b()>0);default:return new Qd(this.e,e,this.c,n,i,r,!0)}},u.xi=function(){return!0},u.ui=function(){return $q(this)},u.ij=function(){Dr(this)};var Eqe=A(Re,"EOperationImpl/2",1388);T(456,1,{1631:1,456:1},oEt);var Sqe=A(Re,"EPackageImpl/1",456);T(18,88,Zo,Wt),u.Lj=function(){return this.d},u.Mj=function(){return this.b},u.Pj=function(){return!0},u.b=0;var Tqe=A(hr,"EObjectContainmentWithInverseEList",18);T(364,18,Zo,dM),u.Qj=function(){return!0},u.zh=function(e,n){return V2(this,e,a(n,51))};var Cqe=A(hr,"EObjectContainmentWithInverseEList/Resolving",364);T(303,364,Zo,Xv),u.th=function(){this.a.tb=null};var Aqe=A(Re,"EPackageImpl/2",303);T(1155,1,{},Az);var kqe=A(Re,"EPackageImpl/3",1155);T(650,44,ix,dit),u.Qb=function(e){return Es(e)?H$(this,e):!!Ea(this.d,e)};var Lqe=A(Re,"EPackageRegistryImpl",650);T(468,268,{95:1,91:1,87:1,139:1,174:1,51:1,1703:1,103:1,431:1,42:1,92:1,142:1,468:1,268:1,107:1,108:1},DG),u.jg=function(e){return URt(this,e)},u.ug=function(e,n,i){var r,c,l;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return me(),!!(this.Bb&256);case 3:return me(),!!(this.Bb&512);case 4:return Xt(this.s);case 5:return Xt(this.t);case 6:return me(),l=this.t,l>1||l==-1;case 7:return me(),c=this.s,c>=1;case 8:return n?wl(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?a(this.Cb,53):null}return qu(this,e-ei((ye(),zw)),Ve((r=a(an(this,16),24),r||zw),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 10:return this.Cb&&(i=(c=this.Db>>16,c>=0?URt(this,i):this.Cb.Cg(this,-1-c,null,i))),ku(this,e,10,i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),zw)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),zw)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 9:return k$(this,i);case 10:return ku(this,null,10,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),zw)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),zw)),e,i)},u.Fg=function(e){var n,i,r;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return r=this.t,r>1||r==-1;case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&mm(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&mm(this.q).i==0);case 10:return!!(this.Db>>16==10&&a(this.Cb,53))}return $u(this,e-ei((ye(),zw)),Ve((n=a(an(this,16),24),n||zw),e))},u.Rg=function(){return ye(),zw};var Pqe=A(Re,"EParameterImpl",468);T(62,418,{95:1,91:1,87:1,139:1,174:1,51:1,17:1,158:1,61:1,103:1,431:1,42:1,92:1,142:1,62:1,418:1,268:1,107:1,108:1,615:1},tst),u.ug=function(e,n,i){var r,c,l,f;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return me(),!!(this.Bb&256);case 3:return me(),!!(this.Bb&512);case 4:return Xt(this.s);case 5:return Xt(this.t);case 6:return me(),f=this.t,f>1||f==-1;case 7:return me(),c=this.s,c>=1;case 8:return n?wl(this):this.r;case 9:return this.q;case 10:return me(),!!(this.Bb&oh);case 11:return me(),!!(this.Bb&mw);case 12:return me(),!!(this.Bb&zm);case 13:return this.j;case 14:return tE(this);case 15:return me(),!!(this.Bb&La);case 16:return me(),!!(this.Bb&Lf);case 17:return Zb(this);case 18:return me(),!!(this.Bb&ca);case 19:return me(),l=jo(this),!!(l&&l.Bb&ca);case 20:return me(),!!(this.Bb&ao);case 21:return n?jo(this):this.b;case 22:return n?yat(this):Bkt(this);case 23:return!this.a&&(this.a=new lM(py,this,23)),this.a}return qu(this,e-ei((ye(),GE)),Ve((r=a(an(this,16),24),r||GE),e),n,i)},u.Fg=function(e){var n,i,r,c;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return c=this.t,c>1||c==-1;case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&mm(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&mm(this.q).i==0);case 10:return(this.Bb&oh)==0;case 11:return(this.Bb&mw)!=0;case 12:return(this.Bb&zm)!=0;case 13:return this.j!=null;case 14:return tE(this)!=null;case 15:return(this.Bb&La)!=0;case 16:return(this.Bb&Lf)!=0;case 17:return!!Zb(this);case 18:return(this.Bb&ca)!=0;case 19:return r=jo(this),!!r&&(r.Bb&ca)!=0;case 20:return(this.Bb&ao)==0;case 21:return!!this.b;case 22:return!!Bkt(this);case 23:return!!this.a&&this.a.i!=0}return $u(this,e-ei((ye(),GE)),Ve((n=a(an(this,16),24),n||GE),e))},u.Mg=function(e,n){var i,r;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:K$(this,hi(n));return;case 2:h_(this,lt(de(n)));return;case 3:f_(this,lt(de(n)));return;case 4:c_(this,a(n,21).a);return;case 5:RM(this,a(n,21).a);return;case 8:zM(this,a(n,133));return;case 9:r=$1(this,a(n,84),null),r&&r.Th();return;case 10:VN(this,lt(de(n)));return;case 11:$N(this,lt(de(n)));return;case 12:XN(this,lt(de(n)));return;case 13:wrt(this,hi(n));return;case 15:qN(this,lt(de(n)));return;case 16:ZN(this,lt(de(n)));return;case 18:voe(this,lt(de(n)));return;case 20:nIt(this,lt(de(n)));return;case 21:iPt(this,a(n,17));return;case 23:!this.a&&(this.a=new lM(py,this,23)),Dr(this.a),!this.a&&(this.a=new lM(py,this,23)),Lr(this.a,a(n,13));return}Yu(this,e-ei((ye(),GE)),Ve((i=a(an(this,16),24),i||GE),e),n)},u.Rg=function(){return ye(),GE},u.Xg=function(){yat(this),_M(qo((Qa(),eo),this)),wl(this),this.Bb|=1},u.$i=function(){return jo(this)},u.Cj=function(){var e;return e=jo(this),!!e&&(e.Bb&ca)!=0},u.Dj=function(){return(this.Bb&ca)!=0},u.Ej=function(){return(this.Bb&ao)!=0},u.zj=function(e,n){return this.c=null,Bat(this,e,n)},u.Ib=function(){var e;return this.Db&64?z7(this):(e=new ul(z7(this)),e.a+=" (containment: ",Cp(e,(this.Bb&ca)!=0),e.a+=", resolveProxies: ",Cp(e,(this.Bb&ao)!=0),e.a+=")",e.a)};var Iqe=A(Re,"EReferenceImpl",62);T(505,108,{95:1,38:1,91:1,87:1,134:1,51:1,103:1,42:1,92:1,505:1,107:1,108:1},RR),u.Fb=function(e){return this===e},u.kc=function(){return this.b},u.lc=function(){return this.c},u.Hb=function(){return lm(this)},u.kh=function(e){fre(this,hi(e))},u.mc=function(e){return ere(this,hi(e))},u.ug=function(e,n,i){var r;switch(e){case 0:return this.b;case 1:return this.c}return qu(this,e-ei((ye(),Ho)),Ve((r=a(an(this,16),24),r||Ho),e),n,i)},u.Fg=function(e){var n;switch(e){case 0:return this.b!=null;case 1:return this.c!=null}return $u(this,e-ei((ye(),Ho)),Ve((n=a(an(this,16),24),n||Ho),e))},u.Mg=function(e,n){var i;switch(e){case 0:dre(this,hi(n));return;case 1:YLt(this,hi(n));return}Yu(this,e-ei((ye(),Ho)),Ve((i=a(an(this,16),24),i||Ho),e),n)},u.Rg=function(){return ye(),Ho},u.ih=function(){var e;return this.a==-1&&(e=this.b,this.a=e==null?0:j1(e)),this.a},u.jh=function(e){this.a=e},u.Ib=function(){var e;return this.Db&64?nh(this):(e=new ul(nh(this)),e.a+=" (key: ",mo(e,this.b),e.a+=", value: ",mo(e,this.c),e.a+=")",e.a)},u.a=-1,u.b=null,u.c=null;var Dc=A(Re,"EStringToStringMapEntryImpl",505),$qt=Sr(hr,"FeatureMap/Entry/Internal");T(514,1,DO),u.$j=function(e){return this._j(a(e,42))},u._j=function(e){return this.$j(e)},u.Fb=function(e){var n,i;return this===e?!0:ct(e,75)?(n=a(e,75),n.nj()==this.c?(i=this.lc(),i==null?n.lc()==null:Fi(i,n.lc())):!1):!1},u.nj=function(){return this.c},u.Hb=function(){var e;return e=this.lc(),Yr(this.c)^(e==null?0:Yr(e))},u.Ib=function(){var e,n;return e=this.c,n=Xu(e.Wi()).fh(),e.be(),(n!=null&&n.length!=0?n+":"+e.be():e.be())+"="+this.lc()};var Rqe=A(Re,"EStructuralFeatureImpl/BasicFeatureMapEntry",514);T(709,514,DO,ast),u._j=function(e){return new ast(this.c,e)},u.lc=function(){return this.a},u.ak=function(e,n,i){return Kue(this,e,this.a,n,i)},u.bk=function(e,n,i){return Jue(this,e,this.a,n,i)};var Dqe=A(Re,"EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry",709);T(1363,1,{},cEt),u.cj=function(e,n,i,r,c){var l;return l=a(TL(e,this.b),237),l.yk(this.a).hj(r)},u.dj=function(e,n,i,r,c){var l;return l=a(TL(e,this.b),237),l.pk(this.a,r,c)},u.ej=function(e,n,i,r,c){var l;return l=a(TL(e,this.b),237),l.qk(this.a,r,c)},u.fj=function(e,n,i){var r;return r=a(TL(e,this.b),237),r.yk(this.a).ui()},u.gj=function(e,n,i,r){var c;c=a(TL(e,this.b),237),c.yk(this.a).Gc(r)};var Nqe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator",1363);T(82,1,{},Ip,jg,Op,Wg),u.cj=function(e,n,i,r,c){var l;if(l=n.Tg(i),l==null&&n.Ug(i,l=Hht(this,e)),!c)switch(this.e){case 50:case 41:return a(l,533).Hi();case 40:return a(l,237).vk()}return l},u.dj=function(e,n,i,r,c){var l,f;return f=n.Tg(i),f==null&&n.Ug(i,f=Hht(this,e)),l=a(f,64).xj(r,c),l},u.ej=function(e,n,i,r,c){var l;return l=n.Tg(i),l!=null&&(c=a(l,64).yj(r,c)),c},u.fj=function(e,n,i){var r;return r=n.Tg(i),r!=null&&a(r,81).ui()},u.gj=function(e,n,i,r){var c;c=a(n.Tg(i),81),!c&&n.Ug(i,c=Hht(this,e)),c.Gc(r)},u.b=0,u.e=0;var Oqe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateMany",82);T(461,1,{}),u.dj=function(e,n,i,r,c){throw K(new Oi)},u.ej=function(e,n,i,r,c){throw K(new Oi)};var lg,Bqe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingle",461);T(702,461,{},Wot),u.cj=function(e,n,i,r,c){return DX(e,e.yg(),e.og())==this.b?this.Ej()&&r?yX(e):e.yg():null},u.dj=function(e,n,i,r,c){var l,f;return e.yg()&&(c=(l=e.og(),l>=0?e.jg(c):e.yg().Cg(e,-1-l,null,c))),f=xr(e.mg(),this.e),e.lg(r,f,c)},u.ej=function(e,n,i,r,c){var l;return l=xr(e.mg(),this.e),e.lg(null,l,c)},u.fj=function(e,n,i){var r;return r=xr(e.mg(),this.e),!!e.yg()&&e.og()==r},u.gj=function(e,n,i,r){var c,l,f,p,b;if(r!=null&&!UX(this.a,r))throw K(new gT(NO+(ct(r,51)?Vut(a(r,51).mg()):Uct(fu(r)))+OO+this.a+"'"));if(c=e.yg(),f=xr(e.mg(),this.e),zt(r)!==zt(c)||e.og()!=f&&r!=null){if(qM(e,a(r,51)))throw K(new yn(M4+e.Ib()));b=null,c&&(b=(l=e.og(),l>=0?e.jg(null):e.yg().Cg(e,-1-l,null,null))),p=a(r,42),p&&(b=p.Ag(e,xr(p.mg(),this.b),null,b)),b=e.lg(p,f,b),b&&b.Th()}else e.eg()&&e.fg()&&Bi(e,new fs(e,1,f,r,r))},u.Ej=function(){return!1};var Fqe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainer",702);T(1364,702,{},zTt),u.Ej=function(){return!0};var Uqe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving",1364);T(512,461,{}),u.cj=function(e,n,i,r,c){var l;return l=n.Tg(i),l==null?this.b:zt(l)===zt(lg)?null:l},u.fj=function(e,n,i){var r;return r=n.Tg(i),r!=null&&(zt(r)===zt(lg)||!Fi(r,this.b))},u.gj=function(e,n,i,r){var c,l;e.eg()&&e.fg()?(c=(l=n.Tg(i),l==null?this.b:zt(l)===zt(lg)?null:l),r==null?this.c!=null?(n.Ug(i,null),r=this.b):this.b!=null?n.Ug(i,lg):n.Ug(i,null):(this.ck(r),n.Ug(i,r)),Bi(e,this.d.dk(e,1,this.e,c,r))):r==null?this.c!=null?n.Ug(i,null):this.b!=null?n.Ug(i,lg):n.Ug(i,null):(this.ck(r),n.Ug(i,r))},u.ck=function(e){throw K(new d9)};var zqe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData",512);T($_,1,{},Fk),u.dk=function(e,n,i,r,c){return new fL(e,n,i,r,c)},u.ek=function(e,n,i,r,c,l){return new Not(e,n,i,r,c,l)};var Gvt,Wvt,$vt,Vvt,qvt,Xvt,Zvt,att,Yvt,jqe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator",$_);T(1379,$_,{},kz),u.dk=function(e,n,i,r,c){return new bct(e,n,i,lt(de(r)),lt(de(c)))},u.ek=function(e,n,i,r,c,l){return new NAt(e,n,i,lt(de(r)),lt(de(c)),l)};var Hqe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1",1379);T(1380,$_,{},Uk),u.dk=function(e,n,i,r,c){return new Vct(e,n,i,a(r,192).a,a(c,192).a)},u.ek=function(e,n,i,r,c,l){return new AAt(e,n,i,a(r,192).a,a(c,192).a,l)};var Gqe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2",1380);T(1381,$_,{},DR),u.dk=function(e,n,i,r,c){return new qct(e,n,i,a(r,159).a,a(c,159).a)},u.ek=function(e,n,i,r,c,l){return new kAt(e,n,i,a(r,159).a,a(c,159).a,l)};var Wqe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3",1381);T(1382,$_,{},NR),u.dk=function(e,n,i,r,c){return new gct(e,n,i,lt(Yt(r)),lt(Yt(c)))},u.ek=function(e,n,i,r,c,l){return new LAt(e,n,i,lt(Yt(r)),lt(Yt(c)),l)};var $qe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4",1382);T(1383,$_,{},OR),u.dk=function(e,n,i,r,c){return new Yct(e,n,i,a(r,126).a,a(c,126).a)},u.ek=function(e,n,i,r,c,l){return new PAt(e,n,i,a(r,126).a,a(c,126).a,l)};var Vqe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5",1383);T(1384,$_,{},$S),u.dk=function(e,n,i,r,c){return new mct(e,n,i,a(r,21).a,a(c,21).a)},u.ek=function(e,n,i,r,c,l){return new IAt(e,n,i,a(r,21).a,a(c,21).a,l)};var qqe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6",1384);T(1385,$_,{},Lz),u.dk=function(e,n,i,r,c){return new Xct(e,n,i,a(r,149).a,a(c,149).a)},u.ek=function(e,n,i,r,c,l){return new RAt(e,n,i,a(r,149).a,a(c,149).a,l)};var Xqe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7",1385);T(1386,$_,{},BR),u.dk=function(e,n,i,r,c){return new Zct(e,n,i,a(r,168).a,a(c,168).a)},u.ek=function(e,n,i,r,c,l){return new DAt(e,n,i,a(r,168).a,a(c,168).a,l)};var Zqe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8",1386);T(1366,512,{},x4t),u.ck=function(e){if(!this.a.Li(e))throw K(new gT(NO+fu(e)+OO+this.a+"'"))};var Yqe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic",1366);T(1367,512,{},TCt),u.ck=function(e){};var Kqe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic",1367);T(703,512,{}),u.fj=function(e,n,i){var r;return r=n.Tg(i),r!=null},u.gj=function(e,n,i,r){var c,l;e.eg()&&e.fg()?(c=!0,l=n.Tg(i),l==null?(c=!1,l=this.b):zt(l)===zt(lg)&&(l=null),r==null?this.c!=null?(n.Ug(i,null),r=this.b):n.Ug(i,lg):(this.ck(r),n.Ug(i,r)),Bi(e,this.d.ek(e,1,this.e,l,r,!c))):r==null?this.c!=null?n.Ug(i,null):n.Ug(i,lg):(this.ck(r),n.Ug(i,r))};var Jqe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable",703);T(1368,703,{},M4t),u.ck=function(e){if(!this.a.Li(e))throw K(new gT(NO+fu(e)+OO+this.a+"'"))};var Qqe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic",1368);T(1369,703,{},CCt),u.ck=function(e){};var tXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic",1369);T(370,461,{},ND),u.cj=function(e,n,i,r,c){var l,f,p,b,v;if(v=n.Tg(i),this.Zi()&&zt(v)===zt(lg))return null;if(this.Ej()&&r&&v!=null){if(p=a(v,42),p.Eg()&&(b=B1(e,p),p!=b)){if(!UX(this.a,b))throw K(new gT(NO+fu(b)+OO+this.a+"'"));n.Ug(i,v=b),this.Dj()&&(l=a(b,42),f=p.Cg(e,this.b?xr(p.mg(),this.b):-1-xr(e.mg(),this.e),null,null),!l.yg()&&(f=l.Ag(e,this.b?xr(l.mg(),this.b):-1-xr(e.mg(),this.e),null,f)),f&&f.Th()),e.eg()&&e.fg()&&Bi(e,new fL(e,9,this.e,p,b))}return v}else return v},u.dj=function(e,n,i,r,c){var l,f;return f=n.Tg(i),zt(f)===zt(lg)&&(f=null),n.Ug(i,r),this.qi()?zt(f)!==zt(r)&&f!=null&&(l=a(f,42),c=l.Cg(e,xr(l.mg(),this.b),null,c)):this.Dj()&&f!=null&&(c=a(f,42).Cg(e,-1-xr(e.mg(),this.e),null,c)),e.eg()&&e.fg()&&(!c&&(c=new w1(4)),c.Sh(new fL(e,1,this.e,f,r))),c},u.ej=function(e,n,i,r,c){var l;return l=n.Tg(i),zt(l)===zt(lg)&&(l=null),n.Vg(i),e.eg()&&e.fg()&&(!c&&(c=new w1(4)),this.Zi()?c.Sh(new fL(e,2,this.e,l,null)):c.Sh(new fL(e,1,this.e,l,null))),c},u.fj=function(e,n,i){var r;return r=n.Tg(i),r!=null},u.gj=function(e,n,i,r){var c,l,f,p,b;if(r!=null&&!UX(this.a,r))throw K(new gT(NO+(ct(r,51)?Vut(a(r,51).mg()):Uct(fu(r)))+OO+this.a+"'"));b=n.Tg(i),p=b!=null,this.Zi()&&zt(b)===zt(lg)&&(b=null),f=null,this.qi()?zt(b)!==zt(r)&&(b!=null&&(c=a(b,42),f=c.Cg(e,xr(c.mg(),this.b),null,null)),r!=null&&(c=a(r,42),f=c.Ag(e,xr(c.mg(),this.b),null,f))):this.Dj()&&zt(b)!==zt(r)&&(b!=null&&(f=a(b,42).Cg(e,-1-xr(e.mg(),this.e),null,null)),r!=null&&(f=a(r,42).Ag(e,-1-xr(e.mg(),this.e),null,f))),r==null&&this.Zi()?n.Ug(i,lg):n.Ug(i,r),e.eg()&&e.fg()?(l=new Not(e,1,this.e,b,r,this.Zi()&&!p),f?(f.Sh(l),f.Th()):Bi(e,l)):f&&f.Th()},u.qi=function(){return!1},u.Dj=function(){return!1},u.Ej=function(){return!1},u.Zi=function(){return!1};var eXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObject",370);T(513,370,{},qW),u.Dj=function(){return!0};var nXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment",513);T(1372,513,{},OSt),u.Ej=function(){return!0};var iXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving",1372);T(705,513,{},Krt),u.Zi=function(){return!0};var rXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable",705);T(1374,705,{},BSt),u.Ej=function(){return!0};var sXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving",1374);T(585,513,{},u$),u.qi=function(){return!0};var oXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse",585);T(1373,585,{},jTt),u.Ej=function(){return!0};var cXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving",1373);T(706,585,{},Ist),u.Zi=function(){return!0};var aXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable",706);T(1375,706,{},HTt),u.Ej=function(){return!0};var uXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving",1375);T(586,370,{},Yrt),u.Ej=function(){return!0};var lXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving",586);T(1376,586,{},FSt),u.Zi=function(){return!0};var hXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable",1376);T(707,586,{},Pst),u.qi=function(){return!0};var fXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse",707);T(1377,707,{},GTt),u.Zi=function(){return!0};var dXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable",1377);T(1370,370,{},USt),u.Zi=function(){return!0};var pXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable",1370);T(704,370,{},Rst),u.qi=function(){return!0};var gXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse",704);T(1371,704,{},WTt),u.Zi=function(){return!0};var mXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable",1371);T(708,514,DO,Mot),u._j=function(e){return new Mot(this.a,this.c,e)},u.lc=function(){return this.b},u.ak=function(e,n,i){return dae(this,e,this.b,i)},u.bk=function(e,n,i){return pae(this,e,this.b,i)};var bXe=A(Re,"EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry",708);T(1378,514,DO,kkt),u.$j=function(e){return new JW((fr(),MI),this.b.Zg(this.a,e))},u.lc=function(){return null},u.ak=function(e,n,i){return i},u.bk=function(e,n,i){return i};var wXe=A(Re,"EStructuralFeatureImpl/SimpleContentFeatureMapEntry",1378);T(587,514,DO,JW),u.$j=function(e){return new JW(this.c,e)},u.lc=function(){return this.a},u.ak=function(e,n,i){return i},u.bk=function(e,n,i){return i};var vXe=A(Re,"EStructuralFeatureImpl/SimpleFeatureMapEntry",587);T(361,451,Nf,kb),u.Fh=function(e){return dt(Dl,te,24,e,0,1)},u.Bh=function(){return!1};var _Xe=A(Re,"ESuperAdapter/1",361);T(411,399,{95:1,91:1,87:1,139:1,174:1,51:1,103:1,742:1,42:1,92:1,142:1,411:1,107:1,108:1},zk),u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return!this.a&&(this.a=new hL(this,Do,this)),this.a}return qu(this,e-ei((ye(),my)),Ve((r=a(an(this,16),24),r||my),e),n,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 2:return!this.a&&(this.a=new hL(this,Do,this)),$s(this.a,e,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),my)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),my)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return!!this.a&&this.a.i!=0}return $u(this,e-ei((ye(),my)),Ve((n=a(an(this,16),24),n||my),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:kh(this,hi(n));return;case 2:!this.a&&(this.a=new hL(this,Do,this)),Dr(this.a),!this.a&&(this.a=new hL(this,Do,this)),Lr(this.a,a(n,13));return}Yu(this,e-ei((ye(),my)),Ve((i=a(an(this,16),24),i||my),e),n)},u.Rg=function(){return ye(),my};var yXe=A(Re,"ETypeParameterImpl",411);T(457,88,Zo,hL),u.ri=function(e,n){return n1e(this,a(e,84),n)},u.si=function(e,n){return i1e(this,a(e,84),n)};var xXe=A(Re,"ETypeParameterImpl/1",457);T(579,44,ix,OG),u.Xb=function(){return new lT(this)};var MXe=A(Re,"ETypeParameterImpl/2",579);T(508,bd,vl,lT),u.nc=function(e){return qSt(this,a(e,84))},u.oc=function(e){var n,i,r;for(r=!1,i=e.tc();i.hc();)n=a(i.ic(),84),wr(this.a,n,"")==null&&(r=!0);return r},u.Pb=function(){uu(this.a)},u.pc=function(e){return dm(this.a,e)},u.tc=function(){var e;return e=new qg(new xp(this.a).a),new hT(e)},u.vc=function(e){return Fkt(this,e)},u._b=function(){return Q3(this.a)};var EXe=A(Re,"ETypeParameterImpl/2/1",508);T(509,1,Cs,hT),u.gc=function(e){ks(this,e)},u.ic=function(){return a(Sm(this.a).kc(),84)},u.hc=function(){return this.a.b},u.jc=function(){M5t(this.a)};var SXe=A(Re,"ETypeParameterImpl/2/1/1",509);T(1169,44,ix,yxt),u.Qb=function(e){return Es(e)?H$(this,e):!!Ea(this.d,e)},u.Vb=function(e){var n,i;return n=Es(e)?Zc(this,e):Ua(Ea(this.d,e)),ct(n,743)?(i=a(n,743),n=i.mj(),wr(this,a(e,207),n),n):n??(e==null?(XG(),qqt):null)};var TXe=A(Re,"EValidatorRegistryImpl",1169);T(1362,638,{95:1,91:1,87:1,430:1,139:1,51:1,103:1,1635:1,42:1,92:1,142:1,107:1,108:1},FR),u.Zg=function(e,n){switch(e.Ni()){case 21:case 22:case 23:case 24:case 26:case 31:case 32:case 37:case 38:case 39:case 40:case 43:case 44:case 48:case 49:case 20:return n==null?null:Yc(n);case 25:return _ue(n);case 27:return Oae(n);case 28:return Bae(n);case 29:return n==null?null:YEt(SA[0],a(n,181));case 41:return n==null?"":Og(a(n,274));case 42:return Yc(n);case 50:return hi(n);default:throw K(new yn(bE+e.be()+Gm))}},u.$g=function(e){var n,i,r,c,l,f,p,b,v,M,k,I,O,$,G,et;switch(e.G==-1&&(e.G=(I=Xu(e),I?Hp(I.bh(),e):-1)),e.G){case 0:return i=new NG,i;case 1:return n=new LR,n;case 2:return r=new c5,r;case 4:return c=new x,c;case 5:return l=new vxt,l;case 6:return f=new S5,f;case 7:return p=new x8,p;case 10:return v=new zl,v;case 11:return M=new RG,M;case 12:return k=new L4t,k;case 13:return O=new DG,O;case 14:return $=new tst,$;case 17:return G=new RR,G;case 18:return b=new b1,b;case 19:return et=new zk,et;default:throw K(new yn(WY+e.zb+Gm))}},u._g=function(e,n){switch(e.Ni()){case 20:return n==null?null:new wit(n);case 21:return n==null?null:new y1(n);case 23:case 22:return n==null?null:hfe(n);case 26:case 24:return n==null?null:AL(Au(n,-128,127)<<24>>24);case 25:return G0e(n);case 27:return gde(n);case 28:return mde(n);case 29:return U1e(n);case 32:case 31:return n==null?null:rw(n);case 38:case 37:return n==null?null:new pT(n);case 40:case 39:return n==null?null:Xt(Au(n,Vs,qi));case 41:return null;case 42:return n==null,null;case 44:case 43:return n==null?null:Qg(X7(n));case 49:case 48:return n==null?null:UM(Au(n,BO,32767)<<16>>16);case 50:return n;default:throw K(new yn(bE+e.be()+Gm))}};var CXe=A(Re,"EcoreFactoryImpl",1362);T(504,248,{95:1,91:1,87:1,139:1,174:1,51:1,207:1,103:1,1633:1,42:1,92:1,142:1,248:1,504:1,107:1,108:1,613:1},a4t),u.gb=!1,u.hb=!1;var Kvt,Vqt=!1,AXe=A(Re,"EcorePackageImpl",504);T(1111,1,{743:1},Pz),u.mj=function(){return iSt(),Xqt};var kXe=A(Re,"EcorePackageImpl/1",1111);T(1120,1,wi,jk),u.Li=function(e){return ct(e,139)},u.Mi=function(e){return dt(pI,te,139,e,0,1)};var LXe=A(Re,"EcorePackageImpl/10",1120);T(1121,1,wi,UR),u.Li=function(e){return ct(e,174)},u.Mi=function(e){return dt(QQ,te,174,e,0,1)};var PXe=A(Re,"EcorePackageImpl/11",1121);T(1122,1,wi,Hk),u.Li=function(e){return ct(e,51)},u.Mi=function(e){return dt(Nw,te,51,e,0,1)};var IXe=A(Re,"EcorePackageImpl/12",1122);T(1123,1,wi,Iz),u.Li=function(e){return ct(e,371)},u.Mi=function(e){return dt(ph,zpt,53,e,0,1)};var RXe=A(Re,"EcorePackageImpl/13",1123);T(1124,1,wi,Gk),u.Li=function(e){return ct(e,207)},u.Mi=function(e){return dt(of,te,207,e,0,1)};var DXe=A(Re,"EcorePackageImpl/14",1124);T(1125,1,wi,oo),u.Li=function(e){return ct(e,468)},u.Mi=function(e){return dt(Fw,te,1703,e,0,1)};var NXe=A(Re,"EcorePackageImpl/15",1125);T(1126,1,wi,Rz),u.Li=function(e){return ct(e,62)},u.Mi=function(e){return dt(Uw,W_,17,e,0,1)};var OXe=A(Re,"EcorePackageImpl/16",1126);T(1127,1,wi,Dz),u.Li=function(e){return ct(e,158)},u.Mi=function(e){return dt(Ra,W_,158,e,0,1)};var BXe=A(Re,"EcorePackageImpl/17",1127);T(1128,1,wi,O3),u.Li=function(e){return ct(e,431)},u.Mi=function(e){return dt(Bw,te,431,e,0,1)};var FXe=A(Re,"EcorePackageImpl/18",1128);T(1129,1,wi,zR),u.Li=function(e){return ct(e,505)},u.Mi=function(e){return dt(Dc,uUt,505,e,0,1)};var UXe=A(Re,"EcorePackageImpl/19",1129);T(1112,1,wi,Nz),u.Li=function(e){return ct(e,335)},u.Mi=function(e){return dt(py,W_,29,e,0,1)};var zXe=A(Re,"EcorePackageImpl/2",1112);T(1130,1,wi,Oz),u.Li=function(e){return ct(e,217)},u.Mi=function(e){return dt(Do,TUt,84,e,0,1)};var jXe=A(Re,"EcorePackageImpl/20",1130);T(1131,1,wi,yp),u.Li=function(e){return ct(e,411)},u.Mi=function(e){return dt(wu,te,742,e,0,1)};var HXe=A(Re,"EcorePackageImpl/21",1131);T(1132,1,wi,Bz),u.Li=function(e){return Hb(e)},u.Mi=function(e){return dt(ho,wt,434,e,8,1)};var GXe=A(Re,"EcorePackageImpl/22",1132);T(1133,1,wi,VS),u.Li=function(e){return ct(e,173)},u.Mi=function(e){return dt(Da,wt,173,e,0,2)};var WXe=A(Re,"EcorePackageImpl/23",1133);T(1134,1,wi,Wk),u.Li=function(e){return ct(e,192)},u.Mi=function(e){return dt(fx,wt,192,e,0,1)};var $Xe=A(Re,"EcorePackageImpl/24",1134);T(1135,1,wi,jR),u.Li=function(e){return ct(e,159)},u.Mi=function(e){return dt(O4,wt,159,e,0,1)};var VXe=A(Re,"EcorePackageImpl/25",1135);T(1136,1,wi,HR),u.Li=function(e){return ct(e,181)},u.Mi=function(e){return dt(YO,wt,181,e,0,1)};var qXe=A(Re,"EcorePackageImpl/26",1136);T(1137,1,wi,Fd),u.Li=function(e){return!1},u.Mi=function(e){return dt(g_t,te,1787,e,0,1)};var XXe=A(Re,"EcorePackageImpl/27",1137);T(1138,1,wi,Lb),u.Li=function(e){return Gb(e)},u.Mi=function(e){return dt(To,wt,315,e,7,1)};var ZXe=A(Re,"EcorePackageImpl/28",1138);T(1139,1,wi,$k),u.Li=function(e){return ct(e,52)},u.Mi=function(e){return dt(Lvt,fw,52,e,0,1)};var YXe=A(Re,"EcorePackageImpl/29",1139);T(1113,1,wi,GR),u.Li=function(e){return ct(e,469)},u.Mi=function(e){return dt(Ui,{3:1,4:1,5:1,1627:1},609,e,0,1)};var KXe=A(Re,"EcorePackageImpl/3",1113);T(1140,1,wi,qS),u.Li=function(e){return ct(e,525)},u.Mi=function(e){return dt(Rvt,te,1634,e,0,1)};var JXe=A(Re,"EcorePackageImpl/30",1140);T(1141,1,wi,WR),u.Li=function(e){return ct(e,184)},u.Mi=function(e){return dt(n_t,fw,184,e,0,1)};var QXe=A(Re,"EcorePackageImpl/31",1141);T(1142,1,wi,Vk),u.Li=function(e){return ct(e,75)},u.Mi=function(e){return dt(qF,NUt,75,e,0,1)};var tZe=A(Re,"EcorePackageImpl/32",1142);T(1143,1,wi,$R),u.Li=function(e){return ct(e,126)},u.Mi=function(e){return dt(EE,wt,126,e,0,1)};var eZe=A(Re,"EcorePackageImpl/33",1143);T(1144,1,wi,qk),u.Li=function(e){return ct(e,21)},u.Mi=function(e){return dt(Io,wt,21,e,0,1)};var nZe=A(Re,"EcorePackageImpl/34",1144);T(1145,1,wi,Xk),u.Li=function(e){return ct(e,274)},u.Mi=function(e){return dt(Qpt,te,274,e,0,1)};var iZe=A(Re,"EcorePackageImpl/35",1145);T(1146,1,wi,Pb),u.Li=function(e){return ct(e,149)},u.Mi=function(e){return dt(Vm,wt,149,e,0,1)};var rZe=A(Re,"EcorePackageImpl/36",1146);T(1147,1,wi,Fz),u.Li=function(e){return ct(e,109)},u.Mi=function(e){return dt(t1t,te,109,e,0,1)};var sZe=A(Re,"EcorePackageImpl/37",1147);T(1148,1,wi,Ib),u.Li=function(e){return ct(e,534)},u.Mi=function(e){return dt(Jvt,te,534,e,0,1)};var oZe=A(Re,"EcorePackageImpl/38",1148);T(1149,1,wi,VR),u.Li=function(e){return!1},u.Mi=function(e){return dt(m_t,te,1788,e,0,1)};var cZe=A(Re,"EcorePackageImpl/39",1149);T(1114,1,wi,qR),u.Li=function(e){return ct(e,96)},u.Mi=function(e){return dt(Dl,te,24,e,0,1)};var aZe=A(Re,"EcorePackageImpl/4",1114);T(1150,1,wi,Zk),u.Li=function(e){return ct(e,168)},u.Mi=function(e){return dt(qm,wt,168,e,0,1)};var uZe=A(Re,"EcorePackageImpl/40",1150);T(1151,1,wi,Uz),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var lZe=A(Re,"EcorePackageImpl/41",1151);T(1152,1,wi,zz),u.Li=function(e){return ct(e,532)},u.Mi=function(e){return dt(Ivt,te,532,e,0,1)};var hZe=A(Re,"EcorePackageImpl/42",1152);T(1153,1,wi,jz),u.Li=function(e){return!1},u.Mi=function(e){return dt(b_t,wt,1789,e,0,1)};var fZe=A(Re,"EcorePackageImpl/43",1153);T(1154,1,wi,XR),u.Li=function(e){return ct(e,38)},u.Mi=function(e){return dt(V_,te,38,e,0,1)};var dZe=A(Re,"EcorePackageImpl/44",1154);T(1115,1,wi,ZR),u.Li=function(e){return ct(e,133)},u.Mi=function(e){return dt(cf,te,133,e,0,1)};var pZe=A(Re,"EcorePackageImpl/5",1115);T(1116,1,wi,Hz),u.Li=function(e){return ct(e,140)},u.Mi=function(e){return dt(stt,te,140,e,0,1)};var gZe=A(Re,"EcorePackageImpl/6",1116);T(1117,1,wi,YR),u.Li=function(e){return ct(e,425)},u.Mi=function(e){return dt(VF,te,608,e,0,1)};var mZe=A(Re,"EcorePackageImpl/7",1117);T(1118,1,wi,KR),u.Li=function(e){return ct(e,525)},u.Mi=function(e){return dt(Qp,te,617,e,0,1)};var bZe=A(Re,"EcorePackageImpl/8",1118);T(1119,1,wi,td),u.Li=function(e){return ct(e,430)},u.Mi=function(e){return dt(EA,te,430,e,0,1)};var wZe=A(Re,"EcorePackageImpl/9",1119);T(915,1673,aUt,Nxt),u.sh=function(e,n){jle(this,a(n,380))},u.vh=function(e,n){N8t(this,e,a(n,380))};var vZe=A(Re,"MinimalEObjectImpl/1ArrayDelegatingAdapterList",915);T(916,136,r6,KCt),u.Oh=function(){return this.a.a};var _Ze=A(Re,"MinimalEObjectImpl/1ArrayDelegatingAdapterList/1",916);T(955,954,{},jEt);var yZe=A("org.eclipse.emf.ecore.plugin","EcorePlugin",955),Jvt=Sr(OUt,"Resource");T(719,1492,BUt),u.ik=function(e){},u.jk=function(e){},u.fk=function(){return!this.a&&(this.a=new M5(this)),this.a},u.gk=function(e){var n,i,r,c,l;if(r=e.length,r>0)if(e.charCodeAt(0)==47){for(l=new Vu(4),c=1,n=1;n0&&(e=e.substr(0,i)));return v0e(this,e)},u.hk=function(){return this.c},u.Ib=function(){return Og(this.ql)+"@"+(Yr(this)>>>0).toString(16)+" uri='"+this.d+"'"},u.b=!1;var xZe=A(sK,"ResourceImpl",719);T(1493,719,BUt,SG);var MZe=A(sK,"BinaryResourceImpl",1493);T(1048,629,QY),u.Gh=function(e){return ct(e,51)?Gse(this,a(e,51)):ct(e,534)?new $n(a(e,534).fk()):zt(e)===zt(this.f)?a(e,13).tc():(XT(),bI.a)},u.hc=function(){return Tlt(this)},u.a=!1;var EZe=A(hr,"EcoreUtil/ContentTreeIterator",1048);T(1494,1048,QY,RCt),u.Gh=function(e){return zt(e)===zt(this.f)?a(e,15).tc():new tkt(a(e,51))};var SZe=A(sK,"ResourceImpl/5",1494);T(595,1687,SUt,M5),u.pc=function(e){return this.i<=4?VC(this,e):ct(e,42)&&a(e,42).sg()==this.a},u.sh=function(e,n){e==this.i-1&&(this.a.b||(this.a.b=!0))},u.uh=function(e,n){e==0?this.a.b||(this.a.b=!0):pV(this,e,n)},u.vh=function(e,n){},u.wh=function(e,n,i){},u.pi=function(){return 2},u.Oh=function(){return this.a},u.qi=function(){return!0},u.ri=function(e,n){var i;return i=a(e,42),n=i.Pg(this.a,n),n},u.si=function(e,n){var i;return i=a(e,42),i.Pg(null,n)},u.ti=function(){return!1},u.xh=function(){return!0},u.Fh=function(e){return dt(Nw,te,51,e,0,1)},u.Bh=function(){return!1};var TZe=A(sK,"ResourceImpl/ContentsEList",595);T(873,1657,J2,E5),u.fd=function(e){return this.a.qh(e)},u._b=function(){return this.a._b()};var CZe=A(hr,"AbstractSequentialInternalEList/1",873),Qvt,t_t,eo,e_t;T(567,1,{},tCt);var XF,ZF,AZe=A(hr,"BasicExtendedMetaData",567);T(1023,1,{},aEt),u.kk=function(){return null},u.lk=function(){return this.a==-2&&Dnt(this,z1e(this.d,this.b)),this.a},u.mk=function(){return null},u.nk=function(){return we(),we(),fo},u.be=function(){return this.c==_E&&Hj(this,VIt(this.d,this.b)),this.c},u.ok=function(){return 0},u.a=-2,u.c=_E;var kZe=A(hr,"BasicExtendedMetaData/EClassExtendedMetaDataImpl",1023);T(oh,1,{},BAt),u.kk=function(){return this.a==(AM(),XF)&&Nnt(this,ewe(this.f,this.b)),this.a},u.lk=function(){return 0},u.mk=function(){return this.c==(AM(),XF)&&Gj(this,nwe(this.f,this.b)),this.c},u.nk=function(){return!this.d&&Ont(this,Dve(this.f,this.b)),this.d},u.be=function(){return this.e==_E&&Bnt(this,VIt(this.f,this.b)),this.e},u.ok=function(){return this.g==-2&&Fnt(this,g1e(this.f,this.b)),this.g},u.e=_E,u.g=-2;var LZe=A(hr,"BasicExtendedMetaData/EDataTypeExtendedMetaDataImpl",oh);T(1022,1,{},uEt),u.b=!1,u.c=!1;var PZe=A(hr,"BasicExtendedMetaData/EPackageExtendedMetaDataImpl",1022);T(1025,1,{},FAt),u.c=-2,u.e=_E,u.f=_E;var IZe=A(hr,"BasicExtendedMetaData/EStructuralFeatureExtendedMetaDataImpl",1025);T(529,565,Zo,CD),u.pi=function(){return this.c},u.Rj=function(){return!1},u.zh=function(e,n){return n},u.c=0;var RZe=A(hr,"EDataTypeEList",529),n_t=Sr(hr,"FeatureMap");T(90,529,{3:1,4:1,20:1,25:1,41:1,13:1,15:1,49:1,59:1,55:1,52:1,81:1,184:1,237:1,1630:1,64:1},_s),u.bd=function(e,n){ibe(this,e,a(n,75))},u.nc=function(e){return Fme(this,a(e,75))},u.nh=function(e){tse(this,a(e,75))},u.ri=function(e,n){return fne(this,a(e,75),n)},u.si=function(e,n){return Cst(this,a(e,75),n)},u.zh=function(e,n){return Iye(this,e,a(n,75))},u.hd=function(e,n){return Rbe(this,e,a(n,75))},u.yi=function(e,n){return dne(this,a(e,75),n)},u.zi=function(e,n){return kTt(this,a(e,75),n)},u.Ai=function(e,n,i){return S1e(this,a(e,75),a(n,75),i)},u.Ch=function(e,n){return oX(this,e,a(n,75))},u.oc=function(e){var n,i,r,c,l,f,p,b,v;for(b=new n_(e._b()),r=e.tc();r.hc();)if(i=a(r.ic(),75),c=i.nj(),Om(this.e,c))(!c.xh()||!mV(this,c,i.lc())&&!VC(b,i))&&ni(b,i);else{for(v=gu(this.e.mg(),c),n=a(this.g,124),l=!0,f=0;f=0;)if(n=e[this.c],this.k.Bk(n.nj()))return this.j=this.f?n:n.lc(),this.i=-2,!0;return this.i=-1,this.g=-1,!1};var OZe=A(hr,"BasicFeatureMap/FeatureEIterator",377);T(601,377,kf,TW),u.Xj=function(){return!0};var BZe=A(hr,"BasicFeatureMap/ResolvingFeatureEIterator",601);T(871,444,IO,KEt),u.Uh=function(){return this};var FZe=A(hr,"EContentsEList/1",871);T(872,444,IO,_Et),u.Xj=function(){return!1};var UZe=A(hr,"EContentsEList/2",872);T(870,260,RO,JEt),u.Zj=function(e){},u.hc=function(){return!1},u.Cc=function(){return!1};var zZe=A(hr,"EContentsEList/FeatureIteratorImpl/1",870);T(734,529,Zo,Drt),u.th=function(){this.a=!0},u.ui=function(){return this.a},u.ij=function(){var e;Dr(this),Xl(this.e)?(e=this.a,this.a=!1,Bi(this.e,new Jl(this.e,2,this.c,e,!1))):this.a=!1},u.a=!1;var jZe=A(hr,"EDataTypeEList/Unsettable",734);T(1566,529,Zo,cSt),u.xh=function(){return!0};var HZe=A(hr,"EDataTypeUniqueEList",1566);T(1567,734,Zo,aSt),u.xh=function(){return!0};var GZe=A(hr,"EDataTypeUniqueEList/Unsettable",1567);T(156,88,Zo,Hu),u.Qj=function(){return!0},u.zh=function(e,n){return V2(this,e,a(n,51))};var WZe=A(hr,"EObjectContainmentEList/Resolving",156);T(1026,493,Zo,oSt),u.Qj=function(){return!0},u.zh=function(e,n){return V2(this,e,a(n,51))};var $Ze=A(hr,"EObjectContainmentEList/Unsettable/Resolving",1026);T(679,18,Zo,mst),u.th=function(){this.a=!0},u.ui=function(){return this.a},u.ij=function(){var e;Dr(this),Xl(this.e)?(e=this.a,this.a=!1,Bi(this.e,new Jl(this.e,2,this.c,e,!1))):this.a=!1},u.a=!1;var VZe=A(hr,"EObjectContainmentWithInverseEList/Unsettable",679);T(1044,679,Zo,lTt),u.Qj=function(){return!0},u.zh=function(e,n){return V2(this,e,a(n,51))};var qZe=A(hr,"EObjectContainmentWithInverseEList/Unsettable/Resolving",1044);T(675,450,Zo,Nrt),u.th=function(){this.a=!0},u.ui=function(){return this.a},u.ij=function(){var e;Dr(this),Xl(this.e)?(e=this.a,this.a=!1,Bi(this.e,new Jl(this.e,2,this.c,e,!1))):this.a=!1},u.a=!1;var XZe=A(hr,"EObjectEList/Unsettable",675);T(376,450,Zo,lM),u.Qj=function(){return!0},u.zh=function(e,n){return V2(this,e,a(n,51))};var ZZe=A(hr,"EObjectResolvingEList",376);T(1554,675,Zo,uSt),u.Qj=function(){return!0},u.zh=function(e,n){return V2(this,e,a(n,51))};var YZe=A(hr,"EObjectResolvingEList/Unsettable",1554);T(1495,1,{},Ig);var qqt,KZe=A(hr,"EObjectValidator",1495);T(496,450,Zo,WD),u.Lj=function(){return this.d},u.Mj=function(){return this.b},u.qi=function(){return!0},u.Pj=function(){return!0},u.b=0;var JZe=A(hr,"EObjectWithInverseEList",496);T(1047,496,Zo,hTt),u.Oj=function(){return!0};var QZe=A(hr,"EObjectWithInverseEList/ManyInverse",1047);T(572,496,Zo,e$),u.th=function(){this.a=!0},u.ui=function(){return this.a},u.ij=function(){var e;Dr(this),Xl(this.e)?(e=this.a,this.a=!1,Bi(this.e,new Jl(this.e,2,this.c,e,!1))):this.a=!1},u.a=!1;var tYe=A(hr,"EObjectWithInverseEList/Unsettable",572);T(1046,572,Zo,fTt),u.Oj=function(){return!0};var eYe=A(hr,"EObjectWithInverseEList/Unsettable/ManyInverse",1046);T(680,496,Zo,bst),u.Qj=function(){return!0},u.zh=function(e,n){return V2(this,e,a(n,51))};var nYe=A(hr,"EObjectWithInverseResolvingEList",680);T(33,680,Zo,pn),u.Oj=function(){return!0};var iYe=A(hr,"EObjectWithInverseResolvingEList/ManyInverse",33);T(681,572,Zo,wst),u.Qj=function(){return!0},u.zh=function(e,n){return V2(this,e,a(n,51))};var rYe=A(hr,"EObjectWithInverseResolvingEList/Unsettable",681);T(1045,681,Zo,dTt),u.Oj=function(){return!0};var sYe=A(hr,"EObjectWithInverseResolvingEList/Unsettable/ManyInverse",1045);T(1027,565,Zo),u.rh=function(){return(this.b&1792)==0},u.th=function(){this.b|=1},u.Nj=function(){return(this.b&4)!=0},u.qi=function(){return(this.b&40)!=0},u.Oj=function(){return(this.b&16)!=0},u.Pj=function(){return(this.b&8)!=0},u.Qj=function(){return(this.b&mw)!=0},u.Dj=function(){return(this.b&32)!=0},u.Rj=function(){return(this.b&oh)!=0},u.Li=function(e){return this.d?QAt(this.d,e):this.nj().jj().Li(e)},u.ui=function(){return this.b&2?(this.b&1)!=0:this.i!=0},u.xh=function(){return(this.b&128)!=0},u.ij=function(){var e;Dr(this),this.b&2&&(Xl(this.e)?(e=(this.b&1)!=0,this.b&=-2,Wn(this,new Jl(this.e,2,xr(this.e.mg(),this.nj()),e,!1))):this.b&=-2)},u.Bh=function(){return(this.b&1536)==0},u.b=0;var oYe=A(hr,"EcoreEList/Generic",1027);T(1028,1027,Zo,I4t),u.nj=function(){return this.a};var cYe=A(hr,"EcoreEList/Dynamic",1028);T(678,55,Nf,dT),u.Fh=function(e){return FL(this.a.a,e)};var aYe=A(hr,"EcoreEMap/1",678);T(677,88,Zo,aot),u.sh=function(e,n){f7(this.b,a(n,134))},u.uh=function(e,n){OPt(this.b)},u.vh=function(e,n){xq(this.b,a(n,134))},u.wh=function(e,n,i){xq(this.b,a(i,134)),zt(i)===zt(n)&&a(i,134).jh(Hte(a(n,134).kc())),f7(this.b,a(n,134))};var uYe=A(hr,"EcoreEMap/DelegateEObjectContainmentEList",677);T(1042,143,Upt,GLt);var lYe=A(hr,"EcoreEMap/Unsettable",1042);T(1043,677,Zo,pTt),u.th=function(){this.a=!0},u.ui=function(){return this.a},u.ij=function(){var e;Dr(this),Xl(this.e)?(e=this.a,this.a=!1,Bi(this.e,new Jl(this.e,2,this.c,e,!1))):this.a=!1},u.a=!1;var hYe=A(hr,"EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList",1043);T(682,1,Cs,tkt),u.gc=function(e){ks(this,e)},u.hc=function(){return LIt(this)},u.ic=function(){var e;return LIt(this),e=this.b,this.b=null,e},u.jc=function(){this.a.jc()};var fYe=A(hr,"EcoreUtil/ProperContentIterator",682);T(1496,1495,{},xj);var Xqt,dYe=A(hr,"EcoreValidator",1496),Zqt,pYe=Sr(hr,"FeatureMapUtil/Validator");T(1095,1,{1632:1},Gz),u.Bk=function(e){return!0};var gYe=A(hr,"FeatureMapUtil/1",1095);T(692,1,{1632:1},Bht),u.Bk=function(e){var n;return this.c==e?!0:(n=de(zi(this.a,e)),n==null?$we(this,e)?(Wkt(this.a,e,(me(),ME)),!0):(Wkt(this.a,e,(me(),$m)),!1):n==(me(),ME))},u.e=!1;var utt,mYe=A(hr,"FeatureMapUtil/BasicValidator",692);T(693,44,ix,Lrt);var bYe=A(hr,"FeatureMapUtil/BasicValidator/Cache",693);T(455,41,{20:1,25:1,41:1,13:1,15:1,52:1,81:1,64:1},$5),u.bd=function(e,n){FDt(this.c,this.b,e,n)},u.nc=function(e){return wve(this.c,this.b,e)},u.oc=function(e){return GT(this,e)},u.xj=function(e,n){return uht(this.c,this.b,e,n)},u.Dh=function(e){return W7(this.c,this.b,e,!1)},u.oh=function(){return DEt(this.c,this.b)},u.ph=function(){return Nte(this.c,this.b)},u.qh=function(e){return fae(this.c,this.b,e)},u.yj=function(e,n){return XSt(this,e,n)},u.Pb=function(){St(this)},u.pc=function(e){return mV(this.c,this.b,e)},u.qc=function(e){return Zue(this.c,this.b,e)},u.cd=function(e){return W7(this.c,this.b,e,!0)},u.hj=function(e){return this},u.dd=function(e){return xae(this.c,this.b,e)},u.Wb=function(){return Y9(this)},u.ui=function(){return!rP(this.c,this.b)},u.tc=function(){return Aue(this.c,this.b)},u.ed=function(){return kue(this.c,this.b)},u.fd=function(e){return efe(this.c,this.b,e)},u.gd=function(e){return F8t(this.c,this.b,e)},u.vc=function(e){return ave(this.c,this.b,e)},u.hd=function(e,n){return WNt(this.c,this.b,e,n)},u.Gc=function(e){S7(this.c,this.b),GT(this,a(e,15))},u._b=function(){return She(this.c,this.b)},u.yc=function(){return Fce(this.c,this.b)},u.zc=function(e){return Mae(this.c,this.b,e)},u.Ib=function(){var e,n;for(n=new Sp,n.a+="[",e=DEt(this.c,this.b);uq(e);)mo(n,HT(l7(e))),uq(e)&&(n.a+=Rc);return n.a+="]",n.a},u.ij=function(){S7(this.c,this.b)};var wYe=A(hr,"FeatureMapUtil/FeatureEList",455);T(575,32,r6,rV),u.Mh=function(e){return IC(this,e)},u.Rh=function(e){var n,i,r,c,l,f,p;switch(this.d){case 1:case 2:{if(l=e.Oh(),zt(l)===zt(this.c)&&IC(this,null)==e.Mh(null))return this.g=e.Nh(),e.Lh()==1&&(this.d=1),!0;break}case 3:{switch(c=e.Lh(),c){case 3:{if(l=e.Oh(),zt(l)===zt(this.c)&&IC(this,null)==e.Mh(null))return this.d=5,n=new n_(2),ni(n,this.g),ni(n,e.Nh()),this.g=n,!0;break}}break}case 5:{switch(c=e.Lh(),c){case 3:{if(l=e.Oh(),zt(l)===zt(this.c)&&IC(this,null)==e.Mh(null))return i=a(this.g,13),i.nc(e.Nh()),!0;break}}break}case 4:{switch(c=e.Lh(),c){case 3:{if(l=e.Oh(),zt(l)===zt(this.c)&&IC(this,null)==e.Mh(null))return this.d=1,this.g=e.Nh(),!0;break}case 4:{if(l=e.Oh(),zt(l)===zt(this.c)&&IC(this,null)==e.Mh(null))return this.d=6,p=new n_(2),ni(p,this.n),ni(p,e.Ph()),this.n=p,f=Y(Z(Gn,1),pi,22,15,[this.o,e.Qh()]),this.g=f,!0;break}}break}case 6:{switch(c=e.Lh(),c){case 4:{if(l=e.Oh(),zt(l)===zt(this.c)&&IC(this,null)==e.Mh(null))return i=a(this.n,13),i.nc(e.Ph()),f=a(this.g,37),r=dt(Gn,pi,22,f.length+1,15,1),Aa(f,0,r,0,f.length),r[f.length]=e.Qh(),this.g=r,!0;break}}break}}return!1};var vYe=A(hr,"FeatureMapUtil/FeatureENotificationImpl",575);T(501,455,{20:1,25:1,41:1,13:1,15:1,52:1,81:1,184:1,237:1,1630:1,64:1},PD),u.pk=function(e,n,i){return uht(this.c,e,n,i)},u.qk=function(e,n,i){return Sht(this.c,e,n,i)},u.rk=function(){return this},u.sk=function(e,n){return IP(this.c,e,n)},u.tk=function(e){return a(W7(this.c,this.b,e,!1),75).nj()},u.uk=function(e){return a(W7(this.c,this.b,e,!1),75).lc()},u.vk=function(){return this.a},u.wk=function(e){return!rP(this.c,e)},u.xk=function(e,n){KX(this.c,e,n)},u.yk=function(e){return JLt(this.c,e)};var _Ye=A(hr,"FeatureMapUtil/FeatureFeatureMap",501);T(1094,1,{81:1},fEt),u.hj=function(e){return W7(this.b,this.a,-1,e)},u.ui=function(){return!rP(this.b,this.a)},u.Gc=function(e){KX(this.b,this.a,e)},u.ij=function(){S7(this.b,this.a)};var yYe=A(hr,"FeatureMapUtil/FeatureValue",1094),Ux,ltt,htt,zx,Yqt,vI=Sr(jO,"AnyType");T(603,54,rp,GG);var xYe=A(jO,"InvalidDatatypeValueException",603),YF=Sr(jO,UUt),_I=Sr(jO,zUt),i_t=Sr(jO,jUt),Kqt,_c,r_t,jw,Jqt,Qqt,tXt,eXt,nXt,iXt,rXt,sXt,oXt,cXt,aXt,WE,uXt,$E,yI,lXt,by,KF,JF,hXt,xI,MI;T(735,463,{95:1,91:1,87:1,51:1,42:1,92:1,746:1},fit),u.ug=function(e,n,i){switch(e){case 0:return i?(!this.c&&(this.c=new _s(this,0)),this.c):(!this.c&&(this.c=new _s(this,0)),this.c.b);case 1:return i?(!this.c&&(this.c=new _s(this,0)),a(Za(this.c,(fr(),jw)),184)):(!this.c&&(this.c=new _s(this,0)),a(a(Za(this.c,(fr(),jw)),184),237)).vk();case 2:return i?(!this.b&&(this.b=new _s(this,2)),this.b):(!this.b&&(this.b=new _s(this,2)),this.b.b)}return qu(this,e-ei(this.Rg()),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():this.Rg(),e),n,i)},u.Dg=function(e,n,i){var r;switch(n){case 0:return!this.c&&(this.c=new _s(this,0)),kP(this.c,e,i);case 1:return(!this.c&&(this.c=new _s(this,0)),a(a(Za(this.c,(fr(),jw)),184),64)).yj(e,i);case 2:return!this.b&&(this.b=new _s(this,2)),kP(this.b,e,i)}return r=a(Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():this.Rg(),n),61),r.aj().ej(this,Bct(this),n-ei(this.Rg()),e,i)},u.Fg=function(e){switch(e){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new _s(this,0)),a(Za(this.c,(fr(),jw)),184)).Wb();case 2:return!!this.b&&this.b.i!=0}return $u(this,e-ei(this.Rg()),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():this.Rg(),e))},u.Mg=function(e,n){switch(e){case 0:!this.c&&(this.c=new _s(this,0)),dL(this.c,n);return;case 1:(!this.c&&(this.c=new _s(this,0)),a(a(Za(this.c,(fr(),jw)),184),237)).Gc(n);return;case 2:!this.b&&(this.b=new _s(this,2)),dL(this.b,n);return}Yu(this,e-ei(this.Rg()),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():this.Rg(),e),n)},u.Rg=function(){return fr(),r_t},u.Ib=function(){var e;return this.j&4?nh(this):(e=new ul(nh(this)),e.a+=" (mixed: ",kT(e,this.c),e.a+=", anyAttribute: ",kT(e,this.b),e.a+=")",e.a)};var MYe=A(Xr,"AnyTypeImpl",735);T(604,463,{95:1,91:1,87:1,51:1,42:1,92:1,1707:1,604:1},Wz),u.ug=function(e,n,i){switch(e){case 0:return this.a;case 1:return this.b}return qu(this,e-ei((fr(),WE)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():WE,e),n,i)},u.Fg=function(e){switch(e){case 0:return this.a!=null;case 1:return this.b!=null}return $u(this,e-ei((fr(),WE)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():WE,e))},u.Mg=function(e,n){switch(e){case 0:Wnt(this,hi(n));return;case 1:Vnt(this,hi(n));return}Yu(this,e-ei((fr(),WE)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():WE,e),n)},u.Rg=function(){return fr(),WE},u.Ib=function(){var e;return this.j&4?nh(this):(e=new ul(nh(this)),e.a+=" (data: ",mo(e,this.a),e.a+=", target: ",mo(e,this.b),e.a+=")",e.a)},u.a=null,u.b=null;var EYe=A(Xr,"ProcessingInstructionImpl",604);T(605,735,{95:1,91:1,87:1,51:1,42:1,92:1,746:1,1708:1,605:1},wxt),u.ug=function(e,n,i){switch(e){case 0:return i?(!this.c&&(this.c=new _s(this,0)),this.c):(!this.c&&(this.c=new _s(this,0)),this.c.b);case 1:return i?(!this.c&&(this.c=new _s(this,0)),a(Za(this.c,(fr(),jw)),184)):(!this.c&&(this.c=new _s(this,0)),a(a(Za(this.c,(fr(),jw)),184),237)).vk();case 2:return i?(!this.b&&(this.b=new _s(this,2)),this.b):(!this.b&&(this.b=new _s(this,2)),this.b.b);case 3:return!this.c&&(this.c=new _s(this,0)),hi(IP(this.c,(fr(),yI),!0));case 4:return vst(this.a,(!this.c&&(this.c=new _s(this,0)),hi(IP(this.c,(fr(),yI),!0))));case 5:return this.a}return qu(this,e-ei((fr(),$E)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():$E,e),n,i)},u.Fg=function(e){switch(e){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new _s(this,0)),a(Za(this.c,(fr(),jw)),184)).Wb();case 2:return!!this.b&&this.b.i!=0;case 3:return!this.c&&(this.c=new _s(this,0)),hi(IP(this.c,(fr(),yI),!0))!=null;case 4:return vst(this.a,(!this.c&&(this.c=new _s(this,0)),hi(IP(this.c,(fr(),yI),!0))))!=null;case 5:return!!this.a}return $u(this,e-ei((fr(),$E)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():$E,e))},u.Mg=function(e,n){switch(e){case 0:!this.c&&(this.c=new _s(this,0)),dL(this.c,n);return;case 1:(!this.c&&(this.c=new _s(this,0)),a(a(Za(this.c,(fr(),jw)),184),237)).Gc(n);return;case 2:!this.b&&(this.b=new _s(this,2)),dL(this.b,n);return;case 3:UAt(this,hi(n));return;case 4:UAt(this,mTt(this.a,n));return;case 5:$nt(this,a(n,140));return}Yu(this,e-ei((fr(),$E)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():$E,e),n)},u.Rg=function(){return fr(),$E};var SYe=A(Xr,"SimpleAnyTypeImpl",605);T(606,463,{95:1,91:1,87:1,51:1,42:1,92:1,1709:1,606:1},bxt),u.ug=function(e,n,i){switch(e){case 0:return i?(!this.a&&(this.a=new _s(this,0)),this.a):(!this.a&&(this.a=new _s(this,0)),this.a.b);case 1:return i?(!this.b&&(this.b=new lu((ye(),Ho),Dc,this,1)),this.b):(!this.b&&(this.b=new lu((ye(),Ho),Dc,this,1)),SL(this.b));case 2:return i?(!this.c&&(this.c=new lu((ye(),Ho),Dc,this,2)),this.c):(!this.c&&(this.c=new lu((ye(),Ho),Dc,this,2)),SL(this.c));case 3:return!this.a&&(this.a=new _s(this,0)),Za(this.a,(fr(),KF));case 4:return!this.a&&(this.a=new _s(this,0)),Za(this.a,(fr(),JF));case 5:return!this.a&&(this.a=new _s(this,0)),Za(this.a,(fr(),xI));case 6:return!this.a&&(this.a=new _s(this,0)),Za(this.a,(fr(),MI))}return qu(this,e-ei((fr(),by)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():by,e),n,i)},u.Dg=function(e,n,i){var r;switch(n){case 0:return!this.a&&(this.a=new _s(this,0)),kP(this.a,e,i);case 1:return!this.b&&(this.b=new lu((ye(),Ho),Dc,this,1)),yD(this.b,e,i);case 2:return!this.c&&(this.c=new lu((ye(),Ho),Dc,this,2)),yD(this.c,e,i);case 5:return!this.a&&(this.a=new _s(this,0)),XSt(Za(this.a,(fr(),xI)),e,i)}return r=a(Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():(fr(),by),n),61),r.aj().ej(this,Bct(this),n-ei((fr(),by)),e,i)},u.Fg=function(e){switch(e){case 0:return!!this.a&&this.a.i!=0;case 1:return!!this.b&&this.b.f!=0;case 2:return!!this.c&&this.c.f!=0;case 3:return!this.a&&(this.a=new _s(this,0)),!Y9(Za(this.a,(fr(),KF)));case 4:return!this.a&&(this.a=new _s(this,0)),!Y9(Za(this.a,(fr(),JF)));case 5:return!this.a&&(this.a=new _s(this,0)),!Y9(Za(this.a,(fr(),xI)));case 6:return!this.a&&(this.a=new _s(this,0)),!Y9(Za(this.a,(fr(),MI)))}return $u(this,e-ei((fr(),by)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():by,e))},u.Mg=function(e,n){switch(e){case 0:!this.a&&(this.a=new _s(this,0)),dL(this.a,n);return;case 1:!this.b&&(this.b=new lu((ye(),Ho),Dc,this,1)),ON(this.b,n);return;case 2:!this.c&&(this.c=new lu((ye(),Ho),Dc,this,2)),ON(this.c,n);return;case 3:!this.a&&(this.a=new _s(this,0)),St(Za(this.a,(fr(),KF))),!this.a&&(this.a=new _s(this,0)),GT(Za(this.a,KF),a(n,13));return;case 4:!this.a&&(this.a=new _s(this,0)),St(Za(this.a,(fr(),JF))),!this.a&&(this.a=new _s(this,0)),GT(Za(this.a,JF),a(n,13));return;case 5:!this.a&&(this.a=new _s(this,0)),St(Za(this.a,(fr(),xI))),!this.a&&(this.a=new _s(this,0)),GT(Za(this.a,xI),a(n,13));return;case 6:!this.a&&(this.a=new _s(this,0)),St(Za(this.a,(fr(),MI))),!this.a&&(this.a=new _s(this,0)),GT(Za(this.a,MI),a(n,13));return}Yu(this,e-ei((fr(),by)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():by,e),n)},u.Rg=function(){return fr(),by},u.Ib=function(){var e;return this.j&4?nh(this):(e=new ul(nh(this)),e.a+=" (mixed: ",kT(e,this.a),e.a+=")",e.a)};var TYe=A(Xr,"XMLTypeDocumentRootImpl",606);T(1626,638,{95:1,91:1,87:1,430:1,139:1,51:1,103:1,42:1,92:1,142:1,107:1,108:1,1710:1},XS),u.Zg=function(e,n){switch(e.Ni()){case 7:case 8:case 9:case 10:case 16:case 22:case 23:case 24:case 25:case 26:case 32:case 33:case 34:case 36:case 37:case 44:case 45:case 50:case 51:case 53:case 55:case 56:case 57:case 58:case 60:case 61:case 4:return n==null?null:Yc(n);case 19:case 28:case 29:case 35:case 38:case 39:case 41:case 46:case 52:case 54:case 5:return hi(n);case 6:return Uee(a(n,173));case 12:case 47:case 49:case 11:return C7t(this,e,n);case 13:return n==null?null:m_e(a(n,216));case 15:case 14:return n==null?null:$re(lt(Yt(n)));case 17:return t8t((fr(),n));case 18:return t8t(n);case 21:case 20:return n==null?null:Vre(a(n,126).a);case 27:return zee(a(n,173));case 30:return MRt((fr(),a(n,15)));case 31:return MRt(a(n,15));case 40:return kee((fr(),n));case 42:return e8t((fr(),n));case 43:return e8t(n);case 59:case 48:return Aee((fr(),n));default:throw K(new yn(bE+e.be()+Gm))}},u.$g=function(e){var n,i,r,c,l;switch(e.G==-1&&(e.G=(i=Xu(e),i?Hp(i.bh(),e):-1)),e.G){case 0:return n=new fit,n;case 1:return r=new Wz,r;case 2:return c=new wxt,c;case 3:return l=new bxt,l;default:throw K(new yn(WY+e.zb+Gm))}},u._g=function(e,n){var i,r,c,l,f,p,b,v,M,k,I,O,$,G,et,rt;switch(e.Ni()){case 5:case 52:case 4:return n;case 6:return ede(n);case 8:case 7:return n==null?null:zpe(n);case 9:return n==null?null:AL(Au((r=Hc(n,!0),r.length>0&&r.charCodeAt(0)==43?r.substr(1,r.length-1):r),-128,127)<<24>>24);case 10:return n==null?null:AL(Au((c=Hc(n,!0),c.length>0&&c.charCodeAt(0)==43?c.substr(1,c.length-1):c),-128,127)<<24>>24);case 11:return hi(Bm(this,(fr(),tXt),n));case 12:return hi(Bm(this,(fr(),eXt),n));case 13:return n==null?null:new wit(Hc(n,!0));case 15:case 14:return fme(n);case 16:return hi(Bm(this,(fr(),nXt),n));case 17:return BIt((fr(),n));case 18:return BIt(n);case 28:case 29:case 35:case 38:case 39:case 41:case 54:case 19:return Hc(n,!0);case 21:case 20:return Mme(n);case 22:return hi(Bm(this,(fr(),iXt),n));case 23:return hi(Bm(this,(fr(),rXt),n));case 24:return hi(Bm(this,(fr(),sXt),n));case 25:return hi(Bm(this,(fr(),oXt),n));case 26:return hi(Bm(this,(fr(),cXt),n));case 27:return Ufe(n);case 30:return FIt((fr(),n));case 31:return FIt(n);case 32:return n==null?null:Xt(Au((M=Hc(n,!0),M.length>0&&M.charCodeAt(0)==43?M.substr(1,M.length-1):M),Vs,qi));case 33:return n==null?null:new y1((k=Hc(n,!0),k.length>0&&k.charCodeAt(0)==43?k.substr(1,k.length-1):k));case 34:return n==null?null:Xt(Au((I=Hc(n,!0),I.length>0&&I.charCodeAt(0)==43?I.substr(1,I.length-1):I),Vs,qi));case 36:return n==null?null:Qg(X7((O=Hc(n,!0),O.length>0&&O.charCodeAt(0)==43?O.substr(1,O.length-1):O)));case 37:return n==null?null:Qg(X7(($=Hc(n,!0),$.length>0&&$.charCodeAt(0)==43?$.substr(1,$.length-1):$)));case 40:return Fhe((fr(),n));case 42:return UIt((fr(),n));case 43:return UIt(n);case 44:return n==null?null:new y1((G=Hc(n,!0),G.length>0&&G.charCodeAt(0)==43?G.substr(1,G.length-1):G));case 45:return n==null?null:new y1((et=Hc(n,!0),et.length>0&&et.charCodeAt(0)==43?et.substr(1,et.length-1):et));case 46:return Hc(n,!1);case 47:return hi(Bm(this,(fr(),aXt),n));case 59:case 48:return Bhe((fr(),n));case 49:return hi(Bm(this,(fr(),uXt),n));case 50:return n==null?null:UM(Au((rt=Hc(n,!0),rt.length>0&&rt.charCodeAt(0)==43?rt.substr(1,rt.length-1):rt),BO,32767)<<16>>16);case 51:return n==null?null:UM(Au((l=Hc(n,!0),l.length>0&&l.charCodeAt(0)==43?l.substr(1,l.length-1):l),BO,32767)<<16>>16);case 53:return hi(Bm(this,(fr(),lXt),n));case 55:return n==null?null:UM(Au((f=Hc(n,!0),f.length>0&&f.charCodeAt(0)==43?f.substr(1,f.length-1):f),BO,32767)<<16>>16);case 56:return n==null?null:UM(Au((p=Hc(n,!0),p.length>0&&p.charCodeAt(0)==43?p.substr(1,p.length-1):p),BO,32767)<<16>>16);case 57:return n==null?null:Qg(X7((b=Hc(n,!0),b.length>0&&b.charCodeAt(0)==43?b.substr(1,b.length-1):b)));case 58:return n==null?null:Qg(X7((v=Hc(n,!0),v.length>0&&v.charCodeAt(0)==43?v.substr(1,v.length-1):v)));case 60:return n==null?null:Xt(Au((i=Hc(n,!0),i.length>0&&i.charCodeAt(0)==43?i.substr(1,i.length-1):i),Vs,qi));case 61:return n==null?null:Xt(Au(Hc(n,!0),Vs,qi));default:throw K(new yn(bE+e.be()+Gm))}};var fXt,s_t,dXt,o_t,CYe=A(Xr,"XMLTypeFactoryImpl",1626);T(530,248,{95:1,91:1,87:1,139:1,174:1,51:1,207:1,103:1,42:1,92:1,142:1,248:1,107:1,108:1,613:1,1639:1,530:1},c4t),u.N=!1,u.O=!1;var pXt=!1,AYe=A(Xr,"XMLTypePackageImpl",530);T(1569,1,{743:1},Yy),u.mj=function(){return mht(),MXt};var kYe=A(Xr,"XMLTypePackageImpl/1",1569);T(1578,1,wi,JR),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var LYe=A(Xr,"XMLTypePackageImpl/10",1578);T(1579,1,wi,QR),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var PYe=A(Xr,"XMLTypePackageImpl/11",1579);T(1580,1,wi,$z),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var IYe=A(Xr,"XMLTypePackageImpl/12",1580);T(1581,1,wi,t8),u.Li=function(e){return Gb(e)},u.Mi=function(e){return dt(To,wt,315,e,7,1)};var RYe=A(Xr,"XMLTypePackageImpl/13",1581);T(1582,1,wi,Ky),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var DYe=A(Xr,"XMLTypePackageImpl/14",1582);T(1583,1,wi,B3),u.Li=function(e){return ct(e,15)},u.Mi=function(e){return dt(Sl,fw,15,e,0,1)};var NYe=A(Xr,"XMLTypePackageImpl/15",1583);T(1584,1,wi,Vz),u.Li=function(e){return ct(e,15)},u.Mi=function(e){return dt(Sl,fw,15,e,0,1)};var OYe=A(Xr,"XMLTypePackageImpl/16",1584);T(1585,1,wi,e8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var BYe=A(Xr,"XMLTypePackageImpl/17",1585);T(1586,1,wi,n8),u.Li=function(e){return ct(e,126)},u.Mi=function(e){return dt(EE,wt,126,e,0,1)};var FYe=A(Xr,"XMLTypePackageImpl/18",1586);T(1587,1,wi,ZS),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var UYe=A(Xr,"XMLTypePackageImpl/19",1587);T(1570,1,wi,i8),u.Li=function(e){return ct(e,746)},u.Mi=function(e){return dt(vI,te,746,e,0,1)};var zYe=A(Xr,"XMLTypePackageImpl/2",1570);T(1588,1,wi,YS),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var jYe=A(Xr,"XMLTypePackageImpl/20",1588);T(1589,1,wi,Yk),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var HYe=A(Xr,"XMLTypePackageImpl/21",1589);T(1590,1,wi,KS),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var GYe=A(Xr,"XMLTypePackageImpl/22",1590);T(1591,1,wi,qz),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var WYe=A(Xr,"XMLTypePackageImpl/23",1591);T(1592,1,wi,r8),u.Li=function(e){return ct(e,173)},u.Mi=function(e){return dt(Da,wt,173,e,0,2)};var $Ye=A(Xr,"XMLTypePackageImpl/24",1592);T(1593,1,wi,JS),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var VYe=A(Xr,"XMLTypePackageImpl/25",1593);T(1594,1,wi,s8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var qYe=A(Xr,"XMLTypePackageImpl/26",1594);T(1595,1,wi,Kk),u.Li=function(e){return ct(e,15)},u.Mi=function(e){return dt(Sl,fw,15,e,0,1)};var XYe=A(Xr,"XMLTypePackageImpl/27",1595);T(1596,1,wi,Xz),u.Li=function(e){return ct(e,15)},u.Mi=function(e){return dt(Sl,fw,15,e,0,1)};var ZYe=A(Xr,"XMLTypePackageImpl/28",1596);T(1597,1,wi,o8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var YYe=A(Xr,"XMLTypePackageImpl/29",1597);T(1571,1,wi,Q0),u.Li=function(e){return ct(e,604)},u.Mi=function(e){return dt(YF,te,1707,e,0,1)};var KYe=A(Xr,"XMLTypePackageImpl/3",1571);T(1598,1,wi,c8),u.Li=function(e){return ct(e,21)},u.Mi=function(e){return dt(Io,wt,21,e,0,1)};var JYe=A(Xr,"XMLTypePackageImpl/30",1598);T(1599,1,wi,a8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var QYe=A(Xr,"XMLTypePackageImpl/31",1599);T(1600,1,wi,Zz),u.Li=function(e){return ct(e,149)},u.Mi=function(e){return dt(Vm,wt,149,e,0,1)};var tKe=A(Xr,"XMLTypePackageImpl/32",1600);T(1601,1,wi,u8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var eKe=A(Xr,"XMLTypePackageImpl/33",1601);T(1602,1,wi,Yz),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var nKe=A(Xr,"XMLTypePackageImpl/34",1602);T(1603,1,wi,Kz),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var iKe=A(Xr,"XMLTypePackageImpl/35",1603);T(1604,1,wi,tm),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var rKe=A(Xr,"XMLTypePackageImpl/36",1604);T(1605,1,wi,Jk),u.Li=function(e){return ct(e,15)},u.Mi=function(e){return dt(Sl,fw,15,e,0,1)};var sKe=A(Xr,"XMLTypePackageImpl/37",1605);T(1606,1,wi,Qk),u.Li=function(e){return ct(e,15)},u.Mi=function(e){return dt(Sl,fw,15,e,0,1)};var oKe=A(Xr,"XMLTypePackageImpl/38",1606);T(1607,1,wi,t5),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var cKe=A(Xr,"XMLTypePackageImpl/39",1607);T(1572,1,wi,QS),u.Li=function(e){return ct(e,605)},u.Mi=function(e){return dt(_I,te,1708,e,0,1)};var aKe=A(Xr,"XMLTypePackageImpl/4",1572);T(1608,1,wi,Jy),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var uKe=A(Xr,"XMLTypePackageImpl/40",1608);T(1609,1,wi,cs),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var lKe=A(Xr,"XMLTypePackageImpl/41",1609);T(1610,1,wi,tT),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var hKe=A(Xr,"XMLTypePackageImpl/42",1610);T(1611,1,wi,e5),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var fKe=A(Xr,"XMLTypePackageImpl/43",1611);T(1612,1,wi,Mv),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var dKe=A(Xr,"XMLTypePackageImpl/44",1612);T(1613,1,wi,Jz),u.Li=function(e){return ct(e,168)},u.Mi=function(e){return dt(qm,wt,168,e,0,1)};var pKe=A(Xr,"XMLTypePackageImpl/45",1613);T(1614,1,wi,n5),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var gKe=A(Xr,"XMLTypePackageImpl/46",1614);T(1615,1,wi,l8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var mKe=A(Xr,"XMLTypePackageImpl/47",1615);T(1616,1,wi,zh),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var bKe=A(Xr,"XMLTypePackageImpl/48",1616);T(1617,1,wi,Qz),u.Li=function(e){return ct(e,168)},u.Mi=function(e){return dt(qm,wt,168,e,0,1)};var wKe=A(Xr,"XMLTypePackageImpl/49",1617);T(1573,1,wi,tj),u.Li=function(e){return ct(e,606)},u.Mi=function(e){return dt(i_t,te,1709,e,0,1)};var vKe=A(Xr,"XMLTypePackageImpl/5",1573);T(1618,1,wi,h8),u.Li=function(e){return ct(e,149)},u.Mi=function(e){return dt(Vm,wt,149,e,0,1)};var _Ke=A(Xr,"XMLTypePackageImpl/50",1618);T(1619,1,wi,ej),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var yKe=A(Xr,"XMLTypePackageImpl/51",1619);T(1620,1,wi,f8),u.Li=function(e){return ct(e,21)},u.Mi=function(e){return dt(Io,wt,21,e,0,1)};var xKe=A(Xr,"XMLTypePackageImpl/52",1620);T(1574,1,wi,nj),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var MKe=A(Xr,"XMLTypePackageImpl/6",1574);T(1575,1,wi,ij),u.Li=function(e){return ct(e,173)},u.Mi=function(e){return dt(Da,wt,173,e,0,2)};var EKe=A(Xr,"XMLTypePackageImpl/7",1575);T(1576,1,wi,rj),u.Li=function(e){return Hb(e)},u.Mi=function(e){return dt(ho,wt,434,e,8,1)};var SKe=A(Xr,"XMLTypePackageImpl/8",1576);T(1577,1,wi,em),u.Li=function(e){return ct(e,192)},u.Mi=function(e){return dt(fx,wt,192,e,0,1)};var TKe=A(Xr,"XMLTypePackageImpl/9",1577),af,t1,kA,QF,tt;T(40,54,rp,ri);var CKe=A(qp,"RegEx/ParseException",40);T(730,1,{},jh),u.Ck=function(e){return ei*16)throw K(new ri(ai((Kn(),JFt))));i=i*16+c}while(!0);if(this.a!=125)throw K(new ri(ai((Kn(),QFt))));if(i>yE)throw K(new ri(ai((Kn(),tUt))));e=i}else{if(c=0,this.c!=0||(c=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(i=c,Ci(this),this.c!=0||(c=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));i=i*16+c,e=i}break;case 117:if(r=0,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));n=n*16+r,e=n;break;case 118:if(Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,n>yE)throw K(new ri(ai((Kn(),"parser.descappe.4"))));e=n;break;case 65:case 90:case 122:throw K(new ri(ai((Kn(),eUt))))}return e},u.Ek=function(e){var n;switch(e){case 100:n=(this.e&32)==32?Z1("Nd",!0):(Ai(),tU);break;case 68:n=(this.e&32)==32?Z1("Nd",!1):(Ai(),f_t);break;case 119:n=(this.e&32)==32?Z1("IsWord",!0):(Ai(),XE);break;case 87:n=(this.e&32)==32?Z1("IsWord",!1):(Ai(),p_t);break;case 115:n=(this.e&32)==32?Z1("IsSpace",!0):(Ai(),jx);break;case 83:n=(this.e&32)==32?Z1("IsSpace",!1):(Ai(),d_t);break;default:throw K(new sc(ezt+e.toString(16)))}return n},u.Fk=function(e){var n,i,r,c,l,f,p,b,v,M,k,I;for(this.b=1,Ci(this),n=null,this.c==0&&this.a==94?(Ci(this),e?M=(Ai(),Ai(),++Ar,new Eu(5)):(n=(Ai(),Ai(),++Ar,new Eu(4)),jc(n,0,yE),M=(++Ar,new Eu(4)))):M=(Ai(),Ai(),++Ar,new Eu(4)),c=!0;(I=this.c)!=1&&!(I==0&&this.a==93&&!c);){if(c=!1,i=this.a,r=!1,I==10)switch(i){case 100:case 68:case 119:case 87:case 115:case 83:uw(M,this.Ek(i)),r=!0;break;case 105:case 73:case 99:case 67:i=this.Vk(M,i),i<0&&(r=!0);break;case 112:case 80:if(k=vlt(this,i),!k)throw K(new ri(ai((Kn(),nK))));uw(M,k),r=!0;break;default:i=this.Dk()}else if(I==20){if(f=aM(this.i,58,this.d),f<0)throw K(new ri(ai((Kn(),Rpt))));if(p=!0,bo(this.i,this.d)==94&&(++this.d,p=!1),l=$h(this.i,this.d,f),b=k5t(l,p,(this.e&512)==512),!b)throw K(new ri(ai((Kn(),qFt))));if(uw(M,b),r=!0,f+1>=this.j||bo(this.i,f+1)!=93)throw K(new ri(ai((Kn(),Rpt))));this.d=f+2}if(Ci(this),!r)if(this.c!=0||this.a!=45)jc(M,i,i);else{if(Ci(this),(I=this.c)==1)throw K(new ri(ai((Kn(),kO))));I==0&&this.a==93?(jc(M,i,i),jc(M,45,45)):(v=this.a,I==10&&(v=this.Dk()),Ci(this),jc(M,i,v))}(this.e&oh)==oh&&this.c==0&&this.a==44&&Ci(this)}if(this.c==1)throw K(new ri(ai((Kn(),kO))));return n&&(u4(n,M),M=n),M_(M),a4(M),this.b=0,Ci(this),M},u.Gk=function(){var e,n,i,r;for(i=this.Fk(!1);(r=this.c)!=7;)if(e=this.a,r==0&&(e==45||e==38)||r==4){if(Ci(this),this.c!=9)throw K(new ri(ai((Kn(),ZFt))));if(n=this.Fk(!1),r==4)uw(i,n);else if(e==45)u4(i,n);else if(e==38)M7t(i,n);else throw K(new sc("ASSERT"))}else throw K(new ri(ai((Kn(),YFt))));return Ci(this),i},u.Hk=function(){var e,n;return e=this.a-48,n=(Ai(),Ai(),++Ar,new q$(12,null,e)),!this.g&&(this.g=new nd),Cn(this.g,new h9(e)),Ci(this),n},u.Ik=function(){return Ci(this),Ai(),bXt},u.Jk=function(){return Ci(this),Ai(),mXt},u.Kk=function(){throw K(new ri(ai((Kn(),tl))))},u.Lk=function(){throw K(new ri(ai((Kn(),tl))))},u.Mk=function(){return Ci(this),Rle()},u.Nk=function(){return Ci(this),Ai(),vXt},u.Ok=function(){return Ci(this),Ai(),yXt},u.Pk=function(){var e;if(this.d>=this.j||((e=bo(this.i,this.d++))&65504)!=64)throw K(new ri(ai((Kn(),WFt))));return Ci(this),Ai(),Ai(),++Ar,new ud(0,e-64)},u.Qk=function(){return Ci(this),t_e()},u.Rk=function(){return Ci(this),Ai(),xXt},u.Sk=function(){var e;return e=(Ai(),Ai(),++Ar,new ud(0,105)),Ci(this),e},u.Tk=function(){return Ci(this),Ai(),_Xt},u.Uk=function(){return Ci(this),Ai(),wXt},u.Vk=function(e,n){return this.Dk()},u.Wk=function(){return Ci(this),Ai(),l_t},u.Xk=function(){var e,n,i,r,c;if(this.d+1>=this.j)throw K(new ri(ai((Kn(),jFt))));if(r=-1,n=null,e=bo(this.i,this.d),49<=e&&e<=57){if(r=e-48,!this.g&&(this.g=new nd),Cn(this.g,new h9(r)),++this.d,bo(this.i,this.d)!=41)throw K(new ri(ai((Kn(),g0))));++this.d}else switch(e==63&&--this.d,Ci(this),n=Uht(this),n.e){case 20:case 21:case 22:case 23:break;case 8:if(this.c!=7)throw K(new ri(ai((Kn(),g0))));break;default:throw K(new ri(ai((Kn(),HFt))))}if(Ci(this),c=Lm(this),i=null,c.e==2){if(c.ol()!=2)throw K(new ri(ai((Kn(),GFt))));i=c.kl(1),c=c.kl(0)}if(this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),Ai(),Ai(),++Ar,new nLt(r,n,c,i)},u.Yk=function(){return Ci(this),Ai(),h_t},u.Zk=function(){var e;if(Ci(this),e=$D(24,Lm(this)),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u.$k=function(){var e;if(Ci(this),e=$D(20,Lm(this)),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u._k=function(){var e;if(Ci(this),e=$D(22,Lm(this)),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u.al=function(){var e,n,i,r,c;for(e=0,i=0,n=-1;this.d=this.j)throw K(new ri(ai((Kn(),Ppt))));if(n==45){for(++this.d;this.d=this.j)throw K(new ri(ai((Kn(),Ppt))))}if(n==58){if(++this.d,Ci(this),r=WCt(Lm(this),e,i),this.c!=7)throw K(new ri(ai((Kn(),g0))));Ci(this)}else if(n==41)++this.d,Ci(this),r=WCt(Lm(this),e,i);else throw K(new ri(ai((Kn(),zFt))));return r},u.bl=function(){var e;if(Ci(this),e=$D(21,Lm(this)),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u.cl=function(){var e;if(Ci(this),e=$D(23,Lm(this)),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u.dl=function(){var e,n;if(Ci(this),e=this.f++,n=_$(Lm(this),e),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),n},u.el=function(){var e;if(Ci(this),e=_$(Lm(this),0),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u.fl=function(e){return Ci(this),this.c==5?(Ci(this),BD(e,(Ai(),Ai(),++Ar,new Yb(9,e)))):BD(e,(Ai(),Ai(),++Ar,new Yb(3,e)))},u.gl=function(e){var n;return Ci(this),n=(Ai(),Ai(),++Ar,new jT(2)),this.c==5?(Ci(this),s0(n,PA),s0(n,e)):(s0(n,e),s0(n,PA)),n},u.hl=function(e){return Ci(this),this.c==5?(Ci(this),Ai(),Ai(),++Ar,new Yb(9,e)):(Ai(),Ai(),++Ar,new Yb(3,e))},u.a=0,u.b=0,u.c=0,u.d=0,u.e=0,u.f=1,u.g=null,u.j=0;var AKe=A(qp,"RegEx/RegexParser",730);T(1564,730,{},xxt),u.Ck=function(e){return!1},u.Dk=function(){return Qlt(this)},u.Ek=function(e){return eE(e)},u.Fk=function(e){return oOt(this)},u.Gk=function(){throw K(new ri(ai((Kn(),tl))))},u.Hk=function(){throw K(new ri(ai((Kn(),tl))))},u.Ik=function(){throw K(new ri(ai((Kn(),tl))))},u.Jk=function(){throw K(new ri(ai((Kn(),tl))))},u.Kk=function(){return Ci(this),eE(67)},u.Lk=function(){return Ci(this),eE(73)},u.Mk=function(){throw K(new ri(ai((Kn(),tl))))},u.Nk=function(){throw K(new ri(ai((Kn(),tl))))},u.Ok=function(){throw K(new ri(ai((Kn(),tl))))},u.Pk=function(){return Ci(this),eE(99)},u.Qk=function(){throw K(new ri(ai((Kn(),tl))))},u.Rk=function(){throw K(new ri(ai((Kn(),tl))))},u.Sk=function(){return Ci(this),eE(105)},u.Tk=function(){throw K(new ri(ai((Kn(),tl))))},u.Uk=function(){throw K(new ri(ai((Kn(),tl))))},u.Vk=function(e,n){return uw(e,eE(n)),-1},u.Wk=function(){return Ci(this),Ai(),Ai(),++Ar,new ud(0,94)},u.Xk=function(){throw K(new ri(ai((Kn(),tl))))},u.Yk=function(){return Ci(this),Ai(),Ai(),++Ar,new ud(0,36)},u.Zk=function(){throw K(new ri(ai((Kn(),tl))))},u.$k=function(){throw K(new ri(ai((Kn(),tl))))},u._k=function(){throw K(new ri(ai((Kn(),tl))))},u.al=function(){throw K(new ri(ai((Kn(),tl))))},u.bl=function(){throw K(new ri(ai((Kn(),tl))))},u.cl=function(){throw K(new ri(ai((Kn(),tl))))},u.dl=function(){var e;if(Ci(this),e=_$(Lm(this),0),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u.el=function(){throw K(new ri(ai((Kn(),tl))))},u.fl=function(e){return Ci(this),BD(e,(Ai(),Ai(),++Ar,new Yb(3,e)))},u.gl=function(e){var n;return Ci(this),n=(Ai(),Ai(),++Ar,new jT(2)),s0(n,e),s0(n,PA),n},u.hl=function(e){return Ci(this),Ai(),Ai(),++Ar,new Yb(3,e)};var wy=null,VE=null,kKe=A(qp,"RegEx/ParserForXMLSchema",1564);T(112,1,xE,Ba),u.il=function(e){throw K(new sc("Not supported."))},u.jl=function(){return-1},u.kl=function(e){return null},u.ll=function(){return null},u.ml=function(e){},u.nl=function(e){},u.ol=function(){return 0},u.Ib=function(){return this.pl(0)},u.pl=function(e){return this.e==11?".":""},u.e=0;var c_t,qE,LA,gXt,a_t,Hw=null,tU,ftt=null,u_t,PA,dtt=null,l_t,h_t,f_t,d_t,p_t,mXt,jx,bXt,wXt,vXt,_Xt,XE,yXt,xXt,Ar=0,U3e=A(qp,"RegEx/Token",112);T(130,112,{3:1,130:1,112:1},Eu),u.pl=function(e){var n,i,r;if(this.e==4)if(this==u_t)i=".";else if(this==tU)i="\\d";else if(this==XE)i="\\w";else if(this==jx)i="\\s";else{for(r=new Sp,r.a+="[",n=0;n0&&(r.a+=","),this.b[n]===this.b[n+1]?mo(r,PP(this.b[n])):(mo(r,PP(this.b[n])),r.a+="-",mo(r,PP(this.b[n+1])));r.a+="]",i=r.a}else if(this==f_t)i="\\D";else if(this==p_t)i="\\W";else if(this==d_t)i="\\S";else{for(r=new Sp,r.a+="[^",n=0;n0&&(r.a+=","),this.b[n]===this.b[n+1]?mo(r,PP(this.b[n])):(mo(r,PP(this.b[n])),r.a+="-",mo(r,PP(this.b[n+1])));r.a+="]",i=r.a}return i},u.a=!1,u.c=!1;var LKe=A(qp,"RegEx/RangeToken",130);T(528,1,{528:1},h9),u.a=0;var PKe=A(qp,"RegEx/RegexParser/ReferencePosition",528);T(527,1,{3:1,527:1},q3t),u.Fb=function(e){var n;return e==null||!ct(e,527)?!1:(n=a(e,527),le(this.b,n.b)&&this.a==n.a)},u.Hb=function(){return j1(this.b+"/"+Xlt(this.a))},u.Ib=function(){return this.c.pl(this.a)},u.a=0;var IKe=A(qp,"RegEx/RegularExpression",527);T(195,112,xE,ud),u.jl=function(){return this.a},u.pl=function(e){var n,i;switch(this.e){case 0:switch(this.a){case 124:case 42:case 43:case 63:case 40:case 41:case 46:case 91:case 123:case 92:i="\\"+t$(this.a&qr);break;case 12:i="\\f";break;case 10:i="\\n";break;case 13:i="\\r";break;case 9:i="\\t";break;case 27:i="\\e";break;default:this.a>=ao?(n="0"+(this.a>>>0).toString(16),i="\\v"+$h(n,n.length-6,n.length)):i=""+t$(this.a&qr)}break;case 8:this==l_t||this==h_t?i=""+t$(this.a&qr):i="\\"+t$(this.a&qr);break;default:i=null}return i},u.a=0;var RKe=A(qp,"RegEx/Token/CharToken",195);T(283,112,xE,Yb),u.kl=function(e){return this.a},u.ml=function(e){this.b=e},u.nl=function(e){this.c=e},u.ol=function(){return 1},u.pl=function(e){var n;if(this.e==3)if(this.c<0&&this.b<0)n=this.a.pl(e)+"*";else if(this.c==this.b)n=this.a.pl(e)+"{"+this.c+"}";else if(this.c>=0&&this.b>=0)n=this.a.pl(e)+"{"+this.c+","+this.b+"}";else if(this.c>=0&&this.b<0)n=this.a.pl(e)+"{"+this.c+",}";else throw K(new sc("Token#toString(): CLOSURE "+this.c+Rc+this.b));else if(this.c<0&&this.b<0)n=this.a.pl(e)+"*?";else if(this.c==this.b)n=this.a.pl(e)+"{"+this.c+"}?";else if(this.c>=0&&this.b>=0)n=this.a.pl(e)+"{"+this.c+","+this.b+"}?";else if(this.c>=0&&this.b<0)n=this.a.pl(e)+"{"+this.c+",}?";else throw K(new sc("Token#toString(): NONGREEDYCLOSURE "+this.c+Rc+this.b));return n},u.b=0,u.c=0;var DKe=A(qp,"RegEx/Token/ClosureToken",283);T(731,112,xE,pot),u.kl=function(e){return e==0?this.a:this.b},u.ol=function(){return 2},u.pl=function(e){var n;return this.b.e==3&&this.b.kl(0)==this.a?n=this.a.pl(e)+"+":this.b.e==9&&this.b.kl(0)==this.a?n=this.a.pl(e)+"+?":n=this.a.pl(e)+(""+this.b.pl(e)),n};var NKe=A(qp,"RegEx/Token/ConcatToken",731);T(1562,112,xE,nLt),u.kl=function(e){if(e==0)return this.d;if(e==1)return this.b;throw K(new sc("Internal Error: "+e))},u.ol=function(){return this.b?2:1},u.pl=function(e){var n;return this.c>0?n="(?("+this.c+")":this.a.e==8?n="(?("+this.a+")":n="(?"+this.a,this.b?n+=this.d+"|"+this.b+")":n+=this.d+")",n},u.c=0;var OKe=A(qp,"RegEx/Token/ConditionToken",1562);T(1563,112,xE,yAt),u.kl=function(e){return this.b},u.ol=function(){return 1},u.pl=function(e){return"(?"+(this.a==0?"":Xlt(this.a))+(this.c==0?"":Xlt(this.c))+":"+this.b.pl(e)+")"},u.a=0,u.c=0;var BKe=A(qp,"RegEx/Token/ModifierToken",1563);T(732,112,xE,xot),u.kl=function(e){return this.a},u.ol=function(){return 1},u.pl=function(e){var n;switch(n=null,this.e){case 6:this.b==0?n="(?:"+this.a.pl(e)+")":n="("+this.a.pl(e)+")";break;case 20:n="(?="+this.a.pl(e)+")";break;case 21:n="(?!"+this.a.pl(e)+")";break;case 22:n="(?<="+this.a.pl(e)+")";break;case 23:n="(?"+this.a.pl(e)+")"}return n},u.b=0;var FKe=A(qp,"RegEx/Token/ParenToken",732);T(474,112,{3:1,112:1,474:1},q$),u.ll=function(){return this.b},u.pl=function(e){return this.e==12?"\\"+this.a:o0e(this.b)},u.a=0;var UKe=A(qp,"RegEx/Token/StringToken",474);T(427,112,xE,jT),u.il=function(e){s0(this,e)},u.kl=function(e){return a(bm(this.a,e),112)},u.ol=function(){return this.a?this.a.a.c.length:0},u.pl=function(e){var n,i,r,c,l;if(this.e==1){if(this.a.a.c.length==2)n=a(bm(this.a,0),112),i=a(bm(this.a,1),112),i.e==3&&i.kl(0)==n?c=n.pl(e)+"+":i.e==9&&i.kl(0)==n?c=n.pl(e)+"+?":c=n.pl(e)+(""+i.pl(e));else{for(l=new Sp,r=0;r=this.c.b:this.a<=this.c.b},u.Cc=function(){return this.b>0},u.Dc=function(){return this.b},u.Fc=function(){return this.b-1},u.jc=function(){throw K(new Tp(uzt))},u.a=0,u.b=0;var $Ke=A(Jpt,"ExclusiveRange/RangeIterator",230),el=bM(PO,"C"),Gn=bM(k4,"I"),Ol=bM(sE,"Z"),k0=bM(L4,"J"),Da=bM(T4,"B"),Os=bM(C4,"D"),Gw=bM(A4,"F"),vy=bM(P4,"S"),z3e=Sr("org.eclipse.elk.core.labels","ILabelManager"),g_t=Sr(qs,"DiagnosticChain"),m_t=Sr(OUt,"ResourceSet"),b_t=A(qs,"InvocationTargetException",null),EXt=(x9(),zce),SXt=SXt=Zpe;due(qnt),Oue("permProps",[[[WO,$O],[VO,"gecko1_8"]],[[WO,$O],[VO,"ie10"]],[[WO,$O],[VO,"ie8"]],[[WO,$O],[VO,"ie9"]],[[WO,$O],[VO,"safari"]]]),SXt(null,"elk",null)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],3:[function(g,m,_){"use strict";function S(P,U){if(!(P instanceof U))throw new TypeError("Cannot call a class as a function")}function y(P,U){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:P}function R(P,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);P.prototype=Object.create(U&&U.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(P,U):P.__proto__=U)}var N=g("./elk-api.js").default,B=function(P){R(U,P);function U(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};S(this,U);var q=Object.assign({},W),nt=!1;try{g.resolve("webworker-threads"),nt=!0}catch{}if(W.workerUrl)if(nt){var Q=g("webworker-threads"),X=Q.Worker;q.workerFactory=function(xt){return new X(xt)}}else console.warn(`Web worker requested but 'webworker-threads' package not installed. + endInLayerEdge=`,Fa(e,this.c),e.a};var lUe=A(cp,"BreakingPointInserter/BPInfo",281);T(582,1,{582:1},AH),u.a=!1,u.b=0,u.c=0;var hUe=A(cp,"BreakingPointInserter/Cut",582);T(1194,1,Br,_n),u.Pe=function(e,n){gbe(a(e,31),n)};var fUe=A(cp,"BreakingPointProcessor",1194);T(1195,1,us,$e),u.Nb=function(e){return SLt(a(e,8))};var dUe=A(cp,"BreakingPointProcessor/0methodref$isEnd$Type",1195);T(1196,1,us,er),u.Nb=function(e){return TLt(a(e,8))};var pUe=A(cp,"BreakingPointProcessor/1methodref$isStart$Type",1196);T(1197,1,Br,vs),u.Pe=function(e,n){Lbe(this,a(e,31),n)};var gUe=A(cp,"BreakingPointRemover",1197);T(711,1,{},Vlt),u.b=0,u.e=0,u.f=0,u.j=0;var mUe=A(cp,"GraphStats",711);T(588,1,{},Wo),u.le=function(e,n){return y.Math.max(lt(Yt(e)),lt(Yt(n)))};var bUe=A(cp,"GraphStats/0methodref$max$Type",588);T(712,1,{},Wa),u.le=function(e,n){return y.Math.max(lt(Yt(e)),lt(Yt(n)))};var wUe=A(cp,"GraphStats/1methodref$max$Type",712);T(1418,1,ys,Ys),u.Kb=function(e){return cRt(this.a,a(e,26))};var vUe=A(cp,"GraphStats/lambda$0$Type",1418);T(1419,1,ys,n9),u.Kb=function(e){return uDt(this.a,a(e,26))};var _Ue=A(cp,"GraphStats/lambda$1$Type",1419);T(1420,1,{},Fc),u.sf=function(e,n){var i;return i=a(z(e,(qt(),mbt)),15),i||(we(),we(),fo)},u.tf=function(){return!1};var yUe=A(cp,"ICutIndexCalculator/ManualCutIndexCalculator",1420);T(714,1,{},mf),u.sf=function(e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It;for(It=(n.k==null&&NRt(n),n.k),b=(n.d==null&&NRt(n),n.d),_t=dt(Os,Xo,22,It.length,15,1),_t[0]=It[0],rt=It[0],v=1;vc-f?0:c-f;R<=cm(n.f-1,c+f);R++){if(W=rt/(R+1),nt=0,M=1,l=new Dt,pt=Ps,k=0,g=0,$=b[0],R==0)pt=rt,g=(n.g==null&&(n.g=MPt(n,new Wa)),lt(n.g));else{for(;M=W&&(Ut(l,Xt(M)),pt=y.Math.max(pt,_t[M-1]-k),g+=$,nt+=_t[M-1]-nt,k=_t[M-1],$=b[M]),$=y.Math.max($,b[M]),++M;g+=$}O=y.Math.min(1/pt,1/n.b/g),O>r&&(r=O,i=l)}return i},u.tf=function(){return!1};var xUe=A(cp,"MSDCutIndexHeuristic",714);T(1279,1,Br,Vy),u.Pe=function(e,n){C_e(a(e,31),n)};var MUe=A(cp,"SingleEdgeGraphWrapper",1279);T(189,1,{189:1},Jf),u.Ib=function(){return"NEdge[id="+this.b+" w="+this.g+" d="+this.a+"]"},u.a=1,u.b=0,u.c=0,u.f=!1,u.g=0;var aHt=A(_4,"NEdge",189);T(162,1,{},cl);var EUe=A(_4,"NEdge/NEdgeBuilder",162);T(592,1,{},NG);var SUe=A(_4,"NGraph",592);T(113,1,{113:1},c5t),u.c=-1,u.d=0,u.e=0,u.i=-1,u.j=!1;var I0t=A(_4,"NNode",113);T(717,1,HOt,bit),u.sc=function(e){vo(this,e)},u.uc=function(){return this.xc()},u.jd=function(e){D1(this,e)},u.wc=function(){return new Ei(this,16)},u.xc=function(){return new gi(null,this.wc())},u.bd=function(e,n){++this.b,pm(this.a,e,n)},u.nc=function(e){return fD(this,e)},u.oc=function(e){return++this.b,Or(this.a,e)},u.Pb=function(){++this.b,this.a.c=dt(un,te,1,0,5,1)},u.pc=function(e){return nc(this.a,e,0)!=-1},u.qc=function(e){return O1(this.a,e)},u.cd=function(e){return Ee(this.a,e)},u.dd=function(e){return nc(this.a,e,0)},u.Wb=function(){return this.a.c.length==0},u.tc=function(){return F2(new H(this.a))},u.ed=function(){throw K(new Oi)},u.fd=function(e){throw K(new Oi)},u.gd=function(e){return++this.b,Em(this.a,e)},u.vc=function(e){return tst(this,e)},u.hd=function(e,n){return++this.b,Kl(this.a,e,n)},u._b=function(){return this.a.c.length},u.kd=function(e,n){return new C1(this.a,e,n)},u.yc=function(){return qW(this.a)},u.zc=function(e){return xo(this.a,e)},u.b=0;var TUe=A(_4,"NNode/ChangeAwareArrayList",717);T(251,1,{},Ng);var CUe=A(_4,"NNode/NNodeBuilder",251);T(1482,1,{},q0),u.a=!1,u.f=qi,u.j=0;var AUe=A(_4,"NetworkSimplex",1482);T(276,23,{3:1,34:1,23:1,276:1},j5);var pJ,gJ,mJ,R0t,bJ,D0t=Ri(ka,"CenterEdgeLabelPlacementStrategy",276,ji,aae,Kne),uHt;T(386,23,{3:1,34:1,23:1,386:1},drt);var N0t,wJ,O0t=Ri(ka,"ConstraintCalculationStrategy",386,ji,hoe,Jne),lHt;T(290,23,{3:1,34:1,23:1,290:1},DT);var CB,B0t,AB,kB,LB,F0t,vJ=Ri(ka,"ContentAlignment",290,ji,Gae,Qne),hHt;T(317,23,{3:1,34:1,23:1,317:1,285:1,286:1},prt),u.hf=function(){return j8t(this)},u.uf=function(){return j8t(this)};var S6,T6,U0t=Ri(ka,"CrossingMinimizationStrategy",317,ji,foe,tie),fHt;T(319,23,{3:1,34:1,23:1,319:1},uW);var z0t,_J,PB,j0t=Ri(ka,"CuttingStrategy",319,ji,Woe,eie),dHt;T(384,23,{3:1,34:1,23:1,384:1,285:1,286:1},lW),u.hf=function(){return q8t(this)},u.uf=function(){return q8t(this)};var H0t,yJ,xJ,G0t=Ri(ka,"CycleBreakingStrategy",384,ji,$oe,nie),pHt;T(406,23,{3:1,34:1,23:1,406:1},hW);var C6,MJ,$4,gHt=Ri(ka,"EdgeConstraint",406,ji,Voe,iie),mHt;T(241,23,{3:1,34:1,23:1,241:1},NT);var EJ,SJ,TJ,CJ,IB,AJ,W0t=Ri(ka,"EdgeLabelSideSelection",241,ji,Wae,rie),bHt;T(255,23,{3:1,34:1,23:1,255:1},OT);var kJ,$0t,V0t,RB,q0t,X0t,Z0t=Ri(ka,"FixedAlignment",255,ji,$ae,sie),wHt;T(256,23,{3:1,34:1,23:1,256:1},BT);var Y0t,K0t,J0t,Q0t,V4,tmt,emt=Ri(ka,"GraphCompactionStrategy",256,ji,Vae,oie),vHt;T(233,23,{3:1,34:1,23:1,233:1},jb);var IE,DB,RE,Al,q4,NB,J_,Q_,OB,A6,LJ=Ri(ka,"GraphProperties",233,ji,sle,cie),_Ht;T(318,23,{3:1,34:1,23:1,318:1},fW);var BB,PJ,IJ,nmt=Ri(ka,"GreedySwitchType",318,ji,Goe,aie),yHt;T(280,23,{3:1,34:1,23:1,280:1},dW);var wx,k6,ty,xHt=Ri(ka,"InLayerConstraint",280,ji,Hoe,uie),MHt;T(383,23,{3:1,34:1,23:1,383:1},grt);var RJ,imt,rmt=Ri(ka,"InteractiveReferencePoint",383,ji,doe,lie),EHt,smt,omt,DJ,_w,L6,vx,Zm,FB,cmt,amt,UB,umt,zB,NJ,jB,_x,OJ,HB,wc,lmt,Qc,BJ,P6,w0,DE,yx,xx,I6,Mx,Iu,Ru,ey,xd,li,hmt,fmt,dmt,FJ,tg,GB,Du,Ym,UJ,NE,WB,eg,yw,zJ,SHt,R6,X4,jJ,pmt,HJ,Ex;T(178,23,{3:1,34:1,23:1,178:1},H5);var D6,xw,Z4,Km,Sx,gmt=Ri(ka,"LayerConstraint",178,ji,uae,hie),THt;T(747,1,_d,hj),u.ue=function(e){He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,qft),""),"Content Alignment"),"Specifies how the content of compound nodes is to be aligned, e.g. top-left."),wmt),(i0(),zE)),vJ),qe((t0(),On))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.contentAlignment"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Xft),""),"Feedback Edges"),"Whether feedback edges should be highlighted by routing around the nodes."),(me(),me(),!1)),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.feedBackEdges"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,mO),""),"Interactive Reference Point"),"Determines which point of a node is considered by interactive layout phases."),Smt),xs),rmt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.interactiveReferencePoint"])))),Sa(e,mO,fY,KHt),Sa(e,mO,wY,YHt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Zft),""),"Merge Edges"),"Edges that have no ports are merged so they touch the connected nodes at the same points. When this option is disabled, one port is created for each edge directly connected to a node. When it is enabled, all such incoming edges share an input port, and all outgoing edges share an output port."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.mergeEdges"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Yft),""),"Merge Hierarchy-Crossing Edges"),"If hierarchical layout is active, hierarchy-crossing edges use as few hierarchical ports as possible. They are broken by the algorithm, with hierarchical ports inserted as required. Usually, one such port is created for each edge at each hierarchy crossing point. With this option set to true, we try to create as few hierarchical ports as possible in the process. In particular, all edges that form a hyperedge can share a port."),!0),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.mergeHierarchyEdges"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Kft),""),"Thoroughness"),"How much effort should be spent to produce a nice layout."),Xt(7)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.thoroughness"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Jft),""),"Add Unnecessary Bendpoints"),"Adds bend points even if an edge does not change direction. If true, each long edge dummy will contribute a bend point to its edges and hierarchy-crossing edges will always get a bend point where they cross hierarchy boundaries. By default, bend points are only added where an edge changes direction."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.unnecessaryBendpoints"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Qft),""),"North or South Port"),"Specifies that this port can either be placed on the north side of a node or on the south side (if port constraints permit)"),!1),Ec),ho),qe(ib)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.northOrSouthPort"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,fY),"cycleBreaking"),"Cycle Breaking Strategy"),"Strategy for cycle breaking. Cycle breaking looks for cycles in the graph and determines which edges to reverse to break the cycles. Reversed edges will end up pointing to the opposite direction of regular edges (that is, reversed edges will point left if edges usually point right)."),ymt),xs),G0t),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.cycleBreaking"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,n6),vdt),"Node Layering Strategy"),"Strategy for node layering."),Amt),xs),Tbt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.nodeLayering"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,tdt),vdt),"Layer Constraint"),"Determines a constraint on the placement of the node regarding the layering."),Tmt),xs),gmt),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.layerConstraint"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,edt),vdt),"Wide Nodes on Multiple Layers"),"Strategy to distribute wide nodes over multiple layers."),kmt),xs),zbt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.wideNodesOnMultipleLayers"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,dY),PBt),"Upper Bound On Width [MinWidth Layerer]"),"Defines a loose upper bound on the width of the MinWidth layerer. If set to '-1' multiple values are tested and the best result is selected."),Xt(4)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.minWidthUpperBoundOnWidth"])))),Sa(e,dY,n6,nGt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,pY),PBt),"Upper Layer Estimation Scaling Factor [MinWidth Layerer]"),"Multiplied with Upper Bound On Width for defining an upper bound on the width of layers which haven't been determined yet, but whose maximum width had been (roughly) estimated by the MinWidth algorithm. Compensates for too high estimations. If set to '-1' multiple values are tested and the best result is selected."),Xt(2)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.minWidthUpperLayerEstimationScalingFactor"])))),Sa(e,pY,n6,rGt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,gY),IBt),"Node Promotion Strategy"),"Reduces number of dummy nodes after layering phase (if possible)."),Cmt),xs),Rbt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.nodePromotion"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,mY),IBt),"Max Node Promotion Iterations"),"Limits the number of iterations for node promotion."),Xt(0)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.nodePromotionBoundary"])))),Sa(e,mY,gY,null),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,bY),"layering.coffmanGraham"),"Layer Bound"),"The maximum number of nodes allowed per layer."),Xt(qi)),Pa),Io),qe(On)))),Sa(e,bY,n6,QHt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,wY),_dt),"Crossing Minimization Strategy"),"Strategy for crossing minimization."),_mt),xs),U0t),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.crossMin"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,ndt),_dt),"Hierarchical Sweepiness"),"How likely it is to use cross-hierarchy (1) vs bottom-up (-1)."),.1),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,idt),_dt),"Semi-Interactive Crossing Minimization"),"Preserves the order of nodes within a layer but still minimizes crossings between edges connecting long edge dummies. Derives the desired order from positions specified by the 'org.eclipse.elk.position' layout option. Requires a crossing minimization strategy that is able to process 'in-layer' constraints."),!1),Ec),ho),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,rdt),RBt),"Greedy Switch Activation Threshold"),"By default it is decided automatically if the greedy switch is activated or not. The decision is based on whether the size of the input graph (without dummy nodes) is smaller than the value of this option. A '0' enforces the activation."),Xt(40)),Pa),Io),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,sdt),RBt),"Greedy Switch Crossing Minimization"),"Greedy Switch strategy for crossing minimization. The greedy switch heuristic is executed after the regular layer sweep as a post-processor."),vmt),xs),nmt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.greedySwitch"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,mE),DBt),"Node Placement Strategy"),"Strategy for node placement."),Rmt),xs),Abt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.nodePlace"])))),He(e,new De(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,vY),DBt),"Favor Straight Edges Over Balancing"),"Favor straight edges over a balanced node placement. The default behavior is determined automatically based on the used 'edgeRouting'. For an orthogonal style it is set to true, for all other styles to false."),Ec),ho),qe(On)))),Sa(e,vY,mE,mGt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,_Y),NBt),"BK Edge Straightening"),"Specifies whether the Brandes Koepf node placer tries to increase the number of straight edges at the expense of diagram size. There is a subtle difference to the 'favorStraightEdges' option, which decides whether a balanced placement of the nodes is desired, or not. In bk terms this means combining the four alignments into a single balanced one, or not. This option on the other hand tries to straighten additional edges during the creation of each of the four alignments."),Lmt),xs),$bt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.nodeplace.compactionStrategy"])))),Sa(e,_Y,mE,fGt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,yY),NBt),"BK Fixed Alignment"),"Tells the BK node placer to use a certain alignment (out of its four) instead of the one producing the smallest height, or the combination of all four."),Pmt),xs),Z0t),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.fixedAlignment"])))),Sa(e,yY,mE,pGt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,xY),"nodePlacement.linearSegments"),"Linear Segments Deflection Dampening"),"Dampens the movement of nodes to keep the diagram from getting too large."),.3),ha),To),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.linearSegmentsDeflectionDampening"])))),Sa(e,xY,mE,wGt),He(e,new De(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,MY),"nodePlacement.networkSimplex"),"Node Flexibility"),"Aims at shorter and straighter edges. Two configurations are possible: (a) allow ports to move freely on the side they are assigned to (the order is always defined beforehand), (b) additionally allow to enlarge a node wherever it helps. If this option is not configured for a node, the 'nodeFlexibility.default' value is used, which is specified for the node's parent."),xs),nQ),qe(vc)))),Sa(e,MY,mE,yGt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,odt),"nodePlacement.networkSimplex.nodeFlexibility"),"Node Flexibility Default"),"Default value of the 'nodeFlexibility' option for the children of a hierarchical node."),Imt),xs),nQ),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,EY),ydt),"Spline Self-Loop Placement"),null),Emt),xs),Obt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.splines.selfLoopPlacement"])))),Sa(e,EY,i6,zHt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,bO),ydt),"Sloppy Spline Routing"),"Use less spline control points at the start and end of an edge. Might lead to crossings edge/node overlap."),!0),Ec),ho),qe(On)))),Sa(e,bO,i6,WHt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,wO),ydt),"Sloppy Spline Layer Spacing Factor"),"Spacing factor for routing area between layers when using sloppy spline routing."),.4),ha),To),qe(On)))),Sa(e,wO,i6,HHt),Sa(e,wO,bO,!0),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,cdt),J1),"Edge Node Between Layers Spacing"),"The spacing to be preserved between nodes and edges that are routed next to the node's layer. For the spacing between nodes and edges that cross the node's layer 'spacing.edgeNode' is used."),10),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,adt),J1),"Edge Edge Between Layer Spacing"),"Spacing to be preserved between pairs of edges that are routed between the same pair of layers. Note that 'spacing.edgeEdge' is used for the spacing between pairs of edges crossing the same layer."),10),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,udt),J1),"Node Node Between Layers Spacing"),"The spacing to be preserved between any pair of nodes of two adjacent layers. Note that 'spacing.nodeNode' is used for the spacing between nodes within the layer itself."),20),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,ldt),xdt),"Direction Priority"),"Defines how important it is to have a certain edge point into the direction of the overall layout. This option is evaluated during the cycle breaking phase."),Xt(0)),Pa),Io),qe(Md)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,hdt),xdt),"Shortness Priority"),"Defines how important it is to keep an edge as short as possible. This option is evaluated during the layering phase."),Xt(0)),Pa),Io),qe(Md)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,fdt),xdt),"Straightness Priority"),"Defines how important it is to keep an edge straight, i.e. aligned with one of the two axes. This option is evaluated during node placement."),Xt(0)),Pa),Io),qe(Md)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,SY),"compaction"),oBt),"Tries to further compact components (disconnected sub-graphs)."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.components.compact"])))),Sa(e,SY,KP,!0),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,ddt),OBt),"Post Compaction Strategy"),BBt),bmt),xs),emt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.postCompaction"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,pdt),OBt),"Post Compaction Constraint Calculation"),BBt),mmt),xs),O0t),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.postCompaction.constraints"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,vO),Mdt),"High Degree Node Treatment"),"Makes room around high degree nodes to place leafs and trees."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.highDegreeNode.treatment"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,TY),Mdt),"High Degree Node Threshold"),"Whether a node is considered to have a high degree."),Xt(16)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.highDegreeNode.threshold"])))),Sa(e,TY,vO,!0),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,CY),Mdt),"High Degree Node Maximum Tree Height"),"Maximum height of a subtree connected to a high degree node to be moved to separate layers."),Xt(5)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.highDegreeNode.treeHeight"])))),Sa(e,CY,vO,!0),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,x4),Edt),"Graph Wrapping Strategy"),"For certain graphs and certain prescribed drawing areas it may be desirable to split the laid out graph into chunks that are placed side by side. The edges that connect different chunks are 'wrapped' around from the end of one chunk to the start of the other chunk. The points between the chunks are referred to as 'cuts'."),Bmt),xs),jbt),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,gdt),Edt),"Additional Wrapped Edges Spacing"),"To visually separate edges that are wrapped from regularly routed edges an additional spacing value can be specified in form of this layout option. The spacing is added to the regular edgeNode spacing."),10),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,mdt),Edt),"Correction factor for the wrapping"),"At times and for certain types of graphs the executed wrapping may produce results that are consistently biased in the same fashion: either wrapping to often or to rarely. This factor can be used to correct the bias. Internally, it is simplay multiplied with the 'aspect ratio' layout option."),1),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,_O),FBt),"Cutting Strategy"),"The strategy by which the layer indexes are determined at which the layering crumbles into chunks."),Nmt),xs),j0t),qe(On)))),He(e,new De(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,AY),FBt),"Manually Specified Cuts"),"Allows the user to specify her own cuts for a certain graph."),Ed),Sl),qe(On)))),Sa(e,AY,_O,NGt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,kY),"wrapping.cutting.msd"),"MSD Freedom"),"The MSD cutting strategy starts with an initial guess on the number of chunks the graph should be split into. The freedom specifies how much the strategy may deviate from this guess. E.g. if an initial number of 3 is computed, a freedom of 1 allows 2, 3, and 4 cuts."),Dmt),Pa),Io),qe(On)))),Sa(e,kY,_O,BGt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,LY),"wrapping.singleEdge.validify"),"Path-Like Validify Strategy"),"When wrapping path-like graphs, the graph must not be split between any pair of layers. The validify strategy makes sure every computed split point is allowed."),Omt),xs),Ubt),qe(On)))),Sa(e,LY,x4,VGt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,yO),Sdt),"Improve Cuts"),"For general graphs it is important that not too many edges wrap backwards. Thus a compromise between evenly-distributed cuts and the total number of cut edges is sought."),!0),Ec),ho),qe(On)))),Sa(e,yO,x4,HGt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,xO),Sdt),"Distance Penalty When Improving Cuts"),null),2),ha),To),qe(On)))),Sa(e,xO,x4,zGt),Sa(e,xO,yO,!0),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,PY),Sdt),"Improve Wrapped Edges"),"The initial wrapping is performed in a very simple way. As a consequence, edges that wrap from one chunk to another may be unnecessarily long. Activating this option tries to shorten such edges."),!0),Ec),ho),qe(On)))),Sa(e,PY,x4,WGt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,bdt),IY),"Edge Label Side Selection"),"Method to decide on edge label sides."),Mmt),xs),W0t),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.edgeLabelSideSelection"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,wdt),IY),"Edge Center Label Placement Strategy"),"Determines in which layer center labels of long edges should be placed."),xmt),xs),D0t),ur(On,Y(Z(Jp,1),jt,163,0,[og]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.edgeLabelPlacementStrategy"])))),bOt((new x8,e))};var CHt,AHt,mmt,kHt,bmt,LHt,wmt,PHt,IHt,vmt,RHt,DHt,NHt,_mt,OHt,ymt,BHt,xmt,FHt,Mmt,UHt,Emt,zHt,jHt,HHt,GHt,WHt,$Ht,VHt,qHt,XHt,ZHt,Smt,YHt,KHt,JHt,QHt,tGt,Tmt,eGt,nGt,iGt,rGt,sGt,oGt,Cmt,cGt,Amt,aGt,kmt,uGt,lGt,hGt,Lmt,fGt,dGt,Pmt,pGt,gGt,mGt,bGt,wGt,vGt,_Gt,Imt,yGt,xGt,Rmt,MGt,EGt,SGt,TGt,CGt,AGt,kGt,LGt,PGt,IGt,RGt,DGt,NGt,OGt,Dmt,BGt,FGt,Nmt,UGt,zGt,jGt,HGt,GGt,WGt,$Gt,Omt,VGt,qGt,Bmt,kUe=A(ka,"LayeredMetaDataProvider",747);T(878,1,_d,x8),u.ue=function(e){bOt(e)};var Bf,$B,Y4,GJ,Fmt,VB,WJ,Umt,qB,zmt,$J,OE,jmt,K4,ch,Hmt,XB,Gmt,ng,J4,ig,Wmt,$mt,Vmt,ZB,up,N6,Q4,qmt,Xmt,Zmt,YB,ny,Mw,Ymt,Ro,Kmt,la,Jmt,Qmt,tbt,VJ,ebt,O6,KB,nbt,ibt,Oh,rbt,qJ,tA,sbt,Jm,eA,JB,Ew,BE,QB,XJ,v0,obt,cbt,abt,ubt,lbt,XGt,ZGt,YGt,KGt,Sw,Tw,Qi,_0,hbt,Tx,nA,Cw,JGt,B6,fbt,Cx,QGt,tWt,ZJ,nf,Ax,F6,y0,iy,tF,kx,dbt,iA,lp,Aw,YJ,rA,U6,KJ,pbt,gbt,mbt,bbt,JJ,wbt,vbt,_bt,ybt,xbt,LUe=A(ka,"LayeredOptions",878);T(879,1,{},Lk),u.Be=function(){var e;return e=new yu,e},u.Ce=function(e){};var PUe=A(ka,"LayeredOptions/LayeredFactory",879);T(291,23,{3:1,34:1,23:1,291:1,285:1,286:1},FT),u.hf=function(){return mDt(this)},u.uf=function(){return mDt(this)};var QJ,Mbt,Ebt,eF,tQ,Sbt,Tbt=Ri(ka,"LayeringStrategy",291,ji,qae,fie),eWt;T(179,23,{3:1,34:1,23:1,179:1},W9);var ry,sy,nF,eQ,nQ=Ri(ka,"NodeFlexibility",179,ji,$ce,die),nWt;T(292,23,{3:1,34:1,23:1,292:1,285:1,286:1},G5),u.hf=function(){return Q9t(this)},u.uf=function(){return Q9t(this)};var z6,iQ,rQ,j6,Cbt,Abt=Ri(ka,"NodePlacementStrategy",292,ji,lae,pie),iWt;T(240,23,{3:1,34:1,23:1,240:1},w2);var kbt,H6,Lbt,Pbt,G6,Ibt,iF,rF,Rbt=Ri(ka,"NodePromotionStrategy",240,ji,Iue,gie),rWt;T(410,23,{3:1,34:1,23:1,410:1},pW);var Ga,ba,sF,sWt=Ri(ka,"PortType",410,ji,qoe,mie),oWt;T(345,23,{3:1,34:1,23:1,345:1},gW);var Dbt,Nbt,sQ,Obt=Ri(ka,"SelfLoopPlacement",345,ji,Xoe,bie),cWt;T(266,1,{266:1},G8t);var IUe=A(ka,"Spacings",266);T(347,23,{3:1,34:1,23:1,347:1},mW);var oQ,Bbt,Fbt,Ubt=Ri(ka,"ValidifyStrategy",347,ji,Zoe,wie),aWt;T(385,23,{3:1,34:1,23:1,385:1},bW);var W6,$6,V6,zbt=Ri(ka,"WideNodesStrategy",385,ji,Koe,vie),uWt;T(346,23,{3:1,34:1,23:1,346:1},wW);var q6,cQ,aQ,jbt=Ri(ka,"WrappingStrategy",346,ji,Yoe,_ie),lWt;T(1296,1,Pu,jMt),u.vf=function(e){return a(e,31),hWt},u.Pe=function(e,n){L2e(this,a(e,31),n)};var hWt,RUe=A(spt,"DepthFirstCycleBreaker",1296);T(1295,1,Pu,DCt),u.vf=function(e){return a(e,31),fWt},u.Pe=function(e,n){p3e(this,a(e,31),n)};var fWt,DUe=A(spt,"GreedyCycleBreaker",1295);T(1297,1,Pu,a5),u.vf=function(e){return a(e,31),dWt},u.Pe=function(e,n){Dye(this,a(e,31),n)};var dWt,NUe=A(spt,"InteractiveCycleBreaker",1297);T(1300,1,Pu,HMt),u.vf=function(e){return a(e,31),pWt},u.Pe=function(e,n){u3e(this,a(e,31),n)};var pWt,OUe=A(pw,"CoffmanGrahamLayerer",1300);T(1301,1,jr,Mp),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Q0e(this.a,a(e,8),a(n,8))};var BUe=A(pw,"CoffmanGrahamLayerer/lambda$0$Type",1301);T(1302,1,jr,i9),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Nre(this.a,e,n)};var FUe=A(pw,"CoffmanGrahamLayerer/lambda$1$Type",1302);T(1303,1,Pu,X0),u.vf=function(e){return a(e,31),Ni(Ni(new as,(Mo(),Of),(Po(),aJ)),aa,PE)},u.Pe=function(e,n){vxe(this,a(e,31),n)};var UUe=A(pw,"InteractiveLayerer",1303);T(511,1,{511:1},pxt),u.a=0,u.c=0;var zUe=A(pw,"InteractiveLayerer/LayerSpan",511);T(1299,1,Pu,y8),u.vf=function(e){return Dfe(a(e,31))},u.Pe=function(e,n){uwe(this,a(e,31),n)};var gWt,mWt,bWt,jUe=A(pw,"LongestPathLayerer",1299);T(1306,1,Pu,M8),u.vf=function(e){return a(e,31),Ni(Ni(new as,(Mo(),Of),(Po(),G4)),aa,PE)},u.Pe=function(e,n){Gxe(this,a(e,31),n)},u.a=0,u.b=0,u.d=0;var Hbt,Gbt,HUe=A(pw,"MinWidthLayerer",1306);T(1307,1,jr,Ac),u.Ld=function(e,n){return Mle(this,a(e,8),a(n,8))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var GUe=A(pw,"MinWidthLayerer/MinOutgoingEdgesComparator",1307);T(1298,1,Pu,rSt),u.vf=function(e){return Rpe(this,a(e,31))},u.Pe=function(e,n){eye(this,a(e,31),n)};var wWt,vWt,_Wt,WUe=A(pw,"NetworkSimplexLayerer",1298);T(1304,1,Pu,pTt),u.vf=function(e){return a(e,31),Ni(Ni(new as,(Mo(),Of),(Po(),G4)),aa,PE)},u.Pe=function(e,n){q2e(this,a(e,31),n)},u.d=0,u.f=0,u.g=0,u.i=0,u.s=0,u.t=0,u.u=0;var $Ue=A(pw,"StretchWidthLayerer",1304);T(1305,1,jr,bv),u.Ld=function(e,n){return Sae(a(e,8),a(n,8))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var VUe=A(pw,"StretchWidthLayerer/1",1305);T(422,1,opt),u.lf=function(e,n,i,r,c,l){},u.xf=function(e,n,i){return UNt(this,e,n,i)},u.kf=function(){this.g=dt(Gw,jBt,22,this.d,15,1),this.f=dt(Gw,jBt,22,this.d,15,1)},u.mf=function(e,n){this.e[e]=dt(Gn,pi,22,n[e].length,15,1)},u.nf=function(e,n,i){var r;r=i[e][n],r.o=n,this.e[e][n]=n},u.of=function(e,n,i,r){a(Ee(r[e][n].i,i),11).o=this.d++},u.b=0,u.c=0,u.d=0;var qUe=A(Qu,"AbstractBarycenterPortDistributor",422);T(1484,1,jr,kH),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return ode(this.a,e,n)};var XUe=A(Qu,"AbstractBarycenterPortDistributor/lambda$0$Type",1484);T(1532,1,e6,okt),u.lf=function(e,n,i,r,c,l){},u.nf=function(e,n,i){},u.of=function(e,n,i,r){},u.jf=function(){return!1},u.kf=function(){this.a=this.c.a,this.e=this.d.g},u.mf=function(e,n){n[e][0].c.o=e},u.pf=function(){return!1},u.qf=function(e,n,i,r){var c,l,f,g,b,v,M;for(n!=gSt(i,e.length)&&(l=e[n-(i?1:-1)],Nct(this.d,l,i?(Fo(),ba):(Fo(),Ga))),c=e[n][0],M=!r||c.j==(Ke(),rs),v=Vg(e[n]),U6t(this,v,M,!1,i),f=0,b=new H(v);b.a"),e0?Q$(this.a,e[n-1],e[n]):!i&&n1&&(c.i==(Ht(),Qe)?this.b[e]=!0:c.i==on&&e>0&&(this.b[e-1]=!0))},u.f=0;var fze=A(h0,"AllCrossingsCounter",1528);T(602,1,{},WV),u.b=0,u.d=0;var dze=A(h0,"BinaryIndexedTree",602);T(473,1,{},K5);var pze=A(h0,"CrossingsCounter",473);T(1557,1,jr,RH),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Mre(this.a,e,n)};var gze=A(h0,"CrossingsCounter/lambda$0$Type",1557);T(1558,1,jr,DH),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Ere(this.a,e,n)};var mze=A(h0,"CrossingsCounter/lambda$1$Type",1558);T(1559,1,jr,NH),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Sre(this.a,e,n)};var bze=A(h0,"CrossingsCounter/lambda$2$Type",1559);T(1560,1,jr,OH),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Tre(this.a,e,n)};var wze=A(h0,"CrossingsCounter/lambda$3$Type",1560);T(1555,1,{},BH);var vze=A(h0,"HyperedgeCrossingsCounter",1555);T(426,1,{34:1,426:1},gTt),u.vd=function(e){return Kfe(this,a(e,426))},u.b=0,u.c=0,u.e=0,u.f=0;var V3e=A(h0,"HyperedgeCrossingsCounter/Hyperedge",426);T(336,1,{34:1,336:1},QD),u.vd=function(e){return Yme(this,a(e,336))},u.b=0,u.c=0;var AWt=A(h0,"HyperedgeCrossingsCounter/HyperedgeCorner",336);T(472,23,{3:1,34:1,23:1,472:1},mrt);var oA,cA,kWt=Ri(h0,"HyperedgeCrossingsCounter/HyperedgeCorner/Type",472,ji,yoe,xie),LWt;T(1556,1,{},ZH),u.e=!0,u.f=0,u.g=0;var _ze=A(h0,"NorthSouthEdgeAllCrossingsCounter",1556);T(1311,1,Pu,E8),u.vf=function(e){return a(z(a(e,31),(Ft(),Qc)),19).pc((So(),Al))?PWt:null},u.Pe=function(e,n){Qpe(this,a(e,31),n)};var PWt,yze=A(lo,"InteractiveNodePlacer",1311);T(1312,1,Pu,g1),u.vf=function(e){return a(z(a(e,31),(Ft(),Qc)),19).pc((So(),Al))?IWt:null},u.Pe=function(e,n){Yde(this,a(e,31),n)};var IWt,aF,uF,xze=A(lo,"LinearSegmentsNodePlacer",1312);T(235,1,{34:1,235:1},wit),u.vd=function(e){return QQt(this,a(e,235))},u.Fb=function(e){var n;return ct(e,235)?(n=a(e,235),this.b==n.b):!1},u.Hb=function(){return this.b},u.Ib=function(){return"ls"+Gp(this.f)},u.a=0,u.b=0,u.c=-1,u.d=-1,u.i=0;var RWt=A(lo,"LinearSegmentsNodePlacer/LinearSegment",235);T(1314,1,Pu,C4t),u.vf=function(e){return a(z(a(e,31),(Ft(),Qc)),19).pc((So(),Al))?DWt:null},u.Pe=function(e,n){i3e(this,a(e,31),n)},u.b=0,u.g=0;var DWt,Mze=A(lo,"NetworkSimplexPlacer",1314);T(1333,1,jr,Tg),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Lp(a(e,21).a,a(n,21).a)};var Eze=A(lo,"NetworkSimplexPlacer/0methodref$compare$Type",1333);T(1335,1,jr,pc),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Lp(a(e,21).a,a(n,21).a)};var Sze=A(lo,"NetworkSimplexPlacer/1methodref$compare$Type",1335);T(584,1,{584:1},NMt);var q3e=A(lo,"NetworkSimplexPlacer/EdgeRep",584);T(416,1,{416:1},Wot),u.b=!1;var X3e=A(lo,"NetworkSimplexPlacer/NodeRep",416);T(460,12,{3:1,4:1,20:1,25:1,41:1,12:1,13:1,15:1,49:1,460:1},wxt);var Tze=A(lo,"NetworkSimplexPlacer/Path",460);T(1315,1,ys,xb),u.Kb=function(e){return a(e,14).d.g.j};var Cze=A(lo,"NetworkSimplexPlacer/Path/lambda$0$Type",1315);T(1316,1,us,qy),u.Nb=function(e){return a(e,232)==(Ke(),Hr)};var Aze=A(lo,"NetworkSimplexPlacer/Path/lambda$1$Type",1316);T(1317,1,ys,A3),u.Kb=function(e){return a(e,14).d.g};var kze=A(lo,"NetworkSimplexPlacer/Path/lambda$2$Type",1317);T(1318,1,us,FH),u.Nb=function(e){return eTt(NIt(a(e,8)))};var Lze=A(lo,"NetworkSimplexPlacer/Path/lambda$3$Type",1318);T(1319,1,us,mv),u.Nb=function(e){return Eu(),(Ht(),ab).pc(a(e,11).i)};var Pze=A(lo,"NetworkSimplexPlacer/lambda$0$Type",1319);T(1320,1,{},OMt),u.td=function(e){ree(this.a,this.b,e)};var Ize=A(lo,"NetworkSimplexPlacer/lambda$1$Type",1320);T(1329,1,{},UH),u.td=function(e){L0e(this.a,e)};var Rze=A(lo,"NetworkSimplexPlacer/lambda$10$Type",1329);T(1330,1,ys,Pk),u.Kb=function(e){return Eu(),new gi(null,new Ei(a(e,26).a,16))};var Dze=A(lo,"NetworkSimplexPlacer/lambda$11$Type",1330);T(1331,1,{},zH),u.td=function(e){zwe(this.a,e)};var Nze=A(lo,"NetworkSimplexPlacer/lambda$12$Type",1331);T(1332,1,ys,f1),u.Kb=function(e){return Eu(),Xt(a(e,113).e)};var Oze=A(lo,"NetworkSimplexPlacer/lambda$13$Type",1332);T(1334,1,ys,FS),u.Kb=function(e){return Eu(),Xt(a(e,113).e)};var Bze=A(lo,"NetworkSimplexPlacer/lambda$14$Type",1334);T(1336,1,us,k3),u.Nb=function(e){return Eu(),a(e,416).c.j==(Ke(),gs)};var Fze=A(lo,"NetworkSimplexPlacer/lambda$15$Type",1336);T(1337,1,us,L3),u.Nb=function(e){return Eu(),a(e,416).c.i.c.length>1};var Uze=A(lo,"NetworkSimplexPlacer/lambda$16$Type",1337);T(1338,1,{},M4t),u.td=function(e){Afe(this.c,this.b,this.d,this.a,e)},u.c=0,u.d=0;var zze=A(lo,"NetworkSimplexPlacer/lambda$17$Type",1338);T(1339,1,{},jH),u.td=function(e){bee(this.a,e)},u.a=0;var jze=A(lo,"NetworkSimplexPlacer/lambda$18$Type",1339);T(1340,1,ys,Zy),u.Kb=function(e){return Eu(),new gi(null,new Ei(a(e,26).a,16))};var Hze=A(lo,"NetworkSimplexPlacer/lambda$19$Type",1340);T(1321,1,ys,P3),u.Kb=function(e){return Eu(),new gi(null,new Ei(a(e,26).a,16))};var Gze=A(lo,"NetworkSimplexPlacer/lambda$2$Type",1321);T(1341,1,{},x5),u.td=function(e){kee(this.a,e)};var Wze=A(lo,"NetworkSimplexPlacer/lambda$20$Type",1341);T(1342,1,us,Mb),u.Nb=function(e){return eTt(e)};var $ze=A(lo,"NetworkSimplexPlacer/lambda$21$Type",1342);T(1343,1,ys,Ag),u.Kb=function(e){return Eu(),new gi(null,new Ei(a(e,26).a,16))};var Vze=A(lo,"NetworkSimplexPlacer/lambda$22$Type",1343);T(1344,1,us,HH),u.Nb=function(e){return zte(this.a,e)};var qze=A(lo,"NetworkSimplexPlacer/lambda$23$Type",1344);T(1345,1,{},BMt),u.td=function(e){ege(this.a,this.b,e)};var Xze=A(lo,"NetworkSimplexPlacer/lambda$24$Type",1345);T(1346,1,us,vv),u.Nb=function(e){return Eu(),!ec(a(e,14))};var Zze=A(lo,"NetworkSimplexPlacer/lambda$25$Type",1346);T(1347,1,us,US),u.Nb=function(e){return Eu(),!ec(a(e,14))};var Yze=A(lo,"NetworkSimplexPlacer/lambda$26$Type",1347);T(1348,1,{},M5),u.le=function(e,n){return mee(this.a,e,n)};var Kze=A(lo,"NetworkSimplexPlacer/lambda$27$Type",1348);T(1322,1,ys,Ik),u.Kb=function(e){return Eu(),new gi(null,new T2(Rn(br(a(e,8)))))};var Jze=A(lo,"NetworkSimplexPlacer/lambda$3$Type",1322);T(1323,1,us,zS),u.Nb=function(e){return Eu(),Sce(a(e,14))};var Qze=A(lo,"NetworkSimplexPlacer/lambda$4$Type",1323);T(1324,1,{},GH),u.td=function(e){v_e(this.a,a(e,14))};var tje=A(lo,"NetworkSimplexPlacer/lambda$5$Type",1324);T(1325,1,ys,_v),u.Kb=function(e){return Eu(),new gi(null,new Ei(a(e,26).a,16))};var eje=A(lo,"NetworkSimplexPlacer/lambda$6$Type",1325);T(1326,1,us,Yy),u.Nb=function(e){return Eu(),a(e,8).j==(Ke(),gs)};var nje=A(lo,"NetworkSimplexPlacer/lambda$7$Type",1326);T(1327,1,ys,w),u.Kb=function(e){return Eu(),new gi(null,new T2(Rn(Jg(a(e,8)))))};var ije=A(lo,"NetworkSimplexPlacer/lambda$8$Type",1327);T(1328,1,us,S),u.Nb=function(e){return Eu(),_re(a(e,14))};var rje=A(lo,"NetworkSimplexPlacer/lambda$9$Type",1328);T(1310,1,Pu,Sv),u.vf=function(e){return a(z(a(e,31),(Ft(),Qc)),19).pc((So(),Al))?NWt:null},u.Pe=function(e,n){Y_e(a(e,31),n)};var NWt,sje=A(lo,"SimpleNodePlacer",1310);T(164,1,{164:1},A_),u.Ib=function(){var e;return e="",this.c==(Sf(),Qm)?e+=gE:this.c==Xp&&(e+=pE),this.o==(Zh(),x0)?e+=BY:this.o==rf?e+="UP":e+="BALANCED",e};var oje=A($p,"BKAlignedLayout",164);T(466,23,{3:1,34:1,23:1,466:1},brt);var Xp,Qm,OWt=Ri($p,"BKAlignedLayout/HDirection",466,ji,woe,Tie),BWt;T(465,23,{3:1,34:1,23:1,465:1},wrt);var x0,rf,FWt=Ri($p,"BKAlignedLayout/VDirection",465,ji,voe,Cie),UWt;T(1485,1,{},FMt);var cje=A($p,"BKAligner",1485);T(1488,1,{},n8t);var aje=A($p,"BKCompactor",1488);T(593,1,{593:1},q),u.a=0;var uje=A($p,"BKCompactor/ClassEdge",593);T(423,1,{423:1},gxt),u.a=null,u.b=0;var lje=A($p,"BKCompactor/ClassNode",423);T(1313,1,Pu,GMt),u.vf=function(e){return a(z(a(e,31),(Ft(),Qc)),19).pc((So(),Al))?zWt:null},u.Pe=function(e,n){w3e(this,a(e,31),n)},u.a=!1,u.e=!1;var zWt,hje=A($p,"BKNodePlacer",1313);T(437,23,{3:1,34:1,23:1,437:1},vrt);var lF,Wbt,$bt=Ri($p,"EdgeStraighteningStrategy",437,ji,boe,Aie),jWt;T(1486,1,{},st),u.d=0;var fje=A($p,"NeighborhoodInformation",1486);T(1487,1,jr,WH),u.Ld=function(e,n){return Mue(this,a(e,48),a(n,48))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var dje=A($p,"NeighborhoodInformation/NeighborComparator",1487);T(724,1,{});var pje=A($p,"ThresholdStrategy",724);T(1510,724,{},xxt),u.yf=function(e,n,i){return this.a.o==(Zh(),rf)?is:Ps},u.zf=function(){};var gje=A($p,"ThresholdStrategy/NullThresholdStrategy",1510);T(522,1,{522:1},zMt),u.c=!1,u.d=!1;var mje=A($p,"ThresholdStrategy/Postprocessable",522);T(1511,724,{},Mxt),u.yf=function(e,n,i){var r,c,l;return c=n==i,r=this.a.a[i.o]==n,c||r?(l=e,this.a.c==(Sf(),Qm)?(c&&(l=rZ(this,n,!0)),!isNaN(l)&&!isFinite(l)&&r&&(l=rZ(this,i,!1))):(c&&(l=rZ(this,n,!0)),!isNaN(l)&&!isFinite(l)&&r&&(l=rZ(this,i,!1))),l):e},u.zf=function(){for(var e,n,i,r,c;this.c.b!=0;)c=a(Toe(this.c),522),r=ZNt(this,c),r.a&&(e=r.a,i=lt(this.a.f[this.a.g[c.b.o].o]),!(!i&&!ec(e)&&e.c.g.c==e.d.g.c)&&(n=nDt(this,c),n||UEt(this.d,c)));for(;this.d.a.c.length!=0;)nDt(this,a(Hat(this.d),522))};var bje=A($p,"ThresholdStrategy/SimpleThresholdStrategy",1511);T(573,1,{573:1,285:1,286:1},vt),u.hf=function(){return JPt(this)},u.uf=function(){return JPt(this)};var uQ,wje=A(F_,"EdgeRouterFactory",573);T(1356,1,Pu,_j),u.vf=function(e){return gwe(a(e,31))},u.Pe=function(e,n){gye(a(e,31),n)};var HWt,GWt,WWt,$Wt,VWt,Vbt,qWt,XWt,vje=A(F_,"OrthogonalEdgeRouter",1356);T(594,1,{},pX),u.a=0,u.c=0;var _je=A(F_,"OrthogonalRoutingGenerator",594);T(252,1,{252:1},LN),u.Ib=function(){return this.a+"->"+this.b},u.c=0;var yje=A(F_,"OrthogonalRoutingGenerator/Dependency",252);T(165,1,{34:1,165:1},s6t),u.vd=function(e){return tte(this,a(e,165))},u.Fb=function(e){var n;return ct(e,165)?(n=a(e,165),this.d==n.d):!1},u.Hb=function(){return this.d},u.Ib=function(){var e,n,i,r;for(e=new ll("{"),r=new H(this.g);r.aop&&(c=new We(b,k),Xi(i.a,c),LP(this.a,i,e,c,!1),l=new We(M,k),Xi(i.a,l),LP(this.a,i,e,l,!1))},u.Bf=function(e){return e.g.k.a+e.k.a+e.a.a},u.Cf=function(){return Ht(),fi},u.Df=function(){return Ht(),Tn};var Mje=A(F_,"OrthogonalRoutingGenerator/NorthToSouthRoutingStrategy",1490);T(1491,1,{},Hl),u.Af=function(e,n){var i,r,c,l,f,g,b,v,M,k;for(k=n-e.i*this.a.c,g=new H(e.g);g.aop&&(c=new We(b,k),Xi(i.a,c),LP(this.a,i,e,c,!1),l=new We(M,k),Xi(i.a,l),LP(this.a,i,e,l,!1))},u.Bf=function(e){return e.g.k.a+e.k.a+e.a.a},u.Cf=function(){return Ht(),Tn},u.Df=function(){return Ht(),fi};var Eje=A(F_,"OrthogonalRoutingGenerator/SouthToNorthRoutingStrategy",1491);T(1489,1,{},ed),u.Af=function(e,n){var i,r,c,l,f,g,b,v,M,k;for(k=n+e.i*this.a.c,g=new H(e.g);g.aop&&(c=new We(k,b),Xi(i.a,c),LP(this.a,i,e,c,!0),l=new We(k,M),Xi(i.a,l),LP(this.a,i,e,l,!0))},u.Bf=function(e){return e.g.k.b+e.k.b+e.a.b},u.Cf=function(){return Ht(),Qe},u.Df=function(){return Ht(),on};var Sje=A(F_,"OrthogonalRoutingGenerator/WestToEastRoutingStrategy",1489);T(1351,1,Pu,WMt),u.vf=function(e){return Hge(a(e,31))},u.Pe=function(e,n){mxe(this,a(e,31),n)};var ZWt,YWt,KWt,JWt,hF,Tje=A(F_,"PolylineEdgeRouter",1351);T(1352,1,sh,D),u.Mb=function(e){return Cle(a(e,8))},u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)};var Cje=A(F_,"PolylineEdgeRouter/1",1352);T(151,1,{151:1},Z6t),u.Ib=function(){var e,n,i,r;for(i=new om,this.e&&Ii(Ii(i,nL(this.e)),": "),n=qn(Z$(this),0);n.b!=n.d.c;)e=a(Yn(n),11),Ii(Ii(S1(Ii(i,(r=s5t(e),r==null?"p_"+e.o:"p_"+r)),32),nL(e.i))," / ");return B9(i,i.a.length-2-1)},u.j=0,u.k=0;var Aje=A(f0,"ConnectedSelfLoopComponent",151);T(129,23,{3:1,34:1,23:1,129:1},A1),u.c=0;var QWt,t$t,e$t,tb,kw,Zp,Lw,rg,hp,Yp,eb,nb,n$t,i$t,r$t,s$t,o$t,c$t,a$t,u$t,l$t,h$t,f$t,d$t,p$t,oy,Lx,Pw,Iw,aA=Ri(f0,"LoopSide",129,ji,iq,kie),g$t;T(424,1,{},BIt,Dht,Sut),u.Ib=function(){return this.b.Ib()},u.c=0,u.d=!1,u.e=!1,u.f=!1,u.i=0,u.j=0;var kje=A(f0,"NubSpline",424);T(190,1,{190:1},HDt,Y$);var Lje=A(f0,"NubSpline/PolarCP",190);T(599,424,{},H$);var Pje=A(f0,"NubsSelfLoop",599);T(236,1,{},n9t,xX,k8t,EL,TX),u.a=cpt,u.b=ax,u.c=cpt,u.d=ax;var Ije=A(f0,"Rectangle",236);T(1353,1,Pu,qRt),u.vf=function(e){return fme(a(e,31))},u.Pe=function(e,n){v3e(this,a(e,31),n)},u.d=3;var m$t,b$t,w$t,v$t,_$t,y$t,Rje=A(f0,"SplineEdgeRouter",1353);T(250,1,{250:1},_N),u.Ib=function(){return this.a+" ->("+this.c+") "+this.b},u.c=0;var Dje=A(f0,"SplineEdgeRouter/Dependency",250);T(417,23,{3:1,34:1,23:1,417:1},xrt);var sg,cy,x$t=Ri(f0,"SplineEdgeRouter/SideToProcess",417,ji,_oe,Iie),M$t;T(1354,1,{},JMt),u.td=function(e){pre(this.a,this.b,e)};var Nje=A(f0,"SplineEdgeRouter/lambda$0$Type",1354);T(1355,1,{},QMt),u.td=function(e){gre(this.a,this.b,e)};var Oje=A(f0,"SplineEdgeRouter/lambda$1$Type",1355);T(125,1,{34:1,125:1},d9t,Nht),u.vd=function(e){return ete(this,a(e,125))},u.b=0,u.e=0,u.f=0,u.i=!1,u.j=0,u.k=!1,u.n=!1,u.p=0,u.r=0,u.s=0;var Bje=A(f0,"SplineSegment",125);T(589,1,{589:1},$t),u.a=0,u.b=!1,u.c=!1,u.d=!1,u.e=!1,u.f=0;var Fje=A(f0,"SplineSegment/EdgeInformation",589);T(990,1,{},_e);var Uje=A(M4,Pft,990);T(991,1,jr,Ye),u.Ld=function(e,n){return G0e(a(e,128),a(n,128))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var zje=A(M4,lBt,991);T(989,1,{},k3t);var jje=A(M4,"MrTree",989);T(360,23,{3:1,34:1,23:1,360:1,285:1,286:1},$9),u.hf=function(){return C9t(this)},u.uf=function(){return C9t(this)};var fF,uA,X6,lA,qbt=Ri(M4,"TreeLayoutPhases",360,ji,Bce,Eie),E$t;T(960,244,O_,fTt),u.Ae=function(e,n){var i,r,c,l,f,g;for(l=(f=new yN,Uo(f,e),Ct(f,(mc(),dA),e),g=new vi,Qve(e,f,g),jve(e,f,g),f),c=n_e(this.a,l),r=new H(c);r.a"+lN(this.c):"e_"+Yr(this)};var Vje=A(E4,"TEdge",170);T(128,131,{3:1,128:1,93:1,131:1},yN),u.Ib=function(){var e,n,i,r,c;for(c=null,r=qn(this.b,0);r.b!=r.d.c;)i=a(Yn(r),76),c+=(i.c==null||i.c.length==0?"n_"+i.g:"n_"+i.c)+` +`;for(n=qn(this.a,0);n.b!=n.d.c;)e=a(Yn(n),170),c+=(e.b&&e.c?lN(e.b)+"->"+lN(e.c):"e_"+Yr(e))+` +`;return c};var Z3e=A(E4,"TGraph",128);T(570,452,{3:1,452:1,570:1,93:1,131:1});var qje=A(E4,"TShape",570);T(76,570,{3:1,452:1,76:1,570:1,93:1,131:1},oq),u.Ib=function(){return lN(this)};var Y3e=A(E4,"TNode",76);T(231,1,wd,Hd),u.sc=function(e){vo(this,e)},u.tc=function(){var e;return e=qn(this.a.d,0),new Ob(e)};var Xje=A(E4,"TNode/2",231);T(330,1,Cs,Ob),u.gc=function(e){ks(this,e)},u.ic=function(){return a(Yn(this.a),170).c},u.hc=function(){return R9(this.a)},u.jc=function(){tat(this.a)};var Zje=A(E4,"TNode/2/1",330);T(1545,1,Br,dTt),u.Pe=function(e,n){f_e(this,a(e,128),n)};var Yje=A(ux,"FanProcessor",1545);T(308,23,{3:1,34:1,23:1,308:1,286:1},UT),u.hf=function(){switch(this.g){case 0:return new mxt;case 1:return new dTt;case 2:return new xa;case 3:return new Is;case 4:return new Qr;case 5:return new zu;default:throw K(new yn(lY+(this.f!=null?this.f:""+this.g)))}};var lQ,hQ,fQ,dQ,pQ,dF,S$t=Ri(ux,Wft,308,ji,Zae,Sie),T$t;T(1548,1,Br,Is),u.Pe=function(e,n){Xme(this,a(e,128),n)},u.a=0;var Kje=A(ux,"LevelHeightProcessor",1548);T(1549,1,wd,ol),u.sc=function(e){vo(this,e)},u.tc=function(){return we(),Dv(),Z_};var Jje=A(ux,"LevelHeightProcessor/1",1549);T(1546,1,Br,xa),u.Pe=function(e,n){g0e(this,a(e,128),n)},u.a=0;var Qje=A(ux,"NeighborsProcessor",1546);T(1547,1,wd,Ul),u.sc=function(e){vo(this,e)},u.tc=function(){return we(),Dv(),Z_};var tHe=A(ux,"NeighborsProcessor/1",1547);T(1550,1,Br,Qr),u.Pe=function(e,n){qme(this,a(e,128),n)},u.a=0;var eHe=A(ux,"NodePositionProcessor",1550);T(1544,1,Br,mxt),u.Pe=function(e,n){Iye(this,a(e,128))};var nHe=A(ux,"RootProcessor",1544);T(1551,1,Br,zu),u.Pe=function(e,n){Ohe(a(e,128))};var iHe=A(ux,"Untreeifyer",1551),Z6,hA,C$t,gQ,pF,fA,mQ,gF,mF,FE,dA,bF,Kp,Xbt,A$t,bQ,Rw,wQ,Zbt;T(750,1,_d,mj),u.ue=function(e){He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,apt),""),"Weighting of Nodes"),"Which weighting to use when computing a node order."),Kbt),(i0(),xs)),rwt),qe((t0(),On))))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,upt),""),"Search Order"),"Which search order to use when computing a spanning tree."),Ybt),xs),owt),qe(On)))),m7t((new bj,e))};var k$t,Ybt,L$t,Kbt,rHe=A(CO,"MrTreeMetaDataProvider",750);T(886,1,_d,bj),u.ue=function(e){m7t(e)};var P$t,Jbt,Qbt,I$t,twt,wF,ewt,R$t,nwt,D$t,sHe=A(CO,"MrTreeOptions",886);T(887,1,{},HS),u.Be=function(){var e;return e=new fTt,e},u.Ce=function(e){};var oHe=A(CO,"MrTreeOptions/MrtreeFactory",887);T(438,23,{3:1,34:1,23:1,438:1},Mrt);var vQ,iwt,rwt=Ri(CO,"OrderWeighting",438,ji,goe,Rie),N$t;T(388,23,{3:1,34:1,23:1,388:1},Ert);var swt,_Q,owt=Ri(CO,"TreeifyingOrder",388,ji,poe,Die),O$t;T(1357,1,Pu,wj),u.vf=function(e){return a(e,128),B$t},u.Pe=function(e,n){fle(this,a(e,128),n)};var B$t,cHe=A("org.eclipse.elk.alg.mrtree.p1treeify","DFSTreeifyer",1357);T(1358,1,Pu,vj),u.vf=function(e){return a(e,128),F$t},u.Pe=function(e,n){m0e(this,a(e,128),n)};var F$t,aHe=A("org.eclipse.elk.alg.mrtree.p2order","NodeOrderer",1358);T(1359,1,Pu,S8),u.vf=function(e){return a(e,128),U$t},u.Pe=function(e,n){Jwe(this,a(e,128),n)},u.a=0;var U$t,uHe=A("org.eclipse.elk.alg.mrtree.p3place","NodePlacer",1359);T(1360,1,Pu,yj),u.vf=function(e){return a(e,128),z$t},u.Pe=function(e,n){Fpe(a(e,128),n)};var z$t,lHe=A("org.eclipse.elk.alg.mrtree.p4route","EdgeRouter",1360),pA;T(447,23,{3:1,34:1,23:1,447:1,285:1,286:1},Srt),u.hf=function(){return MIt(this)},u.uf=function(){return MIt(this)};var vF,UE,cwt=Ri(lpt,"RadialLayoutPhases",447,ji,moe,Nie),j$t;T(961,244,O_,L3t),u.Ae=function(e,n){var i,r,c,l,f,g,b;if(r=l9t(this,e),di(n,"Radial layout",r.c.length),b=nge(e),ga(e,(YT(),pA),b),!b)throw K(new yn("The given graph is not a tree!"));for(l=lt(Yt(cn(e,(tw(),xF)))),l==0&&(l=T9t(e)),ga(e,xF,l),i=new WG(e),pd(BRt(i),new R3),c=new E5(i),SIt(c),g=new H(l9t(this,e));g.a0&&$Pt(e.charCodeAt(n-1),vBt);)--n;if(r>=n)throw K(new yn("The given string does not contain any numbers."));if(c=K2(e.substr(r,n-r),`,|;|\r| +`),c.length!=2)throw K(new yn("Exactly two numbers are expected, "+c.length+" were found."));try{this.a=rw(iw(c[0])),this.b=rw(iw(c[1]))}catch(l){throw l=vr(l),ct(l,118)?(i=l,K(new yn(_Bt+i))):K(l)}},u.Ib=function(){return"("+this.a+","+this.b+")"},u.a=0,u.b=0;var ss=A(t6,"KVector",9);T(74,66,{3:1,4:1,20:1,25:1,41:1,13:1,66:1,15:1,74:1,428:1},Va,A9),u.gf=function(e){var n,i,r,c,l,f;r=K2(e,`,|;|\\(|\\)|\\[|\\]|\\{|\\}| | | +`),ld(this);try{for(i=0,l=0,c=0,f=0;i0&&(l%2==0?c=rw(r[i]):f=rw(r[i]),l>0&&l%2!=0&&Xi(this,new We(c,f)),++l),++i}catch(g){throw g=vr(g),ct(g,118)?(n=g,K(new yn("The given string does not match the expected format for vectors."+n))):K(g)}},u.Ib=function(){var e,n,i;for(e=new ll("("),n=qn(this,0);n.b!=n.d.c;)i=a(Yn(n),9),Ii(e,i.a+","+i.b),n.b!=n.d.c&&(e.a+="; ");return(e.a+=")",e).a};var Awt=A(t6,"KVectorChain",74);T(224,23,{3:1,34:1,23:1,224:1},zT);var LQ,MF,EF,Q6,tI,SF,kwt=Ri(Dh,"Alignment",224,ji,Yae,jie),cVt;T(855,1,_d,Ej),u.ue=function(e){RNt(e)};var Lwt,PQ,Pwt,Iwt,aVt,IQ,uVt,lVt,Rwt,Dwt,hVt,yGe=A(Dh,"BoxLayouterOptions",855);T(856,1,{},TR),u.Be=function(){var e;return e=new vz,e},u.Ce=function(e){};var xGe=A(Dh,"BoxLayouterOptions/BoxFactory",856);T(785,1,_d,Sj),u.ue=function(e){He(e,new De(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,rFt),""),"Layout Algorithm"),"Select a specific layout algorithm."),(i0(),K6)),At),qe((t0(),On))))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Odt),""),"Alignment"),"Alignment of the selected node relative to other nodes, the exact meaning depends on the used algorithm."),Owt),xs),kwt),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.alignment"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,hE),""),"Aspect Ratio"),"The desired aspect ratio of the drawing, that is the quotient of width by height."),ha),To),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.aspectRatio"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,xpt),""),"Bend Points"),"A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points."),Ed),Awt),qe(Md)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.bendPoints"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,RY),""),"Debug Mode"),"Whether additional debug information shall be generated."),(me(),me(),!1)),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.debugMode"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,NY),""),Eft),"Overall direction of edges: horizontal (right / left) or vertical (down / up)."),Fwt),xs),bA),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.direction"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,i6),""),"Edge Routing"),"What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline."),jwt),xs),qQ),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.edgeRouting"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,_pt),""),"Expand Nodes"),"If active, nodes are expanded to fill the area of their parent."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.expandNodes"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Bdt),""),"Hierarchy Handling"),"If this option is set to SEPARATE_CHILDREN, each hierarchy level of the graph is processed independently, possibly by different layout algorithms, beginning with the lowest level. If it is set to INCLUDE_CHILDREN, the algorithm is responsible to process all hierarchy levels that are contained in the associated parent node. If the root node is set to inherit (or not set at all), the default behavior is SEPARATE_CHILDREN."),Wwt),xs),Evt),ur(On,Y(Z(Jp,1),jt,163,0,[vc]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.hierarchyHandling"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,ox),""),"Padding"),"The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately."),Jwt),Ed),Ggt),ur(On,Y(Z(Jp,1),jt,163,0,[vc]))))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,dO),""),"Interactive"),"Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible."),!1),Ec),ho),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,aY),""),"Port Constraints"),"Defines constraints of the position of the ports of a node."),ivt),xs),Cvt),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portConstraints"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,SO),""),"Position"),"The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position."),Ed),ss),ur(vc,Y(Z(Jp,1),jt,163,0,[ib,og]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.position"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,YP),""),"Priority"),"Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used."),Pa),Io),ur(vc,Y(Z(Jp,1),jt,163,0,[Md]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.priority"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,fO),""),"Randomization Seed"),"Seed used for pseudo-random number generators to control the layout algorithm. If the value is 0, the seed shall be determined pseudo-randomly (e.g. from the system time)."),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.randomSeed"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,KP),""),"Separate Connected Components"),"Whether each connected component should be processed separately."),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.separateConnComp"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Xdt),""),"Junction Points"),"This option is not used as option, but as output of the layout algorithms. It is attached to edges and determines the points where junction symbols should be drawn in order to represent hyperedges with orthogonal routing. Whether such points are computed depends on the chosen layout algorithm and edge routing style. The points are put into the vector chain with no specific order."),$wt),Ed),Awt),qe(Md)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.junctionPoints"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Jdt),""),"Comment Box"),"Whether the node should be regarded as a comment box instead of a regular node. In that case its placement should be similar to how labels are handled. Any edges incident to a comment box specify to which graph elements the comment is related."),!1),Ec),ho),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.commentBox"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Qdt),""),"Hypernode"),"Whether the node should be handled as a hypernode."),!1),Ec),ho),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.hypernode"])))),He(e,new De(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,sFt),""),"Label Manager"),"Label managers can shorten labels upon a layout algorithm's request."),Ed),rMe),ur(On,Y(Z(Jp,1),jt,163,0,[og]))))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,ipt),""),"Margins"),"Margins define additional space around the actual bounds of a graph element. For instance, ports or labels being placed on the outside of a node's border might introduce such a margin. The margin is used to guarantee non-overlap of other graph elements with those ports or labels."),Vwt),Ed),Hgt),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.margins"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Ddt),""),"No Layout"),"No layout is done for the associated element. This is used to mark parts of a diagram to avoid their inclusion in the layout graph, or to mark parts of the layout graph to prevent layout engines from processing them. If you wish to exclude the contents of a compound node from automatic layout, while the node itself is still considered on its own layer, use the 'Fixed Layout' algorithm for that node."),!1),Ec),ho),ur(vc,Y(Z(Jp,1),jt,163,0,[Md,ib,og]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.noLayout"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,oFt),""),"Scale Factor"),"The scaling factor to be applied to the corresponding node in recursive layout. It causes the corresponding node's size to be adjusted, and its ports and labels to be sized and placed accordingly after the layout of that node has been determined (and before the node itself and its siblings are arranged). The scaling is not reverted afterwards, so the resulting layout graph contains the adjusted size and position data. This option is currently not supported if 'Layout Hierarchy' is set."),1),ha),To),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.scaleFactor"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,cFt),""),"Animate"),"Whether the shift from the old layout to the new computed layout shall be animated."),!0),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.animate"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,aFt),""),"Animation Time Factor"),"Factor for computation of animation time. The higher the value, the longer the animation time. If the value is 0, the resulting time is always equal to the minimum defined by 'Minimal Animation Time'."),Xt(100)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.animTimeFactor"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,uFt),""),"Layout Ancestors"),"Whether the hierarchy levels on the path from the selected element to the root of the diagram shall be included in the layout process."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.layoutAncestors"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,lFt),""),"Maximal Animation Time"),"The maximal time for animations, in milliseconds."),Xt(4e3)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.maxAnimTime"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,hFt),""),"Minimal Animation Time"),"The minimal time for animations, in milliseconds."),Xt(400)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.minAnimTime"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,fFt),""),"Progress Bar"),"Whether a progress bar shall be displayed during layout computations."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.progressBar"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,dFt),""),"Validate Options"),"Whether layout options shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."),!0),Ec),ho),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,pFt),""),"Zoom to Fit"),"Whether the zoom level shall be set to view the whole diagram after layout."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.zoomToFit"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,ypt),"box"),"Box Layout Mode"),"Configures the packing mode used by the {@link BoxLayoutProvider}. If SIMPLE is not required (neither priorities are used nor the interactive mode), GROUP_DEC can improve the packing and decrease the area. GROUP_MIXED and GROUP_INC may, in very specific scenarios, work better."),Bwt),xs),Nvt),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,nY),J1),"Components Spacing"),"Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated."),12),ha),To),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.borderSpacing"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Tdt),J1),"Edge Spacing"),"Spacing to be preserved between any two edges. Note that while this can somewhat easily be satisfied for the segments of orthogonally drawn edges, it is harder for general polylines or splines."),10),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,cY),J1),"Edge Label Spacing"),"The minimal distance to be preserved between a label and the edge it is associated with. Note that the placement of a label is influenced by the 'edgelabels.placement' option."),2),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Cdt),J1),"Edge Node Spacing"),"Spacing to be preserved between nodes and edges."),10),ha),To),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Adt),J1),"Label Spacing"),"Determines the amount of space to be left between two labels of the same graph element."),0),ha),To),qe(On)),Y(Z(At,1),wt,2,6,[vFt])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Ldt),J1),"Label Node Spacing"),"Spacing to be preserved between labels and the border of node they are associated with. Note that the placement of a label is influenced by the 'nodelabels.placement' option."),5),ha),To),qe(On)),Y(Z(At,1),wt,2,6,[vFt])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,kdt),J1),"Label Port Spacing"),"Spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),ha),To),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,dE),J1),"Node Spacing"),"The minimal distance to be preserved between each two nodes."),20),ha),To),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.spacing"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Pdt),J1),"Port Spacing"),"Spacing between pairs of ports of the same node."),10),ha),To),ur(On,Y(Z(Jp,1),jt,163,0,[vc]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portSpacing"])))),He(e,new De(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,Idt),J1),"Individual Spacing Override"),"In general spacing values apply to the children of the hierarchical node (possibly the root node) for which the values are actually specified. Hereby, the children include ports, edges, and labels."),Ed),J3e),ur(vc,Y(Z(Jp,1),jt,163,0,[Md,ib,og]))))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,rpt),J1),"Additional Port Space"),"Additional space around the sets of ports on each node side. For each side of a node, this option can reserve additional space before and after the ports on each side. For example, a top spacing of 20 makes sure that the first port on the western and eastern side is 20 units away from the northern border."),hvt),Ed),Hgt),qe(On)))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,npt),_Ft),"Layout Partition"),"Partition to which the node belongs to. If 'layoutPartitions' is true, all nodes are expected to have a partition."),Pa),Io),ur(On,Y(Z(Jp,1),jt,163,0,[vc]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.partition"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,ept),_Ft),"Layout Partitioning"),"Whether to activate partitioned layout."),Qwt),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.layoutPartitions"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,gFt),yFt),"Node Label Padding"),"Define padding for node labels that are placed inside of a node."),qwt),Ed),Ggt),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.nodeLabelInset"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,zdt),yFt),"Node Label Placement"),"Hints for where node labels are to be placed; if empty, the node label's position is not modified."),Xwt),zE),to),ur(vc,Y(Z(Jp,1),jt,163,0,[og]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.nodeLabelPlacement"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Gdt),AO),"Port Alignment"),"Defines the default port distribution for a node. May be overridden for each side individually."),evt),xs),MA),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portAlignment"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,Wdt),AO),"Port Alignment (North)"),"Defines how ports on the northern side are placed, overriding the node's general port alignment."),xs),MA),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portAlignment.north"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,$dt),AO),"Port Alignment (South)"),"Defines how ports on the southern side are placed, overriding the node's general port alignment."),xs),MA),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portAlignment.south"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,Vdt),AO),"Port Alignment (West)"),"Defines how ports on the western side are placed, overriding the node's general port alignment."),xs),MA),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portAlignment.west"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,qdt),AO),"Port Alignment (East)"),"Defines how ports on the eastern side are placed, overriding the node's general port alignment."),xs),MA),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portAlignment.east"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,MO),Mpt),"Node Size Constraints"),"Constraints for determining node sizes. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to node sizes being fixed."),Zwt),zE),EA),qe(vc)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,DY),Mpt),"Node Size Options"),"Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications."),Kwt),zE),Pvt),qe(vc)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,EO),Mpt),"Node Size Minimum"),"The minimal size to which a node can be reduced."),Ywt),Ed),ss),qe(vc)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Zdt),IY),"Edge Label Placement"),"Gives a hint on where to put edge labels."),Uwt),xs),dvt),qe(og)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.edgeLabelPlacement"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Ydt),IY),"Inline Edge Labels"),"If true, an edge label is placed directly on its edge. May only apply to center edge labels. This kind of label placement is only advisable if the label's rendering is such that it is not crossed by its edge and thus stays legible."),!1),Ec),ho),qe(og)))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,mFt),"font"),"Font Name"),"Font name used for a label."),K6),At),qe(og)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.fontName"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,bFt),"font"),"Font Size"),"Font size used for a label."),Pa),Io),qe(og)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.fontSize"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,tpt),$Y),"Port Anchor Offset"),"The offset to the port position where connections shall be attached."),Ed),ss),qe(ib)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portAnchor"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,Kdt),$Y),"Port Index"),"The index of a port in the fixed order around a node. The order is assumed as clockwise, starting with the leftmost port on the top side. This option must be set if 'Port Constraints' is set to FIXED_ORDER and no specific positions are given for the ports. Additionally, the option 'Port Side' must be defined in this case."),Pa),Io),qe(ib)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portIndex"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Ndt),$Y),"Port Side"),"The side of a node on which a port is situated. This option must be set if 'Port Constraints' is set to FIXED_SIDE or FIXED_ORDER and no specific positions are given for the ports."),svt),xs),Ia),qe(ib)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portSide"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,Rdt),$Y),"Port Border Offset"),"The offset of ports on the node border. With a positive offset the port is moved outside of the node, while with a negative offset the port is moved towards the inside. An offset of 0 means that the port is placed directly on the node border, i.e. if the port side is north, the port's south border touches the nodes's north border; if the port side is east, the port's west border touches the nodes's east border; if the port side is south, the port's north border touches the node's south border; if the port side is west, the port's east border touches the node's west border."),ha),To),qe(ib)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.offset"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,jdt),xFt),"Port Label Placement"),"Decides on a placement method for port labels."),rvt),xs),Avt),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portLabelPlacement"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Hdt),xFt),"Port Labels Next to Port"),"Usually, inside port labels of hierarchical nodes are placed not next to their port, but with an offset to avoid edge-label crossings. The offset is not necessary if the port has no connections that would cross the label, but is usually applied anyway to keep things uniform. Setting this option to true places labels next to their ports if they won't be crossed by edges."),!1),Ec),ho),qe(vc)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Fdt),MFt),"Activate Inside Self Loops"),"Whether this node allows to route self loops inside of it instead of around it. If set to true, this will make the node a compound node if it isn't already, and will require the layout algorithm to support compound nodes with hierarchical ports."),!1),Ec),ho),qe(vc)),Y(Z(At,1),wt,2,6,[EFt])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Udt),MFt),"Inside Self Loop"),"Whether a self loop should be routed inside a node instead of around that node."),!1),Ec),ho),qe(Md)),Y(Z(At,1),wt,2,6,[EFt])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,iY),"edge"),"Edge Thickness"),"The thickness of an edge. This is a hint on the line width used to draw an edge, possibly requiring more space to be reserved for it."),1),ha),To),qe(Md)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.thickness"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,wFt),"edge"),"Edge Type"),"The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations."),Gwt),xs),vvt),qe(Md)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.edgeType"])))),PT(e,new k2(ET(eM(tM(new Cb,Nn),"Layered"),'The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called "hierarchies", and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.'))),PT(e,new k2(ET(eM(tM(new Cb,"org.eclipse.elk.orthogonal"),"Orthogonal"),`Orthogonal methods that follow the "topology-shape-metrics" approach by Batini, Nardelli and Tamassia '86. The first phase determines the topology of the drawing by applying a planarization technique, which results in a planar representation of the graph. The orthogonal shape is computed in the second phase, which aims at minimizing the number of edge bends, and is called orthogonalization. The third phase leads to concrete coordinates for nodes and edge bend points by applying a compaction method, thus defining the metrics.`))),PT(e,new k2(ET(eM(tM(new Cb,Rf),"Force"),"Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. The first successful method of this kind was proposed by Eades in 1984."))),PT(e,new k2(ET(eM(tM(new Cb,"org.eclipse.elk.circle"),"Circle"),"Circular layout algorithms emphasize cycles or biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent OPTIONS of the graph."))),PT(e,new k2(ET(eM(tM(new Cb,XBt),"Tree"),"Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type."))),PT(e,new k2(ET(eM(tM(new Cb,"org.eclipse.elk.planar"),"Planar"),"Algorithms that require a planar or upward planar graph. Most of these algorithms are theoretically interesting, but not practically usable."))),PT(e,new k2(ET(eM(tM(new Cb,Hm),"Radial"),"Radial layout algorithms usually position the nodes of the graph on concentric circles."))),pNt((new C8,e)),RNt((new Ej,e)),nNt((new A8,e))};var Nwt,fVt,Owt,jE,dVt,pVt,Bwt,gVt,RQ,gA,Fwt,mVt,eI,Uwt,zwt,jwt,Hwt,Gwt,bVt,ay,Wwt,wVt,TF,DQ,NQ,Px,$wt,CF,Vwt,vVt,qwt,AF,Xwt,HE,Zwt,nI,Ywt,kF,Kwt,OQ,uy,Jwt,_Vt,Qwt,yVt,tvt,evt,BQ,FQ,UQ,zQ,nvt,nu,iI,ivt,xVt,rI,jQ,rvt,mA,svt,Ix,LF,HQ,MVt,GQ,ovt,EVt,cvt,SVt,WQ,avt,PF,uvt,ly,lvt,hvt,fvt,MGe=A(Dh,"CoreOptions",785);T(110,23,{3:1,34:1,23:1,110:1},$5);var fp,ah,uh,Ff,cg,bA=Ri(Dh,Eft,110,ji,dae,Xie),TVt;T(226,23,{3:1,34:1,23:1,226:1},q9);var wA,Rx,vA,IF,dvt=Ri(Dh,"EdgeLabelPlacement",226,ji,Uce,Zie),CVt;T(197,23,{3:1,34:1,23:1,197:1},X9);var GE,$Q,rb,VQ,qQ=Ri(Dh,"EdgeRouting",197,ji,zce,Yie),AVt;T(289,23,{3:1,34:1,23:1,289:1},jT);var pvt,gvt,mvt,bvt,XQ,wvt,vvt=Ri(Dh,"EdgeType",289,ji,Kae,Kie),kVt;T(853,1,_d,C8),u.ue=function(e){pNt(e)};var _vt,yvt,xvt,LVt,Mvt,_A,EGe=A(Dh,"FixedLayouterOptions",853);T(854,1,{},CR),u.Be=function(){var e;return e=new p1,e},u.Ce=function(e){};var SGe=A(Dh,"FixedLayouterOptions/FixedFactory",854);T(316,23,{3:1,34:1,23:1,316:1},EW);var Dx,RF,yA,Evt=Ri(Dh,"HierarchyHandling",316,ji,cce,$ie),PVt;T(86,23,{3:1,34:1,23:1,86:1},Fv);var Uf,kl,Ll,Pl,Nu,Il,lh,hh,Bh,to=Ri(Dh,"NodeLabelPlacement",86,ji,jue,Vie),IVt;T(225,23,{3:1,34:1,23:1,225:1},V5);var Svt,xA,sb,Tvt,ZQ,MA=Ri(Dh,"PortAlignment",225,ji,hae,qie),RVt;T(83,23,{3:1,34:1,23:1,83:1},HT);var Nx,Gc,Sd,Ox,dp,ob,Cvt=Ri(Dh,"PortConstraints",83,ji,Xae,Wie),DVt;T(275,23,{3:1,34:1,23:1,275:1},SW);var DF,cb,hy,Avt=Ri(Dh,"PortLabelPlacement",275,ji,rce,Hie),NVt;T(69,23,{3:1,34:1,23:1,69:1},q5);var Qe,Tn,sI,fy,zf,ab,kvt,oI,dy,Td,YQ,Cd,M0,Ad,Bx,cI,py,aI,fi,Wc,on,Ia=Ri(Dh,"PortSide",69,ji,iae,Gie),OVt;T(857,1,_d,A8),u.ue=function(e){nNt(e)};var BVt,FVt,Lvt,UVt,zVt,TGe=A(Dh,"RandomLayouterOptions",857);T(858,1,{},wz),u.Be=function(){var e;return e=new I3,e},u.Ce=function(e){};var CGe=A(Dh,"RandomLayouterOptions/RandomFactory",858);T(344,23,{3:1,34:1,23:1,344:1},Z9);var ub,uI,lI,E0,EA=Ri(Dh,"SizeConstraint",344,ji,jce,Jie),jVt;T(239,23,{3:1,34:1,23:1,239:1},Uv);var NF,OF,WE,KQ,SA,TA,BF,Fx,FF,Pvt=Ri(Dh,"SizeOptions",239,ji,Hue,Qie),HVt;T(313,1,{},kD,Bst,Ost),u.b=!1,u.c=0,u.d=-1,u.e=0,u.f=!1,u.j=0;var AGe=A(Rh,"BasicProgressMonitor",313);T(848,244,O_,vz),u.Ae=function(e,n){var i,r,c,l,f,g,b,v,M,k;switch(di(n,"Box layout",2),l=lt(Yt(cn(e,(M7(),hVt)))),f=a(cn(e,lVt),119),i=lt(de(cn(e,Pwt))),r=lt(de(cn(e,Iwt))),c=a(cn(e,PQ),288),c.g){case 0:g=(b=new TD((!e.a&&(e.a=new Wt(zr,e,10,11)),e.a)),we(),D1(b,new qH(r)),b),v=a(cn(e,IQ),9),v.a=y.Math.max(v.a-f.b-f.c,0),v.b=y.Math.max(v.b-f.d-f.a,0),M=Yt(cn(e,Lwt)),(M==null||(En(M),M<=0))&&(M=1.3),k=uxe(g,l,f,v.a,v.b,i,(En(M),M)),P_(e,k.a,k.b,!1,!0);break;default:_ye(e,l,f,i)}Vn(n)};var kGe=A(Rh,"BoxLayoutProvider",848);T(849,1,jr,qH),u.Ld=function(e,n){return Tbe(this,a(e,35),a(n,35))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.a=!1;var LGe=A(Rh,"BoxLayoutProvider/1",849);T(145,1,{145:1},ON,YSt),u.Ib=function(){return this.c?vht(this.c):Gp(this.b)};var PGe=A(Rh,"BoxLayoutProvider/Group",145);T(288,23,{3:1,34:1,23:1,288:1},Y9);var Ivt,Rvt,Dvt,JQ,Nvt=Ri(Rh,"BoxLayoutProvider/PackingMode",288,ji,Gce,tre),GVt;T(850,1,jr,pz),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return-ro(Z5(a(e,145)),Z5(a(n,145)))};var IGe=A(Rh,"BoxLayoutProvider/lambda$0$Type",850);T(851,1,jr,gz),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return ro(Z5(a(e,145)),Z5(a(n,145)))};var RGe=A(Rh,"BoxLayoutProvider/lambda$1$Type",851);T(852,1,jr,mz),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return ro(Z5(a(e,145)),Z5(a(n,145)))};var DGe=A(Rh,"BoxLayoutProvider/lambda$2$Type",852);T(833,1,{},ZMt),u.td=function(e){ome(this.a,this.b,e)},u.a=0,u.b=0;var NGe=A(Rh,"ElkUtil/lambda$0$Type",833);T(834,1,{},YMt),u.td=function(e){PQt(this.a,this.b,e)},u.a=0,u.b=0;var OGe=A(Rh,"ElkUtil/lambda$1$Type",834);T(835,1,{},KMt),u.td=function(e){see(this.a,this.b,e)},u.a=0,u.b=0;var BGe=A(Rh,"ElkUtil/lambda$2$Type",835);T(322,1,{34:1,322:1},q3),u.vd=function(e){return fee(this,a(e,210))},u.Fb=function(e){var n;return ct(e,322)?(n=a(e,322),this.a==n.a):!1},u.Hb=function(){return Tr(this.a)},u.Ib=function(){return this.a+" (exclusive)"},u.a=0;var FGe=A(Rh,"ExclusiveBounds/ExclusiveLowerBound",322);T(963,244,O_,p1),u.Ae=function(e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te;for(di(n,SFt,1),l=a(cn(e,(dr(),zwt)),197),R=0,O=0,_t=new $n((!e.a&&(e.a=new Wt(zr,e,10,11)),e.a));_t.e!=_t.i._b();){for(rt=a(ci(_t),35),Te=a(cn(rt,(jN(),_A)),9),Te&&(Wd(rt,Te.a,Te.b),a(cn(rt,yvt),185).pc((Ju(),ub))&&($=a(cn(rt,xvt),9),$.a>0&&$.b>0&&P_(rt,$.a,$.b,!0,!0))),R=y.Math.max(R,rt.i+rt.g),O=y.Math.max(O,rt.j+rt.f),M=new $n((!rt.n&&(rt.n=new Wt(ic,rt,1,7)),rt.n));M.e!=M.i._b();)b=a(ci(M),137),Te=a(cn(b,_A),9),Te&&Wd(b,Te.a,Te.b),R=y.Math.max(R,rt.i+b.i+b.g),O=y.Math.max(O,rt.j+b.j+b.f);for(Zt=new $n((!rt.c&&(rt.c=new Wt(Rl,rt,9,9)),rt.c));Zt.e!=Zt.i._b();)for(Gt=a(ci(Zt),121),Te=a(cn(Gt,_A),9),Te&&Wd(Gt,Te.a,Te.b),ce=rt.i+Gt.i,ae=rt.j+Gt.j,R=y.Math.max(R,ce+Gt.g),O=y.Math.max(O,ae+Gt.f),v=new $n((!Gt.n&&(Gt.n=new Wt(ic,Gt,1,7)),Gt.n));v.e!=v.i._b();)b=a(ci(v),137),Te=a(cn(b,_A),9),Te&&Wd(b,Te.a,Te.b),R=y.Math.max(R,ce+b.i+b.g),O=y.Math.max(O,ae+b.j+b.f);for(c=Rn(Af(rt));Jn(c);)i=a(In(c),105),k=cOt(i),R=y.Math.max(R,k.a),O=y.Math.max(O,k.b);for(r=Rn(SP(rt));Jn(r);)i=a(In(r),105),zc(a(at((!i.b&&(i.b=new pn(Si,i,4,7)),i.b),0),97))!=e&&(k=cOt(i),R=y.Math.max(R,k.a),O=y.Math.max(O,k.b))}if(l==(gd(),GE))for(pt=new $n((!e.a&&(e.a=new Wt(zr,e,10,11)),e.a));pt.e!=pt.i._b();)for(rt=a(ci(pt),35),r=Rn(Af(rt));Jn(r);)i=a(In(r),105),g=(f=new Va,f),g.b==0?ga(i,Px,null):ga(i,Px,g);It=a(cn(e,(jN(),LVt)),119),nt=R+It.b+It.c,W=O+It.d+It.a,P_(e,nt,W,!0,!0),Vn(n)};var UGe=A(Rh,"FixedLayoutProvider",963);T(786,131,tY,Ok);var J3e=A(Rh,"IndividualSpacings",786);T(635,1,{},CCt),u.c=0;var zGe=A(Rh,"InstancePool",635);T(48,1,{20:1,48:1},zs),u.sc=function(e){vo(this,e)},u.Fb=function(e){var n,i,r;return ct(e,48)?(i=a(e,48),n=this.a==null?i.a==null:Fi(this.a,i.a),r=this.b==null?i.b==null:Fi(this.b,i.b),n&&r):!1},u.Hb=function(){var e,n,i,r,c,l;return i=this.a==null?0:Yr(this.a),e=i&qr,n=i&-65536,l=this.b==null?0:Yr(this.b),r=l&qr,c=l&-65536,e^c>>16&qr|n^r<<16},u.tc=function(){return new XH(this)},u.Ib=function(){return this.a==null&&this.b==null?"pair(null,null)":this.a==null?"pair(null,"+Yc(this.b)+")":this.b==null?"pair("+Yc(this.a)+",null)":"pair("+Yc(this.a)+","+Yc(this.b)+")"};var jGe=A(Rh,"Pair",48);T(859,1,Cs,XH),u.gc=function(e){ks(this,e)},u.hc=function(){return!this.c&&(!this.b&&this.a.a!=null||this.a.b!=null)},u.ic=function(){if(!this.c&&!this.b&&this.a.a!=null)return this.b=!0,this.a.a;if(!this.c&&this.a.b!=null)return this.c=!0,this.a.b;throw K(new J)},u.jc=function(){throw this.c&&this.a.b!=null?this.a.b=null:this.b&&this.a.a!=null&&(this.a.a=null),K(new na)},u.b=!1,u.c=!1;var HGe=A(Rh,"Pair/1",859);T(404,1,{404:1},E4t),u.Fb=function(e){return au(this.a,a(e,404).a)&&au(this.c,a(e,404).c)&&au(this.d,a(e,404).d)&&au(this.b,a(e,404).b)},u.Hb=function(){return sq(Y(Z(un,1),te,1,5,[this.a,this.c,this.d,this.b]))},u.Ib=function(){return"("+this.a+Rc+this.c+Rc+this.d+Rc+this.b+")"};var GGe=A(Rh,"Quadruple",404);T(957,244,O_,I3),u.Ae=function(e,n){var i,r,c,l,f;if(di(n,"Random Layout",1),(!e.a&&(e.a=new Wt(zr,e,10,11)),e.a).i==0){Vn(n);return}l=a(cn(e,(gut(),UVt)),21),l&&l.a!=0?c=new fN(l.a):c=new kq,i=lt(Yt(cn(e,BVt))),f=lt(Yt(cn(e,zVt))),r=a(cn(e,FVt),119),Z2e(e,c,i,f,r),Vn(n)};var WGe=A(Rh,"RandomLayoutProvider",957);T(490,1,{}),u.Qe=function(){return new We(this.f.i,this.f.j)},u.xe=function(e){return j4t(e,(dr(),nu))?cn(this.f,WVt):cn(this.f,e)},u.Re=function(){return new We(this.f.g,this.f.f)},u.Se=function(){return this.g},u.ye=function(e){return mV(this.f,e)},u.Te=function(e){th(this.f,e.a),eh(this.f,e.b)},u.Ue=function(e){c_(this.f,e.a),o_(this.f,e.b)},u.Ve=function(e){this.g=e},u.g=0;var WVt,$Ge=A(s6,"ElkGraphAdapters/AbstractElkGraphElementAdapter",490);T(491,1,{741:1},fT),u.We=function(){var e,n;if(!this.b)for(this.b=uN(j$(this.a).i),n=new $n(j$(this.a));n.e!=n.i._b();)e=a(ci(n),137),Ut(this.b,new $G(e));return this.b},u.b=null;var VGe=A(s6,"ElkGraphAdapters/ElkEdgeAdapter",491);T(562,490,{},WG),u.Xe=function(){return BRt(this)},u.a=null;var qGe=A(s6,"ElkGraphAdapters/ElkGraphAdapter",562);T(564,490,{271:1},$G);var XGe=A(s6,"ElkGraphAdapters/ElkLabelAdapter",564);T(563,490,{739:1},VW),u.We=function(){return ope(this)},u.$e=function(){var e;return e=a(cn(this.f,(dr(),CF)),135),!e&&(e=new a2),e},u.af=function(){return cpe(this)},u.cf=function(e){var n;n=new u$(e),ga(this.f,(dr(),CF),n)},u.df=function(e){ga(this.f,(dr(),uy),new zst(e))},u.Ye=function(){return this.d},u.Ze=function(){var e,n;if(!this.a)for(this.a=new Dt,n=Rn(SP(a(this.f,35)));Jn(n);)e=a(In(n),105),Ut(this.a,new fT(e));return this.a},u._e=function(){var e,n;if(!this.c)for(this.c=new Dt,n=Rn(Af(a(this.f,35)));Jn(n);)e=a(In(n),105),Ut(this.c,new fT(e));return this.c},u.bf=function(){return Kot(a(this.f,35)).i!=0||lt(de(a(this.f,35).xe((dr(),TF))))},u.a=null,u.b=null,u.c=null,u.d=null,u.e=null;var ZGe=A(s6,"ElkGraphAdapters/ElkNodeAdapter",563);T(997,490,{740:1},c9),u.We=function(){return gpe(this)},u.Ze=function(){var e,n;if(!this.a)for(this.a=od(a(this.f,121).Tf().i),n=new $n(a(this.f,121).Tf());n.e!=n.i._b();)e=a(ci(n),105),Ut(this.a,new fT(e));return this.a},u._e=function(){var e,n;if(!this.c)for(this.c=od(a(this.f,121).Uf().i),n=new $n(a(this.f,121).Uf());n.e!=n.i._b();)e=a(ci(n),105),Ut(this.c,new fT(e));return this.c},u.ef=function(){return a(a(this.f,121).xe((dr(),mA)),69)},u.ff=function(){var e,n,i,r,c,l,f,g;for(r=Tf(a(this.f,121)),i=new $n(a(this.f,121).Uf());i.e!=i.i._b();)for(e=a(ci(i),105),g=new $n((!e.c&&(e.c=new pn(Si,e,5,8)),e.c));g.e!=g.i._b();){if(f=a(ci(g),97),_C(zc(f),r))return!0;if(zc(f)==r&<(de(cn(e,(dr(),DQ)))))return!0}for(n=new $n(a(this.f,121).Tf());n.e!=n.i._b();)for(e=a(ci(n),105),l=new $n((!e.b&&(e.b=new pn(Si,e,4,7)),e.b));l.e!=l.i._b();)if(c=a(ci(l),97),_C(zc(c),r))return!0;return!1},u.a=null,u.b=null,u.c=null;var YGe=A(s6,"ElkGraphAdapters/ElkPortAdapter",997);T(265,23,{3:1,34:1,23:1,265:1},K9);var kd,ag,hI,fI,$Vt=Ri(Ept,"LabelSide",265,ji,Wce,ere),VVt;T(676,1,{},R3),u.td=function(e){z7t(a(e,739),!0,!1)};var KGe=A(Ept,"NodeLabelAndSizeCalculator/lambda$0$Type",676);T(571,1,{},E5),u.b=!0,u.c=!0,u.d=!0,u.e=!0;var JGe=A(Ept,TBt,571);T(171,1,{171:1}),u.j=!1,u.k=!1;var qVt=A(d0,"Cell",171);T(114,171,{114:1,171:1},vTt),u.Pf=function(){return RD(this)},u.Qf=function(){var e;return e=this.n,this.a.a+e.b+e.c};var QGe=A(d0,"AtomicCell",114);T(203,23,{3:1,34:1,23:1,203:1},TW);var lc,ta,hc,Dw=Ri(d0,"ContainerArea",203,ji,oce,nre),XVt;T(307,171,CFt);var tWe=A(d0,"ContainerCell",307);T(1179,307,CFt,RIt),u.Pf=function(){var e;return e=0,this.e?this.b?e=this.b.b:this.a[1][1]&&(e=this.a[1][1].Pf()):e=nut(this,FRt(this,!0)),e>0?e+this.n.d+this.n.a:0},u.Qf=function(){var e,n,i,r,c;if(c=0,this.e)this.b?c=this.b.a:this.a[1][1]&&(c=this.a[1][1].Qf());else if(this.g)c=nut(this,rX(this,null,!0));else for(n=(Ch(),Y(Z(Dw,1),jt,203,0,[lc,ta,hc])),i=0,r=n.length;i0?c+this.n.b+this.n.c:0},u.Rf=function(){var e,n,i,r,c;if(this.g)for(e=rX(this,null,!1),i=(Ch(),Y(Z(Dw,1),jt,203,0,[lc,ta,hc])),r=0,c=i.length;r0&&(r[0]+=this.d,i-=r[0]),r[2]>0&&(r[2]+=this.d,i-=r[2]),this.c.a=y.Math.max(0,i),this.c.d=n.d+e.d+(this.c.a-i)/2,r[1]=y.Math.max(r[1],i),Ict(this,ta,n.d+e.d+r[0]-(r[1]-i)/2,r)},u.b=null,u.d=0,u.e=!1,u.f=!1,u.g=!1;var QQ=0,UF=0,eWe=A(d0,"GridContainerCell",1179);T(419,23,{3:1,34:1,23:1,419:1},CW);var lb,jf,fh,ZVt=Ri(d0,"HorizontalLabelAlignment",419,ji,nce,ire),YVt;T(267,171,{171:1,267:1},oAt,NLt,eAt),u.Pf=function(){return b$(this)},u.Qf=function(){return ID(this)},u.a=0,u.c=!1;var Q3e=A(d0,"LabelCell",267);T(219,307,{171:1,307:1,219:1},HC),u.Pf=function(){return yP(this)},u.Qf=function(){return xP(this)},u.Rf=function(){VX(this)},u.Sf=function(){qX(this)},u.b=0,u.c=0,u.d=!1;var nWe=A(d0,"StripContainerCell",219);T(1394,1,us,yz),u.Nb=function(e){return!!a(e,171)&&a(e,171).k};var iWe=A(d0,"StripContainerCell/lambda$0$Type",1394);T(1395,1,{},Lg),u.oe=function(e){return a(e,171).Qf()};var rWe=A(d0,"StripContainerCell/lambda$1$Type",1395);T(1396,1,us,Bk),u.Nb=function(e){return!!a(e,171)&&a(e,171).j};var sWe=A(d0,"StripContainerCell/lambda$2$Type",1396);T(1397,1,{},Mv),u.oe=function(e){return a(e,171).Pf()};var oWe=A(d0,"StripContainerCell/lambda$3$Type",1397);T(420,23,{3:1,34:1,23:1,420:1},AW);var dh,hb,Fh,KVt=Ri(d0,"VerticalLabelAlignment",420,ji,ice,rre),JVt;T(697,1,{},Wht),u.c=0,u.d=0,u.k=0,u.s=0,u.u=0,u.B=!1;var cWe=A(LO,"NodeContext",697);T(1177,1,jr,AR),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return CEt(a(e,69),a(n,69))};var aWe=A(LO,"NodeContext/0methodref$comparePortSides$Type",1177);T(1178,1,jr,_z),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Z1e(a(e,111),a(n,111))};var uWe=A(LO,"NodeContext/1methodref$comparePortContexts$Type",1178);T(147,23,{3:1,34:1,23:1,147:1},Yu);var QVt,tqt,eqt,nqt,iqt,rqt,sqt,oqt,cqt,aqt,uqt,lqt,hqt,fqt,dqt,pqt,gqt,mqt,bqt,wqt,vqt,ttt,_qt=Ri(LO,"NodeLabelLocation",147,ji,Uq,sre),yqt;T(111,1,{111:1},Qkt);var lWe=A(LO,"PortContext",111);T(1182,1,{},_p),u.oe=function(e){return a(e,111).c?ID(a(e,111).c):0};var hWe=A(wE,"HorizontalPortPlacementSizeCalculator/lambda$0$Type",1182);T(1184,1,{},xz),u.td=function(e){N3t(a(e,267))};var fWe=A(wE,"LabelPlacer/lambda$0$Type",1184);T(1185,1,us,kR),u.Nb=function(e){return!!a(e,111).c};var dWe=A(wE,"LabelPlacer/lambda$1$Type",1185);T(1186,1,{},LR),u.td=function(e){N3t(a(e,111).c)};var pWe=A(wE,"LabelPlacer/lambda$2$Type",1186),Ovt;T(1181,1,{},D3),u.td=function(e){Fg(),hit(a(e,111))};var gWe=A(wE,"NodeLabelAndSizeUtilities/lambda$0$Type",1181);T(698,1,{},Trt),u.td=function(e){RQt(this.a,this.b,e)},u.b=!1;var mWe=A(wE,"NodeLabelCellCreator/lambda$0$Type",698);T(1180,1,{},YH),u.td=function(e){Vt(this.a,e)};var bWe=A(wE,"PortContextCreator/lambda$0$Type",1180),zF;T(1183,1,{},Ab),u.oe=function(e){return a(e,111).c?b$(a(e,111).c):0};var wWe=A(wE,"VerticalPortPlacementSizeCalculator/lambda$0$Type",1183);T(1525,1,{},PR);var vWe=A(vE,"GreedyRectangleStripOverlapRemover",1525);T(1526,1,jr,Mz),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Lee(a(e,194),a(n,194))};var _We=A(vE,"GreedyRectangleStripOverlapRemover/0methodref$compareByYCoordinate$Type",1526);T(1497,1,{},zxt),u.a=5,u.e=0;var yWe=A(vE,"RectangleStripOverlapRemover",1497);T(1498,1,jr,WS),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Pee(a(e,194),a(n,194))};var xWe=A(vE,"RectangleStripOverlapRemover/0methodref$compareLeftRectangleBorders$Type",1498);T(1500,1,jr,Ez),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return nse(a(e,194),a(n,194))};var MWe=A(vE,"RectangleStripOverlapRemover/1methodref$compareRightRectangleBorders$Type",1500);T(374,23,{3:1,34:1,23:1,374:1},J9);var dI,ett,ntt,pI,xqt=Ri(vE,"RectangleStripOverlapRemover/OverlapRemovalDirection",374,ji,Hce,ore),Mqt;T(194,1,{194:1},v$);var EWe=A(vE,"RectangleStripOverlapRemover/RectangleNode",194);T(1499,1,{},a9),u.td=function(e){npe(this.a,a(e,194))};var SWe=A(vE,"RectangleStripOverlapRemover/lambda$0$Type",1499),Nw=Sr(tl,"EObject"),$E=Sr(H_,AFt),sf=Sr(H_,kFt),gI=Sr(H_,LFt),mI=Sr(H_,"ElkShape"),Si=Sr(H_,PFt),Xs=Sr(H_,Tpt),os=Sr(H_,IFt),bI=Sr(tl,RFt),CA=Sr(tl,"EFactory"),Eqt,itt=Sr(tl,DFt),of=Sr(tl,"EPackage"),ms,Sqt,Tqt,Bvt,jF,Cqt,Fvt,Uvt,zvt,pp,Aqt,kqt,ic=Sr(H_,Cpt),zr=Sr(H_,Apt),Rl=Sr(H_,kpt);T(87,1,NFt),u.cg=function(){return this.dg(),null},u.dg=function(){return null},u.eg=function(){return this.dg(),!1},u.fg=function(){return!1},u.gg=function(e){Bi(this,e)};var TWe=A(dx,"BasicNotifierImpl",87);T(92,87,BFt),u.Hg=function(){return Xl(this)},u.hg=function(e,n){return e},u.ig=function(){throw K(new Oi)},u.jg=function(e){var n;return n=jo(a(Ve(this.mg(),this.og()),17)),this.yg().Cg(this,n.n,n.f,e)},u.kg=function(e,n){throw K(new Oi)},u.lg=function(e,n,i){return Lu(this,e,n,i)},u.mg=function(){var e;return this.ig()&&(e=this.ig().pj(),e)?e:this.Rg()},u.ng=function(){return SX(this)},u.og=function(){throw K(new Oi)},u.pg=function(){var e,n;return n=this.Jg().qj(),!n&&this.ig().vj(n=(TT(),e=tct(q1(this.mg())),e==null?htt:new eL(this,e))),n},u.qg=function(e,n){return e},u.rg=function(e){var n;return n=e.Vi(),n?e.pi():xr(this.mg(),e)},u.sg=function(){var e;return e=this.ig(),e?e.sj():null},u.tg=function(){return this.ig()?this.ig().pj():null},u.ug=function(e,n,i){return g7(this,e,n,i)},u.vg=function(e){return kL(this,e)},u.wg=function(e,n){return Lct(this,e,n)},u.xg=function(){var e;return e=this.ig(),!!e&&e.tj()},u.yg=function(){throw K(new Oi)},u.zg=function(){return l7(this)},u.Ag=function(e,n,i,r){return H2(this,e,n,r)},u.Bg=function(e,n,i){var r;return r=a(Ve(this.mg(),n),61),r.aj().dj(this,this.Qg(),n-this.Sg(),e,i)},u.Cg=function(e,n,i,r){return nN(this,e,n,r)},u.Dg=function(e,n,i){var r;return r=a(Ve(this.mg(),n),61),r.aj().ej(this,this.Qg(),n-this.Sg(),e,i)},u.Eg=function(){return!!this.ig()&&(this.ig().rj(),!1)},u.Fg=function(e){return Hq(this,e)},u.Gg=function(e){var n;return n=this.rg(e),n>=0?this.Fg(n):yX(this,e)},u.Ig=function(e){return v7t(this,e)},u.Jg=function(){throw K(new Oi)},u.Kg=function(){return this.ig()?this.ig().rj():null},u.Lg=function(){return l7(this)},u.Mg=function(e,n){P7(this,e,n)},u.Ng=function(e){this.Jg().uj(e)},u.Og=function(e){this.Jg().wj(e)},u.Pg=function(e,n){var i,r,c,l;return l=this.sg(),l&&e&&(n=$s(l.fk(),this,n),l.jk(this)),r=this.yg(),r&&(FX(this,this.yg(),this.og()).Bb&ao?(c=r.zg(),c&&(e?!l&&c.jk(this):c.ik(this))):(n=(i=this.og(),i>=0?this.jg(n):this.yg().Cg(this,-1-i,null,n)),n=this.lg(null,-1,n))),this.Og(e),n},u.Qg=function(){return Zct(this)},u.Rg=function(){return(T1(),Ae).S},u.Sg=function(){return ei(this.Rg())},u.Ib=function(){return nh(this)};var CWe=A(Re,"BasicEObjectImpl",92),Lqt;T(107,92,{95:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1}),u.Tg=function(e){var n;return n=Xct(this),n[e]},u.Ug=function(e,n){var i;i=Xct(this),Vr(i,e,n)},u.Vg=function(e){var n;n=Xct(this),Vr(n,e,null)},u.cg=function(){return a(an(this,4),116)},u.dg=function(){throw K(new Oi)},u.eg=function(){return(this.Db&4)!=0},u.ig=function(){throw K(new Oi)},u.Wg=function(e){zC(this,2,e)},u.kg=function(e,n){this.Db=n<<16|this.Db&255,this.Wg(e)},u.mg=function(){return da(this)},u.og=function(){return this.Db>>16},u.pg=function(){var e,n;return TT(),n=tct(q1((e=a(an(this,16),24),e||this.Rg()))),n==null?htt:new eL(this,n)},u.fg=function(){return(this.Db&1)==0},u.sg=function(){return a(an(this,128),1628)},u.tg=function(){return a(an(this,16),24)},u.xg=function(){return(this.Db&32)!=0},u.yg=function(){return a(an(this,2),42)},u.Eg=function(){return(this.Db&64)!=0},u.Jg=function(){throw K(new Oi)},u.Kg=function(){return a(an(this,64),261)},u.Ng=function(e){zC(this,16,e)},u.Og=function(e){zC(this,128,e)},u.Qg=function(){return ra(this)},u.Db=0;var AWe=A(Re,"MinimalEObjectImpl",107);T(108,107,{95:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1}),u.Wg=function(e){this.Cb=e},u.yg=function(){return this.Cb};var kWe=A(Re,"MinimalEObjectImpl/Container",108);T(1676,108,{95:1,379:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1}),u.ve=function(e){return!this.o&&(this.o=new lu((Ic(),pp),ug,this,0)),lPt(this.o,e.p?e.p:(we(),we(),ap)),this},u.ug=function(e,n,i){return Uut(this,e,n,i)},u.Dg=function(e,n,i){return vlt(this,e,n,i)},u.Fg=function(e){return cct(this,e)},u.Mg=function(e,n){Oat(this,e,n)},u.Rg=function(){return Ic(),kqt},u.we=function(){return uRt(this)},u.xe=function(e){return cn(this,e)},u.ye=function(e){return mV(this,e)},u.ze=function(e,n){return ga(this,e,n)};var LWe=A(p0,"EMapPropertyHolderImpl",1676);T(502,108,{95:1,531:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1},N3),u.ug=function(e,n,i){switch(e){case 0:return this.a;case 1:return this.b}return g7(this,e,n,i)},u.Fg=function(e){switch(e){case 0:return this.a!=0;case 1:return this.b!=0}return Hq(this,e)},u.Mg=function(e,n){switch(e){case 0:OV(this,lt(Yt(n)));return;case 1:BV(this,lt(Yt(n)));return}P7(this,e,n)},u.Rg=function(){return Ic(),Sqt},u.Ib=function(){var e;return this.Db&64?nh(this):(e=new ul(nh(this)),e.a+=" (x: ",Rv(e,this.a),e.a+=", y: ",Rv(e,this.b),e.a+=")",e.a)},u.a=0,u.b=0;var PWe=A(p0,"ElkBendPointImpl",502);T(651,1676,{95:1,379:1,253:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1}),u.ug=function(e,n,i){return Kat(this,e,n,i)},u.Bg=function(e,n,i){return hX(this,e,n,i)},u.Dg=function(e,n,i){return nq(this,e,n,i)},u.Fg=function(e){return Sat(this,e)},u.Mg=function(e,n){nlt(this,e,n)},u.Rg=function(){return Ic(),Cqt},u.Vf=function(){return j$(this)},u.Ib=function(){return Sq(this)},u.k=null;var IWe=A(p0,"ElkGraphElementImpl",651);T(652,651,{95:1,379:1,253:1,429:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1}),u.ug=function(e,n,i){return out(this,e,n,i)},u.Fg=function(e){return hut(this,e)},u.Mg=function(e,n){ilt(this,e,n)},u.Rg=function(){return Ic(),Aqt},u.Wf=function(){return this.f},u.Xf=function(){return this.g},u.Yf=function(){return this.i},u.Zf=function(){return this.j},u.$f=function(e,n){sD(this,e,n)},u._f=function(e,n){Wd(this,e,n)},u.ag=function(e){th(this,e)},u.bg=function(e){eh(this,e)},u.Ib=function(){return dX(this)},u.f=0,u.g=0,u.i=0,u.j=0;var RWe=A(p0,"ElkShapeImpl",652);T(653,652,{95:1,379:1,97:1,253:1,429:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1}),u.ug=function(e,n,i){return Put(this,e,n,i)},u.Bg=function(e,n,i){return Kut(this,e,n,i)},u.Dg=function(e,n,i){return Jut(this,e,n,i)},u.Fg=function(e){return Dat(this,e)},u.Mg=function(e,n){qlt(this,e,n)},u.Rg=function(){return Ic(),Tqt},u.Tf=function(){return!this.d&&(this.d=new pn(Xs,this,8,5)),this.d},u.Uf=function(){return!this.e&&(this.e=new pn(Xs,this,7,4)),this.e};var DWe=A(p0,"ElkConnectableShapeImpl",653);T(183,651,{95:1,379:1,105:1,253:1,183:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1},$S),u.jg=function(e){return $ut(this,e)},u.ug=function(e,n,i){switch(e){case 3:return rN(this);case 4:return!this.b&&(this.b=new pn(Si,this,4,7)),this.b;case 5:return!this.c&&(this.c=new pn(Si,this,5,8)),this.c;case 6:return!this.a&&(this.a=new Wt(os,this,6,6)),this.a;case 7:return me(),!this.b&&(this.b=new pn(Si,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new pn(Si,this,5,8)),this.c.i<=1));case 8:return me(),!!t4(this);case 9:return me(),!!Nm(this);case 10:return me(),!this.b&&(this.b=new pn(Si,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new pn(Si,this,5,8)),this.c.i!=0)}return Kat(this,e,n,i)},u.Bg=function(e,n,i){var r;switch(n){case 3:return this.Cb&&(i=(r=this.Db>>16,r>=0?$ut(this,i):this.Cb.Cg(this,-1-r,null,i))),mst(this,a(e,35),i);case 4:return!this.b&&(this.b=new pn(Si,this,4,7)),Kc(this.b,e,i);case 5:return!this.c&&(this.c=new pn(Si,this,5,8)),Kc(this.c,e,i);case 6:return!this.a&&(this.a=new Wt(os,this,6,6)),Kc(this.a,e,i)}return hX(this,e,n,i)},u.Dg=function(e,n,i){switch(n){case 3:return mst(this,null,i);case 4:return!this.b&&(this.b=new pn(Si,this,4,7)),$s(this.b,e,i);case 5:return!this.c&&(this.c=new pn(Si,this,5,8)),$s(this.c,e,i);case 6:return!this.a&&(this.a=new Wt(os,this,6,6)),$s(this.a,e,i)}return nq(this,e,n,i)},u.Fg=function(e){switch(e){case 3:return!!rN(this);case 4:return!!this.b&&this.b.i!=0;case 5:return!!this.c&&this.c.i!=0;case 6:return!!this.a&&this.a.i!=0;case 7:return!this.b&&(this.b=new pn(Si,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new pn(Si,this,5,8)),this.c.i<=1));case 8:return t4(this);case 9:return Nm(this);case 10:return!this.b&&(this.b=new pn(Si,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new pn(Si,this,5,8)),this.c.i!=0)}return Sat(this,e)},u.Mg=function(e,n){switch(e){case 3:SDt(this,a(n,35));return;case 4:!this.b&&(this.b=new pn(Si,this,4,7)),Dr(this.b),!this.b&&(this.b=new pn(Si,this,4,7)),Lr(this.b,a(n,13));return;case 5:!this.c&&(this.c=new pn(Si,this,5,8)),Dr(this.c),!this.c&&(this.c=new pn(Si,this,5,8)),Lr(this.c,a(n,13));return;case 6:!this.a&&(this.a=new Wt(os,this,6,6)),Dr(this.a),!this.a&&(this.a=new Wt(os,this,6,6)),Lr(this.a,a(n,13));return}nlt(this,e,n)},u.Rg=function(){return Ic(),Bvt},u.Ib=function(){return h7t(this)};var NWe=A(p0,"ElkEdgeImpl",183);T(405,1676,{95:1,379:1,270:1,405:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1},O3),u.jg=function(e){return Hut(this,e)},u.ug=function(e,n,i){switch(e){case 1:return this.j;case 2:return this.k;case 3:return this.b;case 4:return this.c;case 5:return!this.a&&(this.a=new Ss(sf,this,5)),this.a;case 6:return mAt(this);case 7:return n?qq(this):this.i;case 8:return n?Vq(this):this.f;case 9:return!this.g&&(this.g=new pn(os,this,9,10)),this.g;case 10:return!this.e&&(this.e=new pn(os,this,10,9)),this.e;case 11:return this.d}return Uut(this,e,n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 6:return this.Cb&&(i=(c=this.Db>>16,c>=0?Hut(this,i):this.Cb.Cg(this,-1-c,null,i))),bst(this,a(e,105),i);case 9:return!this.g&&(this.g=new pn(os,this,9,10)),Kc(this.g,e,i);case 10:return!this.e&&(this.e=new pn(os,this,10,9)),Kc(this.e,e,i)}return l=a(Ve((r=a(an(this,16),24),r||(Ic(),jF)),n),61),l.aj().dj(this,ra(this),n-ei((Ic(),jF)),e,i)},u.Dg=function(e,n,i){switch(n){case 5:return!this.a&&(this.a=new Ss(sf,this,5)),$s(this.a,e,i);case 6:return bst(this,null,i);case 9:return!this.g&&(this.g=new pn(os,this,9,10)),$s(this.g,e,i);case 10:return!this.e&&(this.e=new pn(os,this,10,9)),$s(this.e,e,i)}return vlt(this,e,n,i)},u.Fg=function(e){switch(e){case 1:return this.j!=0;case 2:return this.k!=0;case 3:return this.b!=0;case 4:return this.c!=0;case 5:return!!this.a&&this.a.i!=0;case 6:return!!mAt(this);case 7:return!!this.i;case 8:return!!this.f;case 9:return!!this.g&&this.g.i!=0;case 10:return!!this.e&&this.e.i!=0;case 11:return this.d!=null}return cct(this,e)},u.Mg=function(e,n){switch(e){case 1:EC(this,lt(Yt(n)));return;case 2:SC(this,lt(Yt(n)));return;case 3:MC(this,lt(Yt(n)));return;case 4:xC(this,lt(Yt(n)));return;case 5:!this.a&&(this.a=new Ss(sf,this,5)),Dr(this.a),!this.a&&(this.a=new Ss(sf,this,5)),Lr(this.a,a(n,13));return;case 6:Rbe(this,a(n,105));return;case 7:pat(this,a(n,97));return;case 8:dat(this,a(n,97));return;case 9:!this.g&&(this.g=new pn(os,this,9,10)),Dr(this.g),!this.g&&(this.g=new pn(os,this,9,10)),Lr(this.g,a(n,13));return;case 10:!this.e&&(this.e=new pn(os,this,10,9)),Dr(this.e),!this.e&&(this.e=new pn(os,this,10,9)),Lr(this.e,a(n,13));return;case 11:hPt(this,hi(n));return}Oat(this,e,n)},u.Rg=function(){return Ic(),jF},u.Ib=function(){return I9t(this)},u.b=0,u.c=0,u.d=null,u.j=0,u.k=0;var OWe=A(p0,"ElkEdgeSectionImpl",405);T(142,108,{95:1,91:1,87:1,139:1,51:1,103:1,42:1,92:1,142:1,107:1,108:1}),u.ug=function(e,n,i){var r;return e==0?(!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab):Xu(this,e-ei(this.Rg()),Ve((r=a(an(this,16),24),r||this.Rg()),e),n,i)},u.Bg=function(e,n,i){var r,c;return n==0?(!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i)):(c=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),c.aj().dj(this,ra(this),n-ei(this.Rg()),e,i))},u.Dg=function(e,n,i){var r,c;return n==0?(!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i)):(c=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),c.aj().ej(this,ra(this),n-ei(this.Rg()),e,i))},u.Fg=function(e){var n;return e==0?!!this.Ab&&this.Ab.i!=0:Vu(this,e-ei(this.Rg()),Ve((n=a(an(this,16),24),n||this.Rg()),e))},u.Ig=function(e){return Xht(this,e)},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return}Ku(this,e-ei(this.Rg()),Ve((i=a(an(this,16),24),i||this.Rg()),e),n)},u.Og=function(e){zC(this,128,e)},u.Rg=function(){return ye(),Xqt},u.Xg=function(){this.Bb|=1},u.Yg=function(e){return o4(this,e)},u.Bb=0;var BWe=A(Re,"EModelElementImpl",142);T(638,142,{95:1,91:1,87:1,430:1,139:1,51:1,103:1,42:1,92:1,142:1,107:1,108:1},T8),u.Zg=function(e,n){return B7t(this,e,n)},u.$g=function(e){var n,i,r,c,l;if(this.a!=Zu(e)||e.Bb&256)throw K(new yn(XY+e.zb+Gm));for(r=Bo(e);kc(r.a).i!=0;){if(i=a(OP(r,0,(n=a(at(kc(r.a),0),84),l=n.c,ct(l,96)?a(l,24):(ye(),gh))),24),Im(i))return c=Zu(i).dh().$g(i),a(c,42).Ng(e),c;r=Bo(i)}return(e.D!=null?e.D:e.B)=="java.util.Map$Entry"?new vCt(e):new Jst(e)},u._g=function(e,n){return Bm(this,e,n)},u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.a}return Xu(this,e-ei((ye(),pb)),Ve((r=a(an(this,16),24),r||pb),e),n,i)},u.Bg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 1:return this.a&&(i=a(this.a,42).Cg(this,4,of,i)),Vat(this,a(e,207),i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),pb)),n),61),c.aj().dj(this,ra(this),n-ei((ye(),pb)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 1:return Vat(this,null,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),pb)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),pb)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return!!this.a}return Vu(this,e-ei((ye(),pb)),Ve((n=a(an(this,16),24),n||pb),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:Tge(this,a(n,207));return}Ku(this,e-ei((ye(),pb)),Ve((i=a(an(this,16),24),i||pb),e),n)},u.Rg=function(){return ye(),pb};var AA,jvt,Pqt,FWe=A(Re,"EFactoryImpl",638);T(914,638,{95:1,1698:1,91:1,87:1,430:1,139:1,51:1,103:1,42:1,92:1,142:1,107:1,108:1},Pg),u.Zg=function(e,n){switch(e.Ni()){case 12:return a(n,166).Lf();case 13:return Yc(n);default:throw K(new yn(_E+e.be()+Gm))}},u.$g=function(e){var n,i,r,c,l,f,g,b;switch(e.G==-1&&(e.G=(n=Zu(e),n?Hp(n.bh(),e):-1)),e.G){case 4:return l=new VS,l;case 6:return f=new xit,f;case 7:return g=new Mit,g;case 8:return r=new $S,r;case 9:return i=new N3,i;case 10:return c=new O3,c;case 11:return b=new Fk,b;default:throw K(new yn(XY+e.zb+Gm))}},u._g=function(e,n){switch(e.Ni()){case 13:case 12:return null;default:throw K(new yn(_E+e.be()+Gm))}};var UWe=A(p0,"ElkGraphFactoryImpl",914);T(399,142,{95:1,91:1,87:1,139:1,174:1,51:1,103:1,42:1,92:1,142:1,107:1,108:1}),u.pg=function(){var e,n;return n=(e=a(an(this,16),24),tct(q1(e||this.Rg()))),n==null?(TT(),TT(),htt):new GSt(this,n)},u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.be()}return Xu(this,e-ei(this.Rg()),Ve((r=a(an(this,16),24),r||this.Rg()),e),n,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null}return Vu(this,e-ei(this.Rg()),Ve((n=a(an(this,16),24),n||this.Rg()),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:this.ah(hi(n));return}Ku(this,e-ei(this.Rg()),Ve((i=a(an(this,16),24),i||this.Rg()),e),n)},u.Rg=function(){return ye(),Zqt},u.be=function(){return this.zb},u.ah=function(e){kh(this,e)},u.Ib=function(){return DC(this)},u.zb=null;var zWe=A(Re,"ENamedElementImpl",399);T(248,399,{95:1,91:1,87:1,139:1,174:1,51:1,207:1,103:1,42:1,92:1,142:1,248:1,107:1,108:1,613:1},z4t),u.jg=function(e){return $Rt(this,e)},u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.yb;case 3:return this.xb;case 4:return this.sb;case 5:return!this.rb&&(this.rb=new Zv(this,cf,this)),this.rb;case 6:return!this.vb&&(this.vb=new mM(of,this,6,7)),this.vb;case 7:return n?this.Db>>16==7?a(this.Cb,207):null:bAt(this)}return Xu(this,e-ei((ye(),A0)),Ve((r=a(an(this,16),24),r||A0),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 4:return this.sb&&(i=a(this.sb,42).Cg(this,1,CA,i)),Xat(this,a(e,430),i);case 5:return!this.rb&&(this.rb=new Zv(this,cf,this)),Kc(this.rb,e,i);case 6:return!this.vb&&(this.vb=new mM(of,this,6,7)),Kc(this.vb,e,i);case 7:return this.Cb&&(i=(c=this.Db>>16,c>=0?$Rt(this,i):this.Cb.Cg(this,-1-c,null,i))),Lu(this,e,7,i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),A0)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),A0)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 4:return Xat(this,null,i);case 5:return!this.rb&&(this.rb=new Zv(this,cf,this)),$s(this.rb,e,i);case 6:return!this.vb&&(this.vb=new mM(of,this,6,7)),$s(this.vb,e,i);case 7:return Lu(this,null,7,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),A0)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),A0)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.yb!=null;case 3:return this.xb!=null;case 4:return!!this.sb;case 5:return!!this.rb&&this.rb.i!=0;case 6:return!!this.vb&&this.vb.i!=0;case 7:return!!bAt(this)}return Vu(this,e-ei((ye(),A0)),Ve((n=a(an(this,16),24),n||A0),e))},u.Ig=function(e){var n;return n=Hbe(this,e),n||Xht(this,e)},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:kh(this,hi(n));return;case 2:VV(this,hi(n));return;case 3:$V(this,hi(n));return;case 4:_lt(this,a(n,430));return;case 5:!this.rb&&(this.rb=new Zv(this,cf,this)),Dr(this.rb),!this.rb&&(this.rb=new Zv(this,cf,this)),Lr(this.rb,a(n,13));return;case 6:!this.vb&&(this.vb=new mM(of,this,6,7)),Dr(this.vb),!this.vb&&(this.vb=new mM(of,this,6,7)),Lr(this.vb,a(n,13));return}Ku(this,e-ei((ye(),A0)),Ve((i=a(an(this,16),24),i||A0),e),n)},u.Rg=function(){return ye(),A0},u.Xg=function(){iX(this)},u.bh=function(){return!this.rb&&(this.rb=new Zv(this,cf,this)),this.rb},u.dh=function(){return this.sb},u.eh=function(){return this.ub},u.fh=function(){return this.xb},u.gh=function(){return this.yb},u.hh=function(e){this.ub=e},u.Ib=function(){var e;return this.Db&64?DC(this):(e=new ul(DC(this)),e.a+=" (nsURI: ",mo(e,this.yb),e.a+=", nsPrefix: ",mo(e,this.xb),e.a+=")",e.a)},u.xb=null,u.yb=null;var Iqt,jWe=A(Re,"EPackageImpl",248);T(506,248,{95:1,1702:1,506:1,91:1,87:1,139:1,174:1,51:1,207:1,103:1,42:1,92:1,142:1,248:1,107:1,108:1,613:1},q9t),u.q=!1,u.r=!1;var Rqt=!1,HWe=A(p0,"ElkGraphPackageImpl",506);T(263,652,{95:1,379:1,253:1,137:1,429:1,263:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1},VS),u.jg=function(e){return Gut(this,e)},u.ug=function(e,n,i){switch(e){case 7:return wAt(this);case 8:return this.a}return out(this,e,n,i)},u.Bg=function(e,n,i){var r;switch(n){case 7:return this.Cb&&(i=(r=this.Db>>16,r>=0?Gut(this,i):this.Cb.Cg(this,-1-r,null,i))),dot(this,a(e,253),i)}return hX(this,e,n,i)},u.Dg=function(e,n,i){return n==7?dot(this,null,i):nq(this,e,n,i)},u.Fg=function(e){switch(e){case 7:return!!wAt(this);case 8:return!le("",this.a)}return hut(this,e)},u.Mg=function(e,n){switch(e){case 7:IDt(this,a(n,253));return;case 8:rPt(this,hi(n));return}ilt(this,e,n)},u.Rg=function(){return Ic(),Fvt},u.Ib=function(){return B8t(this)},u.a="";var GWe=A(p0,"ElkLabelImpl",263);T(246,653,{95:1,379:1,97:1,253:1,35:1,429:1,246:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1},xit),u.jg=function(e){return Xut(this,e)},u.ug=function(e,n,i){switch(e){case 9:return!this.c&&(this.c=new Wt(Rl,this,9,9)),this.c;case 10:return!this.a&&(this.a=new Wt(zr,this,10,11)),this.a;case 11:return io(this);case 12:return!this.b&&(this.b=new Wt(Xs,this,12,3)),this.b;case 13:return me(),!this.a&&(this.a=new Wt(zr,this,10,11)),this.a.i>0}return Put(this,e,n,i)},u.Bg=function(e,n,i){var r;switch(n){case 9:return!this.c&&(this.c=new Wt(Rl,this,9,9)),Kc(this.c,e,i);case 10:return!this.a&&(this.a=new Wt(zr,this,10,11)),Kc(this.a,e,i);case 11:return this.Cb&&(i=(r=this.Db>>16,r>=0?Xut(this,i):this.Cb.Cg(this,-1-r,null,i))),Tst(this,a(e,35),i);case 12:return!this.b&&(this.b=new Wt(Xs,this,12,3)),Kc(this.b,e,i)}return Kut(this,e,n,i)},u.Dg=function(e,n,i){switch(n){case 9:return!this.c&&(this.c=new Wt(Rl,this,9,9)),$s(this.c,e,i);case 10:return!this.a&&(this.a=new Wt(zr,this,10,11)),$s(this.a,e,i);case 11:return Tst(this,null,i);case 12:return!this.b&&(this.b=new Wt(Xs,this,12,3)),$s(this.b,e,i)}return Jut(this,e,n,i)},u.Fg=function(e){switch(e){case 9:return!!this.c&&this.c.i!=0;case 10:return!!this.a&&this.a.i!=0;case 11:return!!io(this);case 12:return!!this.b&&this.b.i!=0;case 13:return!this.a&&(this.a=new Wt(zr,this,10,11)),this.a.i>0}return Dat(this,e)},u.Mg=function(e,n){switch(e){case 9:!this.c&&(this.c=new Wt(Rl,this,9,9)),Dr(this.c),!this.c&&(this.c=new Wt(Rl,this,9,9)),Lr(this.c,a(n,13));return;case 10:!this.a&&(this.a=new Wt(zr,this,10,11)),Dr(this.a),!this.a&&(this.a=new Wt(zr,this,10,11)),Lr(this.a,a(n,13));return;case 11:CDt(this,a(n,35));return;case 12:!this.b&&(this.b=new Wt(Xs,this,12,3)),Dr(this.b),!this.b&&(this.b=new Wt(Xs,this,12,3)),Lr(this.b,a(n,13));return}qlt(this,e,n)},u.Rg=function(){return Ic(),Uvt},u.Ib=function(){return vht(this)};var WWe=A(p0,"ElkNodeImpl",246);T(187,653,{95:1,379:1,97:1,253:1,121:1,429:1,187:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1},Mit),u.jg=function(e){return Wut(this,e)},u.ug=function(e,n,i){return e==9?Tf(this):Put(this,e,n,i)},u.Bg=function(e,n,i){var r;switch(n){case 9:return this.Cb&&(i=(r=this.Db>>16,r>=0?Wut(this,i):this.Cb.Cg(this,-1-r,null,i))),wst(this,a(e,35),i)}return Kut(this,e,n,i)},u.Dg=function(e,n,i){return n==9?wst(this,null,i):Jut(this,e,n,i)},u.Fg=function(e){return e==9?!!Tf(this):Dat(this,e)},u.Mg=function(e,n){switch(e){case 9:TDt(this,a(n,35));return}qlt(this,e,n)},u.Rg=function(){return Ic(),zvt},u.Ib=function(){return _Nt(this)};var $We=A(p0,"ElkPortImpl",187),Dqt=Sr(qs,"BasicEMap/Entry");T(966,108,{95:1,38:1,91:1,87:1,134:1,51:1,103:1,42:1,92:1,107:1,108:1},Fk),u.Fb=function(e){return this===e},u.kc=function(){return this.b},u.Hb=function(){return lm(this)},u.kh=function(e){iPt(this,a(e,166))},u.ug=function(e,n,i){switch(e){case 0:return this.b;case 1:return this.c}return g7(this,e,n,i)},u.Fg=function(e){switch(e){case 0:return!!this.b;case 1:return this.c!=null}return Hq(this,e)},u.Mg=function(e,n){switch(e){case 0:iPt(this,a(n,166));return;case 1:nPt(this,n);return}P7(this,e,n)},u.Rg=function(){return Ic(),pp},u.ih=function(){var e;return this.a==-1&&(e=this.b,this.a=e?Yr(e):0),this.a},u.lc=function(){return this.c},u.jh=function(e){this.a=e},u.mc=function(e){var n;return n=this.c,nPt(this,e),n},u.Ib=function(){var e;return this.Db&64?nh(this):(e=new om,Ii(Ii(Ii(e,this.b?this.b.Lf():tu)," -> "),$T(this.c)),e.a)},u.a=-1,u.c=null;var ug=A(p0,"ElkPropertyToValueMapEntryImpl",966);T(876,1,{},Sz);var VWe=A(Ds,"JsonAdapter",876);T(186,54,rp,xf);var qWe=A(Ds,"JsonImportException",186);T(754,1,{},r8t);var XWe=A(Ds,"JsonImporter",754);T(792,1,{},nEt);var ZWe=A(Ds,"JsonImporter/lambda$0$Type",792);T(793,1,{},iEt);var YWe=A(Ds,"JsonImporter/lambda$1$Type",793);T(816,1,{},u9);var KWe=A(Ds,"JsonImporter/lambda$10$Type",816);T(818,1,{},KH);var JWe=A(Ds,"JsonImporter/lambda$11$Type",818);T(819,1,{},rEt),u.td=function(e){Qce(this.b,this.a,e)};var QWe=A(Ds,"JsonImporter/lambda$12$Type",819);T(820,1,{},sEt);var t$e=A(Ds,"JsonImporter/lambda$13$Type",820);T(821,1,{},oEt);var e$e=A(Ds,"JsonImporter/lambda$14$Type",821);T(822,1,{},JH);var n$e=A(Ds,"JsonImporter/lambda$15$Type",822);T(823,1,{},QH);var i$e=A(Ds,"JsonImporter/lambda$16$Type",823);T(824,1,{},tG);var r$e=A(Ds,"JsonImporter/lambda$17$Type",824);T(825,1,{},i2);var s$e=A(Ds,"JsonImporter/lambda$18$Type",825);T(756,1,{},eG);var o$e=A(Ds,"JsonImporter/lambda$19$Type",756);T(794,1,{},nG);var c$e=A(Ds,"JsonImporter/lambda$2$Type",794);T(829,1,{},XTt);var a$e=A(Ds,"JsonImporter/lambda$20$Type",829);T(830,1,{},iG),u.td=function(e){tae(this.a,e)};var u$e=A(Ds,"JsonImporter/lambda$21$Type",830);T(795,1,{},rG);var l$e=A(Ds,"JsonImporter/lambda$22$Type",795);T(796,1,{},sG);var h$e=A(Ds,"JsonImporter/lambda$23$Type",796);T(798,1,{},l9);var f$e=A(Ds,"JsonImporter/lambda$24$Type",798);T(799,1,{},h9);var d$e=A(Ds,"JsonImporter/lambda$25$Type",799);T(801,1,{},oG);var p$e=A(Ds,"JsonImporter/lambda$26$Type",801);T(809,1,{},A4t);var g$e=A(Ds,"JsonImporter/lambda$27$Type",809);T(811,1,{},cG);var m$e=A(Ds,"JsonImporter/lambda$28$Type",811);T(812,1,{},aG);var b$e=A(Ds,"JsonImporter/lambda$29$Type",812);T(797,1,{},uG);var w$e=A(Ds,"JsonImporter/lambda$3$Type",797);T(814,1,{},lG);var v$e=A(Ds,"JsonImporter/lambda$30$Type",814);T(815,1,{},hG);var _$e=A(Ds,"JsonImporter/lambda$31$Type",815);T(817,1,{},fG);var y$e=A(Ds,"JsonImporter/lambda$32$Type",817);T(826,1,{},dG),u.td=function(e){eae(this.a,e)};var x$e=A(Ds,"JsonImporter/lambda$33$Type",826);T(827,1,{},cEt),u.td=function(e){Pte(this.a,this.b,e)};var M$e=A(Ds,"JsonImporter/lambda$34$Type",827);T(828,1,{},aEt),u.td=function(e){Ite(this.a,this.b,e)};var E$e=A(Ds,"JsonImporter/lambda$35$Type",828);T(805,1,{},uEt);var S$e=A(Ds,"JsonImporter/lambda$36$Type",805);T(806,1,{},lEt);var T$e=A(Ds,"JsonImporter/lambda$37$Type",806);T(807,1,{},dEt);var C$e=A(Ds,"JsonImporter/lambda$38$Type",807);T(808,1,{},pEt);var A$e=A(Ds,"JsonImporter/lambda$39$Type",808);T(800,1,{},pG);var k$e=A(Ds,"JsonImporter/lambda$4$Type",800);T(802,1,{},gG);var L$e=A(Ds,"JsonImporter/lambda$5$Type",802);T(803,1,{},hEt);var P$e=A(Ds,"JsonImporter/lambda$6$Type",803);T(804,1,{},fEt);var I$e=A(Ds,"JsonImporter/lambda$7$Type",804);T(810,1,{},k4t);var R$e=A(Ds,"JsonImporter/lambda$8$Type",810);T(813,1,{},mG);var D$e=A(Ds,"JsonImporter/lambda$9$Type",813);T(864,1,{},bG),u.td=function(e){C2(this.a,new S2(hi(e)))};var N$e=A(Ds,"JsonMetaDataConverter/lambda$0$Type",864);T(865,1,{},wG),u.td=function(e){Ese(this.a,e)};var O$e=A(Ds,"JsonMetaDataConverter/lambda$1$Type",865);T(866,1,{},vG),u.td=function(e){Noe(this.a,e)};var B$e=A(Ds,"JsonMetaDataConverter/lambda$2$Type",866);T(867,1,{},_G),u.td=function(e){Mse(this.a,e)};var F$e=A(Ds,"JsonMetaDataConverter/lambda$3$Type",867);T(229,23,{3:1,34:1,23:1,229:1},_2);var HF,GF,rtt,WF,$F,VF,stt,ott,qF=Ri(XP,"GraphFeature",229,ji,Due,cre),Nqt;T(16,1,{34:1,166:1},kr,es,bn,xc),u.vd=function(e){return hee(this,a(e,166))},u.Fb=function(e){return j4t(this,e)},u.Of=function(){return Xe(this)},u.Lf=function(){return this.b},u.Hb=function(){return j1(this.b)},u.Ib=function(){return this.b};var U$e=A(XP,"Property",16);T(727,1,jr,f9),u.Ld=function(e,n){return jhe(this,a(e,93),a(n,93))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var z$e=A(XP,"PropertyHolderComparator",727),Hvt=Sr(qs,"EList");T(59,41,{20:1,25:1,41:1,13:1,15:1,59:1,52:1}),u.bd=function(e,n){QL(this,e,n)},u.nc=function(e){return ni(this,e)},u.oc=function(e){return Lr(this,e)},u.oh=function(){return new M2(this)},u.ph=function(){return new tL(this)},u.qh=function(e){return HL(this,e)},u.rh=function(){return!0},u.sh=function(e,n){},u.th=function(){},u.uh=function(e,n){wV(this,e,n)},u.vh=function(e,n){},u.wh=function(e,n,i){},u.Fb=function(e){return rNt(this,e)},u.Hb=function(){return Aat(this)},u.xh=function(){return!1},u.tc=function(){return new $n(this)},u.ed=function(){return new ZT(this)},u.fd=function(e){var n;if(n=this._b(),e<0||e>n)throw K(new $v(e,n));return new A$(this,e)},u.vc=function(e){return kV(this,e)},u.zh=function(e,n){return n},u.hd=function(e,n){return G2(this,e,n)},u.Ib=function(){return aut(this)},u.Bh=function(){return!0},u.Ch=function(e,n){return LC(this,n)};var j$e=A(qs,"AbstractEList",59);T(55,59,Nf,J0,i_,xat),u.lh=function(e){return IRt(this,e)},u.mh=function(e,n){eP(this,e,n)},u.nh=function(e){TL(this,e)},u.Dh=function(e){return Gct(this,e)},u.Pb=function(){mC(this)},u.pc=function(e){return ZC(this,e)},u.cd=function(e){return at(this,e)},u.Eh=function(e){eRt(this,e)},u.dd=function(e){return WRt(this,e)},u.Wb=function(){return this.i==0},u.Fh=function(e){return dt(un,te,1,e,5,1)},u.yh=function(e){return this.g[e]},u.gd=function(e){return W2(this,e)},u.Ah=function(e,n){return AV(this,e,n)},u._b=function(){return this.i},u.yc=function(){return hct(this)},u.zc=function(e){return put(this,e)},u.i=0;var Gvt=A(qs,"BasicEList",55),Wvt=Sr(qs,"TreeIterator");T(629,55,iK),u.gc=function(e){ks(this,e)},u.hc=function(){return this.g==null&&!this.c?Got(this):this.g==null||this.i!=0&&a(this.g[this.i-1],43).hc()},u.ic=function(){return D7(this)},u.jc=function(){if(!this.e)throw K(new yc("There is no valid object to remove."));this.e.jc()},u.c=!1;var H$e=A(qs,"AbstractTreeIterator",629);T(621,629,iK,Drt),u.Gh=function(e){var n;return n=a(e,51).pg().tc(),ct(n,260)&&a(n,260).Zj(new IR),n};var G$e=A(rK,"ElkGraphUtil/PropertiesSkippingTreeIterator",621);T(868,1,{},IR);var W$e=A(rK,"ElkGraphUtil/PropertiesSkippingTreeIterator/1",868),wI,ctt,vI=A(rK,"ElkReflect",null);T(784,1,j_,qS),u.Nf=function(e){return gN(),Bae(a(e,185))};var $$e=A(rK,"ElkReflect/lambda$0$Type",784),Ow,V$e=Sr(qs,"ResourceLocator");T(953,1,{});var q$e=A(qs,"DelegatingResourceLocator",953);T(954,953,{});var X$e=A("org.eclipse.emf.common","EMFPlugin",954),att=Sr(mUt,"Adapter"),tMe=Sr(mUt,"Notification");T(1016,1,Zpt),u.Hh=function(){return this.d},u.Ih=function(e){},u.Jh=function(e){this.d=e},u.Kh=function(e){this.d==e&&(this.d=null)},u.d=null;var Z$e=A(dx,"AdapterImpl",1016);T(1688,59,bUt),u.lh=function(e){var n,i,r;if(++this.j,e.Wb())return!1;for(n=this.hi(),r=e.tc();r.hc();)i=r.ic(),this.Wh(this.Ch(n,i)),++n;return!0},u.mh=function(e,n){nTt(this,e,n)},u.nh=function(e){r4t(this,e)},u.Uh=function(){return this.Xh()},u.Pb=function(){sL(this,this.hi(),this.ii())},u.pc=function(e){return this.Zh(e)},u.qc=function(e){return this.$h(e)},u.Vh=function(e,n){this.ei().tl()},u.Wh=function(e){this.ei().tl()},u.Xh=function(){return this.ei()},u.Yh=function(){this.ei().tl()},u.Zh=function(e){return this.ei().tl()},u.$h=function(e){return this.ei().tl()},u._h=function(e){return this.ei().tl()},u.ai=function(e){return this.ei().tl()},u.bi=function(){return this.ei().tl()},u.ci=function(e){return this.ei().tl()},u.di=function(){return this.ei().tl()},u.fi=function(e){return this.ei().tl()},u.gi=function(e,n){return this.ei().tl()},u.hi=function(){return this.ei().tl()},u.ii=function(){return this.ei().tl()},u.ji=function(e){return this.ei().tl()},u.ki=function(){return this.ei().tl()},u.Fb=function(e){return this._h(e)},u.cd=function(e){return this.zh(e,this.ai(e))},u.Hb=function(){return this.bi()},u.dd=function(e){return this.ci(e)},u.Wb=function(){return this.di()},u.yh=function(e){return this.ai(e)},u.gd=function(e){return OD(this,e)},u.vc=function(e){var n;return n=this.dd(e),n>=0?(this.gd(n),!0):!1},u.Ah=function(e,n){return this.gi(e,this.Ch(e,n))},u._b=function(){return this.hi()},u.yc=function(){return this.ii()},u.zc=function(e){return this.ji(e)},u.Ib=function(){return this.ki()};var Y$e=A(qs,"DelegatingEList",1688);T(1689,1688,bUt),u.li=function(e,n){return Lht(this,e,n)},u.lh=function(e){return this.li(this.hi(),e)},u.mh=function(e,n){X9t(this,e,n)},u.nh=function(e){z9t(this,e)},u.rh=function(){return!this.qi()},u.Pb=function(){Y7(this)},u.mi=function(e,n,i,r,c){return new Y4t(this,e,n,i,r,c)},u.ni=function(e){Bi(this.Oh(),e)},u.oi=function(){return null},u.pi=function(){return-1},u.Oh=function(){return null},u.qi=function(){return!1},u.ri=function(e,n){return n},u.si=function(e,n){return n},u.ti=function(){return!1},u.ui=function(){return!this.di()},u.gd=function(e){var n,i,r,c;return this.ti()?(r=this.ui(),n=this.mi(4,c=OD(this,e),null,e,r),this.qi()&&c?(i=this.si(c,null),i?(i.Sh(n),i.Th()):this.ni(n)):this.ni(n),c):(c=OD(this,e),this.qi()&&c&&(i=this.si(c,null),i&&i.Th()),c)},u.Ah=function(e,n){return zNt(this,e,n)};var K$e=A(dx,"DelegatingNotifyingListImpl",1689);T(136,1,c6),u.Sh=function(e){return olt(this,e)},u.Th=function(){SV(this)},u.Lh=function(){return this.d},u.oi=function(){return null},u.vi=function(){return null},u.Mh=function(e){return-1},u.Nh=function(){return ODt(this)},u.Oh=function(){return null},u.Ph=function(){return sht(this)},u.Qh=function(){return this.o<0?this.o<-2?-2-this.o-1:-1:this.o},u.wi=function(){return!1},u.Rh=function(e){var n,i,r,c,l,f,g,b,v,M,k;switch(this.d){case 1:case 2:switch(c=e.Lh(),c){case 1:case 2:if(l=e.Oh(),zt(l)===zt(this.Oh())&&this.Mh(null)==e.Mh(null))return this.g=e.Nh(),e.Lh()==1&&(this.d=1),!0}case 4:{switch(c=e.Lh(),c){case 4:{if(l=e.Oh(),zt(l)===zt(this.Oh())&&this.Mh(null)==e.Mh(null))return v=Ght(this),b=this.o<0?this.o<-2?-2-this.o-1:-1:this.o,f=e.Qh(),this.d=6,k=new i_(2),b<=f?(ni(k,this.n),ni(k,e.Ph()),this.g=Y(Z(Gn,1),pi,22,15,[this.o=b,f+1])):(ni(k,e.Ph()),ni(k,this.n),this.g=Y(Z(Gn,1),pi,22,15,[this.o=f,b])),this.n=k,v||(this.o=-2-this.o-1),!0;break}}break}case 6:{switch(c=e.Lh(),c){case 4:{if(l=e.Oh(),zt(l)===zt(this.Oh())&&this.Mh(null)==e.Mh(null)){for(v=Ght(this),f=e.Qh(),M=a(this.g,37),r=dt(Gn,pi,22,M.length+1,15,1),n=0;n>>0).toString(16)),i.a+=" (eventType: ",this.d){case 1:{i.a+="SET";break}case 2:{i.a+="UNSET";break}case 3:{i.a+="ADD";break}case 5:{i.a+="ADD_MANY";break}case 4:{i.a+="REMOVE";break}case 6:{i.a+="REMOVE_MANY";break}case 7:{i.a+="MOVE";break}case 8:{i.a+="REMOVING_ADAPTER";break}case 9:{i.a+="RESOLVE";break}default:{ZG(i,this.d);break}}if(TNt(this)&&(i.a+=", touch: true"),i.a+=", position: ",ZG(i,this.o<0?this.o<-2?-2-this.o-1:-1:this.o),i.a+=", notifier: ",IT(i,this.Oh()),i.a+=", feature: ",IT(i,this.oi()),i.a+=", oldValue: ",IT(i,sht(this)),i.a+=", newValue: ",this.d==6&&ct(this.g,37)){for(n=a(this.g,37),i.a+="[",e=0;e10?((!this.b||this.c.j!=this.a)&&(this.b=new dL(this),this.a=this.j),kT(this.b,e)):ZC(this,e)},u.Bh=function(){return!0},u.a=0;var rVe=A(qs,"AbstractEList/1",869);T(295,79,zZ,$v);var sVe=A(qs,"AbstractEList/BasicIndexOutOfBoundsException",295);T(36,1,Cs,$n),u.gc=function(e){ks(this,e)},u.Bi=function(){if(this.i.j!=this.f)throw K(new C)},u.Ci=function(){return ci(this)},u.hc=function(){return this.e!=this.i._b()},u.ic=function(){return this.Ci()},u.jc=function(){qC(this)},u.e=0,u.f=0,u.g=-1;var oVe=A(qs,"AbstractEList/EIterator",36);T(296,36,kf,ZT,A$),u.jc=function(){qC(this)},u.Bc=function(e){TIt(this,e)},u.Di=function(){var e;try{return e=this.d.cd(--this.e),this.Bi(),this.g=this.e,e}catch(n){throw n=vr(n),ct(n,79)?(this.Bi(),K(new J)):K(n)}},u.Ei=function(e){MRt(this,e)},u.Cc=function(){return this.e!=0},u.Dc=function(){return this.e},u.Ec=function(){return this.Di()},u.Fc=function(){return this.e-1},u.Gc=function(e){this.Ei(e)};var cVe=A(qs,"AbstractEList/EListIterator",296);T(324,36,Cs,M2),u.Ci=function(){return Fq(this)},u.jc=function(){throw K(new Oi)};var aVe=A(qs,"AbstractEList/NonResolvingEIterator",324);T(355,296,kf,tL,Fst),u.Bc=function(e){throw K(new Oi)},u.Ci=function(){var e;try{return e=this.c.yh(this.e),this.Bi(),this.g=this.e++,e}catch(n){throw n=vr(n),ct(n,79)?(this.Bi(),K(new J)):K(n)}},u.Di=function(){var e;try{return e=this.c.yh(--this.e),this.Bi(),this.g=this.e,e}catch(n){throw n=vr(n),ct(n,79)?(this.Bi(),K(new J)):K(n)}},u.jc=function(){throw K(new Oi)},u.Gc=function(e){throw K(new Oi)};var uVe=A(qs,"AbstractEList/NonResolvingEListIterator",355);T(1673,59,wUt),u.lh=function(e){var n,i,r,c,l,f,g,b,v;if(r=e._b(),r!=0){for(b=(i=a(an(this.a,4),116),i==null?0:i.length),v=b+r,n=zat(this,v),g=e.tc(),l=b;li)throw K(new $v(e,i));return new m4t(this,e)},u.Pb=function(){var e,n;++this.j,e=a(an(this.a,4),116),n=e==null?0:e.length,lP(this,null),wV(this,n,e)},u.pc=function(e){var n,i,r,c;if(n=a(an(this.a,4),116),n!=null){if(e!=null){for(r=0,c=n.length;r=i)throw K(new $v(e,i));return n[e]},u.dd=function(e){var n,i,r;if(n=a(an(this.a,4),116),n!=null){if(e!=null){for(i=0,r=n.length;ii)throw K(new $v(e,i));return new g4t(this,e)},u.yh=function(e){return a(an(this.a,4),116)[e]},u.gd=function(e){return ame(this,e)},u.Ah=function(e,n){var i,r;return i=qfe(this),r=i[e],zrt(i,e,LC(this,n)),lP(this,i),r},u._b=function(){var e;return e=a(an(this.a,4),116),e==null?0:e.length},u.yc=function(){var e,n,i;return e=a(an(this.a,4),116),i=e==null?0:e.length,n=dt(att,aK,380,i,0,1),i>0&&Aa(e,0,n,0,i),n},u.zc=function(e){var n,i,r;return n=a(an(this.a,4),116),r=n==null?0:n.length,r>0&&(e.lengthr&&Vr(e,r,null),e};var Oqt,lVe=A(qs,"ArrayDelegatingEList",1673);T(927,36,Cs,Kkt),u.Bi=function(){if(this.b.j!=this.f||zt(a(an(this.b.a,4),116))!==zt(this.a))throw K(new C)},u.jc=function(){qC(this),this.a=a(an(this.b.a,4),116)};var hVe=A(qs,"ArrayDelegatingEList/EIterator",927);T(640,296,kf,jCt,g4t),u.Bi=function(){if(this.b.j!=this.f||zt(a(an(this.b.a,4),116))!==zt(this.a))throw K(new C)},u.Ei=function(e){MRt(this,e),this.a=a(an(this.b.a,4),116)},u.jc=function(){qC(this),this.a=a(an(this.b.a,4),116)};var fVe=A(qs,"ArrayDelegatingEList/EListIterator",640);T(928,324,Cs,Jkt),u.Bi=function(){if(this.b.j!=this.f||zt(a(an(this.b.a,4),116))!==zt(this.a))throw K(new C)};var dVe=A(qs,"ArrayDelegatingEList/NonResolvingEIterator",928);T(641,355,kf,HCt,m4t),u.Bi=function(){if(this.b.j!=this.f||zt(a(an(this.b.a,4),116))!==zt(this.a))throw K(new C)};var pVe=A(qs,"ArrayDelegatingEList/NonResolvingEListIterator",641);T(549,295,zZ,kW);var gVe=A(qs,"BasicEList/BasicIndexOutOfBoundsException",549);T(630,55,Nf,Crt),u.bd=function(e,n){throw K(new Oi)},u.nc=function(e){throw K(new Oi)},u.oc=function(e){throw K(new Oi)},u.Pb=function(){throw K(new Oi)},u.Eh=function(e){throw K(new Oi)},u.tc=function(){return this.oh()},u.ed=function(){return this.ph()},u.fd=function(e){return this.qh(e)},u.gd=function(e){throw K(new Oi)},u.vc=function(e){throw K(new Oi)},u.hd=function(e,n){throw K(new Oi)};var mVe=A(qs,"BasicEList/UnmodifiableEList",630);T(639,1,{3:1,20:1,13:1,15:1,52:1,533:1}),u.bd=function(e,n){gee(this,e,a(n,38))},u.nc=function(e){return Zee(this,a(e,38))},u.sc=function(e){vo(this,e)},u.cd=function(e){return a(at(this.c,e),134)},u.uc=function(){return this.xc()},u.gd=function(e){return a(this.c.gd(e),38)},u.hd=function(e,n){return bse(this,e,a(n,38))},u.jd=function(e){D1(this,e)},u.wc=function(){return new Ei(this,16)},u.xc=function(){return new gi(null,this.wc())},u.oc=function(e){return this.c.oc(e)},u.Pb=function(){this.c.Pb()},u.pc=function(e){return this.c.pc(e)},u.qc=function(e){return O1(this.c,e)},u.Fi=function(){var e,n,i;if(this.d==null){for(this.d=dt(Gvt,Ypt,55,2*this.f+1,0,1),i=this.e,this.f=0,n=this.c.tc();n.e!=n.i._b();)e=a(n.Ci(),134),m7(this,e);this.e=i}},u.Fb=function(e){return FTt(this,e)},u.Hb=function(){return Aat(this.c)},u.dd=function(e){return this.c.dd(e)},u.Gi=function(){this.c=new yG(this)},u.Wb=function(){return this.f==0},u.tc=function(){return this.c.tc()},u.ed=function(){return this.c.ed()},u.fd=function(e){return this.c.fd(e)},u.Hi=function(){return AL(this)},u.Ii=function(e,n,i){return new ZTt(e,n,i)},u.Ji=function(){return new Cz},u.vc=function(e){return YLt(this,e)},u._b=function(){return this.f},u.kd=function(e,n){return new C1(this.c,e,n)},u.yc=function(){return this.c.yc()},u.zc=function(e){return this.c.zc(e)},u.Ib=function(){return aut(this.c)},u.e=0,u.f=0;var bVe=A(qs,"BasicEMap",639);T(922,55,Nf,yG),u.sh=function(e,n){ee(this,a(n,134))},u.vh=function(e,n){fe(this,a(n,134))},u.wh=function(e,n,i){Hee(this,a(n,134),a(i,134))},u.uh=function(e,n){VPt(this.a)};var wVe=A(qs,"BasicEMap/1",922);T(923,55,Nf,Cz),u.Fh=function(e){return dt(eMe,vUt,551,e,0,1)};var vVe=A(qs,"BasicEMap/2",923);T(924,bd,vl,xG),u.Pb=function(){this.a.c.Pb()},u.pc=function(e){return Rq(this.a,e)},u.tc=function(){return this.a.f==0?(KT(),_I.a):new y3t(this.a)},u.vc=function(e){var n;return n=this.a.f,aP(this.a,e),this.a.f!=n},u._b=function(){return this.a.f};var _Ve=A(qs,"BasicEMap/3",924);T(925,25,D_,MG),u.Pb=function(){this.a.c.Pb()},u.pc=function(e){return cNt(this.a,e)},u.tc=function(){return this.a.f==0?(KT(),_I.a):new x3t(this.a)},u._b=function(){return this.a.f};var yVe=A(qs,"BasicEMap/4",925);T(926,bd,vl,EG),u.Pb=function(){this.a.c.Pb()},u.pc=function(e){var n,i,r,c,l,f,g,b,v;if(this.a.f>0&&ct(e,38)&&(this.a.Fi(),b=a(e,38),g=b.kc(),c=g==null?0:Yr(g),l=vst(this.a,c),n=this.a.d[l],n)){for(i=a(n.g,339),v=n.i,f=0;f"+this.c},u.a=0;var eMe=A(qs,"BasicEMap/EntryImpl",551);T(484,1,{},Ky);var CVe=A(qs,"BasicEMap/View",484),_I;T(695,1,{}),u.Fb=function(e){return jlt((we(),fo),e)},u.Hb=function(){return Nat((we(),fo))},u.Ib=function(){return Gp((we(),fo))};var AVe=A(qs,"ECollections/BasicEmptyUnmodifiableEList",695);T(1164,1,kf,Az),u.gc=function(e){ks(this,e)},u.Bc=function(e){throw K(new Oi)},u.hc=function(){return!1},u.Cc=function(){return!1},u.ic=function(){throw K(new J)},u.Dc=function(){return 0},u.Ec=function(){throw K(new J)},u.Fc=function(){return-1},u.jc=function(){throw K(new Oi)},u.Gc=function(e){throw K(new Oi)};var kVe=A(qs,"ECollections/BasicEmptyUnmodifiableEList/1",1164);T(1162,695,{20:1,13:1,15:1,52:1},Txt),u.bd=function(e,n){Xxt()},u.nc=function(e){return Zxt()},u.oc=function(e){return Yxt()},u.Pb=function(){Kxt()},u.pc=function(e){return!1},u.qc=function(e){return!1},u.sc=function(e){vo(this,e)},u.cd=function(e){return Irt((we(),e)),null},u.dd=function(e){return-1},u.Wb=function(){return!0},u.tc=function(){return this.a},u.ed=function(){return this.a},u.fd=function(e){return this.a},u.uc=function(){return this.xc()},u.gd=function(e){return Jxt()},u.vc=function(e){return Qxt()},u.hd=function(e,n){return t3t()},u._b=function(){return 0},u.jd=function(e){D1(this,e)},u.wc=function(){return new Ei(this,16)},u.xc=function(){return new gi(null,this.wc())},u.kd=function(e,n){return we(),new C1(fo,e,n)},u.yc=function(){return y$((we(),fo))},u.zc=function(e){return we(),hP(fo,e)};var LVe=A(qs,"ECollections/EmptyUnmodifiableEList",1162);T(1163,695,{20:1,13:1,15:1,52:1,533:1},Sxt),u.bd=function(e,n){Xxt()},u.nc=function(e){return Zxt()},u.oc=function(e){return Yxt()},u.Pb=function(){Kxt()},u.pc=function(e){return!1},u.qc=function(e){return!1},u.sc=function(e){vo(this,e)},u.cd=function(e){return Irt((we(),e)),null},u.dd=function(e){return-1},u.Wb=function(){return!0},u.tc=function(){return this.a},u.ed=function(){return this.a},u.fd=function(e){return this.a},u.uc=function(){return this.xc()},u.gd=function(e){return Jxt()},u.vc=function(e){return Qxt()},u.hd=function(e,n){return t3t()},u._b=function(){return 0},u.jd=function(e){D1(this,e)},u.wc=function(){return new Ei(this,16)},u.xc=function(){return new gi(null,this.wc())},u.kd=function(e,n){return we(),new C1(fo,e,n)},u.yc=function(){return y$((we(),fo))},u.zc=function(e){return we(),hP(fo,e)},u.Hi=function(){return we(),we(),ap};var PVe=A(qs,"ECollections/EmptyUnmodifiableEMap",1163),$vt=Sr(qs,"Enumerator"),XF;T(261,1,{261:1},OX),u.Fb=function(e){var n;return this===e?!0:ct(e,261)?(n=a(e,261),this.f==n.f&&Are(this.i,n.i)&&w$(this.a,this.f&256?n.f&256?n.a:null:n.f&256?null:n.a)&&w$(this.d,n.d)&&w$(this.g,n.g)&&w$(this.e,n.e)&&mde(this,n)):!1},u.Hb=function(){return this.f},u.Ib=function(){return FNt(this)},u.f=0;var Bqt=0,Fqt=0,Uqt=0,zqt=0,Vvt=0,qvt=0,Xvt=0,Zvt=0,Yvt=0,jqt,kA=0,LA=0,Hqt=0,Gqt=0,ZF,Kvt,IVe=A(qs,"URI",261);T(965,44,sx,vxt),u.Zb=function(e,n){return a(tc(this,hi(e),a(n,261)),261)};var RVe=A(qs,"URI/URICache",965);T(451,55,Nf,B3,FD),u.xh=function(){return!0};var DVe=A(qs,"UniqueEList",451);T(526,54,rp,TN);var NVe=A(qs,"WrappedException",526),Ui=Sr(tl,xUt),Bw=Sr(tl,MUt),Ra=Sr(tl,EUt),gy=Sr(tl,SUt),cf=Sr(tl,TUt),Dl=Sr(tl,"EClass"),utt=Sr(tl,"EDataType"),Wqt;T(1096,44,sx,_xt),u.Vb=function(e){return Es(e)?Zc(this,e):Ua(Ea(this.d,e))};var OVe=A(tl,"EDataType/Internal/ConversionDelegate/Factory/Registry/Impl",1096),YF=Sr(tl,"EEnum"),Qp=Sr(tl,CUt),Do=Sr(tl,AUt),ph=Sr(tl,kUt),Nl,Fw=Sr(tl,LUt),Uw=Sr(tl,PUt);T(918,1,{},RR),u.Ib=function(){return"NIL"};var BVe=A(tl,"EStructuralFeature/Internal/DynamicValueHolder/1",918),$qt;T(917,44,sx,yxt),u.Vb=function(e){return Es(e)?Zc(this,e):Ua(Ea(this.d,e))};var FVe=A(tl,"EStructuralFeature/Internal/SettingDelegate/Factory/Registry/Impl",917),wu=Sr(tl,IUt),Ux=Sr(tl,"EValidator/PatternMatcher"),Jvt,Qvt,Ae,S0,zx,fb,Vqt,qqt,db,T0,pb,my,Hf,Xqt,Zqt,gh,C0,A0,zw,VE,Ho,Yqt,Kqt,by,KF=Sr(hr,"FeatureMap/Entry");T(483,1,{75:1},Q9),u.nj=function(){return this.a},u.lc=function(){return this.b};var UVe=A(Re,"BasicEObjectImpl/1",483);T(1674,1,{103:1}),u.oj=function(e){this.e=e==0?Jqt:dt(un,te,1,e,5,1)},u.Tg=function(e){return this.e[e]},u.Ug=function(e,n){this.e[e]=n},u.Vg=function(e){this.e[e]=null},u.pj=function(){return this.c},u.qj=function(){throw K(new Oi)},u.rj=function(){throw K(new Oi)},u.sj=function(){return this.d},u.tj=function(){return this.e!=null},u.uj=function(e){this.c=e},u.vj=function(e){throw K(new Oi)},u.wj=function(e){this.d=e};var Jqt,zVe=A(Re,"BasicEObjectImpl/EPropertiesHolderBaseImpl",1674);T(201,1674,{103:1},wf),u.qj=function(){return this.a},u.rj=function(){return this.b},u.vj=function(e){this.a=e};var jVe=A(Re,"BasicEObjectImpl/EPropertiesHolderImpl",201);T(463,92,BFt,zl),u.dg=function(){return this.f},u.ig=function(){return this.k},u.kg=function(e,n){this.g=e,this.i=n},u.mg=function(){return this.j&2?this.Jg().pj():this.Rg()},u.og=function(){return this.i},u.fg=function(){return(this.j&1)!=0},u.yg=function(){return this.g},u.Eg=function(){return(this.j&4)!=0},u.Jg=function(){return!this.k&&(this.k=new wf),this.k},u.Ng=function(e){this.Jg().uj(e),e?this.j|=2:this.j&=-3},u.Rg=function(){return(T1(),Ae).S},u.i=0,u.j=1;var HVe=A(Re,"EObjectImpl",463);T(710,463,{95:1,91:1,87:1,51:1,103:1,42:1,92:1},Jst),u.Tg=function(e){return this.e[e]},u.Ug=function(e,n){this.e[e]=n},u.Vg=function(e){this.e[e]=null},u.mg=function(){return this.d},u.rg=function(e){return xr(this.d,e)},u.tg=function(){return this.d},u.xg=function(){return this.e!=null},u.Jg=function(){return!this.k&&(this.k=new kz),this.k},u.Ng=function(e){this.d=e},u.Qg=function(){var e;return this.e==null&&(e=ei(this.d),this.e=e==0?Qqt:dt(un,te,1,e,5,1)),this},u.Sg=function(){return 0};var Qqt,GVe=A(Re,"DynamicEObjectImpl",710);T(1389,710,{95:1,38:1,91:1,87:1,134:1,51:1,103:1,42:1,92:1},vCt),u.Fb=function(e){return this===e},u.Hb=function(){return lm(this)},u.Ng=function(e){this.d=e,this.b=CP(e,"key"),this.c=CP(e,C4)},u.ih=function(){var e;return this.a==-1&&(e=LV(this,this.b),this.a=e==null?0:Yr(e)),this.a},u.kc=function(){return LV(this,this.b)},u.lc=function(){return LV(this,this.c)},u.jh=function(e){this.a=e},u.kh=function(e){RAt(this,this.b,e)},u.mc=function(e){var n;return n=LV(this,this.c),RAt(this,this.c,e),n},u.a=0;var WVe=A(Re,"DynamicEObjectImpl/BasicEMapEntry",1389);T(1390,1,{103:1},kz),u.oj=function(e){throw K(new Oi)},u.Tg=function(e){throw K(new Oi)},u.Ug=function(e,n){throw K(new Oi)},u.Vg=function(e){throw K(new Oi)},u.pj=function(){throw K(new Oi)},u.qj=function(){return this.a},u.rj=function(){return this.b},u.sj=function(){return this.c},u.tj=function(){throw K(new Oi)},u.uj=function(e){throw K(new Oi)},u.vj=function(e){this.a=e},u.wj=function(e){this.c=e};var $Ve=A(Re,"DynamicEObjectImpl/DynamicEPropertiesHolderImpl",1390);T(469,142,{95:1,91:1,87:1,609:1,139:1,51:1,103:1,42:1,92:1,469:1,142:1,107:1,108:1},DR),u.jg=function(e){return Vut(this,e)},u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.d;case 2:return i?(!this.b&&(this.b=new Mu((ye(),Ho),Dc,this)),this.b):(!this.b&&(this.b=new Mu((ye(),Ho),Dc,this)),AL(this.b));case 3:return vAt(this);case 4:return!this.a&&(this.a=new Ss(Nw,this,4)),this.a;case 5:return!this.c&&(this.c=new dM(Nw,this,5)),this.c}return Xu(this,e-ei((ye(),S0)),Ve((r=a(an(this,16),24),r||S0),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 3:return this.Cb&&(i=(c=this.Db>>16,c>=0?Vut(this,i):this.Cb.Cg(this,-1-c,null,i))),pot(this,a(e,139),i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),S0)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),S0)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 2:return!this.b&&(this.b=new Mu((ye(),Ho),Dc,this)),SD(this.b,e,i);case 3:return pot(this,null,i);case 4:return!this.a&&(this.a=new Ss(Nw,this,4)),$s(this.a,e,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),S0)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),S0)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.d!=null;case 2:return!!this.b&&this.b.f!=0;case 3:return!!vAt(this);case 4:return!!this.a&&this.a.i!=0;case 5:return!!this.c&&this.c.i!=0}return Vu(this,e-ei((ye(),S0)),Ve((n=a(an(this,16),24),n||S0),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:kre(this,hi(n));return;case 2:!this.b&&(this.b=new Mu((ye(),Ho),Dc,this)),zN(this.b,n);return;case 3:Vbe(this,a(n,139));return;case 4:!this.a&&(this.a=new Ss(Nw,this,4)),Dr(this.a),!this.a&&(this.a=new Ss(Nw,this,4)),Lr(this.a,a(n,13));return;case 5:!this.c&&(this.c=new dM(Nw,this,5)),Dr(this.c),!this.c&&(this.c=new dM(Nw,this,5)),Lr(this.c,a(n,13));return}Ku(this,e-ei((ye(),S0)),Ve((i=a(an(this,16),24),i||S0),e),n)},u.Rg=function(){return ye(),S0},u.Ib=function(){return X6t(this)},u.d=null;var VVe=A(Re,"EAnnotationImpl",469);T(143,639,Kpt,lu),u.xj=function(e,n){return kne(this,a(e,38),n)},u.Dh=function(e){return a(a(this.c,64).Dh(e),134)},u.oh=function(){return a(this.c,64).oh()},u.ph=function(){return a(this.c,64).ph()},u.qh=function(e){return a(this.c,64).qh(e)},u.yj=function(e,n){return SD(this,e,n)},u.hj=function(e){return a(this.c,81).hj(e)},u.Gi=function(){},u.ui=function(){return a(this.c,81).ui()},u.Ii=function(e,n,i){var r;return r=a(Zu(this.b).dh().$g(this.b),134),r.jh(e),r.kh(n),r.mc(i),r},u.Ji=function(){return new mT(this)},u.Gc=function(e){zN(this,e)},u.ij=function(){a(this.c,81).ij()};var qVe=A(hr,"EcoreEMap",143);T(152,143,Kpt,Mu),u.Fi=function(){var e,n,i,r,c,l;if(this.d==null){for(l=dt(Gvt,Ypt,55,2*this.f+1,0,1),i=this.c.tc();i.e!=i.i._b();)n=a(i.Ci(),134),r=n.ih(),c=(r&qi)%l.length,e=l[c],!e&&(e=l[c]=new mT(this)),e.nc(n);this.d=l}};var XVe=A(Re,"EAnnotationImpl/1",152);T(268,399,{95:1,91:1,87:1,139:1,174:1,51:1,103:1,431:1,42:1,92:1,142:1,268:1,107:1,108:1}),u.ug=function(e,n,i){var r,c;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return me(),!!(this.Bb&256);case 3:return me(),!!(this.Bb&512);case 4:return Xt(this.s);case 5:return Xt(this.t);case 6:return me(),!!this.lj();case 7:return me(),c=this.s,c>=1;case 8:return n?wl(this):this.r;case 9:return this.q}return Xu(this,e-ei(this.Rg()),Ve((r=a(an(this,16),24),r||this.Rg()),e),n,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 9:return R$(this,i)}return c=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),c.aj().ej(this,ra(this),n-ei(this.Rg()),e,i)},u.Fg=function(e){var n,i;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.lj();case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&mm(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&mm(this.q).i==0)}return Vu(this,e-ei(this.Rg()),Ve((n=a(an(this,16),24),n||this.Rg()),e))},u.Mg=function(e,n){var i,r;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:this.ah(hi(n));return;case 2:f_(this,lt(de(n)));return;case 3:d_(this,lt(de(n)));return;case 4:a_(this,a(n,21).a);return;case 5:this.Aj(a(n,21).a);return;case 8:GM(this,a(n,133));return;case 9:r=$1(this,a(n,84),null),r&&r.Th();return}Ku(this,e-ei(this.Rg()),Ve((i=a(an(this,16),24),i||this.Rg()),e),n)},u.Rg=function(){return ye(),Kqt},u.Xg=function(){wl(this),this.Bb|=1},u.jj=function(){return wl(this)},u.kj=function(){return this.t},u.lj=function(){var e;return e=this.t,e>1||e==-1},u.xh=function(){return(this.Bb&512)!=0},u.zj=function(e,n){return Zat(this,e,n)},u.Aj=function(e){OM(this,e)},u.Ib=function(){return Blt(this)},u.s=0,u.t=1;var ZVe=A(Re,"ETypedElementImpl",268);T(418,268,{95:1,91:1,87:1,139:1,174:1,51:1,158:1,61:1,103:1,431:1,42:1,92:1,142:1,418:1,268:1,107:1,108:1,615:1}),u.jg=function(e){return GRt(this,e)},u.ug=function(e,n,i){var r,c;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return me(),!!(this.Bb&256);case 3:return me(),!!(this.Bb&512);case 4:return Xt(this.s);case 5:return Xt(this.t);case 6:return me(),!!this.lj();case 7:return me(),c=this.s,c>=1;case 8:return n?wl(this):this.r;case 9:return this.q;case 10:return me(),!!(this.Bb&oh);case 11:return me(),!!(this.Bb&mw);case 12:return me(),!!(this.Bb&zm);case 13:return this.j;case 14:return iE(this);case 15:return me(),!!(this.Bb&La);case 16:return me(),!!(this.Bb&Lf);case 17:return Zb(this)}return Xu(this,e-ei(this.Rg()),Ve((r=a(an(this,16),24),r||this.Rg()),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 17:return this.Cb&&(i=(c=this.Db>>16,c>=0?GRt(this,i):this.Cb.Cg(this,-1-c,null,i))),Lu(this,e,17,i)}return l=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),l.aj().dj(this,ra(this),n-ei(this.Rg()),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 9:return R$(this,i);case 17:return Lu(this,null,17,i)}return c=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),c.aj().ej(this,ra(this),n-ei(this.Rg()),e,i)},u.Fg=function(e){var n,i;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.lj();case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&mm(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&mm(this.q).i==0);case 10:return(this.Bb&oh)==0;case 11:return(this.Bb&mw)!=0;case 12:return(this.Bb&zm)!=0;case 13:return this.j!=null;case 14:return iE(this)!=null;case 15:return(this.Bb&La)!=0;case 16:return(this.Bb&Lf)!=0;case 17:return!!Zb(this)}return Vu(this,e-ei(this.Rg()),Ve((n=a(an(this,16),24),n||this.Rg()),e))},u.Mg=function(e,n){var i,r;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:eV(this,hi(n));return;case 2:f_(this,lt(de(n)));return;case 3:d_(this,lt(de(n)));return;case 4:a_(this,a(n,21).a);return;case 5:this.Aj(a(n,21).a);return;case 8:GM(this,a(n,133));return;case 9:r=$1(this,a(n,84),null),r&&r.Th();return;case 10:YN(this,lt(de(n)));return;case 11:ZN(this,lt(de(n)));return;case 12:JN(this,lt(de(n)));return;case 13:Lrt(this,hi(n));return;case 15:KN(this,lt(de(n)));return;case 16:QN(this,lt(de(n)));return}Ku(this,e-ei(this.Rg()),Ve((i=a(an(this,16),24),i||this.Rg()),e),n)},u.Rg=function(){return ye(),Yqt},u.Xg=function(){MM(qo((Qa(),eo),this)),wl(this),this.Bb|=1},u.Vi=function(){return this.f},u.Oi=function(){return iE(this)},u.Wi=function(){return Zb(this)},u.$i=function(){return null},u.Bj=function(){return this.k},u.pi=function(){return this.n},u._i=function(){return x7(this)},u.aj=function(){var e,n,i,r,c,l,f,g,b;return this.p||(i=Zb(this),(i.i==null&&q1(i),i.i).length,r=this.$i(),r&&ei(Zb(r)),c=wl(this),f=c.Qi(),e=f?f.i&1?f==Ol?ho:f==Gn?Io:f==Gw?CE:f==Os?To:f==k0?Vm:f==_y?qm:f==Da?px:U4:f:null,n=iE(this),g=c.Oi(),ife(this),this.Bb&Lf&&((l=Qut((Qa(),eo),i))&&l!=this||(l=lC(qo(eo,this))))?this.p=new bEt(this,l):this.lj()?this.Dj()?r?this.Bb&La?e?this.Ej()?this.p=new jg(47,e,this,r):this.p=new jg(5,e,this,r):this.Ej()?this.p=new Wg(46,this,r):this.p=new Wg(4,this,r):e?this.Ej()?this.p=new jg(49,e,this,r):this.p=new jg(7,e,this,r):this.Ej()?this.p=new Wg(48,this,r):this.p=new Wg(6,this,r):this.Bb&La?e?e==q_?this.p=new Ip(50,Dqt,this):this.Ej()?this.p=new Ip(43,e,this):this.p=new Ip(1,e,this):this.Ej()?this.p=new Op(42,this):this.p=new Op(0,this):e?e==q_?this.p=new Ip(41,Dqt,this):this.Ej()?this.p=new Ip(45,e,this):this.p=new Ip(3,e,this):this.Ej()?this.p=new Op(44,this):this.p=new Op(2,this):ct(c,140)?e==KF?this.p=new Op(40,this):this.Bb&512?this.Bb&La?e?this.p=new Ip(9,e,this):this.p=new Op(8,this):e?this.p=new Ip(11,e,this):this.p=new Op(10,this):this.Bb&La?e?this.p=new Ip(13,e,this):this.p=new Op(12,this):e?this.p=new Ip(15,e,this):this.p=new Op(14,this):r?(b=r.t,b>1||b==-1?this.Ej()?this.Bb&La?e?this.p=new jg(25,e,this,r):this.p=new Wg(24,this,r):e?this.p=new jg(27,e,this,r):this.p=new Wg(26,this,r):this.Bb&La?e?this.p=new jg(29,e,this,r):this.p=new Wg(28,this,r):e?this.p=new jg(31,e,this,r):this.p=new Wg(30,this,r):this.Ej()?this.Bb&La?e?this.p=new jg(33,e,this,r):this.p=new Wg(32,this,r):e?this.p=new jg(35,e,this,r):this.p=new Wg(34,this,r):this.Bb&La?e?this.p=new jg(37,e,this,r):this.p=new Wg(36,this,r):e?this.p=new jg(39,e,this,r):this.p=new Wg(38,this,r)):this.Ej()?this.Bb&La?e?this.p=new Ip(17,e,this):this.p=new Op(16,this):e?this.p=new Ip(19,e,this):this.p=new Op(18,this):this.Bb&La?e?this.p=new Ip(21,e,this):this.p=new Op(20,this):e?this.p=new Ip(23,e,this):this.p=new Op(22,this):this.Cj()?this.Ej()?this.p=new YTt(a(c,24),this,r):this.p=new nct(a(c,24),this,r):ct(c,140)?e==KF?this.p=new Op(40,this):this.Bb&La?e?this.p=new BCt(n,g,this,(Iq(),f==Gn?o_t:f==Ol?e_t:f==k0?c_t:f==Gw?s_t:f==Os?r_t:f==_y?a_t:f==Da?n_t:f==nl?i_t:ftt)):this.p=new R4t(a(c,140),n,g,this):e?this.p=new OCt(n,g,this,(Iq(),f==Gn?o_t:f==Ol?e_t:f==k0?c_t:f==Gw?s_t:f==Os?r_t:f==_y?a_t:f==Da?n_t:f==nl?i_t:ftt)):this.p=new I4t(a(c,140),n,g,this):this.Dj()?r?this.Bb&La?this.Ej()?this.p=new JTt(a(c,24),this,r):this.p=new Wst(a(c,24),this,r):this.Ej()?this.p=new KTt(a(c,24),this,r):this.p=new d$(a(c,24),this,r):this.Bb&La?this.Ej()?this.p=new qSt(a(c,24),this):this.p=new ust(a(c,24),this):this.Ej()?this.p=new VSt(a(c,24),this):this.p=new KW(a(c,24),this):this.Ej()?r?this.Bb&La?this.p=new QTt(a(c,24),this,r):this.p=new Gst(a(c,24),this,r):this.Bb&La?this.p=new XSt(a(c,24),this):this.p=new ast(a(c,24),this):r?this.Bb&La?this.p=new tCt(a(c,24),this,r):this.p=new $st(a(c,24),this,r):this.Bb&La?this.p=new ZSt(a(c,24),this):this.p=new UD(a(c,24),this)),this.p},u.Xi=function(){return(this.Bb&oh)!=0},u.Cj=function(){return!1},u.Dj=function(){return!1},u.Yi=function(){return(this.Bb&Lf)!=0},u.bj=function(){return Yct(this)},u.Ej=function(){return!1},u.Zi=function(){return(this.Bb&La)!=0},u.Fj=function(e){this.k=e},u.ah=function(e){eV(this,e)},u.Ib=function(){return W7(this)},u.e=!1,u.n=0;var YVe=A(Re,"EStructuralFeatureImpl",418);T(335,418,{95:1,91:1,87:1,29:1,139:1,174:1,51:1,158:1,61:1,103:1,431:1,42:1,92:1,335:1,142:1,418:1,268:1,107:1,108:1,615:1},UG),u.ug=function(e,n,i){var r,c;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return me(),!!(this.Bb&256);case 3:return me(),!!(this.Bb&512);case 4:return Xt(this.s);case 5:return Xt(this.t);case 6:return me(),!!Nlt(this);case 7:return me(),c=this.s,c>=1;case 8:return n?wl(this):this.r;case 9:return this.q;case 10:return me(),!!(this.Bb&oh);case 11:return me(),!!(this.Bb&mw);case 12:return me(),!!(this.Bb&zm);case 13:return this.j;case 14:return iE(this);case 15:return me(),!!(this.Bb&La);case 16:return me(),!!(this.Bb&Lf);case 17:return Zb(this);case 18:return me(),!!(this.Bb&ca);case 19:return n?eq(this):k5t(this)}return Xu(this,e-ei((ye(),zx)),Ve((r=a(an(this,16),24),r||zx),e),n,i)},u.Fg=function(e){var n,i;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return Nlt(this);case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&mm(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&mm(this.q).i==0);case 10:return(this.Bb&oh)==0;case 11:return(this.Bb&mw)!=0;case 12:return(this.Bb&zm)!=0;case 13:return this.j!=null;case 14:return iE(this)!=null;case 15:return(this.Bb&La)!=0;case 16:return(this.Bb&Lf)!=0;case 17:return!!Zb(this);case 18:return(this.Bb&ca)!=0;case 19:return!!k5t(this)}return Vu(this,e-ei((ye(),zx)),Ve((n=a(an(this,16),24),n||zx),e))},u.Mg=function(e,n){var i,r;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:eV(this,hi(n));return;case 2:f_(this,lt(de(n)));return;case 3:d_(this,lt(de(n)));return;case 4:a_(this,a(n,21).a);return;case 5:b3t(this,a(n,21).a);return;case 8:GM(this,a(n,133));return;case 9:r=$1(this,a(n,84),null),r&&r.Th();return;case 10:YN(this,lt(de(n)));return;case 11:ZN(this,lt(de(n)));return;case 12:JN(this,lt(de(n)));return;case 13:Lrt(this,hi(n));return;case 15:KN(this,lt(de(n)));return;case 16:QN(this,lt(de(n)));return;case 18:iut(this,lt(de(n)));return}Ku(this,e-ei((ye(),zx)),Ve((i=a(an(this,16),24),i||zx),e),n)},u.Rg=function(){return ye(),zx},u.Xg=function(){eq(this),MM(qo((Qa(),eo),this)),wl(this),this.Bb|=1},u.lj=function(){return Nlt(this)},u.zj=function(e,n){return this.b=0,this.a=null,Zat(this,e,n)},u.Aj=function(e){b3t(this,e)},u.Ib=function(){var e;return this.Db&64?W7(this):(e=new ul(W7(this)),e.a+=" (iD: ",Cp(e,(this.Bb&ca)!=0),e.a+=")",e.a)},u.b=0;var KVe=A(Re,"EAttributeImpl",335);T(672,399,{95:1,91:1,87:1,133:1,139:1,174:1,51:1,103:1,42:1,92:1,142:1,107:1,108:1,614:1}),u.Gj=function(e){return e.mg()==this},u.jg=function(e){return nX(this,e)},u.kg=function(e,n){this.w=null,this.Db=n<<16|this.Db&255,this.Cb=e},u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return Im(this);case 4:return this.Oi();case 5:return this.F;case 6:return n?Zu(this):CM(this);case 7:return!this.A&&(this.A=new Gu(wu,this,7)),this.A}return Xu(this,e-ei(this.Rg()),Ve((r=a(an(this,16),24),r||this.Rg()),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 6:return this.Cb&&(i=(c=this.Db>>16,c>=0?nX(this,i):this.Cb.Cg(this,-1-c,null,i))),Lu(this,e,6,i)}return l=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),l.aj().dj(this,ra(this),n-ei(this.Rg()),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 6:return Lu(this,null,6,i);case 7:return!this.A&&(this.A=new Gu(wu,this,7)),$s(this.A,e,i)}return c=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),c.aj().ej(this,ra(this),n-ei(this.Rg()),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!Im(this);case 4:return this.Oi()!=null;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!CM(this);case 7:return!!this.A&&this.A.i!=0}return Vu(this,e-ei(this.Rg()),Ve((n=a(an(this,16),24),n||this.Rg()),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:oN(this,hi(n));return;case 2:DW(this,hi(n));return;case 5:oZ(this,hi(n));return;case 7:!this.A&&(this.A=new Gu(wu,this,7)),Dr(this.A),!this.A&&(this.A=new Gu(wu,this,7)),Lr(this.A,a(n,13));return}Ku(this,e-ei(this.Rg()),Ve((i=a(an(this,16),24),i||this.Rg()),e),n)},u.Rg=function(){return ye(),Vqt},u.Ni=function(){var e;return this.G==-1&&(this.G=(e=Zu(this),e?Hp(e.bh(),this):-1)),this.G},u.Oi=function(){return null},u.Pi=function(){return Zu(this)},u.Hj=function(){return this.v},u.Qi=function(){return Im(this)},u.Ri=function(){return this.D!=null?this.D:this.B},u.Si=function(){return this.F},u.Li=function(e){return GX(this,e)},u.Ij=function(e){this.v=e},u.Jj=function(e){EPt(this,e)},u.Kj=function(e){this.C=e},u.ah=function(e){oN(this,e)},u.Ib=function(){return o7(this)},u.C=null,u.D=null,u.G=-1;var JVe=A(Re,"EClassifierImpl",672);T(96,672,{95:1,91:1,87:1,24:1,133:1,139:1,174:1,51:1,103:1,42:1,92:1,96:1,142:1,432:1,107:1,108:1,614:1},l5),u.Gj=function(e){return Mne(this,e.mg())},u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return Im(this);case 4:return null;case 5:return this.F;case 6:return n?Zu(this):CM(this);case 7:return!this.A&&(this.A=new Gu(wu,this,7)),this.A;case 8:return me(),!!(this.Bb&256);case 9:return me(),!!(this.Bb&512);case 10:return Bo(this);case 11:return!this.q&&(this.q=new Wt(ph,this,11,10)),this.q;case 12:return k_(this);case 13:return l4(this);case 14:return l4(this),this.r;case 15:return k_(this),this.k;case 16:return Tlt(this);case 17:return ZX(this);case 18:return q1(this);case 19:return B7(this);case 20:return k_(this),this.o;case 21:return!this.s&&(this.s=new Wt(Ra,this,21,17)),this.s;case 22:return kc(this);case 23:return NX(this)}return Xu(this,e-ei((ye(),fb)),Ve((r=a(an(this,16),24),r||fb),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 6:return this.Cb&&(i=(c=this.Db>>16,c>=0?nX(this,i):this.Cb.Cg(this,-1-c,null,i))),Lu(this,e,6,i);case 11:return!this.q&&(this.q=new Wt(ph,this,11,10)),Kc(this.q,e,i);case 21:return!this.s&&(this.s=new Wt(Ra,this,21,17)),Kc(this.s,e,i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),fb)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),fb)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 6:return Lu(this,null,6,i);case 7:return!this.A&&(this.A=new Gu(wu,this,7)),$s(this.A,e,i);case 11:return!this.q&&(this.q=new Wt(ph,this,11,10)),$s(this.q,e,i);case 21:return!this.s&&(this.s=new Wt(Ra,this,21,17)),$s(this.s,e,i);case 22:return $s(kc(this),e,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),fb)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),fb)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!Im(this);case 4:return!1;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!CM(this);case 7:return!!this.A&&this.A.i!=0;case 8:return(this.Bb&256)!=0;case 9:return(this.Bb&512)!=0;case 10:return!!this.u&&kc(this.u.a).i!=0&&!(this.n&&Xq(this.n));case 11:return!!this.q&&this.q.i!=0;case 12:return k_(this).i!=0;case 13:return l4(this).i!=0;case 14:return l4(this),this.r.i!=0;case 15:return k_(this),this.k.i!=0;case 16:return Tlt(this).i!=0;case 17:return ZX(this).i!=0;case 18:return q1(this).i!=0;case 19:return B7(this).i!=0;case 20:return k_(this),!!this.o;case 21:return!!this.s&&this.s.i!=0;case 22:return!!this.n&&Xq(this.n);case 23:return NX(this).i!=0}return Vu(this,e-ei((ye(),fb)),Ve((n=a(an(this,16),24),n||fb),e))},u.Ig=function(e){var n;return n=this.i==null||this.q&&this.q.i!=0?null:CP(this,e),n||Xht(this,e)},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:oN(this,hi(n));return;case 2:DW(this,hi(n));return;case 5:oZ(this,hi(n));return;case 7:!this.A&&(this.A=new Gu(wu,this,7)),Dr(this.A),!this.A&&(this.A=new Gu(wu,this,7)),Lr(this.A,a(n,13));return;case 8:eIt(this,lt(de(n)));return;case 9:nIt(this,lt(de(n)));return;case 10:Y7(Bo(this)),Lr(Bo(this),a(n,13));return;case 11:!this.q&&(this.q=new Wt(ph,this,11,10)),Dr(this.q),!this.q&&(this.q=new Wt(ph,this,11,10)),Lr(this.q,a(n,13));return;case 21:!this.s&&(this.s=new Wt(Ra,this,21,17)),Dr(this.s),!this.s&&(this.s=new Wt(Ra,this,21,17)),Lr(this.s,a(n,13));return;case 22:Dr(kc(this)),Lr(kc(this),a(n,13));return}Ku(this,e-ei((ye(),fb)),Ve((i=a(an(this,16),24),i||fb),e),n)},u.Rg=function(){return ye(),fb},u.Xg=function(){var e,n;if(k_(this),l4(this),Tlt(this),ZX(this),q1(this),B7(this),NX(this),mC(ure(pl(this))),this.s)for(e=0,n=this.s.i;e=0;--e)at(this,e);return hct(this)},u.zc=function(e){var n;if(this.Qj())for(n=this.i-1;n>=0;--n)at(this,n);return put(this,e)},u.ij=function(){Dr(this)},u.Ch=function(e,n){return RLt(this,e,n)};var eqe=A(hr,"EcoreEList",565);T(450,565,Zo,hL),u.rh=function(){return!1},u.pi=function(){return this.c},u.qi=function(){return!1},u.Rj=function(){return!0},u.xh=function(){return!0},u.zh=function(e,n){return n},u.Bh=function(){return!1},u.c=0;var nqe=A(hr,"EObjectEList",450);T(88,450,Zo,Ss),u.qi=function(){return!0},u.Pj=function(){return!1},u.Dj=function(){return!0};var iqe=A(hr,"EObjectContainmentEList",88);T(493,88,Zo,lD),u.th=function(){this.a=!0},u.ui=function(){return this.a},u.ij=function(){var e;Dr(this),Xl(this.e)?(e=this.a,this.a=!1,Bi(this.e,new Jl(this.e,2,this.c,e,!1))):this.a=!1},u.a=!1;var rqe=A(hr,"EObjectContainmentEList/Unsettable",493);T(1003,493,Zo,uSt),u.yi=function(e,n){return Rfe(this,a(e,84),n)},u.zi=function(e,n){return Ife(this,a(e,84),n)},u.Ai=function(e,n,i){return m1e(this,a(e,84),a(n,84),i)},u.mi=function(e,n,i,r,c){switch(e){case 3:return uC(this,3,n,i,r,this.i>1);case 5:return uC(this,5,n,i,r,this.i-a(i,15)._b()>0);default:return new Qd(this.e,e,this.c,n,i,r,!0)}},u.xi=function(){return!0},u.ui=function(){return Xq(this)},u.ij=function(){Dr(this)};var sqe=A(Re,"EClassImpl/1",1003);T(1017,1016,Zpt),u.Ih=function(e){var n,i,r,c,l,f,g;if(i=e.Lh(),i!=8){if(r=hde(e),r==0)switch(i){case 1:case 9:{g=e.Ph(),g!=null&&(n=pl(a(g,432)),!n.c&&(n.c=new kb),kV(n.c,e.Oh())),f=e.Nh(),f!=null&&(c=a(f,432),c.Bb&1||(n=pl(c),!n.c&&(n.c=new kb),ni(n.c,a(e.Oh(),24))));break}case 3:{f=e.Nh(),f!=null&&(c=a(f,432),c.Bb&1||(n=pl(c),!n.c&&(n.c=new kb),ni(n.c,a(e.Oh(),24))));break}case 5:{if(f=e.Nh(),f!=null)for(l=a(f,13).tc();l.hc();)c=a(l.ic(),432),c.Bb&1||(n=pl(c),!n.c&&(n.c=new kb),ni(n.c,a(e.Oh(),24)));break}case 4:{g=e.Ph(),g!=null&&(c=a(g,432),c.Bb&1||(n=pl(c),!n.c&&(n.c=new kb),kV(n.c,e.Oh())));break}case 6:{if(g=e.Ph(),g!=null)for(l=a(g,13).tc();l.hc();)c=a(l.ic(),432),c.Bb&1||(n=pl(c),!n.c&&(n.c=new kb),kV(n.c,e.Oh()));break}}this.Tj(r)}},u.Tj=function(e){bNt(this,e)},u.b=63;var oqe=A(Re,"ESuperAdapter",1017);T(1018,1017,Zpt,TG),u.Tj=function(e){e4(this,e)};var cqe=A(Re,"EClassImpl/10",1018);T(1007,630,Zo),u.lh=function(e){return IRt(this,e)},u.mh=function(e,n){eP(this,e,n)},u.nh=function(e){TL(this,e)},u.Dh=function(e){return Gct(this,e)},u.Ah=function(e,n){return AV(this,e,n)},u.xj=function(e,n){throw K(new Oi)},u.oh=function(){return new M2(this)},u.ph=function(){return new tL(this)},u.qh=function(e){return HL(this,e)},u.yj=function(e,n){throw K(new Oi)},u.hj=function(e){return this},u.ui=function(){return this.i!=0},u.Gc=function(e){throw K(new Oi)},u.ij=function(){throw K(new Oi)};var aqe=A(hr,"EcoreEList/UnmodifiableEList",1007);T(301,1007,Zo,zv),u.Bh=function(){return!1};var uqe=A(hr,"EcoreEList/UnmodifiableEList/FastCompare",301);T(1010,301,Zo,y6t),u.dd=function(e){var n,i,r;if(ct(e,158)&&(n=a(e,158),i=n.pi(),i!=-1)){for(r=this.i;i4)if(this.Li(e)){if(this.Dj()){if(r=a(e,42),i=r.ng(),g=i==this.b&&(this.Pj()?r.hg(r.og(),a(Ve(da(this.b),this.pi()).jj(),24).Qi())==jo(a(Ve(da(this.b),this.pi()),17)).n:-1-r.og()==this.pi()),this.Qj()&&!g&&!i&&r.sg()){for(c=0;c1||r==-1)):!1},u.Pj=function(){var e,n,i;return n=Ve(da(this.b),this.pi()),ct(n,62)?(e=a(n,17),i=jo(e),!!i):!1},u.Qj=function(){var e,n;return n=Ve(da(this.b),this.pi()),ct(n,62)?(e=a(n,17),(e.Bb&ao)!=0):!1},u.dd=function(e){var n,i,r,c;if(r=this.ci(e),r>=0)return r;if(this.Rj()){for(i=0,c=this.hi();i=0;--e)OP(this,e,this.ai(e));return this.ii()},u.zc=function(e){var n;if(this.Qj())for(n=this.hi()-1;n>=0;--n)OP(this,n,this.ai(n));return this.ji(e)},u.ij=function(){Y7(this)},u.Ch=function(e,n){return G5t(this,e,n)};var yqe=A(hr,"DelegatingEcoreEList",674);T(1013,674,Qpt,sTt),u.Vh=function(e,n){Qee(this,e,a(n,24))},u.Wh=function(e){cee(this,a(e,24))},u.ai=function(e){var n,i;return n=a(at(kc(this.a),e),84),i=n.c,ct(i,96)?a(i,24):(ye(),gh)},u.fi=function(e){var n,i;return n=a(cw(kc(this.a),e),84),i=n.c,ct(i,96)?a(i,24):(ye(),gh)},u.gi=function(e,n){return $de(this,e,a(n,24))},u.rh=function(){return!1},u.mi=function(e,n,i,r,c){return null},u.Xh=function(){return new S5(this)},u.Yh=function(){Dr(kc(this.a))},u.Zh=function(e){return rIt(this,e)},u.$h=function(e){var n,i;for(i=e.tc();i.hc();)if(n=i.ic(),!rIt(this,n))return!1;return!0},u._h=function(e){var n,i,r;if(ct(e,15)&&(r=a(e,15),r._b()==kc(this.a).i)){for(n=r.tc(),i=new $n(this);n.hc();)if(zt(n.ic())!==zt(ci(i)))return!1;return!0}return!1},u.bi=function(){var e,n,i,r,c;for(i=1,n=new $n(kc(this.a));n.e!=n.i._b();)e=a(ci(n),84),r=(c=e.c,ct(c,96)?a(c,24):(ye(),gh)),i=31*i+(r?lm(r):0);return i},u.ci=function(e){var n,i,r,c;for(r=0,i=new $n(kc(this.a));i.e!=i.i._b();){if(n=a(ci(i),84),zt(e)===zt((c=n.c,ct(c,96)?a(c,24):(ye(),gh))))return r;++r}return-1},u.di=function(){return kc(this.a).i==0},u.ei=function(){return null},u.hi=function(){return kc(this.a).i},u.ii=function(){var e,n,i,r,c,l;for(l=kc(this.a).i,c=dt(un,te,1,l,5,1),i=0,n=new $n(kc(this.a));n.e!=n.i._b();)e=a(ci(n),84),c[i++]=(r=e.c,ct(r,96)?a(r,24):(ye(),gh));return c},u.ji=function(e){var n,i,r,c,l,f,g;for(g=kc(this.a).i,e.lengthg&&Vr(e,g,null),r=0,i=new $n(kc(this.a));i.e!=i.i._b();)n=a(ci(i),84),l=(f=n.c,ct(f,96)?a(f,24):(ye(),gh)),Vr(e,r++,l);return e},u.ki=function(){var e,n,i,r,c;for(c=new Sp,c.a+="[",e=kc(this.a),n=0,r=kc(this.a).i;n>16,c>=0?nX(this,i):this.Cb.Cg(this,-1-c,null,i))),Lu(this,e,6,i);case 9:return!this.a&&(this.a=new Wt(Qp,this,9,5)),Kc(this.a,e,i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),db)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),db)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 6:return Lu(this,null,6,i);case 7:return!this.A&&(this.A=new Gu(wu,this,7)),$s(this.A,e,i);case 9:return!this.a&&(this.a=new Wt(Qp,this,9,5)),$s(this.a,e,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),db)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),db)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!Im(this);case 4:return!!Wat(this);case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!CM(this);case 7:return!!this.A&&this.A.i!=0;case 8:return(this.Bb&256)==0;case 9:return!!this.a&&this.a.i!=0}return Vu(this,e-ei((ye(),db)),Ve((n=a(an(this,16),24),n||db),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:oN(this,hi(n));return;case 2:DW(this,hi(n));return;case 5:oZ(this,hi(n));return;case 7:!this.A&&(this.A=new Gu(wu,this,7)),Dr(this.A),!this.A&&(this.A=new Gu(wu,this,7)),Lr(this.A,a(n,13));return;case 8:Jat(this,lt(de(n)));return;case 9:!this.a&&(this.a=new Wt(Qp,this,9,5)),Dr(this.a),!this.a&&(this.a=new Wt(Qp,this,9,5)),Lr(this.a,a(n,13));return}Ku(this,e-ei((ye(),db)),Ve((i=a(an(this,16),24),i||db),e),n)},u.Rg=function(){return ye(),db},u.Xg=function(){var e,n;if(this.a)for(e=0,n=this.a.i;e>16==5?a(this.Cb,608):null}return Xu(this,e-ei((ye(),T0)),Ve((r=a(an(this,16),24),r||T0),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 5:return this.Cb&&(i=(c=this.Db>>16,c>=0?VRt(this,i):this.Cb.Cg(this,-1-c,null,i))),Lu(this,e,5,i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),T0)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),T0)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 5:return Lu(this,null,5,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),T0)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),T0)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.d!=0;case 3:return!!this.b;case 4:return this.c!=null;case 5:return!!(this.Db>>16==5&&a(this.Cb,608))}return Vu(this,e-ei((ye(),T0)),Ve((n=a(an(this,16),24),n||T0),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:kh(this,hi(n));return;case 2:iat(this,a(n,21).a);return;case 3:hme(this,a(n,1634));return;case 4:gat(this,hi(n));return}Ku(this,e-ei((ye(),T0)),Ve((i=a(an(this,16),24),i||T0),e),n)},u.Rg=function(){return ye(),T0},u.Ib=function(){var e;return e=this.c,e??this.zb},u.b=null,u.c=null,u.d=0;var Aqe=A(Re,"EEnumLiteralImpl",525),nMe=Sr(Re,"EFactoryImpl/InternalEDateTimeFormat");T(445,1,{1699:1},r2);var kqe=A(Re,"EFactoryImpl/1ClientInternalEDateTimeFormat",445);T(217,108,{95:1,91:1,87:1,84:1,51:1,103:1,42:1,92:1,217:1,107:1,108:1},b1),u.lg=function(e,n,i){var r;return i=Lu(this,e,n,i),this.e&&ct(e,158)&&(r=O7(this,this.e),r!=this.c&&(i=cE(this,r,i))),i},u.ug=function(e,n,i){var r;switch(e){case 0:return this.f;case 1:return!this.d&&(this.d=new Ss(Do,this,1)),this.d;case 2:return n?V7(this):this.c;case 3:return this.b;case 4:return this.e;case 5:return n?Yq(this):this.a}return Xu(this,e-ei((ye(),my)),Ve((r=a(an(this,16),24),r||my),e),n,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return V6t(this,null,i);case 1:return!this.d&&(this.d=new Ss(Do,this,1)),$s(this.d,e,i);case 3:return $6t(this,null,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),my)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),my)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.f;case 1:return!!this.d&&this.d.i!=0;case 2:return!!this.c;case 3:return!!this.b;case 4:return!!this.e;case 5:return!!this.a}return Vu(this,e-ei((ye(),my)),Ve((n=a(an(this,16),24),n||my),e))},u.Mg=function(e,n){var i;switch(e){case 0:U1e(this,a(n,84));return;case 1:!this.d&&(this.d=new Ss(Do,this,1)),Dr(this.d),!this.d&&(this.d=new Ss(Do,this,1)),Lr(this.d,a(n,13));return;case 3:p8t(this,a(n,84));return;case 4:I8t(this,a(n,742));return;case 5:yC(this,a(n,133));return}Ku(this,e-ei((ye(),my)),Ve((i=a(an(this,16),24),i||my),e),n)},u.Rg=function(){return ye(),my},u.Ib=function(){var e;return e=new ll(nh(this)),e.a+=" (expression: ",tZ(this,e),e.a+=")",e.a};var t_t,Lqe=A(Re,"EGenericTypeImpl",217);T(1667,1657,OO),u.xj=function(e,n){return fne(this,this._b(),e),n},u.Dh=function(e){return H1(this.Uh(),e)},u.oh=function(){return this.ph()},u.Uh=function(){return new C5(this)},u.ph=function(){return this.qh(0)},u.qh=function(e){return this.Uh().fd(e)},u.yj=function(e,n){return j2(this,e,!0),n};var Pqe=A(hr,"AbstractSequentialInternalEList",1667);T(444,1667,OO,eL),u.Dh=function(e){return H1(this.Uh(),e)},u.oh=function(){return this.b==null?(Ap(),Ap(),yI):this.Vj()},u.Uh=function(){return new LEt(this.a,this.b)},u.ph=function(){return this.b==null?(Ap(),Ap(),yI):this.Vj()},u.qh=function(e){var n,i;if(this.b==null){if(e<0||e>1)throw K(new Uc(A4+e+", size=0"));return Ap(),Ap(),yI}for(i=this.Vj(),n=0;n0;)if(n=this.c[--this.d],(!this.e||n.Vi()!=$E||n.pi()!=0)&&(!this.Yj()||this.b.Gg(n))){if(l=this.b.wg(n,this.Xj()),this.f=(Jo(),a(n,61).bj()),this.f||n.lj()){if(this.Xj()?(r=a(l,15),this.k=r):(r=a(l,64),this.k=this.j=r),ct(this.k,49)?(this.o=this.k._b(),this.n=this.o):this.p=this.j?this.j.qh(this.k._b()):this.k.fd(this.k._b()),this.p?u9t(this,this.p):M9t(this))return c=this.p?this.p.Ec():this.j?this.j.Dh(--this.n):this.k.cd(--this.n),this.f?(e=a(c,75),e.nj(),i=e.lc(),this.i=i):this.i=c,this.g=-3,!0}else if(l!=null)return this.k=null,this.p=null,this.i=l,this.g=-2,!0}return this.k=null,this.p=null,this.g=-1,!1}else return c=this.p?this.p.Ec():this.j?this.j.Dh(--this.n):this.k.cd(--this.n),this.f?(e=a(c,75),e.nj(),i=e.lc(),this.i=i):this.i=c,this.g=-3,!0}},u.ic=function(){return UN(this)},u.Dc=function(){return this.a},u.Ec=function(){var e;if(this.g<-1||this.Cc())return--this.a,this.g=0,e=this.i,this.Cc(),e;throw K(new J)},u.Fc=function(){return this.a-1},u.jc=function(){throw K(new Oi)},u.Xj=function(){return!1},u.Gc=function(e){throw K(new Oi)},u.Yj=function(){return!0},u.a=0,u.d=0,u.f=!1,u.g=0,u.n=0,u.o=0;var yI,Dqe=A(hr,"EContentsEList/FeatureIteratorImpl",260);T(631,260,BO,cst),u.Xj=function(){return!0};var Nqe=A(hr,"EContentsEList/ResolvingFeatureIteratorImpl",631);T(1020,631,BO,$St),u.Yj=function(){return!1};var Oqe=A(Re,"ENamedElementImpl/1/1",1020);T(1021,260,BO,WSt),u.Yj=function(){return!1};var Bqe=A(Re,"ENamedElementImpl/1/2",1021);T(32,136,c6,Kb,cV,fs,yV,Qd,Jl,rat,FAt,sat,UAt,Cct,zAt,aat,jAt,Act,HAt,oat,GAt,gL,qot,cat,WAt,kct,$At),u.oi=function(){return jct(this)},u.vi=function(){var e;return e=jct(this),e?e.Oi():null},u.Mh=function(e){return this.b==-1&&this.a&&(this.b=this.c.qg(this.a.pi(),this.a.Vi())),this.c.hg(this.b,e)},u.Oh=function(){return this.c},u.wi=function(){var e;return e=jct(this),e?e.Zi():!1},u.b=-1;var Fqe=A(Re,"ENotificationImpl",32);T(371,268,{95:1,91:1,87:1,139:1,174:1,51:1,53:1,103:1,431:1,42:1,92:1,142:1,371:1,268:1,107:1,108:1},BG),u.jg=function(e){return XRt(this,e)},u.ug=function(e,n,i){var r,c,l;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return me(),!!(this.Bb&256);case 3:return me(),!!(this.Bb&512);case 4:return Xt(this.s);case 5:return Xt(this.t);case 6:return me(),l=this.t,l>1||l==-1;case 7:return me(),c=this.s,c>=1;case 8:return n?wl(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?a(this.Cb,24):null;case 11:return!this.d&&(this.d=new Gu(wu,this,11)),this.d;case 12:return!this.c&&(this.c=new Wt(Fw,this,12,10)),this.c;case 13:return!this.a&&(this.a=new oL(this,this)),this.a;case 14:return Ya(this)}return Xu(this,e-ei((ye(),C0)),Ve((r=a(an(this,16),24),r||C0),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 10:return this.Cb&&(i=(c=this.Db>>16,c>=0?XRt(this,i):this.Cb.Cg(this,-1-c,null,i))),Lu(this,e,10,i);case 12:return!this.c&&(this.c=new Wt(Fw,this,12,10)),Kc(this.c,e,i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),C0)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),C0)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 9:return R$(this,i);case 10:return Lu(this,null,10,i);case 11:return!this.d&&(this.d=new Gu(wu,this,11)),$s(this.d,e,i);case 12:return!this.c&&(this.c=new Wt(Fw,this,12,10)),$s(this.c,e,i);case 14:return $s(Ya(this),e,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),C0)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),C0)),e,i)},u.Fg=function(e){var n,i,r;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return r=this.t,r>1||r==-1;case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&mm(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&mm(this.q).i==0);case 10:return!!(this.Db>>16==10&&a(this.Cb,24));case 11:return!!this.d&&this.d.i!=0;case 12:return!!this.c&&this.c.i!=0;case 13:return!!this.a&&Ya(this.a.a).i!=0&&!(this.b&&Zq(this.b));case 14:return!!this.b&&Zq(this.b)}return Vu(this,e-ei((ye(),C0)),Ve((n=a(an(this,16),24),n||C0),e))},u.Mg=function(e,n){var i,r;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:kh(this,hi(n));return;case 2:f_(this,lt(de(n)));return;case 3:d_(this,lt(de(n)));return;case 4:a_(this,a(n,21).a);return;case 5:OM(this,a(n,21).a);return;case 8:GM(this,a(n,133));return;case 9:r=$1(this,a(n,84),null),r&&r.Th();return;case 11:!this.d&&(this.d=new Gu(wu,this,11)),Dr(this.d),!this.d&&(this.d=new Gu(wu,this,11)),Lr(this.d,a(n,13));return;case 12:!this.c&&(this.c=new Wt(Fw,this,12,10)),Dr(this.c),!this.c&&(this.c=new Wt(Fw,this,12,10)),Lr(this.c,a(n,13));return;case 13:!this.a&&(this.a=new oL(this,this)),Y7(this.a),!this.a&&(this.a=new oL(this,this)),Lr(this.a,a(n,13));return;case 14:Dr(Ya(this)),Lr(Ya(this),a(n,13));return}Ku(this,e-ei((ye(),C0)),Ve((i=a(an(this,16),24),i||C0),e),n)},u.Rg=function(){return ye(),C0},u.Xg=function(){var e,n;if(this.c)for(e=0,n=this.c.i;eg&&Vr(e,g,null),r=0,i=new $n(Ya(this.a));i.e!=i.i._b();)n=a(ci(i),84),l=(f=n.c,f||(ye(),Hf)),Vr(e,r++,l);return e},u.ki=function(){var e,n,i,r,c;for(c=new Sp,c.a+="[",e=Ya(this.a),n=0,r=Ya(this.a).i;n1);case 5:return uC(this,5,n,i,r,this.i-a(i,15)._b()>0);default:return new Qd(this.e,e,this.c,n,i,r,!0)}},u.xi=function(){return!0},u.ui=function(){return Zq(this)},u.ij=function(){Dr(this)};var Hqe=A(Re,"EOperationImpl/2",1388);T(456,1,{1631:1,456:1},mEt);var Gqe=A(Re,"EPackageImpl/1",456);T(18,88,Zo,Wt),u.Lj=function(){return this.d},u.Mj=function(){return this.b},u.Pj=function(){return!0},u.b=0;var Wqe=A(hr,"EObjectContainmentWithInverseEList",18);T(364,18,Zo,mM),u.Qj=function(){return!0},u.zh=function(e,n){return X2(this,e,a(n,51))};var $qe=A(hr,"EObjectContainmentWithInverseEList/Resolving",364);T(303,364,Zo,Zv),u.th=function(){this.a.tb=null};var Vqe=A(Re,"EPackageImpl/2",303);T(1155,1,{},Iz);var qqe=A(Re,"EPackageImpl/3",1155);T(650,44,sx,Sit),u.Qb=function(e){return Es(e)?V$(this,e):!!Ea(this.d,e)};var Xqe=A(Re,"EPackageRegistryImpl",650);T(468,268,{95:1,91:1,87:1,139:1,174:1,51:1,1703:1,103:1,431:1,42:1,92:1,142:1,468:1,268:1,107:1,108:1},FG),u.jg=function(e){return ZRt(this,e)},u.ug=function(e,n,i){var r,c,l;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return me(),!!(this.Bb&256);case 3:return me(),!!(this.Bb&512);case 4:return Xt(this.s);case 5:return Xt(this.t);case 6:return me(),l=this.t,l>1||l==-1;case 7:return me(),c=this.s,c>=1;case 8:return n?wl(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?a(this.Cb,53):null}return Xu(this,e-ei((ye(),zw)),Ve((r=a(an(this,16),24),r||zw),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 10:return this.Cb&&(i=(c=this.Db>>16,c>=0?ZRt(this,i):this.Cb.Cg(this,-1-c,null,i))),Lu(this,e,10,i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),zw)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),zw)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 9:return R$(this,i);case 10:return Lu(this,null,10,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),zw)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),zw)),e,i)},u.Fg=function(e){var n,i,r;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return r=this.t,r>1||r==-1;case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&mm(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&mm(this.q).i==0);case 10:return!!(this.Db>>16==10&&a(this.Cb,53))}return Vu(this,e-ei((ye(),zw)),Ve((n=a(an(this,16),24),n||zw),e))},u.Rg=function(){return ye(),zw};var Zqe=A(Re,"EParameterImpl",468);T(62,418,{95:1,91:1,87:1,139:1,174:1,51:1,17:1,158:1,61:1,103:1,431:1,42:1,92:1,142:1,62:1,418:1,268:1,107:1,108:1,615:1},fst),u.ug=function(e,n,i){var r,c,l,f;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return me(),!!(this.Bb&256);case 3:return me(),!!(this.Bb&512);case 4:return Xt(this.s);case 5:return Xt(this.t);case 6:return me(),f=this.t,f>1||f==-1;case 7:return me(),c=this.s,c>=1;case 8:return n?wl(this):this.r;case 9:return this.q;case 10:return me(),!!(this.Bb&oh);case 11:return me(),!!(this.Bb&mw);case 12:return me(),!!(this.Bb&zm);case 13:return this.j;case 14:return iE(this);case 15:return me(),!!(this.Bb&La);case 16:return me(),!!(this.Bb&Lf);case 17:return Zb(this);case 18:return me(),!!(this.Bb&ca);case 19:return me(),l=jo(this),!!(l&&l.Bb&ca);case 20:return me(),!!(this.Bb&ao);case 21:return n?jo(this):this.b;case 22:return n?Rat(this):qkt(this);case 23:return!this.a&&(this.a=new dM(gy,this,23)),this.a}return Xu(this,e-ei((ye(),VE)),Ve((r=a(an(this,16),24),r||VE),e),n,i)},u.Fg=function(e){var n,i,r,c;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return c=this.t,c>1||c==-1;case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&mm(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&mm(this.q).i==0);case 10:return(this.Bb&oh)==0;case 11:return(this.Bb&mw)!=0;case 12:return(this.Bb&zm)!=0;case 13:return this.j!=null;case 14:return iE(this)!=null;case 15:return(this.Bb&La)!=0;case 16:return(this.Bb&Lf)!=0;case 17:return!!Zb(this);case 18:return(this.Bb&ca)!=0;case 19:return r=jo(this),!!r&&(r.Bb&ca)!=0;case 20:return(this.Bb&ao)==0;case 21:return!!this.b;case 22:return!!qkt(this);case 23:return!!this.a&&this.a.i!=0}return Vu(this,e-ei((ye(),VE)),Ve((n=a(an(this,16),24),n||VE),e))},u.Mg=function(e,n){var i,r;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:eV(this,hi(n));return;case 2:f_(this,lt(de(n)));return;case 3:d_(this,lt(de(n)));return;case 4:a_(this,a(n,21).a);return;case 5:OM(this,a(n,21).a);return;case 8:GM(this,a(n,133));return;case 9:r=$1(this,a(n,84),null),r&&r.Th();return;case 10:YN(this,lt(de(n)));return;case 11:ZN(this,lt(de(n)));return;case 12:JN(this,lt(de(n)));return;case 13:Lrt(this,hi(n));return;case 15:KN(this,lt(de(n)));return;case 16:QN(this,lt(de(n)));return;case 18:Boe(this,lt(de(n)));return;case 20:fIt(this,lt(de(n)));return;case 21:dPt(this,a(n,17));return;case 23:!this.a&&(this.a=new dM(gy,this,23)),Dr(this.a),!this.a&&(this.a=new dM(gy,this,23)),Lr(this.a,a(n,13));return}Ku(this,e-ei((ye(),VE)),Ve((i=a(an(this,16),24),i||VE),e),n)},u.Rg=function(){return ye(),VE},u.Xg=function(){Rat(this),MM(qo((Qa(),eo),this)),wl(this),this.Bb|=1},u.$i=function(){return jo(this)},u.Cj=function(){var e;return e=jo(this),!!e&&(e.Bb&ca)!=0},u.Dj=function(){return(this.Bb&ca)!=0},u.Ej=function(){return(this.Bb&ao)!=0},u.zj=function(e,n){return this.c=null,Zat(this,e,n)},u.Ib=function(){var e;return this.Db&64?W7(this):(e=new ul(W7(this)),e.a+=" (containment: ",Cp(e,(this.Bb&ca)!=0),e.a+=", resolveProxies: ",Cp(e,(this.Bb&ao)!=0),e.a+=")",e.a)};var Yqe=A(Re,"EReferenceImpl",62);T(505,108,{95:1,38:1,91:1,87:1,134:1,51:1,103:1,42:1,92:1,505:1,107:1,108:1},BR),u.Fb=function(e){return this===e},u.kc=function(){return this.b},u.lc=function(){return this.c},u.Hb=function(){return lm(this)},u.kh=function(e){Lre(this,hi(e))},u.mc=function(e){return vre(this,hi(e))},u.ug=function(e,n,i){var r;switch(e){case 0:return this.b;case 1:return this.c}return Xu(this,e-ei((ye(),Ho)),Ve((r=a(an(this,16),24),r||Ho),e),n,i)},u.Fg=function(e){var n;switch(e){case 0:return this.b!=null;case 1:return this.c!=null}return Vu(this,e-ei((ye(),Ho)),Ve((n=a(an(this,16),24),n||Ho),e))},u.Mg=function(e,n){var i;switch(e){case 0:Pre(this,hi(n));return;case 1:oPt(this,hi(n));return}Ku(this,e-ei((ye(),Ho)),Ve((i=a(an(this,16),24),i||Ho),e),n)},u.Rg=function(){return ye(),Ho},u.ih=function(){var e;return this.a==-1&&(e=this.b,this.a=e==null?0:j1(e)),this.a},u.jh=function(e){this.a=e},u.Ib=function(){var e;return this.Db&64?nh(this):(e=new ul(nh(this)),e.a+=" (key: ",mo(e,this.b),e.a+=", value: ",mo(e,this.c),e.a+=")",e.a)},u.a=-1,u.b=null,u.c=null;var Dc=A(Re,"EStringToStringMapEntryImpl",505),eXt=Sr(hr,"FeatureMap/Entry/Internal");T(514,1,FO),u.$j=function(e){return this._j(a(e,42))},u._j=function(e){return this.$j(e)},u.Fb=function(e){var n,i;return this===e?!0:ct(e,75)?(n=a(e,75),n.nj()==this.c?(i=this.lc(),i==null?n.lc()==null:Fi(i,n.lc())):!1):!1},u.nj=function(){return this.c},u.Hb=function(){var e;return e=this.lc(),Yr(this.c)^(e==null?0:Yr(e))},u.Ib=function(){var e,n;return e=this.c,n=Zu(e.Wi()).fh(),e.be(),(n!=null&&n.length!=0?n+":"+e.be():e.be())+"="+this.lc()};var Kqe=A(Re,"EStructuralFeatureImpl/BasicFeatureMapEntry",514);T(709,514,FO,_st),u._j=function(e){return new _st(this.c,e)},u.lc=function(){return this.a},u.ak=function(e,n,i){return gle(this,e,this.a,n,i)},u.bk=function(e,n,i){return mle(this,e,this.a,n,i)};var Jqe=A(Re,"EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry",709);T(1363,1,{},bEt),u.cj=function(e,n,i,r,c){var l;return l=a(kL(e,this.b),237),l.yk(this.a).hj(r)},u.dj=function(e,n,i,r,c){var l;return l=a(kL(e,this.b),237),l.pk(this.a,r,c)},u.ej=function(e,n,i,r,c){var l;return l=a(kL(e,this.b),237),l.qk(this.a,r,c)},u.fj=function(e,n,i){var r;return r=a(kL(e,this.b),237),r.yk(this.a).ui()},u.gj=function(e,n,i,r){var c;c=a(kL(e,this.b),237),c.yk(this.a).Gc(r)};var Qqe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator",1363);T(82,1,{},Ip,jg,Op,Wg),u.cj=function(e,n,i,r,c){var l;if(l=n.Tg(i),l==null&&n.Ug(i,l=tft(this,e)),!c)switch(this.e){case 50:case 41:return a(l,533).Hi();case 40:return a(l,237).vk()}return l},u.dj=function(e,n,i,r,c){var l,f;return f=n.Tg(i),f==null&&n.Ug(i,f=tft(this,e)),l=a(f,64).xj(r,c),l},u.ej=function(e,n,i,r,c){var l;return l=n.Tg(i),l!=null&&(c=a(l,64).yj(r,c)),c},u.fj=function(e,n,i){var r;return r=n.Tg(i),r!=null&&a(r,81).ui()},u.gj=function(e,n,i,r){var c;c=a(n.Tg(i),81),!c&&n.Ug(i,c=tft(this,e)),c.Gc(r)},u.b=0,u.e=0;var tXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateMany",82);T(461,1,{}),u.dj=function(e,n,i,r,c){throw K(new Oi)},u.ej=function(e,n,i,r,c){throw K(new Oi)};var lg,eXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingle",461);T(702,461,{},nct),u.cj=function(e,n,i,r,c){return FX(e,e.yg(),e.og())==this.b?this.Ej()&&r?SX(e):e.yg():null},u.dj=function(e,n,i,r,c){var l,f;return e.yg()&&(c=(l=e.og(),l>=0?e.jg(c):e.yg().Cg(e,-1-l,null,c))),f=xr(e.mg(),this.e),e.lg(r,f,c)},u.ej=function(e,n,i,r,c){var l;return l=xr(e.mg(),this.e),e.lg(null,l,c)},u.fj=function(e,n,i){var r;return r=xr(e.mg(),this.e),!!e.yg()&&e.og()==r},u.gj=function(e,n,i,r){var c,l,f,g,b;if(r!=null&&!GX(this.a,r))throw K(new wT(UO+(ct(r,51)?rlt(a(r,51).mg()):Kct(fu(r)))+zO+this.a+"'"));if(c=e.yg(),f=xr(e.mg(),this.e),zt(r)!==zt(c)||e.og()!=f&&r!=null){if(YM(e,a(r,51)))throw K(new yn(T4+e.Ib()));b=null,c&&(b=(l=e.og(),l>=0?e.jg(null):e.yg().Cg(e,-1-l,null,null))),g=a(r,42),g&&(b=g.Ag(e,xr(g.mg(),this.b),null,b)),b=e.lg(g,f,b),b&&b.Th()}else e.eg()&&e.fg()&&Bi(e,new fs(e,1,f,r,r))},u.Ej=function(){return!1};var nXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainer",702);T(1364,702,{},YTt),u.Ej=function(){return!0};var iXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving",1364);T(512,461,{}),u.cj=function(e,n,i,r,c){var l;return l=n.Tg(i),l==null?this.b:zt(l)===zt(lg)?null:l},u.fj=function(e,n,i){var r;return r=n.Tg(i),r!=null&&(zt(r)===zt(lg)||!Fi(r,this.b))},u.gj=function(e,n,i,r){var c,l;e.eg()&&e.fg()?(c=(l=n.Tg(i),l==null?this.b:zt(l)===zt(lg)?null:l),r==null?this.c!=null?(n.Ug(i,null),r=this.b):this.b!=null?n.Ug(i,lg):n.Ug(i,null):(this.ck(r),n.Ug(i,r)),Bi(e,this.d.dk(e,1,this.e,c,r))):r==null?this.c!=null?n.Ug(i,null):this.b!=null?n.Ug(i,lg):n.Ug(i,null):(this.ck(r),n.Ug(i,r))},u.ck=function(e){throw K(new b9)};var rXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData",512);T(V_,1,{},jk),u.dk=function(e,n,i,r,c){return new gL(e,n,i,r,c)},u.ek=function(e,n,i,r,c,l){return new qot(e,n,i,r,c,l)};var e_t,n_t,i_t,r_t,s_t,o_t,c_t,ftt,a_t,sXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator",V_);T(1379,V_,{},Rz),u.dk=function(e,n,i,r,c){return new kct(e,n,i,lt(de(r)),lt(de(c)))},u.ek=function(e,n,i,r,c,l){return new $At(e,n,i,lt(de(r)),lt(de(c)),l)};var oXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1",1379);T(1380,V_,{},Hk),u.dk=function(e,n,i,r,c){return new rat(e,n,i,a(r,192).a,a(c,192).a)},u.ek=function(e,n,i,r,c,l){return new FAt(e,n,i,a(r,192).a,a(c,192).a,l)};var cXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2",1380);T(1381,V_,{},FR),u.dk=function(e,n,i,r,c){return new sat(e,n,i,a(r,159).a,a(c,159).a)},u.ek=function(e,n,i,r,c,l){return new UAt(e,n,i,a(r,159).a,a(c,159).a,l)};var aXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3",1381);T(1382,V_,{},UR),u.dk=function(e,n,i,r,c){return new Cct(e,n,i,lt(Yt(r)),lt(Yt(c)))},u.ek=function(e,n,i,r,c,l){return new zAt(e,n,i,lt(Yt(r)),lt(Yt(c)),l)};var uXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4",1382);T(1383,V_,{},zR),u.dk=function(e,n,i,r,c){return new aat(e,n,i,a(r,126).a,a(c,126).a)},u.ek=function(e,n,i,r,c,l){return new jAt(e,n,i,a(r,126).a,a(c,126).a,l)};var lXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5",1383);T(1384,V_,{},XS),u.dk=function(e,n,i,r,c){return new Act(e,n,i,a(r,21).a,a(c,21).a)},u.ek=function(e,n,i,r,c,l){return new HAt(e,n,i,a(r,21).a,a(c,21).a,l)};var hXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6",1384);T(1385,V_,{},Dz),u.dk=function(e,n,i,r,c){return new oat(e,n,i,a(r,149).a,a(c,149).a)},u.ek=function(e,n,i,r,c,l){return new GAt(e,n,i,a(r,149).a,a(c,149).a,l)};var fXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7",1385);T(1386,V_,{},jR),u.dk=function(e,n,i,r,c){return new cat(e,n,i,a(r,168).a,a(c,168).a)},u.ek=function(e,n,i,r,c,l){return new WAt(e,n,i,a(r,168).a,a(c,168).a,l)};var dXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8",1386);T(1366,512,{},I4t),u.ck=function(e){if(!this.a.Li(e))throw K(new wT(UO+fu(e)+zO+this.a+"'"))};var pXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic",1366);T(1367,512,{},OCt),u.ck=function(e){};var gXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic",1367);T(703,512,{}),u.fj=function(e,n,i){var r;return r=n.Tg(i),r!=null},u.gj=function(e,n,i,r){var c,l;e.eg()&&e.fg()?(c=!0,l=n.Tg(i),l==null?(c=!1,l=this.b):zt(l)===zt(lg)&&(l=null),r==null?this.c!=null?(n.Ug(i,null),r=this.b):n.Ug(i,lg):(this.ck(r),n.Ug(i,r)),Bi(e,this.d.ek(e,1,this.e,l,r,!c))):r==null?this.c!=null?n.Ug(i,null):n.Ug(i,lg):(this.ck(r),n.Ug(i,r))};var mXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable",703);T(1368,703,{},R4t),u.ck=function(e){if(!this.a.Li(e))throw K(new wT(UO+fu(e)+zO+this.a+"'"))};var bXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic",1368);T(1369,703,{},BCt),u.ck=function(e){};var wXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic",1369);T(370,461,{},UD),u.cj=function(e,n,i,r,c){var l,f,g,b,v;if(v=n.Tg(i),this.Zi()&&zt(v)===zt(lg))return null;if(this.Ej()&&r&&v!=null){if(g=a(v,42),g.Eg()&&(b=B1(e,g),g!=b)){if(!GX(this.a,b))throw K(new wT(UO+fu(b)+zO+this.a+"'"));n.Ug(i,v=b),this.Dj()&&(l=a(b,42),f=g.Cg(e,this.b?xr(g.mg(),this.b):-1-xr(e.mg(),this.e),null,null),!l.yg()&&(f=l.Ag(e,this.b?xr(l.mg(),this.b):-1-xr(e.mg(),this.e),null,f)),f&&f.Th()),e.eg()&&e.fg()&&Bi(e,new gL(e,9,this.e,g,b))}return v}else return v},u.dj=function(e,n,i,r,c){var l,f;return f=n.Tg(i),zt(f)===zt(lg)&&(f=null),n.Ug(i,r),this.qi()?zt(f)!==zt(r)&&f!=null&&(l=a(f,42),c=l.Cg(e,xr(l.mg(),this.b),null,c)):this.Dj()&&f!=null&&(c=a(f,42).Cg(e,-1-xr(e.mg(),this.e),null,c)),e.eg()&&e.fg()&&(!c&&(c=new w1(4)),c.Sh(new gL(e,1,this.e,f,r))),c},u.ej=function(e,n,i,r,c){var l;return l=n.Tg(i),zt(l)===zt(lg)&&(l=null),n.Vg(i),e.eg()&&e.fg()&&(!c&&(c=new w1(4)),this.Zi()?c.Sh(new gL(e,2,this.e,l,null)):c.Sh(new gL(e,1,this.e,l,null))),c},u.fj=function(e,n,i){var r;return r=n.Tg(i),r!=null},u.gj=function(e,n,i,r){var c,l,f,g,b;if(r!=null&&!GX(this.a,r))throw K(new wT(UO+(ct(r,51)?rlt(a(r,51).mg()):Kct(fu(r)))+zO+this.a+"'"));b=n.Tg(i),g=b!=null,this.Zi()&&zt(b)===zt(lg)&&(b=null),f=null,this.qi()?zt(b)!==zt(r)&&(b!=null&&(c=a(b,42),f=c.Cg(e,xr(c.mg(),this.b),null,null)),r!=null&&(c=a(r,42),f=c.Ag(e,xr(c.mg(),this.b),null,f))):this.Dj()&&zt(b)!==zt(r)&&(b!=null&&(f=a(b,42).Cg(e,-1-xr(e.mg(),this.e),null,null)),r!=null&&(f=a(r,42).Ag(e,-1-xr(e.mg(),this.e),null,f))),r==null&&this.Zi()?n.Ug(i,lg):n.Ug(i,r),e.eg()&&e.fg()?(l=new qot(e,1,this.e,b,r,this.Zi()&&!g),f?(f.Sh(l),f.Th()):Bi(e,l)):f&&f.Th()},u.qi=function(){return!1},u.Dj=function(){return!1},u.Ej=function(){return!1},u.Zi=function(){return!1};var vXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObject",370);T(513,370,{},KW),u.Dj=function(){return!0};var _Xe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment",513);T(1372,513,{},VSt),u.Ej=function(){return!0};var yXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving",1372);T(705,513,{},ust),u.Zi=function(){return!0};var xXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable",705);T(1374,705,{},qSt),u.Ej=function(){return!0};var MXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving",1374);T(585,513,{},d$),u.qi=function(){return!0};var EXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse",585);T(1373,585,{},KTt),u.Ej=function(){return!0};var SXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving",1373);T(706,585,{},Wst),u.Zi=function(){return!0};var TXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable",706);T(1375,706,{},JTt),u.Ej=function(){return!0};var CXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving",1375);T(586,370,{},ast),u.Ej=function(){return!0};var AXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving",586);T(1376,586,{},XSt),u.Zi=function(){return!0};var kXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable",1376);T(707,586,{},Gst),u.qi=function(){return!0};var LXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse",707);T(1377,707,{},QTt),u.Zi=function(){return!0};var PXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable",1377);T(1370,370,{},ZSt),u.Zi=function(){return!0};var IXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable",1370);T(704,370,{},$st),u.qi=function(){return!0};var RXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse",704);T(1371,704,{},tCt),u.Zi=function(){return!0};var DXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable",1371);T(708,514,FO,Not),u._j=function(e){return new Not(this.a,this.c,e)},u.lc=function(){return this.b},u.ak=function(e,n,i){return Pae(this,e,this.b,i)},u.bk=function(e,n,i){return Iae(this,e,this.b,i)};var NXe=A(Re,"EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry",708);T(1378,514,FO,Ukt),u.$j=function(e){return new n$((fr(),TI),this.b.Zg(this.a,e))},u.lc=function(){return null},u.ak=function(e,n,i){return i},u.bk=function(e,n,i){return i};var OXe=A(Re,"EStructuralFeatureImpl/SimpleContentFeatureMapEntry",1378);T(587,514,FO,n$),u.$j=function(e){return new n$(this.c,e)},u.lc=function(){return this.a},u.ak=function(e,n,i){return i},u.bk=function(e,n,i){return i};var BXe=A(Re,"EStructuralFeatureImpl/SimpleFeatureMapEntry",587);T(361,451,Nf,kb),u.Fh=function(e){return dt(Dl,te,24,e,0,1)},u.Bh=function(){return!1};var FXe=A(Re,"ESuperAdapter/1",361);T(411,399,{95:1,91:1,87:1,139:1,174:1,51:1,103:1,742:1,42:1,92:1,142:1,411:1,107:1,108:1},Gk),u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return!this.a&&(this.a=new pL(this,Do,this)),this.a}return Xu(this,e-ei((ye(),by)),Ve((r=a(an(this,16),24),r||by),e),n,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 2:return!this.a&&(this.a=new pL(this,Do,this)),$s(this.a,e,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),by)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),by)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return!!this.a&&this.a.i!=0}return Vu(this,e-ei((ye(),by)),Ve((n=a(an(this,16),24),n||by),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:kh(this,hi(n));return;case 2:!this.a&&(this.a=new pL(this,Do,this)),Dr(this.a),!this.a&&(this.a=new pL(this,Do,this)),Lr(this.a,a(n,13));return}Ku(this,e-ei((ye(),by)),Ve((i=a(an(this,16),24),i||by),e),n)},u.Rg=function(){return ye(),by};var UXe=A(Re,"ETypeParameterImpl",411);T(457,88,Zo,pL),u.ri=function(e,n){return _1e(this,a(e,84),n)},u.si=function(e,n){return y1e(this,a(e,84),n)};var zXe=A(Re,"ETypeParameterImpl/1",457);T(579,44,sx,zG),u.Xb=function(){return new dT(this)};var jXe=A(Re,"ETypeParameterImpl/2",579);T(508,bd,vl,dT),u.nc=function(e){return iTt(this,a(e,84))},u.oc=function(e){var n,i,r;for(r=!1,i=e.tc();i.hc();)n=a(i.ic(),84),wr(this.a,n,"")==null&&(r=!0);return r},u.Pb=function(){uu(this.a)},u.pc=function(e){return dm(this.a,e)},u.tc=function(){var e;return e=new qg(new xp(this.a).a),new pT(e)},u.vc=function(e){return Xkt(this,e)},u._b=function(){return nM(this.a)};var HXe=A(Re,"ETypeParameterImpl/2/1",508);T(509,1,Cs,pT),u.gc=function(e){ks(this,e)},u.ic=function(){return a(Sm(this.a).kc(),84)},u.hc=function(){return this.a.b},u.jc=function(){R5t(this.a)};var GXe=A(Re,"ETypeParameterImpl/2/1/1",509);T(1169,44,sx,Pxt),u.Qb=function(e){return Es(e)?V$(this,e):!!Ea(this.d,e)},u.Vb=function(e){var n,i;return n=Es(e)?Zc(this,e):Ua(Ea(this.d,e)),ct(n,743)?(i=a(n,743),n=i.mj(),wr(this,a(e,207),n),n):n??(e==null?(JG(),iXt):null)};var WXe=A(Re,"EValidatorRegistryImpl",1169);T(1362,638,{95:1,91:1,87:1,430:1,139:1,51:1,103:1,1635:1,42:1,92:1,142:1,107:1,108:1},HR),u.Zg=function(e,n){switch(e.Ni()){case 21:case 22:case 23:case 24:case 26:case 31:case 32:case 37:case 38:case 39:case 40:case 43:case 44:case 48:case 49:case 20:return n==null?null:Yc(n);case 25:return Fue(n);case 27:return tue(n);case 28:return eue(n);case 29:return n==null?null:oSt(AA[0],a(n,181));case 41:return n==null?"":Og(a(n,274));case 42:return Yc(n);case 50:return hi(n);default:throw K(new yn(_E+e.be()+Gm))}},u.$g=function(e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt;switch(e.G==-1&&(e.G=(R=Zu(e),R?Hp(R.bh(),e):-1)),e.G){case 0:return i=new UG,i;case 1:return n=new DR,n;case 2:return r=new l5,r;case 4:return c=new x,c;case 5:return l=new kxt,l;case 6:return f=new A5,f;case 7:return g=new T8,g;case 10:return v=new zl,v;case 11:return M=new BG,M;case 12:return k=new z4t,k;case 13:return O=new FG,O;case 14:return $=new fst,$;case 17:return W=new BR,W;case 18:return b=new b1,b;case 19:return nt=new Gk,nt;default:throw K(new yn(XY+e.zb+Gm))}},u._g=function(e,n){switch(e.Ni()){case 20:return n==null?null:new Lit(n);case 21:return n==null?null:new y1(n);case 23:case 22:return n==null?null:kfe(n);case 26:case 24:return n==null?null:PL(ku(n,-128,127)<<24>>24);case 25:return cme(n);case 27:return Rde(n);case 28:return Dde(n);case 29:return ige(n);case 32:case 31:return n==null?null:rw(n);case 38:case 37:return n==null?null:new bT(n);case 40:case 39:return n==null?null:Xt(ku(n,Vs,qi));case 41:return null;case 42:return n==null,null;case 44:case 43:return n==null?null:Qg(J7(n));case 49:case 48:return n==null?null:HM(ku(n,jO,32767)<<16>>16);case 50:return n;default:throw K(new yn(_E+e.be()+Gm))}};var $Xe=A(Re,"EcoreFactoryImpl",1362);T(504,248,{95:1,91:1,87:1,139:1,174:1,51:1,207:1,103:1,1633:1,42:1,92:1,142:1,248:1,504:1,107:1,108:1,613:1},w4t),u.gb=!1,u.hb=!1;var u_t,nXt=!1,VXe=A(Re,"EcorePackageImpl",504);T(1111,1,{743:1},Nz),u.mj=function(){return dSt(),rXt};var qXe=A(Re,"EcorePackageImpl/1",1111);T(1120,1,wi,Wk),u.Li=function(e){return ct(e,139)},u.Mi=function(e){return dt(bI,te,139,e,0,1)};var XXe=A(Re,"EcorePackageImpl/10",1120);T(1121,1,wi,GR),u.Li=function(e){return ct(e,174)},u.Mi=function(e){return dt(itt,te,174,e,0,1)};var ZXe=A(Re,"EcorePackageImpl/11",1121);T(1122,1,wi,$k),u.Li=function(e){return ct(e,51)},u.Mi=function(e){return dt(Nw,te,51,e,0,1)};var YXe=A(Re,"EcorePackageImpl/12",1122);T(1123,1,wi,Oz),u.Li=function(e){return ct(e,371)},u.Mi=function(e){return dt(ph,Jpt,53,e,0,1)};var KXe=A(Re,"EcorePackageImpl/13",1123);T(1124,1,wi,Vk),u.Li=function(e){return ct(e,207)},u.Mi=function(e){return dt(of,te,207,e,0,1)};var JXe=A(Re,"EcorePackageImpl/14",1124);T(1125,1,wi,oo),u.Li=function(e){return ct(e,468)},u.Mi=function(e){return dt(Fw,te,1703,e,0,1)};var QXe=A(Re,"EcorePackageImpl/15",1125);T(1126,1,wi,Bz),u.Li=function(e){return ct(e,62)},u.Mi=function(e){return dt(Uw,$_,17,e,0,1)};var tZe=A(Re,"EcorePackageImpl/16",1126);T(1127,1,wi,Fz),u.Li=function(e){return ct(e,158)},u.Mi=function(e){return dt(Ra,$_,158,e,0,1)};var eZe=A(Re,"EcorePackageImpl/17",1127);T(1128,1,wi,U3),u.Li=function(e){return ct(e,431)},u.Mi=function(e){return dt(Bw,te,431,e,0,1)};var nZe=A(Re,"EcorePackageImpl/18",1128);T(1129,1,wi,WR),u.Li=function(e){return ct(e,505)},u.Mi=function(e){return dt(Dc,vUt,505,e,0,1)};var iZe=A(Re,"EcorePackageImpl/19",1129);T(1112,1,wi,Uz),u.Li=function(e){return ct(e,335)},u.Mi=function(e){return dt(gy,$_,29,e,0,1)};var rZe=A(Re,"EcorePackageImpl/2",1112);T(1130,1,wi,zz),u.Li=function(e){return ct(e,217)},u.Mi=function(e){return dt(Do,OUt,84,e,0,1)};var sZe=A(Re,"EcorePackageImpl/20",1130);T(1131,1,wi,yp),u.Li=function(e){return ct(e,411)},u.Mi=function(e){return dt(wu,te,742,e,0,1)};var oZe=A(Re,"EcorePackageImpl/21",1131);T(1132,1,wi,jz),u.Li=function(e){return Hb(e)},u.Mi=function(e){return dt(ho,wt,434,e,8,1)};var cZe=A(Re,"EcorePackageImpl/22",1132);T(1133,1,wi,ZS),u.Li=function(e){return ct(e,173)},u.Mi=function(e){return dt(Da,wt,173,e,0,2)};var aZe=A(Re,"EcorePackageImpl/23",1133);T(1134,1,wi,qk),u.Li=function(e){return ct(e,192)},u.Mi=function(e){return dt(px,wt,192,e,0,1)};var uZe=A(Re,"EcorePackageImpl/24",1134);T(1135,1,wi,$R),u.Li=function(e){return ct(e,159)},u.Mi=function(e){return dt(U4,wt,159,e,0,1)};var lZe=A(Re,"EcorePackageImpl/25",1135);T(1136,1,wi,VR),u.Li=function(e){return ct(e,181)},u.Mi=function(e){return dt(tB,wt,181,e,0,1)};var hZe=A(Re,"EcorePackageImpl/26",1136);T(1137,1,wi,Fd),u.Li=function(e){return!1},u.Mi=function(e){return dt(C_t,te,1787,e,0,1)};var fZe=A(Re,"EcorePackageImpl/27",1137);T(1138,1,wi,Lb),u.Li=function(e){return Gb(e)},u.Mi=function(e){return dt(To,wt,315,e,7,1)};var dZe=A(Re,"EcorePackageImpl/28",1138);T(1139,1,wi,Xk),u.Li=function(e){return ct(e,52)},u.Mi=function(e){return dt(Hvt,fw,52,e,0,1)};var pZe=A(Re,"EcorePackageImpl/29",1139);T(1113,1,wi,qR),u.Li=function(e){return ct(e,469)},u.Mi=function(e){return dt(Ui,{3:1,4:1,5:1,1627:1},609,e,0,1)};var gZe=A(Re,"EcorePackageImpl/3",1113);T(1140,1,wi,YS),u.Li=function(e){return ct(e,525)},u.Mi=function(e){return dt($vt,te,1634,e,0,1)};var mZe=A(Re,"EcorePackageImpl/30",1140);T(1141,1,wi,XR),u.Li=function(e){return ct(e,184)},u.Mi=function(e){return dt(p_t,fw,184,e,0,1)};var bZe=A(Re,"EcorePackageImpl/31",1141);T(1142,1,wi,Zk),u.Li=function(e){return ct(e,75)},u.Mi=function(e){return dt(KF,$Ut,75,e,0,1)};var wZe=A(Re,"EcorePackageImpl/32",1142);T(1143,1,wi,ZR),u.Li=function(e){return ct(e,126)},u.Mi=function(e){return dt(CE,wt,126,e,0,1)};var vZe=A(Re,"EcorePackageImpl/33",1143);T(1144,1,wi,Yk),u.Li=function(e){return ct(e,21)},u.Mi=function(e){return dt(Io,wt,21,e,0,1)};var _Ze=A(Re,"EcorePackageImpl/34",1144);T(1145,1,wi,Kk),u.Li=function(e){return ct(e,274)},u.Mi=function(e){return dt(h1t,te,274,e,0,1)};var yZe=A(Re,"EcorePackageImpl/35",1145);T(1146,1,wi,Pb),u.Li=function(e){return ct(e,149)},u.Mi=function(e){return dt(Vm,wt,149,e,0,1)};var xZe=A(Re,"EcorePackageImpl/36",1146);T(1147,1,wi,Hz),u.Li=function(e){return ct(e,109)},u.Mi=function(e){return dt(f1t,te,109,e,0,1)};var MZe=A(Re,"EcorePackageImpl/37",1147);T(1148,1,wi,Ib),u.Li=function(e){return ct(e,534)},u.Mi=function(e){return dt(l_t,te,534,e,0,1)};var EZe=A(Re,"EcorePackageImpl/38",1148);T(1149,1,wi,YR),u.Li=function(e){return!1},u.Mi=function(e){return dt(A_t,te,1788,e,0,1)};var SZe=A(Re,"EcorePackageImpl/39",1149);T(1114,1,wi,KR),u.Li=function(e){return ct(e,96)},u.Mi=function(e){return dt(Dl,te,24,e,0,1)};var TZe=A(Re,"EcorePackageImpl/4",1114);T(1150,1,wi,Jk),u.Li=function(e){return ct(e,168)},u.Mi=function(e){return dt(qm,wt,168,e,0,1)};var CZe=A(Re,"EcorePackageImpl/40",1150);T(1151,1,wi,Gz),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var AZe=A(Re,"EcorePackageImpl/41",1151);T(1152,1,wi,Wz),u.Li=function(e){return ct(e,532)},u.Mi=function(e){return dt(Wvt,te,532,e,0,1)};var kZe=A(Re,"EcorePackageImpl/42",1152);T(1153,1,wi,$z),u.Li=function(e){return!1},u.Mi=function(e){return dt(k_t,wt,1789,e,0,1)};var LZe=A(Re,"EcorePackageImpl/43",1153);T(1154,1,wi,JR),u.Li=function(e){return ct(e,38)},u.Mi=function(e){return dt(q_,te,38,e,0,1)};var PZe=A(Re,"EcorePackageImpl/44",1154);T(1115,1,wi,QR),u.Li=function(e){return ct(e,133)},u.Mi=function(e){return dt(cf,te,133,e,0,1)};var IZe=A(Re,"EcorePackageImpl/5",1115);T(1116,1,wi,Vz),u.Li=function(e){return ct(e,140)},u.Mi=function(e){return dt(utt,te,140,e,0,1)};var RZe=A(Re,"EcorePackageImpl/6",1116);T(1117,1,wi,t8),u.Li=function(e){return ct(e,425)},u.Mi=function(e){return dt(YF,te,608,e,0,1)};var DZe=A(Re,"EcorePackageImpl/7",1117);T(1118,1,wi,e8),u.Li=function(e){return ct(e,525)},u.Mi=function(e){return dt(Qp,te,617,e,0,1)};var NZe=A(Re,"EcorePackageImpl/8",1118);T(1119,1,wi,td),u.Li=function(e){return ct(e,430)},u.Mi=function(e){return dt(CA,te,430,e,0,1)};var OZe=A(Re,"EcorePackageImpl/9",1119);T(915,1673,wUt,$xt),u.sh=function(e,n){she(this,a(n,380))},u.vh=function(e,n){$8t(this,e,a(n,380))};var BZe=A(Re,"MinimalEObjectImpl/1ArrayDelegatingAdapterList",915);T(916,136,c6,c4t),u.Oh=function(){return this.a.a};var FZe=A(Re,"MinimalEObjectImpl/1ArrayDelegatingAdapterList/1",916);T(955,954,{},KEt);var UZe=A("org.eclipse.emf.ecore.plugin","EcorePlugin",955),l_t=Sr(VUt,"Resource");T(719,1492,qUt),u.ik=function(e){},u.jk=function(e){},u.fk=function(){return!this.a&&(this.a=new T5(this)),this.a},u.gk=function(e){var n,i,r,c,l;if(r=e.length,r>0)if(e.charCodeAt(0)==47){for(l=new qu(4),c=1,n=1;n0&&(e=e.substr(0,i)));return B0e(this,e)},u.hk=function(){return this.c},u.Ib=function(){return Og(this.ql)+"@"+(Yr(this)>>>0).toString(16)+" uri='"+this.d+"'"},u.b=!1;var zZe=A(uK,"ResourceImpl",719);T(1493,719,qUt,kG);var jZe=A(uK,"BinaryResourceImpl",1493);T(1048,629,iK),u.Gh=function(e){return ct(e,51)?coe(this,a(e,51)):ct(e,534)?new $n(a(e,534).fk()):zt(e)===zt(this.f)?a(e,13).tc():(KT(),_I.a)},u.hc=function(){return Flt(this)},u.a=!1;var HZe=A(hr,"EcoreUtil/ContentTreeIterator",1048);T(1494,1048,iK,GCt),u.Gh=function(e){return zt(e)===zt(this.f)?a(e,15).tc():new lkt(a(e,51))};var GZe=A(uK,"ResourceImpl/5",1494);T(595,1687,NUt,T5),u.pc=function(e){return this.i<=4?ZC(this,e):ct(e,42)&&a(e,42).sg()==this.a},u.sh=function(e,n){e==this.i-1&&(this.a.b||(this.a.b=!0))},u.uh=function(e,n){e==0?this.a.b||(this.a.b=!0):wV(this,e,n)},u.vh=function(e,n){},u.wh=function(e,n,i){},u.pi=function(){return 2},u.Oh=function(){return this.a},u.qi=function(){return!0},u.ri=function(e,n){var i;return i=a(e,42),n=i.Pg(this.a,n),n},u.si=function(e,n){var i;return i=a(e,42),i.Pg(null,n)},u.ti=function(){return!1},u.xh=function(){return!0},u.Fh=function(e){return dt(Nw,te,51,e,0,1)},u.Bh=function(){return!1};var WZe=A(uK,"ResourceImpl/ContentsEList",595);T(873,1657,tx,C5),u.fd=function(e){return this.a.qh(e)},u._b=function(){return this.a._b()};var $Ze=A(hr,"AbstractSequentialInternalEList/1",873),h_t,f_t,eo,d_t;T(567,1,{},lCt);var JF,QF,VZe=A(hr,"BasicExtendedMetaData",567);T(1023,1,{},wEt),u.kk=function(){return null},u.lk=function(){return this.a==-2&&Vnt(this,rge(this.d,this.b)),this.a},u.mk=function(){return null},u.nk=function(){return we(),we(),fo},u.be=function(){return this.c==ME&&Vj(this,nRt(this.d,this.b)),this.c},u.ok=function(){return 0},u.a=-2,u.c=ME;var qZe=A(hr,"BasicExtendedMetaData/EClassExtendedMetaDataImpl",1023);T(oh,1,{},qAt),u.kk=function(){return this.a==(PM(),JF)&&qnt(this,vwe(this.f,this.b)),this.a},u.lk=function(){return 0},u.mk=function(){return this.c==(PM(),JF)&&qj(this,_we(this.f,this.b)),this.c},u.nk=function(){return!this.d&&Xnt(this,Jve(this.f,this.b)),this.d},u.be=function(){return this.e==ME&&Znt(this,nRt(this.f,this.b)),this.e},u.ok=function(){return this.g==-2&&Ynt(this,R1e(this.f,this.b)),this.g},u.e=ME,u.g=-2;var XZe=A(hr,"BasicExtendedMetaData/EDataTypeExtendedMetaDataImpl",oh);T(1022,1,{},vEt),u.b=!1,u.c=!1;var ZZe=A(hr,"BasicExtendedMetaData/EPackageExtendedMetaDataImpl",1022);T(1025,1,{},XAt),u.c=-2,u.e=ME,u.f=ME;var YZe=A(hr,"BasicExtendedMetaData/EStructuralFeatureExtendedMetaDataImpl",1025);T(529,565,Zo,PD),u.pi=function(){return this.c},u.Rj=function(){return!1},u.zh=function(e,n){return n},u.c=0;var KZe=A(hr,"EDataTypeEList",529),p_t=Sr(hr,"FeatureMap");T(90,529,{3:1,4:1,20:1,25:1,41:1,13:1,15:1,49:1,59:1,55:1,52:1,81:1,184:1,237:1,1630:1,64:1},_s),u.bd=function(e,n){ybe(this,e,a(n,75))},u.nc=function(e){return nbe(this,a(e,75))},u.nh=function(e){wse(this,a(e,75))},u.ri=function(e,n){return Lne(this,a(e,75),n)},u.si=function(e,n){return Ust(this,a(e,75),n)},u.zh=function(e,n){return Yye(this,e,a(n,75))},u.hd=function(e,n){return Kbe(this,e,a(n,75))},u.yi=function(e,n){return Pne(this,a(e,75),n)},u.zi=function(e,n){return UTt(this,a(e,75),n)},u.Ai=function(e,n,i){return G1e(this,a(e,75),a(n,75),i)},u.Ch=function(e,n){return lX(this,e,a(n,75))},u.oc=function(e){var n,i,r,c,l,f,g,b,v;for(b=new i_(e._b()),r=e.tc();r.hc();)if(i=a(r.ic(),75),c=i.nj(),Om(this.e,c))(!c.xh()||!_V(this,c,i.lc())&&!ZC(b,i))&&ni(b,i);else{for(v=gu(this.e.mg(),c),n=a(this.g,124),l=!0,f=0;f=0;)if(n=e[this.c],this.k.Bk(n.nj()))return this.j=this.f?n:n.lc(),this.i=-2,!0;return this.i=-1,this.g=-1,!1};var tYe=A(hr,"BasicFeatureMap/FeatureEIterator",377);T(601,377,kf,LW),u.Xj=function(){return!0};var eYe=A(hr,"BasicFeatureMap/ResolvingFeatureEIterator",601);T(871,444,OO,cSt),u.Uh=function(){return this};var nYe=A(hr,"EContentsEList/1",871);T(872,444,OO,LEt),u.Xj=function(){return!1};var iYe=A(hr,"EContentsEList/2",872);T(870,260,BO,aSt),u.Zj=function(e){},u.hc=function(){return!1},u.Cc=function(){return!1};var rYe=A(hr,"EContentsEList/FeatureIteratorImpl/1",870);T(734,529,Zo,Vrt),u.th=function(){this.a=!0},u.ui=function(){return this.a},u.ij=function(){var e;Dr(this),Xl(this.e)?(e=this.a,this.a=!1,Bi(this.e,new Jl(this.e,2,this.c,e,!1))):this.a=!1},u.a=!1;var sYe=A(hr,"EDataTypeEList/Unsettable",734);T(1566,529,Zo,bSt),u.xh=function(){return!0};var oYe=A(hr,"EDataTypeUniqueEList",1566);T(1567,734,Zo,wSt),u.xh=function(){return!0};var cYe=A(hr,"EDataTypeUniqueEList/Unsettable",1567);T(156,88,Zo,Gu),u.Qj=function(){return!0},u.zh=function(e,n){return X2(this,e,a(n,51))};var aYe=A(hr,"EObjectContainmentEList/Resolving",156);T(1026,493,Zo,mSt),u.Qj=function(){return!0},u.zh=function(e,n){return X2(this,e,a(n,51))};var uYe=A(hr,"EObjectContainmentEList/Unsettable/Resolving",1026);T(679,18,Zo,Ast),u.th=function(){this.a=!0},u.ui=function(){return this.a},u.ij=function(){var e;Dr(this),Xl(this.e)?(e=this.a,this.a=!1,Bi(this.e,new Jl(this.e,2,this.c,e,!1))):this.a=!1},u.a=!1;var lYe=A(hr,"EObjectContainmentWithInverseEList/Unsettable",679);T(1044,679,Zo,_Tt),u.Qj=function(){return!0},u.zh=function(e,n){return X2(this,e,a(n,51))};var hYe=A(hr,"EObjectContainmentWithInverseEList/Unsettable/Resolving",1044);T(675,450,Zo,qrt),u.th=function(){this.a=!0},u.ui=function(){return this.a},u.ij=function(){var e;Dr(this),Xl(this.e)?(e=this.a,this.a=!1,Bi(this.e,new Jl(this.e,2,this.c,e,!1))):this.a=!1},u.a=!1;var fYe=A(hr,"EObjectEList/Unsettable",675);T(376,450,Zo,dM),u.Qj=function(){return!0},u.zh=function(e,n){return X2(this,e,a(n,51))};var dYe=A(hr,"EObjectResolvingEList",376);T(1554,675,Zo,vSt),u.Qj=function(){return!0},u.zh=function(e,n){return X2(this,e,a(n,51))};var pYe=A(hr,"EObjectResolvingEList/Unsettable",1554);T(1495,1,{},Ig);var iXt,gYe=A(hr,"EObjectValidator",1495);T(496,450,Zo,XD),u.Lj=function(){return this.d},u.Mj=function(){return this.b},u.qi=function(){return!0},u.Pj=function(){return!0},u.b=0;var mYe=A(hr,"EObjectWithInverseEList",496);T(1047,496,Zo,yTt),u.Oj=function(){return!0};var bYe=A(hr,"EObjectWithInverseEList/ManyInverse",1047);T(572,496,Zo,s$),u.th=function(){this.a=!0},u.ui=function(){return this.a},u.ij=function(){var e;Dr(this),Xl(this.e)?(e=this.a,this.a=!1,Bi(this.e,new Jl(this.e,2,this.c,e,!1))):this.a=!1},u.a=!1;var wYe=A(hr,"EObjectWithInverseEList/Unsettable",572);T(1046,572,Zo,xTt),u.Oj=function(){return!0};var vYe=A(hr,"EObjectWithInverseEList/Unsettable/ManyInverse",1046);T(680,496,Zo,kst),u.Qj=function(){return!0},u.zh=function(e,n){return X2(this,e,a(n,51))};var _Ye=A(hr,"EObjectWithInverseResolvingEList",680);T(33,680,Zo,pn),u.Oj=function(){return!0};var yYe=A(hr,"EObjectWithInverseResolvingEList/ManyInverse",33);T(681,572,Zo,Lst),u.Qj=function(){return!0},u.zh=function(e,n){return X2(this,e,a(n,51))};var xYe=A(hr,"EObjectWithInverseResolvingEList/Unsettable",681);T(1045,681,Zo,MTt),u.Oj=function(){return!0};var MYe=A(hr,"EObjectWithInverseResolvingEList/Unsettable/ManyInverse",1045);T(1027,565,Zo),u.rh=function(){return(this.b&1792)==0},u.th=function(){this.b|=1},u.Nj=function(){return(this.b&4)!=0},u.qi=function(){return(this.b&40)!=0},u.Oj=function(){return(this.b&16)!=0},u.Pj=function(){return(this.b&8)!=0},u.Qj=function(){return(this.b&mw)!=0},u.Dj=function(){return(this.b&32)!=0},u.Rj=function(){return(this.b&oh)!=0},u.Li=function(e){return this.d?ukt(this.d,e):this.nj().jj().Li(e)},u.ui=function(){return this.b&2?(this.b&1)!=0:this.i!=0},u.xh=function(){return(this.b&128)!=0},u.ij=function(){var e;Dr(this),this.b&2&&(Xl(this.e)?(e=(this.b&1)!=0,this.b&=-2,Wn(this,new Jl(this.e,2,xr(this.e.mg(),this.nj()),e,!1))):this.b&=-2)},u.Bh=function(){return(this.b&1536)==0},u.b=0;var EYe=A(hr,"EcoreEList/Generic",1027);T(1028,1027,Zo,H4t),u.nj=function(){return this.a};var SYe=A(hr,"EcoreEList/Dynamic",1028);T(678,55,Nf,mT),u.Fh=function(e){return jL(this.a.a,e)};var TYe=A(hr,"EcoreEMap/1",678);T(677,88,Zo,_ot),u.sh=function(e,n){m7(this.b,a(n,134))},u.uh=function(e,n){VPt(this.b)},u.vh=function(e,n){Tq(this.b,a(n,134))},u.wh=function(e,n,i){Tq(this.b,a(i,134)),zt(i)===zt(n)&&a(i,134).jh(oee(a(n,134).kc())),m7(this.b,a(n,134))};var CYe=A(hr,"EcoreEMap/DelegateEObjectContainmentEList",677);T(1042,143,Kpt,QLt);var AYe=A(hr,"EcoreEMap/Unsettable",1042);T(1043,677,Zo,ETt),u.th=function(){this.a=!0},u.ui=function(){return this.a},u.ij=function(){var e;Dr(this),Xl(this.e)?(e=this.a,this.a=!1,Bi(this.e,new Jl(this.e,2,this.c,e,!1))):this.a=!1},u.a=!1;var kYe=A(hr,"EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList",1043);T(682,1,Cs,lkt),u.gc=function(e){ks(this,e)},u.hc=function(){return zIt(this)},u.ic=function(){var e;return zIt(this),e=this.b,this.b=null,e},u.jc=function(){this.a.jc()};var LYe=A(hr,"EcoreUtil/ProperContentIterator",682);T(1496,1495,{},Tj);var rXt,PYe=A(hr,"EcoreValidator",1496),sXt,IYe=Sr(hr,"FeatureMapUtil/Validator");T(1095,1,{1632:1},qz),u.Bk=function(e){return!0};var RYe=A(hr,"FeatureMapUtil/1",1095);T(692,1,{1632:1},Zht),u.Bk=function(e){var n;return this.c==e?!0:(n=de(zi(this.a,e)),n==null?uve(this,e)?(t5t(this.a,e,(me(),TE)),!0):(t5t(this.a,e,(me(),$m)),!1):n==(me(),TE))},u.e=!1;var dtt,DYe=A(hr,"FeatureMapUtil/BasicValidator",692);T(693,44,sx,Hrt);var NYe=A(hr,"FeatureMapUtil/BasicValidator/Cache",693);T(455,41,{20:1,25:1,41:1,13:1,15:1,52:1,81:1,64:1},X5),u.bd=function(e,n){XDt(this.c,this.b,e,n)},u.nc=function(e){return Ove(this.c,this.b,e)},u.oc=function(e){return VT(this,e)},u.xj=function(e,n){return yht(this.c,this.b,e,n)},u.Dh=function(e){return X7(this.c,this.b,e,!1)},u.oh=function(){return WEt(this.c,this.b)},u.ph=function(){return Qte(this.c,this.b)},u.qh=function(e){return Lae(this.c,this.b,e)},u.yj=function(e,n){return rTt(this,e,n)},u.Pb=function(){St(this)},u.pc=function(e){return _V(this.c,this.b,e)},u.qc=function(e){return dle(this.c,this.b,e)},u.cd=function(e){return X7(this.c,this.b,e,!0)},u.hj=function(e){return this},u.dd=function(e){return zae(this.c,this.b,e)},u.Wb=function(){return tD(this)},u.ui=function(){return!cP(this.c,this.b)},u.tc=function(){return Vue(this.c,this.b)},u.ed=function(){return que(this.c,this.b)},u.fd=function(e){return vfe(this.c,this.b,e)},u.gd=function(e){return X8t(this.c,this.b,e)},u.vc=function(e){return Tve(this.c,this.b,e)},u.hd=function(e,n){return t7t(this.c,this.b,e,n)},u.Gc=function(e){k7(this.c,this.b),VT(this,a(e,15))},u._b=function(){return Ghe(this.c,this.b)},u.yc=function(){return nae(this.c,this.b)},u.zc=function(e){return jae(this.c,this.b,e)},u.Ib=function(){var e,n;for(n=new Sp,n.a+="[",e=WEt(this.c,this.b);dq(e);)mo(n,$T(p7(e))),dq(e)&&(n.a+=Rc);return n.a+="]",n.a},u.ij=function(){k7(this.c,this.b)};var OYe=A(hr,"FeatureMapUtil/FeatureEList",455);T(575,32,c6,aV),u.Mh=function(e){return NC(this,e)},u.Rh=function(e){var n,i,r,c,l,f,g;switch(this.d){case 1:case 2:{if(l=e.Oh(),zt(l)===zt(this.c)&&NC(this,null)==e.Mh(null))return this.g=e.Nh(),e.Lh()==1&&(this.d=1),!0;break}case 3:{switch(c=e.Lh(),c){case 3:{if(l=e.Oh(),zt(l)===zt(this.c)&&NC(this,null)==e.Mh(null))return this.d=5,n=new i_(2),ni(n,this.g),ni(n,e.Nh()),this.g=n,!0;break}}break}case 5:{switch(c=e.Lh(),c){case 3:{if(l=e.Oh(),zt(l)===zt(this.c)&&NC(this,null)==e.Mh(null))return i=a(this.g,13),i.nc(e.Nh()),!0;break}}break}case 4:{switch(c=e.Lh(),c){case 3:{if(l=e.Oh(),zt(l)===zt(this.c)&&NC(this,null)==e.Mh(null))return this.d=1,this.g=e.Nh(),!0;break}case 4:{if(l=e.Oh(),zt(l)===zt(this.c)&&NC(this,null)==e.Mh(null))return this.d=6,g=new i_(2),ni(g,this.n),ni(g,e.Ph()),this.n=g,f=Y(Z(Gn,1),pi,22,15,[this.o,e.Qh()]),this.g=f,!0;break}}break}case 6:{switch(c=e.Lh(),c){case 4:{if(l=e.Oh(),zt(l)===zt(this.c)&&NC(this,null)==e.Mh(null))return i=a(this.n,13),i.nc(e.Ph()),f=a(this.g,37),r=dt(Gn,pi,22,f.length+1,15,1),Aa(f,0,r,0,f.length),r[f.length]=e.Qh(),this.g=r,!0;break}}break}}return!1};var BYe=A(hr,"FeatureMapUtil/FeatureENotificationImpl",575);T(501,455,{20:1,25:1,41:1,13:1,15:1,52:1,81:1,184:1,237:1,1630:1,64:1},ND),u.pk=function(e,n,i){return yht(this.c,e,n,i)},u.qk=function(e,n,i){return Bht(this.c,e,n,i)},u.rk=function(){return this},u.sk=function(e,n){return NP(this.c,e,n)},u.tk=function(e){return a(X7(this.c,this.b,e,!1),75).nj()},u.uk=function(e){return a(X7(this.c,this.b,e,!1),75).lc()},u.vk=function(){return this.a},u.wk=function(e){return!cP(this.c,e)},u.xk=function(e,n){eZ(this.c,e,n)},u.yk=function(e){return aPt(this.c,e)};var FYe=A(hr,"FeatureMapUtil/FeatureFeatureMap",501);T(1094,1,{81:1},xEt),u.hj=function(e){return X7(this.b,this.a,-1,e)},u.ui=function(){return!cP(this.b,this.a)},u.Gc=function(e){eZ(this.b,this.a,e)},u.ij=function(){k7(this.b,this.a)};var UYe=A(hr,"FeatureMapUtil/FeatureValue",1094),jx,ptt,gtt,Hx,oXt,xI=Sr($O,"AnyType");T(603,54,rp,qG);var zYe=A($O,"InvalidDatatypeValueException",603),tU=Sr($O,ZUt),MI=Sr($O,YUt),g_t=Sr($O,KUt),cXt,_c,m_t,jw,aXt,uXt,lXt,hXt,fXt,dXt,pXt,gXt,mXt,bXt,wXt,qE,vXt,XE,EI,_Xt,wy,eU,nU,yXt,SI,TI;T(735,463,{95:1,91:1,87:1,51:1,42:1,92:1,746:1},Eit),u.ug=function(e,n,i){switch(e){case 0:return i?(!this.c&&(this.c=new _s(this,0)),this.c):(!this.c&&(this.c=new _s(this,0)),this.c.b);case 1:return i?(!this.c&&(this.c=new _s(this,0)),a(Za(this.c,(fr(),jw)),184)):(!this.c&&(this.c=new _s(this,0)),a(a(Za(this.c,(fr(),jw)),184),237)).vk();case 2:return i?(!this.b&&(this.b=new _s(this,2)),this.b):(!this.b&&(this.b=new _s(this,2)),this.b.b)}return Xu(this,e-ei(this.Rg()),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():this.Rg(),e),n,i)},u.Dg=function(e,n,i){var r;switch(n){case 0:return!this.c&&(this.c=new _s(this,0)),IP(this.c,e,i);case 1:return(!this.c&&(this.c=new _s(this,0)),a(a(Za(this.c,(fr(),jw)),184),64)).yj(e,i);case 2:return!this.b&&(this.b=new _s(this,2)),IP(this.b,e,i)}return r=a(Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():this.Rg(),n),61),r.aj().ej(this,Zct(this),n-ei(this.Rg()),e,i)},u.Fg=function(e){switch(e){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new _s(this,0)),a(Za(this.c,(fr(),jw)),184)).Wb();case 2:return!!this.b&&this.b.i!=0}return Vu(this,e-ei(this.Rg()),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():this.Rg(),e))},u.Mg=function(e,n){switch(e){case 0:!this.c&&(this.c=new _s(this,0)),mL(this.c,n);return;case 1:(!this.c&&(this.c=new _s(this,0)),a(a(Za(this.c,(fr(),jw)),184),237)).Gc(n);return;case 2:!this.b&&(this.b=new _s(this,2)),mL(this.b,n);return}Ku(this,e-ei(this.Rg()),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():this.Rg(),e),n)},u.Rg=function(){return fr(),m_t},u.Ib=function(){var e;return this.j&4?nh(this):(e=new ul(nh(this)),e.a+=" (mixed: ",IT(e,this.c),e.a+=", anyAttribute: ",IT(e,this.b),e.a+=")",e.a)};var jYe=A(Xr,"AnyTypeImpl",735);T(604,463,{95:1,91:1,87:1,51:1,42:1,92:1,1707:1,604:1},Xz),u.ug=function(e,n,i){switch(e){case 0:return this.a;case 1:return this.b}return Xu(this,e-ei((fr(),qE)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():qE,e),n,i)},u.Fg=function(e){switch(e){case 0:return this.a!=null;case 1:return this.b!=null}return Vu(this,e-ei((fr(),qE)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():qE,e))},u.Mg=function(e,n){switch(e){case 0:nit(this,hi(n));return;case 1:rit(this,hi(n));return}Ku(this,e-ei((fr(),qE)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():qE,e),n)},u.Rg=function(){return fr(),qE},u.Ib=function(){var e;return this.j&4?nh(this):(e=new ul(nh(this)),e.a+=" (data: ",mo(e,this.a),e.a+=", target: ",mo(e,this.b),e.a+=")",e.a)},u.a=null,u.b=null;var HYe=A(Xr,"ProcessingInstructionImpl",604);T(605,735,{95:1,91:1,87:1,51:1,42:1,92:1,746:1,1708:1,605:1},Axt),u.ug=function(e,n,i){switch(e){case 0:return i?(!this.c&&(this.c=new _s(this,0)),this.c):(!this.c&&(this.c=new _s(this,0)),this.c.b);case 1:return i?(!this.c&&(this.c=new _s(this,0)),a(Za(this.c,(fr(),jw)),184)):(!this.c&&(this.c=new _s(this,0)),a(a(Za(this.c,(fr(),jw)),184),237)).vk();case 2:return i?(!this.b&&(this.b=new _s(this,2)),this.b):(!this.b&&(this.b=new _s(this,2)),this.b.b);case 3:return!this.c&&(this.c=new _s(this,0)),hi(NP(this.c,(fr(),EI),!0));case 4:return Pst(this.a,(!this.c&&(this.c=new _s(this,0)),hi(NP(this.c,(fr(),EI),!0))));case 5:return this.a}return Xu(this,e-ei((fr(),XE)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():XE,e),n,i)},u.Fg=function(e){switch(e){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new _s(this,0)),a(Za(this.c,(fr(),jw)),184)).Wb();case 2:return!!this.b&&this.b.i!=0;case 3:return!this.c&&(this.c=new _s(this,0)),hi(NP(this.c,(fr(),EI),!0))!=null;case 4:return Pst(this.a,(!this.c&&(this.c=new _s(this,0)),hi(NP(this.c,(fr(),EI),!0))))!=null;case 5:return!!this.a}return Vu(this,e-ei((fr(),XE)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():XE,e))},u.Mg=function(e,n){switch(e){case 0:!this.c&&(this.c=new _s(this,0)),mL(this.c,n);return;case 1:(!this.c&&(this.c=new _s(this,0)),a(a(Za(this.c,(fr(),jw)),184),237)).Gc(n);return;case 2:!this.b&&(this.b=new _s(this,2)),mL(this.b,n);return;case 3:ZAt(this,hi(n));return;case 4:ZAt(this,TTt(this.a,n));return;case 5:iit(this,a(n,140));return}Ku(this,e-ei((fr(),XE)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():XE,e),n)},u.Rg=function(){return fr(),XE};var GYe=A(Xr,"SimpleAnyTypeImpl",605);T(606,463,{95:1,91:1,87:1,51:1,42:1,92:1,1709:1,606:1},Cxt),u.ug=function(e,n,i){switch(e){case 0:return i?(!this.a&&(this.a=new _s(this,0)),this.a):(!this.a&&(this.a=new _s(this,0)),this.a.b);case 1:return i?(!this.b&&(this.b=new lu((ye(),Ho),Dc,this,1)),this.b):(!this.b&&(this.b=new lu((ye(),Ho),Dc,this,1)),AL(this.b));case 2:return i?(!this.c&&(this.c=new lu((ye(),Ho),Dc,this,2)),this.c):(!this.c&&(this.c=new lu((ye(),Ho),Dc,this,2)),AL(this.c));case 3:return!this.a&&(this.a=new _s(this,0)),Za(this.a,(fr(),eU));case 4:return!this.a&&(this.a=new _s(this,0)),Za(this.a,(fr(),nU));case 5:return!this.a&&(this.a=new _s(this,0)),Za(this.a,(fr(),SI));case 6:return!this.a&&(this.a=new _s(this,0)),Za(this.a,(fr(),TI))}return Xu(this,e-ei((fr(),wy)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():wy,e),n,i)},u.Dg=function(e,n,i){var r;switch(n){case 0:return!this.a&&(this.a=new _s(this,0)),IP(this.a,e,i);case 1:return!this.b&&(this.b=new lu((ye(),Ho),Dc,this,1)),SD(this.b,e,i);case 2:return!this.c&&(this.c=new lu((ye(),Ho),Dc,this,2)),SD(this.c,e,i);case 5:return!this.a&&(this.a=new _s(this,0)),rTt(Za(this.a,(fr(),SI)),e,i)}return r=a(Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():(fr(),wy),n),61),r.aj().ej(this,Zct(this),n-ei((fr(),wy)),e,i)},u.Fg=function(e){switch(e){case 0:return!!this.a&&this.a.i!=0;case 1:return!!this.b&&this.b.f!=0;case 2:return!!this.c&&this.c.f!=0;case 3:return!this.a&&(this.a=new _s(this,0)),!tD(Za(this.a,(fr(),eU)));case 4:return!this.a&&(this.a=new _s(this,0)),!tD(Za(this.a,(fr(),nU)));case 5:return!this.a&&(this.a=new _s(this,0)),!tD(Za(this.a,(fr(),SI)));case 6:return!this.a&&(this.a=new _s(this,0)),!tD(Za(this.a,(fr(),TI)))}return Vu(this,e-ei((fr(),wy)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():wy,e))},u.Mg=function(e,n){switch(e){case 0:!this.a&&(this.a=new _s(this,0)),mL(this.a,n);return;case 1:!this.b&&(this.b=new lu((ye(),Ho),Dc,this,1)),zN(this.b,n);return;case 2:!this.c&&(this.c=new lu((ye(),Ho),Dc,this,2)),zN(this.c,n);return;case 3:!this.a&&(this.a=new _s(this,0)),St(Za(this.a,(fr(),eU))),!this.a&&(this.a=new _s(this,0)),VT(Za(this.a,eU),a(n,13));return;case 4:!this.a&&(this.a=new _s(this,0)),St(Za(this.a,(fr(),nU))),!this.a&&(this.a=new _s(this,0)),VT(Za(this.a,nU),a(n,13));return;case 5:!this.a&&(this.a=new _s(this,0)),St(Za(this.a,(fr(),SI))),!this.a&&(this.a=new _s(this,0)),VT(Za(this.a,SI),a(n,13));return;case 6:!this.a&&(this.a=new _s(this,0)),St(Za(this.a,(fr(),TI))),!this.a&&(this.a=new _s(this,0)),VT(Za(this.a,TI),a(n,13));return}Ku(this,e-ei((fr(),wy)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():wy,e),n)},u.Rg=function(){return fr(),wy},u.Ib=function(){var e;return this.j&4?nh(this):(e=new ul(nh(this)),e.a+=" (mixed: ",IT(e,this.a),e.a+=")",e.a)};var WYe=A(Xr,"XMLTypeDocumentRootImpl",606);T(1626,638,{95:1,91:1,87:1,430:1,139:1,51:1,103:1,42:1,92:1,142:1,107:1,108:1,1710:1},KS),u.Zg=function(e,n){switch(e.Ni()){case 7:case 8:case 9:case 10:case 16:case 22:case 23:case 24:case 25:case 26:case 32:case 33:case 34:case 36:case 37:case 44:case 45:case 50:case 51:case 53:case 55:case 56:case 57:case 58:case 60:case 61:case 4:return n==null?null:Yc(n);case 19:case 28:case 29:case 35:case 38:case 39:case 41:case 46:case 52:case 54:case 5:return hi(n);case 6:return ine(a(n,173));case 12:case 47:case 49:case 11:return B7t(this,e,n);case 13:return n==null?null:D_e(a(n,216));case 15:case 14:return n==null?null:use(lt(Yt(n)));case 17:return l8t((fr(),n));case 18:return l8t(n);case 21:case 20:return n==null?null:lse(a(n,126).a);case 27:return rne(a(n,173));case 30:return RRt((fr(),a(n,15)));case 31:return RRt(a(n,15));case 40:return qee((fr(),n));case 42:return h8t((fr(),n));case 43:return h8t(n);case 59:case 48:return Vee((fr(),n));default:throw K(new yn(_E+e.be()+Gm))}},u.$g=function(e){var n,i,r,c,l;switch(e.G==-1&&(e.G=(i=Zu(e),i?Hp(i.bh(),e):-1)),e.G){case 0:return n=new Eit,n;case 1:return r=new Xz,r;case 2:return c=new Axt,c;case 3:return l=new Cxt,l;default:throw K(new yn(XY+e.zb+Gm))}},u._g=function(e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt;switch(e.Ni()){case 5:case 52:case 4:return n;case 6:return vde(n);case 8:case 7:return n==null?null:r1e(n);case 9:return n==null?null:PL(ku((r=Hc(n,!0),r.length>0&&r.charCodeAt(0)==43?r.substr(1,r.length-1):r),-128,127)<<24>>24);case 10:return n==null?null:PL(ku((c=Hc(n,!0),c.length>0&&c.charCodeAt(0)==43?c.substr(1,c.length-1):c),-128,127)<<24>>24);case 11:return hi(Bm(this,(fr(),lXt),n));case 12:return hi(Bm(this,(fr(),hXt),n));case 13:return n==null?null:new Lit(Hc(n,!0));case 15:case 14:return Lme(n);case 16:return hi(Bm(this,(fr(),fXt),n));case 17:return qIt((fr(),n));case 18:return qIt(n);case 28:case 29:case 35:case 38:case 39:case 41:case 54:case 19:return Hc(n,!0);case 21:case 20:return jme(n);case 22:return hi(Bm(this,(fr(),dXt),n));case 23:return hi(Bm(this,(fr(),pXt),n));case 24:return hi(Bm(this,(fr(),gXt),n));case 25:return hi(Bm(this,(fr(),mXt),n));case 26:return hi(Bm(this,(fr(),bXt),n));case 27:return ide(n);case 30:return XIt((fr(),n));case 31:return XIt(n);case 32:return n==null?null:Xt(ku((M=Hc(n,!0),M.length>0&&M.charCodeAt(0)==43?M.substr(1,M.length-1):M),Vs,qi));case 33:return n==null?null:new y1((k=Hc(n,!0),k.length>0&&k.charCodeAt(0)==43?k.substr(1,k.length-1):k));case 34:return n==null?null:Xt(ku((R=Hc(n,!0),R.length>0&&R.charCodeAt(0)==43?R.substr(1,R.length-1):R),Vs,qi));case 36:return n==null?null:Qg(J7((O=Hc(n,!0),O.length>0&&O.charCodeAt(0)==43?O.substr(1,O.length-1):O)));case 37:return n==null?null:Qg(J7(($=Hc(n,!0),$.length>0&&$.charCodeAt(0)==43?$.substr(1,$.length-1):$)));case 40:return nfe((fr(),n));case 42:return ZIt((fr(),n));case 43:return ZIt(n);case 44:return n==null?null:new y1((W=Hc(n,!0),W.length>0&&W.charCodeAt(0)==43?W.substr(1,W.length-1):W));case 45:return n==null?null:new y1((nt=Hc(n,!0),nt.length>0&&nt.charCodeAt(0)==43?nt.substr(1,nt.length-1):nt));case 46:return Hc(n,!1);case 47:return hi(Bm(this,(fr(),wXt),n));case 59:case 48:return efe((fr(),n));case 49:return hi(Bm(this,(fr(),vXt),n));case 50:return n==null?null:HM(ku((rt=Hc(n,!0),rt.length>0&&rt.charCodeAt(0)==43?rt.substr(1,rt.length-1):rt),jO,32767)<<16>>16);case 51:return n==null?null:HM(ku((l=Hc(n,!0),l.length>0&&l.charCodeAt(0)==43?l.substr(1,l.length-1):l),jO,32767)<<16>>16);case 53:return hi(Bm(this,(fr(),_Xt),n));case 55:return n==null?null:HM(ku((f=Hc(n,!0),f.length>0&&f.charCodeAt(0)==43?f.substr(1,f.length-1):f),jO,32767)<<16>>16);case 56:return n==null?null:HM(ku((g=Hc(n,!0),g.length>0&&g.charCodeAt(0)==43?g.substr(1,g.length-1):g),jO,32767)<<16>>16);case 57:return n==null?null:Qg(J7((b=Hc(n,!0),b.length>0&&b.charCodeAt(0)==43?b.substr(1,b.length-1):b)));case 58:return n==null?null:Qg(J7((v=Hc(n,!0),v.length>0&&v.charCodeAt(0)==43?v.substr(1,v.length-1):v)));case 60:return n==null?null:Xt(ku((i=Hc(n,!0),i.length>0&&i.charCodeAt(0)==43?i.substr(1,i.length-1):i),Vs,qi));case 61:return n==null?null:Xt(ku(Hc(n,!0),Vs,qi));default:throw K(new yn(_E+e.be()+Gm))}};var xXt,b_t,MXt,w_t,$Ye=A(Xr,"XMLTypeFactoryImpl",1626);T(530,248,{95:1,91:1,87:1,139:1,174:1,51:1,207:1,103:1,42:1,92:1,142:1,248:1,107:1,108:1,613:1,1639:1,530:1},b4t),u.N=!1,u.O=!1;var EXt=!1,VYe=A(Xr,"XMLTypePackageImpl",530);T(1569,1,{743:1},Jy),u.mj=function(){return Aht(),RXt};var qYe=A(Xr,"XMLTypePackageImpl/1",1569);T(1578,1,wi,n8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var XYe=A(Xr,"XMLTypePackageImpl/10",1578);T(1579,1,wi,i8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var ZYe=A(Xr,"XMLTypePackageImpl/11",1579);T(1580,1,wi,Zz),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var YYe=A(Xr,"XMLTypePackageImpl/12",1580);T(1581,1,wi,r8),u.Li=function(e){return Gb(e)},u.Mi=function(e){return dt(To,wt,315,e,7,1)};var KYe=A(Xr,"XMLTypePackageImpl/13",1581);T(1582,1,wi,Qy),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var JYe=A(Xr,"XMLTypePackageImpl/14",1582);T(1583,1,wi,z3),u.Li=function(e){return ct(e,15)},u.Mi=function(e){return dt(Sl,fw,15,e,0,1)};var QYe=A(Xr,"XMLTypePackageImpl/15",1583);T(1584,1,wi,Yz),u.Li=function(e){return ct(e,15)},u.Mi=function(e){return dt(Sl,fw,15,e,0,1)};var tKe=A(Xr,"XMLTypePackageImpl/16",1584);T(1585,1,wi,s8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var eKe=A(Xr,"XMLTypePackageImpl/17",1585);T(1586,1,wi,o8),u.Li=function(e){return ct(e,126)},u.Mi=function(e){return dt(CE,wt,126,e,0,1)};var nKe=A(Xr,"XMLTypePackageImpl/18",1586);T(1587,1,wi,JS),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var iKe=A(Xr,"XMLTypePackageImpl/19",1587);T(1570,1,wi,c8),u.Li=function(e){return ct(e,746)},u.Mi=function(e){return dt(xI,te,746,e,0,1)};var rKe=A(Xr,"XMLTypePackageImpl/2",1570);T(1588,1,wi,QS),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var sKe=A(Xr,"XMLTypePackageImpl/20",1588);T(1589,1,wi,Qk),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var oKe=A(Xr,"XMLTypePackageImpl/21",1589);T(1590,1,wi,tT),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var cKe=A(Xr,"XMLTypePackageImpl/22",1590);T(1591,1,wi,Kz),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var aKe=A(Xr,"XMLTypePackageImpl/23",1591);T(1592,1,wi,a8),u.Li=function(e){return ct(e,173)},u.Mi=function(e){return dt(Da,wt,173,e,0,2)};var uKe=A(Xr,"XMLTypePackageImpl/24",1592);T(1593,1,wi,eT),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var lKe=A(Xr,"XMLTypePackageImpl/25",1593);T(1594,1,wi,u8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var hKe=A(Xr,"XMLTypePackageImpl/26",1594);T(1595,1,wi,t5),u.Li=function(e){return ct(e,15)},u.Mi=function(e){return dt(Sl,fw,15,e,0,1)};var fKe=A(Xr,"XMLTypePackageImpl/27",1595);T(1596,1,wi,Jz),u.Li=function(e){return ct(e,15)},u.Mi=function(e){return dt(Sl,fw,15,e,0,1)};var dKe=A(Xr,"XMLTypePackageImpl/28",1596);T(1597,1,wi,l8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var pKe=A(Xr,"XMLTypePackageImpl/29",1597);T(1571,1,wi,Q0),u.Li=function(e){return ct(e,604)},u.Mi=function(e){return dt(tU,te,1707,e,0,1)};var gKe=A(Xr,"XMLTypePackageImpl/3",1571);T(1598,1,wi,h8),u.Li=function(e){return ct(e,21)},u.Mi=function(e){return dt(Io,wt,21,e,0,1)};var mKe=A(Xr,"XMLTypePackageImpl/30",1598);T(1599,1,wi,f8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var bKe=A(Xr,"XMLTypePackageImpl/31",1599);T(1600,1,wi,Qz),u.Li=function(e){return ct(e,149)},u.Mi=function(e){return dt(Vm,wt,149,e,0,1)};var wKe=A(Xr,"XMLTypePackageImpl/32",1600);T(1601,1,wi,d8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var vKe=A(Xr,"XMLTypePackageImpl/33",1601);T(1602,1,wi,tj),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var _Ke=A(Xr,"XMLTypePackageImpl/34",1602);T(1603,1,wi,ej),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var yKe=A(Xr,"XMLTypePackageImpl/35",1603);T(1604,1,wi,tm),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var xKe=A(Xr,"XMLTypePackageImpl/36",1604);T(1605,1,wi,e5),u.Li=function(e){return ct(e,15)},u.Mi=function(e){return dt(Sl,fw,15,e,0,1)};var MKe=A(Xr,"XMLTypePackageImpl/37",1605);T(1606,1,wi,n5),u.Li=function(e){return ct(e,15)},u.Mi=function(e){return dt(Sl,fw,15,e,0,1)};var EKe=A(Xr,"XMLTypePackageImpl/38",1606);T(1607,1,wi,i5),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var SKe=A(Xr,"XMLTypePackageImpl/39",1607);T(1572,1,wi,nT),u.Li=function(e){return ct(e,605)},u.Mi=function(e){return dt(MI,te,1708,e,0,1)};var TKe=A(Xr,"XMLTypePackageImpl/4",1572);T(1608,1,wi,t2),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var CKe=A(Xr,"XMLTypePackageImpl/40",1608);T(1609,1,wi,cs),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var AKe=A(Xr,"XMLTypePackageImpl/41",1609);T(1610,1,wi,iT),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var kKe=A(Xr,"XMLTypePackageImpl/42",1610);T(1611,1,wi,r5),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var LKe=A(Xr,"XMLTypePackageImpl/43",1611);T(1612,1,wi,Ev),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var PKe=A(Xr,"XMLTypePackageImpl/44",1612);T(1613,1,wi,nj),u.Li=function(e){return ct(e,168)},u.Mi=function(e){return dt(qm,wt,168,e,0,1)};var IKe=A(Xr,"XMLTypePackageImpl/45",1613);T(1614,1,wi,s5),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var RKe=A(Xr,"XMLTypePackageImpl/46",1614);T(1615,1,wi,p8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var DKe=A(Xr,"XMLTypePackageImpl/47",1615);T(1616,1,wi,zh),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var NKe=A(Xr,"XMLTypePackageImpl/48",1616);T(1617,1,wi,ij),u.Li=function(e){return ct(e,168)},u.Mi=function(e){return dt(qm,wt,168,e,0,1)};var OKe=A(Xr,"XMLTypePackageImpl/49",1617);T(1573,1,wi,rj),u.Li=function(e){return ct(e,606)},u.Mi=function(e){return dt(g_t,te,1709,e,0,1)};var BKe=A(Xr,"XMLTypePackageImpl/5",1573);T(1618,1,wi,g8),u.Li=function(e){return ct(e,149)},u.Mi=function(e){return dt(Vm,wt,149,e,0,1)};var FKe=A(Xr,"XMLTypePackageImpl/50",1618);T(1619,1,wi,sj),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var UKe=A(Xr,"XMLTypePackageImpl/51",1619);T(1620,1,wi,m8),u.Li=function(e){return ct(e,21)},u.Mi=function(e){return dt(Io,wt,21,e,0,1)};var zKe=A(Xr,"XMLTypePackageImpl/52",1620);T(1574,1,wi,oj),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var jKe=A(Xr,"XMLTypePackageImpl/6",1574);T(1575,1,wi,cj),u.Li=function(e){return ct(e,173)},u.Mi=function(e){return dt(Da,wt,173,e,0,2)};var HKe=A(Xr,"XMLTypePackageImpl/7",1575);T(1576,1,wi,aj),u.Li=function(e){return Hb(e)},u.Mi=function(e){return dt(ho,wt,434,e,8,1)};var GKe=A(Xr,"XMLTypePackageImpl/8",1576);T(1577,1,wi,em),u.Li=function(e){return ct(e,192)},u.Mi=function(e){return dt(px,wt,192,e,0,1)};var WKe=A(Xr,"XMLTypePackageImpl/9",1577),af,t1,IA,iU,et;T(40,54,rp,ri);var $Ke=A(qp,"RegEx/ParseException",40);T(730,1,{},jh),u.Ck=function(e){return ei*16)throw K(new ri(ai((Kn(),aUt))));i=i*16+c}while(!0);if(this.a!=125)throw K(new ri(ai((Kn(),uUt))));if(i>EE)throw K(new ri(ai((Kn(),lUt))));e=i}else{if(c=0,this.c!=0||(c=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(i=c,Ci(this),this.c!=0||(c=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));i=i*16+c,e=i}break;case 117:if(r=0,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));n=n*16+r,e=n;break;case 118:if(Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,n>EE)throw K(new ri(ai((Kn(),"parser.descappe.4"))));e=n;break;case 65:case 90:case 122:throw K(new ri(ai((Kn(),hUt))))}return e},u.Ek=function(e){var n;switch(e){case 100:n=(this.e&32)==32?Z1("Nd",!0):(Ai(),rU);break;case 68:n=(this.e&32)==32?Z1("Nd",!1):(Ai(),E_t);break;case 119:n=(this.e&32)==32?Z1("IsWord",!0):(Ai(),KE);break;case 87:n=(this.e&32)==32?Z1("IsWord",!1):(Ai(),T_t);break;case 115:n=(this.e&32)==32?Z1("IsSpace",!0):(Ai(),Gx);break;case 83:n=(this.e&32)==32?Z1("IsSpace",!1):(Ai(),S_t);break;default:throw K(new sc(hzt+e.toString(16)))}return n},u.Fk=function(e){var n,i,r,c,l,f,g,b,v,M,k,R;for(this.b=1,Ci(this),n=null,this.c==0&&this.a==94?(Ci(this),e?M=(Ai(),Ai(),++Ar,new Su(5)):(n=(Ai(),Ai(),++Ar,new Su(4)),jc(n,0,EE),M=(++Ar,new Su(4)))):M=(Ai(),Ai(),++Ar,new Su(4)),c=!0;(R=this.c)!=1&&!(R==0&&this.a==93&&!c);){if(c=!1,i=this.a,r=!1,R==10)switch(i){case 100:case 68:case 119:case 87:case 115:case 83:uw(M,this.Ek(i)),r=!0;break;case 105:case 73:case 99:case 67:i=this.Vk(M,i),i<0&&(r=!0);break;case 112:case 80:if(k=Plt(this,i),!k)throw K(new ri(ai((Kn(),oK))));uw(M,k),r=!0;break;default:i=this.Dk()}else if(R==20){if(f=hM(this.i,58,this.d),f<0)throw K(new ri(ai((Kn(),$pt))));if(g=!0,bo(this.i,this.d)==94&&(++this.d,g=!1),l=$h(this.i,this.d,f),b=U5t(l,g,(this.e&512)==512),!b)throw K(new ri(ai((Kn(),iUt))));if(uw(M,b),r=!0,f+1>=this.j||bo(this.i,f+1)!=93)throw K(new ri(ai((Kn(),$pt))));this.d=f+2}if(Ci(this),!r)if(this.c!=0||this.a!=45)jc(M,i,i);else{if(Ci(this),(R=this.c)==1)throw K(new ri(ai((Kn(),RO))));R==0&&this.a==93?(jc(M,i,i),jc(M,45,45)):(v=this.a,R==10&&(v=this.Dk()),Ci(this),jc(M,i,v))}(this.e&oh)==oh&&this.c==0&&this.a==44&&Ci(this)}if(this.c==1)throw K(new ri(ai((Kn(),RO))));return n&&(f4(n,M),M=n),E_(M),h4(M),this.b=0,Ci(this),M},u.Gk=function(){var e,n,i,r;for(i=this.Fk(!1);(r=this.c)!=7;)if(e=this.a,r==0&&(e==45||e==38)||r==4){if(Ci(this),this.c!=9)throw K(new ri(ai((Kn(),sUt))));if(n=this.Fk(!1),r==4)uw(i,n);else if(e==45)f4(i,n);else if(e==38)R7t(i,n);else throw K(new sc("ASSERT"))}else throw K(new ri(ai((Kn(),oUt))));return Ci(this),i},u.Hk=function(){var e,n;return e=this.a-48,n=(Ai(),Ai(),++Ar,new K$(12,null,e)),!this.g&&(this.g=new nd),Cn(this.g,new g9(e)),Ci(this),n},u.Ik=function(){return Ci(this),Ai(),CXt},u.Jk=function(){return Ci(this),Ai(),TXt},u.Kk=function(){throw K(new ri(ai((Kn(),el))))},u.Lk=function(){throw K(new ri(ai((Kn(),el))))},u.Mk=function(){return Ci(this),Kle()},u.Nk=function(){return Ci(this),Ai(),kXt},u.Ok=function(){return Ci(this),Ai(),PXt},u.Pk=function(){var e;if(this.d>=this.j||((e=bo(this.i,this.d++))&65504)!=64)throw K(new ri(ai((Kn(),tUt))));return Ci(this),Ai(),Ai(),++Ar,new ud(0,e-64)},u.Qk=function(){return Ci(this),w_e()},u.Rk=function(){return Ci(this),Ai(),IXt},u.Sk=function(){var e;return e=(Ai(),Ai(),++Ar,new ud(0,105)),Ci(this),e},u.Tk=function(){return Ci(this),Ai(),LXt},u.Uk=function(){return Ci(this),Ai(),AXt},u.Vk=function(e,n){return this.Dk()},u.Wk=function(){return Ci(this),Ai(),x_t},u.Xk=function(){var e,n,i,r,c;if(this.d+1>=this.j)throw K(new ri(ai((Kn(),KFt))));if(r=-1,n=null,e=bo(this.i,this.d),49<=e&&e<=57){if(r=e-48,!this.g&&(this.g=new nd),Cn(this.g,new g9(r)),++this.d,bo(this.i,this.d)!=41)throw K(new ri(ai((Kn(),g0))));++this.d}else switch(e==63&&--this.d,Ci(this),n=Kht(this),n.e){case 20:case 21:case 22:case 23:break;case 8:if(this.c!=7)throw K(new ri(ai((Kn(),g0))));break;default:throw K(new ri(ai((Kn(),JFt))))}if(Ci(this),c=Lm(this),i=null,c.e==2){if(c.ol()!=2)throw K(new ri(ai((Kn(),QFt))));i=c.kl(1),c=c.kl(0)}if(this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),Ai(),Ai(),++Ar,new fLt(r,n,c,i)},u.Yk=function(){return Ci(this),Ai(),M_t},u.Zk=function(){var e;if(Ci(this),e=ZD(24,Lm(this)),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u.$k=function(){var e;if(Ci(this),e=ZD(20,Lm(this)),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u._k=function(){var e;if(Ci(this),e=ZD(22,Lm(this)),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u.al=function(){var e,n,i,r,c;for(e=0,i=0,n=-1;this.d=this.j)throw K(new ri(ai((Kn(),Gpt))));if(n==45){for(++this.d;this.d=this.j)throw K(new ri(ai((Kn(),Gpt))))}if(n==58){if(++this.d,Ci(this),r=t4t(Lm(this),e,i),this.c!=7)throw K(new ri(ai((Kn(),g0))));Ci(this)}else if(n==41)++this.d,Ci(this),r=t4t(Lm(this),e,i);else throw K(new ri(ai((Kn(),YFt))));return r},u.bl=function(){var e;if(Ci(this),e=ZD(21,Lm(this)),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u.cl=function(){var e;if(Ci(this),e=ZD(23,Lm(this)),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u.dl=function(){var e,n;if(Ci(this),e=this.f++,n=E$(Lm(this),e),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),n},u.el=function(){var e;if(Ci(this),e=E$(Lm(this),0),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u.fl=function(e){return Ci(this),this.c==5?(Ci(this),jD(e,(Ai(),Ai(),++Ar,new Yb(9,e)))):jD(e,(Ai(),Ai(),++Ar,new Yb(3,e)))},u.gl=function(e){var n;return Ci(this),n=(Ai(),Ai(),++Ar,new WT(2)),this.c==5?(Ci(this),s0(n,DA),s0(n,e)):(s0(n,e),s0(n,DA)),n},u.hl=function(e){return Ci(this),this.c==5?(Ci(this),Ai(),Ai(),++Ar,new Yb(9,e)):(Ai(),Ai(),++Ar,new Yb(3,e))},u.a=0,u.b=0,u.c=0,u.d=0,u.e=0,u.f=1,u.g=null,u.j=0;var VKe=A(qp,"RegEx/RegexParser",730);T(1564,730,{},Ixt),u.Ck=function(e){return!1},u.Dk=function(){return hht(this)},u.Ek=function(e){return rE(e)},u.Fk=function(e){return mOt(this)},u.Gk=function(){throw K(new ri(ai((Kn(),el))))},u.Hk=function(){throw K(new ri(ai((Kn(),el))))},u.Ik=function(){throw K(new ri(ai((Kn(),el))))},u.Jk=function(){throw K(new ri(ai((Kn(),el))))},u.Kk=function(){return Ci(this),rE(67)},u.Lk=function(){return Ci(this),rE(73)},u.Mk=function(){throw K(new ri(ai((Kn(),el))))},u.Nk=function(){throw K(new ri(ai((Kn(),el))))},u.Ok=function(){throw K(new ri(ai((Kn(),el))))},u.Pk=function(){return Ci(this),rE(99)},u.Qk=function(){throw K(new ri(ai((Kn(),el))))},u.Rk=function(){throw K(new ri(ai((Kn(),el))))},u.Sk=function(){return Ci(this),rE(105)},u.Tk=function(){throw K(new ri(ai((Kn(),el))))},u.Uk=function(){throw K(new ri(ai((Kn(),el))))},u.Vk=function(e,n){return uw(e,rE(n)),-1},u.Wk=function(){return Ci(this),Ai(),Ai(),++Ar,new ud(0,94)},u.Xk=function(){throw K(new ri(ai((Kn(),el))))},u.Yk=function(){return Ci(this),Ai(),Ai(),++Ar,new ud(0,36)},u.Zk=function(){throw K(new ri(ai((Kn(),el))))},u.$k=function(){throw K(new ri(ai((Kn(),el))))},u._k=function(){throw K(new ri(ai((Kn(),el))))},u.al=function(){throw K(new ri(ai((Kn(),el))))},u.bl=function(){throw K(new ri(ai((Kn(),el))))},u.cl=function(){throw K(new ri(ai((Kn(),el))))},u.dl=function(){var e;if(Ci(this),e=E$(Lm(this),0),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u.el=function(){throw K(new ri(ai((Kn(),el))))},u.fl=function(e){return Ci(this),jD(e,(Ai(),Ai(),++Ar,new Yb(3,e)))},u.gl=function(e){var n;return Ci(this),n=(Ai(),Ai(),++Ar,new WT(2)),s0(n,e),s0(n,DA),n},u.hl=function(e){return Ci(this),Ai(),Ai(),++Ar,new Yb(3,e)};var vy=null,ZE=null,qKe=A(qp,"RegEx/ParserForXMLSchema",1564);T(112,1,SE,Ba),u.il=function(e){throw K(new sc("Not supported."))},u.jl=function(){return-1},u.kl=function(e){return null},u.ll=function(){return null},u.ml=function(e){},u.nl=function(e){},u.ol=function(){return 0},u.Ib=function(){return this.pl(0)},u.pl=function(e){return this.e==11?".":""},u.e=0;var v_t,YE,RA,SXt,__t,Hw=null,rU,mtt=null,y_t,DA,btt=null,x_t,M_t,E_t,S_t,T_t,TXt,Gx,CXt,AXt,kXt,LXt,KE,PXt,IXt,Ar=0,iMe=A(qp,"RegEx/Token",112);T(130,112,{3:1,130:1,112:1},Su),u.pl=function(e){var n,i,r;if(this.e==4)if(this==y_t)i=".";else if(this==rU)i="\\d";else if(this==KE)i="\\w";else if(this==Gx)i="\\s";else{for(r=new Sp,r.a+="[",n=0;n0&&(r.a+=","),this.b[n]===this.b[n+1]?mo(r,DP(this.b[n])):(mo(r,DP(this.b[n])),r.a+="-",mo(r,DP(this.b[n+1])));r.a+="]",i=r.a}else if(this==E_t)i="\\D";else if(this==T_t)i="\\W";else if(this==S_t)i="\\S";else{for(r=new Sp,r.a+="[^",n=0;n0&&(r.a+=","),this.b[n]===this.b[n+1]?mo(r,DP(this.b[n])):(mo(r,DP(this.b[n])),r.a+="-",mo(r,DP(this.b[n+1])));r.a+="]",i=r.a}return i},u.a=!1,u.c=!1;var XKe=A(qp,"RegEx/RangeToken",130);T(528,1,{528:1},g9),u.a=0;var ZKe=A(qp,"RegEx/RegexParser/ReferencePosition",528);T(527,1,{3:1,527:1},iMt),u.Fb=function(e){var n;return e==null||!ct(e,527)?!1:(n=a(e,527),le(this.b,n.b)&&this.a==n.a)},u.Hb=function(){return j1(this.b+"/"+oht(this.a))},u.Ib=function(){return this.c.pl(this.a)},u.a=0;var YKe=A(qp,"RegEx/RegularExpression",527);T(195,112,SE,ud),u.jl=function(){return this.a},u.pl=function(e){var n,i;switch(this.e){case 0:switch(this.a){case 124:case 42:case 43:case 63:case 40:case 41:case 46:case 91:case 123:case 92:i="\\"+r$(this.a&qr);break;case 12:i="\\f";break;case 10:i="\\n";break;case 13:i="\\r";break;case 9:i="\\t";break;case 27:i="\\e";break;default:this.a>=ao?(n="0"+(this.a>>>0).toString(16),i="\\v"+$h(n,n.length-6,n.length)):i=""+r$(this.a&qr)}break;case 8:this==x_t||this==M_t?i=""+r$(this.a&qr):i="\\"+r$(this.a&qr);break;default:i=null}return i},u.a=0;var KKe=A(qp,"RegEx/Token/CharToken",195);T(283,112,SE,Yb),u.kl=function(e){return this.a},u.ml=function(e){this.b=e},u.nl=function(e){this.c=e},u.ol=function(){return 1},u.pl=function(e){var n;if(this.e==3)if(this.c<0&&this.b<0)n=this.a.pl(e)+"*";else if(this.c==this.b)n=this.a.pl(e)+"{"+this.c+"}";else if(this.c>=0&&this.b>=0)n=this.a.pl(e)+"{"+this.c+","+this.b+"}";else if(this.c>=0&&this.b<0)n=this.a.pl(e)+"{"+this.c+",}";else throw K(new sc("Token#toString(): CLOSURE "+this.c+Rc+this.b));else if(this.c<0&&this.b<0)n=this.a.pl(e)+"*?";else if(this.c==this.b)n=this.a.pl(e)+"{"+this.c+"}?";else if(this.c>=0&&this.b>=0)n=this.a.pl(e)+"{"+this.c+","+this.b+"}?";else if(this.c>=0&&this.b<0)n=this.a.pl(e)+"{"+this.c+",}?";else throw K(new sc("Token#toString(): NONGREEDYCLOSURE "+this.c+Rc+this.b));return n},u.b=0,u.c=0;var JKe=A(qp,"RegEx/Token/ClosureToken",283);T(731,112,SE,Tot),u.kl=function(e){return e==0?this.a:this.b},u.ol=function(){return 2},u.pl=function(e){var n;return this.b.e==3&&this.b.kl(0)==this.a?n=this.a.pl(e)+"+":this.b.e==9&&this.b.kl(0)==this.a?n=this.a.pl(e)+"+?":n=this.a.pl(e)+(""+this.b.pl(e)),n};var QKe=A(qp,"RegEx/Token/ConcatToken",731);T(1562,112,SE,fLt),u.kl=function(e){if(e==0)return this.d;if(e==1)return this.b;throw K(new sc("Internal Error: "+e))},u.ol=function(){return this.b?2:1},u.pl=function(e){var n;return this.c>0?n="(?("+this.c+")":this.a.e==8?n="(?("+this.a+")":n="(?"+this.a,this.b?n+=this.d+"|"+this.b+")":n+=this.d+")",n},u.c=0;var tJe=A(qp,"RegEx/Token/ConditionToken",1562);T(1563,112,SE,PAt),u.kl=function(e){return this.b},u.ol=function(){return 1},u.pl=function(e){return"(?"+(this.a==0?"":oht(this.a))+(this.c==0?"":oht(this.c))+":"+this.b.pl(e)+")"},u.a=0,u.c=0;var eJe=A(qp,"RegEx/Token/ModifierToken",1563);T(732,112,SE,Dot),u.kl=function(e){return this.a},u.ol=function(){return 1},u.pl=function(e){var n;switch(n=null,this.e){case 6:this.b==0?n="(?:"+this.a.pl(e)+")":n="("+this.a.pl(e)+")";break;case 20:n="(?="+this.a.pl(e)+")";break;case 21:n="(?!"+this.a.pl(e)+")";break;case 22:n="(?<="+this.a.pl(e)+")";break;case 23:n="(?"+this.a.pl(e)+")"}return n},u.b=0;var nJe=A(qp,"RegEx/Token/ParenToken",732);T(474,112,{3:1,112:1,474:1},K$),u.ll=function(){return this.b},u.pl=function(e){return this.e==12?"\\"+this.a:E0e(this.b)},u.a=0;var iJe=A(qp,"RegEx/Token/StringToken",474);T(427,112,SE,WT),u.il=function(e){s0(this,e)},u.kl=function(e){return a(bm(this.a,e),112)},u.ol=function(){return this.a?this.a.a.c.length:0},u.pl=function(e){var n,i,r,c,l;if(this.e==1){if(this.a.a.c.length==2)n=a(bm(this.a,0),112),i=a(bm(this.a,1),112),i.e==3&&i.kl(0)==n?c=n.pl(e)+"+":i.e==9&&i.kl(0)==n?c=n.pl(e)+"+?":c=n.pl(e)+(""+i.pl(e));else{for(l=new Sp,r=0;r=this.c.b:this.a<=this.c.b},u.Cc=function(){return this.b>0},u.Dc=function(){return this.b},u.Fc=function(){return this.b-1},u.jc=function(){throw K(new Tp(vzt))},u.a=0,u.b=0;var uJe=A(l1t,"ExclusiveRange/RangeIterator",230),nl=_M(NO,"C"),Gn=_M(I4,"I"),Ol=_M(aE,"Z"),k0=_M(R4,"J"),Da=_M(k4,"B"),Os=_M(L4,"D"),Gw=_M(P4,"F"),_y=_M(D4,"S"),rMe=Sr("org.eclipse.elk.core.labels","ILabelManager"),C_t=Sr(qs,"DiagnosticChain"),A_t=Sr(VUt,"ResourceSet"),k_t=A(qs,"InvocationTargetException",null),DXt=(T9(),rae),NXt=NXt=d1e;Pue(sit),tle("permProps",[[[XO,ZO],[YO,"gecko1_8"]],[[XO,ZO],[YO,"ie10"]],[[XO,ZO],[YO,"ie8"]],[[XO,ZO],[YO,"ie9"]],[[XO,ZO],[YO,"safari"]]]),NXt(null,"elk",null)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],3:[function(p,m,_){"use strict";function E(P,U){if(!(P instanceof U))throw new TypeError("Cannot call a class as a function")}function y(P,U){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:P}function I(P,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);P.prototype=Object.create(U&&U.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(P,U):P.__proto__=U)}var N=p("./elk-api.js").default,B=function(P){I(U,P);function U(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};E(this,U);var V=Object.assign({},j),tt=!1;try{p.resolve("webworker-threads"),tt=!0}catch{}if(j.workerUrl)if(tt){var Q=p("webworker-threads"),X=Q.Worker;V.workerFactory=function(xt){return new X(xt)}}else console.warn(`Web worker requested but 'webworker-threads' package not installed. Consider installing the package or pass your own 'workerFactory' to ELK's constructor. -... Falling back to non-web worker version. `);if(!q.workerFactory){var gt=g("./elk-worker.min.js"),ft=gt.Worker;q.workerFactory=function(xt){return new ft(xt)}}return y(this,(U.__proto__||Object.getPrototypeOf(U)).call(this,q))}return U}(N);Object.defineProperty(m.exports,"__esModule",{value:!0}),m.exports=B,B.default=B},{"./elk-api.js":1,"./elk-worker.min.js":2,"webworker-threads":8}],4:[function(g,m,_){(function(S,y){var R=g("fs"),N=g("path"),B=N.join,P=N.dirname,U=R.accessSync&&function(nt){try{R.accessSync(nt)}catch{return!1}return!0}||R.existsSync||N.existsSync,W={arrow:S.env.NODE_BINDINGS_ARROW||" \u2192 ",compiled:S.env.NODE_BINDINGS_COMPILED_DIR||"compiled",platform:S.platform,arch:S.arch,version:S.versions.node,bindings:"bindings.node",try:[["module_root","build","bindings"],["module_root","build","Debug","bindings"],["module_root","build","Release","bindings"],["module_root","out","Debug","bindings"],["module_root","Debug","bindings"],["module_root","out","Release","bindings"],["module_root","Release","bindings"],["module_root","build","default","bindings"],["module_root","compiled","version","platform","arch","bindings"]]};function q(nt){typeof nt=="string"?nt={bindings:nt}:nt||(nt={}),Object.keys(W).map(function(Ot){Ot in nt||(nt[Ot]=W[Ot])}),nt.module_root||(nt.module_root=_.getRoot(_.getFileName())),N.extname(nt.bindings)!=".node"&&(nt.bindings+=".node");for(var Q=[],X=0,gt=nt.try.length,ft,xt,Bt;X=0;nt--){var Q=U[nt];Q==="."?U.splice(nt,1):Q===".."?(U.splice(nt,1),q++):q&&(U.splice(nt,1),q--)}if(W)for(;q--;q)U.unshift("..");return U}var R=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,N=function(U){return R.exec(U).slice(1)};_.resolve=function(){for(var U="",W=!1,q=arguments.length-1;q>=-1&&!W;q--){var nt=q>=0?arguments[q]:S.cwd();if(typeof nt!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!nt)continue;U=nt+"/"+U,W=nt.charAt(0)==="/"}return U=y(B(U.split("/"),function(Q){return!!Q}),!W).join("/"),(W?"/":"")+U||"."},_.normalize=function(U){var W=_.isAbsolute(U),q=P(U,-1)==="/";return U=y(B(U.split("/"),function(nt){return!!nt}),!W).join("/"),!U&&!W&&(U="."),U&&q&&(U+="/"),(W?"/":"")+U},_.isAbsolute=function(U){return U.charAt(0)==="/"},_.join=function(){var U=Array.prototype.slice.call(arguments,0);return _.normalize(B(U,function(W,q){if(typeof W!="string")throw new TypeError("Arguments to path.join must be strings");return W}).join("/"))},_.relative=function(U,W){U=_.resolve(U).substr(1),W=_.resolve(W).substr(1);function q(Bt){for(var Ot=0;Ot=0&&Bt[Pt]==="";Pt--);return Ot>Pt?[]:Bt.slice(Ot,Pt-Ot+1)}for(var nt=q(U.split("/")),Q=q(W.split("/")),X=Math.min(nt.length,Q.length),gt=X,ft=0;ft1)for(var Pt=1;Pt{(function(d){d.parser=function(it,ut){return new h(it,ut)},d.SAXParser=h,d.SAXStream=B,d.createStream=R,d.MAX_BUFFER_LENGTH=64*1024;var s=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];d.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function h(it,ut){if(!(this instanceof h))return new h(it,ut);var kt=this;m(kt),kt.q=kt.c="",kt.bufferCheckPosition=d.MAX_BUFFER_LENGTH,kt.encoding=null,kt.opt=ut||{},kt.opt.lowercase=kt.opt.lowercase||kt.opt.lowercasetags,kt.looseCase=kt.opt.lowercase?"toLowerCase":"toUpperCase",kt.opt.maxEntityCount=kt.opt.maxEntityCount||512,kt.opt.maxEntityDepth=kt.opt.maxEntityDepth||4,kt.entityCount=kt.entityDepth=0,kt.tags=[],kt.closed=kt.closedRoot=kt.sawRoot=!1,kt.tag=kt.error=null,kt.strict=!!it,kt.noscript=!!(it||kt.opt.noscript),kt.state=ot.BEGIN,kt.strictEntities=kt.opt.strictEntities,kt.ENTITIES=kt.strictEntities?Object.create(d.XML_ENTITIES):Object.create(d.ENTITIES),kt.attribList=[],kt.opt.xmlns&&(kt.ns=Object.create(nt)),kt.opt.unquotedAttributeValues===void 0&&(kt.opt.unquotedAttributeValues=!it),kt.trackPosition=kt.opt.position!==!1,kt.trackPosition&&(kt.position=kt.line=kt.column=0),be(kt,"onready")}Object.create||(Object.create=function(it){function ut(){}ut.prototype=it;var kt=new ut;return kt}),Object.keys||(Object.keys=function(it){var ut=[];for(var kt in it)it.hasOwnProperty(kt)&&ut.push(kt);return ut});function g(it){for(var ut=Math.max(d.MAX_BUFFER_LENGTH,10),kt=0,Nt=0,ie=s.length;Ntut)switch(s[Nt]){case"textNode":hn(it);break;case"cdata":re(it,"oncdata",it.cdata),it.cdata="";break;case"script":re(it,"onscript",it.script),it.script="";break;default:ke(it,"Max buffer length exceeded: "+s[Nt])}kt=Math.max(kt,rn)}var Pn=d.MAX_BUFFER_LENGTH-kt;it.bufferCheckPosition=Pn+it.position}function m(it){for(var ut=0,kt=s.length;ut=2){if(it[0]===255&&it[1]===254)return"utf-16le";if(it[0]===254&&it[1]===255)return"utf-16be"}return it.length>=3&&it[0]===239&&it[1]===187&&it[2]===191?"utf8":it.length>=4?it[0]===60&&it[1]===0&&it[2]===63&&it[3]===0?"utf-16le":it[0]===0&&it[1]===60&&it[2]===0&&it[3]===63?"utf-16be":"utf8":ut?"utf8":null}function B(it,ut){if(!(this instanceof B))return new B(it,ut);S.apply(this),this._parser=new h(it,ut),this.writable=!0,this.readable=!0;var kt=this;this._parser.onend=function(){kt.emit("end")},this._parser.onerror=function(Nt){kt.emit("error",Nt),kt._parser.error=null},this._decoder=null,this._decoderBuffer=null,y.forEach(function(Nt){Object.defineProperty(kt,"on"+Nt,{get:function(){return kt._parser["on"+Nt]},set:function(ie){if(!ie)return kt.removeAllListeners(Nt),kt._parser["on"+Nt]=ie,ie;kt.on(Nt,ie)},enumerable:!0,configurable:!1})})}B.prototype=Object.create(S.prototype,{constructor:{value:B}}),B.prototype._decodeBuffer=function(it,ut){if(this._decoderBuffer&&(it=Buffer.concat([this._decoderBuffer,it]),this._decoderBuffer=null),!this._decoder){var kt=N(it,ut);if(!kt)return this._decoderBuffer=it,"";this._parser.encoding=kt,this._decoder=new TextDecoder(kt)}return this._decoder.decode(it,{stream:!ut})},B.prototype.write=function(it){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(it))it=this._decodeBuffer(it,!1);else if(this._decoderBuffer){var ut=this._decodeBuffer(Buffer.alloc(0),!0);ut&&(this._parser.write(ut),this.emit("data",ut))}return this._parser.write(it.toString()),this.emit("data",it),!0},B.prototype.end=function(it){if(it&&it.length&&this.write(it),this._decoderBuffer){var ut=this._decodeBuffer(Buffer.alloc(0),!0);ut&&(this._parser.write(ut),this.emit("data",ut))}else if(this._decoder){var kt=this._decoder.decode();kt&&(this._parser.write(kt),this.emit("data",kt))}return this._parser.end(),!0},B.prototype.on=function(it,ut){var kt=this;return!kt._parser["on"+it]&&y.indexOf(it)!==-1&&(kt._parser["on"+it]=function(){var Nt=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Nt.splice(0,0,it),kt.emit.apply(kt,Nt)}),S.prototype.on.call(kt,it,ut)};var P=/^\[CDATA\[$/i,U=/^DOCTYPE$/i,W="http://www.w3.org/XML/1998/namespace",q="http://www.w3.org/2000/xmlns/",nt={xml:W,xmlns:q},Q=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,X=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,gt=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,ft=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function xt(it){return it===" "||it===` +... Falling back to non-web worker version. `);if(!V.workerFactory){var gt=p("./elk-worker.min.js"),ft=gt.Worker;V.workerFactory=function(xt){return new ft(xt)}}return y(this,(U.__proto__||Object.getPrototypeOf(U)).call(this,V))}return U}(N);Object.defineProperty(m.exports,"__esModule",{value:!0}),m.exports=B,B.default=B},{"./elk-api.js":1,"./elk-worker.min.js":2,"webworker-threads":8}],4:[function(p,m,_){(function(E,y){var I=p("fs"),N=p("path"),B=N.join,P=N.dirname,U=I.accessSync&&function(tt){try{I.accessSync(tt)}catch{return!1}return!0}||I.existsSync||N.existsSync,j={arrow:E.env.NODE_BINDINGS_ARROW||" \u2192 ",compiled:E.env.NODE_BINDINGS_COMPILED_DIR||"compiled",platform:E.platform,arch:E.arch,version:E.versions.node,bindings:"bindings.node",try:[["module_root","build","bindings"],["module_root","build","Debug","bindings"],["module_root","build","Release","bindings"],["module_root","out","Debug","bindings"],["module_root","Debug","bindings"],["module_root","out","Release","bindings"],["module_root","Release","bindings"],["module_root","build","default","bindings"],["module_root","compiled","version","platform","arch","bindings"]]};function V(tt){typeof tt=="string"?tt={bindings:tt}:tt||(tt={}),Object.keys(j).map(function(Ot){Ot in tt||(tt[Ot]=j[Ot])}),tt.module_root||(tt.module_root=_.getRoot(_.getFileName())),N.extname(tt.bindings)!=".node"&&(tt.bindings+=".node");for(var Q=[],X=0,gt=tt.try.length,ft,xt,Bt;X=0;tt--){var Q=U[tt];Q==="."?U.splice(tt,1):Q===".."?(U.splice(tt,1),V++):V&&(U.splice(tt,1),V--)}if(j)for(;V--;V)U.unshift("..");return U}var I=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,N=function(U){return I.exec(U).slice(1)};_.resolve=function(){for(var U="",j=!1,V=arguments.length-1;V>=-1&&!j;V--){var tt=V>=0?arguments[V]:E.cwd();if(typeof tt!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!tt)continue;U=tt+"/"+U,j=tt.charAt(0)==="/"}return U=y(B(U.split("/"),function(Q){return!!Q}),!j).join("/"),(j?"/":"")+U||"."},_.normalize=function(U){var j=_.isAbsolute(U),V=P(U,-1)==="/";return U=y(B(U.split("/"),function(tt){return!!tt}),!j).join("/"),!U&&!j&&(U="."),U&&V&&(U+="/"),(j?"/":"")+U},_.isAbsolute=function(U){return U.charAt(0)==="/"},_.join=function(){var U=Array.prototype.slice.call(arguments,0);return _.normalize(B(U,function(j,V){if(typeof j!="string")throw new TypeError("Arguments to path.join must be strings");return j}).join("/"))},_.relative=function(U,j){U=_.resolve(U).substr(1),j=_.resolve(j).substr(1);function V(Bt){for(var Ot=0;Ot=0&&Bt[Pt]==="";Pt--);return Ot>Pt?[]:Bt.slice(Ot,Pt-Ot+1)}for(var tt=V(U.split("/")),Q=V(j.split("/")),X=Math.min(tt.length,Q.length),gt=X,ft=0;ft1)for(var Pt=1;Pt{(function(d){d.parser=function(it,ut){return new h(it,ut)},d.SAXParser=h,d.SAXStream=B,d.createStream=I,d.MAX_BUFFER_LENGTH=64*1024;var s=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];d.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function h(it,ut){if(!(this instanceof h))return new h(it,ut);var kt=this;m(kt),kt.q=kt.c="",kt.bufferCheckPosition=d.MAX_BUFFER_LENGTH,kt.encoding=null,kt.opt=ut||{},kt.opt.lowercase=kt.opt.lowercase||kt.opt.lowercasetags,kt.looseCase=kt.opt.lowercase?"toLowerCase":"toUpperCase",kt.opt.maxEntityCount=kt.opt.maxEntityCount||512,kt.opt.maxEntityDepth=kt.opt.maxEntityDepth||4,kt.entityCount=kt.entityDepth=0,kt.tags=[],kt.closed=kt.closedRoot=kt.sawRoot=!1,kt.tag=kt.error=null,kt.strict=!!it,kt.noscript=!!(it||kt.opt.noscript),kt.state=ot.BEGIN,kt.strictEntities=kt.opt.strictEntities,kt.ENTITIES=kt.strictEntities?Object.create(d.XML_ENTITIES):Object.create(d.ENTITIES),kt.attribList=[],kt.opt.xmlns&&(kt.ns=Object.create(tt)),kt.opt.unquotedAttributeValues===void 0&&(kt.opt.unquotedAttributeValues=!it),kt.trackPosition=kt.opt.position!==!1,kt.trackPosition&&(kt.position=kt.line=kt.column=0),be(kt,"onready")}Object.create||(Object.create=function(it){function ut(){}ut.prototype=it;var kt=new ut;return kt}),Object.keys||(Object.keys=function(it){var ut=[];for(var kt in it)it.hasOwnProperty(kt)&&ut.push(kt);return ut});function p(it){for(var ut=Math.max(d.MAX_BUFFER_LENGTH,10),kt=0,Nt=0,ie=s.length;Ntut)switch(s[Nt]){case"textNode":hn(it);break;case"cdata":re(it,"oncdata",it.cdata),it.cdata="";break;case"script":re(it,"onscript",it.script),it.script="";break;default:ke(it,"Max buffer length exceeded: "+s[Nt])}kt=Math.max(kt,rn)}var Pn=d.MAX_BUFFER_LENGTH-kt;it.bufferCheckPosition=Pn+it.position}function m(it){for(var ut=0,kt=s.length;ut=2){if(it[0]===255&&it[1]===254)return"utf-16le";if(it[0]===254&&it[1]===255)return"utf-16be"}return it.length>=3&&it[0]===239&&it[1]===187&&it[2]===191?"utf8":it.length>=4?it[0]===60&&it[1]===0&&it[2]===63&&it[3]===0?"utf-16le":it[0]===0&&it[1]===60&&it[2]===0&&it[3]===63?"utf-16be":"utf8":ut?"utf8":null}function B(it,ut){if(!(this instanceof B))return new B(it,ut);E.apply(this),this._parser=new h(it,ut),this.writable=!0,this.readable=!0;var kt=this;this._parser.onend=function(){kt.emit("end")},this._parser.onerror=function(Nt){kt.emit("error",Nt),kt._parser.error=null},this._decoder=null,this._decoderBuffer=null,y.forEach(function(Nt){Object.defineProperty(kt,"on"+Nt,{get:function(){return kt._parser["on"+Nt]},set:function(ie){if(!ie)return kt.removeAllListeners(Nt),kt._parser["on"+Nt]=ie,ie;kt.on(Nt,ie)},enumerable:!0,configurable:!1})})}B.prototype=Object.create(E.prototype,{constructor:{value:B}}),B.prototype._decodeBuffer=function(it,ut){if(this._decoderBuffer&&(it=Buffer.concat([this._decoderBuffer,it]),this._decoderBuffer=null),!this._decoder){var kt=N(it,ut);if(!kt)return this._decoderBuffer=it,"";this._parser.encoding=kt,this._decoder=new TextDecoder(kt)}return this._decoder.decode(it,{stream:!ut})},B.prototype.write=function(it){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(it))it=this._decodeBuffer(it,!1);else if(this._decoderBuffer){var ut=this._decodeBuffer(Buffer.alloc(0),!0);ut&&(this._parser.write(ut),this.emit("data",ut))}return this._parser.write(it.toString()),this.emit("data",it),!0},B.prototype.end=function(it){if(it&&it.length&&this.write(it),this._decoderBuffer){var ut=this._decodeBuffer(Buffer.alloc(0),!0);ut&&(this._parser.write(ut),this.emit("data",ut))}else if(this._decoder){var kt=this._decoder.decode();kt&&(this._parser.write(kt),this.emit("data",kt))}return this._parser.end(),!0},B.prototype.on=function(it,ut){var kt=this;return!kt._parser["on"+it]&&y.indexOf(it)!==-1&&(kt._parser["on"+it]=function(){var Nt=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Nt.splice(0,0,it),kt.emit.apply(kt,Nt)}),E.prototype.on.call(kt,it,ut)};var P=/^\[CDATA\[$/i,U=/^DOCTYPE$/i,j="http://www.w3.org/XML/1998/namespace",V="http://www.w3.org/2000/xmlns/",tt={xml:j,xmlns:V},Q=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,X=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,gt=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,ft=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function xt(it){return it===" "||it===` `||it==="\r"||it===" "}function Bt(it){return it==='"'||it==="'"}function Ot(it){return it===">"||xt(it)}function Pt(it,ut){return it.test(ut)}function se(it,ut){return!Pt(it,ut)}var ot=0;d.STATE={BEGIN:ot++,BEGIN_WHITESPACE:ot++,TEXT:ot++,TEXT_ENTITY:ot++,OPEN_WAKA:ot++,SGML_DECL:ot++,SGML_DECL_QUOTED:ot++,DOCTYPE:ot++,DOCTYPE_QUOTED:ot++,DOCTYPE_DTD:ot++,DOCTYPE_DTD_QUOTED:ot++,COMMENT_STARTING:ot++,COMMENT:ot++,COMMENT_ENDING:ot++,COMMENT_ENDED:ot++,CDATA:ot++,CDATA_ENDING:ot++,CDATA_ENDING_2:ot++,PROC_INST:ot++,PROC_INST_BODY:ot++,PROC_INST_ENDING:ot++,OPEN_TAG:ot++,OPEN_TAG_SLASH:ot++,ATTRIB:ot++,ATTRIB_NAME:ot++,ATTRIB_NAME_SAW_WHITE:ot++,ATTRIB_VALUE:ot++,ATTRIB_VALUE_QUOTED:ot++,ATTRIB_VALUE_CLOSED:ot++,ATTRIB_VALUE_UNQUOTED:ot++,ATTRIB_VALUE_ENTITY_Q:ot++,ATTRIB_VALUE_ENTITY_U:ot++,CLOSE_TAG:ot++,CLOSE_TAG_SAW_WHITE:ot++,SCRIPT:ot++,SCRIPT_ENDING:ot++},d.XML_ENTITIES=Object.assign(Object.create(null),{amp:"&",gt:">",lt:"<",quot:'"',apos:"'"}),d.ENTITIES=Object.assign(Object.create(null),{amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830}),Object.keys(d.ENTITIES).forEach(function(it){var ut=d.ENTITIES[it],kt=typeof ut=="number"?String.fromCharCode(ut):ut;d.ENTITIES[it]=kt});for(var Lt in d.STATE)d.STATE[d.STATE[Lt]]=Lt;ot=d.STATE;function be(it,ut,kt){it[ut]&&it[ut](kt)}function ln(it){var ut=it&&it.match(/(?:^|\s)encoding\s*=\s*(['"])([^'"]+)\1/i);return ut?ut[2]:null}function Fn(it){return it?it.toLowerCase().replace(/[^a-z0-9]/g,""):null}function ne(it,ut){let kt=Fn(it),Nt=Fn(ut);return!kt||!Nt?!0:Nt==="utf16"?kt==="utf16le"||kt==="utf16be":kt===Nt}function xe(it,ut){if(!(!it.strict||!it.encoding||!ut||ut.name!=="xml")){var kt=ln(ut.body);kt&&!ne(it.encoding,kt)&&en(it,"XML declaration encoding "+kt+" does not match detected stream encoding "+it.encoding.toUpperCase())}}function re(it,ut,kt){it.textNode&&hn(it),be(it,ut,kt)}function hn(it){it.textNode=Se(it.opt,it.textNode),it.textNode&&be(it,"ontext",it.textNode),it.textNode=""}function Se(it,ut){return it.trim&&(ut=ut.trim()),it.normalize&&(ut=ut.replace(/\s+/g," ")),ut}function ke(it,ut){return hn(it),it.trackPosition&&(ut+=` Line: `+it.line+` Column: `+it.column+` -Char: `+it.c),ut=new Error(ut),it.error=ut,be(it,"onerror",ut),it}function mn(it){return it.sawRoot&&!it.closedRoot&&en(it,"Unclosed root tag"),it.state!==ot.BEGIN&&it.state!==ot.BEGIN_WHITESPACE&&it.state!==ot.TEXT&&ke(it,"Unexpected end"),hn(it),it.c="",it.closed=!0,be(it,"onend"),h.call(it,it.strict,it.opt),it}function en(it,ut){if(typeof it!="object"||!(it instanceof h))throw new Error("bad call to strictFail");it.strict&&ke(it,ut)}function Qn(it){it.strict||(it.tagName=it.tagName[it.looseCase]());var ut=it.tags[it.tags.length-1]||it,kt=it.tag={name:it.tagName,attributes:{}};it.opt.xmlns&&(kt.ns=ut.ns),it.attribList.length=0,re(it,"onopentagstart",kt)}function ge(it,ut){var kt=it.indexOf(":"),Nt=kt<0?["",it]:it.split(":"),ie=Nt[0],rn=Nt[1];return ut&&it==="xmlns"&&(ie="xmlns",rn=""),{prefix:ie,local:rn}}function Pe(it){if(it.strict||(it.attribName=it.attribName[it.looseCase]()),it.attribList.indexOf(it.attribName)!==-1||it.tag.attributes.hasOwnProperty(it.attribName)){it.attribName=it.attribValue="";return}if(it.opt.xmlns){var ut=ge(it.attribName,!0),kt=ut.prefix,Nt=ut.local;if(kt==="xmlns")if(Nt==="xml"&&it.attribValue!==W)en(it,"xml: prefix must be bound to "+W+` -Actual: `+it.attribValue);else if(Nt==="xmlns"&&it.attribValue!==q)en(it,"xmlns: prefix must be bound to "+q+` +Char: `+it.c),ut=new Error(ut),it.error=ut,be(it,"onerror",ut),it}function mn(it){return it.sawRoot&&!it.closedRoot&&en(it,"Unclosed root tag"),it.state!==ot.BEGIN&&it.state!==ot.BEGIN_WHITESPACE&&it.state!==ot.TEXT&&ke(it,"Unexpected end"),hn(it),it.c="",it.closed=!0,be(it,"onend"),h.call(it,it.strict,it.opt),it}function en(it,ut){if(typeof it!="object"||!(it instanceof h))throw new Error("bad call to strictFail");it.strict&&ke(it,ut)}function Qn(it){it.strict||(it.tagName=it.tagName[it.looseCase]());var ut=it.tags[it.tags.length-1]||it,kt=it.tag={name:it.tagName,attributes:{}};it.opt.xmlns&&(kt.ns=ut.ns),it.attribList.length=0,re(it,"onopentagstart",kt)}function ge(it,ut){var kt=it.indexOf(":"),Nt=kt<0?["",it]:it.split(":"),ie=Nt[0],rn=Nt[1];return ut&&it==="xmlns"&&(ie="xmlns",rn=""),{prefix:ie,local:rn}}function Pe(it){if(it.strict||(it.attribName=it.attribName[it.looseCase]()),it.attribList.indexOf(it.attribName)!==-1||it.tag.attributes.hasOwnProperty(it.attribName)){it.attribName=it.attribValue="";return}if(it.opt.xmlns){var ut=ge(it.attribName,!0),kt=ut.prefix,Nt=ut.local;if(kt==="xmlns")if(Nt==="xml"&&it.attribValue!==j)en(it,"xml: prefix must be bound to "+j+` +Actual: `+it.attribValue);else if(Nt==="xmlns"&&it.attribValue!==V)en(it,"xmlns: prefix must be bound to "+V+` Actual: `+it.attribValue);else{var ie=it.tag,rn=it.tags[it.tags.length-1]||it;ie.ns===rn.ns&&(ie.ns=Object.create(rn.ns)),ie.ns[Nt]=it.attribValue}it.attribList.push([it.attribName,it.attribValue])}else it.tag.attributes[it.attribName]=it.attribValue,re(it,"onattribute",{name:it.attribName,value:it.attribValue});it.attribName=it.attribValue=""}function ti(it,ut){if(it.opt.xmlns){var kt=it.tag,Nt=ge(it.tagName);kt.prefix=Nt.prefix,kt.local=Nt.local,kt.uri=kt.ns[Nt.prefix]||"",kt.prefix&&!kt.uri&&(en(it,"Unbound namespace prefix: "+JSON.stringify(it.tagName)),kt.uri=Nt.prefix);var ie=it.tags[it.tags.length-1]||it;kt.ns&&ie.ns!==kt.ns&&Object.keys(kt.ns).forEach(function(Jt){re(it,"onopennamespace",{prefix:Jt,uri:kt.ns[Jt]})});for(var rn=0,Pn=it.attribList.length;rn",it.tagName="",it.state=ot.SCRIPT;return}re(it,"onscript",it.script),it.script=""}var ut=it.tags.length,kt=it.tagName;it.strict||(kt=kt[it.looseCase]());for(var Nt=kt;ut--;){var ie=it.tags[ut];if(ie.name!==Nt)en(it,"Unexpected close tag");else break}if(ut<0){en(it,"Unmatched closing tag: "+it.tagName),it.textNode+="",it.state=ot.TEXT;return}it.tagName=kt;for(var rn=it.tags.length;rn-- >ut;){var Pn=it.tag=it.tags.pop();it.tagName=it.tag.name,re(it,"onclosetag",it.tagName);var Tt={};for(var yt in Pn.ns)Tt[yt]=Pn.ns[yt];var ue=it.tags[it.tags.length-1]||it;it.opt.xmlns&&Pn.ns!==ue.ns&&Object.keys(Pn.ns).forEach(function(fn){var An=Pn.ns[fn];re(it,"onclosenamespace",{prefix:fn,uri:An})})}ut===0&&(it.closedRoot=!0),it.tagName=it.attribValue=it.attribName="",it.attribList.length=0,it.state=ot.TEXT}function ki(it){var ut=it.entity,kt=ut.toLowerCase(),Nt,ie="";return it.ENTITIES[ut]?it.ENTITIES[ut]:it.ENTITIES[kt]?it.ENTITIES[kt]:(ut=kt,ut.charAt(0)==="#"&&(ut.charAt(1)==="x"?(ut=ut.slice(2),Nt=parseInt(ut,16),ie=Nt.toString(16)):(ut=ut.slice(1),Nt=parseInt(ut,10),ie=Nt.toString(10))),ut=ut.replace(/^0+/,""),isNaN(Nt)||ie.toLowerCase()!==ut||Nt<0||Nt>1114111||!lr(Nt)?(en(it,"Invalid character entity"),"&"+it.entity+";"):String.fromCodePoint(Nt))}function lr(it){return it===9||it===10||it===13||it>=32&&it<=55295||it>=57344&&it<=65533||it>=65536&&it<=1114111}function pr(it,ut){ut==="<"?(it.state=ot.OPEN_WAKA,it.startTagPosition=it.position):xt(ut)||(en(it,"Non-whitespace before first tag."),it.textNode=ut,it.state=ot.TEXT)}function Kt(it,ut){var kt="";return ut"?(re(ut,"onsgmldeclaration",ut.sgmlDecl),ut.sgmlDecl="",ut.state=ot.TEXT):(Bt(Nt)&&(ut.state=ot.SGML_DECL_QUOTED),ut.sgmlDecl+=Nt);continue;case ot.SGML_DECL_QUOTED:Nt===ut.q&&(ut.state=ot.SGML_DECL,ut.q=""),ut.sgmlDecl+=Nt;continue;case ot.DOCTYPE:Nt===">"?(ut.state=ot.TEXT,re(ut,"ondoctype",ut.doctype),ut.doctype=!0):(ut.doctype+=Nt,Nt==="["?ut.state=ot.DOCTYPE_DTD:Bt(Nt)&&(ut.state=ot.DOCTYPE_QUOTED,ut.q=Nt));continue;case ot.DOCTYPE_QUOTED:ut.doctype+=Nt,Nt===ut.q&&(ut.q="",ut.state=ot.DOCTYPE);continue;case ot.DOCTYPE_DTD:Nt==="]"?(ut.doctype+=Nt,ut.state=ot.DOCTYPE):Nt==="<"?(ut.state=ot.OPEN_WAKA,ut.startTagPosition=ut.position):Bt(Nt)?(ut.doctype+=Nt,ut.state=ot.DOCTYPE_DTD_QUOTED,ut.q=Nt):ut.doctype+=Nt;continue;case ot.DOCTYPE_DTD_QUOTED:ut.doctype+=Nt,Nt===ut.q&&(ut.state=ot.DOCTYPE_DTD,ut.q="");continue;case ot.COMMENT:Nt==="-"?ut.state=ot.COMMENT_ENDING:ut.comment+=Nt;continue;case ot.COMMENT_ENDING:Nt==="-"?(ut.state=ot.COMMENT_ENDED,ut.comment=Se(ut.opt,ut.comment),ut.comment&&re(ut,"oncomment",ut.comment),ut.comment=""):(ut.comment+="-"+Nt,ut.state=ot.COMMENT);continue;case ot.COMMENT_ENDED:Nt!==">"?(en(ut,"Malformed comment"),ut.comment+="--"+Nt,ut.state=ot.COMMENT):ut.doctype&&ut.doctype!==!0?ut.state=ot.DOCTYPE_DTD:ut.state=ot.TEXT;continue;case ot.CDATA:for(var rn=kt-1;Nt&&Nt!=="]";)Nt=Kt(it,kt++),Nt&&ut.trackPosition&&(ut.position++,Nt===` -`?(ut.line++,ut.column=0):ut.column++);ut.cdata+=it.substring(rn,kt-1),Nt==="]"&&(ut.state=ot.CDATA_ENDING);continue;case ot.CDATA_ENDING:Nt==="]"?ut.state=ot.CDATA_ENDING_2:(ut.cdata+="]"+Nt,ut.state=ot.CDATA);continue;case ot.CDATA_ENDING_2:Nt===">"?(ut.cdata&&re(ut,"oncdata",ut.cdata),re(ut,"onclosecdata"),ut.cdata="",ut.state=ot.TEXT):Nt==="]"?ut.cdata+="]":(ut.cdata+="]]"+Nt,ut.state=ot.CDATA);continue;case ot.PROC_INST:Nt==="?"?ut.state=ot.PROC_INST_ENDING:xt(Nt)?ut.state=ot.PROC_INST_BODY:ut.procInstName+=Nt;continue;case ot.PROC_INST_BODY:if(!ut.procInstBody&&xt(Nt))continue;Nt==="?"?ut.state=ot.PROC_INST_ENDING:ut.procInstBody+=Nt;continue;case ot.PROC_INST_ENDING:if(Nt===">"){let ue={name:ut.procInstName,body:ut.procInstBody};xe(ut,ue),re(ut,"onprocessinginstruction",ue),ut.procInstName=ut.procInstBody="",ut.state=ot.TEXT}else ut.procInstBody+="?"+Nt,ut.state=ot.PROC_INST_BODY;continue;case ot.OPEN_TAG:Pt(X,Nt)?ut.tagName+=Nt:(Qn(ut),Nt===">"?ti(ut):Nt==="/"?ut.state=ot.OPEN_TAG_SLASH:(xt(Nt)||en(ut,"Invalid character in tag name"),ut.state=ot.ATTRIB));continue;case ot.OPEN_TAG_SLASH:Nt===">"?(ti(ut,!0),Yi(ut)):(en(ut,"Forward-slash in opening tag not followed by >"),ut.state=ot.ATTRIB);continue;case ot.ATTRIB:if(xt(Nt))continue;Nt===">"?ti(ut):Nt==="/"?ut.state=ot.OPEN_TAG_SLASH:Pt(Q,Nt)?(ut.attribName=Nt,ut.attribValue="",ut.state=ot.ATTRIB_NAME):en(ut,"Invalid attribute name");continue;case ot.ATTRIB_NAME:Nt==="="?ut.state=ot.ATTRIB_VALUE:Nt===">"?(en(ut,"Attribute without value"),ut.attribValue=ut.attribName,Pe(ut),ti(ut)):xt(Nt)?ut.state=ot.ATTRIB_NAME_SAW_WHITE:Pt(X,Nt)?ut.attribName+=Nt:en(ut,"Invalid attribute name");continue;case ot.ATTRIB_NAME_SAW_WHITE:if(Nt==="=")ut.state=ot.ATTRIB_VALUE;else{if(xt(Nt))continue;en(ut,"Attribute without value"),ut.tag.attributes[ut.attribName]="",ut.attribValue="",re(ut,"onattribute",{name:ut.attribName,value:""}),ut.attribName="",Nt===">"?ti(ut):Pt(Q,Nt)?(ut.attribName=Nt,ut.state=ot.ATTRIB_NAME):(en(ut,"Invalid attribute name"),ut.state=ot.ATTRIB)}continue;case ot.ATTRIB_VALUE:if(xt(Nt))continue;Bt(Nt)?(ut.q=Nt,ut.state=ot.ATTRIB_VALUE_QUOTED):(ut.opt.unquotedAttributeValues||ke(ut,"Unquoted attribute value"),ut.state=ot.ATTRIB_VALUE_UNQUOTED,ut.attribValue=Nt);continue;case ot.ATTRIB_VALUE_QUOTED:if(Nt!==ut.q){Nt==="&"?ut.state=ot.ATTRIB_VALUE_ENTITY_Q:ut.attribValue+=Nt;continue}Pe(ut),ut.q="",ut.state=ot.ATTRIB_VALUE_CLOSED;continue;case ot.ATTRIB_VALUE_CLOSED:xt(Nt)?ut.state=ot.ATTRIB:Nt===">"?ti(ut):Nt==="/"?ut.state=ot.OPEN_TAG_SLASH:Pt(Q,Nt)?(en(ut,"No whitespace between attributes"),ut.attribName=Nt,ut.attribValue="",ut.state=ot.ATTRIB_NAME):en(ut,"Invalid attribute name");continue;case ot.ATTRIB_VALUE_UNQUOTED:if(!Ot(Nt)){Nt==="&"?ut.state=ot.ATTRIB_VALUE_ENTITY_U:ut.attribValue+=Nt;continue}Pe(ut),Nt===">"?ti(ut):ut.state=ot.ATTRIB;continue;case ot.CLOSE_TAG:if(ut.tagName)Nt===">"?Yi(ut):Pt(X,Nt)?ut.tagName+=Nt:ut.script?(ut.script+=""?Yi(ut):en(ut,"Invalid characters in closing tag");continue;case ot.TEXT_ENTITY:case ot.ATTRIB_VALUE_ENTITY_Q:case ot.ATTRIB_VALUE_ENTITY_U:var Pn,Tt;switch(ut.state){case ot.TEXT_ENTITY:Pn=ot.TEXT,Tt="textNode";break;case ot.ATTRIB_VALUE_ENTITY_Q:Pn=ot.ATTRIB_VALUE_QUOTED,Tt="attribValue";break;case ot.ATTRIB_VALUE_ENTITY_U:Pn=ot.ATTRIB_VALUE_UNQUOTED,Tt="attribValue";break}if(Nt===";"){var yt=ki(ut);ut.opt.unparsedEntities&&!Object.values(d.XML_ENTITIES).includes(yt)?((ut.entityCount+=1)>ut.opt.maxEntityCount&&ke(ut,"Parsed entity count exceeds max entity count"),(ut.entityDepth+=1)>ut.opt.maxEntityDepth&&ke(ut,"Parsed entity depth exceeds max entity depth"),ut.entity="",ut.state=Pn,ut.write(yt),ut.entityDepth-=1):(ut[Tt]+=yt,ut.entity="",ut.state=Pn)}else Pt(ut.entity.length?ft:gt,Nt)?ut.entity+=Nt:(en(ut,"Invalid character in entity name"),ut[Tt]+="&"+ut.entity+Nt,ut.entity="",ut.state=Pn);continue;default:throw new Error(ut,"Unknown state: "+ut.state)}return ut.position>=ut.bufferCheckPosition&&g(ut),ut}String.fromCodePoint||function(){var it=String.fromCharCode,ut=Math.floor,kt=function(){var Nt=16384,ie=[],rn,Pn,Tt=-1,yt=arguments.length;if(!yt)return"";for(var ue="";++Tt1114111||ut(fn)!==fn)throw RangeError("Invalid code point: "+fn);fn<=65535?ie.push(fn):(fn-=65536,rn=(fn>>10)+55296,Pn=fn%1024+56320,ie.push(rn,Pn)),(Tt+1===yt||ie.length>Nt)&&(ue+=it.apply(null,ie),ie.length=0)}return ue};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:kt,configurable:!0,writable:!0}):String.fromCodePoint=kt}()})(typeof wtt>"u"?wtt.sax={}:wtt)});var NXt=Ld((YKe,DXt)=>{"use strict";var X3e=RXt().parser;function Z3e(d){var s=[],h=[],g=s,m;return m=X3e(!0),m.ontext=function(_){_.trim()!==""&&g.push(_)},m.onopentag=function(_){var S;S=[_.name,_.attributes],h.push(g),g.push(S),g=S},m.onclosetag=function(){g=h.pop()},m.write(d).close(),s[0]}DXt.exports=Z3e});var FXt=Ld((KKe,BXt)=>{"use strict";function Y3e(d){return d&&Object.prototype.toString.call(d)==="[object Object]"}function K3e(d){var s,h=[];return typeof d!="string"?d:(s=d.split(` -`),s.length===1?" "+d:(s.forEach(function(g){if(g.trim()===""){h.push(g);return}h.push(" "+g)}),h.join(` -`)))}function J3e(d){var s=d.split(` -`),h=[];return s.forEach(function(g){g.trim()!==""&&h.push(g)}),h.join(` -`)}function OXt(d){var s,h,g,m;return h="",m=!0,g=d.some(function(_,S,y){if(S===0)return s="<"+_,y.length===1?!0:void 0;if(S===1)if(Y3e(_)){if(Object.keys(_).forEach(function(R){s+=" "+R+'="'+_[R]+'"'}),y.length===2)return!0;s+=">";return}else s+=">";switch(typeof _){case"string":case"number":case"boolean":h+=_+` -`;return}m=!1,h+=OXt(_)}),g?s+`/> -`:m?s+J3e(h)+" +`?(ut.line++,ut.column=0):ut.column++);ut.cdata+=it.substring(rn,kt-1),Nt==="]"&&(ut.state=ot.CDATA_ENDING);continue;case ot.CDATA_ENDING:Nt==="]"?ut.state=ot.CDATA_ENDING_2:(ut.cdata+="]"+Nt,ut.state=ot.CDATA);continue;case ot.CDATA_ENDING_2:Nt===">"?(ut.cdata&&re(ut,"oncdata",ut.cdata),re(ut,"onclosecdata"),ut.cdata="",ut.state=ot.TEXT):Nt==="]"?ut.cdata+="]":(ut.cdata+="]]"+Nt,ut.state=ot.CDATA);continue;case ot.PROC_INST:Nt==="?"?ut.state=ot.PROC_INST_ENDING:xt(Nt)?ut.state=ot.PROC_INST_BODY:ut.procInstName+=Nt;continue;case ot.PROC_INST_BODY:if(!ut.procInstBody&&xt(Nt))continue;Nt==="?"?ut.state=ot.PROC_INST_ENDING:ut.procInstBody+=Nt;continue;case ot.PROC_INST_ENDING:if(Nt===">"){let ue={name:ut.procInstName,body:ut.procInstBody};xe(ut,ue),re(ut,"onprocessinginstruction",ue),ut.procInstName=ut.procInstBody="",ut.state=ot.TEXT}else ut.procInstBody+="?"+Nt,ut.state=ot.PROC_INST_BODY;continue;case ot.OPEN_TAG:Pt(X,Nt)?ut.tagName+=Nt:(Qn(ut),Nt===">"?ti(ut):Nt==="/"?ut.state=ot.OPEN_TAG_SLASH:(xt(Nt)||en(ut,"Invalid character in tag name"),ut.state=ot.ATTRIB));continue;case ot.OPEN_TAG_SLASH:Nt===">"?(ti(ut,!0),Yi(ut)):(en(ut,"Forward-slash in opening tag not followed by >"),ut.state=ot.ATTRIB);continue;case ot.ATTRIB:if(xt(Nt))continue;Nt===">"?ti(ut):Nt==="/"?ut.state=ot.OPEN_TAG_SLASH:Pt(Q,Nt)?(ut.attribName=Nt,ut.attribValue="",ut.state=ot.ATTRIB_NAME):en(ut,"Invalid attribute name");continue;case ot.ATTRIB_NAME:Nt==="="?ut.state=ot.ATTRIB_VALUE:Nt===">"?(en(ut,"Attribute without value"),ut.attribValue=ut.attribName,Pe(ut),ti(ut)):xt(Nt)?ut.state=ot.ATTRIB_NAME_SAW_WHITE:Pt(X,Nt)?ut.attribName+=Nt:en(ut,"Invalid attribute name");continue;case ot.ATTRIB_NAME_SAW_WHITE:if(Nt==="=")ut.state=ot.ATTRIB_VALUE;else{if(xt(Nt))continue;en(ut,"Attribute without value"),ut.tag.attributes[ut.attribName]="",ut.attribValue="",re(ut,"onattribute",{name:ut.attribName,value:""}),ut.attribName="",Nt===">"?ti(ut):Pt(Q,Nt)?(ut.attribName=Nt,ut.state=ot.ATTRIB_NAME):(en(ut,"Invalid attribute name"),ut.state=ot.ATTRIB)}continue;case ot.ATTRIB_VALUE:if(xt(Nt))continue;Bt(Nt)?(ut.q=Nt,ut.state=ot.ATTRIB_VALUE_QUOTED):(ut.opt.unquotedAttributeValues||ke(ut,"Unquoted attribute value"),ut.state=ot.ATTRIB_VALUE_UNQUOTED,ut.attribValue=Nt);continue;case ot.ATTRIB_VALUE_QUOTED:if(Nt!==ut.q){Nt==="&"?ut.state=ot.ATTRIB_VALUE_ENTITY_Q:ut.attribValue+=Nt;continue}Pe(ut),ut.q="",ut.state=ot.ATTRIB_VALUE_CLOSED;continue;case ot.ATTRIB_VALUE_CLOSED:xt(Nt)?ut.state=ot.ATTRIB:Nt===">"?ti(ut):Nt==="/"?ut.state=ot.OPEN_TAG_SLASH:Pt(Q,Nt)?(en(ut,"No whitespace between attributes"),ut.attribName=Nt,ut.attribValue="",ut.state=ot.ATTRIB_NAME):en(ut,"Invalid attribute name");continue;case ot.ATTRIB_VALUE_UNQUOTED:if(!Ot(Nt)){Nt==="&"?ut.state=ot.ATTRIB_VALUE_ENTITY_U:ut.attribValue+=Nt;continue}Pe(ut),Nt===">"?ti(ut):ut.state=ot.ATTRIB;continue;case ot.CLOSE_TAG:if(ut.tagName)Nt===">"?Yi(ut):Pt(X,Nt)?ut.tagName+=Nt:ut.script?(ut.script+=""?Yi(ut):en(ut,"Invalid characters in closing tag");continue;case ot.TEXT_ENTITY:case ot.ATTRIB_VALUE_ENTITY_Q:case ot.ATTRIB_VALUE_ENTITY_U:var Pn,Tt;switch(ut.state){case ot.TEXT_ENTITY:Pn=ot.TEXT,Tt="textNode";break;case ot.ATTRIB_VALUE_ENTITY_Q:Pn=ot.ATTRIB_VALUE_QUOTED,Tt="attribValue";break;case ot.ATTRIB_VALUE_ENTITY_U:Pn=ot.ATTRIB_VALUE_UNQUOTED,Tt="attribValue";break}if(Nt===";"){var yt=ki(ut);ut.opt.unparsedEntities&&!Object.values(d.XML_ENTITIES).includes(yt)?((ut.entityCount+=1)>ut.opt.maxEntityCount&&ke(ut,"Parsed entity count exceeds max entity count"),(ut.entityDepth+=1)>ut.opt.maxEntityDepth&&ke(ut,"Parsed entity depth exceeds max entity depth"),ut.entity="",ut.state=Pn,ut.write(yt),ut.entityDepth-=1):(ut[Tt]+=yt,ut.entity="",ut.state=Pn)}else Pt(ut.entity.length?ft:gt,Nt)?ut.entity+=Nt:(en(ut,"Invalid character in entity name"),ut[Tt]+="&"+ut.entity+Nt,ut.entity="",ut.state=Pn);continue;default:throw new Error(ut,"Unknown state: "+ut.state)}return ut.position>=ut.bufferCheckPosition&&p(ut),ut}String.fromCodePoint||function(){var it=String.fromCharCode,ut=Math.floor,kt=function(){var Nt=16384,ie=[],rn,Pn,Tt=-1,yt=arguments.length;if(!yt)return"";for(var ue="";++Tt1114111||ut(fn)!==fn)throw RangeError("Invalid code point: "+fn);fn<=65535?ie.push(fn):(fn-=65536,rn=(fn>>10)+55296,Pn=fn%1024+56320,ie.push(rn,Pn)),(Tt+1===yt||ie.length>Nt)&&(ue+=it.apply(null,ie),ie.length=0)}return ue};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:kt,configurable:!0,writable:!0}):String.fromCodePoint=kt}()})(typeof xtt>"u"?xtt.sax={}:xtt)});var $Xt=Ld((pJe,WXt)=>{"use strict";var fMe=GXt().parser;function dMe(d){var s=[],h=[],p=s,m;return m=fMe(!0),m.ontext=function(_){_.trim()!==""&&p.push(_)},m.onopentag=function(_){var E;E=[_.name,_.attributes],h.push(p),p.push(E),p=E},m.onclosetag=function(){p=h.pop()},m.write(d).close(),s[0]}WXt.exports=dMe});var XXt=Ld((gJe,qXt)=>{"use strict";function pMe(d){return d&&Object.prototype.toString.call(d)==="[object Object]"}function gMe(d){var s,h=[];return typeof d!="string"?d:(s=d.split(` +`),s.length===1?" "+d:(s.forEach(function(p){if(p.trim()===""){h.push(p);return}h.push(" "+p)}),h.join(` +`)))}function mMe(d){var s=d.split(` +`),h=[];return s.forEach(function(p){p.trim()!==""&&h.push(p)}),h.join(` +`)}function VXt(d){var s,h,p,m;return h="",m=!0,p=d.some(function(_,E,y){if(E===0)return s="<"+_,y.length===1?!0:void 0;if(E===1)if(pMe(_)){if(Object.keys(_).forEach(function(I){s+=" "+I+'="'+_[I]+'"'}),y.length===2)return!0;s+=">";return}else s+=">";switch(typeof _){case"string":case"number":case"boolean":h+=_+` +`;return}m=!1,h+=VXt(_)}),p?s+`/> +`:m?s+mMe(h)+" `:s+` -`+K3e(h)+" -`}BXt.exports=OXt});var zXt=Ld((JKe,UXt)=>{"use strict";function Q3e(d,s){var h=function(){},g=h,m=h;function _(){this._skip=!0}function S(){this._remove=!0}function y(B){this._name=B}function R(B){this._replace=B}function N(B,P){var U,W={attr:{},full:B},q={name:y,skip:_,remove:S,replace:R,_name:void 0,_skip:!1,_remove:!1,_replace:void 0},nt=!0,Q,X,gt;if(B!==void 0&&B!==null&&B!==!0&&B!==!1)switch(U=Object.prototype.toString.call(B),U){case"[object String]":case"[object Number]":return;case"[object Array]":if(B.some(function(ft,xt){if(xt===0)return W.name=ft,!1;if(xt===1)return Object.prototype.toString.call(ft)==="[object Object]"&&(nt=!1,W.attr=ft),!0}),g.call(q,W,P),q._name&&(B[0]=q._name),q._replace)return q._replace;if(q._remove)return null;if(!q._skip){for(Q=0,X=B.length;Q1||Q===1&&nt){if(gt=N(B[Q],W),gt===null){B.splice(Q,1),X-=1;continue}gt&&(B[Q]=gt)}Q+=1}if(m.call(q,W,P),q._name&&(B[0]=q._name),q._replace)return q._replace;if(q._remove)return null}}}s&&(s.enter&&(g=s.enter),s.leave&&(m=s.leave)),N(d,void 0)}UXt.exports=Q3e});var eU=Ld((QKe,WXt)=>{"use strict";var jXt=NXt(),HXt=FXt(),GXt=zXt();WXt.exports={parse:jXt,stringify:HXt,traverse:GXt,p:jXt,s:HXt,t:GXt}});var OA=Ld((CI,nU)=>{(function(){var d,s="4.18.1",h=200,g="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",m="Expected a function",_="Invalid `variable` option passed into `_.template`",S="Invalid `imports` option passed into `_.template`",y="__lodash_hash_undefined__",R=500,N="__lodash_placeholder__",B=1,P=2,U=4,W=1,q=2,nt=1,Q=2,X=4,gt=8,ft=16,xt=32,Bt=64,Ot=128,Pt=256,se=512,ot=30,Lt="...",be=800,ln=16,Fn=1,ne=2,xe=3,re=1/0,hn=9007199254740991,Se=17976931348623157e292,ke=NaN,mn=4294967295,en=mn-1,Qn=mn>>>1,ge=[["ary",Ot],["bind",nt],["bindKey",Q],["curry",gt],["curryRight",ft],["flip",se],["partial",xt],["partialRight",Bt],["rearg",Pt]],Pe="[object Arguments]",ti="[object Array]",Yi="[object AsyncFunction]",ki="[object Boolean]",lr="[object Date]",pr="[object DOMException]",Kt="[object Error]",wn="[object Function]",it="[object GeneratorFunction]",ut="[object Map]",kt="[object Number]",Nt="[object Null]",ie="[object Object]",rn="[object Promise]",Pn="[object Proxy]",Tt="[object RegExp]",yt="[object Set]",ue="[object String]",fn="[object Symbol]",An="[object Undefined]",zn="[object WeakMap]",Li="[object WeakSet]",xi="[object ArrayBuffer]",Jt="[object DataView]",nn="[object Float32Array]",vn="[object Float64Array]",he="[object Int8Array]",Mn="[object Int16Array]",Sn="[object Int32Array]",gn="[object Uint8Array]",Ce="[object Uint8ClampedArray]",dn="[object Uint16Array]",jn="[object Uint32Array]",ar=/\b__p \+= '';/g,gr=/\b(__p \+=) '' \+/g,tr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ln=/&(?:amp|lt|gt|quot|#39);/g,Qt=/[&<>"']/g,Mi=RegExp(Ln.source),sn=RegExp(Qt.source),Zn=/<%-([\s\S]+?)%>/g,oi=/<%([\s\S]+?)%>/g,Jr=/<%=([\s\S]+?)%>/g,Bs=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Oc=/^\w*$/,ru=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fc=/[\\^$.*+?()[\]{}|]/g,il=RegExp(fc.source),va=/^\s+/,Mr=/\s/,iv=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,U0=/\{\n\/\* \[wrapped with (.+)\] \*/,rv=/,? & /,z0=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,j0=/[()=,{}\[\]\/\s]/,sv=/\\(\\)?/g,vg=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ov=/\w*$/,c3=/^[-+]0x[0-9a-f]+$/i,Rt=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,Je=/^0o[0-7]+$/i,tn=/^(?:0|[1-9]\d*)$/,Ze=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Hi=/($^)/,Pr=/['\n\r\u2028\u2029\\]/g,Gr="\\ud800-\\udfff",hs="\\u0300-\\u036f",Fs="\\ufe20-\\ufe2f",Ms="\\u20d0-\\u20ff",bs=hs+Fs+Ms,Tc="\\u2700-\\u27bf",rl="a-z\\xdf-\\xf6\\xf8-\\xff",Oa="\\xac\\xb1\\xd7\\xf7",wh="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Nr="\\u2000-\\u206f",mr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a1="A-Z\\xc0-\\xd6\\xd8-\\xde",dc="\\ufe0e\\ufe0f",vh=Oa+wh+Nr+mr,_g="['\u2019]",ws="["+Gr+"]",$c="["+vh+"]",_a="["+bs+"]",ff="\\d+",Bl="["+Tc+"]",_h="["+rl+"]",u1="[^"+Gr+vh+ff+Tc+rl+a1+"]",Nd="\\ud83c[\\udffb-\\udfff]",ya="(?:"+_a+"|"+Nd+")",yg="[^"+Gr+"]",H0="(?:\\ud83c[\\udde6-\\uddff]){2}",G0="[\\ud800-\\udbff][\\udc00-\\udfff]",xg="["+a1+"]",vb="\\u200d",Cy="(?:"+_h+"|"+u1+")",a3="(?:"+xg+"|"+u1+")",cv="(?:"+_g+"(?:d|ll|m|re|s|t|ve))?",Ay="(?:"+_g+"(?:D|LL|M|RE|S|T|VE))?",ky=ya+"?",av="["+dc+"]?",vS="(?:"+vb+"(?:"+[yg,H0,G0].join("|")+")"+av+ky+")*",u3="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",bk="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",As=av+ky+vS,bp="(?:"+[Bl,H0,G0].join("|")+")"+As,Vc="(?:"+[yg+_a+"?",_a,H0,G0,ws].join("|")+")",_S=RegExp(_g,"g"),l3=RegExp(_a,"g"),uv=RegExp(Nd+"(?="+Nd+")|"+Vc+As,"g"),h3=RegExp([xg+"?"+_h+"+"+cv+"(?="+[$c,xg,"$"].join("|")+")",a3+"+"+Ay+"(?="+[$c,xg+Cy,"$"].join("|")+")",xg+"?"+Cy+"+"+cv,xg+"+"+Ay,bk,u3,ff,bp].join("|"),"g"),W0=RegExp("["+vb+Gr+bs+dc+"]"),f3=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,lv=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],sl=-1,rc={};rc[nn]=rc[vn]=rc[he]=rc[Mn]=rc[Sn]=rc[gn]=rc[Ce]=rc[dn]=rc[jn]=!0,rc[Pe]=rc[ti]=rc[xi]=rc[ki]=rc[Jt]=rc[lr]=rc[Kt]=rc[wn]=rc[ut]=rc[kt]=rc[ie]=rc[Tt]=rc[yt]=rc[ue]=rc[zn]=!1;var Bc={};Bc[Pe]=Bc[ti]=Bc[xi]=Bc[Jt]=Bc[ki]=Bc[lr]=Bc[nn]=Bc[vn]=Bc[he]=Bc[Mn]=Bc[Sn]=Bc[ut]=Bc[kt]=Bc[ie]=Bc[Tt]=Bc[yt]=Bc[ue]=Bc[fn]=Bc[gn]=Bc[Ce]=Bc[dn]=Bc[jn]=!0,Bc[Kt]=Bc[wn]=Bc[zn]=!1;var yS={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},wk={"&":"&","<":"<",">":">",'"':""","'":"'"},xS={"&":"&","<":"<",">":">",""":'"',"'":"'"},d3={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},vk=parseFloat,MS=parseInt,Co=typeof global=="object"&&global&&global.Object===Object&&global,_k=typeof self=="object"&&self&&self.Object===Object&&self,Cc=Co||_k||Function("return this")(),$0=typeof CI=="object"&&CI&&!CI.nodeType&&CI,Mg=$0&&typeof nU=="object"&&nU&&!nU.nodeType&&nU,ES=Mg&&Mg.exports===$0,hv=ES&&Co.process,Xf=function(){try{var oe=Mg&&Mg.require&&Mg.require("util").types;return oe||hv&&hv.binding&&hv.binding("util")}catch{}}(),p3=Xf&&Xf.isArrayBuffer,SS=Xf&&Xf.isDate,TS=Xf&&Xf.isMap,Ly=Xf&&Xf.isRegExp,CS=Xf&&Xf.isSet,Od=Xf&&Xf.isTypedArray;function df(oe,_n,$e){switch($e.length){case 0:return oe.call(_n);case 1:return oe.call(_n,$e[0]);case 2:return oe.call(_n,$e[0],$e[1]);case 3:return oe.call(_n,$e[0],$e[1],$e[2])}return oe.apply(_n,$e)}function AS(oe,_n,$e,er){for(var vs=-1,Wo=oe==null?0:oe.length;++vs-1}function Iy(oe,_n,$e){for(var er=-1,vs=oe==null?0:oe.length;++er-1;);return $e}function V0(oe,_n){for(var $e=oe.length;$e--&&vp(_n,oe[$e],0)>-1;);return $e}function Mk(oe,_n){for(var $e=oe.length,er=0;$e--;)oe[$e]===_n&&++er;return er}var dv=fv(yS),RS=fv(wk);function By(oe){return"\\"+d3[oe]}function Ek(oe,_n){return oe==null?d:oe[_n]}function gf(oe){return W0.test(oe)}function Fy(oe){return f3.test(oe)}function Sk(oe){for(var _n,$e=[];!(_n=oe.next()).done;)$e.push(_n.value);return $e}function pv(oe){var _n=-1,$e=Array(oe.size);return oe.forEach(function(er,vs){$e[++_n]=[vs,er]}),$e}function DS(oe,_n){return function($e){return oe(_n($e))}}function Fl(oe,_n){for(var $e=-1,er=oe.length,vs=0,Wo=[];++$e-1}function nz(x,C){var F=this.__data__,J=L3(F,x);return J<0?(++this.size,F.push([x,C])):F[J][1]=C,this}Y0.prototype.clear=JU,Y0.prototype.delete=QU,Y0.prototype.get=tz,Y0.prototype.has=ez,Y0.prototype.set=nz;function K0(x){var C=-1,F=x==null?0:x.length;for(this.clear();++C=C?x:C)),x}function _p(x,C,F,J,mt,St){var Vt,ee=C&B,fe=C&P,Cn=C&U;if(F&&(Vt=mt?F(x,J,mt,St):F(x)),Vt!==d)return Vt;if(!$a(x))return x;var kn=Us(x);if(kn){if(Vt=ej(x),!ee)return td(x,Vt)}else{var Wn=zh(x),Ki=Wn==wn||Wn==it;if(zd(x))return qR(x,ee);if(Wn==ie||Wn==Pe||Ki&&!mt){if(Vt=fe||Ki?{}:f8(x),!ee)return fe?Wz(x,bz(Vt,x)):Gz(x,ER(Vt,x))}else{if(!Bc[Wn])return mt?x:{};Vt=nj(x,Wn,ee)}}St||(St=new p1);var Er=St.get(x);if(Er)return Er;St.set(x,Vt),Y8(x)?x.forEach(function(Zr){Vt.add(_p(Zr,C,F,Zr,x,St))}):X8(x)&&x.forEach(function(Zr,co){Vt.set(co,_p(Zr,C,F,co,x,St))});var Wr=Cn?fe?Qk:Jk:fe?ed:Hl,no=kn?d:Wr(x);return su(no||x,function(Zr,co){no&&(co=Zr,Zr=x[co]),k3(Vt,co,_p(Zr,C,F,co,x,St))}),Vt}function wz(x){var C=Hl(x);return function(F){return SR(F,x,C)}}function SR(x,C,F){var J=F.length;if(x==null)return!J;for(x=Fc(x);J--;){var mt=F[J],St=C[mt],Vt=x[mt];if(Vt===d&&!(mt in x)||!St(Vt))return!1}return!0}function TR(x,C,F){if(typeof x!="function")throw new Jf(m);return U3(function(){x.apply(d,F)},C)}function P3(x,C,F,J){var mt=-1,St=Py,Vt=!0,ee=x.length,fe=[],Cn=C.length;if(!ee)return fe;F&&(C=ea(C,Fu(F))),J?(St=Iy,Vt=!1):C.length>=h&&(St=pf,Vt=!1,C=new yv(C));t:for(;++mtmt?0:mt+F),J=J===d||J>mt?mt:Ys(J),J<0&&(J+=mt),J=F>J?0:J8(J);F0&&F(ee)?C>1?yh(ee,C-1,F,J,mt):Eg(mt,ee):J||(mt[mt.length]=ee)}return mt}var HS=QR(),R3=QR(!0);function Pg(x,C){return x&&HS(x,C,Hl)}function GS(x,C){return x&&R3(x,C,Hl)}function WS(x,C){return wp(C,function(F){return im(x[F])})}function J0(x,C){C=Pb(C,x);for(var F=0,J=C.length;x!=null&&FC}function yz(x,C){return x!=null&&pc.call(x,C)}function xz(x,C){return x!=null&&C in Fc(x)}function Mz(x,C,F){return x>=$t(C,F)&&x=120&&kn.length>=120)?new yv(Vt&&kn):d}kn=x[0];var Wn=-1,Ki=ee[0];t:for(;++Wn-1;)ee!==x&&qy.call(ee,fe,1),qy.call(x,fe,1);return x}function UR(x,C){for(var F=x?C.length:0,J=F-1;F--;){var mt=C[F];if(F==J||mt!==St){var St=mt;em(mt)?qy.call(x,mt,1):$k(x,mt)}}return x}function Hk(x,C){return x+Xy(Un()*(C-x+1))}function Iz(x,C,F,J){for(var mt=-1,St=vt(vv((C-x)/(F||1)),0),Vt=$e(St);St--;)Vt[J?St:++mt]=x,x+=F;return Vt}function Gk(x,C){var F="";if(!x||C<1||C>hn)return F;do C%2&&(F+=x),C=Xy(C/2),C&&(x+=x);while(C);return F}function oo(x,C){return o5(g8(x,C,Ba),x+"")}function Rz(x){return MR(e2(x))}function Dz(x,C){var F=e2(x);return eT(F,xv(C,0,F.length))}function O3(x,C,F,J){if(!$a(x))return x;C=Pb(C,x);for(var mt=-1,St=C.length,Vt=St-1,ee=x;ee!=null&&++mtmt?0:mt+C),F=F>mt?mt:F,F<0&&(F+=mt),mt=C>F?0:F-C>>>0,C>>>=0;for(var St=$e(mt);++J>>1,Vt=x[St];Vt!==null&&!jd(Vt)&&(F?Vt<=C:Vt=h){var Cn=C?null:Xz(x);if(Cn)return Uy(Cn);Vt=!1,mt=pf,fe=new yv}else fe=C?[]:ee;t:for(;++J=J?x:yp(x,C,F)}var VR=OS||function(x){return Cc.clearTimeout(x)};function qR(x,C){if(C)return x.slice();var F=x.length,J=bv?bv(F):new x.constructor(F);return x.copy(J),J}function Zk(x){var C=new x.constructor(x.byteLength);return new Vy(C).set(new Vy(x)),C}function Uz(x,C){var F=C?Zk(x.buffer):x.buffer;return new x.constructor(F,x.byteOffset,x.byteLength)}function zz(x){var C=new x.constructor(x.source,ov.exec(x));return C.lastIndex=x.lastIndex,C}function jz(x){return kg?Fc(kg.call(x)):{}}function XR(x,C){var F=C?Zk(x.buffer):x.buffer;return new x.constructor(F,x.byteOffset,x.length)}function ZR(x,C){if(x!==C){var F=x!==d,J=x===null,mt=x===x,St=jd(x),Vt=C!==d,ee=C===null,fe=C===C,Cn=jd(C);if(!ee&&!Cn&&!St&&x>C||St&&Vt&&fe&&!ee&&!Cn||J&&Vt&&fe||!F&&fe||!mt)return 1;if(!J&&!St&&!Cn&&x=ee)return fe;var Cn=F[J];return fe*(Cn=="desc"?-1:1)}}return x.index-C.index}function YR(x,C,F,J){for(var mt=-1,St=x.length,Vt=F.length,ee=-1,fe=C.length,Cn=vt(St-Vt,0),kn=$e(fe+Cn),Wn=!J;++ee1?F[mt-1]:d,Vt=mt>2?F[2]:d;for(St=x.length>3&&typeof St=="function"?(mt--,St):d,Vt&&jh(F[0],F[1],Vt)&&(St=mt<3?d:St,mt=1),C=Fc(C);++J-1?mt[St?C[Vt]:Vt]:d}}function n8(x){return tm(function(C){var F=C.length,J=F,mt=bf.prototype.thru;for(x&&C.reverse();J--;){var St=C[J];if(typeof St!="function")throw new Jf(m);if(mt&&!Vt&&QS(St)=="wrapper")var Vt=new bf([],!0)}for(J=Vt?J:F;++J1&&$o.reverse(),kn&&feee))return!1;var Cn=St.get(x),kn=St.get(C);if(Cn&&kn)return Cn==C&&kn==x;var Wn=-1,Ki=!0,Er=F&q?new yv:d;for(St.set(x,C),St.set(C,x);++Wn1?"& ":"")+C[J],C=C.join(F>2?", ":" "),x.replace(iv,`{ +`+gMe(h)+" +`}qXt.exports=VXt});var YXt=Ld((mJe,ZXt)=>{"use strict";function bMe(d,s){var h=function(){},p=h,m=h;function _(){this._skip=!0}function E(){this._remove=!0}function y(B){this._name=B}function I(B){this._replace=B}function N(B,P){var U,j={attr:{},full:B},V={name:y,skip:_,remove:E,replace:I,_name:void 0,_skip:!1,_remove:!1,_replace:void 0},tt=!0,Q,X,gt;if(B!==void 0&&B!==null&&B!==!0&&B!==!1)switch(U=Object.prototype.toString.call(B),U){case"[object String]":case"[object Number]":return;case"[object Array]":if(B.some(function(ft,xt){if(xt===0)return j.name=ft,!1;if(xt===1)return Object.prototype.toString.call(ft)==="[object Object]"&&(tt=!1,j.attr=ft),!0}),p.call(V,j,P),V._name&&(B[0]=V._name),V._replace)return V._replace;if(V._remove)return null;if(!V._skip){for(Q=0,X=B.length;Q1||Q===1&&tt){if(gt=N(B[Q],j),gt===null){B.splice(Q,1),X-=1;continue}gt&&(B[Q]=gt)}Q+=1}if(m.call(V,j,P),V._name&&(B[0]=V._name),V._replace)return V._replace;if(V._remove)return null}}}s&&(s.enter&&(p=s.enter),s.leave&&(m=s.leave)),N(d,void 0)}ZXt.exports=bMe});var sU=Ld((bJe,tZt)=>{"use strict";var KXt=$Xt(),JXt=XXt(),QXt=YXt();tZt.exports={parse:KXt,stringify:JXt,traverse:QXt,p:KXt,s:JXt,t:QXt}});var UA=Ld((LI,oU)=>{(function(){var d,s="4.18.1",h=200,p="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",m="Expected a function",_="Invalid `variable` option passed into `_.template`",E="Invalid `imports` option passed into `_.template`",y="__lodash_hash_undefined__",I=500,N="__lodash_placeholder__",B=1,P=2,U=4,j=1,V=2,tt=1,Q=2,X=4,gt=8,ft=16,xt=32,Bt=64,Ot=128,Pt=256,se=512,ot=30,Lt="...",be=800,ln=16,Fn=1,ne=2,xe=3,re=1/0,hn=9007199254740991,Se=17976931348623157e292,ke=NaN,mn=4294967295,en=mn-1,Qn=mn>>>1,ge=[["ary",Ot],["bind",tt],["bindKey",Q],["curry",gt],["curryRight",ft],["flip",se],["partial",xt],["partialRight",Bt],["rearg",Pt]],Pe="[object Arguments]",ti="[object Array]",Yi="[object AsyncFunction]",ki="[object Boolean]",lr="[object Date]",pr="[object DOMException]",Kt="[object Error]",wn="[object Function]",it="[object GeneratorFunction]",ut="[object Map]",kt="[object Number]",Nt="[object Null]",ie="[object Object]",rn="[object Promise]",Pn="[object Proxy]",Tt="[object RegExp]",yt="[object Set]",ue="[object String]",fn="[object Symbol]",An="[object Undefined]",zn="[object WeakMap]",Li="[object WeakSet]",xi="[object ArrayBuffer]",Jt="[object DataView]",nn="[object Float32Array]",vn="[object Float64Array]",he="[object Int8Array]",Mn="[object Int16Array]",Sn="[object Int32Array]",gn="[object Uint8Array]",Ce="[object Uint8ClampedArray]",dn="[object Uint16Array]",jn="[object Uint32Array]",ar=/\b__p \+= '';/g,gr=/\b(__p \+=) '' \+/g,tr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ln=/&(?:amp|lt|gt|quot|#39);/g,Qt=/[&<>"']/g,Mi=RegExp(Ln.source),sn=RegExp(Qt.source),Zn=/<%-([\s\S]+?)%>/g,oi=/<%([\s\S]+?)%>/g,Jr=/<%=([\s\S]+?)%>/g,Bs=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Oc=/^\w*$/,ru=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fc=/[\\^$.*+?()[\]{}|]/g,il=RegExp(fc.source),va=/^\s+/,Mr=/\s/,rv=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,U0=/\{\n\/\* \[wrapped with (.+)\] \*/,sv=/,? & /,z0=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,j0=/[()=,{}\[\]\/\s]/,ov=/\\(\\)?/g,vg=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,cv=/\w*$/,l3=/^[-+]0x[0-9a-f]+$/i,Rt=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,Je=/^0o[0-7]+$/i,tn=/^(?:0|[1-9]\d*)$/,Ze=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Hi=/($^)/,Pr=/['\n\r\u2028\u2029\\]/g,Gr="\\ud800-\\udfff",hs="\\u0300-\\u036f",Fs="\\ufe20-\\ufe2f",Ms="\\u20d0-\\u20ff",bs=hs+Fs+Ms,Tc="\\u2700-\\u27bf",rl="a-z\\xdf-\\xf6\\xf8-\\xff",Oa="\\xac\\xb1\\xd7\\xf7",wh="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Nr="\\u2000-\\u206f",mr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a1="A-Z\\xc0-\\xd6\\xd8-\\xde",dc="\\ufe0e\\ufe0f",vh=Oa+wh+Nr+mr,_g="['\u2019]",ws="["+Gr+"]",$c="["+vh+"]",_a="["+bs+"]",ff="\\d+",Bl="["+Tc+"]",_h="["+rl+"]",u1="[^"+Gr+vh+ff+Tc+rl+a1+"]",Nd="\\ud83c[\\udffb-\\udfff]",ya="(?:"+_a+"|"+Nd+")",yg="[^"+Gr+"]",H0="(?:\\ud83c[\\udde6-\\uddff]){2}",G0="[\\ud800-\\udbff][\\udc00-\\udfff]",xg="["+a1+"]",vb="\\u200d",ky="(?:"+_h+"|"+u1+")",h3="(?:"+xg+"|"+u1+")",av="(?:"+_g+"(?:d|ll|m|re|s|t|ve))?",Ly="(?:"+_g+"(?:D|LL|M|RE|S|T|VE))?",Py=ya+"?",uv="["+dc+"]?",xS="(?:"+vb+"(?:"+[yg,H0,G0].join("|")+")"+uv+Py+")*",f3="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",_k="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",As=uv+Py+xS,bp="(?:"+[Bl,H0,G0].join("|")+")"+As,Vc="(?:"+[yg+_a+"?",_a,H0,G0,ws].join("|")+")",MS=RegExp(_g,"g"),d3=RegExp(_a,"g"),lv=RegExp(Nd+"(?="+Nd+")|"+Vc+As,"g"),p3=RegExp([xg+"?"+_h+"+"+av+"(?="+[$c,xg,"$"].join("|")+")",h3+"+"+Ly+"(?="+[$c,xg+ky,"$"].join("|")+")",xg+"?"+ky+"+"+av,xg+"+"+Ly,_k,f3,ff,bp].join("|"),"g"),W0=RegExp("["+vb+Gr+bs+dc+"]"),g3=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,hv=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],sl=-1,rc={};rc[nn]=rc[vn]=rc[he]=rc[Mn]=rc[Sn]=rc[gn]=rc[Ce]=rc[dn]=rc[jn]=!0,rc[Pe]=rc[ti]=rc[xi]=rc[ki]=rc[Jt]=rc[lr]=rc[Kt]=rc[wn]=rc[ut]=rc[kt]=rc[ie]=rc[Tt]=rc[yt]=rc[ue]=rc[zn]=!1;var Bc={};Bc[Pe]=Bc[ti]=Bc[xi]=Bc[Jt]=Bc[ki]=Bc[lr]=Bc[nn]=Bc[vn]=Bc[he]=Bc[Mn]=Bc[Sn]=Bc[ut]=Bc[kt]=Bc[ie]=Bc[Tt]=Bc[yt]=Bc[ue]=Bc[fn]=Bc[gn]=Bc[Ce]=Bc[dn]=Bc[jn]=!0,Bc[Kt]=Bc[wn]=Bc[zn]=!1;var ES={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},yk={"&":"&","<":"<",">":">",'"':""","'":"'"},SS={"&":"&","<":"<",">":">",""":'"',"'":"'"},m3={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},xk=parseFloat,TS=parseInt,Co=typeof global=="object"&&global&&global.Object===Object&&global,Mk=typeof self=="object"&&self&&self.Object===Object&&self,Cc=Co||Mk||Function("return this")(),$0=typeof LI=="object"&&LI&&!LI.nodeType&&LI,Mg=$0&&typeof oU=="object"&&oU&&!oU.nodeType&&oU,CS=Mg&&Mg.exports===$0,fv=CS&&Co.process,Xf=function(){try{var oe=Mg&&Mg.require&&Mg.require("util").types;return oe||fv&&fv.binding&&fv.binding("util")}catch{}}(),b3=Xf&&Xf.isArrayBuffer,AS=Xf&&Xf.isDate,kS=Xf&&Xf.isMap,Iy=Xf&&Xf.isRegExp,LS=Xf&&Xf.isSet,Od=Xf&&Xf.isTypedArray;function df(oe,_n,$e){switch($e.length){case 0:return oe.call(_n);case 1:return oe.call(_n,$e[0]);case 2:return oe.call(_n,$e[0],$e[1]);case 3:return oe.call(_n,$e[0],$e[1],$e[2])}return oe.apply(_n,$e)}function PS(oe,_n,$e,er){for(var vs=-1,Wo=oe==null?0:oe.length;++vs-1}function Dy(oe,_n,$e){for(var er=-1,vs=oe==null?0:oe.length;++er-1;);return $e}function V0(oe,_n){for(var $e=oe.length;$e--&&vp(_n,oe[$e],0)>-1;);return $e}function Tk(oe,_n){for(var $e=oe.length,er=0;$e--;)oe[$e]===_n&&++er;return er}var pv=dv(ES),OS=dv(yk);function Uy(oe){return"\\"+m3[oe]}function Ck(oe,_n){return oe==null?d:oe[_n]}function gf(oe){return W0.test(oe)}function zy(oe){return g3.test(oe)}function Ak(oe){for(var _n,$e=[];!(_n=oe.next()).done;)$e.push(_n.value);return $e}function gv(oe){var _n=-1,$e=Array(oe.size);return oe.forEach(function(er,vs){$e[++_n]=[vs,er]}),$e}function BS(oe,_n){return function($e){return oe(_n($e))}}function Fl(oe,_n){for(var $e=-1,er=oe.length,vs=0,Wo=[];++$e-1}function oz(x,C){var F=this.__data__,J=R3(F,x);return J<0?(++this.size,F.push([x,C])):F[J][1]=C,this}Y0.prototype.clear=nz,Y0.prototype.delete=iz,Y0.prototype.get=rz,Y0.prototype.has=sz,Y0.prototype.set=oz;function K0(x){var C=-1,F=x==null?0:x.length;for(this.clear();++C=C?x:C)),x}function _p(x,C,F,J,mt,St){var Vt,ee=C&B,fe=C&P,Cn=C&U;if(F&&(Vt=mt?F(x,J,mt,St):F(x)),Vt!==d)return Vt;if(!$a(x))return x;var kn=Us(x);if(kn){if(Vt=sj(x),!ee)return td(x,Vt)}else{var Wn=zh(x),Ki=Wn==wn||Wn==it;if(zd(x))return KR(x,ee);if(Wn==ie||Wn==Pe||Ki&&!mt){if(Vt=fe||Ki?{}:m8(x),!ee)return fe?Xz(x,yz(Vt,x)):qz(x,AR(Vt,x))}else{if(!Bc[Wn])return mt?x:{};Vt=oj(x,Wn,ee)}}St||(St=new p1);var Er=St.get(x);if(Er)return Er;St.set(x,Vt),t9(x)?x.forEach(function(Zr){Vt.add(_p(Zr,C,F,Zr,x,St))}):J8(x)&&x.forEach(function(Zr,co){Vt.set(co,_p(Zr,C,F,co,x,St))});var Wr=Cn?fe?n5:e5:fe?ed:Hl,no=kn?d:Wr(x);return su(no||x,function(Zr,co){no&&(co=Zr,Zr=x[co]),I3(Vt,co,_p(Zr,C,F,co,x,St))}),Vt}function xz(x){var C=Hl(x);return function(F){return kR(F,x,C)}}function kR(x,C,F){var J=F.length;if(x==null)return!J;for(x=Fc(x);J--;){var mt=F[J],St=C[mt],Vt=x[mt];if(Vt===d&&!(mt in x)||!St(Vt))return!1}return!0}function LR(x,C,F){if(typeof x!="function")throw new Jf(m);return H3(function(){x.apply(d,F)},C)}function D3(x,C,F,J){var mt=-1,St=Ry,Vt=!0,ee=x.length,fe=[],Cn=C.length;if(!ee)return fe;F&&(C=ea(C,Uu(F))),J?(St=Dy,Vt=!1):C.length>=h&&(St=pf,Vt=!1,C=new xv(C));t:for(;++mtmt?0:mt+F),J=J===d||J>mt?mt:Ys(J),J<0&&(J+=mt),J=F>J?0:n9(J);F0&&F(ee)?C>1?yh(ee,C-1,F,J,mt):Eg(mt,ee):J||(mt[mt.length]=ee)}return mt}var $S=i8(),O3=i8(!0);function Pg(x,C){return x&&$S(x,C,Hl)}function VS(x,C){return x&&O3(x,C,Hl)}function qS(x,C){return wp(C,function(F){return im(x[F])})}function J0(x,C){C=Pb(C,x);for(var F=0,J=C.length;x!=null&&FC}function Sz(x,C){return x!=null&&pc.call(x,C)}function Tz(x,C){return x!=null&&C in Fc(x)}function Cz(x,C,F){return x>=$t(C,F)&&x=120&&kn.length>=120)?new xv(Vt&&kn):d}kn=x[0];var Wn=-1,Ki=ee[0];t:for(;++Wn-1;)ee!==x&&Zy.call(ee,fe,1),Zy.call(x,fe,1);return x}function GR(x,C){for(var F=x?C.length:0,J=F-1;F--;){var mt=C[F];if(F==J||mt!==St){var St=mt;em(mt)?Zy.call(x,mt,1):Xk(x,mt)}}return x}function $k(x,C){return x+Yy(Un()*(C-x+1))}function Oz(x,C,F,J){for(var mt=-1,St=vt(_v((C-x)/(F||1)),0),Vt=$e(St);St--;)Vt[J?St:++mt]=x,x+=F;return Vt}function Vk(x,C){var F="";if(!x||C<1||C>hn)return F;do C%2&&(F+=x),C=Yy(C/2),C&&(x+=x);while(C);return F}function oo(x,C){return u5(v8(x,C,Ba),x+"")}function Bz(x){return CR(i2(x))}function Fz(x,C){var F=i2(x);return rT(F,Mv(C,0,F.length))}function U3(x,C,F,J){if(!$a(x))return x;C=Pb(C,x);for(var mt=-1,St=C.length,Vt=St-1,ee=x;ee!=null&&++mtmt?0:mt+C),F=F>mt?mt:F,F<0&&(F+=mt),mt=C>F?0:F-C>>>0,C>>>=0;for(var St=$e(mt);++J>>1,Vt=x[St];Vt!==null&&!jd(Vt)&&(F?Vt<=C:Vt=h){var Cn=C?null:Jz(x);if(Cn)return jy(Cn);Vt=!1,mt=pf,fe=new xv}else fe=C?[]:ee;t:for(;++J=J?x:yp(x,C,F)}var YR=US||function(x){return Cc.clearTimeout(x)};function KR(x,C){if(C)return x.slice();var F=x.length,J=wv?wv(F):new x.constructor(F);return x.copy(J),J}function Jk(x){var C=new x.constructor(x.byteLength);return new Xy(C).set(new Xy(x)),C}function Gz(x,C){var F=C?Jk(x.buffer):x.buffer;return new x.constructor(F,x.byteOffset,x.byteLength)}function Wz(x){var C=new x.constructor(x.source,cv.exec(x));return C.lastIndex=x.lastIndex,C}function $z(x){return kg?Fc(kg.call(x)):{}}function JR(x,C){var F=C?Jk(x.buffer):x.buffer;return new x.constructor(F,x.byteOffset,x.length)}function QR(x,C){if(x!==C){var F=x!==d,J=x===null,mt=x===x,St=jd(x),Vt=C!==d,ee=C===null,fe=C===C,Cn=jd(C);if(!ee&&!Cn&&!St&&x>C||St&&Vt&&fe&&!ee&&!Cn||J&&Vt&&fe||!F&&fe||!mt)return 1;if(!J&&!St&&!Cn&&x=ee)return fe;var Cn=F[J];return fe*(Cn=="desc"?-1:1)}}return x.index-C.index}function t8(x,C,F,J){for(var mt=-1,St=x.length,Vt=F.length,ee=-1,fe=C.length,Cn=vt(St-Vt,0),kn=$e(fe+Cn),Wn=!J;++ee1?F[mt-1]:d,Vt=mt>2?F[2]:d;for(St=x.length>3&&typeof St=="function"?(mt--,St):d,Vt&&jh(F[0],F[1],Vt)&&(St=mt<3?d:St,mt=1),C=Fc(C);++J-1?mt[St?C[Vt]:Vt]:d}}function o8(x){return tm(function(C){var F=C.length,J=F,mt=bf.prototype.thru;for(x&&C.reverse();J--;){var St=C[J];if(typeof St!="function")throw new Jf(m);if(mt&&!Vt&&nT(St)=="wrapper")var Vt=new bf([],!0)}for(J=Vt?J:F;++J1&&$o.reverse(),kn&&feee))return!1;var Cn=St.get(x),kn=St.get(C);if(Cn&&kn)return Cn==C&&kn==x;var Wn=-1,Ki=!0,Er=F&V?new xv:d;for(St.set(x,C),St.set(C,x);++Wn1?"& ":"")+C[J],C=C.join(F>2?", ":" "),x.replace(rv,`{ /* [wrapped with `+C+`] */ -`)}function rj(x){return Us(x)||Av(x)||!!(A3&&x&&x[A3])}function em(x,C){var F=typeof x;return C=C??hn,!!C&&(F=="number"||F!="symbol"&&tn.test(x))&&x>-1&&x%1==0&&x0){if(++C>=be)return arguments[0]}else C=0;return x.apply(d,arguments)}}function eT(x,C){var F=-1,J=x.length,mt=J-1;for(C=C===d?J:C;++F1?x[C-1]:d;return F=typeof F=="function"?(x.pop(),F):d,nm(x,F)});function D8(x){var C=Mt(x);return C.__chain__=!0,C}function Ent(x,C){return C(x),x}function d5(x,C){return C(x)}var Snt=tm(function(x){var C=x.length,F=C?x[0]:0,J=this.__wrapped__,mt=function(St){return Dk(St,x)};return C>1||this.__actions__.length||!(J instanceof po)||!em(F)?this.thru(mt):(J=J.slice(F,+F+(C?1:0)),J.__actions__.push({func:d5,args:[mt],thisArg:d}),new bf(J,this.__chain__).thru(function(St){return C&&!St.length&&St.push(d),St}))});function Tnt(){return D8(this)}function Cnt(){return new bf(this.value(),this.__chain__)}function jl(){this.__values__===d&&(this.__values__=K8(this.value()));var x=this.__index__>=this.__values__.length,C=x?d:this.__values__[this.__index__++];return{done:x,value:C}}function Ant(){return this}function knt(x){for(var C,F=this;F instanceof Tb;){var J=y8(F);J.__index__=0,J.__values__=d,C?mt.__wrapped__=J:C=J;var mt=J;F=F.__wrapped__}return mt.__wrapped__=x,C}function Lnt(){var x=this.__wrapped__;if(x instanceof po){var C=x;return this.__actions__.length&&(C=new po(this)),C=C.reverse(),C.__actions__.push({func:d5,args:[u5],thisArg:d}),new bf(C,this.__chain__)}return this.thru(u5)}function jj(){return WR(this.__wrapped__,this.__actions__)}var N8=XS(function(x,C,F){pc.call(x,F)?++x[F]:Lg(x,F,1)});function Pnt(x,C,F){var J=Us(x)?g3:vz;return F&&jh(x,C,F)&&(C=d),J(x,cs(C,3))}function Int(x,C){var F=Us(x)?wp:I3;return F(x,cs(C,3))}var O8=e8(M8),B8=e8(E8);function Rnt(x,C){return yh(p5(x,C),1)}function Dnt(x,C){return yh(p5(x,C),re)}function Nnt(x,C,F){return F=F===d?1:Ys(F),yh(p5(x,C),F)}function Hj(x,C){var F=Us(x)?su:Ab;return F(x,cs(C,3))}function Gj(x,C){var F=Us(x)?kS:CR;return F(x,cs(C,3))}var Ont=XS(function(x,C,F){pc.call(x,F)?x[F].push(C):Lg(x,F,[C])});function Bnt(x,C,F,J){x=xh(x)?x:e2(x),F=F&&!J?Ys(F):0;var mt=x.length;return F<0&&(F=vt(mt+F,0)),aT(x)?F<=mt&&x.indexOf(C,F)>-1:!!mt&&vp(x,C,F)>-1}var Fnt=oo(function(x,C,F){var J=-1,mt=typeof C=="function",St=xh(x)?$e(x.length):[];return Ab(x,function(Vt){St[++J]=mt?df(C,Vt,F):D3(Vt,C,F)}),St}),Unt=XS(function(x,C,F){Lg(x,F,C)});function p5(x,C){var F=Us(x)?ea:DR;return F(x,cs(C,3))}function znt(x,C,F,J){return x==null?[]:(Us(C)||(C=C==null?[]:[C]),F=J?d:F,Us(F)||(F=F==null?[]:[F]),kb(x,C,F))}var jnt=XS(function(x,C,F){x[F?0:1].push(C)},function(){return[[],[]]});function Hnt(x,C,F){var J=Us(x)?m3:Ny,mt=arguments.length<3;return J(x,cs(C,4),F,mt,Ab)}function Gnt(x,C,F){var J=Us(x)?b3:Ny,mt=arguments.length<3;return J(x,cs(C,4),F,mt,CR)}function Wnt(x,C){var F=Us(x)?wp:I3;return F(x,sT(cs(C,3)))}function $nt(x){var C=Us(x)?MR:Rz;return C(x)}function Vnt(x,C,F){(F?jh(x,C,F):C===d)?C=1:C=Ys(C);var J=Us(x)?pz:Dz;return J(x,C)}function Wj(x){var C=Us(x)?gz:Oz;return C(x)}function $j(x){if(x==null)return 0;if(xh(x))return aT(x)?h1(x):x.length;var C=zh(x);return C==ut||C==yt?x.size:Fk(x).length}function Vj(x,C,F){var J=Us(x)?w3:Bz;return F&&jh(x,C,F)&&(C=d),J(x,cs(C,3))}var F8=oo(function(x,C){if(x==null)return[];var F=C.length;return F>1&&jh(x,C[0],C[1])?C=[]:F>2&&jh(C[0],C[1],C[2])&&(C=[C[0]]),kb(x,yh(C,1),[])}),Tv=kk||function(){return Cc.Date.now()};function iT(x,C){if(typeof C!="function")throw new Jf(m);return x=Ys(x),function(){if(--x<1)return C.apply(this,arguments)}}function rT(x,C,F){return C=F?d:C,C=x&&C==null?x.length:C,Q0(x,Ot,d,d,d,d,C)}function Db(x,C){var F;if(typeof C!="function")throw new Jf(m);return x=Ys(x),function(){return--x>0&&(F=C.apply(this,arguments)),x<=1&&(C=d),F}}var Dg=oo(function(x,C,F){var J=nt;if(F.length){var mt=Fl(F,Jy(Dg));J|=xt}return Q0(x,J,C,F,mt)}),U8=oo(function(x,C,F){var J=nt|Q;if(F.length){var mt=Fl(F,Jy(U8));J|=xt}return Q0(C,J,x,F,mt)});function z8(x,C,F){C=F?d:C;var J=Q0(x,gt,d,d,d,d,d,C);return J.placeholder=z8.placeholder,J}function _r(x,C,F){C=F?d:C;var J=Q0(x,ft,d,d,d,d,d,C);return J.placeholder=_r.placeholder,J}function j8(x,C,F){var J,mt,St,Vt,ee,fe,Cn=0,kn=!1,Wn=!1,Ki=!0;if(typeof x!="function")throw new Jf(m);C=Mp(C)||0,$a(F)&&(kn=!!F.leading,Wn="maxWait"in F,St=Wn?vt(Mp(F.maxWait)||0,C):St,Ki="trailing"in F?!!F.trailing:Ki);function Er(_u){var nd=J,sm=mt;return J=mt=d,Cn=_u,Vt=x.apply(sm,nd),Vt}function Wr(_u){return Cn=_u,ee=U3(co,C),kn?Er(_u):Vt}function no(_u){var nd=_u-fe,sm=_u-Cn,v9=C-nd;return Wn?$t(v9,St-sm):v9}function Zr(_u){var nd=_u-fe,sm=_u-Cn;return fe===d||nd>=C||nd<0||Wn&&sm>=St}function co(){var _u=Tv();if(Zr(_u))return $o(_u);ee=U3(co,no(_u))}function $o(_u){return ee=d,Ki&&J?Er(_u):(J=mt=d,Vt)}function Hh(){ee!==d&&VR(ee),Cn=0,J=fe=mt=ee=d}function _f(){return ee===d?Vt:$o(Tv())}function $r(){var _u=Tv(),nd=Zr(_u);if(J=arguments,mt=this,fe=_u,nd){if(ee===d)return Wr(fe);if(Wn)return VR(ee),ee=U3(co,C),Er(fe)}return ee===d&&(ee=U3(co,C)),Vt}return $r.cancel=Hh,$r.flush=_f,$r}var H8=oo(function(x,C){return TR(x,1,C)}),qj=oo(function(x,C,F){return TR(x,Mp(C)||0,F)});function G8(x){return Q0(x,se)}function Qy(x,C){if(typeof x!="function"||C!=null&&typeof C!="function")throw new Jf(m);var F=function(){var J=arguments,mt=C?C.apply(this,J):J[0],St=F.cache;if(St.has(mt))return St.get(mt);var Vt=x.apply(this,J);return F.cache=St.set(mt,Vt)||St,Vt};return F.cache=new(Qy.Cache||K0),F}Qy.Cache=K0;function sT(x){if(typeof x!="function")throw new Jf(m);return function(){var C=arguments;switch(C.length){case 0:return!x.call(this);case 1:return!x.call(this,C[0]);case 2:return!x.call(this,C[0],C[1]);case 3:return!x.call(this,C[0],C[1],C[2])}return!x.apply(this,C)}}function Xj(x){return Db(2,x)}var Zj=Fz(function(x,C){C=C.length==1&&Us(C[0])?ea(C[0],Fu(cs())):ea(yh(C,1),Fu(cs()));var F=C.length;return oo(function(J){for(var mt=-1,St=$t(J.length,F);++mt=C}),Av=kR(function(){return arguments}())?kR:function(x){return ou(x)&&pc.call(x,"callee")&&!C3.call(x,"callee")},Us=$e.isArray,$8=p3?Fu(p3):Sz;function xh(x){return x!=null&&cT(x.length)&&!im(x)}function j(x){return ou(x)&&xh(x)}function oT(x){return x===!0||x===!1||ou(x)&&zl(x)==ki}var zd=E||pT,uH=SS?Fu(SS):LR;function kv(x){return ou(x)&&x.nodeType===1&&!G3(x)}function V8(x){if(x==null)return!0;if(xh(x)&&(Us(x)||typeof x=="string"||typeof x.splice=="function"||zd(x)||t2(x)||Av(x)))return!x.length;var C=zh(x);if(C==ut||C==yt)return!x.size;if(F3(x))return!Fk(x).length;for(var F in x)if(pc.call(x,F))return!1;return!0}function lH(x,C){return N3(x,C)}function hH(x,C,F){F=typeof F=="function"?F:d;var J=F?F(x,C):d;return J===d?N3(x,C,d,F):!!J}function m5(x){if(!ou(x))return!1;var C=zl(x);return C==Kt||C==pr||typeof x.message=="string"&&typeof x.name=="string"&&!G3(x)}function fH(x){return typeof x=="number"&&D(x)}function im(x){if(!$a(x))return!1;var C=zl(x);return C==wn||C==it||C==Yi||C==Pn}function q8(x){return typeof x=="number"&&x==Ys(x)}function cT(x){return typeof x=="number"&&x>-1&&x%1==0&&x<=hn}function $a(x){var C=typeof x;return x!=null&&(C=="object"||C=="function")}function ou(x){return x!=null&&typeof x=="object"}var X8=TS?Fu(TS):PR;function b5(x,C){return x===C||Bk(x,C,e5(C))}function dH(x,C,F){return F=typeof F=="function"?F:d,Bk(x,C,e5(C),F)}function pH(x){return Z8(x)&&x!=+x}function gH(x){if(r5(x))throw new vs(g);return IR(x)}function mH(x){return x===null}function bH(x){return x==null}function Z8(x){return typeof x=="number"||ou(x)&&zl(x)==kt}function G3(x){if(!ou(x)||zl(x)!=ie)return!1;var C=Cg(x);if(C===null)return!0;var F=pc.call(C,"constructor")&&C.constructor;return typeof F=="function"&&F instanceof F&&Tg.call(F)==Ak}var Nb=Ly?Fu(Ly):Tz;function wH(x){return q8(x)&&x>=-hn&&x<=hn}var Y8=CS?Fu(CS):Cz;function aT(x){return typeof x=="string"||!Us(x)&&ou(x)&&zl(x)==ue}function jd(x){return typeof x=="symbol"||ou(x)&&zl(x)==fn}var t2=Od?Fu(Od):Az;function vH(x){return x===d}function _H(x){return ou(x)&&zh(x)==zn}function yH(x){return ou(x)&&zl(x)==Li}var xH=JS(Uk),MH=JS(function(x,C){return x<=C});function K8(x){if(!x)return[];if(xh(x))return aT(x)?Kf(x):td(x);if(Mb&&x[Mb])return Sk(x[Mb]());var C=zh(x),F=C==ut?pv:C==yt?Uy:e2;return F(x)}function rm(x){if(!x)return x===0?x:0;if(x=Mp(x),x===re||x===-re){var C=x<0?-1:1;return C*Se}return x===x?x:0}function Ys(x){var C=rm(x),F=C%1;return C===C?F?C-F:C:0}function J8(x){return x?xv(Ys(x),0,mn):0}function Mp(x){if(typeof x=="number")return x;if(jd(x))return ke;if($a(x)){var C=typeof x.valueOf=="function"?x.valueOf():x;x=$a(C)?C+"":C}if(typeof x!="string")return x===0?x:+x;x=Yf(x);var F=Rt.test(x);return F||Je.test(x)?MS(x.slice(2),F?2:8):c3.test(x)?ke:+x}function Q8(x){return Ig(x,ed(x))}function EH(x){return x?xv(Ys(x),-hn,hn):x===0?x:0}function Ac(x){return x==null?"":Fd(x)}var SH=Yy(function(x,C){if(F3(C)||xh(C)){Ig(C,Hl(C),x);return}for(var F in C)pc.call(C,F)&&k3(x,F,C[F])}),t9=Yy(function(x,C){Ig(C,ed(C),x)}),e9=Yy(function(x,C,F,J){Ig(C,ed(C),x,J)}),w5=Yy(function(x,C,F,J){Ig(C,Hl(C),x,J)}),TH=tm(Dk);function CH(x,C){var F=Sb(x);return C==null?F:ER(F,C)}var AH=oo(function(x,C){x=Fc(x);var F=-1,J=C.length,mt=J>2?C[2]:d;for(mt&&jh(C[0],C[1],mt)&&(J=1);++F1),St}),Ig(x,Qk(x),F),J&&(F=_p(F,B|P|U,Zz));for(var mt=C.length;mt--;)$k(F,C[mt]);return F});function WH(x,C){return i9(x,sT(cs(C)))}var uT=tm(function(x,C){return x==null?{}:zk(x,C)});function i9(x,C){if(x==null)return{};var F=ea(Qk(x),function(J){return[J]});return C=cs(C),FR(x,F,function(J,mt){return C(J,mt[0])})}function $H(x,C,F){C=Pb(C,x);var J=-1,mt=C.length;for(mt||(mt=1,x=d);++JC){var J=x;x=C,C=J}if(F||x%1||C%1){var mt=Un();return $t(x+mt*(C-x+vk("1e-"+((mt+"").length-1))),C)}return Hk(x,C)}var eG=Ky(function(x,C,F){return C=C.toLowerCase(),x+(F?o9(C):C)});function o9(x){return x5(Ac(x).toLowerCase())}function c9(x){return x=Ac(x),x&&x.replace(Ze,dv).replace(l3,"")}function nG(x,C,F){x=Ac(x),C=Fd(C);var J=x.length;F=F===d?J:xv(Ys(F),0,J);var mt=F;return F-=C.length,F>=0&&x.slice(F,mt)==C}function iG(x){return x=Ac(x),x&&sn.test(x)?x.replace(Qt,RS):x}function rG(x){return x=Ac(x),x&&il.test(x)?x.replace(fc,"\\$&"):x}var sG=Ky(function(x,C,F){return x+(F?"-":"")+C.toLowerCase()}),oG=Ky(function(x,C,F){return x+(F?" ":"")+C.toLowerCase()}),cG=t8("toLowerCase");function aG(x,C,F){x=Ac(x),C=Ys(C);var J=C?h1(x):0;if(!C||J>=C)return x;var mt=(C-J)/2;return KS(Xy(mt),F)+x+KS(vv(mt),F)}function uG(x,C,F){x=Ac(x),C=Ys(C);var J=C?h1(x):0;return C&&J>>0,F?(x=Ac(x),x&&(typeof C=="string"||C!=null&&!Nb(C))&&(C=Fd(C),!C&&gf(x))?Ib(Kf(x),0,F):x.split(C,F)):[]}var mG=Ky(function(x,C,F){return x+(F?" ":"")+x5(C)});function a9(x,C,F){return x=Ac(x),F=F==null?0:xv(Ys(F),0,x.length),C=Fd(C),x.slice(F,F+C.length)==C}function kr(x,C,F){var J=Mt.templateSettings;F&&jh(x,C,F)&&(C=d),x=Ac(x),C=w5({},C,J,c8);var mt=w5({},C.imports,J.imports,c8),St=Hl(mt),Vt=M3(mt,St);su(St,function(Zr){if(j0.test(Zr))throw new vs(S)});var ee,fe,Cn=0,kn=C.interpolate||Hi,Wn="__p += '",Ki=mf((C.escape||Hi).source+"|"+kn.source+"|"+(kn===Jr?vg:Hi).source+"|"+(C.evaluate||Hi).source+"|$","g"),Er="//# sourceURL="+(pc.call(C,"sourceURL")?(C.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++sl+"]")+` -`;x.replace(Ki,function(Zr,co,$o,Hh,_f,$r){return $o||($o=Hh),Wn+=x.slice(Cn,$r).replace(Pr,By),co&&(ee=!0,Wn+=`' + +`)}function aj(x){return Us(x)||kv(x)||!!(P3&&x&&x[P3])}function em(x,C){var F=typeof x;return C=C??hn,!!C&&(F=="number"||F!="symbol"&&tn.test(x))&&x>-1&&x%1==0&&x0){if(++C>=be)return arguments[0]}else C=0;return x.apply(d,arguments)}}function rT(x,C){var F=-1,J=x.length,mt=J-1;for(C=C===d?J:C;++F1?x[C-1]:d;return F=typeof F=="function"?(x.pop(),F):d,nm(x,F)});function F8(x){var C=Mt(x);return C.__chain__=!0,C}function Ont(x,C){return C(x),x}function m5(x,C){return C(x)}var Bnt=tm(function(x){var C=x.length,F=C?x[0]:0,J=this.__wrapped__,mt=function(St){return Bk(St,x)};return C>1||this.__actions__.length||!(J instanceof po)||!em(F)?this.thru(mt):(J=J.slice(F,+F+(C?1:0)),J.__actions__.push({func:m5,args:[mt],thisArg:d}),new bf(J,this.__chain__).thru(function(St){return C&&!St.length&&St.push(d),St}))});function Fnt(){return F8(this)}function Unt(){return new bf(this.value(),this.__chain__)}function jl(){this.__values__===d&&(this.__values__=e9(this.value()));var x=this.__index__>=this.__values__.length,C=x?d:this.__values__[this.__index__++];return{done:x,value:C}}function znt(){return this}function jnt(x){for(var C,F=this;F instanceof Tb;){var J=S8(F);J.__index__=0,J.__values__=d,C?mt.__wrapped__=J:C=J;var mt=J;F=F.__wrapped__}return mt.__wrapped__=x,C}function Hnt(){var x=this.__wrapped__;if(x instanceof po){var C=x;return this.__actions__.length&&(C=new po(this)),C=C.reverse(),C.__actions__.push({func:m5,args:[f5],thisArg:d}),new bf(C,this.__chain__)}return this.thru(f5)}function $j(){return XR(this.__wrapped__,this.__actions__)}var U8=KS(function(x,C,F){pc.call(x,F)?++x[F]:Lg(x,F,1)});function Gnt(x,C,F){var J=Us(x)?w3:Mz;return F&&jh(x,C,F)&&(C=d),J(x,cs(C,3))}function Wnt(x,C){var F=Us(x)?wp:N3;return F(x,cs(C,3))}var z8=s8(C8),j8=s8(A8);function $nt(x,C){return yh(b5(x,C),1)}function Vnt(x,C){return yh(b5(x,C),re)}function qnt(x,C,F){return F=F===d?1:Ys(F),yh(b5(x,C),F)}function Vj(x,C){var F=Us(x)?su:Ab;return F(x,cs(C,3))}function qj(x,C){var F=Us(x)?IS:PR;return F(x,cs(C,3))}var Xnt=KS(function(x,C,F){pc.call(x,F)?x[F].push(C):Lg(x,F,[C])});function Znt(x,C,F,J){x=xh(x)?x:i2(x),F=F&&!J?Ys(F):0;var mt=x.length;return F<0&&(F=vt(mt+F,0)),hT(x)?F<=mt&&x.indexOf(C,F)>-1:!!mt&&vp(x,C,F)>-1}var Ynt=oo(function(x,C,F){var J=-1,mt=typeof C=="function",St=xh(x)?$e(x.length):[];return Ab(x,function(Vt){St[++J]=mt?df(C,Vt,F):B3(Vt,C,F)}),St}),Knt=KS(function(x,C,F){Lg(x,F,C)});function b5(x,C){var F=Us(x)?ea:FR;return F(x,cs(C,3))}function Jnt(x,C,F,J){return x==null?[]:(Us(C)||(C=C==null?[]:[C]),F=J?d:F,Us(F)||(F=F==null?[]:[F]),kb(x,C,F))}var Qnt=KS(function(x,C,F){x[F?0:1].push(C)},function(){return[[],[]]});function tit(x,C,F){var J=Us(x)?v3:By,mt=arguments.length<3;return J(x,cs(C,4),F,mt,Ab)}function eit(x,C,F){var J=Us(x)?_3:By,mt=arguments.length<3;return J(x,cs(C,4),F,mt,PR)}function nit(x,C){var F=Us(x)?wp:N3;return F(x,aT(cs(C,3)))}function iit(x){var C=Us(x)?CR:Bz;return C(x)}function rit(x,C,F){(F?jh(x,C,F):C===d)?C=1:C=Ys(C);var J=Us(x)?wz:Fz;return J(x,C)}function Xj(x){var C=Us(x)?vz:zz;return C(x)}function Zj(x){if(x==null)return 0;if(xh(x))return hT(x)?h1(x):x.length;var C=zh(x);return C==ut||C==yt?x.size:jk(x).length}function Yj(x,C,F){var J=Us(x)?y3:jz;return F&&jh(x,C,F)&&(C=d),J(x,cs(C,3))}var H8=oo(function(x,C){if(x==null)return[];var F=C.length;return F>1&&jh(x,C[0],C[1])?C=[]:F>2&&jh(C[0],C[1],C[2])&&(C=[C[0]]),kb(x,yh(C,1),[])}),Cv=Ik||function(){return Cc.Date.now()};function oT(x,C){if(typeof C!="function")throw new Jf(m);return x=Ys(x),function(){if(--x<1)return C.apply(this,arguments)}}function cT(x,C,F){return C=F?d:C,C=x&&C==null?x.length:C,Q0(x,Ot,d,d,d,d,C)}function Db(x,C){var F;if(typeof C!="function")throw new Jf(m);return x=Ys(x),function(){return--x>0&&(F=C.apply(this,arguments)),x<=1&&(C=d),F}}var Dg=oo(function(x,C,F){var J=tt;if(F.length){var mt=Fl(F,t2(Dg));J|=xt}return Q0(x,J,C,F,mt)}),G8=oo(function(x,C,F){var J=tt|Q;if(F.length){var mt=Fl(F,t2(G8));J|=xt}return Q0(C,J,x,F,mt)});function W8(x,C,F){C=F?d:C;var J=Q0(x,gt,d,d,d,d,d,C);return J.placeholder=W8.placeholder,J}function _r(x,C,F){C=F?d:C;var J=Q0(x,ft,d,d,d,d,d,C);return J.placeholder=_r.placeholder,J}function $8(x,C,F){var J,mt,St,Vt,ee,fe,Cn=0,kn=!1,Wn=!1,Ki=!0;if(typeof x!="function")throw new Jf(m);C=Mp(C)||0,$a(F)&&(kn=!!F.leading,Wn="maxWait"in F,St=Wn?vt(Mp(F.maxWait)||0,C):St,Ki="trailing"in F?!!F.trailing:Ki);function Er(yu){var nd=J,sm=mt;return J=mt=d,Cn=yu,Vt=x.apply(sm,nd),Vt}function Wr(yu){return Cn=yu,ee=H3(co,C),kn?Er(yu):Vt}function no(yu){var nd=yu-fe,sm=yu-Cn,M9=C-nd;return Wn?$t(M9,St-sm):M9}function Zr(yu){var nd=yu-fe,sm=yu-Cn;return fe===d||nd>=C||nd<0||Wn&&sm>=St}function co(){var yu=Cv();if(Zr(yu))return $o(yu);ee=H3(co,no(yu))}function $o(yu){return ee=d,Ki&&J?Er(yu):(J=mt=d,Vt)}function Hh(){ee!==d&&YR(ee),Cn=0,J=fe=mt=ee=d}function _f(){return ee===d?Vt:$o(Cv())}function $r(){var yu=Cv(),nd=Zr(yu);if(J=arguments,mt=this,fe=yu,nd){if(ee===d)return Wr(fe);if(Wn)return YR(ee),ee=H3(co,C),Er(fe)}return ee===d&&(ee=H3(co,C)),Vt}return $r.cancel=Hh,$r.flush=_f,$r}var V8=oo(function(x,C){return LR(x,1,C)}),Kj=oo(function(x,C,F){return LR(x,Mp(C)||0,F)});function q8(x){return Q0(x,se)}function e2(x,C){if(typeof x!="function"||C!=null&&typeof C!="function")throw new Jf(m);var F=function(){var J=arguments,mt=C?C.apply(this,J):J[0],St=F.cache;if(St.has(mt))return St.get(mt);var Vt=x.apply(this,J);return F.cache=St.set(mt,Vt)||St,Vt};return F.cache=new(e2.Cache||K0),F}e2.Cache=K0;function aT(x){if(typeof x!="function")throw new Jf(m);return function(){var C=arguments;switch(C.length){case 0:return!x.call(this);case 1:return!x.call(this,C[0]);case 2:return!x.call(this,C[0],C[1]);case 3:return!x.call(this,C[0],C[1],C[2])}return!x.apply(this,C)}}function Jj(x){return Db(2,x)}var Qj=Hz(function(x,C){C=C.length==1&&Us(C[0])?ea(C[0],Uu(cs())):ea(yh(C,1),Uu(cs()));var F=C.length;return oo(function(J){for(var mt=-1,St=$t(J.length,F);++mt=C}),kv=RR(function(){return arguments}())?RR:function(x){return ou(x)&&pc.call(x,"callee")&&!L3.call(x,"callee")},Us=$e.isArray,Z8=b3?Uu(b3):kz;function xh(x){return x!=null&&lT(x.length)&&!im(x)}function H(x){return ou(x)&&xh(x)}function uT(x){return x===!0||x===!1||ou(x)&&zl(x)==ki}var zd=S||bT,dH=AS?Uu(AS):DR;function Lv(x){return ou(x)&&x.nodeType===1&&!V3(x)}function Y8(x){if(x==null)return!0;if(xh(x)&&(Us(x)||typeof x=="string"||typeof x.splice=="function"||zd(x)||n2(x)||kv(x)))return!x.length;var C=zh(x);if(C==ut||C==yt)return!x.size;if(j3(x))return!jk(x).length;for(var F in x)if(pc.call(x,F))return!1;return!0}function pH(x,C){return F3(x,C)}function gH(x,C,F){F=typeof F=="function"?F:d;var J=F?F(x,C):d;return J===d?F3(x,C,d,F):!!J}function v5(x){if(!ou(x))return!1;var C=zl(x);return C==Kt||C==pr||typeof x.message=="string"&&typeof x.name=="string"&&!V3(x)}function mH(x){return typeof x=="number"&&D(x)}function im(x){if(!$a(x))return!1;var C=zl(x);return C==wn||C==it||C==Yi||C==Pn}function K8(x){return typeof x=="number"&&x==Ys(x)}function lT(x){return typeof x=="number"&&x>-1&&x%1==0&&x<=hn}function $a(x){var C=typeof x;return x!=null&&(C=="object"||C=="function")}function ou(x){return x!=null&&typeof x=="object"}var J8=kS?Uu(kS):NR;function _5(x,C){return x===C||zk(x,C,r5(C))}function bH(x,C,F){return F=typeof F=="function"?F:d,zk(x,C,r5(C),F)}function wH(x){return Q8(x)&&x!=+x}function vH(x){if(c5(x))throw new vs(p);return OR(x)}function _H(x){return x===null}function yH(x){return x==null}function Q8(x){return typeof x=="number"||ou(x)&&zl(x)==kt}function V3(x){if(!ou(x)||zl(x)!=ie)return!1;var C=Cg(x);if(C===null)return!0;var F=pc.call(C,"constructor")&&C.constructor;return typeof F=="function"&&F instanceof F&&Tg.call(F)==Pk}var Nb=Iy?Uu(Iy):Lz;function xH(x){return K8(x)&&x>=-hn&&x<=hn}var t9=LS?Uu(LS):Pz;function hT(x){return typeof x=="string"||!Us(x)&&ou(x)&&zl(x)==ue}function jd(x){return typeof x=="symbol"||ou(x)&&zl(x)==fn}var n2=Od?Uu(Od):Iz;function MH(x){return x===d}function EH(x){return ou(x)&&zh(x)==zn}function SH(x){return ou(x)&&zl(x)==Li}var TH=eT(Hk),CH=eT(function(x,C){return x<=C});function e9(x){if(!x)return[];if(xh(x))return hT(x)?Kf(x):td(x);if(Mb&&x[Mb])return Ak(x[Mb]());var C=zh(x),F=C==ut?gv:C==yt?jy:i2;return F(x)}function rm(x){if(!x)return x===0?x:0;if(x=Mp(x),x===re||x===-re){var C=x<0?-1:1;return C*Se}return x===x?x:0}function Ys(x){var C=rm(x),F=C%1;return C===C?F?C-F:C:0}function n9(x){return x?Mv(Ys(x),0,mn):0}function Mp(x){if(typeof x=="number")return x;if(jd(x))return ke;if($a(x)){var C=typeof x.valueOf=="function"?x.valueOf():x;x=$a(C)?C+"":C}if(typeof x!="string")return x===0?x:+x;x=Yf(x);var F=Rt.test(x);return F||Je.test(x)?TS(x.slice(2),F?2:8):l3.test(x)?ke:+x}function i9(x){return Ig(x,ed(x))}function AH(x){return x?Mv(Ys(x),-hn,hn):x===0?x:0}function Ac(x){return x==null?"":Fd(x)}var kH=Jy(function(x,C){if(j3(C)||xh(C)){Ig(C,Hl(C),x);return}for(var F in C)pc.call(C,F)&&I3(x,F,C[F])}),r9=Jy(function(x,C){Ig(C,ed(C),x)}),s9=Jy(function(x,C,F,J){Ig(C,ed(C),x,J)}),y5=Jy(function(x,C,F,J){Ig(C,Hl(C),x,J)}),LH=tm(Bk);function PH(x,C){var F=Sb(x);return C==null?F:AR(F,C)}var IH=oo(function(x,C){x=Fc(x);var F=-1,J=C.length,mt=J>2?C[2]:d;for(mt&&jh(C[0],C[1],mt)&&(J=1);++F1),St}),Ig(x,n5(x),F),J&&(F=_p(F,B|P|U,Qz));for(var mt=C.length;mt--;)Xk(F,C[mt]);return F});function XH(x,C){return c9(x,aT(cs(C)))}var fT=tm(function(x,C){return x==null?{}:Gk(x,C)});function c9(x,C){if(x==null)return{};var F=ea(n5(x),function(J){return[J]});return C=cs(C),HR(x,F,function(J,mt){return C(J,mt[0])})}function ZH(x,C,F){C=Pb(C,x);var J=-1,mt=C.length;for(mt||(mt=1,x=d);++JC){var J=x;x=C,C=J}if(F||x%1||C%1){var mt=Un();return $t(x+mt*(C-x+xk("1e-"+((mt+"").length-1))),C)}return $k(x,C)}var sG=Qy(function(x,C,F){return C=C.toLowerCase(),x+(F?l9(C):C)});function l9(x){return S5(Ac(x).toLowerCase())}function h9(x){return x=Ac(x),x&&x.replace(Ze,pv).replace(d3,"")}function oG(x,C,F){x=Ac(x),C=Fd(C);var J=x.length;F=F===d?J:Mv(Ys(F),0,J);var mt=F;return F-=C.length,F>=0&&x.slice(F,mt)==C}function cG(x){return x=Ac(x),x&&sn.test(x)?x.replace(Qt,OS):x}function aG(x){return x=Ac(x),x&&il.test(x)?x.replace(fc,"\\$&"):x}var uG=Qy(function(x,C,F){return x+(F?"-":"")+C.toLowerCase()}),lG=Qy(function(x,C,F){return x+(F?" ":"")+C.toLowerCase()}),hG=r8("toLowerCase");function fG(x,C,F){x=Ac(x),C=Ys(C);var J=C?h1(x):0;if(!C||J>=C)return x;var mt=(C-J)/2;return tT(Yy(mt),F)+x+tT(_v(mt),F)}function dG(x,C,F){x=Ac(x),C=Ys(C);var J=C?h1(x):0;return C&&J>>0,F?(x=Ac(x),x&&(typeof C=="string"||C!=null&&!Nb(C))&&(C=Fd(C),!C&&gf(x))?Ib(Kf(x),0,F):x.split(C,F)):[]}var _G=Qy(function(x,C,F){return x+(F?" ":"")+S5(C)});function f9(x,C,F){return x=Ac(x),F=F==null?0:Mv(Ys(F),0,x.length),C=Fd(C),x.slice(F,F+C.length)==C}function kr(x,C,F){var J=Mt.templateSettings;F&&jh(x,C,F)&&(C=d),x=Ac(x),C=y5({},C,J,h8);var mt=y5({},C.imports,J.imports,h8),St=Hl(mt),Vt=T3(mt,St);su(St,function(Zr){if(j0.test(Zr))throw new vs(E)});var ee,fe,Cn=0,kn=C.interpolate||Hi,Wn="__p += '",Ki=mf((C.escape||Hi).source+"|"+kn.source+"|"+(kn===Jr?vg:Hi).source+"|"+(C.evaluate||Hi).source+"|$","g"),Er="//# sourceURL="+(pc.call(C,"sourceURL")?(C.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++sl+"]")+` +`;x.replace(Ki,function(Zr,co,$o,Hh,_f,$r){return $o||($o=Hh),Wn+=x.slice(Cn,$r).replace(Pr,Uy),co&&(ee=!0,Wn+=`' + __e(`+co+`) + '`),_f&&(fe=!0,Wn+=`'; `+_f+`; @@ -61,11 +61,11 @@ __p += '`),$o&&(Wn+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+Wn+`return __p -}`;var no=u9(function(){return Wo(St,Er+"return "+Wn).apply(d,Vt)});if(no.source=Wn,m5(no))throw no;return no}function bG(x){return Ac(x).toLowerCase()}function wG(x){return Ac(x).toUpperCase()}function vG(x,C,F){if(x=Ac(x),x&&(F||C===d))return Yf(x);if(!x||!(C=Fd(C)))return x;var J=Kf(x),mt=Kf(C),St=IS(J,mt),Vt=V0(J,mt)+1;return Ib(J,St,Vt).join("")}function _G(x,C,F){if(x=Ac(x),x&&(F||C===d))return x.slice(0,zy(x)+1);if(!x||!(C=Fd(C)))return x;var J=Kf(x),mt=V0(J,Kf(C))+1;return Ib(J,0,mt).join("")}function yG(x,C,F){if(x=Ac(x),x&&(F||C===d))return x.replace(va,"");if(!x||!(C=Fd(C)))return x;var J=Kf(x),mt=IS(J,Kf(C));return Ib(J,mt).join("")}function xG(x,C){var F=ot,J=Lt;if($a(C)){var mt="separator"in C?C.separator:mt;F="length"in C?Ys(C.length):F,J="omission"in C?Fd(C.omission):J}x=Ac(x);var St=x.length;if(gf(x)){var Vt=Kf(x);St=Vt.length}if(F>=St)return x;var ee=F-h1(J);if(ee<1)return J;var fe=Vt?Ib(Vt,0,ee).join(""):x.slice(0,ee);if(mt===d)return fe+J;if(Vt&&(ee+=fe.length-ee),Nb(mt)){if(x.slice(ee).search(mt)){var Cn,kn=fe;for(mt.global||(mt=mf(mt.source,Ac(ov.exec(mt))+"g")),mt.lastIndex=0;Cn=mt.exec(kn);)var Wn=Cn.index;fe=fe.slice(0,Wn===d?ee:Wn)}}else if(x.indexOf(Fd(mt),ee)!=ee){var Ki=fe.lastIndexOf(mt);Ki>-1&&(fe=fe.slice(0,Ki))}return fe+J}function MG(x){return x=Ac(x),x&&Mi.test(x)?x.replace(Ln,jy):x}var EG=Ky(function(x,C,F){return x+(F?" ":"")+C.toUpperCase()}),x5=t8("toUpperCase");function n2(x,C,F){return x=Ac(x),C=F?d:C,C===d?Fy(x)?yb(x):Ry(x):x.match(C)||[]}var u9=oo(function(x,C){try{return df(x,d,C)}catch(F){return m5(F)?F:new vs(F)}}),lT=tm(function(x,C){return su(C,function(F){F=g1(F),Lg(x,F,Dg(x[F],x))}),x});function hT(x){var C=x==null?0:x.length,F=cs();return x=C?ea(x,function(J){if(typeof J[1]!="function")throw new Jf(m);return[F(J[0]),J[1]]}):[],oo(function(J){for(var mt=-1;++mthn)return[];var F=mn,J=$t(x,mn);C=cs(C),x-=mn;for(var mt=Oy(J,C);++F0||C<0)?new po(F):(x<0?F=F.takeRight(-x):x&&(F=F.drop(x)),C!==d&&(C=Ys(C),F=C<0?F.dropRight(-C):F.take(C-x)),F)},po.prototype.takeRightWhile=function(x){return this.reverse().takeWhile(x).reverse()},po.prototype.toArray=function(){return this.take(mn)},Pg(po.prototype,function(x,C){var F=/^(?:filter|find|map|reject)|While$/.test(C),J=/^(?:head|last)$/.test(C),mt=Mt[J?"take"+(C=="last"?"Right":""):C],St=J||/^find/.test(C);mt&&(Mt.prototype[C]=function(){var Vt=this.__wrapped__,ee=J?[1]:arguments,fe=Vt instanceof po,Cn=ee[0],kn=fe||Us(Vt),Wn=function(co){var $o=mt.apply(Mt,Eg([co],ee));return J&&Ki?$o[0]:$o};kn&&F&&typeof Cn=="function"&&Cn.length!=1&&(fe=kn=!1);var Ki=this.__chain__,Er=!!this.__actions__.length,Wr=St&&!Ki,no=fe&&!Er;if(!St&&kn){Vt=no?Vt:new po(this);var Zr=x.apply(Vt,ee);return Zr.__actions__.push({func:d5,args:[Wn],thisArg:d}),new bf(Zr,Ki)}return Wr&&no?x.apply(this,ee):(Zr=this.thru(Wn),Wr?J?Zr.value()[0]:Zr.value():Zr)})}),su(["pop","push","shift","sort","splice","unshift"],function(x){var C=q0[x],F=/^(?:push|sort|unshift)$/.test(x)?"tap":"thru",J=/^(?:pop|shift)$/.test(x);Mt.prototype[x]=function(){var mt=arguments;if(J&&!this.__chain__){var St=this.value();return C.apply(Us(St)?St:[],mt)}return this[F](function(Vt){return C.apply(Us(Vt)?Vt:[],mt)})}}),Pg(po.prototype,function(x,C){var F=Mt[C];if(F){var J=F.name+"";pc.call(Eb,J)||(Eb[J]=[]),Eb[J].push({name:C,func:F})}}),Eb[ZS(d,Q).name]=[{name:"wrapper",func:d}],po.prototype.clone=qU,po.prototype.reverse=XU,po.prototype.value=ZU,Mt.prototype.at=Snt,Mt.prototype.chain=Tnt,Mt.prototype.commit=Cnt,Mt.prototype.next=jl,Mt.prototype.plant=knt,Mt.prototype.reverse=Lnt,Mt.prototype.toJSON=Mt.prototype.valueOf=Mt.prototype.value=jj,Mt.prototype.first=Mt.prototype.head,Mb&&(Mt.prototype[Mb]=Ant),Mt},Bd=Gy();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Cc._=Bd,define(function(){return Bd})):Mg?((Mg.exports=Bd)._=Bd,$0._=Bd):Cc._=Bd}).call(CI)});var rU=Ld(iU=>{"use strict";Object.defineProperty(iU,"__esModule",{value:!0});var vtt=eU(),y_t=OA(),$Xt;(function(d){d.skin=null;function s(N,B){var P=y_t.filter(N,function(U){if(U instanceof Array&&U[0]==="g")return U[1]["s:pid"].startsWith(B)});return P}d.getPortsWithPrefix=s;function h(N,B){var P=y_t.filter(N,function(U){var W=U[0];if(U instanceof Array&&W==="g"){var q=U[1];return B(q)}return!1});return P.map(function(U){return U[1]["s:pid"]})}function g(N){return h(N,function(B){return B["s:position"]?B["s:position"]==="top":!1})}d.getInputPids=g;function m(N){return h(N,function(B){return B["s:position"]?B["s:position"]==="bottom":!1})}d.getOutputPids=m;function _(N){return h(N,function(B){return B["s:dir"]?B["s:dir"]==="lateral":B["s:position"]?B["s:position"]==="left"||B["s:position"]==="right":!1})}d.getLateralPortPids=_;function S(N){var B=null;return vtt.traverse(d.skin,{enter:function(P,U){P.name==="s:alias"&&P.attr.val===N&&(B=U)}}),B==null&&vtt.traverse(d.skin,{enter:function(P){P.attr["s:type"]==="generic"&&(B=P)}}),B.full}d.findSkinType=S;function y(){var N=[];return vtt.t(d.skin,{enter:function(B){B.name==="s:low_priority_alias"&&N.push(B.attr.value)}}),N}d.getLowPriorityAliases=y;function R(){var N;return vtt.t(d.skin,{enter:function(B){B.name==="s:properties"?N=y_t.mapValues(B.attr,function(P){return isNaN(Number(P))?P==="true"?!0:P==="false"?!1:P:Number(P)}):B.name==="s:layoutEngine"&&(N.layoutEngine=B.attr)}}),N.layoutEngine||(N.layoutEngine={}),N}d.getProperties=R})($Xt=iU.Skin||(iU.Skin={}));iU.default=$Xt});var VXt=Ld(M_t=>{"use strict";Object.defineProperty(M_t,"__esModule",{value:!0});var x_t;(function(d){var s;(function(S){S.Zero="0",S.One="1",S.X="x"})(s||(s={}));var h;(function(S){S.Input="input",S.Output="output"})(h=d.Direction||(d.Direction={}));function g(S){return S.port_directions?Object.keys(S.port_directions).filter(function(y){return S.port_directions[y]===h.Input}):[]}d.getInputPortPids=g;function m(S){return S.port_directions?Object.keys(S.port_directions).filter(function(y){return S.port_directions[y]===h.Output}):[]}d.getOutputPortPids=m;var _;(function(S){S[S.Hide=0]="Hide",S[S.NoHide=1]="NoHide"})(_||(_={}))})(x_t||(x_t={}));M_t.default=x_t});var qXt=Ld(S_t=>{"use strict";Object.defineProperty(S_t,"__esModule",{value:!0});var tMe=T_t(),E_t=OA(),eMe=function(){function d(s,h){this.key=s,this.value=h}return Object.defineProperty(d.prototype,"Key",{get:function(){return this.key},enumerable:!0,configurable:!0}),d.prototype.keyIn=function(s){return E_t.includes(s,this.key)},d.prototype.maxVal=function(){return E_t.max(E_t.map(this.value,function(s){return Number(s)}))},d.prototype.valString=function(){return","+this.value.join()+","},d.prototype.findConstants=function(s,h,g){var m=this,_="",S=[],y=this.value;return y.forEach(function(R,N){R==="0"||R==="1"?(h+=1,_+=R,y[N]=h,S.push(h)):S.length>0&&(m.assignConstant(_,S,N,s,g),_="",S=[])}),S.length>0&&this.assignConstant(_,S,y.length,s,g),h},d.prototype.getGenericElkPort=function(s,h,g){var m=this.parentNode.Key,_=this.parentNode.getTemplate()[1]["s:type"];if(s===0){var S={id:m+"."+this.key,width:1,height:1,x:Number(h[0][1]["s:x"]),y:Number(h[0][1]["s:y"])};return(_==="generic"||_==="join")&&g==="in"&&(S.labels=[{id:m+"."+this.key+".label",text:this.key,x:Number(h[0][2][1].x)-10,y:Number(h[0][2][1].y)-6,width:6*this.key.length,height:11}]),(_==="generic"||_==="split")&&g==="out"&&(S.labels=[{id:m+"."+this.key+".label",text:this.key,x:Number(h[0][2][1].x)-10,y:Number(h[0][2][1].y)-6,width:6*this.key.length,height:11}]),S}else{var y=Number(h[1][1]["s:y"])-Number(h[0][1]["s:y"]),S={id:m+"."+this.key,width:1,height:1,x:Number(h[0][1]["s:x"]),y:s*y+Number(h[0][1]["s:y"])};return _==="generic"&&(S.labels=[{id:m+"."+this.key+".label",text:this.key,x:Number(h[0][2][1].x)-10,y:Number(h[0][2][1].y)-6,width:6*this.key.length,height:11}]),S}},d.prototype.assignConstant=function(s,h,g,m,_){var S=this,y=s.split("").reverse().join("");if(m.hasOwnProperty(y)){var R=m[y],N=R.length;R.forEach(function(B,P){var U=g-N+P;S.value[U]=B})}else _.push(tMe.default.fromConstantInfo(y,h)),m[y]=h},d}();S_t.Port=eMe});var XXt=Ld((iJe,_tt)=>{var nMe=function(){"use strict";function d(B,P){return P!=null&&B instanceof P}var s;try{s=Map}catch{s=function(){}}var h;try{h=Set}catch{h=function(){}}var g;try{g=Promise}catch{g=function(){}}function m(B,P,U,W,q){typeof P=="object"&&(U=P.depth,W=P.prototype,q=P.includeNonEnumerable,P=P.circular);var nt=[],Q=[],X=typeof Buffer<"u";typeof P>"u"&&(P=!0),typeof U>"u"&&(U=1/0);function gt(ft,xt){if(ft===null)return null;if(xt===0)return ft;var Bt,Ot;if(typeof ft!="object")return ft;if(d(ft,s))Bt=new s;else if(d(ft,h))Bt=new h;else if(d(ft,g))Bt=new g(function(xe,re){ft.then(function(hn){xe(gt(hn,xt-1))},function(hn){re(gt(hn,xt-1))})});else if(m.__isArray(ft))Bt=[];else if(m.__isRegExp(ft))Bt=new RegExp(ft.source,N(ft)),ft.lastIndex&&(Bt.lastIndex=ft.lastIndex);else if(m.__isDate(ft))Bt=new Date(ft.getTime());else{if(X&&Buffer.isBuffer(ft))return Buffer.allocUnsafe?Bt=Buffer.allocUnsafe(ft.length):Bt=new Buffer(ft.length),ft.copy(Bt),Bt;d(ft,Error)?Bt=Object.create(ft):typeof W>"u"?(Ot=Object.getPrototypeOf(ft),Bt=Object.create(Ot)):(Bt=Object.create(W),Ot=W)}if(P){var Pt=nt.indexOf(ft);if(Pt!=-1)return Q[Pt];nt.push(ft),Q.push(Bt)}d(ft,s)&&ft.forEach(function(xe,re){var hn=gt(re,xt-1),Se=gt(xe,xt-1);Bt.set(hn,Se)}),d(ft,h)&&ft.forEach(function(xe){var re=gt(xe,xt-1);Bt.add(re)});for(var se in ft){var ot;Ot&&(ot=Object.getOwnPropertyDescriptor(Ot,se)),!(ot&&ot.set==null)&&(Bt[se]=gt(ft[se],xt-1))}if(Object.getOwnPropertySymbols)for(var Lt=Object.getOwnPropertySymbols(ft),se=0;se{"use strict";Object.defineProperty(L_t,"__esModule",{value:!0});var ytt=P_t(),C_t=VXt(),n1=rU(),YE=qXt(),A_t=OA(),sU=XXt(),xtt=eU(),iMe=function(){function d(s,h,g,m,_){var S=this;this.key=s,this.type=h,this.inputPorts=g,this.outputPorts=m,this.attributes=_||{},g.forEach(function(y){y.parentNode=S}),m.forEach(function(y){y.parentNode=S})}return d.fromPort=function(s,h){var g=s.direction===C_t.default.Direction.Input;return g?new d(h,"$_inputExt_",[],[new YE.Port("Y",s.bits)],{}):new d(h,"$_outputExt_",[new YE.Port("A",s.bits)],[],{})},d.fromYosysCell=function(s,h){var g=n1.default.findSkinType(s.type),m=n1.default.getInputPids(g),_=n1.default.getOutputPids(g),S=A_t.map(s.connections,function(P,U){return new YE.Port(U,P)}),y=S.filter(function(P){return P.keyIn(m)}),R=S.filter(function(P){return P.keyIn(_)});if(y.length+R.length!==S.length){var N=C_t.default.getInputPortPids(s),B=C_t.default.getOutputPortPids(s);y=S.filter(function(P){return P.keyIn(N)}),R=S.filter(function(P){return P.keyIn(B)})}return new d(h,s.type,y,R,s.attributes)},d.fromConstantInfo=function(s,h){return new d(s,"$_constant_",[],[new YE.Port("Y",h)],{})},d.fromJoinInfo=function(s,h){var g=s.slice(1,-1).split(","),m=g.map(function(y){return Number(y)}),_=[new YE.Port("Y",m)],S=h.map(function(y){return new YE.Port(y,ZXt(m,y))});return new d("$join$"+s,"$_join_",S,_,{})},d.fromSplitInfo=function(s,h){var g=s.slice(1,-1).split(","),m=g.map(function(y){return Number(y)}),_=[new YE.Port("A",m)],S=h.map(function(y){var R=ZXt(m,y);return new YE.Port(y,R)});return new d("$split$"+s,"$_split_",_,S,{})},Object.defineProperty(d.prototype,"Type",{get:function(){return this.type},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"Key",{get:function(){return this.key},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"InputPorts",{get:function(){return this.inputPorts},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"OutputPorts",{get:function(){return this.outputPorts},enumerable:!0,configurable:!0}),d.prototype.maxOutVal=function(s){var h=A_t.max(this.outputPorts.map(function(g){return g.maxVal()}));return A_t.max([h,s])},d.prototype.findConstants=function(s,h,g){return this.inputPorts.forEach(function(m){h=m.findConstants(s,h,g)}),h},d.prototype.inputPortVals=function(){return this.inputPorts.map(function(s){return s.valString()})},d.prototype.outputPortVals=function(){return this.outputPorts.map(function(s){return s.valString()})},d.prototype.collectPortsByDirection=function(s,h,g,m){var _=n1.default.findSkinType(this.type),S=n1.default.getLateralPortPids(_);this.inputPorts.forEach(function(y){var R=y.keyIn(S);R||_[1]["s:type"]==="generic"&&m?ytt.addToDefaultDict(g,y.valString(),y):ytt.addToDefaultDict(s,y.valString(),y)}),this.outputPorts.forEach(function(y){var R=y.keyIn(S);R||_[1]["s:type"]==="generic"&&m?ytt.addToDefaultDict(g,y.valString(),y):ytt.addToDefaultDict(h,y.valString(),y)})},d.prototype.getValueAttribute=function(){return this.attributes&&this.attributes.value?this.attributes.value:null},d.prototype.getTemplate=function(){return n1.default.findSkinType(this.type)},d.prototype.buildElkChild=function(){var s=this,h=this.getTemplate(),g=h[1]["s:type"],m={"org.eclipse.elk.portConstraints":"FIXED_POS"},_=null,S=null;for(var y in this.attributes)if(y.startsWith("org.eclipse.elk")){if(y==="org.eclipse.elk.x"){_=this.attributes[y];continue}if(y==="org.eclipse.elk.y"){S=this.attributes[y];continue}m[y]=this.attributes[y]}if(g==="join"||g==="split"||g==="generic"){var R=n1.default.getPortsWithPrefix(h,"in"),N=n1.default.getPortsWithPrefix(h,"out"),B=this.inputPorts.map(function(Q,X){return Q.getGenericElkPort(X,R,"in")}),P=this.outputPorts.map(function(Q,X){return Q.getGenericElkPort(X,N,"out")}),U={id:this.key,width:Number(h[1]["s:width"]),height:Number(this.getGenericHeight()),ports:B.concat(P),layoutOptions:m,labels:[]};return _&&(U.x=_),S&&(U.y=S),this.addLabels(h,U),U}var W=n1.default.getPortsWithPrefix(h,"").map(function(Q){return{id:s.key+"."+Q[1]["s:pid"],width:0,height:0,x:Number(Q[1]["s:x"]),y:Number(Q[1]["s:y"])}}),q=Number(h[1]["s:width"]),nt={id:this.key,width:q,height:Number(h[1]["s:height"]),ports:W,layoutOptions:m,labels:[]};return _&&(nt.x=_),S&&(nt.y=S),this.addLabels(h,nt),nt},d.prototype.render=function(s){for(var h=this.getTemplate(),g=sU(h),m=0,_=s.labels;m<_.length;m++){var S=_[m],y=S.id.split(".")[2];rMe(g,y,S.text)}for(var R=2;R3){var y=parseInt(g.key,2);S="0x"+y.toString(16)}else S=g.key;g.attributes[_]=g.key}else if(_ in g.attributes)S=g.attributes[_];else return;h.labels.push({id:g.key+".label."+_,text:S,x:m.attr.x,y:m.attr.y-6,height:11,width:6*S.length})}}})},d.prototype.getGenericHeight=function(){var s=this.getTemplate(),h=n1.default.getPortsWithPrefix(s,"in"),g=n1.default.getPortsWithPrefix(s,"out");if(this.inputPorts.length>this.outputPorts.length){var m=Number(h[1][1]["s:y"])-Number(h[0][1]["s:y"]);return Number(s[1]["s:height"])+m*(this.inputPorts.length-2)}if(g.length>1){var m=Number(g[1][1]["s:y"])-Number(g[0][1]["s:y"]);return Number(s[1]["s:height"])+m*(this.outputPorts.length-2)}return Number(s[1]["s:height"])},d}();L_t.default=iMe;function k_t(d,s){xtt.traverse(d,{enter:function(h){h.name==="rect"&&h.attr["s:generic"]==="body"&&(h.attr.height=s)}})}function rMe(d,s,h){xtt.traverse(d,{enter:function(g){g.name==="text"&&g.attr["s:attribute"]===s&&(g.full[2]=h)}})}function sMe(d,s,h){xtt.traverse(d,{enter:function(g){var m=g.attr.class;m&&m.includes(s)&&(g.attr.class=m.replace(s,h))}})}function ZXt(d,s){var h=s.indexOf(":");if(h===-1)return[d[Number(s)]];var g=s.slice(0,h),m=s.slice(h+1),_=d.slice(Number(g),Number(m)+1);return _}});var P_t=Ld(AI=>{"use strict";Object.defineProperty(AI,"__esModule",{value:!0});var oMe=rU(),Mtt=T_t(),P0=OA(),cMe=function(){function d(s){var h=this;this.moduleName=null,P0.forEach(s.modules,function(S,y){S.attributes&&Number(S.attributes.top)===1&&(h.moduleName=y)}),this.moduleName==null&&(this.moduleName=Object.keys(s.modules)[0]);var g=s.modules[this.moduleName],m=P0.map(g.ports,Mtt.default.fromPort),_=P0.map(g.cells,function(S,y){return Mtt.default.fromYosysCell(S,y)});this.nodes=_.concat(m),this.wires=[]}return d.prototype.addConstants=function(){var s=this.nodes.reduce(function(m,_){return _.maxOutVal(m)},-1),h={},g=[];this.nodes.forEach(function(m){s=m.findConstants(h,s,g)}),this.nodes=this.nodes.concat(g)},d.prototype.addSplitsJoins=function(){var s=P0.flatMap(this.nodes,function(S){return S.inputPortVals()}),h=P0.flatMap(this.nodes,function(S){return S.outputPortVals()}),g=s.slice(),m={},_={};s.forEach(function(S){cU(h,g,S,0,S.length,m,_)}),this.nodes=this.nodes.concat(P0.map(_,function(S,y){return Mtt.default.fromJoinInfo(y,S)})).concat(P0.map(m,function(S,y){return Mtt.default.fromSplitInfo(y,S)}))},d.prototype.createWires=function(){var s=oMe.default.getProperties(),h={},g={},m={};this.nodes.forEach(function(y){y.collectPortsByDirection(h,g,m,s.genericsLaterals)});var _=JXt(P0.keys(h).concat(P0.keys(g)).concat(P0.keys(m))),S=_.map(function(y){var R=g[y]||[],N=h[y]||[],B=m[y]||[],P={netName:y,drivers:R,riders:N,laterals:B};return R.concat(N).concat(B).forEach(function(U){U.wire=P}),P});this.wires=S},d}();AI.FlatModule=cMe;function aMe(d){var s="";return d.forEach(function(h){var g=String(h);s===""?s=g:s+=","+g}),","+s+","}AI.arrayToBitstring=aMe;function KXt(d,s){return s.indexOf(d)>-1}function YXt(d,s){return P0.findIndex(s,function(h){return KXt(d,h)})}function oU(d,s,h){d[s]===void 0?d[s]=[h]:d[s].push(h)}AI.addToDefaultDict=oU;function Ett(d,s,h){var g=P0.max([d.indexOf(s),h]),m=d.substring(0,g).split(",").length-1,_=m+s.split(",").length-3;return m===_?String(m):String(m)+":"+String(_)}function cU(d,s,h,g,m,_,S){var y=s.indexOf(h);if(y!==-1&&s.splice(y,1),!(g>=h.length||m-g<2)){var R=h.slice(g,m);if(KXt(R,d)){R!==h&&oU(S,h,Ett(h,R,g)),cU(d,s,h,m-1,h.length,_,S);return}var N=YXt(R,d);if(N!==-1){R!==h&&oU(S,h,Ett(h,R,g)),oU(_,d[N],Ett(d[N],R,0)),d.push(R),cU(d,s,h,m-1,h.length,_,S);return}if(YXt(R,s)!==-1){R!==h&&oU(S,h,Ett(h,R,g)),cU(d,[],R,0,R.length,_,S),d.push(R);return}cU(d,s,h,g,g+R.slice(0,-1).lastIndexOf(",")+1,_,S)}}function JXt(d){var s={};return d.forEach(function(h){s[h]=!0}),P0.keys(s)}AI.removeDups=JXt});var R_t=Ld(aU=>{"use strict";Object.defineProperty(aU,"__esModule",{value:!0});var tZt=OA(),Gf;(function(d){d.wireNameLookup={},d.dummyNum=0,d.edgeIndex=0})(Gf=aU.ElkModel||(aU.ElkModel={}));function uMe(d){var s=d.nodes.map(function(g){return g.buildElkChild()});Gf.edgeIndex=0,Gf.dummyNum=0;var h=tZt.flatMap(d.wires,function(g){if(g.drivers.length>0&&g.riders.length>0&&g.laterals.length===0){var m=[];return I_t(g.drivers,g.riders,m),m}else if(g.drivers.concat(g.riders).length>0&&g.laterals.length>0){var m=[];return I_t(g.drivers,g.laterals,m),I_t(g.laterals,g.riders,m),m}else if(g.riders.length===0&&g.drivers.length>1){var _=QXt(s);Gf.dummyNum+=1;var S=g.drivers.map(function(P){var U=P.parentNode.Key,W="e"+String(Gf.edgeIndex);Gf.edgeIndex+=1;var q={id:W,source:U,sourcePort:U+"."+P.key,target:_,targetPort:_+".p"};return Gf.wireNameLookup[W]=P.wire.netName,q});return S}else if(g.riders.length>1&&g.drivers.length===0){var y=QXt(s);Gf.dummyNum+=1;var S=g.riders.map(function(U){var W=U.parentNode.Key,q="e"+String(Gf.edgeIndex);Gf.edgeIndex+=1;var nt={id:q,source:y,sourcePort:y+".p",target:W,targetPort:W+"."+U.key};return Gf.wireNameLookup[q]=U.wire.netName,nt});return S}else if(g.laterals.length>1){var R=g.laterals[0],N=R.parentNode.Key,B=g.laterals.slice(1).map(function(P){var U=P.parentNode.Key,W="e"+String(Gf.edgeIndex);Gf.edgeIndex+=1;var q={id:W,source:N,sourcePort:N+"."+R.key,target:U,targetPort:U+"."+P.key};return Gf.wireNameLookup[W]=P.wire.netName,q});return B}return[]});return{id:d.moduleName,children:s,edges:h}}aU.buildElkGraph=uMe;function QXt(d){var s="$d_"+String(Gf.dummyNum),h={id:s,width:0,height:0,ports:[{id:s+".p",width:0,height:0}],layoutOptions:{"org.eclipse.elk.portConstraints":"FIXED_SIDE"}};return d.push(h),s}function I_t(d,s,h){var g=tZt.flatMap(d,function(m){var _=m.parentNode.key,S=_+"."+m.key;return s.map(function(y){var R=y.parentNode.key,N=R+"."+y.key,B="e"+Gf.edgeIndex,P={id:B,sources:[S],targets:[N]};return Gf.wireNameLookup[B]=y.wire.netName,m.parentNode.type!=="$dff"&&(P.layoutOptions={"org.eclipse.elk.layered.priority.direction":10}),Gf.edgeIndex+=1,P})});h.push.apply(h,g)}});var sZt=Ld(LI=>{"use strict";var eZt=LI&&LI.__spreadArrays||function(){for(var d=0,s=0,h=arguments.length;s0?[X.bendPoints[0]]:X.endPoint:X.bendPoints&&X.bendPoints.length>0?[_y.last(X.bendPoints)]:X.startPoint}).map(function(Q){return Q.x>N.x?kI.Right:Q.xN.y?kI.Down:kI.Up}));nt.size<3&&_.forEach(function(Q){Q.junctionPoints&&(Q.junctionPoints=Q.junctionPoints.filter(function(X){return!_y.isEqual(X,N)}))}),s+=1};s<1e4;){var g=h();if(g==="break")break}}LI.removeDummyEdges=rZt});var lZt=Ld(Ttt=>{"use strict";Object.defineProperty(Ttt,"__esModule",{value:!0});var dMe=IXt(),pMe=eU(),gMe=P_t(),Stt=rU(),cZt=R_t(),oZt=sZt(),aZt=new dMe;function uZt(d,s){Stt.default.skin=pMe.p(d);var h=Stt.default.getProperties(),g=new gMe.FlatModule(s);return h.constants!==!1&&g.addConstants(),h.splitsAndJoins!==!1&&g.addSplitsJoins(),g.createWires(),g}function mMe(d,s,h,g){var m=uZt(d,s),_=cZt.buildElkGraph(m);if(h){g(null,JSON.stringify(_,null,2));return}var S=Stt.default.getProperties(),y=aZt.layout(_,{layoutOptions:S.layoutEngine});y.then(function(R){g(null,JSON.stringify(R,null,2))}).catch(function(R){throw Error(R)})}Ttt.dumpLayout=mMe;function bMe(d,s,h,g){var m=uZt(d,s),_=cZt.buildElkGraph(m),S=Stt.default.getProperties(),y;return g?y=new Promise(function(R){oZt.default(g,m),R()}):y=aZt.layout(_,{layoutOptions:S.layoutEngine}).then(function(R){return oZt.default(R,m)}).catch(function(R){console.error(R)}),typeof h=="function"&&y.then(function(R){return h(null,R),R}).catch(function(R){throw Error(R)}),y}Ttt.render=bMe});var qKe=AXt(LXt());var xAe=AXt(lZt());var s2t={};V3e(s2t,{AmbientLight:()=>Let,BoxGeometry:()=>XA,Color:()=>Go,DirectionalLight:()=>ket,DoubleSide:()=>Xw,EdgesGeometry:()=>Tet,GridHelper:()=>Iet,Group:()=>rS,InstancedMesh:()=>Eet,LineBasicMaterial:()=>rR,LineSegments:()=>EU,Matrix4:()=>Bu,Mesh:()=>gg,MeshBasicMaterial:()=>nR,MeshPhongMaterial:()=>Cet,PerspectiveCamera:()=>s1,Quaternion:()=>xy,Raycaster:()=>Pet,Scene:()=>xet,Vector2:()=>Nc,Vector3:()=>Ge,WebGLRenderer:()=>MU});var Jyt="160";var wMe=0,hZt=1,vMe=2;var GYt=1,_Me=2,Zx=3,aS=0,mg=1,Xw=2;var sS=0,YI=1,fZt=2,dZt=3,pZt=4,yMe=5,HA=100,xMe=101,MMe=102,gZt=103,mZt=104,EMe=200,SMe=201,TMe=202,CMe=203,dyt=204,pyt=205,AMe=206,kMe=207,LMe=208,PMe=209,IMe=210,RMe=211,DMe=212,NMe=213,OMe=214,BMe=0,FMe=1,UMe=2,net=3,zMe=4,jMe=5,HMe=6,GMe=7,Qyt=0,WMe=1,$Me=2,oS=0,VMe=1,qMe=2,XMe=3,ZMe=4,YMe=5,KMe=6;var WYt=300,QI=301,tR=302,gyt=303,myt=304,Ret=306,byt=1e3,Zw=1001,wyt=1002,r1=1003,bZt=1004;var D_t=1005;var bb=1006,JMe=1007;var wU=1008;var cS=1009,QMe=1010,tEe=1011,t2t=1012,$Yt=1013,nS=1014,iS=1015,vU=1016,VYt=1017,qYt=1018,$A=1020,eEe=1021,Yw=1023,nEe=1024,iEe=1025,VA=1026,eR=1027,rEe=1028,XYt=1029,sEe=1030,ZYt=1031,YYt=1033,N_t=33776,O_t=33777,B_t=33778,F_t=33779,wZt=35840,vZt=35841,_Zt=35842,yZt=35843,KYt=36196,xZt=37492,MZt=37496,EZt=37808,SZt=37809,TZt=37810,CZt=37811,AZt=37812,kZt=37813,LZt=37814,PZt=37815,IZt=37816,RZt=37817,DZt=37818,NZt=37819,OZt=37820,BZt=37821,U_t=36492,FZt=36494,UZt=36495,oEe=36283,zZt=36284,jZt=36285,HZt=36286;var iet=2300,ret=2301,z_t=2302,GZt=2400,WZt=2401,$Zt=2402;var JYt=3e3,qA=3001,cEe=3200,aEe=3201,QYt=0,uEe=1,wb="",Pd="srgb",Jx="srgb-linear",e2t="display-p3",Det="display-p3-linear",set="linear",vu="srgb",oet="rec709",cet="p3";var PI=7680;var VZt=519,lEe=512,hEe=513,fEe=514,tKt=515,dEe=516,pEe=517,gEe=518,mEe=519,qZt=35044;var XZt="300 es",vyt=1035,Kx=2e3,aet=2001,uS=class{addEventListener(s,h){this._listeners===void 0&&(this._listeners={});let g=this._listeners;g[s]===void 0&&(g[s]=[]),g[s].indexOf(h)===-1&&g[s].push(h)}hasEventListener(s,h){if(this._listeners===void 0)return!1;let g=this._listeners;return g[s]!==void 0&&g[s].indexOf(h)!==-1}removeEventListener(s,h){if(this._listeners===void 0)return;let m=this._listeners[s];if(m!==void 0){let _=m.indexOf(h);_!==-1&&m.splice(_,1)}}dispatchEvent(s){if(this._listeners===void 0)return;let g=this._listeners[s.type];if(g!==void 0){s.target=this;let m=g.slice(0);for(let _=0,S=m.length;_>8&255]+gp[d>>16&255]+gp[d>>24&255]+"-"+gp[s&255]+gp[s>>8&255]+"-"+gp[s>>16&15|64]+gp[s>>24&255]+"-"+gp[h&63|128]+gp[h>>8&255]+"-"+gp[h>>16&255]+gp[h>>24&255]+gp[g&255]+gp[g>>8&255]+gp[g>>16&255]+gp[g>>24&255]).toLowerCase()}function pg(d,s,h){return Math.max(s,Math.min(h,d))}function bEe(d,s){return(d%s+s)%s}function j_t(d,s,h){return(1-h)*d+h*s}function ZZt(d){return(d&d-1)===0&&d!==0}function yyt(d){return Math.pow(2,Math.floor(Math.log(d)/Math.LN2))}function uU(d,s){switch(s.constructor){case Float32Array:return d;case Uint32Array:return d/4294967295;case Uint16Array:return d/65535;case Uint8Array:return d/255;case Int32Array:return Math.max(d/2147483647,-1);case Int16Array:return Math.max(d/32767,-1);case Int8Array:return Math.max(d/127,-1);default:throw new Error("Invalid component type.")}}function dg(d,s){switch(s.constructor){case Float32Array:return d;case Uint32Array:return Math.round(d*4294967295);case Uint16Array:return Math.round(d*65535);case Uint8Array:return Math.round(d*255);case Int32Array:return Math.round(d*2147483647);case Int16Array:return Math.round(d*32767);case Int8Array:return Math.round(d*127);default:throw new Error("Invalid component type.")}}var Nc=class d{constructor(s=0,h=0){d.prototype.isVector2=!0,this.x=s,this.y=h}get width(){return this.x}set width(s){this.x=s}get height(){return this.y}set height(s){this.y=s}set(s,h){return this.x=s,this.y=h,this}setScalar(s){return this.x=s,this.y=s,this}setX(s){return this.x=s,this}setY(s){return this.y=s,this}setComponent(s,h){switch(s){case 0:this.x=h;break;case 1:this.y=h;break;default:throw new Error("index is out of range: "+s)}return this}getComponent(s){switch(s){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+s)}}clone(){return new this.constructor(this.x,this.y)}copy(s){return this.x=s.x,this.y=s.y,this}add(s){return this.x+=s.x,this.y+=s.y,this}addScalar(s){return this.x+=s,this.y+=s,this}addVectors(s,h){return this.x=s.x+h.x,this.y=s.y+h.y,this}addScaledVector(s,h){return this.x+=s.x*h,this.y+=s.y*h,this}sub(s){return this.x-=s.x,this.y-=s.y,this}subScalar(s){return this.x-=s,this.y-=s,this}subVectors(s,h){return this.x=s.x-h.x,this.y=s.y-h.y,this}multiply(s){return this.x*=s.x,this.y*=s.y,this}multiplyScalar(s){return this.x*=s,this.y*=s,this}divide(s){return this.x/=s.x,this.y/=s.y,this}divideScalar(s){return this.multiplyScalar(1/s)}applyMatrix3(s){let h=this.x,g=this.y,m=s.elements;return this.x=m[0]*h+m[3]*g+m[6],this.y=m[1]*h+m[4]*g+m[7],this}min(s){return this.x=Math.min(this.x,s.x),this.y=Math.min(this.y,s.y),this}max(s){return this.x=Math.max(this.x,s.x),this.y=Math.max(this.y,s.y),this}clamp(s,h){return this.x=Math.max(s.x,Math.min(h.x,this.x)),this.y=Math.max(s.y,Math.min(h.y,this.y)),this}clampScalar(s,h){return this.x=Math.max(s,Math.min(h,this.x)),this.y=Math.max(s,Math.min(h,this.y)),this}clampLength(s,h){let g=this.length();return this.divideScalar(g||1).multiplyScalar(Math.max(s,Math.min(h,g)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(s){return this.x*s.x+this.y*s.y}cross(s){return this.x*s.y-this.y*s.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(s){let h=Math.sqrt(this.lengthSq()*s.lengthSq());if(h===0)return Math.PI/2;let g=this.dot(s)/h;return Math.acos(pg(g,-1,1))}distanceTo(s){return Math.sqrt(this.distanceToSquared(s))}distanceToSquared(s){let h=this.x-s.x,g=this.y-s.y;return h*h+g*g}manhattanDistanceTo(s){return Math.abs(this.x-s.x)+Math.abs(this.y-s.y)}setLength(s){return this.normalize().multiplyScalar(s)}lerp(s,h){return this.x+=(s.x-this.x)*h,this.y+=(s.y-this.y)*h,this}lerpVectors(s,h,g){return this.x=s.x+(h.x-s.x)*g,this.y=s.y+(h.y-s.y)*g,this}equals(s){return s.x===this.x&&s.y===this.y}fromArray(s,h=0){return this.x=s[h],this.y=s[h+1],this}toArray(s=[],h=0){return s[h]=this.x,s[h+1]=this.y,s}fromBufferAttribute(s,h){return this.x=s.getX(h),this.y=s.getY(h),this}rotateAround(s,h){let g=Math.cos(h),m=Math.sin(h),_=this.x-s.x,S=this.y-s.y;return this.x=_*g-S*m+s.x,this.y=_*m+S*g+s.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},Ko=class d{constructor(s,h,g,m,_,S,y,R,N){d.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],s!==void 0&&this.set(s,h,g,m,_,S,y,R,N)}set(s,h,g,m,_,S,y,R,N){let B=this.elements;return B[0]=s,B[1]=m,B[2]=y,B[3]=h,B[4]=_,B[5]=R,B[6]=g,B[7]=S,B[8]=N,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(s){let h=this.elements,g=s.elements;return h[0]=g[0],h[1]=g[1],h[2]=g[2],h[3]=g[3],h[4]=g[4],h[5]=g[5],h[6]=g[6],h[7]=g[7],h[8]=g[8],this}extractBasis(s,h,g){return s.setFromMatrix3Column(this,0),h.setFromMatrix3Column(this,1),g.setFromMatrix3Column(this,2),this}setFromMatrix4(s){let h=s.elements;return this.set(h[0],h[4],h[8],h[1],h[5],h[9],h[2],h[6],h[10]),this}multiply(s){return this.multiplyMatrices(this,s)}premultiply(s){return this.multiplyMatrices(s,this)}multiplyMatrices(s,h){let g=s.elements,m=h.elements,_=this.elements,S=g[0],y=g[3],R=g[6],N=g[1],B=g[4],P=g[7],U=g[2],W=g[5],q=g[8],nt=m[0],Q=m[3],X=m[6],gt=m[1],ft=m[4],xt=m[7],Bt=m[2],Ot=m[5],Pt=m[8];return _[0]=S*nt+y*gt+R*Bt,_[3]=S*Q+y*ft+R*Ot,_[6]=S*X+y*xt+R*Pt,_[1]=N*nt+B*gt+P*Bt,_[4]=N*Q+B*ft+P*Ot,_[7]=N*X+B*xt+P*Pt,_[2]=U*nt+W*gt+q*Bt,_[5]=U*Q+W*ft+q*Ot,_[8]=U*X+W*xt+q*Pt,this}multiplyScalar(s){let h=this.elements;return h[0]*=s,h[3]*=s,h[6]*=s,h[1]*=s,h[4]*=s,h[7]*=s,h[2]*=s,h[5]*=s,h[8]*=s,this}determinant(){let s=this.elements,h=s[0],g=s[1],m=s[2],_=s[3],S=s[4],y=s[5],R=s[6],N=s[7],B=s[8];return h*S*B-h*y*N-g*_*B+g*y*R+m*_*N-m*S*R}invert(){let s=this.elements,h=s[0],g=s[1],m=s[2],_=s[3],S=s[4],y=s[5],R=s[6],N=s[7],B=s[8],P=B*S-y*N,U=y*R-B*_,W=N*_-S*R,q=h*P+g*U+m*W;if(q===0)return this.set(0,0,0,0,0,0,0,0,0);let nt=1/q;return s[0]=P*nt,s[1]=(m*N-B*g)*nt,s[2]=(y*g-m*S)*nt,s[3]=U*nt,s[4]=(B*h-m*R)*nt,s[5]=(m*_-y*h)*nt,s[6]=W*nt,s[7]=(g*R-N*h)*nt,s[8]=(S*h-g*_)*nt,this}transpose(){let s,h=this.elements;return s=h[1],h[1]=h[3],h[3]=s,s=h[2],h[2]=h[6],h[6]=s,s=h[5],h[5]=h[7],h[7]=s,this}getNormalMatrix(s){return this.setFromMatrix4(s).invert().transpose()}transposeIntoArray(s){let h=this.elements;return s[0]=h[0],s[1]=h[3],s[2]=h[6],s[3]=h[1],s[4]=h[4],s[5]=h[7],s[6]=h[2],s[7]=h[5],s[8]=h[8],this}setUvTransform(s,h,g,m,_,S,y){let R=Math.cos(_),N=Math.sin(_);return this.set(g*R,g*N,-g*(R*S+N*y)+S+s,-m*N,m*R,-m*(-N*S+R*y)+y+h,0,0,1),this}scale(s,h){return this.premultiply(H_t.makeScale(s,h)),this}rotate(s){return this.premultiply(H_t.makeRotation(-s)),this}translate(s,h){return this.premultiply(H_t.makeTranslation(s,h)),this}makeTranslation(s,h){return s.isVector2?this.set(1,0,s.x,0,1,s.y,0,0,1):this.set(1,0,s,0,1,h,0,0,1),this}makeRotation(s){let h=Math.cos(s),g=Math.sin(s);return this.set(h,-g,0,g,h,0,0,0,1),this}makeScale(s,h){return this.set(s,0,0,0,h,0,0,0,1),this}equals(s){let h=this.elements,g=s.elements;for(let m=0;m<9;m++)if(h[m]!==g[m])return!1;return!0}fromArray(s,h=0){for(let g=0;g<9;g++)this.elements[g]=s[g+h];return this}toArray(s=[],h=0){let g=this.elements;return s[h]=g[0],s[h+1]=g[1],s[h+2]=g[2],s[h+3]=g[3],s[h+4]=g[4],s[h+5]=g[5],s[h+6]=g[6],s[h+7]=g[7],s[h+8]=g[8],s}clone(){return new this.constructor().fromArray(this.elements)}},H_t=new Ko;function eKt(d){for(let s=d.length-1;s>=0;--s)if(d[s]>=65535)return!0;return!1}function uet(d){return document.createElementNS("http://www.w3.org/1999/xhtml",d)}function wEe(){let d=uet("canvas");return d.style.display="block",d}var YZt={};function mU(d){d in YZt||(YZt[d]=!0,console.warn(d))}var KZt=new Ko().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),JZt=new Ko().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Ctt={[Jx]:{transfer:set,primaries:oet,toReference:d=>d,fromReference:d=>d},[Pd]:{transfer:vu,primaries:oet,toReference:d=>d.convertSRGBToLinear(),fromReference:d=>d.convertLinearToSRGB()},[Det]:{transfer:set,primaries:cet,toReference:d=>d.applyMatrix3(JZt),fromReference:d=>d.applyMatrix3(KZt)},[e2t]:{transfer:vu,primaries:cet,toReference:d=>d.convertSRGBToLinear().applyMatrix3(JZt),fromReference:d=>d.applyMatrix3(KZt).convertLinearToSRGB()}},vEe=new Set([Jx,Det]),Na={enabled:!0,_workingColorSpace:Jx,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(d){if(!vEe.has(d))throw new Error(`Unsupported working color space, "${d}".`);this._workingColorSpace=d},convert:function(d,s,h){if(this.enabled===!1||s===h||!s||!h)return d;let g=Ctt[s].toReference,m=Ctt[h].fromReference;return m(g(d))},fromWorkingColorSpace:function(d,s){return this.convert(d,this._workingColorSpace,s)},toWorkingColorSpace:function(d,s){return this.convert(d,s,this._workingColorSpace)},getPrimaries:function(d){return Ctt[d].primaries},getTransfer:function(d){return d===wb?set:Ctt[d].transfer}};function KI(d){return d<.04045?d*.0773993808:Math.pow(d*.9478672986+.0521327014,2.4)}function G_t(d){return d<.0031308?d*12.92:1.055*Math.pow(d,.41666)-.055}var II,het=class{static getDataURL(s){if(/^data:/i.test(s.src)||typeof HTMLCanvasElement>"u")return s.src;let h;if(s instanceof HTMLCanvasElement)h=s;else{II===void 0&&(II=uet("canvas")),II.width=s.width,II.height=s.height;let g=II.getContext("2d");s instanceof ImageData?g.putImageData(s,0,0):g.drawImage(s,0,0,s.width,s.height),h=II}return h.width>2048||h.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",s),h.toDataURL("image/jpeg",.6)):h.toDataURL("image/png")}static sRGBToLinear(s){if(typeof HTMLImageElement<"u"&&s instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&s instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&s instanceof ImageBitmap){let h=uet("canvas");h.width=s.width,h.height=s.height;let g=h.getContext("2d");g.drawImage(s,0,0,s.width,s.height);let m=g.getImageData(0,0,s.width,s.height),_=m.data;for(let S=0;S<_.length;S++)_[S]=KI(_[S]/255)*255;return g.putImageData(m,0,0),h}else if(s.data){let h=s.data.slice(0);for(let g=0;g0&&(g.userData=this.userData),h||(s.textures[this.uuid]=g),g}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(s){if(this.mapping!==WYt)return s;if(s.applyMatrix3(this.matrix),s.x<0||s.x>1)switch(this.wrapS){case byt:s.x=s.x-Math.floor(s.x);break;case Zw:s.x=s.x<0?0:1;break;case wyt:Math.abs(Math.floor(s.x)%2)===1?s.x=Math.ceil(s.x)-s.x:s.x=s.x-Math.floor(s.x);break}if(s.y<0||s.y>1)switch(this.wrapT){case byt:s.y=s.y-Math.floor(s.y);break;case Zw:s.y=s.y<0?0:1;break;case wyt:Math.abs(Math.floor(s.y)%2)===1?s.y=Math.ceil(s.y)-s.y:s.y=s.y-Math.floor(s.y);break}return this.flipY&&(s.y=1-s.y),s}set needsUpdate(s){s===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return mU("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Pd?qA:JYt}set encoding(s){mU("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=s===qA?Pd:wb}};Kw.DEFAULT_IMAGE=null;Kw.DEFAULT_MAPPING=WYt;Kw.DEFAULT_ANISOTROPY=1;var $f=class d{constructor(s=0,h=0,g=0,m=1){d.prototype.isVector4=!0,this.x=s,this.y=h,this.z=g,this.w=m}get width(){return this.z}set width(s){this.z=s}get height(){return this.w}set height(s){this.w=s}set(s,h,g,m){return this.x=s,this.y=h,this.z=g,this.w=m,this}setScalar(s){return this.x=s,this.y=s,this.z=s,this.w=s,this}setX(s){return this.x=s,this}setY(s){return this.y=s,this}setZ(s){return this.z=s,this}setW(s){return this.w=s,this}setComponent(s,h){switch(s){case 0:this.x=h;break;case 1:this.y=h;break;case 2:this.z=h;break;case 3:this.w=h;break;default:throw new Error("index is out of range: "+s)}return this}getComponent(s){switch(s){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+s)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(s){return this.x=s.x,this.y=s.y,this.z=s.z,this.w=s.w!==void 0?s.w:1,this}add(s){return this.x+=s.x,this.y+=s.y,this.z+=s.z,this.w+=s.w,this}addScalar(s){return this.x+=s,this.y+=s,this.z+=s,this.w+=s,this}addVectors(s,h){return this.x=s.x+h.x,this.y=s.y+h.y,this.z=s.z+h.z,this.w=s.w+h.w,this}addScaledVector(s,h){return this.x+=s.x*h,this.y+=s.y*h,this.z+=s.z*h,this.w+=s.w*h,this}sub(s){return this.x-=s.x,this.y-=s.y,this.z-=s.z,this.w-=s.w,this}subScalar(s){return this.x-=s,this.y-=s,this.z-=s,this.w-=s,this}subVectors(s,h){return this.x=s.x-h.x,this.y=s.y-h.y,this.z=s.z-h.z,this.w=s.w-h.w,this}multiply(s){return this.x*=s.x,this.y*=s.y,this.z*=s.z,this.w*=s.w,this}multiplyScalar(s){return this.x*=s,this.y*=s,this.z*=s,this.w*=s,this}applyMatrix4(s){let h=this.x,g=this.y,m=this.z,_=this.w,S=s.elements;return this.x=S[0]*h+S[4]*g+S[8]*m+S[12]*_,this.y=S[1]*h+S[5]*g+S[9]*m+S[13]*_,this.z=S[2]*h+S[6]*g+S[10]*m+S[14]*_,this.w=S[3]*h+S[7]*g+S[11]*m+S[15]*_,this}divideScalar(s){return this.multiplyScalar(1/s)}setAxisAngleFromQuaternion(s){this.w=2*Math.acos(s.w);let h=Math.sqrt(1-s.w*s.w);return h<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=s.x/h,this.y=s.y/h,this.z=s.z/h),this}setAxisAngleFromRotationMatrix(s){let h,g,m,_,R=s.elements,N=R[0],B=R[4],P=R[8],U=R[1],W=R[5],q=R[9],nt=R[2],Q=R[6],X=R[10];if(Math.abs(B-U)<.01&&Math.abs(P-nt)<.01&&Math.abs(q-Q)<.01){if(Math.abs(B+U)<.1&&Math.abs(P+nt)<.1&&Math.abs(q+Q)<.1&&Math.abs(N+W+X-3)<.1)return this.set(1,0,0,0),this;h=Math.PI;let ft=(N+1)/2,xt=(W+1)/2,Bt=(X+1)/2,Ot=(B+U)/4,Pt=(P+nt)/4,se=(q+Q)/4;return ft>xt&&ft>Bt?ft<.01?(g=0,m=.707106781,_=.707106781):(g=Math.sqrt(ft),m=Ot/g,_=Pt/g):xt>Bt?xt<.01?(g=.707106781,m=0,_=.707106781):(m=Math.sqrt(xt),g=Ot/m,_=se/m):Bt<.01?(g=.707106781,m=.707106781,_=0):(_=Math.sqrt(Bt),g=Pt/_,m=se/_),this.set(g,m,_,h),this}let gt=Math.sqrt((Q-q)*(Q-q)+(P-nt)*(P-nt)+(U-B)*(U-B));return Math.abs(gt)<.001&&(gt=1),this.x=(Q-q)/gt,this.y=(P-nt)/gt,this.z=(U-B)/gt,this.w=Math.acos((N+W+X-1)/2),this}min(s){return this.x=Math.min(this.x,s.x),this.y=Math.min(this.y,s.y),this.z=Math.min(this.z,s.z),this.w=Math.min(this.w,s.w),this}max(s){return this.x=Math.max(this.x,s.x),this.y=Math.max(this.y,s.y),this.z=Math.max(this.z,s.z),this.w=Math.max(this.w,s.w),this}clamp(s,h){return this.x=Math.max(s.x,Math.min(h.x,this.x)),this.y=Math.max(s.y,Math.min(h.y,this.y)),this.z=Math.max(s.z,Math.min(h.z,this.z)),this.w=Math.max(s.w,Math.min(h.w,this.w)),this}clampScalar(s,h){return this.x=Math.max(s,Math.min(h,this.x)),this.y=Math.max(s,Math.min(h,this.y)),this.z=Math.max(s,Math.min(h,this.z)),this.w=Math.max(s,Math.min(h,this.w)),this}clampLength(s,h){let g=this.length();return this.divideScalar(g||1).multiplyScalar(Math.max(s,Math.min(h,g)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(s){return this.x*s.x+this.y*s.y+this.z*s.z+this.w*s.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(s){return this.normalize().multiplyScalar(s)}lerp(s,h){return this.x+=(s.x-this.x)*h,this.y+=(s.y-this.y)*h,this.z+=(s.z-this.z)*h,this.w+=(s.w-this.w)*h,this}lerpVectors(s,h,g){return this.x=s.x+(h.x-s.x)*g,this.y=s.y+(h.y-s.y)*g,this.z=s.z+(h.z-s.z)*g,this.w=s.w+(h.w-s.w)*g,this}equals(s){return s.x===this.x&&s.y===this.y&&s.z===this.z&&s.w===this.w}fromArray(s,h=0){return this.x=s[h],this.y=s[h+1],this.z=s[h+2],this.w=s[h+3],this}toArray(s=[],h=0){return s[h]=this.x,s[h+1]=this.y,s[h+2]=this.z,s[h+3]=this.w,s}fromBufferAttribute(s,h){return this.x=s.getX(h),this.y=s.getY(h),this.z=s.getZ(h),this.w=s.getW(h),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},xyt=class extends uS{constructor(s=1,h=1,g={}){super(),this.isRenderTarget=!0,this.width=s,this.height=h,this.depth=1,this.scissor=new $f(0,0,s,h),this.scissorTest=!1,this.viewport=new $f(0,0,s,h);let m={width:s,height:h,depth:1};g.encoding!==void 0&&(mU("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),g.colorSpace=g.encoding===qA?Pd:wb),g=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:bb,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},g),this.texture=new Kw(m,g.mapping,g.wrapS,g.wrapT,g.magFilter,g.minFilter,g.format,g.type,g.anisotropy,g.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=g.generateMipmaps,this.texture.internalFormat=g.internalFormat,this.depthBuffer=g.depthBuffer,this.stencilBuffer=g.stencilBuffer,this.depthTexture=g.depthTexture,this.samples=g.samples}setSize(s,h,g=1){(this.width!==s||this.height!==h||this.depth!==g)&&(this.width=s,this.height=h,this.depth=g,this.texture.image.width=s,this.texture.image.height=h,this.texture.image.depth=g,this.dispose()),this.viewport.set(0,0,s,h),this.scissor.set(0,0,s,h)}clone(){return new this.constructor().copy(this)}copy(s){this.width=s.width,this.height=s.height,this.depth=s.depth,this.scissor.copy(s.scissor),this.scissorTest=s.scissorTest,this.viewport.copy(s.viewport),this.texture=s.texture.clone(),this.texture.isRenderTargetTexture=!0;let h=Object.assign({},s.texture.image);return this.texture.source=new fet(h),this.depthBuffer=s.depthBuffer,this.stencilBuffer=s.stencilBuffer,s.depthTexture!==null&&(this.depthTexture=s.depthTexture.clone()),this.samples=s.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},Qx=class extends xyt{constructor(s=1,h=1,g={}){super(s,h,g),this.isWebGLRenderTarget=!0}},det=class extends Kw{constructor(s=null,h=1,g=1,m=1){super(null),this.isDataArrayTexture=!0,this.image={data:s,width:h,height:g,depth:m},this.magFilter=r1,this.minFilter=r1,this.wrapR=Zw,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Myt=class extends Kw{constructor(s=null,h=1,g=1,m=1){super(null),this.isData3DTexture=!0,this.image={data:s,width:h,height:g,depth:m},this.magFilter=r1,this.minFilter=r1,this.wrapR=Zw,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var xy=class{constructor(s=0,h=0,g=0,m=1){this.isQuaternion=!0,this._x=s,this._y=h,this._z=g,this._w=m}static slerpFlat(s,h,g,m,_,S,y){let R=g[m+0],N=g[m+1],B=g[m+2],P=g[m+3],U=_[S+0],W=_[S+1],q=_[S+2],nt=_[S+3];if(y===0){s[h+0]=R,s[h+1]=N,s[h+2]=B,s[h+3]=P;return}if(y===1){s[h+0]=U,s[h+1]=W,s[h+2]=q,s[h+3]=nt;return}if(P!==nt||R!==U||N!==W||B!==q){let Q=1-y,X=R*U+N*W+B*q+P*nt,gt=X>=0?1:-1,ft=1-X*X;if(ft>Number.EPSILON){let Bt=Math.sqrt(ft),Ot=Math.atan2(Bt,X*gt);Q=Math.sin(Q*Ot)/Bt,y=Math.sin(y*Ot)/Bt}let xt=y*gt;if(R=R*Q+U*xt,N=N*Q+W*xt,B=B*Q+q*xt,P=P*Q+nt*xt,Q===1-y){let Bt=1/Math.sqrt(R*R+N*N+B*B+P*P);R*=Bt,N*=Bt,B*=Bt,P*=Bt}}s[h]=R,s[h+1]=N,s[h+2]=B,s[h+3]=P}static multiplyQuaternionsFlat(s,h,g,m,_,S){let y=g[m],R=g[m+1],N=g[m+2],B=g[m+3],P=_[S],U=_[S+1],W=_[S+2],q=_[S+3];return s[h]=y*q+B*P+R*W-N*U,s[h+1]=R*q+B*U+N*P-y*W,s[h+2]=N*q+B*W+y*U-R*P,s[h+3]=B*q-y*P-R*U-N*W,s}get x(){return this._x}set x(s){this._x=s,this._onChangeCallback()}get y(){return this._y}set y(s){this._y=s,this._onChangeCallback()}get z(){return this._z}set z(s){this._z=s,this._onChangeCallback()}get w(){return this._w}set w(s){this._w=s,this._onChangeCallback()}set(s,h,g,m){return this._x=s,this._y=h,this._z=g,this._w=m,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(s){return this._x=s.x,this._y=s.y,this._z=s.z,this._w=s.w,this._onChangeCallback(),this}setFromEuler(s,h=!0){let g=s._x,m=s._y,_=s._z,S=s._order,y=Math.cos,R=Math.sin,N=y(g/2),B=y(m/2),P=y(_/2),U=R(g/2),W=R(m/2),q=R(_/2);switch(S){case"XYZ":this._x=U*B*P+N*W*q,this._y=N*W*P-U*B*q,this._z=N*B*q+U*W*P,this._w=N*B*P-U*W*q;break;case"YXZ":this._x=U*B*P+N*W*q,this._y=N*W*P-U*B*q,this._z=N*B*q-U*W*P,this._w=N*B*P+U*W*q;break;case"ZXY":this._x=U*B*P-N*W*q,this._y=N*W*P+U*B*q,this._z=N*B*q+U*W*P,this._w=N*B*P-U*W*q;break;case"ZYX":this._x=U*B*P-N*W*q,this._y=N*W*P+U*B*q,this._z=N*B*q-U*W*P,this._w=N*B*P+U*W*q;break;case"YZX":this._x=U*B*P+N*W*q,this._y=N*W*P+U*B*q,this._z=N*B*q-U*W*P,this._w=N*B*P-U*W*q;break;case"XZY":this._x=U*B*P-N*W*q,this._y=N*W*P-U*B*q,this._z=N*B*q+U*W*P,this._w=N*B*P+U*W*q;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+S)}return h===!0&&this._onChangeCallback(),this}setFromAxisAngle(s,h){let g=h/2,m=Math.sin(g);return this._x=s.x*m,this._y=s.y*m,this._z=s.z*m,this._w=Math.cos(g),this._onChangeCallback(),this}setFromRotationMatrix(s){let h=s.elements,g=h[0],m=h[4],_=h[8],S=h[1],y=h[5],R=h[9],N=h[2],B=h[6],P=h[10],U=g+y+P;if(U>0){let W=.5/Math.sqrt(U+1);this._w=.25/W,this._x=(B-R)*W,this._y=(_-N)*W,this._z=(S-m)*W}else if(g>y&&g>P){let W=2*Math.sqrt(1+g-y-P);this._w=(B-R)/W,this._x=.25*W,this._y=(m+S)/W,this._z=(_+N)/W}else if(y>P){let W=2*Math.sqrt(1+y-g-P);this._w=(_-N)/W,this._x=(m+S)/W,this._y=.25*W,this._z=(R+B)/W}else{let W=2*Math.sqrt(1+P-g-y);this._w=(S-m)/W,this._x=(_+N)/W,this._y=(R+B)/W,this._z=.25*W}return this._onChangeCallback(),this}setFromUnitVectors(s,h){let g=s.dot(h)+1;return gMath.abs(s.z)?(this._x=-s.y,this._y=s.x,this._z=0,this._w=g):(this._x=0,this._y=-s.z,this._z=s.y,this._w=g)):(this._x=s.y*h.z-s.z*h.y,this._y=s.z*h.x-s.x*h.z,this._z=s.x*h.y-s.y*h.x,this._w=g),this.normalize()}angleTo(s){return 2*Math.acos(Math.abs(pg(this.dot(s),-1,1)))}rotateTowards(s,h){let g=this.angleTo(s);if(g===0)return this;let m=Math.min(1,h/g);return this.slerp(s,m),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(s){return this._x*s._x+this._y*s._y+this._z*s._z+this._w*s._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let s=this.length();return s===0?(this._x=0,this._y=0,this._z=0,this._w=1):(s=1/s,this._x=this._x*s,this._y=this._y*s,this._z=this._z*s,this._w=this._w*s),this._onChangeCallback(),this}multiply(s){return this.multiplyQuaternions(this,s)}premultiply(s){return this.multiplyQuaternions(s,this)}multiplyQuaternions(s,h){let g=s._x,m=s._y,_=s._z,S=s._w,y=h._x,R=h._y,N=h._z,B=h._w;return this._x=g*B+S*y+m*N-_*R,this._y=m*B+S*R+_*y-g*N,this._z=_*B+S*N+g*R-m*y,this._w=S*B-g*y-m*R-_*N,this._onChangeCallback(),this}slerp(s,h){if(h===0)return this;if(h===1)return this.copy(s);let g=this._x,m=this._y,_=this._z,S=this._w,y=S*s._w+g*s._x+m*s._y+_*s._z;if(y<0?(this._w=-s._w,this._x=-s._x,this._y=-s._y,this._z=-s._z,y=-y):this.copy(s),y>=1)return this._w=S,this._x=g,this._y=m,this._z=_,this;let R=1-y*y;if(R<=Number.EPSILON){let W=1-h;return this._w=W*S+h*this._w,this._x=W*g+h*this._x,this._y=W*m+h*this._y,this._z=W*_+h*this._z,this.normalize(),this}let N=Math.sqrt(R),B=Math.atan2(N,y),P=Math.sin((1-h)*B)/N,U=Math.sin(h*B)/N;return this._w=S*P+this._w*U,this._x=g*P+this._x*U,this._y=m*P+this._y*U,this._z=_*P+this._z*U,this._onChangeCallback(),this}slerpQuaternions(s,h,g){return this.copy(s).slerp(h,g)}random(){let s=Math.random(),h=Math.sqrt(1-s),g=Math.sqrt(s),m=2*Math.PI*Math.random(),_=2*Math.PI*Math.random();return this.set(h*Math.cos(m),g*Math.sin(_),g*Math.cos(_),h*Math.sin(m))}equals(s){return s._x===this._x&&s._y===this._y&&s._z===this._z&&s._w===this._w}fromArray(s,h=0){return this._x=s[h],this._y=s[h+1],this._z=s[h+2],this._w=s[h+3],this._onChangeCallback(),this}toArray(s=[],h=0){return s[h]=this._x,s[h+1]=this._y,s[h+2]=this._z,s[h+3]=this._w,s}fromBufferAttribute(s,h){return this._x=s.getX(h),this._y=s.getY(h),this._z=s.getZ(h),this._w=s.getW(h),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(s){return this._onChangeCallback=s,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},Ge=class d{constructor(s=0,h=0,g=0){d.prototype.isVector3=!0,this.x=s,this.y=h,this.z=g}set(s,h,g){return g===void 0&&(g=this.z),this.x=s,this.y=h,this.z=g,this}setScalar(s){return this.x=s,this.y=s,this.z=s,this}setX(s){return this.x=s,this}setY(s){return this.y=s,this}setZ(s){return this.z=s,this}setComponent(s,h){switch(s){case 0:this.x=h;break;case 1:this.y=h;break;case 2:this.z=h;break;default:throw new Error("index is out of range: "+s)}return this}getComponent(s){switch(s){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+s)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(s){return this.x=s.x,this.y=s.y,this.z=s.z,this}add(s){return this.x+=s.x,this.y+=s.y,this.z+=s.z,this}addScalar(s){return this.x+=s,this.y+=s,this.z+=s,this}addVectors(s,h){return this.x=s.x+h.x,this.y=s.y+h.y,this.z=s.z+h.z,this}addScaledVector(s,h){return this.x+=s.x*h,this.y+=s.y*h,this.z+=s.z*h,this}sub(s){return this.x-=s.x,this.y-=s.y,this.z-=s.z,this}subScalar(s){return this.x-=s,this.y-=s,this.z-=s,this}subVectors(s,h){return this.x=s.x-h.x,this.y=s.y-h.y,this.z=s.z-h.z,this}multiply(s){return this.x*=s.x,this.y*=s.y,this.z*=s.z,this}multiplyScalar(s){return this.x*=s,this.y*=s,this.z*=s,this}multiplyVectors(s,h){return this.x=s.x*h.x,this.y=s.y*h.y,this.z=s.z*h.z,this}applyEuler(s){return this.applyQuaternion(QZt.setFromEuler(s))}applyAxisAngle(s,h){return this.applyQuaternion(QZt.setFromAxisAngle(s,h))}applyMatrix3(s){let h=this.x,g=this.y,m=this.z,_=s.elements;return this.x=_[0]*h+_[3]*g+_[6]*m,this.y=_[1]*h+_[4]*g+_[7]*m,this.z=_[2]*h+_[5]*g+_[8]*m,this}applyNormalMatrix(s){return this.applyMatrix3(s).normalize()}applyMatrix4(s){let h=this.x,g=this.y,m=this.z,_=s.elements,S=1/(_[3]*h+_[7]*g+_[11]*m+_[15]);return this.x=(_[0]*h+_[4]*g+_[8]*m+_[12])*S,this.y=(_[1]*h+_[5]*g+_[9]*m+_[13])*S,this.z=(_[2]*h+_[6]*g+_[10]*m+_[14])*S,this}applyQuaternion(s){let h=this.x,g=this.y,m=this.z,_=s.x,S=s.y,y=s.z,R=s.w,N=2*(S*m-y*g),B=2*(y*h-_*m),P=2*(_*g-S*h);return this.x=h+R*N+S*P-y*B,this.y=g+R*B+y*N-_*P,this.z=m+R*P+_*B-S*N,this}project(s){return this.applyMatrix4(s.matrixWorldInverse).applyMatrix4(s.projectionMatrix)}unproject(s){return this.applyMatrix4(s.projectionMatrixInverse).applyMatrix4(s.matrixWorld)}transformDirection(s){let h=this.x,g=this.y,m=this.z,_=s.elements;return this.x=_[0]*h+_[4]*g+_[8]*m,this.y=_[1]*h+_[5]*g+_[9]*m,this.z=_[2]*h+_[6]*g+_[10]*m,this.normalize()}divide(s){return this.x/=s.x,this.y/=s.y,this.z/=s.z,this}divideScalar(s){return this.multiplyScalar(1/s)}min(s){return this.x=Math.min(this.x,s.x),this.y=Math.min(this.y,s.y),this.z=Math.min(this.z,s.z),this}max(s){return this.x=Math.max(this.x,s.x),this.y=Math.max(this.y,s.y),this.z=Math.max(this.z,s.z),this}clamp(s,h){return this.x=Math.max(s.x,Math.min(h.x,this.x)),this.y=Math.max(s.y,Math.min(h.y,this.y)),this.z=Math.max(s.z,Math.min(h.z,this.z)),this}clampScalar(s,h){return this.x=Math.max(s,Math.min(h,this.x)),this.y=Math.max(s,Math.min(h,this.y)),this.z=Math.max(s,Math.min(h,this.z)),this}clampLength(s,h){let g=this.length();return this.divideScalar(g||1).multiplyScalar(Math.max(s,Math.min(h,g)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(s){return this.x*s.x+this.y*s.y+this.z*s.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(s){return this.normalize().multiplyScalar(s)}lerp(s,h){return this.x+=(s.x-this.x)*h,this.y+=(s.y-this.y)*h,this.z+=(s.z-this.z)*h,this}lerpVectors(s,h,g){return this.x=s.x+(h.x-s.x)*g,this.y=s.y+(h.y-s.y)*g,this.z=s.z+(h.z-s.z)*g,this}cross(s){return this.crossVectors(this,s)}crossVectors(s,h){let g=s.x,m=s.y,_=s.z,S=h.x,y=h.y,R=h.z;return this.x=m*R-_*y,this.y=_*S-g*R,this.z=g*y-m*S,this}projectOnVector(s){let h=s.lengthSq();if(h===0)return this.set(0,0,0);let g=s.dot(this)/h;return this.copy(s).multiplyScalar(g)}projectOnPlane(s){return $_t.copy(this).projectOnVector(s),this.sub($_t)}reflect(s){return this.sub($_t.copy(s).multiplyScalar(2*this.dot(s)))}angleTo(s){let h=Math.sqrt(this.lengthSq()*s.lengthSq());if(h===0)return Math.PI/2;let g=this.dot(s)/h;return Math.acos(pg(g,-1,1))}distanceTo(s){return Math.sqrt(this.distanceToSquared(s))}distanceToSquared(s){let h=this.x-s.x,g=this.y-s.y,m=this.z-s.z;return h*h+g*g+m*m}manhattanDistanceTo(s){return Math.abs(this.x-s.x)+Math.abs(this.y-s.y)+Math.abs(this.z-s.z)}setFromSpherical(s){return this.setFromSphericalCoords(s.radius,s.phi,s.theta)}setFromSphericalCoords(s,h,g){let m=Math.sin(h)*s;return this.x=m*Math.sin(g),this.y=Math.cos(h)*s,this.z=m*Math.cos(g),this}setFromCylindrical(s){return this.setFromCylindricalCoords(s.radius,s.theta,s.y)}setFromCylindricalCoords(s,h,g){return this.x=s*Math.sin(h),this.y=g,this.z=s*Math.cos(h),this}setFromMatrixPosition(s){let h=s.elements;return this.x=h[12],this.y=h[13],this.z=h[14],this}setFromMatrixScale(s){let h=this.setFromMatrixColumn(s,0).length(),g=this.setFromMatrixColumn(s,1).length(),m=this.setFromMatrixColumn(s,2).length();return this.x=h,this.y=g,this.z=m,this}setFromMatrixColumn(s,h){return this.fromArray(s.elements,h*4)}setFromMatrix3Column(s,h){return this.fromArray(s.elements,h*3)}setFromEuler(s){return this.x=s._x,this.y=s._y,this.z=s._z,this}setFromColor(s){return this.x=s.r,this.y=s.g,this.z=s.b,this}equals(s){return s.x===this.x&&s.y===this.y&&s.z===this.z}fromArray(s,h=0){return this.x=s[h],this.y=s[h+1],this.z=s[h+2],this}toArray(s=[],h=0){return s[h]=this.x,s[h+1]=this.y,s[h+2]=this.z,s}fromBufferAttribute(s,h){return this.x=s.getX(h),this.y=s.getY(h),this.z=s.getZ(h),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let s=(Math.random()-.5)*2,h=Math.random()*Math.PI*2,g=Math.sqrt(1-s**2);return this.x=g*Math.cos(h),this.y=g*Math.sin(h),this.z=s,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},$_t=new Ge,QZt=new xy,t3=class{constructor(s=new Ge(1/0,1/0,1/0),h=new Ge(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=s,this.max=h}set(s,h){return this.min.copy(s),this.max.copy(h),this}setFromArray(s){this.makeEmpty();for(let h=0,g=s.length;hthis.max.x||s.ythis.max.y||s.zthis.max.z)}containsBox(s){return this.min.x<=s.min.x&&s.max.x<=this.max.x&&this.min.y<=s.min.y&&s.max.y<=this.max.y&&this.min.z<=s.min.z&&s.max.z<=this.max.z}getParameter(s,h){return h.set((s.x-this.min.x)/(this.max.x-this.min.x),(s.y-this.min.y)/(this.max.y-this.min.y),(s.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(s){return!(s.max.xthis.max.x||s.max.ythis.max.y||s.max.zthis.max.z)}intersectsSphere(s){return this.clampPoint(s.center,$w),$w.distanceToSquared(s.center)<=s.radius*s.radius}intersectsPlane(s){let h,g;return s.normal.x>0?(h=s.normal.x*this.min.x,g=s.normal.x*this.max.x):(h=s.normal.x*this.max.x,g=s.normal.x*this.min.x),s.normal.y>0?(h+=s.normal.y*this.min.y,g+=s.normal.y*this.max.y):(h+=s.normal.y*this.max.y,g+=s.normal.y*this.min.y),s.normal.z>0?(h+=s.normal.z*this.min.z,g+=s.normal.z*this.max.z):(h+=s.normal.z*this.max.z,g+=s.normal.z*this.min.z),h<=-s.constant&&g>=-s.constant}intersectsTriangle(s){if(this.isEmpty())return!1;this.getCenter(lU),ktt.subVectors(this.max,lU),RI.subVectors(s.a,lU),DI.subVectors(s.b,lU),NI.subVectors(s.c,lU),KE.subVectors(DI,RI),JE.subVectors(NI,DI),BA.subVectors(RI,NI);let h=[0,-KE.z,KE.y,0,-JE.z,JE.y,0,-BA.z,BA.y,KE.z,0,-KE.x,JE.z,0,-JE.x,BA.z,0,-BA.x,-KE.y,KE.x,0,-JE.y,JE.x,0,-BA.y,BA.x,0];return!V_t(h,RI,DI,NI,ktt)||(h=[1,0,0,0,1,0,0,0,1],!V_t(h,RI,DI,NI,ktt))?!1:(Ltt.crossVectors(KE,JE),h=[Ltt.x,Ltt.y,Ltt.z],V_t(h,RI,DI,NI,ktt))}clampPoint(s,h){return h.copy(s).clamp(this.min,this.max)}distanceToPoint(s){return this.clampPoint(s,$w).distanceTo(s)}getBoundingSphere(s){return this.isEmpty()?s.makeEmpty():(this.getCenter(s.center),s.radius=this.getSize($w).length()*.5),s}intersect(s){return this.min.max(s.min),this.max.min(s.max),this.isEmpty()&&this.makeEmpty(),this}union(s){return this.min.min(s.min),this.max.max(s.max),this}applyMatrix4(s){return this.isEmpty()?this:(Wx[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(s),Wx[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(s),Wx[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(s),Wx[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(s),Wx[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(s),Wx[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(s),Wx[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(s),Wx[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(s),this.setFromPoints(Wx),this)}translate(s){return this.min.add(s),this.max.add(s),this}equals(s){return s.min.equals(this.min)&&s.max.equals(this.max)}},Wx=[new Ge,new Ge,new Ge,new Ge,new Ge,new Ge,new Ge,new Ge],$w=new Ge,Att=new t3,RI=new Ge,DI=new Ge,NI=new Ge,KE=new Ge,JE=new Ge,BA=new Ge,lU=new Ge,ktt=new Ge,Ltt=new Ge,FA=new Ge;function V_t(d,s,h,g,m){for(let _=0,S=d.length-3;_<=S;_+=3){FA.fromArray(d,_);let y=m.x*Math.abs(FA.x)+m.y*Math.abs(FA.y)+m.z*Math.abs(FA.z),R=s.dot(FA),N=h.dot(FA),B=g.dot(FA);if(Math.max(-Math.max(R,N,B),Math.min(R,N,B))>y)return!1}return!0}var xEe=new t3,hU=new Ge,q_t=new Ge,lS=class{constructor(s=new Ge,h=-1){this.isSphere=!0,this.center=s,this.radius=h}set(s,h){return this.center.copy(s),this.radius=h,this}setFromPoints(s,h){let g=this.center;h!==void 0?g.copy(h):xEe.setFromPoints(s).getCenter(g);let m=0;for(let _=0,S=s.length;_this.radius*this.radius&&(h.sub(this.center).normalize(),h.multiplyScalar(this.radius).add(this.center)),h}getBoundingBox(s){return this.isEmpty()?(s.makeEmpty(),s):(s.set(this.center,this.center),s.expandByScalar(this.radius),s)}applyMatrix4(s){return this.center.applyMatrix4(s),this.radius=this.radius*s.getMaxScaleOnAxis(),this}translate(s){return this.center.add(s),this}expandByPoint(s){if(this.isEmpty())return this.center.copy(s),this.radius=0,this;hU.subVectors(s,this.center);let h=hU.lengthSq();if(h>this.radius*this.radius){let g=Math.sqrt(h),m=(g-this.radius)*.5;this.center.addScaledVector(hU,m/g),this.radius+=m}return this}union(s){return s.isEmpty()?this:this.isEmpty()?(this.copy(s),this):(this.center.equals(s.center)===!0?this.radius=Math.max(this.radius,s.radius):(q_t.subVectors(s.center,this.center).setLength(s.radius),this.expandByPoint(hU.copy(s.center).add(q_t)),this.expandByPoint(hU.copy(s.center).sub(q_t))),this)}equals(s){return s.center.equals(this.center)&&s.radius===this.radius}clone(){return new this.constructor().copy(this)}},$x=new Ge,X_t=new Ge,Ptt=new Ge,QE=new Ge,Z_t=new Ge,Itt=new Ge,Y_t=new Ge,_U=class{constructor(s=new Ge,h=new Ge(0,0,-1)){this.origin=s,this.direction=h}set(s,h){return this.origin.copy(s),this.direction.copy(h),this}copy(s){return this.origin.copy(s.origin),this.direction.copy(s.direction),this}at(s,h){return h.copy(this.origin).addScaledVector(this.direction,s)}lookAt(s){return this.direction.copy(s).sub(this.origin).normalize(),this}recast(s){return this.origin.copy(this.at(s,$x)),this}closestPointToPoint(s,h){h.subVectors(s,this.origin);let g=h.dot(this.direction);return g<0?h.copy(this.origin):h.copy(this.origin).addScaledVector(this.direction,g)}distanceToPoint(s){return Math.sqrt(this.distanceSqToPoint(s))}distanceSqToPoint(s){let h=$x.subVectors(s,this.origin).dot(this.direction);return h<0?this.origin.distanceToSquared(s):($x.copy(this.origin).addScaledVector(this.direction,h),$x.distanceToSquared(s))}distanceSqToSegment(s,h,g,m){X_t.copy(s).add(h).multiplyScalar(.5),Ptt.copy(h).sub(s).normalize(),QE.copy(this.origin).sub(X_t);let _=s.distanceTo(h)*.5,S=-this.direction.dot(Ptt),y=QE.dot(this.direction),R=-QE.dot(Ptt),N=QE.lengthSq(),B=Math.abs(1-S*S),P,U,W,q;if(B>0)if(P=S*R-y,U=S*y-R,q=_*B,P>=0)if(U>=-q)if(U<=q){let nt=1/B;P*=nt,U*=nt,W=P*(P+S*U+2*y)+U*(S*P+U+2*R)+N}else U=_,P=Math.max(0,-(S*U+y)),W=-P*P+U*(U+2*R)+N;else U=-_,P=Math.max(0,-(S*U+y)),W=-P*P+U*(U+2*R)+N;else U<=-q?(P=Math.max(0,-(-S*_+y)),U=P>0?-_:Math.min(Math.max(-_,-R),_),W=-P*P+U*(U+2*R)+N):U<=q?(P=0,U=Math.min(Math.max(-_,-R),_),W=U*(U+2*R)+N):(P=Math.max(0,-(S*_+y)),U=P>0?_:Math.min(Math.max(-_,-R),_),W=-P*P+U*(U+2*R)+N);else U=S>0?-_:_,P=Math.max(0,-(S*U+y)),W=-P*P+U*(U+2*R)+N;return g&&g.copy(this.origin).addScaledVector(this.direction,P),m&&m.copy(X_t).addScaledVector(Ptt,U),W}intersectSphere(s,h){$x.subVectors(s.center,this.origin);let g=$x.dot(this.direction),m=$x.dot($x)-g*g,_=s.radius*s.radius;if(m>_)return null;let S=Math.sqrt(_-m),y=g-S,R=g+S;return R<0?null:y<0?this.at(R,h):this.at(y,h)}intersectsSphere(s){return this.distanceSqToPoint(s.center)<=s.radius*s.radius}distanceToPlane(s){let h=s.normal.dot(this.direction);if(h===0)return s.distanceToPoint(this.origin)===0?0:null;let g=-(this.origin.dot(s.normal)+s.constant)/h;return g>=0?g:null}intersectPlane(s,h){let g=this.distanceToPlane(s);return g===null?null:this.at(g,h)}intersectsPlane(s){let h=s.distanceToPoint(this.origin);return h===0||s.normal.dot(this.direction)*h<0}intersectBox(s,h){let g,m,_,S,y,R,N=1/this.direction.x,B=1/this.direction.y,P=1/this.direction.z,U=this.origin;return N>=0?(g=(s.min.x-U.x)*N,m=(s.max.x-U.x)*N):(g=(s.max.x-U.x)*N,m=(s.min.x-U.x)*N),B>=0?(_=(s.min.y-U.y)*B,S=(s.max.y-U.y)*B):(_=(s.max.y-U.y)*B,S=(s.min.y-U.y)*B),g>S||_>m||((_>g||isNaN(g))&&(g=_),(S=0?(y=(s.min.z-U.z)*P,R=(s.max.z-U.z)*P):(y=(s.max.z-U.z)*P,R=(s.min.z-U.z)*P),g>R||y>m)||((y>g||g!==g)&&(g=y),(R=0?g:m,h)}intersectsBox(s){return this.intersectBox(s,$x)!==null}intersectTriangle(s,h,g,m,_){Z_t.subVectors(h,s),Itt.subVectors(g,s),Y_t.crossVectors(Z_t,Itt);let S=this.direction.dot(Y_t),y;if(S>0){if(m)return null;y=1}else if(S<0)y=-1,S=-S;else return null;QE.subVectors(this.origin,s);let R=y*this.direction.dot(Itt.crossVectors(QE,Itt));if(R<0)return null;let N=y*this.direction.dot(Z_t.cross(QE));if(N<0||R+N>S)return null;let B=-y*QE.dot(Y_t);return B<0?null:this.at(B/S,_)}applyMatrix4(s){return this.origin.applyMatrix4(s),this.direction.transformDirection(s),this}equals(s){return s.origin.equals(this.origin)&&s.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},Bu=class d{constructor(s,h,g,m,_,S,y,R,N,B,P,U,W,q,nt,Q){d.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],s!==void 0&&this.set(s,h,g,m,_,S,y,R,N,B,P,U,W,q,nt,Q)}set(s,h,g,m,_,S,y,R,N,B,P,U,W,q,nt,Q){let X=this.elements;return X[0]=s,X[4]=h,X[8]=g,X[12]=m,X[1]=_,X[5]=S,X[9]=y,X[13]=R,X[2]=N,X[6]=B,X[10]=P,X[14]=U,X[3]=W,X[7]=q,X[11]=nt,X[15]=Q,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new d().fromArray(this.elements)}copy(s){let h=this.elements,g=s.elements;return h[0]=g[0],h[1]=g[1],h[2]=g[2],h[3]=g[3],h[4]=g[4],h[5]=g[5],h[6]=g[6],h[7]=g[7],h[8]=g[8],h[9]=g[9],h[10]=g[10],h[11]=g[11],h[12]=g[12],h[13]=g[13],h[14]=g[14],h[15]=g[15],this}copyPosition(s){let h=this.elements,g=s.elements;return h[12]=g[12],h[13]=g[13],h[14]=g[14],this}setFromMatrix3(s){let h=s.elements;return this.set(h[0],h[3],h[6],0,h[1],h[4],h[7],0,h[2],h[5],h[8],0,0,0,0,1),this}extractBasis(s,h,g){return s.setFromMatrixColumn(this,0),h.setFromMatrixColumn(this,1),g.setFromMatrixColumn(this,2),this}makeBasis(s,h,g){return this.set(s.x,h.x,g.x,0,s.y,h.y,g.y,0,s.z,h.z,g.z,0,0,0,0,1),this}extractRotation(s){let h=this.elements,g=s.elements,m=1/OI.setFromMatrixColumn(s,0).length(),_=1/OI.setFromMatrixColumn(s,1).length(),S=1/OI.setFromMatrixColumn(s,2).length();return h[0]=g[0]*m,h[1]=g[1]*m,h[2]=g[2]*m,h[3]=0,h[4]=g[4]*_,h[5]=g[5]*_,h[6]=g[6]*_,h[7]=0,h[8]=g[8]*S,h[9]=g[9]*S,h[10]=g[10]*S,h[11]=0,h[12]=0,h[13]=0,h[14]=0,h[15]=1,this}makeRotationFromEuler(s){let h=this.elements,g=s.x,m=s.y,_=s.z,S=Math.cos(g),y=Math.sin(g),R=Math.cos(m),N=Math.sin(m),B=Math.cos(_),P=Math.sin(_);if(s.order==="XYZ"){let U=S*B,W=S*P,q=y*B,nt=y*P;h[0]=R*B,h[4]=-R*P,h[8]=N,h[1]=W+q*N,h[5]=U-nt*N,h[9]=-y*R,h[2]=nt-U*N,h[6]=q+W*N,h[10]=S*R}else if(s.order==="YXZ"){let U=R*B,W=R*P,q=N*B,nt=N*P;h[0]=U+nt*y,h[4]=q*y-W,h[8]=S*N,h[1]=S*P,h[5]=S*B,h[9]=-y,h[2]=W*y-q,h[6]=nt+U*y,h[10]=S*R}else if(s.order==="ZXY"){let U=R*B,W=R*P,q=N*B,nt=N*P;h[0]=U-nt*y,h[4]=-S*P,h[8]=q+W*y,h[1]=W+q*y,h[5]=S*B,h[9]=nt-U*y,h[2]=-S*N,h[6]=y,h[10]=S*R}else if(s.order==="ZYX"){let U=S*B,W=S*P,q=y*B,nt=y*P;h[0]=R*B,h[4]=q*N-W,h[8]=U*N+nt,h[1]=R*P,h[5]=nt*N+U,h[9]=W*N-q,h[2]=-N,h[6]=y*R,h[10]=S*R}else if(s.order==="YZX"){let U=S*R,W=S*N,q=y*R,nt=y*N;h[0]=R*B,h[4]=nt-U*P,h[8]=q*P+W,h[1]=P,h[5]=S*B,h[9]=-y*B,h[2]=-N*B,h[6]=W*P+q,h[10]=U-nt*P}else if(s.order==="XZY"){let U=S*R,W=S*N,q=y*R,nt=y*N;h[0]=R*B,h[4]=-P,h[8]=N*B,h[1]=U*P+nt,h[5]=S*B,h[9]=W*P-q,h[2]=q*P-W,h[6]=y*B,h[10]=nt*P+U}return h[3]=0,h[7]=0,h[11]=0,h[12]=0,h[13]=0,h[14]=0,h[15]=1,this}makeRotationFromQuaternion(s){return this.compose(MEe,s,EEe)}lookAt(s,h,g){let m=this.elements;return I0.subVectors(s,h),I0.lengthSq()===0&&(I0.z=1),I0.normalize(),tS.crossVectors(g,I0),tS.lengthSq()===0&&(Math.abs(g.z)===1?I0.x+=1e-4:I0.z+=1e-4,I0.normalize(),tS.crossVectors(g,I0)),tS.normalize(),Rtt.crossVectors(I0,tS),m[0]=tS.x,m[4]=Rtt.x,m[8]=I0.x,m[1]=tS.y,m[5]=Rtt.y,m[9]=I0.y,m[2]=tS.z,m[6]=Rtt.z,m[10]=I0.z,this}multiply(s){return this.multiplyMatrices(this,s)}premultiply(s){return this.multiplyMatrices(s,this)}multiplyMatrices(s,h){let g=s.elements,m=h.elements,_=this.elements,S=g[0],y=g[4],R=g[8],N=g[12],B=g[1],P=g[5],U=g[9],W=g[13],q=g[2],nt=g[6],Q=g[10],X=g[14],gt=g[3],ft=g[7],xt=g[11],Bt=g[15],Ot=m[0],Pt=m[4],se=m[8],ot=m[12],Lt=m[1],be=m[5],ln=m[9],Fn=m[13],ne=m[2],xe=m[6],re=m[10],hn=m[14],Se=m[3],ke=m[7],mn=m[11],en=m[15];return _[0]=S*Ot+y*Lt+R*ne+N*Se,_[4]=S*Pt+y*be+R*xe+N*ke,_[8]=S*se+y*ln+R*re+N*mn,_[12]=S*ot+y*Fn+R*hn+N*en,_[1]=B*Ot+P*Lt+U*ne+W*Se,_[5]=B*Pt+P*be+U*xe+W*ke,_[9]=B*se+P*ln+U*re+W*mn,_[13]=B*ot+P*Fn+U*hn+W*en,_[2]=q*Ot+nt*Lt+Q*ne+X*Se,_[6]=q*Pt+nt*be+Q*xe+X*ke,_[10]=q*se+nt*ln+Q*re+X*mn,_[14]=q*ot+nt*Fn+Q*hn+X*en,_[3]=gt*Ot+ft*Lt+xt*ne+Bt*Se,_[7]=gt*Pt+ft*be+xt*xe+Bt*ke,_[11]=gt*se+ft*ln+xt*re+Bt*mn,_[15]=gt*ot+ft*Fn+xt*hn+Bt*en,this}multiplyScalar(s){let h=this.elements;return h[0]*=s,h[4]*=s,h[8]*=s,h[12]*=s,h[1]*=s,h[5]*=s,h[9]*=s,h[13]*=s,h[2]*=s,h[6]*=s,h[10]*=s,h[14]*=s,h[3]*=s,h[7]*=s,h[11]*=s,h[15]*=s,this}determinant(){let s=this.elements,h=s[0],g=s[4],m=s[8],_=s[12],S=s[1],y=s[5],R=s[9],N=s[13],B=s[2],P=s[6],U=s[10],W=s[14],q=s[3],nt=s[7],Q=s[11],X=s[15];return q*(+_*R*P-m*N*P-_*y*U+g*N*U+m*y*W-g*R*W)+nt*(+h*R*W-h*N*U+_*S*U-m*S*W+m*N*B-_*R*B)+Q*(+h*N*P-h*y*W-_*S*P+g*S*W+_*y*B-g*N*B)+X*(-m*y*B-h*R*P+h*y*U+m*S*P-g*S*U+g*R*B)}transpose(){let s=this.elements,h;return h=s[1],s[1]=s[4],s[4]=h,h=s[2],s[2]=s[8],s[8]=h,h=s[6],s[6]=s[9],s[9]=h,h=s[3],s[3]=s[12],s[12]=h,h=s[7],s[7]=s[13],s[13]=h,h=s[11],s[11]=s[14],s[14]=h,this}setPosition(s,h,g){let m=this.elements;return s.isVector3?(m[12]=s.x,m[13]=s.y,m[14]=s.z):(m[12]=s,m[13]=h,m[14]=g),this}invert(){let s=this.elements,h=s[0],g=s[1],m=s[2],_=s[3],S=s[4],y=s[5],R=s[6],N=s[7],B=s[8],P=s[9],U=s[10],W=s[11],q=s[12],nt=s[13],Q=s[14],X=s[15],gt=P*Q*N-nt*U*N+nt*R*W-y*Q*W-P*R*X+y*U*X,ft=q*U*N-B*Q*N-q*R*W+S*Q*W+B*R*X-S*U*X,xt=B*nt*N-q*P*N+q*y*W-S*nt*W-B*y*X+S*P*X,Bt=q*P*R-B*nt*R-q*y*U+S*nt*U+B*y*Q-S*P*Q,Ot=h*gt+g*ft+m*xt+_*Bt;if(Ot===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let Pt=1/Ot;return s[0]=gt*Pt,s[1]=(nt*U*_-P*Q*_-nt*m*W+g*Q*W+P*m*X-g*U*X)*Pt,s[2]=(y*Q*_-nt*R*_+nt*m*N-g*Q*N-y*m*X+g*R*X)*Pt,s[3]=(P*R*_-y*U*_-P*m*N+g*U*N+y*m*W-g*R*W)*Pt,s[4]=ft*Pt,s[5]=(B*Q*_-q*U*_+q*m*W-h*Q*W-B*m*X+h*U*X)*Pt,s[6]=(q*R*_-S*Q*_-q*m*N+h*Q*N+S*m*X-h*R*X)*Pt,s[7]=(S*U*_-B*R*_+B*m*N-h*U*N-S*m*W+h*R*W)*Pt,s[8]=xt*Pt,s[9]=(q*P*_-B*nt*_-q*g*W+h*nt*W+B*g*X-h*P*X)*Pt,s[10]=(S*nt*_-q*y*_+q*g*N-h*nt*N-S*g*X+h*y*X)*Pt,s[11]=(B*y*_-S*P*_-B*g*N+h*P*N+S*g*W-h*y*W)*Pt,s[12]=Bt*Pt,s[13]=(B*nt*m-q*P*m+q*g*U-h*nt*U-B*g*Q+h*P*Q)*Pt,s[14]=(q*y*m-S*nt*m-q*g*R+h*nt*R+S*g*Q-h*y*Q)*Pt,s[15]=(S*P*m-B*y*m+B*g*R-h*P*R-S*g*U+h*y*U)*Pt,this}scale(s){let h=this.elements,g=s.x,m=s.y,_=s.z;return h[0]*=g,h[4]*=m,h[8]*=_,h[1]*=g,h[5]*=m,h[9]*=_,h[2]*=g,h[6]*=m,h[10]*=_,h[3]*=g,h[7]*=m,h[11]*=_,this}getMaxScaleOnAxis(){let s=this.elements,h=s[0]*s[0]+s[1]*s[1]+s[2]*s[2],g=s[4]*s[4]+s[5]*s[5]+s[6]*s[6],m=s[8]*s[8]+s[9]*s[9]+s[10]*s[10];return Math.sqrt(Math.max(h,g,m))}makeTranslation(s,h,g){return s.isVector3?this.set(1,0,0,s.x,0,1,0,s.y,0,0,1,s.z,0,0,0,1):this.set(1,0,0,s,0,1,0,h,0,0,1,g,0,0,0,1),this}makeRotationX(s){let h=Math.cos(s),g=Math.sin(s);return this.set(1,0,0,0,0,h,-g,0,0,g,h,0,0,0,0,1),this}makeRotationY(s){let h=Math.cos(s),g=Math.sin(s);return this.set(h,0,g,0,0,1,0,0,-g,0,h,0,0,0,0,1),this}makeRotationZ(s){let h=Math.cos(s),g=Math.sin(s);return this.set(h,-g,0,0,g,h,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(s,h){let g=Math.cos(h),m=Math.sin(h),_=1-g,S=s.x,y=s.y,R=s.z,N=_*S,B=_*y;return this.set(N*S+g,N*y-m*R,N*R+m*y,0,N*y+m*R,B*y+g,B*R-m*S,0,N*R-m*y,B*R+m*S,_*R*R+g,0,0,0,0,1),this}makeScale(s,h,g){return this.set(s,0,0,0,0,h,0,0,0,0,g,0,0,0,0,1),this}makeShear(s,h,g,m,_,S){return this.set(1,g,_,0,s,1,S,0,h,m,1,0,0,0,0,1),this}compose(s,h,g){let m=this.elements,_=h._x,S=h._y,y=h._z,R=h._w,N=_+_,B=S+S,P=y+y,U=_*N,W=_*B,q=_*P,nt=S*B,Q=S*P,X=y*P,gt=R*N,ft=R*B,xt=R*P,Bt=g.x,Ot=g.y,Pt=g.z;return m[0]=(1-(nt+X))*Bt,m[1]=(W+xt)*Bt,m[2]=(q-ft)*Bt,m[3]=0,m[4]=(W-xt)*Ot,m[5]=(1-(U+X))*Ot,m[6]=(Q+gt)*Ot,m[7]=0,m[8]=(q+ft)*Pt,m[9]=(Q-gt)*Pt,m[10]=(1-(U+nt))*Pt,m[11]=0,m[12]=s.x,m[13]=s.y,m[14]=s.z,m[15]=1,this}decompose(s,h,g){let m=this.elements,_=OI.set(m[0],m[1],m[2]).length(),S=OI.set(m[4],m[5],m[6]).length(),y=OI.set(m[8],m[9],m[10]).length();this.determinant()<0&&(_=-_),s.x=m[12],s.y=m[13],s.z=m[14],Vw.copy(this);let N=1/_,B=1/S,P=1/y;return Vw.elements[0]*=N,Vw.elements[1]*=N,Vw.elements[2]*=N,Vw.elements[4]*=B,Vw.elements[5]*=B,Vw.elements[6]*=B,Vw.elements[8]*=P,Vw.elements[9]*=P,Vw.elements[10]*=P,h.setFromRotationMatrix(Vw),g.x=_,g.y=S,g.z=y,this}makePerspective(s,h,g,m,_,S,y=Kx){let R=this.elements,N=2*_/(h-s),B=2*_/(g-m),P=(h+s)/(h-s),U=(g+m)/(g-m),W,q;if(y===Kx)W=-(S+_)/(S-_),q=-2*S*_/(S-_);else if(y===aet)W=-S/(S-_),q=-S*_/(S-_);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+y);return R[0]=N,R[4]=0,R[8]=P,R[12]=0,R[1]=0,R[5]=B,R[9]=U,R[13]=0,R[2]=0,R[6]=0,R[10]=W,R[14]=q,R[3]=0,R[7]=0,R[11]=-1,R[15]=0,this}makeOrthographic(s,h,g,m,_,S,y=Kx){let R=this.elements,N=1/(h-s),B=1/(g-m),P=1/(S-_),U=(h+s)*N,W=(g+m)*B,q,nt;if(y===Kx)q=(S+_)*P,nt=-2*P;else if(y===aet)q=_*P,nt=-1*P;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+y);return R[0]=2*N,R[4]=0,R[8]=0,R[12]=-U,R[1]=0,R[5]=2*B,R[9]=0,R[13]=-W,R[2]=0,R[6]=0,R[10]=nt,R[14]=-q,R[3]=0,R[7]=0,R[11]=0,R[15]=1,this}equals(s){let h=this.elements,g=s.elements;for(let m=0;m<16;m++)if(h[m]!==g[m])return!1;return!0}fromArray(s,h=0){for(let g=0;g<16;g++)this.elements[g]=s[g+h];return this}toArray(s=[],h=0){let g=this.elements;return s[h]=g[0],s[h+1]=g[1],s[h+2]=g[2],s[h+3]=g[3],s[h+4]=g[4],s[h+5]=g[5],s[h+6]=g[6],s[h+7]=g[7],s[h+8]=g[8],s[h+9]=g[9],s[h+10]=g[10],s[h+11]=g[11],s[h+12]=g[12],s[h+13]=g[13],s[h+14]=g[14],s[h+15]=g[15],s}},OI=new Ge,Vw=new Bu,MEe=new Ge(0,0,0),EEe=new Ge(1,1,1),tS=new Ge,Rtt=new Ge,I0=new Ge,tYt=new Bu,eYt=new xy,pet=class d{constructor(s=0,h=0,g=0,m=d.DEFAULT_ORDER){this.isEuler=!0,this._x=s,this._y=h,this._z=g,this._order=m}get x(){return this._x}set x(s){this._x=s,this._onChangeCallback()}get y(){return this._y}set y(s){this._y=s,this._onChangeCallback()}get z(){return this._z}set z(s){this._z=s,this._onChangeCallback()}get order(){return this._order}set order(s){this._order=s,this._onChangeCallback()}set(s,h,g,m=this._order){return this._x=s,this._y=h,this._z=g,this._order=m,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(s){return this._x=s._x,this._y=s._y,this._z=s._z,this._order=s._order,this._onChangeCallback(),this}setFromRotationMatrix(s,h=this._order,g=!0){let m=s.elements,_=m[0],S=m[4],y=m[8],R=m[1],N=m[5],B=m[9],P=m[2],U=m[6],W=m[10];switch(h){case"XYZ":this._y=Math.asin(pg(y,-1,1)),Math.abs(y)<.9999999?(this._x=Math.atan2(-B,W),this._z=Math.atan2(-S,_)):(this._x=Math.atan2(U,N),this._z=0);break;case"YXZ":this._x=Math.asin(-pg(B,-1,1)),Math.abs(B)<.9999999?(this._y=Math.atan2(y,W),this._z=Math.atan2(R,N)):(this._y=Math.atan2(-P,_),this._z=0);break;case"ZXY":this._x=Math.asin(pg(U,-1,1)),Math.abs(U)<.9999999?(this._y=Math.atan2(-P,W),this._z=Math.atan2(-S,N)):(this._y=0,this._z=Math.atan2(R,_));break;case"ZYX":this._y=Math.asin(-pg(P,-1,1)),Math.abs(P)<.9999999?(this._x=Math.atan2(U,W),this._z=Math.atan2(R,_)):(this._x=0,this._z=Math.atan2(-S,N));break;case"YZX":this._z=Math.asin(pg(R,-1,1)),Math.abs(R)<.9999999?(this._x=Math.atan2(-B,N),this._y=Math.atan2(-P,_)):(this._x=0,this._y=Math.atan2(y,W));break;case"XZY":this._z=Math.asin(-pg(S,-1,1)),Math.abs(S)<.9999999?(this._x=Math.atan2(U,N),this._y=Math.atan2(y,_)):(this._x=Math.atan2(-B,W),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+h)}return this._order=h,g===!0&&this._onChangeCallback(),this}setFromQuaternion(s,h,g){return tYt.makeRotationFromQuaternion(s),this.setFromRotationMatrix(tYt,h,g)}setFromVector3(s,h=this._order){return this.set(s.x,s.y,s.z,h)}reorder(s){return eYt.setFromEuler(this),this.setFromQuaternion(eYt,s)}equals(s){return s._x===this._x&&s._y===this._y&&s._z===this._z&&s._order===this._order}fromArray(s){return this._x=s[0],this._y=s[1],this._z=s[2],s[3]!==void 0&&(this._order=s[3]),this._onChangeCallback(),this}toArray(s=[],h=0){return s[h]=this._x,s[h+1]=this._y,s[h+2]=this._z,s[h+3]=this._order,s}_onChange(s){return this._onChangeCallback=s,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};pet.DEFAULT_ORDER="XYZ";var yU=class{constructor(){this.mask=1}set(s){this.mask=(1<>>0}enable(s){this.mask|=1<1){for(let h=0;h1){for(let g=0;g0&&(m.userData=this.userData),m.layers=this.layers.mask,m.matrix=this.matrix.toArray(),m.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(m.matrixAutoUpdate=!1),this.isInstancedMesh&&(m.type="InstancedMesh",m.count=this.count,m.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(m.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(m.type="BatchedMesh",m.perObjectFrustumCulled=this.perObjectFrustumCulled,m.sortObjects=this.sortObjects,m.drawRanges=this._drawRanges,m.reservedRanges=this._reservedRanges,m.visibility=this._visibility,m.active=this._active,m.bounds=this._bounds.map(y=>({boxInitialized:y.boxInitialized,boxMin:y.box.min.toArray(),boxMax:y.box.max.toArray(),sphereInitialized:y.sphereInitialized,sphereRadius:y.sphere.radius,sphereCenter:y.sphere.center.toArray()})),m.maxGeometryCount=this._maxGeometryCount,m.maxVertexCount=this._maxVertexCount,m.maxIndexCount=this._maxIndexCount,m.geometryInitialized=this._geometryInitialized,m.geometryCount=this._geometryCount,m.matricesTexture=this._matricesTexture.toJSON(s),this.boundingSphere!==null&&(m.boundingSphere={center:m.boundingSphere.center.toArray(),radius:m.boundingSphere.radius}),this.boundingBox!==null&&(m.boundingBox={min:m.boundingBox.min.toArray(),max:m.boundingBox.max.toArray()}));function _(y,R){return y[R.uuid]===void 0&&(y[R.uuid]=R.toJSON(s)),R.uuid}if(this.isScene)this.background&&(this.background.isColor?m.background=this.background.toJSON():this.background.isTexture&&(m.background=this.background.toJSON(s).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(m.environment=this.environment.toJSON(s).uuid);else if(this.isMesh||this.isLine||this.isPoints){m.geometry=_(s.geometries,this.geometry);let y=this.geometry.parameters;if(y!==void 0&&y.shapes!==void 0){let R=y.shapes;if(Array.isArray(R))for(let N=0,B=R.length;N0){m.children=[];for(let y=0;y0){m.animations=[];for(let y=0;y0&&(g.geometries=y),R.length>0&&(g.materials=R),N.length>0&&(g.textures=N),B.length>0&&(g.images=B),P.length>0&&(g.shapes=P),U.length>0&&(g.skeletons=U),W.length>0&&(g.animations=W),q.length>0&&(g.nodes=q)}return g.object=m,g;function S(y){let R=[];for(let N in y){let B=y[N];delete B.metadata,R.push(B)}return R}}clone(s){return new this.constructor().copy(this,s)}copy(s,h=!0){if(this.name=s.name,this.up.copy(s.up),this.position.copy(s.position),this.rotation.order=s.rotation.order,this.quaternion.copy(s.quaternion),this.scale.copy(s.scale),this.matrix.copy(s.matrix),this.matrixWorld.copy(s.matrixWorld),this.matrixAutoUpdate=s.matrixAutoUpdate,this.matrixWorldAutoUpdate=s.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=s.matrixWorldNeedsUpdate,this.layers.mask=s.layers.mask,this.visible=s.visible,this.castShadow=s.castShadow,this.receiveShadow=s.receiveShadow,this.frustumCulled=s.frustumCulled,this.renderOrder=s.renderOrder,this.animations=s.animations.slice(),this.userData=JSON.parse(JSON.stringify(s.userData)),h===!0)for(let g=0;g0?m.multiplyScalar(1/Math.sqrt(_)):m.set(0,0,0)}static getBarycoord(s,h,g,m,_){qw.subVectors(m,h),qx.subVectors(g,h),K_t.subVectors(s,h);let S=qw.dot(qw),y=qw.dot(qx),R=qw.dot(K_t),N=qx.dot(qx),B=qx.dot(K_t),P=S*N-y*y;if(P===0)return _.set(0,0,0),null;let U=1/P,W=(N*R-y*B)*U,q=(S*B-y*R)*U;return _.set(1-W-q,q,W)}static containsPoint(s,h,g,m){return this.getBarycoord(s,h,g,m,Xx)===null?!1:Xx.x>=0&&Xx.y>=0&&Xx.x+Xx.y<=1}static getUV(s,h,g,m,_,S,y,R){return Ntt===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Ntt=!0),this.getInterpolation(s,h,g,m,_,S,y,R)}static getInterpolation(s,h,g,m,_,S,y,R){return this.getBarycoord(s,h,g,m,Xx)===null?(R.x=0,R.y=0,"z"in R&&(R.z=0),"w"in R&&(R.w=0),null):(R.setScalar(0),R.addScaledVector(_,Xx.x),R.addScaledVector(S,Xx.y),R.addScaledVector(y,Xx.z),R)}static isFrontFacing(s,h,g,m){return qw.subVectors(g,h),qx.subVectors(s,h),qw.cross(qx).dot(m)<0}set(s,h,g){return this.a.copy(s),this.b.copy(h),this.c.copy(g),this}setFromPointsAndIndices(s,h,g,m){return this.a.copy(s[h]),this.b.copy(s[g]),this.c.copy(s[m]),this}setFromAttributeAndIndices(s,h,g,m){return this.a.fromBufferAttribute(s,h),this.b.fromBufferAttribute(s,g),this.c.fromBufferAttribute(s,m),this}clone(){return new this.constructor().copy(this)}copy(s){return this.a.copy(s.a),this.b.copy(s.b),this.c.copy(s.c),this}getArea(){return qw.subVectors(this.c,this.b),qx.subVectors(this.a,this.b),qw.cross(qx).length()*.5}getMidpoint(s){return s.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(s){return d.getNormal(this.a,this.b,this.c,s)}getPlane(s){return s.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(s,h){return d.getBarycoord(s,this.a,this.b,this.c,h)}getUV(s,h,g,m,_){return Ntt===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Ntt=!0),d.getInterpolation(s,this.a,this.b,this.c,h,g,m,_)}getInterpolation(s,h,g,m,_){return d.getInterpolation(s,this.a,this.b,this.c,h,g,m,_)}containsPoint(s){return d.containsPoint(s,this.a,this.b,this.c)}isFrontFacing(s){return d.isFrontFacing(this.a,this.b,this.c,s)}intersectsBox(s){return s.intersectsTriangle(this)}closestPointToPoint(s,h){let g=this.a,m=this.b,_=this.c,S,y;FI.subVectors(m,g),UI.subVectors(_,g),J_t.subVectors(s,g);let R=FI.dot(J_t),N=UI.dot(J_t);if(R<=0&&N<=0)return h.copy(g);Q_t.subVectors(s,m);let B=FI.dot(Q_t),P=UI.dot(Q_t);if(B>=0&&P<=B)return h.copy(m);let U=R*P-B*N;if(U<=0&&R>=0&&B<=0)return S=R/(R-B),h.copy(g).addScaledVector(FI,S);tyt.subVectors(s,_);let W=FI.dot(tyt),q=UI.dot(tyt);if(q>=0&&W<=q)return h.copy(_);let nt=W*N-R*q;if(nt<=0&&N>=0&&q<=0)return y=N/(N-q),h.copy(g).addScaledVector(UI,y);let Q=B*q-W*P;if(Q<=0&&P-B>=0&&W-q>=0)return oYt.subVectors(_,m),y=(P-B)/(P-B+(W-q)),h.copy(m).addScaledVector(oYt,y);let X=1/(Q+nt+U);return S=nt*X,y=U*X,h.copy(g).addScaledVector(FI,S).addScaledVector(UI,y)}equals(s){return s.a.equals(this.a)&&s.b.equals(this.b)&&s.c.equals(this.c)}},nKt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},eS={h:0,s:0,l:0},Ott={h:0,s:0,l:0};function eyt(d,s,h){return h<0&&(h+=1),h>1&&(h-=1),h<1/6?d+(s-d)*6*h:h<1/2?s:h<2/3?d+(s-d)*6*(2/3-h):d}var Go=class{constructor(s,h,g){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(s,h,g)}set(s,h,g){if(h===void 0&&g===void 0){let m=s;m&&m.isColor?this.copy(m):typeof m=="number"?this.setHex(m):typeof m=="string"&&this.setStyle(m)}else this.setRGB(s,h,g);return this}setScalar(s){return this.r=s,this.g=s,this.b=s,this}setHex(s,h=Pd){return s=Math.floor(s),this.r=(s>>16&255)/255,this.g=(s>>8&255)/255,this.b=(s&255)/255,Na.toWorkingColorSpace(this,h),this}setRGB(s,h,g,m=Na.workingColorSpace){return this.r=s,this.g=h,this.b=g,Na.toWorkingColorSpace(this,m),this}setHSL(s,h,g,m=Na.workingColorSpace){if(s=bEe(s,1),h=pg(h,0,1),g=pg(g,0,1),h===0)this.r=this.g=this.b=g;else{let _=g<=.5?g*(1+h):g+h-g*h,S=2*g-_;this.r=eyt(S,_,s+1/3),this.g=eyt(S,_,s),this.b=eyt(S,_,s-1/3)}return Na.toWorkingColorSpace(this,m),this}setStyle(s,h=Pd){function g(_){_!==void 0&&parseFloat(_)<1&&console.warn("THREE.Color: Alpha component of "+s+" will be ignored.")}let m;if(m=/^(\w+)\(([^\)]*)\)/.exec(s)){let _,S=m[1],y=m[2];switch(S){case"rgb":case"rgba":if(_=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(y))return g(_[4]),this.setRGB(Math.min(255,parseInt(_[1],10))/255,Math.min(255,parseInt(_[2],10))/255,Math.min(255,parseInt(_[3],10))/255,h);if(_=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(y))return g(_[4]),this.setRGB(Math.min(100,parseInt(_[1],10))/100,Math.min(100,parseInt(_[2],10))/100,Math.min(100,parseInt(_[3],10))/100,h);break;case"hsl":case"hsla":if(_=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(y))return g(_[4]),this.setHSL(parseFloat(_[1])/360,parseFloat(_[2])/100,parseFloat(_[3])/100,h);break;default:console.warn("THREE.Color: Unknown color model "+s)}}else if(m=/^\#([A-Fa-f\d]+)$/.exec(s)){let _=m[1],S=_.length;if(S===3)return this.setRGB(parseInt(_.charAt(0),16)/15,parseInt(_.charAt(1),16)/15,parseInt(_.charAt(2),16)/15,h);if(S===6)return this.setHex(parseInt(_,16),h);console.warn("THREE.Color: Invalid hex color "+s)}else if(s&&s.length>0)return this.setColorName(s,h);return this}setColorName(s,h=Pd){let g=nKt[s.toLowerCase()];return g!==void 0?this.setHex(g,h):console.warn("THREE.Color: Unknown color "+s),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(s){return this.r=s.r,this.g=s.g,this.b=s.b,this}copySRGBToLinear(s){return this.r=KI(s.r),this.g=KI(s.g),this.b=KI(s.b),this}copyLinearToSRGB(s){return this.r=G_t(s.r),this.g=G_t(s.g),this.b=G_t(s.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(s=Pd){return Na.fromWorkingColorSpace(mp.copy(this),s),Math.round(pg(mp.r*255,0,255))*65536+Math.round(pg(mp.g*255,0,255))*256+Math.round(pg(mp.b*255,0,255))}getHexString(s=Pd){return("000000"+this.getHex(s).toString(16)).slice(-6)}getHSL(s,h=Na.workingColorSpace){Na.fromWorkingColorSpace(mp.copy(this),h);let g=mp.r,m=mp.g,_=mp.b,S=Math.max(g,m,_),y=Math.min(g,m,_),R,N,B=(y+S)/2;if(y===S)R=0,N=0;else{let P=S-y;switch(N=B<=.5?P/(S+y):P/(2-S-y),S){case g:R=(m-_)/P+(m<_?6:0);break;case m:R=(_-g)/P+2;break;case _:R=(g-m)/P+4;break}R/=6}return s.h=R,s.s=N,s.l=B,s}getRGB(s,h=Na.workingColorSpace){return Na.fromWorkingColorSpace(mp.copy(this),h),s.r=mp.r,s.g=mp.g,s.b=mp.b,s}getStyle(s=Pd){Na.fromWorkingColorSpace(mp.copy(this),s);let h=mp.r,g=mp.g,m=mp.b;return s!==Pd?`color(${s} ${h.toFixed(3)} ${g.toFixed(3)} ${m.toFixed(3)})`:`rgb(${Math.round(h*255)},${Math.round(g*255)},${Math.round(m*255)})`}offsetHSL(s,h,g){return this.getHSL(eS),this.setHSL(eS.h+s,eS.s+h,eS.l+g)}add(s){return this.r+=s.r,this.g+=s.g,this.b+=s.b,this}addColors(s,h){return this.r=s.r+h.r,this.g=s.g+h.g,this.b=s.b+h.b,this}addScalar(s){return this.r+=s,this.g+=s,this.b+=s,this}sub(s){return this.r=Math.max(0,this.r-s.r),this.g=Math.max(0,this.g-s.g),this.b=Math.max(0,this.b-s.b),this}multiply(s){return this.r*=s.r,this.g*=s.g,this.b*=s.b,this}multiplyScalar(s){return this.r*=s,this.g*=s,this.b*=s,this}lerp(s,h){return this.r+=(s.r-this.r)*h,this.g+=(s.g-this.g)*h,this.b+=(s.b-this.b)*h,this}lerpColors(s,h,g){return this.r=s.r+(h.r-s.r)*g,this.g=s.g+(h.g-s.g)*g,this.b=s.b+(h.b-s.b)*g,this}lerpHSL(s,h){this.getHSL(eS),s.getHSL(Ott);let g=j_t(eS.h,Ott.h,h),m=j_t(eS.s,Ott.s,h),_=j_t(eS.l,Ott.l,h);return this.setHSL(g,m,_),this}setFromVector3(s){return this.r=s.x,this.g=s.y,this.b=s.z,this}applyMatrix3(s){let h=this.r,g=this.g,m=this.b,_=s.elements;return this.r=_[0]*h+_[3]*g+_[6]*m,this.g=_[1]*h+_[4]*g+_[7]*m,this.b=_[2]*h+_[5]*g+_[8]*m,this}equals(s){return s.r===this.r&&s.g===this.g&&s.b===this.b}fromArray(s,h=0){return this.r=s[h],this.g=s[h+1],this.b=s[h+2],this}toArray(s=[],h=0){return s[h]=this.r,s[h+1]=this.g,s[h+2]=this.b,s}fromBufferAttribute(s,h){return this.r=s.getX(h),this.g=s.getY(h),this.b=s.getZ(h),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},mp=new Go;Go.NAMES=nKt;var LEe=0,hS=class extends uS{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:LEe++}),this.uuid=TU(),this.name="",this.type="Material",this.blending=YI,this.side=aS,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=dyt,this.blendDst=pyt,this.blendEquation=HA,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Go(0,0,0),this.blendAlpha=0,this.depthFunc=net,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=VZt,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=PI,this.stencilZFail=PI,this.stencilZPass=PI,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(s){this._alphaTest>0!=s>0&&this.version++,this._alphaTest=s}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(s){if(s!==void 0)for(let h in s){let g=s[h];if(g===void 0){console.warn(`THREE.Material: parameter '${h}' has value of undefined.`);continue}let m=this[h];if(m===void 0){console.warn(`THREE.Material: '${h}' is not a property of THREE.${this.type}.`);continue}m&&m.isColor?m.set(g):m&&m.isVector3&&g&&g.isVector3?m.copy(g):this[h]=g}}toJSON(s){let h=s===void 0||typeof s=="string";h&&(s={textures:{},images:{}});let g={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};g.uuid=this.uuid,g.type=this.type,this.name!==""&&(g.name=this.name),this.color&&this.color.isColor&&(g.color=this.color.getHex()),this.roughness!==void 0&&(g.roughness=this.roughness),this.metalness!==void 0&&(g.metalness=this.metalness),this.sheen!==void 0&&(g.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(g.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(g.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(g.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(g.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(g.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(g.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(g.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(g.shininess=this.shininess),this.clearcoat!==void 0&&(g.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(g.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(g.clearcoatMap=this.clearcoatMap.toJSON(s).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(g.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(s).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(g.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(s).uuid,g.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(g.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(g.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(g.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(g.iridescenceMap=this.iridescenceMap.toJSON(s).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(g.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(s).uuid),this.anisotropy!==void 0&&(g.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(g.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(g.anisotropyMap=this.anisotropyMap.toJSON(s).uuid),this.map&&this.map.isTexture&&(g.map=this.map.toJSON(s).uuid),this.matcap&&this.matcap.isTexture&&(g.matcap=this.matcap.toJSON(s).uuid),this.alphaMap&&this.alphaMap.isTexture&&(g.alphaMap=this.alphaMap.toJSON(s).uuid),this.lightMap&&this.lightMap.isTexture&&(g.lightMap=this.lightMap.toJSON(s).uuid,g.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(g.aoMap=this.aoMap.toJSON(s).uuid,g.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(g.bumpMap=this.bumpMap.toJSON(s).uuid,g.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(g.normalMap=this.normalMap.toJSON(s).uuid,g.normalMapType=this.normalMapType,g.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(g.displacementMap=this.displacementMap.toJSON(s).uuid,g.displacementScale=this.displacementScale,g.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(g.roughnessMap=this.roughnessMap.toJSON(s).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(g.metalnessMap=this.metalnessMap.toJSON(s).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(g.emissiveMap=this.emissiveMap.toJSON(s).uuid),this.specularMap&&this.specularMap.isTexture&&(g.specularMap=this.specularMap.toJSON(s).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(g.specularIntensityMap=this.specularIntensityMap.toJSON(s).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(g.specularColorMap=this.specularColorMap.toJSON(s).uuid),this.envMap&&this.envMap.isTexture&&(g.envMap=this.envMap.toJSON(s).uuid,this.combine!==void 0&&(g.combine=this.combine)),this.envMapIntensity!==void 0&&(g.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(g.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(g.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(g.gradientMap=this.gradientMap.toJSON(s).uuid),this.transmission!==void 0&&(g.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(g.transmissionMap=this.transmissionMap.toJSON(s).uuid),this.thickness!==void 0&&(g.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(g.thicknessMap=this.thicknessMap.toJSON(s).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(g.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(g.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(g.size=this.size),this.shadowSide!==null&&(g.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(g.sizeAttenuation=this.sizeAttenuation),this.blending!==YI&&(g.blending=this.blending),this.side!==aS&&(g.side=this.side),this.vertexColors===!0&&(g.vertexColors=!0),this.opacity<1&&(g.opacity=this.opacity),this.transparent===!0&&(g.transparent=!0),this.blendSrc!==dyt&&(g.blendSrc=this.blendSrc),this.blendDst!==pyt&&(g.blendDst=this.blendDst),this.blendEquation!==HA&&(g.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(g.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(g.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(g.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(g.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(g.blendAlpha=this.blendAlpha),this.depthFunc!==net&&(g.depthFunc=this.depthFunc),this.depthTest===!1&&(g.depthTest=this.depthTest),this.depthWrite===!1&&(g.depthWrite=this.depthWrite),this.colorWrite===!1&&(g.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(g.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==VZt&&(g.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(g.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(g.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==PI&&(g.stencilFail=this.stencilFail),this.stencilZFail!==PI&&(g.stencilZFail=this.stencilZFail),this.stencilZPass!==PI&&(g.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(g.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(g.rotation=this.rotation),this.polygonOffset===!0&&(g.polygonOffset=!0),this.polygonOffsetFactor!==0&&(g.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(g.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(g.linewidth=this.linewidth),this.dashSize!==void 0&&(g.dashSize=this.dashSize),this.gapSize!==void 0&&(g.gapSize=this.gapSize),this.scale!==void 0&&(g.scale=this.scale),this.dithering===!0&&(g.dithering=!0),this.alphaTest>0&&(g.alphaTest=this.alphaTest),this.alphaHash===!0&&(g.alphaHash=!0),this.alphaToCoverage===!0&&(g.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(g.premultipliedAlpha=!0),this.forceSinglePass===!0&&(g.forceSinglePass=!0),this.wireframe===!0&&(g.wireframe=!0),this.wireframeLinewidth>1&&(g.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(g.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(g.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(g.flatShading=!0),this.visible===!1&&(g.visible=!1),this.toneMapped===!1&&(g.toneMapped=!1),this.fog===!1&&(g.fog=!1),Object.keys(this.userData).length>0&&(g.userData=this.userData);function m(_){let S=[];for(let y in _){let R=_[y];delete R.metadata,S.push(R)}return S}if(h){let _=m(s.textures),S=m(s.images);_.length>0&&(g.textures=_),S.length>0&&(g.images=S)}return g}clone(){return new this.constructor().copy(this)}copy(s){this.name=s.name,this.blending=s.blending,this.side=s.side,this.vertexColors=s.vertexColors,this.opacity=s.opacity,this.transparent=s.transparent,this.blendSrc=s.blendSrc,this.blendDst=s.blendDst,this.blendEquation=s.blendEquation,this.blendSrcAlpha=s.blendSrcAlpha,this.blendDstAlpha=s.blendDstAlpha,this.blendEquationAlpha=s.blendEquationAlpha,this.blendColor.copy(s.blendColor),this.blendAlpha=s.blendAlpha,this.depthFunc=s.depthFunc,this.depthTest=s.depthTest,this.depthWrite=s.depthWrite,this.stencilWriteMask=s.stencilWriteMask,this.stencilFunc=s.stencilFunc,this.stencilRef=s.stencilRef,this.stencilFuncMask=s.stencilFuncMask,this.stencilFail=s.stencilFail,this.stencilZFail=s.stencilZFail,this.stencilZPass=s.stencilZPass,this.stencilWrite=s.stencilWrite;let h=s.clippingPlanes,g=null;if(h!==null){let m=h.length;g=new Array(m);for(let _=0;_!==m;++_)g[_]=h[_].clone()}return this.clippingPlanes=g,this.clipIntersection=s.clipIntersection,this.clipShadows=s.clipShadows,this.shadowSide=s.shadowSide,this.colorWrite=s.colorWrite,this.precision=s.precision,this.polygonOffset=s.polygonOffset,this.polygonOffsetFactor=s.polygonOffsetFactor,this.polygonOffsetUnits=s.polygonOffsetUnits,this.dithering=s.dithering,this.alphaTest=s.alphaTest,this.alphaHash=s.alphaHash,this.alphaToCoverage=s.alphaToCoverage,this.premultipliedAlpha=s.premultipliedAlpha,this.forceSinglePass=s.forceSinglePass,this.visible=s.visible,this.toneMapped=s.toneMapped,this.userData=JSON.parse(JSON.stringify(s.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(s){s===!0&&this.version++}},nR=class extends hS{constructor(s){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Go(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Qyt,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(s)}copy(s){return super.copy(s),this.color.copy(s.color),this.map=s.map,this.lightMap=s.lightMap,this.lightMapIntensity=s.lightMapIntensity,this.aoMap=s.aoMap,this.aoMapIntensity=s.aoMapIntensity,this.specularMap=s.specularMap,this.alphaMap=s.alphaMap,this.envMap=s.envMap,this.combine=s.combine,this.reflectivity=s.reflectivity,this.refractionRatio=s.refractionRatio,this.wireframe=s.wireframe,this.wireframeLinewidth=s.wireframeLinewidth,this.wireframeLinecap=s.wireframeLinecap,this.wireframeLinejoin=s.wireframeLinejoin,this.fog=s.fog,this}};var Uh=new Ge,Btt=new Nc,D0=class{constructor(s,h,g=!1){if(Array.isArray(s))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=s,this.itemSize=h,this.count=s!==void 0?s.length/h:0,this.normalized=g,this.usage=qZt,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=iS,this.version=0}onUploadCallback(){}set needsUpdate(s){s===!0&&this.version++}get updateRange(){return console.warn("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(s){return this.usage=s,this}addUpdateRange(s,h){this.updateRanges.push({start:s,count:h})}clearUpdateRanges(){this.updateRanges.length=0}copy(s){return this.name=s.name,this.array=new s.array.constructor(s.array),this.itemSize=s.itemSize,this.count=s.count,this.normalized=s.normalized,this.usage=s.usage,this.gpuType=s.gpuType,this}copyAt(s,h,g){s*=this.itemSize,g*=h.itemSize;for(let m=0,_=this.itemSize;m<_;m++)this.array[s+m]=h.array[g+m];return this}copyArray(s){return this.array.set(s),this}applyMatrix3(s){if(this.itemSize===2)for(let h=0,g=this.count;h0&&(s.userData=this.userData),this.parameters!==void 0){let R=this.parameters;for(let N in R)R[N]!==void 0&&(s[N]=R[N]);return s}s.data={attributes:{}};let h=this.index;h!==null&&(s.data.index={type:h.array.constructor.name,array:Array.prototype.slice.call(h.array)});let g=this.attributes;for(let R in g){let N=g[R];s.data.attributes[R]=N.toJSON(s.data)}let m={},_=!1;for(let R in this.morphAttributes){let N=this.morphAttributes[R],B=[];for(let P=0,U=N.length;P0&&(m[R]=B,_=!0)}_&&(s.data.morphAttributes=m,s.data.morphTargetsRelative=this.morphTargetsRelative);let S=this.groups;S.length>0&&(s.data.groups=JSON.parse(JSON.stringify(S)));let y=this.boundingSphere;return y!==null&&(s.data.boundingSphere={center:y.center.toArray(),radius:y.radius}),s}clone(){return new this.constructor().copy(this)}copy(s){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let h={};this.name=s.name;let g=s.index;g!==null&&this.setIndex(g.clone(h));let m=s.attributes;for(let N in m){let B=m[N];this.setAttribute(N,B.clone(h))}let _=s.morphAttributes;for(let N in _){let B=[],P=_[N];for(let U=0,W=P.length;U0){let m=h[g[0]];if(m!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let _=0,S=m.length;_(s.far-s.near)**2))&&(cYt.copy(_).invert(),UA.copy(s.ray).applyMatrix4(cYt),!(g.boundingBox!==null&&UA.intersectsBox(g.boundingBox)===!1)&&this._computeIntersections(s,h,UA)))}_computeIntersections(s,h,g){let m,_=this.geometry,S=this.material,y=_.index,R=_.attributes.position,N=_.attributes.uv,B=_.attributes.uv1,P=_.attributes.normal,U=_.groups,W=_.drawRange;if(y!==null)if(Array.isArray(S))for(let q=0,nt=U.length;qh.far?null:{distance:N,point:Wtt.clone(),object:d}}function $tt(d,s,h,g,m,_,S,y,R,N){d.getVertexPosition(y,jI),d.getVertexPosition(R,HI),d.getVertexPosition(N,GI);let B=IEe(d,s,h,g,jI,HI,GI,Gtt);if(B){m&&(ztt.fromBufferAttribute(m,y),jtt.fromBufferAttribute(m,R),Htt.fromBufferAttribute(m,N),B.uv=WA.getInterpolation(Gtt,jI,HI,GI,ztt,jtt,Htt,new Nc)),_&&(ztt.fromBufferAttribute(_,y),jtt.fromBufferAttribute(_,R),Htt.fromBufferAttribute(_,N),B.uv1=WA.getInterpolation(Gtt,jI,HI,GI,ztt,jtt,Htt,new Nc),B.uv2=B.uv1),S&&(uYt.fromBufferAttribute(S,y),lYt.fromBufferAttribute(S,R),hYt.fromBufferAttribute(S,N),B.normal=WA.getInterpolation(Gtt,jI,HI,GI,uYt,lYt,hYt,new Ge),B.normal.dot(g.direction)>0&&B.normal.multiplyScalar(-1));let P={a:y,b:R,c:N,normal:new Ge,materialIndex:0};WA.getNormal(jI,HI,GI,P.normal),B.face=P}return B}var XA=class d extends My{constructor(s=1,h=1,g=1,m=1,_=1,S=1){super(),this.type="BoxGeometry",this.parameters={width:s,height:h,depth:g,widthSegments:m,heightSegments:_,depthSegments:S};let y=this;m=Math.floor(m),_=Math.floor(_),S=Math.floor(S);let R=[],N=[],B=[],P=[],U=0,W=0;q("z","y","x",-1,-1,g,h,s,S,_,0),q("z","y","x",1,-1,g,h,-s,S,_,1),q("x","z","y",1,1,s,g,h,m,S,2),q("x","z","y",1,-1,s,g,-h,m,S,3),q("x","y","z",1,-1,s,h,g,m,_,4),q("x","y","z",-1,-1,s,h,-g,m,_,5),this.setIndex(R),this.setAttribute("position",new bg(N,3)),this.setAttribute("normal",new bg(B,3)),this.setAttribute("uv",new bg(P,2));function q(nt,Q,X,gt,ft,xt,Bt,Ot,Pt,se,ot){let Lt=xt/Pt,be=Bt/se,ln=xt/2,Fn=Bt/2,ne=Ot/2,xe=Pt+1,re=se+1,hn=0,Se=0,ke=new Ge;for(let mn=0;mn0?1:-1,B.push(ke.x,ke.y,ke.z),P.push(Qn/Pt),P.push(1-mn/se),hn+=1}}for(let mn=0;mn=St)return x;var ee=F-h1(J);if(ee<1)return J;var fe=Vt?Ib(Vt,0,ee).join(""):x.slice(0,ee);if(mt===d)return fe+J;if(Vt&&(ee+=fe.length-ee),Nb(mt)){if(x.slice(ee).search(mt)){var Cn,kn=fe;for(mt.global||(mt=mf(mt.source,Ac(cv.exec(mt))+"g")),mt.lastIndex=0;Cn=mt.exec(kn);)var Wn=Cn.index;fe=fe.slice(0,Wn===d?ee:Wn)}}else if(x.indexOf(Fd(mt),ee)!=ee){var Ki=fe.lastIndexOf(mt);Ki>-1&&(fe=fe.slice(0,Ki))}return fe+J}function CG(x){return x=Ac(x),x&&Mi.test(x)?x.replace(Ln,Gy):x}var AG=Qy(function(x,C,F){return x+(F?" ":"")+C.toUpperCase()}),S5=r8("toUpperCase");function r2(x,C,F){return x=Ac(x),C=F?d:C,C===d?zy(x)?yb(x):Ny(x):x.match(C)||[]}var d9=oo(function(x,C){try{return df(x,d,C)}catch(F){return v5(F)?F:new vs(F)}}),dT=tm(function(x,C){return su(C,function(F){F=g1(F),Lg(x,F,Dg(x[F],x))}),x});function pT(x){var C=x==null?0:x.length,F=cs();return x=C?ea(x,function(J){if(typeof J[1]!="function")throw new Jf(m);return[F(J[0]),J[1]]}):[],oo(function(J){for(var mt=-1;++mthn)return[];var F=mn,J=$t(x,mn);C=cs(C),x-=mn;for(var mt=Fy(J,C);++F0||C<0)?new po(F):(x<0?F=F.takeRight(-x):x&&(F=F.drop(x)),C!==d&&(C=Ys(C),F=C<0?F.dropRight(-C):F.take(C-x)),F)},po.prototype.takeRightWhile=function(x){return this.reverse().takeWhile(x).reverse()},po.prototype.toArray=function(){return this.take(mn)},Pg(po.prototype,function(x,C){var F=/^(?:filter|find|map|reject)|While$/.test(C),J=/^(?:head|last)$/.test(C),mt=Mt[J?"take"+(C=="last"?"Right":""):C],St=J||/^find/.test(C);mt&&(Mt.prototype[C]=function(){var Vt=this.__wrapped__,ee=J?[1]:arguments,fe=Vt instanceof po,Cn=ee[0],kn=fe||Us(Vt),Wn=function(co){var $o=mt.apply(Mt,Eg([co],ee));return J&&Ki?$o[0]:$o};kn&&F&&typeof Cn=="function"&&Cn.length!=1&&(fe=kn=!1);var Ki=this.__chain__,Er=!!this.__actions__.length,Wr=St&&!Ki,no=fe&&!Er;if(!St&&kn){Vt=no?Vt:new po(this);var Zr=x.apply(Vt,ee);return Zr.__actions__.push({func:m5,args:[Wn],thisArg:d}),new bf(Zr,Ki)}return Wr&&no?x.apply(this,ee):(Zr=this.thru(Wn),Wr?J?Zr.value()[0]:Zr.value():Zr)})}),su(["pop","push","shift","sort","splice","unshift"],function(x){var C=q0[x],F=/^(?:push|sort|unshift)$/.test(x)?"tap":"thru",J=/^(?:pop|shift)$/.test(x);Mt.prototype[x]=function(){var mt=arguments;if(J&&!this.__chain__){var St=this.value();return C.apply(Us(St)?St:[],mt)}return this[F](function(Vt){return C.apply(Us(Vt)?Vt:[],mt)})}}),Pg(po.prototype,function(x,C){var F=Mt[C];if(F){var J=F.name+"";pc.call(Eb,J)||(Eb[J]=[]),Eb[J].push({name:C,func:F})}}),Eb[JS(d,Q).name]=[{name:"wrapper",func:d}],po.prototype.clone=KU,po.prototype.reverse=JU,po.prototype.value=QU,Mt.prototype.at=Bnt,Mt.prototype.chain=Fnt,Mt.prototype.commit=Unt,Mt.prototype.next=jl,Mt.prototype.plant=jnt,Mt.prototype.reverse=Hnt,Mt.prototype.toJSON=Mt.prototype.valueOf=Mt.prototype.value=$j,Mt.prototype.first=Mt.prototype.head,Mb&&(Mt.prototype[Mb]=znt),Mt},Bd=$y();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Cc._=Bd,define(function(){return Bd})):Mg?((Mg.exports=Bd)._=Bd,$0._=Bd):Cc._=Bd}).call(LI)});var aU=Ld(cU=>{"use strict";Object.defineProperty(cU,"__esModule",{value:!0});var Mtt=sU(),R_t=UA(),eZt;(function(d){d.skin=null;function s(N,B){var P=R_t.filter(N,function(U){if(U instanceof Array&&U[0]==="g")return U[1]["s:pid"].startsWith(B)});return P}d.getPortsWithPrefix=s;function h(N,B){var P=R_t.filter(N,function(U){var j=U[0];if(U instanceof Array&&j==="g"){var V=U[1];return B(V)}return!1});return P.map(function(U){return U[1]["s:pid"]})}function p(N){return h(N,function(B){return B["s:position"]?B["s:position"]==="top":!1})}d.getInputPids=p;function m(N){return h(N,function(B){return B["s:position"]?B["s:position"]==="bottom":!1})}d.getOutputPids=m;function _(N){return h(N,function(B){return B["s:dir"]?B["s:dir"]==="lateral":B["s:position"]?B["s:position"]==="left"||B["s:position"]==="right":!1})}d.getLateralPortPids=_;function E(N){var B=null;return Mtt.traverse(d.skin,{enter:function(P,U){P.name==="s:alias"&&P.attr.val===N&&(B=U)}}),B==null&&Mtt.traverse(d.skin,{enter:function(P){P.attr["s:type"]==="generic"&&(B=P)}}),B.full}d.findSkinType=E;function y(){var N=[];return Mtt.t(d.skin,{enter:function(B){B.name==="s:low_priority_alias"&&N.push(B.attr.value)}}),N}d.getLowPriorityAliases=y;function I(){var N;return Mtt.t(d.skin,{enter:function(B){B.name==="s:properties"?N=R_t.mapValues(B.attr,function(P){return isNaN(Number(P))?P==="true"?!0:P==="false"?!1:P:Number(P)}):B.name==="s:layoutEngine"&&(N.layoutEngine=B.attr)}}),N.layoutEngine||(N.layoutEngine={}),N}d.getProperties=I})(eZt=cU.Skin||(cU.Skin={}));cU.default=eZt});var nZt=Ld(N_t=>{"use strict";Object.defineProperty(N_t,"__esModule",{value:!0});var D_t;(function(d){var s;(function(E){E.Zero="0",E.One="1",E.X="x"})(s||(s={}));var h;(function(E){E.Input="input",E.Output="output"})(h=d.Direction||(d.Direction={}));function p(E){return E.port_directions?Object.keys(E.port_directions).filter(function(y){return E.port_directions[y]===h.Input}):[]}d.getInputPortPids=p;function m(E){return E.port_directions?Object.keys(E.port_directions).filter(function(y){return E.port_directions[y]===h.Output}):[]}d.getOutputPortPids=m;var _;(function(E){E[E.Hide=0]="Hide",E[E.NoHide=1]="NoHide"})(_||(_={}))})(D_t||(D_t={}));N_t.default=D_t});var iZt=Ld(B_t=>{"use strict";Object.defineProperty(B_t,"__esModule",{value:!0});var wMe=F_t(),O_t=UA(),vMe=function(){function d(s,h){this.key=s,this.value=h}return Object.defineProperty(d.prototype,"Key",{get:function(){return this.key},enumerable:!0,configurable:!0}),d.prototype.keyIn=function(s){return O_t.includes(s,this.key)},d.prototype.maxVal=function(){return O_t.max(O_t.map(this.value,function(s){return Number(s)}))},d.prototype.valString=function(){return","+this.value.join()+","},d.prototype.findConstants=function(s,h,p){var m=this,_="",E=[],y=this.value;return y.forEach(function(I,N){I==="0"||I==="1"?(h+=1,_+=I,y[N]=h,E.push(h)):E.length>0&&(m.assignConstant(_,E,N,s,p),_="",E=[])}),E.length>0&&this.assignConstant(_,E,y.length,s,p),h},d.prototype.getGenericElkPort=function(s,h,p){var m=this.parentNode.Key,_=this.parentNode.getTemplate()[1]["s:type"];if(s===0){var E={id:m+"."+this.key,width:1,height:1,x:Number(h[0][1]["s:x"]),y:Number(h[0][1]["s:y"])};return(_==="generic"||_==="join")&&p==="in"&&(E.labels=[{id:m+"."+this.key+".label",text:this.key,x:Number(h[0][2][1].x)-10,y:Number(h[0][2][1].y)-6,width:6*this.key.length,height:11}]),(_==="generic"||_==="split")&&p==="out"&&(E.labels=[{id:m+"."+this.key+".label",text:this.key,x:Number(h[0][2][1].x)-10,y:Number(h[0][2][1].y)-6,width:6*this.key.length,height:11}]),E}else{var y=Number(h[1][1]["s:y"])-Number(h[0][1]["s:y"]),E={id:m+"."+this.key,width:1,height:1,x:Number(h[0][1]["s:x"]),y:s*y+Number(h[0][1]["s:y"])};return _==="generic"&&(E.labels=[{id:m+"."+this.key+".label",text:this.key,x:Number(h[0][2][1].x)-10,y:Number(h[0][2][1].y)-6,width:6*this.key.length,height:11}]),E}},d.prototype.assignConstant=function(s,h,p,m,_){var E=this,y=s.split("").reverse().join("");if(m.hasOwnProperty(y)){var I=m[y],N=I.length;I.forEach(function(B,P){var U=p-N+P;E.value[U]=B})}else _.push(wMe.default.fromConstantInfo(y,h)),m[y]=h},d}();B_t.Port=vMe});var rZt=Ld((yJe,Ett)=>{var _Me=function(){"use strict";function d(B,P){return P!=null&&B instanceof P}var s;try{s=Map}catch{s=function(){}}var h;try{h=Set}catch{h=function(){}}var p;try{p=Promise}catch{p=function(){}}function m(B,P,U,j,V){typeof P=="object"&&(U=P.depth,j=P.prototype,V=P.includeNonEnumerable,P=P.circular);var tt=[],Q=[],X=typeof Buffer<"u";typeof P>"u"&&(P=!0),typeof U>"u"&&(U=1/0);function gt(ft,xt){if(ft===null)return null;if(xt===0)return ft;var Bt,Ot;if(typeof ft!="object")return ft;if(d(ft,s))Bt=new s;else if(d(ft,h))Bt=new h;else if(d(ft,p))Bt=new p(function(xe,re){ft.then(function(hn){xe(gt(hn,xt-1))},function(hn){re(gt(hn,xt-1))})});else if(m.__isArray(ft))Bt=[];else if(m.__isRegExp(ft))Bt=new RegExp(ft.source,N(ft)),ft.lastIndex&&(Bt.lastIndex=ft.lastIndex);else if(m.__isDate(ft))Bt=new Date(ft.getTime());else{if(X&&Buffer.isBuffer(ft))return Buffer.allocUnsafe?Bt=Buffer.allocUnsafe(ft.length):Bt=new Buffer(ft.length),ft.copy(Bt),Bt;d(ft,Error)?Bt=Object.create(ft):typeof j>"u"?(Ot=Object.getPrototypeOf(ft),Bt=Object.create(Ot)):(Bt=Object.create(j),Ot=j)}if(P){var Pt=tt.indexOf(ft);if(Pt!=-1)return Q[Pt];tt.push(ft),Q.push(Bt)}d(ft,s)&&ft.forEach(function(xe,re){var hn=gt(re,xt-1),Se=gt(xe,xt-1);Bt.set(hn,Se)}),d(ft,h)&&ft.forEach(function(xe){var re=gt(xe,xt-1);Bt.add(re)});for(var se in ft){var ot;Ot&&(ot=Object.getOwnPropertyDescriptor(Ot,se)),!(ot&&ot.set==null)&&(Bt[se]=gt(ft[se],xt-1))}if(Object.getOwnPropertySymbols)for(var Lt=Object.getOwnPropertySymbols(ft),se=0;se{"use strict";Object.defineProperty(H_t,"__esModule",{value:!0});var Stt=G_t(),U_t=nZt(),n1=aU(),QE=iZt(),z_t=UA(),uU=rZt(),Ttt=sU(),yMe=function(){function d(s,h,p,m,_){var E=this;this.key=s,this.type=h,this.inputPorts=p,this.outputPorts=m,this.attributes=_||{},p.forEach(function(y){y.parentNode=E}),m.forEach(function(y){y.parentNode=E})}return d.fromPort=function(s,h){var p=s.direction===U_t.default.Direction.Input;return p?new d(h,"$_inputExt_",[],[new QE.Port("Y",s.bits)],{}):new d(h,"$_outputExt_",[new QE.Port("A",s.bits)],[],{})},d.fromYosysCell=function(s,h){var p=n1.default.findSkinType(s.type),m=n1.default.getInputPids(p),_=n1.default.getOutputPids(p),E=z_t.map(s.connections,function(P,U){return new QE.Port(U,P)}),y=E.filter(function(P){return P.keyIn(m)}),I=E.filter(function(P){return P.keyIn(_)});if(y.length+I.length!==E.length){var N=U_t.default.getInputPortPids(s),B=U_t.default.getOutputPortPids(s);y=E.filter(function(P){return P.keyIn(N)}),I=E.filter(function(P){return P.keyIn(B)})}return new d(h,s.type,y,I,s.attributes)},d.fromConstantInfo=function(s,h){return new d(s,"$_constant_",[],[new QE.Port("Y",h)],{})},d.fromJoinInfo=function(s,h){var p=s.slice(1,-1).split(","),m=p.map(function(y){return Number(y)}),_=[new QE.Port("Y",m)],E=h.map(function(y){return new QE.Port(y,sZt(m,y))});return new d("$join$"+s,"$_join_",E,_,{})},d.fromSplitInfo=function(s,h){var p=s.slice(1,-1).split(","),m=p.map(function(y){return Number(y)}),_=[new QE.Port("A",m)],E=h.map(function(y){var I=sZt(m,y);return new QE.Port(y,I)});return new d("$split$"+s,"$_split_",_,E,{})},Object.defineProperty(d.prototype,"Type",{get:function(){return this.type},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"Key",{get:function(){return this.key},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"InputPorts",{get:function(){return this.inputPorts},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"OutputPorts",{get:function(){return this.outputPorts},enumerable:!0,configurable:!0}),d.prototype.maxOutVal=function(s){var h=z_t.max(this.outputPorts.map(function(p){return p.maxVal()}));return z_t.max([h,s])},d.prototype.findConstants=function(s,h,p){return this.inputPorts.forEach(function(m){h=m.findConstants(s,h,p)}),h},d.prototype.inputPortVals=function(){return this.inputPorts.map(function(s){return s.valString()})},d.prototype.outputPortVals=function(){return this.outputPorts.map(function(s){return s.valString()})},d.prototype.collectPortsByDirection=function(s,h,p,m){var _=n1.default.findSkinType(this.type),E=n1.default.getLateralPortPids(_);this.inputPorts.forEach(function(y){var I=y.keyIn(E);I||_[1]["s:type"]==="generic"&&m?Stt.addToDefaultDict(p,y.valString(),y):Stt.addToDefaultDict(s,y.valString(),y)}),this.outputPorts.forEach(function(y){var I=y.keyIn(E);I||_[1]["s:type"]==="generic"&&m?Stt.addToDefaultDict(p,y.valString(),y):Stt.addToDefaultDict(h,y.valString(),y)})},d.prototype.getValueAttribute=function(){return this.attributes&&this.attributes.value?this.attributes.value:null},d.prototype.getTemplate=function(){return n1.default.findSkinType(this.type)},d.prototype.buildElkChild=function(){var s=this,h=this.getTemplate(),p=h[1]["s:type"],m={"org.eclipse.elk.portConstraints":"FIXED_POS"},_=null,E=null;for(var y in this.attributes)if(y.startsWith("org.eclipse.elk")){if(y==="org.eclipse.elk.x"){_=this.attributes[y];continue}if(y==="org.eclipse.elk.y"){E=this.attributes[y];continue}m[y]=this.attributes[y]}if(p==="join"||p==="split"||p==="generic"){var I=n1.default.getPortsWithPrefix(h,"in"),N=n1.default.getPortsWithPrefix(h,"out"),B=this.inputPorts.map(function(Q,X){return Q.getGenericElkPort(X,I,"in")}),P=this.outputPorts.map(function(Q,X){return Q.getGenericElkPort(X,N,"out")}),U={id:this.key,width:Number(h[1]["s:width"]),height:Number(this.getGenericHeight()),ports:B.concat(P),layoutOptions:m,labels:[]};return _&&(U.x=_),E&&(U.y=E),this.addLabels(h,U),U}var j=n1.default.getPortsWithPrefix(h,"").map(function(Q){return{id:s.key+"."+Q[1]["s:pid"],width:0,height:0,x:Number(Q[1]["s:x"]),y:Number(Q[1]["s:y"])}}),V=Number(h[1]["s:width"]),tt={id:this.key,width:V,height:Number(h[1]["s:height"]),ports:j,layoutOptions:m,labels:[]};return _&&(tt.x=_),E&&(tt.y=E),this.addLabels(h,tt),tt},d.prototype.render=function(s){for(var h=this.getTemplate(),p=uU(h),m=0,_=s.labels;m<_.length;m++){var E=_[m],y=E.id.split(".")[2];xMe(p,y,E.text)}for(var I=2;I3){var y=parseInt(p.key,2);E="0x"+y.toString(16)}else E=p.key;p.attributes[_]=p.key}else if(_ in p.attributes)E=p.attributes[_];else return;h.labels.push({id:p.key+".label."+_,text:E,x:m.attr.x,y:m.attr.y-6,height:11,width:6*E.length})}}})},d.prototype.getGenericHeight=function(){var s=this.getTemplate(),h=n1.default.getPortsWithPrefix(s,"in"),p=n1.default.getPortsWithPrefix(s,"out");if(this.inputPorts.length>this.outputPorts.length){var m=Number(h[1][1]["s:y"])-Number(h[0][1]["s:y"]);return Number(s[1]["s:height"])+m*(this.inputPorts.length-2)}if(p.length>1){var m=Number(p[1][1]["s:y"])-Number(p[0][1]["s:y"]);return Number(s[1]["s:height"])+m*(this.outputPorts.length-2)}return Number(s[1]["s:height"])},d}();H_t.default=yMe;function j_t(d,s){Ttt.traverse(d,{enter:function(h){h.name==="rect"&&h.attr["s:generic"]==="body"&&(h.attr.height=s)}})}function xMe(d,s,h){Ttt.traverse(d,{enter:function(p){p.name==="text"&&p.attr["s:attribute"]===s&&(p.full[2]=h)}})}function MMe(d,s,h){Ttt.traverse(d,{enter:function(p){var m=p.attr.class;m&&m.includes(s)&&(p.attr.class=m.replace(s,h))}})}function sZt(d,s){var h=s.indexOf(":");if(h===-1)return[d[Number(s)]];var p=s.slice(0,h),m=s.slice(h+1),_=d.slice(Number(p),Number(m)+1);return _}});var G_t=Ld(PI=>{"use strict";Object.defineProperty(PI,"__esModule",{value:!0});var EMe=aU(),Ctt=F_t(),P0=UA(),SMe=function(){function d(s){var h=this;this.moduleName=null,P0.forEach(s.modules,function(E,y){E.attributes&&Number(E.attributes.top)===1&&(h.moduleName=y)}),this.moduleName==null&&(this.moduleName=Object.keys(s.modules)[0]);var p=s.modules[this.moduleName],m=P0.map(p.ports,Ctt.default.fromPort),_=P0.map(p.cells,function(E,y){return Ctt.default.fromYosysCell(E,y)});this.nodes=_.concat(m),this.wires=[]}return d.prototype.addConstants=function(){var s=this.nodes.reduce(function(m,_){return _.maxOutVal(m)},-1),h={},p=[];this.nodes.forEach(function(m){s=m.findConstants(h,s,p)}),this.nodes=this.nodes.concat(p)},d.prototype.addSplitsJoins=function(){var s=P0.flatMap(this.nodes,function(E){return E.inputPortVals()}),h=P0.flatMap(this.nodes,function(E){return E.outputPortVals()}),p=s.slice(),m={},_={};s.forEach(function(E){hU(h,p,E,0,E.length,m,_)}),this.nodes=this.nodes.concat(P0.map(_,function(E,y){return Ctt.default.fromJoinInfo(y,E)})).concat(P0.map(m,function(E,y){return Ctt.default.fromSplitInfo(y,E)}))},d.prototype.createWires=function(){var s=EMe.default.getProperties(),h={},p={},m={};this.nodes.forEach(function(y){y.collectPortsByDirection(h,p,m,s.genericsLaterals)});var _=aZt(P0.keys(h).concat(P0.keys(p)).concat(P0.keys(m))),E=_.map(function(y){var I=p[y]||[],N=h[y]||[],B=m[y]||[],P={netName:y,drivers:I,riders:N,laterals:B};return I.concat(N).concat(B).forEach(function(U){U.wire=P}),P});this.wires=E},d}();PI.FlatModule=SMe;function TMe(d){var s="";return d.forEach(function(h){var p=String(h);s===""?s=p:s+=","+p}),","+s+","}PI.arrayToBitstring=TMe;function cZt(d,s){return s.indexOf(d)>-1}function oZt(d,s){return P0.findIndex(s,function(h){return cZt(d,h)})}function lU(d,s,h){d[s]===void 0?d[s]=[h]:d[s].push(h)}PI.addToDefaultDict=lU;function Att(d,s,h){var p=P0.max([d.indexOf(s),h]),m=d.substring(0,p).split(",").length-1,_=m+s.split(",").length-3;return m===_?String(m):String(m)+":"+String(_)}function hU(d,s,h,p,m,_,E){var y=s.indexOf(h);if(y!==-1&&s.splice(y,1),!(p>=h.length||m-p<2)){var I=h.slice(p,m);if(cZt(I,d)){I!==h&&lU(E,h,Att(h,I,p)),hU(d,s,h,m-1,h.length,_,E);return}var N=oZt(I,d);if(N!==-1){I!==h&&lU(E,h,Att(h,I,p)),lU(_,d[N],Att(d[N],I,0)),d.push(I),hU(d,s,h,m-1,h.length,_,E);return}if(oZt(I,s)!==-1){I!==h&&lU(E,h,Att(h,I,p)),hU(d,[],I,0,I.length,_,E),d.push(I);return}hU(d,s,h,p,p+I.slice(0,-1).lastIndexOf(",")+1,_,E)}}function aZt(d){var s={};return d.forEach(function(h){s[h]=!0}),P0.keys(s)}PI.removeDups=aZt});var $_t=Ld(fU=>{"use strict";Object.defineProperty(fU,"__esModule",{value:!0});var lZt=UA(),Gf;(function(d){d.wireNameLookup={},d.dummyNum=0,d.edgeIndex=0})(Gf=fU.ElkModel||(fU.ElkModel={}));function CMe(d){var s=d.nodes.map(function(p){return p.buildElkChild()});Gf.edgeIndex=0,Gf.dummyNum=0;var h=lZt.flatMap(d.wires,function(p){if(p.drivers.length>0&&p.riders.length>0&&p.laterals.length===0){var m=[];return W_t(p.drivers,p.riders,m),m}else if(p.drivers.concat(p.riders).length>0&&p.laterals.length>0){var m=[];return W_t(p.drivers,p.laterals,m),W_t(p.laterals,p.riders,m),m}else if(p.riders.length===0&&p.drivers.length>1){var _=uZt(s);Gf.dummyNum+=1;var E=p.drivers.map(function(P){var U=P.parentNode.Key,j="e"+String(Gf.edgeIndex);Gf.edgeIndex+=1;var V={id:j,source:U,sourcePort:U+"."+P.key,target:_,targetPort:_+".p"};return Gf.wireNameLookup[j]=P.wire.netName,V});return E}else if(p.riders.length>1&&p.drivers.length===0){var y=uZt(s);Gf.dummyNum+=1;var E=p.riders.map(function(U){var j=U.parentNode.Key,V="e"+String(Gf.edgeIndex);Gf.edgeIndex+=1;var tt={id:V,source:y,sourcePort:y+".p",target:j,targetPort:j+"."+U.key};return Gf.wireNameLookup[V]=U.wire.netName,tt});return E}else if(p.laterals.length>1){var I=p.laterals[0],N=I.parentNode.Key,B=p.laterals.slice(1).map(function(P){var U=P.parentNode.Key,j="e"+String(Gf.edgeIndex);Gf.edgeIndex+=1;var V={id:j,source:N,sourcePort:N+"."+I.key,target:U,targetPort:U+"."+P.key};return Gf.wireNameLookup[j]=P.wire.netName,V});return B}return[]});return{id:d.moduleName,children:s,edges:h}}fU.buildElkGraph=CMe;function uZt(d){var s="$d_"+String(Gf.dummyNum),h={id:s,width:0,height:0,ports:[{id:s+".p",width:0,height:0}],layoutOptions:{"org.eclipse.elk.portConstraints":"FIXED_SIDE"}};return d.push(h),s}function W_t(d,s,h){var p=lZt.flatMap(d,function(m){var _=m.parentNode.key,E=_+"."+m.key;return s.map(function(y){var I=y.parentNode.key,N=I+"."+y.key,B="e"+Gf.edgeIndex,P={id:B,sources:[E],targets:[N]};return Gf.wireNameLookup[B]=y.wire.netName,m.parentNode.type!=="$dff"&&(P.layoutOptions={"org.eclipse.elk.layered.priority.direction":10}),Gf.edgeIndex+=1,P})});h.push.apply(h,p)}});var gZt=Ld(RI=>{"use strict";var hZt=RI&&RI.__spreadArrays||function(){for(var d=0,s=0,h=arguments.length;s0?[X.bendPoints[0]]:X.endPoint:X.bendPoints&&X.bendPoints.length>0?[yy.last(X.bendPoints)]:X.startPoint}).map(function(Q){return Q.x>N.x?II.Right:Q.xN.y?II.Down:II.Up}));tt.size<3&&_.forEach(function(Q){Q.junctionPoints&&(Q.junctionPoints=Q.junctionPoints.filter(function(X){return!yy.isEqual(X,N)}))}),s+=1};s<1e4;){var p=h();if(p==="break")break}}RI.removeDummyEdges=pZt});var _Zt=Ld(Ltt=>{"use strict";Object.defineProperty(Ltt,"__esModule",{value:!0});var PMe=HXt(),IMe=sU(),RMe=G_t(),ktt=aU(),bZt=$_t(),mZt=gZt(),wZt=new PMe;function vZt(d,s){ktt.default.skin=IMe.p(d);var h=ktt.default.getProperties(),p=new RMe.FlatModule(s);return h.constants!==!1&&p.addConstants(),h.splitsAndJoins!==!1&&p.addSplitsJoins(),p.createWires(),p}function DMe(d,s,h,p){var m=vZt(d,s),_=bZt.buildElkGraph(m);if(h){p(null,JSON.stringify(_,null,2));return}var E=ktt.default.getProperties(),y=wZt.layout(_,{layoutOptions:E.layoutEngine});y.then(function(I){p(null,JSON.stringify(I,null,2))}).catch(function(I){throw Error(I)})}Ltt.dumpLayout=DMe;function NMe(d,s,h,p){var m=vZt(d,s),_=bZt.buildElkGraph(m),E=ktt.default.getProperties(),y;return p?y=new Promise(function(I){mZt.default(p,m),I()}):y=wZt.layout(_,{layoutOptions:E.layoutEngine}).then(function(I){return mZt.default(I,m)}).catch(function(I){console.error(I)}),typeof h=="function"&&y.then(function(I){return h(null,I),I}).catch(function(I){throw Error(I)}),y}Ltt.render=NMe});var hJe=FXt(zXt());var zAe=FXt(_Zt());var b2t={};lMe(b2t,{AmbientLight:()=>Det,BoxGeometry:()=>KA,Color:()=>Go,DirectionalLight:()=>Ret,DoubleSide:()=>Xw,EdgesGeometry:()=>Let,GridHelper:()=>Oet,Group:()=>cS,InstancedMesh:()=>ket,LineBasicMaterial:()=>cR,LineSegments:()=>AU,Matrix4:()=>Fu,Mesh:()=>gg,MeshBasicMaterial:()=>sR,MeshPhongMaterial:()=>Pet,PerspectiveCamera:()=>s1,Quaternion:()=>My,Raycaster:()=>Net,Scene:()=>Cet,Vector2:()=>Nc,Vector3:()=>Ge,WebGLRenderer:()=>CU});var l2t="160";var OMe=0,yZt=1,BMe=2;var QYt=1,FMe=2,Kx=3,hS=0,mg=1,Xw=2;var aS=0,QI=1,xZt=2,MZt=3,EZt=4,UMe=5,$A=100,zMe=101,jMe=102,SZt=103,TZt=104,HMe=200,GMe=201,WMe=202,$Me=203,Syt=204,Tyt=205,VMe=206,qMe=207,XMe=208,ZMe=209,YMe=210,KMe=211,JMe=212,QMe=213,tEe=214,eEe=0,nEe=1,iEe=2,oet=3,rEe=4,sEe=5,oEe=6,cEe=7,h2t=0,aEe=1,uEe=2,uS=0,lEe=1,hEe=2,fEe=3,dEe=4,pEe=5,gEe=6;var tKt=300,nR=301,iR=302,Cyt=303,Ayt=304,Bet=306,kyt=1e3,Zw=1001,Lyt=1002,r1=1003,CZt=1004;var V_t=1005;var bb=1006,mEe=1007;var xU=1008;var lS=1009,bEe=1010,wEe=1011,f2t=1012,eKt=1013,sS=1014,oS=1015,MU=1016,nKt=1017,iKt=1018,XA=1020,vEe=1021,Yw=1023,_Ee=1024,yEe=1025,ZA=1026,rR=1027,xEe=1028,rKt=1029,MEe=1030,sKt=1031,oKt=1033,q_t=33776,X_t=33777,Z_t=33778,Y_t=33779,AZt=35840,kZt=35841,LZt=35842,PZt=35843,cKt=36196,IZt=37492,RZt=37496,DZt=37808,NZt=37809,OZt=37810,BZt=37811,FZt=37812,UZt=37813,zZt=37814,jZt=37815,HZt=37816,GZt=37817,WZt=37818,$Zt=37819,VZt=37820,qZt=37821,K_t=36492,XZt=36494,ZZt=36495,EEe=36283,YZt=36284,KZt=36285,JZt=36286;var cet=2300,aet=2301,J_t=2302,QZt=2400,tYt=2401,eYt=2402;var aKt=3e3,YA=3001,SEe=3200,TEe=3201,uKt=0,CEe=1,wb="",Pd="srgb",t3="srgb-linear",d2t="display-p3",Fet="display-p3-linear",uet="linear",vu="srgb",het="rec709",fet="p3";var DI=7680;var nYt=519,AEe=512,kEe=513,LEe=514,lKt=515,PEe=516,IEe=517,REe=518,DEe=519,iYt=35044;var rYt="300 es",Pyt=1035,Qx=2e3,det=2001,fS=class{addEventListener(s,h){this._listeners===void 0&&(this._listeners={});let p=this._listeners;p[s]===void 0&&(p[s]=[]),p[s].indexOf(h)===-1&&p[s].push(h)}hasEventListener(s,h){if(this._listeners===void 0)return!1;let p=this._listeners;return p[s]!==void 0&&p[s].indexOf(h)!==-1}removeEventListener(s,h){if(this._listeners===void 0)return;let m=this._listeners[s];if(m!==void 0){let _=m.indexOf(h);_!==-1&&m.splice(_,1)}}dispatchEvent(s){if(this._listeners===void 0)return;let p=this._listeners[s.type];if(p!==void 0){s.target=this;let m=p.slice(0);for(let _=0,E=m.length;_>8&255]+gp[d>>16&255]+gp[d>>24&255]+"-"+gp[s&255]+gp[s>>8&255]+"-"+gp[s>>16&15|64]+gp[s>>24&255]+"-"+gp[h&63|128]+gp[h>>8&255]+"-"+gp[h>>16&255]+gp[h>>24&255]+gp[p&255]+gp[p>>8&255]+gp[p>>16&255]+gp[p>>24&255]).toLowerCase()}function pg(d,s,h){return Math.max(s,Math.min(h,d))}function NEe(d,s){return(d%s+s)%s}function Q_t(d,s,h){return(1-h)*d+h*s}function sYt(d){return(d&d-1)===0&&d!==0}function Ryt(d){return Math.pow(2,Math.floor(Math.log(d)/Math.LN2))}function dU(d,s){switch(s.constructor){case Float32Array:return d;case Uint32Array:return d/4294967295;case Uint16Array:return d/65535;case Uint8Array:return d/255;case Int32Array:return Math.max(d/2147483647,-1);case Int16Array:return Math.max(d/32767,-1);case Int8Array:return Math.max(d/127,-1);default:throw new Error("Invalid component type.")}}function dg(d,s){switch(s.constructor){case Float32Array:return d;case Uint32Array:return Math.round(d*4294967295);case Uint16Array:return Math.round(d*65535);case Uint8Array:return Math.round(d*255);case Int32Array:return Math.round(d*2147483647);case Int16Array:return Math.round(d*32767);case Int8Array:return Math.round(d*127);default:throw new Error("Invalid component type.")}}var Nc=class d{constructor(s=0,h=0){d.prototype.isVector2=!0,this.x=s,this.y=h}get width(){return this.x}set width(s){this.x=s}get height(){return this.y}set height(s){this.y=s}set(s,h){return this.x=s,this.y=h,this}setScalar(s){return this.x=s,this.y=s,this}setX(s){return this.x=s,this}setY(s){return this.y=s,this}setComponent(s,h){switch(s){case 0:this.x=h;break;case 1:this.y=h;break;default:throw new Error("index is out of range: "+s)}return this}getComponent(s){switch(s){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+s)}}clone(){return new this.constructor(this.x,this.y)}copy(s){return this.x=s.x,this.y=s.y,this}add(s){return this.x+=s.x,this.y+=s.y,this}addScalar(s){return this.x+=s,this.y+=s,this}addVectors(s,h){return this.x=s.x+h.x,this.y=s.y+h.y,this}addScaledVector(s,h){return this.x+=s.x*h,this.y+=s.y*h,this}sub(s){return this.x-=s.x,this.y-=s.y,this}subScalar(s){return this.x-=s,this.y-=s,this}subVectors(s,h){return this.x=s.x-h.x,this.y=s.y-h.y,this}multiply(s){return this.x*=s.x,this.y*=s.y,this}multiplyScalar(s){return this.x*=s,this.y*=s,this}divide(s){return this.x/=s.x,this.y/=s.y,this}divideScalar(s){return this.multiplyScalar(1/s)}applyMatrix3(s){let h=this.x,p=this.y,m=s.elements;return this.x=m[0]*h+m[3]*p+m[6],this.y=m[1]*h+m[4]*p+m[7],this}min(s){return this.x=Math.min(this.x,s.x),this.y=Math.min(this.y,s.y),this}max(s){return this.x=Math.max(this.x,s.x),this.y=Math.max(this.y,s.y),this}clamp(s,h){return this.x=Math.max(s.x,Math.min(h.x,this.x)),this.y=Math.max(s.y,Math.min(h.y,this.y)),this}clampScalar(s,h){return this.x=Math.max(s,Math.min(h,this.x)),this.y=Math.max(s,Math.min(h,this.y)),this}clampLength(s,h){let p=this.length();return this.divideScalar(p||1).multiplyScalar(Math.max(s,Math.min(h,p)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(s){return this.x*s.x+this.y*s.y}cross(s){return this.x*s.y-this.y*s.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(s){let h=Math.sqrt(this.lengthSq()*s.lengthSq());if(h===0)return Math.PI/2;let p=this.dot(s)/h;return Math.acos(pg(p,-1,1))}distanceTo(s){return Math.sqrt(this.distanceToSquared(s))}distanceToSquared(s){let h=this.x-s.x,p=this.y-s.y;return h*h+p*p}manhattanDistanceTo(s){return Math.abs(this.x-s.x)+Math.abs(this.y-s.y)}setLength(s){return this.normalize().multiplyScalar(s)}lerp(s,h){return this.x+=(s.x-this.x)*h,this.y+=(s.y-this.y)*h,this}lerpVectors(s,h,p){return this.x=s.x+(h.x-s.x)*p,this.y=s.y+(h.y-s.y)*p,this}equals(s){return s.x===this.x&&s.y===this.y}fromArray(s,h=0){return this.x=s[h],this.y=s[h+1],this}toArray(s=[],h=0){return s[h]=this.x,s[h+1]=this.y,s}fromBufferAttribute(s,h){return this.x=s.getX(h),this.y=s.getY(h),this}rotateAround(s,h){let p=Math.cos(h),m=Math.sin(h),_=this.x-s.x,E=this.y-s.y;return this.x=_*p-E*m+s.x,this.y=_*m+E*p+s.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},Ko=class d{constructor(s,h,p,m,_,E,y,I,N){d.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],s!==void 0&&this.set(s,h,p,m,_,E,y,I,N)}set(s,h,p,m,_,E,y,I,N){let B=this.elements;return B[0]=s,B[1]=m,B[2]=y,B[3]=h,B[4]=_,B[5]=I,B[6]=p,B[7]=E,B[8]=N,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(s){let h=this.elements,p=s.elements;return h[0]=p[0],h[1]=p[1],h[2]=p[2],h[3]=p[3],h[4]=p[4],h[5]=p[5],h[6]=p[6],h[7]=p[7],h[8]=p[8],this}extractBasis(s,h,p){return s.setFromMatrix3Column(this,0),h.setFromMatrix3Column(this,1),p.setFromMatrix3Column(this,2),this}setFromMatrix4(s){let h=s.elements;return this.set(h[0],h[4],h[8],h[1],h[5],h[9],h[2],h[6],h[10]),this}multiply(s){return this.multiplyMatrices(this,s)}premultiply(s){return this.multiplyMatrices(s,this)}multiplyMatrices(s,h){let p=s.elements,m=h.elements,_=this.elements,E=p[0],y=p[3],I=p[6],N=p[1],B=p[4],P=p[7],U=p[2],j=p[5],V=p[8],tt=m[0],Q=m[3],X=m[6],gt=m[1],ft=m[4],xt=m[7],Bt=m[2],Ot=m[5],Pt=m[8];return _[0]=E*tt+y*gt+I*Bt,_[3]=E*Q+y*ft+I*Ot,_[6]=E*X+y*xt+I*Pt,_[1]=N*tt+B*gt+P*Bt,_[4]=N*Q+B*ft+P*Ot,_[7]=N*X+B*xt+P*Pt,_[2]=U*tt+j*gt+V*Bt,_[5]=U*Q+j*ft+V*Ot,_[8]=U*X+j*xt+V*Pt,this}multiplyScalar(s){let h=this.elements;return h[0]*=s,h[3]*=s,h[6]*=s,h[1]*=s,h[4]*=s,h[7]*=s,h[2]*=s,h[5]*=s,h[8]*=s,this}determinant(){let s=this.elements,h=s[0],p=s[1],m=s[2],_=s[3],E=s[4],y=s[5],I=s[6],N=s[7],B=s[8];return h*E*B-h*y*N-p*_*B+p*y*I+m*_*N-m*E*I}invert(){let s=this.elements,h=s[0],p=s[1],m=s[2],_=s[3],E=s[4],y=s[5],I=s[6],N=s[7],B=s[8],P=B*E-y*N,U=y*I-B*_,j=N*_-E*I,V=h*P+p*U+m*j;if(V===0)return this.set(0,0,0,0,0,0,0,0,0);let tt=1/V;return s[0]=P*tt,s[1]=(m*N-B*p)*tt,s[2]=(y*p-m*E)*tt,s[3]=U*tt,s[4]=(B*h-m*I)*tt,s[5]=(m*_-y*h)*tt,s[6]=j*tt,s[7]=(p*I-N*h)*tt,s[8]=(E*h-p*_)*tt,this}transpose(){let s,h=this.elements;return s=h[1],h[1]=h[3],h[3]=s,s=h[2],h[2]=h[6],h[6]=s,s=h[5],h[5]=h[7],h[7]=s,this}getNormalMatrix(s){return this.setFromMatrix4(s).invert().transpose()}transposeIntoArray(s){let h=this.elements;return s[0]=h[0],s[1]=h[3],s[2]=h[6],s[3]=h[1],s[4]=h[4],s[5]=h[7],s[6]=h[2],s[7]=h[5],s[8]=h[8],this}setUvTransform(s,h,p,m,_,E,y){let I=Math.cos(_),N=Math.sin(_);return this.set(p*I,p*N,-p*(I*E+N*y)+E+s,-m*N,m*I,-m*(-N*E+I*y)+y+h,0,0,1),this}scale(s,h){return this.premultiply(tyt.makeScale(s,h)),this}rotate(s){return this.premultiply(tyt.makeRotation(-s)),this}translate(s,h){return this.premultiply(tyt.makeTranslation(s,h)),this}makeTranslation(s,h){return s.isVector2?this.set(1,0,s.x,0,1,s.y,0,0,1):this.set(1,0,s,0,1,h,0,0,1),this}makeRotation(s){let h=Math.cos(s),p=Math.sin(s);return this.set(h,-p,0,p,h,0,0,0,1),this}makeScale(s,h){return this.set(s,0,0,0,h,0,0,0,1),this}equals(s){let h=this.elements,p=s.elements;for(let m=0;m<9;m++)if(h[m]!==p[m])return!1;return!0}fromArray(s,h=0){for(let p=0;p<9;p++)this.elements[p]=s[p+h];return this}toArray(s=[],h=0){let p=this.elements;return s[h]=p[0],s[h+1]=p[1],s[h+2]=p[2],s[h+3]=p[3],s[h+4]=p[4],s[h+5]=p[5],s[h+6]=p[6],s[h+7]=p[7],s[h+8]=p[8],s}clone(){return new this.constructor().fromArray(this.elements)}},tyt=new Ko;function hKt(d){for(let s=d.length-1;s>=0;--s)if(d[s]>=65535)return!0;return!1}function pet(d){return document.createElementNS("http://www.w3.org/1999/xhtml",d)}function OEe(){let d=pet("canvas");return d.style.display="block",d}var oYt={};function _U(d){d in oYt||(oYt[d]=!0,console.warn(d))}var cYt=new Ko().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),aYt=new Ko().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Ptt={[t3]:{transfer:uet,primaries:het,toReference:d=>d,fromReference:d=>d},[Pd]:{transfer:vu,primaries:het,toReference:d=>d.convertSRGBToLinear(),fromReference:d=>d.convertLinearToSRGB()},[Fet]:{transfer:uet,primaries:fet,toReference:d=>d.applyMatrix3(aYt),fromReference:d=>d.applyMatrix3(cYt)},[d2t]:{transfer:vu,primaries:fet,toReference:d=>d.convertSRGBToLinear().applyMatrix3(aYt),fromReference:d=>d.applyMatrix3(cYt).convertLinearToSRGB()}},BEe=new Set([t3,Fet]),Na={enabled:!0,_workingColorSpace:t3,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(d){if(!BEe.has(d))throw new Error(`Unsupported working color space, "${d}".`);this._workingColorSpace=d},convert:function(d,s,h){if(this.enabled===!1||s===h||!s||!h)return d;let p=Ptt[s].toReference,m=Ptt[h].fromReference;return m(p(d))},fromWorkingColorSpace:function(d,s){return this.convert(d,this._workingColorSpace,s)},toWorkingColorSpace:function(d,s){return this.convert(d,s,this._workingColorSpace)},getPrimaries:function(d){return Ptt[d].primaries},getTransfer:function(d){return d===wb?uet:Ptt[d].transfer}};function tR(d){return d<.04045?d*.0773993808:Math.pow(d*.9478672986+.0521327014,2.4)}function eyt(d){return d<.0031308?d*12.92:1.055*Math.pow(d,.41666)-.055}var NI,get=class{static getDataURL(s){if(/^data:/i.test(s.src)||typeof HTMLCanvasElement>"u")return s.src;let h;if(s instanceof HTMLCanvasElement)h=s;else{NI===void 0&&(NI=pet("canvas")),NI.width=s.width,NI.height=s.height;let p=NI.getContext("2d");s instanceof ImageData?p.putImageData(s,0,0):p.drawImage(s,0,0,s.width,s.height),h=NI}return h.width>2048||h.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",s),h.toDataURL("image/jpeg",.6)):h.toDataURL("image/png")}static sRGBToLinear(s){if(typeof HTMLImageElement<"u"&&s instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&s instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&s instanceof ImageBitmap){let h=pet("canvas");h.width=s.width,h.height=s.height;let p=h.getContext("2d");p.drawImage(s,0,0,s.width,s.height);let m=p.getImageData(0,0,s.width,s.height),_=m.data;for(let E=0;E<_.length;E++)_[E]=tR(_[E]/255)*255;return p.putImageData(m,0,0),h}else if(s.data){let h=s.data.slice(0);for(let p=0;p0&&(p.userData=this.userData),h||(s.textures[this.uuid]=p),p}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(s){if(this.mapping!==tKt)return s;if(s.applyMatrix3(this.matrix),s.x<0||s.x>1)switch(this.wrapS){case kyt:s.x=s.x-Math.floor(s.x);break;case Zw:s.x=s.x<0?0:1;break;case Lyt:Math.abs(Math.floor(s.x)%2)===1?s.x=Math.ceil(s.x)-s.x:s.x=s.x-Math.floor(s.x);break}if(s.y<0||s.y>1)switch(this.wrapT){case kyt:s.y=s.y-Math.floor(s.y);break;case Zw:s.y=s.y<0?0:1;break;case Lyt:Math.abs(Math.floor(s.y)%2)===1?s.y=Math.ceil(s.y)-s.y:s.y=s.y-Math.floor(s.y);break}return this.flipY&&(s.y=1-s.y),s}set needsUpdate(s){s===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return _U("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Pd?YA:aKt}set encoding(s){_U("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=s===YA?Pd:wb}};Kw.DEFAULT_IMAGE=null;Kw.DEFAULT_MAPPING=tKt;Kw.DEFAULT_ANISOTROPY=1;var $f=class d{constructor(s=0,h=0,p=0,m=1){d.prototype.isVector4=!0,this.x=s,this.y=h,this.z=p,this.w=m}get width(){return this.z}set width(s){this.z=s}get height(){return this.w}set height(s){this.w=s}set(s,h,p,m){return this.x=s,this.y=h,this.z=p,this.w=m,this}setScalar(s){return this.x=s,this.y=s,this.z=s,this.w=s,this}setX(s){return this.x=s,this}setY(s){return this.y=s,this}setZ(s){return this.z=s,this}setW(s){return this.w=s,this}setComponent(s,h){switch(s){case 0:this.x=h;break;case 1:this.y=h;break;case 2:this.z=h;break;case 3:this.w=h;break;default:throw new Error("index is out of range: "+s)}return this}getComponent(s){switch(s){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+s)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(s){return this.x=s.x,this.y=s.y,this.z=s.z,this.w=s.w!==void 0?s.w:1,this}add(s){return this.x+=s.x,this.y+=s.y,this.z+=s.z,this.w+=s.w,this}addScalar(s){return this.x+=s,this.y+=s,this.z+=s,this.w+=s,this}addVectors(s,h){return this.x=s.x+h.x,this.y=s.y+h.y,this.z=s.z+h.z,this.w=s.w+h.w,this}addScaledVector(s,h){return this.x+=s.x*h,this.y+=s.y*h,this.z+=s.z*h,this.w+=s.w*h,this}sub(s){return this.x-=s.x,this.y-=s.y,this.z-=s.z,this.w-=s.w,this}subScalar(s){return this.x-=s,this.y-=s,this.z-=s,this.w-=s,this}subVectors(s,h){return this.x=s.x-h.x,this.y=s.y-h.y,this.z=s.z-h.z,this.w=s.w-h.w,this}multiply(s){return this.x*=s.x,this.y*=s.y,this.z*=s.z,this.w*=s.w,this}multiplyScalar(s){return this.x*=s,this.y*=s,this.z*=s,this.w*=s,this}applyMatrix4(s){let h=this.x,p=this.y,m=this.z,_=this.w,E=s.elements;return this.x=E[0]*h+E[4]*p+E[8]*m+E[12]*_,this.y=E[1]*h+E[5]*p+E[9]*m+E[13]*_,this.z=E[2]*h+E[6]*p+E[10]*m+E[14]*_,this.w=E[3]*h+E[7]*p+E[11]*m+E[15]*_,this}divideScalar(s){return this.multiplyScalar(1/s)}setAxisAngleFromQuaternion(s){this.w=2*Math.acos(s.w);let h=Math.sqrt(1-s.w*s.w);return h<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=s.x/h,this.y=s.y/h,this.z=s.z/h),this}setAxisAngleFromRotationMatrix(s){let h,p,m,_,I=s.elements,N=I[0],B=I[4],P=I[8],U=I[1],j=I[5],V=I[9],tt=I[2],Q=I[6],X=I[10];if(Math.abs(B-U)<.01&&Math.abs(P-tt)<.01&&Math.abs(V-Q)<.01){if(Math.abs(B+U)<.1&&Math.abs(P+tt)<.1&&Math.abs(V+Q)<.1&&Math.abs(N+j+X-3)<.1)return this.set(1,0,0,0),this;h=Math.PI;let ft=(N+1)/2,xt=(j+1)/2,Bt=(X+1)/2,Ot=(B+U)/4,Pt=(P+tt)/4,se=(V+Q)/4;return ft>xt&&ft>Bt?ft<.01?(p=0,m=.707106781,_=.707106781):(p=Math.sqrt(ft),m=Ot/p,_=Pt/p):xt>Bt?xt<.01?(p=.707106781,m=0,_=.707106781):(m=Math.sqrt(xt),p=Ot/m,_=se/m):Bt<.01?(p=.707106781,m=.707106781,_=0):(_=Math.sqrt(Bt),p=Pt/_,m=se/_),this.set(p,m,_,h),this}let gt=Math.sqrt((Q-V)*(Q-V)+(P-tt)*(P-tt)+(U-B)*(U-B));return Math.abs(gt)<.001&&(gt=1),this.x=(Q-V)/gt,this.y=(P-tt)/gt,this.z=(U-B)/gt,this.w=Math.acos((N+j+X-1)/2),this}min(s){return this.x=Math.min(this.x,s.x),this.y=Math.min(this.y,s.y),this.z=Math.min(this.z,s.z),this.w=Math.min(this.w,s.w),this}max(s){return this.x=Math.max(this.x,s.x),this.y=Math.max(this.y,s.y),this.z=Math.max(this.z,s.z),this.w=Math.max(this.w,s.w),this}clamp(s,h){return this.x=Math.max(s.x,Math.min(h.x,this.x)),this.y=Math.max(s.y,Math.min(h.y,this.y)),this.z=Math.max(s.z,Math.min(h.z,this.z)),this.w=Math.max(s.w,Math.min(h.w,this.w)),this}clampScalar(s,h){return this.x=Math.max(s,Math.min(h,this.x)),this.y=Math.max(s,Math.min(h,this.y)),this.z=Math.max(s,Math.min(h,this.z)),this.w=Math.max(s,Math.min(h,this.w)),this}clampLength(s,h){let p=this.length();return this.divideScalar(p||1).multiplyScalar(Math.max(s,Math.min(h,p)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(s){return this.x*s.x+this.y*s.y+this.z*s.z+this.w*s.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(s){return this.normalize().multiplyScalar(s)}lerp(s,h){return this.x+=(s.x-this.x)*h,this.y+=(s.y-this.y)*h,this.z+=(s.z-this.z)*h,this.w+=(s.w-this.w)*h,this}lerpVectors(s,h,p){return this.x=s.x+(h.x-s.x)*p,this.y=s.y+(h.y-s.y)*p,this.z=s.z+(h.z-s.z)*p,this.w=s.w+(h.w-s.w)*p,this}equals(s){return s.x===this.x&&s.y===this.y&&s.z===this.z&&s.w===this.w}fromArray(s,h=0){return this.x=s[h],this.y=s[h+1],this.z=s[h+2],this.w=s[h+3],this}toArray(s=[],h=0){return s[h]=this.x,s[h+1]=this.y,s[h+2]=this.z,s[h+3]=this.w,s}fromBufferAttribute(s,h){return this.x=s.getX(h),this.y=s.getY(h),this.z=s.getZ(h),this.w=s.getW(h),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},Dyt=class extends fS{constructor(s=1,h=1,p={}){super(),this.isRenderTarget=!0,this.width=s,this.height=h,this.depth=1,this.scissor=new $f(0,0,s,h),this.scissorTest=!1,this.viewport=new $f(0,0,s,h);let m={width:s,height:h,depth:1};p.encoding!==void 0&&(_U("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),p.colorSpace=p.encoding===YA?Pd:wb),p=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:bb,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},p),this.texture=new Kw(m,p.mapping,p.wrapS,p.wrapT,p.magFilter,p.minFilter,p.format,p.type,p.anisotropy,p.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=p.generateMipmaps,this.texture.internalFormat=p.internalFormat,this.depthBuffer=p.depthBuffer,this.stencilBuffer=p.stencilBuffer,this.depthTexture=p.depthTexture,this.samples=p.samples}setSize(s,h,p=1){(this.width!==s||this.height!==h||this.depth!==p)&&(this.width=s,this.height=h,this.depth=p,this.texture.image.width=s,this.texture.image.height=h,this.texture.image.depth=p,this.dispose()),this.viewport.set(0,0,s,h),this.scissor.set(0,0,s,h)}clone(){return new this.constructor().copy(this)}copy(s){this.width=s.width,this.height=s.height,this.depth=s.depth,this.scissor.copy(s.scissor),this.scissorTest=s.scissorTest,this.viewport.copy(s.viewport),this.texture=s.texture.clone(),this.texture.isRenderTargetTexture=!0;let h=Object.assign({},s.texture.image);return this.texture.source=new met(h),this.depthBuffer=s.depthBuffer,this.stencilBuffer=s.stencilBuffer,s.depthTexture!==null&&(this.depthTexture=s.depthTexture.clone()),this.samples=s.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},e3=class extends Dyt{constructor(s=1,h=1,p={}){super(s,h,p),this.isWebGLRenderTarget=!0}},bet=class extends Kw{constructor(s=null,h=1,p=1,m=1){super(null),this.isDataArrayTexture=!0,this.image={data:s,width:h,height:p,depth:m},this.magFilter=r1,this.minFilter=r1,this.wrapR=Zw,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Nyt=class extends Kw{constructor(s=null,h=1,p=1,m=1){super(null),this.isData3DTexture=!0,this.image={data:s,width:h,height:p,depth:m},this.magFilter=r1,this.minFilter=r1,this.wrapR=Zw,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var My=class{constructor(s=0,h=0,p=0,m=1){this.isQuaternion=!0,this._x=s,this._y=h,this._z=p,this._w=m}static slerpFlat(s,h,p,m,_,E,y){let I=p[m+0],N=p[m+1],B=p[m+2],P=p[m+3],U=_[E+0],j=_[E+1],V=_[E+2],tt=_[E+3];if(y===0){s[h+0]=I,s[h+1]=N,s[h+2]=B,s[h+3]=P;return}if(y===1){s[h+0]=U,s[h+1]=j,s[h+2]=V,s[h+3]=tt;return}if(P!==tt||I!==U||N!==j||B!==V){let Q=1-y,X=I*U+N*j+B*V+P*tt,gt=X>=0?1:-1,ft=1-X*X;if(ft>Number.EPSILON){let Bt=Math.sqrt(ft),Ot=Math.atan2(Bt,X*gt);Q=Math.sin(Q*Ot)/Bt,y=Math.sin(y*Ot)/Bt}let xt=y*gt;if(I=I*Q+U*xt,N=N*Q+j*xt,B=B*Q+V*xt,P=P*Q+tt*xt,Q===1-y){let Bt=1/Math.sqrt(I*I+N*N+B*B+P*P);I*=Bt,N*=Bt,B*=Bt,P*=Bt}}s[h]=I,s[h+1]=N,s[h+2]=B,s[h+3]=P}static multiplyQuaternionsFlat(s,h,p,m,_,E){let y=p[m],I=p[m+1],N=p[m+2],B=p[m+3],P=_[E],U=_[E+1],j=_[E+2],V=_[E+3];return s[h]=y*V+B*P+I*j-N*U,s[h+1]=I*V+B*U+N*P-y*j,s[h+2]=N*V+B*j+y*U-I*P,s[h+3]=B*V-y*P-I*U-N*j,s}get x(){return this._x}set x(s){this._x=s,this._onChangeCallback()}get y(){return this._y}set y(s){this._y=s,this._onChangeCallback()}get z(){return this._z}set z(s){this._z=s,this._onChangeCallback()}get w(){return this._w}set w(s){this._w=s,this._onChangeCallback()}set(s,h,p,m){return this._x=s,this._y=h,this._z=p,this._w=m,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(s){return this._x=s.x,this._y=s.y,this._z=s.z,this._w=s.w,this._onChangeCallback(),this}setFromEuler(s,h=!0){let p=s._x,m=s._y,_=s._z,E=s._order,y=Math.cos,I=Math.sin,N=y(p/2),B=y(m/2),P=y(_/2),U=I(p/2),j=I(m/2),V=I(_/2);switch(E){case"XYZ":this._x=U*B*P+N*j*V,this._y=N*j*P-U*B*V,this._z=N*B*V+U*j*P,this._w=N*B*P-U*j*V;break;case"YXZ":this._x=U*B*P+N*j*V,this._y=N*j*P-U*B*V,this._z=N*B*V-U*j*P,this._w=N*B*P+U*j*V;break;case"ZXY":this._x=U*B*P-N*j*V,this._y=N*j*P+U*B*V,this._z=N*B*V+U*j*P,this._w=N*B*P-U*j*V;break;case"ZYX":this._x=U*B*P-N*j*V,this._y=N*j*P+U*B*V,this._z=N*B*V-U*j*P,this._w=N*B*P+U*j*V;break;case"YZX":this._x=U*B*P+N*j*V,this._y=N*j*P+U*B*V,this._z=N*B*V-U*j*P,this._w=N*B*P-U*j*V;break;case"XZY":this._x=U*B*P-N*j*V,this._y=N*j*P-U*B*V,this._z=N*B*V+U*j*P,this._w=N*B*P+U*j*V;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+E)}return h===!0&&this._onChangeCallback(),this}setFromAxisAngle(s,h){let p=h/2,m=Math.sin(p);return this._x=s.x*m,this._y=s.y*m,this._z=s.z*m,this._w=Math.cos(p),this._onChangeCallback(),this}setFromRotationMatrix(s){let h=s.elements,p=h[0],m=h[4],_=h[8],E=h[1],y=h[5],I=h[9],N=h[2],B=h[6],P=h[10],U=p+y+P;if(U>0){let j=.5/Math.sqrt(U+1);this._w=.25/j,this._x=(B-I)*j,this._y=(_-N)*j,this._z=(E-m)*j}else if(p>y&&p>P){let j=2*Math.sqrt(1+p-y-P);this._w=(B-I)/j,this._x=.25*j,this._y=(m+E)/j,this._z=(_+N)/j}else if(y>P){let j=2*Math.sqrt(1+y-p-P);this._w=(_-N)/j,this._x=(m+E)/j,this._y=.25*j,this._z=(I+B)/j}else{let j=2*Math.sqrt(1+P-p-y);this._w=(E-m)/j,this._x=(_+N)/j,this._y=(I+B)/j,this._z=.25*j}return this._onChangeCallback(),this}setFromUnitVectors(s,h){let p=s.dot(h)+1;return pMath.abs(s.z)?(this._x=-s.y,this._y=s.x,this._z=0,this._w=p):(this._x=0,this._y=-s.z,this._z=s.y,this._w=p)):(this._x=s.y*h.z-s.z*h.y,this._y=s.z*h.x-s.x*h.z,this._z=s.x*h.y-s.y*h.x,this._w=p),this.normalize()}angleTo(s){return 2*Math.acos(Math.abs(pg(this.dot(s),-1,1)))}rotateTowards(s,h){let p=this.angleTo(s);if(p===0)return this;let m=Math.min(1,h/p);return this.slerp(s,m),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(s){return this._x*s._x+this._y*s._y+this._z*s._z+this._w*s._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let s=this.length();return s===0?(this._x=0,this._y=0,this._z=0,this._w=1):(s=1/s,this._x=this._x*s,this._y=this._y*s,this._z=this._z*s,this._w=this._w*s),this._onChangeCallback(),this}multiply(s){return this.multiplyQuaternions(this,s)}premultiply(s){return this.multiplyQuaternions(s,this)}multiplyQuaternions(s,h){let p=s._x,m=s._y,_=s._z,E=s._w,y=h._x,I=h._y,N=h._z,B=h._w;return this._x=p*B+E*y+m*N-_*I,this._y=m*B+E*I+_*y-p*N,this._z=_*B+E*N+p*I-m*y,this._w=E*B-p*y-m*I-_*N,this._onChangeCallback(),this}slerp(s,h){if(h===0)return this;if(h===1)return this.copy(s);let p=this._x,m=this._y,_=this._z,E=this._w,y=E*s._w+p*s._x+m*s._y+_*s._z;if(y<0?(this._w=-s._w,this._x=-s._x,this._y=-s._y,this._z=-s._z,y=-y):this.copy(s),y>=1)return this._w=E,this._x=p,this._y=m,this._z=_,this;let I=1-y*y;if(I<=Number.EPSILON){let j=1-h;return this._w=j*E+h*this._w,this._x=j*p+h*this._x,this._y=j*m+h*this._y,this._z=j*_+h*this._z,this.normalize(),this}let N=Math.sqrt(I),B=Math.atan2(N,y),P=Math.sin((1-h)*B)/N,U=Math.sin(h*B)/N;return this._w=E*P+this._w*U,this._x=p*P+this._x*U,this._y=m*P+this._y*U,this._z=_*P+this._z*U,this._onChangeCallback(),this}slerpQuaternions(s,h,p){return this.copy(s).slerp(h,p)}random(){let s=Math.random(),h=Math.sqrt(1-s),p=Math.sqrt(s),m=2*Math.PI*Math.random(),_=2*Math.PI*Math.random();return this.set(h*Math.cos(m),p*Math.sin(_),p*Math.cos(_),h*Math.sin(m))}equals(s){return s._x===this._x&&s._y===this._y&&s._z===this._z&&s._w===this._w}fromArray(s,h=0){return this._x=s[h],this._y=s[h+1],this._z=s[h+2],this._w=s[h+3],this._onChangeCallback(),this}toArray(s=[],h=0){return s[h]=this._x,s[h+1]=this._y,s[h+2]=this._z,s[h+3]=this._w,s}fromBufferAttribute(s,h){return this._x=s.getX(h),this._y=s.getY(h),this._z=s.getZ(h),this._w=s.getW(h),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(s){return this._onChangeCallback=s,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},Ge=class d{constructor(s=0,h=0,p=0){d.prototype.isVector3=!0,this.x=s,this.y=h,this.z=p}set(s,h,p){return p===void 0&&(p=this.z),this.x=s,this.y=h,this.z=p,this}setScalar(s){return this.x=s,this.y=s,this.z=s,this}setX(s){return this.x=s,this}setY(s){return this.y=s,this}setZ(s){return this.z=s,this}setComponent(s,h){switch(s){case 0:this.x=h;break;case 1:this.y=h;break;case 2:this.z=h;break;default:throw new Error("index is out of range: "+s)}return this}getComponent(s){switch(s){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+s)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(s){return this.x=s.x,this.y=s.y,this.z=s.z,this}add(s){return this.x+=s.x,this.y+=s.y,this.z+=s.z,this}addScalar(s){return this.x+=s,this.y+=s,this.z+=s,this}addVectors(s,h){return this.x=s.x+h.x,this.y=s.y+h.y,this.z=s.z+h.z,this}addScaledVector(s,h){return this.x+=s.x*h,this.y+=s.y*h,this.z+=s.z*h,this}sub(s){return this.x-=s.x,this.y-=s.y,this.z-=s.z,this}subScalar(s){return this.x-=s,this.y-=s,this.z-=s,this}subVectors(s,h){return this.x=s.x-h.x,this.y=s.y-h.y,this.z=s.z-h.z,this}multiply(s){return this.x*=s.x,this.y*=s.y,this.z*=s.z,this}multiplyScalar(s){return this.x*=s,this.y*=s,this.z*=s,this}multiplyVectors(s,h){return this.x=s.x*h.x,this.y=s.y*h.y,this.z=s.z*h.z,this}applyEuler(s){return this.applyQuaternion(uYt.setFromEuler(s))}applyAxisAngle(s,h){return this.applyQuaternion(uYt.setFromAxisAngle(s,h))}applyMatrix3(s){let h=this.x,p=this.y,m=this.z,_=s.elements;return this.x=_[0]*h+_[3]*p+_[6]*m,this.y=_[1]*h+_[4]*p+_[7]*m,this.z=_[2]*h+_[5]*p+_[8]*m,this}applyNormalMatrix(s){return this.applyMatrix3(s).normalize()}applyMatrix4(s){let h=this.x,p=this.y,m=this.z,_=s.elements,E=1/(_[3]*h+_[7]*p+_[11]*m+_[15]);return this.x=(_[0]*h+_[4]*p+_[8]*m+_[12])*E,this.y=(_[1]*h+_[5]*p+_[9]*m+_[13])*E,this.z=(_[2]*h+_[6]*p+_[10]*m+_[14])*E,this}applyQuaternion(s){let h=this.x,p=this.y,m=this.z,_=s.x,E=s.y,y=s.z,I=s.w,N=2*(E*m-y*p),B=2*(y*h-_*m),P=2*(_*p-E*h);return this.x=h+I*N+E*P-y*B,this.y=p+I*B+y*N-_*P,this.z=m+I*P+_*B-E*N,this}project(s){return this.applyMatrix4(s.matrixWorldInverse).applyMatrix4(s.projectionMatrix)}unproject(s){return this.applyMatrix4(s.projectionMatrixInverse).applyMatrix4(s.matrixWorld)}transformDirection(s){let h=this.x,p=this.y,m=this.z,_=s.elements;return this.x=_[0]*h+_[4]*p+_[8]*m,this.y=_[1]*h+_[5]*p+_[9]*m,this.z=_[2]*h+_[6]*p+_[10]*m,this.normalize()}divide(s){return this.x/=s.x,this.y/=s.y,this.z/=s.z,this}divideScalar(s){return this.multiplyScalar(1/s)}min(s){return this.x=Math.min(this.x,s.x),this.y=Math.min(this.y,s.y),this.z=Math.min(this.z,s.z),this}max(s){return this.x=Math.max(this.x,s.x),this.y=Math.max(this.y,s.y),this.z=Math.max(this.z,s.z),this}clamp(s,h){return this.x=Math.max(s.x,Math.min(h.x,this.x)),this.y=Math.max(s.y,Math.min(h.y,this.y)),this.z=Math.max(s.z,Math.min(h.z,this.z)),this}clampScalar(s,h){return this.x=Math.max(s,Math.min(h,this.x)),this.y=Math.max(s,Math.min(h,this.y)),this.z=Math.max(s,Math.min(h,this.z)),this}clampLength(s,h){let p=this.length();return this.divideScalar(p||1).multiplyScalar(Math.max(s,Math.min(h,p)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(s){return this.x*s.x+this.y*s.y+this.z*s.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(s){return this.normalize().multiplyScalar(s)}lerp(s,h){return this.x+=(s.x-this.x)*h,this.y+=(s.y-this.y)*h,this.z+=(s.z-this.z)*h,this}lerpVectors(s,h,p){return this.x=s.x+(h.x-s.x)*p,this.y=s.y+(h.y-s.y)*p,this.z=s.z+(h.z-s.z)*p,this}cross(s){return this.crossVectors(this,s)}crossVectors(s,h){let p=s.x,m=s.y,_=s.z,E=h.x,y=h.y,I=h.z;return this.x=m*I-_*y,this.y=_*E-p*I,this.z=p*y-m*E,this}projectOnVector(s){let h=s.lengthSq();if(h===0)return this.set(0,0,0);let p=s.dot(this)/h;return this.copy(s).multiplyScalar(p)}projectOnPlane(s){return iyt.copy(this).projectOnVector(s),this.sub(iyt)}reflect(s){return this.sub(iyt.copy(s).multiplyScalar(2*this.dot(s)))}angleTo(s){let h=Math.sqrt(this.lengthSq()*s.lengthSq());if(h===0)return Math.PI/2;let p=this.dot(s)/h;return Math.acos(pg(p,-1,1))}distanceTo(s){return Math.sqrt(this.distanceToSquared(s))}distanceToSquared(s){let h=this.x-s.x,p=this.y-s.y,m=this.z-s.z;return h*h+p*p+m*m}manhattanDistanceTo(s){return Math.abs(this.x-s.x)+Math.abs(this.y-s.y)+Math.abs(this.z-s.z)}setFromSpherical(s){return this.setFromSphericalCoords(s.radius,s.phi,s.theta)}setFromSphericalCoords(s,h,p){let m=Math.sin(h)*s;return this.x=m*Math.sin(p),this.y=Math.cos(h)*s,this.z=m*Math.cos(p),this}setFromCylindrical(s){return this.setFromCylindricalCoords(s.radius,s.theta,s.y)}setFromCylindricalCoords(s,h,p){return this.x=s*Math.sin(h),this.y=p,this.z=s*Math.cos(h),this}setFromMatrixPosition(s){let h=s.elements;return this.x=h[12],this.y=h[13],this.z=h[14],this}setFromMatrixScale(s){let h=this.setFromMatrixColumn(s,0).length(),p=this.setFromMatrixColumn(s,1).length(),m=this.setFromMatrixColumn(s,2).length();return this.x=h,this.y=p,this.z=m,this}setFromMatrixColumn(s,h){return this.fromArray(s.elements,h*4)}setFromMatrix3Column(s,h){return this.fromArray(s.elements,h*3)}setFromEuler(s){return this.x=s._x,this.y=s._y,this.z=s._z,this}setFromColor(s){return this.x=s.r,this.y=s.g,this.z=s.b,this}equals(s){return s.x===this.x&&s.y===this.y&&s.z===this.z}fromArray(s,h=0){return this.x=s[h],this.y=s[h+1],this.z=s[h+2],this}toArray(s=[],h=0){return s[h]=this.x,s[h+1]=this.y,s[h+2]=this.z,s}fromBufferAttribute(s,h){return this.x=s.getX(h),this.y=s.getY(h),this.z=s.getZ(h),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let s=(Math.random()-.5)*2,h=Math.random()*Math.PI*2,p=Math.sqrt(1-s**2);return this.x=p*Math.cos(h),this.y=p*Math.sin(h),this.z=s,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},iyt=new Ge,uYt=new My,n3=class{constructor(s=new Ge(1/0,1/0,1/0),h=new Ge(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=s,this.max=h}set(s,h){return this.min.copy(s),this.max.copy(h),this}setFromArray(s){this.makeEmpty();for(let h=0,p=s.length;hthis.max.x||s.ythis.max.y||s.zthis.max.z)}containsBox(s){return this.min.x<=s.min.x&&s.max.x<=this.max.x&&this.min.y<=s.min.y&&s.max.y<=this.max.y&&this.min.z<=s.min.z&&s.max.z<=this.max.z}getParameter(s,h){return h.set((s.x-this.min.x)/(this.max.x-this.min.x),(s.y-this.min.y)/(this.max.y-this.min.y),(s.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(s){return!(s.max.xthis.max.x||s.max.ythis.max.y||s.max.zthis.max.z)}intersectsSphere(s){return this.clampPoint(s.center,$w),$w.distanceToSquared(s.center)<=s.radius*s.radius}intersectsPlane(s){let h,p;return s.normal.x>0?(h=s.normal.x*this.min.x,p=s.normal.x*this.max.x):(h=s.normal.x*this.max.x,p=s.normal.x*this.min.x),s.normal.y>0?(h+=s.normal.y*this.min.y,p+=s.normal.y*this.max.y):(h+=s.normal.y*this.max.y,p+=s.normal.y*this.min.y),s.normal.z>0?(h+=s.normal.z*this.min.z,p+=s.normal.z*this.max.z):(h+=s.normal.z*this.max.z,p+=s.normal.z*this.min.z),h<=-s.constant&&p>=-s.constant}intersectsTriangle(s){if(this.isEmpty())return!1;this.getCenter(pU),Rtt.subVectors(this.max,pU),OI.subVectors(s.a,pU),BI.subVectors(s.b,pU),FI.subVectors(s.c,pU),tS.subVectors(BI,OI),eS.subVectors(FI,BI),zA.subVectors(OI,FI);let h=[0,-tS.z,tS.y,0,-eS.z,eS.y,0,-zA.z,zA.y,tS.z,0,-tS.x,eS.z,0,-eS.x,zA.z,0,-zA.x,-tS.y,tS.x,0,-eS.y,eS.x,0,-zA.y,zA.x,0];return!ryt(h,OI,BI,FI,Rtt)||(h=[1,0,0,0,1,0,0,0,1],!ryt(h,OI,BI,FI,Rtt))?!1:(Dtt.crossVectors(tS,eS),h=[Dtt.x,Dtt.y,Dtt.z],ryt(h,OI,BI,FI,Rtt))}clampPoint(s,h){return h.copy(s).clamp(this.min,this.max)}distanceToPoint(s){return this.clampPoint(s,$w).distanceTo(s)}getBoundingSphere(s){return this.isEmpty()?s.makeEmpty():(this.getCenter(s.center),s.radius=this.getSize($w).length()*.5),s}intersect(s){return this.min.max(s.min),this.max.min(s.max),this.isEmpty()&&this.makeEmpty(),this}union(s){return this.min.min(s.min),this.max.max(s.max),this}applyMatrix4(s){return this.isEmpty()?this:(Vx[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(s),Vx[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(s),Vx[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(s),Vx[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(s),Vx[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(s),Vx[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(s),Vx[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(s),Vx[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(s),this.setFromPoints(Vx),this)}translate(s){return this.min.add(s),this.max.add(s),this}equals(s){return s.min.equals(this.min)&&s.max.equals(this.max)}},Vx=[new Ge,new Ge,new Ge,new Ge,new Ge,new Ge,new Ge,new Ge],$w=new Ge,Itt=new n3,OI=new Ge,BI=new Ge,FI=new Ge,tS=new Ge,eS=new Ge,zA=new Ge,pU=new Ge,Rtt=new Ge,Dtt=new Ge,jA=new Ge;function ryt(d,s,h,p,m){for(let _=0,E=d.length-3;_<=E;_+=3){jA.fromArray(d,_);let y=m.x*Math.abs(jA.x)+m.y*Math.abs(jA.y)+m.z*Math.abs(jA.z),I=s.dot(jA),N=h.dot(jA),B=p.dot(jA);if(Math.max(-Math.max(I,N,B),Math.min(I,N,B))>y)return!1}return!0}var zEe=new n3,gU=new Ge,syt=new Ge,dS=class{constructor(s=new Ge,h=-1){this.isSphere=!0,this.center=s,this.radius=h}set(s,h){return this.center.copy(s),this.radius=h,this}setFromPoints(s,h){let p=this.center;h!==void 0?p.copy(h):zEe.setFromPoints(s).getCenter(p);let m=0;for(let _=0,E=s.length;_this.radius*this.radius&&(h.sub(this.center).normalize(),h.multiplyScalar(this.radius).add(this.center)),h}getBoundingBox(s){return this.isEmpty()?(s.makeEmpty(),s):(s.set(this.center,this.center),s.expandByScalar(this.radius),s)}applyMatrix4(s){return this.center.applyMatrix4(s),this.radius=this.radius*s.getMaxScaleOnAxis(),this}translate(s){return this.center.add(s),this}expandByPoint(s){if(this.isEmpty())return this.center.copy(s),this.radius=0,this;gU.subVectors(s,this.center);let h=gU.lengthSq();if(h>this.radius*this.radius){let p=Math.sqrt(h),m=(p-this.radius)*.5;this.center.addScaledVector(gU,m/p),this.radius+=m}return this}union(s){return s.isEmpty()?this:this.isEmpty()?(this.copy(s),this):(this.center.equals(s.center)===!0?this.radius=Math.max(this.radius,s.radius):(syt.subVectors(s.center,this.center).setLength(s.radius),this.expandByPoint(gU.copy(s.center).add(syt)),this.expandByPoint(gU.copy(s.center).sub(syt))),this)}equals(s){return s.center.equals(this.center)&&s.radius===this.radius}clone(){return new this.constructor().copy(this)}},qx=new Ge,oyt=new Ge,Ntt=new Ge,nS=new Ge,cyt=new Ge,Ott=new Ge,ayt=new Ge,EU=class{constructor(s=new Ge,h=new Ge(0,0,-1)){this.origin=s,this.direction=h}set(s,h){return this.origin.copy(s),this.direction.copy(h),this}copy(s){return this.origin.copy(s.origin),this.direction.copy(s.direction),this}at(s,h){return h.copy(this.origin).addScaledVector(this.direction,s)}lookAt(s){return this.direction.copy(s).sub(this.origin).normalize(),this}recast(s){return this.origin.copy(this.at(s,qx)),this}closestPointToPoint(s,h){h.subVectors(s,this.origin);let p=h.dot(this.direction);return p<0?h.copy(this.origin):h.copy(this.origin).addScaledVector(this.direction,p)}distanceToPoint(s){return Math.sqrt(this.distanceSqToPoint(s))}distanceSqToPoint(s){let h=qx.subVectors(s,this.origin).dot(this.direction);return h<0?this.origin.distanceToSquared(s):(qx.copy(this.origin).addScaledVector(this.direction,h),qx.distanceToSquared(s))}distanceSqToSegment(s,h,p,m){oyt.copy(s).add(h).multiplyScalar(.5),Ntt.copy(h).sub(s).normalize(),nS.copy(this.origin).sub(oyt);let _=s.distanceTo(h)*.5,E=-this.direction.dot(Ntt),y=nS.dot(this.direction),I=-nS.dot(Ntt),N=nS.lengthSq(),B=Math.abs(1-E*E),P,U,j,V;if(B>0)if(P=E*I-y,U=E*y-I,V=_*B,P>=0)if(U>=-V)if(U<=V){let tt=1/B;P*=tt,U*=tt,j=P*(P+E*U+2*y)+U*(E*P+U+2*I)+N}else U=_,P=Math.max(0,-(E*U+y)),j=-P*P+U*(U+2*I)+N;else U=-_,P=Math.max(0,-(E*U+y)),j=-P*P+U*(U+2*I)+N;else U<=-V?(P=Math.max(0,-(-E*_+y)),U=P>0?-_:Math.min(Math.max(-_,-I),_),j=-P*P+U*(U+2*I)+N):U<=V?(P=0,U=Math.min(Math.max(-_,-I),_),j=U*(U+2*I)+N):(P=Math.max(0,-(E*_+y)),U=P>0?_:Math.min(Math.max(-_,-I),_),j=-P*P+U*(U+2*I)+N);else U=E>0?-_:_,P=Math.max(0,-(E*U+y)),j=-P*P+U*(U+2*I)+N;return p&&p.copy(this.origin).addScaledVector(this.direction,P),m&&m.copy(oyt).addScaledVector(Ntt,U),j}intersectSphere(s,h){qx.subVectors(s.center,this.origin);let p=qx.dot(this.direction),m=qx.dot(qx)-p*p,_=s.radius*s.radius;if(m>_)return null;let E=Math.sqrt(_-m),y=p-E,I=p+E;return I<0?null:y<0?this.at(I,h):this.at(y,h)}intersectsSphere(s){return this.distanceSqToPoint(s.center)<=s.radius*s.radius}distanceToPlane(s){let h=s.normal.dot(this.direction);if(h===0)return s.distanceToPoint(this.origin)===0?0:null;let p=-(this.origin.dot(s.normal)+s.constant)/h;return p>=0?p:null}intersectPlane(s,h){let p=this.distanceToPlane(s);return p===null?null:this.at(p,h)}intersectsPlane(s){let h=s.distanceToPoint(this.origin);return h===0||s.normal.dot(this.direction)*h<0}intersectBox(s,h){let p,m,_,E,y,I,N=1/this.direction.x,B=1/this.direction.y,P=1/this.direction.z,U=this.origin;return N>=0?(p=(s.min.x-U.x)*N,m=(s.max.x-U.x)*N):(p=(s.max.x-U.x)*N,m=(s.min.x-U.x)*N),B>=0?(_=(s.min.y-U.y)*B,E=(s.max.y-U.y)*B):(_=(s.max.y-U.y)*B,E=(s.min.y-U.y)*B),p>E||_>m||((_>p||isNaN(p))&&(p=_),(E=0?(y=(s.min.z-U.z)*P,I=(s.max.z-U.z)*P):(y=(s.max.z-U.z)*P,I=(s.min.z-U.z)*P),p>I||y>m)||((y>p||p!==p)&&(p=y),(I=0?p:m,h)}intersectsBox(s){return this.intersectBox(s,qx)!==null}intersectTriangle(s,h,p,m,_){cyt.subVectors(h,s),Ott.subVectors(p,s),ayt.crossVectors(cyt,Ott);let E=this.direction.dot(ayt),y;if(E>0){if(m)return null;y=1}else if(E<0)y=-1,E=-E;else return null;nS.subVectors(this.origin,s);let I=y*this.direction.dot(Ott.crossVectors(nS,Ott));if(I<0)return null;let N=y*this.direction.dot(cyt.cross(nS));if(N<0||I+N>E)return null;let B=-y*nS.dot(ayt);return B<0?null:this.at(B/E,_)}applyMatrix4(s){return this.origin.applyMatrix4(s),this.direction.transformDirection(s),this}equals(s){return s.origin.equals(this.origin)&&s.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},Fu=class d{constructor(s,h,p,m,_,E,y,I,N,B,P,U,j,V,tt,Q){d.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],s!==void 0&&this.set(s,h,p,m,_,E,y,I,N,B,P,U,j,V,tt,Q)}set(s,h,p,m,_,E,y,I,N,B,P,U,j,V,tt,Q){let X=this.elements;return X[0]=s,X[4]=h,X[8]=p,X[12]=m,X[1]=_,X[5]=E,X[9]=y,X[13]=I,X[2]=N,X[6]=B,X[10]=P,X[14]=U,X[3]=j,X[7]=V,X[11]=tt,X[15]=Q,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new d().fromArray(this.elements)}copy(s){let h=this.elements,p=s.elements;return h[0]=p[0],h[1]=p[1],h[2]=p[2],h[3]=p[3],h[4]=p[4],h[5]=p[5],h[6]=p[6],h[7]=p[7],h[8]=p[8],h[9]=p[9],h[10]=p[10],h[11]=p[11],h[12]=p[12],h[13]=p[13],h[14]=p[14],h[15]=p[15],this}copyPosition(s){let h=this.elements,p=s.elements;return h[12]=p[12],h[13]=p[13],h[14]=p[14],this}setFromMatrix3(s){let h=s.elements;return this.set(h[0],h[3],h[6],0,h[1],h[4],h[7],0,h[2],h[5],h[8],0,0,0,0,1),this}extractBasis(s,h,p){return s.setFromMatrixColumn(this,0),h.setFromMatrixColumn(this,1),p.setFromMatrixColumn(this,2),this}makeBasis(s,h,p){return this.set(s.x,h.x,p.x,0,s.y,h.y,p.y,0,s.z,h.z,p.z,0,0,0,0,1),this}extractRotation(s){let h=this.elements,p=s.elements,m=1/UI.setFromMatrixColumn(s,0).length(),_=1/UI.setFromMatrixColumn(s,1).length(),E=1/UI.setFromMatrixColumn(s,2).length();return h[0]=p[0]*m,h[1]=p[1]*m,h[2]=p[2]*m,h[3]=0,h[4]=p[4]*_,h[5]=p[5]*_,h[6]=p[6]*_,h[7]=0,h[8]=p[8]*E,h[9]=p[9]*E,h[10]=p[10]*E,h[11]=0,h[12]=0,h[13]=0,h[14]=0,h[15]=1,this}makeRotationFromEuler(s){let h=this.elements,p=s.x,m=s.y,_=s.z,E=Math.cos(p),y=Math.sin(p),I=Math.cos(m),N=Math.sin(m),B=Math.cos(_),P=Math.sin(_);if(s.order==="XYZ"){let U=E*B,j=E*P,V=y*B,tt=y*P;h[0]=I*B,h[4]=-I*P,h[8]=N,h[1]=j+V*N,h[5]=U-tt*N,h[9]=-y*I,h[2]=tt-U*N,h[6]=V+j*N,h[10]=E*I}else if(s.order==="YXZ"){let U=I*B,j=I*P,V=N*B,tt=N*P;h[0]=U+tt*y,h[4]=V*y-j,h[8]=E*N,h[1]=E*P,h[5]=E*B,h[9]=-y,h[2]=j*y-V,h[6]=tt+U*y,h[10]=E*I}else if(s.order==="ZXY"){let U=I*B,j=I*P,V=N*B,tt=N*P;h[0]=U-tt*y,h[4]=-E*P,h[8]=V+j*y,h[1]=j+V*y,h[5]=E*B,h[9]=tt-U*y,h[2]=-E*N,h[6]=y,h[10]=E*I}else if(s.order==="ZYX"){let U=E*B,j=E*P,V=y*B,tt=y*P;h[0]=I*B,h[4]=V*N-j,h[8]=U*N+tt,h[1]=I*P,h[5]=tt*N+U,h[9]=j*N-V,h[2]=-N,h[6]=y*I,h[10]=E*I}else if(s.order==="YZX"){let U=E*I,j=E*N,V=y*I,tt=y*N;h[0]=I*B,h[4]=tt-U*P,h[8]=V*P+j,h[1]=P,h[5]=E*B,h[9]=-y*B,h[2]=-N*B,h[6]=j*P+V,h[10]=U-tt*P}else if(s.order==="XZY"){let U=E*I,j=E*N,V=y*I,tt=y*N;h[0]=I*B,h[4]=-P,h[8]=N*B,h[1]=U*P+tt,h[5]=E*B,h[9]=j*P-V,h[2]=V*P-j,h[6]=y*B,h[10]=tt*P+U}return h[3]=0,h[7]=0,h[11]=0,h[12]=0,h[13]=0,h[14]=0,h[15]=1,this}makeRotationFromQuaternion(s){return this.compose(jEe,s,HEe)}lookAt(s,h,p){let m=this.elements;return I0.subVectors(s,h),I0.lengthSq()===0&&(I0.z=1),I0.normalize(),iS.crossVectors(p,I0),iS.lengthSq()===0&&(Math.abs(p.z)===1?I0.x+=1e-4:I0.z+=1e-4,I0.normalize(),iS.crossVectors(p,I0)),iS.normalize(),Btt.crossVectors(I0,iS),m[0]=iS.x,m[4]=Btt.x,m[8]=I0.x,m[1]=iS.y,m[5]=Btt.y,m[9]=I0.y,m[2]=iS.z,m[6]=Btt.z,m[10]=I0.z,this}multiply(s){return this.multiplyMatrices(this,s)}premultiply(s){return this.multiplyMatrices(s,this)}multiplyMatrices(s,h){let p=s.elements,m=h.elements,_=this.elements,E=p[0],y=p[4],I=p[8],N=p[12],B=p[1],P=p[5],U=p[9],j=p[13],V=p[2],tt=p[6],Q=p[10],X=p[14],gt=p[3],ft=p[7],xt=p[11],Bt=p[15],Ot=m[0],Pt=m[4],se=m[8],ot=m[12],Lt=m[1],be=m[5],ln=m[9],Fn=m[13],ne=m[2],xe=m[6],re=m[10],hn=m[14],Se=m[3],ke=m[7],mn=m[11],en=m[15];return _[0]=E*Ot+y*Lt+I*ne+N*Se,_[4]=E*Pt+y*be+I*xe+N*ke,_[8]=E*se+y*ln+I*re+N*mn,_[12]=E*ot+y*Fn+I*hn+N*en,_[1]=B*Ot+P*Lt+U*ne+j*Se,_[5]=B*Pt+P*be+U*xe+j*ke,_[9]=B*se+P*ln+U*re+j*mn,_[13]=B*ot+P*Fn+U*hn+j*en,_[2]=V*Ot+tt*Lt+Q*ne+X*Se,_[6]=V*Pt+tt*be+Q*xe+X*ke,_[10]=V*se+tt*ln+Q*re+X*mn,_[14]=V*ot+tt*Fn+Q*hn+X*en,_[3]=gt*Ot+ft*Lt+xt*ne+Bt*Se,_[7]=gt*Pt+ft*be+xt*xe+Bt*ke,_[11]=gt*se+ft*ln+xt*re+Bt*mn,_[15]=gt*ot+ft*Fn+xt*hn+Bt*en,this}multiplyScalar(s){let h=this.elements;return h[0]*=s,h[4]*=s,h[8]*=s,h[12]*=s,h[1]*=s,h[5]*=s,h[9]*=s,h[13]*=s,h[2]*=s,h[6]*=s,h[10]*=s,h[14]*=s,h[3]*=s,h[7]*=s,h[11]*=s,h[15]*=s,this}determinant(){let s=this.elements,h=s[0],p=s[4],m=s[8],_=s[12],E=s[1],y=s[5],I=s[9],N=s[13],B=s[2],P=s[6],U=s[10],j=s[14],V=s[3],tt=s[7],Q=s[11],X=s[15];return V*(+_*I*P-m*N*P-_*y*U+p*N*U+m*y*j-p*I*j)+tt*(+h*I*j-h*N*U+_*E*U-m*E*j+m*N*B-_*I*B)+Q*(+h*N*P-h*y*j-_*E*P+p*E*j+_*y*B-p*N*B)+X*(-m*y*B-h*I*P+h*y*U+m*E*P-p*E*U+p*I*B)}transpose(){let s=this.elements,h;return h=s[1],s[1]=s[4],s[4]=h,h=s[2],s[2]=s[8],s[8]=h,h=s[6],s[6]=s[9],s[9]=h,h=s[3],s[3]=s[12],s[12]=h,h=s[7],s[7]=s[13],s[13]=h,h=s[11],s[11]=s[14],s[14]=h,this}setPosition(s,h,p){let m=this.elements;return s.isVector3?(m[12]=s.x,m[13]=s.y,m[14]=s.z):(m[12]=s,m[13]=h,m[14]=p),this}invert(){let s=this.elements,h=s[0],p=s[1],m=s[2],_=s[3],E=s[4],y=s[5],I=s[6],N=s[7],B=s[8],P=s[9],U=s[10],j=s[11],V=s[12],tt=s[13],Q=s[14],X=s[15],gt=P*Q*N-tt*U*N+tt*I*j-y*Q*j-P*I*X+y*U*X,ft=V*U*N-B*Q*N-V*I*j+E*Q*j+B*I*X-E*U*X,xt=B*tt*N-V*P*N+V*y*j-E*tt*j-B*y*X+E*P*X,Bt=V*P*I-B*tt*I-V*y*U+E*tt*U+B*y*Q-E*P*Q,Ot=h*gt+p*ft+m*xt+_*Bt;if(Ot===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let Pt=1/Ot;return s[0]=gt*Pt,s[1]=(tt*U*_-P*Q*_-tt*m*j+p*Q*j+P*m*X-p*U*X)*Pt,s[2]=(y*Q*_-tt*I*_+tt*m*N-p*Q*N-y*m*X+p*I*X)*Pt,s[3]=(P*I*_-y*U*_-P*m*N+p*U*N+y*m*j-p*I*j)*Pt,s[4]=ft*Pt,s[5]=(B*Q*_-V*U*_+V*m*j-h*Q*j-B*m*X+h*U*X)*Pt,s[6]=(V*I*_-E*Q*_-V*m*N+h*Q*N+E*m*X-h*I*X)*Pt,s[7]=(E*U*_-B*I*_+B*m*N-h*U*N-E*m*j+h*I*j)*Pt,s[8]=xt*Pt,s[9]=(V*P*_-B*tt*_-V*p*j+h*tt*j+B*p*X-h*P*X)*Pt,s[10]=(E*tt*_-V*y*_+V*p*N-h*tt*N-E*p*X+h*y*X)*Pt,s[11]=(B*y*_-E*P*_-B*p*N+h*P*N+E*p*j-h*y*j)*Pt,s[12]=Bt*Pt,s[13]=(B*tt*m-V*P*m+V*p*U-h*tt*U-B*p*Q+h*P*Q)*Pt,s[14]=(V*y*m-E*tt*m-V*p*I+h*tt*I+E*p*Q-h*y*Q)*Pt,s[15]=(E*P*m-B*y*m+B*p*I-h*P*I-E*p*U+h*y*U)*Pt,this}scale(s){let h=this.elements,p=s.x,m=s.y,_=s.z;return h[0]*=p,h[4]*=m,h[8]*=_,h[1]*=p,h[5]*=m,h[9]*=_,h[2]*=p,h[6]*=m,h[10]*=_,h[3]*=p,h[7]*=m,h[11]*=_,this}getMaxScaleOnAxis(){let s=this.elements,h=s[0]*s[0]+s[1]*s[1]+s[2]*s[2],p=s[4]*s[4]+s[5]*s[5]+s[6]*s[6],m=s[8]*s[8]+s[9]*s[9]+s[10]*s[10];return Math.sqrt(Math.max(h,p,m))}makeTranslation(s,h,p){return s.isVector3?this.set(1,0,0,s.x,0,1,0,s.y,0,0,1,s.z,0,0,0,1):this.set(1,0,0,s,0,1,0,h,0,0,1,p,0,0,0,1),this}makeRotationX(s){let h=Math.cos(s),p=Math.sin(s);return this.set(1,0,0,0,0,h,-p,0,0,p,h,0,0,0,0,1),this}makeRotationY(s){let h=Math.cos(s),p=Math.sin(s);return this.set(h,0,p,0,0,1,0,0,-p,0,h,0,0,0,0,1),this}makeRotationZ(s){let h=Math.cos(s),p=Math.sin(s);return this.set(h,-p,0,0,p,h,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(s,h){let p=Math.cos(h),m=Math.sin(h),_=1-p,E=s.x,y=s.y,I=s.z,N=_*E,B=_*y;return this.set(N*E+p,N*y-m*I,N*I+m*y,0,N*y+m*I,B*y+p,B*I-m*E,0,N*I-m*y,B*I+m*E,_*I*I+p,0,0,0,0,1),this}makeScale(s,h,p){return this.set(s,0,0,0,0,h,0,0,0,0,p,0,0,0,0,1),this}makeShear(s,h,p,m,_,E){return this.set(1,p,_,0,s,1,E,0,h,m,1,0,0,0,0,1),this}compose(s,h,p){let m=this.elements,_=h._x,E=h._y,y=h._z,I=h._w,N=_+_,B=E+E,P=y+y,U=_*N,j=_*B,V=_*P,tt=E*B,Q=E*P,X=y*P,gt=I*N,ft=I*B,xt=I*P,Bt=p.x,Ot=p.y,Pt=p.z;return m[0]=(1-(tt+X))*Bt,m[1]=(j+xt)*Bt,m[2]=(V-ft)*Bt,m[3]=0,m[4]=(j-xt)*Ot,m[5]=(1-(U+X))*Ot,m[6]=(Q+gt)*Ot,m[7]=0,m[8]=(V+ft)*Pt,m[9]=(Q-gt)*Pt,m[10]=(1-(U+tt))*Pt,m[11]=0,m[12]=s.x,m[13]=s.y,m[14]=s.z,m[15]=1,this}decompose(s,h,p){let m=this.elements,_=UI.set(m[0],m[1],m[2]).length(),E=UI.set(m[4],m[5],m[6]).length(),y=UI.set(m[8],m[9],m[10]).length();this.determinant()<0&&(_=-_),s.x=m[12],s.y=m[13],s.z=m[14],Vw.copy(this);let N=1/_,B=1/E,P=1/y;return Vw.elements[0]*=N,Vw.elements[1]*=N,Vw.elements[2]*=N,Vw.elements[4]*=B,Vw.elements[5]*=B,Vw.elements[6]*=B,Vw.elements[8]*=P,Vw.elements[9]*=P,Vw.elements[10]*=P,h.setFromRotationMatrix(Vw),p.x=_,p.y=E,p.z=y,this}makePerspective(s,h,p,m,_,E,y=Qx){let I=this.elements,N=2*_/(h-s),B=2*_/(p-m),P=(h+s)/(h-s),U=(p+m)/(p-m),j,V;if(y===Qx)j=-(E+_)/(E-_),V=-2*E*_/(E-_);else if(y===det)j=-E/(E-_),V=-E*_/(E-_);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+y);return I[0]=N,I[4]=0,I[8]=P,I[12]=0,I[1]=0,I[5]=B,I[9]=U,I[13]=0,I[2]=0,I[6]=0,I[10]=j,I[14]=V,I[3]=0,I[7]=0,I[11]=-1,I[15]=0,this}makeOrthographic(s,h,p,m,_,E,y=Qx){let I=this.elements,N=1/(h-s),B=1/(p-m),P=1/(E-_),U=(h+s)*N,j=(p+m)*B,V,tt;if(y===Qx)V=(E+_)*P,tt=-2*P;else if(y===det)V=_*P,tt=-1*P;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+y);return I[0]=2*N,I[4]=0,I[8]=0,I[12]=-U,I[1]=0,I[5]=2*B,I[9]=0,I[13]=-j,I[2]=0,I[6]=0,I[10]=tt,I[14]=-V,I[3]=0,I[7]=0,I[11]=0,I[15]=1,this}equals(s){let h=this.elements,p=s.elements;for(let m=0;m<16;m++)if(h[m]!==p[m])return!1;return!0}fromArray(s,h=0){for(let p=0;p<16;p++)this.elements[p]=s[p+h];return this}toArray(s=[],h=0){let p=this.elements;return s[h]=p[0],s[h+1]=p[1],s[h+2]=p[2],s[h+3]=p[3],s[h+4]=p[4],s[h+5]=p[5],s[h+6]=p[6],s[h+7]=p[7],s[h+8]=p[8],s[h+9]=p[9],s[h+10]=p[10],s[h+11]=p[11],s[h+12]=p[12],s[h+13]=p[13],s[h+14]=p[14],s[h+15]=p[15],s}},UI=new Ge,Vw=new Fu,jEe=new Ge(0,0,0),HEe=new Ge(1,1,1),iS=new Ge,Btt=new Ge,I0=new Ge,lYt=new Fu,hYt=new My,wet=class d{constructor(s=0,h=0,p=0,m=d.DEFAULT_ORDER){this.isEuler=!0,this._x=s,this._y=h,this._z=p,this._order=m}get x(){return this._x}set x(s){this._x=s,this._onChangeCallback()}get y(){return this._y}set y(s){this._y=s,this._onChangeCallback()}get z(){return this._z}set z(s){this._z=s,this._onChangeCallback()}get order(){return this._order}set order(s){this._order=s,this._onChangeCallback()}set(s,h,p,m=this._order){return this._x=s,this._y=h,this._z=p,this._order=m,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(s){return this._x=s._x,this._y=s._y,this._z=s._z,this._order=s._order,this._onChangeCallback(),this}setFromRotationMatrix(s,h=this._order,p=!0){let m=s.elements,_=m[0],E=m[4],y=m[8],I=m[1],N=m[5],B=m[9],P=m[2],U=m[6],j=m[10];switch(h){case"XYZ":this._y=Math.asin(pg(y,-1,1)),Math.abs(y)<.9999999?(this._x=Math.atan2(-B,j),this._z=Math.atan2(-E,_)):(this._x=Math.atan2(U,N),this._z=0);break;case"YXZ":this._x=Math.asin(-pg(B,-1,1)),Math.abs(B)<.9999999?(this._y=Math.atan2(y,j),this._z=Math.atan2(I,N)):(this._y=Math.atan2(-P,_),this._z=0);break;case"ZXY":this._x=Math.asin(pg(U,-1,1)),Math.abs(U)<.9999999?(this._y=Math.atan2(-P,j),this._z=Math.atan2(-E,N)):(this._y=0,this._z=Math.atan2(I,_));break;case"ZYX":this._y=Math.asin(-pg(P,-1,1)),Math.abs(P)<.9999999?(this._x=Math.atan2(U,j),this._z=Math.atan2(I,_)):(this._x=0,this._z=Math.atan2(-E,N));break;case"YZX":this._z=Math.asin(pg(I,-1,1)),Math.abs(I)<.9999999?(this._x=Math.atan2(-B,N),this._y=Math.atan2(-P,_)):(this._x=0,this._y=Math.atan2(y,j));break;case"XZY":this._z=Math.asin(-pg(E,-1,1)),Math.abs(E)<.9999999?(this._x=Math.atan2(U,N),this._y=Math.atan2(y,_)):(this._x=Math.atan2(-B,j),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+h)}return this._order=h,p===!0&&this._onChangeCallback(),this}setFromQuaternion(s,h,p){return lYt.makeRotationFromQuaternion(s),this.setFromRotationMatrix(lYt,h,p)}setFromVector3(s,h=this._order){return this.set(s.x,s.y,s.z,h)}reorder(s){return hYt.setFromEuler(this),this.setFromQuaternion(hYt,s)}equals(s){return s._x===this._x&&s._y===this._y&&s._z===this._z&&s._order===this._order}fromArray(s){return this._x=s[0],this._y=s[1],this._z=s[2],s[3]!==void 0&&(this._order=s[3]),this._onChangeCallback(),this}toArray(s=[],h=0){return s[h]=this._x,s[h+1]=this._y,s[h+2]=this._z,s[h+3]=this._order,s}_onChange(s){return this._onChangeCallback=s,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};wet.DEFAULT_ORDER="XYZ";var SU=class{constructor(){this.mask=1}set(s){this.mask=(1<>>0}enable(s){this.mask|=1<1){for(let h=0;h1){for(let p=0;p0&&(m.userData=this.userData),m.layers=this.layers.mask,m.matrix=this.matrix.toArray(),m.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(m.matrixAutoUpdate=!1),this.isInstancedMesh&&(m.type="InstancedMesh",m.count=this.count,m.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(m.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(m.type="BatchedMesh",m.perObjectFrustumCulled=this.perObjectFrustumCulled,m.sortObjects=this.sortObjects,m.drawRanges=this._drawRanges,m.reservedRanges=this._reservedRanges,m.visibility=this._visibility,m.active=this._active,m.bounds=this._bounds.map(y=>({boxInitialized:y.boxInitialized,boxMin:y.box.min.toArray(),boxMax:y.box.max.toArray(),sphereInitialized:y.sphereInitialized,sphereRadius:y.sphere.radius,sphereCenter:y.sphere.center.toArray()})),m.maxGeometryCount=this._maxGeometryCount,m.maxVertexCount=this._maxVertexCount,m.maxIndexCount=this._maxIndexCount,m.geometryInitialized=this._geometryInitialized,m.geometryCount=this._geometryCount,m.matricesTexture=this._matricesTexture.toJSON(s),this.boundingSphere!==null&&(m.boundingSphere={center:m.boundingSphere.center.toArray(),radius:m.boundingSphere.radius}),this.boundingBox!==null&&(m.boundingBox={min:m.boundingBox.min.toArray(),max:m.boundingBox.max.toArray()}));function _(y,I){return y[I.uuid]===void 0&&(y[I.uuid]=I.toJSON(s)),I.uuid}if(this.isScene)this.background&&(this.background.isColor?m.background=this.background.toJSON():this.background.isTexture&&(m.background=this.background.toJSON(s).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(m.environment=this.environment.toJSON(s).uuid);else if(this.isMesh||this.isLine||this.isPoints){m.geometry=_(s.geometries,this.geometry);let y=this.geometry.parameters;if(y!==void 0&&y.shapes!==void 0){let I=y.shapes;if(Array.isArray(I))for(let N=0,B=I.length;N0){m.children=[];for(let y=0;y0){m.animations=[];for(let y=0;y0&&(p.geometries=y),I.length>0&&(p.materials=I),N.length>0&&(p.textures=N),B.length>0&&(p.images=B),P.length>0&&(p.shapes=P),U.length>0&&(p.skeletons=U),j.length>0&&(p.animations=j),V.length>0&&(p.nodes=V)}return p.object=m,p;function E(y){let I=[];for(let N in y){let B=y[N];delete B.metadata,I.push(B)}return I}}clone(s){return new this.constructor().copy(this,s)}copy(s,h=!0){if(this.name=s.name,this.up.copy(s.up),this.position.copy(s.position),this.rotation.order=s.rotation.order,this.quaternion.copy(s.quaternion),this.scale.copy(s.scale),this.matrix.copy(s.matrix),this.matrixWorld.copy(s.matrixWorld),this.matrixAutoUpdate=s.matrixAutoUpdate,this.matrixWorldAutoUpdate=s.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=s.matrixWorldNeedsUpdate,this.layers.mask=s.layers.mask,this.visible=s.visible,this.castShadow=s.castShadow,this.receiveShadow=s.receiveShadow,this.frustumCulled=s.frustumCulled,this.renderOrder=s.renderOrder,this.animations=s.animations.slice(),this.userData=JSON.parse(JSON.stringify(s.userData)),h===!0)for(let p=0;p0?m.multiplyScalar(1/Math.sqrt(_)):m.set(0,0,0)}static getBarycoord(s,h,p,m,_){qw.subVectors(m,h),Zx.subVectors(p,h),uyt.subVectors(s,h);let E=qw.dot(qw),y=qw.dot(Zx),I=qw.dot(uyt),N=Zx.dot(Zx),B=Zx.dot(uyt),P=E*N-y*y;if(P===0)return _.set(0,0,0),null;let U=1/P,j=(N*I-y*B)*U,V=(E*B-y*I)*U;return _.set(1-j-V,V,j)}static containsPoint(s,h,p,m){return this.getBarycoord(s,h,p,m,Yx)===null?!1:Yx.x>=0&&Yx.y>=0&&Yx.x+Yx.y<=1}static getUV(s,h,p,m,_,E,y,I){return Utt===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Utt=!0),this.getInterpolation(s,h,p,m,_,E,y,I)}static getInterpolation(s,h,p,m,_,E,y,I){return this.getBarycoord(s,h,p,m,Yx)===null?(I.x=0,I.y=0,"z"in I&&(I.z=0),"w"in I&&(I.w=0),null):(I.setScalar(0),I.addScaledVector(_,Yx.x),I.addScaledVector(E,Yx.y),I.addScaledVector(y,Yx.z),I)}static isFrontFacing(s,h,p,m){return qw.subVectors(p,h),Zx.subVectors(s,h),qw.cross(Zx).dot(m)<0}set(s,h,p){return this.a.copy(s),this.b.copy(h),this.c.copy(p),this}setFromPointsAndIndices(s,h,p,m){return this.a.copy(s[h]),this.b.copy(s[p]),this.c.copy(s[m]),this}setFromAttributeAndIndices(s,h,p,m){return this.a.fromBufferAttribute(s,h),this.b.fromBufferAttribute(s,p),this.c.fromBufferAttribute(s,m),this}clone(){return new this.constructor().copy(this)}copy(s){return this.a.copy(s.a),this.b.copy(s.b),this.c.copy(s.c),this}getArea(){return qw.subVectors(this.c,this.b),Zx.subVectors(this.a,this.b),qw.cross(Zx).length()*.5}getMidpoint(s){return s.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(s){return d.getNormal(this.a,this.b,this.c,s)}getPlane(s){return s.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(s,h){return d.getBarycoord(s,this.a,this.b,this.c,h)}getUV(s,h,p,m,_){return Utt===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Utt=!0),d.getInterpolation(s,this.a,this.b,this.c,h,p,m,_)}getInterpolation(s,h,p,m,_){return d.getInterpolation(s,this.a,this.b,this.c,h,p,m,_)}containsPoint(s){return d.containsPoint(s,this.a,this.b,this.c)}isFrontFacing(s){return d.isFrontFacing(this.a,this.b,this.c,s)}intersectsBox(s){return s.intersectsTriangle(this)}closestPointToPoint(s,h){let p=this.a,m=this.b,_=this.c,E,y;jI.subVectors(m,p),HI.subVectors(_,p),lyt.subVectors(s,p);let I=jI.dot(lyt),N=HI.dot(lyt);if(I<=0&&N<=0)return h.copy(p);hyt.subVectors(s,m);let B=jI.dot(hyt),P=HI.dot(hyt);if(B>=0&&P<=B)return h.copy(m);let U=I*P-B*N;if(U<=0&&I>=0&&B<=0)return E=I/(I-B),h.copy(p).addScaledVector(jI,E);fyt.subVectors(s,_);let j=jI.dot(fyt),V=HI.dot(fyt);if(V>=0&&j<=V)return h.copy(_);let tt=j*N-I*V;if(tt<=0&&N>=0&&V<=0)return y=N/(N-V),h.copy(p).addScaledVector(HI,y);let Q=B*V-j*P;if(Q<=0&&P-B>=0&&j-V>=0)return mYt.subVectors(_,m),y=(P-B)/(P-B+(j-V)),h.copy(m).addScaledVector(mYt,y);let X=1/(Q+tt+U);return E=tt*X,y=U*X,h.copy(p).addScaledVector(jI,E).addScaledVector(HI,y)}equals(s){return s.a.equals(this.a)&&s.b.equals(this.b)&&s.c.equals(this.c)}},fKt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},rS={h:0,s:0,l:0},ztt={h:0,s:0,l:0};function dyt(d,s,h){return h<0&&(h+=1),h>1&&(h-=1),h<1/6?d+(s-d)*6*h:h<1/2?s:h<2/3?d+(s-d)*6*(2/3-h):d}var Go=class{constructor(s,h,p){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(s,h,p)}set(s,h,p){if(h===void 0&&p===void 0){let m=s;m&&m.isColor?this.copy(m):typeof m=="number"?this.setHex(m):typeof m=="string"&&this.setStyle(m)}else this.setRGB(s,h,p);return this}setScalar(s){return this.r=s,this.g=s,this.b=s,this}setHex(s,h=Pd){return s=Math.floor(s),this.r=(s>>16&255)/255,this.g=(s>>8&255)/255,this.b=(s&255)/255,Na.toWorkingColorSpace(this,h),this}setRGB(s,h,p,m=Na.workingColorSpace){return this.r=s,this.g=h,this.b=p,Na.toWorkingColorSpace(this,m),this}setHSL(s,h,p,m=Na.workingColorSpace){if(s=NEe(s,1),h=pg(h,0,1),p=pg(p,0,1),h===0)this.r=this.g=this.b=p;else{let _=p<=.5?p*(1+h):p+h-p*h,E=2*p-_;this.r=dyt(E,_,s+1/3),this.g=dyt(E,_,s),this.b=dyt(E,_,s-1/3)}return Na.toWorkingColorSpace(this,m),this}setStyle(s,h=Pd){function p(_){_!==void 0&&parseFloat(_)<1&&console.warn("THREE.Color: Alpha component of "+s+" will be ignored.")}let m;if(m=/^(\w+)\(([^\)]*)\)/.exec(s)){let _,E=m[1],y=m[2];switch(E){case"rgb":case"rgba":if(_=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(y))return p(_[4]),this.setRGB(Math.min(255,parseInt(_[1],10))/255,Math.min(255,parseInt(_[2],10))/255,Math.min(255,parseInt(_[3],10))/255,h);if(_=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(y))return p(_[4]),this.setRGB(Math.min(100,parseInt(_[1],10))/100,Math.min(100,parseInt(_[2],10))/100,Math.min(100,parseInt(_[3],10))/100,h);break;case"hsl":case"hsla":if(_=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(y))return p(_[4]),this.setHSL(parseFloat(_[1])/360,parseFloat(_[2])/100,parseFloat(_[3])/100,h);break;default:console.warn("THREE.Color: Unknown color model "+s)}}else if(m=/^\#([A-Fa-f\d]+)$/.exec(s)){let _=m[1],E=_.length;if(E===3)return this.setRGB(parseInt(_.charAt(0),16)/15,parseInt(_.charAt(1),16)/15,parseInt(_.charAt(2),16)/15,h);if(E===6)return this.setHex(parseInt(_,16),h);console.warn("THREE.Color: Invalid hex color "+s)}else if(s&&s.length>0)return this.setColorName(s,h);return this}setColorName(s,h=Pd){let p=fKt[s.toLowerCase()];return p!==void 0?this.setHex(p,h):console.warn("THREE.Color: Unknown color "+s),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(s){return this.r=s.r,this.g=s.g,this.b=s.b,this}copySRGBToLinear(s){return this.r=tR(s.r),this.g=tR(s.g),this.b=tR(s.b),this}copyLinearToSRGB(s){return this.r=eyt(s.r),this.g=eyt(s.g),this.b=eyt(s.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(s=Pd){return Na.fromWorkingColorSpace(mp.copy(this),s),Math.round(pg(mp.r*255,0,255))*65536+Math.round(pg(mp.g*255,0,255))*256+Math.round(pg(mp.b*255,0,255))}getHexString(s=Pd){return("000000"+this.getHex(s).toString(16)).slice(-6)}getHSL(s,h=Na.workingColorSpace){Na.fromWorkingColorSpace(mp.copy(this),h);let p=mp.r,m=mp.g,_=mp.b,E=Math.max(p,m,_),y=Math.min(p,m,_),I,N,B=(y+E)/2;if(y===E)I=0,N=0;else{let P=E-y;switch(N=B<=.5?P/(E+y):P/(2-E-y),E){case p:I=(m-_)/P+(m<_?6:0);break;case m:I=(_-p)/P+2;break;case _:I=(p-m)/P+4;break}I/=6}return s.h=I,s.s=N,s.l=B,s}getRGB(s,h=Na.workingColorSpace){return Na.fromWorkingColorSpace(mp.copy(this),h),s.r=mp.r,s.g=mp.g,s.b=mp.b,s}getStyle(s=Pd){Na.fromWorkingColorSpace(mp.copy(this),s);let h=mp.r,p=mp.g,m=mp.b;return s!==Pd?`color(${s} ${h.toFixed(3)} ${p.toFixed(3)} ${m.toFixed(3)})`:`rgb(${Math.round(h*255)},${Math.round(p*255)},${Math.round(m*255)})`}offsetHSL(s,h,p){return this.getHSL(rS),this.setHSL(rS.h+s,rS.s+h,rS.l+p)}add(s){return this.r+=s.r,this.g+=s.g,this.b+=s.b,this}addColors(s,h){return this.r=s.r+h.r,this.g=s.g+h.g,this.b=s.b+h.b,this}addScalar(s){return this.r+=s,this.g+=s,this.b+=s,this}sub(s){return this.r=Math.max(0,this.r-s.r),this.g=Math.max(0,this.g-s.g),this.b=Math.max(0,this.b-s.b),this}multiply(s){return this.r*=s.r,this.g*=s.g,this.b*=s.b,this}multiplyScalar(s){return this.r*=s,this.g*=s,this.b*=s,this}lerp(s,h){return this.r+=(s.r-this.r)*h,this.g+=(s.g-this.g)*h,this.b+=(s.b-this.b)*h,this}lerpColors(s,h,p){return this.r=s.r+(h.r-s.r)*p,this.g=s.g+(h.g-s.g)*p,this.b=s.b+(h.b-s.b)*p,this}lerpHSL(s,h){this.getHSL(rS),s.getHSL(ztt);let p=Q_t(rS.h,ztt.h,h),m=Q_t(rS.s,ztt.s,h),_=Q_t(rS.l,ztt.l,h);return this.setHSL(p,m,_),this}setFromVector3(s){return this.r=s.x,this.g=s.y,this.b=s.z,this}applyMatrix3(s){let h=this.r,p=this.g,m=this.b,_=s.elements;return this.r=_[0]*h+_[3]*p+_[6]*m,this.g=_[1]*h+_[4]*p+_[7]*m,this.b=_[2]*h+_[5]*p+_[8]*m,this}equals(s){return s.r===this.r&&s.g===this.g&&s.b===this.b}fromArray(s,h=0){return this.r=s[h],this.g=s[h+1],this.b=s[h+2],this}toArray(s=[],h=0){return s[h]=this.r,s[h+1]=this.g,s[h+2]=this.b,s}fromBufferAttribute(s,h){return this.r=s.getX(h),this.g=s.getY(h),this.b=s.getZ(h),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},mp=new Go;Go.NAMES=fKt;var XEe=0,pS=class extends fS{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:XEe++}),this.uuid=LU(),this.name="",this.type="Material",this.blending=QI,this.side=hS,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Syt,this.blendDst=Tyt,this.blendEquation=$A,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Go(0,0,0),this.blendAlpha=0,this.depthFunc=oet,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=nYt,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=DI,this.stencilZFail=DI,this.stencilZPass=DI,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(s){this._alphaTest>0!=s>0&&this.version++,this._alphaTest=s}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(s){if(s!==void 0)for(let h in s){let p=s[h];if(p===void 0){console.warn(`THREE.Material: parameter '${h}' has value of undefined.`);continue}let m=this[h];if(m===void 0){console.warn(`THREE.Material: '${h}' is not a property of THREE.${this.type}.`);continue}m&&m.isColor?m.set(p):m&&m.isVector3&&p&&p.isVector3?m.copy(p):this[h]=p}}toJSON(s){let h=s===void 0||typeof s=="string";h&&(s={textures:{},images:{}});let p={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};p.uuid=this.uuid,p.type=this.type,this.name!==""&&(p.name=this.name),this.color&&this.color.isColor&&(p.color=this.color.getHex()),this.roughness!==void 0&&(p.roughness=this.roughness),this.metalness!==void 0&&(p.metalness=this.metalness),this.sheen!==void 0&&(p.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(p.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(p.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(p.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(p.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(p.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(p.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(p.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(p.shininess=this.shininess),this.clearcoat!==void 0&&(p.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(p.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(p.clearcoatMap=this.clearcoatMap.toJSON(s).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(p.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(s).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(p.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(s).uuid,p.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(p.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(p.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(p.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(p.iridescenceMap=this.iridescenceMap.toJSON(s).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(p.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(s).uuid),this.anisotropy!==void 0&&(p.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(p.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(p.anisotropyMap=this.anisotropyMap.toJSON(s).uuid),this.map&&this.map.isTexture&&(p.map=this.map.toJSON(s).uuid),this.matcap&&this.matcap.isTexture&&(p.matcap=this.matcap.toJSON(s).uuid),this.alphaMap&&this.alphaMap.isTexture&&(p.alphaMap=this.alphaMap.toJSON(s).uuid),this.lightMap&&this.lightMap.isTexture&&(p.lightMap=this.lightMap.toJSON(s).uuid,p.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(p.aoMap=this.aoMap.toJSON(s).uuid,p.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(p.bumpMap=this.bumpMap.toJSON(s).uuid,p.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(p.normalMap=this.normalMap.toJSON(s).uuid,p.normalMapType=this.normalMapType,p.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(p.displacementMap=this.displacementMap.toJSON(s).uuid,p.displacementScale=this.displacementScale,p.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(p.roughnessMap=this.roughnessMap.toJSON(s).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(p.metalnessMap=this.metalnessMap.toJSON(s).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(p.emissiveMap=this.emissiveMap.toJSON(s).uuid),this.specularMap&&this.specularMap.isTexture&&(p.specularMap=this.specularMap.toJSON(s).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(p.specularIntensityMap=this.specularIntensityMap.toJSON(s).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(p.specularColorMap=this.specularColorMap.toJSON(s).uuid),this.envMap&&this.envMap.isTexture&&(p.envMap=this.envMap.toJSON(s).uuid,this.combine!==void 0&&(p.combine=this.combine)),this.envMapIntensity!==void 0&&(p.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(p.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(p.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(p.gradientMap=this.gradientMap.toJSON(s).uuid),this.transmission!==void 0&&(p.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(p.transmissionMap=this.transmissionMap.toJSON(s).uuid),this.thickness!==void 0&&(p.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(p.thicknessMap=this.thicknessMap.toJSON(s).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(p.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(p.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(p.size=this.size),this.shadowSide!==null&&(p.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(p.sizeAttenuation=this.sizeAttenuation),this.blending!==QI&&(p.blending=this.blending),this.side!==hS&&(p.side=this.side),this.vertexColors===!0&&(p.vertexColors=!0),this.opacity<1&&(p.opacity=this.opacity),this.transparent===!0&&(p.transparent=!0),this.blendSrc!==Syt&&(p.blendSrc=this.blendSrc),this.blendDst!==Tyt&&(p.blendDst=this.blendDst),this.blendEquation!==$A&&(p.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(p.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(p.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(p.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(p.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(p.blendAlpha=this.blendAlpha),this.depthFunc!==oet&&(p.depthFunc=this.depthFunc),this.depthTest===!1&&(p.depthTest=this.depthTest),this.depthWrite===!1&&(p.depthWrite=this.depthWrite),this.colorWrite===!1&&(p.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(p.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==nYt&&(p.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(p.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(p.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==DI&&(p.stencilFail=this.stencilFail),this.stencilZFail!==DI&&(p.stencilZFail=this.stencilZFail),this.stencilZPass!==DI&&(p.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(p.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(p.rotation=this.rotation),this.polygonOffset===!0&&(p.polygonOffset=!0),this.polygonOffsetFactor!==0&&(p.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(p.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(p.linewidth=this.linewidth),this.dashSize!==void 0&&(p.dashSize=this.dashSize),this.gapSize!==void 0&&(p.gapSize=this.gapSize),this.scale!==void 0&&(p.scale=this.scale),this.dithering===!0&&(p.dithering=!0),this.alphaTest>0&&(p.alphaTest=this.alphaTest),this.alphaHash===!0&&(p.alphaHash=!0),this.alphaToCoverage===!0&&(p.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(p.premultipliedAlpha=!0),this.forceSinglePass===!0&&(p.forceSinglePass=!0),this.wireframe===!0&&(p.wireframe=!0),this.wireframeLinewidth>1&&(p.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(p.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(p.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(p.flatShading=!0),this.visible===!1&&(p.visible=!1),this.toneMapped===!1&&(p.toneMapped=!1),this.fog===!1&&(p.fog=!1),Object.keys(this.userData).length>0&&(p.userData=this.userData);function m(_){let E=[];for(let y in _){let I=_[y];delete I.metadata,E.push(I)}return E}if(h){let _=m(s.textures),E=m(s.images);_.length>0&&(p.textures=_),E.length>0&&(p.images=E)}return p}clone(){return new this.constructor().copy(this)}copy(s){this.name=s.name,this.blending=s.blending,this.side=s.side,this.vertexColors=s.vertexColors,this.opacity=s.opacity,this.transparent=s.transparent,this.blendSrc=s.blendSrc,this.blendDst=s.blendDst,this.blendEquation=s.blendEquation,this.blendSrcAlpha=s.blendSrcAlpha,this.blendDstAlpha=s.blendDstAlpha,this.blendEquationAlpha=s.blendEquationAlpha,this.blendColor.copy(s.blendColor),this.blendAlpha=s.blendAlpha,this.depthFunc=s.depthFunc,this.depthTest=s.depthTest,this.depthWrite=s.depthWrite,this.stencilWriteMask=s.stencilWriteMask,this.stencilFunc=s.stencilFunc,this.stencilRef=s.stencilRef,this.stencilFuncMask=s.stencilFuncMask,this.stencilFail=s.stencilFail,this.stencilZFail=s.stencilZFail,this.stencilZPass=s.stencilZPass,this.stencilWrite=s.stencilWrite;let h=s.clippingPlanes,p=null;if(h!==null){let m=h.length;p=new Array(m);for(let _=0;_!==m;++_)p[_]=h[_].clone()}return this.clippingPlanes=p,this.clipIntersection=s.clipIntersection,this.clipShadows=s.clipShadows,this.shadowSide=s.shadowSide,this.colorWrite=s.colorWrite,this.precision=s.precision,this.polygonOffset=s.polygonOffset,this.polygonOffsetFactor=s.polygonOffsetFactor,this.polygonOffsetUnits=s.polygonOffsetUnits,this.dithering=s.dithering,this.alphaTest=s.alphaTest,this.alphaHash=s.alphaHash,this.alphaToCoverage=s.alphaToCoverage,this.premultipliedAlpha=s.premultipliedAlpha,this.forceSinglePass=s.forceSinglePass,this.visible=s.visible,this.toneMapped=s.toneMapped,this.userData=JSON.parse(JSON.stringify(s.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(s){s===!0&&this.version++}},sR=class extends pS{constructor(s){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Go(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=h2t,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(s)}copy(s){return super.copy(s),this.color.copy(s.color),this.map=s.map,this.lightMap=s.lightMap,this.lightMapIntensity=s.lightMapIntensity,this.aoMap=s.aoMap,this.aoMapIntensity=s.aoMapIntensity,this.specularMap=s.specularMap,this.alphaMap=s.alphaMap,this.envMap=s.envMap,this.combine=s.combine,this.reflectivity=s.reflectivity,this.refractionRatio=s.refractionRatio,this.wireframe=s.wireframe,this.wireframeLinewidth=s.wireframeLinewidth,this.wireframeLinecap=s.wireframeLinecap,this.wireframeLinejoin=s.wireframeLinejoin,this.fog=s.fog,this}};var Uh=new Ge,jtt=new Nc,D0=class{constructor(s,h,p=!1){if(Array.isArray(s))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=s,this.itemSize=h,this.count=s!==void 0?s.length/h:0,this.normalized=p,this.usage=iYt,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=oS,this.version=0}onUploadCallback(){}set needsUpdate(s){s===!0&&this.version++}get updateRange(){return console.warn("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(s){return this.usage=s,this}addUpdateRange(s,h){this.updateRanges.push({start:s,count:h})}clearUpdateRanges(){this.updateRanges.length=0}copy(s){return this.name=s.name,this.array=new s.array.constructor(s.array),this.itemSize=s.itemSize,this.count=s.count,this.normalized=s.normalized,this.usage=s.usage,this.gpuType=s.gpuType,this}copyAt(s,h,p){s*=this.itemSize,p*=h.itemSize;for(let m=0,_=this.itemSize;m<_;m++)this.array[s+m]=h.array[p+m];return this}copyArray(s){return this.array.set(s),this}applyMatrix3(s){if(this.itemSize===2)for(let h=0,p=this.count;h0&&(s.userData=this.userData),this.parameters!==void 0){let I=this.parameters;for(let N in I)I[N]!==void 0&&(s[N]=I[N]);return s}s.data={attributes:{}};let h=this.index;h!==null&&(s.data.index={type:h.array.constructor.name,array:Array.prototype.slice.call(h.array)});let p=this.attributes;for(let I in p){let N=p[I];s.data.attributes[I]=N.toJSON(s.data)}let m={},_=!1;for(let I in this.morphAttributes){let N=this.morphAttributes[I],B=[];for(let P=0,U=N.length;P0&&(m[I]=B,_=!0)}_&&(s.data.morphAttributes=m,s.data.morphTargetsRelative=this.morphTargetsRelative);let E=this.groups;E.length>0&&(s.data.groups=JSON.parse(JSON.stringify(E)));let y=this.boundingSphere;return y!==null&&(s.data.boundingSphere={center:y.center.toArray(),radius:y.radius}),s}clone(){return new this.constructor().copy(this)}copy(s){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let h={};this.name=s.name;let p=s.index;p!==null&&this.setIndex(p.clone(h));let m=s.attributes;for(let N in m){let B=m[N];this.setAttribute(N,B.clone(h))}let _=s.morphAttributes;for(let N in _){let B=[],P=_[N];for(let U=0,j=P.length;U0){let m=h[p[0]];if(m!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let _=0,E=m.length;_(s.far-s.near)**2))&&(bYt.copy(_).invert(),HA.copy(s.ray).applyMatrix4(bYt),!(p.boundingBox!==null&&HA.intersectsBox(p.boundingBox)===!1)&&this._computeIntersections(s,h,HA)))}_computeIntersections(s,h,p){let m,_=this.geometry,E=this.material,y=_.index,I=_.attributes.position,N=_.attributes.uv,B=_.attributes.uv1,P=_.attributes.normal,U=_.groups,j=_.drawRange;if(y!==null)if(Array.isArray(E))for(let V=0,tt=U.length;Vh.far?null:{distance:N,point:Xtt.clone(),object:d}}function Ztt(d,s,h,p,m,_,E,y,I,N){d.getVertexPosition(y,WI),d.getVertexPosition(I,$I),d.getVertexPosition(N,VI);let B=YEe(d,s,h,p,WI,$I,VI,qtt);if(B){m&&(Wtt.fromBufferAttribute(m,y),$tt.fromBufferAttribute(m,I),Vtt.fromBufferAttribute(m,N),B.uv=qA.getInterpolation(qtt,WI,$I,VI,Wtt,$tt,Vtt,new Nc)),_&&(Wtt.fromBufferAttribute(_,y),$tt.fromBufferAttribute(_,I),Vtt.fromBufferAttribute(_,N),B.uv1=qA.getInterpolation(qtt,WI,$I,VI,Wtt,$tt,Vtt,new Nc),B.uv2=B.uv1),E&&(vYt.fromBufferAttribute(E,y),_Yt.fromBufferAttribute(E,I),yYt.fromBufferAttribute(E,N),B.normal=qA.getInterpolation(qtt,WI,$I,VI,vYt,_Yt,yYt,new Ge),B.normal.dot(p.direction)>0&&B.normal.multiplyScalar(-1));let P={a:y,b:I,c:N,normal:new Ge,materialIndex:0};qA.getNormal(WI,$I,VI,P.normal),B.face=P}return B}var KA=class d extends Ey{constructor(s=1,h=1,p=1,m=1,_=1,E=1){super(),this.type="BoxGeometry",this.parameters={width:s,height:h,depth:p,widthSegments:m,heightSegments:_,depthSegments:E};let y=this;m=Math.floor(m),_=Math.floor(_),E=Math.floor(E);let I=[],N=[],B=[],P=[],U=0,j=0;V("z","y","x",-1,-1,p,h,s,E,_,0),V("z","y","x",1,-1,p,h,-s,E,_,1),V("x","z","y",1,1,s,p,h,m,E,2),V("x","z","y",1,-1,s,p,-h,m,E,3),V("x","y","z",1,-1,s,h,p,m,_,4),V("x","y","z",-1,-1,s,h,-p,m,_,5),this.setIndex(I),this.setAttribute("position",new bg(N,3)),this.setAttribute("normal",new bg(B,3)),this.setAttribute("uv",new bg(P,2));function V(tt,Q,X,gt,ft,xt,Bt,Ot,Pt,se,ot){let Lt=xt/Pt,be=Bt/se,ln=xt/2,Fn=Bt/2,ne=Ot/2,xe=Pt+1,re=se+1,hn=0,Se=0,ke=new Ge;for(let mn=0;mn0?1:-1,B.push(ke.x,ke.y,ke.z),P.push(Qn/Pt),P.push(1-mn/se),hn+=1}}for(let mn=0;mn0&&(h.defines=this.defines),h.vertexShader=this.vertexShader,h.fragmentShader=this.fragmentShader,h.lights=this.lights,h.clipping=this.clipping;let g={};for(let m in this.extensions)this.extensions[m]===!0&&(g[m]=!0);return Object.keys(g).length>0&&(h.extensions=g),h}},bet=class extends o1{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Bu,this.projectionMatrix=new Bu,this.projectionMatrixInverse=new Bu,this.coordinateSystem=Kx}copy(s,h){return super.copy(s,h),this.matrixWorldInverse.copy(s.matrixWorldInverse),this.projectionMatrix.copy(s.projectionMatrix),this.projectionMatrixInverse.copy(s.projectionMatrixInverse),this.coordinateSystem=s.coordinateSystem,this}getWorldDirection(s){return super.getWorldDirection(s).negate()}updateMatrixWorld(s){super.updateMatrixWorld(s),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(s,h){super.updateWorldMatrix(s,h),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}},s1=class extends bet{constructor(s=50,h=1,g=.1,m=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=s,this.zoom=1,this.near=g,this.far=m,this.focus=10,this.aspect=h,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(s,h){return super.copy(s,h),this.fov=s.fov,this.zoom=s.zoom,this.near=s.near,this.far=s.far,this.focus=s.focus,this.aspect=s.aspect,this.view=s.view===null?null:Object.assign({},s.view),this.filmGauge=s.filmGauge,this.filmOffset=s.filmOffset,this}setFocalLength(s){let h=.5*this.getFilmHeight()/s;this.fov=_yt*2*Math.atan(h),this.updateProjectionMatrix()}getFocalLength(){let s=Math.tan(eet*.5*this.fov);return .5*this.getFilmHeight()/s}getEffectiveFOV(){return _yt*2*Math.atan(Math.tan(eet*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(s,h,g,m,_,S){this.aspect=s/h,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=s,this.view.fullHeight=h,this.view.offsetX=g,this.view.offsetY=m,this.view.width=_,this.view.height=S,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let s=this.near,h=s*Math.tan(eet*.5*this.fov)/this.zoom,g=2*h,m=this.aspect*g,_=-.5*m,S=this.view;if(this.view!==null&&this.view.enabled){let R=S.fullWidth,N=S.fullHeight;_+=S.offsetX*m/R,h-=S.offsetY*g/N,m*=S.width/R,g*=S.height/N}let y=this.filmOffset;y!==0&&(_+=s*y/this.getFilmWidth()),this.projectionMatrix.makePerspective(_,_+m,h,h-g,s,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(s){let h=super.toJSON(s);return h.object.fov=this.fov,h.object.zoom=this.zoom,h.object.near=this.near,h.object.far=this.far,h.object.focus=this.focus,h.object.aspect=this.aspect,this.view!==null&&(h.object.view=Object.assign({},this.view)),h.object.filmGauge=this.filmGauge,h.object.filmOffset=this.filmOffset,h}},WI=-90,$I=1,Eyt=class extends o1{constructor(s,h,g){super(),this.type="CubeCamera",this.renderTarget=g,this.coordinateSystem=null,this.activeMipmapLevel=0;let m=new s1(WI,$I,s,h);m.layers=this.layers,this.add(m);let _=new s1(WI,$I,s,h);_.layers=this.layers,this.add(_);let S=new s1(WI,$I,s,h);S.layers=this.layers,this.add(S);let y=new s1(WI,$I,s,h);y.layers=this.layers,this.add(y);let R=new s1(WI,$I,s,h);R.layers=this.layers,this.add(R);let N=new s1(WI,$I,s,h);N.layers=this.layers,this.add(N)}updateCoordinateSystem(){let s=this.coordinateSystem,h=this.children.concat(),[g,m,_,S,y,R]=h;for(let N of h)this.remove(N);if(s===Kx)g.up.set(0,1,0),g.lookAt(1,0,0),m.up.set(0,1,0),m.lookAt(-1,0,0),_.up.set(0,0,-1),_.lookAt(0,1,0),S.up.set(0,0,1),S.lookAt(0,-1,0),y.up.set(0,1,0),y.lookAt(0,0,1),R.up.set(0,1,0),R.lookAt(0,0,-1);else if(s===aet)g.up.set(0,-1,0),g.lookAt(-1,0,0),m.up.set(0,-1,0),m.lookAt(1,0,0),_.up.set(0,0,1),_.lookAt(0,1,0),S.up.set(0,0,-1),S.lookAt(0,-1,0),y.up.set(0,-1,0),y.lookAt(0,0,1),R.up.set(0,-1,0),R.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+s);for(let N of h)this.add(N),N.updateMatrixWorld()}update(s,h){this.parent===null&&this.updateMatrixWorld();let{renderTarget:g,activeMipmapLevel:m}=this;this.coordinateSystem!==s.coordinateSystem&&(this.coordinateSystem=s.coordinateSystem,this.updateCoordinateSystem());let[_,S,y,R,N,B]=this.children,P=s.getRenderTarget(),U=s.getActiveCubeFace(),W=s.getActiveMipmapLevel(),q=s.xr.enabled;s.xr.enabled=!1;let nt=g.texture.generateMipmaps;g.texture.generateMipmaps=!1,s.setRenderTarget(g,0,m),s.render(h,_),s.setRenderTarget(g,1,m),s.render(h,S),s.setRenderTarget(g,2,m),s.render(h,y),s.setRenderTarget(g,3,m),s.render(h,R),s.setRenderTarget(g,4,m),s.render(h,N),g.texture.generateMipmaps=nt,s.setRenderTarget(g,5,m),s.render(h,B),s.setRenderTarget(P,U,W),s.xr.enabled=q,g.texture.needsPMREMUpdate=!0}},wet=class extends Kw{constructor(s,h,g,m,_,S,y,R,N,B){s=s!==void 0?s:[],h=h!==void 0?h:QI,super(s,h,g,m,_,S,y,R,N,B),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(s){this.image=s}},Syt=class extends Qx{constructor(s=1,h={}){super(s,s,h),this.isWebGLCubeRenderTarget=!0;let g={width:s,height:s,depth:1},m=[g,g,g,g,g,g];h.encoding!==void 0&&(mU("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),h.colorSpace=h.encoding===qA?Pd:wb),this.texture=new wet(m,h.mapping,h.wrapS,h.wrapT,h.magFilter,h.minFilter,h.format,h.type,h.anisotropy,h.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=h.generateMipmaps!==void 0?h.generateMipmaps:!1,this.texture.minFilter=h.minFilter!==void 0?h.minFilter:bb}fromEquirectangularTexture(s,h){this.texture.type=h.type,this.texture.colorSpace=h.colorSpace,this.texture.generateMipmaps=h.generateMipmaps,this.texture.minFilter=h.minFilter,this.texture.magFilter=h.magFilter;let g={uniforms:{tEquirect:{value:null}},vertexShader:` +}`,i3=class extends pS{constructor(s){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=QEe,this.fragmentShader=tSe,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1,clipCullDistance:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,s!==void 0&&this.setValues(s)}copy(s){return super.copy(s),this.fragmentShader=s.fragmentShader,this.vertexShader=s.vertexShader,this.uniforms=oR(s.uniforms),this.uniformsGroups=KEe(s.uniformsGroups),this.defines=Object.assign({},s.defines),this.wireframe=s.wireframe,this.wireframeLinewidth=s.wireframeLinewidth,this.fog=s.fog,this.lights=s.lights,this.clipping=s.clipping,this.extensions=Object.assign({},s.extensions),this.glslVersion=s.glslVersion,this}toJSON(s){let h=super.toJSON(s);h.glslVersion=this.glslVersion,h.uniforms={};for(let m in this.uniforms){let E=this.uniforms[m].value;E&&E.isTexture?h.uniforms[m]={type:"t",value:E.toJSON(s).uuid}:E&&E.isColor?h.uniforms[m]={type:"c",value:E.getHex()}:E&&E.isVector2?h.uniforms[m]={type:"v2",value:E.toArray()}:E&&E.isVector3?h.uniforms[m]={type:"v3",value:E.toArray()}:E&&E.isVector4?h.uniforms[m]={type:"v4",value:E.toArray()}:E&&E.isMatrix3?h.uniforms[m]={type:"m3",value:E.toArray()}:E&&E.isMatrix4?h.uniforms[m]={type:"m4",value:E.toArray()}:h.uniforms[m]={value:E}}Object.keys(this.defines).length>0&&(h.defines=this.defines),h.vertexShader=this.vertexShader,h.fragmentShader=this.fragmentShader,h.lights=this.lights,h.clipping=this.clipping;let p={};for(let m in this.extensions)this.extensions[m]===!0&&(p[m]=!0);return Object.keys(p).length>0&&(h.extensions=p),h}},yet=class extends o1{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Fu,this.projectionMatrix=new Fu,this.projectionMatrixInverse=new Fu,this.coordinateSystem=Qx}copy(s,h){return super.copy(s,h),this.matrixWorldInverse.copy(s.matrixWorldInverse),this.projectionMatrix.copy(s.projectionMatrix),this.projectionMatrixInverse.copy(s.projectionMatrixInverse),this.coordinateSystem=s.coordinateSystem,this}getWorldDirection(s){return super.getWorldDirection(s).negate()}updateMatrixWorld(s){super.updateMatrixWorld(s),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(s,h){super.updateWorldMatrix(s,h),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}},s1=class extends yet{constructor(s=50,h=1,p=.1,m=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=s,this.zoom=1,this.near=p,this.far=m,this.focus=10,this.aspect=h,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(s,h){return super.copy(s,h),this.fov=s.fov,this.zoom=s.zoom,this.near=s.near,this.far=s.far,this.focus=s.focus,this.aspect=s.aspect,this.view=s.view===null?null:Object.assign({},s.view),this.filmGauge=s.filmGauge,this.filmOffset=s.filmOffset,this}setFocalLength(s){let h=.5*this.getFilmHeight()/s;this.fov=Iyt*2*Math.atan(h),this.updateProjectionMatrix()}getFocalLength(){let s=Math.tan(set*.5*this.fov);return .5*this.getFilmHeight()/s}getEffectiveFOV(){return Iyt*2*Math.atan(Math.tan(set*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(s,h,p,m,_,E){this.aspect=s/h,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=s,this.view.fullHeight=h,this.view.offsetX=p,this.view.offsetY=m,this.view.width=_,this.view.height=E,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let s=this.near,h=s*Math.tan(set*.5*this.fov)/this.zoom,p=2*h,m=this.aspect*p,_=-.5*m,E=this.view;if(this.view!==null&&this.view.enabled){let I=E.fullWidth,N=E.fullHeight;_+=E.offsetX*m/I,h-=E.offsetY*p/N,m*=E.width/I,p*=E.height/N}let y=this.filmOffset;y!==0&&(_+=s*y/this.getFilmWidth()),this.projectionMatrix.makePerspective(_,_+m,h,h-p,s,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(s){let h=super.toJSON(s);return h.object.fov=this.fov,h.object.zoom=this.zoom,h.object.near=this.near,h.object.far=this.far,h.object.focus=this.focus,h.object.aspect=this.aspect,this.view!==null&&(h.object.view=Object.assign({},this.view)),h.object.filmGauge=this.filmGauge,h.object.filmOffset=this.filmOffset,h}},qI=-90,XI=1,Oyt=class extends o1{constructor(s,h,p){super(),this.type="CubeCamera",this.renderTarget=p,this.coordinateSystem=null,this.activeMipmapLevel=0;let m=new s1(qI,XI,s,h);m.layers=this.layers,this.add(m);let _=new s1(qI,XI,s,h);_.layers=this.layers,this.add(_);let E=new s1(qI,XI,s,h);E.layers=this.layers,this.add(E);let y=new s1(qI,XI,s,h);y.layers=this.layers,this.add(y);let I=new s1(qI,XI,s,h);I.layers=this.layers,this.add(I);let N=new s1(qI,XI,s,h);N.layers=this.layers,this.add(N)}updateCoordinateSystem(){let s=this.coordinateSystem,h=this.children.concat(),[p,m,_,E,y,I]=h;for(let N of h)this.remove(N);if(s===Qx)p.up.set(0,1,0),p.lookAt(1,0,0),m.up.set(0,1,0),m.lookAt(-1,0,0),_.up.set(0,0,-1),_.lookAt(0,1,0),E.up.set(0,0,1),E.lookAt(0,-1,0),y.up.set(0,1,0),y.lookAt(0,0,1),I.up.set(0,1,0),I.lookAt(0,0,-1);else if(s===det)p.up.set(0,-1,0),p.lookAt(-1,0,0),m.up.set(0,-1,0),m.lookAt(1,0,0),_.up.set(0,0,1),_.lookAt(0,1,0),E.up.set(0,0,-1),E.lookAt(0,-1,0),y.up.set(0,-1,0),y.lookAt(0,0,1),I.up.set(0,-1,0),I.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+s);for(let N of h)this.add(N),N.updateMatrixWorld()}update(s,h){this.parent===null&&this.updateMatrixWorld();let{renderTarget:p,activeMipmapLevel:m}=this;this.coordinateSystem!==s.coordinateSystem&&(this.coordinateSystem=s.coordinateSystem,this.updateCoordinateSystem());let[_,E,y,I,N,B]=this.children,P=s.getRenderTarget(),U=s.getActiveCubeFace(),j=s.getActiveMipmapLevel(),V=s.xr.enabled;s.xr.enabled=!1;let tt=p.texture.generateMipmaps;p.texture.generateMipmaps=!1,s.setRenderTarget(p,0,m),s.render(h,_),s.setRenderTarget(p,1,m),s.render(h,E),s.setRenderTarget(p,2,m),s.render(h,y),s.setRenderTarget(p,3,m),s.render(h,I),s.setRenderTarget(p,4,m),s.render(h,N),p.texture.generateMipmaps=tt,s.setRenderTarget(p,5,m),s.render(h,B),s.setRenderTarget(P,U,j),s.xr.enabled=V,p.texture.needsPMREMUpdate=!0}},xet=class extends Kw{constructor(s,h,p,m,_,E,y,I,N,B){s=s!==void 0?s:[],h=h!==void 0?h:nR,super(s,h,p,m,_,E,y,I,N,B),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(s){this.image=s}},Byt=class extends e3{constructor(s=1,h={}){super(s,s,h),this.isWebGLCubeRenderTarget=!0;let p={width:s,height:s,depth:1},m=[p,p,p,p,p,p];h.encoding!==void 0&&(_U("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),h.colorSpace=h.encoding===YA?Pd:wb),this.texture=new xet(m,h.mapping,h.wrapS,h.wrapT,h.magFilter,h.minFilter,h.format,h.type,h.anisotropy,h.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=h.generateMipmaps!==void 0?h.generateMipmaps:!1,this.texture.minFilter=h.minFilter!==void 0?h.minFilter:bb}fromEquirectangularTexture(s,h){this.texture.type=h.type,this.texture.colorSpace=h.colorSpace,this.texture.generateMipmaps=h.generateMipmaps,this.texture.minFilter=h.minFilter,this.texture.magFilter=h.magFilter;let p={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; @@ -100,9 +100,9 @@ function print() { __p += __j.call(arguments, '') } gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},m=new XA(5,5,5),_=new e3({name:"CubemapFromEquirect",uniforms:iR(g.uniforms),vertexShader:g.vertexShader,fragmentShader:g.fragmentShader,side:mg,blending:sS});_.uniforms.tEquirect.value=h;let S=new gg(m,_),y=h.minFilter;return h.minFilter===wU&&(h.minFilter=bb),new Eyt(1,10,this).update(s,S),h.minFilter=y,S.geometry.dispose(),S.material.dispose(),this}clear(s,h,g,m){let _=s.getRenderTarget();for(let S=0;S<6;S++)s.setRenderTarget(this,S),s.clear(h,g,m);s.setRenderTarget(_)}},ryt=new Ge,BEe=new Ge,FEe=new Ko,Yx=class{constructor(s=new Ge(1,0,0),h=0){this.isPlane=!0,this.normal=s,this.constant=h}set(s,h){return this.normal.copy(s),this.constant=h,this}setComponents(s,h,g,m){return this.normal.set(s,h,g),this.constant=m,this}setFromNormalAndCoplanarPoint(s,h){return this.normal.copy(s),this.constant=-h.dot(this.normal),this}setFromCoplanarPoints(s,h,g){let m=ryt.subVectors(g,h).cross(BEe.subVectors(s,h)).normalize();return this.setFromNormalAndCoplanarPoint(m,s),this}copy(s){return this.normal.copy(s.normal),this.constant=s.constant,this}normalize(){let s=1/this.normal.length();return this.normal.multiplyScalar(s),this.constant*=s,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(s){return this.normal.dot(s)+this.constant}distanceToSphere(s){return this.distanceToPoint(s.center)-s.radius}projectPoint(s,h){return h.copy(s).addScaledVector(this.normal,-this.distanceToPoint(s))}intersectLine(s,h){let g=s.delta(ryt),m=this.normal.dot(g);if(m===0)return this.distanceToPoint(s.start)===0?h.copy(s.start):null;let _=-(s.start.dot(this.normal)+this.constant)/m;return _<0||_>1?null:h.copy(s.start).addScaledVector(g,_)}intersectsLine(s){let h=this.distanceToPoint(s.start),g=this.distanceToPoint(s.end);return h<0&&g>0||g<0&&h>0}intersectsBox(s){return s.intersectsPlane(this)}intersectsSphere(s){return s.intersectsPlane(this)}coplanarPoint(s){return s.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(s,h){let g=h||FEe.getNormalMatrix(s),m=this.coplanarPoint(ryt).applyMatrix4(s),_=this.normal.applyMatrix3(g).normalize();return this.constant=-m.dot(_),this}translate(s){return this.constant-=s.dot(this.normal),this}equals(s){return s.normal.equals(this.normal)&&s.constant===this.constant}clone(){return new this.constructor().copy(this)}},zA=new lS,Vtt=new Ge,xU=class{constructor(s=new Yx,h=new Yx,g=new Yx,m=new Yx,_=new Yx,S=new Yx){this.planes=[s,h,g,m,_,S]}set(s,h,g,m,_,S){let y=this.planes;return y[0].copy(s),y[1].copy(h),y[2].copy(g),y[3].copy(m),y[4].copy(_),y[5].copy(S),this}copy(s){let h=this.planes;for(let g=0;g<6;g++)h[g].copy(s.planes[g]);return this}setFromProjectionMatrix(s,h=Kx){let g=this.planes,m=s.elements,_=m[0],S=m[1],y=m[2],R=m[3],N=m[4],B=m[5],P=m[6],U=m[7],W=m[8],q=m[9],nt=m[10],Q=m[11],X=m[12],gt=m[13],ft=m[14],xt=m[15];if(g[0].setComponents(R-_,U-N,Q-W,xt-X).normalize(),g[1].setComponents(R+_,U+N,Q+W,xt+X).normalize(),g[2].setComponents(R+S,U+B,Q+q,xt+gt).normalize(),g[3].setComponents(R-S,U-B,Q-q,xt-gt).normalize(),g[4].setComponents(R-y,U-P,Q-nt,xt-ft).normalize(),h===Kx)g[5].setComponents(R+y,U+P,Q+nt,xt+ft).normalize();else if(h===aet)g[5].setComponents(y,P,nt,ft).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+h);return this}intersectsObject(s){if(s.boundingSphere!==void 0)s.boundingSphere===null&&s.computeBoundingSphere(),zA.copy(s.boundingSphere).applyMatrix4(s.matrixWorld);else{let h=s.geometry;h.boundingSphere===null&&h.computeBoundingSphere(),zA.copy(h.boundingSphere).applyMatrix4(s.matrixWorld)}return this.intersectsSphere(zA)}intersectsSprite(s){return zA.center.set(0,0,0),zA.radius=.7071067811865476,zA.applyMatrix4(s.matrixWorld),this.intersectsSphere(zA)}intersectsSphere(s){let h=this.planes,g=s.center,m=-s.radius;for(let _=0;_<6;_++)if(h[_].distanceToPoint(g)0?s.max.x:s.min.x,Vtt.y=m.normal.y>0?s.max.y:s.min.y,Vtt.z=m.normal.z>0?s.max.z:s.min.z,m.distanceToPoint(Vtt)<0)return!1}return!0}containsPoint(s){let h=this.planes;for(let g=0;g<6;g++)if(h[g].distanceToPoint(s)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};function rKt(){let d=null,s=!1,h=null,g=null;function m(_,S){h(_,S),g=d.requestAnimationFrame(m)}return{start:function(){s!==!0&&h!==null&&(g=d.requestAnimationFrame(m),s=!0)},stop:function(){d.cancelAnimationFrame(g),s=!1},setAnimationLoop:function(_){h=_},setContext:function(_){d=_}}}function UEe(d,s){let h=s.isWebGL2,g=new WeakMap;function m(N,B){let P=N.array,U=N.usage,W=P.byteLength,q=d.createBuffer();d.bindBuffer(B,q),d.bufferData(B,P,U),N.onUploadCallback();let nt;if(P instanceof Float32Array)nt=d.FLOAT;else if(P instanceof Uint16Array)if(N.isFloat16BufferAttribute)if(h)nt=d.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else nt=d.UNSIGNED_SHORT;else if(P instanceof Int16Array)nt=d.SHORT;else if(P instanceof Uint32Array)nt=d.UNSIGNED_INT;else if(P instanceof Int32Array)nt=d.INT;else if(P instanceof Int8Array)nt=d.BYTE;else if(P instanceof Uint8Array)nt=d.UNSIGNED_BYTE;else if(P instanceof Uint8ClampedArray)nt=d.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+P);return{buffer:q,type:nt,bytesPerElement:P.BYTES_PER_ELEMENT,version:N.version,size:W}}function _(N,B,P){let U=B.array,W=B._updateRange,q=B.updateRanges;if(d.bindBuffer(P,N),W.count===-1&&q.length===0&&d.bufferSubData(P,0,U),q.length!==0){for(let nt=0,Q=q.length;nt1?null:h.copy(s.start).addScaledVector(p,_)}intersectsLine(s){let h=this.distanceToPoint(s.start),p=this.distanceToPoint(s.end);return h<0&&p>0||p<0&&h>0}intersectsBox(s){return s.intersectsPlane(this)}intersectsSphere(s){return s.intersectsPlane(this)}coplanarPoint(s){return s.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(s,h){let p=h||nSe.getNormalMatrix(s),m=this.coplanarPoint(myt).applyMatrix4(s),_=this.normal.applyMatrix3(p).normalize();return this.constant=-m.dot(_),this}translate(s){return this.constant-=s.dot(this.normal),this}equals(s){return s.normal.equals(this.normal)&&s.constant===this.constant}clone(){return new this.constructor().copy(this)}},GA=new dS,Ytt=new Ge,TU=class{constructor(s=new Jx,h=new Jx,p=new Jx,m=new Jx,_=new Jx,E=new Jx){this.planes=[s,h,p,m,_,E]}set(s,h,p,m,_,E){let y=this.planes;return y[0].copy(s),y[1].copy(h),y[2].copy(p),y[3].copy(m),y[4].copy(_),y[5].copy(E),this}copy(s){let h=this.planes;for(let p=0;p<6;p++)h[p].copy(s.planes[p]);return this}setFromProjectionMatrix(s,h=Qx){let p=this.planes,m=s.elements,_=m[0],E=m[1],y=m[2],I=m[3],N=m[4],B=m[5],P=m[6],U=m[7],j=m[8],V=m[9],tt=m[10],Q=m[11],X=m[12],gt=m[13],ft=m[14],xt=m[15];if(p[0].setComponents(I-_,U-N,Q-j,xt-X).normalize(),p[1].setComponents(I+_,U+N,Q+j,xt+X).normalize(),p[2].setComponents(I+E,U+B,Q+V,xt+gt).normalize(),p[3].setComponents(I-E,U-B,Q-V,xt-gt).normalize(),p[4].setComponents(I-y,U-P,Q-tt,xt-ft).normalize(),h===Qx)p[5].setComponents(I+y,U+P,Q+tt,xt+ft).normalize();else if(h===det)p[5].setComponents(y,P,tt,ft).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+h);return this}intersectsObject(s){if(s.boundingSphere!==void 0)s.boundingSphere===null&&s.computeBoundingSphere(),GA.copy(s.boundingSphere).applyMatrix4(s.matrixWorld);else{let h=s.geometry;h.boundingSphere===null&&h.computeBoundingSphere(),GA.copy(h.boundingSphere).applyMatrix4(s.matrixWorld)}return this.intersectsSphere(GA)}intersectsSprite(s){return GA.center.set(0,0,0),GA.radius=.7071067811865476,GA.applyMatrix4(s.matrixWorld),this.intersectsSphere(GA)}intersectsSphere(s){let h=this.planes,p=s.center,m=-s.radius;for(let _=0;_<6;_++)if(h[_].distanceToPoint(p)0?s.max.x:s.min.x,Ytt.y=m.normal.y>0?s.max.y:s.min.y,Ytt.z=m.normal.z>0?s.max.z:s.min.z,m.distanceToPoint(Ytt)<0)return!1}return!0}containsPoint(s){let h=this.planes;for(let p=0;p<6;p++)if(h[p].distanceToPoint(s)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};function pKt(){let d=null,s=!1,h=null,p=null;function m(_,E){h(_,E),p=d.requestAnimationFrame(m)}return{start:function(){s!==!0&&h!==null&&(p=d.requestAnimationFrame(m),s=!0)},stop:function(){d.cancelAnimationFrame(p),s=!1},setAnimationLoop:function(_){h=_},setContext:function(_){d=_}}}function iSe(d,s){let h=s.isWebGL2,p=new WeakMap;function m(N,B){let P=N.array,U=N.usage,j=P.byteLength,V=d.createBuffer();d.bindBuffer(B,V),d.bufferData(B,P,U),N.onUploadCallback();let tt;if(P instanceof Float32Array)tt=d.FLOAT;else if(P instanceof Uint16Array)if(N.isFloat16BufferAttribute)if(h)tt=d.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else tt=d.UNSIGNED_SHORT;else if(P instanceof Int16Array)tt=d.SHORT;else if(P instanceof Uint32Array)tt=d.UNSIGNED_INT;else if(P instanceof Int32Array)tt=d.INT;else if(P instanceof Int8Array)tt=d.BYTE;else if(P instanceof Uint8Array)tt=d.UNSIGNED_BYTE;else if(P instanceof Uint8ClampedArray)tt=d.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+P);return{buffer:V,type:tt,bytesPerElement:P.BYTES_PER_ELEMENT,version:N.version,size:j}}function _(N,B,P){let U=B.array,j=B._updateRange,V=B.updateRanges;if(d.bindBuffer(P,N),j.count===-1&&V.length===0&&d.bufferSubData(P,0,U),V.length!==0){for(let tt=0,Q=V.length;tt 0 +#endif`,vSe=`#if NUM_CLIPPING_PLANES > 0 vec4 plane; #pragma unroll_loop_start for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { @@ -299,26 +299,26 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #pragma unroll_loop_end if ( clipped ) discard; #endif -#endif`,nSe=`#if NUM_CLIPPING_PLANES > 0 +#endif`,_Se=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif`,iSe=`#if NUM_CLIPPING_PLANES > 0 +#endif`,ySe=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; -#endif`,rSe=`#if NUM_CLIPPING_PLANES > 0 +#endif`,xSe=`#if NUM_CLIPPING_PLANES > 0 vClipPosition = - mvPosition.xyz; -#endif`,sSe=`#if defined( USE_COLOR_ALPHA ) +#endif`,MSe=`#if defined( USE_COLOR_ALPHA ) diffuseColor *= vColor; #elif defined( USE_COLOR ) diffuseColor.rgb *= vColor; -#endif`,oSe=`#if defined( USE_COLOR_ALPHA ) +#endif`,ESe=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) varying vec3 vColor; -#endif`,cSe=`#if defined( USE_COLOR_ALPHA ) +#endif`,SSe=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) varying vec3 vColor; -#endif`,aSe=`#if defined( USE_COLOR_ALPHA ) +#endif`,TSe=`#if defined( USE_COLOR_ALPHA ) vColor = vec4( 1.0 ); #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) vColor = vec3( 1.0 ); @@ -328,7 +328,7 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #endif #ifdef USE_INSTANCING_COLOR vColor.xyz *= instanceColor.xyz; -#endif`,uSe=`#define PI 3.141592653589793 +#endif`,CSe=`#define PI 3.141592653589793 #define PI2 6.283185307179586 #define PI_HALF 1.5707963267948966 #define RECIPROCAL_PI 0.3183098861837907 @@ -406,7 +406,7 @@ vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); -} // validated`,lSe=`#ifdef ENVMAP_TYPE_CUBE_UV +} // validated`,ASe=`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_minMipLevel 4.0 #define cubeUV_minTileSize 16.0 float getFace( vec3 direction ) { @@ -499,7 +499,7 @@ float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { return vec4( mix( color0, color1, mipF ), 1.0 ); } } -#endif`,hSe=`vec3 transformedNormal = objectNormal; +#endif`,kSe=`vec3 transformedNormal = objectNormal; #ifdef USE_TANGENT vec3 transformedTangent = objectTangent; #endif @@ -528,18 +528,18 @@ transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif -#endif`,fSe=`#ifdef USE_DISPLACEMENTMAP +#endif`,LSe=`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; -#endif`,dSe=`#ifdef USE_DISPLACEMENTMAP +#endif`,PSe=`#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); -#endif`,pSe=`#ifdef USE_EMISSIVEMAP +#endif`,ISe=`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,gSe=`#ifdef USE_EMISSIVEMAP +#endif`,RSe=`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; -#endif`,mSe="gl_FragColor = linearToOutputTexel( gl_FragColor );",bSe=` +#endif`,DSe="gl_FragColor = linearToOutputTexel( gl_FragColor );",NSe=` const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( vec3( 0.8224621, 0.177538, 0.0 ), vec3( 0.0331941, 0.9668058, 0.0 ), @@ -567,7 +567,7 @@ vec4 LinearToLinear( in vec4 value ) { } vec4 LinearTosRGB( in vec4 value ) { return sRGBTransferOETF( value ); -}`,wSe=`#ifdef USE_ENVMAP +}`,OSe=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { @@ -596,7 +596,7 @@ vec4 LinearTosRGB( in vec4 value ) { #elif defined( ENVMAP_BLENDING_ADD ) outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif -#endif`,vSe=`#ifdef USE_ENVMAP +#endif`,BSe=`#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; #ifdef ENVMAP_TYPE_CUBE @@ -605,7 +605,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform sampler2D envMap; #endif -#endif`,_Se=`#ifdef USE_ENVMAP +#endif`,FSe=`#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS @@ -616,7 +616,7 @@ vec4 LinearTosRGB( in vec4 value ) { #else varying vec3 vReflect; #endif -#endif`,ySe=`#ifdef USE_ENVMAP +#endif`,USe=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif @@ -627,7 +627,7 @@ vec4 LinearTosRGB( in vec4 value ) { varying vec3 vReflect; uniform float refractionRatio; #endif -#endif`,xSe=`#ifdef USE_ENVMAP +#endif`,zSe=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vWorldPosition = worldPosition.xyz; #else @@ -644,18 +644,18 @@ vec4 LinearTosRGB( in vec4 value ) { vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); #endif #endif -#endif`,MSe=`#ifdef USE_FOG +#endif`,jSe=`#ifdef USE_FOG vFogDepth = - mvPosition.z; -#endif`,ESe=`#ifdef USE_FOG +#endif`,HSe=`#ifdef USE_FOG varying float vFogDepth; -#endif`,SSe=`#ifdef USE_FOG +#endif`,GSe=`#ifdef USE_FOG #ifdef FOG_EXP2 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); #else float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); #endif gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); -#endif`,TSe=`#ifdef USE_FOG +#endif`,WSe=`#ifdef USE_FOG uniform vec3 fogColor; varying float vFogDepth; #ifdef FOG_EXP2 @@ -664,7 +664,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform float fogNear; uniform float fogFar; #endif -#endif`,CSe=`#ifdef USE_GRADIENTMAP +#endif`,$Se=`#ifdef USE_GRADIENTMAP uniform sampler2D gradientMap; #endif vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { @@ -676,16 +676,16 @@ vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { vec2 fw = fwidth( coord ) * 0.5; return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); #endif -}`,ASe=`#ifdef USE_LIGHTMAP +}`,VSe=`#ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; reflectedLight.indirectDiffuse += lightMapIrradiance; -#endif`,kSe=`#ifdef USE_LIGHTMAP +#endif`,qSe=`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; -#endif`,LSe=`LambertMaterial material; +#endif`,XSe=`LambertMaterial material; material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,PSe=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,ZSe=`varying vec3 vViewPosition; struct LambertMaterial { vec3 diffuseColor; float specularStrength; @@ -699,7 +699,7 @@ void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometr reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Lambert -#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,ISe=`uniform bool receiveShadow; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,YSe=`uniform bool receiveShadow; uniform vec3 ambientLightColor; #if defined( USE_LIGHT_PROBES ) uniform vec3 lightProbe[ 9 ]; @@ -822,7 +822,7 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); return irradiance; } -#endif`,RSe=`#ifdef USE_ENVMAP +#endif`,KSe=`#ifdef USE_ENVMAP vec3 getIBLIrradiance( const in vec3 normal ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); @@ -855,8 +855,8 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi #endif } #endif -#endif`,DSe=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,NSe=`varying vec3 vViewPosition; +#endif`,JSe=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,QSe=`varying vec3 vViewPosition; struct ToonMaterial { vec3 diffuseColor; }; @@ -868,11 +868,11 @@ void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPo reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,OSe=`BlinnPhongMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,tTe=`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; -material.specularStrength = specularStrength;`,BSe=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,eTe=`varying vec3 vViewPosition; struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; @@ -889,7 +889,7 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geom reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,FSe=`PhysicalMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,nTe=`PhysicalMaterial material; material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); @@ -972,7 +972,7 @@ material.roughness = min( material.roughness, 1.0 ); material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; -#endif`,USe=`struct PhysicalMaterial { +#endif`,iTe=`struct PhysicalMaterial { vec3 diffuseColor; float roughness; vec3 specularColor; @@ -1272,7 +1272,7 @@ void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradia #define RE_IndirectSpecular RE_IndirectSpecular_Physical float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); -}`,zSe=` +}`,rTe=` vec3 geometryPosition = - vViewPosition; vec3 geometryNormal = normal; vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); @@ -1387,7 +1387,7 @@ IncidentLight directLight; #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,jSe=`#if defined( RE_IndirectDiffuse ) +#endif`,sTe=`#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; @@ -1406,25 +1406,25 @@ IncidentLight directLight; #ifdef USE_CLEARCOAT clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); #endif -#endif`,HSe=`#if defined( RE_IndirectDiffuse ) +#endif`,oTe=`#if defined( RE_IndirectDiffuse ) RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); #endif #if defined( RE_IndirectSpecular ) RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); -#endif`,GSe=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) +#endif`,cTe=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif`,WSe=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) +#endif`,aTe=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; -#endif`,$Se=`#ifdef USE_LOGDEPTHBUF +#endif`,uTe=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT varying float vFragDepth; varying float vIsPerspective; #else uniform float logDepthBufFC; #endif -#endif`,VSe=`#ifdef USE_LOGDEPTHBUF +#endif`,lTe=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); @@ -1434,16 +1434,16 @@ IncidentLight directLight; gl_Position.z *= gl_Position.w; } #endif -#endif`,qSe=`#ifdef USE_MAP +#endif`,hTe=`#ifdef USE_MAP vec4 sampledDiffuseColor = texture2D( map, vMapUv ); #ifdef DECODE_VIDEO_TEXTURE sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); #endif diffuseColor *= sampledDiffuseColor; -#endif`,XSe=`#ifdef USE_MAP +#endif`,fTe=`#ifdef USE_MAP uniform sampler2D map; -#endif`,ZSe=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) +#endif`,dTe=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) #if defined( USE_POINTS_UV ) vec2 uv = vUv; #else @@ -1455,7 +1455,7 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,YSe=`#if defined( USE_POINTS_UV ) +#endif`,pTe=`#if defined( USE_POINTS_UV ) varying vec2 vUv; #else #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) @@ -1467,13 +1467,13 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; -#endif`,KSe=`float metalnessFactor = metalness; +#endif`,gTe=`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); metalnessFactor *= texelMetalness.b; -#endif`,JSe=`#ifdef USE_METALNESSMAP +#endif`,mTe=`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; -#endif`,QSe=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) +#endif`,bTe=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) vColor *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { #if defined( USE_COLOR_ALPHA ) @@ -1482,7 +1482,7 @@ IncidentLight directLight; if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; #endif } -#endif`,tTe=`#ifdef USE_MORPHNORMALS +#endif`,wTe=`#ifdef USE_MORPHNORMALS objectNormal *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1494,7 +1494,7 @@ IncidentLight directLight; objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; #endif -#endif`,eTe=`#ifdef USE_MORPHTARGETS +#endif`,vTe=`#ifdef USE_MORPHTARGETS uniform float morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; @@ -1514,7 +1514,7 @@ IncidentLight directLight; uniform float morphTargetInfluences[ 4 ]; #endif #endif -#endif`,nTe=`#ifdef USE_MORPHTARGETS +#endif`,_Te=`#ifdef USE_MORPHTARGETS transformed *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1532,7 +1532,7 @@ IncidentLight directLight; transformed += morphTarget7 * morphTargetInfluences[ 7 ]; #endif #endif -#endif`,iTe=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#endif`,yTe=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; #ifdef FLAT_SHADED vec3 fdx = dFdx( vViewPosition ); vec3 fdy = dFdy( vViewPosition ); @@ -1573,7 +1573,7 @@ IncidentLight directLight; tbn2[1] *= faceDirection; #endif #endif -vec3 nonPerturbedNormal = normal;`,rTe=`#ifdef USE_NORMALMAP_OBJECTSPACE +vec3 nonPerturbedNormal = normal;`,xTe=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; #ifdef FLIP_SIDED normal = - normal; @@ -1588,25 +1588,25 @@ vec3 nonPerturbedNormal = normal;`,rTe=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = normalize( tbn * mapN ); #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,sTe=`#ifndef FLAT_SHADED +#endif`,MTe=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,oTe=`#ifndef FLAT_SHADED +#endif`,ETe=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,cTe=`#ifndef FLAT_SHADED +#endif`,STe=`#ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif -#endif`,aTe=`#ifdef USE_NORMALMAP +#endif`,TTe=`#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; #endif @@ -1628,13 +1628,13 @@ vec3 nonPerturbedNormal = normal;`,rTe=`#ifdef USE_NORMALMAP_OBJECTSPACE float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); return mat3( T * scale, B * scale, N ); } -#endif`,uTe=`#ifdef USE_CLEARCOAT +#endif`,CTe=`#ifdef USE_CLEARCOAT vec3 clearcoatNormal = nonPerturbedNormal; -#endif`,lTe=`#ifdef USE_CLEARCOAT_NORMALMAP +#endif`,ATe=`#ifdef USE_CLEARCOAT_NORMALMAP vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; clearcoatMapN.xy *= clearcoatNormalScale; clearcoatNormal = normalize( tbn2 * clearcoatMapN ); -#endif`,hTe=`#ifdef USE_CLEARCOATMAP +#endif`,kTe=`#ifdef USE_CLEARCOATMAP uniform sampler2D clearcoatMap; #endif #ifdef USE_CLEARCOAT_NORMALMAP @@ -1643,18 +1643,18 @@ vec3 nonPerturbedNormal = normal;`,rTe=`#ifdef USE_NORMALMAP_OBJECTSPACE #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP uniform sampler2D clearcoatRoughnessMap; -#endif`,fTe=`#ifdef USE_IRIDESCENCEMAP +#endif`,LTe=`#ifdef USE_IRIDESCENCEMAP uniform sampler2D iridescenceMap; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP uniform sampler2D iridescenceThicknessMap; -#endif`,dTe=`#ifdef OPAQUE +#endif`,PTe=`#ifdef OPAQUE diffuseColor.a = 1.0; #endif #ifdef USE_TRANSMISSION diffuseColor.a *= material.transmissionAlpha; #endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,pTe=`vec3 packNormalToRGB( const in vec3 normal ) { +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,ITe=`vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { @@ -1695,9 +1695,9 @@ float viewZToPerspectiveDepth( const in float viewZ, const in float near, const } float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { return ( near * far ) / ( ( far - near ) * depth - far ); -}`,gTe=`#ifdef PREMULTIPLIED_ALPHA +}`,RTe=`#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; -#endif`,mTe=`vec4 mvPosition = vec4( transformed, 1.0 ); +#endif`,DTe=`vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING mvPosition = batchingMatrix * mvPosition; #endif @@ -1705,22 +1705,22 @@ float perspectiveDepthToViewZ( const in float depth, const in float near, const mvPosition = instanceMatrix * mvPosition; #endif mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,bTe=`#ifdef DITHERING +gl_Position = projectionMatrix * mvPosition;`,NTe=`#ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,wTe=`#ifdef DITHERING +#endif`,OTe=`#ifdef DITHERING vec3 dithering( vec3 color ) { float grid_position = rand( gl_FragCoord.xy ); vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); return color + dither_shift_RGB; } -#endif`,vTe=`float roughnessFactor = roughness; +#endif`,BTe=`float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); roughnessFactor *= texelRoughness.g; -#endif`,_Te=`#ifdef USE_ROUGHNESSMAP +#endif`,FTe=`#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; -#endif`,yTe=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,UTe=`#if NUM_SPOT_LIGHT_COORDS > 0 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #if NUM_SPOT_LIGHT_MAPS > 0 @@ -1897,7 +1897,7 @@ gl_Position = projectionMatrix * mvPosition;`,bTe=`#ifdef DITHERING return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); #endif } -#endif`,xTe=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,zTe=`#if NUM_SPOT_LIGHT_COORDS > 0 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif @@ -1935,7 +1935,7 @@ gl_Position = projectionMatrix * mvPosition;`,bTe=`#ifdef DITHERING }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif -#endif`,MTe=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) +#endif`,jTe=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); vec4 shadowWorldPosition; #endif @@ -1967,7 +1967,7 @@ gl_Position = projectionMatrix * mvPosition;`,bTe=`#ifdef DITHERING vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end -#endif`,ETe=`float getShadowMask() { +#endif`,HTe=`float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 @@ -1999,12 +1999,12 @@ gl_Position = projectionMatrix * mvPosition;`,bTe=`#ifdef DITHERING #endif #endif return shadow; -}`,STe=`#ifdef USE_SKINNING +}`,GTe=`#ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); mat4 boneMatY = getBoneMatrix( skinIndex.y ); mat4 boneMatZ = getBoneMatrix( skinIndex.z ); mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,TTe=`#ifdef USE_SKINNING +#endif`,WTe=`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; uniform highp sampler2D boneTexture; @@ -2019,7 +2019,7 @@ gl_Position = projectionMatrix * mvPosition;`,bTe=`#ifdef DITHERING vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); return mat4( v1, v2, v3, v4 ); } -#endif`,CTe=`#ifdef USE_SKINNING +#endif`,$Te=`#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; @@ -2027,7 +2027,7 @@ gl_Position = projectionMatrix * mvPosition;`,bTe=`#ifdef DITHERING skinned += boneMatZ * skinVertex * skinWeight.z; skinned += boneMatW * skinVertex * skinWeight.w; transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,ATe=`#ifdef USE_SKINNING +#endif`,VTe=`#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; @@ -2038,17 +2038,17 @@ gl_Position = projectionMatrix * mvPosition;`,bTe=`#ifdef DITHERING #ifdef USE_TANGENT objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; #endif -#endif`,kTe=`float specularStrength; +#endif`,qTe=`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; -#endif`,LTe=`#ifdef USE_SPECULARMAP +#endif`,XTe=`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; -#endif`,PTe=`#if defined( TONE_MAPPING ) +#endif`,ZTe=`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,ITe=`#ifndef saturate +#endif`,YTe=`#ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; @@ -2129,7 +2129,7 @@ vec3 AgXToneMapping( vec3 color ) { color = LINEAR_REC2020_TO_LINEAR_SRGB * color; return color; } -vec3 CustomToneMapping( vec3 color ) { return color; }`,RTe=`#ifdef USE_TRANSMISSION +vec3 CustomToneMapping( vec3 color ) { return color; }`,KTe=`#ifdef USE_TRANSMISSION material.transmission = transmission; material.transmissionAlpha = 1.0; material.thickness = thickness; @@ -2150,7 +2150,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,RTe=`#ifdef USE_TRANSMIS material.attenuationColor, material.attenuationDistance ); material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); -#endif`,DTe=`#ifdef USE_TRANSMISSION +#endif`,JTe=`#ifdef USE_TRANSMISSION uniform float transmission; uniform float thickness; uniform float attenuationDistance; @@ -2256,7 +2256,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,RTe=`#ifdef USE_TRANSMIS float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); } -#endif`,NTe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,QTe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2326,7 +2326,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,RTe=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,OTe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,tCe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2420,7 +2420,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,RTe=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,BTe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,eCe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) vUv = vec3( uv, 1 ).xy; #endif #ifdef USE_MAP @@ -2491,7 +2491,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,RTe=`#ifdef USE_TRANSMIS #endif #ifdef USE_THICKNESSMAP vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; -#endif`,FTe=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 +#endif`,nCe=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 vec4 worldPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING worldPosition = batchingMatrix * worldPosition; @@ -2500,12 +2500,12 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,RTe=`#ifdef USE_TRANSMIS worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; -#endif`,UTe=`varying vec2 vUv; +#endif`,iCe=`varying vec2 vUv; uniform mat3 uvTransform; void main() { vUv = ( uvTransform * vec3( uv, 1 ) ).xy; gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,zTe=`uniform sampler2D t2D; +}`,rCe=`uniform sampler2D t2D; uniform float backgroundIntensity; varying vec2 vUv; void main() { @@ -2517,14 +2517,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,jTe=`varying vec3 vWorldDirection; +}`,sCe=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,HTe=`#ifdef ENVMAP_TYPE_CUBE +}`,oCe=`#ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #elif defined( ENVMAP_TYPE_CUBE_UV ) uniform sampler2D envMap; @@ -2546,14 +2546,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,GTe=`varying vec3 vWorldDirection; +}`,cCe=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,WTe=`uniform samplerCube tCube; +}`,aCe=`uniform samplerCube tCube; uniform float tFlip; uniform float opacity; varying vec3 vWorldDirection; @@ -2563,7 +2563,7 @@ void main() { gl_FragColor.a *= opacity; #include #include -}`,$Te=`#include +}`,uCe=`#include #include #include #include @@ -2589,7 +2589,7 @@ void main() { #include #include vHighPrecisionZW = gl_Position.zw; -}`,VTe=`#if DEPTH_PACKING == 3200 +}`,lCe=`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include @@ -2619,7 +2619,7 @@ void main() { #elif DEPTH_PACKING == 3201 gl_FragColor = packDepthToRGBA( fragCoordZ ); #endif -}`,qTe=`#define DISTANCE +}`,hCe=`#define DISTANCE varying vec3 vWorldPosition; #include #include @@ -2645,7 +2645,7 @@ void main() { #include #include vWorldPosition = worldPosition.xyz; -}`,XTe=`#define DISTANCE +}`,fCe=`#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; @@ -2669,13 +2669,13 @@ void main () { dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); -}`,ZTe=`varying vec3 vWorldDirection; +}`,dCe=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include -}`,YTe=`uniform sampler2D tEquirect; +}`,pCe=`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { @@ -2684,7 +2684,7 @@ void main() { gl_FragColor = texture2D( tEquirect, sampleUV ); #include #include -}`,KTe=`uniform float scale; +}`,gCe=`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include @@ -2705,7 +2705,7 @@ void main() { #include #include #include -}`,JTe=`uniform vec3 diffuse; +}`,mCe=`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; @@ -2733,7 +2733,7 @@ void main() { #include #include #include -}`,QTe=`#include +}`,bCe=`#include #include #include #include @@ -2764,7 +2764,7 @@ void main() { #include #include #include -}`,tCe=`uniform vec3 diffuse; +}`,wCe=`uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; @@ -2812,7 +2812,7 @@ void main() { #include #include #include -}`,eCe=`#define LAMBERT +}`,vCe=`#define LAMBERT varying vec3 vViewPosition; #include #include @@ -2850,7 +2850,7 @@ void main() { #include #include #include -}`,nCe=`#define LAMBERT +}`,_Ce=`#define LAMBERT uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -2907,7 +2907,7 @@ void main() { #include #include #include -}`,iCe=`#define MATCAP +}`,yCe=`#define MATCAP varying vec3 vViewPosition; #include #include @@ -2940,7 +2940,7 @@ void main() { #include #include vViewPosition = - mvPosition.xyz; -}`,rCe=`#define MATCAP +}`,xCe=`#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; @@ -2986,7 +2986,7 @@ void main() { #include #include #include -}`,sCe=`#define NORMAL +}`,MCe=`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; #endif @@ -3018,7 +3018,7 @@ void main() { #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) vViewPosition = - mvPosition.xyz; #endif -}`,oCe=`#define NORMAL +}`,ECe=`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; @@ -3039,7 +3039,7 @@ void main() { #ifdef OPAQUE gl_FragColor.a = 1.0; #endif -}`,cCe=`#define PHONG +}`,SCe=`#define PHONG varying vec3 vViewPosition; #include #include @@ -3077,7 +3077,7 @@ void main() { #include #include #include -}`,aCe=`#define PHONG +}`,TCe=`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; @@ -3136,7 +3136,7 @@ void main() { #include #include #include -}`,uCe=`#define STANDARD +}`,CCe=`#define STANDARD varying vec3 vViewPosition; #ifdef USE_TRANSMISSION varying vec3 vWorldPosition; @@ -3178,7 +3178,7 @@ void main() { #ifdef USE_TRANSMISSION vWorldPosition = worldPosition.xyz; #endif -}`,lCe=`#define STANDARD +}`,ACe=`#define STANDARD #ifdef PHYSICAL #define IOR #define USE_SPECULAR @@ -3300,7 +3300,7 @@ void main() { #include #include #include -}`,hCe=`#define TOON +}`,kCe=`#define TOON varying vec3 vViewPosition; #include #include @@ -3336,7 +3336,7 @@ void main() { #include #include #include -}`,fCe=`#define TOON +}`,LCe=`#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3389,7 +3389,7 @@ void main() { #include #include #include -}`,dCe=`uniform float size; +}`,PCe=`uniform float size; uniform float scale; #include #include @@ -3419,7 +3419,7 @@ void main() { #include #include #include -}`,pCe=`uniform vec3 diffuse; +}`,ICe=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3444,7 +3444,7 @@ void main() { #include #include #include -}`,gCe=`#include +}`,RCe=`#include #include #include #include @@ -3466,7 +3466,7 @@ void main() { #include #include #include -}`,mCe=`uniform vec3 color; +}`,DCe=`uniform vec3 color; uniform float opacity; #include #include @@ -3482,7 +3482,7 @@ void main() { #include #include #include -}`,bCe=`uniform float rotation; +}`,NCe=`uniform float rotation; uniform vec2 center; #include #include @@ -3508,7 +3508,7 @@ void main() { #include #include #include -}`,wCe=`uniform vec3 diffuse; +}`,OCe=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3533,7 +3533,7 @@ void main() { #include #include #include -}`,No={alphahash_fragment:zEe,alphahash_pars_fragment:jEe,alphamap_fragment:HEe,alphamap_pars_fragment:GEe,alphatest_fragment:WEe,alphatest_pars_fragment:$Ee,aomap_fragment:VEe,aomap_pars_fragment:qEe,batching_pars_vertex:XEe,batching_vertex:ZEe,begin_vertex:YEe,beginnormal_vertex:KEe,bsdfs:JEe,iridescence_fragment:QEe,bumpmap_pars_fragment:tSe,clipping_planes_fragment:eSe,clipping_planes_pars_fragment:nSe,clipping_planes_pars_vertex:iSe,clipping_planes_vertex:rSe,color_fragment:sSe,color_pars_fragment:oSe,color_pars_vertex:cSe,color_vertex:aSe,common:uSe,cube_uv_reflection_fragment:lSe,defaultnormal_vertex:hSe,displacementmap_pars_vertex:fSe,displacementmap_vertex:dSe,emissivemap_fragment:pSe,emissivemap_pars_fragment:gSe,colorspace_fragment:mSe,colorspace_pars_fragment:bSe,envmap_fragment:wSe,envmap_common_pars_fragment:vSe,envmap_pars_fragment:_Se,envmap_pars_vertex:ySe,envmap_physical_pars_fragment:RSe,envmap_vertex:xSe,fog_vertex:MSe,fog_pars_vertex:ESe,fog_fragment:SSe,fog_pars_fragment:TSe,gradientmap_pars_fragment:CSe,lightmap_fragment:ASe,lightmap_pars_fragment:kSe,lights_lambert_fragment:LSe,lights_lambert_pars_fragment:PSe,lights_pars_begin:ISe,lights_toon_fragment:DSe,lights_toon_pars_fragment:NSe,lights_phong_fragment:OSe,lights_phong_pars_fragment:BSe,lights_physical_fragment:FSe,lights_physical_pars_fragment:USe,lights_fragment_begin:zSe,lights_fragment_maps:jSe,lights_fragment_end:HSe,logdepthbuf_fragment:GSe,logdepthbuf_pars_fragment:WSe,logdepthbuf_pars_vertex:$Se,logdepthbuf_vertex:VSe,map_fragment:qSe,map_pars_fragment:XSe,map_particle_fragment:ZSe,map_particle_pars_fragment:YSe,metalnessmap_fragment:KSe,metalnessmap_pars_fragment:JSe,morphcolor_vertex:QSe,morphnormal_vertex:tTe,morphtarget_pars_vertex:eTe,morphtarget_vertex:nTe,normal_fragment_begin:iTe,normal_fragment_maps:rTe,normal_pars_fragment:sTe,normal_pars_vertex:oTe,normal_vertex:cTe,normalmap_pars_fragment:aTe,clearcoat_normal_fragment_begin:uTe,clearcoat_normal_fragment_maps:lTe,clearcoat_pars_fragment:hTe,iridescence_pars_fragment:fTe,opaque_fragment:dTe,packing:pTe,premultiplied_alpha_fragment:gTe,project_vertex:mTe,dithering_fragment:bTe,dithering_pars_fragment:wTe,roughnessmap_fragment:vTe,roughnessmap_pars_fragment:_Te,shadowmap_pars_fragment:yTe,shadowmap_pars_vertex:xTe,shadowmap_vertex:MTe,shadowmask_pars_fragment:ETe,skinbase_vertex:STe,skinning_pars_vertex:TTe,skinning_vertex:CTe,skinnormal_vertex:ATe,specularmap_fragment:kTe,specularmap_pars_fragment:LTe,tonemapping_fragment:PTe,tonemapping_pars_fragment:ITe,transmission_fragment:RTe,transmission_pars_fragment:DTe,uv_pars_fragment:NTe,uv_pars_vertex:OTe,uv_vertex:BTe,worldpos_vertex:FTe,background_vert:UTe,background_frag:zTe,backgroundCube_vert:jTe,backgroundCube_frag:HTe,cube_vert:GTe,cube_frag:WTe,depth_vert:$Te,depth_frag:VTe,distanceRGBA_vert:qTe,distanceRGBA_frag:XTe,equirect_vert:ZTe,equirect_frag:YTe,linedashed_vert:KTe,linedashed_frag:JTe,meshbasic_vert:QTe,meshbasic_frag:tCe,meshlambert_vert:eCe,meshlambert_frag:nCe,meshmatcap_vert:iCe,meshmatcap_frag:rCe,meshnormal_vert:sCe,meshnormal_frag:oCe,meshphong_vert:cCe,meshphong_frag:aCe,meshphysical_vert:uCe,meshphysical_frag:lCe,meshtoon_vert:hCe,meshtoon_frag:fCe,points_vert:dCe,points_frag:pCe,shadow_vert:gCe,shadow_frag:mCe,sprite_vert:bCe,sprite_frag:wCe},Zi={common:{diffuse:{value:new Go(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Ko},alphaMap:{value:null},alphaMapTransform:{value:new Ko},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Ko}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Ko}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Ko}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Ko},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Ko},normalScale:{value:new Nc(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Ko},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Ko}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Ko}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Ko}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Go(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Go(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Ko},alphaTest:{value:0},uvTransform:{value:new Ko}},sprite:{diffuse:{value:new Go(16777215)},opacity:{value:1},center:{value:new Nc(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Ko},alphaMap:{value:null},alphaMapTransform:{value:new Ko},alphaTest:{value:0}}},yy={basic:{uniforms:i1([Zi.common,Zi.specularmap,Zi.envmap,Zi.aomap,Zi.lightmap,Zi.fog]),vertexShader:No.meshbasic_vert,fragmentShader:No.meshbasic_frag},lambert:{uniforms:i1([Zi.common,Zi.specularmap,Zi.envmap,Zi.aomap,Zi.lightmap,Zi.emissivemap,Zi.bumpmap,Zi.normalmap,Zi.displacementmap,Zi.fog,Zi.lights,{emissive:{value:new Go(0)}}]),vertexShader:No.meshlambert_vert,fragmentShader:No.meshlambert_frag},phong:{uniforms:i1([Zi.common,Zi.specularmap,Zi.envmap,Zi.aomap,Zi.lightmap,Zi.emissivemap,Zi.bumpmap,Zi.normalmap,Zi.displacementmap,Zi.fog,Zi.lights,{emissive:{value:new Go(0)},specular:{value:new Go(1118481)},shininess:{value:30}}]),vertexShader:No.meshphong_vert,fragmentShader:No.meshphong_frag},standard:{uniforms:i1([Zi.common,Zi.envmap,Zi.aomap,Zi.lightmap,Zi.emissivemap,Zi.bumpmap,Zi.normalmap,Zi.displacementmap,Zi.roughnessmap,Zi.metalnessmap,Zi.fog,Zi.lights,{emissive:{value:new Go(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:No.meshphysical_vert,fragmentShader:No.meshphysical_frag},toon:{uniforms:i1([Zi.common,Zi.aomap,Zi.lightmap,Zi.emissivemap,Zi.bumpmap,Zi.normalmap,Zi.displacementmap,Zi.gradientmap,Zi.fog,Zi.lights,{emissive:{value:new Go(0)}}]),vertexShader:No.meshtoon_vert,fragmentShader:No.meshtoon_frag},matcap:{uniforms:i1([Zi.common,Zi.bumpmap,Zi.normalmap,Zi.displacementmap,Zi.fog,{matcap:{value:null}}]),vertexShader:No.meshmatcap_vert,fragmentShader:No.meshmatcap_frag},points:{uniforms:i1([Zi.points,Zi.fog]),vertexShader:No.points_vert,fragmentShader:No.points_frag},dashed:{uniforms:i1([Zi.common,Zi.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:No.linedashed_vert,fragmentShader:No.linedashed_frag},depth:{uniforms:i1([Zi.common,Zi.displacementmap]),vertexShader:No.depth_vert,fragmentShader:No.depth_frag},normal:{uniforms:i1([Zi.common,Zi.bumpmap,Zi.normalmap,Zi.displacementmap,{opacity:{value:1}}]),vertexShader:No.meshnormal_vert,fragmentShader:No.meshnormal_frag},sprite:{uniforms:i1([Zi.sprite,Zi.fog]),vertexShader:No.sprite_vert,fragmentShader:No.sprite_frag},background:{uniforms:{uvTransform:{value:new Ko},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:No.background_vert,fragmentShader:No.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:No.backgroundCube_vert,fragmentShader:No.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:No.cube_vert,fragmentShader:No.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:No.equirect_vert,fragmentShader:No.equirect_frag},distanceRGBA:{uniforms:i1([Zi.common,Zi.displacementmap,{referencePosition:{value:new Ge},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:No.distanceRGBA_vert,fragmentShader:No.distanceRGBA_frag},shadow:{uniforms:i1([Zi.lights,Zi.fog,{color:{value:new Go(0)},opacity:{value:1}}]),vertexShader:No.shadow_vert,fragmentShader:No.shadow_frag}};yy.physical={uniforms:i1([yy.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Ko},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Ko},clearcoatNormalScale:{value:new Nc(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Ko},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Ko},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Ko},sheen:{value:0},sheenColor:{value:new Go(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Ko},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Ko},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Ko},transmissionSamplerSize:{value:new Nc},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Ko},attenuationDistance:{value:0},attenuationColor:{value:new Go(0)},specularColor:{value:new Go(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Ko},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Ko},anisotropyVector:{value:new Nc},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Ko}}]),vertexShader:No.meshphysical_vert,fragmentShader:No.meshphysical_frag};var qtt={r:0,b:0,g:0};function vCe(d,s,h,g,m,_,S){let y=new Go(0),R=_===!0?0:1,N,B,P=null,U=0,W=null;function q(Q,X){let gt=!1,ft=X.isScene===!0?X.background:null;ft&&ft.isTexture&&(ft=(X.backgroundBlurriness>0?h:s).get(ft)),ft===null?nt(y,R):ft&&ft.isColor&&(nt(ft,1),gt=!0);let xt=d.xr.getEnvironmentBlendMode();xt==="additive"?g.buffers.color.setClear(0,0,0,1,S):xt==="alpha-blend"&&g.buffers.color.setClear(0,0,0,0,S),(d.autoClear||gt)&&d.clear(d.autoClearColor,d.autoClearDepth,d.autoClearStencil),ft&&(ft.isCubeTexture||ft.mapping===Ret)?(B===void 0&&(B=new gg(new XA(1,1,1),new e3({name:"BackgroundCubeMaterial",uniforms:iR(yy.backgroundCube.uniforms),vertexShader:yy.backgroundCube.vertexShader,fragmentShader:yy.backgroundCube.fragmentShader,side:mg,depthTest:!1,depthWrite:!1,fog:!1})),B.geometry.deleteAttribute("normal"),B.geometry.deleteAttribute("uv"),B.onBeforeRender=function(Bt,Ot,Pt){this.matrixWorld.copyPosition(Pt.matrixWorld)},Object.defineProperty(B.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),m.update(B)),B.material.uniforms.envMap.value=ft,B.material.uniforms.flipEnvMap.value=ft.isCubeTexture&&ft.isRenderTargetTexture===!1?-1:1,B.material.uniforms.backgroundBlurriness.value=X.backgroundBlurriness,B.material.uniforms.backgroundIntensity.value=X.backgroundIntensity,B.material.toneMapped=Na.getTransfer(ft.colorSpace)!==vu,(P!==ft||U!==ft.version||W!==d.toneMapping)&&(B.material.needsUpdate=!0,P=ft,U=ft.version,W=d.toneMapping),B.layers.enableAll(),Q.unshift(B,B.geometry,B.material,0,0,null)):ft&&ft.isTexture&&(N===void 0&&(N=new gg(new Tyt(2,2),new e3({name:"BackgroundMaterial",uniforms:iR(yy.background.uniforms),vertexShader:yy.background.vertexShader,fragmentShader:yy.background.fragmentShader,side:aS,depthTest:!1,depthWrite:!1,fog:!1})),N.geometry.deleteAttribute("normal"),Object.defineProperty(N.material,"map",{get:function(){return this.uniforms.t2D.value}}),m.update(N)),N.material.uniforms.t2D.value=ft,N.material.uniforms.backgroundIntensity.value=X.backgroundIntensity,N.material.toneMapped=Na.getTransfer(ft.colorSpace)!==vu,ft.matrixAutoUpdate===!0&&ft.updateMatrix(),N.material.uniforms.uvTransform.value.copy(ft.matrix),(P!==ft||U!==ft.version||W!==d.toneMapping)&&(N.material.needsUpdate=!0,P=ft,U=ft.version,W=d.toneMapping),N.layers.enableAll(),Q.unshift(N,N.geometry,N.material,0,0,null))}function nt(Q,X){Q.getRGB(qtt,iKt(d)),g.buffers.color.setClear(qtt.r,qtt.g,qtt.b,X,S)}return{getClearColor:function(){return y},setClearColor:function(Q,X=1){y.set(Q),R=X,nt(y,R)},getClearAlpha:function(){return R},setClearAlpha:function(Q){R=Q,nt(y,R)},render:q}}function _Ce(d,s,h,g){let m=d.getParameter(d.MAX_VERTEX_ATTRIBS),_=g.isWebGL2?null:s.get("OES_vertex_array_object"),S=g.isWebGL2||_!==null,y={},R=Q(null),N=R,B=!1;function P(ne,xe,re,hn,Se){let ke=!1;if(S){let mn=nt(hn,re,xe);N!==mn&&(N=mn,W(N.object)),ke=X(ne,hn,re,Se),ke&>(ne,hn,re,Se)}else{let mn=xe.wireframe===!0;(N.geometry!==hn.id||N.program!==re.id||N.wireframe!==mn)&&(N.geometry=hn.id,N.program=re.id,N.wireframe=mn,ke=!0)}Se!==null&&h.update(Se,d.ELEMENT_ARRAY_BUFFER),(ke||B)&&(B=!1,se(ne,xe,re,hn),Se!==null&&d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,h.get(Se).buffer))}function U(){return g.isWebGL2?d.createVertexArray():_.createVertexArrayOES()}function W(ne){return g.isWebGL2?d.bindVertexArray(ne):_.bindVertexArrayOES(ne)}function q(ne){return g.isWebGL2?d.deleteVertexArray(ne):_.deleteVertexArrayOES(ne)}function nt(ne,xe,re){let hn=re.wireframe===!0,Se=y[ne.id];Se===void 0&&(Se={},y[ne.id]=Se);let ke=Se[xe.id];ke===void 0&&(ke={},Se[xe.id]=ke);let mn=ke[hn];return mn===void 0&&(mn=Q(U()),ke[hn]=mn),mn}function Q(ne){let xe=[],re=[],hn=[];for(let Se=0;Se=0){let Pe=Se[Qn],ti=ke[Qn];if(ti===void 0&&(Qn==="instanceMatrix"&&ne.instanceMatrix&&(ti=ne.instanceMatrix),Qn==="instanceColor"&&ne.instanceColor&&(ti=ne.instanceColor)),Pe===void 0||Pe.attribute!==ti||ti&&Pe.data!==ti.data)return!0;mn++}return N.attributesNum!==mn||N.index!==hn}function gt(ne,xe,re,hn){let Se={},ke=xe.attributes,mn=0,en=re.getAttributes();for(let Qn in en)if(en[Qn].location>=0){let Pe=ke[Qn];Pe===void 0&&(Qn==="instanceMatrix"&&ne.instanceMatrix&&(Pe=ne.instanceMatrix),Qn==="instanceColor"&&ne.instanceColor&&(Pe=ne.instanceColor));let ti={};ti.attribute=Pe,Pe&&Pe.data&&(ti.data=Pe.data),Se[Qn]=ti,mn++}N.attributes=Se,N.attributesNum=mn,N.index=hn}function ft(){let ne=N.newAttributes;for(let xe=0,re=ne.length;xe=0){let ge=Se[en];if(ge===void 0&&(en==="instanceMatrix"&&ne.instanceMatrix&&(ge=ne.instanceMatrix),en==="instanceColor"&&ne.instanceColor&&(ge=ne.instanceColor)),ge!==void 0){let Pe=ge.normalized,ti=ge.itemSize,Yi=h.get(ge);if(Yi===void 0)continue;let ki=Yi.buffer,lr=Yi.type,pr=Yi.bytesPerElement,Kt=g.isWebGL2===!0&&(lr===d.INT||lr===d.UNSIGNED_INT||ge.gpuType===$Yt);if(ge.isInterleavedBufferAttribute){let wn=ge.data,it=wn.stride,ut=ge.offset;if(wn.isInstancedInterleavedBuffer){for(let kt=0;kt0&&d.getShaderPrecisionFormat(d.FRAGMENT_SHADER,d.HIGH_FLOAT).precision>0)return"highp";Pt="mediump"}return Pt==="mediump"&&d.getShaderPrecisionFormat(d.VERTEX_SHADER,d.MEDIUM_FLOAT).precision>0&&d.getShaderPrecisionFormat(d.FRAGMENT_SHADER,d.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let S=typeof WebGL2RenderingContext<"u"&&d.constructor.name==="WebGL2RenderingContext",y=h.precision!==void 0?h.precision:"highp",R=_(y);R!==y&&(console.warn("THREE.WebGLRenderer:",y,"not supported, using",R,"instead."),y=R);let N=S||s.has("WEBGL_draw_buffers"),B=h.logarithmicDepthBuffer===!0,P=d.getParameter(d.MAX_TEXTURE_IMAGE_UNITS),U=d.getParameter(d.MAX_VERTEX_TEXTURE_IMAGE_UNITS),W=d.getParameter(d.MAX_TEXTURE_SIZE),q=d.getParameter(d.MAX_CUBE_MAP_TEXTURE_SIZE),nt=d.getParameter(d.MAX_VERTEX_ATTRIBS),Q=d.getParameter(d.MAX_VERTEX_UNIFORM_VECTORS),X=d.getParameter(d.MAX_VARYING_VECTORS),gt=d.getParameter(d.MAX_FRAGMENT_UNIFORM_VECTORS),ft=U>0,xt=S||s.has("OES_texture_float"),Bt=ft&&xt,Ot=S?d.getParameter(d.MAX_SAMPLES):0;return{isWebGL2:S,drawBuffers:N,getMaxAnisotropy:m,getMaxPrecision:_,precision:y,logarithmicDepthBuffer:B,maxTextures:P,maxVertexTextures:U,maxTextureSize:W,maxCubemapSize:q,maxAttributes:nt,maxVertexUniforms:Q,maxVaryings:X,maxFragmentUniforms:gt,vertexTextures:ft,floatFragmentTextures:xt,floatVertexTextures:Bt,maxSamples:Ot}}function MCe(d){let s=this,h=null,g=0,m=!1,_=!1,S=new Yx,y=new Ko,R={value:null,needsUpdate:!1};this.uniform=R,this.numPlanes=0,this.numIntersection=0,this.init=function(P,U){let W=P.length!==0||U||g!==0||m;return m=U,g=P.length,W},this.beginShadows=function(){_=!0,B(null)},this.endShadows=function(){_=!1},this.setGlobalState=function(P,U){h=B(P,U,0)},this.setState=function(P,U,W){let q=P.clippingPlanes,nt=P.clipIntersection,Q=P.clipShadows,X=d.get(P);if(!m||q===null||q.length===0||_&&!Q)_?B(null):N();else{let gt=_?0:g,ft=gt*4,xt=X.clippingState||null;R.value=xt,xt=B(q,U,ft,W);for(let Bt=0;Bt!==ft;++Bt)xt[Bt]=h[Bt];X.clippingState=xt,this.numIntersection=nt?this.numPlanes:0,this.numPlanes+=gt}};function N(){R.value!==h&&(R.value=h,R.needsUpdate=g>0),s.numPlanes=g,s.numIntersection=0}function B(P,U,W,q){let nt=P!==null?P.length:0,Q=null;if(nt!==0){if(Q=R.value,q!==!0||Q===null){let X=W+nt*4,gt=U.matrixWorldInverse;y.getNormalMatrix(gt),(Q===null||Q.length0){let N=new Syt(R.height/2);return N.fromEquirectangularTexture(d,S),s.set(S,N),S.addEventListener("dispose",m),h(N.texture,S.mapping)}else return null}}return S}function m(S){let y=S.target;y.removeEventListener("dispose",m);let R=s.get(y);R!==void 0&&(s.delete(y),R.dispose())}function _(){s=new WeakMap}return{get:g,dispose:_}}var vet=class extends bet{constructor(s=-1,h=1,g=1,m=-1,_=.1,S=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=s,this.right=h,this.top=g,this.bottom=m,this.near=_,this.far=S,this.updateProjectionMatrix()}copy(s,h){return super.copy(s,h),this.left=s.left,this.right=s.right,this.top=s.top,this.bottom=s.bottom,this.near=s.near,this.far=s.far,this.zoom=s.zoom,this.view=s.view===null?null:Object.assign({},s.view),this}setViewOffset(s,h,g,m,_,S){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=s,this.view.fullHeight=h,this.view.offsetX=g,this.view.offsetY=m,this.view.width=_,this.view.height=S,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let s=(this.right-this.left)/(2*this.zoom),h=(this.top-this.bottom)/(2*this.zoom),g=(this.right+this.left)/2,m=(this.top+this.bottom)/2,_=g-s,S=g+s,y=m+h,R=m-h;if(this.view!==null&&this.view.enabled){let N=(this.right-this.left)/this.view.fullWidth/this.zoom,B=(this.top-this.bottom)/this.view.fullHeight/this.zoom;_+=N*this.view.offsetX,S=_+N*this.view.width,y-=B*this.view.offsetY,R=y-B*this.view.height}this.projectionMatrix.makeOrthographic(_,S,y,R,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(s){let h=super.toJSON(s);return h.object.zoom=this.zoom,h.object.left=this.left,h.object.right=this.right,h.object.top=this.top,h.object.bottom=this.bottom,h.object.near=this.near,h.object.far=this.far,this.view!==null&&(h.object.view=Object.assign({},this.view)),h}},XI=4,fYt=[.125,.215,.35,.446,.526,.582],GA=20,syt=new vet,dYt=new Go,oyt=null,cyt=0,ayt=0,jA=(1+Math.sqrt(5))/2,VI=1/jA,pYt=[new Ge(1,1,1),new Ge(-1,1,1),new Ge(1,1,-1),new Ge(-1,1,-1),new Ge(0,jA,VI),new Ge(0,jA,-VI),new Ge(VI,0,jA),new Ge(-VI,0,jA),new Ge(jA,VI,0),new Ge(-jA,VI,0)],_et=class{constructor(s){this._renderer=s,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(s,h=0,g=.1,m=100){oyt=this._renderer.getRenderTarget(),cyt=this._renderer.getActiveCubeFace(),ayt=this._renderer.getActiveMipmapLevel(),this._setSize(256);let _=this._allocateTargets();return _.depthBuffer=!0,this._sceneToCubeUV(s,g,m,_),h>0&&this._blur(_,0,0,h),this._applyPMREM(_),this._cleanup(_),_}fromEquirectangular(s,h=null){return this._fromTexture(s,h)}fromCubemap(s,h=null){return this._fromTexture(s,h)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=bYt(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=mYt(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(s){this._lodMax=Math.floor(Math.log2(s)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let s=0;s2?ft:0,ft,ft),B.setRenderTarget(m),nt&&B.render(q,y),B.render(s,y)}q.geometry.dispose(),q.material.dispose(),B.toneMapping=U,B.autoClear=P,s.background=Q}_textureToCubeUV(s,h){let g=this._renderer,m=s.mapping===QI||s.mapping===tR;m?(this._cubemapMaterial===null&&(this._cubemapMaterial=bYt()),this._cubemapMaterial.uniforms.flipEnvMap.value=s.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=mYt());let _=m?this._cubemapMaterial:this._equirectMaterial,S=new gg(this._lodPlanes[0],_),y=_.uniforms;y.envMap.value=s;let R=this._cubeSize;Xtt(h,0,0,3*R,2*R),g.setRenderTarget(h),g.render(S,syt)}_applyPMREM(s){let h=this._renderer,g=h.autoClear;h.autoClear=!1;for(let m=1;mGA&&console.warn(`sigmaRadians, ${_}, is too large and will clip, as it requested ${Q} samples when the maximum is set to ${GA}`);let X=[],gt=0;for(let Pt=0;Ptft-XI?m-ft+XI:0),Ot=4*(this._cubeSize-xt);Xtt(h,Bt,Ot,3*xt,2*xt),R.setRenderTarget(h),R.render(P,syt)}};function SCe(d){let s=[],h=[],g=[],m=d,_=d-XI+1+fYt.length;for(let S=0;S<_;S++){let y=Math.pow(2,m);h.push(y);let R=1/y;S>d-XI?R=fYt[S-d+XI-1]:S===0&&(R=0),g.push(R);let N=1/(y-2),B=-N,P=1+N,U=[B,B,P,B,P,P,B,B,P,P,B,P],W=6,q=6,nt=3,Q=2,X=1,gt=new Float32Array(nt*q*W),ft=new Float32Array(Q*q*W),xt=new Float32Array(X*q*W);for(let Ot=0;Ot2?0:-1,ot=[Pt,se,0,Pt+2/3,se,0,Pt+2/3,se+1,0,Pt,se,0,Pt+2/3,se+1,0,Pt,se+1,0];gt.set(ot,nt*q*Ot),ft.set(U,Q*q*Ot);let Lt=[Ot,Ot,Ot,Ot,Ot,Ot];xt.set(Lt,X*q*Ot)}let Bt=new My;Bt.setAttribute("position",new D0(gt,nt)),Bt.setAttribute("uv",new D0(ft,Q)),Bt.setAttribute("faceIndex",new D0(xt,X)),s.push(Bt),m>XI&&m--}return{lodPlanes:s,sizeLods:h,sigmas:g}}function gYt(d,s,h){let g=new Qx(d,s,h);return g.texture.mapping=Ret,g.texture.name="PMREM.cubeUv",g.scissorTest=!0,g}function Xtt(d,s,h,g,m){d.viewport.set(s,h,g,m),d.scissor.set(s,h,g,m)}function TCe(d,s,h){let g=new Float32Array(GA),m=new Ge(0,1,0);return new e3({name:"SphericalGaussianBlur",defines:{n:GA,CUBEUV_TEXEL_WIDTH:1/s,CUBEUV_TEXEL_HEIGHT:1/h,CUBEUV_MAX_MIP:`${d}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:g},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:m}},vertexShader:n2t(),fragmentShader:` +}`,No={alphahash_fragment:rSe,alphahash_pars_fragment:sSe,alphamap_fragment:oSe,alphamap_pars_fragment:cSe,alphatest_fragment:aSe,alphatest_pars_fragment:uSe,aomap_fragment:lSe,aomap_pars_fragment:hSe,batching_pars_vertex:fSe,batching_vertex:dSe,begin_vertex:pSe,beginnormal_vertex:gSe,bsdfs:mSe,iridescence_fragment:bSe,bumpmap_pars_fragment:wSe,clipping_planes_fragment:vSe,clipping_planes_pars_fragment:_Se,clipping_planes_pars_vertex:ySe,clipping_planes_vertex:xSe,color_fragment:MSe,color_pars_fragment:ESe,color_pars_vertex:SSe,color_vertex:TSe,common:CSe,cube_uv_reflection_fragment:ASe,defaultnormal_vertex:kSe,displacementmap_pars_vertex:LSe,displacementmap_vertex:PSe,emissivemap_fragment:ISe,emissivemap_pars_fragment:RSe,colorspace_fragment:DSe,colorspace_pars_fragment:NSe,envmap_fragment:OSe,envmap_common_pars_fragment:BSe,envmap_pars_fragment:FSe,envmap_pars_vertex:USe,envmap_physical_pars_fragment:KSe,envmap_vertex:zSe,fog_vertex:jSe,fog_pars_vertex:HSe,fog_fragment:GSe,fog_pars_fragment:WSe,gradientmap_pars_fragment:$Se,lightmap_fragment:VSe,lightmap_pars_fragment:qSe,lights_lambert_fragment:XSe,lights_lambert_pars_fragment:ZSe,lights_pars_begin:YSe,lights_toon_fragment:JSe,lights_toon_pars_fragment:QSe,lights_phong_fragment:tTe,lights_phong_pars_fragment:eTe,lights_physical_fragment:nTe,lights_physical_pars_fragment:iTe,lights_fragment_begin:rTe,lights_fragment_maps:sTe,lights_fragment_end:oTe,logdepthbuf_fragment:cTe,logdepthbuf_pars_fragment:aTe,logdepthbuf_pars_vertex:uTe,logdepthbuf_vertex:lTe,map_fragment:hTe,map_pars_fragment:fTe,map_particle_fragment:dTe,map_particle_pars_fragment:pTe,metalnessmap_fragment:gTe,metalnessmap_pars_fragment:mTe,morphcolor_vertex:bTe,morphnormal_vertex:wTe,morphtarget_pars_vertex:vTe,morphtarget_vertex:_Te,normal_fragment_begin:yTe,normal_fragment_maps:xTe,normal_pars_fragment:MTe,normal_pars_vertex:ETe,normal_vertex:STe,normalmap_pars_fragment:TTe,clearcoat_normal_fragment_begin:CTe,clearcoat_normal_fragment_maps:ATe,clearcoat_pars_fragment:kTe,iridescence_pars_fragment:LTe,opaque_fragment:PTe,packing:ITe,premultiplied_alpha_fragment:RTe,project_vertex:DTe,dithering_fragment:NTe,dithering_pars_fragment:OTe,roughnessmap_fragment:BTe,roughnessmap_pars_fragment:FTe,shadowmap_pars_fragment:UTe,shadowmap_pars_vertex:zTe,shadowmap_vertex:jTe,shadowmask_pars_fragment:HTe,skinbase_vertex:GTe,skinning_pars_vertex:WTe,skinning_vertex:$Te,skinnormal_vertex:VTe,specularmap_fragment:qTe,specularmap_pars_fragment:XTe,tonemapping_fragment:ZTe,tonemapping_pars_fragment:YTe,transmission_fragment:KTe,transmission_pars_fragment:JTe,uv_pars_fragment:QTe,uv_pars_vertex:tCe,uv_vertex:eCe,worldpos_vertex:nCe,background_vert:iCe,background_frag:rCe,backgroundCube_vert:sCe,backgroundCube_frag:oCe,cube_vert:cCe,cube_frag:aCe,depth_vert:uCe,depth_frag:lCe,distanceRGBA_vert:hCe,distanceRGBA_frag:fCe,equirect_vert:dCe,equirect_frag:pCe,linedashed_vert:gCe,linedashed_frag:mCe,meshbasic_vert:bCe,meshbasic_frag:wCe,meshlambert_vert:vCe,meshlambert_frag:_Ce,meshmatcap_vert:yCe,meshmatcap_frag:xCe,meshnormal_vert:MCe,meshnormal_frag:ECe,meshphong_vert:SCe,meshphong_frag:TCe,meshphysical_vert:CCe,meshphysical_frag:ACe,meshtoon_vert:kCe,meshtoon_frag:LCe,points_vert:PCe,points_frag:ICe,shadow_vert:RCe,shadow_frag:DCe,sprite_vert:NCe,sprite_frag:OCe},Zi={common:{diffuse:{value:new Go(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Ko},alphaMap:{value:null},alphaMapTransform:{value:new Ko},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Ko}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Ko}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Ko}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Ko},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Ko},normalScale:{value:new Nc(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Ko},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Ko}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Ko}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Ko}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Go(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Go(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Ko},alphaTest:{value:0},uvTransform:{value:new Ko}},sprite:{diffuse:{value:new Go(16777215)},opacity:{value:1},center:{value:new Nc(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Ko},alphaMap:{value:null},alphaMapTransform:{value:new Ko},alphaTest:{value:0}}},xy={basic:{uniforms:i1([Zi.common,Zi.specularmap,Zi.envmap,Zi.aomap,Zi.lightmap,Zi.fog]),vertexShader:No.meshbasic_vert,fragmentShader:No.meshbasic_frag},lambert:{uniforms:i1([Zi.common,Zi.specularmap,Zi.envmap,Zi.aomap,Zi.lightmap,Zi.emissivemap,Zi.bumpmap,Zi.normalmap,Zi.displacementmap,Zi.fog,Zi.lights,{emissive:{value:new Go(0)}}]),vertexShader:No.meshlambert_vert,fragmentShader:No.meshlambert_frag},phong:{uniforms:i1([Zi.common,Zi.specularmap,Zi.envmap,Zi.aomap,Zi.lightmap,Zi.emissivemap,Zi.bumpmap,Zi.normalmap,Zi.displacementmap,Zi.fog,Zi.lights,{emissive:{value:new Go(0)},specular:{value:new Go(1118481)},shininess:{value:30}}]),vertexShader:No.meshphong_vert,fragmentShader:No.meshphong_frag},standard:{uniforms:i1([Zi.common,Zi.envmap,Zi.aomap,Zi.lightmap,Zi.emissivemap,Zi.bumpmap,Zi.normalmap,Zi.displacementmap,Zi.roughnessmap,Zi.metalnessmap,Zi.fog,Zi.lights,{emissive:{value:new Go(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:No.meshphysical_vert,fragmentShader:No.meshphysical_frag},toon:{uniforms:i1([Zi.common,Zi.aomap,Zi.lightmap,Zi.emissivemap,Zi.bumpmap,Zi.normalmap,Zi.displacementmap,Zi.gradientmap,Zi.fog,Zi.lights,{emissive:{value:new Go(0)}}]),vertexShader:No.meshtoon_vert,fragmentShader:No.meshtoon_frag},matcap:{uniforms:i1([Zi.common,Zi.bumpmap,Zi.normalmap,Zi.displacementmap,Zi.fog,{matcap:{value:null}}]),vertexShader:No.meshmatcap_vert,fragmentShader:No.meshmatcap_frag},points:{uniforms:i1([Zi.points,Zi.fog]),vertexShader:No.points_vert,fragmentShader:No.points_frag},dashed:{uniforms:i1([Zi.common,Zi.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:No.linedashed_vert,fragmentShader:No.linedashed_frag},depth:{uniforms:i1([Zi.common,Zi.displacementmap]),vertexShader:No.depth_vert,fragmentShader:No.depth_frag},normal:{uniforms:i1([Zi.common,Zi.bumpmap,Zi.normalmap,Zi.displacementmap,{opacity:{value:1}}]),vertexShader:No.meshnormal_vert,fragmentShader:No.meshnormal_frag},sprite:{uniforms:i1([Zi.sprite,Zi.fog]),vertexShader:No.sprite_vert,fragmentShader:No.sprite_frag},background:{uniforms:{uvTransform:{value:new Ko},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:No.background_vert,fragmentShader:No.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:No.backgroundCube_vert,fragmentShader:No.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:No.cube_vert,fragmentShader:No.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:No.equirect_vert,fragmentShader:No.equirect_frag},distanceRGBA:{uniforms:i1([Zi.common,Zi.displacementmap,{referencePosition:{value:new Ge},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:No.distanceRGBA_vert,fragmentShader:No.distanceRGBA_frag},shadow:{uniforms:i1([Zi.lights,Zi.fog,{color:{value:new Go(0)},opacity:{value:1}}]),vertexShader:No.shadow_vert,fragmentShader:No.shadow_frag}};xy.physical={uniforms:i1([xy.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Ko},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Ko},clearcoatNormalScale:{value:new Nc(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Ko},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Ko},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Ko},sheen:{value:0},sheenColor:{value:new Go(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Ko},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Ko},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Ko},transmissionSamplerSize:{value:new Nc},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Ko},attenuationDistance:{value:0},attenuationColor:{value:new Go(0)},specularColor:{value:new Go(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Ko},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Ko},anisotropyVector:{value:new Nc},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Ko}}]),vertexShader:No.meshphysical_vert,fragmentShader:No.meshphysical_frag};var Ktt={r:0,b:0,g:0};function BCe(d,s,h,p,m,_,E){let y=new Go(0),I=_===!0?0:1,N,B,P=null,U=0,j=null;function V(Q,X){let gt=!1,ft=X.isScene===!0?X.background:null;ft&&ft.isTexture&&(ft=(X.backgroundBlurriness>0?h:s).get(ft)),ft===null?tt(y,I):ft&&ft.isColor&&(tt(ft,1),gt=!0);let xt=d.xr.getEnvironmentBlendMode();xt==="additive"?p.buffers.color.setClear(0,0,0,1,E):xt==="alpha-blend"&&p.buffers.color.setClear(0,0,0,0,E),(d.autoClear||gt)&&d.clear(d.autoClearColor,d.autoClearDepth,d.autoClearStencil),ft&&(ft.isCubeTexture||ft.mapping===Bet)?(B===void 0&&(B=new gg(new KA(1,1,1),new i3({name:"BackgroundCubeMaterial",uniforms:oR(xy.backgroundCube.uniforms),vertexShader:xy.backgroundCube.vertexShader,fragmentShader:xy.backgroundCube.fragmentShader,side:mg,depthTest:!1,depthWrite:!1,fog:!1})),B.geometry.deleteAttribute("normal"),B.geometry.deleteAttribute("uv"),B.onBeforeRender=function(Bt,Ot,Pt){this.matrixWorld.copyPosition(Pt.matrixWorld)},Object.defineProperty(B.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),m.update(B)),B.material.uniforms.envMap.value=ft,B.material.uniforms.flipEnvMap.value=ft.isCubeTexture&&ft.isRenderTargetTexture===!1?-1:1,B.material.uniforms.backgroundBlurriness.value=X.backgroundBlurriness,B.material.uniforms.backgroundIntensity.value=X.backgroundIntensity,B.material.toneMapped=Na.getTransfer(ft.colorSpace)!==vu,(P!==ft||U!==ft.version||j!==d.toneMapping)&&(B.material.needsUpdate=!0,P=ft,U=ft.version,j=d.toneMapping),B.layers.enableAll(),Q.unshift(B,B.geometry,B.material,0,0,null)):ft&&ft.isTexture&&(N===void 0&&(N=new gg(new Fyt(2,2),new i3({name:"BackgroundMaterial",uniforms:oR(xy.background.uniforms),vertexShader:xy.background.vertexShader,fragmentShader:xy.background.fragmentShader,side:hS,depthTest:!1,depthWrite:!1,fog:!1})),N.geometry.deleteAttribute("normal"),Object.defineProperty(N.material,"map",{get:function(){return this.uniforms.t2D.value}}),m.update(N)),N.material.uniforms.t2D.value=ft,N.material.uniforms.backgroundIntensity.value=X.backgroundIntensity,N.material.toneMapped=Na.getTransfer(ft.colorSpace)!==vu,ft.matrixAutoUpdate===!0&&ft.updateMatrix(),N.material.uniforms.uvTransform.value.copy(ft.matrix),(P!==ft||U!==ft.version||j!==d.toneMapping)&&(N.material.needsUpdate=!0,P=ft,U=ft.version,j=d.toneMapping),N.layers.enableAll(),Q.unshift(N,N.geometry,N.material,0,0,null))}function tt(Q,X){Q.getRGB(Ktt,dKt(d)),p.buffers.color.setClear(Ktt.r,Ktt.g,Ktt.b,X,E)}return{getClearColor:function(){return y},setClearColor:function(Q,X=1){y.set(Q),I=X,tt(y,I)},getClearAlpha:function(){return I},setClearAlpha:function(Q){I=Q,tt(y,I)},render:V}}function FCe(d,s,h,p){let m=d.getParameter(d.MAX_VERTEX_ATTRIBS),_=p.isWebGL2?null:s.get("OES_vertex_array_object"),E=p.isWebGL2||_!==null,y={},I=Q(null),N=I,B=!1;function P(ne,xe,re,hn,Se){let ke=!1;if(E){let mn=tt(hn,re,xe);N!==mn&&(N=mn,j(N.object)),ke=X(ne,hn,re,Se),ke&>(ne,hn,re,Se)}else{let mn=xe.wireframe===!0;(N.geometry!==hn.id||N.program!==re.id||N.wireframe!==mn)&&(N.geometry=hn.id,N.program=re.id,N.wireframe=mn,ke=!0)}Se!==null&&h.update(Se,d.ELEMENT_ARRAY_BUFFER),(ke||B)&&(B=!1,se(ne,xe,re,hn),Se!==null&&d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,h.get(Se).buffer))}function U(){return p.isWebGL2?d.createVertexArray():_.createVertexArrayOES()}function j(ne){return p.isWebGL2?d.bindVertexArray(ne):_.bindVertexArrayOES(ne)}function V(ne){return p.isWebGL2?d.deleteVertexArray(ne):_.deleteVertexArrayOES(ne)}function tt(ne,xe,re){let hn=re.wireframe===!0,Se=y[ne.id];Se===void 0&&(Se={},y[ne.id]=Se);let ke=Se[xe.id];ke===void 0&&(ke={},Se[xe.id]=ke);let mn=ke[hn];return mn===void 0&&(mn=Q(U()),ke[hn]=mn),mn}function Q(ne){let xe=[],re=[],hn=[];for(let Se=0;Se=0){let Pe=Se[Qn],ti=ke[Qn];if(ti===void 0&&(Qn==="instanceMatrix"&&ne.instanceMatrix&&(ti=ne.instanceMatrix),Qn==="instanceColor"&&ne.instanceColor&&(ti=ne.instanceColor)),Pe===void 0||Pe.attribute!==ti||ti&&Pe.data!==ti.data)return!0;mn++}return N.attributesNum!==mn||N.index!==hn}function gt(ne,xe,re,hn){let Se={},ke=xe.attributes,mn=0,en=re.getAttributes();for(let Qn in en)if(en[Qn].location>=0){let Pe=ke[Qn];Pe===void 0&&(Qn==="instanceMatrix"&&ne.instanceMatrix&&(Pe=ne.instanceMatrix),Qn==="instanceColor"&&ne.instanceColor&&(Pe=ne.instanceColor));let ti={};ti.attribute=Pe,Pe&&Pe.data&&(ti.data=Pe.data),Se[Qn]=ti,mn++}N.attributes=Se,N.attributesNum=mn,N.index=hn}function ft(){let ne=N.newAttributes;for(let xe=0,re=ne.length;xe=0){let ge=Se[en];if(ge===void 0&&(en==="instanceMatrix"&&ne.instanceMatrix&&(ge=ne.instanceMatrix),en==="instanceColor"&&ne.instanceColor&&(ge=ne.instanceColor)),ge!==void 0){let Pe=ge.normalized,ti=ge.itemSize,Yi=h.get(ge);if(Yi===void 0)continue;let ki=Yi.buffer,lr=Yi.type,pr=Yi.bytesPerElement,Kt=p.isWebGL2===!0&&(lr===d.INT||lr===d.UNSIGNED_INT||ge.gpuType===eKt);if(ge.isInterleavedBufferAttribute){let wn=ge.data,it=wn.stride,ut=ge.offset;if(wn.isInstancedInterleavedBuffer){for(let kt=0;kt0&&d.getShaderPrecisionFormat(d.FRAGMENT_SHADER,d.HIGH_FLOAT).precision>0)return"highp";Pt="mediump"}return Pt==="mediump"&&d.getShaderPrecisionFormat(d.VERTEX_SHADER,d.MEDIUM_FLOAT).precision>0&&d.getShaderPrecisionFormat(d.FRAGMENT_SHADER,d.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let E=typeof WebGL2RenderingContext<"u"&&d.constructor.name==="WebGL2RenderingContext",y=h.precision!==void 0?h.precision:"highp",I=_(y);I!==y&&(console.warn("THREE.WebGLRenderer:",y,"not supported, using",I,"instead."),y=I);let N=E||s.has("WEBGL_draw_buffers"),B=h.logarithmicDepthBuffer===!0,P=d.getParameter(d.MAX_TEXTURE_IMAGE_UNITS),U=d.getParameter(d.MAX_VERTEX_TEXTURE_IMAGE_UNITS),j=d.getParameter(d.MAX_TEXTURE_SIZE),V=d.getParameter(d.MAX_CUBE_MAP_TEXTURE_SIZE),tt=d.getParameter(d.MAX_VERTEX_ATTRIBS),Q=d.getParameter(d.MAX_VERTEX_UNIFORM_VECTORS),X=d.getParameter(d.MAX_VARYING_VECTORS),gt=d.getParameter(d.MAX_FRAGMENT_UNIFORM_VECTORS),ft=U>0,xt=E||s.has("OES_texture_float"),Bt=ft&&xt,Ot=E?d.getParameter(d.MAX_SAMPLES):0;return{isWebGL2:E,drawBuffers:N,getMaxAnisotropy:m,getMaxPrecision:_,precision:y,logarithmicDepthBuffer:B,maxTextures:P,maxVertexTextures:U,maxTextureSize:j,maxCubemapSize:V,maxAttributes:tt,maxVertexUniforms:Q,maxVaryings:X,maxFragmentUniforms:gt,vertexTextures:ft,floatFragmentTextures:xt,floatVertexTextures:Bt,maxSamples:Ot}}function jCe(d){let s=this,h=null,p=0,m=!1,_=!1,E=new Jx,y=new Ko,I={value:null,needsUpdate:!1};this.uniform=I,this.numPlanes=0,this.numIntersection=0,this.init=function(P,U){let j=P.length!==0||U||p!==0||m;return m=U,p=P.length,j},this.beginShadows=function(){_=!0,B(null)},this.endShadows=function(){_=!1},this.setGlobalState=function(P,U){h=B(P,U,0)},this.setState=function(P,U,j){let V=P.clippingPlanes,tt=P.clipIntersection,Q=P.clipShadows,X=d.get(P);if(!m||V===null||V.length===0||_&&!Q)_?B(null):N();else{let gt=_?0:p,ft=gt*4,xt=X.clippingState||null;I.value=xt,xt=B(V,U,ft,j);for(let Bt=0;Bt!==ft;++Bt)xt[Bt]=h[Bt];X.clippingState=xt,this.numIntersection=tt?this.numPlanes:0,this.numPlanes+=gt}};function N(){I.value!==h&&(I.value=h,I.needsUpdate=p>0),s.numPlanes=p,s.numIntersection=0}function B(P,U,j,V){let tt=P!==null?P.length:0,Q=null;if(tt!==0){if(Q=I.value,V!==!0||Q===null){let X=j+tt*4,gt=U.matrixWorldInverse;y.getNormalMatrix(gt),(Q===null||Q.length0){let N=new Byt(I.height/2);return N.fromEquirectangularTexture(d,E),s.set(E,N),E.addEventListener("dispose",m),h(N.texture,E.mapping)}else return null}}return E}function m(E){let y=E.target;y.removeEventListener("dispose",m);let I=s.get(y);I!==void 0&&(s.delete(y),I.dispose())}function _(){s=new WeakMap}return{get:p,dispose:_}}var Met=class extends yet{constructor(s=-1,h=1,p=1,m=-1,_=.1,E=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=s,this.right=h,this.top=p,this.bottom=m,this.near=_,this.far=E,this.updateProjectionMatrix()}copy(s,h){return super.copy(s,h),this.left=s.left,this.right=s.right,this.top=s.top,this.bottom=s.bottom,this.near=s.near,this.far=s.far,this.zoom=s.zoom,this.view=s.view===null?null:Object.assign({},s.view),this}setViewOffset(s,h,p,m,_,E){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=s,this.view.fullHeight=h,this.view.offsetX=p,this.view.offsetY=m,this.view.width=_,this.view.height=E,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let s=(this.right-this.left)/(2*this.zoom),h=(this.top-this.bottom)/(2*this.zoom),p=(this.right+this.left)/2,m=(this.top+this.bottom)/2,_=p-s,E=p+s,y=m+h,I=m-h;if(this.view!==null&&this.view.enabled){let N=(this.right-this.left)/this.view.fullWidth/this.zoom,B=(this.top-this.bottom)/this.view.fullHeight/this.zoom;_+=N*this.view.offsetX,E=_+N*this.view.width,y-=B*this.view.offsetY,I=y-B*this.view.height}this.projectionMatrix.makeOrthographic(_,E,y,I,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(s){let h=super.toJSON(s);return h.object.zoom=this.zoom,h.object.left=this.left,h.object.right=this.right,h.object.top=this.top,h.object.bottom=this.bottom,h.object.near=this.near,h.object.far=this.far,this.view!==null&&(h.object.view=Object.assign({},this.view)),h}},KI=4,xYt=[.125,.215,.35,.446,.526,.582],VA=20,byt=new Met,MYt=new Go,wyt=null,vyt=0,_yt=0,WA=(1+Math.sqrt(5))/2,ZI=1/WA,EYt=[new Ge(1,1,1),new Ge(-1,1,1),new Ge(1,1,-1),new Ge(-1,1,-1),new Ge(0,WA,ZI),new Ge(0,WA,-ZI),new Ge(ZI,0,WA),new Ge(-ZI,0,WA),new Ge(WA,ZI,0),new Ge(-WA,ZI,0)],Eet=class{constructor(s){this._renderer=s,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(s,h=0,p=.1,m=100){wyt=this._renderer.getRenderTarget(),vyt=this._renderer.getActiveCubeFace(),_yt=this._renderer.getActiveMipmapLevel(),this._setSize(256);let _=this._allocateTargets();return _.depthBuffer=!0,this._sceneToCubeUV(s,p,m,_),h>0&&this._blur(_,0,0,h),this._applyPMREM(_),this._cleanup(_),_}fromEquirectangular(s,h=null){return this._fromTexture(s,h)}fromCubemap(s,h=null){return this._fromTexture(s,h)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=CYt(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=TYt(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(s){this._lodMax=Math.floor(Math.log2(s)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let s=0;s2?ft:0,ft,ft),B.setRenderTarget(m),tt&&B.render(V,y),B.render(s,y)}V.geometry.dispose(),V.material.dispose(),B.toneMapping=U,B.autoClear=P,s.background=Q}_textureToCubeUV(s,h){let p=this._renderer,m=s.mapping===nR||s.mapping===iR;m?(this._cubemapMaterial===null&&(this._cubemapMaterial=CYt()),this._cubemapMaterial.uniforms.flipEnvMap.value=s.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=TYt());let _=m?this._cubemapMaterial:this._equirectMaterial,E=new gg(this._lodPlanes[0],_),y=_.uniforms;y.envMap.value=s;let I=this._cubeSize;Jtt(h,0,0,3*I,2*I),p.setRenderTarget(h),p.render(E,byt)}_applyPMREM(s){let h=this._renderer,p=h.autoClear;h.autoClear=!1;for(let m=1;mVA&&console.warn(`sigmaRadians, ${_}, is too large and will clip, as it requested ${Q} samples when the maximum is set to ${VA}`);let X=[],gt=0;for(let Pt=0;Ptft-KI?m-ft+KI:0),Ot=4*(this._cubeSize-xt);Jtt(h,Bt,Ot,3*xt,2*xt),I.setRenderTarget(h),I.render(P,byt)}};function GCe(d){let s=[],h=[],p=[],m=d,_=d-KI+1+xYt.length;for(let E=0;E<_;E++){let y=Math.pow(2,m);h.push(y);let I=1/y;E>d-KI?I=xYt[E-d+KI-1]:E===0&&(I=0),p.push(I);let N=1/(y-2),B=-N,P=1+N,U=[B,B,P,B,P,P,B,B,P,P,B,P],j=6,V=6,tt=3,Q=2,X=1,gt=new Float32Array(tt*V*j),ft=new Float32Array(Q*V*j),xt=new Float32Array(X*V*j);for(let Ot=0;Ot2?0:-1,ot=[Pt,se,0,Pt+2/3,se,0,Pt+2/3,se+1,0,Pt,se,0,Pt+2/3,se+1,0,Pt,se+1,0];gt.set(ot,tt*V*Ot),ft.set(U,Q*V*Ot);let Lt=[Ot,Ot,Ot,Ot,Ot,Ot];xt.set(Lt,X*V*Ot)}let Bt=new Ey;Bt.setAttribute("position",new D0(gt,tt)),Bt.setAttribute("uv",new D0(ft,Q)),Bt.setAttribute("faceIndex",new D0(xt,X)),s.push(Bt),m>KI&&m--}return{lodPlanes:s,sizeLods:h,sigmas:p}}function SYt(d,s,h){let p=new e3(d,s,h);return p.texture.mapping=Bet,p.texture.name="PMREM.cubeUv",p.scissorTest=!0,p}function Jtt(d,s,h,p,m){d.viewport.set(s,h,p,m),d.scissor.set(s,h,p,m)}function WCe(d,s,h){let p=new Float32Array(VA),m=new Ge(0,1,0);return new i3({name:"SphericalGaussianBlur",defines:{n:VA,CUBEUV_TEXEL_WIDTH:1/s,CUBEUV_TEXEL_HEIGHT:1/h,CUBEUV_MAX_MIP:`${d}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:p},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:m}},vertexShader:p2t(),fragmentShader:` precision mediump float; precision mediump int; @@ -3593,7 +3593,7 @@ void main() { } } - `,blending:sS,depthTest:!1,depthWrite:!1})}function mYt(){return new e3({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:n2t(),fragmentShader:` + `,blending:aS,depthTest:!1,depthWrite:!1})}function TYt(){return new i3({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:p2t(),fragmentShader:` precision mediump float; precision mediump int; @@ -3612,7 +3612,7 @@ void main() { gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); } - `,blending:sS,depthTest:!1,depthWrite:!1})}function bYt(){return new e3({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:n2t(),fragmentShader:` + `,blending:aS,depthTest:!1,depthWrite:!1})}function CYt(){return new i3({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:p2t(),fragmentShader:` precision mediump float; precision mediump int; @@ -3628,7 +3628,7 @@ void main() { gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); } - `,blending:sS,depthTest:!1,depthWrite:!1})}function n2t(){return` + `,blending:aS,depthTest:!1,depthWrite:!1})}function p2t(){return` precision mediump float; precision mediump int; @@ -3683,40 +3683,40 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function CCe(d){let s=new WeakMap,h=null;function g(y){if(y&&y.isTexture){let R=y.mapping,N=R===gyt||R===myt,B=R===QI||R===tR;if(N||B)if(y.isRenderTargetTexture&&y.needsPMREMUpdate===!0){y.needsPMREMUpdate=!1;let P=s.get(y);return h===null&&(h=new _et(d)),P=N?h.fromEquirectangular(y,P):h.fromCubemap(y,P),s.set(y,P),P.texture}else{if(s.has(y))return s.get(y).texture;{let P=y.image;if(N&&P&&P.height>0||B&&P&&m(P)){h===null&&(h=new _et(d));let U=N?h.fromEquirectangular(y):h.fromCubemap(y);return s.set(y,U),y.addEventListener("dispose",_),U.texture}else return null}}}return y}function m(y){let R=0,N=6;for(let B=0;Bs.maxTextureSize&&(Lt=Math.ceil(ot/s.maxTextureSize),ot=s.maxTextureSize);let be=new Float32Array(ot*Lt*4*q),ln=new det(be,ot,Lt,q);ln.type=iS,ln.needsUpdate=!0;let Fn=se*4;for(let xe=0;xe0)return d;let m=s*h,_=wYt[m];if(_===void 0&&(_=new Float32Array(m),wYt[m]=_),s!==0){g.toArray(_,0);for(let S=1,y=0;S!==s;++S)y+=h,d[S].toArray(_,y)}return _}function lf(d,s){if(d.length!==s.length)return!1;for(let h=0,g=d.length;h":" "} ${y}: ${h[S]}`)}return g.join(` -`)}function T4e(d){let s=Na.getPrimaries(Na.workingColorSpace),h=Na.getPrimaries(d),g;switch(s===h?g="":s===cet&&h===oet?g="LinearDisplayP3ToLinearSRGB":s===oet&&h===cet&&(g="LinearSRGBToLinearDisplayP3"),d){case Jx:case Det:return[g,"LinearTransferOETF"];case Pd:case e2t:return[g,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",d),[g,"LinearTransferOETF"]}}function SYt(d,s,h){let g=d.getShaderParameter(s,d.COMPILE_STATUS),m=d.getShaderInfoLog(s).trim();if(g&&m==="")return"";let _=/ERROR: 0:(\d+)/.exec(m);if(_){let S=parseInt(_[1]);return h.toUpperCase()+` + `}function $Ce(d){let s=new WeakMap,h=null;function p(y){if(y&&y.isTexture){let I=y.mapping,N=I===Cyt||I===Ayt,B=I===nR||I===iR;if(N||B)if(y.isRenderTargetTexture&&y.needsPMREMUpdate===!0){y.needsPMREMUpdate=!1;let P=s.get(y);return h===null&&(h=new Eet(d)),P=N?h.fromEquirectangular(y,P):h.fromCubemap(y,P),s.set(y,P),P.texture}else{if(s.has(y))return s.get(y).texture;{let P=y.image;if(N&&P&&P.height>0||B&&P&&m(P)){h===null&&(h=new Eet(d));let U=N?h.fromEquirectangular(y):h.fromCubemap(y);return s.set(y,U),y.addEventListener("dispose",_),U.texture}else return null}}}return y}function m(y){let I=0,N=6;for(let B=0;Bs.maxTextureSize&&(Lt=Math.ceil(ot/s.maxTextureSize),ot=s.maxTextureSize);let be=new Float32Array(ot*Lt*4*V),ln=new bet(be,ot,Lt,V);ln.type=oS,ln.needsUpdate=!0;let Fn=se*4;for(let xe=0;xe0)return d;let m=s*h,_=AYt[m];if(_===void 0&&(_=new Float32Array(m),AYt[m]=_),s!==0){p.toArray(_,0);for(let E=1,y=0;E!==s;++E)y+=h,d[E].toArray(_,y)}return _}function lf(d,s){if(d.length!==s.length)return!1;for(let h=0,p=d.length;h":" "} ${y}: ${h[E]}`)}return p.join(` +`)}function W4e(d){let s=Na.getPrimaries(Na.workingColorSpace),h=Na.getPrimaries(d),p;switch(s===h?p="":s===fet&&h===het?p="LinearDisplayP3ToLinearSRGB":s===het&&h===fet&&(p="LinearSRGBToLinearDisplayP3"),d){case t3:case Fet:return[p,"LinearTransferOETF"];case Pd:case d2t:return[p,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",d),[p,"LinearTransferOETF"]}}function NYt(d,s,h){let p=d.getShaderParameter(s,d.COMPILE_STATUS),m=d.getShaderInfoLog(s).trim();if(p&&m==="")return"";let _=/ERROR: 0:(\d+)/.exec(m);if(_){let E=parseInt(_[1]);return h.toUpperCase()+` `+m+` -`+S4e(d.getShaderSource(s),S)}else return m}function C4e(d,s){let h=T4e(s);return`vec4 ${d}( vec4 value ) { return ${h[0]}( ${h[1]}( value ) ); }`}function A4e(d,s){let h;switch(s){case VMe:h="Linear";break;case qMe:h="Reinhard";break;case XMe:h="OptimizedCineon";break;case ZMe:h="ACESFilmic";break;case KMe:h="AgX";break;case YMe:h="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",s),h="Linear"}return"vec3 "+d+"( vec3 color ) { return "+h+"ToneMapping( color ); }"}function k4e(d){return[d.extensionDerivatives||d.envMapCubeUVHeight||d.bumpMap||d.normalMapTangentSpace||d.clearcoatNormalMap||d.flatShading||d.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(d.extensionFragDepth||d.logarithmicDepthBuffer)&&d.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",d.extensionDrawBuffers&&d.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(d.extensionShaderTextureLOD||d.envMap||d.transmission)&&d.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(ZI).join(` -`)}function L4e(d){return[d.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":""].filter(ZI).join(` -`)}function P4e(d){let s=[];for(let h in d){let g=d[h];g!==!1&&s.push("#define "+h+" "+g)}return s.join(` -`)}function I4e(d,s){let h={},g=d.getProgramParameter(s,d.ACTIVE_ATTRIBUTES);for(let m=0;m/gm;function Lyt(d){return d.replace(R4e,N4e)}var D4e=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function N4e(d,s){let h=No[s];if(h===void 0){let g=D4e.get(s);if(g!==void 0)h=No[g],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',s,g);else throw new Error("Can not resolve #include <"+s+">")}return Lyt(h)}var O4e=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function AYt(d){return d.replace(O4e,B4e)}function B4e(d,s,h,g){let m="";for(let _=parseInt(s);_/gm;function Hyt(d){return d.replace(K4e,Q4e)}var J4e=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function Q4e(d,s){let h=No[s];if(h===void 0){let p=J4e.get(s);if(p!==void 0)h=No[p],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',s,p);else throw new Error("Can not resolve #include <"+s+">")}return Hyt(h)}var tAe=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function FYt(d){return d.replace(tAe,eAe)}function eAe(d,s,h,p){let m="";for(let _=parseInt(s);_0&&(X+=` -`),gt=[W,"#define SHADER_TYPE "+h.shaderType,"#define SHADER_NAME "+h.shaderName,nt].filter(ZI).join(` +`),gt=[j,"#define SHADER_TYPE "+h.shaderType,"#define SHADER_NAME "+h.shaderName,tt].filter(JI).join(` `),gt.length>0&&(gt+=` -`)):(X=[kYt(h),"#define SHADER_TYPE "+h.shaderType,"#define SHADER_NAME "+h.shaderName,nt,h.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",h.batching?"#define USE_BATCHING":"",h.instancing?"#define USE_INSTANCING":"",h.instancingColor?"#define USE_INSTANCING_COLOR":"",h.useFog&&h.fog?"#define USE_FOG":"",h.useFog&&h.fogExp2?"#define FOG_EXP2":"",h.map?"#define USE_MAP":"",h.envMap?"#define USE_ENVMAP":"",h.envMap?"#define "+B:"",h.lightMap?"#define USE_LIGHTMAP":"",h.aoMap?"#define USE_AOMAP":"",h.bumpMap?"#define USE_BUMPMAP":"",h.normalMap?"#define USE_NORMALMAP":"",h.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",h.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",h.displacementMap?"#define USE_DISPLACEMENTMAP":"",h.emissiveMap?"#define USE_EMISSIVEMAP":"",h.anisotropy?"#define USE_ANISOTROPY":"",h.anisotropyMap?"#define USE_ANISOTROPYMAP":"",h.clearcoatMap?"#define USE_CLEARCOATMAP":"",h.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",h.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",h.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",h.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",h.specularMap?"#define USE_SPECULARMAP":"",h.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",h.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",h.roughnessMap?"#define USE_ROUGHNESSMAP":"",h.metalnessMap?"#define USE_METALNESSMAP":"",h.alphaMap?"#define USE_ALPHAMAP":"",h.alphaHash?"#define USE_ALPHAHASH":"",h.transmission?"#define USE_TRANSMISSION":"",h.transmissionMap?"#define USE_TRANSMISSIONMAP":"",h.thicknessMap?"#define USE_THICKNESSMAP":"",h.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",h.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",h.mapUv?"#define MAP_UV "+h.mapUv:"",h.alphaMapUv?"#define ALPHAMAP_UV "+h.alphaMapUv:"",h.lightMapUv?"#define LIGHTMAP_UV "+h.lightMapUv:"",h.aoMapUv?"#define AOMAP_UV "+h.aoMapUv:"",h.emissiveMapUv?"#define EMISSIVEMAP_UV "+h.emissiveMapUv:"",h.bumpMapUv?"#define BUMPMAP_UV "+h.bumpMapUv:"",h.normalMapUv?"#define NORMALMAP_UV "+h.normalMapUv:"",h.displacementMapUv?"#define DISPLACEMENTMAP_UV "+h.displacementMapUv:"",h.metalnessMapUv?"#define METALNESSMAP_UV "+h.metalnessMapUv:"",h.roughnessMapUv?"#define ROUGHNESSMAP_UV "+h.roughnessMapUv:"",h.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+h.anisotropyMapUv:"",h.clearcoatMapUv?"#define CLEARCOATMAP_UV "+h.clearcoatMapUv:"",h.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+h.clearcoatNormalMapUv:"",h.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+h.clearcoatRoughnessMapUv:"",h.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+h.iridescenceMapUv:"",h.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+h.iridescenceThicknessMapUv:"",h.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+h.sheenColorMapUv:"",h.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+h.sheenRoughnessMapUv:"",h.specularMapUv?"#define SPECULARMAP_UV "+h.specularMapUv:"",h.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+h.specularColorMapUv:"",h.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+h.specularIntensityMapUv:"",h.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+h.transmissionMapUv:"",h.thicknessMapUv?"#define THICKNESSMAP_UV "+h.thicknessMapUv:"",h.vertexTangents&&h.flatShading===!1?"#define USE_TANGENT":"",h.vertexColors?"#define USE_COLOR":"",h.vertexAlphas?"#define USE_COLOR_ALPHA":"",h.vertexUv1s?"#define USE_UV1":"",h.vertexUv2s?"#define USE_UV2":"",h.vertexUv3s?"#define USE_UV3":"",h.pointsUvs?"#define USE_POINTS_UV":"",h.flatShading?"#define FLAT_SHADED":"",h.skinning?"#define USE_SKINNING":"",h.morphTargets?"#define USE_MORPHTARGETS":"",h.morphNormals&&h.flatShading===!1?"#define USE_MORPHNORMALS":"",h.morphColors&&h.isWebGL2?"#define USE_MORPHCOLORS":"",h.morphTargetsCount>0&&h.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",h.morphTargetsCount>0&&h.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+h.morphTextureStride:"",h.morphTargetsCount>0&&h.isWebGL2?"#define MORPHTARGETS_COUNT "+h.morphTargetsCount:"",h.doubleSided?"#define DOUBLE_SIDED":"",h.flipSided?"#define FLIP_SIDED":"",h.shadowMapEnabled?"#define USE_SHADOWMAP":"",h.shadowMapEnabled?"#define "+R:"",h.sizeAttenuation?"#define USE_SIZEATTENUATION":"",h.numLightProbes>0?"#define USE_LIGHT_PROBES":"",h.useLegacyLights?"#define LEGACY_LIGHTS":"",h.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",h.logarithmicDepthBuffer&&h.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` -`].filter(ZI).join(` -`),gt=[W,kYt(h),"#define SHADER_TYPE "+h.shaderType,"#define SHADER_NAME "+h.shaderName,nt,h.useFog&&h.fog?"#define USE_FOG":"",h.useFog&&h.fogExp2?"#define FOG_EXP2":"",h.map?"#define USE_MAP":"",h.matcap?"#define USE_MATCAP":"",h.envMap?"#define USE_ENVMAP":"",h.envMap?"#define "+N:"",h.envMap?"#define "+B:"",h.envMap?"#define "+P:"",U?"#define CUBEUV_TEXEL_WIDTH "+U.texelWidth:"",U?"#define CUBEUV_TEXEL_HEIGHT "+U.texelHeight:"",U?"#define CUBEUV_MAX_MIP "+U.maxMip+".0":"",h.lightMap?"#define USE_LIGHTMAP":"",h.aoMap?"#define USE_AOMAP":"",h.bumpMap?"#define USE_BUMPMAP":"",h.normalMap?"#define USE_NORMALMAP":"",h.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",h.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",h.emissiveMap?"#define USE_EMISSIVEMAP":"",h.anisotropy?"#define USE_ANISOTROPY":"",h.anisotropyMap?"#define USE_ANISOTROPYMAP":"",h.clearcoat?"#define USE_CLEARCOAT":"",h.clearcoatMap?"#define USE_CLEARCOATMAP":"",h.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",h.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",h.iridescence?"#define USE_IRIDESCENCE":"",h.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",h.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",h.specularMap?"#define USE_SPECULARMAP":"",h.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",h.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",h.roughnessMap?"#define USE_ROUGHNESSMAP":"",h.metalnessMap?"#define USE_METALNESSMAP":"",h.alphaMap?"#define USE_ALPHAMAP":"",h.alphaTest?"#define USE_ALPHATEST":"",h.alphaHash?"#define USE_ALPHAHASH":"",h.sheen?"#define USE_SHEEN":"",h.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",h.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",h.transmission?"#define USE_TRANSMISSION":"",h.transmissionMap?"#define USE_TRANSMISSIONMAP":"",h.thicknessMap?"#define USE_THICKNESSMAP":"",h.vertexTangents&&h.flatShading===!1?"#define USE_TANGENT":"",h.vertexColors||h.instancingColor?"#define USE_COLOR":"",h.vertexAlphas?"#define USE_COLOR_ALPHA":"",h.vertexUv1s?"#define USE_UV1":"",h.vertexUv2s?"#define USE_UV2":"",h.vertexUv3s?"#define USE_UV3":"",h.pointsUvs?"#define USE_POINTS_UV":"",h.gradientMap?"#define USE_GRADIENTMAP":"",h.flatShading?"#define FLAT_SHADED":"",h.doubleSided?"#define DOUBLE_SIDED":"",h.flipSided?"#define FLIP_SIDED":"",h.shadowMapEnabled?"#define USE_SHADOWMAP":"",h.shadowMapEnabled?"#define "+R:"",h.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",h.numLightProbes>0?"#define USE_LIGHT_PROBES":"",h.useLegacyLights?"#define LEGACY_LIGHTS":"",h.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",h.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",h.logarithmicDepthBuffer&&h.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",h.toneMapping!==oS?"#define TONE_MAPPING":"",h.toneMapping!==oS?No.tonemapping_pars_fragment:"",h.toneMapping!==oS?A4e("toneMapping",h.toneMapping):"",h.dithering?"#define DITHERING":"",h.opaque?"#define OPAQUE":"",No.colorspace_pars_fragment,C4e("linearToOutputTexel",h.outputColorSpace),h.useDepthPacking?"#define DEPTH_PACKING "+h.depthPacking:"",` -`].filter(ZI).join(` -`)),S=Lyt(S),S=TYt(S,h),S=CYt(S,h),y=Lyt(y),y=TYt(y,h),y=CYt(y,h),S=AYt(S),y=AYt(y),h.isWebGL2&&h.isRawShaderMaterial!==!0&&(ft=`#version 300 es -`,X=[q,"precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` +`)):(X=[UYt(h),"#define SHADER_TYPE "+h.shaderType,"#define SHADER_NAME "+h.shaderName,tt,h.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",h.batching?"#define USE_BATCHING":"",h.instancing?"#define USE_INSTANCING":"",h.instancingColor?"#define USE_INSTANCING_COLOR":"",h.useFog&&h.fog?"#define USE_FOG":"",h.useFog&&h.fogExp2?"#define FOG_EXP2":"",h.map?"#define USE_MAP":"",h.envMap?"#define USE_ENVMAP":"",h.envMap?"#define "+B:"",h.lightMap?"#define USE_LIGHTMAP":"",h.aoMap?"#define USE_AOMAP":"",h.bumpMap?"#define USE_BUMPMAP":"",h.normalMap?"#define USE_NORMALMAP":"",h.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",h.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",h.displacementMap?"#define USE_DISPLACEMENTMAP":"",h.emissiveMap?"#define USE_EMISSIVEMAP":"",h.anisotropy?"#define USE_ANISOTROPY":"",h.anisotropyMap?"#define USE_ANISOTROPYMAP":"",h.clearcoatMap?"#define USE_CLEARCOATMAP":"",h.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",h.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",h.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",h.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",h.specularMap?"#define USE_SPECULARMAP":"",h.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",h.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",h.roughnessMap?"#define USE_ROUGHNESSMAP":"",h.metalnessMap?"#define USE_METALNESSMAP":"",h.alphaMap?"#define USE_ALPHAMAP":"",h.alphaHash?"#define USE_ALPHAHASH":"",h.transmission?"#define USE_TRANSMISSION":"",h.transmissionMap?"#define USE_TRANSMISSIONMAP":"",h.thicknessMap?"#define USE_THICKNESSMAP":"",h.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",h.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",h.mapUv?"#define MAP_UV "+h.mapUv:"",h.alphaMapUv?"#define ALPHAMAP_UV "+h.alphaMapUv:"",h.lightMapUv?"#define LIGHTMAP_UV "+h.lightMapUv:"",h.aoMapUv?"#define AOMAP_UV "+h.aoMapUv:"",h.emissiveMapUv?"#define EMISSIVEMAP_UV "+h.emissiveMapUv:"",h.bumpMapUv?"#define BUMPMAP_UV "+h.bumpMapUv:"",h.normalMapUv?"#define NORMALMAP_UV "+h.normalMapUv:"",h.displacementMapUv?"#define DISPLACEMENTMAP_UV "+h.displacementMapUv:"",h.metalnessMapUv?"#define METALNESSMAP_UV "+h.metalnessMapUv:"",h.roughnessMapUv?"#define ROUGHNESSMAP_UV "+h.roughnessMapUv:"",h.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+h.anisotropyMapUv:"",h.clearcoatMapUv?"#define CLEARCOATMAP_UV "+h.clearcoatMapUv:"",h.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+h.clearcoatNormalMapUv:"",h.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+h.clearcoatRoughnessMapUv:"",h.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+h.iridescenceMapUv:"",h.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+h.iridescenceThicknessMapUv:"",h.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+h.sheenColorMapUv:"",h.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+h.sheenRoughnessMapUv:"",h.specularMapUv?"#define SPECULARMAP_UV "+h.specularMapUv:"",h.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+h.specularColorMapUv:"",h.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+h.specularIntensityMapUv:"",h.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+h.transmissionMapUv:"",h.thicknessMapUv?"#define THICKNESSMAP_UV "+h.thicknessMapUv:"",h.vertexTangents&&h.flatShading===!1?"#define USE_TANGENT":"",h.vertexColors?"#define USE_COLOR":"",h.vertexAlphas?"#define USE_COLOR_ALPHA":"",h.vertexUv1s?"#define USE_UV1":"",h.vertexUv2s?"#define USE_UV2":"",h.vertexUv3s?"#define USE_UV3":"",h.pointsUvs?"#define USE_POINTS_UV":"",h.flatShading?"#define FLAT_SHADED":"",h.skinning?"#define USE_SKINNING":"",h.morphTargets?"#define USE_MORPHTARGETS":"",h.morphNormals&&h.flatShading===!1?"#define USE_MORPHNORMALS":"",h.morphColors&&h.isWebGL2?"#define USE_MORPHCOLORS":"",h.morphTargetsCount>0&&h.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",h.morphTargetsCount>0&&h.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+h.morphTextureStride:"",h.morphTargetsCount>0&&h.isWebGL2?"#define MORPHTARGETS_COUNT "+h.morphTargetsCount:"",h.doubleSided?"#define DOUBLE_SIDED":"",h.flipSided?"#define FLIP_SIDED":"",h.shadowMapEnabled?"#define USE_SHADOWMAP":"",h.shadowMapEnabled?"#define "+I:"",h.sizeAttenuation?"#define USE_SIZEATTENUATION":"",h.numLightProbes>0?"#define USE_LIGHT_PROBES":"",h.useLegacyLights?"#define LEGACY_LIGHTS":"",h.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",h.logarithmicDepthBuffer&&h.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` +`].filter(JI).join(` +`),gt=[j,UYt(h),"#define SHADER_TYPE "+h.shaderType,"#define SHADER_NAME "+h.shaderName,tt,h.useFog&&h.fog?"#define USE_FOG":"",h.useFog&&h.fogExp2?"#define FOG_EXP2":"",h.map?"#define USE_MAP":"",h.matcap?"#define USE_MATCAP":"",h.envMap?"#define USE_ENVMAP":"",h.envMap?"#define "+N:"",h.envMap?"#define "+B:"",h.envMap?"#define "+P:"",U?"#define CUBEUV_TEXEL_WIDTH "+U.texelWidth:"",U?"#define CUBEUV_TEXEL_HEIGHT "+U.texelHeight:"",U?"#define CUBEUV_MAX_MIP "+U.maxMip+".0":"",h.lightMap?"#define USE_LIGHTMAP":"",h.aoMap?"#define USE_AOMAP":"",h.bumpMap?"#define USE_BUMPMAP":"",h.normalMap?"#define USE_NORMALMAP":"",h.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",h.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",h.emissiveMap?"#define USE_EMISSIVEMAP":"",h.anisotropy?"#define USE_ANISOTROPY":"",h.anisotropyMap?"#define USE_ANISOTROPYMAP":"",h.clearcoat?"#define USE_CLEARCOAT":"",h.clearcoatMap?"#define USE_CLEARCOATMAP":"",h.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",h.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",h.iridescence?"#define USE_IRIDESCENCE":"",h.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",h.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",h.specularMap?"#define USE_SPECULARMAP":"",h.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",h.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",h.roughnessMap?"#define USE_ROUGHNESSMAP":"",h.metalnessMap?"#define USE_METALNESSMAP":"",h.alphaMap?"#define USE_ALPHAMAP":"",h.alphaTest?"#define USE_ALPHATEST":"",h.alphaHash?"#define USE_ALPHAHASH":"",h.sheen?"#define USE_SHEEN":"",h.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",h.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",h.transmission?"#define USE_TRANSMISSION":"",h.transmissionMap?"#define USE_TRANSMISSIONMAP":"",h.thicknessMap?"#define USE_THICKNESSMAP":"",h.vertexTangents&&h.flatShading===!1?"#define USE_TANGENT":"",h.vertexColors||h.instancingColor?"#define USE_COLOR":"",h.vertexAlphas?"#define USE_COLOR_ALPHA":"",h.vertexUv1s?"#define USE_UV1":"",h.vertexUv2s?"#define USE_UV2":"",h.vertexUv3s?"#define USE_UV3":"",h.pointsUvs?"#define USE_POINTS_UV":"",h.gradientMap?"#define USE_GRADIENTMAP":"",h.flatShading?"#define FLAT_SHADED":"",h.doubleSided?"#define DOUBLE_SIDED":"",h.flipSided?"#define FLIP_SIDED":"",h.shadowMapEnabled?"#define USE_SHADOWMAP":"",h.shadowMapEnabled?"#define "+I:"",h.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",h.numLightProbes>0?"#define USE_LIGHT_PROBES":"",h.useLegacyLights?"#define LEGACY_LIGHTS":"",h.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",h.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",h.logarithmicDepthBuffer&&h.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",h.toneMapping!==uS?"#define TONE_MAPPING":"",h.toneMapping!==uS?No.tonemapping_pars_fragment:"",h.toneMapping!==uS?V4e("toneMapping",h.toneMapping):"",h.dithering?"#define DITHERING":"",h.opaque?"#define OPAQUE":"",No.colorspace_pars_fragment,$4e("linearToOutputTexel",h.outputColorSpace),h.useDepthPacking?"#define DEPTH_PACKING "+h.depthPacking:"",` +`].filter(JI).join(` +`)),E=Hyt(E),E=OYt(E,h),E=BYt(E,h),y=Hyt(y),y=OYt(y,h),y=BYt(y,h),E=FYt(E),y=FYt(y),h.isWebGL2&&h.isRawShaderMaterial!==!0&&(ft=`#version 300 es +`,X=[V,"precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` `)+` -`+X,gt=["precision mediump sampler2DArray;","#define varying in",h.glslVersion===XZt?"":"layout(location = 0) out highp vec4 pc_fragColor;",h.glslVersion===XZt?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` +`+X,gt=["precision mediump sampler2DArray;","#define varying in",h.glslVersion===rYt?"":"layout(location = 0) out highp vec4 pc_fragColor;",h.glslVersion===rYt?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` `)+` -`+gt);let xt=ft+X+S,Bt=ft+gt+y,Ot=EYt(m,m.VERTEX_SHADER,xt),Pt=EYt(m,m.FRAGMENT_SHADER,Bt);m.attachShader(Q,Ot),m.attachShader(Q,Pt),h.index0AttributeName!==void 0?m.bindAttribLocation(Q,0,h.index0AttributeName):h.morphTargets===!0&&m.bindAttribLocation(Q,0,"position"),m.linkProgram(Q);function se(ln){if(d.debug.checkShaderErrors){let Fn=m.getProgramInfoLog(Q).trim(),ne=m.getShaderInfoLog(Ot).trim(),xe=m.getShaderInfoLog(Pt).trim(),re=!0,hn=!0;if(m.getProgramParameter(Q,m.LINK_STATUS)===!1)if(re=!1,typeof d.debug.onShaderError=="function")d.debug.onShaderError(m,Q,Ot,Pt);else{let Se=SYt(m,Ot,"vertex"),ke=SYt(m,Pt,"fragment");console.error("THREE.WebGLProgram: Shader Error "+m.getError()+" - VALIDATE_STATUS "+m.getProgramParameter(Q,m.VALIDATE_STATUS)+` +`+gt);let xt=ft+X+E,Bt=ft+gt+y,Ot=DYt(m,m.VERTEX_SHADER,xt),Pt=DYt(m,m.FRAGMENT_SHADER,Bt);m.attachShader(Q,Ot),m.attachShader(Q,Pt),h.index0AttributeName!==void 0?m.bindAttribLocation(Q,0,h.index0AttributeName):h.morphTargets===!0&&m.bindAttribLocation(Q,0,"position"),m.linkProgram(Q);function se(ln){if(d.debug.checkShaderErrors){let Fn=m.getProgramInfoLog(Q).trim(),ne=m.getShaderInfoLog(Ot).trim(),xe=m.getShaderInfoLog(Pt).trim(),re=!0,hn=!0;if(m.getProgramParameter(Q,m.LINK_STATUS)===!1)if(re=!1,typeof d.debug.onShaderError=="function")d.debug.onShaderError(m,Q,Ot,Pt);else{let Se=NYt(m,Ot,"vertex"),ke=NYt(m,Pt,"fragment");console.error("THREE.WebGLProgram: Shader Error "+m.getError()+" - VALIDATE_STATUS "+m.getProgramParameter(Q,m.VALIDATE_STATUS)+` Program Info Log: `+Fn+` `+Se+` -`+ke)}else Fn!==""?console.warn("THREE.WebGLProgram: Program Info Log:",Fn):(ne===""||xe==="")&&(hn=!1);hn&&(ln.diagnostics={runnable:re,programLog:Fn,vertexShader:{log:ne,prefix:X},fragmentShader:{log:xe,prefix:gt}})}m.deleteShader(Ot),m.deleteShader(Pt),ot=new JI(m,Q),Lt=I4e(m,Q)}let ot;this.getUniforms=function(){return ot===void 0&&se(this),ot};let Lt;this.getAttributes=function(){return Lt===void 0&&se(this),Lt};let be=h.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return be===!1&&(be=m.getProgramParameter(Q,M4e)),be},this.destroy=function(){g.releaseStatesOfProgram(this),m.deleteProgram(Q),this.program=void 0},this.type=h.shaderType,this.name=h.shaderName,this.id=E4e++,this.cacheKey=s,this.usedTimes=1,this.program=Q,this.vertexShader=Ot,this.fragmentShader=Pt,this}var W4e=0,Pyt=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(s){let h=s.vertexShader,g=s.fragmentShader,m=this._getShaderStage(h),_=this._getShaderStage(g),S=this._getShaderCacheForMaterial(s);return S.has(m)===!1&&(S.add(m),m.usedTimes++),S.has(_)===!1&&(S.add(_),_.usedTimes++),this}remove(s){let h=this.materialCache.get(s);for(let g of h)g.usedTimes--,g.usedTimes===0&&this.shaderCache.delete(g.code);return this.materialCache.delete(s),this}getVertexShaderID(s){return this._getShaderStage(s.vertexShader).id}getFragmentShaderID(s){return this._getShaderStage(s.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(s){let h=this.materialCache,g=h.get(s);return g===void 0&&(g=new Set,h.set(s,g)),g}_getShaderStage(s){let h=this.shaderCache,g=h.get(s);return g===void 0&&(g=new Iyt(s),h.set(s,g)),g}},Iyt=class{constructor(s){this.id=W4e++,this.code=s,this.usedTimes=0}};function $4e(d,s,h,g,m,_,S){let y=new yU,R=new Pyt,N=[],B=m.isWebGL2,P=m.logarithmicDepthBuffer,U=m.vertexTextures,W=m.precision,q={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function nt(ot){return ot===0?"uv":`uv${ot}`}function Q(ot,Lt,be,ln,Fn){let ne=ln.fog,xe=Fn.geometry,re=ot.isMeshStandardMaterial?ln.environment:null,hn=(ot.isMeshStandardMaterial?h:s).get(ot.envMap||re),Se=hn&&hn.mapping===Ret?hn.image.height:null,ke=q[ot.type];ot.precision!==null&&(W=m.getMaxPrecision(ot.precision),W!==ot.precision&&console.warn("THREE.WebGLProgram.getParameters:",ot.precision,"not supported, using",W,"instead."));let mn=xe.morphAttributes.position||xe.morphAttributes.normal||xe.morphAttributes.color,en=mn!==void 0?mn.length:0,Qn=0;xe.morphAttributes.position!==void 0&&(Qn=1),xe.morphAttributes.normal!==void 0&&(Qn=2),xe.morphAttributes.color!==void 0&&(Qn=3);let ge,Pe,ti,Yi;if(ke){let ru=yy[ke];ge=ru.vertexShader,Pe=ru.fragmentShader}else ge=ot.vertexShader,Pe=ot.fragmentShader,R.update(ot),ti=R.getVertexShaderID(ot),Yi=R.getFragmentShaderID(ot);let ki=d.getRenderTarget(),lr=Fn.isInstancedMesh===!0,pr=Fn.isBatchedMesh===!0,Kt=!!ot.map,wn=!!ot.matcap,it=!!hn,ut=!!ot.aoMap,kt=!!ot.lightMap,Nt=!!ot.bumpMap,ie=!!ot.normalMap,rn=!!ot.displacementMap,Pn=!!ot.emissiveMap,Tt=!!ot.metalnessMap,yt=!!ot.roughnessMap,ue=ot.anisotropy>0,fn=ot.clearcoat>0,An=ot.iridescence>0,zn=ot.sheen>0,Li=ot.transmission>0,xi=ue&&!!ot.anisotropyMap,Jt=fn&&!!ot.clearcoatMap,nn=fn&&!!ot.clearcoatNormalMap,vn=fn&&!!ot.clearcoatRoughnessMap,he=An&&!!ot.iridescenceMap,Mn=An&&!!ot.iridescenceThicknessMap,Sn=zn&&!!ot.sheenColorMap,gn=zn&&!!ot.sheenRoughnessMap,Ce=!!ot.specularMap,dn=!!ot.specularColorMap,jn=!!ot.specularIntensityMap,ar=Li&&!!ot.transmissionMap,gr=Li&&!!ot.thicknessMap,tr=!!ot.gradientMap,Ln=!!ot.alphaMap,Qt=ot.alphaTest>0,Mi=!!ot.alphaHash,sn=!!ot.extensions,Zn=!!xe.attributes.uv1,oi=!!xe.attributes.uv2,Jr=!!xe.attributes.uv3,Bs=oS;return ot.toneMapped&&(ki===null||ki.isXRRenderTarget===!0)&&(Bs=d.toneMapping),{isWebGL2:B,shaderID:ke,shaderType:ot.type,shaderName:ot.name,vertexShader:ge,fragmentShader:Pe,defines:ot.defines,customVertexShaderID:ti,customFragmentShaderID:Yi,isRawShaderMaterial:ot.isRawShaderMaterial===!0,glslVersion:ot.glslVersion,precision:W,batching:pr,instancing:lr,instancingColor:lr&&Fn.instanceColor!==null,supportsVertexTextures:U,outputColorSpace:ki===null?d.outputColorSpace:ki.isXRRenderTarget===!0?ki.texture.colorSpace:Jx,map:Kt,matcap:wn,envMap:it,envMapMode:it&&hn.mapping,envMapCubeUVHeight:Se,aoMap:ut,lightMap:kt,bumpMap:Nt,normalMap:ie,displacementMap:U&&rn,emissiveMap:Pn,normalMapObjectSpace:ie&&ot.normalMapType===uEe,normalMapTangentSpace:ie&&ot.normalMapType===QYt,metalnessMap:Tt,roughnessMap:yt,anisotropy:ue,anisotropyMap:xi,clearcoat:fn,clearcoatMap:Jt,clearcoatNormalMap:nn,clearcoatRoughnessMap:vn,iridescence:An,iridescenceMap:he,iridescenceThicknessMap:Mn,sheen:zn,sheenColorMap:Sn,sheenRoughnessMap:gn,specularMap:Ce,specularColorMap:dn,specularIntensityMap:jn,transmission:Li,transmissionMap:ar,thicknessMap:gr,gradientMap:tr,opaque:ot.transparent===!1&&ot.blending===YI,alphaMap:Ln,alphaTest:Qt,alphaHash:Mi,combine:ot.combine,mapUv:Kt&&nt(ot.map.channel),aoMapUv:ut&&nt(ot.aoMap.channel),lightMapUv:kt&&nt(ot.lightMap.channel),bumpMapUv:Nt&&nt(ot.bumpMap.channel),normalMapUv:ie&&nt(ot.normalMap.channel),displacementMapUv:rn&&nt(ot.displacementMap.channel),emissiveMapUv:Pn&&nt(ot.emissiveMap.channel),metalnessMapUv:Tt&&nt(ot.metalnessMap.channel),roughnessMapUv:yt&&nt(ot.roughnessMap.channel),anisotropyMapUv:xi&&nt(ot.anisotropyMap.channel),clearcoatMapUv:Jt&&nt(ot.clearcoatMap.channel),clearcoatNormalMapUv:nn&&nt(ot.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:vn&&nt(ot.clearcoatRoughnessMap.channel),iridescenceMapUv:he&&nt(ot.iridescenceMap.channel),iridescenceThicknessMapUv:Mn&&nt(ot.iridescenceThicknessMap.channel),sheenColorMapUv:Sn&&nt(ot.sheenColorMap.channel),sheenRoughnessMapUv:gn&&nt(ot.sheenRoughnessMap.channel),specularMapUv:Ce&&nt(ot.specularMap.channel),specularColorMapUv:dn&&nt(ot.specularColorMap.channel),specularIntensityMapUv:jn&&nt(ot.specularIntensityMap.channel),transmissionMapUv:ar&&nt(ot.transmissionMap.channel),thicknessMapUv:gr&&nt(ot.thicknessMap.channel),alphaMapUv:Ln&&nt(ot.alphaMap.channel),vertexTangents:!!xe.attributes.tangent&&(ie||ue),vertexColors:ot.vertexColors,vertexAlphas:ot.vertexColors===!0&&!!xe.attributes.color&&xe.attributes.color.itemSize===4,vertexUv1s:Zn,vertexUv2s:oi,vertexUv3s:Jr,pointsUvs:Fn.isPoints===!0&&!!xe.attributes.uv&&(Kt||Ln),fog:!!ne,useFog:ot.fog===!0,fogExp2:ne&&ne.isFogExp2,flatShading:ot.flatShading===!0,sizeAttenuation:ot.sizeAttenuation===!0,logarithmicDepthBuffer:P,skinning:Fn.isSkinnedMesh===!0,morphTargets:xe.morphAttributes.position!==void 0,morphNormals:xe.morphAttributes.normal!==void 0,morphColors:xe.morphAttributes.color!==void 0,morphTargetsCount:en,morphTextureStride:Qn,numDirLights:Lt.directional.length,numPointLights:Lt.point.length,numSpotLights:Lt.spot.length,numSpotLightMaps:Lt.spotLightMap.length,numRectAreaLights:Lt.rectArea.length,numHemiLights:Lt.hemi.length,numDirLightShadows:Lt.directionalShadowMap.length,numPointLightShadows:Lt.pointShadowMap.length,numSpotLightShadows:Lt.spotShadowMap.length,numSpotLightShadowsWithMaps:Lt.numSpotLightShadowsWithMaps,numLightProbes:Lt.numLightProbes,numClippingPlanes:S.numPlanes,numClipIntersection:S.numIntersection,dithering:ot.dithering,shadowMapEnabled:d.shadowMap.enabled&&be.length>0,shadowMapType:d.shadowMap.type,toneMapping:Bs,useLegacyLights:d._useLegacyLights,decodeVideoTexture:Kt&&ot.map.isVideoTexture===!0&&Na.getTransfer(ot.map.colorSpace)===vu,premultipliedAlpha:ot.premultipliedAlpha,doubleSided:ot.side===Xw,flipSided:ot.side===mg,useDepthPacking:ot.depthPacking>=0,depthPacking:ot.depthPacking||0,index0AttributeName:ot.index0AttributeName,extensionDerivatives:sn&&ot.extensions.derivatives===!0,extensionFragDepth:sn&&ot.extensions.fragDepth===!0,extensionDrawBuffers:sn&&ot.extensions.drawBuffers===!0,extensionShaderTextureLOD:sn&&ot.extensions.shaderTextureLOD===!0,extensionClipCullDistance:sn&&ot.extensions.clipCullDistance&&g.has("WEBGL_clip_cull_distance"),rendererExtensionFragDepth:B||g.has("EXT_frag_depth"),rendererExtensionDrawBuffers:B||g.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:B||g.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:g.has("KHR_parallel_shader_compile"),customProgramCacheKey:ot.customProgramCacheKey()}}function X(ot){let Lt=[];if(ot.shaderID?Lt.push(ot.shaderID):(Lt.push(ot.customVertexShaderID),Lt.push(ot.customFragmentShaderID)),ot.defines!==void 0)for(let be in ot.defines)Lt.push(be),Lt.push(ot.defines[be]);return ot.isRawShaderMaterial===!1&&(gt(Lt,ot),ft(Lt,ot),Lt.push(d.outputColorSpace)),Lt.push(ot.customProgramCacheKey),Lt.join()}function gt(ot,Lt){ot.push(Lt.precision),ot.push(Lt.outputColorSpace),ot.push(Lt.envMapMode),ot.push(Lt.envMapCubeUVHeight),ot.push(Lt.mapUv),ot.push(Lt.alphaMapUv),ot.push(Lt.lightMapUv),ot.push(Lt.aoMapUv),ot.push(Lt.bumpMapUv),ot.push(Lt.normalMapUv),ot.push(Lt.displacementMapUv),ot.push(Lt.emissiveMapUv),ot.push(Lt.metalnessMapUv),ot.push(Lt.roughnessMapUv),ot.push(Lt.anisotropyMapUv),ot.push(Lt.clearcoatMapUv),ot.push(Lt.clearcoatNormalMapUv),ot.push(Lt.clearcoatRoughnessMapUv),ot.push(Lt.iridescenceMapUv),ot.push(Lt.iridescenceThicknessMapUv),ot.push(Lt.sheenColorMapUv),ot.push(Lt.sheenRoughnessMapUv),ot.push(Lt.specularMapUv),ot.push(Lt.specularColorMapUv),ot.push(Lt.specularIntensityMapUv),ot.push(Lt.transmissionMapUv),ot.push(Lt.thicknessMapUv),ot.push(Lt.combine),ot.push(Lt.fogExp2),ot.push(Lt.sizeAttenuation),ot.push(Lt.morphTargetsCount),ot.push(Lt.morphAttributeCount),ot.push(Lt.numDirLights),ot.push(Lt.numPointLights),ot.push(Lt.numSpotLights),ot.push(Lt.numSpotLightMaps),ot.push(Lt.numHemiLights),ot.push(Lt.numRectAreaLights),ot.push(Lt.numDirLightShadows),ot.push(Lt.numPointLightShadows),ot.push(Lt.numSpotLightShadows),ot.push(Lt.numSpotLightShadowsWithMaps),ot.push(Lt.numLightProbes),ot.push(Lt.shadowMapType),ot.push(Lt.toneMapping),ot.push(Lt.numClippingPlanes),ot.push(Lt.numClipIntersection),ot.push(Lt.depthPacking)}function ft(ot,Lt){y.disableAll(),Lt.isWebGL2&&y.enable(0),Lt.supportsVertexTextures&&y.enable(1),Lt.instancing&&y.enable(2),Lt.instancingColor&&y.enable(3),Lt.matcap&&y.enable(4),Lt.envMap&&y.enable(5),Lt.normalMapObjectSpace&&y.enable(6),Lt.normalMapTangentSpace&&y.enable(7),Lt.clearcoat&&y.enable(8),Lt.iridescence&&y.enable(9),Lt.alphaTest&&y.enable(10),Lt.vertexColors&&y.enable(11),Lt.vertexAlphas&&y.enable(12),Lt.vertexUv1s&&y.enable(13),Lt.vertexUv2s&&y.enable(14),Lt.vertexUv3s&&y.enable(15),Lt.vertexTangents&&y.enable(16),Lt.anisotropy&&y.enable(17),Lt.alphaHash&&y.enable(18),Lt.batching&&y.enable(19),ot.push(y.mask),y.disableAll(),Lt.fog&&y.enable(0),Lt.useFog&&y.enable(1),Lt.flatShading&&y.enable(2),Lt.logarithmicDepthBuffer&&y.enable(3),Lt.skinning&&y.enable(4),Lt.morphTargets&&y.enable(5),Lt.morphNormals&&y.enable(6),Lt.morphColors&&y.enable(7),Lt.premultipliedAlpha&&y.enable(8),Lt.shadowMapEnabled&&y.enable(9),Lt.useLegacyLights&&y.enable(10),Lt.doubleSided&&y.enable(11),Lt.flipSided&&y.enable(12),Lt.useDepthPacking&&y.enable(13),Lt.dithering&&y.enable(14),Lt.transmission&&y.enable(15),Lt.sheen&&y.enable(16),Lt.opaque&&y.enable(17),Lt.pointsUvs&&y.enable(18),Lt.decodeVideoTexture&&y.enable(19),ot.push(y.mask)}function xt(ot){let Lt=q[ot.type],be;if(Lt){let ln=yy[Lt];be=DEe.clone(ln.uniforms)}else be=ot.uniforms;return be}function Bt(ot,Lt){let be;for(let ln=0,Fn=N.length;ln0?g.push(X):W.transparent===!0?m.push(X):h.push(X)}function R(P,U,W,q,nt,Q){let X=S(P,U,W,q,nt,Q);W.transmission>0?g.unshift(X):W.transparent===!0?m.unshift(X):h.unshift(X)}function N(P,U){h.length>1&&h.sort(P||q4e),g.length>1&&g.sort(U||LYt),m.length>1&&m.sort(U||LYt)}function B(){for(let P=s,U=d.length;P=_.length?(S=new PYt,_.push(S)):S=_[m],S}function h(){d=new WeakMap}return{get:s,dispose:h}}function Z4e(){let d={};return{get:function(s){if(d[s.id]!==void 0)return d[s.id];let h;switch(s.type){case"DirectionalLight":h={direction:new Ge,color:new Go};break;case"SpotLight":h={position:new Ge,direction:new Ge,color:new Go,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":h={position:new Ge,color:new Go,distance:0,decay:0};break;case"HemisphereLight":h={direction:new Ge,skyColor:new Go,groundColor:new Go};break;case"RectAreaLight":h={color:new Go,position:new Ge,halfWidth:new Ge,halfHeight:new Ge};break}return d[s.id]=h,h}}}function Y4e(){let d={};return{get:function(s){if(d[s.id]!==void 0)return d[s.id];let h;switch(s.type){case"DirectionalLight":h={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Nc};break;case"SpotLight":h={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Nc};break;case"PointLight":h={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Nc,shadowCameraNear:1,shadowCameraFar:1e3};break}return d[s.id]=h,h}}}var K4e=0;function J4e(d,s){return(s.castShadow?2:0)-(d.castShadow?2:0)+(s.map?1:0)-(d.map?1:0)}function Q4e(d,s){let h=new Z4e,g=Y4e(),m={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let B=0;B<9;B++)m.probe.push(new Ge);let _=new Ge,S=new Bu,y=new Bu;function R(B,P){let U=0,W=0,q=0;for(let ln=0;ln<9;ln++)m.probe[ln].set(0,0,0);let nt=0,Q=0,X=0,gt=0,ft=0,xt=0,Bt=0,Ot=0,Pt=0,se=0,ot=0;B.sort(J4e);let Lt=P===!0?Math.PI:1;for(let ln=0,Fn=B.length;ln0&&(s.isWebGL2?d.has("OES_texture_float_linear")===!0?(m.rectAreaLTC1=Zi.LTC_FLOAT_1,m.rectAreaLTC2=Zi.LTC_FLOAT_2):(m.rectAreaLTC1=Zi.LTC_HALF_1,m.rectAreaLTC2=Zi.LTC_HALF_2):d.has("OES_texture_float_linear")===!0?(m.rectAreaLTC1=Zi.LTC_FLOAT_1,m.rectAreaLTC2=Zi.LTC_FLOAT_2):d.has("OES_texture_half_float_linear")===!0?(m.rectAreaLTC1=Zi.LTC_HALF_1,m.rectAreaLTC2=Zi.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),m.ambient[0]=U,m.ambient[1]=W,m.ambient[2]=q;let be=m.hash;(be.directionalLength!==nt||be.pointLength!==Q||be.spotLength!==X||be.rectAreaLength!==gt||be.hemiLength!==ft||be.numDirectionalShadows!==xt||be.numPointShadows!==Bt||be.numSpotShadows!==Ot||be.numSpotMaps!==Pt||be.numLightProbes!==ot)&&(m.directional.length=nt,m.spot.length=X,m.rectArea.length=gt,m.point.length=Q,m.hemi.length=ft,m.directionalShadow.length=xt,m.directionalShadowMap.length=xt,m.pointShadow.length=Bt,m.pointShadowMap.length=Bt,m.spotShadow.length=Ot,m.spotShadowMap.length=Ot,m.directionalShadowMatrix.length=xt,m.pointShadowMatrix.length=Bt,m.spotLightMatrix.length=Ot+Pt-se,m.spotLightMap.length=Pt,m.numSpotLightShadowsWithMaps=se,m.numLightProbes=ot,be.directionalLength=nt,be.pointLength=Q,be.spotLength=X,be.rectAreaLength=gt,be.hemiLength=ft,be.numDirectionalShadows=xt,be.numPointShadows=Bt,be.numSpotShadows=Ot,be.numSpotMaps=Pt,be.numLightProbes=ot,m.version=K4e++)}function N(B,P){let U=0,W=0,q=0,nt=0,Q=0,X=P.matrixWorldInverse;for(let gt=0,ft=B.length;gt=y.length?(R=new IYt(d,s),y.push(R)):R=y[S],R}function m(){h=new WeakMap}return{get:g,dispose:m}}var Ryt=class extends hS{constructor(s){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=cEe,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(s)}copy(s){return super.copy(s),this.depthPacking=s.depthPacking,this.map=s.map,this.alphaMap=s.alphaMap,this.displacementMap=s.displacementMap,this.displacementScale=s.displacementScale,this.displacementBias=s.displacementBias,this.wireframe=s.wireframe,this.wireframeLinewidth=s.wireframeLinewidth,this}},Dyt=class extends hS{constructor(s){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(s)}copy(s){return super.copy(s),this.map=s.map,this.alphaMap=s.alphaMap,this.displacementMap=s.displacementMap,this.displacementScale=s.displacementScale,this.displacementBias=s.displacementBias,this}},eAe=`void main() { +`+ke)}else Fn!==""?console.warn("THREE.WebGLProgram: Program Info Log:",Fn):(ne===""||xe==="")&&(hn=!1);hn&&(ln.diagnostics={runnable:re,programLog:Fn,vertexShader:{log:ne,prefix:X},fragmentShader:{log:xe,prefix:gt}})}m.deleteShader(Ot),m.deleteShader(Pt),ot=new eR(m,Q),Lt=Y4e(m,Q)}let ot;this.getUniforms=function(){return ot===void 0&&se(this),ot};let Lt;this.getAttributes=function(){return Lt===void 0&&se(this),Lt};let be=h.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return be===!1&&(be=m.getProgramParameter(Q,j4e)),be},this.destroy=function(){p.releaseStatesOfProgram(this),m.deleteProgram(Q),this.program=void 0},this.type=h.shaderType,this.name=h.shaderName,this.id=H4e++,this.cacheKey=s,this.usedTimes=1,this.program=Q,this.vertexShader=Ot,this.fragmentShader=Pt,this}var aAe=0,Gyt=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(s){let h=s.vertexShader,p=s.fragmentShader,m=this._getShaderStage(h),_=this._getShaderStage(p),E=this._getShaderCacheForMaterial(s);return E.has(m)===!1&&(E.add(m),m.usedTimes++),E.has(_)===!1&&(E.add(_),_.usedTimes++),this}remove(s){let h=this.materialCache.get(s);for(let p of h)p.usedTimes--,p.usedTimes===0&&this.shaderCache.delete(p.code);return this.materialCache.delete(s),this}getVertexShaderID(s){return this._getShaderStage(s.vertexShader).id}getFragmentShaderID(s){return this._getShaderStage(s.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(s){let h=this.materialCache,p=h.get(s);return p===void 0&&(p=new Set,h.set(s,p)),p}_getShaderStage(s){let h=this.shaderCache,p=h.get(s);return p===void 0&&(p=new Wyt(s),h.set(s,p)),p}},Wyt=class{constructor(s){this.id=aAe++,this.code=s,this.usedTimes=0}};function uAe(d,s,h,p,m,_,E){let y=new SU,I=new Gyt,N=[],B=m.isWebGL2,P=m.logarithmicDepthBuffer,U=m.vertexTextures,j=m.precision,V={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function tt(ot){return ot===0?"uv":`uv${ot}`}function Q(ot,Lt,be,ln,Fn){let ne=ln.fog,xe=Fn.geometry,re=ot.isMeshStandardMaterial?ln.environment:null,hn=(ot.isMeshStandardMaterial?h:s).get(ot.envMap||re),Se=hn&&hn.mapping===Bet?hn.image.height:null,ke=V[ot.type];ot.precision!==null&&(j=m.getMaxPrecision(ot.precision),j!==ot.precision&&console.warn("THREE.WebGLProgram.getParameters:",ot.precision,"not supported, using",j,"instead."));let mn=xe.morphAttributes.position||xe.morphAttributes.normal||xe.morphAttributes.color,en=mn!==void 0?mn.length:0,Qn=0;xe.morphAttributes.position!==void 0&&(Qn=1),xe.morphAttributes.normal!==void 0&&(Qn=2),xe.morphAttributes.color!==void 0&&(Qn=3);let ge,Pe,ti,Yi;if(ke){let ru=xy[ke];ge=ru.vertexShader,Pe=ru.fragmentShader}else ge=ot.vertexShader,Pe=ot.fragmentShader,I.update(ot),ti=I.getVertexShaderID(ot),Yi=I.getFragmentShaderID(ot);let ki=d.getRenderTarget(),lr=Fn.isInstancedMesh===!0,pr=Fn.isBatchedMesh===!0,Kt=!!ot.map,wn=!!ot.matcap,it=!!hn,ut=!!ot.aoMap,kt=!!ot.lightMap,Nt=!!ot.bumpMap,ie=!!ot.normalMap,rn=!!ot.displacementMap,Pn=!!ot.emissiveMap,Tt=!!ot.metalnessMap,yt=!!ot.roughnessMap,ue=ot.anisotropy>0,fn=ot.clearcoat>0,An=ot.iridescence>0,zn=ot.sheen>0,Li=ot.transmission>0,xi=ue&&!!ot.anisotropyMap,Jt=fn&&!!ot.clearcoatMap,nn=fn&&!!ot.clearcoatNormalMap,vn=fn&&!!ot.clearcoatRoughnessMap,he=An&&!!ot.iridescenceMap,Mn=An&&!!ot.iridescenceThicknessMap,Sn=zn&&!!ot.sheenColorMap,gn=zn&&!!ot.sheenRoughnessMap,Ce=!!ot.specularMap,dn=!!ot.specularColorMap,jn=!!ot.specularIntensityMap,ar=Li&&!!ot.transmissionMap,gr=Li&&!!ot.thicknessMap,tr=!!ot.gradientMap,Ln=!!ot.alphaMap,Qt=ot.alphaTest>0,Mi=!!ot.alphaHash,sn=!!ot.extensions,Zn=!!xe.attributes.uv1,oi=!!xe.attributes.uv2,Jr=!!xe.attributes.uv3,Bs=uS;return ot.toneMapped&&(ki===null||ki.isXRRenderTarget===!0)&&(Bs=d.toneMapping),{isWebGL2:B,shaderID:ke,shaderType:ot.type,shaderName:ot.name,vertexShader:ge,fragmentShader:Pe,defines:ot.defines,customVertexShaderID:ti,customFragmentShaderID:Yi,isRawShaderMaterial:ot.isRawShaderMaterial===!0,glslVersion:ot.glslVersion,precision:j,batching:pr,instancing:lr,instancingColor:lr&&Fn.instanceColor!==null,supportsVertexTextures:U,outputColorSpace:ki===null?d.outputColorSpace:ki.isXRRenderTarget===!0?ki.texture.colorSpace:t3,map:Kt,matcap:wn,envMap:it,envMapMode:it&&hn.mapping,envMapCubeUVHeight:Se,aoMap:ut,lightMap:kt,bumpMap:Nt,normalMap:ie,displacementMap:U&&rn,emissiveMap:Pn,normalMapObjectSpace:ie&&ot.normalMapType===CEe,normalMapTangentSpace:ie&&ot.normalMapType===uKt,metalnessMap:Tt,roughnessMap:yt,anisotropy:ue,anisotropyMap:xi,clearcoat:fn,clearcoatMap:Jt,clearcoatNormalMap:nn,clearcoatRoughnessMap:vn,iridescence:An,iridescenceMap:he,iridescenceThicknessMap:Mn,sheen:zn,sheenColorMap:Sn,sheenRoughnessMap:gn,specularMap:Ce,specularColorMap:dn,specularIntensityMap:jn,transmission:Li,transmissionMap:ar,thicknessMap:gr,gradientMap:tr,opaque:ot.transparent===!1&&ot.blending===QI,alphaMap:Ln,alphaTest:Qt,alphaHash:Mi,combine:ot.combine,mapUv:Kt&&tt(ot.map.channel),aoMapUv:ut&&tt(ot.aoMap.channel),lightMapUv:kt&&tt(ot.lightMap.channel),bumpMapUv:Nt&&tt(ot.bumpMap.channel),normalMapUv:ie&&tt(ot.normalMap.channel),displacementMapUv:rn&&tt(ot.displacementMap.channel),emissiveMapUv:Pn&&tt(ot.emissiveMap.channel),metalnessMapUv:Tt&&tt(ot.metalnessMap.channel),roughnessMapUv:yt&&tt(ot.roughnessMap.channel),anisotropyMapUv:xi&&tt(ot.anisotropyMap.channel),clearcoatMapUv:Jt&&tt(ot.clearcoatMap.channel),clearcoatNormalMapUv:nn&&tt(ot.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:vn&&tt(ot.clearcoatRoughnessMap.channel),iridescenceMapUv:he&&tt(ot.iridescenceMap.channel),iridescenceThicknessMapUv:Mn&&tt(ot.iridescenceThicknessMap.channel),sheenColorMapUv:Sn&&tt(ot.sheenColorMap.channel),sheenRoughnessMapUv:gn&&tt(ot.sheenRoughnessMap.channel),specularMapUv:Ce&&tt(ot.specularMap.channel),specularColorMapUv:dn&&tt(ot.specularColorMap.channel),specularIntensityMapUv:jn&&tt(ot.specularIntensityMap.channel),transmissionMapUv:ar&&tt(ot.transmissionMap.channel),thicknessMapUv:gr&&tt(ot.thicknessMap.channel),alphaMapUv:Ln&&tt(ot.alphaMap.channel),vertexTangents:!!xe.attributes.tangent&&(ie||ue),vertexColors:ot.vertexColors,vertexAlphas:ot.vertexColors===!0&&!!xe.attributes.color&&xe.attributes.color.itemSize===4,vertexUv1s:Zn,vertexUv2s:oi,vertexUv3s:Jr,pointsUvs:Fn.isPoints===!0&&!!xe.attributes.uv&&(Kt||Ln),fog:!!ne,useFog:ot.fog===!0,fogExp2:ne&&ne.isFogExp2,flatShading:ot.flatShading===!0,sizeAttenuation:ot.sizeAttenuation===!0,logarithmicDepthBuffer:P,skinning:Fn.isSkinnedMesh===!0,morphTargets:xe.morphAttributes.position!==void 0,morphNormals:xe.morphAttributes.normal!==void 0,morphColors:xe.morphAttributes.color!==void 0,morphTargetsCount:en,morphTextureStride:Qn,numDirLights:Lt.directional.length,numPointLights:Lt.point.length,numSpotLights:Lt.spot.length,numSpotLightMaps:Lt.spotLightMap.length,numRectAreaLights:Lt.rectArea.length,numHemiLights:Lt.hemi.length,numDirLightShadows:Lt.directionalShadowMap.length,numPointLightShadows:Lt.pointShadowMap.length,numSpotLightShadows:Lt.spotShadowMap.length,numSpotLightShadowsWithMaps:Lt.numSpotLightShadowsWithMaps,numLightProbes:Lt.numLightProbes,numClippingPlanes:E.numPlanes,numClipIntersection:E.numIntersection,dithering:ot.dithering,shadowMapEnabled:d.shadowMap.enabled&&be.length>0,shadowMapType:d.shadowMap.type,toneMapping:Bs,useLegacyLights:d._useLegacyLights,decodeVideoTexture:Kt&&ot.map.isVideoTexture===!0&&Na.getTransfer(ot.map.colorSpace)===vu,premultipliedAlpha:ot.premultipliedAlpha,doubleSided:ot.side===Xw,flipSided:ot.side===mg,useDepthPacking:ot.depthPacking>=0,depthPacking:ot.depthPacking||0,index0AttributeName:ot.index0AttributeName,extensionDerivatives:sn&&ot.extensions.derivatives===!0,extensionFragDepth:sn&&ot.extensions.fragDepth===!0,extensionDrawBuffers:sn&&ot.extensions.drawBuffers===!0,extensionShaderTextureLOD:sn&&ot.extensions.shaderTextureLOD===!0,extensionClipCullDistance:sn&&ot.extensions.clipCullDistance&&p.has("WEBGL_clip_cull_distance"),rendererExtensionFragDepth:B||p.has("EXT_frag_depth"),rendererExtensionDrawBuffers:B||p.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:B||p.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:p.has("KHR_parallel_shader_compile"),customProgramCacheKey:ot.customProgramCacheKey()}}function X(ot){let Lt=[];if(ot.shaderID?Lt.push(ot.shaderID):(Lt.push(ot.customVertexShaderID),Lt.push(ot.customFragmentShaderID)),ot.defines!==void 0)for(let be in ot.defines)Lt.push(be),Lt.push(ot.defines[be]);return ot.isRawShaderMaterial===!1&&(gt(Lt,ot),ft(Lt,ot),Lt.push(d.outputColorSpace)),Lt.push(ot.customProgramCacheKey),Lt.join()}function gt(ot,Lt){ot.push(Lt.precision),ot.push(Lt.outputColorSpace),ot.push(Lt.envMapMode),ot.push(Lt.envMapCubeUVHeight),ot.push(Lt.mapUv),ot.push(Lt.alphaMapUv),ot.push(Lt.lightMapUv),ot.push(Lt.aoMapUv),ot.push(Lt.bumpMapUv),ot.push(Lt.normalMapUv),ot.push(Lt.displacementMapUv),ot.push(Lt.emissiveMapUv),ot.push(Lt.metalnessMapUv),ot.push(Lt.roughnessMapUv),ot.push(Lt.anisotropyMapUv),ot.push(Lt.clearcoatMapUv),ot.push(Lt.clearcoatNormalMapUv),ot.push(Lt.clearcoatRoughnessMapUv),ot.push(Lt.iridescenceMapUv),ot.push(Lt.iridescenceThicknessMapUv),ot.push(Lt.sheenColorMapUv),ot.push(Lt.sheenRoughnessMapUv),ot.push(Lt.specularMapUv),ot.push(Lt.specularColorMapUv),ot.push(Lt.specularIntensityMapUv),ot.push(Lt.transmissionMapUv),ot.push(Lt.thicknessMapUv),ot.push(Lt.combine),ot.push(Lt.fogExp2),ot.push(Lt.sizeAttenuation),ot.push(Lt.morphTargetsCount),ot.push(Lt.morphAttributeCount),ot.push(Lt.numDirLights),ot.push(Lt.numPointLights),ot.push(Lt.numSpotLights),ot.push(Lt.numSpotLightMaps),ot.push(Lt.numHemiLights),ot.push(Lt.numRectAreaLights),ot.push(Lt.numDirLightShadows),ot.push(Lt.numPointLightShadows),ot.push(Lt.numSpotLightShadows),ot.push(Lt.numSpotLightShadowsWithMaps),ot.push(Lt.numLightProbes),ot.push(Lt.shadowMapType),ot.push(Lt.toneMapping),ot.push(Lt.numClippingPlanes),ot.push(Lt.numClipIntersection),ot.push(Lt.depthPacking)}function ft(ot,Lt){y.disableAll(),Lt.isWebGL2&&y.enable(0),Lt.supportsVertexTextures&&y.enable(1),Lt.instancing&&y.enable(2),Lt.instancingColor&&y.enable(3),Lt.matcap&&y.enable(4),Lt.envMap&&y.enable(5),Lt.normalMapObjectSpace&&y.enable(6),Lt.normalMapTangentSpace&&y.enable(7),Lt.clearcoat&&y.enable(8),Lt.iridescence&&y.enable(9),Lt.alphaTest&&y.enable(10),Lt.vertexColors&&y.enable(11),Lt.vertexAlphas&&y.enable(12),Lt.vertexUv1s&&y.enable(13),Lt.vertexUv2s&&y.enable(14),Lt.vertexUv3s&&y.enable(15),Lt.vertexTangents&&y.enable(16),Lt.anisotropy&&y.enable(17),Lt.alphaHash&&y.enable(18),Lt.batching&&y.enable(19),ot.push(y.mask),y.disableAll(),Lt.fog&&y.enable(0),Lt.useFog&&y.enable(1),Lt.flatShading&&y.enable(2),Lt.logarithmicDepthBuffer&&y.enable(3),Lt.skinning&&y.enable(4),Lt.morphTargets&&y.enable(5),Lt.morphNormals&&y.enable(6),Lt.morphColors&&y.enable(7),Lt.premultipliedAlpha&&y.enable(8),Lt.shadowMapEnabled&&y.enable(9),Lt.useLegacyLights&&y.enable(10),Lt.doubleSided&&y.enable(11),Lt.flipSided&&y.enable(12),Lt.useDepthPacking&&y.enable(13),Lt.dithering&&y.enable(14),Lt.transmission&&y.enable(15),Lt.sheen&&y.enable(16),Lt.opaque&&y.enable(17),Lt.pointsUvs&&y.enable(18),Lt.decodeVideoTexture&&y.enable(19),ot.push(y.mask)}function xt(ot){let Lt=V[ot.type],be;if(Lt){let ln=xy[Lt];be=JEe.clone(ln.uniforms)}else be=ot.uniforms;return be}function Bt(ot,Lt){let be;for(let ln=0,Fn=N.length;ln0?p.push(X):j.transparent===!0?m.push(X):h.push(X)}function I(P,U,j,V,tt,Q){let X=E(P,U,j,V,tt,Q);j.transmission>0?p.unshift(X):j.transparent===!0?m.unshift(X):h.unshift(X)}function N(P,U){h.length>1&&h.sort(P||hAe),p.length>1&&p.sort(U||zYt),m.length>1&&m.sort(U||zYt)}function B(){for(let P=s,U=d.length;P=_.length?(E=new jYt,_.push(E)):E=_[m],E}function h(){d=new WeakMap}return{get:s,dispose:h}}function dAe(){let d={};return{get:function(s){if(d[s.id]!==void 0)return d[s.id];let h;switch(s.type){case"DirectionalLight":h={direction:new Ge,color:new Go};break;case"SpotLight":h={position:new Ge,direction:new Ge,color:new Go,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":h={position:new Ge,color:new Go,distance:0,decay:0};break;case"HemisphereLight":h={direction:new Ge,skyColor:new Go,groundColor:new Go};break;case"RectAreaLight":h={color:new Go,position:new Ge,halfWidth:new Ge,halfHeight:new Ge};break}return d[s.id]=h,h}}}function pAe(){let d={};return{get:function(s){if(d[s.id]!==void 0)return d[s.id];let h;switch(s.type){case"DirectionalLight":h={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Nc};break;case"SpotLight":h={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Nc};break;case"PointLight":h={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Nc,shadowCameraNear:1,shadowCameraFar:1e3};break}return d[s.id]=h,h}}}var gAe=0;function mAe(d,s){return(s.castShadow?2:0)-(d.castShadow?2:0)+(s.map?1:0)-(d.map?1:0)}function bAe(d,s){let h=new dAe,p=pAe(),m={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let B=0;B<9;B++)m.probe.push(new Ge);let _=new Ge,E=new Fu,y=new Fu;function I(B,P){let U=0,j=0,V=0;for(let ln=0;ln<9;ln++)m.probe[ln].set(0,0,0);let tt=0,Q=0,X=0,gt=0,ft=0,xt=0,Bt=0,Ot=0,Pt=0,se=0,ot=0;B.sort(mAe);let Lt=P===!0?Math.PI:1;for(let ln=0,Fn=B.length;ln0&&(s.isWebGL2?d.has("OES_texture_float_linear")===!0?(m.rectAreaLTC1=Zi.LTC_FLOAT_1,m.rectAreaLTC2=Zi.LTC_FLOAT_2):(m.rectAreaLTC1=Zi.LTC_HALF_1,m.rectAreaLTC2=Zi.LTC_HALF_2):d.has("OES_texture_float_linear")===!0?(m.rectAreaLTC1=Zi.LTC_FLOAT_1,m.rectAreaLTC2=Zi.LTC_FLOAT_2):d.has("OES_texture_half_float_linear")===!0?(m.rectAreaLTC1=Zi.LTC_HALF_1,m.rectAreaLTC2=Zi.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),m.ambient[0]=U,m.ambient[1]=j,m.ambient[2]=V;let be=m.hash;(be.directionalLength!==tt||be.pointLength!==Q||be.spotLength!==X||be.rectAreaLength!==gt||be.hemiLength!==ft||be.numDirectionalShadows!==xt||be.numPointShadows!==Bt||be.numSpotShadows!==Ot||be.numSpotMaps!==Pt||be.numLightProbes!==ot)&&(m.directional.length=tt,m.spot.length=X,m.rectArea.length=gt,m.point.length=Q,m.hemi.length=ft,m.directionalShadow.length=xt,m.directionalShadowMap.length=xt,m.pointShadow.length=Bt,m.pointShadowMap.length=Bt,m.spotShadow.length=Ot,m.spotShadowMap.length=Ot,m.directionalShadowMatrix.length=xt,m.pointShadowMatrix.length=Bt,m.spotLightMatrix.length=Ot+Pt-se,m.spotLightMap.length=Pt,m.numSpotLightShadowsWithMaps=se,m.numLightProbes=ot,be.directionalLength=tt,be.pointLength=Q,be.spotLength=X,be.rectAreaLength=gt,be.hemiLength=ft,be.numDirectionalShadows=xt,be.numPointShadows=Bt,be.numSpotShadows=Ot,be.numSpotMaps=Pt,be.numLightProbes=ot,m.version=gAe++)}function N(B,P){let U=0,j=0,V=0,tt=0,Q=0,X=P.matrixWorldInverse;for(let gt=0,ft=B.length;gt=y.length?(I=new HYt(d,s),y.push(I)):I=y[E],I}function m(){h=new WeakMap}return{get:p,dispose:m}}var $yt=class extends pS{constructor(s){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=SEe,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(s)}copy(s){return super.copy(s),this.depthPacking=s.depthPacking,this.map=s.map,this.alphaMap=s.alphaMap,this.displacementMap=s.displacementMap,this.displacementScale=s.displacementScale,this.displacementBias=s.displacementBias,this.wireframe=s.wireframe,this.wireframeLinewidth=s.wireframeLinewidth,this}},Vyt=class extends pS{constructor(s){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(s)}copy(s){return super.copy(s),this.map=s.map,this.alphaMap=s.alphaMap,this.displacementMap=s.displacementMap,this.displacementScale=s.displacementScale,this.displacementBias=s.displacementBias,this}},vAe=`void main() { gl_Position = vec4( position, 1.0 ); -}`,nAe=`uniform sampler2D shadow_pass; +}`,_Ae=`uniform sampler2D shadow_pass; uniform vec2 resolution; uniform float radius; #include @@ -3742,7 +3742,7 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function iAe(d,s,h){let g=new xU,m=new Nc,_=new Nc,S=new $f,y=new Ryt({depthPacking:aEe}),R=new Dyt,N={},B=h.maxTextureSize,P={[aS]:mg,[mg]:aS,[Xw]:Xw},U=new e3({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Nc},radius:{value:4}},vertexShader:eAe,fragmentShader:nAe}),W=U.clone();W.defines.HORIZONTAL_PASS=1;let q=new My;q.setAttribute("position",new D0(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let nt=new gg(q,U),Q=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=GYt;let X=this.type;this.render=function(Ot,Pt,se){if(Q.enabled===!1||Q.autoUpdate===!1&&Q.needsUpdate===!1||Ot.length===0)return;let ot=d.getRenderTarget(),Lt=d.getActiveCubeFace(),be=d.getActiveMipmapLevel(),ln=d.state;ln.setBlending(sS),ln.buffers.color.setClear(1,1,1,1),ln.buffers.depth.setTest(!0),ln.setScissorTest(!1);let Fn=X!==Zx&&this.type===Zx,ne=X===Zx&&this.type!==Zx;for(let xe=0,re=Ot.length;xeB||m.y>B)&&(m.x>B&&(_.x=Math.floor(B/ke.x),m.x=_.x*ke.x,Se.mapSize.x=_.x),m.y>B&&(_.y=Math.floor(B/ke.y),m.y=_.y*ke.y,Se.mapSize.y=_.y)),Se.map===null||Fn===!0||ne===!0){let en=this.type!==Zx?{minFilter:r1,magFilter:r1}:{};Se.map!==null&&Se.map.dispose(),Se.map=new Qx(m.x,m.y,en),Se.map.texture.name=hn.name+".shadowMap",Se.camera.updateProjectionMatrix()}d.setRenderTarget(Se.map),d.clear();let mn=Se.getViewportCount();for(let en=0;en0||Pt.map&&Pt.alphaTest>0){let ln=Lt.uuid,Fn=Pt.uuid,ne=N[ln];ne===void 0&&(ne={},N[ln]=ne);let xe=ne[Fn];xe===void 0&&(xe=Lt.clone(),ne[Fn]=xe,Pt.addEventListener("dispose",Bt)),Lt=xe}if(Lt.visible=Pt.visible,Lt.wireframe=Pt.wireframe,ot===Zx?Lt.side=Pt.shadowSide!==null?Pt.shadowSide:Pt.side:Lt.side=Pt.shadowSide!==null?Pt.shadowSide:P[Pt.side],Lt.alphaMap=Pt.alphaMap,Lt.alphaTest=Pt.alphaTest,Lt.map=Pt.map,Lt.clipShadows=Pt.clipShadows,Lt.clippingPlanes=Pt.clippingPlanes,Lt.clipIntersection=Pt.clipIntersection,Lt.displacementMap=Pt.displacementMap,Lt.displacementScale=Pt.displacementScale,Lt.displacementBias=Pt.displacementBias,Lt.wireframeLinewidth=Pt.wireframeLinewidth,Lt.linewidth=Pt.linewidth,se.isPointLight===!0&&Lt.isMeshDistanceMaterial===!0){let ln=d.properties.get(Lt);ln.light=se}return Lt}function xt(Ot,Pt,se,ot,Lt){if(Ot.visible===!1)return;if(Ot.layers.test(Pt.layers)&&(Ot.isMesh||Ot.isLine||Ot.isPoints)&&(Ot.castShadow||Ot.receiveShadow&&Lt===Zx)&&(!Ot.frustumCulled||g.intersectsObject(Ot))){Ot.modelViewMatrix.multiplyMatrices(se.matrixWorldInverse,Ot.matrixWorld);let Fn=s.update(Ot),ne=Ot.material;if(Array.isArray(ne)){let xe=Fn.groups;for(let re=0,hn=xe.length;re=1):mn.indexOf("OpenGL ES")!==-1&&(ke=parseFloat(/^OpenGL ES (\d)/.exec(mn)[1]),Se=ke>=2);let en=null,Qn={},ge=d.getParameter(d.SCISSOR_BOX),Pe=d.getParameter(d.VIEWPORT),ti=new $f().fromArray(ge),Yi=new $f().fromArray(Pe);function ki(Qt,Mi,sn,Zn){let oi=new Uint8Array(4),Jr=d.createTexture();d.bindTexture(Qt,Jr),d.texParameteri(Qt,d.TEXTURE_MIN_FILTER,d.NEAREST),d.texParameteri(Qt,d.TEXTURE_MAG_FILTER,d.NEAREST);for(let Bs=0;Bs"u"?!1:/OculusBrowser/g.test(navigator.userAgent),B=new WeakMap,P,U=new WeakMap,W=!1;try{W=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function q(Tt,yt){return W?new OffscreenCanvas(Tt,yt):uet("canvas")}function nt(Tt,yt,ue,fn){let An=1;if((Tt.width>fn||Tt.height>fn)&&(An=fn/Math.max(Tt.width,Tt.height)),An<1||yt===!0)if(typeof HTMLImageElement<"u"&&Tt instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&Tt instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&Tt instanceof ImageBitmap){let zn=yt?yyt:Math.floor,Li=zn(An*Tt.width),xi=zn(An*Tt.height);P===void 0&&(P=q(Li,xi));let Jt=ue?q(Li,xi):P;return Jt.width=Li,Jt.height=xi,Jt.getContext("2d").drawImage(Tt,0,0,Li,xi),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Tt.width+"x"+Tt.height+") to ("+Li+"x"+xi+")."),Jt}else return"data"in Tt&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Tt.width+"x"+Tt.height+")."),Tt;return Tt}function Q(Tt){return ZZt(Tt.width)&&ZZt(Tt.height)}function X(Tt){return y?!1:Tt.wrapS!==Zw||Tt.wrapT!==Zw||Tt.minFilter!==r1&&Tt.minFilter!==bb}function gt(Tt,yt){return Tt.generateMipmaps&&yt&&Tt.minFilter!==r1&&Tt.minFilter!==bb}function ft(Tt){d.generateMipmap(Tt)}function xt(Tt,yt,ue,fn,An=!1){if(y===!1)return yt;if(Tt!==null){if(d[Tt]!==void 0)return d[Tt];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+Tt+"'")}let zn=yt;if(yt===d.RED&&(ue===d.FLOAT&&(zn=d.R32F),ue===d.HALF_FLOAT&&(zn=d.R16F),ue===d.UNSIGNED_BYTE&&(zn=d.R8)),yt===d.RED_INTEGER&&(ue===d.UNSIGNED_BYTE&&(zn=d.R8UI),ue===d.UNSIGNED_SHORT&&(zn=d.R16UI),ue===d.UNSIGNED_INT&&(zn=d.R32UI),ue===d.BYTE&&(zn=d.R8I),ue===d.SHORT&&(zn=d.R16I),ue===d.INT&&(zn=d.R32I)),yt===d.RG&&(ue===d.FLOAT&&(zn=d.RG32F),ue===d.HALF_FLOAT&&(zn=d.RG16F),ue===d.UNSIGNED_BYTE&&(zn=d.RG8)),yt===d.RGBA){let Li=An?set:Na.getTransfer(fn);ue===d.FLOAT&&(zn=d.RGBA32F),ue===d.HALF_FLOAT&&(zn=d.RGBA16F),ue===d.UNSIGNED_BYTE&&(zn=Li===vu?d.SRGB8_ALPHA8:d.RGBA8),ue===d.UNSIGNED_SHORT_4_4_4_4&&(zn=d.RGBA4),ue===d.UNSIGNED_SHORT_5_5_5_1&&(zn=d.RGB5_A1)}return(zn===d.R16F||zn===d.R32F||zn===d.RG16F||zn===d.RG32F||zn===d.RGBA16F||zn===d.RGBA32F)&&s.get("EXT_color_buffer_float"),zn}function Bt(Tt,yt,ue){return gt(Tt,ue)===!0||Tt.isFramebufferTexture&&Tt.minFilter!==r1&&Tt.minFilter!==bb?Math.log2(Math.max(yt.width,yt.height))+1:Tt.mipmaps!==void 0&&Tt.mipmaps.length>0?Tt.mipmaps.length:Tt.isCompressedTexture&&Array.isArray(Tt.image)?yt.mipmaps.length:1}function Ot(Tt){return Tt===r1||Tt===bZt||Tt===D_t?d.NEAREST:d.LINEAR}function Pt(Tt){let yt=Tt.target;yt.removeEventListener("dispose",Pt),ot(yt),yt.isVideoTexture&&B.delete(yt)}function se(Tt){let yt=Tt.target;yt.removeEventListener("dispose",se),be(yt)}function ot(Tt){let yt=g.get(Tt);if(yt.__webglInit===void 0)return;let ue=Tt.source,fn=U.get(ue);if(fn){let An=fn[yt.__cacheKey];An.usedTimes--,An.usedTimes===0&&Lt(Tt),Object.keys(fn).length===0&&U.delete(ue)}g.remove(Tt)}function Lt(Tt){let yt=g.get(Tt);d.deleteTexture(yt.__webglTexture);let ue=Tt.source,fn=U.get(ue);delete fn[yt.__cacheKey],S.memory.textures--}function be(Tt){let yt=Tt.texture,ue=g.get(Tt),fn=g.get(yt);if(fn.__webglTexture!==void 0&&(d.deleteTexture(fn.__webglTexture),S.memory.textures--),Tt.depthTexture&&Tt.depthTexture.dispose(),Tt.isWebGLCubeRenderTarget)for(let An=0;An<6;An++){if(Array.isArray(ue.__webglFramebuffer[An]))for(let zn=0;zn=m.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+Tt+" texture units while this GPU supports only "+m.maxTextures),ln+=1,Tt}function xe(Tt){let yt=[];return yt.push(Tt.wrapS),yt.push(Tt.wrapT),yt.push(Tt.wrapR||0),yt.push(Tt.magFilter),yt.push(Tt.minFilter),yt.push(Tt.anisotropy),yt.push(Tt.internalFormat),yt.push(Tt.format),yt.push(Tt.type),yt.push(Tt.generateMipmaps),yt.push(Tt.premultiplyAlpha),yt.push(Tt.flipY),yt.push(Tt.unpackAlignment),yt.push(Tt.colorSpace),yt.join()}function re(Tt,yt){let ue=g.get(Tt);if(Tt.isVideoTexture&&rn(Tt),Tt.isRenderTargetTexture===!1&&Tt.version>0&&ue.__version!==Tt.version){let fn=Tt.image;if(fn===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(fn.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ti(ue,Tt,yt);return}}h.bindTexture(d.TEXTURE_2D,ue.__webglTexture,d.TEXTURE0+yt)}function hn(Tt,yt){let ue=g.get(Tt);if(Tt.version>0&&ue.__version!==Tt.version){ti(ue,Tt,yt);return}h.bindTexture(d.TEXTURE_2D_ARRAY,ue.__webglTexture,d.TEXTURE0+yt)}function Se(Tt,yt){let ue=g.get(Tt);if(Tt.version>0&&ue.__version!==Tt.version){ti(ue,Tt,yt);return}h.bindTexture(d.TEXTURE_3D,ue.__webglTexture,d.TEXTURE0+yt)}function ke(Tt,yt){let ue=g.get(Tt);if(Tt.version>0&&ue.__version!==Tt.version){Yi(ue,Tt,yt);return}h.bindTexture(d.TEXTURE_CUBE_MAP,ue.__webglTexture,d.TEXTURE0+yt)}let mn={[byt]:d.REPEAT,[Zw]:d.CLAMP_TO_EDGE,[wyt]:d.MIRRORED_REPEAT},en={[r1]:d.NEAREST,[bZt]:d.NEAREST_MIPMAP_NEAREST,[D_t]:d.NEAREST_MIPMAP_LINEAR,[bb]:d.LINEAR,[JMe]:d.LINEAR_MIPMAP_NEAREST,[wU]:d.LINEAR_MIPMAP_LINEAR},Qn={[lEe]:d.NEVER,[mEe]:d.ALWAYS,[hEe]:d.LESS,[tKt]:d.LEQUAL,[fEe]:d.EQUAL,[gEe]:d.GEQUAL,[dEe]:d.GREATER,[pEe]:d.NOTEQUAL};function ge(Tt,yt,ue){if(ue?(d.texParameteri(Tt,d.TEXTURE_WRAP_S,mn[yt.wrapS]),d.texParameteri(Tt,d.TEXTURE_WRAP_T,mn[yt.wrapT]),(Tt===d.TEXTURE_3D||Tt===d.TEXTURE_2D_ARRAY)&&d.texParameteri(Tt,d.TEXTURE_WRAP_R,mn[yt.wrapR]),d.texParameteri(Tt,d.TEXTURE_MAG_FILTER,en[yt.magFilter]),d.texParameteri(Tt,d.TEXTURE_MIN_FILTER,en[yt.minFilter])):(d.texParameteri(Tt,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE),d.texParameteri(Tt,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE),(Tt===d.TEXTURE_3D||Tt===d.TEXTURE_2D_ARRAY)&&d.texParameteri(Tt,d.TEXTURE_WRAP_R,d.CLAMP_TO_EDGE),(yt.wrapS!==Zw||yt.wrapT!==Zw)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),d.texParameteri(Tt,d.TEXTURE_MAG_FILTER,Ot(yt.magFilter)),d.texParameteri(Tt,d.TEXTURE_MIN_FILTER,Ot(yt.minFilter)),yt.minFilter!==r1&&yt.minFilter!==bb&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),yt.compareFunction&&(d.texParameteri(Tt,d.TEXTURE_COMPARE_MODE,d.COMPARE_REF_TO_TEXTURE),d.texParameteri(Tt,d.TEXTURE_COMPARE_FUNC,Qn[yt.compareFunction])),s.has("EXT_texture_filter_anisotropic")===!0){let fn=s.get("EXT_texture_filter_anisotropic");if(yt.magFilter===r1||yt.minFilter!==D_t&&yt.minFilter!==wU||yt.type===iS&&s.has("OES_texture_float_linear")===!1||y===!1&&yt.type===vU&&s.has("OES_texture_half_float_linear")===!1)return;(yt.anisotropy>1||g.get(yt).__currentAnisotropy)&&(d.texParameterf(Tt,fn.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(yt.anisotropy,m.getMaxAnisotropy())),g.get(yt).__currentAnisotropy=yt.anisotropy)}}function Pe(Tt,yt){let ue=!1;Tt.__webglInit===void 0&&(Tt.__webglInit=!0,yt.addEventListener("dispose",Pt));let fn=yt.source,An=U.get(fn);An===void 0&&(An={},U.set(fn,An));let zn=xe(yt);if(zn!==Tt.__cacheKey){An[zn]===void 0&&(An[zn]={texture:d.createTexture(),usedTimes:0},S.memory.textures++,ue=!0),An[zn].usedTimes++;let Li=An[Tt.__cacheKey];Li!==void 0&&(An[Tt.__cacheKey].usedTimes--,Li.usedTimes===0&&Lt(yt)),Tt.__cacheKey=zn,Tt.__webglTexture=An[zn].texture}return ue}function ti(Tt,yt,ue){let fn=d.TEXTURE_2D;(yt.isDataArrayTexture||yt.isCompressedArrayTexture)&&(fn=d.TEXTURE_2D_ARRAY),yt.isData3DTexture&&(fn=d.TEXTURE_3D);let An=Pe(Tt,yt),zn=yt.source;h.bindTexture(fn,Tt.__webglTexture,d.TEXTURE0+ue);let Li=g.get(zn);if(zn.version!==Li.__version||An===!0){h.activeTexture(d.TEXTURE0+ue);let xi=Na.getPrimaries(Na.workingColorSpace),Jt=yt.colorSpace===wb?null:Na.getPrimaries(yt.colorSpace),nn=yt.colorSpace===wb||xi===Jt?d.NONE:d.BROWSER_DEFAULT_WEBGL;d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,yt.flipY),d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,yt.premultiplyAlpha),d.pixelStorei(d.UNPACK_ALIGNMENT,yt.unpackAlignment),d.pixelStorei(d.UNPACK_COLORSPACE_CONVERSION_WEBGL,nn);let vn=X(yt)&&Q(yt.image)===!1,he=nt(yt.image,vn,!1,m.maxTextureSize);he=Pn(yt,he);let Mn=Q(he)||y,Sn=_.convert(yt.format,yt.colorSpace),gn=_.convert(yt.type),Ce=xt(yt.internalFormat,Sn,gn,yt.colorSpace,yt.isVideoTexture);ge(fn,yt,Mn);let dn,jn=yt.mipmaps,ar=y&&yt.isVideoTexture!==!0&&Ce!==KYt,gr=Li.__version===void 0||An===!0,tr=Bt(yt,he,Mn);if(yt.isDepthTexture)Ce=d.DEPTH_COMPONENT,y?yt.type===iS?Ce=d.DEPTH_COMPONENT32F:yt.type===nS?Ce=d.DEPTH_COMPONENT24:yt.type===$A?Ce=d.DEPTH24_STENCIL8:Ce=d.DEPTH_COMPONENT16:yt.type===iS&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),yt.format===VA&&Ce===d.DEPTH_COMPONENT&&yt.type!==t2t&&yt.type!==nS&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),yt.type=nS,gn=_.convert(yt.type)),yt.format===eR&&Ce===d.DEPTH_COMPONENT&&(Ce=d.DEPTH_STENCIL,yt.type!==$A&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),yt.type=$A,gn=_.convert(yt.type))),gr&&(ar?h.texStorage2D(d.TEXTURE_2D,1,Ce,he.width,he.height):h.texImage2D(d.TEXTURE_2D,0,Ce,he.width,he.height,0,Sn,gn,null));else if(yt.isDataTexture)if(jn.length>0&&Mn){ar&&gr&&h.texStorage2D(d.TEXTURE_2D,tr,Ce,jn[0].width,jn[0].height);for(let Ln=0,Qt=jn.length;Ln>=1,Qt>>=1}}else if(jn.length>0&&Mn){ar&&gr&&h.texStorage2D(d.TEXTURE_2D,tr,Ce,jn[0].width,jn[0].height);for(let Ln=0,Qt=jn.length;Ln0&&gr++,h.texStorage2D(d.TEXTURE_CUBE_MAP,gr,dn,he[0].width,he[0].height));for(let Ln=0;Ln<6;Ln++)if(vn){jn?h.texSubImage2D(d.TEXTURE_CUBE_MAP_POSITIVE_X+Ln,0,0,0,he[Ln].width,he[Ln].height,gn,Ce,he[Ln].data):h.texImage2D(d.TEXTURE_CUBE_MAP_POSITIVE_X+Ln,0,dn,he[Ln].width,he[Ln].height,0,gn,Ce,he[Ln].data);for(let Qt=0;Qt>zn),he=Math.max(1,yt.height>>zn);An===d.TEXTURE_3D||An===d.TEXTURE_2D_ARRAY?h.texImage3D(An,zn,Jt,vn,he,yt.depth,0,Li,xi,null):h.texImage2D(An,zn,Jt,vn,he,0,Li,xi,null)}h.bindFramebuffer(d.FRAMEBUFFER,Tt),ie(yt)?R.framebufferTexture2DMultisampleEXT(d.FRAMEBUFFER,fn,An,g.get(ue).__webglTexture,0,Nt(yt)):(An===d.TEXTURE_2D||An>=d.TEXTURE_CUBE_MAP_POSITIVE_X&&An<=d.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&d.framebufferTexture2D(d.FRAMEBUFFER,fn,An,g.get(ue).__webglTexture,zn),h.bindFramebuffer(d.FRAMEBUFFER,null)}function lr(Tt,yt,ue){if(d.bindRenderbuffer(d.RENDERBUFFER,Tt),yt.depthBuffer&&!yt.stencilBuffer){let fn=y===!0?d.DEPTH_COMPONENT24:d.DEPTH_COMPONENT16;if(ue||ie(yt)){let An=yt.depthTexture;An&&An.isDepthTexture&&(An.type===iS?fn=d.DEPTH_COMPONENT32F:An.type===nS&&(fn=d.DEPTH_COMPONENT24));let zn=Nt(yt);ie(yt)?R.renderbufferStorageMultisampleEXT(d.RENDERBUFFER,zn,fn,yt.width,yt.height):d.renderbufferStorageMultisample(d.RENDERBUFFER,zn,fn,yt.width,yt.height)}else d.renderbufferStorage(d.RENDERBUFFER,fn,yt.width,yt.height);d.framebufferRenderbuffer(d.FRAMEBUFFER,d.DEPTH_ATTACHMENT,d.RENDERBUFFER,Tt)}else if(yt.depthBuffer&&yt.stencilBuffer){let fn=Nt(yt);ue&&ie(yt)===!1?d.renderbufferStorageMultisample(d.RENDERBUFFER,fn,d.DEPTH24_STENCIL8,yt.width,yt.height):ie(yt)?R.renderbufferStorageMultisampleEXT(d.RENDERBUFFER,fn,d.DEPTH24_STENCIL8,yt.width,yt.height):d.renderbufferStorage(d.RENDERBUFFER,d.DEPTH_STENCIL,yt.width,yt.height),d.framebufferRenderbuffer(d.FRAMEBUFFER,d.DEPTH_STENCIL_ATTACHMENT,d.RENDERBUFFER,Tt)}else{let fn=yt.isWebGLMultipleRenderTargets===!0?yt.texture:[yt.texture];for(let An=0;An0){ue.__webglFramebuffer[xi]=[];for(let Jt=0;Jt0){ue.__webglFramebuffer=[];for(let xi=0;xi0&&ie(Tt)===!1){let xi=zn?yt:[yt];ue.__webglMultisampledFramebuffer=d.createFramebuffer(),ue.__webglColorRenderbuffer=[],h.bindFramebuffer(d.FRAMEBUFFER,ue.__webglMultisampledFramebuffer);for(let Jt=0;Jt0)for(let Jt=0;Jt0)for(let Jt=0;Jt0&&ie(Tt)===!1){let yt=Tt.isWebGLMultipleRenderTargets?Tt.texture:[Tt.texture],ue=Tt.width,fn=Tt.height,An=d.COLOR_BUFFER_BIT,zn=[],Li=Tt.stencilBuffer?d.DEPTH_STENCIL_ATTACHMENT:d.DEPTH_ATTACHMENT,xi=g.get(Tt),Jt=Tt.isWebGLMultipleRenderTargets===!0;if(Jt)for(let nn=0;nn0&&s.has("WEBGL_multisampled_render_to_texture")===!0&&yt.__useRenderToTexture!==!1}function rn(Tt){let yt=S.render.frame;B.get(Tt)!==yt&&(B.set(Tt,yt),Tt.update())}function Pn(Tt,yt){let ue=Tt.colorSpace,fn=Tt.format,An=Tt.type;return Tt.isCompressedTexture===!0||Tt.isVideoTexture===!0||Tt.format===vyt||ue!==Jx&&ue!==wb&&(Na.getTransfer(ue)===vu?y===!1?s.has("EXT_sRGB")===!0&&fn===Yw?(Tt.format=vyt,Tt.minFilter=bb,Tt.generateMipmaps=!1):yt=het.sRGBToLinear(yt):(fn!==Yw||An!==cS)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ue)),yt}this.allocateTextureUnit=ne,this.resetTextureUnits=Fn,this.setTexture2D=re,this.setTexture2DArray=hn,this.setTexture3D=Se,this.setTextureCube=ke,this.rebindTextures=wn,this.setupRenderTarget=it,this.updateRenderTargetMipmap=ut,this.updateMultisampleRenderTarget=kt,this.setupDepthRenderbuffer=Kt,this.setupFrameBufferTexture=ki,this.useMultisampledRTT=ie}function oAe(d,s,h){let g=h.isWebGL2;function m(_,S=wb){let y,R=Na.getTransfer(S);if(_===cS)return d.UNSIGNED_BYTE;if(_===VYt)return d.UNSIGNED_SHORT_4_4_4_4;if(_===qYt)return d.UNSIGNED_SHORT_5_5_5_1;if(_===QMe)return d.BYTE;if(_===tEe)return d.SHORT;if(_===t2t)return d.UNSIGNED_SHORT;if(_===$Yt)return d.INT;if(_===nS)return d.UNSIGNED_INT;if(_===iS)return d.FLOAT;if(_===vU)return g?d.HALF_FLOAT:(y=s.get("OES_texture_half_float"),y!==null?y.HALF_FLOAT_OES:null);if(_===eEe)return d.ALPHA;if(_===Yw)return d.RGBA;if(_===nEe)return d.LUMINANCE;if(_===iEe)return d.LUMINANCE_ALPHA;if(_===VA)return d.DEPTH_COMPONENT;if(_===eR)return d.DEPTH_STENCIL;if(_===vyt)return y=s.get("EXT_sRGB"),y!==null?y.SRGB_ALPHA_EXT:null;if(_===rEe)return d.RED;if(_===XYt)return d.RED_INTEGER;if(_===sEe)return d.RG;if(_===ZYt)return d.RG_INTEGER;if(_===YYt)return d.RGBA_INTEGER;if(_===N_t||_===O_t||_===B_t||_===F_t)if(R===vu)if(y=s.get("WEBGL_compressed_texture_s3tc_srgb"),y!==null){if(_===N_t)return y.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(_===O_t)return y.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(_===B_t)return y.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(_===F_t)return y.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(y=s.get("WEBGL_compressed_texture_s3tc"),y!==null){if(_===N_t)return y.COMPRESSED_RGB_S3TC_DXT1_EXT;if(_===O_t)return y.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(_===B_t)return y.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(_===F_t)return y.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(_===wZt||_===vZt||_===_Zt||_===yZt)if(y=s.get("WEBGL_compressed_texture_pvrtc"),y!==null){if(_===wZt)return y.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(_===vZt)return y.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(_===_Zt)return y.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(_===yZt)return y.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(_===KYt)return y=s.get("WEBGL_compressed_texture_etc1"),y!==null?y.COMPRESSED_RGB_ETC1_WEBGL:null;if(_===xZt||_===MZt)if(y=s.get("WEBGL_compressed_texture_etc"),y!==null){if(_===xZt)return R===vu?y.COMPRESSED_SRGB8_ETC2:y.COMPRESSED_RGB8_ETC2;if(_===MZt)return R===vu?y.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:y.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(_===EZt||_===SZt||_===TZt||_===CZt||_===AZt||_===kZt||_===LZt||_===PZt||_===IZt||_===RZt||_===DZt||_===NZt||_===OZt||_===BZt)if(y=s.get("WEBGL_compressed_texture_astc"),y!==null){if(_===EZt)return R===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:y.COMPRESSED_RGBA_ASTC_4x4_KHR;if(_===SZt)return R===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:y.COMPRESSED_RGBA_ASTC_5x4_KHR;if(_===TZt)return R===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:y.COMPRESSED_RGBA_ASTC_5x5_KHR;if(_===CZt)return R===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:y.COMPRESSED_RGBA_ASTC_6x5_KHR;if(_===AZt)return R===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:y.COMPRESSED_RGBA_ASTC_6x6_KHR;if(_===kZt)return R===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:y.COMPRESSED_RGBA_ASTC_8x5_KHR;if(_===LZt)return R===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:y.COMPRESSED_RGBA_ASTC_8x6_KHR;if(_===PZt)return R===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:y.COMPRESSED_RGBA_ASTC_8x8_KHR;if(_===IZt)return R===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:y.COMPRESSED_RGBA_ASTC_10x5_KHR;if(_===RZt)return R===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:y.COMPRESSED_RGBA_ASTC_10x6_KHR;if(_===DZt)return R===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:y.COMPRESSED_RGBA_ASTC_10x8_KHR;if(_===NZt)return R===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:y.COMPRESSED_RGBA_ASTC_10x10_KHR;if(_===OZt)return R===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:y.COMPRESSED_RGBA_ASTC_12x10_KHR;if(_===BZt)return R===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:y.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(_===U_t||_===FZt||_===UZt)if(y=s.get("EXT_texture_compression_bptc"),y!==null){if(_===U_t)return R===vu?y.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:y.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(_===FZt)return y.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(_===UZt)return y.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(_===oEe||_===zZt||_===jZt||_===HZt)if(y=s.get("EXT_texture_compression_rgtc"),y!==null){if(_===U_t)return y.COMPRESSED_RED_RGTC1_EXT;if(_===zZt)return y.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(_===jZt)return y.COMPRESSED_RED_GREEN_RGTC2_EXT;if(_===HZt)return y.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return _===$A?g?d.UNSIGNED_INT_24_8:(y=s.get("WEBGL_depth_texture"),y!==null?y.UNSIGNED_INT_24_8_WEBGL:null):d[_]!==void 0?d[_]:null}return{convert:m}}var Nyt=class extends s1{constructor(s=[]){super(),this.isArrayCamera=!0,this.cameras=s}},rS=class extends o1{constructor(){super(),this.isGroup=!0,this.type="Group"}},cAe={type:"move"},bU=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new rS,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new rS,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Ge,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Ge),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new rS,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Ge,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Ge),this._grip}dispatchEvent(s){return this._targetRay!==null&&this._targetRay.dispatchEvent(s),this._grip!==null&&this._grip.dispatchEvent(s),this._hand!==null&&this._hand.dispatchEvent(s),this}connect(s){if(s&&s.hand){let h=this._hand;if(h)for(let g of s.hand.values())this._getHandJoint(h,g)}return this.dispatchEvent({type:"connected",data:s}),this}disconnect(s){return this.dispatchEvent({type:"disconnected",data:s}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(s,h,g){let m=null,_=null,S=null,y=this._targetRay,R=this._grip,N=this._hand;if(s&&h.session.visibilityState!=="visible-blurred"){if(N&&s.hand){S=!0;for(let nt of s.hand.values()){let Q=h.getJointPose(nt,g),X=this._getHandJoint(N,nt);Q!==null&&(X.matrix.fromArray(Q.transform.matrix),X.matrix.decompose(X.position,X.rotation,X.scale),X.matrixWorldNeedsUpdate=!0,X.jointRadius=Q.radius),X.visible=Q!==null}let B=N.joints["index-finger-tip"],P=N.joints["thumb-tip"],U=B.position.distanceTo(P.position),W=.02,q=.005;N.inputState.pinching&&U>W+q?(N.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:s.handedness,target:this})):!N.inputState.pinching&&U<=W-q&&(N.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:s.handedness,target:this}))}else R!==null&&s.gripSpace&&(_=h.getPose(s.gripSpace,g),_!==null&&(R.matrix.fromArray(_.transform.matrix),R.matrix.decompose(R.position,R.rotation,R.scale),R.matrixWorldNeedsUpdate=!0,_.linearVelocity?(R.hasLinearVelocity=!0,R.linearVelocity.copy(_.linearVelocity)):R.hasLinearVelocity=!1,_.angularVelocity?(R.hasAngularVelocity=!0,R.angularVelocity.copy(_.angularVelocity)):R.hasAngularVelocity=!1));y!==null&&(m=h.getPose(s.targetRaySpace,g),m===null&&_!==null&&(m=_),m!==null&&(y.matrix.fromArray(m.transform.matrix),y.matrix.decompose(y.position,y.rotation,y.scale),y.matrixWorldNeedsUpdate=!0,m.linearVelocity?(y.hasLinearVelocity=!0,y.linearVelocity.copy(m.linearVelocity)):y.hasLinearVelocity=!1,m.angularVelocity?(y.hasAngularVelocity=!0,y.angularVelocity.copy(m.angularVelocity)):y.hasAngularVelocity=!1,this.dispatchEvent(cAe)))}return y!==null&&(y.visible=m!==null),R!==null&&(R.visible=_!==null),N!==null&&(N.visible=S!==null),this}_getHandJoint(s,h){if(s.joints[h.jointName]===void 0){let g=new rS;g.matrixAutoUpdate=!1,g.visible=!1,s.joints[h.jointName]=g,s.add(g)}return s.joints[h.jointName]}},Oyt=class extends uS{constructor(s,h){super();let g=this,m=null,_=1,S=null,y="local-floor",R=1,N=null,B=null,P=null,U=null,W=null,q=null,nt=h.getContextAttributes(),Q=null,X=null,gt=[],ft=[],xt=new Nc,Bt=null,Ot=new s1;Ot.layers.enable(1),Ot.viewport=new $f;let Pt=new s1;Pt.layers.enable(2),Pt.viewport=new $f;let se=[Ot,Pt],ot=new Nyt;ot.layers.enable(1),ot.layers.enable(2);let Lt=null,be=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ge){let Pe=gt[ge];return Pe===void 0&&(Pe=new bU,gt[ge]=Pe),Pe.getTargetRaySpace()},this.getControllerGrip=function(ge){let Pe=gt[ge];return Pe===void 0&&(Pe=new bU,gt[ge]=Pe),Pe.getGripSpace()},this.getHand=function(ge){let Pe=gt[ge];return Pe===void 0&&(Pe=new bU,gt[ge]=Pe),Pe.getHandSpace()};function ln(ge){let Pe=ft.indexOf(ge.inputSource);if(Pe===-1)return;let ti=gt[Pe];ti!==void 0&&(ti.update(ge.inputSource,ge.frame,N||S),ti.dispatchEvent({type:ge.type,data:ge.inputSource}))}function Fn(){m.removeEventListener("select",ln),m.removeEventListener("selectstart",ln),m.removeEventListener("selectend",ln),m.removeEventListener("squeeze",ln),m.removeEventListener("squeezestart",ln),m.removeEventListener("squeezeend",ln),m.removeEventListener("end",Fn),m.removeEventListener("inputsourceschange",ne);for(let ge=0;ge=0&&(ft[Yi]=null,gt[Yi].disconnect(ti))}for(let Pe=0;Pe=ft.length){ft.push(ti),Yi=lr;break}else if(ft[lr]===null){ft[lr]=ti,Yi=lr;break}if(Yi===-1)break}let ki=gt[Yi];ki&&ki.connect(ti)}}let xe=new Ge,re=new Ge;function hn(ge,Pe,ti){xe.setFromMatrixPosition(Pe.matrixWorld),re.setFromMatrixPosition(ti.matrixWorld);let Yi=xe.distanceTo(re),ki=Pe.projectionMatrix.elements,lr=ti.projectionMatrix.elements,pr=ki[14]/(ki[10]-1),Kt=ki[14]/(ki[10]+1),wn=(ki[9]+1)/ki[5],it=(ki[9]-1)/ki[5],ut=(ki[8]-1)/ki[0],kt=(lr[8]+1)/lr[0],Nt=pr*ut,ie=pr*kt,rn=Yi/(-ut+kt),Pn=rn*-ut;Pe.matrixWorld.decompose(ge.position,ge.quaternion,ge.scale),ge.translateX(Pn),ge.translateZ(rn),ge.matrixWorld.compose(ge.position,ge.quaternion,ge.scale),ge.matrixWorldInverse.copy(ge.matrixWorld).invert();let Tt=pr+rn,yt=Kt+rn,ue=Nt-Pn,fn=ie+(Yi-Pn),An=wn*Kt/yt*Tt,zn=it*Kt/yt*Tt;ge.projectionMatrix.makePerspective(ue,fn,An,zn,Tt,yt),ge.projectionMatrixInverse.copy(ge.projectionMatrix).invert()}function Se(ge,Pe){Pe===null?ge.matrixWorld.copy(ge.matrix):ge.matrixWorld.multiplyMatrices(Pe.matrixWorld,ge.matrix),ge.matrixWorldInverse.copy(ge.matrixWorld).invert()}this.updateCamera=function(ge){if(m===null)return;ot.near=Pt.near=Ot.near=ge.near,ot.far=Pt.far=Ot.far=ge.far,(Lt!==ot.near||be!==ot.far)&&(m.updateRenderState({depthNear:ot.near,depthFar:ot.far}),Lt=ot.near,be=ot.far);let Pe=ge.parent,ti=ot.cameras;Se(ot,Pe);for(let Yi=0;Yi0&&(Q.alphaTest.value=X.alphaTest);let gt=s.get(X).envMap;if(gt&&(Q.envMap.value=gt,Q.flipEnvMap.value=gt.isCubeTexture&>.isRenderTargetTexture===!1?-1:1,Q.reflectivity.value=X.reflectivity,Q.ior.value=X.ior,Q.refractionRatio.value=X.refractionRatio),X.lightMap){Q.lightMap.value=X.lightMap;let ft=d._useLegacyLights===!0?Math.PI:1;Q.lightMapIntensity.value=X.lightMapIntensity*ft,h(X.lightMap,Q.lightMapTransform)}X.aoMap&&(Q.aoMap.value=X.aoMap,Q.aoMapIntensity.value=X.aoMapIntensity,h(X.aoMap,Q.aoMapTransform))}function S(Q,X){Q.diffuse.value.copy(X.color),Q.opacity.value=X.opacity,X.map&&(Q.map.value=X.map,h(X.map,Q.mapTransform))}function y(Q,X){Q.dashSize.value=X.dashSize,Q.totalSize.value=X.dashSize+X.gapSize,Q.scale.value=X.scale}function R(Q,X,gt,ft){Q.diffuse.value.copy(X.color),Q.opacity.value=X.opacity,Q.size.value=X.size*gt,Q.scale.value=ft*.5,X.map&&(Q.map.value=X.map,h(X.map,Q.uvTransform)),X.alphaMap&&(Q.alphaMap.value=X.alphaMap,h(X.alphaMap,Q.alphaMapTransform)),X.alphaTest>0&&(Q.alphaTest.value=X.alphaTest)}function N(Q,X){Q.diffuse.value.copy(X.color),Q.opacity.value=X.opacity,Q.rotation.value=X.rotation,X.map&&(Q.map.value=X.map,h(X.map,Q.mapTransform)),X.alphaMap&&(Q.alphaMap.value=X.alphaMap,h(X.alphaMap,Q.alphaMapTransform)),X.alphaTest>0&&(Q.alphaTest.value=X.alphaTest)}function B(Q,X){Q.specular.value.copy(X.specular),Q.shininess.value=Math.max(X.shininess,1e-4)}function P(Q,X){X.gradientMap&&(Q.gradientMap.value=X.gradientMap)}function U(Q,X){Q.metalness.value=X.metalness,X.metalnessMap&&(Q.metalnessMap.value=X.metalnessMap,h(X.metalnessMap,Q.metalnessMapTransform)),Q.roughness.value=X.roughness,X.roughnessMap&&(Q.roughnessMap.value=X.roughnessMap,h(X.roughnessMap,Q.roughnessMapTransform)),s.get(X).envMap&&(Q.envMapIntensity.value=X.envMapIntensity)}function W(Q,X,gt){Q.ior.value=X.ior,X.sheen>0&&(Q.sheenColor.value.copy(X.sheenColor).multiplyScalar(X.sheen),Q.sheenRoughness.value=X.sheenRoughness,X.sheenColorMap&&(Q.sheenColorMap.value=X.sheenColorMap,h(X.sheenColorMap,Q.sheenColorMapTransform)),X.sheenRoughnessMap&&(Q.sheenRoughnessMap.value=X.sheenRoughnessMap,h(X.sheenRoughnessMap,Q.sheenRoughnessMapTransform))),X.clearcoat>0&&(Q.clearcoat.value=X.clearcoat,Q.clearcoatRoughness.value=X.clearcoatRoughness,X.clearcoatMap&&(Q.clearcoatMap.value=X.clearcoatMap,h(X.clearcoatMap,Q.clearcoatMapTransform)),X.clearcoatRoughnessMap&&(Q.clearcoatRoughnessMap.value=X.clearcoatRoughnessMap,h(X.clearcoatRoughnessMap,Q.clearcoatRoughnessMapTransform)),X.clearcoatNormalMap&&(Q.clearcoatNormalMap.value=X.clearcoatNormalMap,h(X.clearcoatNormalMap,Q.clearcoatNormalMapTransform),Q.clearcoatNormalScale.value.copy(X.clearcoatNormalScale),X.side===mg&&Q.clearcoatNormalScale.value.negate())),X.iridescence>0&&(Q.iridescence.value=X.iridescence,Q.iridescenceIOR.value=X.iridescenceIOR,Q.iridescenceThicknessMinimum.value=X.iridescenceThicknessRange[0],Q.iridescenceThicknessMaximum.value=X.iridescenceThicknessRange[1],X.iridescenceMap&&(Q.iridescenceMap.value=X.iridescenceMap,h(X.iridescenceMap,Q.iridescenceMapTransform)),X.iridescenceThicknessMap&&(Q.iridescenceThicknessMap.value=X.iridescenceThicknessMap,h(X.iridescenceThicknessMap,Q.iridescenceThicknessMapTransform))),X.transmission>0&&(Q.transmission.value=X.transmission,Q.transmissionSamplerMap.value=gt.texture,Q.transmissionSamplerSize.value.set(gt.width,gt.height),X.transmissionMap&&(Q.transmissionMap.value=X.transmissionMap,h(X.transmissionMap,Q.transmissionMapTransform)),Q.thickness.value=X.thickness,X.thicknessMap&&(Q.thicknessMap.value=X.thicknessMap,h(X.thicknessMap,Q.thicknessMapTransform)),Q.attenuationDistance.value=X.attenuationDistance,Q.attenuationColor.value.copy(X.attenuationColor)),X.anisotropy>0&&(Q.anisotropyVector.value.set(X.anisotropy*Math.cos(X.anisotropyRotation),X.anisotropy*Math.sin(X.anisotropyRotation)),X.anisotropyMap&&(Q.anisotropyMap.value=X.anisotropyMap,h(X.anisotropyMap,Q.anisotropyMapTransform))),Q.specularIntensity.value=X.specularIntensity,Q.specularColor.value.copy(X.specularColor),X.specularColorMap&&(Q.specularColorMap.value=X.specularColorMap,h(X.specularColorMap,Q.specularColorMapTransform)),X.specularIntensityMap&&(Q.specularIntensityMap.value=X.specularIntensityMap,h(X.specularIntensityMap,Q.specularIntensityMapTransform))}function q(Q,X){X.matcap&&(Q.matcap.value=X.matcap)}function nt(Q,X){let gt=s.get(X).light;Q.referencePosition.value.setFromMatrixPosition(gt.matrixWorld),Q.nearDistance.value=gt.shadow.camera.near,Q.farDistance.value=gt.shadow.camera.far}return{refreshFogUniforms:g,refreshMaterialUniforms:m}}function uAe(d,s,h,g){let m={},_={},S=[],y=h.isWebGL2?d.getParameter(d.MAX_UNIFORM_BUFFER_BINDINGS):0;function R(gt,ft){let xt=ft.program;g.uniformBlockBinding(gt,xt)}function N(gt,ft){let xt=m[gt.id];xt===void 0&&(q(gt),xt=B(gt),m[gt.id]=xt,gt.addEventListener("dispose",Q));let Bt=ft.program;g.updateUBOMapping(gt,Bt);let Ot=s.render.frame;_[gt.id]!==Ot&&(U(gt),_[gt.id]=Ot)}function B(gt){let ft=P();gt.__bindingPointIndex=ft;let xt=d.createBuffer(),Bt=gt.__size,Ot=gt.usage;return d.bindBuffer(d.UNIFORM_BUFFER,xt),d.bufferData(d.UNIFORM_BUFFER,Bt,Ot),d.bindBuffer(d.UNIFORM_BUFFER,null),d.bindBufferBase(d.UNIFORM_BUFFER,ft,xt),xt}function P(){for(let gt=0;gt0&&(xt+=Bt-Ot),gt.__size=xt,gt.__cache={},this}function nt(gt){let ft={boundary:0,storage:0};return typeof gt=="number"||typeof gt=="boolean"?(ft.boundary=4,ft.storage=4):gt.isVector2?(ft.boundary=8,ft.storage=8):gt.isVector3||gt.isColor?(ft.boundary=16,ft.storage=12):gt.isVector4?(ft.boundary=16,ft.storage=16):gt.isMatrix3?(ft.boundary=48,ft.storage=48):gt.isMatrix4?(ft.boundary=64,ft.storage=64):gt.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",gt),ft}function Q(gt){let ft=gt.target;ft.removeEventListener("dispose",Q);let xt=S.indexOf(ft.__bindingPointIndex);S.splice(xt,1),d.deleteBuffer(m[ft.id]),delete m[ft.id],delete _[ft.id]}function X(){for(let gt in m)d.deleteBuffer(m[gt]);S=[],m={},_={}}return{bind:R,update:N,dispose:X}}var MU=class{constructor(s={}){let{canvas:h=wEe(),context:g=null,depth:m=!0,stencil:_=!0,alpha:S=!1,antialias:y=!1,premultipliedAlpha:R=!0,preserveDrawingBuffer:N=!1,powerPreference:B="default",failIfMajorPerformanceCaveat:P=!1}=s;this.isWebGLRenderer=!0;let U;g!==null?U=g.getContextAttributes().alpha:U=S;let W=new Uint32Array(4),q=new Int32Array(4),nt=null,Q=null,X=[],gt=[];this.domElement=h,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Pd,this._useLegacyLights=!1,this.toneMapping=oS,this.toneMappingExposure=1;let ft=this,xt=!1,Bt=0,Ot=0,Pt=null,se=-1,ot=null,Lt=new $f,be=new $f,ln=null,Fn=new Go(0),ne=0,xe=h.width,re=h.height,hn=1,Se=null,ke=null,mn=new $f(0,0,xe,re),en=new $f(0,0,xe,re),Qn=!1,ge=new xU,Pe=!1,ti=!1,Yi=null,ki=new Bu,lr=new Nc,pr=new Ge,Kt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function wn(){return Pt===null?hn:1}let it=g;function ut(Rt,ve){for(let Je=0;Je{function Hi(){if(tn.forEach(function(Pr){Pn.get(Pr).currentProgram.isReady()&&tn.delete(Pr)}),tn.size===0){Ze(Rt);return}setTimeout(Hi,10)}kt.get("KHR_parallel_shader_compile")!==null?Hi():setTimeout(Hi,10)})};let Bs=null;function Oc(Rt){Bs&&Bs(Rt)}function ru(){il.stop()}function fc(){il.start()}let il=new rKt;il.setAnimationLoop(Oc),typeof self<"u"&&il.setContext(self),this.setAnimationLoop=function(Rt){Bs=Rt,tr.setAnimationLoop(Rt),Rt===null?il.stop():il.start()},tr.addEventListener("sessionstart",ru),tr.addEventListener("sessionend",fc),this.render=function(Rt,ve){if(ve!==void 0&&ve.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(xt===!0)return;Rt.matrixWorldAutoUpdate===!0&&Rt.updateMatrixWorld(),ve.parent===null&&ve.matrixWorldAutoUpdate===!0&&ve.updateMatrixWorld(),tr.enabled===!0&&tr.isPresenting===!0&&(tr.cameraAutoUpdate===!0&&tr.updateCamera(ve),ve=tr.getCamera()),Rt.isScene===!0&&Rt.onBeforeRender(ft,Rt,ve,Pt),Q=nn.get(Rt,gt.length),Q.init(),gt.push(Q),ki.multiplyMatrices(ve.projectionMatrix,ve.matrixWorldInverse),ge.setFromProjectionMatrix(ki),ti=this.localClippingEnabled,Pe=vn.init(this.clippingPlanes,ti),nt=Jt.get(Rt,X.length),nt.init(),X.push(nt),va(Rt,ve,0,ft.sortObjects),nt.finish(),ft.sortObjects===!0&&nt.sort(Se,ke),this.info.render.frame++,Pe===!0&&vn.beginShadows();let Je=Q.state.shadowsArray;if(he.render(Je,Rt,ve),Pe===!0&&vn.endShadows(),this.info.autoReset===!0&&this.info.reset(),Mn.render(nt,Rt),Q.setupLights(ft._useLegacyLights),ve.isArrayCamera){let tn=ve.cameras;for(let Ze=0,Hi=tn.length;Ze0?Q=gt[gt.length-1]:Q=null,X.pop(),X.length>0?nt=X[X.length-1]:nt=null};function va(Rt,ve,Je,tn){if(Rt.visible===!1)return;if(Rt.layers.test(ve.layers)){if(Rt.isGroup)Je=Rt.renderOrder;else if(Rt.isLOD)Rt.autoUpdate===!0&&Rt.update(ve);else if(Rt.isLight)Q.pushLight(Rt),Rt.castShadow&&Q.pushShadow(Rt);else if(Rt.isSprite){if(!Rt.frustumCulled||ge.intersectsSprite(Rt)){tn&&pr.setFromMatrixPosition(Rt.matrixWorld).applyMatrix4(ki);let Pr=zn.update(Rt),Gr=Rt.material;Gr.visible&&nt.push(Rt,Pr,Gr,Je,pr.z,null)}}else if((Rt.isMesh||Rt.isLine||Rt.isPoints)&&(!Rt.frustumCulled||ge.intersectsObject(Rt))){let Pr=zn.update(Rt),Gr=Rt.material;if(tn&&(Rt.boundingSphere!==void 0?(Rt.boundingSphere===null&&Rt.computeBoundingSphere(),pr.copy(Rt.boundingSphere.center)):(Pr.boundingSphere===null&&Pr.computeBoundingSphere(),pr.copy(Pr.boundingSphere.center)),pr.applyMatrix4(Rt.matrixWorld).applyMatrix4(ki)),Array.isArray(Gr)){let hs=Pr.groups;for(let Fs=0,Ms=hs.length;Fs0&&iv(Ze,Hi,ve,Je),tn&&ie.viewport(Lt.copy(tn)),Ze.length>0&&U0(Ze,ve,Je),Hi.length>0&&U0(Hi,ve,Je),Pr.length>0&&U0(Pr,ve,Je),ie.buffers.depth.setTest(!0),ie.buffers.depth.setMask(!0),ie.buffers.color.setMask(!0),ie.setPolygonOffset(!1)}function iv(Rt,ve,Je,tn){if((Je.isScene===!0?Je.overrideMaterial:null)!==null)return;let Hi=Nt.isWebGL2;Yi===null&&(Yi=new Qx(1,1,{generateMipmaps:!0,type:kt.has("EXT_color_buffer_half_float")?vU:cS,minFilter:wU,samples:Hi?4:0})),ft.getDrawingBufferSize(lr),Hi?Yi.setSize(lr.x,lr.y):Yi.setSize(yyt(lr.x),yyt(lr.y));let Pr=ft.getRenderTarget();ft.setRenderTarget(Yi),ft.getClearColor(Fn),ne=ft.getClearAlpha(),ne<1&&ft.setClearColor(16777215,.5),ft.clear();let Gr=ft.toneMapping;ft.toneMapping=oS,U0(Rt,Je,tn),Tt.updateMultisampleRenderTarget(Yi),Tt.updateRenderTargetMipmap(Yi);let hs=!1;for(let Fs=0,Ms=ve.length;Fs0),bs=!!Je.morphAttributes.position,Tc=!!Je.morphAttributes.normal,rl=!!Je.morphAttributes.color,Oa=oS;tn.toneMapped&&(Pt===null||Pt.isXRRenderTarget===!0)&&(Oa=ft.toneMapping);let wh=Je.morphAttributes.position||Je.morphAttributes.normal||Je.morphAttributes.color,Nr=wh!==void 0?wh.length:0,mr=Pn.get(tn),a1=Q.state.lights;if(Pe===!0&&(ti===!0||Rt!==ot)){let _h=Rt===ot&&tn.id===se;vn.setState(tn,Rt,_h)}let dc=!1;tn.version===mr.__version?(mr.needsLights&&mr.lightsStateVersion!==a1.state.version||mr.outputColorSpace!==Gr||Ze.isBatchedMesh&&mr.batching===!1||!Ze.isBatchedMesh&&mr.batching===!0||Ze.isInstancedMesh&&mr.instancing===!1||!Ze.isInstancedMesh&&mr.instancing===!0||Ze.isSkinnedMesh&&mr.skinning===!1||!Ze.isSkinnedMesh&&mr.skinning===!0||Ze.isInstancedMesh&&mr.instancingColor===!0&&Ze.instanceColor===null||Ze.isInstancedMesh&&mr.instancingColor===!1&&Ze.instanceColor!==null||mr.envMap!==hs||tn.fog===!0&&mr.fog!==Hi||mr.numClippingPlanes!==void 0&&(mr.numClippingPlanes!==vn.numPlanes||mr.numIntersection!==vn.numIntersection)||mr.vertexAlphas!==Fs||mr.vertexTangents!==Ms||mr.morphTargets!==bs||mr.morphNormals!==Tc||mr.morphColors!==rl||mr.toneMapping!==Oa||Nt.isWebGL2===!0&&mr.morphTargetsCount!==Nr)&&(dc=!0):(dc=!0,mr.__version=tn.version);let vh=mr.currentProgram;dc===!0&&(vh=z0(tn,ve,Ze));let _g=!1,ws=!1,$c=!1,_a=vh.getUniforms(),ff=mr.uniforms;if(ie.useProgram(vh.program)&&(_g=!0,ws=!0,$c=!0),tn.id!==se&&(se=tn.id,ws=!0),_g||ot!==Rt){_a.setValue(it,"projectionMatrix",Rt.projectionMatrix),_a.setValue(it,"viewMatrix",Rt.matrixWorldInverse);let _h=_a.map.cameraPosition;_h!==void 0&&_h.setValue(it,pr.setFromMatrixPosition(Rt.matrixWorld)),Nt.logarithmicDepthBuffer&&_a.setValue(it,"logDepthBufFC",2/(Math.log(Rt.far+1)/Math.LN2)),(tn.isMeshPhongMaterial||tn.isMeshToonMaterial||tn.isMeshLambertMaterial||tn.isMeshBasicMaterial||tn.isMeshStandardMaterial||tn.isShaderMaterial)&&_a.setValue(it,"isOrthographic",Rt.isOrthographicCamera===!0),ot!==Rt&&(ot=Rt,ws=!0,$c=!0)}if(Ze.isSkinnedMesh){_a.setOptional(it,Ze,"bindMatrix"),_a.setOptional(it,Ze,"bindMatrixInverse");let _h=Ze.skeleton;_h&&(Nt.floatVertexTextures?(_h.boneTexture===null&&_h.computeBoneTexture(),_a.setValue(it,"boneTexture",_h.boneTexture,Tt)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}Ze.isBatchedMesh&&(_a.setOptional(it,Ze,"batchingTexture"),_a.setValue(it,"batchingTexture",Ze._matricesTexture,Tt));let Bl=Je.morphAttributes;if((Bl.position!==void 0||Bl.normal!==void 0||Bl.color!==void 0&&Nt.isWebGL2===!0)&&Sn.update(Ze,Je,vh),(ws||mr.receiveShadow!==Ze.receiveShadow)&&(mr.receiveShadow=Ze.receiveShadow,_a.setValue(it,"receiveShadow",Ze.receiveShadow)),tn.isMeshGouraudMaterial&&tn.envMap!==null&&(ff.envMap.value=hs,ff.flipEnvMap.value=hs.isCubeTexture&&hs.isRenderTargetTexture===!1?-1:1),ws&&(_a.setValue(it,"toneMappingExposure",ft.toneMappingExposure),mr.needsLights&&ov(ff,$c),Hi&&tn.fog===!0&&xi.refreshFogUniforms(ff,Hi),xi.refreshMaterialUniforms(ff,tn,hn,re,Yi),JI.upload(it,j0(mr),ff,Tt)),tn.isShaderMaterial&&tn.uniformsNeedUpdate===!0&&(JI.upload(it,j0(mr),ff,Tt),tn.uniformsNeedUpdate=!1),tn.isSpriteMaterial&&_a.setValue(it,"center",Ze.center),_a.setValue(it,"modelViewMatrix",Ze.modelViewMatrix),_a.setValue(it,"normalMatrix",Ze.normalMatrix),_a.setValue(it,"modelMatrix",Ze.matrixWorld),tn.isShaderMaterial||tn.isRawShaderMaterial){let _h=tn.uniformsGroups;for(let u1=0,Nd=_h.length;u10&&Tt.useMultisampledRTT(Rt)===!1?Ze=Pn.get(Rt).__webglMultisampledFramebuffer:Array.isArray(Ms)?Ze=Ms[Je]:Ze=Ms,Lt.copy(Rt.viewport),be.copy(Rt.scissor),ln=Rt.scissorTest}else Lt.copy(mn).multiplyScalar(hn).floor(),be.copy(en).multiplyScalar(hn).floor(),ln=Qn;if(ie.bindFramebuffer(it.FRAMEBUFFER,Ze)&&Nt.drawBuffers&&tn&&ie.drawBuffers(Rt,Ze),ie.viewport(Lt),ie.scissor(be),ie.setScissorTest(ln),Hi){let hs=Pn.get(Rt.texture);it.framebufferTexture2D(it.FRAMEBUFFER,it.COLOR_ATTACHMENT0,it.TEXTURE_CUBE_MAP_POSITIVE_X+ve,hs.__webglTexture,Je)}else if(Pr){let hs=Pn.get(Rt.texture),Fs=ve||0;it.framebufferTextureLayer(it.FRAMEBUFFER,it.COLOR_ATTACHMENT0,hs.__webglTexture,Je||0,Fs)}se=-1},this.readRenderTargetPixels=function(Rt,ve,Je,tn,Ze,Hi,Pr){if(!(Rt&&Rt.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Gr=Pn.get(Rt).__webglFramebuffer;if(Rt.isWebGLCubeRenderTarget&&Pr!==void 0&&(Gr=Gr[Pr]),Gr){ie.bindFramebuffer(it.FRAMEBUFFER,Gr);try{let hs=Rt.texture,Fs=hs.format,Ms=hs.type;if(Fs!==Yw&&dn.convert(Fs)!==it.getParameter(it.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}let bs=Ms===vU&&(kt.has("EXT_color_buffer_half_float")||Nt.isWebGL2&&kt.has("EXT_color_buffer_float"));if(Ms!==cS&&dn.convert(Ms)!==it.getParameter(it.IMPLEMENTATION_COLOR_READ_TYPE)&&!(Ms===iS&&(Nt.isWebGL2||kt.has("OES_texture_float")||kt.has("WEBGL_color_buffer_float")))&&!bs){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}ve>=0&&ve<=Rt.width-tn&&Je>=0&&Je<=Rt.height-Ze&&it.readPixels(ve,Je,tn,Ze,dn.convert(Fs),dn.convert(Ms),Hi)}finally{let hs=Pt!==null?Pn.get(Pt).__webglFramebuffer:null;ie.bindFramebuffer(it.FRAMEBUFFER,hs)}}},this.copyFramebufferToTexture=function(Rt,ve,Je=0){let tn=Math.pow(2,-Je),Ze=Math.floor(ve.image.width*tn),Hi=Math.floor(ve.image.height*tn);Tt.setTexture2D(ve,0),it.copyTexSubImage2D(it.TEXTURE_2D,Je,0,0,Rt.x,Rt.y,Ze,Hi),ie.unbindTexture()},this.copyTextureToTexture=function(Rt,ve,Je,tn=0){let Ze=ve.image.width,Hi=ve.image.height,Pr=dn.convert(Je.format),Gr=dn.convert(Je.type);Tt.setTexture2D(Je,0),it.pixelStorei(it.UNPACK_FLIP_Y_WEBGL,Je.flipY),it.pixelStorei(it.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Je.premultiplyAlpha),it.pixelStorei(it.UNPACK_ALIGNMENT,Je.unpackAlignment),ve.isDataTexture?it.texSubImage2D(it.TEXTURE_2D,tn,Rt.x,Rt.y,Ze,Hi,Pr,Gr,ve.image.data):ve.isCompressedTexture?it.compressedTexSubImage2D(it.TEXTURE_2D,tn,Rt.x,Rt.y,ve.mipmaps[0].width,ve.mipmaps[0].height,Pr,ve.mipmaps[0].data):it.texSubImage2D(it.TEXTURE_2D,tn,Rt.x,Rt.y,Pr,Gr,ve.image),tn===0&&Je.generateMipmaps&&it.generateMipmap(it.TEXTURE_2D),ie.unbindTexture()},this.copyTextureToTexture3D=function(Rt,ve,Je,tn,Ze=0){if(ft.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}let Hi=Rt.max.x-Rt.min.x+1,Pr=Rt.max.y-Rt.min.y+1,Gr=Rt.max.z-Rt.min.z+1,hs=dn.convert(tn.format),Fs=dn.convert(tn.type),Ms;if(tn.isData3DTexture)Tt.setTexture3D(tn,0),Ms=it.TEXTURE_3D;else if(tn.isDataArrayTexture||tn.isCompressedArrayTexture)Tt.setTexture2DArray(tn,0),Ms=it.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}it.pixelStorei(it.UNPACK_FLIP_Y_WEBGL,tn.flipY),it.pixelStorei(it.UNPACK_PREMULTIPLY_ALPHA_WEBGL,tn.premultiplyAlpha),it.pixelStorei(it.UNPACK_ALIGNMENT,tn.unpackAlignment);let bs=it.getParameter(it.UNPACK_ROW_LENGTH),Tc=it.getParameter(it.UNPACK_IMAGE_HEIGHT),rl=it.getParameter(it.UNPACK_SKIP_PIXELS),Oa=it.getParameter(it.UNPACK_SKIP_ROWS),wh=it.getParameter(it.UNPACK_SKIP_IMAGES),Nr=Je.isCompressedTexture?Je.mipmaps[Ze]:Je.image;it.pixelStorei(it.UNPACK_ROW_LENGTH,Nr.width),it.pixelStorei(it.UNPACK_IMAGE_HEIGHT,Nr.height),it.pixelStorei(it.UNPACK_SKIP_PIXELS,Rt.min.x),it.pixelStorei(it.UNPACK_SKIP_ROWS,Rt.min.y),it.pixelStorei(it.UNPACK_SKIP_IMAGES,Rt.min.z),Je.isDataTexture||Je.isData3DTexture?it.texSubImage3D(Ms,Ze,ve.x,ve.y,ve.z,Hi,Pr,Gr,hs,Fs,Nr.data):Je.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),it.compressedTexSubImage3D(Ms,Ze,ve.x,ve.y,ve.z,Hi,Pr,Gr,hs,Nr.data)):it.texSubImage3D(Ms,Ze,ve.x,ve.y,ve.z,Hi,Pr,Gr,hs,Fs,Nr),it.pixelStorei(it.UNPACK_ROW_LENGTH,bs),it.pixelStorei(it.UNPACK_IMAGE_HEIGHT,Tc),it.pixelStorei(it.UNPACK_SKIP_PIXELS,rl),it.pixelStorei(it.UNPACK_SKIP_ROWS,Oa),it.pixelStorei(it.UNPACK_SKIP_IMAGES,wh),Ze===0&&tn.generateMipmaps&&it.generateMipmap(Ms),ie.unbindTexture()},this.initTexture=function(Rt){Rt.isCubeTexture?Tt.setTextureCube(Rt,0):Rt.isData3DTexture?Tt.setTexture3D(Rt,0):Rt.isDataArrayTexture||Rt.isCompressedArrayTexture?Tt.setTexture2DArray(Rt,0):Tt.setTexture2D(Rt,0),ie.unbindTexture()},this.resetState=function(){Bt=0,Ot=0,Pt=null,ie.reset(),jn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Kx}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(s){this._outputColorSpace=s;let h=this.getContext();h.drawingBufferColorSpace=s===e2t?"display-p3":"srgb",h.unpackColorSpace=Na.workingColorSpace===Det?"display-p3":"srgb"}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===Pd?qA:JYt}set outputEncoding(s){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=s===qA?Pd:Jx}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(s){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=s}},Byt=class extends MU{};Byt.prototype.isWebGL1Renderer=!0;var xet=class extends o1{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(s,h){return super.copy(s,h),s.background!==null&&(this.background=s.background.clone()),s.environment!==null&&(this.environment=s.environment.clone()),s.fog!==null&&(this.fog=s.fog.clone()),this.backgroundBlurriness=s.backgroundBlurriness,this.backgroundIntensity=s.backgroundIntensity,s.overrideMaterial!==null&&(this.overrideMaterial=s.overrideMaterial.clone()),this.matrixAutoUpdate=s.matrixAutoUpdate,this}toJSON(s){let h=super.toJSON(s);return this.fog!==null&&(h.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(h.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(h.object.backgroundIntensity=this.backgroundIntensity),h}};var Met=class extends D0{constructor(s,h,g,m=1){super(s,h,g),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=m}copy(s){return super.copy(s),this.meshPerAttribute=s.meshPerAttribute,this}toJSON(){let s=super.toJSON();return s.meshPerAttribute=this.meshPerAttribute,s.isInstancedBufferAttribute=!0,s}},qI=new Bu,RYt=new Bu,Ztt=[],DYt=new t3,lAe=new Bu,pU=new gg,gU=new lS,Eet=class extends gg{constructor(s,h,g){super(s,h),this.isInstancedMesh=!0,this.instanceMatrix=new Met(new Float32Array(g*16),16),this.instanceColor=null,this.count=g,this.boundingBox=null,this.boundingSphere=null;for(let m=0;mR)continue;U.applyMatrix4(this.matrixWorld);let se=s.ray.origin.distanceTo(U);ses.far||h.push({distance:se,point:P.clone().applyMatrix4(this.matrixWorld),index:ft,face:null,faceIndex:null,object:this})}}else{let X=Math.max(0,S.start),gt=Math.min(Q.count,S.start+S.count);for(let ft=X,xt=gt-1;ftR)continue;U.applyMatrix4(this.matrixWorld);let Ot=s.ray.origin.distanceTo(U);Ots.far||h.push({distance:Ot,point:P.clone().applyMatrix4(this.matrixWorld),index:ft,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){let h=this.geometry.morphAttributes,g=Object.keys(h);if(g.length>0){let m=h[g[0]];if(m!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let _=0,S=m.length;_=_)){let y=h[1];s=_)break e}S=g,g=0;break n}break t}for(;g>>1;sh;)--S;if(++S,_!==0||S!==m){_>=S&&(S=Math.max(S,1),_=S-1);let y=this.getValueSize();this.times=g.slice(_,S),this.values=this.values.slice(_*y,S*y)}return this}validate(){let s=!0,h=this.getValueSize();h-Math.floor(h)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),s=!1);let g=this.times,m=this.values,_=g.length;_===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),s=!1);let S=null;for(let y=0;y!==_;y++){let R=g[y];if(typeof R=="number"&&isNaN(R)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,y,R),s=!1;break}if(S!==null&&S>R){console.error("THREE.KeyframeTrack: Out of order keys.",this,y,R,S),s=!1;break}S=R}if(m!==void 0&&hAe(m))for(let y=0,R=m.length;y!==R;++y){let N=m[y];if(isNaN(N)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,y,N),s=!1;break}}return s}optimize(){let s=this.times.slice(),h=this.values.slice(),g=this.getValueSize(),m=this.getInterpolation()===z_t,_=s.length-1,S=1;for(let y=1;y<_;++y){let R=!1,N=s[y],B=s[y+1];if(N!==B&&(y!==1||N!==s[0]))if(m)R=!0;else{let P=y*g,U=P-g,W=P+g;for(let q=0;q!==g;++q){let nt=h[P+q];if(nt!==h[U+q]||nt!==h[W+q]){R=!0;break}}}if(R){if(y!==S){s[S]=s[y];let P=y*g,U=S*g;for(let W=0;W!==g;++W)h[U+W]=h[P+W]}++S}}if(_>0){s[S]=s[_];for(let y=_*g,R=S*g,N=0;N!==g;++N)h[R+N]=h[y+N];++S}return S!==s.length?(this.times=s.slice(0,S),this.values=h.slice(0,S*g)):(this.times=s,this.values=h),this}clone(){let s=this.times.slice(),h=this.values.slice(),g=this.constructor,m=new g(this.name,s,h);return m.createInterpolant=this.createInterpolant,m}};Jw.prototype.TimeBufferType=Float32Array;Jw.prototype.ValueBufferType=Float32Array;Jw.prototype.DefaultInterpolation=ret;var ZA=class extends Jw{};ZA.prototype.ValueTypeName="bool";ZA.prototype.ValueBufferType=Array;ZA.prototype.DefaultInterpolation=iet;ZA.prototype.InterpolantFactoryMethodLinear=void 0;ZA.prototype.InterpolantFactoryMethodSmooth=void 0;var Hyt=class extends Jw{};Hyt.prototype.ValueTypeName="color";var Gyt=class extends Jw{};Gyt.prototype.ValueTypeName="number";var Wyt=class extends sR{constructor(s,h,g,m){super(s,h,g,m)}interpolate_(s,h,g,m){let _=this.resultBuffer,S=this.sampleValues,y=this.valueSize,R=(g-h)/(m-h),N=s*y;for(let B=N+y;N!==B;N+=4)xy.slerpFlat(_,0,S,N-y,S,N,R);return _}},SU=class extends Jw{InterpolantFactoryMethodLinear(s){return new Wyt(this.times,this.values,this.getValueSize(),s)}};SU.prototype.ValueTypeName="quaternion";SU.prototype.DefaultInterpolation=ret;SU.prototype.InterpolantFactoryMethodSmooth=void 0;var YA=class extends Jw{};YA.prototype.ValueTypeName="string";YA.prototype.ValueBufferType=Array;YA.prototype.DefaultInterpolation=iet;YA.prototype.InterpolantFactoryMethodLinear=void 0;YA.prototype.InterpolantFactoryMethodSmooth=void 0;var $yt=class extends Jw{};$yt.prototype.ValueTypeName="vector";var Vyt=class{constructor(s,h,g){let m=this,_=!1,S=0,y=0,R,N=[];this.onStart=void 0,this.onLoad=s,this.onProgress=h,this.onError=g,this.itemStart=function(B){y++,_===!1&&m.onStart!==void 0&&m.onStart(B,S,y),_=!0},this.itemEnd=function(B){S++,m.onProgress!==void 0&&m.onProgress(B,S,y),S===y&&(_=!1,m.onLoad!==void 0&&m.onLoad())},this.itemError=function(B){m.onError!==void 0&&m.onError(B)},this.resolveURL=function(B){return R?R(B):B},this.setURLModifier=function(B){return R=B,this},this.addHandler=function(B,P){return N.push(B,P),this},this.removeHandler=function(B){let P=N.indexOf(B);return P!==-1&&N.splice(P,2),this},this.getHandler=function(B){for(let P=0,U=N.length;PB||m.y>B)&&(m.x>B&&(_.x=Math.floor(B/ke.x),m.x=_.x*ke.x,Se.mapSize.x=_.x),m.y>B&&(_.y=Math.floor(B/ke.y),m.y=_.y*ke.y,Se.mapSize.y=_.y)),Se.map===null||Fn===!0||ne===!0){let en=this.type!==Kx?{minFilter:r1,magFilter:r1}:{};Se.map!==null&&Se.map.dispose(),Se.map=new e3(m.x,m.y,en),Se.map.texture.name=hn.name+".shadowMap",Se.camera.updateProjectionMatrix()}d.setRenderTarget(Se.map),d.clear();let mn=Se.getViewportCount();for(let en=0;en0||Pt.map&&Pt.alphaTest>0){let ln=Lt.uuid,Fn=Pt.uuid,ne=N[ln];ne===void 0&&(ne={},N[ln]=ne);let xe=ne[Fn];xe===void 0&&(xe=Lt.clone(),ne[Fn]=xe,Pt.addEventListener("dispose",Bt)),Lt=xe}if(Lt.visible=Pt.visible,Lt.wireframe=Pt.wireframe,ot===Kx?Lt.side=Pt.shadowSide!==null?Pt.shadowSide:Pt.side:Lt.side=Pt.shadowSide!==null?Pt.shadowSide:P[Pt.side],Lt.alphaMap=Pt.alphaMap,Lt.alphaTest=Pt.alphaTest,Lt.map=Pt.map,Lt.clipShadows=Pt.clipShadows,Lt.clippingPlanes=Pt.clippingPlanes,Lt.clipIntersection=Pt.clipIntersection,Lt.displacementMap=Pt.displacementMap,Lt.displacementScale=Pt.displacementScale,Lt.displacementBias=Pt.displacementBias,Lt.wireframeLinewidth=Pt.wireframeLinewidth,Lt.linewidth=Pt.linewidth,se.isPointLight===!0&&Lt.isMeshDistanceMaterial===!0){let ln=d.properties.get(Lt);ln.light=se}return Lt}function xt(Ot,Pt,se,ot,Lt){if(Ot.visible===!1)return;if(Ot.layers.test(Pt.layers)&&(Ot.isMesh||Ot.isLine||Ot.isPoints)&&(Ot.castShadow||Ot.receiveShadow&&Lt===Kx)&&(!Ot.frustumCulled||p.intersectsObject(Ot))){Ot.modelViewMatrix.multiplyMatrices(se.matrixWorldInverse,Ot.matrixWorld);let Fn=s.update(Ot),ne=Ot.material;if(Array.isArray(ne)){let xe=Fn.groups;for(let re=0,hn=xe.length;re=1):mn.indexOf("OpenGL ES")!==-1&&(ke=parseFloat(/^OpenGL ES (\d)/.exec(mn)[1]),Se=ke>=2);let en=null,Qn={},ge=d.getParameter(d.SCISSOR_BOX),Pe=d.getParameter(d.VIEWPORT),ti=new $f().fromArray(ge),Yi=new $f().fromArray(Pe);function ki(Qt,Mi,sn,Zn){let oi=new Uint8Array(4),Jr=d.createTexture();d.bindTexture(Qt,Jr),d.texParameteri(Qt,d.TEXTURE_MIN_FILTER,d.NEAREST),d.texParameteri(Qt,d.TEXTURE_MAG_FILTER,d.NEAREST);for(let Bs=0;Bs"u"?!1:/OculusBrowser/g.test(navigator.userAgent),B=new WeakMap,P,U=new WeakMap,j=!1;try{j=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function V(Tt,yt){return j?new OffscreenCanvas(Tt,yt):pet("canvas")}function tt(Tt,yt,ue,fn){let An=1;if((Tt.width>fn||Tt.height>fn)&&(An=fn/Math.max(Tt.width,Tt.height)),An<1||yt===!0)if(typeof HTMLImageElement<"u"&&Tt instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&Tt instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&Tt instanceof ImageBitmap){let zn=yt?Ryt:Math.floor,Li=zn(An*Tt.width),xi=zn(An*Tt.height);P===void 0&&(P=V(Li,xi));let Jt=ue?V(Li,xi):P;return Jt.width=Li,Jt.height=xi,Jt.getContext("2d").drawImage(Tt,0,0,Li,xi),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Tt.width+"x"+Tt.height+") to ("+Li+"x"+xi+")."),Jt}else return"data"in Tt&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Tt.width+"x"+Tt.height+")."),Tt;return Tt}function Q(Tt){return sYt(Tt.width)&&sYt(Tt.height)}function X(Tt){return y?!1:Tt.wrapS!==Zw||Tt.wrapT!==Zw||Tt.minFilter!==r1&&Tt.minFilter!==bb}function gt(Tt,yt){return Tt.generateMipmaps&&yt&&Tt.minFilter!==r1&&Tt.minFilter!==bb}function ft(Tt){d.generateMipmap(Tt)}function xt(Tt,yt,ue,fn,An=!1){if(y===!1)return yt;if(Tt!==null){if(d[Tt]!==void 0)return d[Tt];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+Tt+"'")}let zn=yt;if(yt===d.RED&&(ue===d.FLOAT&&(zn=d.R32F),ue===d.HALF_FLOAT&&(zn=d.R16F),ue===d.UNSIGNED_BYTE&&(zn=d.R8)),yt===d.RED_INTEGER&&(ue===d.UNSIGNED_BYTE&&(zn=d.R8UI),ue===d.UNSIGNED_SHORT&&(zn=d.R16UI),ue===d.UNSIGNED_INT&&(zn=d.R32UI),ue===d.BYTE&&(zn=d.R8I),ue===d.SHORT&&(zn=d.R16I),ue===d.INT&&(zn=d.R32I)),yt===d.RG&&(ue===d.FLOAT&&(zn=d.RG32F),ue===d.HALF_FLOAT&&(zn=d.RG16F),ue===d.UNSIGNED_BYTE&&(zn=d.RG8)),yt===d.RGBA){let Li=An?uet:Na.getTransfer(fn);ue===d.FLOAT&&(zn=d.RGBA32F),ue===d.HALF_FLOAT&&(zn=d.RGBA16F),ue===d.UNSIGNED_BYTE&&(zn=Li===vu?d.SRGB8_ALPHA8:d.RGBA8),ue===d.UNSIGNED_SHORT_4_4_4_4&&(zn=d.RGBA4),ue===d.UNSIGNED_SHORT_5_5_5_1&&(zn=d.RGB5_A1)}return(zn===d.R16F||zn===d.R32F||zn===d.RG16F||zn===d.RG32F||zn===d.RGBA16F||zn===d.RGBA32F)&&s.get("EXT_color_buffer_float"),zn}function Bt(Tt,yt,ue){return gt(Tt,ue)===!0||Tt.isFramebufferTexture&&Tt.minFilter!==r1&&Tt.minFilter!==bb?Math.log2(Math.max(yt.width,yt.height))+1:Tt.mipmaps!==void 0&&Tt.mipmaps.length>0?Tt.mipmaps.length:Tt.isCompressedTexture&&Array.isArray(Tt.image)?yt.mipmaps.length:1}function Ot(Tt){return Tt===r1||Tt===CZt||Tt===V_t?d.NEAREST:d.LINEAR}function Pt(Tt){let yt=Tt.target;yt.removeEventListener("dispose",Pt),ot(yt),yt.isVideoTexture&&B.delete(yt)}function se(Tt){let yt=Tt.target;yt.removeEventListener("dispose",se),be(yt)}function ot(Tt){let yt=p.get(Tt);if(yt.__webglInit===void 0)return;let ue=Tt.source,fn=U.get(ue);if(fn){let An=fn[yt.__cacheKey];An.usedTimes--,An.usedTimes===0&&Lt(Tt),Object.keys(fn).length===0&&U.delete(ue)}p.remove(Tt)}function Lt(Tt){let yt=p.get(Tt);d.deleteTexture(yt.__webglTexture);let ue=Tt.source,fn=U.get(ue);delete fn[yt.__cacheKey],E.memory.textures--}function be(Tt){let yt=Tt.texture,ue=p.get(Tt),fn=p.get(yt);if(fn.__webglTexture!==void 0&&(d.deleteTexture(fn.__webglTexture),E.memory.textures--),Tt.depthTexture&&Tt.depthTexture.dispose(),Tt.isWebGLCubeRenderTarget)for(let An=0;An<6;An++){if(Array.isArray(ue.__webglFramebuffer[An]))for(let zn=0;zn=m.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+Tt+" texture units while this GPU supports only "+m.maxTextures),ln+=1,Tt}function xe(Tt){let yt=[];return yt.push(Tt.wrapS),yt.push(Tt.wrapT),yt.push(Tt.wrapR||0),yt.push(Tt.magFilter),yt.push(Tt.minFilter),yt.push(Tt.anisotropy),yt.push(Tt.internalFormat),yt.push(Tt.format),yt.push(Tt.type),yt.push(Tt.generateMipmaps),yt.push(Tt.premultiplyAlpha),yt.push(Tt.flipY),yt.push(Tt.unpackAlignment),yt.push(Tt.colorSpace),yt.join()}function re(Tt,yt){let ue=p.get(Tt);if(Tt.isVideoTexture&&rn(Tt),Tt.isRenderTargetTexture===!1&&Tt.version>0&&ue.__version!==Tt.version){let fn=Tt.image;if(fn===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(fn.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ti(ue,Tt,yt);return}}h.bindTexture(d.TEXTURE_2D,ue.__webglTexture,d.TEXTURE0+yt)}function hn(Tt,yt){let ue=p.get(Tt);if(Tt.version>0&&ue.__version!==Tt.version){ti(ue,Tt,yt);return}h.bindTexture(d.TEXTURE_2D_ARRAY,ue.__webglTexture,d.TEXTURE0+yt)}function Se(Tt,yt){let ue=p.get(Tt);if(Tt.version>0&&ue.__version!==Tt.version){ti(ue,Tt,yt);return}h.bindTexture(d.TEXTURE_3D,ue.__webglTexture,d.TEXTURE0+yt)}function ke(Tt,yt){let ue=p.get(Tt);if(Tt.version>0&&ue.__version!==Tt.version){Yi(ue,Tt,yt);return}h.bindTexture(d.TEXTURE_CUBE_MAP,ue.__webglTexture,d.TEXTURE0+yt)}let mn={[kyt]:d.REPEAT,[Zw]:d.CLAMP_TO_EDGE,[Lyt]:d.MIRRORED_REPEAT},en={[r1]:d.NEAREST,[CZt]:d.NEAREST_MIPMAP_NEAREST,[V_t]:d.NEAREST_MIPMAP_LINEAR,[bb]:d.LINEAR,[mEe]:d.LINEAR_MIPMAP_NEAREST,[xU]:d.LINEAR_MIPMAP_LINEAR},Qn={[AEe]:d.NEVER,[DEe]:d.ALWAYS,[kEe]:d.LESS,[lKt]:d.LEQUAL,[LEe]:d.EQUAL,[REe]:d.GEQUAL,[PEe]:d.GREATER,[IEe]:d.NOTEQUAL};function ge(Tt,yt,ue){if(ue?(d.texParameteri(Tt,d.TEXTURE_WRAP_S,mn[yt.wrapS]),d.texParameteri(Tt,d.TEXTURE_WRAP_T,mn[yt.wrapT]),(Tt===d.TEXTURE_3D||Tt===d.TEXTURE_2D_ARRAY)&&d.texParameteri(Tt,d.TEXTURE_WRAP_R,mn[yt.wrapR]),d.texParameteri(Tt,d.TEXTURE_MAG_FILTER,en[yt.magFilter]),d.texParameteri(Tt,d.TEXTURE_MIN_FILTER,en[yt.minFilter])):(d.texParameteri(Tt,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE),d.texParameteri(Tt,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE),(Tt===d.TEXTURE_3D||Tt===d.TEXTURE_2D_ARRAY)&&d.texParameteri(Tt,d.TEXTURE_WRAP_R,d.CLAMP_TO_EDGE),(yt.wrapS!==Zw||yt.wrapT!==Zw)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),d.texParameteri(Tt,d.TEXTURE_MAG_FILTER,Ot(yt.magFilter)),d.texParameteri(Tt,d.TEXTURE_MIN_FILTER,Ot(yt.minFilter)),yt.minFilter!==r1&&yt.minFilter!==bb&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),yt.compareFunction&&(d.texParameteri(Tt,d.TEXTURE_COMPARE_MODE,d.COMPARE_REF_TO_TEXTURE),d.texParameteri(Tt,d.TEXTURE_COMPARE_FUNC,Qn[yt.compareFunction])),s.has("EXT_texture_filter_anisotropic")===!0){let fn=s.get("EXT_texture_filter_anisotropic");if(yt.magFilter===r1||yt.minFilter!==V_t&&yt.minFilter!==xU||yt.type===oS&&s.has("OES_texture_float_linear")===!1||y===!1&&yt.type===MU&&s.has("OES_texture_half_float_linear")===!1)return;(yt.anisotropy>1||p.get(yt).__currentAnisotropy)&&(d.texParameterf(Tt,fn.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(yt.anisotropy,m.getMaxAnisotropy())),p.get(yt).__currentAnisotropy=yt.anisotropy)}}function Pe(Tt,yt){let ue=!1;Tt.__webglInit===void 0&&(Tt.__webglInit=!0,yt.addEventListener("dispose",Pt));let fn=yt.source,An=U.get(fn);An===void 0&&(An={},U.set(fn,An));let zn=xe(yt);if(zn!==Tt.__cacheKey){An[zn]===void 0&&(An[zn]={texture:d.createTexture(),usedTimes:0},E.memory.textures++,ue=!0),An[zn].usedTimes++;let Li=An[Tt.__cacheKey];Li!==void 0&&(An[Tt.__cacheKey].usedTimes--,Li.usedTimes===0&&Lt(yt)),Tt.__cacheKey=zn,Tt.__webglTexture=An[zn].texture}return ue}function ti(Tt,yt,ue){let fn=d.TEXTURE_2D;(yt.isDataArrayTexture||yt.isCompressedArrayTexture)&&(fn=d.TEXTURE_2D_ARRAY),yt.isData3DTexture&&(fn=d.TEXTURE_3D);let An=Pe(Tt,yt),zn=yt.source;h.bindTexture(fn,Tt.__webglTexture,d.TEXTURE0+ue);let Li=p.get(zn);if(zn.version!==Li.__version||An===!0){h.activeTexture(d.TEXTURE0+ue);let xi=Na.getPrimaries(Na.workingColorSpace),Jt=yt.colorSpace===wb?null:Na.getPrimaries(yt.colorSpace),nn=yt.colorSpace===wb||xi===Jt?d.NONE:d.BROWSER_DEFAULT_WEBGL;d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,yt.flipY),d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,yt.premultiplyAlpha),d.pixelStorei(d.UNPACK_ALIGNMENT,yt.unpackAlignment),d.pixelStorei(d.UNPACK_COLORSPACE_CONVERSION_WEBGL,nn);let vn=X(yt)&&Q(yt.image)===!1,he=tt(yt.image,vn,!1,m.maxTextureSize);he=Pn(yt,he);let Mn=Q(he)||y,Sn=_.convert(yt.format,yt.colorSpace),gn=_.convert(yt.type),Ce=xt(yt.internalFormat,Sn,gn,yt.colorSpace,yt.isVideoTexture);ge(fn,yt,Mn);let dn,jn=yt.mipmaps,ar=y&&yt.isVideoTexture!==!0&&Ce!==cKt,gr=Li.__version===void 0||An===!0,tr=Bt(yt,he,Mn);if(yt.isDepthTexture)Ce=d.DEPTH_COMPONENT,y?yt.type===oS?Ce=d.DEPTH_COMPONENT32F:yt.type===sS?Ce=d.DEPTH_COMPONENT24:yt.type===XA?Ce=d.DEPTH24_STENCIL8:Ce=d.DEPTH_COMPONENT16:yt.type===oS&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),yt.format===ZA&&Ce===d.DEPTH_COMPONENT&&yt.type!==f2t&&yt.type!==sS&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),yt.type=sS,gn=_.convert(yt.type)),yt.format===rR&&Ce===d.DEPTH_COMPONENT&&(Ce=d.DEPTH_STENCIL,yt.type!==XA&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),yt.type=XA,gn=_.convert(yt.type))),gr&&(ar?h.texStorage2D(d.TEXTURE_2D,1,Ce,he.width,he.height):h.texImage2D(d.TEXTURE_2D,0,Ce,he.width,he.height,0,Sn,gn,null));else if(yt.isDataTexture)if(jn.length>0&&Mn){ar&&gr&&h.texStorage2D(d.TEXTURE_2D,tr,Ce,jn[0].width,jn[0].height);for(let Ln=0,Qt=jn.length;Ln>=1,Qt>>=1}}else if(jn.length>0&&Mn){ar&&gr&&h.texStorage2D(d.TEXTURE_2D,tr,Ce,jn[0].width,jn[0].height);for(let Ln=0,Qt=jn.length;Ln0&&gr++,h.texStorage2D(d.TEXTURE_CUBE_MAP,gr,dn,he[0].width,he[0].height));for(let Ln=0;Ln<6;Ln++)if(vn){jn?h.texSubImage2D(d.TEXTURE_CUBE_MAP_POSITIVE_X+Ln,0,0,0,he[Ln].width,he[Ln].height,gn,Ce,he[Ln].data):h.texImage2D(d.TEXTURE_CUBE_MAP_POSITIVE_X+Ln,0,dn,he[Ln].width,he[Ln].height,0,gn,Ce,he[Ln].data);for(let Qt=0;Qt>zn),he=Math.max(1,yt.height>>zn);An===d.TEXTURE_3D||An===d.TEXTURE_2D_ARRAY?h.texImage3D(An,zn,Jt,vn,he,yt.depth,0,Li,xi,null):h.texImage2D(An,zn,Jt,vn,he,0,Li,xi,null)}h.bindFramebuffer(d.FRAMEBUFFER,Tt),ie(yt)?I.framebufferTexture2DMultisampleEXT(d.FRAMEBUFFER,fn,An,p.get(ue).__webglTexture,0,Nt(yt)):(An===d.TEXTURE_2D||An>=d.TEXTURE_CUBE_MAP_POSITIVE_X&&An<=d.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&d.framebufferTexture2D(d.FRAMEBUFFER,fn,An,p.get(ue).__webglTexture,zn),h.bindFramebuffer(d.FRAMEBUFFER,null)}function lr(Tt,yt,ue){if(d.bindRenderbuffer(d.RENDERBUFFER,Tt),yt.depthBuffer&&!yt.stencilBuffer){let fn=y===!0?d.DEPTH_COMPONENT24:d.DEPTH_COMPONENT16;if(ue||ie(yt)){let An=yt.depthTexture;An&&An.isDepthTexture&&(An.type===oS?fn=d.DEPTH_COMPONENT32F:An.type===sS&&(fn=d.DEPTH_COMPONENT24));let zn=Nt(yt);ie(yt)?I.renderbufferStorageMultisampleEXT(d.RENDERBUFFER,zn,fn,yt.width,yt.height):d.renderbufferStorageMultisample(d.RENDERBUFFER,zn,fn,yt.width,yt.height)}else d.renderbufferStorage(d.RENDERBUFFER,fn,yt.width,yt.height);d.framebufferRenderbuffer(d.FRAMEBUFFER,d.DEPTH_ATTACHMENT,d.RENDERBUFFER,Tt)}else if(yt.depthBuffer&&yt.stencilBuffer){let fn=Nt(yt);ue&&ie(yt)===!1?d.renderbufferStorageMultisample(d.RENDERBUFFER,fn,d.DEPTH24_STENCIL8,yt.width,yt.height):ie(yt)?I.renderbufferStorageMultisampleEXT(d.RENDERBUFFER,fn,d.DEPTH24_STENCIL8,yt.width,yt.height):d.renderbufferStorage(d.RENDERBUFFER,d.DEPTH_STENCIL,yt.width,yt.height),d.framebufferRenderbuffer(d.FRAMEBUFFER,d.DEPTH_STENCIL_ATTACHMENT,d.RENDERBUFFER,Tt)}else{let fn=yt.isWebGLMultipleRenderTargets===!0?yt.texture:[yt.texture];for(let An=0;An0){ue.__webglFramebuffer[xi]=[];for(let Jt=0;Jt0){ue.__webglFramebuffer=[];for(let xi=0;xi0&&ie(Tt)===!1){let xi=zn?yt:[yt];ue.__webglMultisampledFramebuffer=d.createFramebuffer(),ue.__webglColorRenderbuffer=[],h.bindFramebuffer(d.FRAMEBUFFER,ue.__webglMultisampledFramebuffer);for(let Jt=0;Jt0)for(let Jt=0;Jt0)for(let Jt=0;Jt0&&ie(Tt)===!1){let yt=Tt.isWebGLMultipleRenderTargets?Tt.texture:[Tt.texture],ue=Tt.width,fn=Tt.height,An=d.COLOR_BUFFER_BIT,zn=[],Li=Tt.stencilBuffer?d.DEPTH_STENCIL_ATTACHMENT:d.DEPTH_ATTACHMENT,xi=p.get(Tt),Jt=Tt.isWebGLMultipleRenderTargets===!0;if(Jt)for(let nn=0;nn0&&s.has("WEBGL_multisampled_render_to_texture")===!0&&yt.__useRenderToTexture!==!1}function rn(Tt){let yt=E.render.frame;B.get(Tt)!==yt&&(B.set(Tt,yt),Tt.update())}function Pn(Tt,yt){let ue=Tt.colorSpace,fn=Tt.format,An=Tt.type;return Tt.isCompressedTexture===!0||Tt.isVideoTexture===!0||Tt.format===Pyt||ue!==t3&&ue!==wb&&(Na.getTransfer(ue)===vu?y===!1?s.has("EXT_sRGB")===!0&&fn===Yw?(Tt.format=Pyt,Tt.minFilter=bb,Tt.generateMipmaps=!1):yt=get.sRGBToLinear(yt):(fn!==Yw||An!==lS)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ue)),yt}this.allocateTextureUnit=ne,this.resetTextureUnits=Fn,this.setTexture2D=re,this.setTexture2DArray=hn,this.setTexture3D=Se,this.setTextureCube=ke,this.rebindTextures=wn,this.setupRenderTarget=it,this.updateRenderTargetMipmap=ut,this.updateMultisampleRenderTarget=kt,this.setupDepthRenderbuffer=Kt,this.setupFrameBufferTexture=ki,this.useMultisampledRTT=ie}function EAe(d,s,h){let p=h.isWebGL2;function m(_,E=wb){let y,I=Na.getTransfer(E);if(_===lS)return d.UNSIGNED_BYTE;if(_===nKt)return d.UNSIGNED_SHORT_4_4_4_4;if(_===iKt)return d.UNSIGNED_SHORT_5_5_5_1;if(_===bEe)return d.BYTE;if(_===wEe)return d.SHORT;if(_===f2t)return d.UNSIGNED_SHORT;if(_===eKt)return d.INT;if(_===sS)return d.UNSIGNED_INT;if(_===oS)return d.FLOAT;if(_===MU)return p?d.HALF_FLOAT:(y=s.get("OES_texture_half_float"),y!==null?y.HALF_FLOAT_OES:null);if(_===vEe)return d.ALPHA;if(_===Yw)return d.RGBA;if(_===_Ee)return d.LUMINANCE;if(_===yEe)return d.LUMINANCE_ALPHA;if(_===ZA)return d.DEPTH_COMPONENT;if(_===rR)return d.DEPTH_STENCIL;if(_===Pyt)return y=s.get("EXT_sRGB"),y!==null?y.SRGB_ALPHA_EXT:null;if(_===xEe)return d.RED;if(_===rKt)return d.RED_INTEGER;if(_===MEe)return d.RG;if(_===sKt)return d.RG_INTEGER;if(_===oKt)return d.RGBA_INTEGER;if(_===q_t||_===X_t||_===Z_t||_===Y_t)if(I===vu)if(y=s.get("WEBGL_compressed_texture_s3tc_srgb"),y!==null){if(_===q_t)return y.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(_===X_t)return y.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(_===Z_t)return y.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(_===Y_t)return y.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(y=s.get("WEBGL_compressed_texture_s3tc"),y!==null){if(_===q_t)return y.COMPRESSED_RGB_S3TC_DXT1_EXT;if(_===X_t)return y.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(_===Z_t)return y.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(_===Y_t)return y.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(_===AZt||_===kZt||_===LZt||_===PZt)if(y=s.get("WEBGL_compressed_texture_pvrtc"),y!==null){if(_===AZt)return y.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(_===kZt)return y.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(_===LZt)return y.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(_===PZt)return y.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(_===cKt)return y=s.get("WEBGL_compressed_texture_etc1"),y!==null?y.COMPRESSED_RGB_ETC1_WEBGL:null;if(_===IZt||_===RZt)if(y=s.get("WEBGL_compressed_texture_etc"),y!==null){if(_===IZt)return I===vu?y.COMPRESSED_SRGB8_ETC2:y.COMPRESSED_RGB8_ETC2;if(_===RZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:y.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(_===DZt||_===NZt||_===OZt||_===BZt||_===FZt||_===UZt||_===zZt||_===jZt||_===HZt||_===GZt||_===WZt||_===$Zt||_===VZt||_===qZt)if(y=s.get("WEBGL_compressed_texture_astc"),y!==null){if(_===DZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:y.COMPRESSED_RGBA_ASTC_4x4_KHR;if(_===NZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:y.COMPRESSED_RGBA_ASTC_5x4_KHR;if(_===OZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:y.COMPRESSED_RGBA_ASTC_5x5_KHR;if(_===BZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:y.COMPRESSED_RGBA_ASTC_6x5_KHR;if(_===FZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:y.COMPRESSED_RGBA_ASTC_6x6_KHR;if(_===UZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:y.COMPRESSED_RGBA_ASTC_8x5_KHR;if(_===zZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:y.COMPRESSED_RGBA_ASTC_8x6_KHR;if(_===jZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:y.COMPRESSED_RGBA_ASTC_8x8_KHR;if(_===HZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:y.COMPRESSED_RGBA_ASTC_10x5_KHR;if(_===GZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:y.COMPRESSED_RGBA_ASTC_10x6_KHR;if(_===WZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:y.COMPRESSED_RGBA_ASTC_10x8_KHR;if(_===$Zt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:y.COMPRESSED_RGBA_ASTC_10x10_KHR;if(_===VZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:y.COMPRESSED_RGBA_ASTC_12x10_KHR;if(_===qZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:y.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(_===K_t||_===XZt||_===ZZt)if(y=s.get("EXT_texture_compression_bptc"),y!==null){if(_===K_t)return I===vu?y.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:y.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(_===XZt)return y.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(_===ZZt)return y.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(_===EEe||_===YZt||_===KZt||_===JZt)if(y=s.get("EXT_texture_compression_rgtc"),y!==null){if(_===K_t)return y.COMPRESSED_RED_RGTC1_EXT;if(_===YZt)return y.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(_===KZt)return y.COMPRESSED_RED_GREEN_RGTC2_EXT;if(_===JZt)return y.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return _===XA?p?d.UNSIGNED_INT_24_8:(y=s.get("WEBGL_depth_texture"),y!==null?y.UNSIGNED_INT_24_8_WEBGL:null):d[_]!==void 0?d[_]:null}return{convert:m}}var qyt=class extends s1{constructor(s=[]){super(),this.isArrayCamera=!0,this.cameras=s}},cS=class extends o1{constructor(){super(),this.isGroup=!0,this.type="Group"}},SAe={type:"move"},yU=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new cS,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new cS,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Ge,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Ge),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new cS,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Ge,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Ge),this._grip}dispatchEvent(s){return this._targetRay!==null&&this._targetRay.dispatchEvent(s),this._grip!==null&&this._grip.dispatchEvent(s),this._hand!==null&&this._hand.dispatchEvent(s),this}connect(s){if(s&&s.hand){let h=this._hand;if(h)for(let p of s.hand.values())this._getHandJoint(h,p)}return this.dispatchEvent({type:"connected",data:s}),this}disconnect(s){return this.dispatchEvent({type:"disconnected",data:s}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(s,h,p){let m=null,_=null,E=null,y=this._targetRay,I=this._grip,N=this._hand;if(s&&h.session.visibilityState!=="visible-blurred"){if(N&&s.hand){E=!0;for(let tt of s.hand.values()){let Q=h.getJointPose(tt,p),X=this._getHandJoint(N,tt);Q!==null&&(X.matrix.fromArray(Q.transform.matrix),X.matrix.decompose(X.position,X.rotation,X.scale),X.matrixWorldNeedsUpdate=!0,X.jointRadius=Q.radius),X.visible=Q!==null}let B=N.joints["index-finger-tip"],P=N.joints["thumb-tip"],U=B.position.distanceTo(P.position),j=.02,V=.005;N.inputState.pinching&&U>j+V?(N.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:s.handedness,target:this})):!N.inputState.pinching&&U<=j-V&&(N.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:s.handedness,target:this}))}else I!==null&&s.gripSpace&&(_=h.getPose(s.gripSpace,p),_!==null&&(I.matrix.fromArray(_.transform.matrix),I.matrix.decompose(I.position,I.rotation,I.scale),I.matrixWorldNeedsUpdate=!0,_.linearVelocity?(I.hasLinearVelocity=!0,I.linearVelocity.copy(_.linearVelocity)):I.hasLinearVelocity=!1,_.angularVelocity?(I.hasAngularVelocity=!0,I.angularVelocity.copy(_.angularVelocity)):I.hasAngularVelocity=!1));y!==null&&(m=h.getPose(s.targetRaySpace,p),m===null&&_!==null&&(m=_),m!==null&&(y.matrix.fromArray(m.transform.matrix),y.matrix.decompose(y.position,y.rotation,y.scale),y.matrixWorldNeedsUpdate=!0,m.linearVelocity?(y.hasLinearVelocity=!0,y.linearVelocity.copy(m.linearVelocity)):y.hasLinearVelocity=!1,m.angularVelocity?(y.hasAngularVelocity=!0,y.angularVelocity.copy(m.angularVelocity)):y.hasAngularVelocity=!1,this.dispatchEvent(SAe)))}return y!==null&&(y.visible=m!==null),I!==null&&(I.visible=_!==null),N!==null&&(N.visible=E!==null),this}_getHandJoint(s,h){if(s.joints[h.jointName]===void 0){let p=new cS;p.matrixAutoUpdate=!1,p.visible=!1,s.joints[h.jointName]=p,s.add(p)}return s.joints[h.jointName]}},Xyt=class extends fS{constructor(s,h){super();let p=this,m=null,_=1,E=null,y="local-floor",I=1,N=null,B=null,P=null,U=null,j=null,V=null,tt=h.getContextAttributes(),Q=null,X=null,gt=[],ft=[],xt=new Nc,Bt=null,Ot=new s1;Ot.layers.enable(1),Ot.viewport=new $f;let Pt=new s1;Pt.layers.enable(2),Pt.viewport=new $f;let se=[Ot,Pt],ot=new qyt;ot.layers.enable(1),ot.layers.enable(2);let Lt=null,be=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ge){let Pe=gt[ge];return Pe===void 0&&(Pe=new yU,gt[ge]=Pe),Pe.getTargetRaySpace()},this.getControllerGrip=function(ge){let Pe=gt[ge];return Pe===void 0&&(Pe=new yU,gt[ge]=Pe),Pe.getGripSpace()},this.getHand=function(ge){let Pe=gt[ge];return Pe===void 0&&(Pe=new yU,gt[ge]=Pe),Pe.getHandSpace()};function ln(ge){let Pe=ft.indexOf(ge.inputSource);if(Pe===-1)return;let ti=gt[Pe];ti!==void 0&&(ti.update(ge.inputSource,ge.frame,N||E),ti.dispatchEvent({type:ge.type,data:ge.inputSource}))}function Fn(){m.removeEventListener("select",ln),m.removeEventListener("selectstart",ln),m.removeEventListener("selectend",ln),m.removeEventListener("squeeze",ln),m.removeEventListener("squeezestart",ln),m.removeEventListener("squeezeend",ln),m.removeEventListener("end",Fn),m.removeEventListener("inputsourceschange",ne);for(let ge=0;ge=0&&(ft[Yi]=null,gt[Yi].disconnect(ti))}for(let Pe=0;Pe=ft.length){ft.push(ti),Yi=lr;break}else if(ft[lr]===null){ft[lr]=ti,Yi=lr;break}if(Yi===-1)break}let ki=gt[Yi];ki&&ki.connect(ti)}}let xe=new Ge,re=new Ge;function hn(ge,Pe,ti){xe.setFromMatrixPosition(Pe.matrixWorld),re.setFromMatrixPosition(ti.matrixWorld);let Yi=xe.distanceTo(re),ki=Pe.projectionMatrix.elements,lr=ti.projectionMatrix.elements,pr=ki[14]/(ki[10]-1),Kt=ki[14]/(ki[10]+1),wn=(ki[9]+1)/ki[5],it=(ki[9]-1)/ki[5],ut=(ki[8]-1)/ki[0],kt=(lr[8]+1)/lr[0],Nt=pr*ut,ie=pr*kt,rn=Yi/(-ut+kt),Pn=rn*-ut;Pe.matrixWorld.decompose(ge.position,ge.quaternion,ge.scale),ge.translateX(Pn),ge.translateZ(rn),ge.matrixWorld.compose(ge.position,ge.quaternion,ge.scale),ge.matrixWorldInverse.copy(ge.matrixWorld).invert();let Tt=pr+rn,yt=Kt+rn,ue=Nt-Pn,fn=ie+(Yi-Pn),An=wn*Kt/yt*Tt,zn=it*Kt/yt*Tt;ge.projectionMatrix.makePerspective(ue,fn,An,zn,Tt,yt),ge.projectionMatrixInverse.copy(ge.projectionMatrix).invert()}function Se(ge,Pe){Pe===null?ge.matrixWorld.copy(ge.matrix):ge.matrixWorld.multiplyMatrices(Pe.matrixWorld,ge.matrix),ge.matrixWorldInverse.copy(ge.matrixWorld).invert()}this.updateCamera=function(ge){if(m===null)return;ot.near=Pt.near=Ot.near=ge.near,ot.far=Pt.far=Ot.far=ge.far,(Lt!==ot.near||be!==ot.far)&&(m.updateRenderState({depthNear:ot.near,depthFar:ot.far}),Lt=ot.near,be=ot.far);let Pe=ge.parent,ti=ot.cameras;Se(ot,Pe);for(let Yi=0;Yi0&&(Q.alphaTest.value=X.alphaTest);let gt=s.get(X).envMap;if(gt&&(Q.envMap.value=gt,Q.flipEnvMap.value=gt.isCubeTexture&>.isRenderTargetTexture===!1?-1:1,Q.reflectivity.value=X.reflectivity,Q.ior.value=X.ior,Q.refractionRatio.value=X.refractionRatio),X.lightMap){Q.lightMap.value=X.lightMap;let ft=d._useLegacyLights===!0?Math.PI:1;Q.lightMapIntensity.value=X.lightMapIntensity*ft,h(X.lightMap,Q.lightMapTransform)}X.aoMap&&(Q.aoMap.value=X.aoMap,Q.aoMapIntensity.value=X.aoMapIntensity,h(X.aoMap,Q.aoMapTransform))}function E(Q,X){Q.diffuse.value.copy(X.color),Q.opacity.value=X.opacity,X.map&&(Q.map.value=X.map,h(X.map,Q.mapTransform))}function y(Q,X){Q.dashSize.value=X.dashSize,Q.totalSize.value=X.dashSize+X.gapSize,Q.scale.value=X.scale}function I(Q,X,gt,ft){Q.diffuse.value.copy(X.color),Q.opacity.value=X.opacity,Q.size.value=X.size*gt,Q.scale.value=ft*.5,X.map&&(Q.map.value=X.map,h(X.map,Q.uvTransform)),X.alphaMap&&(Q.alphaMap.value=X.alphaMap,h(X.alphaMap,Q.alphaMapTransform)),X.alphaTest>0&&(Q.alphaTest.value=X.alphaTest)}function N(Q,X){Q.diffuse.value.copy(X.color),Q.opacity.value=X.opacity,Q.rotation.value=X.rotation,X.map&&(Q.map.value=X.map,h(X.map,Q.mapTransform)),X.alphaMap&&(Q.alphaMap.value=X.alphaMap,h(X.alphaMap,Q.alphaMapTransform)),X.alphaTest>0&&(Q.alphaTest.value=X.alphaTest)}function B(Q,X){Q.specular.value.copy(X.specular),Q.shininess.value=Math.max(X.shininess,1e-4)}function P(Q,X){X.gradientMap&&(Q.gradientMap.value=X.gradientMap)}function U(Q,X){Q.metalness.value=X.metalness,X.metalnessMap&&(Q.metalnessMap.value=X.metalnessMap,h(X.metalnessMap,Q.metalnessMapTransform)),Q.roughness.value=X.roughness,X.roughnessMap&&(Q.roughnessMap.value=X.roughnessMap,h(X.roughnessMap,Q.roughnessMapTransform)),s.get(X).envMap&&(Q.envMapIntensity.value=X.envMapIntensity)}function j(Q,X,gt){Q.ior.value=X.ior,X.sheen>0&&(Q.sheenColor.value.copy(X.sheenColor).multiplyScalar(X.sheen),Q.sheenRoughness.value=X.sheenRoughness,X.sheenColorMap&&(Q.sheenColorMap.value=X.sheenColorMap,h(X.sheenColorMap,Q.sheenColorMapTransform)),X.sheenRoughnessMap&&(Q.sheenRoughnessMap.value=X.sheenRoughnessMap,h(X.sheenRoughnessMap,Q.sheenRoughnessMapTransform))),X.clearcoat>0&&(Q.clearcoat.value=X.clearcoat,Q.clearcoatRoughness.value=X.clearcoatRoughness,X.clearcoatMap&&(Q.clearcoatMap.value=X.clearcoatMap,h(X.clearcoatMap,Q.clearcoatMapTransform)),X.clearcoatRoughnessMap&&(Q.clearcoatRoughnessMap.value=X.clearcoatRoughnessMap,h(X.clearcoatRoughnessMap,Q.clearcoatRoughnessMapTransform)),X.clearcoatNormalMap&&(Q.clearcoatNormalMap.value=X.clearcoatNormalMap,h(X.clearcoatNormalMap,Q.clearcoatNormalMapTransform),Q.clearcoatNormalScale.value.copy(X.clearcoatNormalScale),X.side===mg&&Q.clearcoatNormalScale.value.negate())),X.iridescence>0&&(Q.iridescence.value=X.iridescence,Q.iridescenceIOR.value=X.iridescenceIOR,Q.iridescenceThicknessMinimum.value=X.iridescenceThicknessRange[0],Q.iridescenceThicknessMaximum.value=X.iridescenceThicknessRange[1],X.iridescenceMap&&(Q.iridescenceMap.value=X.iridescenceMap,h(X.iridescenceMap,Q.iridescenceMapTransform)),X.iridescenceThicknessMap&&(Q.iridescenceThicknessMap.value=X.iridescenceThicknessMap,h(X.iridescenceThicknessMap,Q.iridescenceThicknessMapTransform))),X.transmission>0&&(Q.transmission.value=X.transmission,Q.transmissionSamplerMap.value=gt.texture,Q.transmissionSamplerSize.value.set(gt.width,gt.height),X.transmissionMap&&(Q.transmissionMap.value=X.transmissionMap,h(X.transmissionMap,Q.transmissionMapTransform)),Q.thickness.value=X.thickness,X.thicknessMap&&(Q.thicknessMap.value=X.thicknessMap,h(X.thicknessMap,Q.thicknessMapTransform)),Q.attenuationDistance.value=X.attenuationDistance,Q.attenuationColor.value.copy(X.attenuationColor)),X.anisotropy>0&&(Q.anisotropyVector.value.set(X.anisotropy*Math.cos(X.anisotropyRotation),X.anisotropy*Math.sin(X.anisotropyRotation)),X.anisotropyMap&&(Q.anisotropyMap.value=X.anisotropyMap,h(X.anisotropyMap,Q.anisotropyMapTransform))),Q.specularIntensity.value=X.specularIntensity,Q.specularColor.value.copy(X.specularColor),X.specularColorMap&&(Q.specularColorMap.value=X.specularColorMap,h(X.specularColorMap,Q.specularColorMapTransform)),X.specularIntensityMap&&(Q.specularIntensityMap.value=X.specularIntensityMap,h(X.specularIntensityMap,Q.specularIntensityMapTransform))}function V(Q,X){X.matcap&&(Q.matcap.value=X.matcap)}function tt(Q,X){let gt=s.get(X).light;Q.referencePosition.value.setFromMatrixPosition(gt.matrixWorld),Q.nearDistance.value=gt.shadow.camera.near,Q.farDistance.value=gt.shadow.camera.far}return{refreshFogUniforms:p,refreshMaterialUniforms:m}}function CAe(d,s,h,p){let m={},_={},E=[],y=h.isWebGL2?d.getParameter(d.MAX_UNIFORM_BUFFER_BINDINGS):0;function I(gt,ft){let xt=ft.program;p.uniformBlockBinding(gt,xt)}function N(gt,ft){let xt=m[gt.id];xt===void 0&&(V(gt),xt=B(gt),m[gt.id]=xt,gt.addEventListener("dispose",Q));let Bt=ft.program;p.updateUBOMapping(gt,Bt);let Ot=s.render.frame;_[gt.id]!==Ot&&(U(gt),_[gt.id]=Ot)}function B(gt){let ft=P();gt.__bindingPointIndex=ft;let xt=d.createBuffer(),Bt=gt.__size,Ot=gt.usage;return d.bindBuffer(d.UNIFORM_BUFFER,xt),d.bufferData(d.UNIFORM_BUFFER,Bt,Ot),d.bindBuffer(d.UNIFORM_BUFFER,null),d.bindBufferBase(d.UNIFORM_BUFFER,ft,xt),xt}function P(){for(let gt=0;gt0&&(xt+=Bt-Ot),gt.__size=xt,gt.__cache={},this}function tt(gt){let ft={boundary:0,storage:0};return typeof gt=="number"||typeof gt=="boolean"?(ft.boundary=4,ft.storage=4):gt.isVector2?(ft.boundary=8,ft.storage=8):gt.isVector3||gt.isColor?(ft.boundary=16,ft.storage=12):gt.isVector4?(ft.boundary=16,ft.storage=16):gt.isMatrix3?(ft.boundary=48,ft.storage=48):gt.isMatrix4?(ft.boundary=64,ft.storage=64):gt.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",gt),ft}function Q(gt){let ft=gt.target;ft.removeEventListener("dispose",Q);let xt=E.indexOf(ft.__bindingPointIndex);E.splice(xt,1),d.deleteBuffer(m[ft.id]),delete m[ft.id],delete _[ft.id]}function X(){for(let gt in m)d.deleteBuffer(m[gt]);E=[],m={},_={}}return{bind:I,update:N,dispose:X}}var CU=class{constructor(s={}){let{canvas:h=OEe(),context:p=null,depth:m=!0,stencil:_=!0,alpha:E=!1,antialias:y=!1,premultipliedAlpha:I=!0,preserveDrawingBuffer:N=!1,powerPreference:B="default",failIfMajorPerformanceCaveat:P=!1}=s;this.isWebGLRenderer=!0;let U;p!==null?U=p.getContextAttributes().alpha:U=E;let j=new Uint32Array(4),V=new Int32Array(4),tt=null,Q=null,X=[],gt=[];this.domElement=h,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Pd,this._useLegacyLights=!1,this.toneMapping=uS,this.toneMappingExposure=1;let ft=this,xt=!1,Bt=0,Ot=0,Pt=null,se=-1,ot=null,Lt=new $f,be=new $f,ln=null,Fn=new Go(0),ne=0,xe=h.width,re=h.height,hn=1,Se=null,ke=null,mn=new $f(0,0,xe,re),en=new $f(0,0,xe,re),Qn=!1,ge=new TU,Pe=!1,ti=!1,Yi=null,ki=new Fu,lr=new Nc,pr=new Ge,Kt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function wn(){return Pt===null?hn:1}let it=p;function ut(Rt,ve){for(let Je=0;Je{function Hi(){if(tn.forEach(function(Pr){Pn.get(Pr).currentProgram.isReady()&&tn.delete(Pr)}),tn.size===0){Ze(Rt);return}setTimeout(Hi,10)}kt.get("KHR_parallel_shader_compile")!==null?Hi():setTimeout(Hi,10)})};let Bs=null;function Oc(Rt){Bs&&Bs(Rt)}function ru(){il.stop()}function fc(){il.start()}let il=new pKt;il.setAnimationLoop(Oc),typeof self<"u"&&il.setContext(self),this.setAnimationLoop=function(Rt){Bs=Rt,tr.setAnimationLoop(Rt),Rt===null?il.stop():il.start()},tr.addEventListener("sessionstart",ru),tr.addEventListener("sessionend",fc),this.render=function(Rt,ve){if(ve!==void 0&&ve.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(xt===!0)return;Rt.matrixWorldAutoUpdate===!0&&Rt.updateMatrixWorld(),ve.parent===null&&ve.matrixWorldAutoUpdate===!0&&ve.updateMatrixWorld(),tr.enabled===!0&&tr.isPresenting===!0&&(tr.cameraAutoUpdate===!0&&tr.updateCamera(ve),ve=tr.getCamera()),Rt.isScene===!0&&Rt.onBeforeRender(ft,Rt,ve,Pt),Q=nn.get(Rt,gt.length),Q.init(),gt.push(Q),ki.multiplyMatrices(ve.projectionMatrix,ve.matrixWorldInverse),ge.setFromProjectionMatrix(ki),ti=this.localClippingEnabled,Pe=vn.init(this.clippingPlanes,ti),tt=Jt.get(Rt,X.length),tt.init(),X.push(tt),va(Rt,ve,0,ft.sortObjects),tt.finish(),ft.sortObjects===!0&&tt.sort(Se,ke),this.info.render.frame++,Pe===!0&&vn.beginShadows();let Je=Q.state.shadowsArray;if(he.render(Je,Rt,ve),Pe===!0&&vn.endShadows(),this.info.autoReset===!0&&this.info.reset(),Mn.render(tt,Rt),Q.setupLights(ft._useLegacyLights),ve.isArrayCamera){let tn=ve.cameras;for(let Ze=0,Hi=tn.length;Ze0?Q=gt[gt.length-1]:Q=null,X.pop(),X.length>0?tt=X[X.length-1]:tt=null};function va(Rt,ve,Je,tn){if(Rt.visible===!1)return;if(Rt.layers.test(ve.layers)){if(Rt.isGroup)Je=Rt.renderOrder;else if(Rt.isLOD)Rt.autoUpdate===!0&&Rt.update(ve);else if(Rt.isLight)Q.pushLight(Rt),Rt.castShadow&&Q.pushShadow(Rt);else if(Rt.isSprite){if(!Rt.frustumCulled||ge.intersectsSprite(Rt)){tn&&pr.setFromMatrixPosition(Rt.matrixWorld).applyMatrix4(ki);let Pr=zn.update(Rt),Gr=Rt.material;Gr.visible&&tt.push(Rt,Pr,Gr,Je,pr.z,null)}}else if((Rt.isMesh||Rt.isLine||Rt.isPoints)&&(!Rt.frustumCulled||ge.intersectsObject(Rt))){let Pr=zn.update(Rt),Gr=Rt.material;if(tn&&(Rt.boundingSphere!==void 0?(Rt.boundingSphere===null&&Rt.computeBoundingSphere(),pr.copy(Rt.boundingSphere.center)):(Pr.boundingSphere===null&&Pr.computeBoundingSphere(),pr.copy(Pr.boundingSphere.center)),pr.applyMatrix4(Rt.matrixWorld).applyMatrix4(ki)),Array.isArray(Gr)){let hs=Pr.groups;for(let Fs=0,Ms=hs.length;Fs0&&rv(Ze,Hi,ve,Je),tn&&ie.viewport(Lt.copy(tn)),Ze.length>0&&U0(Ze,ve,Je),Hi.length>0&&U0(Hi,ve,Je),Pr.length>0&&U0(Pr,ve,Je),ie.buffers.depth.setTest(!0),ie.buffers.depth.setMask(!0),ie.buffers.color.setMask(!0),ie.setPolygonOffset(!1)}function rv(Rt,ve,Je,tn){if((Je.isScene===!0?Je.overrideMaterial:null)!==null)return;let Hi=Nt.isWebGL2;Yi===null&&(Yi=new e3(1,1,{generateMipmaps:!0,type:kt.has("EXT_color_buffer_half_float")?MU:lS,minFilter:xU,samples:Hi?4:0})),ft.getDrawingBufferSize(lr),Hi?Yi.setSize(lr.x,lr.y):Yi.setSize(Ryt(lr.x),Ryt(lr.y));let Pr=ft.getRenderTarget();ft.setRenderTarget(Yi),ft.getClearColor(Fn),ne=ft.getClearAlpha(),ne<1&&ft.setClearColor(16777215,.5),ft.clear();let Gr=ft.toneMapping;ft.toneMapping=uS,U0(Rt,Je,tn),Tt.updateMultisampleRenderTarget(Yi),Tt.updateRenderTargetMipmap(Yi);let hs=!1;for(let Fs=0,Ms=ve.length;Fs0),bs=!!Je.morphAttributes.position,Tc=!!Je.morphAttributes.normal,rl=!!Je.morphAttributes.color,Oa=uS;tn.toneMapped&&(Pt===null||Pt.isXRRenderTarget===!0)&&(Oa=ft.toneMapping);let wh=Je.morphAttributes.position||Je.morphAttributes.normal||Je.morphAttributes.color,Nr=wh!==void 0?wh.length:0,mr=Pn.get(tn),a1=Q.state.lights;if(Pe===!0&&(ti===!0||Rt!==ot)){let _h=Rt===ot&&tn.id===se;vn.setState(tn,Rt,_h)}let dc=!1;tn.version===mr.__version?(mr.needsLights&&mr.lightsStateVersion!==a1.state.version||mr.outputColorSpace!==Gr||Ze.isBatchedMesh&&mr.batching===!1||!Ze.isBatchedMesh&&mr.batching===!0||Ze.isInstancedMesh&&mr.instancing===!1||!Ze.isInstancedMesh&&mr.instancing===!0||Ze.isSkinnedMesh&&mr.skinning===!1||!Ze.isSkinnedMesh&&mr.skinning===!0||Ze.isInstancedMesh&&mr.instancingColor===!0&&Ze.instanceColor===null||Ze.isInstancedMesh&&mr.instancingColor===!1&&Ze.instanceColor!==null||mr.envMap!==hs||tn.fog===!0&&mr.fog!==Hi||mr.numClippingPlanes!==void 0&&(mr.numClippingPlanes!==vn.numPlanes||mr.numIntersection!==vn.numIntersection)||mr.vertexAlphas!==Fs||mr.vertexTangents!==Ms||mr.morphTargets!==bs||mr.morphNormals!==Tc||mr.morphColors!==rl||mr.toneMapping!==Oa||Nt.isWebGL2===!0&&mr.morphTargetsCount!==Nr)&&(dc=!0):(dc=!0,mr.__version=tn.version);let vh=mr.currentProgram;dc===!0&&(vh=z0(tn,ve,Ze));let _g=!1,ws=!1,$c=!1,_a=vh.getUniforms(),ff=mr.uniforms;if(ie.useProgram(vh.program)&&(_g=!0,ws=!0,$c=!0),tn.id!==se&&(se=tn.id,ws=!0),_g||ot!==Rt){_a.setValue(it,"projectionMatrix",Rt.projectionMatrix),_a.setValue(it,"viewMatrix",Rt.matrixWorldInverse);let _h=_a.map.cameraPosition;_h!==void 0&&_h.setValue(it,pr.setFromMatrixPosition(Rt.matrixWorld)),Nt.logarithmicDepthBuffer&&_a.setValue(it,"logDepthBufFC",2/(Math.log(Rt.far+1)/Math.LN2)),(tn.isMeshPhongMaterial||tn.isMeshToonMaterial||tn.isMeshLambertMaterial||tn.isMeshBasicMaterial||tn.isMeshStandardMaterial||tn.isShaderMaterial)&&_a.setValue(it,"isOrthographic",Rt.isOrthographicCamera===!0),ot!==Rt&&(ot=Rt,ws=!0,$c=!0)}if(Ze.isSkinnedMesh){_a.setOptional(it,Ze,"bindMatrix"),_a.setOptional(it,Ze,"bindMatrixInverse");let _h=Ze.skeleton;_h&&(Nt.floatVertexTextures?(_h.boneTexture===null&&_h.computeBoneTexture(),_a.setValue(it,"boneTexture",_h.boneTexture,Tt)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}Ze.isBatchedMesh&&(_a.setOptional(it,Ze,"batchingTexture"),_a.setValue(it,"batchingTexture",Ze._matricesTexture,Tt));let Bl=Je.morphAttributes;if((Bl.position!==void 0||Bl.normal!==void 0||Bl.color!==void 0&&Nt.isWebGL2===!0)&&Sn.update(Ze,Je,vh),(ws||mr.receiveShadow!==Ze.receiveShadow)&&(mr.receiveShadow=Ze.receiveShadow,_a.setValue(it,"receiveShadow",Ze.receiveShadow)),tn.isMeshGouraudMaterial&&tn.envMap!==null&&(ff.envMap.value=hs,ff.flipEnvMap.value=hs.isCubeTexture&&hs.isRenderTargetTexture===!1?-1:1),ws&&(_a.setValue(it,"toneMappingExposure",ft.toneMappingExposure),mr.needsLights&&cv(ff,$c),Hi&&tn.fog===!0&&xi.refreshFogUniforms(ff,Hi),xi.refreshMaterialUniforms(ff,tn,hn,re,Yi),eR.upload(it,j0(mr),ff,Tt)),tn.isShaderMaterial&&tn.uniformsNeedUpdate===!0&&(eR.upload(it,j0(mr),ff,Tt),tn.uniformsNeedUpdate=!1),tn.isSpriteMaterial&&_a.setValue(it,"center",Ze.center),_a.setValue(it,"modelViewMatrix",Ze.modelViewMatrix),_a.setValue(it,"normalMatrix",Ze.normalMatrix),_a.setValue(it,"modelMatrix",Ze.matrixWorld),tn.isShaderMaterial||tn.isRawShaderMaterial){let _h=tn.uniformsGroups;for(let u1=0,Nd=_h.length;u10&&Tt.useMultisampledRTT(Rt)===!1?Ze=Pn.get(Rt).__webglMultisampledFramebuffer:Array.isArray(Ms)?Ze=Ms[Je]:Ze=Ms,Lt.copy(Rt.viewport),be.copy(Rt.scissor),ln=Rt.scissorTest}else Lt.copy(mn).multiplyScalar(hn).floor(),be.copy(en).multiplyScalar(hn).floor(),ln=Qn;if(ie.bindFramebuffer(it.FRAMEBUFFER,Ze)&&Nt.drawBuffers&&tn&&ie.drawBuffers(Rt,Ze),ie.viewport(Lt),ie.scissor(be),ie.setScissorTest(ln),Hi){let hs=Pn.get(Rt.texture);it.framebufferTexture2D(it.FRAMEBUFFER,it.COLOR_ATTACHMENT0,it.TEXTURE_CUBE_MAP_POSITIVE_X+ve,hs.__webglTexture,Je)}else if(Pr){let hs=Pn.get(Rt.texture),Fs=ve||0;it.framebufferTextureLayer(it.FRAMEBUFFER,it.COLOR_ATTACHMENT0,hs.__webglTexture,Je||0,Fs)}se=-1},this.readRenderTargetPixels=function(Rt,ve,Je,tn,Ze,Hi,Pr){if(!(Rt&&Rt.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Gr=Pn.get(Rt).__webglFramebuffer;if(Rt.isWebGLCubeRenderTarget&&Pr!==void 0&&(Gr=Gr[Pr]),Gr){ie.bindFramebuffer(it.FRAMEBUFFER,Gr);try{let hs=Rt.texture,Fs=hs.format,Ms=hs.type;if(Fs!==Yw&&dn.convert(Fs)!==it.getParameter(it.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}let bs=Ms===MU&&(kt.has("EXT_color_buffer_half_float")||Nt.isWebGL2&&kt.has("EXT_color_buffer_float"));if(Ms!==lS&&dn.convert(Ms)!==it.getParameter(it.IMPLEMENTATION_COLOR_READ_TYPE)&&!(Ms===oS&&(Nt.isWebGL2||kt.has("OES_texture_float")||kt.has("WEBGL_color_buffer_float")))&&!bs){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}ve>=0&&ve<=Rt.width-tn&&Je>=0&&Je<=Rt.height-Ze&&it.readPixels(ve,Je,tn,Ze,dn.convert(Fs),dn.convert(Ms),Hi)}finally{let hs=Pt!==null?Pn.get(Pt).__webglFramebuffer:null;ie.bindFramebuffer(it.FRAMEBUFFER,hs)}}},this.copyFramebufferToTexture=function(Rt,ve,Je=0){let tn=Math.pow(2,-Je),Ze=Math.floor(ve.image.width*tn),Hi=Math.floor(ve.image.height*tn);Tt.setTexture2D(ve,0),it.copyTexSubImage2D(it.TEXTURE_2D,Je,0,0,Rt.x,Rt.y,Ze,Hi),ie.unbindTexture()},this.copyTextureToTexture=function(Rt,ve,Je,tn=0){let Ze=ve.image.width,Hi=ve.image.height,Pr=dn.convert(Je.format),Gr=dn.convert(Je.type);Tt.setTexture2D(Je,0),it.pixelStorei(it.UNPACK_FLIP_Y_WEBGL,Je.flipY),it.pixelStorei(it.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Je.premultiplyAlpha),it.pixelStorei(it.UNPACK_ALIGNMENT,Je.unpackAlignment),ve.isDataTexture?it.texSubImage2D(it.TEXTURE_2D,tn,Rt.x,Rt.y,Ze,Hi,Pr,Gr,ve.image.data):ve.isCompressedTexture?it.compressedTexSubImage2D(it.TEXTURE_2D,tn,Rt.x,Rt.y,ve.mipmaps[0].width,ve.mipmaps[0].height,Pr,ve.mipmaps[0].data):it.texSubImage2D(it.TEXTURE_2D,tn,Rt.x,Rt.y,Pr,Gr,ve.image),tn===0&&Je.generateMipmaps&&it.generateMipmap(it.TEXTURE_2D),ie.unbindTexture()},this.copyTextureToTexture3D=function(Rt,ve,Je,tn,Ze=0){if(ft.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}let Hi=Rt.max.x-Rt.min.x+1,Pr=Rt.max.y-Rt.min.y+1,Gr=Rt.max.z-Rt.min.z+1,hs=dn.convert(tn.format),Fs=dn.convert(tn.type),Ms;if(tn.isData3DTexture)Tt.setTexture3D(tn,0),Ms=it.TEXTURE_3D;else if(tn.isDataArrayTexture||tn.isCompressedArrayTexture)Tt.setTexture2DArray(tn,0),Ms=it.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}it.pixelStorei(it.UNPACK_FLIP_Y_WEBGL,tn.flipY),it.pixelStorei(it.UNPACK_PREMULTIPLY_ALPHA_WEBGL,tn.premultiplyAlpha),it.pixelStorei(it.UNPACK_ALIGNMENT,tn.unpackAlignment);let bs=it.getParameter(it.UNPACK_ROW_LENGTH),Tc=it.getParameter(it.UNPACK_IMAGE_HEIGHT),rl=it.getParameter(it.UNPACK_SKIP_PIXELS),Oa=it.getParameter(it.UNPACK_SKIP_ROWS),wh=it.getParameter(it.UNPACK_SKIP_IMAGES),Nr=Je.isCompressedTexture?Je.mipmaps[Ze]:Je.image;it.pixelStorei(it.UNPACK_ROW_LENGTH,Nr.width),it.pixelStorei(it.UNPACK_IMAGE_HEIGHT,Nr.height),it.pixelStorei(it.UNPACK_SKIP_PIXELS,Rt.min.x),it.pixelStorei(it.UNPACK_SKIP_ROWS,Rt.min.y),it.pixelStorei(it.UNPACK_SKIP_IMAGES,Rt.min.z),Je.isDataTexture||Je.isData3DTexture?it.texSubImage3D(Ms,Ze,ve.x,ve.y,ve.z,Hi,Pr,Gr,hs,Fs,Nr.data):Je.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),it.compressedTexSubImage3D(Ms,Ze,ve.x,ve.y,ve.z,Hi,Pr,Gr,hs,Nr.data)):it.texSubImage3D(Ms,Ze,ve.x,ve.y,ve.z,Hi,Pr,Gr,hs,Fs,Nr),it.pixelStorei(it.UNPACK_ROW_LENGTH,bs),it.pixelStorei(it.UNPACK_IMAGE_HEIGHT,Tc),it.pixelStorei(it.UNPACK_SKIP_PIXELS,rl),it.pixelStorei(it.UNPACK_SKIP_ROWS,Oa),it.pixelStorei(it.UNPACK_SKIP_IMAGES,wh),Ze===0&&tn.generateMipmaps&&it.generateMipmap(Ms),ie.unbindTexture()},this.initTexture=function(Rt){Rt.isCubeTexture?Tt.setTextureCube(Rt,0):Rt.isData3DTexture?Tt.setTexture3D(Rt,0):Rt.isDataArrayTexture||Rt.isCompressedArrayTexture?Tt.setTexture2DArray(Rt,0):Tt.setTexture2D(Rt,0),ie.unbindTexture()},this.resetState=function(){Bt=0,Ot=0,Pt=null,ie.reset(),jn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Qx}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(s){this._outputColorSpace=s;let h=this.getContext();h.drawingBufferColorSpace=s===d2t?"display-p3":"srgb",h.unpackColorSpace=Na.workingColorSpace===Fet?"display-p3":"srgb"}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===Pd?YA:aKt}set outputEncoding(s){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=s===YA?Pd:t3}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(s){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=s}},Zyt=class extends CU{};Zyt.prototype.isWebGL1Renderer=!0;var Cet=class extends o1{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(s,h){return super.copy(s,h),s.background!==null&&(this.background=s.background.clone()),s.environment!==null&&(this.environment=s.environment.clone()),s.fog!==null&&(this.fog=s.fog.clone()),this.backgroundBlurriness=s.backgroundBlurriness,this.backgroundIntensity=s.backgroundIntensity,s.overrideMaterial!==null&&(this.overrideMaterial=s.overrideMaterial.clone()),this.matrixAutoUpdate=s.matrixAutoUpdate,this}toJSON(s){let h=super.toJSON(s);return this.fog!==null&&(h.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(h.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(h.object.backgroundIntensity=this.backgroundIntensity),h}};var Aet=class extends D0{constructor(s,h,p,m=1){super(s,h,p),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=m}copy(s){return super.copy(s),this.meshPerAttribute=s.meshPerAttribute,this}toJSON(){let s=super.toJSON();return s.meshPerAttribute=this.meshPerAttribute,s.isInstancedBufferAttribute=!0,s}},YI=new Fu,GYt=new Fu,Qtt=[],WYt=new n3,AAe=new Fu,wU=new gg,vU=new dS,ket=class extends gg{constructor(s,h,p){super(s,h),this.isInstancedMesh=!0,this.instanceMatrix=new Aet(new Float32Array(p*16),16),this.instanceColor=null,this.count=p,this.boundingBox=null,this.boundingSphere=null;for(let m=0;mI)continue;U.applyMatrix4(this.matrixWorld);let se=s.ray.origin.distanceTo(U);ses.far||h.push({distance:se,point:P.clone().applyMatrix4(this.matrixWorld),index:ft,face:null,faceIndex:null,object:this})}}else{let X=Math.max(0,E.start),gt=Math.min(Q.count,E.start+E.count);for(let ft=X,xt=gt-1;ftI)continue;U.applyMatrix4(this.matrixWorld);let Ot=s.ray.origin.distanceTo(U);Ots.far||h.push({distance:Ot,point:P.clone().applyMatrix4(this.matrixWorld),index:ft,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){let h=this.geometry.morphAttributes,p=Object.keys(h);if(p.length>0){let m=h[p[0]];if(m!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let _=0,E=m.length;_=_)){let y=h[1];s=_)break e}E=p,p=0;break n}break t}for(;p>>1;sh;)--E;if(++E,_!==0||E!==m){_>=E&&(E=Math.max(E,1),_=E-1);let y=this.getValueSize();this.times=p.slice(_,E),this.values=this.values.slice(_*y,E*y)}return this}validate(){let s=!0,h=this.getValueSize();h-Math.floor(h)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),s=!1);let p=this.times,m=this.values,_=p.length;_===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),s=!1);let E=null;for(let y=0;y!==_;y++){let I=p[y];if(typeof I=="number"&&isNaN(I)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,y,I),s=!1;break}if(E!==null&&E>I){console.error("THREE.KeyframeTrack: Out of order keys.",this,y,I,E),s=!1;break}E=I}if(m!==void 0&&kAe(m))for(let y=0,I=m.length;y!==I;++y){let N=m[y];if(isNaN(N)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,y,N),s=!1;break}}return s}optimize(){let s=this.times.slice(),h=this.values.slice(),p=this.getValueSize(),m=this.getInterpolation()===J_t,_=s.length-1,E=1;for(let y=1;y<_;++y){let I=!1,N=s[y],B=s[y+1];if(N!==B&&(y!==1||N!==s[0]))if(m)I=!0;else{let P=y*p,U=P-p,j=P+p;for(let V=0;V!==p;++V){let tt=h[P+V];if(tt!==h[U+V]||tt!==h[j+V]){I=!0;break}}}if(I){if(y!==E){s[E]=s[y];let P=y*p,U=E*p;for(let j=0;j!==p;++j)h[U+j]=h[P+j]}++E}}if(_>0){s[E]=s[_];for(let y=_*p,I=E*p,N=0;N!==p;++N)h[I+N]=h[y+N];++E}return E!==s.length?(this.times=s.slice(0,E),this.values=h.slice(0,E*p)):(this.times=s,this.values=h),this}clone(){let s=this.times.slice(),h=this.values.slice(),p=this.constructor,m=new p(this.name,s,h);return m.createInterpolant=this.createInterpolant,m}};Jw.prototype.TimeBufferType=Float32Array;Jw.prototype.ValueBufferType=Float32Array;Jw.prototype.DefaultInterpolation=aet;var JA=class extends Jw{};JA.prototype.ValueTypeName="bool";JA.prototype.ValueBufferType=Array;JA.prototype.DefaultInterpolation=cet;JA.prototype.InterpolantFactoryMethodLinear=void 0;JA.prototype.InterpolantFactoryMethodSmooth=void 0;var t2t=class extends Jw{};t2t.prototype.ValueTypeName="color";var e2t=class extends Jw{};e2t.prototype.ValueTypeName="number";var n2t=class extends aR{constructor(s,h,p,m){super(s,h,p,m)}interpolate_(s,h,p,m){let _=this.resultBuffer,E=this.sampleValues,y=this.valueSize,I=(p-h)/(m-h),N=s*y;for(let B=N+y;N!==B;N+=4)My.slerpFlat(_,0,E,N-y,E,N,I);return _}},kU=class extends Jw{InterpolantFactoryMethodLinear(s){return new n2t(this.times,this.values,this.getValueSize(),s)}};kU.prototype.ValueTypeName="quaternion";kU.prototype.DefaultInterpolation=aet;kU.prototype.InterpolantFactoryMethodSmooth=void 0;var QA=class extends Jw{};QA.prototype.ValueTypeName="string";QA.prototype.ValueBufferType=Array;QA.prototype.DefaultInterpolation=cet;QA.prototype.InterpolantFactoryMethodLinear=void 0;QA.prototype.InterpolantFactoryMethodSmooth=void 0;var i2t=class extends Jw{};i2t.prototype.ValueTypeName="vector";var r2t=class{constructor(s,h,p){let m=this,_=!1,E=0,y=0,I,N=[];this.onStart=void 0,this.onLoad=s,this.onProgress=h,this.onError=p,this.itemStart=function(B){y++,_===!1&&m.onStart!==void 0&&m.onStart(B,E,y),_=!0},this.itemEnd=function(B){E++,m.onProgress!==void 0&&m.onProgress(B,E,y),E===y&&(_=!1,m.onLoad!==void 0&&m.onLoad())},this.itemError=function(B){m.onError!==void 0&&m.onError(B)},this.resolveURL=function(B){return I?I(B):B},this.setURLModifier=function(B){return I=B,this},this.addHandler=function(B,P){return N.push(B,P),this},this.removeHandler=function(B){let P=N.indexOf(B);return P!==-1&&N.splice(P,2),this},this.getHandler=function(B){for(let P=0,U=N.length;Pandnandornorxorxnornotbufdffinputconstantoutputhi:lohi:lohi:lohi:logenericout0out1in0in1aoi21aoi22aoi211aoi221aoi222aoi33oai21oai22oai211oai221oai222oai33and3nand3or3nor3and4nand4or4nor4`;window.netlistsvg=xAe;window.openroadSkin=lKt;window.THREE=s2t;var Oet=globalThis,Bet=Oet.ShadowRoot&&(Oet.ShadyCSS===void 0||Oet.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o2t=Symbol(),hKt=new WeakMap,CU=class{constructor(s,h,g){if(this._$cssResult$=!0,g!==o2t)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=s,this.t=h}get styleSheet(){let s=this.o,h=this.t;if(Bet&&s===void 0){let g=h!==void 0&&h.length===1;g&&(s=hKt.get(h)),s===void 0&&((this.o=s=new CSSStyleSheet).replaceSync(this.cssText),g&&hKt.set(h,s))}return s}toString(){return this.cssText}},fKt=d=>new CU(typeof d=="string"?d:d+"",void 0,o2t),Fet=(d,...s)=>{let h=d.length===1?d[0]:s.reduce((g,m,_)=>g+(S=>{if(S._$cssResult$===!0)return S.cssText;if(typeof S=="number")return S;throw Error("Value passed to 'css' function must be a 'css' function result: "+S+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(m)+d[_+1],d[0]);return new CU(h,d,o2t)},dKt=(d,s)=>{if(Bet)d.adoptedStyleSheets=s.map(h=>h instanceof CSSStyleSheet?h:h.styleSheet);else for(let h of s){let g=document.createElement("style"),m=Oet.litNonce;m!==void 0&&g.setAttribute("nonce",m),g.textContent=h.cssText,d.appendChild(g)}},c2t=Bet?d=>d:d=>d instanceof CSSStyleSheet?(s=>{let h="";for(let g of s.cssRules)h+=g.cssText;return fKt(h)})(d):d;var{is:MAe,defineProperty:EAe,getOwnPropertyDescriptor:SAe,getOwnPropertyNames:TAe,getOwnPropertySymbols:CAe,getPrototypeOf:AAe}=Object,Uet=globalThis,pKt=Uet.trustedTypes,kAe=pKt?pKt.emptyScript:"",LAe=Uet.reactiveElementPolyfillSupport,AU=(d,s)=>d,a2t={toAttribute(d,s){switch(s){case Boolean:d=d?kAe:null;break;case Object:case Array:d=d==null?d:JSON.stringify(d)}return d},fromAttribute(d,s){let h=d;switch(s){case Boolean:h=d!==null;break;case Number:h=d===null?null:Number(d);break;case Object:case Array:try{h=JSON.parse(d)}catch{h=null}}return h}},mKt=(d,s)=>!MAe(d,s),gKt={attribute:!0,type:String,converter:a2t,reflect:!1,useDefault:!1,hasChanged:mKt};Symbol.metadata??=Symbol("metadata"),Uet.litPropertyMetadata??=new WeakMap;var n3=class extends HTMLElement{static addInitializer(s){this._$Ei(),(this.l??=[]).push(s)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(s,h=gKt){if(h.state&&(h.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(s)&&((h=Object.create(h)).wrapped=!0),this.elementProperties.set(s,h),!h.noAccessor){let g=Symbol(),m=this.getPropertyDescriptor(s,g,h);m!==void 0&&EAe(this.prototype,s,m)}}static getPropertyDescriptor(s,h,g){let{get:m,set:_}=SAe(this.prototype,s)??{get(){return this[h]},set(S){this[h]=S}};return{get:m,set(S){let y=m?.call(this);_?.call(this,S),this.requestUpdate(s,y,g)},configurable:!0,enumerable:!0}}static getPropertyOptions(s){return this.elementProperties.get(s)??gKt}static _$Ei(){if(this.hasOwnProperty(AU("elementProperties")))return;let s=AAe(this);s.finalize(),s.l!==void 0&&(this.l=[...s.l]),this.elementProperties=new Map(s.elementProperties)}static finalize(){if(this.hasOwnProperty(AU("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(AU("properties"))){let h=this.properties,g=[...TAe(h),...CAe(h)];for(let m of g)this.createProperty(m,h[m])}let s=this[Symbol.metadata];if(s!==null){let h=litPropertyMetadata.get(s);if(h!==void 0)for(let[g,m]of h)this.elementProperties.set(g,m)}this._$Eh=new Map;for(let[h,g]of this.elementProperties){let m=this._$Eu(h,g);m!==void 0&&this._$Eh.set(m,h)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){let h=[];if(Array.isArray(s)){let g=new Set(s.flat(1/0).reverse());for(let m of g)h.unshift(c2t(m))}else s!==void 0&&h.push(c2t(s));return h}static _$Eu(s,h){let g=h.attribute;return g===!1?void 0:typeof g=="string"?g:typeof s=="string"?s.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(s=>this.enableUpdating=s),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(s=>s(this))}addController(s){(this._$EO??=new Set).add(s),this.renderRoot!==void 0&&this.isConnected&&s.hostConnected?.()}removeController(s){this._$EO?.delete(s)}_$E_(){let s=new Map,h=this.constructor.elementProperties;for(let g of h.keys())this.hasOwnProperty(g)&&(s.set(g,this[g]),delete this[g]);s.size>0&&(this._$Ep=s)}createRenderRoot(){let s=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return dKt(s,this.constructor.elementStyles),s}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(s=>s.hostConnected?.())}enableUpdating(s){}disconnectedCallback(){this._$EO?.forEach(s=>s.hostDisconnected?.())}attributeChangedCallback(s,h,g){this._$AK(s,g)}_$ET(s,h){let g=this.constructor.elementProperties.get(s),m=this.constructor._$Eu(s,g);if(m!==void 0&&g.reflect===!0){let _=(g.converter?.toAttribute!==void 0?g.converter:a2t).toAttribute(h,g.type);this._$Em=s,_==null?this.removeAttribute(m):this.setAttribute(m,_),this._$Em=null}}_$AK(s,h){let g=this.constructor,m=g._$Eh.get(s);if(m!==void 0&&this._$Em!==m){let _=g.getPropertyOptions(m),S=typeof _.converter=="function"?{fromAttribute:_.converter}:_.converter?.fromAttribute!==void 0?_.converter:a2t;this._$Em=m;let y=S.fromAttribute(h,_.type);this[m]=y??this._$Ej?.get(m)??y,this._$Em=null}}requestUpdate(s,h,g,m=!1,_){if(s!==void 0){let S=this.constructor;if(m===!1&&(_=this[s]),g??=S.getPropertyOptions(s),!((g.hasChanged??mKt)(_,h)||g.useDefault&&g.reflect&&_===this._$Ej?.get(s)&&!this.hasAttribute(S._$Eu(s,g))))return;this.C(s,h,g)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(s,h,{useDefault:g,reflect:m,wrapped:_},S){g&&!(this._$Ej??=new Map).has(s)&&(this._$Ej.set(s,S??h??this[s]),_!==!0||S!==void 0)||(this._$AL.has(s)||(this.hasUpdated||g||(h=void 0),this._$AL.set(s,h)),m===!0&&this._$Em!==s&&(this._$Eq??=new Set).add(s))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(h){Promise.reject(h)}let s=this.scheduleUpdate();return s!=null&&await s,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[m,_]of this._$Ep)this[m]=_;this._$Ep=void 0}let g=this.constructor.elementProperties;if(g.size>0)for(let[m,_]of g){let{wrapped:S}=_,y=this[m];S!==!0||this._$AL.has(m)||y===void 0||this.C(m,void 0,_,y)}}let s=!1,h=this._$AL;try{s=this.shouldUpdate(h),s?(this.willUpdate(h),this._$EO?.forEach(g=>g.hostUpdate?.()),this.update(h)):this._$EM()}catch(g){throw s=!1,this._$EM(),g}s&&this._$AE(h)}willUpdate(s){}_$AE(s){this._$EO?.forEach(h=>h.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(s)),this.updated(s)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(s){return!0}update(s){this._$Eq&&=this._$Eq.forEach(h=>this._$ET(h,this[h])),this._$EM()}updated(s){}firstUpdated(s){}};n3.elementStyles=[],n3.shadowRootOptions={mode:"open"},n3[AU("elementProperties")]=new Map,n3[AU("finalized")]=new Map,LAe?.({ReactiveElement:n3}),(Uet.reactiveElementVersions??=[]).push("2.1.2");var g2t=globalThis,bKt=d=>d,zet=g2t.trustedTypes,wKt=zet?zet.createPolicy("lit-html",{createHTML:d=>d}):void 0,EKt="$lit$",fS=`lit$${Math.random().toFixed(9).slice(2)}$`,SKt="?"+fS,PAe=`<${SKt}>`,QA=document,LU=()=>QA.createComment(""),PU=d=>d===null||typeof d!="object"&&typeof d!="function",m2t=Array.isArray,IAe=d=>m2t(d)||typeof d?.[Symbol.iterator]=="function",u2t=`[ -\f\r]`,kU=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,vKt=/-->/g,_Kt=/>/g,KA=RegExp(`>|${u2t}(?:([^\\s"'>=/]+)(${u2t}*=${u2t}*(?:[^ -\f\r"'\`<>=]|("|')|))|$)`,"g"),yKt=/'/g,xKt=/"/g,TKt=/^(?:script|style|textarea|title)$/i,b2t=d=>(s,...h)=>({_$litType$:d,strings:s,values:h}),ek=b2t(1),c1=b2t(2),wJe=b2t(3),tk=Symbol.for("lit-noChange"),nl=Symbol.for("lit-nothing"),MKt=new WeakMap,JA=QA.createTreeWalker(QA,129);function CKt(d,s){if(!m2t(d)||!d.hasOwnProperty("raw"))throw Error("invalid template strings array");return wKt!==void 0?wKt.createHTML(s):s}var RAe=(d,s)=>{let h=d.length-1,g=[],m,_=s===2?"":s===3?"":"",S=kU;for(let y=0;y"?(S=m??kU,P=-1):B[1]===void 0?P=-2:(P=S.lastIndex-B[2].length,N=B[1],S=B[3]===void 0?KA:B[3]==='"'?xKt:yKt):S===xKt||S===yKt?S=KA:S===vKt||S===_Kt?S=kU:(S=KA,m=void 0);let W=S===KA&&d[y+1].startsWith("/>")?" ":"";_+=S===kU?R+PAe:P>=0?(g.push(N),R.slice(0,P)+EKt+R.slice(P)+fS+W):R+fS+(P===-2?y:W)}return[CKt(d,_+(d[h]||"")+(s===2?"":s===3?"":"")),g]},IU=class d{constructor({strings:s,_$litType$:h},g){let m;this.parts=[];let _=0,S=0,y=s.length-1,R=this.parts,[N,B]=RAe(s,h);if(this.el=d.createElement(N,g),JA.currentNode=this.el.content,h===2||h===3){let P=this.el.content.firstChild;P.replaceWith(...P.childNodes)}for(;(m=JA.nextNode())!==null&&R.length0){m.textContent=zet?zet.emptyScript:"";for(let W=0;W2||g[0]!==""||g[1]!==""?(this._$AH=Array(g.length-1).fill(new String),this.strings=g):this._$AH=nl}_$AI(s,h=this,g,m){let _=this.strings,S=!1;if(_===void 0)s=cR(this,s,h,0),S=!PU(s)||s!==this._$AH&&s!==tk,S&&(this._$AH=s);else{let y=s,R,N;for(s=_[0],R=0;R<_.length-1;R++)N=cR(this,y[g+R],h,R),N===tk&&(N=this._$AH[R]),S||=!PU(N)||N!==this._$AH[R],N===nl?s=nl:s!==nl&&(s+=(N??"")+_[R+1]),this._$AH[R]=N}S&&!m&&this.j(s)}j(s){s===nl?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,s??"")}},h2t=class extends aR{constructor(){super(...arguments),this.type=3}j(s){this.element[this.name]=s===nl?void 0:s}},f2t=class extends aR{constructor(){super(...arguments),this.type=4}j(s){this.element.toggleAttribute(this.name,!!s&&s!==nl)}},d2t=class extends aR{constructor(s,h,g,m,_){super(s,h,g,m,_),this.type=5}_$AI(s,h=this){if((s=cR(this,s,h,0)??nl)===tk)return;let g=this._$AH,m=s===nl&&g!==nl||s.capture!==g.capture||s.once!==g.once||s.passive!==g.passive,_=s!==nl&&(g===nl||m);m&&this.element.removeEventListener(this.name,this,g),_&&this.element.addEventListener(this.name,this,s),this._$AH=s}handleEvent(s){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,s):this._$AH.handleEvent(s)}},p2t=class{constructor(s,h,g){this.element=s,this.type=6,this._$AN=void 0,this._$AM=h,this.options=g}get _$AU(){return this._$AM._$AU}_$AI(s){cR(this,s)}};var DAe=g2t.litHtmlPolyfillSupport;DAe?.(IU,RU),(g2t.litHtmlVersions??=[]).push("3.3.3");var AKt=(d,s,h)=>{let g=h?.renderBefore??s,m=g._$litPart$;if(m===void 0){let _=h?.renderBefore??null;g._$litPart$=m=new RU(s.insertBefore(LU(),_),_,void 0,h??{})}return m._$AI(d),m};var w2t=globalThis,Ey=class extends n3{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let s=super.createRenderRoot();return this.renderOptions.renderBefore??=s.firstChild,s}update(s){let h=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(s),this._$Do=AKt(h,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return tk}};Ey._$litElement$=!0,Ey.finalized=!0,w2t.litElementHydrateSupport?.({LitElement:Ey});var NAe=w2t.litElementPolyfillSupport;NAe?.({LitElement:Ey});(w2t.litElementVersions??=[]).push("4.2.2");function v2t(d,s,h){return d?s(d):h?.(d)}var _2t=d=>d??nl;var jet=class{constructor(){this.eventListeners=new Map}on(s,h){this.eventListeners.has(s)||this.eventListeners.set(s,new Set),this.eventListeners.get(s).add(h)}off(s,h){this.eventListeners.get(s)?.delete(h)}emit(s,...h){let g=this.eventListeners.get(s);if(g)for(let m of g)try{m(...h)}catch(_){console.error(_)}}fire(s,...h){this.emit(s,...h)}};function DU(d,s,h={}){d.dispatchEvent(new CustomEvent(s,{bubbles:!0,composed:!0,detail:h}))}var y2t=class extends Ey{static properties={name:{type:String,reflect:!0},maximizable:{type:Boolean,reflect:!0},collapsible:{type:Boolean,reflect:!0},maximized:{type:Boolean,reflect:!0},collapsed:{type:Boolean,reflect:!0}};static styles=Fet` + the output wire straight to it. -->aoi21aoi22aoi211aoi221aoi222aoi33oai21oai22oai211oai221oai222oai33and3nand3or3nor3and4nand4or4nor4`;window.netlistsvg=zAe;window.openroadSkin=_Kt;window.THREE=b2t;var zet=globalThis,jet=zet.ShadowRoot&&(zet.ShadyCSS===void 0||zet.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,w2t=Symbol(),yKt=new WeakMap,PU=class{constructor(s,h,p){if(this._$cssResult$=!0,p!==w2t)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=s,this.t=h}get styleSheet(){let s=this.o,h=this.t;if(jet&&s===void 0){let p=h!==void 0&&h.length===1;p&&(s=yKt.get(h)),s===void 0&&((this.o=s=new CSSStyleSheet).replaceSync(this.cssText),p&&yKt.set(h,s))}return s}toString(){return this.cssText}},xKt=d=>new PU(typeof d=="string"?d:d+"",void 0,w2t),IU=(d,...s)=>{let h=d.length===1?d[0]:s.reduce((p,m,_)=>p+(E=>{if(E._$cssResult$===!0)return E.cssText;if(typeof E=="number")return E;throw Error("Value passed to 'css' function must be a 'css' function result: "+E+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(m)+d[_+1],d[0]);return new PU(h,d,w2t)},MKt=(d,s)=>{if(jet)d.adoptedStyleSheets=s.map(h=>h instanceof CSSStyleSheet?h:h.styleSheet);else for(let h of s){let p=document.createElement("style"),m=zet.litNonce;m!==void 0&&p.setAttribute("nonce",m),p.textContent=h.cssText,d.appendChild(p)}},v2t=jet?d=>d:d=>d instanceof CSSStyleSheet?(s=>{let h="";for(let p of s.cssRules)h+=p.cssText;return xKt(h)})(d):d;var{is:jAe,defineProperty:HAe,getOwnPropertyDescriptor:GAe,getOwnPropertyNames:WAe,getOwnPropertySymbols:$Ae,getPrototypeOf:VAe}=Object,Het=globalThis,EKt=Het.trustedTypes,qAe=EKt?EKt.emptyScript:"",XAe=Het.reactiveElementPolyfillSupport,RU=(d,s)=>d,_2t={toAttribute(d,s){switch(s){case Boolean:d=d?qAe:null;break;case Object:case Array:d=d==null?d:JSON.stringify(d)}return d},fromAttribute(d,s){let h=d;switch(s){case Boolean:h=d!==null;break;case Number:h=d===null?null:Number(d);break;case Object:case Array:try{h=JSON.parse(d)}catch{h=null}}return h}},TKt=(d,s)=>!jAe(d,s),SKt={attribute:!0,type:String,converter:_2t,reflect:!1,useDefault:!1,hasChanged:TKt};Symbol.metadata??=Symbol("metadata"),Het.litPropertyMetadata??=new WeakMap;var r3=class extends HTMLElement{static addInitializer(s){this._$Ei(),(this.l??=[]).push(s)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(s,h=SKt){if(h.state&&(h.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(s)&&((h=Object.create(h)).wrapped=!0),this.elementProperties.set(s,h),!h.noAccessor){let p=Symbol(),m=this.getPropertyDescriptor(s,p,h);m!==void 0&&HAe(this.prototype,s,m)}}static getPropertyDescriptor(s,h,p){let{get:m,set:_}=GAe(this.prototype,s)??{get(){return this[h]},set(E){this[h]=E}};return{get:m,set(E){let y=m?.call(this);_?.call(this,E),this.requestUpdate(s,y,p)},configurable:!0,enumerable:!0}}static getPropertyOptions(s){return this.elementProperties.get(s)??SKt}static _$Ei(){if(this.hasOwnProperty(RU("elementProperties")))return;let s=VAe(this);s.finalize(),s.l!==void 0&&(this.l=[...s.l]),this.elementProperties=new Map(s.elementProperties)}static finalize(){if(this.hasOwnProperty(RU("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(RU("properties"))){let h=this.properties,p=[...WAe(h),...$Ae(h)];for(let m of p)this.createProperty(m,h[m])}let s=this[Symbol.metadata];if(s!==null){let h=litPropertyMetadata.get(s);if(h!==void 0)for(let[p,m]of h)this.elementProperties.set(p,m)}this._$Eh=new Map;for(let[h,p]of this.elementProperties){let m=this._$Eu(h,p);m!==void 0&&this._$Eh.set(m,h)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){let h=[];if(Array.isArray(s)){let p=new Set(s.flat(1/0).reverse());for(let m of p)h.unshift(v2t(m))}else s!==void 0&&h.push(v2t(s));return h}static _$Eu(s,h){let p=h.attribute;return p===!1?void 0:typeof p=="string"?p:typeof s=="string"?s.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(s=>this.enableUpdating=s),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(s=>s(this))}addController(s){(this._$EO??=new Set).add(s),this.renderRoot!==void 0&&this.isConnected&&s.hostConnected?.()}removeController(s){this._$EO?.delete(s)}_$E_(){let s=new Map,h=this.constructor.elementProperties;for(let p of h.keys())this.hasOwnProperty(p)&&(s.set(p,this[p]),delete this[p]);s.size>0&&(this._$Ep=s)}createRenderRoot(){let s=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return MKt(s,this.constructor.elementStyles),s}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(s=>s.hostConnected?.())}enableUpdating(s){}disconnectedCallback(){this._$EO?.forEach(s=>s.hostDisconnected?.())}attributeChangedCallback(s,h,p){this._$AK(s,p)}_$ET(s,h){let p=this.constructor.elementProperties.get(s),m=this.constructor._$Eu(s,p);if(m!==void 0&&p.reflect===!0){let _=(p.converter?.toAttribute!==void 0?p.converter:_2t).toAttribute(h,p.type);this._$Em=s,_==null?this.removeAttribute(m):this.setAttribute(m,_),this._$Em=null}}_$AK(s,h){let p=this.constructor,m=p._$Eh.get(s);if(m!==void 0&&this._$Em!==m){let _=p.getPropertyOptions(m),E=typeof _.converter=="function"?{fromAttribute:_.converter}:_.converter?.fromAttribute!==void 0?_.converter:_2t;this._$Em=m;let y=E.fromAttribute(h,_.type);this[m]=y??this._$Ej?.get(m)??y,this._$Em=null}}requestUpdate(s,h,p,m=!1,_){if(s!==void 0){let E=this.constructor;if(m===!1&&(_=this[s]),p??=E.getPropertyOptions(s),!((p.hasChanged??TKt)(_,h)||p.useDefault&&p.reflect&&_===this._$Ej?.get(s)&&!this.hasAttribute(E._$Eu(s,p))))return;this.C(s,h,p)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(s,h,{useDefault:p,reflect:m,wrapped:_},E){p&&!(this._$Ej??=new Map).has(s)&&(this._$Ej.set(s,E??h??this[s]),_!==!0||E!==void 0)||(this._$AL.has(s)||(this.hasUpdated||p||(h=void 0),this._$AL.set(s,h)),m===!0&&this._$Em!==s&&(this._$Eq??=new Set).add(s))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(h){Promise.reject(h)}let s=this.scheduleUpdate();return s!=null&&await s,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[m,_]of this._$Ep)this[m]=_;this._$Ep=void 0}let p=this.constructor.elementProperties;if(p.size>0)for(let[m,_]of p){let{wrapped:E}=_,y=this[m];E!==!0||this._$AL.has(m)||y===void 0||this.C(m,void 0,_,y)}}let s=!1,h=this._$AL;try{s=this.shouldUpdate(h),s?(this.willUpdate(h),this._$EO?.forEach(p=>p.hostUpdate?.()),this.update(h)):this._$EM()}catch(p){throw s=!1,this._$EM(),p}s&&this._$AE(h)}willUpdate(s){}_$AE(s){this._$EO?.forEach(h=>h.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(s)),this.updated(s)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(s){return!0}update(s){this._$Eq&&=this._$Eq.forEach(h=>this._$ET(h,this[h])),this._$EM()}updated(s){}firstUpdated(s){}};r3.elementStyles=[],r3.shadowRootOptions={mode:"open"},r3[RU("elementProperties")]=new Map,r3[RU("finalized")]=new Map,XAe?.({ReactiveElement:r3}),(Het.reactiveElementVersions??=[]).push("2.1.2");var x2t=globalThis,CKt=d=>d,Get=x2t.trustedTypes,AKt=Get?Get.createPolicy("lit-html",{createHTML:d=>d}):void 0,M2t="$lit$",s3=`lit$${Math.random().toFixed(9).slice(2)}$`,E2t="?"+s3,ZAe=`<${E2t}>`,nk=document,NU=()=>nk.createComment(""),OU=d=>d===null||typeof d!="object"&&typeof d!="function",S2t=Array.isArray,DKt=d=>S2t(d)||typeof d?.[Symbol.iterator]=="function",y2t=`[ +\f\r]`,DU=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,kKt=/-->/g,LKt=/>/g,tk=RegExp(`>|${y2t}(?:([^\\s"'>=/]+)(${y2t}*=${y2t}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),PKt=/'/g,IKt=/"/g,NKt=/^(?:script|style|textarea|title)$/i,T2t=d=>(s,...h)=>({_$litType$:d,strings:s,values:h}),Sy=T2t(1),c1=T2t(2),OJe=T2t(3),Qw=Symbol.for("lit-noChange"),_u=Symbol.for("lit-nothing"),RKt=new WeakMap,ek=nk.createTreeWalker(nk,129);function OKt(d,s){if(!S2t(d)||!d.hasOwnProperty("raw"))throw Error("invalid template strings array");return AKt!==void 0?AKt.createHTML(s):s}var BKt=(d,s)=>{let h=d.length-1,p=[],m,_=s===2?"":s===3?"":"",E=DU;for(let y=0;y"?(E=m??DU,P=-1):B[1]===void 0?P=-2:(P=E.lastIndex-B[2].length,N=B[1],E=B[3]===void 0?tk:B[3]==='"'?IKt:PKt):E===IKt||E===PKt?E=tk:E===kKt||E===LKt?E=DU:(E=tk,m=void 0);let j=E===tk&&d[y+1].startsWith("/>")?" ":"";_+=E===DU?I+ZAe:P>=0?(p.push(N),I.slice(0,P)+M2t+I.slice(P)+s3+j):I+s3+(P===-2?y:j)}return[OKt(d,_+(d[h]||"")+(s===2?"":s===3?"":"")),p]},BU=class d{constructor({strings:s,_$litType$:h},p){let m;this.parts=[];let _=0,E=0,y=s.length-1,I=this.parts,[N,B]=BKt(s,h);if(this.el=d.createElement(N,p),ek.currentNode=this.el.content,h===2||h===3){let P=this.el.content.firstChild;P.replaceWith(...P.childNodes)}for(;(m=ek.nextNode())!==null&&I.length0){m.textContent=Get?Get.emptyScript:"";for(let j=0;j2||p[0]!==""||p[1]!==""?(this._$AH=Array(p.length-1).fill(new String),this.strings=p):this._$AH=_u}_$AI(s,h=this,p,m){let _=this.strings,E=!1;if(_===void 0)s=ik(this,s,h,0),E=!OU(s)||s!==this._$AH&&s!==Qw,E&&(this._$AH=s);else{let y=s,I,N;for(s=_[0],I=0;I<_.length-1;I++)N=ik(this,y[p+I],h,I),N===Qw&&(N=this._$AH[I]),E||=!OU(N)||N!==this._$AH[I],N===_u?s=_u:s!==_u&&(s+=(N??"")+_[I+1]),this._$AH[I]=N}E&&!m&&this.j(s)}j(s){s===_u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,s??"")}},$et=class extends rk{constructor(){super(...arguments),this.type=3}j(s){this.element[this.name]=s===_u?void 0:s}},Vet=class extends rk{constructor(){super(...arguments),this.type=4}j(s){this.element.toggleAttribute(this.name,!!s&&s!==_u)}},qet=class extends rk{constructor(s,h,p,m,_){super(s,h,p,m,_),this.type=5}_$AI(s,h=this){if((s=ik(this,s,h,0)??_u)===Qw)return;let p=this._$AH,m=s===_u&&p!==_u||s.capture!==p.capture||s.once!==p.once||s.passive!==p.passive,_=s!==_u&&(p===_u||m);m&&this.element.removeEventListener(this.name,this,p),_&&this.element.addEventListener(this.name,this,s),this._$AH=s}handleEvent(s){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,s):this._$AH.handleEvent(s)}},Xet=class{constructor(s,h,p){this.element=s,this.type=6,this._$AN=void 0,this._$AM=h,this.options=p}get _$AU(){return this._$AM._$AU}_$AI(s){ik(this,s)}},FKt={M:M2t,P:s3,A:E2t,C:1,L:BKt,R:Wet,D:DKt,V:ik,I:lR,H:rk,N:Vet,U:qet,B:$et,F:Xet},YAe=x2t.litHtmlPolyfillSupport;YAe?.(BU,lR),(x2t.litHtmlVersions??=[]).push("3.3.3");var UKt=(d,s,h)=>{let p=h?.renderBefore??s,m=p._$litPart$;if(m===void 0){let _=h?.renderBefore??null;p._$litPart$=m=new lR(s.insertBefore(NU(),_),_,void 0,h??{})}return m._$AI(d),m};var C2t=globalThis,Ty=class extends r3{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let s=super.createRenderRoot();return this.renderOptions.renderBefore??=s.firstChild,s}update(s){let h=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(s),this._$Do=UKt(h,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Qw}};Ty._$litElement$=!0,Ty.finalized=!0,C2t.litElementHydrateSupport?.({LitElement:Ty});var KAe=C2t.litElementPolyfillSupport;KAe?.({LitElement:Ty});(C2t.litElementVersions??=[]).push("4.2.2");function A2t(d,s,h){return d?s(d):h?.(d)}var k2t=d=>d??_u;var Zet={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Yet=d=>(...s)=>({_$litDirective$:d,values:s}),hR=class{constructor(s){}get _$AU(){return this._$AM._$AU}_$AT(s,h,p){this._$Ct=s,this._$AM=h,this._$Ci=p}_$AS(s,h){return this.update(s,h)}update(s,h){return this.render(...h)}};var Ket=Yet(class extends hR{constructor(d){if(super(d),d.type!==Zet.ATTRIBUTE||d.name!=="class"||d.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(d){return" "+Object.keys(d).filter(s=>d[s]).join(" ")+" "}update(d,[s]){if(this.st===void 0){this.st=new Set,d.strings!==void 0&&(this.nt=new Set(d.strings.join(" ").split(/\s/).filter(p=>p!=="")));for(let p in s)s[p]&&!this.nt?.has(p)&&this.st.add(p);return this.render(s)}let h=d.element.classList;for(let p of this.st)p in s||(h.remove(p),this.st.delete(p));for(let p in s){let m=!!s[p];m===this.st.has(p)||this.nt?.has(p)||(m?(h.add(p),this.st.add(p)):(h.remove(p),this.st.delete(p)))}return Qw}});var{I:JAe}=FKt,zKt=d=>d;var jKt=()=>document.createComment(""),fR=(d,s,h)=>{let p=d._$AA.parentNode,m=s===void 0?d._$AB:s._$AA;if(h===void 0){let _=p.insertBefore(jKt(),m),E=p.insertBefore(jKt(),m);h=new JAe(_,E,d,d.options)}else{let _=h._$AB.nextSibling,E=h._$AM,y=E!==d;if(y){let I;h._$AQ?.(d),h._$AM=d,h._$AP!==void 0&&(I=d._$AU)!==E._$AU&&h._$AP(I)}if(_!==m||y){let I=h._$AA;for(;I!==_;){let N=zKt(I).nextSibling;zKt(p).insertBefore(I,m),I=N}}}return h},gS=(d,s,h=d)=>(d._$AI(s,h),d),QAe={},HKt=(d,s=QAe)=>d._$AH=s,GKt=d=>d._$AH,Jet=d=>{d._$AR(),d._$AA.remove()};var WKt=(d,s,h)=>{let p=new Map;for(let m=s;m<=h;m++)p.set(d[m],m);return p},$Kt=Yet(class extends hR{constructor(d){if(super(d),d.type!==Zet.CHILD)throw Error("repeat() can only be used in text expressions")}dt(d,s,h){let p;h===void 0?h=s:s!==void 0&&(p=s);let m=[],_=[],E=0;for(let y of d)m[E]=p?p(y,E):E,_[E]=h(y,E),E++;return{values:_,keys:m}}render(d,s,h){return this.dt(d,s,h).values}update(d,[s,h,p]){let m=GKt(d),{values:_,keys:E}=this.dt(s,h,p);if(!Array.isArray(m))return this.ut=E,_;let y=this.ut??=[],I=[],N,B,P=0,U=m.length-1,j=0,V=_.length-1;for(;P<=U&&j<=V;)if(m[P]===null)P++;else if(m[U]===null)U--;else if(y[P]===E[j])I[j]=gS(m[P],_[j]),P++,j++;else if(y[U]===E[V])I[V]=gS(m[U],_[V]),U--,V--;else if(y[P]===E[V])I[V]=gS(m[P],_[V]),fR(d,I[V+1],m[P]),P++,V--;else if(y[U]===E[j])I[j]=gS(m[U],_[j]),fR(d,m[P],m[U]),U--,j++;else if(N===void 0&&(N=WKt(E,j,V),B=WKt(y,P,U)),N.has(y[P]))if(N.has(y[U])){let tt=B.get(E[j]),Q=tt!==void 0?m[tt]:null;if(Q===null){let X=fR(d,m[P]);gS(X,_[j]),I[j]=X}else I[j]=gS(Q,_[j]),fR(d,m[P],Q),m[tt]=null;j++}else Jet(m[U]),U--;else Jet(m[P]),P++;for(;j<=V;){let tt=fR(d,I[V+1]);gS(tt,_[j]),I[j++]=tt}for(;P<=U;){let tt=m[P++];tt!==null&&Jet(tt)}return this.ut=E,HKt(d,I),Qw}});function Id(d,s,h,p,m=0,_=0){return[(s-_-p)*h,(d-m)*h]}function Vf(d,s,h,p,m,_,E=0,y=0){return[[(s-y-_)*m,(d-E)*m],[(p-y-_)*m,(h-E)*m]]}function tv(d,s,h,p,m=0,_=0){return{dbuX:Math.round(m+s/h),dbuY:Math.round(_+p+d/h)}}function tke(d){return!Number.isFinite(d)||d<=1?1:Math.round(Math.min(d,3)*100)/100}var o3=240,eke=256,c3="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",L2t=o3;function ev(){return L2t}function VKt(){L2t=eke}var vQe=1/64,P2t=120;function qKt(d){L2t=d}function sk(d){let s={...d||{}};return s.tileSize===void 0&&(s.tileSize=ev()),s}function Qet(d,s){return Math.max(1,Math.round(d*s))}function dR(){let d=typeof window<"u"&&window.devicePixelRatio?window.devicePixelRatio:1;return!Number.isFinite(d)||d<=1?1:Math.min(d,3)}function pR(d,s=ev()){return{dpr:tke(d),tile_px:Qet(s,d)}}function tnt(d,s,h,p,m=ev()){let{visibility:_,selectability:E,visibleLayers:y,selectableLayers:I,app:N}=h,B={};for(let[U,j]of Object.entries(_||{}))B[U]=!!j;if(E)for(let[U,j]of Object.entries(E))B["s_"+U]=!!j;let P={type:"tile",layer:s,z:d.z,x:d.x,y:d.y,...pR(p,m),visible_layers:y?[...y]:[],selectable_layers:I?[...I]:[],...B};if(N&&N.visibleChiplets instanceof Set&&(P.visible_chiplets=[...N.visibleChiplets]),N&&N.layerPatterns){let U=N.layerPatterns[s];U!==void 0&&U!==1&&(P.pattern=U)}return P}function XKt(d){if(typeof window>"u"||typeof window.matchMedia!="function"||typeof d!="function")return()=>{};let s=!1,h=null,p=null,m=()=>{if(s)return;let _=window.devicePixelRatio||1;h=window.matchMedia(`(resolution: ${_}dppx)`),p=()=>{s||(m(),d(window.devicePixelRatio||1))},h.addEventListener("change",p,{once:!0})};return m(),()=>{s=!0,h&&p&&h.removeEventListener("change",p),h=null,p=null}}function gR(d,s){let h=d&&d._map?d._map.getZoom():s;return Math.floor(h)}function Sc(d){return!!d?.websocketManager?.isStaticMode}function JKt(d){let s=d?.protocol==="https:"?"wss":"ws",h=d?.host||"localhost:8080";return`${s}://${h}/ws`}function QKt(d,s){let h={};for(let[p,m]of Object.entries(d||{}))h[p]=!!m;for(let[p,m]of Object.entries(s||{}))h["s_"+p]=!!m;return h}function mR(d,s){s&&typeof s.sel_has_inst=="boolean"&&(d.selHasInst=s.sel_has_inst,d.selHasNet=!!s.sel_has_net)}var I2t=null;function nv(d,s=4e3){let h=document.getElementById("or-toast");return h||(h=document.createElement("div"),h.id="or-toast",document.body.appendChild(h)),h.textContent=d,h.classList.add("visible"),I2t&&clearTimeout(I2t),I2t=setTimeout(()=>h.classList.remove("visible"),s),h}function tJt({title:d,message:s,confirmLabel:h="OK",danger:p=!1}){return new Promise(m=>{let _=document.createElement("div");_.className="or-modal-overlay";let E=document.createElement("div");E.className="or-modal";let y=document.createElement("div");y.className="or-modal-title",y.textContent=d;let I=document.createElement("div");I.className="or-modal-message",I.textContent=s;let N=document.createElement("div");N.className="or-modal-buttons";let B=document.createElement("button");B.className="or-btn",B.textContent="Cancel";let P=document.createElement("button");P.className="or-btn"+(p?" or-btn-danger":""),P.textContent=h;let U=V=>{document.removeEventListener("keydown",j,!0),_.remove(),m(V)},j=V=>{V.key==="Escape"&&(V.stopPropagation(),U(!1))};B.addEventListener("click",()=>U(!1)),P.addEventListener("click",()=>U(!0)),_.addEventListener("click",V=>{V.target===_&&U(!1)}),document.addEventListener("keydown",j,!0),N.appendChild(B),N.appendChild(P),E.appendChild(y),E.appendChild(I),E.appendChild(N),_.appendChild(E),document.body.appendChild(_),B.focus()})}var nke=.05;function ike([[d,s],[h,p]],m){let _=(p-s)*m,E=(h-d)*m;return[[d-E,s-_],[h+E,p+_]]}function R2t(d,s=256,h=null){if(!ZKt(d))return null;let p=d[0][0],m=d[0][1],_=Math.max(d[1][1]-m,d[1][0]-p),E=s/_,y=ZKt(h)?h:d,[[I,N],[B,P]]=ike(y,nke);return{scale:E,maxDXDY:_,originX:m,originY:p,fitBounds:Vf(N,I,P,B,E,_,m,p)}}function ZKt(d){return!!d&&d[1][0]>d[0][0]&&d[1][1]>d[0][1]}function eJt(d,s){return!!d&&!!s&&d[0][0]===s[0][0]&&d[0][1]===s[0][1]&&d[1][0]===s[1][0]&&d[1][1]===s[1][1]}function wg(d){d.selectionToken=(d.selectionToken||0)+1;for(let s of d.selectionResetters||[])s();return d.selectionToken}function N0(d,s){return d.selectionToken===s}function nJt(d,s){d.selectionResetters||(d.selectionResetters=[]),d.selectionResetters.push(s)}function iJt(d=typeof L<"u"?L.CRS.Simple:void 0,s={}){return{crs:d,zoom:1,zoomSnap:1,zoomDelta:1,fadeAnimation:!1,attributionControl:!1,scrollWheelZoom:s.wheelZoom!==!1,keyboardPanDelta:bR(s.arrowStep)}}var D2t=80,FU=10,UU=1e3;function bR(d){let s=d===""||d===null?NaN:Math.round(Number(d));return Number.isFinite(s)?Math.min(UU,Math.max(FU,s)):D2t}function rJt(d,s){d?.keyboard?._setPanDelta?.(s)}function ok(d="vis-group-header"){let s=document.createElement("div");s.className=d;let h=document.createElement("span");h.className="vis-arrow",s.appendChild(h);let p=document.createElement("span");return p.className="vis-name",s.appendChild(p),{header:s,arrow:h,name:p}}function ck(d,s,h,p){let m=_=>{h.classList.toggle("collapsed",_),s.textContent=_?"\u25B6":"\u25BC"};m(!!p),d.addEventListener("click",_=>{let E=_.target&&_.target.parentNode===d&&_.target.classList&&_.target.classList.contains("vis-name");_.target!==d&&_.target!==s&&!E||m(!h.classList.contains("collapsed"))})}var YKt=30;function sJt(d,s=8){if(!Number.isFinite(d)||d<=0)return YKt;let h=Math.ceil(Math.log2(s/d));return Math.max(1,Math.min(YKt,h))}function oJt({designBounds:d,fitRect:s,viewW:h,viewH:p}){let m=R2t(d,o3,s),_=j=>Number.isFinite(j)&&j>0;if(!m||!_(h)||!_(p))return o3;let E=m.fitBounds[1][1]-m.fitBounds[0][1],y=m.fitBounds[1][0]-m.fitBounds[0][0],I=Math.min(h/E,p/y),N=Math.log2(I);if(!Number.isFinite(N)||N<0)return o3;let B=Math.floor(N),P=o3*2**(N-B),U=Math.floor(P/P2t)*P2t;return U>o3&&Math.log2(o3*I/U)>=B?U:o3}function cJt(d,{showDbu:s,dbuPerMicron:h},p=!1){if(s)return String(Math.round(d));let m=h>0?h:1e3,_=Math.ceil(Math.log10(m)),E=(d/m).toFixed(_);return p?E+" \xB5m":E}function aJt(d,{showDbu:s,dbuPerMicron:h}){let p=parseFloat(d);if(!Number.isFinite(p))return null;if(s)return Math.round(p);let m=h>0?h:1e3;return Math.round(p*m)}function uJt(d,{showDbu:s,dbuPerMicron:h}){if(s)return String(Math.round(d));let p=h>0?h:1e3,m=d/p;return m>=1e3?(m/1e3).toFixed(3)+" mm":m>=1?m.toFixed(3)+" um":(m*1e3).toFixed(1)+" nm"}function lJt({showDbu:d}){return d?"DBU":"\xB5m"}function wR(d){return typeof d=="string"&&/^#[0-9a-fA-F]{6}$/.test(d)}function hJt(d){if(typeof d!="string")return null;let s=d.trim();if(wR(s))return s.toLowerCase();let h=s.match(/^#([0-9a-fA-F]{3})$/);if(h)return"#"+h[1].split("").map(m=>m+m).join("").toLowerCase();let p=s.match(/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/);if(p){let m=p.slice(1).map(Number);return m.some(_=>_>255)?null:"#"+m.map(_=>_.toString(16).padStart(2,"0")).join("")}return null}function zU(d){let s=null;return()=>{s===null&&(s=requestAnimationFrame(()=>{s=null,d()}))}}function KKt(d){let s=Math.pow(10,Math.floor(Math.log10(d))),h=d/s,p;return h<1.5?p=1:h<3.5?p=2:h<7.5?p=5:p=10,{value:p*s,digit:p}}function fJt({targetPx:d,pxPerDbu:s,dbuPerMicron:h,showDbu:p}){if(!Number.isFinite(s)||s<=0||!Number.isFinite(d)||d<=0)return null;let m,_,E;if(p){let I=KKt(Math.max(1,d/s));E=I.digit,m=Math.round(I.value*s),_=String(Math.round(I.value))}else{let I=Number.isFinite(h)&&h>0?h:1e3,N=s*I,B=KKt(d/N);E=B.digit;let P=B.value;m=Math.round(P*N);let U,j;P>=1e3?(U=1/1e3,j="mm"):P>=1?(U=1,j="\xB5m"):P>=.001?(U=1e3,j="nm"):(U=1e6,j="pm"),_=Math.round(P*U)+" "+j}return{barPx:m,label:_,segments:E===1?5:E}}function jU(d,s,h){return s?typeof d.runTclScript=="function"?d.runTclScript(s,h):(h&&typeof d.echoTcl=="function"&&d.echoTcl(s),d.websocketManager.request({type:"tcl_eval",cmd:s}).catch(()=>{})):Promise.resolve()}function ak(d,s){let h=d.querySelectorAll("thead th");(!s||!s[0])&&(d.style.tableLayout="auto",h.forEach(p=>p.style.width=""),s=Array.from(h,p=>p.offsetWidth+"px")),h.forEach((p,m)=>p.style.width=s[m]||""),d.style.tableLayout="fixed",h.forEach((p,m)=>{if(m===h.length-1)return;let _=document.createElement("div");_.className="col-resize-grip",p.style.position="relative",p.appendChild(_);let E,y,I=B=>{p.style.width=Math.max(30,y+B.clientX-E)+"px"},N=()=>{document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",N);let B=P=>P.stopPropagation();document.addEventListener("click",B,{capture:!0,once:!0}),setTimeout(()=>{document.removeEventListener("click",B,{capture:!0})},0)};_.addEventListener("mousedown",B=>{B.preventDefault(),E=B.clientX,y=p.offsetWidth,document.addEventListener("mousemove",I),document.addEventListener("mouseup",N)})})}function dJt(d,s){d.scrollWheelZoom.disable(),d.getContainer().addEventListener("wheel",h=>{if(h.preventDefault(),s()===h.ctrlKey){let[m,_]=N2t(h,()=>d.getContainer().clientHeight);d.panBy([m,_],{animate:!1});return}let p=h.deltaY<0?1:-1;d.setZoomAround(d.mouseEventToLatLng(h),d.getZoom()+p)},{passive:!1})}function N2t(d,s){let p=1;return d.deltaMode===1?p=16:d.deltaMode===2&&(p=s()||16),[d.deltaX*p,d.deltaY*p]}function vR(d,s,h,p){let m=document.createElement("div");m.className="modal-overlay",m.innerHTML=` + `,document.body.appendChild(m);let _=()=>m.remove();m.addEventListener("click",I=>{I.target===m&&_()}),m.addEventListener("keydown",I=>{I.key==="Escape"&&_()}),m.querySelector(".cancel").addEventListener("click",_),m.querySelector(".modal-close").addEventListener("click",_);let E=m.querySelector(".modal-error"),y=(I,N)=>{E.textContent=I,E.style.display=I?"block":"none",E.classList.toggle("info",!!N)};return{overlay:m,close:_,okBtn:m.querySelector(".ok"),showError:y}}var ent=class{constructor(){this.eventListeners=new Map}on(s,h){this.eventListeners.has(s)||this.eventListeners.set(s,new Set),this.eventListeners.get(s).add(h)}off(s,h){this.eventListeners.get(s)?.delete(h)}emit(s,...h){let p=this.eventListeners.get(s);if(p)for(let m of p)try{m(...h)}catch(_){console.error(_)}}fire(s,...h){this.emit(s,...h)}};function HU(d,s,h={}){d.dispatchEvent(new CustomEvent(s,{bubbles:!0,composed:!0,detail:h}))}var mJt=IU` + .ide-tab-icon { + display: inline-flex; + align-items: center; + justify-content: center; + flex: none; + width: 13px; + height: 13px; + } + + .ide-tab-icon svg { + width: 100%; + height: 100%; + display: block; + } +`,O2t=class extends Ty{static properties={name:{type:String,reflect:!0},maximizable:{type:Boolean,reflect:!0},collapsible:{type:Boolean,reflect:!0},maximized:{type:Boolean,reflect:!0},collapsed:{type:Boolean,reflect:!0},_overflowing:{state:!0},_fadeStart:{state:!0},_fadeEnd:{state:!0},_menuOpen:{state:!0}};static styles=[mJt,IU` :host { display: flex; flex-direction: column; @@ -3824,12 +3849,38 @@ path, rect, circle, polygon { min-width: 0; overflow-x: auto; scrollbar-width: none; + --tab-fade: 24px; + /* Scrolling a tab into view keeps it clear of the faded edge. */ + scroll-padding-inline: var(--tab-fade); + -webkit-mask-image: var(--tab-mask, none); + mask-image: var(--tab-mask, none); } .ide-tabs::-webkit-scrollbar { display: none; } + /* The tabs at their full width: its size is the strip's scrollWidth. */ + .ide-tabs-track { + display: flex; + flex: none; + height: 100%; + } + + /* Fade the edge that has tabs scrolled past it. */ + .ide-tabs.fade-start { + --tab-mask: linear-gradient(to left, #000 calc(100% - var(--tab-fade)), transparent); + } + + .ide-tabs.fade-end { + --tab-mask: linear-gradient(to right, #000 calc(100% - var(--tab-fade)), transparent); + } + + .ide-tabs.fade-start.fade-end { + --tab-mask: linear-gradient(to right, transparent, #000 var(--tab-fade), + #000 calc(100% - var(--tab-fade)), transparent); + } + .ide-controls { display: flex; align-items: center; @@ -3853,46 +3904,161 @@ path, rect, circle, polygon { transition: background-color 120ms ease, color 120ms ease; } - .ide-btn:hover { + .ide-btn:hover, + .ide-btn-overflow[aria-expanded="true"] { background: var(--bg-hover); color: var(--fg-primary); } + /* Always laid out, so whether the tabs overflow never depends on it showing. */ + .ide-btn-overflow.idle { + visibility: hidden; + } + + .ide-btn.ide-btn-restore { + width: auto; + padding: 0 6px; + border: 1px solid var(--border-strong); + color: var(--fg-primary); + } + + .ide-btn.ide-btn-restore:hover { + color: var(--accent); + border-color: var(--accent); + } + .ide-content { flex: 1; position: relative; overflow: hidden; } - `;constructor(){super(),this._onMaximizeClick=this._onMaximizeClick.bind(this),this._onCollapseClick=this._onCollapseClick.bind(this)}connectedCallback(){super.connectedCallback(),this.classList.add("ide-pane",`ide-pane-${this.paneName}`)}get paneName(){return this.name||this.id.replace(/^pane-/,"")||"pane"}get _collapseIcon(){let s=this.paneName;return s==="bottom"?this.collapsed?"\u25B2":"\u25BC":s==="left"?this.collapsed?"\u25B6":"\u25C0":s==="right"?this.collapsed?"\u25C0":"\u25B6":"\u25BC"}get _collapseTitle(){let s=this.paneName,h=s.charAt(0).toUpperCase()+s.slice(1);return s==="bottom"?this.collapsed?"Expand Console":"Collapse Console":s==="left"?this.collapsed?"Expand Left Panel":"Collapse Left Panel":s==="right"?this.collapsed?"Expand Right Panel":"Collapse Right Panel":`Collapse ${h}`}_onMaximizeClick(s){s.stopPropagation(),DU(this,"ide-pane-maximize",{pane:this.paneName})}_onCollapseClick(s){s.stopPropagation(),DU(this,"ide-pane-collapse",{pane:this.paneName})}setMaximized(s){this.maximized=!!s}setCollapsed(s){this.collapsed=!!s}render(){let s=this.paneName,h=this.id||`pane-${s}`,g=this.maximizable,m=this.collapsible;return ek` + + /* Above Leaflet's controls (z-index 1000), below .context-menu. */ + .ide-tab-menu { + position: absolute; + top: 28px; + right: 4px; + z-index: 1100; + display: flex; + flex-direction: column; + min-width: min(160px, 100% - 8px); + max-width: calc(100% - 8px); + max-height: calc(100% - 32px); + overflow-y: auto; + padding: 4px 0; + background: var(--bg-context); + border: 1px solid var(--border-strong); + border-radius: var(--radius-sm); + box-shadow: 0 2px 8px var(--shadow); + box-sizing: border-box; + } + + .ide-tab-menu-item { + display: flex; + align-items: center; + gap: var(--space-sm, 6px); + padding: 5px 12px 5px 6px; + background: transparent; + border: none; + color: var(--fg-primary); + font-family: var(--font-sans); + font-size: var(--fs-12); + text-align: left; + white-space: nowrap; + cursor: pointer; + } + + .ide-tab-menu-item:hover, + .ide-tab-menu-item:focus-visible { + background: var(--bg-hover); + color: var(--fg-bright); + outline: none; + } + + .ide-tab-menu-item[aria-checked="true"] { + color: var(--accent-tab); + } + + .ide-tab-menu-check { + flex: none; + width: 12px; + text-align: center; + } + + .ide-tab-menu-title { + flex: 1; + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + } + `];constructor(){super(),this._overflowing=!1,this._fadeStart=!1,this._fadeEnd=!1,this._menuOpen=!1,this._tabsEl=null,this._tabsTrack=null,this._tabsSlot=null,this._tabsObserver=null,this._tabsMutations=null,this._menuAbort=null,this._menuHadFocus=!1,this._inUpdate=!1}connectedCallback(){super.connectedCallback(),this.classList.add("ide-pane",`ide-pane-${this.paneName}`),this.hasUpdated&&this._observeStrip()}disconnectedCallback(){super.disconnectedCallback(),this._tabsObserver?.disconnect(),this._closeMenu()}firstUpdated(){this._tabsEl=this.renderRoot.querySelector(".ide-tabs"),this._tabsTrack=this.renderRoot.querySelector(".ide-tabs-track"),this._tabsSlot=this.renderRoot.querySelector('slot[name="tabs"]'),this._tabsObserver=new ResizeObserver(()=>{this._updateOverflow(),this._tabs.find(s=>s.active)?.scrollIntoView({inline:"nearest",block:"nearest"})}),this._tabsMutations=new MutationObserver(()=>this.requestUpdate()),this._observeStrip()}willUpdate(s){this._menuHadFocus=this._menuOpen&&this._menuHasFocus(),this._inUpdate=!0,this._menuOpen&&(!this._overflowing||this.collapsed||s.has("maximized"))&&this._closeMenu(this._menuHadFocus)}updated(s){this._inUpdate=!1,this._menuOpen&&(s.has("_menuOpen")||this._menuHadFocus&&!this._menuHasFocus())&&this._focusMenuItem()}get _tabs(){return this._tabsSlot?.assignedElements()||[]}_observeStrip(){this._tabsObserver.observe(this._tabsEl),this._tabsObserver.observe(this._tabsTrack)}_observeTabs(){this._tabsMutations.disconnect();for(let s of this._tabs)this._tabsMutations.observe(s,{attributes:!0,attributeFilter:["active","hidden","title"]})}_onTabsSlotChange(){this._menuOpen&&(this._observeTabs(),this.requestUpdate())}_updateOverflow(){let s=this._tabsEl;if(!s)return;let h=s.scrollWidth-s.clientWidth;this._overflowing=h>1,this._fadeStart=this._overflowing&&s.scrollLeft>1,this._fadeEnd=this._overflowing&&s.scrollLeft=Math.abs(s.deltaY)||(s.preventDefault(),this._tabsEl.scrollLeft+=N2t(s,()=>this._tabsEl.clientWidth)[1])}_onOverflowClick(){this._menuOpen?this._closeMenu(!0):this._openMenu()}_openMenu(){this._menuOpen=!0,this._observeTabs(),this._menuAbort=new AbortController;let{signal:s}=this._menuAbort;document.addEventListener("pointerdown",h=>{let p=h.composedPath();[".ide-tab-menu",".ide-btn-overflow"].some(_=>p.includes(this.renderRoot.querySelector(_)))||this._closeMenu()},{signal:s}),window.addEventListener("keydown",h=>this._onMenuKey(h),{capture:!0,signal:s})}_closeMenu(s=!1){this._menuAbort?.abort(),this._menuAbort=null,this._tabsMutations?.disconnect(),this._menuOpen=!1,s&&this.renderRoot.querySelector(".ide-btn-overflow")?.focus()}_menuHasFocus(){return!!this.renderRoot?.activeElement?.closest(".ide-tab-menu")}_focusMenuItem(){let s=[...this.renderRoot.querySelectorAll(".ide-tab-menu-item")];(s.find(h=>h.getAttribute("aria-checked")==="true")||s[0])?.focus()}_onMenuFocusout(s){this._inUpdate||this._menuOpen&&!s.currentTarget.contains(s.relatedTarget)&&this._closeMenu()}_keepMenuFocus(s){s.preventDefault()}_onMenuKey(s){let h=this.renderRoot.querySelector(".ide-tab-menu");if(!h||!s.composedPath().includes(h))return;let p=[...h.querySelectorAll(".ide-tab-menu-item")],m=p.length,_=p.indexOf(this.renderRoot.activeElement),E=null;if(s.key==="ArrowDown")E=p[(_+1)%m];else if(s.key==="ArrowUp")E=p[_<=0?m-1:_-1];else if(s.key==="Home")E=p[0];else if(s.key==="End")E=p[m-1];else if(s.key.length===1&&s.key!==" "&&!s.ctrlKey&&!s.metaKey&&!s.altKey){let y=s.key.toLowerCase();E=[...p.slice(_+1),...p.slice(0,_+1)].find(I=>I.querySelector(".ide-tab-menu-title").textContent.toLowerCase().startsWith(y))}else if(s.key!=="Escape")return;s.preventDefault(),s.stopPropagation(),s.key==="Escape"?this._closeMenu(!0):E?.focus()}_selectFromMenu(s){this._closeMenu(!0),s.select()}_renderTabMenu(){let s=this._tabs.filter(h=>!h.hidden);return Sy` + + `}get paneName(){return this.name||this.id.replace(/^pane-/,"")||"pane"}get _collapseIcon(){let s=this.paneName;return s==="bottom"?this.collapsed?"\u25B2":"\u25BC":s==="left"?this.collapsed?"\u25B6":"\u25C0":s==="right"?this.collapsed?"\u25C0":"\u25B6":"\u25BC"}get _collapseTitle(){let s=this.paneName,h=s.charAt(0).toUpperCase()+s.slice(1);return s==="bottom"?this.collapsed?"Expand Console":"Collapse Console":s==="left"?this.collapsed?"Expand Left Panel":"Collapse Left Panel":s==="right"?this.collapsed?"Expand Right Panel":"Collapse Right Panel":`Collapse ${h}`}_onMaximizeClick(s){s.stopPropagation(),HU(this,"ide-pane-maximize",{pane:this.paneName})}_onCollapseClick(s){s.stopPropagation(),HU(this,"ide-pane-collapse",{pane:this.paneName})}setMaximized(s){this.maximized=!!s}setCollapsed(s){this.collapsed=!!s}render(){let s=this.paneName,h=this.id||`pane-${s}`,p=this.maximizable,m=this.collapsible;return Sy`
-
- +
+
+ +
- ${v2t(g,()=>ek` + + ${A2t(p,()=>Sy` + >${this.maximized?"\u29C9 Restore layout":"\u2922"} `)} - ${v2t(m,()=>ek` + ${A2t(m,()=>Sy` `)}
+ ${this._menuOpen?this._renderTabMenu():_u}
- `}},x2t=class{constructor(s,h={}){(this.host=s).addController(this),this.options=h,this._abort=null,this.isDragging=!1,this.startPos=0}hostDisconnected(){this.stop()}start(s,h=!0){s.preventDefault();try{this.host.setPointerCapture(s.pointerId)}catch{}this.isDragging=!0,this.host.classList.add("dragging"),document.body&&document.body.classList.add("is-resizing",h?"is-resizing-v":"is-resizing-h"),this.startPos=h?s.clientX:s.clientY,this.options.onStart?.({startPos:this.startPos,event:s}),this._abort=new AbortController;let{signal:g}=this._abort;window.addEventListener("pointermove",_=>{let S=h?_.clientX:_.clientY,y=S-this.startPos;this.options.onDrag?.({delta:y,currentPos:S,startPos:this.startPos,event:_})},{signal:g});let m=_=>{try{this.host.releasePointerCapture(s.pointerId)}catch{}this.stop(h),this.options.onEnd?.({event:_})};window.addEventListener("pointerup",m,{signal:g}),window.addEventListener("pointercancel",m,{signal:g})}stop(s=!0){this.isDragging&&(this.isDragging=!1,this.host.classList.remove("dragging"),document.body&&document.body.classList.remove("is-resizing","is-resizing-v","is-resizing-h"),this._abort?.abort(),this._abort=null)}},M2t=class extends Ey{static properties={for:{type:String},orientation:{type:String,reflect:!0}};constructor(){super(),this.orientation="vertical",this._connectedAbort=null,this.drag=new x2t(this,{onStart:({startPos:s})=>this._emit("start",{startPos:s}),onDrag:({delta:s,currentPos:h,startPos:g})=>this._emit("drag",{delta:s,currentPos:h,startPos:g}),onEnd:()=>this._emit("end")})}connectedCallback(){super.connectedCallback(),this._connectedAbort=new AbortController;let{signal:s}=this._connectedAbort;this.setAttribute("role","separator"),this.classList.add("ide-splitter"),this.addEventListener("pointerdown",h=>this.drag.start(h,this.isVertical),{signal:s}),this.addEventListener("dblclick",()=>this._emit("reset"),{signal:s})}disconnectedCallback(){super.disconnectedCallback(),this._connectedAbort?.abort()}updated(s){super.updated(s);let h=this.isVertical;this.setAttribute("aria-orientation",h?"vertical":"horizontal"),this.classList.toggle("ide-splitter-v",h),this.classList.toggle("ide-splitter-h",!h)}get targetPane(){return this.for||""}get isVertical(){return this.orientation==="vertical"}_emit(s,h={}){DU(this,`ide-splitter-${s}`,{for:this.targetPane,orientation:this.isVertical?"vertical":"horizontal",...h})}},N0=d=>c1`{let E=h?_.clientX:_.clientY,y=E-this.startPos;this.options.onDrag?.({delta:y,currentPos:E,startPos:this.startPos,event:_})},{signal:p});let m=_=>{try{this.host.releasePointerCapture(s.pointerId)}catch{}this.stop(h),this.options.onEnd?.({event:_})};window.addEventListener("pointerup",m,{signal:p}),window.addEventListener("pointercancel",m,{signal:p})}stop(s=!0){this.isDragging&&(this.isDragging=!1,this.host.classList.remove("dragging"),document.body&&document.body.classList.remove("is-resizing","is-resizing-v","is-resizing-h"),this._abort?.abort(),this._abort=null)}},F2t=class extends Ty{static properties={for:{type:String},orientation:{type:String,reflect:!0}};constructor(){super(),this.orientation="vertical",this._connectedAbort=null,this.drag=new B2t(this,{onStart:({startPos:s})=>this._emit("start",{startPos:s}),onDrag:({delta:s,currentPos:h,startPos:p})=>this._emit("drag",{delta:s,currentPos:h,startPos:p}),onEnd:()=>this._emit("end")})}connectedCallback(){super.connectedCallback(),this._connectedAbort=new AbortController;let{signal:s}=this._connectedAbort;this.setAttribute("role","separator"),this.classList.add("ide-splitter"),this.addEventListener("pointerdown",h=>this.drag.start(h,this.isVertical),{signal:s}),this.addEventListener("dblclick",()=>this._emit("reset"),{signal:s})}disconnectedCallback(){super.disconnectedCallback(),this._connectedAbort?.abort()}updated(s){super.updated(s);let h=this.isVertical;this.setAttribute("aria-orientation",h?"vertical":"horizontal"),this.classList.toggle("ide-splitter-v",h),this.classList.toggle("ide-splitter-h",!h)}get targetPane(){return this.for||""}get isVertical(){return this.orientation==="vertical"}_emit(s,h={}){HU(this,`ide-splitter-${s}`,{for:this.targetPane,orientation:this.isVertical?"vertical":"horizontal",...h})}},O0=d=>c1``,O0=Object.freeze({LAYOUT:N0(c1``),SCHEMATIC:N0(c1``),VIEWER_3D:N0(c1``),DISPLAY_CONTROLS:N0(c1``),INSPECTOR:N0(c1``),HIERARCHY:N0(c1``),TIMING:N0(c1``),DRC:N0(c1``),SELECT_HIGHLIGHT:N0(c1``),CLOCK_TREE:N0(c1``),CHARTS:N0(c1``),TCL_CONSOLE:N0(c1``),HELP:N0(c1``)}),E2t=class extends Ey{static properties={title:{type:String,reflect:!0},closable:{type:Boolean,reflect:!0},for:{type:String},active:{type:Boolean,reflect:!0},icon:{attribute:!1}};static styles=Fet` + aria-hidden="true">${d}`,B0=Object.freeze({LAYOUT:O0(c1``),SCHEMATIC:O0(c1``),VIEWER_3D:O0(c1``),DISPLAY_CONTROLS:O0(c1``),INSPECTOR:O0(c1``),HIERARCHY:O0(c1``),TIMING:O0(c1``),DRC:O0(c1``),SELECT_HIGHLIGHT:O0(c1``),CLOCK_TREE:O0(c1``),CHARTS:O0(c1``),TCL_CONSOLE:O0(c1``),HELP:O0(c1``)}),U2t=class extends Ty{static properties={title:{type:String,reflect:!0},closable:{type:Boolean,reflect:!0},for:{type:String},active:{type:Boolean,reflect:!0},icon:{attribute:!1}};static styles=[mJt,IU` :host { display: inline-flex; align-items: center; @@ -3928,33 +4094,15 @@ path, rect, circle, polygon { border-bottom: 2px solid var(--accent-tab); } - .ide-tab-icon, - ::slotted([slot="icon"]), - .or-tab-icon { - display: inline-flex; - align-items: center; - justify-content: center; - flex: none; - width: 13px; - height: 13px; + .ide-tab-icon { opacity: 0.7; } - :host([active]) .ide-tab-icon, - :host([active]) ::slotted([slot="icon"]), - :host([active]) .or-tab-icon { + :host([active]) .ide-tab-icon { color: var(--accent-tab); opacity: 1; } - .ide-tab-icon svg, - ::slotted([slot="icon"]) svg, - .or-tab-icon svg { - width: 100%; - height: 100%; - display: block; - } - .ide-tab-title { user-select: none; padding-top: 0; @@ -3980,11 +4128,11 @@ path, rect, circle, polygon { background: var(--bg-hover); color: var(--sem-error); } - `;constructor(){super(),this._connectedAbort=null,this.icon=null,this._onClick=this._onClick.bind(this),this._onCloseClick=this._onCloseClick.bind(this)}connectedCallback(){super.connectedCallback(),this._connectedAbort=new AbortController;let{signal:s}=this._connectedAbort;this.classList.add("ide-tab"),this.setAttribute("role","tab"),this.hasAttribute("aria-selected")||this.setAttribute("aria-selected","false"),this.addEventListener("click",this._onClick,{signal:s})}disconnectedCallback(){super.disconnectedCallback(),this._connectedAbort?.abort()}_onClick(s){(s.composedPath?s.composedPath():[s.target]).some(g=>g.classList?.contains("ide-tab-close"))||DU(this,"tab-select",{componentType:this.targetComponent})}_onCloseClick(s){s.stopPropagation(),DU(this,"tab-close",{componentType:this.targetComponent})}get targetComponent(){return this.for||this.getAttribute("data-component")||this.id.replace(/^tab-/,"")||""}setActive(s){this.active=!!s}updated(s){super.updated(s),s.has("active")&&this.setAttribute("aria-selected",this.active?"true":"false")}render(){return ek` - ${this.icon?ek`${this.icon}`:nl} + `];constructor(){super(),this._connectedAbort=null,this.icon=null,this._onClick=this._onClick.bind(this),this._onCloseClick=this._onCloseClick.bind(this)}connectedCallback(){super.connectedCallback(),this._connectedAbort=new AbortController;let{signal:s}=this._connectedAbort;this.classList.add("ide-tab"),this.setAttribute("role","tab"),this.hasAttribute("aria-selected")||this.setAttribute("aria-selected","false"),this.addEventListener("click",this._onClick,{signal:s})}disconnectedCallback(){super.disconnectedCallback(),this._connectedAbort?.abort()}_onClick(s){(s.composedPath?s.composedPath():[s.target]).some(p=>p.classList?.contains("ide-tab-close"))||this.select()}select(){HU(this,"tab-select",{componentType:this.targetComponent})}_onCloseClick(s){s.stopPropagation(),HU(this,"tab-close",{componentType:this.targetComponent})}get targetComponent(){return this.for||this.getAttribute("data-component")||this.id.replace(/^tab-/,"")||""}setActive(s){this.active=!!s}updated(s){super.updated(s),s.has("active")&&this.setAttribute("aria-selected",this.active?"true":"false")}render(){return Sy` + ${this.icon?Sy`${this.icon}`:_u} ${this.title||""} - ${this.closable?ek`✕`:nl} - `}};customElements.get("ide-pane")||customElements.define("ide-pane",y2t);customElements.get("ide-splitter")||customElements.define("ide-splitter",M2t);customElements.get("ide-tab")||customElements.define("ide-tab",E2t);var kKt={DisplayControls:{pane:"left",title:"Display Controls",icon:O0.DISPLAY_CONTROLS,closable:!1},LayoutViewer:{pane:"main",title:"Layout",icon:O0.LAYOUT,closable:!1},SchematicWidget:{pane:"main",title:"Schematic",icon:O0.SCHEMATIC},"3DViewer":{pane:"main",title:"3D Viewer",icon:O0.VIEWER_3D},TclConsole:{pane:"bottom",title:"Tcl Console",icon:O0.TCL_CONSOLE,closable:!1},Inspector:{pane:"right",title:"Inspector",icon:O0.INSPECTOR},Browser:{pane:"right",title:"Hierarchy",icon:O0.HIERARCHY},TimingWidget:{pane:"right",title:"Timing",icon:O0.TIMING},DRCWidget:{pane:"right",title:"DRC",icon:O0.DRC},SelectHighlight:{pane:"right",title:"Select Highlight",icon:O0.SELECT_HIGHLIGHT},ClockWidget:{pane:"right",title:"Clock Tree",icon:O0.CLOCK_TREE},ChartsWidget:{pane:"right",title:"Charts",icon:O0.CHARTS},HelpWidget:{pane:"right",title:"Help",icon:O0.HELP}},LKt={left:"DisplayControls",main:"LayoutViewer",bottom:"TclConsole",right:"Inspector"},i3={left:{cssVar:"--pane-left-width",defaultSize:240,minSize:140,maxFraction:.45},right:{cssVar:"--pane-right-width",defaultSize:340,minSize:160,maxFraction:.5,invertDelta:!0},bottom:{cssVar:"--pane-bottom-height",defaultSize:220,minSize:70,maxFraction:.75,invertDelta:!0}},Het=class extends jet{constructor(s){super(),this.containerEl=s,this.factories=new Map,this.components=new Map,this.activeTabs={left:null,main:null,bottom:null,right:null},this.closedComponents=new Set,this._resizeScheduled=!1,this._ensureDOM(),this._initSplitters(),this._initControls(),this._initResizeObserver()}_ensureDOM(){this.containerEl.classList.add("ide-layout"),this.containerEl.querySelector("#pane-left")||this._buildInitialLayoutTree(),this._resolvePaneReferences()}_buildInitialLayoutTree(){this.containerEl.innerHTML=` + ${this.closable?Sy`✕`:_u} + `}};customElements.get("ide-pane")||customElements.define("ide-pane",O2t);customElements.get("ide-splitter")||customElements.define("ide-splitter",F2t);customElements.get("ide-tab")||customElements.define("ide-tab",U2t);var pJt={DisplayControls:{pane:"left",title:"Display Controls",icon:B0.DISPLAY_CONTROLS,closable:!1},LayoutViewer:{pane:"main",title:"Layout",icon:B0.LAYOUT,closable:!1},SchematicWidget:{pane:"main",title:"Schematic",icon:B0.SCHEMATIC},"3DViewer":{pane:"main",title:"3D Viewer",icon:B0.VIEWER_3D},TclConsole:{pane:"bottom",title:"Tcl Console",icon:B0.TCL_CONSOLE,closable:!1},Inspector:{pane:"right",title:"Inspector",icon:B0.INSPECTOR},Browser:{pane:"right",title:"Hierarchy",icon:B0.HIERARCHY},TimingWidget:{pane:"right",title:"Timing",icon:B0.TIMING},DRCWidget:{pane:"right",title:"DRC",icon:B0.DRC},SelectHighlight:{pane:"right",title:"Select Highlight",icon:B0.SELECT_HIGHLIGHT},ClockWidget:{pane:"right",title:"Clock Tree",icon:B0.CLOCK_TREE},ChartsWidget:{pane:"right",title:"Charts",icon:B0.CHARTS},HelpWidget:{pane:"right",title:"Help",icon:B0.HELP}},gJt={left:"DisplayControls",main:"LayoutViewer",bottom:"TclConsole",right:"Inspector"},a3={left:{cssVar:"--pane-left-width",defaultSize:240,minSize:140,maxFraction:.45},right:{cssVar:"--pane-right-width",defaultSize:340,minSize:160,maxFraction:.5,invertDelta:!0},bottom:{cssVar:"--pane-bottom-height",defaultSize:220,minSize:70,maxFraction:.75,invertDelta:!0}},nnt=class extends ent{constructor(s){super(),this.containerEl=s,this.factories=new Map,this.components=new Map,this.activeTabs={left:null,main:null,bottom:null,right:null},this.closedComponents=new Set,this._resizeScheduled=!1,this._ensureDOM(),this._initSplitters(),this._initControls(),this._initResizeObserver()}_ensureDOM(){this.containerEl.classList.add("ide-layout"),this.containerEl.querySelector("#pane-left")||this._buildInitialLayoutTree(),this._resolvePaneReferences()}_buildInitialLayoutTree(){this.containerEl.innerHTML=` @@ -4003,56 +4151,46 @@ path, rect, circle, polygon { - `}_resolvePaneReferences(){let s=["left","main","bottom","right"];this.panes={};for(let h of s){let g=this.containerEl.querySelector(`#pane-${h}`);g&&(g.el=g,g.paneComponent=g),this.panes[h]=g}this.centerEl=this.containerEl.querySelector("#pane-center")}_initSplitters(){let s=null;this.containerEl.addEventListener("ide-splitter-start",h=>{let g=h.detail?.for,m=i3[g];if(!m)return;let _=(h.detail?.orientation||"vertical")==="vertical",y=(_?this.containerEl:this.centerEl||this.containerEl).getBoundingClientRect(),R=this.panes[g]?.getBoundingClientRect()||{},N=_?y.width:y.height,B=_?R.width||m.defaultSize:R.height||m.defaultSize;s={paneName:g,cfg:m,startSize:B,maxLimit:Math.round(N*m.maxFraction)||500}}),this.containerEl.addEventListener("ide-splitter-drag",h=>{if(!s||s.paneName!==h.detail?.for)return;let{cfg:g,startSize:m,maxLimit:_}=s,S=g.invertDelta?-h.detail.delta:h.detail.delta,y=Math.round(m+S),R=Math.max(g.minSize,Math.min(_,y));this.containerEl.style.setProperty(g.cssVar,`${R}px`),this.notifyResize()}),this.containerEl.addEventListener("ide-splitter-end",()=>{s=null,this.saveLayout(),this.notifyResize()}),this.containerEl.addEventListener("ide-splitter-reset",h=>{let g=h.detail?.for;this._resetSplitterPane(g)})}_resetSplitterPane(s){let h=i3[s];h&&(this.containerEl.style.setProperty(h.cssVar,`${h.defaultSize}px`),this.isPaneCollapsed(s)?this.restorePane(s):(this.saveLayout(),this.notifyResize()))}_initControls(){this.containerEl.addEventListener("ide-pane-maximize",s=>{this.toggleMaximize(s.detail?.pane)}),this.containerEl.addEventListener("ide-pane-collapse",s=>{this.toggleCollapse(s.detail?.pane)}),this.containerEl.addEventListener("ide-layout-reset",()=>{this.resetLayout()});for(let s of["left","right","bottom"]){let h=this.containerEl.querySelector(`#gutter-expand-${s}`);h&&h.addEventListener("click",()=>this.restorePane(s))}}isPaneMaximized(s){return s?!!this.panes[s]?.maximized:["main","bottom","right"].some(h=>!!this.panes[h]?.maximized)}setMaximizedPane(s,h=!0){let g=["main","bottom","right"];if(s&&!g.includes(s))return!1;let m=h?s:null;for(let _ of g){let S=_===m;this.containerEl.classList.toggle(`maximized-${_}`,S),this.panes[_]&&(this.panes[_].maximized=S)}return this.notifyResize(),!!m}maximizePane(s){return this.setMaximizedPane(s,!0)}restoreMaximized(){return this.setMaximizedPane(null,!1)}toggleMaximize(s){return this.setMaximizedPane(s,!this.isPaneMaximized(s))}isPaneCollapsed(s){let h=s==="bottom"?this.centerEl:this.containerEl;return!!this.panes[s]?.collapsed||(h?h.classList.contains(`hide-${s}`):!1)}_setPaneCollapsed(s,h){let g=s==="bottom"?this.centerEl:this.containerEl;g&&(g.classList.toggle(`hide-${s}`,h),this.panes[s]&&(this.panes[s].collapsed=h),this.saveLayout(),this.notifyResize())}toggleCollapse(s){this._setPaneCollapsed(s,!this.isPaneCollapsed(s))}collapsePane(s){this._setPaneCollapsed(s,!0)}restorePane(s){this._setPaneCollapsed(s,!1)}resetLayout(){try{localStorage.removeItem("or_ide_layout")}catch{}for(let[s,h]of Object.entries(i3))this.containerEl.style.setProperty(h.cssVar,`${h.defaultSize}px`);for(let s of["left","right","bottom"])this.restorePane(s);this.restoreMaximized(),this.closedComponents.clear();for(let s of this.components.values())s.tabEl.hidden=!1,s.contentDiv.hidden=!1;for(let s of Object.values(LKt))this.components.has(s)&&this.activateTab(s);this.saveLayout(),this.notifyResize(),this.emit("stateChanged")}_initResizeObserver(){typeof ResizeObserver<"u"&&new ResizeObserver(()=>{this.notifyResize()}).observe(this.containerEl)}registerComponentFactoryFunction(s,h){this.factories.set(s,h)}loadLayout(s){for(let g of Object.keys(kKt)){let m=this.factories.get(g);m&&this._mountComponent(g,m)}let h=null;try{let g=localStorage.getItem("or_ide_layout");g&&(h=JSON.parse(g))}catch{}if(h){if(h.leftWidth&&this.containerEl.style.setProperty("--pane-left-width",`${h.leftWidth}px`),h.rightWidth&&this.containerEl.style.setProperty("--pane-right-width",`${h.rightWidth}px`),h.bottomHeight&&this.containerEl.style.setProperty("--pane-bottom-height",`${h.bottomHeight}px`),h.closed)for(let g of h.closed)this.closeComponent(g,!1);for(let g of["left","right","bottom"]){let m=`hide${g[0].toUpperCase()}${g.slice(1)}`;h[m]&&this.collapsePane(g)}}for(let[g,m]of Object.entries(LKt))this.activateTab(h?.activeTabs?.[g]||m);this.notifyResize(),this.emit("stateChanged")}_mountComponent(s,h){if(this.components.has(s))return;let g=kKt[s]||{pane:"right",title:s,closable:!0},m=this.panes[g.pane];if(!m)return;let _=document.createElement("div");_.className="ide-component-container",_.id=`cmp-${s}`,m.appendChild(_);let S=g.closable!==!1,y=document.createElement("ide-tab");y.id=`tab-${s}`,y.slot="tabs",y.for=s,y.setAttribute("data-component",s),y.title=g.title,S&&y.setAttribute("closable",""),g.icon&&(y.icon=g.icon),y.addEventListener("tab-select",()=>this.activateTab(s)),y.addEventListener("tab-close",()=>this.closeComponent(s)),m.appendChild(y);let R=Object.assign(new jet,{element:_,get width(){return _.clientWidth},get height(){return _.clientHeight},title:g.title,focus:()=>this.focusComponent(s),close:()=>this.closeComponent(s)}),N={componentType:s,paneName:g.pane,title:g.title,closable:S,tabEl:y,contentDiv:_,container:R};this.components.set(s,N);try{h(R)}catch(B){console.error(`Failed to initialize component ${s}:`,B)}}isComponentActive(s){return s?this.activeTabs[s.paneName]===s.componentType:!1}_setComponentActive(s,h){if(!s)return;let g=!!h;s.tabEl&&(s.tabEl.active=g),s.contentDiv?.classList.toggle("active",g)}activateTab(s){let h=this.components.get(s);if(!h||!this.panes[h.paneName])return;["left","right","bottom"].includes(h.paneName)&&this.isPaneCollapsed(h.paneName)&&this.restorePane(h.paneName);let m=this.activeTabs[h.paneName];if(m&&m!==s){let _=this.components.get(m);_&&(this._setComponentActive(_,!1),_.container.fire("hide"))}this.activeTabs[h.paneName]=s,h.tabEl.hidden=!1,h.contentDiv.hidden=!1,this._setComponentActive(h,!0),this.closedComponents.delete(s),h.container.fire("show"),h.container.fire("open"),h.container.fire("resize");try{h.tabEl.scrollIntoView({behavior:"smooth",inline:"nearest",block:"nearest"})}catch{}this.notifyResize(),this.emit("stateChanged")}closeComponent(s,h=!0){let g=this.components.get(s);if(!(!g||!g.closable)){if(g.tabEl.hidden=!0,g.contentDiv.hidden=!0,this._setComponentActive(g,!1),g.container.fire("hide"),this.closedComponents.add(s),h&&this.activeTabs[g.paneName]===s){let m=null;for(let _ of this.components.values())if(_.paneName===g.paneName&&!this.closedComponents.has(_.componentType)){m=_;break}m?this.activateTab(m.componentType):(this.activeTabs[g.paneName]=null,["left","right","bottom"].includes(g.paneName)&&this.collapsePane(g.paneName))}this.notifyResize(),this.emit("stateChanged")}}focusComponent(s){if(!this.components.get(s)){let g=this.factories.get(s);if(g)this._mountComponent(s,g);else return}this.activateTab(s)}saveLayout(){let s={leftWidth:parseInt(this.containerEl.style.getPropertyValue(i3.left.cssVar)||i3.left.defaultSize,10),rightWidth:parseInt(this.containerEl.style.getPropertyValue(i3.right.cssVar)||i3.right.defaultSize,10),bottomHeight:parseInt(this.containerEl.style.getPropertyValue(i3.bottom.cssVar)||i3.bottom.defaultSize,10),hideLeft:this.isPaneCollapsed("left"),hideRight:this.isPaneCollapsed("right"),hideBottom:this.isPaneCollapsed("bottom"),activeTabs:{...this.activeTabs},closed:Array.from(this.closedComponents)};try{localStorage.setItem("or_ide_layout",JSON.stringify(s))}catch{}return s}notifyResize(){if(this._resizeScheduled)return;this._resizeScheduled=!0,(typeof requestAnimationFrame=="function"?requestAnimationFrame:h=>{h()})(()=>{this._resizeScheduled=!1;for(let h of this.components.values())this.isComponentActive(h)&&h.container.fire("resize");typeof app<"u"&&app&&app.map&&app.map.invalidateSize({animate:!1}),window.dispatchEvent(new Event("resize"))})}updateSize(){this.notifyResize()}setSize(s,h){this.notifyResize()}addComponent(s,h,g){this.focusComponent(s)}get rootItem(){return{contentItems:Array.from(this.components.keys()).map(s=>({isComponent:!0,componentType:s,focus:()=>this.focusComponent(s)}))}}};function Id(d,s,h,g,m=0,_=0){return[(s-_-g)*h,(d-m)*h]}function Vf(d,s,h,g,m,_,S=0,y=0){return[[(s-y-_)*m,(d-S)*m],[(g-y-_)*m,(h-S)*m]]}function Qw(d,s,h,g,m=0,_=0){return{dbuX:Math.round(m+s/h),dbuY:Math.round(_+g+d/h)}}var NU=class d{constructor(s,h){this.url=s,this.socket=null,this.nextId=1,this.pending=new Map,this._queue=new Map,this._inFlight=0,this._inFlightIds=new Set,this._unknownPayloadTypes=new Set,this._maxInFlight=48,this._lastRecvAt=0,this._bufStuckSince=0,this._lastBuffered=0,this.reconnectDelay=1e3,this.readyPromise=null,this.readyResolve=null,this.onStatusChange=h||(()=>{}),this.onPush=null,this._cache=null,this._isConnected=!1,this._shutdown=!1,this._livenessTimer=void 0,this._startLivenessMonitor(),this.connect()}get isConnected(){return this._isConnected||this.socket&&this.socket.readyState===WebSocket.OPEN}get pendingCount(){return this.pending.size+(this._queue?this._queue.size:0)}static fromCache(s,h){let g=Object.create(d.prototype);return g.url=null,g.socket=null,g.nextId=1,g.pending=new Map,g._queue=new Map,g._inFlight=0,g._inFlightIds=new Set,g._unknownPayloadTypes=new Set,g._maxInFlight=48,g._lastRecvAt=0,g.reconnectDelay=0,g.onStatusChange=h||(()=>{}),g.onPush=null,g._cache=s,g._isConnected=!0,g.readyPromise=Promise.resolve(),g.readyResolve=null,g}get isStaticMode(){return!!this._cache}connect(){this.readyPromise=new Promise(s=>{this.readyResolve=s}),this.socket=new WebSocket(this.url),this.socket.binaryType="arraybuffer",this.socket.onopen=()=>{console.log("WebSocket connected");let s=this._everConnected===!0;this._everConnected=!0,this._isConnected=!0,this.reconnectDelay=1e3,this._lastRecvAt=typeof performance<"u"?performance.now():0,this.readyResolve(),this.onStatusChange(),this._pump(),s&&this.onReconnected&&this.onReconnected()},this.socket.onmessage=s=>{this.handleMessage(s.data)},this.socket.onclose=()=>this._handleClose(),this.socket.onerror=s=>{console.error("WebSocket error:",s)}}_handleClose(){this._isConnected=!1,this._inFlight=0,this._inFlightIds.clear(),this._bufStuckSince=0,this.onStatusChange();for(let[s,h]of this.pending)h.reject(new Error("WebSocket closed"));this.pending.clear();for(let[s,h]of this._queue)h.reject(new Error("WebSocket closed"));if(this._queue.clear(),this._shutdown){console.log("WebSocket closed (server stopped)"),this._stopLivenessMonitor();return}console.log("WebSocket closed, reconnecting..."),setTimeout(()=>this.connect(),this.reconnectDelay),this.reconnectDelay=Math.min(this.reconnectDelay*2,3e4)}_forceReconnect(){let s=this.socket;if(this.socket=null,s){s.onopen=null,s.onmessage=null,s.onclose=null,s.onerror=null;try{s.close()}catch{}}this._handleClose()}handleMessage(s){let h=new DataView(s),g=h.getUint32(0),m=h.getUint8(4);if(this._lastRecvAt=typeof performance<"u"?performance.now():0,g===0&&m===0){let y=s.slice(8),R;try{R=JSON.parse(new TextDecoder().decode(y))}catch(N){console.error("Failed to parse server push JSON:",N);return}if(R&&R.type==="config"){Number.isFinite(R.max_in_flight)&&(this._maxInFlight=Math.max(1,Math.min(4096,Math.floor(R.max_in_flight))),this._pump());return}this.onPush&&this.onPush(R);return}this._inFlightIds.delete(g)&&this._inFlight>0&&this._inFlight--;let _=this.pending.get(g);if(!_){this._pump();return}this.pending.delete(g),this._pump(),this.onStatusChange();let S=s.slice(8);if(m===2)_.reject(new Error(new TextDecoder().decode(S)));else if(m===0)try{_.resolve(JSON.parse(new TextDecoder().decode(S)))}catch(y){_.reject(new Error("JSON parse error: "+y.message))}else m===1?_.resolve(new Blob([S],{type:"image/png"})):m===3?_.resolve(null):(this._unknownPayloadTypes.has(m)||(this._unknownPayloadTypes.add(m),console.warn(`Unrecognized websocket payload type ${m}. The server is likely newer than this page \u2014 reload to pick up the current client.`)),_.reject(new Error(`Unsupported websocket payload type ${m}`)))}request(s){if(this._cache)return this._cacheRequest(s);let h=this.nextId++;if(s.id=h,!this.socket||this.socket.readyState!==WebSocket.OPEN)return Promise.reject(new Error("WebSocket not connected"));let g,m,_=new Promise((S,y)=>{g=S,m=y});return _.requestId=h,this._queue.set(h,{msg:s,resolve:g,reject:m}),this._pump(),_}_pump(){if(!(!this.socket||this.socket.readyState!==WebSocket.OPEN)){for(;this._inFlight0&&this.socket.bufferedAmount<524288;){let[s,h]=this._queue.entries().next().value;this._queue.delete(s),this.pending.set(s,{resolve:h.resolve,reject:h.reject}),this.socket.send(JSON.stringify(h.msg)),this._inFlightIds.add(s),this._inFlight++}this.onStatusChange()}}cancel(s){let h=this._queue.get(s);if(h){this._queue.delete(s),h.reject(new Error("Request cancelled")),this.onStatusChange();return}let g=this.pending.get(s),m=this.pending.delete(s);g&&g.reject(new Error("Request cancelled")),m&&!this._cache&&this.socket&&this.socket.readyState===WebSocket.OPEN&&this.socket.send(JSON.stringify({type:"cancel",cancel_id:s,id:this.nextId++})),this.onStatusChange()}_startLivenessMonitor(){typeof setInterval>"u"||(this._livenessTimer=setInterval(()=>this._checkLiveness(),3e3),this._livenessTimer&&typeof this._livenessTimer.unref=="function"&&this._livenessTimer.unref())}_stopLivenessMonitor(){this._livenessTimer!==void 0&&typeof clearInterval<"u"&&(clearInterval(this._livenessTimer),this._livenessTimer=void 0)}_checkLiveness(){if(this._cache)return;let s=this.socket;if(!s||s.readyState!==WebSocket.OPEN){this._bufStuckSince=0,this._lastBuffered=0;return}let h=s.bufferedAmount,g=typeof performance<"u"?performance.now():0,m=!1,_="";h<=262144||h12e3&&(m=!0,_=`send buffer stuck at ${h}B for ${Math.round(g-this._bufStuckSince)}ms`),this._lastBuffered=h,!m&&this._inFlight>=this._maxInFlight&&this._queue.size>0&&this._lastRecvAt>0&&g-this._lastRecvAt>3e4&&(m=!0,_=`saturated (${this._inFlight} in flight, ${this._queue.size} queued) but silent for ${Math.round(g-this._lastRecvAt)}ms`),m&&(console.warn(`WebSocket connection wedged \u2014 ${_}; reconnecting to recover`),this._bufStuckSince=0,this._forceReconnect())}_cacheRequest(s){let h=s.type;if(h==="tile"){let _=s.layer+"/"+s.z+"/"+s.x+"/"+s.y,S=this._cache.tiles&&this._cache.tiles[_];return S?Promise.resolve("data:image/png;base64,"+S):Promise.reject(new Error("Tile not cached: "+_))}if(h==="timing_highlight"){let _=s.path_index;if(_>=0&&this._cache.overlays){let S=s.is_setup?"setup":"hold",y=this._cache.overlays[S]?.[_];this._cache.setPathOverlay&&this._cache.setPathOverlay(y?"data:image/png;base64,"+y:null)}else this._cache.setPathOverlay&&this._cache.setPathOverlay(null);return Promise.resolve({})}if(h==="set_module_colors")return Promise.resolve({ok:1,count:0});let g=h;h==="timing_report"?g="timing_report:"+(s.is_setup?"setup":"hold"):h==="slack_histogram"&&(g="slack_histogram:"+(s.is_setup?"setup":"hold"));let m=this._cache.json&&this._cache.json[g];if(m!==void 0){if(h==="timing_report"&&s.slack_min!=null&&s.slack_max!=null&&m.paths){let _=[];return m.paths.forEach((S,y)=>{S.slack>=s.slack_min&&S.slack"u"||typeof window.matchMedia!="function"||typeof d!="function")return()=>{};let s=!1,h=null,g=null,m=()=>{if(s)return;let _=window.devicePixelRatio||1;h=window.matchMedia(`(resolution: ${_}dppx)`),g=()=>{s||(m(),d(window.devicePixelRatio||1))},h.addEventListener("change",g,{once:!0})};return m(),()=>{s=!0,h&&g&&h.removeEventListener("change",g),h=null,g=null}}function hR(d,s){let h=d&&d._map?d._map.getZoom():s;return Math.floor(h)}var FAe=["tracks_pref","tracks_non_pref","debug","debug_renderers"],UAe=1/16;function C2t(d,s){if(d==null)return!1;if(!Array.isArray(d)||d.length!==4||!s)return!0;let h=Math.pow(2,s.z),g=UAe/h,m=s.x/h-g,_=s.y/h-g,S=(s.x+1)/h+g,y=(s.y+1)/h+g,[R,N,B,P]=d;return R<=S&&B>=m&&N<=y&&P>=_}function zAe(d,s,h){let g=d&&Array.isArray(d.by_size)?d.by_size:[];if(g.length===0||!s||!(h>0))return!0;let m=d.min_css_px/(h*Math.pow(2,s.z)),_=g[0];for(let S of g)S[0]<=m&&(_=S);return C2t(_[1],s)}var $et=class{constructor(){this._layers=null,this._gated=new Map,this._sized=new Map,this._generation=0}invalidate(){return this._generation++,this._layers=null,this._gated=new Map,this._sized=new Map,this._generation}apply(s,h){if(s!==this._generation)return!1;if(!h||h.supported!==!0||!h.layers||typeof h.layers!="object")return this._layers=null,!1;let g=new Map;if(h.gated&&typeof h.gated=="object")for(let[m,_]of Object.entries(h.gated))_&&typeof _=="object"&&g.set(m,new Map(Object.entries(_)));return this._layers=new Map(Object.entries(h.layers)),this._gated=g,this._sized=new Map(h.sized&&typeof h.sized=="object"?Object.entries(h.sized):[]),!0}refetch(s){let h=this.invalidate();return Promise.resolve().then(()=>s({type:"layer_extents"})).then(g=>this.apply(h,g)).catch(()=>!1)}mayHaveContent(s,h,g,m=256){if(!this._layers||g&&FAe.some(_=>g[_]))return!0;if(this._sized.has(s))return zAe(this._sized.get(s),h,m);if(!this._layers.has(s)||C2t(this._layers.get(s),h))return!0;for(let[_,S]of this._gated)if(!(g&&g[_]===!1)&&S.has(s)&&C2t(S.get(s),h))return!0;return!1}};function OU(d,s,h){let g=d&&d.app&&d.app.layerExtents;return g?g.mayHaveContent(s,h,d.visibility,tv()):!0}function ik(){return uR()}function DKt(d,s,h){return Wet(d,s,h,ik(),tv())}function fR(d,s){if(d.src&&d.src.startsWith("blob:")&&URL.revokeObjectURL(d.src),s==null){d.src=s3;return}d.src=typeof s=="string"?s:URL.createObjectURL(s)}function NKt(d,s,h,g,m){let _={visibility:d,selectability:h,visibleLayers:s,selectableLayers:g,app:m};return L.GridLayer.extend({_clampZoom:function(S){return L.GridLayer.prototype._clampZoom.call(this,hR(this,S))},initialize:function(S,y,R){this._websocketManager=S,this._layerName=y,L.GridLayer.prototype.initialize.call(this,nk(R))},createTile:function(S,y){let R=document.createElement("img");return R.alt="",R.setAttribute("role","presentation"),R._tileDone=!1,R.onload=()=>{R.src&&R.src.startsWith("blob:")&&URL.revokeObjectURL(R.src),R._tileDone||(R._tileDone=!0,y(null,R))},R.onerror=()=>{R._tileDone||(R._tileDone=!0,y(new Error("tile image load error"),R))},R._websocketRequestId=this._websocketManager.nextId,OU(_,this._layerName,S)?(this._websocketManager.request(DKt(S,this._layerName,_)).then(N=>{fR(R,N)}).catch(N=>{}),R):(R._websocketRequestId=void 0,fR(R,null),R)},refreshTiles:function(){if(this._map)for(let S in this._tiles){let y=this._tiles[S];if(!y||!y.el)continue;let R=y.el,N=y.coords;if(R._websocketRequestId!==void 0&&this._websocketManager.cancel(R._websocketRequestId),!OU(_,this._layerName,N)){R._websocketRequestId=void 0,fR(R,null);continue}R._websocketRequestId=this._websocketManager.nextId,this._websocketManager.request(DKt(N,this._layerName,_)).then(B=>{fR(R,B)}).catch(B=>{})}},_removeTile:function(S){let y=this._tiles[S];y&&y.el&&(y.el._websocketRequestId!==void 0&&this._websocketManager.cancel(y.el._websocketRequestId),y.el.src&&y.el.src.startsWith("blob:")&&URL.revokeObjectURL(y.el.src)),L.GridLayer.prototype._removeTile.call(this,S)}})}function OKt(d,s){function h(g,m){let _={type:"overlay_tile",z:g.z,x:g.x,y:g.y,...lR(ik(),m),debug_renderers:!!d.debug_renderers,debug_live:!!d.debug_live,flywires_only:!!d.flywires_only,poly_decomp:!!(s&&s.polyDecomp),focused_nets_guides:!!d.focused_nets_guides,highlight_selected:d.highlight_selected!==!1,draw_labels:d.labels!==!1};return s&&s.visibleLayerNames&&(_.visible_layers=[...s.visibleLayerNames]),_}return L.GridLayer.extend({initialize:function(g,m){this._websocketManager=g,L.GridLayer.prototype.initialize.call(this,nk(m))},createTile:function(g,m){let _=document.createElement("img");_.alt="",_.setAttribute("role","presentation"),_._tileDone=!1,_.onload=()=>{_.src&&_.src.startsWith("blob:")&&URL.revokeObjectURL(_.src),_._tileDone||(_._tileDone=!0,m(null,_))},_.onerror=()=>{_._tileDone||(_._tileDone=!0,m(new Error("overlay tile load error"),_))};let S=this._websocketManager.nextId;return _._websocketRequestId=S,this._websocketManager.request(h(g,this.getTileSize().x)).then(y=>{_._websocketRequestId===S&&fR(_,y)}).catch(y=>{}),_},refreshTiles:function(){if(this._map)for(let g in this._tiles){let m=this._tiles[g];if(!m||!m.el)continue;let _=m.el,S=m.coords;_._websocketRequestId!==void 0&&this._websocketManager.cancel(_._websocketRequestId);let y=this._websocketManager.nextId;_._websocketRequestId=y,this._websocketManager.request(h(S,this.getTileSize().x)).then(R=>{_._websocketRequestId===y&&fR(_,R)}).catch(()=>{})}},_removeTile:function(g){let m=this._tiles[g];m&&m.el&&(m.el._websocketRequestId!==void 0&&(this._websocketManager.cancel(m.el._websocketRequestId),m.el._websocketRequestId=void 0),m.el.src&&m.el.src.startsWith("blob:")&&URL.revokeObjectURL(m.el.src)),L.GridLayer.prototype._removeTile.call(this,g)}})}function BKt({zIndex:d=0,tileSize:s}={}){let h={opacity:1,zIndex:d};return s!==void 0&&(h.tileSize=s),h}var jAe=4,A2t=350*1024*1024;function FKt(d,s=1){let h=Math.round(d*Math.max(0,s));return h*h*jAe}function UKt(d,s,h=256){return!(d>0)||!(s>0)||!(h>0)?1:(Math.ceil(d/h)+1)*(Math.ceil(s/h)+1)}function zKt(d,s){let h=s||(typeof window<"u"?window:null),g=d&&d.clientWidth>0?d.clientWidth:h&&h.innerWidth>0?h.innerWidth:1024,m=d&&d.clientHeight>0?d.clientHeight:h&&h.innerHeight>0?h.innerHeight:768;return{width:g,height:m}}function k2t(d,s){if(!d)return!1;let h=!!s;return!!d.visible===h?!1:(d.visible=h,!0)}var Vet=4;function jKt(d,s,h,g=Vet){let m=s*h;return m>0?Math.max(m,d-g*m):d}function HKt({budgetBytes:d=A2t,tilesPerPane:s,bytesPerTile:h,paneCount:g}={}){if(!(s>0)||!(h>0)||!(g>0))return 1;let m=s*h;return Math.max(1,Math.min(g,Math.floor(d/m)))}function L2t(d,s){if(!Array.isArray(d)||d.length===0)return[];let h=Math.max(1,Math.min(Math.floor(s)||1,d.length)),g=Math.floor(d.length/h),m=d.length%h,_=[],S=0;for(let y=0;y0&&(R++,m--),_.push(d.slice(S,S+R)),S+=R}return _}function GKt(d,s,h){if(!d||!(h>0))return 0;d.clearRect(0,0,h,h);let g=0;for(let m of s||[]){let _=m?m.image:null;if(!_)continue;let S=m.opacity===void 0?1:m.opacity;S>0&&(d.globalAlpha=Math.min(1,S),d.drawImage(_,0,0,h,h),g++)}return d.globalAlpha=1,g}function P2t(d){for(let s of d||[])s&&typeof s.close=="function"&&s.close()}async function WKt({items:d,request:s,decode:h,draw:g,release:m=P2t,isStale:_=()=>!1,onFirstDraw:S}={}){let y=Array.isArray(d)?d:[],R={requested:y.length,arrived:0,decoded:0,drawn:0,paints:0,stale:!1};if(y.length===0)return typeof g=="function"&&g([]),R;let N=new Array(y.length).fill(null),B=!1;function P(){if(_()){R.stale=!0;return}R.drawn=g(y.map((U,W)=>({image:N[W],opacity:U.opacity})))||0,R.paints++,B||(B=!0,S&&S())}try{await Promise.all(y.map(async(U,W)=>{let q=null;try{q=await s(U)}catch{return}if(q==null)return;R.arrived++;let nt=null;try{nt=await h(q)}catch{return}nt&&(N[W]=nt,R.decoded++,P())})),B||P()}finally{m(N)}return R}function HAe(d){return d==null?Promise.resolve(null):typeof d=="string"?new Promise(s=>{let h=document.createElement("img");h.onload=()=>s(h),h.onerror=()=>s(null),h.src=d}):typeof createImageBitmap=="function"?createImageBitmap(d).catch(()=>null):new Promise(s=>{let h=URL.createObjectURL(d),g=new Image;g.onload=()=>{URL.revokeObjectURL(h),s(g)},g.onerror=()=>{URL.revokeObjectURL(h),s(null)},g.src=h})}function $Kt(d,s={}){let h=s.decode||HAe,g=s.dpr||uR;return L.GridLayer.extend({_clampZoom:function(m){return L.GridLayer.prototype._clampZoom.call(this,hR(this,m))},initialize:function(m,_,S){this._websocketManager=m,this._items=_||[],this._generation=0,L.GridLayer.prototype.initialize.call(this,nk(S))},setItems:function(m){this._items=m||[],this.refreshTiles()},visibleItems:function(){return this._items.filter(m=>m&&m.visible!==!1)},createTile:function(m,_){let S=document.createElement("canvas");S.setAttribute("role","presentation");let y=g();return S._orDone=_,this._renderTile(S,m,y),S},_sizeCanvas:function(m,_,{empty:S=!1}={}){let y=this.getTileSize(),R=S?0:Get(y.x,_),N=S?0:Get(y.y,_);(m.width!==R||m.height!==N)&&(m.width=R,m.height=N),m.style.width=y.x+"px",m.style.height=y.y+"px"},_finishTile:function(m,_){m._orTileDone||!m._orDone||(m._orTileDone=!0,m._orDone(_||null,m))},_renderTile:function(m,_,S){let y=this._generation,R=this.visibleItems().filter(P=>OU(d,P.layer,_));this._sizeCanvas(m,S,{empty:R.length===0});let N=m.getContext("2d");m._orRequestIds=[];let B=()=>this._generation!==y||m._orRemoved===!0;WKt({items:R,request:P=>{let U=this._websocketManager.nextId;return m._orRequestIds.push(U),this._websocketManager.request(Wet(_,P.layer,d,S,this.getTileSize().x))},decode:h,draw:P=>GKt(N,P,m.width),release:P2t,isStale:B,onFirstDraw:()=>this._finishTile(m)}).then(()=>{B()||this._finishTile(m)}).catch(P=>{B()||this._finishTile(m,P)})},refreshTiles:function(){if(this._map){this._generation++;for(let m in this._tiles){let _=this._tiles[m];if(!_||!_.el)continue;this._cancelTile(_.el);let S=g();this._renderTile(_.el,_.coords,S)}}},_cancelTile:function(m){let _=m._orRequestIds;if(!(!_||!_.length)){for(let S of _)this._websocketManager.cancel(S);m._orRequestIds=[]}},_removeTile:function(m){let _=this._tiles[m];_&&_.el&&(_.el._orRemoved=!0,this._cancelTile(_.el),_.el.width=0,_.el.height=0),L.GridLayer.prototype._removeTile.call(this,m)}})}function VKt(d,s,h,g,m=0){let _=[];return h.forEach((S,y)=>{let R=new d(s,S,BKt({zIndex:m+y}));g&&R.addTo(g),_.push(R)}),_}var GAe=".leaflet-tile-container",ZKt=".leaflet-tile";function qKt(d,s){if(!Number.isFinite(d)||!(s>0))return 0;let h=d*s;return(h-Math.round(h))/s}function WAe(d,s,h=YKt){let g=d&&d.parentElement;if(!g)return null;let m=typeof d.querySelector=="function"?d.querySelector(ZKt):null;if(!m)return null;let _=h(m),S=XKt((g._orSnapDx||0)-qKt(_.left,s),s),y=XKt((g._orSnapDy||0)-qKt(_.top,s),s);return g._orSnapDx=S,g._orSnapDy=y,g.style.transform=S||y?`translate3d(${S}px, ${y}px, 0)`:"",{dx:S,dy:y}}function $Ae(d,s,h=YKt){if(!d||typeof d.getPane!="function"||!(s>0)||Number.isInteger(s))return 0;let g=d.getPane("tilePane");if(!g||typeof g.querySelectorAll!="function")return 0;let m=0,_=[...g.querySelectorAll(GAe)].filter(VAe).map(S=>{let y=S.querySelector(ZKt);return{container:S,rect:y?h(y):null}});for(let{container:S,rect:y}of _)y&&WAe(S,s,()=>y)&&m++;return m}function YKt(d){return d.getBoundingClientRect()}function XKt(d,s){return d-Math.round(d*s)/s}function VAe(d){let s=d.style&&d.style.transform||"",h=/scale\(([^)]*)\)/.exec(s);return!h||Number(h[1])===1}var qAe="move zoomend viewreset resize load";function KKt(d,s=uR){if(!d||typeof d.on!="function")return!1;let h=()=>$Ae(d,s());return d.on(qAe,h),h(),!0}function Sc(d){return!!d?.websocketManager?.isStaticMode}function eJt(d){let s=d?.protocol==="https:"?"wss":"ws",h=d?.host||"localhost:8080";return`${s}://${h}/ws`}function nJt(d,s){let h={};for(let[g,m]of Object.entries(d||{}))h[g]=!!m;for(let[g,m]of Object.entries(s||{}))h["s_"+g]=!!m;return h}function dR(d,s){s&&typeof s.sel_has_inst=="boolean"&&(d.selHasInst=s.sel_has_inst,d.selHasNet=!!s.sel_has_net)}var I2t=null;function ev(d,s=4e3){let h=document.getElementById("or-toast");return h||(h=document.createElement("div"),h.id="or-toast",document.body.appendChild(h)),h.textContent=d,h.classList.add("visible"),I2t&&clearTimeout(I2t),I2t=setTimeout(()=>h.classList.remove("visible"),s),h}function iJt({title:d,message:s,confirmLabel:h="OK",danger:g=!1}){return new Promise(m=>{let _=document.createElement("div");_.className="or-modal-overlay";let S=document.createElement("div");S.className="or-modal";let y=document.createElement("div");y.className="or-modal-title",y.textContent=d;let R=document.createElement("div");R.className="or-modal-message",R.textContent=s;let N=document.createElement("div");N.className="or-modal-buttons";let B=document.createElement("button");B.className="or-btn",B.textContent="Cancel";let P=document.createElement("button");P.className="or-btn"+(g?" or-btn-danger":""),P.textContent=h;let U=q=>{document.removeEventListener("keydown",W,!0),_.remove(),m(q)},W=q=>{q.key==="Escape"&&(q.stopPropagation(),U(!1))};B.addEventListener("click",()=>U(!1)),P.addEventListener("click",()=>U(!0)),_.addEventListener("click",q=>{q.target===_&&U(!1)}),document.addEventListener("keydown",W,!0),N.appendChild(B),N.appendChild(P),S.appendChild(y),S.appendChild(R),S.appendChild(N),_.appendChild(S),document.body.appendChild(_),B.focus()})}var XAe=.05;function ZAe([[d,s],[h,g]],m){let _=(g-s)*m,S=(h-d)*m;return[[d-S,s-_],[h+S,g+_]]}function R2t(d,s=256,h=null){if(!JKt(d))return null;let g=d[0][0],m=d[0][1],_=Math.max(d[1][1]-m,d[1][0]-g),S=s/_,y=JKt(h)?h:d,[[R,N],[B,P]]=ZAe(y,XAe);return{scale:S,maxDXDY:_,originX:m,originY:g,fitBounds:Vf(N,R,P,B,S,_,m,g)}}function JKt(d){return!!d&&d[1][0]>d[0][0]&&d[1][1]>d[0][1]}function rJt(d,s){return!!d&&!!s&&d[0][0]===s[0][0]&&d[0][1]===s[0][1]&&d[1][0]===s[1][0]&&d[1][1]===s[1][1]}function wg(d){d.selectionToken=(d.selectionToken||0)+1;for(let s of d.selectionResetters||[])s();return d.selectionToken}function B0(d,s){return d.selectionToken===s}function sJt(d,s){d.selectionResetters||(d.selectionResetters=[]),d.selectionResetters.push(s)}function oJt(d=typeof L<"u"?L.CRS.Simple:void 0,s={}){return{crs:d,zoom:1,zoomSnap:1,zoomDelta:1,fadeAnimation:!1,attributionControl:!1,scrollWheelZoom:s.wheelZoom!==!1,keyboardPanDelta:pR(s.arrowStep)}}var D2t=80,BU=10,FU=1e3;function pR(d){let s=d===""||d===null?NaN:Math.round(Number(d));return Number.isFinite(s)?Math.min(FU,Math.max(BU,s)):D2t}function cJt(d,s){d?.keyboard?._setPanDelta?.(s)}function rk(d="vis-group-header"){let s=document.createElement("div");s.className=d;let h=document.createElement("span");h.className="vis-arrow",s.appendChild(h);let g=document.createElement("span");return g.className="vis-name",s.appendChild(g),{header:s,arrow:h,name:g}}function sk(d,s,h,g){let m=_=>{h.classList.toggle("collapsed",_),s.textContent=_?"\u25B6":"\u25BC"};m(!!g),d.addEventListener("click",_=>{let S=_.target&&_.target.parentNode===d&&_.target.classList&&_.target.classList.contains("vis-name");_.target!==d&&_.target!==s&&!S||m(!h.classList.contains("collapsed"))})}var QKt=30;function aJt(d,s=8){if(!Number.isFinite(d)||d<=0)return QKt;let h=Math.ceil(Math.log2(s/d));return Math.max(1,Math.min(QKt,h))}function uJt({designBounds:d,fitRect:s,viewW:h,viewH:g}){let m=R2t(d,r3,s),_=W=>Number.isFinite(W)&&W>0;if(!m||!_(h)||!_(g))return r3;let S=m.fitBounds[1][1]-m.fitBounds[0][1],y=m.fitBounds[1][0]-m.fitBounds[0][0],R=Math.min(h/S,g/y),N=Math.log2(R);if(!Number.isFinite(N)||N<0)return r3;let B=Math.floor(N),P=r3*2**(N-B),U=Math.floor(P/T2t)*T2t;return U>r3&&Math.log2(r3*R/U)>=B?U:r3}function lJt(d,{showDbu:s,dbuPerMicron:h},g=!1){if(s)return String(Math.round(d));let m=h>0?h:1e3,_=Math.ceil(Math.log10(m)),S=(d/m).toFixed(_);return g?S+" \xB5m":S}function hJt(d,{showDbu:s,dbuPerMicron:h}){let g=parseFloat(d);if(!Number.isFinite(g))return null;if(s)return Math.round(g);let m=h>0?h:1e3;return Math.round(g*m)}function fJt(d,{showDbu:s,dbuPerMicron:h}){if(s)return String(Math.round(d));let g=h>0?h:1e3,m=d/g;return m>=1e3?(m/1e3).toFixed(3)+" mm":m>=1?m.toFixed(3)+" um":(m*1e3).toFixed(1)+" nm"}function dJt({showDbu:d}){return d?"DBU":"\xB5m"}function gR(d){return typeof d=="string"&&/^#[0-9a-fA-F]{6}$/.test(d)}function pJt(d){if(typeof d!="string")return null;let s=d.trim();if(gR(s))return s.toLowerCase();let h=s.match(/^#([0-9a-fA-F]{3})$/);if(h)return"#"+h[1].split("").map(m=>m+m).join("").toLowerCase();let g=s.match(/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/);if(g){let m=g.slice(1).map(Number);return m.some(_=>_>255)?null:"#"+m.map(_=>_.toString(16).padStart(2,"0")).join("")}return null}function UU(d){let s=null;return()=>{s===null&&(s=requestAnimationFrame(()=>{s=null,d()}))}}function tJt(d){let s=Math.pow(10,Math.floor(Math.log10(d))),h=d/s,g;return h<1.5?g=1:h<3.5?g=2:h<7.5?g=5:g=10,{value:g*s,digit:g}}function gJt({targetPx:d,pxPerDbu:s,dbuPerMicron:h,showDbu:g}){if(!Number.isFinite(s)||s<=0||!Number.isFinite(d)||d<=0)return null;let m,_,S;if(g){let R=tJt(Math.max(1,d/s));S=R.digit,m=Math.round(R.value*s),_=String(Math.round(R.value))}else{let R=Number.isFinite(h)&&h>0?h:1e3,N=s*R,B=tJt(d/N);S=B.digit;let P=B.value;m=Math.round(P*N);let U,W;P>=1e3?(U=1/1e3,W="mm"):P>=1?(U=1,W="\xB5m"):P>=.001?(U=1e3,W="nm"):(U=1e6,W="pm"),_=Math.round(P*U)+" "+W}return{barPx:m,label:_,segments:S===1?5:S}}function zU(d,s,h){return s?typeof d.runTclScript=="function"?d.runTclScript(s,h):(h&&typeof d.echoTcl=="function"&&d.echoTcl(s),d.websocketManager.request({type:"tcl_eval",cmd:s}).catch(()=>{})):Promise.resolve()}function ok(d,s){let h=d.querySelectorAll("thead th");(!s||!s[0])&&(d.style.tableLayout="auto",h.forEach(g=>g.style.width=""),s=Array.from(h,g=>g.offsetWidth+"px")),h.forEach((g,m)=>g.style.width=s[m]||""),d.style.tableLayout="fixed",h.forEach((g,m)=>{if(m===h.length-1)return;let _=document.createElement("div");_.className="col-resize-grip",g.style.position="relative",g.appendChild(_);let S,y,R=B=>{g.style.width=Math.max(30,y+B.clientX-S)+"px"},N=()=>{document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",N);let B=P=>P.stopPropagation();document.addEventListener("click",B,{capture:!0,once:!0}),setTimeout(()=>{document.removeEventListener("click",B,{capture:!0})},0)};_.addEventListener("mousedown",B=>{B.preventDefault(),S=B.clientX,y=g.offsetWidth,document.addEventListener("mousemove",R),document.addEventListener("mouseup",N)})})}function mJt(d,s){d.scrollWheelZoom.disable(),d.getContainer().addEventListener("wheel",h=>{if(h.preventDefault(),s()===h.ctrlKey){let[m,_]=YAe(h,d.getContainer());d.panBy([m,_],{animate:!1});return}let g=h.deltaY<0?1:-1;d.setZoomAround(d.mouseEventToLatLng(h),d.getZoom()+g)},{passive:!1})}function YAe(d,s){let g=1;return d.deltaMode===1?g=16:d.deltaMode===2&&(g=s.clientHeight||16),[d.deltaX*g,d.deltaY*g]}function mR(d,s,h,g){let m=document.createElement("div");m.className="modal-overlay",m.innerHTML=` - `,document.body.appendChild(m);let _=()=>m.remove();m.addEventListener("click",R=>{R.target===m&&_()}),m.addEventListener("keydown",R=>{R.key==="Escape"&&_()}),m.querySelector(".cancel").addEventListener("click",_),m.querySelector(".modal-close").addEventListener("click",_);let S=m.querySelector(".modal-error"),y=(R,N)=>{S.textContent=R,S.style.display=R?"block":"none",S.classList.toggle("info",!!N)};return{overlay:m,close:_,okBtn:m.querySelector(".ok"),showError:y}}var ak=class d{constructor(s,h,g){this._app=s,this._redrawAllLayers=h,this._refreshOverlay=g||h,this._currentTab="setup",this._setupPaths=[],this._holdPaths=[],this._selectedPathIndex=-1,this._detailTab="data",this._selectedDetailIndex=-1,this._sortCol="slack",this._sortAscending=!0,this._build()}_build(){let s=document.createElement("div");s.className="timing-widget";let h=document.createElement("div");h.className="timing-toolbar",this._updateBtn=document.createElement("button"),this._updateBtn.className="or-btn",this._updateBtn.textContent="Update",Sc(this._app)&&(this._updateBtn.style.display="none"),this._pathCountLabel=document.createElement("span"),this._pathCountLabel.className="timing-path-count",h.appendChild(this._updateBtn),h.appendChild(this._pathCountLabel),s.appendChild(h),s.appendChild(this._buildConePanel());let g=document.createElement("div");g.className="timing-tab-bar",this._setupTab=this._makeTab("Setup",!0),this._holdTab=this._makeTab("Hold",!1),g.appendChild(this._setupTab),g.appendChild(this._holdTab),s.appendChild(g),this._pathTableContainer=document.createElement("div"),this._pathTableContainer.className="timing-path-table-container",this._pathTable=document.createElement("table"),this._pathTable.className="timing-table",this._pathTableContainer.appendChild(this._pathTable),s.appendChild(this._pathTableContainer);let m=document.createElement("div");m.className="timing-tab-bar",this._dataTab=this._makeTab("Data Path",!0),this._captureTab=this._makeTab("Capture Path",!1),m.appendChild(this._dataTab),m.appendChild(this._captureTab),s.appendChild(m),this._detailTableContainer=document.createElement("div"),this._detailTableContainer.className="timing-detail-table-container",this._detailTable=document.createElement("table"),this._detailTable.className="timing-table",this._detailTableContainer.appendChild(this._detailTable),s.appendChild(this._detailTableContainer),this._headerTooltip=document.createElement("div"),this._headerTooltip.className="or-tooltip or-tooltip-fixed",s.appendChild(this._headerTooltip),this.element=s,this._bindEvents(),Sc(this._app)&&setTimeout(()=>this.update(),0)}_makeTab(s,h){let g=document.createElement("button");return g.className="timing-tab"+(h?" active":""),g.textContent=s,g}_bindEvents(){this._setupTab.addEventListener("click",()=>{this._currentTab="setup",this._setupTab.classList.add("active"),this._holdTab.classList.remove("active"),this._selectedPathIndex=-1,this._renderPathTable(),this._renderDetailTable(),this._clearTimingHighlight()}),this._holdTab.addEventListener("click",()=>{this._currentTab="hold",this._holdTab.classList.add("active"),this._setupTab.classList.remove("active"),this._selectedPathIndex=-1,this._renderPathTable(),this._renderDetailTable(),this._clearTimingHighlight()}),this._dataTab.addEventListener("click",()=>{this._detailTab="data",this._dataTab.classList.add("active"),this._captureTab.classList.remove("active"),this._renderDetailTable()}),this._captureTab.addEventListener("click",()=>{this._detailTab="capture",this._captureTab.classList.add("active"),this._dataTab.classList.remove("active"),this._renderDetailTable()}),this._updateBtn.addEventListener("click",()=>this.update()),this._pathTableContainer.setAttribute("tabindex","0"),this._pathTableContainer.style.outline="none",this._pathTableContainer.addEventListener("keydown",s=>{if(s.key==="ArrowDown"){s.preventDefault();let h=this._pathTable.querySelectorAll("tbody tr");this._selectedPathIndex0&&this._selectPathRow(this._selectedPathIndex-1))}),this._detailTableContainer.setAttribute("tabindex","0"),this._detailTableContainer.style.outline="none",this._detailTableContainer.addEventListener("keydown",s=>{if(s.key==="ArrowDown"){s.preventDefault();let h=this._detailTable.querySelectorAll("tbody tr");this._selectedDetailIndex0&&this._selectDetailRow(this._selectedDetailIndex-1))})}_buildConePanel(){let s=document.createElement("div");s.className="timing-cone-panel";let h=document.createElement("span");h.className="timing-cone-title",h.textContent="Timing cone:",s.appendChild(h);let g=(B,P,U=!1)=>{let W=document.createElement("input");W.type="checkbox",W.id=B,W.checked=U;let q=document.createElement("label");return q.htmlFor=B,q.textContent=P,{input:W,lbl:q}},m=g("cone-fanin","Fanin",!0),_=g("cone-fanout","Fanout",!0);this._coneFanin=m.input,this._coneFanout=_.input,s.append(m.input,m.lbl,_.input,_.lbl);let S=B=>{let P=document.createElement("label");P.className="timing-cone-depth-label",P.textContent=B;let U=document.createElement("input");return U.type="number",U.min="0",U.value="0",U.className="timing-cone-depth",U.title="0 = unlimited",P.appendChild(U),{lbl:P,input:U}},y=S("in\u2264"),R=S("out\u2264");this._coneFaninDepth=y.input,this._coneFanoutDepth=R.input,s.append(y.lbl,R.lbl),this._coneColorMode=document.createElement("select"),this._coneColorMode.className="timing-cone-colormode";for(let[B,P]of[["slack","by slack"],["depth","by depth"]]){let U=document.createElement("option");U.value=B,U.textContent=P,this._coneColorMode.appendChild(U)}s.appendChild(this._coneColorMode);let N=g("cone-sync-schematic","Sync schematic");return this._coneSyncSchematic=N.input,s.append(N.input,N.lbl),this._coneApplyBtn=document.createElement("button"),this._coneApplyBtn.className="or-btn",this._coneApplyBtn.textContent="Cone",this._coneApplyBtn.title="Show the timing cone for the selected instance",this._coneClearBtn=document.createElement("button"),this._coneClearBtn.className="or-btn",this._coneClearBtn.textContent="Clear",s.append(this._coneApplyBtn,this._coneClearBtn),this._coneStatus=document.createElement("span"),this._coneStatus.className="timing-cone-status",s.appendChild(this._coneStatus),this._coneApplyBtn.addEventListener("click",()=>this._applyCone()),this._coneClearBtn.addEventListener("click",()=>this._clearCone()),s}_coneTarget(){return this._app.selectedInstanceName||""}async _applyCone(){let s=this._coneFanin.checked,h=this._coneFanout.checked;if(!s&&!h){this._coneStatus.textContent="select fanin and/or fanout";return}let g=this._coneTarget();if(!g){this._coneStatus.textContent="select an instance first";return}let m={type:"timing_cone",fanin:s,fanout:h,fanin_depth:Math.max(0,parseInt(this._coneFaninDepth.value,10)||0),fanout_depth:Math.max(0,parseInt(this._coneFanoutDepth.value,10)||0),color_mode:this._coneColorMode.value,inst_name:g};this._coneApplyBtn.disabled=!0,this._coneStatus.textContent="computing\u2026";try{let _=await this._app.websocketManager.request(m);this._refreshOverlay(),this._renderConeStatus(_),this._coneSyncSchematic.checked&&g&&document.dispatchEvent(new CustomEvent("openroad-cone-sync",{detail:{inst_name:g,fanin:m.fanin,fanout:m.fanout,fanin_depth:m.fanin_depth,fanout_depth:m.fanout_depth}}))}catch(_){this._coneStatus.textContent="cone error: "+(_.message||_)}this._coneApplyBtn.disabled=!1}_renderConeStatus(s){if(!s){this._coneStatus.textContent="";return}let h=s.node_count||0;if(h===0){this._coneStatus.textContent="empty cone";return}let g=h+" pins";if(s.color_mode==="depth")g+=`, depth \xB1${s.max_depth}`;else if(s.constrained){let m=s.time_unit||"";g+=`, slack ${ck(s.min_slack)}\u2026${ck(s.max_slack)}${m}`}else g+=", unconstrained";this._coneStatus.textContent=g}_clearCone(){this._app.websocketManager.request({type:"timing_cone",clear:!0}).then(()=>this._refreshOverlay()),this._coneStatus.textContent=""}showPaths(s,h){this._currentTab=s,s==="setup"?(this._setupPaths=[...h],this._setupTab.classList.add("active"),this._holdTab.classList.remove("active")):(this._holdPaths=[...h],this._holdTab.classList.add("active"),this._setupTab.classList.remove("active")),this._applySort(),this._selectedPathIndex=-1,this._pathCountLabel.textContent=h.length+" paths",this._renderPathTable(),this._renderDetailTable(),this._clearTimingHighlight()}async update(){this._updateBtn.disabled=!0,this._updateBtn.textContent="Loading...";try{let[s,h]=await Promise.all([this._app.websocketManager.request({type:"timing_report",is_setup:!0,max_paths:100}),this._app.websocketManager.request({type:"timing_report",is_setup:!1,max_paths:100})]);this._setupPaths=[...s.paths||[]],this._holdPaths=[...h.paths||[]],this._applySort(),this._selectedPathIndex=-1,this._renderPathTable(),this._renderDetailTable(),this._clearTimingHighlight()}catch(s){console.error("Timing fetch failed:",s)}this._updateBtn.disabled=!1,this._updateBtn.textContent="Update"}_applySort(){for(let s of[this._setupPaths,this._holdPaths]){s.forEach((m,_)=>{m._originalIndex===void 0&&(m._originalIndex=_)});let h=this._sortAscending?1:-1,g=this._sortCol;s.sort((m,_)=>{let S=m[g],y=_[g],R=typeof S=="number"&&typeof y=="number"?S-y:String(S).localeCompare(String(y));return h*R})}}_showHeaderTooltip(s,h){if(s.buttons!==0){this._hideHeaderTooltip();return}let g=this._headerTooltip;g.textContent=h,g.style.display="block";let m=Math.min(s.clientX+12,window.innerWidth-g.offsetWidth-8);g.style.left=Math.max(0,m)+"px",g.style.top=s.clientY+14+"px"}_hideHeaderTooltip(){this._headerTooltip.style.display="none"}_sortBy(s){this._sortCol===s?this._sortAscending=!this._sortAscending:(this._sortCol=s,this._sortAscending=!0),this._applySort(),this._selectedPathIndex=-1,this._renderPathTable(),this._renderDetailTable(),this._clearTimingHighlight()}_clearTimingHighlight(){this._app.websocketManager.request({type:"timing_highlight",path_index:-1}).then(()=>this._refreshOverlay())}_selectPathRow(s){let h=this._pathTable.querySelectorAll("tbody tr");if(s<0||s>=h.length)return;this._selectedPathIndex=s;for(let _ of h)_.classList.remove("selected");h[s].classList.add("selected"),h[s].scrollIntoView({block:"nearest"}),this._pathTableContainer.focus(),this._renderDetailTable();let m=(this._currentTab==="setup"?this._setupPaths:this._holdPaths)[s]?._originalIndex??s;this._app.websocketManager.request({type:"timing_highlight",path_index:m,is_setup:this._currentTab==="setup"}).then(()=>this._refreshOverlay()).catch(_=>console.error("timing_highlight error:",_))}_renderPathTable(){this._hideHeaderTooltip();let s=this._currentTab==="setup"?this._setupPaths:this._holdPaths;this._pathCountLabel.textContent=s.length+" paths";let h=this._pathTable.querySelectorAll("thead th"),g=Array.from(h,R=>R.style.width);this._pathTable.innerHTML="";let m=document.createElement("thead"),_=document.createElement("tr");for(let R of d.PATH_COLS){let N=document.createElement("th");N.classList.add("sortable"),R.num&&N.classList.add("num"),N.textContent=R.label+(R.key===this._sortCol?this._sortAscending?" \u25B2":" \u25BC":""),R.tooltip&&(N.addEventListener("mousemove",B=>this._showHeaderTooltip(B,R.tooltip)),N.addEventListener("mouseleave",()=>this._hideHeaderTooltip())),N.addEventListener("click",()=>this._sortBy(R.key)),_.appendChild(N)}m.appendChild(_),this._pathTable.appendChild(m);let S=document.createElement("tbody"),y=s.reduce((R,N)=>Math.max(R,Math.abs(Number(N.slack)||0)),0);if(s.forEach((R,N)=>{let B=document.createElement("tr");N===this._selectedPathIndex&&B.classList.add("selected");for(let P of d.PATH_COLS){let U=document.createElement("td"),W=R[P.key];if(U.textContent=P.time?ck(W):W,P.num&&U.classList.add("num"),P.key==="slack"){let q=Number(R.slack);q<0&&U.classList.add("slack-negative"),Number.isFinite(q)&&y>0&&(U.classList.add("slack-cell",q<0?"slack-under":"slack-over"),U.style.setProperty("--slack-frac",String(Math.abs(q)/y)))}B.appendChild(U)}B.style.cursor="pointer",B.addEventListener("click",()=>this._selectPathRow(N)),S.appendChild(B)}),s.length===0){let R=document.createElement("tr"),N=document.createElement("td");N.colSpan=d.PATH_COLS.length,N.style.textAlign="center",N.style.color="var(--fg-secondary)",N.textContent=Sc(this._app)?"No timing data available":'Click "Update" to load timing paths',R.appendChild(N),S.appendChild(R)}this._pathTable.appendChild(S),ok(this._pathTable,g)}_selectDetailRow(s){let h=this._detailTable.querySelectorAll("tbody tr");if(s<0||s>=h.length)return;this._selectedDetailIndex=s;for(let y of h)y.classList.remove("timing-selected-row");h[s].classList.add("timing-selected-row"),h[s].scrollIntoView({block:"nearest"}),this._detailTableContainer.focus();let m=(this._currentTab==="setup"?this._setupPaths:this._holdPaths)[this._selectedPathIndex],_=this._detailTab==="data"?m.data_nodes:m.capture_nodes,S=m._originalIndex??this._selectedPathIndex;this._app.websocketManager.request({type:"timing_highlight",path_index:S,is_setup:this._currentTab==="setup",pin_name:_[s].pin}).then(()=>this._refreshOverlay())}_renderDetailTable(){let s=this._detailTable.querySelectorAll("thead th"),h=Array.from(s,N=>N.style.width);this._detailTable.innerHTML="",this._selectedDetailIndex=-1;let g=this._currentTab==="setup"?this._setupPaths:this._holdPaths;if(this._selectedPathIndex<0||this._selectedPathIndex>=g.length)return;let m=g[this._selectedPathIndex],_=this._detailTab==="data"?m.data_nodes:m.capture_nodes,S=document.createElement("thead"),y=document.createElement("tr");for(let N of d.DETAIL_COLS){let B=document.createElement("th");d.DETAIL_NUM_COLS.has(N)&&B.classList.add("num"),B.textContent=N,y.appendChild(B)}S.appendChild(y),this._detailTable.appendChild(S);let R=document.createElement("tbody");if(_.forEach((N,B)=>{let P=document.createElement("tr");N.clk&&P.classList.add("timing-clock-row"),[N.pin,N.fanout,N.rise?"\u2191":"\u2193",ck(N.time),ck(N.delay),ck(N.slew),ck(N.load)].forEach((W,q)=>{let nt=document.createElement("td");d.DETAIL_NUM_COLS.has(d.DETAIL_COLS[q])&&nt.classList.add("num"),nt.textContent=W,P.appendChild(nt)}),P.style.cursor="pointer",P.addEventListener("click",()=>this._selectDetailRow(B)),R.appendChild(P)}),this._detailTable.appendChild(R),ok(this._detailTable,h),!h[0]){let N=this._detailTable.querySelector("thead th");N&&(N.style.width="30ch")}}};function ck(d){return d==null?"":typeof d=="number"?d.toFixed(4):String(d)}ak.PATH_COLS=[{label:"Clock",key:"end_clk"},{label:"Required",key:"required",time:!0,num:!0},{label:"Arrival",key:"arrival",time:!0,num:!0},{label:"Slack",key:"slack",time:!0,num:!0},{label:"Skew",key:"skew",time:!0,num:!0,tooltip:`The difference in arrival times between + `}_resolvePaneReferences(){let s=["left","main","bottom","right"];this.panes={};for(let h of s){let p=this.containerEl.querySelector(`#pane-${h}`);p&&(p.el=p,p.paneComponent=p),this.panes[h]=p}this.centerEl=this.containerEl.querySelector("#pane-center")}_initSplitters(){let s=null;this.containerEl.addEventListener("ide-splitter-start",h=>{let p=h.detail?.for,m=a3[p];if(!m)return;let _=(h.detail?.orientation||"vertical")==="vertical",y=(_?this.containerEl:this.centerEl||this.containerEl).getBoundingClientRect(),I=this.panes[p]?.getBoundingClientRect()||{},N=_?y.width:y.height,B=_?I.width||m.defaultSize:I.height||m.defaultSize;s={paneName:p,cfg:m,startSize:B,maxLimit:Math.round(N*m.maxFraction)||500}}),this.containerEl.addEventListener("ide-splitter-drag",h=>{if(!s||s.paneName!==h.detail?.for)return;let{cfg:p,startSize:m,maxLimit:_}=s,E=p.invertDelta?-h.detail.delta:h.detail.delta,y=Math.round(m+E),I=Math.max(p.minSize,Math.min(_,y));this.containerEl.style.setProperty(p.cssVar,`${I}px`),this.notifyResize()}),this.containerEl.addEventListener("ide-splitter-end",()=>{s=null,this.saveLayout(),this.notifyResize()}),this.containerEl.addEventListener("ide-splitter-reset",h=>{let p=h.detail?.for;this._resetSplitterPane(p)})}_resetSplitterPane(s){let h=a3[s];h&&(this.containerEl.style.setProperty(h.cssVar,`${h.defaultSize}px`),this.isPaneCollapsed(s)?this.restorePane(s):(this.saveLayout(),this.notifyResize()))}_initControls(){this.containerEl.addEventListener("ide-pane-maximize",s=>{this.toggleMaximize(s.detail?.pane)}),this.containerEl.addEventListener("ide-pane-collapse",s=>{this.toggleCollapse(s.detail?.pane)}),this.containerEl.addEventListener("ide-layout-reset",()=>{this.resetLayout()});for(let s of["left","right","bottom"]){let h=this.containerEl.querySelector(`#gutter-expand-${s}`);h&&h.addEventListener("click",()=>this.restorePane(s))}}isPaneMaximized(s){return s?!!this.panes[s]?.maximized:["main","bottom","right"].some(h=>!!this.panes[h]?.maximized)}setMaximizedPane(s,h=!0){let p=["main","bottom","right"];if(s&&!p.includes(s))return!1;let m=h?s:null;for(let _ of p){let E=_===m;this.containerEl.classList.toggle(`maximized-${_}`,E),this.panes[_]&&(this.panes[_].maximized=E)}return this.notifyResize(),!!m}maximizePane(s){return this.setMaximizedPane(s,!0)}restoreMaximized(){return this.setMaximizedPane(null,!1)}toggleMaximize(s){return this.setMaximizedPane(s,!this.isPaneMaximized(s))}isPaneCollapsed(s){let h=s==="bottom"?this.centerEl:this.containerEl;return!!this.panes[s]?.collapsed||(h?h.classList.contains(`hide-${s}`):!1)}_setPaneCollapsed(s,h){let p=s==="bottom"?this.centerEl:this.containerEl;p&&(p.classList.toggle(`hide-${s}`,h),this.panes[s]&&(this.panes[s].collapsed=h),this.saveLayout(),this.notifyResize())}toggleCollapse(s){this._setPaneCollapsed(s,!this.isPaneCollapsed(s))}collapsePane(s){this._setPaneCollapsed(s,!0)}restorePane(s){this._setPaneCollapsed(s,!1)}resetLayout(){try{localStorage.removeItem("or_ide_layout")}catch{}for(let[s,h]of Object.entries(a3))this.containerEl.style.setProperty(h.cssVar,`${h.defaultSize}px`);for(let s of["left","right","bottom"])this.restorePane(s);this.restoreMaximized(),this.closedComponents.clear();for(let s of this.components.values())s.tabEl.hidden=!1,s.contentDiv.hidden=!1;for(let s of Object.values(gJt))this.components.has(s)&&this.activateTab(s);this.saveLayout(),this.notifyResize(),this.emit("stateChanged")}_initResizeObserver(){typeof ResizeObserver<"u"&&new ResizeObserver(()=>{this.notifyResize()}).observe(this.containerEl)}registerComponentFactoryFunction(s,h){this.factories.set(s,h)}loadLayout(s){for(let p of Object.keys(pJt)){let m=this.factories.get(p);m&&this._mountComponent(p,m)}let h=null;try{let p=localStorage.getItem("or_ide_layout");p&&(h=JSON.parse(p))}catch{}if(h){if(h.leftWidth&&this.containerEl.style.setProperty("--pane-left-width",`${h.leftWidth}px`),h.rightWidth&&this.containerEl.style.setProperty("--pane-right-width",`${h.rightWidth}px`),h.bottomHeight&&this.containerEl.style.setProperty("--pane-bottom-height",`${h.bottomHeight}px`),h.closed)for(let p of h.closed)this.closeComponent(p,!1);for(let p of["left","right","bottom"]){let m=`hide${p[0].toUpperCase()}${p.slice(1)}`;h[m]&&this.collapsePane(p)}}for(let[p,m]of Object.entries(gJt))this.activateTab(h?.activeTabs?.[p]||m);this.notifyResize(),this.emit("stateChanged")}_mountComponent(s,h){if(this.components.has(s))return;let p=pJt[s]||{pane:"right",title:s,closable:!0},m=this.panes[p.pane];if(!m)return;let _=document.createElement("div");_.className="ide-component-container",_.id=`cmp-${s}`,m.appendChild(_);let E=p.closable!==!1,y=document.createElement("ide-tab");y.id=`tab-${s}`,y.slot="tabs",y.for=s,y.setAttribute("data-component",s),y.title=p.title,E&&y.setAttribute("closable",""),p.icon&&(y.icon=p.icon),y.addEventListener("tab-select",()=>this.activateTab(s)),y.addEventListener("tab-close",()=>this.closeComponent(s)),m.appendChild(y);let I=Object.assign(new ent,{element:_,get width(){return _.clientWidth},get height(){return _.clientHeight},title:p.title,focus:()=>this.focusComponent(s),close:()=>this.closeComponent(s)}),N={componentType:s,paneName:p.pane,title:p.title,closable:E,tabEl:y,contentDiv:_,container:I};this.components.set(s,N);try{h(I)}catch(B){console.error(`Failed to initialize component ${s}:`,B)}}isComponentActive(s){return s?this.activeTabs[s.paneName]===s.componentType:!1}_setComponentActive(s,h){if(!s)return;let p=!!h;s.tabEl&&(s.tabEl.active=p),s.contentDiv?.classList.toggle("active",p)}activateTab(s){let h=this.components.get(s);if(!h||!this.panes[h.paneName])return;["left","right","bottom"].includes(h.paneName)&&this.isPaneCollapsed(h.paneName)&&this.restorePane(h.paneName);let m=this.activeTabs[h.paneName];if(m&&m!==s){let _=this.components.get(m);_&&(this._setComponentActive(_,!1),_.container.fire("hide"))}this.activeTabs[h.paneName]=s,h.tabEl.hidden=!1,h.contentDiv.hidden=!1,this._setComponentActive(h,!0),this.closedComponents.delete(s),h.container.fire("show"),h.container.fire("open"),h.container.fire("resize");try{h.tabEl.scrollIntoView({behavior:"smooth",inline:"nearest",block:"nearest"})}catch{}this.notifyResize(),this.emit("stateChanged")}closeComponent(s,h=!0){let p=this.components.get(s);if(!(!p||!p.closable)){if(p.tabEl.hidden=!0,p.contentDiv.hidden=!0,this._setComponentActive(p,!1),p.container.fire("hide"),this.closedComponents.add(s),h&&this.activeTabs[p.paneName]===s){let m=null;for(let _ of this.components.values())if(_.paneName===p.paneName&&!this.closedComponents.has(_.componentType)){m=_;break}m?this.activateTab(m.componentType):(this.activeTabs[p.paneName]=null,["left","right","bottom"].includes(p.paneName)&&this.collapsePane(p.paneName))}this.notifyResize(),this.emit("stateChanged")}}focusComponent(s,h){if(!this.components.has(s)){let m=this.factories.get(s);if(!m)return;this._mountComponent(s,m)}let p=this.components.get(s);h?.reveal&&p&&this.isPaneMaximized()&&!this.isPaneMaximized(p.paneName)&&this.restoreMaximized(),this.activateTab(s)}saveLayout(){let s={leftWidth:parseInt(this.containerEl.style.getPropertyValue(a3.left.cssVar)||a3.left.defaultSize,10),rightWidth:parseInt(this.containerEl.style.getPropertyValue(a3.right.cssVar)||a3.right.defaultSize,10),bottomHeight:parseInt(this.containerEl.style.getPropertyValue(a3.bottom.cssVar)||a3.bottom.defaultSize,10),hideLeft:this.isPaneCollapsed("left"),hideRight:this.isPaneCollapsed("right"),hideBottom:this.isPaneCollapsed("bottom"),activeTabs:{...this.activeTabs},closed:Array.from(this.closedComponents)};try{localStorage.setItem("or_ide_layout",JSON.stringify(s))}catch{}return s}notifyResize(){if(this._resizeScheduled)return;this._resizeScheduled=!0,(typeof requestAnimationFrame=="function"?requestAnimationFrame:h=>{h()})(()=>{this._resizeScheduled=!1;for(let h of this.components.values())this.isComponentActive(h)&&h.container.fire("resize");typeof app<"u"&&app&&app.map&&app.map.invalidateSize({animate:!1}),window.dispatchEvent(new Event("resize"))})}updateSize(){this.notifyResize()}setSize(s,h){this.notifyResize()}addComponent(s,h,p){this.focusComponent(s)}get rootItem(){return{contentItems:Array.from(this.components.keys()).map(s=>({isComponent:!0,componentType:s,focus:()=>this.focusComponent(s)}))}}};var GU=class d{constructor(s,h){this.url=s,this.socket=null,this.nextId=1,this.pending=new Map,this._queue=new Map,this._inFlight=0,this._inFlightIds=new Set,this._unknownPayloadTypes=new Set,this._maxInFlight=48,this._lastRecvAt=0,this._bufStuckSince=0,this._lastBuffered=0,this.reconnectDelay=1e3,this.readyPromise=null,this.readyResolve=null,this.onStatusChange=h||(()=>{}),this.onPush=null,this._cache=null,this._isConnected=!1,this._shutdown=!1,this._livenessTimer=void 0,this._startLivenessMonitor(),this.connect()}get isConnected(){return this._isConnected||this.socket&&this.socket.readyState===WebSocket.OPEN}get pendingCount(){return this.pending.size+(this._queue?this._queue.size:0)}static fromCache(s,h){let p=Object.create(d.prototype);return p.url=null,p.socket=null,p.nextId=1,p.pending=new Map,p._queue=new Map,p._inFlight=0,p._inFlightIds=new Set,p._unknownPayloadTypes=new Set,p._maxInFlight=48,p._lastRecvAt=0,p.reconnectDelay=0,p.onStatusChange=h||(()=>{}),p.onPush=null,p._cache=s,p._isConnected=!0,p.readyPromise=Promise.resolve(),p.readyResolve=null,p}get isStaticMode(){return!!this._cache}connect(){this.readyPromise=new Promise(s=>{this.readyResolve=s}),this.socket=new WebSocket(this.url),this.socket.binaryType="arraybuffer",this.socket.onopen=()=>{console.log("WebSocket connected");let s=this._everConnected===!0;this._everConnected=!0,this._isConnected=!0,this.reconnectDelay=1e3,this._lastRecvAt=typeof performance<"u"?performance.now():0,this.readyResolve(),this.onStatusChange(),this._pump(),s&&this.onReconnected&&this.onReconnected()},this.socket.onmessage=s=>{this.handleMessage(s.data)},this.socket.onclose=()=>this._handleClose(),this.socket.onerror=s=>{console.error("WebSocket error:",s)}}_handleClose(){this._isConnected=!1,this._inFlight=0,this._inFlightIds.clear(),this._bufStuckSince=0,this.onStatusChange();for(let[s,h]of this.pending)h.reject(new Error("WebSocket closed"));this.pending.clear();for(let[s,h]of this._queue)h.reject(new Error("WebSocket closed"));if(this._queue.clear(),this._shutdown){console.log("WebSocket closed (server stopped)"),this._stopLivenessMonitor();return}console.log("WebSocket closed, reconnecting..."),setTimeout(()=>this.connect(),this.reconnectDelay),this.reconnectDelay=Math.min(this.reconnectDelay*2,3e4)}_forceReconnect(){let s=this.socket;if(this.socket=null,s){s.onopen=null,s.onmessage=null,s.onclose=null,s.onerror=null;try{s.close()}catch{}}this._handleClose()}handleMessage(s){let h=new DataView(s),p=h.getUint32(0),m=h.getUint8(4);if(this._lastRecvAt=typeof performance<"u"?performance.now():0,p===0&&m===0){let y=s.slice(8),I;try{I=JSON.parse(new TextDecoder().decode(y))}catch(N){console.error("Failed to parse server push JSON:",N);return}if(I&&I.type==="config"){Number.isFinite(I.max_in_flight)&&(this._maxInFlight=Math.max(1,Math.min(4096,Math.floor(I.max_in_flight))),this._pump());return}this.onPush&&this.onPush(I);return}this._inFlightIds.delete(p)&&this._inFlight>0&&this._inFlight--;let _=this.pending.get(p);if(!_){this._pump();return}this.pending.delete(p),this._pump(),this.onStatusChange();let E=s.slice(8);if(m===2)_.reject(new Error(new TextDecoder().decode(E)));else if(m===0)try{_.resolve(JSON.parse(new TextDecoder().decode(E)))}catch(y){_.reject(new Error("JSON parse error: "+y.message))}else m===1?_.resolve(new Blob([E],{type:"image/png"})):m===3?_.resolve(null):(this._unknownPayloadTypes.has(m)||(this._unknownPayloadTypes.add(m),console.warn(`Unrecognized websocket payload type ${m}. The server is likely newer than this page \u2014 reload to pick up the current client.`)),_.reject(new Error(`Unsupported websocket payload type ${m}`)))}request(s){if(this._cache)return this._cacheRequest(s);let h=this.nextId++;if(s.id=h,!this.socket||this.socket.readyState!==WebSocket.OPEN)return Promise.reject(new Error("WebSocket not connected"));let p,m,_=new Promise((E,y)=>{p=E,m=y});return _.requestId=h,this._queue.set(h,{msg:s,resolve:p,reject:m}),this._pump(),_}_pump(){if(!(!this.socket||this.socket.readyState!==WebSocket.OPEN)){for(;this._inFlight0&&this.socket.bufferedAmount<524288;){let[s,h]=this._queue.entries().next().value;this._queue.delete(s),this.pending.set(s,{resolve:h.resolve,reject:h.reject}),this.socket.send(JSON.stringify(h.msg)),this._inFlightIds.add(s),this._inFlight++}this.onStatusChange()}}cancel(s){let h=this._queue.get(s);if(h){this._queue.delete(s),h.reject(new Error("Request cancelled")),this.onStatusChange();return}let p=this.pending.get(s),m=this.pending.delete(s);p&&p.reject(new Error("Request cancelled")),m&&!this._cache&&this.socket&&this.socket.readyState===WebSocket.OPEN&&this.socket.send(JSON.stringify({type:"cancel",cancel_id:s,id:this.nextId++})),this.onStatusChange()}_startLivenessMonitor(){typeof setInterval>"u"||(this._livenessTimer=setInterval(()=>this._checkLiveness(),3e3),this._livenessTimer&&typeof this._livenessTimer.unref=="function"&&this._livenessTimer.unref())}_stopLivenessMonitor(){this._livenessTimer!==void 0&&typeof clearInterval<"u"&&(clearInterval(this._livenessTimer),this._livenessTimer=void 0)}_checkLiveness(){if(this._cache)return;let s=this.socket;if(!s||s.readyState!==WebSocket.OPEN){this._bufStuckSince=0,this._lastBuffered=0;return}let h=s.bufferedAmount,p=typeof performance<"u"?performance.now():0,m=!1,_="";h<=262144||h12e3&&(m=!0,_=`send buffer stuck at ${h}B for ${Math.round(p-this._bufStuckSince)}ms`),this._lastBuffered=h,!m&&this._inFlight>=this._maxInFlight&&this._queue.size>0&&this._lastRecvAt>0&&p-this._lastRecvAt>3e4&&(m=!0,_=`saturated (${this._inFlight} in flight, ${this._queue.size} queued) but silent for ${Math.round(p-this._lastRecvAt)}ms`),m&&(console.warn(`WebSocket connection wedged \u2014 ${_}; reconnecting to recover`),this._bufStuckSince=0,this._forceReconnect())}_cacheRequest(s){let h=s.type;if(h==="tile"){let _=s.layer+"/"+s.z+"/"+s.x+"/"+s.y,E=this._cache.tiles&&this._cache.tiles[_];return E?Promise.resolve("data:image/png;base64,"+E):Promise.reject(new Error("Tile not cached: "+_))}if(h==="timing_highlight"){let _=s.path_index;if(_>=0&&this._cache.overlays){let E=s.is_setup?"setup":"hold",y=this._cache.overlays[E]?.[_];this._cache.setPathOverlay&&this._cache.setPathOverlay(y?"data:image/png;base64,"+y:null)}else this._cache.setPathOverlay&&this._cache.setPathOverlay(null);return Promise.resolve({})}if(h==="set_module_colors")return Promise.resolve({ok:1,count:0});let p=h;h==="timing_report"?p="timing_report:"+(s.is_setup?"setup":"hold"):h==="slack_histogram"&&(p="slack_histogram:"+(s.is_setup?"setup":"hold"));let m=this._cache.json&&this._cache.json[p];if(m!==void 0){if(h==="timing_report"&&s.slack_min!=null&&s.slack_max!=null&&m.paths){let _=[];return m.paths.forEach((E,y)=>{E.slack>=s.slack_min&&E.slack=m&&N<=y&&P>=_}function oke(d,s,h){let p=d&&Array.isArray(d.by_size)?d.by_size:[];if(p.length===0||!s||!(h>0))return!0;let m=d.min_css_px/(h*Math.pow(2,s.z)),_=p[0];for(let E of p)E[0]<=m&&(_=E);return z2t(_[1],s)}var int=class{constructor(){this._layers=null,this._gated=new Map,this._sized=new Map,this._generation=0}invalidate(){return this._generation++,this._layers=null,this._gated=new Map,this._sized=new Map,this._generation}apply(s,h){if(s!==this._generation)return!1;if(!h||h.supported!==!0||!h.layers||typeof h.layers!="object")return this._layers=null,!1;let p=new Map;if(h.gated&&typeof h.gated=="object")for(let[m,_]of Object.entries(h.gated))_&&typeof _=="object"&&p.set(m,new Map(Object.entries(_)));return this._layers=new Map(Object.entries(h.layers)),this._gated=p,this._sized=new Map(h.sized&&typeof h.sized=="object"?Object.entries(h.sized):[]),!0}refetch(s){let h=this.invalidate();return Promise.resolve().then(()=>s({type:"layer_extents"})).then(p=>this.apply(h,p)).catch(()=>!1)}mayHaveContent(s,h,p,m=256){if(!this._layers||p&&rke.some(_=>p[_]))return!0;if(this._sized.has(s))return oke(this._sized.get(s),h,m);if(!this._layers.has(s)||z2t(this._layers.get(s),h))return!0;for(let[_,E]of this._gated)if(!(p&&p[_]===!1)&&E.has(s)&&z2t(E.get(s),h))return!0;return!1}};function WU(d,s,h){let p=d&&d.app&&d.app.layerExtents;return p?p.mayHaveContent(s,h,d.visibility,ev()):!0}function uk(){return dR()}function bJt(d,s,h){return tnt(d,s,h,uk(),ev())}function _R(d,s){if(d.src&&d.src.startsWith("blob:")&&URL.revokeObjectURL(d.src),s==null){d.src=c3;return}d.src=typeof s=="string"?s:URL.createObjectURL(s)}function wJt(d,s,h,p,m){let _={visibility:d,selectability:h,visibleLayers:s,selectableLayers:p,app:m};return L.GridLayer.extend({_clampZoom:function(E){return L.GridLayer.prototype._clampZoom.call(this,gR(this,E))},initialize:function(E,y,I){this._websocketManager=E,this._layerName=y,L.GridLayer.prototype.initialize.call(this,sk(I))},createTile:function(E,y){let I=document.createElement("img");return I.alt="",I.setAttribute("role","presentation"),I._tileDone=!1,I.onload=()=>{I.src&&I.src.startsWith("blob:")&&URL.revokeObjectURL(I.src),I._tileDone||(I._tileDone=!0,y(null,I))},I.onerror=()=>{I._tileDone||(I._tileDone=!0,y(new Error("tile image load error"),I))},I._websocketRequestId=this._websocketManager.nextId,WU(_,this._layerName,E)?(this._websocketManager.request(bJt(E,this._layerName,_)).then(N=>{_R(I,N)}).catch(N=>{}),I):(I._websocketRequestId=void 0,_R(I,null),I)},refreshTiles:function(){if(this._map)for(let E in this._tiles){let y=this._tiles[E];if(!y||!y.el)continue;let I=y.el,N=y.coords;if(I._websocketRequestId!==void 0&&this._websocketManager.cancel(I._websocketRequestId),!WU(_,this._layerName,N)){I._websocketRequestId=void 0,_R(I,null);continue}I._websocketRequestId=this._websocketManager.nextId,this._websocketManager.request(bJt(N,this._layerName,_)).then(B=>{_R(I,B)}).catch(B=>{})}},_removeTile:function(E){let y=this._tiles[E];y&&y.el&&(y.el._websocketRequestId!==void 0&&this._websocketManager.cancel(y.el._websocketRequestId),y.el.src&&y.el.src.startsWith("blob:")&&URL.revokeObjectURL(y.el.src)),L.GridLayer.prototype._removeTile.call(this,E)}})}function vJt(d,s){function h(p,m){let _={type:"overlay_tile",z:p.z,x:p.x,y:p.y,...pR(uk(),m),debug_renderers:!!d.debug_renderers,debug_live:!!d.debug_live,flywires_only:!!d.flywires_only,poly_decomp:!!(s&&s.polyDecomp),focused_nets_guides:!!d.focused_nets_guides,highlight_selected:d.highlight_selected!==!1,draw_labels:d.labels!==!1};return s&&s.visibleLayerNames&&(_.visible_layers=[...s.visibleLayerNames]),_}return L.GridLayer.extend({initialize:function(p,m){this._websocketManager=p,L.GridLayer.prototype.initialize.call(this,sk(m))},createTile:function(p,m){let _=document.createElement("img");_.alt="",_.setAttribute("role","presentation"),_._tileDone=!1,_.onload=()=>{_.src&&_.src.startsWith("blob:")&&URL.revokeObjectURL(_.src),_._tileDone||(_._tileDone=!0,m(null,_))},_.onerror=()=>{_._tileDone||(_._tileDone=!0,m(new Error("overlay tile load error"),_))};let E=this._websocketManager.nextId;return _._websocketRequestId=E,this._websocketManager.request(h(p,this.getTileSize().x)).then(y=>{_._websocketRequestId===E&&_R(_,y)}).catch(y=>{}),_},refreshTiles:function(){if(this._map)for(let p in this._tiles){let m=this._tiles[p];if(!m||!m.el)continue;let _=m.el,E=m.coords;_._websocketRequestId!==void 0&&this._websocketManager.cancel(_._websocketRequestId);let y=this._websocketManager.nextId;_._websocketRequestId=y,this._websocketManager.request(h(E,this.getTileSize().x)).then(I=>{_._websocketRequestId===y&&_R(_,I)}).catch(()=>{})}},_removeTile:function(p){let m=this._tiles[p];m&&m.el&&(m.el._websocketRequestId!==void 0&&(this._websocketManager.cancel(m.el._websocketRequestId),m.el._websocketRequestId=void 0),m.el.src&&m.el.src.startsWith("blob:")&&URL.revokeObjectURL(m.el.src)),L.GridLayer.prototype._removeTile.call(this,p)}})}function _Jt({zIndex:d=0,tileSize:s}={}){let h={opacity:1,zIndex:d};return s!==void 0&&(h.tileSize=s),h}var cke=4,j2t=350*1024*1024;function yJt(d,s=1){let h=Math.round(d*Math.max(0,s));return h*h*cke}function xJt(d,s,h=256){return!(d>0)||!(s>0)||!(h>0)?1:(Math.ceil(d/h)+1)*(Math.ceil(s/h)+1)}function MJt(d,s){let h=s||(typeof window<"u"?window:null),p=d&&d.clientWidth>0?d.clientWidth:h&&h.innerWidth>0?h.innerWidth:1024,m=d&&d.clientHeight>0?d.clientHeight:h&&h.innerHeight>0?h.innerHeight:768;return{width:p,height:m}}function H2t(d,s){if(!d)return!1;let h=!!s;return!!d.visible===h?!1:(d.visible=h,!0)}var rnt=4;function EJt(d,s,h,p=rnt){let m=s*h;return m>0?Math.max(m,d-p*m):d}function SJt({budgetBytes:d=j2t,tilesPerPane:s,bytesPerTile:h,paneCount:p}={}){if(!(s>0)||!(h>0)||!(p>0))return 1;let m=s*h;return Math.max(1,Math.min(p,Math.floor(d/m)))}function G2t(d,s){if(!Array.isArray(d)||d.length===0)return[];let h=Math.max(1,Math.min(Math.floor(s)||1,d.length)),p=Math.floor(d.length/h),m=d.length%h,_=[],E=0;for(let y=0;y0&&(I++,m--),_.push(d.slice(E,E+I)),E+=I}return _}function TJt(d,s,h){if(!d||!(h>0))return 0;d.clearRect(0,0,h,h);let p=0;for(let m of s||[]){let _=m?m.image:null;if(!_)continue;let E=m.opacity===void 0?1:m.opacity;E>0&&(d.globalAlpha=Math.min(1,E),d.drawImage(_,0,0,h,h),p++)}return d.globalAlpha=1,p}function W2t(d){for(let s of d||[])s&&typeof s.close=="function"&&s.close()}async function CJt({items:d,request:s,decode:h,draw:p,release:m=W2t,isStale:_=()=>!1,onFirstDraw:E}={}){let y=Array.isArray(d)?d:[],I={requested:y.length,arrived:0,decoded:0,drawn:0,paints:0,stale:!1};if(y.length===0)return typeof p=="function"&&p([]),I;let N=new Array(y.length).fill(null),B=!1;function P(){if(_()){I.stale=!0;return}I.drawn=p(y.map((U,j)=>({image:N[j],opacity:U.opacity})))||0,I.paints++,B||(B=!0,E&&E())}try{await Promise.all(y.map(async(U,j)=>{let V=null;try{V=await s(U)}catch{return}if(V==null)return;I.arrived++;let tt=null;try{tt=await h(V)}catch{return}tt&&(N[j]=tt,I.decoded++,P())})),B||P()}finally{m(N)}return I}function ake(d){return d==null?Promise.resolve(null):typeof d=="string"?new Promise(s=>{let h=document.createElement("img");h.onload=()=>s(h),h.onerror=()=>s(null),h.src=d}):typeof createImageBitmap=="function"?createImageBitmap(d).catch(()=>null):new Promise(s=>{let h=URL.createObjectURL(d),p=new Image;p.onload=()=>{URL.revokeObjectURL(h),s(p)},p.onerror=()=>{URL.revokeObjectURL(h),s(null)},p.src=h})}function AJt(d,s={}){let h=s.decode||ake,p=s.dpr||dR;return L.GridLayer.extend({_clampZoom:function(m){return L.GridLayer.prototype._clampZoom.call(this,gR(this,m))},initialize:function(m,_,E){this._websocketManager=m,this._items=_||[],this._generation=0,L.GridLayer.prototype.initialize.call(this,sk(E))},setItems:function(m){this._items=m||[],this.refreshTiles()},visibleItems:function(){return this._items.filter(m=>m&&m.visible!==!1)},createTile:function(m,_){let E=document.createElement("canvas");E.setAttribute("role","presentation");let y=p();return E._orDone=_,this._renderTile(E,m,y),E},_sizeCanvas:function(m,_,{empty:E=!1}={}){let y=this.getTileSize(),I=E?0:Qet(y.x,_),N=E?0:Qet(y.y,_);(m.width!==I||m.height!==N)&&(m.width=I,m.height=N),m.style.width=y.x+"px",m.style.height=y.y+"px"},_finishTile:function(m,_){m._orTileDone||!m._orDone||(m._orTileDone=!0,m._orDone(_||null,m))},_renderTile:function(m,_,E){let y=this._generation,I=this.visibleItems().filter(P=>WU(d,P.layer,_));this._sizeCanvas(m,E,{empty:I.length===0});let N=m.getContext("2d");m._orRequestIds=[];let B=()=>this._generation!==y||m._orRemoved===!0;CJt({items:I,request:P=>{let U=this._websocketManager.nextId;return m._orRequestIds.push(U),this._websocketManager.request(tnt(_,P.layer,d,E,this.getTileSize().x))},decode:h,draw:P=>TJt(N,P,m.width),release:W2t,isStale:B,onFirstDraw:()=>this._finishTile(m)}).then(()=>{B()||this._finishTile(m)}).catch(P=>{B()||this._finishTile(m,P)})},refreshTiles:function(){if(this._map){this._generation++;for(let m in this._tiles){let _=this._tiles[m];if(!_||!_.el)continue;this._cancelTile(_.el);let E=p();this._renderTile(_.el,_.coords,E)}}},_cancelTile:function(m){let _=m._orRequestIds;if(!(!_||!_.length)){for(let E of _)this._websocketManager.cancel(E);m._orRequestIds=[]}},_removeTile:function(m){let _=this._tiles[m];_&&_.el&&(_.el._orRemoved=!0,this._cancelTile(_.el),_.el.width=0,_.el.height=0),L.GridLayer.prototype._removeTile.call(this,m)}})}function kJt(d,s,h,p,m=0){let _=[];return h.forEach((E,y)=>{let I=new d(s,E,_Jt({zIndex:m+y}));p&&I.addTo(p),_.push(I)}),_}var uke=".leaflet-tile-container",IJt=".leaflet-tile";function LJt(d,s){if(!Number.isFinite(d)||!(s>0))return 0;let h=d*s;return(h-Math.round(h))/s}function lke(d,s,h=RJt){let p=d&&d.parentElement;if(!p)return null;let m=typeof d.querySelector=="function"?d.querySelector(IJt):null;if(!m)return null;let _=h(m),E=PJt((p._orSnapDx||0)-LJt(_.left,s),s),y=PJt((p._orSnapDy||0)-LJt(_.top,s),s);return p._orSnapDx=E,p._orSnapDy=y,p.style.transform=E||y?`translate3d(${E}px, ${y}px, 0)`:"",{dx:E,dy:y}}function hke(d,s,h=RJt){if(!d||typeof d.getPane!="function"||!(s>0)||Number.isInteger(s))return 0;let p=d.getPane("tilePane");if(!p||typeof p.querySelectorAll!="function")return 0;let m=0,_=[...p.querySelectorAll(uke)].filter(fke).map(E=>{let y=E.querySelector(IJt);return{container:E,rect:y?h(y):null}});for(let{container:E,rect:y}of _)y&&lke(E,s,()=>y)&&m++;return m}function RJt(d){return d.getBoundingClientRect()}function PJt(d,s){return d-Math.round(d*s)/s}function fke(d){let s=d.style&&d.style.transform||"",h=/scale\(([^)]*)\)/.exec(s);return!h||Number(h[1])===1}var dke="move zoomend viewreset resize load";function DJt(d,s=dR){if(!d||typeof d.on!="function")return!1;let h=()=>hke(d,s());return d.on(dke,h),h(),!0}function pke(d){let s=d.lastIndexOf("/");return s>0?d.slice(0,s):""}var hk=class d{constructor(s,h,p){this._app=s,this._redrawAllLayers=h,this._refreshOverlay=p||h,this._currentTab="setup",this._setupPaths=[],this._holdPaths=[],this._selectedPathIndex=-1,this._detailTab="data",this._selectedDetailIndex=-1,this._rowSelectionInst="",this._sortCol="slack",this._sortAscending=!0,this._build()}_build(){let s=document.createElement("div");s.className="timing-widget";let h=document.createElement("div");h.className="timing-toolbar",this._updateBtn=document.createElement("button"),this._updateBtn.className="or-btn",this._updateBtn.textContent="Update",Sc(this._app)&&(this._updateBtn.style.display="none"),this._pathCountLabel=document.createElement("span"),this._pathCountLabel.className="timing-path-count",h.appendChild(this._updateBtn),h.appendChild(this._pathCountLabel),s.appendChild(h),s.appendChild(this._buildConePanel());let p=document.createElement("div");p.className="timing-tab-bar",this._setupTab=this._makeTab("Setup",!0),this._holdTab=this._makeTab("Hold",!1),p.appendChild(this._setupTab),p.appendChild(this._holdTab),s.appendChild(p),this._pathTableContainer=document.createElement("div"),this._pathTableContainer.className="timing-path-table-container",this._pathTable=document.createElement("table"),this._pathTable.className="timing-table",this._pathTableContainer.appendChild(this._pathTable),s.appendChild(this._pathTableContainer);let m=document.createElement("div");m.className="timing-tab-bar",this._dataTab=this._makeTab("Data Path",!0),this._captureTab=this._makeTab("Capture Path",!1),m.appendChild(this._dataTab),m.appendChild(this._captureTab),s.appendChild(m),this._detailTableContainer=document.createElement("div"),this._detailTableContainer.className="timing-detail-table-container",this._detailTable=document.createElement("table"),this._detailTable.className="timing-table",this._detailTableContainer.appendChild(this._detailTable),s.appendChild(this._detailTableContainer),this._headerTooltip=document.createElement("div"),this._headerTooltip.className="or-tooltip or-tooltip-fixed",s.appendChild(this._headerTooltip),this.element=s,this._bindEvents(),Sc(this._app)&&setTimeout(()=>this.update(),0)}_makeTab(s,h){let p=document.createElement("button");return p.className="timing-tab"+(h?" active":""),p.textContent=s,p}_bindEvents(){this._setupTab.addEventListener("click",()=>{this._currentTab="setup",this._setupTab.classList.add("active"),this._holdTab.classList.remove("active"),this._selectedPathIndex=-1,this._renderPathTable(),this._renderDetailTable(),this._clearTimingHighlight()}),this._holdTab.addEventListener("click",()=>{this._currentTab="hold",this._holdTab.classList.add("active"),this._setupTab.classList.remove("active"),this._selectedPathIndex=-1,this._renderPathTable(),this._renderDetailTable(),this._clearTimingHighlight()}),this._dataTab.addEventListener("click",()=>{this._detailTab="data",this._dataTab.classList.add("active"),this._captureTab.classList.remove("active"),this._renderDetailTable()}),this._captureTab.addEventListener("click",()=>{this._detailTab="capture",this._captureTab.classList.add("active"),this._dataTab.classList.remove("active"),this._renderDetailTable()}),this._updateBtn.addEventListener("click",()=>this.update()),this._pathTableContainer.setAttribute("tabindex","0"),this._pathTableContainer.style.outline="none",this._pathTableContainer.addEventListener("keydown",s=>{if(s.key==="ArrowDown"){s.preventDefault();let h=this._pathTable.querySelectorAll("tbody tr");this._selectedPathIndex0&&this._selectPathRow(this._selectedPathIndex-1))}),this._detailTableContainer.setAttribute("tabindex","0"),this._detailTableContainer.style.outline="none",this._detailTableContainer.addEventListener("keydown",s=>{if(s.key==="ArrowDown"){s.preventDefault();let h=this._detailTable.querySelectorAll("tbody tr");this._selectedDetailIndex0&&this._selectDetailRow(this._selectedDetailIndex-1))})}_buildConePanel(){let s=document.createElement("div");s.className="timing-cone-panel";let h=document.createElement("span");h.className="timing-cone-title",h.textContent="Timing cone:",s.appendChild(h);let p=(B,P,U=!1)=>{let j=document.createElement("input");j.type="checkbox",j.id=B,j.checked=U;let V=document.createElement("label");return V.htmlFor=B,V.textContent=P,{input:j,lbl:V}},m=p("cone-fanin","Fanin",!0),_=p("cone-fanout","Fanout",!0);this._coneFanin=m.input,this._coneFanout=_.input,s.append(m.input,m.lbl,_.input,_.lbl);let E=B=>{let P=document.createElement("label");P.className="timing-cone-depth-label",P.textContent=B;let U=document.createElement("input");return U.type="number",U.min="0",U.value="0",U.className="timing-cone-depth",U.title="0 = unlimited",P.appendChild(U),{lbl:P,input:U}},y=E("in\u2264"),I=E("out\u2264");this._coneFaninDepth=y.input,this._coneFanoutDepth=I.input,s.append(y.lbl,I.lbl),this._coneColorMode=document.createElement("select"),this._coneColorMode.className="timing-cone-colormode";for(let[B,P]of[["slack","by slack"],["depth","by depth"]]){let U=document.createElement("option");U.value=B,U.textContent=P,this._coneColorMode.appendChild(U)}s.appendChild(this._coneColorMode);let N=p("cone-sync-schematic","Sync schematic");return this._coneSyncSchematic=N.input,s.append(N.input,N.lbl),this._coneApplyBtn=document.createElement("button"),this._coneApplyBtn.className="or-btn",this._coneApplyBtn.textContent="Cone",this._coneApplyBtn.title="Show the timing cone for the selected path pin or instance",this._coneClearBtn=document.createElement("button"),this._coneClearBtn.className="or-btn",this._coneClearBtn.textContent="Clear",s.append(this._coneApplyBtn,this._coneClearBtn),this._coneStatus=document.createElement("span"),this._coneStatus.className="timing-cone-status",s.appendChild(this._coneStatus),this._coneApplyBtn.addEventListener("click",()=>this._applyCone()),this._coneClearBtn.addEventListener("click",()=>this._clearCone()),s}_coneTarget(){let s=this._detailNodes[this._selectedDetailIndex],h=this._app.selectedInstanceName||"";return s?.pin&&h===this._rowSelectionInst?{pin:s.pin,inst:pke(s.pin)}:{pin:"",inst:h}}async _applyCone(){let s=this._coneFanin.checked,h=this._coneFanout.checked;if(!s&&!h){this._coneStatus.textContent="select fanin and/or fanout";return}let{pin:p,inst:m}=this._coneTarget();if(!p&&!m){this._coneStatus.textContent="select an instance or a path pin first";return}let _={type:"timing_cone",fanin:s,fanout:h,fanin_depth:Math.max(0,parseInt(this._coneFaninDepth.value,10)||0),fanout_depth:Math.max(0,parseInt(this._coneFanoutDepth.value,10)||0),color_mode:this._coneColorMode.value,inst_name:m};p&&(_.pin_name=p),this._coneApplyBtn.disabled=!0,this._coneStatus.textContent="computing\u2026";try{let E=await this._app.websocketManager.request(_);this._refreshOverlay(),this._renderConeStatus(E),this._coneSyncSchematic.checked&&m&&document.dispatchEvent(new CustomEvent("openroad-cone-sync",{detail:{inst_name:m,fanin:_.fanin,fanout:_.fanout,fanin_depth:_.fanin_depth,fanout_depth:_.fanout_depth}}))}catch(E){this._coneStatus.textContent="cone error: "+(E.message||E)}this._coneApplyBtn.disabled=!1}_renderConeStatus(s){if(!s){this._coneStatus.textContent="";return}let h=s.node_count||0;if(h===0){this._coneStatus.textContent="empty cone";return}let p=h+" pins";if(s.color_mode==="depth")p+=`, depth \xB1${s.max_depth}`;else if(s.constrained){let m=s.time_unit||"";p+=`, slack ${lk(s.min_slack)}\u2026${lk(s.max_slack)}${m}`}else p+=", unconstrained";this._coneStatus.textContent=p}_clearCone(){this._app.websocketManager.request({type:"timing_cone",clear:!0}).then(()=>this._refreshOverlay()),this._coneStatus.textContent=""}showPaths(s,h){this._currentTab=s,s==="setup"?(this._setupPaths=[...h],this._setupTab.classList.add("active"),this._holdTab.classList.remove("active")):(this._holdPaths=[...h],this._holdTab.classList.add("active"),this._setupTab.classList.remove("active")),this._applySort(),this._selectedPathIndex=-1,this._pathCountLabel.textContent=h.length+" paths",this._renderPathTable(),this._renderDetailTable(),this._clearTimingHighlight()}async update(){this._updateBtn.disabled=!0,this._updateBtn.textContent="Loading...";try{let[s,h]=await Promise.all([this._app.websocketManager.request({type:"timing_report",is_setup:!0,max_paths:100}),this._app.websocketManager.request({type:"timing_report",is_setup:!1,max_paths:100})]);this._setupPaths=[...s.paths||[]],this._holdPaths=[...h.paths||[]],this._applySort(),this._selectedPathIndex=-1,this._renderPathTable(),this._renderDetailTable(),this._clearTimingHighlight()}catch(s){console.error("Timing fetch failed:",s)}this._updateBtn.disabled=!1,this._updateBtn.textContent="Update"}_applySort(){for(let s of[this._setupPaths,this._holdPaths]){s.forEach((m,_)=>{m._originalIndex===void 0&&(m._originalIndex=_)});let h=this._sortAscending?1:-1,p=this._sortCol;s.sort((m,_)=>{let E=m[p],y=_[p],I=typeof E=="number"&&typeof y=="number"?E-y:String(E).localeCompare(String(y));return h*I})}}_showHeaderTooltip(s,h){if(s.buttons!==0){this._hideHeaderTooltip();return}let p=this._headerTooltip;p.textContent=h,p.style.display="block";let m=Math.min(s.clientX+12,window.innerWidth-p.offsetWidth-8);p.style.left=Math.max(0,m)+"px",p.style.top=s.clientY+14+"px"}_hideHeaderTooltip(){this._headerTooltip.style.display="none"}_sortBy(s){this._sortCol===s?this._sortAscending=!this._sortAscending:(this._sortCol=s,this._sortAscending=!0),this._applySort(),this._selectedPathIndex=-1,this._renderPathTable(),this._renderDetailTable(),this._clearTimingHighlight()}_clearTimingHighlight(){this._app.websocketManager.request({type:"timing_highlight",path_index:-1}).then(()=>this._refreshOverlay())}_selectPathRow(s){let h=this._pathTable.querySelectorAll("tbody tr");if(s<0||s>=h.length)return;this._selectedPathIndex=s;for(let _ of h)_.classList.remove("selected");h[s].classList.add("selected"),h[s].scrollIntoView({block:"nearest"}),this._pathTableContainer.focus(),this._renderDetailTable();let m=(this._currentTab==="setup"?this._setupPaths:this._holdPaths)[s]?._originalIndex??s;this._app.websocketManager.request({type:"timing_highlight",path_index:m,is_setup:this._currentTab==="setup"}).then(()=>this._refreshOverlay()).catch(_=>console.error("timing_highlight error:",_))}_renderPathTable(){this._hideHeaderTooltip();let s=this._currentTab==="setup"?this._setupPaths:this._holdPaths;this._pathCountLabel.textContent=s.length+" paths";let h=this._pathTable.querySelectorAll("thead th"),p=Array.from(h,I=>I.style.width);this._pathTable.innerHTML="";let m=document.createElement("thead"),_=document.createElement("tr");for(let I of d.PATH_COLS){let N=document.createElement("th");N.classList.add("sortable"),I.num&&N.classList.add("num"),N.textContent=I.label+(I.key===this._sortCol?this._sortAscending?" \u25B2":" \u25BC":""),I.tooltip&&(N.addEventListener("mousemove",B=>this._showHeaderTooltip(B,I.tooltip)),N.addEventListener("mouseleave",()=>this._hideHeaderTooltip())),N.addEventListener("click",()=>this._sortBy(I.key)),_.appendChild(N)}m.appendChild(_),this._pathTable.appendChild(m);let E=document.createElement("tbody"),y=s.reduce((I,N)=>Math.max(I,Math.abs(Number(N.slack)||0)),0);if(s.forEach((I,N)=>{let B=document.createElement("tr");N===this._selectedPathIndex&&B.classList.add("selected");for(let P of d.PATH_COLS){let U=document.createElement("td"),j=I[P.key];if(U.textContent=P.time?lk(j):j,P.num&&U.classList.add("num"),P.key==="slack"){let V=Number(I.slack);V<0&&U.classList.add("slack-negative"),Number.isFinite(V)&&y>0&&(U.classList.add("slack-cell",V<0?"slack-under":"slack-over"),U.style.setProperty("--slack-frac",String(Math.abs(V)/y)))}B.appendChild(U)}B.style.cursor="pointer",B.addEventListener("click",()=>this._selectPathRow(N)),E.appendChild(B)}),s.length===0){let I=document.createElement("tr"),N=document.createElement("td");N.colSpan=d.PATH_COLS.length,N.style.textAlign="center",N.style.color="var(--fg-secondary)",N.textContent=Sc(this._app)?"No timing data available":'Click "Update" to load timing paths',I.appendChild(N),E.appendChild(I)}this._pathTable.appendChild(E),ak(this._pathTable,p)}_selectDetailRow(s){let h=this._detailTable.querySelectorAll("tbody tr");if(s<0||s>=h.length)return;this._selectedDetailIndex=s;for(let E of h)E.classList.remove("timing-selected-row");h[s].classList.add("timing-selected-row"),h[s].scrollIntoView({block:"nearest"}),this._detailTableContainer.focus(),this._rowSelectionInst=this._app.selectedInstanceName||"";let _=(this._currentTab==="setup"?this._setupPaths:this._holdPaths)[this._selectedPathIndex]._originalIndex??this._selectedPathIndex;this._app.websocketManager.request({type:"timing_highlight",path_index:_,is_setup:this._currentTab==="setup",pin_name:this._detailNodes[s].pin}).then(()=>this._refreshOverlay())}get _detailNodes(){let h=(this._currentTab==="setup"?this._setupPaths:this._holdPaths)[this._selectedPathIndex];return h?(this._detailTab==="data"?h.data_nodes:h.capture_nodes)||[]:[]}_renderDetailTable(){let s=this._detailTable.querySelectorAll("thead th"),h=Array.from(s,I=>I.style.width);this._detailTable.innerHTML="",this._selectedDetailIndex=-1;let p=this._currentTab==="setup"?this._setupPaths:this._holdPaths;if(this._selectedPathIndex<0||this._selectedPathIndex>=p.length)return;let m=this._detailNodes,_=document.createElement("thead"),E=document.createElement("tr");for(let I of d.DETAIL_COLS){let N=document.createElement("th");d.DETAIL_NUM_COLS.has(I)&&N.classList.add("num"),N.textContent=I,E.appendChild(N)}_.appendChild(E),this._detailTable.appendChild(_);let y=document.createElement("tbody");if(m.forEach((I,N)=>{let B=document.createElement("tr");I.clk&&B.classList.add("timing-clock-row"),[I.pin,I.fanout,I.rise?"\u2191":"\u2193",lk(I.time),lk(I.delay),lk(I.slew),lk(I.load)].forEach((U,j)=>{let V=document.createElement("td");d.DETAIL_NUM_COLS.has(d.DETAIL_COLS[j])&&V.classList.add("num"),V.textContent=U,B.appendChild(V)}),B.style.cursor="pointer",B.addEventListener("click",()=>this._selectDetailRow(N)),y.appendChild(B)}),this._detailTable.appendChild(y),ak(this._detailTable,h),!h[0]){let I=this._detailTable.querySelector("thead th");I&&(I.style.width="30ch")}}};function lk(d){return d==null?"":typeof d=="number"?d.toFixed(4):String(d)}hk.PATH_COLS=[{label:"Clock",key:"end_clk"},{label:"Required",key:"required",time:!0,num:!0},{label:"Arrival",key:"arrival",time:!0,num:!0},{label:"Slack",key:"slack",time:!0,num:!0},{label:"Skew",key:"skew",time:!0,num:!0,tooltip:`The difference in arrival times between source and destination clock pins of a macro/register, adjusted for CRPR and subtracting a clock period. -Setup and hold times account for internal clock delays.`},{label:"Logic Delay",key:"path_delay",time:!0,num:!0,tooltip:"Path delay from instances (excluding buffers and consecutive inverter pairs)"},{label:"Logic Depth",key:"logic_depth",num:!0,tooltip:"Path instances (excluding buffers and consecutive inverter pairs)"},{label:"Fanout",key:"fanout",num:!0},{label:"Start",key:"start_pin"},{label:"End",key:"end_pin"}];ak.DETAIL_COLS=["Pin","Fanout","R/F","Time","Delay","Slew","Load"];ak.DETAIL_NUM_COLS=new Set(["Fanout","Time","Delay","Slew","Load"]);function qf(d){let s=document.cookie.match("(?:^|; )"+d+"=([^;]*)");return s?s[1]:null}function Rd(d,s){document.cookie=d+"="+s+"; path=/; max-age=31536000; SameSite=Lax"}function qet(d){document.cookie=d+"=; path=/; max-age=0; SameSite=Lax"}function Xet(d){Rd("or_theme",d);try{window.localStorage.setItem("or_theme",d)}catch{}}function bJt(){qet("or_theme");try{window.localStorage.removeItem("or_theme")}catch{}}function N2t(d){let s=document.getElementById("gl-theme-dark"),h=document.getElementById("gl-theme-light");!s||!h||(s.disabled=d!=="dark",h.disabled=d!=="light")}function wJt(d,s){gR(d)&&(document.documentElement.style.setProperty("--bg-map",d),Rd("or_bg_color",d),_Jt(s),s.syncDisplayState())}function vJt(d){document.documentElement.style.removeProperty("--bg-map"),qet("or_bg_color"),_Jt(d),d.syncDisplayState()}function O2t(){return pJt(getComputedStyle(document.documentElement).getPropertyValue("--bg-map"))??"#000000"}function _Jt(d){d.threeDViewerWidget?.render?.()}if(typeof document<"u"){let d=qf("or_theme")||typeof localStorage<"u"&&localStorage.getItem("or_theme")||(matchMedia("(prefers-color-scheme: light)").matches?"light":"dark");document.documentElement.dataset.theme=d,N2t(d);let s=qf("or_bg_color");gR(s)&&document.documentElement.style.setProperty("--bg-map",s)}function uk(){let d=getComputedStyle(document.documentElement),s=h=>d.getPropertyValue(h).trim();return{canvasBg:s("--canvas-bg"),canvasText:s("--canvas-text"),canvasAxis:s("--canvas-axis"),canvasLabel:s("--canvas-label"),canvasGrid:s("--canvas-grid"),canvasTitle:s("--canvas-title"),fgPrimary:s("--fg-primary"),fgMuted:s("--fg-muted"),bgPanel:s("--bg-panel"),bgMap:s("--bg-map"),fontMono:s("--font-mono"),fontSans:s("--font-sans")}}function lk(d,s){let h=document.createElement("a");h.href=d,h.download=s,document.body.appendChild(h),h.click(),h.remove()}function yJt(d,s){let h=URL.createObjectURL(d);lk(h,s),setTimeout(()=>URL.revokeObjectURL(h),1e3)}function B2t(d){let s=d.cloneNode(!0);if(s.getAttribute("xmlns")||s.setAttribute("xmlns","http://www.w3.org/2000/svg"),s.getAttribute("xmlns:xlink")||s.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),!s.getAttribute("width")||!s.getAttribute("height")){let h=d.viewBox&&d.viewBox.baseVal;h&&h.width&&h.height&&(s.setAttribute("width",h.width),s.setAttribute("height",h.height))}return` -`+new XMLSerializer().serializeToString(s)}function KAe(d){let s=d.viewBox&&d.viewBox.baseVal;if(s&&s.width&&s.height)return{width:s.width,height:s.height};let h=parseFloat(d.getAttribute("width")),g=parseFloat(d.getAttribute("height"));if(h&&g)return{width:h,height:g};let m=d.getBoundingClientRect();return{width:m.width||800,height:m.height||600}}function F2t(d,s=2){let{width:h,height:g}=KAe(d),m=B2t(d),_=new Blob([m],{type:"image/svg+xml;charset=utf-8"}),S=URL.createObjectURL(_);return new Promise((y,R)=>{let N=new Image;N.onload=()=>{let B=document.createElement("canvas");B.width=Math.max(1,Math.round(h*s)),B.height=Math.max(1,Math.round(g*s));let P=B.getContext("2d");P.fillStyle="#ffffff",P.fillRect(0,0,B.width,B.height),P.drawImage(N,0,0,B.width,B.height),URL.revokeObjectURL(S),y(B.toDataURL("image/png"))},N.onerror=B=>{URL.revokeObjectURL(S),R(B)},N.src=S})}async function Zet(d){try{if(!navigator.clipboard||!window.ClipboardItem)return!1;let s=await(await fetch(d)).blob();return await navigator.clipboard.write([new ClipboardItem({"image/png":s})]),!0}catch{return!1}}function JAe(d){return(String(d||"").replace(/[^A-Za-z0-9._-]/g,"_").replace(/^_+|_+$/g,"")||"clock_tree")+".png"}var U2t=24,z2t=10,Ket=40,QAe=40,j2t=70,tke=20,Yet={root:"#ff4444",buffer:"#4488ff",inverter:"#00b0b0",clock_gate:"#cc44cc",register:"#ff4444",macro:"#00b0b0",unknown:"#888888"};function eke(d){let s=parseInt(d.slice(1,3),16),h=parseInt(d.slice(3,5),16),g=parseInt(d.slice(5,7),16),m=S=>Math.round((S+255)/2),_=S=>S.toString(16).padStart(2,"0");return"#"+_(m(s))+_(m(h))+_(m(g))}function nke(d){let s=d.nodes;if(!s||s.length===0)return{layout:[],layoutWidth:0,layoutHeight:0,timeMin:0,timeMax:0,timeUnit:"",sceneHeight:0,layoutById:new Map};let h=new Map;for(let gt of s)h.set(gt.id,[]);for(let gt of s)gt.parent_id>=0&&h.has(gt.parent_id)&&h.get(gt.parent_id).push(gt.id);let g=new Map;for(let gt of s)g.set(gt.id,gt);let m=new Map,_=gt=>{let ft=h.get(gt)||[];if(ft.length===0)return m.set(gt,1),1;let xt=0;for(let Bt of ft)xt+=_(Bt);return m.set(gt,xt),xt},S=s.filter(gt=>gt.parent_id===-1),y=0;for(let gt of S)y+=_(gt.id);let R=d.min_arrival,N=d.max_arrival,B=N-R||1,P=Math.max(200,y*U2t*.6),U=[],W=(gt,ft)=>{let xt=g.get(gt),Bt=m.get(gt),Ot=j2t+(ft+Bt/2)*U2t,Pt=Ket+(xt.arrival-R)/B*P;U.push({id:xt.id,x:Ot,y:Pt,type:xt.type,name:xt.name,pin_name:xt.pin_name,arrival:xt.arrival,delay:xt.delay,fanout:xt.fanout,level:xt.level,parent_id:xt.parent_id});let se=ft,ot=h.get(gt)||[];for(let Lt of ot)W(Lt,se),se+=m.get(Lt)},q=0;for(let gt of S)W(gt.id,q),q+=m.get(gt.id);let nt=j2t+y*U2t+tke,Q=Ket+P+QAe,X=new Map;for(let gt of U)X.set(gt.id,gt);return{layout:U,layoutWidth:nt,layoutHeight:Q,timeMin:R,timeMax:N,timeUnit:d.time_unit||"",sceneHeight:P,layoutById:X}}var Jet=class{constructor(s,h,g,m){this._app=h,this._redrawAllLayers=g,this._refreshOverlay=m||g,this._clockData=[],this._selectedClockIdx=0,this._selectedNodeId=-1,this._tx=0,this._ty=0,this._scale=1,this._layout=[],this._dragging=!1,this._dragStartX=0,this._dragStartY=0,this._dragStartTx=0,this._dragStartTy=0,this._build(s)}_build(s){let h=document.createElement("div");h.className="clock-tree-widget";let g=document.createElement("div");g.className="clock-tree-toolbar",this._updateBtn=document.createElement("button"),this._updateBtn.className="or-btn",this._updateBtn.textContent="Update",Sc(this._app)&&(this._updateBtn.style.display="none"),this._fitBtn=document.createElement("button"),this._fitBtn.className="or-btn",this._fitBtn.textContent="Fit",this._pngBtn=document.createElement("button"),this._pngBtn.className="or-btn",this._pngBtn.textContent="PNG",this._pngBtn.title="Export the clock tree as a PNG image",this._statusLabel=document.createElement("span"),this._statusLabel.className="timing-path-count",g.appendChild(this._updateBtn),g.appendChild(this._fitBtn),g.appendChild(this._pngBtn),g.appendChild(this._statusLabel),h.appendChild(g),this._tabBar=document.createElement("div"),this._tabBar.className="timing-tab-bar",h.appendChild(this._tabBar),this._canvas=document.createElement("canvas"),this._canvas.className="clock-tree-canvas",h.appendChild(this._canvas),this._tooltip=document.createElement("div"),this._tooltip.className="or-tooltip",this._tooltip.style.display="none",h.appendChild(this._tooltip),s.element.appendChild(h),this._el=h,this._ctx=this._canvas.getContext("2d"),this._bindEvents(),Sc(this._app)&&setTimeout(()=>this.update(),0)}_fit(){this._sizeCanvas(),this._fitToView(),this._render()}_pngFileName(){let s=this._clockData[this._selectedClockIdx];return JAe(s&&s.name)}_exportPng(){try{lk(this._canvas.toDataURL("image/png"),this._pngFileName())}catch(s){console.error("PNG export failed:",s)}}_bindEvents(){this._updateBtn.addEventListener("click",()=>this.update()),this._fitBtn.addEventListener("click",()=>this._fit()),this._pngBtn.addEventListener("click",()=>this._exportPng()),this._canvas.addEventListener("keydown",s=>{s.key==="f"&&this._fit()}),this._canvas.tabIndex=0,this._canvas.addEventListener("wheel",s=>{s.preventDefault();let h=this._canvas.getBoundingClientRect(),g=s.clientX-h.left,m=s.clientY-h.top,_=s.deltaY<0?1.15:1/1.15;this._tx=g-(g-this._tx)*_,this._ty=m-(m-this._ty)*_,this._scale*=_,this._render()}),this._canvas.addEventListener("mousedown",s=>{this._dragging=!0,this._dragStartX=s.clientX,this._dragStartY=s.clientY,this._dragStartTx=this._tx,this._dragStartTy=this._ty,this._canvas.style.cursor="grabbing"}),window.addEventListener("mousemove",s=>{this._dragging?(this._tx=this._dragStartTx+(s.clientX-this._dragStartX),this._ty=this._dragStartTy+(s.clientY-this._dragStartY),this._render()):this._handleHover(s)}),window.addEventListener("mouseup",()=>{this._dragging&&(this._dragging=!1,this._canvas.style.cursor="grab")}),this._canvas.addEventListener("click",s=>this._handleClick(s)),this._resizeObserver=new ResizeObserver(()=>{this._sizeCanvas(),this._render()}),this._resizeObserver.observe(this._canvas)}_sizeCanvas(){let s=this._canvas.getBoundingClientRect(),h=window.devicePixelRatio||1;this._canvas.width=s.width*h,this._canvas.height=s.height*h,this._ctx.setTransform(h,0,0,h,0,0)}async update(){this._statusLabel.textContent="Loading...";try{let s=await this._app.websocketManager.request({type:"clock_tree"});this._clockData=s.clocks||[],this._buildTabs(),this._selectClock(0),this._statusLabel.textContent=this._clockData.length+" clock"+(this._clockData.length!==1?"s":"")}catch(s){console.error("Clock tree error:",s),this._statusLabel.textContent="Error: "+s.message}}_buildTabs(){this._tabBar.innerHTML="",this._clockData.forEach((s,h)=>{let g=document.createElement("button");g.className="timing-tab"+(h===this._selectedClockIdx?" active":""),g.textContent=s.name,g.addEventListener("click",()=>this._selectClock(h)),this._tabBar.appendChild(g)})}_selectClock(s){if(s<0||s>=this._clockData.length)return;this._selectedClockIdx=s,this._selectedNodeId=-1,this._tabBar.querySelectorAll(".timing-tab").forEach((g,m)=>{g.classList.toggle("active",m===s)}),this._computeLayout(this._clockData[s]),requestAnimationFrame(()=>{this._sizeCanvas(),this._fitToView(),this._render()})}_computeLayout(s){let h=nke(s);this._layout=h.layout,this._layoutWidth=h.layoutWidth,this._layoutHeight=h.layoutHeight,this._timeMin=h.timeMin,this._timeMax=h.timeMax,this._timeUnit=h.timeUnit,this._sceneHeight=h.sceneHeight,this._layoutById=h.layoutById}_fitToView(){if(!this._layout.length)return;let s=this._canvas.getBoundingClientRect(),h=s.width,g=s.height,m=h/this._layoutWidth,_=g/this._layoutHeight;this._scale=Math.min(m,_)*.9,this._tx=(h-this._layoutWidth*this._scale)/2,this._ty=(g-this._layoutHeight*this._scale)/2}render(){this._render()}_render(){let s=this._ctx,h=this._canvas.getBoundingClientRect(),g=h.width,m=h.height,_=uk();if(s.clearRect(0,0,g,m),s.fillStyle=_.canvasBg,s.fillRect(0,0,g,m),!this._layout.length){s.fillStyle=_.canvasText,s.font="14px "+_.fontSans,s.textAlign="center";let S=Sc(this._app)?"No clock tree data available":'Click "Update" to load clock tree data';s.fillText(S,g/2,m/2);return}s.save(),s.translate(this._tx,this._ty),s.scale(this._scale,this._scale),this._drawConnections(s);for(let S of this._layout)this._drawNode(s,S,S.id===this._selectedNodeId);s.restore(),this._drawTimeScale(s,g,m,_)}_drawConnections(s){let h=1.5/this._scale,g=z2t,m=this._timeMax-this._timeMin||1;for(let _ of this._layout){if(_.parent_id<0)continue;let S=this._layoutById.get(_.parent_id);if(!S)continue;let y=S.x,R=_.x,N=(S.delay||0)/m*this._sceneHeight,B=S.y+N,P=_.y,U=S.type==="root"?S.y:S.y+g;if(B>U){let q=Yet[S.type]||Yet.unknown;s.strokeStyle=q,s.lineWidth=h,s.beginPath(),s.moveTo(y,U),s.lineTo(y,B);let nt=g/20;s.moveTo(y-nt,B),s.lineTo(y+nt,B),s.stroke()}s.strokeStyle="#006400",s.lineWidth=h;let W=(B+P)/2;s.beginPath(),s.moveTo(y,B),s.bezierCurveTo(y,W,R,W,R,P),s.stroke()}}_drawNode(s,h,g){let m=h.x,_=h.y,S=z2t,y=Yet[h.type]||Yet.unknown;switch(s.fillStyle=eke(y),s.strokeStyle=y,s.lineWidth=1/this._scale,h.type){case"root":{s.beginPath(),s.moveTo(m-S/2,_-S),s.lineTo(m+S/2,_-S),s.lineTo(m,_),s.closePath(),s.fill(),s.stroke();break}case"buffer":{s.beginPath(),s.moveTo(m-S/2,_),s.lineTo(m+S/2,_),s.lineTo(m,_+S),s.closePath(),s.fill(),s.stroke();break}case"inverter":{let R=S*.1,N=_+S-R;s.beginPath(),s.moveTo(m-S/2,_),s.lineTo(m+S/2,_),s.lineTo(m,N),s.closePath(),s.fill(),s.stroke(),s.beginPath(),s.arc(m,N+R/2,R/2,0,Math.PI*2),s.fill(),s.stroke();break}case"clock_gate":{s.beginPath(),s.arc(m,_+S/2,S/2,0,Math.PI*2),s.fill(),s.stroke();break}case"register":case"macro":{s.beginPath(),s.rect(m-S/2,_,S,S),s.fill(),s.stroke(),s.beginPath(),s.moveTo(m-S/8,_),s.lineTo(m+S/8,_),s.lineTo(m,_+S/4),s.closePath(),s.stroke();break}default:{s.beginPath(),s.arc(m,_+S/2,S/2,0,Math.PI*2),s.fill(),s.stroke();break}}if(g){s.strokeStyle="#ffff00",s.lineWidth=2/this._scale;let R=h.type==="root"?_-S/2:_+S/2;s.beginPath(),s.arc(m,R,S/2+3,0,Math.PI*2),s.stroke()}}_drawTimeScale(s,h,g,m){if(!this._sceneHeight)return;let _=nt=>nt*this._scale+this._ty,S=_(Ket),y=_(Ket+this._sceneHeight);if(y<0||S>g)return;s.save(),s.fillStyle=m.canvasLabel,s.strokeStyle=m.canvasAxis,s.font="11px "+m.fontMono,s.textAlign="right",s.textBaseline="middle";let R=this._timeMax-this._timeMin;if(R<=0){s.restore();return}let N=y-S,B=Math.max(2,Math.floor(N/40)),P=R/B,U=Math.pow(10,Math.floor(Math.log10(P))),W=U;P/U>5?W=10*U:P/U>2?W=5*U:P/U>1&&(W=2*U);let q=Math.ceil(this._timeMin/W)*W;s.beginPath();for(let nt=q;nt<=this._timeMax;nt+=W){let Q=(nt-this._timeMin)/R,X=S+Q*(y-S);s.moveTo(0,X),s.lineTo(h,X);let gt=nt.toFixed(W<.01?3:W<.1?2:1)+" "+this._timeUnit;s.fillText(gt,j2t-4,X)}s.stroke(),s.restore()}_screenToLayout(s,h){return{x:(s-this._tx)/this._scale,y:(h-this._ty)/this._scale}}_hitTest(s,h){let g=this._screenToLayout(s,h),m=z2t;for(let _ of this._layout){let S=_.type==="root"?_.y-m:_.y,y=_.type==="root"?_.y:_.y+m;if(g.x>=_.x-m/2&&g.x<=_.x+m/2&&g.y>=S&&g.y<=y)return _}return null}_handleClick(s){let h=this._canvas.getBoundingClientRect(),g=s.clientX-h.left,m=s.clientY-h.top,_=this._hitTest(g,m);_?(this._selectedNodeId=_.id,this._render(),this._app.websocketManager.request({type:"clock_tree_highlight",inst_name:_.name}).then(()=>this._refreshOverlay())):this._selectedNodeId>=0&&(this._selectedNodeId=-1,this._render(),this._app.websocketManager.request({type:"clock_tree_highlight",inst_name:""}).then(()=>this._refreshOverlay()))}_handleHover(s){let h=this._canvas.getBoundingClientRect(),g=s.clientX-h.left,m=s.clientY-h.top;if(g<0||m<0||g>h.width||m>h.height){this._tooltip.style.display="none";return}let _=this._hitTest(g,m);if(_){let S=[_.name,"Type: "+_.type,"Arrival: "+_.arrival.toFixed(3)+" "+(this._timeUnit||"")];_.delay&&S.push("Delay: "+_.delay.toFixed(3)+" "+(this._timeUnit||"")),_.fanout&&S.push("Fanout: "+_.fanout),this._tooltip.textContent=S.join(` -`),this._tooltip.style.display="block",this._tooltip.style.left=s.clientX+12+"px",this._tooltip.style.top=s.clientY+12+"px"}else this._tooltip.style.display="none"}};var MJt=60,EJt=20,SJt=30,TJt=50,xJt=2,ike="#f08080",rke="#8b0000",ske="#90ee90",oke="#006400",dS=["#4e79a7","#f28e2b","#e15759","#76b7b2","#59a14f","#edc948","#b07aa1","#ff9da7"],cke="rgba(240,128,128,0.12)",ake="rgba(144,238,144,0.12)",uke="#ff9999",lke="#b0ffb0",hke=[{value:"setup",label:"Setup Slack"},{value:"hold",label:"Hold Slack"},{value:"fanout",label:"Net Fanout"},{value:"netlength",label:"Net Length (HPWL)"}];function fke(d,s,h,g){if(!d||!s||gs.bottom)return null;for(let m of d)if(h>=m.x&&h<=m.x+m.width)return m;return null}function dke(d,s,h){return h?Math.log10(d+1)/Math.log10(s+1):d/s}function pke(d,s,h,g={}){let m=!!g.logY,_=d?.bins;if(!_||_.length===0)return{bars:[],yMax:0,yTicks:[],chartArea:null,logY:m};let S=MJt,y=s-EJt,R=SJt,N=h-TJt,B=y-S,P=N-R;if(B<=0||P<=0)return{bars:[],yMax:0,yTicks:[],chartArea:null,logY:m};let U={left:S,right:y,top:R,bottom:N},W=0;for(let gt of _)gt.count>W&&(W=gt.count);W===0&&(W=1);let{yMax:q,yTicks:nt}=m?mke(W):gke(W),Q=(B-xJt*(_.length-1))/_.length,X=[];for(let gt=0;gt<_.length;gt++){let ft=_[gt],xt=dke(ft.count,q,m)*P;X.push({x:S+gt*(Q+xJt),y:N-xt,width:Q,height:xt,count:ft.count,lower:ft.lower,upper:ft.upper,negative:ft.negative})}return{bars:X,yMax:q,yTicks:nt,chartArea:U,logY:m}}function gke(d){if(d<=10){let N=[];for(let B=0;B<=d;B++)N.push(B);return{yMax:d,yTicks:N}}let h=d/8,g=Math.pow(10,Math.floor(Math.log10(h))),m=h/g,_;m<1.5?_=1:m<3?_=2:m<7?_=5:_=10;let S=_*g,y=Math.ceil(d/S)*S,R=[];for(let N=0;N<=y+S/2;N+=S)R.push(N);return{yMax:y,yTicks:R}}function mke(d){let s=Math.max(1,Math.pow(10,Math.ceil(Math.log10(Math.max(1,d+1))))),h=[0];for(let g=1;g<=s+.5;g*=10)h.push(g);return{yMax:s,yTicks:h}}function bke(d,s){if(!s)return"";if(d==="generic"){let y=["x",...s.y_labels||[]].join(","),R=(s.points||[]).map(N=>[N.x,...N.ys||[]].join(","));return[y,...R].join(` -`)}let h=s.bins||[],g=Array.isArray(s.series)?s.series:[],m=["lower","upper","count",...g.map(S=>S.name||"group")].join(","),_=h.map((S,y)=>{let R=[S.lower,S.upper,S.count];for(let N of g)R.push(N.counts&&N.counts[y]||0);return R.join(",")});return[m,..._].join(` -`)}var Qet=class{constructor(s,h){this._app=s,this._redrawAllLayers=h,this._currentTab="setup",this._histogramData=null,this._bars=[],this._yMax=0,this._yTicks=[],this._chartArea=null,this._hoveredBar=null,this._debugCharts=[],this._activeDebugChart=-1,this._build()}_build(){let s=document.createElement("div");s.className="charts-widget";let h=document.createElement("div");h.className="charts-toolbar",this._updateBtn=document.createElement("button"),this._updateBtn.className="or-btn",this._updateBtn.textContent="Update",Sc(this._app)&&(this._updateBtn.style.display="none"),this._chartSelect=document.createElement("select"),this._chartSelect.className="charts-select",this._csvBtn=document.createElement("button"),this._csvBtn.className="or-btn",this._csvBtn.textContent="CSV",this._csvBtn.title="Export the current chart data as CSV",this._pngBtn=document.createElement("button"),this._pngBtn.className="or-btn",this._pngBtn.textContent="PNG",this._pngBtn.title="Export the current chart as a PNG image",this._statusLabel=document.createElement("span"),this._statusLabel.className="timing-path-count",h.appendChild(this._updateBtn),h.appendChild(this._chartSelect),h.appendChild(this._csvBtn),h.appendChild(this._pngBtn),h.appendChild(this._statusLabel),s.appendChild(h);let g=document.createElement("div");g.className="charts-toolbar";let m=document.createElement("span");m.textContent="Path Groups:",m.style.color="var(--fg-muted)",m.style.fontSize="var(--fs-12)",this._pathGroupSelect=document.createElement("select"),this._pathGroupSelect.className="charts-select",this._pathGroupSelect.multiple=!0,this._pathGroupSelect.size=1,this._pathGroupSelect.title="Select 0 = all, or \u22651 to stack by group";let _=document.createElement("span");_.textContent="Clock:",_.style.color="var(--fg-muted)",_.style.fontSize="var(--fs-12)",this._clockSelect=document.createElement("select"),this._clockSelect.className="charts-select",this._clockSelect.innerHTML='',g.appendChild(m),g.appendChild(this._pathGroupSelect),g.appendChild(_),g.appendChild(this._clockSelect),s.appendChild(g),this._canvas=document.createElement("canvas"),this._canvas.className="charts-canvas",s.appendChild(this._canvas),this._tooltip=document.createElement("div"),this._tooltip.className="or-tooltip",this._tooltip.style.display="none",s.appendChild(this._tooltip),this._filterRow=g,this.element=s,this._ctx=this._canvas.getContext("2d"),this._rebuildSelect(),this._bindEvents(),Sc(this._app)&&setTimeout(()=>this.update(),0)}_bindEvents(){this._updateBtn.addEventListener("click",()=>this.update()),this._chartSelect.addEventListener("change",()=>this._onSelectChange()),this._csvBtn.addEventListener("click",()=>this._exportCsv()),this._pngBtn.addEventListener("click",()=>this._exportPng()),this._pathGroupSelect.addEventListener("change",()=>this._fetchHistogram()),this._clockSelect.addEventListener("change",()=>this._fetchHistogram()),this._canvas.addEventListener("mousemove",h=>this._handleHover(h)),this._canvas.addEventListener("mouseleave",()=>{this._hoveredBar=null,this._tooltip.style.display="none",this._syncView()}),this._canvas.addEventListener("click",h=>this._handleClick(h)),this._canvas.addEventListener("dblclick",h=>this._handleDblClick(h)),new ResizeObserver(()=>this._syncView()).observe(this._canvas)}_sizeCanvas(){let s=this._canvas.getBoundingClientRect(),h=window.devicePixelRatio||1;this._canvas.width=s.width*h,this._canvas.height=s.height*h,this._ctx.setTransform(h,0,0,h,0,0)}_rebuildSelect(){let s=this._chartSelect;s.innerHTML="";for(let h of hke){let g=document.createElement("option");g.value=h.value,g.textContent=h.label,s.appendChild(g)}this._debugCharts.forEach((h,g)=>{let m=document.createElement("option");m.value="gen:"+g,m.textContent=h.name||"Chart "+g,s.appendChild(m)}),s.value=this._activeDebugChart>=0?"gen:"+this._activeDebugChart:this._currentTab}_onSelectChange(){let s=this._chartSelect.value;s.startsWith("gen:")?(this._activeDebugChart=parseInt(s.slice(4),10)||0,this._hoveredBar=null,this._tooltip.style.display="none",this._syncView()):this._selectTab(s)}async update(){this._updateBtn.disabled=!0,this._updateBtn.textContent="Loading...",this._statusLabel.textContent="";try{this._activeDebugChart<0?((this._currentTab==="setup"||this._currentTab==="hold")&&await this._fetchFilters(),await Promise.all([this._fetchHistogram(),this._fetchGenericCharts()])):await this._fetchGenericCharts()}catch(s){this._statusLabel.textContent="Error: "+s.message}this._updateBtn.disabled=!1,this._updateBtn.textContent="Update"}async _fetchFilters(){let s=await this._app.websocketManager.request({type:"chart_filters"});this._populatePathGroups(s.path_groups||[]),this._populateClocks(s.clocks||[])}_populatePathGroups(s){let h=new Set(Array.from(this._pathGroupSelect.selectedOptions,g=>g.value));this._pathGroupSelect.innerHTML="";for(let g of s){let m=document.createElement("option");m.value=g,m.textContent=g,m.selected=h.has(g),this._pathGroupSelect.appendChild(m)}}_populateClocks(s){let h=this._clockSelect.value;this._clockSelect.innerHTML='';for(let g of s){let m=document.createElement("option");m.value=g,m.textContent=g,this._clockSelect.appendChild(m)}s.includes(h)&&(this._clockSelect.value=h)}async _fetchGenericCharts(){try{let s=await this._app.websocketManager.request({type:"debug_charts"});this.setDebugCharts(s.charts||[])}catch{}}async _fetchHistogram(){try{let s=this._currentTab,h;if(s==="fanout")h={type:"fanout_histogram"};else if(s==="netlength")h={type:"net_length_histogram",use_dbu:!!this._app.showDbu};else{h={type:"slack_histogram",is_setup:s==="setup"};let m=Array.from(this._pathGroupSelect.selectedOptions,_=>_.value).filter(Boolean);m.length>0&&(h.path_groups=m),this._clockSelect.value&&(h.clock_name=this._clockSelect.value)}let g=await this._app.websocketManager.request(h);if(this._currentTab!==s)return;if(this._histogramData=g,this._syncView(),s==="fanout"||s==="netlength"){let m=g.total_nets||0;this._statusLabel.textContent=`${m} nets`}else{let m=g.total_endpoints||0,_=g.unconstrained_count||0,S=m-_;this._statusLabel.textContent=`${S} endpoints`+(_>0?`, ${_} unconstrained`:"")}}catch(s){this._statusLabel.textContent="Error: "+s.message}}_selectTab(s){this._currentTab===s&&this._activeDebugChart<0||(this._currentTab=s,this._activeDebugChart=-1,this._chartSelect&&(this._chartSelect.value=s),this._filterRow.style.display=s==="setup"||s==="hold"?"":"none",this._hoveredBar=null,this._tooltip.style.display="none",this.update())}_computeLayout(){if(!this._histogramData)return;let s=this._canvas.getBoundingClientRect(),h=pke(this._histogramData,s.width,s.height,{logY:this._currentTab==="fanout"});this._bars=h.bars,this._yMax=h.yMax,this._yTicks=h.yTicks,this._chartArea=h.chartArea,this._logY=!!h.logY}render(){this._syncView()}_stackedSeries(){let s=this._histogramData?.series;return Array.isArray(s)&&s.length>1?s:null}_render(){let s=this._canvas.getBoundingClientRect(),h=s.width,g=s.height,m=this._ctx,_=uk();if(m.clearRect(0,0,h,g),m.fillStyle=_.canvasBg,m.fillRect(0,0,h,g),!this._bars||this._bars.length===0){m.fillStyle=_.canvasText,m.font="14px "+_.fontSans,m.textAlign="center",m.textBaseline="middle";let S=Sc(this._app)?"No histogram data available":'Click "Update" to load histogram';m.fillText(S,h/2,g/2);return}this._drawAxes(m,_),this._drawBars(m),this._drawTitle(m,h,_),this._stackedSeries()&&this._drawSeriesLegend(m,_)}_drawAxes(s,h){let g=this._chartArea;if(!g)return;s.strokeStyle=h.canvasAxis,s.lineWidth=1,s.beginPath(),s.moveTo(g.left,g.top),s.lineTo(g.left,g.bottom),s.stroke(),s.beginPath(),s.moveTo(g.left,g.bottom),s.lineTo(g.right,g.bottom),s.stroke(),s.fillStyle=h.canvasLabel,s.font="11px "+h.fontMono,s.textAlign="right",s.textBaseline="middle";let m=g.bottom-g.top;for(let U of this._yTicks){let W=this._logY?Math.log10(U+1)/Math.log10(this._yMax+1):U/this._yMax,q=g.bottom-W*m;s.fillText(this._formatCount(U),g.left-6,q),U>0&&(s.strokeStyle=h.canvasGrid,s.beginPath(),s.moveTo(g.left,q),s.lineTo(g.right,q),s.stroke(),s.strokeStyle=h.canvasAxis)}let _=this._currentTab,S=_==="fanout"||_==="netlength";s.save(),s.translate(14,(g.top+g.bottom)/2),s.rotate(-Math.PI/2),s.textAlign="center",s.textBaseline="middle",s.fillStyle=h.canvasTitle,s.font="11px "+h.fontMono,s.fillText(this._logY?"Nets (log)":S?"Nets":"Endpoints",0,0),s.restore(),s.textAlign="center",s.textBaseline="top",s.fillStyle=h.canvasLabel,s.font="10px "+h.fontMono;let y=this._histogramData.bins,R=this._histogramData.time_unit||this._histogramData.length_unit||"",N=y.length>0?y[0].upper-y[0].lower:1,B=_==="fanout"?0:Math.max(0,-Math.floor(Math.log10(N)));for(let U=0;U<=this._bars.length;U++){let W=U=0){this._hoveredBar=null,this._tooltip.style.display="none";return}let h=this._hitTestBar(s);if(h!==this._hoveredBar&&(this._hoveredBar=h,this._render()),h){let g=this._currentTab,m=h.upper-h.lower;if(g==="fanout"){let U=h.upper-1,W=h.lower===U?`${h.lower}`:`[${h.lower}, ${U}]`;this._tooltip.textContent=`Nets: ${h.count} -Fanout: ${W}`}else if(g==="netlength"){let U=this._histogramData?.length_unit||"",W=Math.max(0,-Math.floor(Math.log10(m)));this._tooltip.textContent=`Nets: ${h.count} -Length: [${h.lower.toFixed(W)}, ${h.upper.toFixed(W)}) ${U}`}else{let U=this._histogramData?.time_unit||"",W=Math.max(0,-Math.floor(Math.log10(m)));this._tooltip.textContent=`Endpoints: ${h.count} -Slack: [${h.lower.toFixed(W)}, ${h.upper.toFixed(W)}) ${U}`}this._tooltip.style.display="block";let _=this.element.getBoundingClientRect(),S=this._tooltip.getBoundingClientRect(),y=4,R=s.clientX-_.left,N=s.clientY-_.top,B=R+12;B+S.width>_.width-y&&(B=R-12-S.width),B=Math.max(y,B);let P=N-10;P=Math.min(_.height-S.height-y,Math.max(y,P)),this._tooltip.style.left=B+"px",this._tooltip.style.top=P+"px"}else this._tooltip.style.display="none"}async _handleClick(s){if(this._activeDebugChart>=0||this._currentTab==="fanout"||this._currentTab==="netlength")return;let h=this._hitTestBar(s);if(!(!h||h.count===0))try{let g=await this._app.websocketManager.request({type:"timing_report",is_setup:this._currentTab==="setup",max_paths:50,slack_min:h.lower,slack_max:h.upper});this._app.timingWidget&&(this._app.timingWidget.showPaths(this._currentTab,g.paths||[]),this._app.focusComponent&&this._app.focusComponent("TimingWidget"))}catch(g){console.error("Charts bar click error:",g)}}async _handleDblClick(s){if(this._activeDebugChart>=0)return;let h;if(this._currentTab==="fanout")h="select_fanout_bin";else if(this._currentTab==="netlength")h="select_net_length_bin";else return;let g=this._hitTestBar(s);if(!g||g.count===0)return;let m=wg(this._app);try{let _=await this._app.websocketManager.request({type:h,lower:g.lower,upper:g.upper,use_dbu:this._app.showDbu});if(!B0(this._app,m))return;_&&_.truncated&&console.warn(`Bin has ${_.count} nets; selection capped at ${_.selection_limit} for performance.`),this._app.updateInspector&&this._app.updateInspector(_),this._app.focusComponent&&this._app.focusComponent("Inspector"),this._redrawAllLayers&&this._redrawAllLayers()}catch(_){console.error("Net bin select failed:",_)}}_activeChartData(){return this._activeDebugChart>=0?{kind:"generic",data:this._debugCharts[this._activeDebugChart]}:{kind:"histogram",data:this._histogramData}}_chartBaseName(){return this._activeDebugChart>=0?this._debugCharts[this._activeDebugChart].name||"chart":this._currentTab}_triggerDownload(s,h,{revoke:g=!1}={}){let m=document.createElement("a");m.href=h,m.download=s,document.body.appendChild(m),m.click(),m.remove(),g&&URL.revokeObjectURL(h)}_download(s,h,g){try{let m=URL.createObjectURL(new Blob([g],{type:h}));this._triggerDownload(s,m,{revoke:!0})}catch(m){console.error("Download failed:",m)}}_exportCsv(){let{kind:s,data:h}=this._activeChartData();if(!h)return;let g=bke(s,h);this._download(this._chartBaseName()+".csv","text/csv",g)}_exportPng(){try{let s=this._canvas.toDataURL("image/png");this._triggerDownload(this._chartBaseName()+".png",s)}catch(s){console.error("PNG export failed:",s)}}setDebugCharts(s){this._debugCharts=s,s.length===0?this._activeDebugChart=-1:this._activeDebugChart>=s.length&&(this._activeDebugChart=0),this._rebuildSelect(),this._syncView()}_syncView(){let s=this._activeDebugChart>=0;s&&(this._hoveredBar=null,this._tooltip.style.display="none");let h=!s&&(this._currentTab==="setup"||this._currentTab==="hold");this._filterRow&&(this._filterRow.style.display=h?"":"none"),this._sizeCanvas(),s?this._renderLineChart(this._debugCharts[this._activeDebugChart]):(this._computeLayout(),this._render())}_renderLineChart(s){let h=this._canvas.getBoundingClientRect(),g=h.width,m=h.height,_=this._ctx,S=uk();_.clearRect(0,0,g,m),_.fillStyle=S.canvasBg,_.fillRect(0,0,g,m);let y=s.points;if(!y||y.length===0){_.fillStyle=S.canvasText,_.font="14px "+S.fontSans,_.textAlign="center",_.textBaseline="middle",_.fillText("No data points yet",g/2,m/2);return}let R=s.y_labels?s.y_labels.length:1,N=MJt,B=g-EJt,P=SJt,U=m-TJt,W=B-N,q=U-P;if(W<=0||q<=0)return;let nt=y[0].x,Q=y[0].x,X=1/0,gt=-1/0;for(let Pt of y){Pt.xQ&&(Q=Pt.x);for(let se of Pt.ys)segt&&(gt=se)}nt===Q&&(Q=nt+1),(!isFinite(X)||!isFinite(gt))&&(X=0,gt=1);let ft=(gt-X)*.05||1;X-=ft,gt+=ft;let xt=Pt=>N+(Pt-nt)/(Q-nt)*W,Bt=Pt=>U-(Pt-X)/(gt-X)*q;_.strokeStyle=S.canvasAxis,_.lineWidth=1,_.beginPath(),_.moveTo(N,P),_.lineTo(N,U),_.lineTo(B,U),_.stroke(),_.fillStyle=S.canvasLabel,_.font="10px "+S.fontMono,_.textAlign="right",_.textBaseline="middle";let Ot=5;for(let Pt=0;Pt<=Ot;Pt++){let se=X+(gt-X)*Pt/Ot,ot=Bt(se);_.fillText(this._formatNum(se),N-4,ot),Pt>0&&Pt1&&s.y_labels){_.font="10px "+S.fontMono,_.textAlign="left",_.textBaseline="top";let Pt=N+8,se=P+4;for(let ot=0;ot=1e6?(s/1e6).toFixed(1)+"M":h>=1e3?(s/1e3).toFixed(1)+"k":h>=1?s.toFixed(1):s.toPrecision(3)}_formatCount(s){return s===0?"0":s>=1e6?s/1e6+"M":s>=1e3?s/1e3+"k":String(s)}};var nv=class{constructor(s){this.onChange=s,this.roots=[],this._nodeMap=new Map}addFromSpec(s,h=null){let g=this._makeNode(s.id,h,s);if(g.checked=s.checked!==!1,s.children){for(let m of s.children)g.children.push(this.addFromSpec(m,g));g.hasCheckbox&&this._computeParent(g)}return h||this.roots.push(g),g}buildFromNodes(s){this._nodeMap.clear(),this.roots=[];for(let h of s)this._makeNode(h.id,null,h);for(let h of s){let g=this._nodeMap.get(h.id);if(h.parentId!=null&&this._nodeMap.has(h.parentId)){let m=this._nodeMap.get(h.parentId);g.parent=m,m.children.push(g)}else this.roots.push(g)}for(let h=s.length-1;h>=0;h--){let g=this._nodeMap.get(s[h].id);g.hasCheckbox&&g.children.length>0&&this._computeParent(g)}return this.roots}get(s){return this._nodeMap.get(s)}isVisible(s){let h=this.get(s);return h?h.checked:!1}check(s,h){let g=this._nodeMap.get(s);if(g){g.checked=h,g.indeterminate=!1;for(let m of g.children)this._setSubtree(m,h);for(let m=g.parent;m;m=m.parent)m.hasCheckbox&&this._computeParent(m);this.onChange()}}cascadeQuiet(s,h){let g=this._nodeMap.get(s);if(g){g.checked=h,g.indeterminate=!1;for(let m of g.children)this._setSubtree(m,h);for(let m=g.parent;m;m=m.parent)m.hasCheckbox&&this._computeParent(m)}}checkSet(s){for(let[h,g]of Object.entries(s)){let m=this._nodeMap.get(h);m&&(m.checked=g,m.indeterminate=!1)}this._recomputeAllParents(),this.onChange()}mirrorStates(s){this._applyMirror(s),this.onChange()}mirrorStatesQuiet(s){this._applyMirror(s)}_applyMirror(s){for(let[h,g]of Object.entries(s)){let m=this._nodeMap.get(h);m&&(m.checked=!!g.checked,m.indeterminate=!!g.indeterminate)}}forEach(s){let h=g=>{s(g);for(let m of g.children)h(m)};for(let g of this.roots)h(g)}_makeNode(s,h,g){let m={id:s,parent:h,children:[],hasCheckbox:g.hasCheckbox!==!1,checked:g.checked!==!1,indeterminate:!1,data:g.data!=null?g.data:g};return this._nodeMap.set(s,m),m}_checkboxDescendants(s){let h=[];for(let g of s.children)g.hasCheckbox?h.push(g):h.push(...this._checkboxDescendants(g));return h}_computeParent(s){let h=this._checkboxDescendants(s);if(h.length===0)return;let g=h.every(_=>_.checked&&!_.indeterminate),m=h.every(_=>!_.checked&&!_.indeterminate);s.checked=g,s.indeterminate=!g&&!m}_setSubtree(s,h){s.hasCheckbox&&(s.checked=h,s.indeterminate=!1);for(let g of s.children)this._setSubtree(g,h)}_recomputeAllParents(){let s=h=>{for(let g of h.children)s(g);h.hasCheckbox&&h.children.length>0&&this._computeParent(h)};for(let h of this.roots)s(h)}};var CJt=["Instance","Module","Instances","Macros","Modules","Area","Local Inst","Local Macros","Local Modules"],pS={MODULE:0,LEAF_GROUP:1,TYPE_GROUP:2,INSTANCE:3,NAME_GROUP:4};function hk(d){return d===pS.MODULE||d===pS.NAME_GROUP}var tnt=class{constructor(s,h,g){this._app=h,this._redrawAllLayers=g,this._nodes=[],this._nameGrouped=!1,this._nameGroupsCapped=!1,this._rows=[],this._childrenMap=new Map,this._collapsed=new Set,this._moduleState=new Map,this._checkModel=null,this._build(s),h.hierarchyBrowser=this,Sc(h)&&this.update()}_build(s){let h=document.createElement("div");h.className="hierarchy-widget";let g=document.createElement("div");g.className="timing-toolbar",this._updateBtn=document.createElement("button"),this._updateBtn.className="or-btn",this._updateBtn.textContent="Update",Sc(this._app)&&(this._updateBtn.style.display="none"),this._statusLabel=document.createElement("span"),this._statusLabel.className="timing-path-count",g.appendChild(this._updateBtn),g.appendChild(this._statusLabel),h.appendChild(g),this._tableContainer=document.createElement("div"),this._tableContainer.className="hierarchy-table-container",this._table=document.createElement("table"),this._table.className="timing-table",this._tableContainer.appendChild(this._table),h.appendChild(this._tableContainer),s.element.appendChild(h),this._bindEvents()}_bindEvents(){this._updateBtn.addEventListener("click",()=>this.update())}async update(){this._updateBtn.disabled=!0,this._updateBtn.textContent="Loading...",this._statusLabel.textContent="";try{let s=await this._app.websocketManager.request({type:"module_hierarchy"});this._nodes=s.nodes||[],this._nameGrouped=!!s.name_grouped,this._nameGroupsCapped=!!s.name_groups_capped,this._buildTree(),this._readServerColors(),this._computeEffectiveColors(),this._render(),this._statusLabel.textContent=this._statusText(),await this._sendModuleColors()}catch(s){this._statusLabel.textContent="Error: "+s.message}this._updateBtn.disabled=!1,this._updateBtn.textContent="Update"}_statusText(){let s=this._nodes.filter(m=>hk(m.node_kind||0)).length;if(!this._nameGrouped)return s+" modules";let g=Math.max(0,s-1)+" groups from instance names \u2014 this design has no module hierarchy";return this._nameGroupsCapped&&(g+=" (truncated: too many groups)"),g}_buildTree(){this._childrenMap.clear(),this._collapsed.clear();for(let h of this._nodes)this._childrenMap.set(h.id,[]);for(let h of this._nodes)h.parent_id>=0&&this._childrenMap.has(h.parent_id)&&this._childrenMap.get(h.parent_id).push(h.id);this._nodeMap=new Map;for(let h of this._nodes)this._nodeMap.set(h.id,h);for(let h of this._nodes){let g=this._childrenMap.get(h.id);if(!g||g.length===0)continue;let m=h.node_kind||0;m===pS.LEAF_GROUP||m===pS.TYPE_GROUP?this._collapsed.add(h.id):hk(m)&&h.parent_id>=0&&this._collapsed.add(h.id)}this._rows=[];let s=this._nodes.filter(h=>h.parent_id<0);for(let h of s)this._dfs(h.id,0);this._checkModel=new nv(()=>{this._checkModel.forEach(h=>{if(!h.hasCheckbox)return;let g=this._moduleState.get(h.data.odb_id);g&&(g.visible=h.checked)}),this._sendModuleColors()}),this._checkModel.buildFromNodes(this._nodes.map(h=>({id:h.id,parentId:h.parent_id,hasCheckbox:hk(h.node_kind||0)&&h.odb_id!=null,checked:!0,data:h})))}_readServerColors(){this._moduleState.clear();for(let s of this._rows){let h=this._nodeMap.get(s.id);if(!h||!hk(h.node_kind||0)||h.odb_id==null)continue;let g=h.color||[128,128,128];this._moduleState.set(h.odb_id,{color:g,effectiveColor:g,visible:!0,nodeId:h.id})}}_computeEffectiveColors(){for(let s of this._rows){let h=this._nodeMap.get(s.id);if(!h||!hk(h.node_kind||0))continue;let g=this._moduleState.get(h.odb_id);if(!g)continue;let m=h.parent_id,_=null;for(;m>=0;){let S=this._nodeMap.get(m);if(!S)break;if(hk(S.node_kind||0)){let y=this._moduleState.get(S.odb_id);y&&this._collapsed.has(S.id)&&(_=y.effectiveColor)}m=S.parent_id}g.effectiveColor=_||g.color}}async _sendModuleColors(){let s=[];for(let[g,m]of this._moduleState){if(!m.visible)continue;let[_,S,y]=m.effectiveColor;s.push(`${g}:${_},${S},${y},100`)}let h=s.join(";");try{let g=await this._app.websocketManager.request({type:"set_module_colors",colors:h});console.log("set_module_colors:",g.count,"modules,",s.length,"sent")}catch(g){console.error("set_module_colors failed:",g)}this._redrawAllLayers()}_dfs(s,h){this._rows.push({id:s,depth:h});let g=this._childrenMap.get(s)||[];for(let m of g)this._dfs(m,h+1)}_render(){this._table.innerHTML="";let s=document.createElement("thead"),h=document.createElement("tr");for(let m of CJt){let _=document.createElement("th");_.textContent=m,h.appendChild(_)}s.appendChild(h),this._table.appendChild(s);let g=document.createElement("tbody");for(let m of this._rows){let _=this._nodeMap.get(m.id);if(!_||this._isHidden(_))continue;let S=document.createElement("tr"),y=_.node_kind||0,N=(this._childrenMap.get(m.id)||[]).length>0,B=this._collapsed.has(m.id);y===pS.LEAF_GROUP||y===pS.TYPE_GROUP?(S.style.fontStyle="italic",S.style.color="var(--fg-disabled)"):y===pS.INSTANCE?S.style.color="var(--fg-secondary)":y===pS.NAME_GROUP&&(S.classList.add("hierarchy-name-group"),S.title="Recovered from instance names \u2014 this design has no module hierarchy");let P=document.createElement("td");if(P.style.paddingLeft=8+m.depth*16+"px",P.style.whiteSpace="nowrap",hk(y)&&_.odb_id!=null){let q=this._moduleState.get(_.odb_id),nt=this._checkModel?this._checkModel.get(_.id):null;if(q&&nt){let Q=document.createElement("input");Q.type="checkbox",Q.checked=nt.checked,Q.indeterminate=nt.indeterminate,Q.className="hierarchy-module-cb",nt.cb=Q,Q.addEventListener("change",Bt=>{Bt.stopPropagation(),this._checkModel.check(_.id,Q.checked),this._render()}),P.appendChild(Q);let X=document.createElement("span");X.className="hierarchy-color-swatch";let[gt,ft,xt]=q.effectiveColor;X.style.backgroundColor=`rgb(${gt},${ft},${xt})`,P.appendChild(X)}}if(N){let q=document.createElement("span");q.className="hierarchy-arrow",q.textContent=B?"\u25B6":"\u25BC",q.addEventListener("click",nt=>{nt.stopPropagation(),this._toggleNode(m.id)}),P.appendChild(q)}else{let q=document.createElement("span");q.className="hierarchy-arrow",q.style.visibility="hidden",q.textContent="\u25B6",P.appendChild(q)}let U=document.createElement("span");U.textContent=_.inst_name,P.appendChild(U),S.appendChild(P);let W=[_.module_name,bR(_.insts),bR(_.macros),bR(_.modules),this._fmtArea(_.area),bR(_.local_insts),bR(_.local_macros),bR(_.local_modules)];for(let q of W){let nt=document.createElement("td");nt.textContent=q,nt.style.textAlign="right",S.appendChild(nt)}S.children[1].style.textAlign="left",g.appendChild(S)}if(this._rows.length===0){let m=document.createElement("tr"),_=document.createElement("td");_.colSpan=CJt.length,_.style.textAlign="center",_.style.color="var(--fg-secondary)",_.textContent=Sc(this._app)?"No hierarchy data available":'Click "Update" to load hierarchy',m.appendChild(_),g.appendChild(m)}this._table.appendChild(g),ok(this._table)}_isHidden(s){let h=s.parent_id;for(;h>=0;){if(this._collapsed.has(h))return!0;let g=this._nodeMap.get(h);if(!g)break;h=g.parent_id}return!1}_toggleNode(s){this._collapsed.has(s)?this._collapsed.delete(s):this._collapsed.add(s),this._computeEffectiveColors(),this._render(),this._sendModuleColors()}_fmtArea(s){if(s==null)return"";if(this._app.showDbu){let h=this._app.getDbuPerMicron();return String(Math.round(s*h*h))}return s>=1e6?(s/1e6).toFixed(3)+" mm\xB2":s.toFixed(3)+" \u03BCm\xB2"}};function bR(d){return d!=null?String(d):""}var wke='',vke='',_ke='',yke='',xke='',Mke='',Eke='',Ske='',Tke='',Cke='',Ake='',kke='';function AJt(d,s,h){h=h||s;let g=null,m=null,_=null,S=!1,y=10;function R(Kt,wn){return S?Promise.resolve():(S=!0,d.websocketManager.request({type:"set_property",name:Kt,use_dbu:d.showDbu,...wn}).then(it=>{!it.ok&&it.error&&ev(it.error),ki(it),it.ok&&it.bbox&&ln(it.bbox)}).catch(it=>{console.error("set_property failed:",it),ev("Edit failed: "+it),g&&ki(g)}).finally(()=>{S=!1}))}function N(Kt,wn){let it=document.createElement("select");it.className="inspector-editor-select";let ut=Kt.editor.type==="bool"?["True","False"]:Kt.editor.options||[];for(let kt of ut){let Nt=document.createElement("option");Nt.value=kt,Nt.textContent=kt,kt===Kt.value&&(Nt.selected=!0),it.appendChild(Nt)}if(!ut.includes(Kt.value)){let kt=document.createElement("option");kt.value=Kt.value||"",kt.textContent=Kt.value||"",kt.selected=!0,kt.disabled=!0,it.insertBefore(kt,it.firstChild)}return it.addEventListener("change",()=>{if(wn.onPropertyChange){wn.onPropertyChange(Kt.name,it.value);return}if(Kt.editor.type==="bool")wn.onPropertyEdit(Kt,{value:it.value==="True"});else{let kt=(Kt.editor.options||[]).indexOf(it.value);wn.onPropertyEdit(Kt,{option_index:kt,option_name:it.value})}}),it}async function B(Kt,wn){if(!S&&!(Kt==="Delete"&&!await iJt({title:"Delete "+(wn.type||"object"),message:"Delete "+(wn.type||"object")+' "'+(wn.name||"")+'"? This cannot be undone.',confirmLabel:"Delete",danger:!0}))){S=!0;try{let it=await d.websocketManager.request({type:"trigger_action",name:Kt,use_dbu:d.showDbu});!it.ok&&it.error&&ev(it.error),ki(it.properties?it:null),it.deleted&&d.highlightRect&&d.map&&(d.map.removeLayer(d.highlightRect),d.highlightRect=null),gt(),h()}catch(it){console.error("trigger_action failed:",it),ev("Action failed: "+it)}finally{S=!1}}}function P(Kt){d.websocketManager.request({...Kt,use_dbu:d.showDbu}).then(wn=>{!wn.ok&&wn.error&&ev(wn.error),ki(wn),h()}).catch(wn=>{console.error(Kt.type+" failed:",wn)})}function U(){let Kt=document.getElementById("highlight-picker");Kt&&Kt.remove()}function W(Kt,wn){U();let it=d.techData?.highlight_colors||[];if(!it.length)return;let ut=document.createElement("div");ut.id="highlight-picker";let kt=document.createElement("div");if(kt.className="highlight-swatch-grid",it.forEach((rn,Pn)=>{let Tt=document.createElement("button");Tt.className="highlight-swatch",Tt.title="Group "+(Pn+1),Tt.style.backgroundColor=`rgb(${rn[0]}, ${rn[1]}, ${rn[2]})`,Pn===wn.highlight_group&&Tt.classList.add("active"),Tt.addEventListener("click",()=>{U(),P({type:"highlight",group:Pn})}),kt.appendChild(Tt)}),ut.appendChild(kt),wn.highlight_group>=0){let rn=document.createElement("button");rn.className="highlight-remove",rn.textContent="Remove highlight",rn.addEventListener("click",()=>{U(),P({type:"unhighlight"})}),ut.appendChild(rn)}document.body.appendChild(ut);let Nt=Kt.getBoundingClientRect();ut.style.left=Nt.left+"px",ut.style.top=Nt.bottom+4+"px";let ie=rn=>{rn.type==="keydown"&&rn.key!=="Escape"||rn.type==="mousedown"&&ut.contains(rn.target)||(U(),document.removeEventListener("mousedown",ie,!0),document.removeEventListener("keydown",ie,!0))};setTimeout(()=>{document.addEventListener("mousedown",ie,!0),document.addEventListener("keydown",ie,!0)},0)}function q(){if(!d.inspectorEl)return;d.inspectorEl.innerHTML="";let Kt=document.createElement("div");Kt.className="stub-panel",Kt.innerHTML='
Loading\u2026
Fetching properties from server.
',d.inspectorEl.appendChild(Kt)}async function nt(Kt){let wn=d.focusNets.has(Kt)?"remove":"add";wn==="add"?d.focusNets.add(Kt):d.focusNets.delete(Kt);try{await d.websocketManager.request({type:"set_focus_nets",action:wn,net_name:Kt})}catch(it){console.error("set_focus_nets failed:",it)}s(),g&&ki(g)}async function Q(){d.focusNets.clear();try{await d.websocketManager.request({type:"set_focus_nets",action:"clear",net_name:""})}catch(Kt){console.error("set_focus_nets clear failed:",Kt)}s(),g&&ki(g)}async function X(Kt){let wn=d.routeGuideNets.has(Kt)?"remove":"add";wn==="add"?d.routeGuideNets.add(Kt):d.routeGuideNets.delete(Kt);try{await d.websocketManager.request({type:"set_route_guides",action:wn,net_name:Kt})}catch(it){console.error("set_route_guides failed:",it)}h(),g&&ki(g)}function gt(){d.hoverHighlightLayer&&(d.map.removeLayer(d.hoverHighlightLayer),d.hoverHighlightLayer=null)}function ft(){gt(),d.websocketManager.request({type:"hover",select_id:-1}).then(()=>{}).catch(()=>{})}function xt(Kt,wn,it,ut){let kt=L.latLngBounds(Vf(Kt,wn,it,ut,d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY));if(!d.map)return kt;let Nt=kt.getSouthWest(),ie=kt.getNorthEast(),rn=d.map.latLngToContainerPoint(Nt),Pn=d.map.latLngToContainerPoint(ie),Tt=Math.min(rn.x,Pn.x),yt=Math.max(rn.x,Pn.x),ue=Math.min(rn.y,Pn.y),fn=Math.max(rn.y,Pn.y),An=Tt,zn=yt,Li=ue,xi=fn;if(yt-TtL.rectangle(xt(wn,it,ut,kt),{color:"#ffe85c",weight:3,fill:!0,fillColor:"#fff27a",fillOpacity:.14,opacity:1,interactive:!1,className:"hover-highlight",pane:d.hoverHighlightPane}))).addTo(d.map))}function Ot(Kt,wn){Kt.classList.add("inspector-link"),Kt.addEventListener("click",it=>{it.stopPropagation(),se(wn)}),Kt.addEventListener("mouseenter",()=>{_!==null&&(d.websocketManager.cancel(_),_=null);let it=d.websocketManager.request({type:"hover",select_id:wn});_=it.requestId,it.then(ut=>{_=null,Bt(ut.rects||[]),h()}).catch(()=>{_=null})}),Kt.addEventListener("mouseleave",()=>{ft(),h()})}function Pt(Kt){let wn=Kt>0?"select_next":"select_prev";m!==null&&(d.websocketManager.cancel(m),m=null),q();let it=wg(d),ut=d.websocketManager.request({type:wn,use_dbu:d.showDbu});m=ut.requestId,ut.then(kt=>{if(m=null,!!B0(d,it)){if(kt.error){console.error("Selection cycle error:",kt.error),ki(g);return}if(ki(kt),kt.type==="Inst"&&kt.name&&(d.selectedInstanceName=kt.name,d.schematicWidget&&d.schematicWidget.refresh()),d.map&&d.map.closePopup(),gt(),d.highlightRect&&d.map&&(d.map.removeLayer(d.highlightRect),d.highlightRect=null),kt.bbox&&d.map&&d.designScale){let[Nt,ie,rn,Pn]=kt.bbox;kt.type!=="Inst"&&Lt(Nt,ie,rn,Pn,kt.type),kt.selection_count>1?re(kt.bbox):ln(kt.bbox,kt.type)}s()}}).catch(kt=>{m=null,console.error("Selection cycle failed:",kt),ki(g)})}function se(Kt){m!==null&&(d.websocketManager.cancel(m),m=null),q();let wn=wg(d),it=d.websocketManager.request({type:"inspect",select_id:Kt,use_dbu:d.showDbu});m=it.requestId,it.then(ut=>{if(m=null,!!B0(d,wn)){if(ut.error){console.error("Inspect error:",ut.error);return}if(ki(ut),d.map.closePopup(),gt(),d.highlightRect&&(d.map.removeLayer(d.highlightRect),d.highlightRect=null),ut.bbox&&d.map&&d.designScale){let[kt,Nt,ie,rn]=ut.bbox;ut.type!=="Inst"&&Lt(kt,Nt,ie,rn,ut.type),ln(ut.bbox,ut.type)}h()}}).catch(ut=>{m=null,console.error("Inspect failed:",ut)})}function ot(){m!==null&&(d.websocketManager.cancel(m),m=null),q();let Kt=wg(d),wn=d.websocketManager.request({type:"inspect_back",use_dbu:d.showDbu});m=wn.requestId,wn.then(it=>{if(m=null,!!B0(d,Kt)){if(it.error){console.error("Inspect back error:",it.error);return}if(ki(it),d.map.closePopup(),gt(),d.highlightRect&&(d.map.removeLayer(d.highlightRect),d.highlightRect=null),it.bbox&&d.map&&d.designScale){if(it.type!=="Inst"){let[ut,kt,Nt,ie]=it.bbox;Lt(ut,kt,Nt,ie,it.type)}ln(it.bbox,it.type)}h()}}).catch(it=>{m=null,console.error("Inspect back failed:",it)})}function Lt(Kt,wn,it,ut,kt){if(d.highlightRect&&(d.map.removeLayer(d.highlightRect),d.highlightRect=null),kt==="Net")return;let Nt=Vf(Kt,wn,it,ut,d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY);d.highlightRect=L.rectangle(Nt,{color:"#ff0",weight:2,fill:!1,dashArray:"6,4"}),d.visibility&&d.visibility.highlight_selected===!1||d.highlightRect.addTo(d.map)}let be=null;function ln(Kt,wn){if(!Kt||!d.map||!d.designScale||(ne!==null&&xe(),be&&(d.map.removeLayer(be),be=null),d.visibility&&d.visibility.highlight_selected===!1)||wn==="Net")return;let[it,ut,kt,Nt]=Kt,ie=Vf(it,ut,kt,Nt,d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY);be=L.rectangle(ie,{color:"#ff0",weight:3,fill:!0,fillColor:"#ff0",fillOpacity:.25,opacity:1,interactive:!1,className:"selection-pulse",pane:d.hoverHighlightPane}).addTo(d.map);let rn=be;setTimeout(()=>{rn&&d.map&&d.map.hasLayer(rn)&&d.map.removeLayer(rn),be===rn&&(be=null)},1100)}let Fn=null,ne=null;function xe(){ne!==null&&(clearInterval(ne),ne=null),Fn&&(d.map&&d.map.hasLayer(Fn)&&d.map.removeLayer(Fn),Fn=null)}function re(Kt,{repeats:wn=6,intervalMs:it=300}={}){if(!Kt||!d.map||!d.designScale)return;if(xe(),typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches){ln(Kt);return}let[ut,kt,Nt,ie]=Kt,rn=Vf(ut,kt,Nt,ie,d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY);Fn=L.rectangle(rn,{color:"#ff0",weight:1,fill:!0,fillColor:"#ff0",fillOpacity:.39,opacity:1,interactive:!1,pane:d.hoverHighlightPane}).addTo(d.map);let Pn=0,Tt=wn>0?wn*3:1/0;ne=setInterval(()=>{if(Pn+=1,Pn>=Tt){xe();return}let yt=Pn%3+1;Fn.setStyle({weight:yt,fillOpacity:yt===1?.39:0})},it)}d.clearSelectionPulse=function(){be&&(d.map.removeLayer(be),be=null)};function hn(Kt,wn,it){let ut=document.createElement("div");ut.className="inspector-group";let kt=document.createElement("div");kt.className="inspector-group-header";let Nt=document.createElement("span");Nt.className="vis-arrow";let ie=document.createElement("span");if(ie.className="inspector-prop-name",ie.textContent=Kt,ie.title=Kt,kt.appendChild(Nt),kt.appendChild(ie),wn!==null){let Pn=document.createElement("span");Pn.className="inspector-count",Pn.textContent=`(${wn})`,kt.appendChild(Pn)}ut.appendChild(kt);let rn=document.createElement("div");return rn.className="inspector-group-children"+(it?" collapsed":""),Nt.textContent=it?"\u25B6":"\u25BC",ut.appendChild(rn),kt.addEventListener("click",()=>{rn.classList.toggle("collapsed"),Nt.textContent=rn.classList.contains("collapsed")?"\u25B6":"\u25BC"}),{group:ut,header:kt,arrow:Nt,body:rn}}function Se(Kt){let wn=Kt.column_headers||[],it=Kt.row_headers||[],ut=Kt.data||[],kt=wn.some(Pn=>Pn!==""),Nt=it.some(Pn=>Pn!==""),ie=document.createElement("table");if(ie.className="inspector-table",kt){let Pn=document.createElement("thead"),Tt=document.createElement("tr");Nt&&Tt.appendChild(document.createElement("th"));for(let yt of wn){let ue=document.createElement("th");ue.textContent=yt,Tt.appendChild(ue)}Pn.appendChild(Tt),ie.appendChild(Pn)}let rn=document.createElement("tbody");return ut.forEach((Pn,Tt)=>{let yt=document.createElement("tr");if(Nt){let ue=document.createElement("th");ue.textContent=it[Tt]||"",yt.appendChild(ue)}for(let ue of Pn){let fn=document.createElement("td");fn.textContent=ue,yt.appendChild(fn)}rn.appendChild(yt)}),ie.appendChild(rn),ie}function ke(Kt,wn){if(Kt.table){let ie=(Kt.table.data||[]).length,{group:rn,body:Pn}=hn(Kt.name,ie,ie>=10),Tt=document.createElement("div");return Tt.className="inspector-table-scroll",Tt.appendChild(Se(Kt.table)),Pn.appendChild(Tt),rn}if(Kt.children){let ie=Kt.children.length<10,{group:rn,body:Pn}=hn(Kt.name,Kt.children.length,!ie);for(let Tt of Kt.children)Pn.appendChild(ke(Tt,wn));return rn}let it=document.createElement("div");it.className="inspector-prop";let ut=document.createElement("span");ut.className="inspector-prop-name",ut.textContent=Kt.name||"",ut.title=Kt.name||"";let kt=document.createElement("span");kt.className="inspector-prop-value",kt.textContent=Kt.value||"",it.appendChild(ut),it.appendChild(kt);let Nt=Kt.editable&&wn&&(wn.onPropertyEdit||wn.onPropertyChange)&&Kt.editor&&(Kt.editor.type==="list"||Kt.editor.type==="bool");if(Nt&&Kt.value_select_id===void 0)it.replaceChild(N(Kt,wn),kt);else if(Nt){let ie=document.createElement("button");ie.className="inspector-edit-btn",ie.title="Edit "+Kt.name,ie.textContent="\u270E",ie.addEventListener("click",rn=>{rn.stopPropagation();let Pn=N(Kt,wn);it.replaceChild(Pn,kt),ie.remove(),Pn.focus()}),it.appendChild(ie)}else Kt.editable&&wn&&(wn.onPropertyChange||wn.onPropertyEdit)&&(kt.contentEditable=!0,kt.classList.add("inspector-editable"),kt.addEventListener("blur",()=>{let ie=kt.textContent;if(ie!==Kt.value){if(wn.onPropertyChange){wn.onPropertyChange(Kt.name,ie);return}if(Kt.editor&&Kt.editor.type==="number"){let rn=Number(ie);if(ie.trim()===""||Number.isNaN(rn)){ev("Not a number: "+ie),kt.textContent=Kt.value;return}wn.onPropertyEdit(Kt,{value:rn});return}wn.onPropertyEdit(Kt,{value:ie})}}),kt.addEventListener("keydown",ie=>{ie.key==="Enter"&&(ie.preventDefault(),kt.blur()),ie.key==="Escape"&&(kt.textContent=Kt.value,kt.blur())}));return Kt.name_select_id!==void 0&&Kt.value_select_id===void 0?(Ot(it,Kt.name_select_id),ut.classList.add("inspector-link")):Kt.name_select_id!==void 0&&Ot(ut,Kt.name_select_id),Kt.value_select_id!==void 0&&Ot(kt,Kt.value_select_id),it}let mn=140,en=60,Qn=500,ge=mn;function Pe(){d.inspectorEl&&d.inspectorEl.style.setProperty("--inspector-name-w",ge+"px")}function ti(){let Kt=document.createElement("div");return Kt.className="inspector-col-resizer",Kt.title="Drag to resize the name column",Kt.addEventListener("mousedown",wn=>{wn.preventDefault();let it=wn.clientX,ut=ge;Kt.classList.add("dragging");let kt=ie=>{ge=Math.max(en,Math.min(Qn,ut+ie.clientX-it)),Pe()},Nt=()=>{Kt.classList.remove("dragging"),document.removeEventListener("mousemove",kt),document.removeEventListener("mouseup",Nt)};document.addEventListener("mousemove",kt),document.addEventListener("mouseup",Nt)}),Kt}function Yi(Kt){if(!Kt||!d.map||!d.designScale)return;let[wn,it,ut,kt]=Kt;d.map.fitBounds(Vf(wn,it,ut,kt,d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY),{padding:[20,20]})}function ki(Kt){if(!d.inspectorEl)return;if(g=Kt,d.inspectorEl.innerHTML="",!Kt||!Kt.properties||Kt.properties.length===0){xe();let kt=document.createElement("div");kt.className="stub-panel",kt.innerHTML='
Inspector
Select an object in the layout to inspect its properties.
',d.inspectorEl.appendChild(kt);return}if(!Kt.onPropertyChange&&!Kt.onPropertyEdit&&!Sc(d)&&(Kt.onPropertyEdit=(kt,Nt)=>R(kt.name,Nt)),Kt){let kt=document.createElement("div");kt.className="inspector-toolbar";let Nt=document.createElement("button");if(Nt.className="or-btn or-btn-icon",Nt.title="Back",Nt.innerHTML=yke,Nt.disabled=!Kt.can_navigate_back,Nt.addEventListener("click",()=>ot()),kt.appendChild(Nt),Kt.bbox){let ie=document.createElement("button");ie.className="or-btn or-btn-icon",ie.title="Zoom to",ie.innerHTML=_ke,ie.addEventListener("click",()=>Yi(Kt.bbox)),kt.appendChild(ie)}if(Kt.type==="Net"&&Kt.name){let ie=d.focusNets.has(Kt.name),rn=document.createElement("button");rn.className="or-btn or-btn-icon",rn.title=ie?"De-focus net":"Focus net",rn.innerHTML=ie?Mke:xke,rn.addEventListener("click",()=>nt(Kt.name)),kt.appendChild(rn)}if(Kt.type==="Net"&&Kt.name&&Kt.has_guides){let ie=d.routeGuideNets.has(Kt.name),rn=document.createElement("button");rn.className="or-btn or-btn-icon",rn.title=ie?"Hide route guides":"Show route guides",rn.innerHTML=ie?Ske:Eke,rn.addEventListener("click",()=>X(Kt.name)),kt.appendChild(rn)}if(Kt.type==="Net"&&Kt.name&&d.showInsertBufferDialog){let ie=document.createElement("button");ie.className="or-btn or-btn-icon",ie.title="Insert buffer",ie.innerHTML=kke,ie.addEventListener("click",()=>d.showInsertBufferDialog(Kt.name)),kt.appendChild(ie)}if(d.focusNets.size>0){let ie=document.createElement("button");ie.className="or-btn or-btn-icon",ie.title="Clear focus nets",ie.innerHTML=Tke,ie.addEventListener("click",()=>Q()),kt.appendChild(ie)}if(typeof Kt.highlight_group=="number"&&!Sc(d)&&(d.techData?.highlight_colors||[]).length){let ie=document.createElement("button");ie.className="or-btn or-btn-icon inspector-highlight-btn";let rn=Kt.highlight_group;if(ie.title=rn>=0?"Highlight group "+(rn+1):"Add to highlight group",ie.innerHTML=vke,rn>=0){let Pn=d.techData.highlight_colors[rn];ie.style.backgroundColor=`rgba(${Pn[0]}, ${Pn[1]}, ${Pn[2]}, 0.45)`,ie.style.borderColor=`rgb(${Pn[0]}, ${Pn[1]}, ${Pn[2]})`}ie.addEventListener("click",()=>W(ie,Kt)),kt.appendChild(ie)}if(Array.isArray(Kt.actions)&&!Sc(d))for(let ie of Kt.actions){let rn=document.createElement("button");rn.className="or-btn inspector-action-btn",rn.title=ie,ie==="Delete"?(rn.classList.add("or-btn-icon","or-btn-danger-hover"),rn.innerHTML=wke):(rn.classList.add("or-btn-sm"),rn.textContent=ie),rn.addEventListener("click",()=>B(ie,Kt)),kt.appendChild(rn)}d.inspectorEl.appendChild(kt)}let wn=Kt.selection_count||0,it=typeof Kt.selection_index=="number"?Kt.selection_index:-1;if(wn>1&&it>=0){let kt=document.createElement("div");kt.className="inspector-selection-nav";let Nt=document.createElement("button");Nt.className="or-btn or-btn-icon",Nt.title="Previous (Shift+click to multi-select)",Nt.innerHTML=Cke,Nt.addEventListener("click",()=>Pt(-1));let ie=document.createElement("span");ie.className="inspector-selection-label",ie.textContent=it+1+" / "+wn;let rn=document.createElement("button");rn.className="or-btn or-btn-icon",rn.title="Next",rn.innerHTML=Ake,rn.addEventListener("click",()=>Pt(1)),kt.appendChild(Nt),kt.appendChild(ie),kt.appendChild(rn),d.inspectorEl.appendChild(kt)}let ut=document.createElement("div");ut.className="inspector-rows";for(let kt of Kt.properties)ut.appendChild(ke(kt,Kt));ut.appendChild(ti()),d.inspectorEl.appendChild(ut),Pe()}function lr(Kt){let wn=document.createElement("div");wn.className="inspector",d.inspectorEl=wn,Kt.element.appendChild(wn),ki(null)}function pr(){if(g){if(g.type==="Ruler"){d.rulerManager&&d.rulerManager._selectedRulerId!==null&&d.rulerManager._selectRuler(d.rulerManager._selectedRulerId);return}d.websocketManager&&se(-1)}}return{createInspector:lr,updateInspector:ki,highlightBBox:Lt,pulseHighlight:ln,animateSelection:re,stopSelectionAnimation:xe,navigateInspector:se,refreshInspector:pr}}var ent=class{constructor(s,h,g){this._app=h,this._refreshOverlay=g||(()=>{}),this._data={selection:[],groups:[],truncated:!1},this._tab="selected",this._filter="",this._sortKey=null,this._sortAsc=!0,this._pendingRefresh=null,this._inFlight=!1,this._staleWhileInFlight=!1,this._visible=!0,this._el=document.createElement("div"),this._el.className="selection-browser",s.element.appendChild(this._el),s.on?.("show",()=>{this._visible=!0,this.refresh()}),s.on?.("hide",()=>{this._visible=!1}),s.on?.("destroy",()=>{this._visible=!1,this._staleWhileInFlight=!1,this._pendingRefresh!==null&&(clearTimeout(this._pendingRefresh),this._pendingRefresh=null)}),this._render(),this.refresh()}scheduleRefresh(){!this._visible||this._pendingRefresh!==null||(this._pendingRefresh=setTimeout(()=>{this._pendingRefresh=null,this.refresh()},150))}refresh(){if(!this._visible||Sc(this._app))return;if(this._inFlight){this._staleWhileInFlight=!0;return}this._inFlight=!0;let s=()=>{this._inFlight=!1,this._staleWhileInFlight&&(this._staleWhileInFlight=!1,this.refresh())};this._app.websocketManager.request({type:"list_selection"}).then(h=>{h.ok&&(this._data=h,this._render()),s()}).catch(s)}_entries(){let s;this._tab==="selected"?s=(this._data.selection||[]).map((g,m)=>({row:g,index:m,group:-1})):s=(this._data.groups||[]).flatMap((g,m)=>g.map((_,S)=>({row:_,index:S,group:m})));let h=this._filter.trim().toLowerCase();if(h&&(s=s.filter(({row:g})=>(g.name||"").toLowerCase().includes(h)||(g.type||"").toLowerCase().includes(h))),this._sortKey){let g=this._sortKey,m=this._sortAsc?1:-1;s=s.slice().sort((_,S)=>m*String(_.row[g]||"").localeCompare(String(S.row[g]||"")))}return s}_fmtCoord(s){if(this._app.showDbu)return String(s);let h=this._app.getDbuPerMicron?this._app.getDbuPerMicron():1e3;return(s/h).toFixed(3)}_fmtBounds(s){if(!s)return"";let[h,g,m,_]=s;return`(${this._fmtCoord(h)}, ${this._fmtCoord(g)}), (${this._fmtCoord(m)}, ${this._fmtCoord(_)})`}_inspectRow(s,h){let g=s.group<0?{type:"inspect_selection",index:s.index,use_dbu:this._app.showDbu}:{type:"inspect_group",group:s.group,index:s.index,use_dbu:this._app.showDbu};this._app.websocketManager.request(g).then(m=>{if(!m.ok){this.refresh();return}this._app.updateInspector&&this._app.updateInspector(m),h&&this._app.focusComponent&&this._app.focusComponent("Inspector"),this._refreshOverlay()}).catch(()=>{})}_deselectRow(s){this._app.websocketManager.request({type:"deselect",index:s.index}).then(()=>{this.refresh(),this._refreshOverlay()}).catch(()=>{})}_clearHighlights(){this._app.websocketManager.request({type:"clear_highlights",group:-1}).then(()=>{this.refresh(),this._refreshOverlay(),this._app.refreshInspector&&this._app.refreshInspector()}).catch(()=>{})}_zoomToBBox(s){if(!s||!this._app.designScale||!this._app.map)return;let[h,g,m,_]=s,S=this._app.getDbuPerMicron?this._app.getDbuPerMicron():1e3,y=Math.min(10*S,2*Math.max(m-h,_-g));this._app.map.fitBounds(Vf(h-y,g-y,m+y,_+y,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY))}_render(){this._app.stopSelectionAnimation&&this._app.stopSelectionAnimation(),this._el.innerHTML="";let s=(this._data.selection||[]).length,h=(this._data.groups||[]).reduce((S,y)=>S+y.length,0),g=document.createElement("div");g.className="sb-tabs";for(let[S,y,R]of[["selected","Selected",s],["highlighted","Highlighted",h]]){let N=document.createElement("button");N.className="sb-tab"+(this._tab===S?" active":""),N.textContent=`${y} (${R})`,N.addEventListener("click",()=>{this._tab=S,this._render()}),g.appendChild(N)}let m=document.createElement("button");if(m.className="or-btn or-btn-sm sb-tool",m.title="Refresh",m.textContent="\u27F3",m.addEventListener("click",()=>this.refresh()),g.appendChild(m),this._tab==="highlighted"&&h>0){let S=document.createElement("button");S.className="or-btn or-btn-sm sb-tool",S.title="Clear all highlights",S.textContent="Clear",S.addEventListener("click",()=>this._clearHighlights()),g.appendChild(S)}this._el.appendChild(g);let _=document.createElement("input");if(_.type="text",_.className="sb-filter",_.placeholder="Filter by name or type\u2026",_.value=this._filter,_.addEventListener("input",()=>{this._filter=_.value,this._renderTable()}),this._el.appendChild(_),this._data.truncated){let S=document.createElement("div");S.className="sb-truncated",S.textContent="List truncated \u2014 showing the first 1000 entries per set.",this._el.appendChild(S)}this._tableWrap=document.createElement("div"),this._tableWrap.className="sb-table-wrap",this._el.appendChild(this._tableWrap),this._renderTable()}_renderTable(){this._tableWrap.innerHTML="";let s=this._entries();if(!s.length){let R=document.createElement("div");R.className="sb-empty",R.textContent=this._tab==="selected"?"Nothing selected.":"Nothing highlighted.",this._tableWrap.appendChild(R);return}let h=document.createElement("table");h.className="sb-table";let g=document.createElement("thead"),m=document.createElement("tr"),_=[["name","Object"],["type","Type"],[null,"Bounds"]];this._tab==="highlighted"&&_.push([null,"Group"]),_.push([null,""]);for(let[R,N]of _){let B=document.createElement("th");B.textContent=N,R&&(B.classList.add("sb-sortable"),this._sortKey===R&&(B.textContent+=this._sortAsc?" \u25B2":" \u25BC"),B.addEventListener("click",()=>{this._sortKey===R?this._sortAsc=!this._sortAsc:(this._sortKey=R,this._sortAsc=!0),this._renderTable()})),m.appendChild(B)}g.appendChild(m),h.appendChild(g);let S=document.createElement("tbody"),y=this._app.techData?.highlight_colors||[];for(let R of s){let N=document.createElement("tr");N.className="sb-row";let B=document.createElement("td");B.textContent=R.row.name||"";let P=document.createElement("td");P.textContent=R.row.type||"";let U=document.createElement("td");if(U.textContent=this._fmtBounds(R.row.bbox),N.appendChild(B),N.appendChild(P),N.appendChild(U),this._tab==="highlighted"){let q=document.createElement("td"),nt=document.createElement("span");nt.className="sb-chip";let Q=y[R.group];Q&&(nt.style.backgroundColor=`rgb(${Q[0]}, ${Q[1]}, ${Q[2]})`),q.appendChild(nt),q.appendChild(document.createTextNode(` Group ${R.group+1}`)),N.appendChild(q)}let W=document.createElement("td");if(W.className="sb-actions",R.row.bbox){let q=document.createElement("button");q.className="sb-row-btn",q.title="Zoom to",q.textContent="\u2316",q.addEventListener("click",nt=>{nt.stopPropagation(),this._zoomToBBox(R.row.bbox)}),W.appendChild(q)}if(this._tab==="selected"){let q=document.createElement("button");q.className="sb-row-btn",q.title="De-select",q.textContent="\u2715",q.addEventListener("click",nt=>{nt.stopPropagation(),this._deselectRow(R)}),W.appendChild(q)}N.appendChild(W),N.addEventListener("click",()=>this._inspectRow(R,!1)),N.addEventListener("dblclick",()=>this._inspectRow(R,!0)),R.row.bbox&&(N.addEventListener("mouseenter",()=>{this._app.animateSelection&&this._app.animateSelection(R.row.bbox,{repeats:0})}),N.addEventListener("mouseleave",()=>{this._app.stopSelectionAnimation&&this._app.stopSelectionAnimation()})),S.appendChild(N)}h.appendChild(S),this._tableWrap.appendChild(h),ok(h)}};var LJt="options-dialog",kJt=[{label:"System default",value:""},{label:"Sans-serif",value:"sans-serif"},{label:"Serif",value:"serif"},{label:"Monospace",value:"monospace"},{label:"Helvetica / Arial",value:"Helvetica, Arial, sans-serif"},{label:"Georgia",value:"Georgia, 'Times New Roman', serif"},{label:"Courier",value:"'Courier New', Courier, monospace"}],Lke=100,nnt=70,int=200;function jU(d){let s=d===""||d===null?NaN:Math.round(Number(d));return Number.isFinite(s)?Math.min(int,Math.max(nnt,s)):Lke}function PJt(d){let{overlay:s,close:h,okBtn:g,showError:m}=mR("Arrow keys scroll step",` +Setup and hold times account for internal clock delays.`},{label:"Logic Delay",key:"path_delay",time:!0,num:!0,tooltip:"Path delay from instances (excluding buffers and consecutive inverter pairs)"},{label:"Logic Depth",key:"logic_depth",num:!0,tooltip:"Path instances (excluding buffers and consecutive inverter pairs)"},{label:"Fanout",key:"fanout",num:!0},{label:"Start",key:"start_pin"},{label:"End",key:"end_pin"}];hk.DETAIL_COLS=["Pin","Fanout","R/F","Time","Delay","Slew","Load"];hk.DETAIL_NUM_COLS=new Set(["Fanout","Time","Delay","Slew","Load"]);function qf(d){let s=document.cookie.match("(?:^|; )"+d+"=([^;]*)");return s?s[1]:null}function Rd(d,s){document.cookie=d+"="+s+"; path=/; max-age=31536000; SameSite=Lax"}function snt(d){document.cookie=d+"=; path=/; max-age=0; SameSite=Lax"}function ont(d){Rd("or_theme",d);try{window.localStorage.setItem("or_theme",d)}catch{}}function NJt(){snt("or_theme");try{window.localStorage.removeItem("or_theme")}catch{}}function $2t(d){let s=document.getElementById("gl-theme-dark"),h=document.getElementById("gl-theme-light");!s||!h||(s.disabled=d!=="dark",h.disabled=d!=="light")}function OJt(d,s){wR(d)&&(document.documentElement.style.setProperty("--bg-map",d),Rd("or_bg_color",d),FJt(s),s.syncDisplayState())}function BJt(d){document.documentElement.style.removeProperty("--bg-map"),snt("or_bg_color"),FJt(d),d.syncDisplayState()}function V2t(){return hJt(getComputedStyle(document.documentElement).getPropertyValue("--bg-map"))??"#000000"}function FJt(d){d.threeDViewerWidget?.render?.()}if(typeof document<"u"){let d=qf("or_theme")||typeof localStorage<"u"&&localStorage.getItem("or_theme")||(matchMedia("(prefers-color-scheme: light)").matches?"light":"dark");document.documentElement.dataset.theme=d,$2t(d);let s=qf("or_bg_color");wR(s)&&document.documentElement.style.setProperty("--bg-map",s)}function fk(){let d=getComputedStyle(document.documentElement),s=h=>d.getPropertyValue(h).trim();return{canvasBg:s("--canvas-bg"),canvasText:s("--canvas-text"),canvasAxis:s("--canvas-axis"),canvasLabel:s("--canvas-label"),canvasGrid:s("--canvas-grid"),canvasTitle:s("--canvas-title"),fgPrimary:s("--fg-primary"),fgMuted:s("--fg-muted"),bgPanel:s("--bg-panel"),bgMap:s("--bg-map"),fontMono:s("--font-mono"),fontSans:s("--font-sans")}}function dk(d,s){let h=document.createElement("a");h.href=d,h.download=s,document.body.appendChild(h),h.click(),h.remove()}function UJt(d,s){let h=URL.createObjectURL(d);dk(h,s),setTimeout(()=>URL.revokeObjectURL(h),1e3)}function q2t(d){let s=d.cloneNode(!0);if(s.getAttribute("xmlns")||s.setAttribute("xmlns","http://www.w3.org/2000/svg"),s.getAttribute("xmlns:xlink")||s.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),!s.getAttribute("width")||!s.getAttribute("height")){let h=d.viewBox&&d.viewBox.baseVal;h&&h.width&&h.height&&(s.setAttribute("width",h.width),s.setAttribute("height",h.height))}return` +`+new XMLSerializer().serializeToString(s)}function gke(d){let s=d.viewBox&&d.viewBox.baseVal;if(s&&s.width&&s.height)return{width:s.width,height:s.height};let h=parseFloat(d.getAttribute("width")),p=parseFloat(d.getAttribute("height"));if(h&&p)return{width:h,height:p};let m=d.getBoundingClientRect();return{width:m.width||800,height:m.height||600}}function X2t(d,s=2){let{width:h,height:p}=gke(d),m=q2t(d),_=new Blob([m],{type:"image/svg+xml;charset=utf-8"}),E=URL.createObjectURL(_);return new Promise((y,I)=>{let N=new Image;N.onload=()=>{let B=document.createElement("canvas");B.width=Math.max(1,Math.round(h*s)),B.height=Math.max(1,Math.round(p*s));let P=B.getContext("2d");P.fillStyle="#ffffff",P.fillRect(0,0,B.width,B.height),P.drawImage(N,0,0,B.width,B.height),URL.revokeObjectURL(E),y(B.toDataURL("image/png"))},N.onerror=B=>{URL.revokeObjectURL(E),I(B)},N.src=E})}async function cnt(d){try{if(!navigator.clipboard||!window.ClipboardItem)return!1;let s=await(await fetch(d)).blob();return await navigator.clipboard.write([new ClipboardItem({"image/png":s})]),!0}catch{return!1}}function mke(d){return(String(d||"").replace(/[^A-Za-z0-9._-]/g,"_").replace(/^_+|_+$/g,"")||"clock_tree")+".png"}var Z2t=24,Y2t=10,unt=40,bke=40,K2t=70,wke=20,ant={root:"#ff4444",buffer:"#4488ff",inverter:"#00b0b0",clock_gate:"#cc44cc",register:"#ff4444",macro:"#00b0b0",unknown:"#888888"};function vke(d){let s=parseInt(d.slice(1,3),16),h=parseInt(d.slice(3,5),16),p=parseInt(d.slice(5,7),16),m=E=>Math.round((E+255)/2),_=E=>E.toString(16).padStart(2,"0");return"#"+_(m(s))+_(m(h))+_(m(p))}function _ke(d){let s=d.nodes;if(!s||s.length===0)return{layout:[],layoutWidth:0,layoutHeight:0,timeMin:0,timeMax:0,timeUnit:"",sceneHeight:0,layoutById:new Map};let h=new Map;for(let gt of s)h.set(gt.id,[]);for(let gt of s)gt.parent_id>=0&&h.has(gt.parent_id)&&h.get(gt.parent_id).push(gt.id);let p=new Map;for(let gt of s)p.set(gt.id,gt);let m=new Map,_=gt=>{let ft=h.get(gt)||[];if(ft.length===0)return m.set(gt,1),1;let xt=0;for(let Bt of ft)xt+=_(Bt);return m.set(gt,xt),xt},E=s.filter(gt=>gt.parent_id===-1),y=0;for(let gt of E)y+=_(gt.id);let I=d.min_arrival,N=d.max_arrival,B=N-I||1,P=Math.max(200,y*Z2t*.6),U=[],j=(gt,ft)=>{let xt=p.get(gt),Bt=m.get(gt),Ot=K2t+(ft+Bt/2)*Z2t,Pt=unt+(xt.arrival-I)/B*P;U.push({id:xt.id,x:Ot,y:Pt,type:xt.type,name:xt.name,pin_name:xt.pin_name,arrival:xt.arrival,delay:xt.delay,fanout:xt.fanout,level:xt.level,parent_id:xt.parent_id});let se=ft,ot=h.get(gt)||[];for(let Lt of ot)j(Lt,se),se+=m.get(Lt)},V=0;for(let gt of E)j(gt.id,V),V+=m.get(gt.id);let tt=K2t+y*Z2t+wke,Q=unt+P+bke,X=new Map;for(let gt of U)X.set(gt.id,gt);return{layout:U,layoutWidth:tt,layoutHeight:Q,timeMin:I,timeMax:N,timeUnit:d.time_unit||"",sceneHeight:P,layoutById:X}}var lnt=class{constructor(s,h,p,m){this._app=h,this._redrawAllLayers=p,this._refreshOverlay=m||p,this._clockData=[],this._selectedClockIdx=0,this._selectedNodeId=-1,this._tx=0,this._ty=0,this._scale=1,this._layout=[],this._dragging=!1,this._dragStartX=0,this._dragStartY=0,this._dragStartTx=0,this._dragStartTy=0,this._build(s)}_build(s){let h=document.createElement("div");h.className="clock-tree-widget";let p=document.createElement("div");p.className="clock-tree-toolbar",this._updateBtn=document.createElement("button"),this._updateBtn.className="or-btn",this._updateBtn.textContent="Update",Sc(this._app)&&(this._updateBtn.style.display="none"),this._fitBtn=document.createElement("button"),this._fitBtn.className="or-btn",this._fitBtn.textContent="Fit",this._pngBtn=document.createElement("button"),this._pngBtn.className="or-btn",this._pngBtn.textContent="PNG",this._pngBtn.title="Export the clock tree as a PNG image",this._statusLabel=document.createElement("span"),this._statusLabel.className="timing-path-count",p.appendChild(this._updateBtn),p.appendChild(this._fitBtn),p.appendChild(this._pngBtn),p.appendChild(this._statusLabel),h.appendChild(p),this._tabBar=document.createElement("div"),this._tabBar.className="timing-tab-bar",h.appendChild(this._tabBar),this._canvas=document.createElement("canvas"),this._canvas.className="clock-tree-canvas",h.appendChild(this._canvas),this._tooltip=document.createElement("div"),this._tooltip.className="or-tooltip",this._tooltip.style.display="none",h.appendChild(this._tooltip),s.element.appendChild(h),this._el=h,this._ctx=this._canvas.getContext("2d"),this._bindEvents(),Sc(this._app)&&setTimeout(()=>this.update(),0)}_fit(){this._sizeCanvas(),this._fitToView(),this._render()}_pngFileName(){let s=this._clockData[this._selectedClockIdx];return mke(s&&s.name)}_exportPng(){try{dk(this._canvas.toDataURL("image/png"),this._pngFileName())}catch(s){console.error("PNG export failed:",s)}}_bindEvents(){this._updateBtn.addEventListener("click",()=>this.update()),this._fitBtn.addEventListener("click",()=>this._fit()),this._pngBtn.addEventListener("click",()=>this._exportPng()),this._canvas.addEventListener("keydown",s=>{s.key==="f"&&this._fit()}),this._canvas.tabIndex=0,this._canvas.addEventListener("wheel",s=>{s.preventDefault();let h=this._canvas.getBoundingClientRect(),p=s.clientX-h.left,m=s.clientY-h.top,_=s.deltaY<0?1.15:1/1.15;this._tx=p-(p-this._tx)*_,this._ty=m-(m-this._ty)*_,this._scale*=_,this._render()}),this._canvas.addEventListener("mousedown",s=>{this._dragging=!0,this._dragStartX=s.clientX,this._dragStartY=s.clientY,this._dragStartTx=this._tx,this._dragStartTy=this._ty,this._canvas.style.cursor="grabbing"}),window.addEventListener("mousemove",s=>{this._dragging?(this._tx=this._dragStartTx+(s.clientX-this._dragStartX),this._ty=this._dragStartTy+(s.clientY-this._dragStartY),this._render()):this._handleHover(s)}),window.addEventListener("mouseup",()=>{this._dragging&&(this._dragging=!1,this._canvas.style.cursor="grab")}),this._canvas.addEventListener("click",s=>this._handleClick(s)),this._resizeObserver=new ResizeObserver(()=>{this._sizeCanvas(),this._render()}),this._resizeObserver.observe(this._canvas)}_sizeCanvas(){let s=this._canvas.getBoundingClientRect(),h=window.devicePixelRatio||1;this._canvas.width=s.width*h,this._canvas.height=s.height*h,this._ctx.setTransform(h,0,0,h,0,0)}async update(){this._statusLabel.textContent="Loading...";try{let s=await this._app.websocketManager.request({type:"clock_tree"});this._clockData=s.clocks||[],this._buildTabs(),this._selectClock(0),this._statusLabel.textContent=this._clockData.length+" clock"+(this._clockData.length!==1?"s":"")}catch(s){console.error("Clock tree error:",s),this._statusLabel.textContent="Error: "+s.message}}_buildTabs(){this._tabBar.innerHTML="",this._clockData.forEach((s,h)=>{let p=document.createElement("button");p.className="timing-tab"+(h===this._selectedClockIdx?" active":""),p.textContent=s.name,p.addEventListener("click",()=>this._selectClock(h)),this._tabBar.appendChild(p)})}_selectClock(s){if(s<0||s>=this._clockData.length)return;this._selectedClockIdx=s,this._selectedNodeId=-1,this._tabBar.querySelectorAll(".timing-tab").forEach((p,m)=>{p.classList.toggle("active",m===s)}),this._computeLayout(this._clockData[s]),requestAnimationFrame(()=>{this._sizeCanvas(),this._fitToView(),this._render()})}_computeLayout(s){let h=_ke(s);this._layout=h.layout,this._layoutWidth=h.layoutWidth,this._layoutHeight=h.layoutHeight,this._timeMin=h.timeMin,this._timeMax=h.timeMax,this._timeUnit=h.timeUnit,this._sceneHeight=h.sceneHeight,this._layoutById=h.layoutById}_fitToView(){if(!this._layout.length)return;let s=this._canvas.getBoundingClientRect(),h=s.width,p=s.height,m=h/this._layoutWidth,_=p/this._layoutHeight;this._scale=Math.min(m,_)*.9,this._tx=(h-this._layoutWidth*this._scale)/2,this._ty=(p-this._layoutHeight*this._scale)/2}render(){this._render()}_render(){let s=this._ctx,h=this._canvas.getBoundingClientRect(),p=h.width,m=h.height,_=fk();if(s.clearRect(0,0,p,m),s.fillStyle=_.canvasBg,s.fillRect(0,0,p,m),!this._layout.length){s.fillStyle=_.canvasText,s.font="14px "+_.fontSans,s.textAlign="center";let E=Sc(this._app)?"No clock tree data available":'Click "Update" to load clock tree data';s.fillText(E,p/2,m/2);return}s.save(),s.translate(this._tx,this._ty),s.scale(this._scale,this._scale),this._drawConnections(s);for(let E of this._layout)this._drawNode(s,E,E.id===this._selectedNodeId);s.restore(),this._drawTimeScale(s,p,m,_)}_drawConnections(s){let h=1.5/this._scale,p=Y2t,m=this._timeMax-this._timeMin||1;for(let _ of this._layout){if(_.parent_id<0)continue;let E=this._layoutById.get(_.parent_id);if(!E)continue;let y=E.x,I=_.x,N=(E.delay||0)/m*this._sceneHeight,B=E.y+N,P=_.y,U=E.type==="root"?E.y:E.y+p;if(B>U){let V=ant[E.type]||ant.unknown;s.strokeStyle=V,s.lineWidth=h,s.beginPath(),s.moveTo(y,U),s.lineTo(y,B);let tt=p/20;s.moveTo(y-tt,B),s.lineTo(y+tt,B),s.stroke()}s.strokeStyle="#006400",s.lineWidth=h;let j=(B+P)/2;s.beginPath(),s.moveTo(y,B),s.bezierCurveTo(y,j,I,j,I,P),s.stroke()}}_drawNode(s,h,p){let m=h.x,_=h.y,E=Y2t,y=ant[h.type]||ant.unknown;switch(s.fillStyle=vke(y),s.strokeStyle=y,s.lineWidth=1/this._scale,h.type){case"root":{s.beginPath(),s.moveTo(m-E/2,_-E),s.lineTo(m+E/2,_-E),s.lineTo(m,_),s.closePath(),s.fill(),s.stroke();break}case"buffer":{s.beginPath(),s.moveTo(m-E/2,_),s.lineTo(m+E/2,_),s.lineTo(m,_+E),s.closePath(),s.fill(),s.stroke();break}case"inverter":{let I=E*.1,N=_+E-I;s.beginPath(),s.moveTo(m-E/2,_),s.lineTo(m+E/2,_),s.lineTo(m,N),s.closePath(),s.fill(),s.stroke(),s.beginPath(),s.arc(m,N+I/2,I/2,0,Math.PI*2),s.fill(),s.stroke();break}case"clock_gate":{s.beginPath(),s.arc(m,_+E/2,E/2,0,Math.PI*2),s.fill(),s.stroke();break}case"register":case"macro":{s.beginPath(),s.rect(m-E/2,_,E,E),s.fill(),s.stroke(),s.beginPath(),s.moveTo(m-E/8,_),s.lineTo(m+E/8,_),s.lineTo(m,_+E/4),s.closePath(),s.stroke();break}default:{s.beginPath(),s.arc(m,_+E/2,E/2,0,Math.PI*2),s.fill(),s.stroke();break}}if(p){s.strokeStyle="#ffff00",s.lineWidth=2/this._scale;let I=h.type==="root"?_-E/2:_+E/2;s.beginPath(),s.arc(m,I,E/2+3,0,Math.PI*2),s.stroke()}}_drawTimeScale(s,h,p,m){if(!this._sceneHeight)return;let _=tt=>tt*this._scale+this._ty,E=_(unt),y=_(unt+this._sceneHeight);if(y<0||E>p)return;s.save(),s.fillStyle=m.canvasLabel,s.strokeStyle=m.canvasAxis,s.font="11px "+m.fontMono,s.textAlign="right",s.textBaseline="middle";let I=this._timeMax-this._timeMin;if(I<=0){s.restore();return}let N=y-E,B=Math.max(2,Math.floor(N/40)),P=I/B,U=Math.pow(10,Math.floor(Math.log10(P))),j=U;P/U>5?j=10*U:P/U>2?j=5*U:P/U>1&&(j=2*U);let V=Math.ceil(this._timeMin/j)*j;s.beginPath();for(let tt=V;tt<=this._timeMax;tt+=j){let Q=(tt-this._timeMin)/I,X=E+Q*(y-E);s.moveTo(0,X),s.lineTo(h,X);let gt=tt.toFixed(j<.01?3:j<.1?2:1)+" "+this._timeUnit;s.fillText(gt,K2t-4,X)}s.stroke(),s.restore()}_screenToLayout(s,h){return{x:(s-this._tx)/this._scale,y:(h-this._ty)/this._scale}}_hitTest(s,h){let p=this._screenToLayout(s,h),m=Y2t;for(let _ of this._layout){let E=_.type==="root"?_.y-m:_.y,y=_.type==="root"?_.y:_.y+m;if(p.x>=_.x-m/2&&p.x<=_.x+m/2&&p.y>=E&&p.y<=y)return _}return null}_handleClick(s){let h=this._canvas.getBoundingClientRect(),p=s.clientX-h.left,m=s.clientY-h.top,_=this._hitTest(p,m);_?(this._selectedNodeId=_.id,this._render(),this._app.websocketManager.request({type:"clock_tree_highlight",inst_name:_.name}).then(()=>this._refreshOverlay())):this._selectedNodeId>=0&&(this._selectedNodeId=-1,this._render(),this._app.websocketManager.request({type:"clock_tree_highlight",inst_name:""}).then(()=>this._refreshOverlay()))}_handleHover(s){let h=this._canvas.getBoundingClientRect(),p=s.clientX-h.left,m=s.clientY-h.top;if(p<0||m<0||p>h.width||m>h.height){this._tooltip.style.display="none";return}let _=this._hitTest(p,m);if(_){let E=[_.name,"Type: "+_.type,"Arrival: "+_.arrival.toFixed(3)+" "+(this._timeUnit||"")];_.delay&&E.push("Delay: "+_.delay.toFixed(3)+" "+(this._timeUnit||"")),_.fanout&&E.push("Fanout: "+_.fanout),this._tooltip.textContent=E.join(` +`),this._tooltip.style.display="block",this._tooltip.style.left=s.clientX+12+"px",this._tooltip.style.top=s.clientY+12+"px"}else this._tooltip.style.display="none"}};var jJt=60,HJt=20,GJt=30,WJt=50,zJt=2,yke="#f08080",xke="#8b0000",Mke="#90ee90",Eke="#006400",mS=["#4e79a7","#f28e2b","#e15759","#76b7b2","#59a14f","#edc948","#b07aa1","#ff9da7"],Ske="rgba(240,128,128,0.12)",Tke="rgba(144,238,144,0.12)",Cke="#ff9999",Ake="#b0ffb0",kke=[{value:"setup",label:"Setup Slack"},{value:"hold",label:"Hold Slack"},{value:"fanout",label:"Net Fanout"},{value:"netlength",label:"Net Length (HPWL)"}];function Lke(d,s,h,p){if(!d||!s||ps.bottom)return null;for(let m of d)if(h>=m.x&&h<=m.x+m.width)return m;return null}function Pke(d,s,h){return h?Math.log10(d+1)/Math.log10(s+1):d/s}function Ike(d,s,h,p={}){let m=!!p.logY,_=d?.bins;if(!_||_.length===0)return{bars:[],yMax:0,yTicks:[],chartArea:null,logY:m};let E=jJt,y=s-HJt,I=GJt,N=h-WJt,B=y-E,P=N-I;if(B<=0||P<=0)return{bars:[],yMax:0,yTicks:[],chartArea:null,logY:m};let U={left:E,right:y,top:I,bottom:N},j=0;for(let gt of _)gt.count>j&&(j=gt.count);j===0&&(j=1);let{yMax:V,yTicks:tt}=m?Dke(j):Rke(j),Q=(B-zJt*(_.length-1))/_.length,X=[];for(let gt=0;gt<_.length;gt++){let ft=_[gt],xt=Pke(ft.count,V,m)*P;X.push({x:E+gt*(Q+zJt),y:N-xt,width:Q,height:xt,count:ft.count,lower:ft.lower,upper:ft.upper,negative:ft.negative})}return{bars:X,yMax:V,yTicks:tt,chartArea:U,logY:m}}function Rke(d){if(d<=10){let N=[];for(let B=0;B<=d;B++)N.push(B);return{yMax:d,yTicks:N}}let h=d/8,p=Math.pow(10,Math.floor(Math.log10(h))),m=h/p,_;m<1.5?_=1:m<3?_=2:m<7?_=5:_=10;let E=_*p,y=Math.ceil(d/E)*E,I=[];for(let N=0;N<=y+E/2;N+=E)I.push(N);return{yMax:y,yTicks:I}}function Dke(d){let s=Math.max(1,Math.pow(10,Math.ceil(Math.log10(Math.max(1,d+1))))),h=[0];for(let p=1;p<=s+.5;p*=10)h.push(p);return{yMax:s,yTicks:h}}function Nke(d,s){if(!s)return"";if(d==="generic"){let y=["x",...s.y_labels||[]].join(","),I=(s.points||[]).map(N=>[N.x,...N.ys||[]].join(","));return[y,...I].join(` +`)}let h=s.bins||[],p=Array.isArray(s.series)?s.series:[],m=["lower","upper","count",...p.map(E=>E.name||"group")].join(","),_=h.map((E,y)=>{let I=[E.lower,E.upper,E.count];for(let N of p)I.push(N.counts&&N.counts[y]||0);return I.join(",")});return[m,..._].join(` +`)}var hnt=class{constructor(s,h){this._app=s,this._redrawAllLayers=h,this._currentTab="setup",this._histogramData=null,this._bars=[],this._yMax=0,this._yTicks=[],this._chartArea=null,this._hoveredBar=null,this._debugCharts=[],this._activeDebugChart=-1,this._build()}_build(){let s=document.createElement("div");s.className="charts-widget";let h=document.createElement("div");h.className="charts-toolbar",this._updateBtn=document.createElement("button"),this._updateBtn.className="or-btn",this._updateBtn.textContent="Update",Sc(this._app)&&(this._updateBtn.style.display="none"),this._chartSelect=document.createElement("select"),this._chartSelect.className="charts-select",this._csvBtn=document.createElement("button"),this._csvBtn.className="or-btn",this._csvBtn.textContent="CSV",this._csvBtn.title="Export the current chart data as CSV",this._pngBtn=document.createElement("button"),this._pngBtn.className="or-btn",this._pngBtn.textContent="PNG",this._pngBtn.title="Export the current chart as a PNG image",this._statusLabel=document.createElement("span"),this._statusLabel.className="timing-path-count",h.appendChild(this._updateBtn),h.appendChild(this._chartSelect),h.appendChild(this._csvBtn),h.appendChild(this._pngBtn),h.appendChild(this._statusLabel),s.appendChild(h);let p=document.createElement("div");p.className="charts-toolbar";let m=document.createElement("span");m.textContent="Path Groups:",m.style.color="var(--fg-muted)",m.style.fontSize="var(--fs-12)",this._pathGroupSelect=document.createElement("select"),this._pathGroupSelect.className="charts-select",this._pathGroupSelect.multiple=!0,this._pathGroupSelect.size=1,this._pathGroupSelect.title="Select 0 = all, or \u22651 to stack by group";let _=document.createElement("span");_.textContent="Clock:",_.style.color="var(--fg-muted)",_.style.fontSize="var(--fs-12)",this._clockSelect=document.createElement("select"),this._clockSelect.className="charts-select",this._clockSelect.innerHTML='',p.appendChild(m),p.appendChild(this._pathGroupSelect),p.appendChild(_),p.appendChild(this._clockSelect),s.appendChild(p),this._canvas=document.createElement("canvas"),this._canvas.className="charts-canvas",s.appendChild(this._canvas),this._tooltip=document.createElement("div"),this._tooltip.className="or-tooltip",this._tooltip.style.display="none",s.appendChild(this._tooltip),this._filterRow=p,this.element=s,this._ctx=this._canvas.getContext("2d"),this._rebuildSelect(),this._bindEvents(),Sc(this._app)&&setTimeout(()=>this.update(),0)}_bindEvents(){this._updateBtn.addEventListener("click",()=>this.update()),this._chartSelect.addEventListener("change",()=>this._onSelectChange()),this._csvBtn.addEventListener("click",()=>this._exportCsv()),this._pngBtn.addEventListener("click",()=>this._exportPng()),this._pathGroupSelect.addEventListener("change",()=>this._fetchHistogram()),this._clockSelect.addEventListener("change",()=>this._fetchHistogram()),this._canvas.addEventListener("mousemove",h=>this._handleHover(h)),this._canvas.addEventListener("mouseleave",()=>{this._hoveredBar=null,this._tooltip.style.display="none",this._syncView()}),this._canvas.addEventListener("click",h=>this._handleClick(h)),this._canvas.addEventListener("dblclick",h=>this._handleDblClick(h)),new ResizeObserver(()=>this._syncView()).observe(this._canvas)}_sizeCanvas(){let s=this._canvas.getBoundingClientRect(),h=window.devicePixelRatio||1;this._canvas.width=s.width*h,this._canvas.height=s.height*h,this._ctx.setTransform(h,0,0,h,0,0)}_rebuildSelect(){let s=this._chartSelect;s.innerHTML="";for(let h of kke){let p=document.createElement("option");p.value=h.value,p.textContent=h.label,s.appendChild(p)}this._debugCharts.forEach((h,p)=>{let m=document.createElement("option");m.value="gen:"+p,m.textContent=h.name||"Chart "+p,s.appendChild(m)}),s.value=this._activeDebugChart>=0?"gen:"+this._activeDebugChart:this._currentTab}_onSelectChange(){let s=this._chartSelect.value;s.startsWith("gen:")?(this._activeDebugChart=parseInt(s.slice(4),10)||0,this._hoveredBar=null,this._tooltip.style.display="none",this._syncView()):this._selectTab(s)}async update(){this._updateBtn.disabled=!0,this._updateBtn.textContent="Loading...",this._statusLabel.textContent="";try{this._activeDebugChart<0?((this._currentTab==="setup"||this._currentTab==="hold")&&await this._fetchFilters(),await Promise.all([this._fetchHistogram(),this._fetchGenericCharts()])):await this._fetchGenericCharts()}catch(s){this._statusLabel.textContent="Error: "+s.message}this._updateBtn.disabled=!1,this._updateBtn.textContent="Update"}async _fetchFilters(){let s=await this._app.websocketManager.request({type:"chart_filters"});this._populatePathGroups(s.path_groups||[]),this._populateClocks(s.clocks||[])}_populatePathGroups(s){let h=new Set(Array.from(this._pathGroupSelect.selectedOptions,p=>p.value));this._pathGroupSelect.innerHTML="";for(let p of s){let m=document.createElement("option");m.value=p,m.textContent=p,m.selected=h.has(p),this._pathGroupSelect.appendChild(m)}}_populateClocks(s){let h=this._clockSelect.value;this._clockSelect.innerHTML='';for(let p of s){let m=document.createElement("option");m.value=p,m.textContent=p,this._clockSelect.appendChild(m)}s.includes(h)&&(this._clockSelect.value=h)}async _fetchGenericCharts(){try{let s=await this._app.websocketManager.request({type:"debug_charts"});this.setDebugCharts(s.charts||[])}catch{}}async _fetchHistogram(){try{let s=this._currentTab,h;if(s==="fanout")h={type:"fanout_histogram"};else if(s==="netlength")h={type:"net_length_histogram",use_dbu:!!this._app.showDbu};else{h={type:"slack_histogram",is_setup:s==="setup"};let m=Array.from(this._pathGroupSelect.selectedOptions,_=>_.value).filter(Boolean);m.length>0&&(h.path_groups=m),this._clockSelect.value&&(h.clock_name=this._clockSelect.value)}let p=await this._app.websocketManager.request(h);if(this._currentTab!==s)return;if(this._histogramData=p,this._syncView(),s==="fanout"||s==="netlength"){let m=p.total_nets||0;this._statusLabel.textContent=`${m} nets`}else{let m=p.total_endpoints||0,_=p.unconstrained_count||0,E=m-_;this._statusLabel.textContent=`${E} endpoints`+(_>0?`, ${_} unconstrained`:"")}}catch(s){this._statusLabel.textContent="Error: "+s.message}}_selectTab(s){this._currentTab===s&&this._activeDebugChart<0||(this._currentTab=s,this._activeDebugChart=-1,this._chartSelect&&(this._chartSelect.value=s),this._filterRow.style.display=s==="setup"||s==="hold"?"":"none",this._hoveredBar=null,this._tooltip.style.display="none",this.update())}_computeLayout(){if(!this._histogramData)return;let s=this._canvas.getBoundingClientRect(),h=Ike(this._histogramData,s.width,s.height,{logY:this._currentTab==="fanout"});this._bars=h.bars,this._yMax=h.yMax,this._yTicks=h.yTicks,this._chartArea=h.chartArea,this._logY=!!h.logY}render(){this._syncView()}_stackedSeries(){let s=this._histogramData?.series;return Array.isArray(s)&&s.length>1?s:null}_render(){let s=this._canvas.getBoundingClientRect(),h=s.width,p=s.height,m=this._ctx,_=fk();if(m.clearRect(0,0,h,p),m.fillStyle=_.canvasBg,m.fillRect(0,0,h,p),!this._bars||this._bars.length===0){m.fillStyle=_.canvasText,m.font="14px "+_.fontSans,m.textAlign="center",m.textBaseline="middle";let E=Sc(this._app)?"No histogram data available":'Click "Update" to load histogram';m.fillText(E,h/2,p/2);return}this._drawAxes(m,_),this._drawBars(m),this._drawTitle(m,h,_),this._stackedSeries()&&this._drawSeriesLegend(m,_)}_drawAxes(s,h){let p=this._chartArea;if(!p)return;s.strokeStyle=h.canvasAxis,s.lineWidth=1,s.beginPath(),s.moveTo(p.left,p.top),s.lineTo(p.left,p.bottom),s.stroke(),s.beginPath(),s.moveTo(p.left,p.bottom),s.lineTo(p.right,p.bottom),s.stroke(),s.fillStyle=h.canvasLabel,s.font="11px "+h.fontMono,s.textAlign="right",s.textBaseline="middle";let m=p.bottom-p.top;for(let U of this._yTicks){let j=this._logY?Math.log10(U+1)/Math.log10(this._yMax+1):U/this._yMax,V=p.bottom-j*m;s.fillText(this._formatCount(U),p.left-6,V),U>0&&(s.strokeStyle=h.canvasGrid,s.beginPath(),s.moveTo(p.left,V),s.lineTo(p.right,V),s.stroke(),s.strokeStyle=h.canvasAxis)}let _=this._currentTab,E=_==="fanout"||_==="netlength";s.save(),s.translate(14,(p.top+p.bottom)/2),s.rotate(-Math.PI/2),s.textAlign="center",s.textBaseline="middle",s.fillStyle=h.canvasTitle,s.font="11px "+h.fontMono,s.fillText(this._logY?"Nets (log)":E?"Nets":"Endpoints",0,0),s.restore(),s.textAlign="center",s.textBaseline="top",s.fillStyle=h.canvasLabel,s.font="10px "+h.fontMono;let y=this._histogramData.bins,I=this._histogramData.time_unit||this._histogramData.length_unit||"",N=y.length>0?y[0].upper-y[0].lower:1,B=_==="fanout"?0:Math.max(0,-Math.floor(Math.log10(N)));for(let U=0;U<=this._bars.length;U++){let j=U=0){this._hoveredBar=null,this._tooltip.style.display="none";return}let h=this._hitTestBar(s);if(h!==this._hoveredBar&&(this._hoveredBar=h,this._render()),h){let p=this._currentTab,m=h.upper-h.lower;if(p==="fanout"){let U=h.upper-1,j=h.lower===U?`${h.lower}`:`[${h.lower}, ${U}]`;this._tooltip.textContent=`Nets: ${h.count} +Fanout: ${j}`}else if(p==="netlength"){let U=this._histogramData?.length_unit||"",j=Math.max(0,-Math.floor(Math.log10(m)));this._tooltip.textContent=`Nets: ${h.count} +Length: [${h.lower.toFixed(j)}, ${h.upper.toFixed(j)}) ${U}`}else{let U=this._histogramData?.time_unit||"",j=Math.max(0,-Math.floor(Math.log10(m)));this._tooltip.textContent=`Endpoints: ${h.count} +Slack: [${h.lower.toFixed(j)}, ${h.upper.toFixed(j)}) ${U}`}this._tooltip.style.display="block";let _=this.element.getBoundingClientRect(),E=this._tooltip.getBoundingClientRect(),y=4,I=s.clientX-_.left,N=s.clientY-_.top,B=I+12;B+E.width>_.width-y&&(B=I-12-E.width),B=Math.max(y,B);let P=N-10;P=Math.min(_.height-E.height-y,Math.max(y,P)),this._tooltip.style.left=B+"px",this._tooltip.style.top=P+"px"}else this._tooltip.style.display="none"}async _handleClick(s){if(this._activeDebugChart>=0||this._currentTab==="fanout"||this._currentTab==="netlength")return;let h=this._hitTestBar(s);if(!(!h||h.count===0))try{let p=await this._app.websocketManager.request({type:"timing_report",is_setup:this._currentTab==="setup",max_paths:50,slack_min:h.lower,slack_max:h.upper});this._app.timingWidget&&(this._app.timingWidget.showPaths(this._currentTab,p.paths||[]),this._app.focusComponent&&this._app.focusComponent("TimingWidget"))}catch(p){console.error("Charts bar click error:",p)}}async _handleDblClick(s){if(this._activeDebugChart>=0)return;let h;if(this._currentTab==="fanout")h="select_fanout_bin";else if(this._currentTab==="netlength")h="select_net_length_bin";else return;let p=this._hitTestBar(s);if(!p||p.count===0)return;let m=wg(this._app);try{let _=await this._app.websocketManager.request({type:h,lower:p.lower,upper:p.upper,use_dbu:this._app.showDbu});if(!N0(this._app,m))return;_&&_.truncated&&console.warn(`Bin has ${_.count} nets; selection capped at ${_.selection_limit} for performance.`),this._app.updateInspector&&this._app.updateInspector(_),this._app.focusComponent&&this._app.focusComponent("Inspector"),this._redrawAllLayers&&this._redrawAllLayers()}catch(_){console.error("Net bin select failed:",_)}}_activeChartData(){return this._activeDebugChart>=0?{kind:"generic",data:this._debugCharts[this._activeDebugChart]}:{kind:"histogram",data:this._histogramData}}_chartBaseName(){return this._activeDebugChart>=0?this._debugCharts[this._activeDebugChart].name||"chart":this._currentTab}_triggerDownload(s,h,{revoke:p=!1}={}){let m=document.createElement("a");m.href=h,m.download=s,document.body.appendChild(m),m.click(),m.remove(),p&&URL.revokeObjectURL(h)}_download(s,h,p){try{let m=URL.createObjectURL(new Blob([p],{type:h}));this._triggerDownload(s,m,{revoke:!0})}catch(m){console.error("Download failed:",m)}}_exportCsv(){let{kind:s,data:h}=this._activeChartData();if(!h)return;let p=Nke(s,h);this._download(this._chartBaseName()+".csv","text/csv",p)}_exportPng(){try{let s=this._canvas.toDataURL("image/png");this._triggerDownload(this._chartBaseName()+".png",s)}catch(s){console.error("PNG export failed:",s)}}setDebugCharts(s){this._debugCharts=s,s.length===0?this._activeDebugChart=-1:this._activeDebugChart>=s.length&&(this._activeDebugChart=0),this._rebuildSelect(),this._syncView()}_syncView(){let s=this._activeDebugChart>=0;s&&(this._hoveredBar=null,this._tooltip.style.display="none");let h=!s&&(this._currentTab==="setup"||this._currentTab==="hold");this._filterRow&&(this._filterRow.style.display=h?"":"none"),this._sizeCanvas(),s?this._renderLineChart(this._debugCharts[this._activeDebugChart]):(this._computeLayout(),this._render())}_renderLineChart(s){let h=this._canvas.getBoundingClientRect(),p=h.width,m=h.height,_=this._ctx,E=fk();_.clearRect(0,0,p,m),_.fillStyle=E.canvasBg,_.fillRect(0,0,p,m);let y=s.points;if(!y||y.length===0){_.fillStyle=E.canvasText,_.font="14px "+E.fontSans,_.textAlign="center",_.textBaseline="middle",_.fillText("No data points yet",p/2,m/2);return}let I=s.y_labels?s.y_labels.length:1,N=jJt,B=p-HJt,P=GJt,U=m-WJt,j=B-N,V=U-P;if(j<=0||V<=0)return;let tt=y[0].x,Q=y[0].x,X=1/0,gt=-1/0;for(let Pt of y){Pt.xQ&&(Q=Pt.x);for(let se of Pt.ys)segt&&(gt=se)}tt===Q&&(Q=tt+1),(!isFinite(X)||!isFinite(gt))&&(X=0,gt=1);let ft=(gt-X)*.05||1;X-=ft,gt+=ft;let xt=Pt=>N+(Pt-tt)/(Q-tt)*j,Bt=Pt=>U-(Pt-X)/(gt-X)*V;_.strokeStyle=E.canvasAxis,_.lineWidth=1,_.beginPath(),_.moveTo(N,P),_.lineTo(N,U),_.lineTo(B,U),_.stroke(),_.fillStyle=E.canvasLabel,_.font="10px "+E.fontMono,_.textAlign="right",_.textBaseline="middle";let Ot=5;for(let Pt=0;Pt<=Ot;Pt++){let se=X+(gt-X)*Pt/Ot,ot=Bt(se);_.fillText(this._formatNum(se),N-4,ot),Pt>0&&Pt1&&s.y_labels){_.font="10px "+E.fontMono,_.textAlign="left",_.textBaseline="top";let Pt=N+8,se=P+4;for(let ot=0;ot=1e6?(s/1e6).toFixed(1)+"M":h>=1e3?(s/1e3).toFixed(1)+"k":h>=1?s.toFixed(1):s.toPrecision(3)}_formatCount(s){return s===0?"0":s>=1e6?s/1e6+"M":s>=1e3?s/1e3+"k":String(s)}};var iv=class{constructor(s){this.onChange=s,this.roots=[],this._nodeMap=new Map}addFromSpec(s,h=null){let p=this._makeNode(s.id,h,s);if(p.checked=s.checked!==!1,s.children){for(let m of s.children)p.children.push(this.addFromSpec(m,p));p.hasCheckbox&&this._computeParent(p)}return h||this.roots.push(p),p}buildFromNodes(s){this._nodeMap.clear(),this.roots=[];for(let h of s)this._makeNode(h.id,null,h);for(let h of s){let p=this._nodeMap.get(h.id);if(h.parentId!=null&&this._nodeMap.has(h.parentId)){let m=this._nodeMap.get(h.parentId);p.parent=m,m.children.push(p)}else this.roots.push(p)}for(let h=s.length-1;h>=0;h--){let p=this._nodeMap.get(s[h].id);p.hasCheckbox&&p.children.length>0&&this._computeParent(p)}return this.roots}get(s){return this._nodeMap.get(s)}isVisible(s){let h=this.get(s);return h?h.checked:!1}check(s,h){let p=this._nodeMap.get(s);if(p){p.checked=h,p.indeterminate=!1;for(let m of p.children)this._setSubtree(m,h);for(let m=p.parent;m;m=m.parent)m.hasCheckbox&&this._computeParent(m);this.onChange()}}cascadeQuiet(s,h){let p=this._nodeMap.get(s);if(p){p.checked=h,p.indeterminate=!1;for(let m of p.children)this._setSubtree(m,h);for(let m=p.parent;m;m=m.parent)m.hasCheckbox&&this._computeParent(m)}}checkSet(s){for(let[h,p]of Object.entries(s)){let m=this._nodeMap.get(h);m&&(m.checked=p,m.indeterminate=!1)}this._recomputeAllParents(),this.onChange()}mirrorStates(s){this._applyMirror(s),this.onChange()}mirrorStatesQuiet(s){this._applyMirror(s)}_applyMirror(s){for(let[h,p]of Object.entries(s)){let m=this._nodeMap.get(h);m&&(m.checked=!!p.checked,m.indeterminate=!!p.indeterminate)}}forEach(s){let h=p=>{s(p);for(let m of p.children)h(m)};for(let p of this.roots)h(p)}_makeNode(s,h,p){let m={id:s,parent:h,children:[],hasCheckbox:p.hasCheckbox!==!1,checked:p.checked!==!1,indeterminate:!1,data:p.data!=null?p.data:p};return this._nodeMap.set(s,m),m}_checkboxDescendants(s){let h=[];for(let p of s.children)p.hasCheckbox?h.push(p):h.push(...this._checkboxDescendants(p));return h}_computeParent(s){let h=this._checkboxDescendants(s);if(h.length===0)return;let p=h.every(_=>_.checked&&!_.indeterminate),m=h.every(_=>!_.checked&&!_.indeterminate);s.checked=p,s.indeterminate=!p&&!m}_setSubtree(s,h){s.hasCheckbox&&(s.checked=h,s.indeterminate=!1);for(let p of s.children)this._setSubtree(p,h)}_recomputeAllParents(){let s=h=>{for(let p of h.children)s(p);h.hasCheckbox&&h.children.length>0&&this._computeParent(h)};for(let h of this.roots)s(h)}};var $Jt=["Instance","Module","Instances","Macros","Modules","Area","Local Inst","Local Macros","Local Modules"],bS={MODULE:0,LEAF_GROUP:1,TYPE_GROUP:2,INSTANCE:3,NAME_GROUP:4};function pk(d){return d===bS.MODULE||d===bS.NAME_GROUP}var fnt=class{constructor(s,h,p){this._app=h,this._redrawAllLayers=p,this._nodes=[],this._nameGrouped=!1,this._nameGroupsCapped=!1,this._rows=[],this._childrenMap=new Map,this._collapsed=new Set,this._moduleState=new Map,this._checkModel=null,this._build(s),h.hierarchyBrowser=this,Sc(h)&&this.update()}_build(s){let h=document.createElement("div");h.className="hierarchy-widget";let p=document.createElement("div");p.className="timing-toolbar",this._updateBtn=document.createElement("button"),this._updateBtn.className="or-btn",this._updateBtn.textContent="Update",Sc(this._app)&&(this._updateBtn.style.display="none"),this._statusLabel=document.createElement("span"),this._statusLabel.className="timing-path-count",p.appendChild(this._updateBtn),p.appendChild(this._statusLabel),h.appendChild(p),this._tableContainer=document.createElement("div"),this._tableContainer.className="hierarchy-table-container",this._table=document.createElement("table"),this._table.className="timing-table",this._tableContainer.appendChild(this._table),h.appendChild(this._tableContainer),s.element.appendChild(h),this._bindEvents()}_bindEvents(){this._updateBtn.addEventListener("click",()=>this.update())}async update(){this._updateBtn.disabled=!0,this._updateBtn.textContent="Loading...",this._statusLabel.textContent="";try{let s=await this._app.websocketManager.request({type:"module_hierarchy"});this._nodes=s.nodes||[],this._nameGrouped=!!s.name_grouped,this._nameGroupsCapped=!!s.name_groups_capped,this._buildTree(),this._readServerColors(),this._computeEffectiveColors(),this._render(),this._statusLabel.textContent=this._statusText(),await this._sendModuleColors()}catch(s){this._statusLabel.textContent="Error: "+s.message}this._updateBtn.disabled=!1,this._updateBtn.textContent="Update"}_statusText(){let s=this._nodes.filter(m=>pk(m.node_kind||0)).length;if(!this._nameGrouped)return s+" modules";let p=Math.max(0,s-1)+" groups from instance names \u2014 this design has no module hierarchy";return this._nameGroupsCapped&&(p+=" (truncated: too many groups)"),p}_buildTree(){this._childrenMap.clear(),this._collapsed.clear();for(let h of this._nodes)this._childrenMap.set(h.id,[]);for(let h of this._nodes)h.parent_id>=0&&this._childrenMap.has(h.parent_id)&&this._childrenMap.get(h.parent_id).push(h.id);this._nodeMap=new Map;for(let h of this._nodes)this._nodeMap.set(h.id,h);for(let h of this._nodes){let p=this._childrenMap.get(h.id);if(!p||p.length===0)continue;let m=h.node_kind||0;m===bS.LEAF_GROUP||m===bS.TYPE_GROUP?this._collapsed.add(h.id):pk(m)&&h.parent_id>=0&&this._collapsed.add(h.id)}this._rows=[];let s=this._nodes.filter(h=>h.parent_id<0);for(let h of s)this._dfs(h.id,0);this._checkModel=new iv(()=>{this._checkModel.forEach(h=>{if(!h.hasCheckbox)return;let p=this._moduleState.get(h.data.odb_id);p&&(p.visible=h.checked)}),this._sendModuleColors()}),this._checkModel.buildFromNodes(this._nodes.map(h=>({id:h.id,parentId:h.parent_id,hasCheckbox:pk(h.node_kind||0)&&h.odb_id!=null,checked:!0,data:h})))}_readServerColors(){this._moduleState.clear();for(let s of this._rows){let h=this._nodeMap.get(s.id);if(!h||!pk(h.node_kind||0)||h.odb_id==null)continue;let p=h.color||[128,128,128];this._moduleState.set(h.odb_id,{color:p,effectiveColor:p,visible:!0,nodeId:h.id})}}_computeEffectiveColors(){for(let s of this._rows){let h=this._nodeMap.get(s.id);if(!h||!pk(h.node_kind||0))continue;let p=this._moduleState.get(h.odb_id);if(!p)continue;let m=h.parent_id,_=null;for(;m>=0;){let E=this._nodeMap.get(m);if(!E)break;if(pk(E.node_kind||0)){let y=this._moduleState.get(E.odb_id);y&&this._collapsed.has(E.id)&&(_=y.effectiveColor)}m=E.parent_id}p.effectiveColor=_||p.color}}async _sendModuleColors(){let s=[];for(let[p,m]of this._moduleState){if(!m.visible)continue;let[_,E,y]=m.effectiveColor;s.push(`${p}:${_},${E},${y},100`)}let h=s.join(";");try{let p=await this._app.websocketManager.request({type:"set_module_colors",colors:h});console.log("set_module_colors:",p.count,"modules,",s.length,"sent")}catch(p){console.error("set_module_colors failed:",p)}this._redrawAllLayers()}_dfs(s,h){this._rows.push({id:s,depth:h});let p=this._childrenMap.get(s)||[];for(let m of p)this._dfs(m,h+1)}_render(){this._table.innerHTML="";let s=document.createElement("thead"),h=document.createElement("tr");for(let m of $Jt){let _=document.createElement("th");_.textContent=m,h.appendChild(_)}s.appendChild(h),this._table.appendChild(s);let p=document.createElement("tbody");for(let m of this._rows){let _=this._nodeMap.get(m.id);if(!_||this._isHidden(_))continue;let E=document.createElement("tr"),y=_.node_kind||0,N=(this._childrenMap.get(m.id)||[]).length>0,B=this._collapsed.has(m.id);y===bS.LEAF_GROUP||y===bS.TYPE_GROUP?(E.style.fontStyle="italic",E.style.color="var(--fg-disabled)"):y===bS.INSTANCE?E.style.color="var(--fg-secondary)":y===bS.NAME_GROUP&&(E.classList.add("hierarchy-name-group"),E.title="Recovered from instance names \u2014 this design has no module hierarchy");let P=document.createElement("td");if(P.style.paddingLeft=8+m.depth*16+"px",P.style.whiteSpace="nowrap",pk(y)&&_.odb_id!=null){let V=this._moduleState.get(_.odb_id),tt=this._checkModel?this._checkModel.get(_.id):null;if(V&&tt){let Q=document.createElement("input");Q.type="checkbox",Q.checked=tt.checked,Q.indeterminate=tt.indeterminate,Q.className="hierarchy-module-cb",tt.cb=Q,Q.addEventListener("change",Bt=>{Bt.stopPropagation(),this._checkModel.check(_.id,Q.checked),this._render()}),P.appendChild(Q);let X=document.createElement("span");X.className="hierarchy-color-swatch";let[gt,ft,xt]=V.effectiveColor;X.style.backgroundColor=`rgb(${gt},${ft},${xt})`,P.appendChild(X)}}if(N){let V=document.createElement("span");V.className="hierarchy-arrow",V.textContent=B?"\u25B6":"\u25BC",V.addEventListener("click",tt=>{tt.stopPropagation(),this._toggleNode(m.id)}),P.appendChild(V)}else{let V=document.createElement("span");V.className="hierarchy-arrow",V.style.visibility="hidden",V.textContent="\u25B6",P.appendChild(V)}let U=document.createElement("span");U.textContent=_.inst_name,P.appendChild(U),E.appendChild(P);let j=[_.module_name,yR(_.insts),yR(_.macros),yR(_.modules),this._fmtArea(_.area),yR(_.local_insts),yR(_.local_macros),yR(_.local_modules)];for(let V of j){let tt=document.createElement("td");tt.textContent=V,tt.style.textAlign="right",E.appendChild(tt)}E.children[1].style.textAlign="left",p.appendChild(E)}if(this._rows.length===0){let m=document.createElement("tr"),_=document.createElement("td");_.colSpan=$Jt.length,_.style.textAlign="center",_.style.color="var(--fg-secondary)",_.textContent=Sc(this._app)?"No hierarchy data available":'Click "Update" to load hierarchy',m.appendChild(_),p.appendChild(m)}this._table.appendChild(p),ak(this._table)}_isHidden(s){let h=s.parent_id;for(;h>=0;){if(this._collapsed.has(h))return!0;let p=this._nodeMap.get(h);if(!p)break;h=p.parent_id}return!1}_toggleNode(s){this._collapsed.has(s)?this._collapsed.delete(s):this._collapsed.add(s),this._computeEffectiveColors(),this._render(),this._sendModuleColors()}_fmtArea(s){if(s==null)return"";if(this._app.showDbu){let h=this._app.getDbuPerMicron();return String(Math.round(s*h*h))}return s>=1e6?(s/1e6).toFixed(3)+" mm\xB2":s.toFixed(3)+" \u03BCm\xB2"}};function yR(d){return d!=null?String(d):""}var Oke='',Bke='',Fke='',Uke='',zke='',jke='',Hke='',Gke='',Wke='',$ke='',Vke='',qke='';function VJt(d,s,h){h=h||s;let p=null,m=null,_=null,E=!1,y=10;function I(Kt,wn){return E?Promise.resolve():(E=!0,d.websocketManager.request({type:"set_property",name:Kt,use_dbu:d.showDbu,...wn}).then(it=>{!it.ok&&it.error&&nv(it.error),ki(it),it.ok&&it.bbox&&ln(it.bbox)}).catch(it=>{console.error("set_property failed:",it),nv("Edit failed: "+it),p&&ki(p)}).finally(()=>{E=!1}))}function N(Kt,wn){let it=document.createElement("select");it.className="inspector-editor-select";let ut=Kt.editor.type==="bool"?["True","False"]:Kt.editor.options||[];for(let kt of ut){let Nt=document.createElement("option");Nt.value=kt,Nt.textContent=kt,kt===Kt.value&&(Nt.selected=!0),it.appendChild(Nt)}if(!ut.includes(Kt.value)){let kt=document.createElement("option");kt.value=Kt.value||"",kt.textContent=Kt.value||"",kt.selected=!0,kt.disabled=!0,it.insertBefore(kt,it.firstChild)}return it.addEventListener("change",()=>{if(wn.onPropertyChange){wn.onPropertyChange(Kt.name,it.value);return}if(Kt.editor.type==="bool")wn.onPropertyEdit(Kt,{value:it.value==="True"});else{let kt=(Kt.editor.options||[]).indexOf(it.value);wn.onPropertyEdit(Kt,{option_index:kt,option_name:it.value})}}),it}async function B(Kt,wn){if(!E&&!(Kt==="Delete"&&!await tJt({title:"Delete "+(wn.type||"object"),message:"Delete "+(wn.type||"object")+' "'+(wn.name||"")+'"? This cannot be undone.',confirmLabel:"Delete",danger:!0}))){E=!0;try{let it=await d.websocketManager.request({type:"trigger_action",name:Kt,use_dbu:d.showDbu});!it.ok&&it.error&&nv(it.error),ki(it.properties?it:null),it.deleted&&d.highlightRect&&d.map&&(d.map.removeLayer(d.highlightRect),d.highlightRect=null),gt(),h()}catch(it){console.error("trigger_action failed:",it),nv("Action failed: "+it)}finally{E=!1}}}function P(Kt){d.websocketManager.request({...Kt,use_dbu:d.showDbu}).then(wn=>{!wn.ok&&wn.error&&nv(wn.error),ki(wn),h()}).catch(wn=>{console.error(Kt.type+" failed:",wn)})}function U(){let Kt=document.getElementById("highlight-picker");Kt&&Kt.remove()}function j(Kt,wn){U();let it=d.techData?.highlight_colors||[];if(!it.length)return;let ut=document.createElement("div");ut.id="highlight-picker";let kt=document.createElement("div");if(kt.className="highlight-swatch-grid",it.forEach((rn,Pn)=>{let Tt=document.createElement("button");Tt.className="highlight-swatch",Tt.title="Group "+(Pn+1),Tt.style.backgroundColor=`rgb(${rn[0]}, ${rn[1]}, ${rn[2]})`,Pn===wn.highlight_group&&Tt.classList.add("active"),Tt.addEventListener("click",()=>{U(),P({type:"highlight",group:Pn})}),kt.appendChild(Tt)}),ut.appendChild(kt),wn.highlight_group>=0){let rn=document.createElement("button");rn.className="highlight-remove",rn.textContent="Remove highlight",rn.addEventListener("click",()=>{U(),P({type:"unhighlight"})}),ut.appendChild(rn)}document.body.appendChild(ut);let Nt=Kt.getBoundingClientRect();ut.style.left=Nt.left+"px",ut.style.top=Nt.bottom+4+"px";let ie=rn=>{rn.type==="keydown"&&rn.key!=="Escape"||rn.type==="mousedown"&&ut.contains(rn.target)||(U(),document.removeEventListener("mousedown",ie,!0),document.removeEventListener("keydown",ie,!0))};setTimeout(()=>{document.addEventListener("mousedown",ie,!0),document.addEventListener("keydown",ie,!0)},0)}function V(){if(!d.inspectorEl)return;d.inspectorEl.innerHTML="";let Kt=document.createElement("div");Kt.className="stub-panel",Kt.innerHTML='
Loading\u2026
Fetching properties from server.
',d.inspectorEl.appendChild(Kt)}async function tt(Kt){let wn=d.focusNets.has(Kt)?"remove":"add";wn==="add"?d.focusNets.add(Kt):d.focusNets.delete(Kt);try{await d.websocketManager.request({type:"set_focus_nets",action:wn,net_name:Kt})}catch(it){console.error("set_focus_nets failed:",it)}s(),p&&ki(p)}async function Q(){d.focusNets.clear();try{await d.websocketManager.request({type:"set_focus_nets",action:"clear",net_name:""})}catch(Kt){console.error("set_focus_nets clear failed:",Kt)}s(),p&&ki(p)}async function X(Kt){let wn=d.routeGuideNets.has(Kt)?"remove":"add";wn==="add"?d.routeGuideNets.add(Kt):d.routeGuideNets.delete(Kt);try{await d.websocketManager.request({type:"set_route_guides",action:wn,net_name:Kt})}catch(it){console.error("set_route_guides failed:",it)}h(),p&&ki(p)}function gt(){d.hoverHighlightLayer&&(d.map.removeLayer(d.hoverHighlightLayer),d.hoverHighlightLayer=null)}function ft(){gt(),d.websocketManager.request({type:"hover",select_id:-1}).then(()=>{}).catch(()=>{})}function xt(Kt,wn,it,ut){let kt=L.latLngBounds(Vf(Kt,wn,it,ut,d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY));if(!d.map)return kt;let Nt=kt.getSouthWest(),ie=kt.getNorthEast(),rn=d.map.latLngToContainerPoint(Nt),Pn=d.map.latLngToContainerPoint(ie),Tt=Math.min(rn.x,Pn.x),yt=Math.max(rn.x,Pn.x),ue=Math.min(rn.y,Pn.y),fn=Math.max(rn.y,Pn.y),An=Tt,zn=yt,Li=ue,xi=fn;if(yt-TtL.rectangle(xt(wn,it,ut,kt),{color:"#ffe85c",weight:3,fill:!0,fillColor:"#fff27a",fillOpacity:.14,opacity:1,interactive:!1,className:"hover-highlight",pane:d.hoverHighlightPane}))).addTo(d.map))}function Ot(Kt,wn){Kt.classList.add("inspector-link"),Kt.addEventListener("click",it=>{it.stopPropagation(),se(wn)}),Kt.addEventListener("mouseenter",()=>{_!==null&&(d.websocketManager.cancel(_),_=null);let it=d.websocketManager.request({type:"hover",select_id:wn});_=it.requestId,it.then(ut=>{_=null,Bt(ut.rects||[]),h()}).catch(()=>{_=null})}),Kt.addEventListener("mouseleave",()=>{ft(),h()})}function Pt(Kt){let wn=Kt>0?"select_next":"select_prev";m!==null&&(d.websocketManager.cancel(m),m=null),V();let it=wg(d),ut=d.websocketManager.request({type:wn,use_dbu:d.showDbu});m=ut.requestId,ut.then(kt=>{if(m=null,!!N0(d,it)){if(kt.error){console.error("Selection cycle error:",kt.error),ki(p);return}if(ki(kt),kt.type==="Inst"&&kt.name&&(d.selectedInstanceName=kt.name,d.schematicWidget&&d.schematicWidget.refresh()),d.map&&d.map.closePopup(),gt(),d.highlightRect&&d.map&&(d.map.removeLayer(d.highlightRect),d.highlightRect=null),kt.bbox&&d.map&&d.designScale){let[Nt,ie,rn,Pn]=kt.bbox;kt.type!=="Inst"&&Lt(Nt,ie,rn,Pn,kt.type),kt.selection_count>1?re(kt.bbox):ln(kt.bbox,kt.type)}s()}}).catch(kt=>{m=null,console.error("Selection cycle failed:",kt),ki(p)})}function se(Kt){m!==null&&(d.websocketManager.cancel(m),m=null),V();let wn=wg(d),it=d.websocketManager.request({type:"inspect",select_id:Kt,use_dbu:d.showDbu});m=it.requestId,it.then(ut=>{if(m=null,!!N0(d,wn)){if(ut.error){console.error("Inspect error:",ut.error);return}if(ki(ut),d.map.closePopup(),gt(),d.highlightRect&&(d.map.removeLayer(d.highlightRect),d.highlightRect=null),ut.bbox&&d.map&&d.designScale){let[kt,Nt,ie,rn]=ut.bbox;ut.type!=="Inst"&&Lt(kt,Nt,ie,rn,ut.type),ln(ut.bbox,ut.type)}h()}}).catch(ut=>{m=null,console.error("Inspect failed:",ut)})}function ot(){m!==null&&(d.websocketManager.cancel(m),m=null),V();let Kt=wg(d),wn=d.websocketManager.request({type:"inspect_back",use_dbu:d.showDbu});m=wn.requestId,wn.then(it=>{if(m=null,!!N0(d,Kt)){if(it.error){console.error("Inspect back error:",it.error);return}if(ki(it),d.map.closePopup(),gt(),d.highlightRect&&(d.map.removeLayer(d.highlightRect),d.highlightRect=null),it.bbox&&d.map&&d.designScale){if(it.type!=="Inst"){let[ut,kt,Nt,ie]=it.bbox;Lt(ut,kt,Nt,ie,it.type)}ln(it.bbox,it.type)}h()}}).catch(it=>{m=null,console.error("Inspect back failed:",it)})}function Lt(Kt,wn,it,ut,kt){if(d.highlightRect&&(d.map.removeLayer(d.highlightRect),d.highlightRect=null),kt==="Net")return;let Nt=Vf(Kt,wn,it,ut,d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY);d.highlightRect=L.rectangle(Nt,{color:"#ff0",weight:2,fill:!1,dashArray:"6,4"}),d.visibility&&d.visibility.highlight_selected===!1||d.highlightRect.addTo(d.map)}let be=null;function ln(Kt,wn){if(!Kt||!d.map||!d.designScale||(ne!==null&&xe(),be&&(d.map.removeLayer(be),be=null),d.visibility&&d.visibility.highlight_selected===!1)||wn==="Net")return;let[it,ut,kt,Nt]=Kt,ie=Vf(it,ut,kt,Nt,d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY);be=L.rectangle(ie,{color:"#ff0",weight:3,fill:!0,fillColor:"#ff0",fillOpacity:.25,opacity:1,interactive:!1,className:"selection-pulse",pane:d.hoverHighlightPane}).addTo(d.map);let rn=be;setTimeout(()=>{rn&&d.map&&d.map.hasLayer(rn)&&d.map.removeLayer(rn),be===rn&&(be=null)},1100)}let Fn=null,ne=null;function xe(){ne!==null&&(clearInterval(ne),ne=null),Fn&&(d.map&&d.map.hasLayer(Fn)&&d.map.removeLayer(Fn),Fn=null)}function re(Kt,{repeats:wn=6,intervalMs:it=300}={}){if(!Kt||!d.map||!d.designScale)return;if(xe(),typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches){ln(Kt);return}let[ut,kt,Nt,ie]=Kt,rn=Vf(ut,kt,Nt,ie,d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY);Fn=L.rectangle(rn,{color:"#ff0",weight:1,fill:!0,fillColor:"#ff0",fillOpacity:.39,opacity:1,interactive:!1,pane:d.hoverHighlightPane}).addTo(d.map);let Pn=0,Tt=wn>0?wn*3:1/0;ne=setInterval(()=>{if(Pn+=1,Pn>=Tt){xe();return}let yt=Pn%3+1;Fn.setStyle({weight:yt,fillOpacity:yt===1?.39:0})},it)}d.clearSelectionPulse=function(){be&&(d.map.removeLayer(be),be=null)};function hn(Kt,wn,it){let ut=document.createElement("div");ut.className="inspector-group";let kt=document.createElement("div");kt.className="inspector-group-header";let Nt=document.createElement("span");Nt.className="vis-arrow";let ie=document.createElement("span");if(ie.className="inspector-prop-name",ie.textContent=Kt,ie.title=Kt,kt.appendChild(Nt),kt.appendChild(ie),wn!==null){let Pn=document.createElement("span");Pn.className="inspector-count",Pn.textContent=`(${wn})`,kt.appendChild(Pn)}ut.appendChild(kt);let rn=document.createElement("div");return rn.className="inspector-group-children"+(it?" collapsed":""),Nt.textContent=it?"\u25B6":"\u25BC",ut.appendChild(rn),kt.addEventListener("click",()=>{rn.classList.toggle("collapsed"),Nt.textContent=rn.classList.contains("collapsed")?"\u25B6":"\u25BC"}),{group:ut,header:kt,arrow:Nt,body:rn}}function Se(Kt){let wn=Kt.column_headers||[],it=Kt.row_headers||[],ut=Kt.data||[],kt=wn.some(Pn=>Pn!==""),Nt=it.some(Pn=>Pn!==""),ie=document.createElement("table");if(ie.className="inspector-table",kt){let Pn=document.createElement("thead"),Tt=document.createElement("tr");Nt&&Tt.appendChild(document.createElement("th"));for(let yt of wn){let ue=document.createElement("th");ue.textContent=yt,Tt.appendChild(ue)}Pn.appendChild(Tt),ie.appendChild(Pn)}let rn=document.createElement("tbody");return ut.forEach((Pn,Tt)=>{let yt=document.createElement("tr");if(Nt){let ue=document.createElement("th");ue.textContent=it[Tt]||"",yt.appendChild(ue)}for(let ue of Pn){let fn=document.createElement("td");fn.textContent=ue,yt.appendChild(fn)}rn.appendChild(yt)}),ie.appendChild(rn),ie}function ke(Kt,wn){if(Kt.table){let ie=(Kt.table.data||[]).length,{group:rn,body:Pn}=hn(Kt.name,ie,ie>=10),Tt=document.createElement("div");return Tt.className="inspector-table-scroll",Tt.appendChild(Se(Kt.table)),Pn.appendChild(Tt),rn}if(Kt.children){let ie=Kt.children.length<10,{group:rn,body:Pn}=hn(Kt.name,Kt.children.length,!ie);for(let Tt of Kt.children)Pn.appendChild(ke(Tt,wn));return rn}let it=document.createElement("div");it.className="inspector-prop";let ut=document.createElement("span");ut.className="inspector-prop-name",ut.textContent=Kt.name||"",ut.title=Kt.name||"";let kt=document.createElement("span");kt.className="inspector-prop-value",kt.textContent=Kt.value||"",it.appendChild(ut),it.appendChild(kt);let Nt=Kt.editable&&wn&&(wn.onPropertyEdit||wn.onPropertyChange)&&Kt.editor&&(Kt.editor.type==="list"||Kt.editor.type==="bool");if(Nt&&Kt.value_select_id===void 0)it.replaceChild(N(Kt,wn),kt);else if(Nt){let ie=document.createElement("button");ie.className="inspector-edit-btn",ie.title="Edit "+Kt.name,ie.textContent="\u270E",ie.addEventListener("click",rn=>{rn.stopPropagation();let Pn=N(Kt,wn);it.replaceChild(Pn,kt),ie.remove(),Pn.focus()}),it.appendChild(ie)}else Kt.editable&&wn&&(wn.onPropertyChange||wn.onPropertyEdit)&&(kt.contentEditable=!0,kt.classList.add("inspector-editable"),kt.addEventListener("blur",()=>{let ie=kt.textContent;if(ie!==Kt.value){if(wn.onPropertyChange){wn.onPropertyChange(Kt.name,ie);return}if(Kt.editor&&Kt.editor.type==="number"){let rn=Number(ie);if(ie.trim()===""||Number.isNaN(rn)){nv("Not a number: "+ie),kt.textContent=Kt.value;return}wn.onPropertyEdit(Kt,{value:rn});return}wn.onPropertyEdit(Kt,{value:ie})}}),kt.addEventListener("keydown",ie=>{ie.key==="Enter"&&(ie.preventDefault(),kt.blur()),ie.key==="Escape"&&(kt.textContent=Kt.value,kt.blur())}));return Kt.name_select_id!==void 0&&Kt.value_select_id===void 0?(Ot(it,Kt.name_select_id),ut.classList.add("inspector-link")):Kt.name_select_id!==void 0&&Ot(ut,Kt.name_select_id),Kt.value_select_id!==void 0&&Ot(kt,Kt.value_select_id),it}let mn=140,en=60,Qn=500,ge=mn;function Pe(){d.inspectorEl&&d.inspectorEl.style.setProperty("--inspector-name-w",ge+"px")}function ti(){let Kt=document.createElement("div");return Kt.className="inspector-col-resizer",Kt.title="Drag to resize the name column",Kt.addEventListener("mousedown",wn=>{wn.preventDefault();let it=wn.clientX,ut=ge;Kt.classList.add("dragging");let kt=ie=>{ge=Math.max(en,Math.min(Qn,ut+ie.clientX-it)),Pe()},Nt=()=>{Kt.classList.remove("dragging"),document.removeEventListener("mousemove",kt),document.removeEventListener("mouseup",Nt)};document.addEventListener("mousemove",kt),document.addEventListener("mouseup",Nt)}),Kt}function Yi(Kt){if(!Kt||!d.map||!d.designScale)return;let[wn,it,ut,kt]=Kt;d.map.fitBounds(Vf(wn,it,ut,kt,d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY),{padding:[20,20]})}function ki(Kt){if(!d.inspectorEl)return;if(p=Kt,d.inspectorEl.innerHTML="",!Kt||!Kt.properties||Kt.properties.length===0){xe();let kt=document.createElement("div");kt.className="stub-panel",kt.innerHTML='
Inspector
Select an object in the layout to inspect its properties.
',d.inspectorEl.appendChild(kt);return}if(!Kt.onPropertyChange&&!Kt.onPropertyEdit&&!Sc(d)&&(Kt.onPropertyEdit=(kt,Nt)=>I(kt.name,Nt)),Kt){let kt=document.createElement("div");kt.className="inspector-toolbar";let Nt=document.createElement("button");if(Nt.className="or-btn or-btn-icon",Nt.title="Back",Nt.innerHTML=Uke,Nt.disabled=!Kt.can_navigate_back,Nt.addEventListener("click",()=>ot()),kt.appendChild(Nt),Kt.bbox){let ie=document.createElement("button");ie.className="or-btn or-btn-icon",ie.title="Zoom to",ie.innerHTML=Fke,ie.addEventListener("click",()=>Yi(Kt.bbox)),kt.appendChild(ie)}if(Kt.type==="Net"&&Kt.name){let ie=d.focusNets.has(Kt.name),rn=document.createElement("button");rn.className="or-btn or-btn-icon",rn.title=ie?"De-focus net":"Focus net",rn.innerHTML=ie?jke:zke,rn.addEventListener("click",()=>tt(Kt.name)),kt.appendChild(rn)}if(Kt.type==="Net"&&Kt.name&&Kt.has_guides){let ie=d.routeGuideNets.has(Kt.name),rn=document.createElement("button");rn.className="or-btn or-btn-icon",rn.title=ie?"Hide route guides":"Show route guides",rn.innerHTML=ie?Gke:Hke,rn.addEventListener("click",()=>X(Kt.name)),kt.appendChild(rn)}if(Kt.type==="Net"&&Kt.name&&d.showInsertBufferDialog){let ie=document.createElement("button");ie.className="or-btn or-btn-icon",ie.title="Insert buffer",ie.innerHTML=qke,ie.addEventListener("click",()=>d.showInsertBufferDialog(Kt.name)),kt.appendChild(ie)}if(d.focusNets.size>0){let ie=document.createElement("button");ie.className="or-btn or-btn-icon",ie.title="Clear focus nets",ie.innerHTML=Wke,ie.addEventListener("click",()=>Q()),kt.appendChild(ie)}if(typeof Kt.highlight_group=="number"&&!Sc(d)&&(d.techData?.highlight_colors||[]).length){let ie=document.createElement("button");ie.className="or-btn or-btn-icon inspector-highlight-btn";let rn=Kt.highlight_group;if(ie.title=rn>=0?"Highlight group "+(rn+1):"Add to highlight group",ie.innerHTML=Bke,rn>=0){let Pn=d.techData.highlight_colors[rn];ie.style.backgroundColor=`rgba(${Pn[0]}, ${Pn[1]}, ${Pn[2]}, 0.45)`,ie.style.borderColor=`rgb(${Pn[0]}, ${Pn[1]}, ${Pn[2]})`}ie.addEventListener("click",()=>j(ie,Kt)),kt.appendChild(ie)}if(Array.isArray(Kt.actions)&&!Sc(d))for(let ie of Kt.actions){let rn=document.createElement("button");rn.className="or-btn inspector-action-btn",rn.title=ie,ie==="Delete"?(rn.classList.add("or-btn-icon","or-btn-danger-hover"),rn.innerHTML=Oke):(rn.classList.add("or-btn-sm"),rn.textContent=ie),rn.addEventListener("click",()=>B(ie,Kt)),kt.appendChild(rn)}d.inspectorEl.appendChild(kt)}let wn=Kt.selection_count||0,it=typeof Kt.selection_index=="number"?Kt.selection_index:-1;if(wn>1&&it>=0){let kt=document.createElement("div");kt.className="inspector-selection-nav";let Nt=document.createElement("button");Nt.className="or-btn or-btn-icon",Nt.title="Previous (Shift+click to multi-select)",Nt.innerHTML=$ke,Nt.addEventListener("click",()=>Pt(-1));let ie=document.createElement("span");ie.className="inspector-selection-label",ie.textContent=it+1+" / "+wn;let rn=document.createElement("button");rn.className="or-btn or-btn-icon",rn.title="Next",rn.innerHTML=Vke,rn.addEventListener("click",()=>Pt(1)),kt.appendChild(Nt),kt.appendChild(ie),kt.appendChild(rn),d.inspectorEl.appendChild(kt)}let ut=document.createElement("div");ut.className="inspector-rows";for(let kt of Kt.properties)ut.appendChild(ke(kt,Kt));ut.appendChild(ti()),d.inspectorEl.appendChild(ut),Pe()}function lr(Kt){let wn=document.createElement("div");wn.className="inspector",d.inspectorEl=wn,Kt.element.appendChild(wn),ki(null)}function pr(){if(p){if(p.type==="Ruler"){d.rulerManager&&d.rulerManager._selectedRulerId!==null&&d.rulerManager._selectRuler(d.rulerManager._selectedRulerId);return}d.websocketManager&&se(-1)}}return{createInspector:lr,updateInspector:ki,highlightBBox:Lt,pulseHighlight:ln,animateSelection:re,stopSelectionAnimation:xe,navigateInspector:se,refreshInspector:pr}}var dnt=class{constructor(s,h,p){this._app=h,this._refreshOverlay=p||(()=>{}),this._data={selection:[],groups:[],truncated:!1},this._tab="selected",this._filter="",this._sortKey=null,this._sortAsc=!0,this._pendingRefresh=null,this._inFlight=!1,this._staleWhileInFlight=!1,this._visible=!0,this._el=document.createElement("div"),this._el.className="selection-browser",s.element.appendChild(this._el),s.on?.("show",()=>{this._visible=!0,this.refresh()}),s.on?.("hide",()=>{this._visible=!1}),s.on?.("destroy",()=>{this._visible=!1,this._staleWhileInFlight=!1,this._pendingRefresh!==null&&(clearTimeout(this._pendingRefresh),this._pendingRefresh=null)}),this._render(),this.refresh()}scheduleRefresh(){!this._visible||this._pendingRefresh!==null||(this._pendingRefresh=setTimeout(()=>{this._pendingRefresh=null,this.refresh()},150))}refresh(){if(!this._visible||Sc(this._app))return;if(this._inFlight){this._staleWhileInFlight=!0;return}this._inFlight=!0;let s=()=>{this._inFlight=!1,this._staleWhileInFlight&&(this._staleWhileInFlight=!1,this.refresh())};this._app.websocketManager.request({type:"list_selection"}).then(h=>{h.ok&&(this._data=h,this._render()),s()}).catch(s)}_entries(){let s;this._tab==="selected"?s=(this._data.selection||[]).map((p,m)=>({row:p,index:m,group:-1})):s=(this._data.groups||[]).flatMap((p,m)=>p.map((_,E)=>({row:_,index:E,group:m})));let h=this._filter.trim().toLowerCase();if(h&&(s=s.filter(({row:p})=>(p.name||"").toLowerCase().includes(h)||(p.type||"").toLowerCase().includes(h))),this._sortKey){let p=this._sortKey,m=this._sortAsc?1:-1;s=s.slice().sort((_,E)=>m*String(_.row[p]||"").localeCompare(String(E.row[p]||"")))}return s}_fmtCoord(s){if(this._app.showDbu)return String(s);let h=this._app.getDbuPerMicron?this._app.getDbuPerMicron():1e3;return(s/h).toFixed(3)}_fmtBounds(s){if(!s)return"";let[h,p,m,_]=s;return`(${this._fmtCoord(h)}, ${this._fmtCoord(p)}), (${this._fmtCoord(m)}, ${this._fmtCoord(_)})`}_inspectRow(s,h){let p=s.group<0?{type:"inspect_selection",index:s.index,use_dbu:this._app.showDbu}:{type:"inspect_group",group:s.group,index:s.index,use_dbu:this._app.showDbu};this._app.websocketManager.request(p).then(m=>{if(!m.ok){this.refresh();return}this._app.updateInspector&&this._app.updateInspector(m),h&&this._app.focusComponent&&this._app.focusComponent("Inspector"),this._refreshOverlay()}).catch(()=>{})}_deselectRow(s){this._app.websocketManager.request({type:"deselect",index:s.index}).then(()=>{this.refresh(),this._refreshOverlay()}).catch(()=>{})}_clearHighlights(){this._app.websocketManager.request({type:"clear_highlights",group:-1}).then(()=>{this.refresh(),this._refreshOverlay(),this._app.refreshInspector&&this._app.refreshInspector()}).catch(()=>{})}_zoomToBBox(s){if(!s||!this._app.designScale||!this._app.map)return;let[h,p,m,_]=s,E=this._app.getDbuPerMicron?this._app.getDbuPerMicron():1e3,y=Math.min(10*E,2*Math.max(m-h,_-p));this._app.map.fitBounds(Vf(h-y,p-y,m+y,_+y,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY))}_render(){this._app.stopSelectionAnimation&&this._app.stopSelectionAnimation(),this._el.innerHTML="";let s=(this._data.selection||[]).length,h=(this._data.groups||[]).reduce((E,y)=>E+y.length,0),p=document.createElement("div");p.className="sb-tabs";for(let[E,y,I]of[["selected","Selected",s],["highlighted","Highlighted",h]]){let N=document.createElement("button");N.className="sb-tab"+(this._tab===E?" active":""),N.textContent=`${y} (${I})`,N.addEventListener("click",()=>{this._tab=E,this._render()}),p.appendChild(N)}let m=document.createElement("button");if(m.className="or-btn or-btn-sm sb-tool",m.title="Refresh",m.textContent="\u27F3",m.addEventListener("click",()=>this.refresh()),p.appendChild(m),this._tab==="highlighted"&&h>0){let E=document.createElement("button");E.className="or-btn or-btn-sm sb-tool",E.title="Clear all highlights",E.textContent="Clear",E.addEventListener("click",()=>this._clearHighlights()),p.appendChild(E)}this._el.appendChild(p);let _=document.createElement("input");if(_.type="text",_.className="sb-filter",_.placeholder="Filter by name or type\u2026",_.value=this._filter,_.addEventListener("input",()=>{this._filter=_.value,this._renderTable()}),this._el.appendChild(_),this._data.truncated){let E=document.createElement("div");E.className="sb-truncated",E.textContent="List truncated \u2014 showing the first 1000 entries per set.",this._el.appendChild(E)}this._tableWrap=document.createElement("div"),this._tableWrap.className="sb-table-wrap",this._el.appendChild(this._tableWrap),this._renderTable()}_renderTable(){this._tableWrap.innerHTML="";let s=this._entries();if(!s.length){let I=document.createElement("div");I.className="sb-empty",I.textContent=this._tab==="selected"?"Nothing selected.":"Nothing highlighted.",this._tableWrap.appendChild(I);return}let h=document.createElement("table");h.className="sb-table";let p=document.createElement("thead"),m=document.createElement("tr"),_=[["name","Object"],["type","Type"],[null,"Bounds"]];this._tab==="highlighted"&&_.push([null,"Group"]),_.push([null,""]);for(let[I,N]of _){let B=document.createElement("th");B.textContent=N,I&&(B.classList.add("sb-sortable"),this._sortKey===I&&(B.textContent+=this._sortAsc?" \u25B2":" \u25BC"),B.addEventListener("click",()=>{this._sortKey===I?this._sortAsc=!this._sortAsc:(this._sortKey=I,this._sortAsc=!0),this._renderTable()})),m.appendChild(B)}p.appendChild(m),h.appendChild(p);let E=document.createElement("tbody"),y=this._app.techData?.highlight_colors||[];for(let I of s){let N=document.createElement("tr");N.className="sb-row";let B=document.createElement("td");B.textContent=I.row.name||"";let P=document.createElement("td");P.textContent=I.row.type||"";let U=document.createElement("td");if(U.textContent=this._fmtBounds(I.row.bbox),N.appendChild(B),N.appendChild(P),N.appendChild(U),this._tab==="highlighted"){let V=document.createElement("td"),tt=document.createElement("span");tt.className="sb-chip";let Q=y[I.group];Q&&(tt.style.backgroundColor=`rgb(${Q[0]}, ${Q[1]}, ${Q[2]})`),V.appendChild(tt),V.appendChild(document.createTextNode(` Group ${I.group+1}`)),N.appendChild(V)}let j=document.createElement("td");if(j.className="sb-actions",I.row.bbox){let V=document.createElement("button");V.className="sb-row-btn",V.title="Zoom to",V.textContent="\u2316",V.addEventListener("click",tt=>{tt.stopPropagation(),this._zoomToBBox(I.row.bbox)}),j.appendChild(V)}if(this._tab==="selected"){let V=document.createElement("button");V.className="sb-row-btn",V.title="De-select",V.textContent="\u2715",V.addEventListener("click",tt=>{tt.stopPropagation(),this._deselectRow(I)}),j.appendChild(V)}N.appendChild(j),N.addEventListener("click",()=>this._inspectRow(I,!1)),N.addEventListener("dblclick",()=>this._inspectRow(I,!0)),I.row.bbox&&(N.addEventListener("mouseenter",()=>{this._app.animateSelection&&this._app.animateSelection(I.row.bbox,{repeats:0})}),N.addEventListener("mouseleave",()=>{this._app.stopSelectionAnimation&&this._app.stopSelectionAnimation()})),E.appendChild(N)}h.appendChild(E),this._tableWrap.appendChild(h),ak(h)}};var XJt="options-dialog",qJt=[{label:"System default",value:""},{label:"Sans-serif",value:"sans-serif"},{label:"Serif",value:"serif"},{label:"Monospace",value:"monospace"},{label:"Helvetica / Arial",value:"Helvetica, Arial, sans-serif"},{label:"Georgia",value:"Georgia, 'Times New Roman', serif"},{label:"Courier",value:"'Courier New', Courier, monospace"}],Xke=100,pnt=70,gnt=200;function $U(d){let s=d===""||d===null?NaN:Math.round(Number(d));return Number.isFinite(s)?Math.min(gnt,Math.max(pnt,s)):Xke}function ZJt(d){let{overlay:s,close:h,okBtn:p,showError:m}=vR("Arrow keys scroll step",`
+ min="${FU}" max="${UU}" step="1" + value="${bR(d.arrowStep)}">
How far one arrow-key press pans the layout. - Default ${D2t}.
`,"Apply",LJt),_=s.querySelector(".opt-step");_.focus(),_.select();function S(){let y=_.value.trim(),R=Number(y);if(y===""||!Number.isFinite(R)){m("Step must be a number.");return}if(RFU){m(`Step must be between ${BU} and ${FU} px.`);return}d.setArrowStep(R),h()}return g.addEventListener("click",S),_.addEventListener("keydown",y=>{y.key==="Enter"&&(y.preventDefault(),S())}),{close:h}}function IJt(d){let s=d.fontFamily||"",h=kJt.some(q=>q.value===s),g=kJt.map(q=>``).join("")+(h?"":``),{overlay:m,close:_,okBtn:S,showError:y}=mR("Application font",` + Default ${D2t}.
`,"Apply",XJt),_=s.querySelector(".opt-step");_.focus(),_.select();function E(){let y=_.value.trim(),I=Number(y);if(y===""||!Number.isFinite(I)){m("Step must be a number.");return}if(IUU){m(`Step must be between ${FU} and ${UU} px.`);return}d.setArrowStep(I),h()}return p.addEventListener("click",E),_.addEventListener("keydown",y=>{y.key==="Enter"&&(y.preventDefault(),E())}),{close:h}}function YJt(d){let s=d.fontFamily||"",h=qJt.some(V=>V.value===s),p=qJt.map(V=>``).join("")+(h?"":``),{overlay:m,close:_,okBtn:E,showError:y}=vR("Application font",`
- +
+ value="${h?"":J2t(s)}">
+ min="${pnt}" max="${gnt}" step="5" + value="${$U(d.fontScale)}">
The quick brown fox jumps over the lazy dog 0123456789
Applies to the panels, menus and console. Text drawn into the layout is rendered on the server and is not - affected.
`,"Apply",LJt),R=m.querySelector(".opt-family"),N=m.querySelector(".opt-custom"),B=m.querySelector(".opt-scale"),P=m.querySelector(".opt-preview");function U(){P.style.fontFamily=N.value.trim()||R.value,P.style.fontSize=`calc(13px * ${jU(B.value)/100})`}for(let q of[R,N,B])q.addEventListener("input",U);U();function W(){let q=B.value.trim(),nt=Number(q);if(q===""||!Number.isFinite(nt)){y("Size must be a number.");return}if(ntint){y(`Size must be between ${nnt} and ${int} %.`);return}d.setAppFont({family:N.value.trim()||R.value,scale:nt}),_()}S.addEventListener("click",W);for(let q of[N,B])q.addEventListener("keydown",nt=>{nt.key==="Enter"&&(nt.preventDefault(),W())});return{close:_}}function H2t(d){return String(d).replace(/&/g,"&").replace(/"/g,""").replace(//g,">")}var Pke='',Ike='';function wR(d){let s=document.createElement("span");return s.className="vis-name",d!=null&&(s.textContent=d),s}function gS(){let d=document.createElement("span");return d.className="vis-sel-cb vis-sel-spacer",d}function RJt(){let d=document.createElement("div");d.className="display-controls-header",d.appendChild(wR(""));for(let[s,h]of[[Pke,"Visible"],[Ike,"Selectable"]]){let g=document.createElement("span");g.className="vis-header-icon",g.title=h,g.innerHTML=s,d.appendChild(g)}return d}var rnt=class{constructor(s,h,g){this.visibility=s,this.selectability=h,this.onChange=g;let m=()=>{this._syncAll(),this.onChange()};this.model=new nv(m),this.selModel=new nv(m)}add(s){return this.model.addFromSpec(this._enrichSpec(s,"")),this.selModel.addFromSpec(this._enrichSelSpec(s,"",!1)),this}render(s){for(let h of this.model.roots)s.appendChild(this._dom(h));this._syncAll()}_nodeId(s,h){let g=s.key||s.label;return h?h+"/"+g:g}_enrichSpec(s,h){let g=this._nodeId(s,h),m={id:g,data:s};return s.children?m.children=s.children.map(_=>this._enrichSpec(_,g)):s.key&&(m.checked=!!this.visibility[s.key]),s.disabled!=null&&(m.disabled=s.disabled),m}_enrichSelSpec(s,h,g){let m=s.addSelectable===!0?!0:s.addSelectable===!1?!1:g,_=this._nodeId(s,h),S={id:_,data:s,hasCheckbox:!1};if(s.children){S.children=s.children.map(R=>this._enrichSelSpec(R,_,m));let y=R=>R.some(N=>N.hasCheckbox||N.children&&y(N.children));S.hasCheckbox=y(S.children),S.hasCheckbox&&(S.checked=!0)}else if(s.key){let y=s.selectable===!0||s.selectable!==!1&&g;S.hasCheckbox=y,y&&(S.checked=this.selectability[s.key]!==!1)}return S}_syncAll(){this.model.forEach(s=>{s.cb&&(s.cb.checked=s.checked,s.cb.indeterminate=s.indeterminate);let h=s.data;h.key&&(this.visibility[h.key]=s.checked),h.visKey&&(this.visibility[h.visKey]=s.checked||s.indeterminate)}),this.selModel.forEach(s=>{if(!s.hasCheckbox)return;let h=s.data;if(h.key&&(this.selectability[h.key]=s.checked),!s.selCb)return;s.selCb.checked=s.checked,s.selCb.indeterminate=s.indeterminate;let g=this.model.get(s.id),m=g&&!g.checked&&!g.indeterminate;s.selCb.disabled=m,s.selLabel&&s.selLabel.classList.toggle("vis-sel-disabled",m)}),this.model.forEach(s=>{let h=s.data;if(h.disabledBy&&s.el){let g=!this.visibility[h.disabledBy];s.el.classList.toggle("disabled",g)}})}_buildSelCheckbox(s){let h=this.selModel.get(s.id);if(!h||!h.hasCheckbox)return null;let g=document.createElement("input");return g.type="checkbox",g.className="vis-sel-cb",g.title="Selectable",g.addEventListener("change",()=>{this.selModel.check(h.id,g.checked)}),h.selCb=g,g}_dom(s){let h=s.data,g=document.createElement("input");g.type="checkbox",g.className="vis-cb",g.title="Visible",s.cb=g,g.addEventListener("change",()=>this.model.check(s.id,g.checked));let m=this._buildSelCheckbox(s),_=P=>{if(P.appendChild(g),m){P.appendChild(m);let U=this.selModel.get(s.id);U&&(U.selLabel=P)}else P.appendChild(gS())};if(!s.children.length){let P=document.createElement("div");P.className="vis-leaf";let U=document.createElement("span");return U.className="vis-arrow",U.style.visibility="hidden",U.textContent="\u25B6",P.appendChild(U),P.appendChild(wR(h.label)),_(P),s.el=P,P}let S=document.createElement("div");S.className="vis-group";let{header:y,arrow:R,name:N}=rk();N.textContent=h.label,_(y),S.appendChild(y);let B=document.createElement("div");B.className="vis-group-children",h.disabled&&B.classList.add("disabled");for(let P of s.children)B.appendChild(this._dom(P));return S.appendChild(B),sk(y,R,B,!0),S}};function HU(d,s,h,g){let m=new Set,_=Math.max(0,d-s),S=Math.min(g-1,d+h);for(let y=_;y<=S;y++)m.add(y);return m}function Rke(d){let s={};for(let[h,g]of Object.entries(d||{}))g!==1&&(s[h]=g);return s}function snt(d,s){return(d||[]).some(h=>h.every(g=>!!s[g]))}function Dke(d,s){return d.map(h=>{let g=!s.has(h.path);return{id:h.path,parentId:h.parent!=null?h.parent:null,hasCheckbox:h.parent!=null,checked:g,data:{path:h.path,name:h.name,master:h.master,depth:h.depth}}})}var DJt=[[70,130,210],[200,50,50],[50,180,80],[200,160,40],[160,60,200],[40,190,190],[220,120,50],[180,70,150]];function NJt(d,s,h,g,m,_,S){if(!d.displayControlsEl)return;d.displayControlsEl.innerHTML="",d.allLayers=[],d.displayControlsEl.appendChild(RJt());let y=d.mergeTiles?d.MergedTileLayer:null,R=new Set;function N(){for(let Jt of R)Jt.refreshTiles();R.clear()}function B(Jt,nn){if(!y){let he=new g(d.websocketManager,Jt,{opacity:1,zIndex:nn});return he._orShow=()=>he.addTo(d.map),he._orHide=()=>d.map.removeLayer(he),he}let vn={layer:Jt,opacity:1,visible:!1};return{_orItem:vn,_orPane:null,refreshTiles(){this._orPane&&(R.add(this._orPane),N())},_orShow(){k2t(vn,!0)&&this._orPane&&R.add(this._orPane)},_orHide(){k2t(vn,!1)&&this._orPane&&R.add(this._orPane)}}}function P(Jt,nn,vn,he){let Mn=new g(d.websocketManager,Jt,{zIndex:vn});return he&&Mn.addTo(d.map),nn&&(d[nn]=Mn),d.allLayers.push(Mn),Mn}P("_instances",null,0,!0),P("_pins","pinsLayer",1,s.pins),P("_modules","modulesLayer",2,s.module_view),d.overlayLayers=(m&&m.overlays||[]).map(Jt=>({def:Jt,layer:P(Jt.name,null,Jt.z_index,snt(Jt.shown_by,s))}));let U=[],W=[],q=null,nt=new Set,Q=new Set;try{let Jt=window.sessionStorage.getItem("or_hidden_layers");Jt&&(nt=new Set(JSON.parse(Jt)))}catch{}try{let Jt=window.sessionStorage.getItem("or_nonselectable_layers");Jt&&(Q=new Set(JSON.parse(Jt)))}catch{}try{let Jt=window.sessionStorage.getItem("or_layer_patterns");Jt&&Object.assign(d.layerPatterns,JSON.parse(Jt))}catch{}function X(){try{window.sessionStorage.setItem("or_layer_patterns",JSON.stringify(Rke(d.layerPatterns)))}catch{}}function gt(Jt,nn,vn){vn===1?delete d.layerPatterns[Jt]:d.layerPatterns[Jt]=vn,X(),nn&&typeof nn.refreshTiles=="function"&&nn.refreshTiles()}let ft=[{label:"Solid",value:1},{label:"Diagonal",value:2},{label:"Cross",value:3},{label:"Dots",value:4},{label:"None (no fill)",value:0}],xt=0,Bt=3;function Ot(Jt,nn="layers",vn=void 0){let he=[],Mn=Jt.type==="category"?vn:Jt.path,Sn=Jt.flipped===!0,gn=Jt.instances||[],Ce=gn.filter(Qt=>Qt.type!=="category"),dn=gn.filter(Qt=>Qt.type==="category"),jn=Jt.layers||[],ar=xt;xt+=jn.length;function gr(Qt,Mi){let sn=Qt.map((Zn,oi)=>oi);Mi&&sn.reverse(),sn.forEach(Zn=>{let oi=Qt[Zn],Jr=nn+"/"+(oi.name||Zn);he.push(Ot(oi,Jr,Mn))})}function tr(){(Sn?jn.map((Mi,sn)=>sn).reverse():jn.map((Mi,sn)=>sn)).forEach(Mi=>{let sn=jn[Mi],Zn=sn.name||sn,oi=ar+Mi,Jr=Bt++,Bs=B(Zn,Jr),Oc=`${nn}/${Zn}`;Bs._nodeId=Oc;let ru=!nt.has(Oc);ru&&(Bs._orShow(),d.visibleLayers.add(Oc),d.visibleLayerNames.add(Zn)),y||d.allLayers.push(Bs),U.push(Bs),W.push(Oc),he.push({id:Oc,data:{name:Zn,layer:Bs,color:sn.color,colorIndex:oi,nodeId:Oc,ownerChipletPath:Mn},checked:ru})})}gr(Ce,!1),Sn&&tr(),gr(dn,Sn),Sn||tr();let Ln={name:Jt.name,isInstance:!0};return Jt.type==="category"&&(Jt.name==="Implant"||Jt.name==="Other")&&(Ln.startCollapsed=!0),Jt.type!=="category"&&(Ln.chipletPath=Jt.path),{id:nn,data:Ln,children:he}}let Pt;if(m.layer_hierarchy?Pt=Ot(m.layer_hierarchy,"layers_parent"):Pt={id:"layers_parent",children:m.layers.map((Jt,nn)=>{let vn=B(Jt,nn+3),he=`layers_parent/${Jt}`;vn._nodeId=he;let Mn=!nt.has(he);return Mn&&(vn._orShow(),d.visibleLayers.add(he),d.visibleLayerNames.add(Jt)),y||d.allLayers.push(vn),U.push(vn),W.push(he),{id:he,data:{name:Jt,layer:vn,colorIndex:nn,nodeId:he},checked:Mn}})},y&&U.length>0){let vn=function(){let{width:dn,height:jn}=zKt(d.map.getContainer()),ar=tv(),gr=UKt(dn,jn,ar),tr=FKt(ar,d.tileDpr?d.tileDpr():1);return{count:d.mergeGroupCount||HKt({budgetBytes:jKt(nn,gr,tr),tilesPerPane:gr,bytesPerTile:tr,paneCount:Jt.length}),tilesPerPane:gr,perTile:tr}},he=function(dn,jn,ar){let gr=(dn+Vet)*jn*ar;return{layers:Jt.length,groups:dn,tilesPerPane:jn,unmergedPanes:Vet,budgetMB:Math.round(nn/(1024*1024)),estimatedMB:Math.round(gr/(1024*1024))}},Mn=function(dn,jn){let ar=0;jn.forEach((gr,tr)=>{for(let Ln=0;Lndn._orItem),nn=d.tileBudgetBytes||A2t,Sn=vn(),gn=L2t(Jt,Sn.count),Ce=VKt(y,d.websocketManager,gn,d.map,3);Mn(Ce,gn),d.allLayers.push(...Ce),d.mergedPanes=Ce,d.mergeStats=he(Ce.length,Sn.tilesPerPane,Sn.perTile),console.log("[tiles] merged %d layers into %d panes (~%d MB of %d MB budget, %d tiles/pane)",d.mergeStats.layers,d.mergeStats.groups,d.mergeStats.estimatedMB,d.mergeStats.budgetMB,Sn.tilesPerPane),d.map.on("resize",()=>{let dn=vn();if(dn.count>=d.mergedPanes.length)return;let jn=L2t(Jt,dn.count),ar=d.mergedPanes.slice(0,jn.length);for(let gr of d.mergedPanes.slice(jn.length)){d.map.removeLayer(gr);let tr=d.allLayers.indexOf(gr);tr>=0&&d.allLayers.splice(tr,1)}d.mergedPanes=ar,Mn(ar,jn),ar.forEach((gr,tr)=>gr.setItems(jn[tr])),d.mergeStats=he(ar.length,dn.tilesPerPane,dn.perTile),console.log("[tiles] window grew \u2014 regrouped %d layers into %d panes (~%d MB of %d MB budget, %d tiles/pane)",d.mergeStats.layers,d.mergeStats.groups,d.mergeStats.estimatedMB,d.mergeStats.budgetMB,dn.tilesPerPane)})}function se(Jt){if(!Jt.children||Jt.children.length===0){let nn=Jt.data&&Jt.data.name,vn=nn?!Q.has(nn):!0;return vn&&nn&&d.selectableLayers.add(nn),{id:Jt.id,data:{name:nn},checked:vn}}return{id:Jt.id,data:{name:Jt.data&&Jt.data.name},children:Jt.children.map(se)}}let ot=se(Pt),Lt=new nv(()=>{d.visibleLayerNames.clear();let Jt=[],nn={},vn=!1,he=!1,Mn=q&&d.visibleChiplets instanceof Set;Lt.forEach(gn=>{if(gn.cb&&(gn.cb.checked=gn.checked,gn.cb.indeterminate=gn.indeterminate),gn.data&&gn.data.layer){let Ce=gn.data.nodeId||gn.data.name;Jt.push(Ce),gn.checked?(gn.data.layer._orShow(),d.visibleLayers.add(Ce),d.visibleLayerNames.add(gn.data.name)):(gn.data.layer._orHide(),d.visibleLayers.delete(Ce))}if(Mn&&gn.data&&gn.data.chipletPath){let Ce=gn.data.chipletPath,dn=q.get(Ce);if(dn){let jn=gn.checked||gn.indeterminate,ar={checked:gn.checked,indeterminate:gn.indeterminate};(dn.checked!==gn.checked||dn.indeterminate!==gn.indeterminate)&&(nn[Ce]=ar,vn=!0),d.visibleChiplets.has(Ce)!==jn&&(he=!0)}}}),N(),ln(),d.pinsLayer&&d.map.hasLayer(d.pinsLayer)&&d.pinsLayer.refreshTiles();for(let{def:gn,layer:Ce}of d.overlayLayers||[])snt(gn.layers_by,s)&&d.map.hasLayer(Ce)&&Ce.refreshTiles();let Sn=Jt.filter(gn=>!d.visibleLayers.has(gn));try{window.sessionStorage.setItem("or_hidden_layers",JSON.stringify(Sn))}catch{}d.syncDisplayState(),he?q.mirrorStates(nn):vn&&(q.mirrorStatesQuiet(nn),q.forEach(gn=>{gn.cb&&(gn.cb.checked=gn.checked,gn.cb.indeterminate=gn.indeterminate)}))});d.layerModel=Lt,Lt.addFromSpec(Pt);let be=new nv(()=>{d.selectableLayers.clear(),be.forEach(nn=>{nn.checked&&nn.data&&nn.data.name&&d.selectableLayers.add(nn.data.name)}),ln();let Jt=m.layers.filter(nn=>!d.selectableLayers.has(nn));try{window.sessionStorage.setItem("or_nonselectable_layers",JSON.stringify(Jt))}catch{}d.syncDisplayState()});be.addFromSpec(ot);function ln(){be.forEach(Jt=>{if(!Jt.selCb)return;Jt.selCb.checked=Jt.checked,Jt.selCb.indeterminate=Jt.indeterminate;let nn=Lt.get(Jt.id),vn=nn&&!nn.checked&&!nn.indeterminate;Jt.selCb.disabled=vn})}let Fn=document.createElement("div");Fn.className="context-menu",Fn.style.display="none",document.body.appendChild(Fn);function ne(Jt){let nn={};W.forEach((vn,he)=>{vn&&(nn[vn]=Jt.has(he))}),Lt.checkSet(nn)}function xe(){Fn.style.display="none"}function re(Jt,nn){let vn=document.createElement("div");vn.className="context-menu-item",vn.textContent=Jt,vn.addEventListener("click",()=>{nn(),xe()}),Fn.appendChild(vn)}let hn=U.length,Se=[{label:"Show only this layer",fn:Jt=>HU(Jt,0,0,hn)},{label:"Show layer range \u2195",fn:Jt=>HU(Jt,1,1,hn)},{label:"Show layer range \u2195\u2195",fn:Jt=>HU(Jt,2,2,hn)},{label:"Show layer range \u2193",fn:Jt=>HU(Jt,1,0,hn)},{label:"Show layer range \u2191",fn:Jt=>HU(Jt,0,1,hn)}];document.addEventListener("click",Jt=>{Fn.contains(Jt.target)||xe()}),document.addEventListener("keydown",Jt=>{Jt.key==="Escape"&&xe()});let ke=!Sc(d),mn=null;function en(){mn&&(mn.classList.remove("vis-row-selected"),mn=null)}ke&&sJt(d,en);function Qn(Jt,nn,vn){let he=wg(d);mn=Jt,Jt.classList.add("vis-row-selected");let Mn={type:"select_layer",layer:nn,use_dbu:d.showDbu};vn&&(Mn.chiplet=vn),d.websocketManager.request(Mn).then(Sn=>{B0(d,he)&&(d.updateInspector&&d.updateInspector(Sn),d.focusComponent&&d.focusComponent("Inspector"),d.refreshOverlay&&d.refreshOverlay())}).catch(Sn=>{console.error("select_layer failed:",Sn),B0(d,he)&&en()})}function ge(Jt,nn=!1){let vn=be.get(Jt.id);if(!Jt.children||Jt.children.length===0){let he=document.createElement("div");he.className=ke?"vis-leaf vis-leaf-selectable":"vis-leaf";let Mn=document.createElement("span");Mn.className="vis-arrow",Mn.style.visibility="hidden",Mn.textContent="\u25B6",he.appendChild(Mn);let Sn=Jt.data.colorIndex,gn=Jt.data.name,Ce=wR(),dn=document.createElement("span");dn.className="layer-color";let jn=Jt.data.color||m.layer_colors&&m.layer_colors[Sn]||DJt[Sn%DJt.length];dn.style.backgroundColor=`rgb(${jn[0]},${jn[1]},${jn[2]})`,Ce.appendChild(dn),Ce.appendChild(document.createTextNode(gn)),he.appendChild(Ce),ke&&Ce.addEventListener("click",()=>{Qn(he,gn,Jt.data.ownerChipletPath)});let ar=document.createElement("input");if(ar.type="checkbox",ar.className="vis-cb",ar.title="Visible",ar.checked=Jt.checked,Jt.cb=ar,ar.addEventListener("change",()=>{Lt.check(Jt.id,ar.checked)}),he.appendChild(ar),vn){let gr=document.createElement("input");gr.type="checkbox",gr.className="vis-sel-cb",gr.title="Selectable",gr.checked=vn.checked,vn.selCb=gr,gr.addEventListener("change",()=>{be.check(Jt.id,gr.checked)}),he.appendChild(gr)}else he.appendChild(gS());return he.addEventListener("contextmenu",gr=>{gr.preventDefault(),gr.stopPropagation(),Fn.innerHTML="";for(let Qt of Se)re(Qt.label,()=>ne(Qt.fn(Sn)));let tr=document.createElement("div");tr.className="context-menu-separator",tr.style.borderTop="1px solid #555",tr.style.margin="4px 0",Fn.appendChild(tr);let Ln=d.layerPatterns[gn]??1;for(let Qt of ft){let Mi=Ln===Qt.value?"\u25CF ":" ";re(Mi+"Fill: "+Qt.label,()=>gt(gn,Jt.data.layer,Qt.value))}Fn.style.left=gr.clientX+"px",Fn.style.top=gr.clientY+"px",Fn.style.display="block"}),he}else{let he=document.createElement("div");he.className="vis-group";let{header:Mn,arrow:Sn,name:gn}=rk();gn.textContent=nn?"Layers":Jt.data.name||"Group";let Ce=document.createElement("input");if(Ce.type="checkbox",Ce.className="vis-cb",Ce.title="Visible",Ce.checked=Jt.checked,Ce.indeterminate=Jt.indeterminate,Jt.cb=Ce,Ce.addEventListener("change",()=>{Lt.check(Jt.id,Ce.checked)}),Mn.appendChild(Ce),vn){let jn=document.createElement("input");jn.type="checkbox",jn.className="vis-sel-cb",jn.title="Selectable",jn.checked=vn.checked,jn.indeterminate=vn.indeterminate,vn.selCb=jn,jn.addEventListener("change",()=>{be.check(Jt.id,jn.checked)}),Mn.appendChild(jn)}else Mn.appendChild(gS());he.appendChild(Mn);let dn=document.createElement("div");dn.className="vis-group-children";for(let jn of Jt.children)dn.appendChild(ge(jn,!1));return he.appendChild(dn),sk(Mn,Sn,dn,!!(Jt.data&&Jt.data.startCollapsed)),he}}let Pe=Lt.roots[0]||Lt.get("layers_parent"),ti=ge(Pe,!0);d.displayControlsEl.appendChild(ti),ln();let Yi=m&&Array.isArray(m.chiplets)?m.chiplets:[];if(Yi.length>1){let dn=function(sn,Zn){let oi=Ce.get(sn);oi&&(Lt.cascadeQuiet(oi.id,Zn),Lt.onChange())},Mi=function(sn){let Zn=sn.data;if(sn!==Ln){let oi=document.createElement("div");oi.className="vis-leaf",oi.style.paddingLeft=8*(Zn.depth-1)+"px",oi.title=Zn.path+(Zn.master?` (${Zn.master})`:""),oi.appendChild(wR(Zn.name));let Jr=document.createElement("input");Jr.type="checkbox",Jr.className="vis-cb",Jr.checked=sn.checked,Jr.indeterminate=sn.indeterminate,sn.cb=Jr,Jr.addEventListener("change",()=>{q.check(sn.id,Jr.checked),dn(Zn.path,Jr.checked)}),oi.appendChild(Jr),oi.appendChild(gS()),Qt.appendChild(oi)}sn.children&&sn.children.forEach(Mi)},Jt=m&&m.block_name||"",nn=Jt!=="",vn={};if(nn)try{let sn=qf("or_hidden_chiplets");if(sn){let Zn=JSON.parse(decodeURIComponent(sn));Zn&&typeof Zn=="object"&&!Array.isArray(Zn)&&(vn=Zn)}}catch{}let he=new Set(Array.isArray(vn[Jt])?vn[Jt]:[]),Mn=Dke(Yi,he),Sn=Mn.findIndex(sn=>sn.parentId===null),gn=Sn>=0?Mn[Sn].id:null;if(Sn>=0&&(Mn[Sn].hasCheckbox=!0),d.visibleChiplets=new Set(Yi.filter(sn=>!he.has(sn.path)).map(sn=>sn.path)),q=new nv(()=>{let sn=new Set;if(q.forEach(Zn=>{Zn.cb&&(Zn.cb.checked=Zn.checked,Zn.cb.indeterminate=Zn.indeterminate),Zn.data&&Zn.data.path&&(Zn.checked||Zn.indeterminate)&&sn.add(Zn.data.path)}),d.visibleChiplets=sn,nn){let Zn=Yi.filter(Jr=>!sn.has(Jr.path)).map(Jr=>Jr.path),oi={};try{let Jr=qf("or_hidden_chiplets");if(Jr){let Bs=JSON.parse(decodeURIComponent(Jr));Bs&&typeof Bs=="object"&&!Array.isArray(Bs)&&(oi=Bs)}}catch{}Zn.length===0?delete oi[Jt]:oi[Jt]=Zn,Rd("or_hidden_chiplets",encodeURIComponent(JSON.stringify(oi)))}_()}),q.buildFromNodes(Mn),typeof console<"u"&&console.warn){let sn=new Set;Lt.forEach(oi=>{oi.data&&oi.data.chipletPath&&sn.add(oi.data.chipletPath)});let Zn=new Set;q.forEach(oi=>{oi.data&&oi.data.path&&Zn.add(oi.data.path)});for(let oi of Zn)sn.has(oi)||console.warn(`[display-controls] chiplet "${oi}" missing from layer_hierarchy \u2014 Layers/Chiplets sync may drift`);for(let oi of sn)Zn.has(oi)||console.warn(`[display-controls] layer hierarchy node "${oi}" has no matching chiplet \u2014 Layers/Chiplets sync may drift`)}let Ce=new Map;Lt.forEach(sn=>{sn.data&&sn.data.chipletPath&&Ce.set(sn.data.chipletPath,sn)});{let sn={};if(Lt.forEach(Zn=>{if(!Zn.data||!Zn.data.chipletPath)return;let oi=Zn.data.chipletPath;he.has(oi)||q.get(oi)&&(sn[oi]={checked:Zn.checked,indeterminate:Zn.indeterminate})}),Object.keys(sn).length>0){q.mirrorStatesQuiet(sn);let Zn=new Set;q.forEach(oi=>{oi.data&&oi.data.path&&(oi.checked||oi.indeterminate)&&Zn.add(oi.data.path)}),d.visibleChiplets=Zn}}let jn=document.createElement("div");jn.className="vis-group";let{header:ar,arrow:gr,name:tr}=rk();tr.textContent="Chiplets";let Ln=gn!=null?q.get(gn):null;if(Ln){let sn=document.createElement("input");sn.type="checkbox",sn.className="vis-cb",sn.checked=Ln.checked,sn.indeterminate=Ln.indeterminate,Ln.cb=sn,sn.addEventListener("change",Zn=>{Zn.stopPropagation(),q.check(gn,sn.checked),Ln.data&&Ln.data.path&&dn(Ln.data.path,sn.checked)}),ar.appendChild(sn)}ar.appendChild(gS()),jn.appendChild(ar);let Qt=document.createElement("div");Qt.className="vis-group-children",q.roots.forEach(Mi),jn.appendChild(Qt),sk(ar,gr,Qt,!1),d.displayControlsEl.appendChild(jn)}else d.visibleChiplets=null;let ki=!!s.debug_renderers,lr=new rnt(s,h,()=>{_(),!!s.debug_renderers!==ki&&(ki=!!s.debug_renderers,d.refreshRendererControls&&d.refreshRendererControls())});lr.add({label:"Nets",addSelectable:!0,children:[{key:"net_signal",label:"Signal"},{key:"net_power",label:"Power"},{key:"net_ground",label:"Ground"},{key:"net_clock",label:"Clock"},{key:"net_reset",label:"Reset"},{key:"net_tieoff",label:"Tie off"},{key:"net_scan",label:"Scan"},{key:"net_analog",label:"Analog"}]}),lr.add({label:"Instances",addSelectable:!0,children:[{label:"Std Cells",visKey:"stdcells",disabled:!d.hasLiberty,children:[{label:"Bufs/Invs",children:[{key:"std_bufinv_timing",label:"Timing opt."},{key:"std_bufinv",label:"Netlist"}]},{key:"std_combinational",label:"Combinational"},{key:"std_sequential",label:"Sequential"},{label:"Clock tree",children:[{key:"std_clock_bufinv",label:"Buffer/Inverter"},{key:"std_clock_gate",label:"Clock gate"}]},{key:"std_level_shift",label:"Level shifter"}]},{key:"macros",label:"Macros"},{label:"Pads",children:[{key:"pad_input",label:"Input"},{key:"pad_output",label:"Output"},{key:"pad_inout",label:"Inout"},{key:"pad_power",label:"Power"},{key:"pad_spacer",label:"Spacer"},{key:"pad_areaio",label:"Area IO"},{key:"pad_other",label:"Other"}]},{label:"Physical",children:[{key:"phys_fill",label:"Fill"},{key:"phys_endcap",label:"Endcap"},{key:"phys_welltap",label:"Welltap"},{key:"phys_tie",label:"Tie Hi/Lo"},{key:"phys_antenna",label:"Antenna"},{key:"phys_cover",label:"Cover"},{key:"phys_bump",label:"Bump"},{key:"phys_other",label:"Other"}]}]}),lr.add({label:"Blockages",addSelectable:!0,children:[{key:"placement_blockages",label:"Placement"},{key:"routing_obstructions",label:"Routing"}]}),m.sites&&m.sites.length>0&&lr.add({label:"Rows",visKey:"rows",addSelectable:!0,children:m.sites.map(Jt=>({key:"site_"+Jt,label:Jt}))}),lr.add({label:"Tracks",children:[{key:"tracks_pref",label:"Pref"},{key:"tracks_non_pref",label:"Non Pref"}]}),lr.add({label:"Shapes",children:[{label:"Routing",visKey:"routing",children:[{key:"routing_segments",label:"Segments"},{key:"routing_vias",label:"Vias"}]},{label:"Special Routing",visKey:"special_nets",children:[{key:"srouting_segments",label:"Segments"},{key:"srouting_vias",label:"Vias"}]},{key:"pins",label:"Pins",selectable:!0},{key:"pin_names",label:"Pin Names",disabledBy:"pins"},{key:"fills",label:"Fills"}]}),lr.add({label:"Misc",children:[{label:"Instances",children:[{key:"inst_names",label:"Names"},{key:"inst_pins",label:"Pins",selectable:!0},{key:"inst_pin_names",label:"Pin Names",disabledBy:"inst_pins"},{key:"blockages",label:"Blockages"}]},{key:"detailed",label:"Detailed view"},{key:"rulers",label:"Rulers"},{key:"labels",label:"Labels"},{key:"scale_bar",label:"Scale bar"},{key:"access_points",label:"Access Points"},{key:"regions",label:"Regions"},{key:"mfg_grid",label:"Manufacturing grid"},{key:"gcell_grid",label:"GCell grid"},{key:"flywires_only",label:"Flywires only"},{key:"focused_nets_guides",label:"Focused nets guides"},{key:"highlight_selected",label:"Highlight selected"}]}),lr.add({key:"module_view",label:"Module view"}),lr.add({label:"Debug Graphics",children:[{key:"debug_renderers",label:"Renderers"},{key:"debug_live",label:"Live (don't require pause)",disabledBy:"debug_renderers"},{key:"debug",label:"Tiles"}]}),lr.render(d.displayControlsEl);let pr=document.createElement("div");pr.className="renderer-controls",d.displayControlsEl.appendChild(pr);function Kt(Jt){return Promise.all(Jt.map(({path:nn,value:vn})=>d.websocketManager.request({type:"set_renderer_control",path:nn,value:vn}))).catch(()=>{})}function wn(Jt){pr.innerHTML="";let nn=new Map;for(let vn of Jt||[]){let he=vn.group||"";nn.has(he)||nn.set(he,[]),nn.get(he).push(vn)}for(let[vn,he]of nn){let Mn=pr;if(vn){let Sn=document.createElement("div");Sn.className="vis-group";let{header:gn,arrow:Ce,name:dn}=rk();dn.textContent=vn;let jn=document.createElement("input");jn.type="checkbox",jn.className="vis-cb",jn.title="Visible";let ar=he.filter(tr=>tr.visible).length;jn.checked=ar===he.length,jn.indeterminate=ar>0&&ar{let tr=jn.checked;Kt(he.filter(Ln=>!!Ln.visible!==tr).map(Ln=>({path:Ln.path,value:tr})))}),gn.appendChild(jn),gn.appendChild(gS()),Sn.appendChild(gn);let gr=document.createElement("div");gr.className="vis-group-children",Sn.appendChild(gr),sk(gn,Ce,gr,!1),pr.appendChild(Sn),Mn=gr}for(let Sn of he){let gn=document.createElement("div");gn.className="vis-leaf";let Ce=document.createElement("span");Ce.className="vis-arrow",Ce.style.visibility="hidden",Ce.textContent="\u25B6",gn.appendChild(Ce),gn.appendChild(wR(Sn.name));let dn=document.createElement("input");dn.type="checkbox",dn.className="vis-cb",dn.title="Visible",dn.checked=!!Sn.visible,dn.addEventListener("change",()=>Kt([{path:Sn.path,value:dn.checked}])),gn.appendChild(dn),gn.appendChild(gS()),Mn.appendChild(gn)}}}d.refreshRendererControls=function(){return!d.websocketManager||Sc(d)||!s.debug_renderers?(pr.innerHTML="",Promise.resolve()):d.websocketManager.request({type:"renderer_controls"}).then(Jt=>wn(Jt.controls)).catch(()=>{})},d.refreshRendererControls();let it=document.createElement("div");it.className="bg-color-row";let ut=document.createElement("span");ut.textContent="Background";let kt=document.createElement("input");kt.type="color",kt.className="bg-color-input",kt.title="Layout background color";let Nt=qf("or_bg_color");kt.value=gR(Nt)?Nt:O2t(),kt.addEventListener("input",()=>{document.documentElement.style.setProperty("--bg-map",kt.value)}),kt.addEventListener("change",()=>{wJt(kt.value,d)});let ie=document.createElement("button");ie.className="bg-color-reset",ie.textContent="Reset",ie.title="Reset background to the theme default",ie.addEventListener("click",()=>{vJt(d),kt.value=O2t()}),it.appendChild(ut),it.appendChild(kt),it.appendChild(ie),d.heatMapLayer||(d.heatMapLayer=new S(d.websocketManager,d,{zIndex:U.length+10,opacity:1}));let rn=document.createElement("div");rn.className="vis-group heatmap-controls",d.displayControlsEl.appendChild(rn);let{header:Pn,arrow:Tt,name:yt}=rk("vis-group-header heatmap-header");yt.textContent="Heat Maps",rn.appendChild(Pn);let ue=document.createElement("div");ue.className="vis-group-children heatmap-group-children",rn.appendChild(ue),sk(Pn,Tt,ue,!0),d.displayControlsEl.appendChild(it);function fn(Jt,nn,vn,he){let Mn=document.createElement("label");Mn.className="heatmap-setting";let Sn=document.createElement("input");Sn.type="checkbox",Sn.checked=vn,Sn.addEventListener("change",()=>he(Sn.checked)),Mn.appendChild(Sn),Mn.appendChild(document.createTextNode(nn)),Jt.appendChild(Mn)}function An(Jt,nn,vn,he,Mn){let Sn=document.createElement("label");Sn.className="heatmap-setting";let gn=document.createElement("span");gn.textContent=nn;let Ce=document.createElement("input");Ce.type="number",Ce.value=String(vn),Ce.step=String(he||1),Ce.addEventListener("change",()=>Mn(parseFloat(Ce.value))),Sn.appendChild(gn),Sn.appendChild(Ce),Jt.appendChild(Sn)}function zn(Jt,nn,vn,he,Mn){let Sn=document.createElement("label");Sn.className="heatmap-setting";let gn=document.createElement("span");gn.textContent=nn;let Ce=document.createElement("select");for(let dn of he){let jn=document.createElement("option");jn.value=dn,jn.textContent=dn,dn===vn&&(jn.selected=!0),Ce.appendChild(jn)}Ce.addEventListener("change",()=>Mn(Ce.value)),Sn.appendChild(gn),Sn.appendChild(Ce),Jt.appendChild(Sn)}function Li(Jt){d.websocketManager.request(Jt).then(nn=>{d.updateHeatMaps&&d.updateHeatMaps(nn)}).catch(nn=>console.error("Heat map update failed",nn))}function xi(Jt){if(!d.heatMapLegendEl)return;let nn=d.heatMapLegendEl;if(nn.innerHTML="",!Jt||!Jt.show_legend||!Jt.legend||Jt.legend.length===0){nn.classList.add("hidden");return}let vn=document.createElement("div");vn.className="heatmap-map-legend-title",vn.textContent=Jt.title,nn.appendChild(vn);let he=document.createElement("div");he.className="heatmap-map-legend-units",he.textContent=Jt.units||"",nn.appendChild(he);let Mn=document.createElement("div");Mn.className="heatmap-map-legend-list";for(let Sn of Jt.legend){let gn=document.createElement("div");gn.className="heatmap-legend-row";let Ce=document.createElement("span");Ce.className="heatmap-legend-swatch",Ce.style.backgroundColor=`rgba(${Sn.color[0]}, ${Sn.color[1]}, ${Sn.color[2]}, ${Sn.color[3]/255})`;let dn=document.createElement("span");dn.textContent=Sn.value,gn.appendChild(Ce),gn.appendChild(dn),Mn.appendChild(gn)}nn.appendChild(Mn),nn.classList.remove("hidden")}d.renderHeatMapControls=Jt=>{ue.innerHTML="";let nn=document.createElement("div");nn.className="heatmap-list",ue.appendChild(nn);let vn=document.createElement("label");vn.className="heatmap-setting";let he=document.createElement("input");he.type="radio",he.name="active-heatmap",he.checked=!Jt.active,he.addEventListener("change",()=>{Li({type:"set_active_heatmap",name:""})}),vn.appendChild(he),vn.appendChild(document.createTextNode("Off")),nn.appendChild(vn);for(let Ce of Jt.heatmaps||[]){let dn=document.createElement("label");dn.className="heatmap-setting";let jn=document.createElement("input");jn.type="radio",jn.name="active-heatmap",jn.checked=Ce.name===Jt.active,jn.addEventListener("change",()=>{Li({type:"set_active_heatmap",name:Ce.name})}),dn.appendChild(jn),dn.appendChild(document.createTextNode(Ce.title)),nn.appendChild(dn)}let Mn=(Jt.heatmaps||[]).find(Ce=>Ce.name===Jt.active);if(xi(Mn),!Mn)return;let Sn=document.createElement("div");Sn.className="heatmap-settings",ue.appendChild(Sn),An(Sn,"Display min",Mn.display_min,Mn.display_range_increment,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"DisplayMin",value:Ce})}),An(Sn,"Display max",Mn.display_max,Mn.display_range_increment,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"DisplayMax",value:Ce})}),fn(Sn,"Show below min",Mn.draw_below_min,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"ShowMin",value:Ce})}),fn(Sn,"Show above max",Mn.draw_above_max,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"ShowMax",value:Ce})}),fn(Sn,"Log scale",Mn.log_scale,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"LogScale",value:Ce})}),fn(Sn,"Reverse log",Mn.reverse_log,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"ReverseLog",value:Ce})}),Mn.can_adjust_grid&&(An(Sn,"Grid X",Mn.grid_x,.1,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"GridX",value:Ce})}),An(Sn,"Grid Y",Mn.grid_y,.1,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"GridY",value:Ce})})),An(Sn,"Alpha",Mn.alpha,1,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"Alpha",value:Ce})}),fn(Sn,"Legend",Mn.show_legend,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"ShowLegend",value:Ce})}),Mn.supports_numbers&&fn(Sn,"Show numbers",Mn.show_numbers,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"ShowNumbers",value:Ce})});for(let Ce of Mn.options||[])Ce.type==="bool"?fn(Sn,Ce.label,Ce.value,dn=>{Li({type:"set_heatmap",name:Mn.name,option:Ce.name,value:dn})}):Ce.type==="choice"&&zn(Sn,Ce.label,Ce.value,Ce.choices||[],dn=>{Li({type:"set_heatmap",name:Mn.name,option:Ce.name,value:dn})});Mn.selection_filter_label&&fn(Sn,Mn.selection_filter_label,Mn.use_selected_only,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"use_selected_only",value:Ce})});let gn=document.createElement("button");gn.className="or-btn or-btn-sm heatmap-rebuild",gn.textContent="Rebuild data",gn.addEventListener("click",()=>{Li({type:"set_heatmap",name:Mn.name,option:"rebuild",value:1})}),Sn.appendChild(gn)}}var OJt="search-nav-dialog",Nke=[{label:"Instance",value:"inst"},{label:"Net",value:"net"},{label:"Port",value:"port"}];function ont(d){if(!d.designScale)return;let s=Nke.map(B=>``).join(""),{overlay:h,close:g,okBtn:m,showError:_}=mR("Find Object",` + affected.`,"Apply",XJt),I=m.querySelector(".opt-family"),N=m.querySelector(".opt-custom"),B=m.querySelector(".opt-scale"),P=m.querySelector(".opt-preview");function U(){P.style.fontFamily=N.value.trim()||I.value,P.style.fontSize=`calc(13px * ${$U(B.value)/100})`}for(let V of[I,N,B])V.addEventListener("input",U);U();function j(){let V=B.value.trim(),tt=Number(V);if(V===""||!Number.isFinite(tt)){y("Size must be a number.");return}if(ttgnt){y(`Size must be between ${pnt} and ${gnt} %.`);return}d.setAppFont({family:N.value.trim()||I.value,scale:tt}),_()}E.addEventListener("click",j);for(let V of[N,B])V.addEventListener("keydown",tt=>{tt.key==="Enter"&&(tt.preventDefault(),j())});return{close:_}}function J2t(d){return String(d).replace(/&/g,"&").replace(/"/g,""").replace(//g,">")}var Zke='',Yke='';function xR(d){let s=document.createElement("span");return s.className="vis-name",d!=null&&(s.textContent=d),s}function wS(){let d=document.createElement("span");return d.className="vis-sel-cb vis-sel-spacer",d}function KJt(){let d=document.createElement("div");d.className="display-controls-header",d.appendChild(xR(""));for(let[s,h]of[[Zke,"Visible"],[Yke,"Selectable"]]){let p=document.createElement("span");p.className="vis-header-icon",p.title=h,p.innerHTML=s,d.appendChild(p)}return d}var mnt=class{constructor(s,h,p){this.visibility=s,this.selectability=h,this.onChange=p;let m=()=>{this._syncAll(),this.onChange()};this.model=new iv(m),this.selModel=new iv(m)}add(s){return this.model.addFromSpec(this._enrichSpec(s,"")),this.selModel.addFromSpec(this._enrichSelSpec(s,"",!1)),this}render(s){for(let h of this.model.roots)s.appendChild(this._dom(h));this._syncAll()}_nodeId(s,h){let p=s.key||s.label;return h?h+"/"+p:p}_enrichSpec(s,h){let p=this._nodeId(s,h),m={id:p,data:s};return s.children?m.children=s.children.map(_=>this._enrichSpec(_,p)):s.key&&(m.checked=!!this.visibility[s.key]),s.disabled!=null&&(m.disabled=s.disabled),m}_enrichSelSpec(s,h,p){let m=s.addSelectable===!0?!0:s.addSelectable===!1?!1:p,_=this._nodeId(s,h),E={id:_,data:s,hasCheckbox:!1};if(s.children){E.children=s.children.map(I=>this._enrichSelSpec(I,_,m));let y=I=>I.some(N=>N.hasCheckbox||N.children&&y(N.children));E.hasCheckbox=y(E.children),E.hasCheckbox&&(E.checked=!0)}else if(s.key){let y=s.selectable===!0||s.selectable!==!1&&p;E.hasCheckbox=y,y&&(E.checked=this.selectability[s.key]!==!1)}return E}_syncAll(){this.model.forEach(s=>{s.cb&&(s.cb.checked=s.checked,s.cb.indeterminate=s.indeterminate);let h=s.data;h.key&&(this.visibility[h.key]=s.checked),h.visKey&&(this.visibility[h.visKey]=s.checked||s.indeterminate)}),this.selModel.forEach(s=>{if(!s.hasCheckbox)return;let h=s.data;if(h.key&&(this.selectability[h.key]=s.checked),!s.selCb)return;s.selCb.checked=s.checked,s.selCb.indeterminate=s.indeterminate;let p=this.model.get(s.id),m=p&&!p.checked&&!p.indeterminate;s.selCb.disabled=m,s.selLabel&&s.selLabel.classList.toggle("vis-sel-disabled",m)}),this.model.forEach(s=>{let h=s.data;if(h.disabledBy&&s.el){let p=!this.visibility[h.disabledBy];s.el.classList.toggle("disabled",p)}})}_buildSelCheckbox(s){let h=this.selModel.get(s.id);if(!h||!h.hasCheckbox)return null;let p=document.createElement("input");return p.type="checkbox",p.className="vis-sel-cb",p.title="Selectable",p.addEventListener("change",()=>{this.selModel.check(h.id,p.checked)}),h.selCb=p,p}_dom(s){let h=s.data,p=document.createElement("input");p.type="checkbox",p.className="vis-cb",p.title="Visible",s.cb=p,p.addEventListener("change",()=>this.model.check(s.id,p.checked));let m=this._buildSelCheckbox(s),_=P=>{if(P.appendChild(p),m){P.appendChild(m);let U=this.selModel.get(s.id);U&&(U.selLabel=P)}else P.appendChild(wS())};if(!s.children.length){let P=document.createElement("div");P.className="vis-leaf";let U=document.createElement("span");return U.className="vis-arrow",U.style.visibility="hidden",U.textContent="\u25B6",P.appendChild(U),P.appendChild(xR(h.label)),_(P),s.el=P,P}let E=document.createElement("div");E.className="vis-group";let{header:y,arrow:I,name:N}=ok();N.textContent=h.label,_(y),E.appendChild(y);let B=document.createElement("div");B.className="vis-group-children",h.disabled&&B.classList.add("disabled");for(let P of s.children)B.appendChild(this._dom(P));return E.appendChild(B),ck(y,I,B,!0),E}};function VU(d,s,h,p){let m=new Set,_=Math.max(0,d-s),E=Math.min(p-1,d+h);for(let y=_;y<=E;y++)m.add(y);return m}function Kke(d){let s={};for(let[h,p]of Object.entries(d||{}))p!==1&&(s[h]=p);return s}function bnt(d,s){return(d||[]).some(h=>h.every(p=>!!s[p]))}function Jke(d,s){return d.map(h=>{let p=!s.has(h.path);return{id:h.path,parentId:h.parent!=null?h.parent:null,hasCheckbox:h.parent!=null,checked:p,data:{path:h.path,name:h.name,master:h.master,depth:h.depth}}})}var JJt=[[70,130,210],[200,50,50],[50,180,80],[200,160,40],[160,60,200],[40,190,190],[220,120,50],[180,70,150]];function QJt(d,s,h,p,m,_,E){if(!d.displayControlsEl)return;d.displayControlsEl.innerHTML="",d.allLayers=[],d.displayControlsEl.appendChild(KJt());let y=d.mergeTiles?d.MergedTileLayer:null,I=new Set;function N(){for(let Jt of I)Jt.refreshTiles();I.clear()}function B(Jt,nn){if(!y){let he=new p(d.websocketManager,Jt,{opacity:1,zIndex:nn});return he._orShow=()=>he.addTo(d.map),he._orHide=()=>d.map.removeLayer(he),he}let vn={layer:Jt,opacity:1,visible:!1};return{_orItem:vn,_orPane:null,refreshTiles(){this._orPane&&(I.add(this._orPane),N())},_orShow(){H2t(vn,!0)&&this._orPane&&I.add(this._orPane)},_orHide(){H2t(vn,!1)&&this._orPane&&I.add(this._orPane)}}}function P(Jt,nn,vn,he){let Mn=new p(d.websocketManager,Jt,{zIndex:vn});return he&&Mn.addTo(d.map),nn&&(d[nn]=Mn),d.allLayers.push(Mn),Mn}P("_instances",null,0,!0),P("_pins","pinsLayer",1,s.pins),P("_modules","modulesLayer",2,s.module_view),d.overlayLayers=(m&&m.overlays||[]).map(Jt=>({def:Jt,layer:P(Jt.name,null,Jt.z_index,bnt(Jt.shown_by,s))}));let U=[],j=[],V=null,tt=new Set,Q=new Set;try{let Jt=window.sessionStorage.getItem("or_hidden_layers");Jt&&(tt=new Set(JSON.parse(Jt)))}catch{}try{let Jt=window.sessionStorage.getItem("or_nonselectable_layers");Jt&&(Q=new Set(JSON.parse(Jt)))}catch{}try{let Jt=window.sessionStorage.getItem("or_layer_patterns");Jt&&Object.assign(d.layerPatterns,JSON.parse(Jt))}catch{}function X(){try{window.sessionStorage.setItem("or_layer_patterns",JSON.stringify(Kke(d.layerPatterns)))}catch{}}function gt(Jt,nn,vn){vn===1?delete d.layerPatterns[Jt]:d.layerPatterns[Jt]=vn,X(),nn&&typeof nn.refreshTiles=="function"&&nn.refreshTiles()}let ft=[{label:"Solid",value:1},{label:"Diagonal",value:2},{label:"Cross",value:3},{label:"Dots",value:4},{label:"None (no fill)",value:0}],xt=0,Bt=3;function Ot(Jt,nn="layers",vn=void 0){let he=[],Mn=Jt.type==="category"?vn:Jt.path,Sn=Jt.flipped===!0,gn=Jt.instances||[],Ce=gn.filter(Qt=>Qt.type!=="category"),dn=gn.filter(Qt=>Qt.type==="category"),jn=Jt.layers||[],ar=xt;xt+=jn.length;function gr(Qt,Mi){let sn=Qt.map((Zn,oi)=>oi);Mi&&sn.reverse(),sn.forEach(Zn=>{let oi=Qt[Zn],Jr=nn+"/"+(oi.name||Zn);he.push(Ot(oi,Jr,Mn))})}function tr(){(Sn?jn.map((Mi,sn)=>sn).reverse():jn.map((Mi,sn)=>sn)).forEach(Mi=>{let sn=jn[Mi],Zn=sn.name||sn,oi=ar+Mi,Jr=Bt++,Bs=B(Zn,Jr),Oc=`${nn}/${Zn}`;Bs._nodeId=Oc;let ru=!tt.has(Oc);ru&&(Bs._orShow(),d.visibleLayers.add(Oc),d.visibleLayerNames.add(Zn)),y||d.allLayers.push(Bs),U.push(Bs),j.push(Oc),he.push({id:Oc,data:{name:Zn,layer:Bs,color:sn.color,colorIndex:oi,nodeId:Oc,ownerChipletPath:Mn},checked:ru})})}gr(Ce,!1),Sn&&tr(),gr(dn,Sn),Sn||tr();let Ln={name:Jt.name,isInstance:!0};return Jt.type==="category"&&(Jt.name==="Implant"||Jt.name==="Other")&&(Ln.startCollapsed=!0),Jt.type!=="category"&&(Ln.chipletPath=Jt.path),{id:nn,data:Ln,children:he}}let Pt;if(m.layer_hierarchy?Pt=Ot(m.layer_hierarchy,"layers_parent"):Pt={id:"layers_parent",children:m.layers.map((Jt,nn)=>{let vn=B(Jt,nn+3),he=`layers_parent/${Jt}`;vn._nodeId=he;let Mn=!tt.has(he);return Mn&&(vn._orShow(),d.visibleLayers.add(he),d.visibleLayerNames.add(Jt)),y||d.allLayers.push(vn),U.push(vn),j.push(he),{id:he,data:{name:Jt,layer:vn,colorIndex:nn,nodeId:he},checked:Mn}})},y&&U.length>0){let vn=function(){let{width:dn,height:jn}=MJt(d.map.getContainer()),ar=ev(),gr=xJt(dn,jn,ar),tr=yJt(ar,d.tileDpr?d.tileDpr():1);return{count:d.mergeGroupCount||SJt({budgetBytes:EJt(nn,gr,tr),tilesPerPane:gr,bytesPerTile:tr,paneCount:Jt.length}),tilesPerPane:gr,perTile:tr}},he=function(dn,jn,ar){let gr=(dn+rnt)*jn*ar;return{layers:Jt.length,groups:dn,tilesPerPane:jn,unmergedPanes:rnt,budgetMB:Math.round(nn/(1024*1024)),estimatedMB:Math.round(gr/(1024*1024))}},Mn=function(dn,jn){let ar=0;jn.forEach((gr,tr)=>{for(let Ln=0;Lndn._orItem),nn=d.tileBudgetBytes||j2t,Sn=vn(),gn=G2t(Jt,Sn.count),Ce=kJt(y,d.websocketManager,gn,d.map,3);Mn(Ce,gn),d.allLayers.push(...Ce),d.mergedPanes=Ce,d.mergeStats=he(Ce.length,Sn.tilesPerPane,Sn.perTile),console.log("[tiles] merged %d layers into %d panes (~%d MB of %d MB budget, %d tiles/pane)",d.mergeStats.layers,d.mergeStats.groups,d.mergeStats.estimatedMB,d.mergeStats.budgetMB,Sn.tilesPerPane),d.map.on("resize",()=>{let dn=vn();if(dn.count>=d.mergedPanes.length)return;let jn=G2t(Jt,dn.count),ar=d.mergedPanes.slice(0,jn.length);for(let gr of d.mergedPanes.slice(jn.length)){d.map.removeLayer(gr);let tr=d.allLayers.indexOf(gr);tr>=0&&d.allLayers.splice(tr,1)}d.mergedPanes=ar,Mn(ar,jn),ar.forEach((gr,tr)=>gr.setItems(jn[tr])),d.mergeStats=he(ar.length,dn.tilesPerPane,dn.perTile),console.log("[tiles] window grew \u2014 regrouped %d layers into %d panes (~%d MB of %d MB budget, %d tiles/pane)",d.mergeStats.layers,d.mergeStats.groups,d.mergeStats.estimatedMB,d.mergeStats.budgetMB,dn.tilesPerPane)})}function se(Jt){if(!Jt.children||Jt.children.length===0){let nn=Jt.data&&Jt.data.name,vn=nn?!Q.has(nn):!0;return vn&&nn&&d.selectableLayers.add(nn),{id:Jt.id,data:{name:nn},checked:vn}}return{id:Jt.id,data:{name:Jt.data&&Jt.data.name},children:Jt.children.map(se)}}let ot=se(Pt),Lt=new iv(()=>{d.visibleLayerNames.clear();let Jt=[],nn={},vn=!1,he=!1,Mn=V&&d.visibleChiplets instanceof Set;Lt.forEach(gn=>{if(gn.cb&&(gn.cb.checked=gn.checked,gn.cb.indeterminate=gn.indeterminate),gn.data&&gn.data.layer){let Ce=gn.data.nodeId||gn.data.name;Jt.push(Ce),gn.checked?(gn.data.layer._orShow(),d.visibleLayers.add(Ce),d.visibleLayerNames.add(gn.data.name)):(gn.data.layer._orHide(),d.visibleLayers.delete(Ce))}if(Mn&&gn.data&&gn.data.chipletPath){let Ce=gn.data.chipletPath,dn=V.get(Ce);if(dn){let jn=gn.checked||gn.indeterminate,ar={checked:gn.checked,indeterminate:gn.indeterminate};(dn.checked!==gn.checked||dn.indeterminate!==gn.indeterminate)&&(nn[Ce]=ar,vn=!0),d.visibleChiplets.has(Ce)!==jn&&(he=!0)}}}),N(),ln(),d.pinsLayer&&d.map.hasLayer(d.pinsLayer)&&d.pinsLayer.refreshTiles();for(let{def:gn,layer:Ce}of d.overlayLayers||[])bnt(gn.layers_by,s)&&d.map.hasLayer(Ce)&&Ce.refreshTiles();let Sn=Jt.filter(gn=>!d.visibleLayers.has(gn));try{window.sessionStorage.setItem("or_hidden_layers",JSON.stringify(Sn))}catch{}d.syncDisplayState(),he?V.mirrorStates(nn):vn&&(V.mirrorStatesQuiet(nn),V.forEach(gn=>{gn.cb&&(gn.cb.checked=gn.checked,gn.cb.indeterminate=gn.indeterminate)}))});d.layerModel=Lt,Lt.addFromSpec(Pt);let be=new iv(()=>{d.selectableLayers.clear(),be.forEach(nn=>{nn.checked&&nn.data&&nn.data.name&&d.selectableLayers.add(nn.data.name)}),ln();let Jt=m.layers.filter(nn=>!d.selectableLayers.has(nn));try{window.sessionStorage.setItem("or_nonselectable_layers",JSON.stringify(Jt))}catch{}d.syncDisplayState()});be.addFromSpec(ot);function ln(){be.forEach(Jt=>{if(!Jt.selCb)return;Jt.selCb.checked=Jt.checked,Jt.selCb.indeterminate=Jt.indeterminate;let nn=Lt.get(Jt.id),vn=nn&&!nn.checked&&!nn.indeterminate;Jt.selCb.disabled=vn})}let Fn=document.createElement("div");Fn.className="context-menu",Fn.style.display="none",document.body.appendChild(Fn);function ne(Jt){let nn={};j.forEach((vn,he)=>{vn&&(nn[vn]=Jt.has(he))}),Lt.checkSet(nn)}function xe(){Fn.style.display="none"}function re(Jt,nn){let vn=document.createElement("div");vn.className="context-menu-item",vn.textContent=Jt,vn.addEventListener("click",()=>{nn(),xe()}),Fn.appendChild(vn)}let hn=U.length,Se=[{label:"Show only this layer",fn:Jt=>VU(Jt,0,0,hn)},{label:"Show layer range \u2195",fn:Jt=>VU(Jt,1,1,hn)},{label:"Show layer range \u2195\u2195",fn:Jt=>VU(Jt,2,2,hn)},{label:"Show layer range \u2193",fn:Jt=>VU(Jt,1,0,hn)},{label:"Show layer range \u2191",fn:Jt=>VU(Jt,0,1,hn)}];document.addEventListener("click",Jt=>{Fn.contains(Jt.target)||xe()}),document.addEventListener("keydown",Jt=>{Jt.key==="Escape"&&xe()});let ke=!Sc(d),mn=null;function en(){mn&&(mn.classList.remove("vis-row-selected"),mn=null)}ke&&nJt(d,en);function Qn(Jt,nn,vn){let he=wg(d);mn=Jt,Jt.classList.add("vis-row-selected");let Mn={type:"select_layer",layer:nn,use_dbu:d.showDbu};vn&&(Mn.chiplet=vn),d.websocketManager.request(Mn).then(Sn=>{N0(d,he)&&(d.updateInspector&&d.updateInspector(Sn),d.focusComponent&&d.focusComponent("Inspector"),d.refreshOverlay&&d.refreshOverlay())}).catch(Sn=>{console.error("select_layer failed:",Sn),N0(d,he)&&en()})}function ge(Jt,nn=!1){let vn=be.get(Jt.id);if(!Jt.children||Jt.children.length===0){let he=document.createElement("div");he.className=ke?"vis-leaf vis-leaf-selectable":"vis-leaf";let Mn=document.createElement("span");Mn.className="vis-arrow",Mn.style.visibility="hidden",Mn.textContent="\u25B6",he.appendChild(Mn);let Sn=Jt.data.colorIndex,gn=Jt.data.name,Ce=xR(),dn=document.createElement("span");dn.className="layer-color";let jn=Jt.data.color||m.layer_colors&&m.layer_colors[Sn]||JJt[Sn%JJt.length];dn.style.backgroundColor=`rgb(${jn[0]},${jn[1]},${jn[2]})`,Ce.appendChild(dn),Ce.appendChild(document.createTextNode(gn)),he.appendChild(Ce),ke&&Ce.addEventListener("click",()=>{Qn(he,gn,Jt.data.ownerChipletPath)});let ar=document.createElement("input");if(ar.type="checkbox",ar.className="vis-cb",ar.title="Visible",ar.checked=Jt.checked,Jt.cb=ar,ar.addEventListener("change",()=>{Lt.check(Jt.id,ar.checked)}),he.appendChild(ar),vn){let gr=document.createElement("input");gr.type="checkbox",gr.className="vis-sel-cb",gr.title="Selectable",gr.checked=vn.checked,vn.selCb=gr,gr.addEventListener("change",()=>{be.check(Jt.id,gr.checked)}),he.appendChild(gr)}else he.appendChild(wS());return he.addEventListener("contextmenu",gr=>{gr.preventDefault(),gr.stopPropagation(),Fn.innerHTML="";for(let Qt of Se)re(Qt.label,()=>ne(Qt.fn(Sn)));let tr=document.createElement("div");tr.className="context-menu-separator",tr.style.borderTop="1px solid #555",tr.style.margin="4px 0",Fn.appendChild(tr);let Ln=d.layerPatterns[gn]??1;for(let Qt of ft){let Mi=Ln===Qt.value?"\u25CF ":" ";re(Mi+"Fill: "+Qt.label,()=>gt(gn,Jt.data.layer,Qt.value))}Fn.style.left=gr.clientX+"px",Fn.style.top=gr.clientY+"px",Fn.style.display="block"}),he}else{let he=document.createElement("div");he.className="vis-group";let{header:Mn,arrow:Sn,name:gn}=ok();gn.textContent=nn?"Layers":Jt.data.name||"Group";let Ce=document.createElement("input");if(Ce.type="checkbox",Ce.className="vis-cb",Ce.title="Visible",Ce.checked=Jt.checked,Ce.indeterminate=Jt.indeterminate,Jt.cb=Ce,Ce.addEventListener("change",()=>{Lt.check(Jt.id,Ce.checked)}),Mn.appendChild(Ce),vn){let jn=document.createElement("input");jn.type="checkbox",jn.className="vis-sel-cb",jn.title="Selectable",jn.checked=vn.checked,jn.indeterminate=vn.indeterminate,vn.selCb=jn,jn.addEventListener("change",()=>{be.check(Jt.id,jn.checked)}),Mn.appendChild(jn)}else Mn.appendChild(wS());he.appendChild(Mn);let dn=document.createElement("div");dn.className="vis-group-children";for(let jn of Jt.children)dn.appendChild(ge(jn,!1));return he.appendChild(dn),ck(Mn,Sn,dn,!!(Jt.data&&Jt.data.startCollapsed)),he}}let Pe=Lt.roots[0]||Lt.get("layers_parent"),ti=ge(Pe,!0);d.displayControlsEl.appendChild(ti),ln();let Yi=m&&Array.isArray(m.chiplets)?m.chiplets:[];if(Yi.length>1){let dn=function(sn,Zn){let oi=Ce.get(sn);oi&&(Lt.cascadeQuiet(oi.id,Zn),Lt.onChange())},Mi=function(sn){let Zn=sn.data;if(sn!==Ln){let oi=document.createElement("div");oi.className="vis-leaf",oi.style.paddingLeft=8*(Zn.depth-1)+"px",oi.title=Zn.path+(Zn.master?` (${Zn.master})`:""),oi.appendChild(xR(Zn.name));let Jr=document.createElement("input");Jr.type="checkbox",Jr.className="vis-cb",Jr.checked=sn.checked,Jr.indeterminate=sn.indeterminate,sn.cb=Jr,Jr.addEventListener("change",()=>{V.check(sn.id,Jr.checked),dn(Zn.path,Jr.checked)}),oi.appendChild(Jr),oi.appendChild(wS()),Qt.appendChild(oi)}sn.children&&sn.children.forEach(Mi)},Jt=m&&m.block_name||"",nn=Jt!=="",vn={};if(nn)try{let sn=qf("or_hidden_chiplets");if(sn){let Zn=JSON.parse(decodeURIComponent(sn));Zn&&typeof Zn=="object"&&!Array.isArray(Zn)&&(vn=Zn)}}catch{}let he=new Set(Array.isArray(vn[Jt])?vn[Jt]:[]),Mn=Jke(Yi,he),Sn=Mn.findIndex(sn=>sn.parentId===null),gn=Sn>=0?Mn[Sn].id:null;if(Sn>=0&&(Mn[Sn].hasCheckbox=!0),d.visibleChiplets=new Set(Yi.filter(sn=>!he.has(sn.path)).map(sn=>sn.path)),V=new iv(()=>{let sn=new Set;if(V.forEach(Zn=>{Zn.cb&&(Zn.cb.checked=Zn.checked,Zn.cb.indeterminate=Zn.indeterminate),Zn.data&&Zn.data.path&&(Zn.checked||Zn.indeterminate)&&sn.add(Zn.data.path)}),d.visibleChiplets=sn,nn){let Zn=Yi.filter(Jr=>!sn.has(Jr.path)).map(Jr=>Jr.path),oi={};try{let Jr=qf("or_hidden_chiplets");if(Jr){let Bs=JSON.parse(decodeURIComponent(Jr));Bs&&typeof Bs=="object"&&!Array.isArray(Bs)&&(oi=Bs)}}catch{}Zn.length===0?delete oi[Jt]:oi[Jt]=Zn,Rd("or_hidden_chiplets",encodeURIComponent(JSON.stringify(oi)))}_()}),V.buildFromNodes(Mn),typeof console<"u"&&console.warn){let sn=new Set;Lt.forEach(oi=>{oi.data&&oi.data.chipletPath&&sn.add(oi.data.chipletPath)});let Zn=new Set;V.forEach(oi=>{oi.data&&oi.data.path&&Zn.add(oi.data.path)});for(let oi of Zn)sn.has(oi)||console.warn(`[display-controls] chiplet "${oi}" missing from layer_hierarchy \u2014 Layers/Chiplets sync may drift`);for(let oi of sn)Zn.has(oi)||console.warn(`[display-controls] layer hierarchy node "${oi}" has no matching chiplet \u2014 Layers/Chiplets sync may drift`)}let Ce=new Map;Lt.forEach(sn=>{sn.data&&sn.data.chipletPath&&Ce.set(sn.data.chipletPath,sn)});{let sn={};if(Lt.forEach(Zn=>{if(!Zn.data||!Zn.data.chipletPath)return;let oi=Zn.data.chipletPath;he.has(oi)||V.get(oi)&&(sn[oi]={checked:Zn.checked,indeterminate:Zn.indeterminate})}),Object.keys(sn).length>0){V.mirrorStatesQuiet(sn);let Zn=new Set;V.forEach(oi=>{oi.data&&oi.data.path&&(oi.checked||oi.indeterminate)&&Zn.add(oi.data.path)}),d.visibleChiplets=Zn}}let jn=document.createElement("div");jn.className="vis-group";let{header:ar,arrow:gr,name:tr}=ok();tr.textContent="Chiplets";let Ln=gn!=null?V.get(gn):null;if(Ln){let sn=document.createElement("input");sn.type="checkbox",sn.className="vis-cb",sn.checked=Ln.checked,sn.indeterminate=Ln.indeterminate,Ln.cb=sn,sn.addEventListener("change",Zn=>{Zn.stopPropagation(),V.check(gn,sn.checked),Ln.data&&Ln.data.path&&dn(Ln.data.path,sn.checked)}),ar.appendChild(sn)}ar.appendChild(wS()),jn.appendChild(ar);let Qt=document.createElement("div");Qt.className="vis-group-children",V.roots.forEach(Mi),jn.appendChild(Qt),ck(ar,gr,Qt,!1),d.displayControlsEl.appendChild(jn)}else d.visibleChiplets=null;let ki=!!s.debug_renderers,lr=new mnt(s,h,()=>{_(),!!s.debug_renderers!==ki&&(ki=!!s.debug_renderers,d.refreshRendererControls&&d.refreshRendererControls())});lr.add({label:"Nets",addSelectable:!0,children:[{key:"net_signal",label:"Signal"},{key:"net_power",label:"Power"},{key:"net_ground",label:"Ground"},{key:"net_clock",label:"Clock"},{key:"net_reset",label:"Reset"},{key:"net_tieoff",label:"Tie off"},{key:"net_scan",label:"Scan"},{key:"net_analog",label:"Analog"}]}),lr.add({label:"Instances",addSelectable:!0,children:[{label:"Std Cells",visKey:"stdcells",disabled:!d.hasLiberty,children:[{label:"Bufs/Invs",children:[{key:"std_bufinv_timing",label:"Timing opt."},{key:"std_bufinv",label:"Netlist"}]},{key:"std_combinational",label:"Combinational"},{key:"std_sequential",label:"Sequential"},{label:"Clock tree",children:[{key:"std_clock_bufinv",label:"Buffer/Inverter"},{key:"std_clock_gate",label:"Clock gate"}]},{key:"std_level_shift",label:"Level shifter"}]},{key:"macros",label:"Macros"},{label:"Pads",children:[{key:"pad_input",label:"Input"},{key:"pad_output",label:"Output"},{key:"pad_inout",label:"Inout"},{key:"pad_power",label:"Power"},{key:"pad_spacer",label:"Spacer"},{key:"pad_areaio",label:"Area IO"},{key:"pad_other",label:"Other"}]},{label:"Physical",children:[{key:"phys_fill",label:"Fill"},{key:"phys_endcap",label:"Endcap"},{key:"phys_welltap",label:"Welltap"},{key:"phys_tie",label:"Tie Hi/Lo"},{key:"phys_antenna",label:"Antenna"},{key:"phys_cover",label:"Cover"},{key:"phys_bump",label:"Bump"},{key:"phys_other",label:"Other"}]}]}),lr.add({label:"Blockages",addSelectable:!0,children:[{key:"placement_blockages",label:"Placement"},{key:"routing_obstructions",label:"Routing"}]}),m.sites&&m.sites.length>0&&lr.add({label:"Rows",visKey:"rows",addSelectable:!0,children:m.sites.map(Jt=>({key:"site_"+Jt,label:Jt}))}),lr.add({label:"Tracks",children:[{key:"tracks_pref",label:"Pref"},{key:"tracks_non_pref",label:"Non Pref"}]}),lr.add({label:"Shapes",children:[{label:"Routing",visKey:"routing",children:[{key:"routing_segments",label:"Segments"},{key:"routing_vias",label:"Vias"}]},{label:"Special Routing",visKey:"special_nets",children:[{key:"srouting_segments",label:"Segments"},{key:"srouting_vias",label:"Vias"}]},{key:"pins",label:"Pins",selectable:!0},{key:"pin_names",label:"Pin Names",disabledBy:"pins"},{key:"fills",label:"Fills"}]}),lr.add({label:"Misc",children:[{label:"Instances",children:[{key:"inst_names",label:"Names"},{key:"inst_pins",label:"Pins",selectable:!0},{key:"inst_pin_names",label:"Pin Names",disabledBy:"inst_pins"},{key:"blockages",label:"Blockages"}]},{key:"detailed",label:"Detailed view"},{key:"rulers",label:"Rulers"},{key:"labels",label:"Labels"},{key:"scale_bar",label:"Scale bar"},{key:"access_points",label:"Access Points"},{key:"regions",label:"Regions"},{key:"mfg_grid",label:"Manufacturing grid"},{key:"gcell_grid",label:"GCell grid"},{key:"flywires_only",label:"Flywires only"},{key:"focused_nets_guides",label:"Focused nets guides"},{key:"highlight_selected",label:"Highlight selected"}]}),lr.add({key:"module_view",label:"Module view"}),lr.add({label:"Debug Graphics",children:[{key:"debug_renderers",label:"Renderers"},{key:"debug_live",label:"Live (don't require pause)",disabledBy:"debug_renderers"},{key:"debug",label:"Tiles"}]}),lr.render(d.displayControlsEl);let pr=document.createElement("div");pr.className="renderer-controls",d.displayControlsEl.appendChild(pr);function Kt(Jt){return Promise.all(Jt.map(({path:nn,value:vn})=>d.websocketManager.request({type:"set_renderer_control",path:nn,value:vn}))).catch(()=>{})}function wn(Jt){pr.innerHTML="";let nn=new Map;for(let vn of Jt||[]){let he=vn.group||"";nn.has(he)||nn.set(he,[]),nn.get(he).push(vn)}for(let[vn,he]of nn){let Mn=pr;if(vn){let Sn=document.createElement("div");Sn.className="vis-group";let{header:gn,arrow:Ce,name:dn}=ok();dn.textContent=vn;let jn=document.createElement("input");jn.type="checkbox",jn.className="vis-cb",jn.title="Visible";let ar=he.filter(tr=>tr.visible).length;jn.checked=ar===he.length,jn.indeterminate=ar>0&&ar{let tr=jn.checked;Kt(he.filter(Ln=>!!Ln.visible!==tr).map(Ln=>({path:Ln.path,value:tr})))}),gn.appendChild(jn),gn.appendChild(wS()),Sn.appendChild(gn);let gr=document.createElement("div");gr.className="vis-group-children",Sn.appendChild(gr),ck(gn,Ce,gr,!1),pr.appendChild(Sn),Mn=gr}for(let Sn of he){let gn=document.createElement("div");gn.className="vis-leaf";let Ce=document.createElement("span");Ce.className="vis-arrow",Ce.style.visibility="hidden",Ce.textContent="\u25B6",gn.appendChild(Ce),gn.appendChild(xR(Sn.name));let dn=document.createElement("input");dn.type="checkbox",dn.className="vis-cb",dn.title="Visible",dn.checked=!!Sn.visible,dn.addEventListener("change",()=>Kt([{path:Sn.path,value:dn.checked}])),gn.appendChild(dn),gn.appendChild(wS()),Mn.appendChild(gn)}}}d.refreshRendererControls=function(){return!d.websocketManager||Sc(d)||!s.debug_renderers?(pr.innerHTML="",Promise.resolve()):d.websocketManager.request({type:"renderer_controls"}).then(Jt=>wn(Jt.controls)).catch(()=>{})},d.refreshRendererControls();let it=document.createElement("div");it.className="bg-color-row";let ut=document.createElement("span");ut.textContent="Background";let kt=document.createElement("input");kt.type="color",kt.className="bg-color-input",kt.title="Layout background color";let Nt=qf("or_bg_color");kt.value=wR(Nt)?Nt:V2t(),kt.addEventListener("input",()=>{document.documentElement.style.setProperty("--bg-map",kt.value)}),kt.addEventListener("change",()=>{OJt(kt.value,d)});let ie=document.createElement("button");ie.className="bg-color-reset",ie.textContent="Reset",ie.title="Reset background to the theme default",ie.addEventListener("click",()=>{BJt(d),kt.value=V2t()}),it.appendChild(ut),it.appendChild(kt),it.appendChild(ie),d.heatMapLayer||(d.heatMapLayer=new E(d.websocketManager,d,{zIndex:U.length+10,opacity:1}));let rn=document.createElement("div");rn.className="vis-group heatmap-controls",d.displayControlsEl.appendChild(rn);let{header:Pn,arrow:Tt,name:yt}=ok("vis-group-header heatmap-header");yt.textContent="Heat Maps",rn.appendChild(Pn);let ue=document.createElement("div");ue.className="vis-group-children heatmap-group-children",rn.appendChild(ue),ck(Pn,Tt,ue,!0),d.displayControlsEl.appendChild(it);function fn(Jt,nn,vn,he){let Mn=document.createElement("label");Mn.className="heatmap-setting";let Sn=document.createElement("input");Sn.type="checkbox",Sn.checked=vn,Sn.addEventListener("change",()=>he(Sn.checked)),Mn.appendChild(Sn),Mn.appendChild(document.createTextNode(nn)),Jt.appendChild(Mn)}function An(Jt,nn,vn,he,Mn){let Sn=document.createElement("label");Sn.className="heatmap-setting";let gn=document.createElement("span");gn.textContent=nn;let Ce=document.createElement("input");Ce.type="number",Ce.value=String(vn),Ce.step=String(he||1),Ce.addEventListener("change",()=>Mn(parseFloat(Ce.value))),Sn.appendChild(gn),Sn.appendChild(Ce),Jt.appendChild(Sn)}function zn(Jt,nn,vn,he,Mn){let Sn=document.createElement("label");Sn.className="heatmap-setting";let gn=document.createElement("span");gn.textContent=nn;let Ce=document.createElement("select");for(let dn of he){let jn=document.createElement("option");jn.value=dn,jn.textContent=dn,dn===vn&&(jn.selected=!0),Ce.appendChild(jn)}Ce.addEventListener("change",()=>Mn(Ce.value)),Sn.appendChild(gn),Sn.appendChild(Ce),Jt.appendChild(Sn)}function Li(Jt){d.websocketManager.request(Jt).then(nn=>{d.updateHeatMaps&&d.updateHeatMaps(nn)}).catch(nn=>console.error("Heat map update failed",nn))}function xi(Jt){if(!d.heatMapLegendEl)return;let nn=d.heatMapLegendEl;if(nn.innerHTML="",!Jt||!Jt.show_legend||!Jt.legend||Jt.legend.length===0){nn.classList.add("hidden");return}let vn=document.createElement("div");vn.className="heatmap-map-legend-title",vn.textContent=Jt.title,nn.appendChild(vn);let he=document.createElement("div");he.className="heatmap-map-legend-units",he.textContent=Jt.units||"",nn.appendChild(he);let Mn=document.createElement("div");Mn.className="heatmap-map-legend-list";for(let Sn of Jt.legend){let gn=document.createElement("div");gn.className="heatmap-legend-row";let Ce=document.createElement("span");Ce.className="heatmap-legend-swatch",Ce.style.backgroundColor=`rgba(${Sn.color[0]}, ${Sn.color[1]}, ${Sn.color[2]}, ${Sn.color[3]/255})`;let dn=document.createElement("span");dn.textContent=Sn.value,gn.appendChild(Ce),gn.appendChild(dn),Mn.appendChild(gn)}nn.appendChild(Mn),nn.classList.remove("hidden")}d.renderHeatMapControls=Jt=>{ue.innerHTML="";let nn=document.createElement("div");nn.className="heatmap-list",ue.appendChild(nn);let vn=document.createElement("label");vn.className="heatmap-setting";let he=document.createElement("input");he.type="radio",he.name="active-heatmap",he.checked=!Jt.active,he.addEventListener("change",()=>{Li({type:"set_active_heatmap",name:""})}),vn.appendChild(he),vn.appendChild(document.createTextNode("Off")),nn.appendChild(vn);for(let Ce of Jt.heatmaps||[]){let dn=document.createElement("label");dn.className="heatmap-setting";let jn=document.createElement("input");jn.type="radio",jn.name="active-heatmap",jn.checked=Ce.name===Jt.active,jn.addEventListener("change",()=>{Li({type:"set_active_heatmap",name:Ce.name})}),dn.appendChild(jn),dn.appendChild(document.createTextNode(Ce.title)),nn.appendChild(dn)}let Mn=(Jt.heatmaps||[]).find(Ce=>Ce.name===Jt.active);if(xi(Mn),!Mn)return;let Sn=document.createElement("div");Sn.className="heatmap-settings",ue.appendChild(Sn),An(Sn,"Display min",Mn.display_min,Mn.display_range_increment,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"DisplayMin",value:Ce})}),An(Sn,"Display max",Mn.display_max,Mn.display_range_increment,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"DisplayMax",value:Ce})}),fn(Sn,"Show below min",Mn.draw_below_min,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"ShowMin",value:Ce})}),fn(Sn,"Show above max",Mn.draw_above_max,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"ShowMax",value:Ce})}),fn(Sn,"Log scale",Mn.log_scale,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"LogScale",value:Ce})}),fn(Sn,"Reverse log",Mn.reverse_log,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"ReverseLog",value:Ce})}),Mn.can_adjust_grid&&(An(Sn,"Grid X",Mn.grid_x,.1,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"GridX",value:Ce})}),An(Sn,"Grid Y",Mn.grid_y,.1,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"GridY",value:Ce})})),An(Sn,"Alpha",Mn.alpha,1,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"Alpha",value:Ce})}),fn(Sn,"Legend",Mn.show_legend,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"ShowLegend",value:Ce})}),Mn.supports_numbers&&fn(Sn,"Show numbers",Mn.show_numbers,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"ShowNumbers",value:Ce})});for(let Ce of Mn.options||[])Ce.type==="bool"?fn(Sn,Ce.label,Ce.value,dn=>{Li({type:"set_heatmap",name:Mn.name,option:Ce.name,value:dn})}):Ce.type==="choice"&&zn(Sn,Ce.label,Ce.value,Ce.choices||[],dn=>{Li({type:"set_heatmap",name:Mn.name,option:Ce.name,value:dn})});Mn.selection_filter_label&&fn(Sn,Mn.selection_filter_label,Mn.use_selected_only,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"use_selected_only",value:Ce})});let gn=document.createElement("button");gn.className="or-btn or-btn-sm heatmap-rebuild",gn.textContent="Rebuild data",gn.addEventListener("click",()=>{Li({type:"set_heatmap",name:Mn.name,option:"rebuild",value:1})}),Sn.appendChild(gn)}}var tQt="search-nav-dialog",Qke=[{label:"Instance",value:"inst"},{label:"Net",value:"net"},{label:"Port",value:"port"}];function wnt(d){if(!d.designScale)return;let s=Qke.map(B=>``).join(""),{overlay:h,close:p,okBtn:m,showError:_}=vR("Find Object",`
`,"Find",OJt),S=h.querySelector(".sn-pattern"),y=h.querySelector(".sn-type"),R=h.querySelector(".sn-case");S.focus();function N(){let B=S.value.trim();if(!B){_("Enter a name or glob pattern.");return}d.websocketManager&&(_("Searching\u2026",!0),d.websocketManager.request({type:"find",obj_type:y.value,pattern:B,match_case:R.checked}).then(P=>{dR(d,P);let U=P&&P.count?P.count:0;if(!U){_("No objects found.");return}Array.isArray(P.bbox)&&(d.lastSelectionBounds=Vf(P.bbox[0],P.bbox[1],P.bbox[2],P.bbox[3],d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY),d.map.fitBounds(d.lastSelectionBounds)),typeof d.updateInspector=="function"&&d.updateInspector(P),typeof d.redrawAllLayers=="function"&&d.redrawAllLayers();let W=P.selection_count||U;_(P.truncated?`${U} found (showing first ${W}).`:`${U} found.`,!0)}).catch(P=>_("Find failed: "+P)))}return m.addEventListener("click",N),S.addEventListener("keydown",B=>{B.key==="Enter"&&(B.preventDefault(),N())}),{close:g}}function cnt(d){if(!d.designScale||!d.map)return;let s=q=>d.formatDbu(q),h=q=>d.parseDbu(q),g=d.unitLabel(),m=d.map.getCenter(),_=Qw(m.lat,m.lng,d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY),{overlay:S,close:y,okBtn:R,showError:N}=mR("Go to Position",` -
+ `,"Find",tQt),E=h.querySelector(".sn-pattern"),y=h.querySelector(".sn-type"),I=h.querySelector(".sn-case");E.focus();function N(){let B=E.value.trim();if(!B){_("Enter a name or glob pattern.");return}d.websocketManager&&(_("Searching\u2026",!0),d.websocketManager.request({type:"find",obj_type:y.value,pattern:B,match_case:I.checked}).then(P=>{mR(d,P);let U=P&&P.count?P.count:0;if(!U){_("No objects found.");return}Array.isArray(P.bbox)&&(d.lastSelectionBounds=Vf(P.bbox[0],P.bbox[1],P.bbox[2],P.bbox[3],d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY),d.map.fitBounds(d.lastSelectionBounds)),typeof d.updateInspector=="function"&&d.updateInspector(P),typeof d.redrawAllLayers=="function"&&d.redrawAllLayers();let j=P.selection_count||U;_(P.truncated?`${U} found (showing first ${j}).`:`${U} found.`,!0)}).catch(P=>_("Find failed: "+P)))}return m.addEventListener("click",N),E.addEventListener("keydown",B=>{B.key==="Enter"&&(B.preventDefault(),N())}),{close:p}}function vnt(d){if(!d.designScale||!d.map)return;let s=V=>d.formatDbu(V),h=V=>d.parseDbu(V),p=d.unitLabel(),m=d.map.getCenter(),_=tv(m.lat,m.lng,d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY),{overlay:E,close:y,okBtn:I,showError:N}=vR("Go to Position",` +
-
+
-
-
`,"Go to",OJt),B=S.querySelector(".sn-x"),P=S.querySelector(".sn-y"),U=S.querySelector(".sn-size");B.focus(),B.select();function W(){let q=h(B.value),nt=h(P.value);if(q===null||nt===null){N(`X and Y must be numbers (${g}).`);return}let Q=Id(q,nt,d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY),X=U.value.trim(),gt=X?h(X):null;if(gt!==null&>>0){let ft=gt/2;d.map.fitBounds(Vf(q-ft,nt-ft,q+ft,nt+ft,d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY))}else d.map.setView(Q,d.map.getZoom());y()}R.addEventListener("click",W);for(let q of[B,P,U])q.addEventListener("keydown",nt=>{nt.key==="Enter"&&(nt.preventDefault(),W())});return{close:y}}var BJt={ctrl:"ctrl",control:"ctrl",shift:"shift",alt:"alt",meta:"meta",cmd:"meta",command:"meta",super:"meta"};function Oke(d){if(typeof d!="string")return null;let s=d.split("+").map(_=>_.trim().toLowerCase()).filter(Boolean);if(s.length===0)return null;let h=s.pop();if(BJt[h]!==void 0)return null;let g=new Set;for(let _ of s){let S=BJt[_];if(S===void 0)return null;g.add(S)}return[...["ctrl","alt","shift","meta"].filter(_=>g.has(_)),h].join("+")}function Bke(d){let s=[];return d.ctrlKey&&s.push("ctrl"),d.altKey&&s.push("alt"),d.shiftKey&&s.push("shift"),d.metaKey&&s.push("meta"),[...s,String(d.key).toLowerCase()].join("+")}function UJt(d){let s=[{label:"File",items:[{label:"Open DB...",action:()=>FJt(d,"Open DB","read_db"),enabledWhen:()=>!d.designScale},{label:"Save DB...",action:()=>FJt(d,"Save DB","write_db"),enabledWhen:()=>!!d.designScale}]},{label:"View",items:[{label:"Fit",shortcut:"F",action:()=>{d.fitBounds&&d.map.fitBounds(d.fitBounds)}},{label:"Zoom In",shortcut:"Z",action:()=>d.map.zoomIn()},{label:"Zoom Out",shortcut:"Shift+Z",action:()=>d.map.zoomOut()},{type:"separator"},{label:"Toggle Theme",shortcut:"T",action:()=>d.toggleTheme()},{type:"separator"},{label:"Find...",shortcut:"Ctrl+F",action:()=>ont(d),enabledWhen:()=>!!d.designScale},{label:"Go to Position...",shortcut:"Shift+G",action:()=>cnt(d),enabledWhen:()=>!!d.designScale}]},{label:"Tools",items:[{label:"Ruler",shortcut:"K",action:()=>{d.rulerManager&&d.rulerManager.toggleRulerMode()}},{label:"Clear Rulers",shortcut:"Shift+K",action:()=>{d.rulerManager&&d.rulerManager.clearAllRulers()}},{type:"separator"},{label:"Add Label",shortcut:"L",action:()=>{d.labelManager&&d.labelManager.toggleLabelMode()}},{label:"Clear Labels",action:()=>{d.labelManager&&d.labelManager.clearAllLabels()}},{type:"separator"},{label:"Clear Highlights",action:()=>{d.websocketManager.request({type:"clear_highlights",group:-1}).then(()=>{d.refreshOverlay&&d.refreshOverlay(),d.refreshInspector&&d.refreshInspector()}).catch(()=>{})}},{type:"separator"},{label:"Global Connect...",action:()=>{d.showGlobalConnectDialog&&d.showGlobalConnectDialog()},enabledWhen:()=>!!d.designScale}]},{label:"Options",items:[{label:"Show DBU",action:()=>d.toggleShowDbu(),checked:()=>d.showDbu},{label:"Make euclidian rulers",action:()=>d.toggleRulerStyle(),checked:()=>d.rulerStyle!=="manhattan"},{type:"separator"},{label:"Mouse wheel mapped to zoom by default",action:()=>d.toggleWheelZoom(),checked:()=>d.wheelZoom},{label:"Arrow keys scroll step...",action:()=>d.showArrowStepDialog()},{label:"Application font...",action:()=>d.showAppFontDialog()},{type:"separator"},{label:"Show polygon decomposition",action:()=>d.togglePolyDecomp(),checked:()=>d.polyDecomp,enabledWhen:()=>!!d.designScale}]},{label:"Windows",items:[{label:"Layout Viewer",action:()=>d.focusComponent("LayoutViewer")},{label:"3D Viewer",action:()=>d.focusComponent("3DViewer")},{label:"Display Controls",action:()=>d.focusComponent("DisplayControls")},{label:"Inspector",action:()=>d.focusComponent("Inspector")},{label:"Selection Browser",action:()=>d.focusComponent("SelectHighlight")},{label:"Tcl Console",action:()=>d.focusComponent("TclConsole")},{label:"Hierarchy Browser",action:()=>d.focusComponent("Browser")},{label:"Timing",action:()=>d.focusComponent("TimingWidget")},{label:"DRC Viewer",action:()=>d.focusComponent("DRCWidget")},{label:"Clock Tree",action:()=>d.focusComponent("ClockWidget")},{label:"Charts",action:()=>d.focusComponent("ChartsWidget")},{label:"Help",action:()=>d.focusComponent("HelpWidget")},{type:"separator"},{label:"Reset to Default Layout",action:()=>d.resetLayout()}]},{label:"Help",items:[{label:"Keyboard Shortcuts",action:()=>d.focusComponent("HelpWidget")}]}],h=document.getElementById("menu-bar"),g=null,m=new Map;function _(){g&&(g.classList.remove("open"),g=null)}function S(){let N=s.map(W=>({label:W.label,items:W.items.slice()})),B=new Map(N.map(W=>[W.label,W]));function P(W){let q=B.get(W);return q||(q={label:W,items:[]},B.set(W,q),N.push(q)),q}function U(W,q){let nt=W.items.find(Q=>Q.submenu&&Q.label===q);return nt||(nt={label:q,submenu:{label:q,items:[]}},W.items.push(nt)),nt.submenu}for(let W of d.customMenu||[]){let q=String(W.path||"Custom Scripts").split("/").map(gt=>gt.trim()).filter(Boolean);q.length===0&&q.push("Custom Scripts");let nt=P(q[0]);for(let gt=1;gtzU(d,W.script,W.echo);nt.items.push({label:W.text,shortcut:W.shortcut,action:Q});let X=Oke(W.shortcut);X&&m.set(X,Q)}return N}function y(N,B){for(let P of B){if(P.type==="separator"){let q=document.createElement("div");q.className="menu-separator",N.appendChild(q);continue}let U=document.createElement("div");if(U.className="menu-item",P.submenu){U.classList.add("submenu-item");let q=document.createElement("span");q.textContent=P.label,U.appendChild(q);let nt=document.createElement("span");nt.className="submenu-arrow",nt.textContent="\u25B8",U.appendChild(nt);let Q=document.createElement("div");Q.className="menu-dropdown submenu",y(Q,P.submenu.items),U.appendChild(Q),N.appendChild(U);continue}if(P.disabled&&U.classList.add("disabled"),P.enabledWhen&&(U._enabledWhen=P.enabledWhen),P.checked){let q=document.createElement("span");q.className="menu-check",q.textContent=P.checked()?"\u2713":"",U.appendChild(q),U._checkedFn=P.checked}let W=document.createElement("span");if(W.textContent=P.label,U.appendChild(W),P.shortcut){let q=document.createElement("span");q.className="shortcut",q.textContent=P.shortcut,U.appendChild(q)}P.action&&U.addEventListener("click",q=>{U.classList.contains("disabled")||(q.stopPropagation(),_(),P.action())}),N.appendChild(U)}}function R(){for(let B of h.querySelectorAll(":scope > .menu-label"))B.remove();let N=h.firstChild;g=null,m.clear();for(let B of S()){let W=function(){for(let q of U.querySelectorAll(".menu-item"))if(q._enabledWhen&&q.classList.toggle("disabled",!q._enabledWhen()),q._checkedFn){let nt=q.querySelector(".menu-check");nt&&(nt.textContent=q._checkedFn()?"\u2713":"")}},P=document.createElement("div");P.className="menu-label",P.textContent=B.label;let U=document.createElement("div");U.className="menu-dropdown",y(U,B.items),P.appendChild(U),P.addEventListener("click",q=>{q.stopPropagation(),g===P?_():(_(),W(),P.classList.add("open"),g=P)}),P.addEventListener("mouseenter",()=>{g&&g!==P&&(_(),W(),P.classList.add("open"),g=P)}),h.insertBefore(P,N)}}R(),d.rebuildMenuBar=R,document.addEventListener("click",_),Fke(m)}function Fke(d){document.addEventListener("keydown",s=>{if(d.size===0)return;let h=s.target.tagName;if(h==="INPUT"||h==="TEXTAREA"||s.target.isContentEditable)return;let g=d.get(Bke(s));g&&(s.preventDefault(),s.stopImmediatePropagation(),g())},!0)}function FJt(d,s,h){let g=h==="write_db",m=document.createElement("div");m.className="modal-overlay",m.innerHTML=` +
+
`,"Go to",tQt),B=E.querySelector(".sn-x"),P=E.querySelector(".sn-y"),U=E.querySelector(".sn-size");B.focus(),B.select();function j(){let V=h(B.value),tt=h(P.value);if(V===null||tt===null){N(`X and Y must be numbers (${p}).`);return}let Q=Id(V,tt,d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY),X=U.value.trim(),gt=X?h(X):null;if(gt!==null&>>0){let ft=gt/2;d.map.fitBounds(Vf(V-ft,tt-ft,V+ft,tt+ft,d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY))}else d.map.setView(Q,d.map.getZoom());y()}I.addEventListener("click",j);for(let V of[B,P,U])V.addEventListener("keydown",tt=>{tt.key==="Enter"&&(tt.preventDefault(),j())});return{close:y}}var eQt={ctrl:"ctrl",control:"ctrl",shift:"shift",alt:"alt",meta:"meta",cmd:"meta",command:"meta",super:"meta"};function t5e(d){if(typeof d!="string")return null;let s=d.split("+").map(_=>_.trim().toLowerCase()).filter(Boolean);if(s.length===0)return null;let h=s.pop();if(eQt[h]!==void 0)return null;let p=new Set;for(let _ of s){let E=eQt[_];if(E===void 0)return null;p.add(E)}return[...["ctrl","alt","shift","meta"].filter(_=>p.has(_)),h].join("+")}function e5e(d){let s=[];return d.ctrlKey&&s.push("ctrl"),d.altKey&&s.push("alt"),d.shiftKey&&s.push("shift"),d.metaKey&&s.push("meta"),[...s,String(d.key).toLowerCase()].join("+")}function iQt(d){let s=B=>()=>d.focusComponent(B,{reveal:!0}),h=[{label:"File",items:[{label:"Open DB...",action:()=>nQt(d,"Open DB","read_db"),enabledWhen:()=>!d.designScale},{label:"Save DB...",action:()=>nQt(d,"Save DB","write_db"),enabledWhen:()=>!!d.designScale}]},{label:"View",items:[{label:"Fit",shortcut:"F",action:()=>{d.fitBounds&&d.map.fitBounds(d.fitBounds)}},{label:"Zoom In",shortcut:"Z",action:()=>d.map.zoomIn()},{label:"Zoom Out",shortcut:"Shift+Z",action:()=>d.map.zoomOut()},{type:"separator"},{label:"Toggle Theme",shortcut:"T",action:()=>d.toggleTheme()},{type:"separator"},{label:"Find...",shortcut:"Ctrl+F",action:()=>wnt(d),enabledWhen:()=>!!d.designScale},{label:"Go to Position...",shortcut:"Shift+G",action:()=>vnt(d),enabledWhen:()=>!!d.designScale}]},{label:"Tools",items:[{label:"Ruler",shortcut:"K",action:()=>{d.rulerManager&&d.rulerManager.toggleRulerMode()}},{label:"Clear Rulers",shortcut:"Shift+K",action:()=>{d.rulerManager&&d.rulerManager.clearAllRulers()}},{type:"separator"},{label:"Add Label",shortcut:"L",action:()=>{d.labelManager&&d.labelManager.toggleLabelMode()}},{label:"Clear Labels",action:()=>{d.labelManager&&d.labelManager.clearAllLabels()}},{type:"separator"},{label:"Clear Highlights",action:()=>{d.websocketManager.request({type:"clear_highlights",group:-1}).then(()=>{d.refreshOverlay&&d.refreshOverlay(),d.refreshInspector&&d.refreshInspector()}).catch(()=>{})}},{type:"separator"},{label:"Global Connect...",action:()=>{d.showGlobalConnectDialog&&d.showGlobalConnectDialog()},enabledWhen:()=>!!d.designScale}]},{label:"Options",items:[{label:"Show DBU",action:()=>d.toggleShowDbu(),checked:()=>d.showDbu},{label:"Make euclidian rulers",action:()=>d.toggleRulerStyle(),checked:()=>d.rulerStyle!=="manhattan"},{type:"separator"},{label:"Mouse wheel mapped to zoom by default",action:()=>d.toggleWheelZoom(),checked:()=>d.wheelZoom},{label:"Arrow keys scroll step...",action:()=>d.showArrowStepDialog()},{label:"Application font...",action:()=>d.showAppFontDialog()},{type:"separator"},{label:"Show polygon decomposition",action:()=>d.togglePolyDecomp(),checked:()=>d.polyDecomp,enabledWhen:()=>!!d.designScale}]},{label:"Windows",items:[{label:"Layout Viewer",action:s("LayoutViewer")},{label:"3D Viewer",action:s("3DViewer")},{label:"Display Controls",action:s("DisplayControls")},{label:"Inspector",action:s("Inspector")},{label:"Selection Browser",action:s("SelectHighlight")},{label:"Tcl Console",action:s("TclConsole")},{label:"Hierarchy Browser",action:s("Browser")},{label:"Timing",action:s("TimingWidget")},{label:"DRC Viewer",action:s("DRCWidget")},{label:"Clock Tree",action:s("ClockWidget")},{label:"Charts",action:s("ChartsWidget")},{label:"Help",action:s("HelpWidget")},{type:"separator"},{label:"Reset to Default Layout",action:()=>d.resetLayout()}]},{label:"Help",items:[{label:"Keyboard Shortcuts",action:s("HelpWidget")}]}],p=document.getElementById("menu-bar"),m=null,_=new Map;function E(){m&&(m.classList.remove("open"),m=null)}function y(){let B=h.map(V=>({label:V.label,items:V.items.slice()})),P=new Map(B.map(V=>[V.label,V]));function U(V){let tt=P.get(V);return tt||(tt={label:V,items:[]},P.set(V,tt),B.push(tt)),tt}function j(V,tt){let Q=V.items.find(X=>X.submenu&&X.label===tt);return Q||(Q={label:tt,submenu:{label:tt,items:[]}},V.items.push(Q)),Q.submenu}for(let V of d.customMenu||[]){let tt=String(V.path||"Custom Scripts").split("/").map(ft=>ft.trim()).filter(Boolean);tt.length===0&&tt.push("Custom Scripts");let Q=U(tt[0]);for(let ft=1;ftjU(d,V.script,V.echo);Q.items.push({label:V.text,shortcut:V.shortcut,action:X});let gt=t5e(V.shortcut);gt&&_.set(gt,X)}return B}function I(B,P){for(let U of P){if(U.type==="separator"){let tt=document.createElement("div");tt.className="menu-separator",B.appendChild(tt);continue}let j=document.createElement("div");if(j.className="menu-item",U.submenu){j.classList.add("submenu-item");let tt=document.createElement("span");tt.textContent=U.label,j.appendChild(tt);let Q=document.createElement("span");Q.className="submenu-arrow",Q.textContent="\u25B8",j.appendChild(Q);let X=document.createElement("div");X.className="menu-dropdown submenu",I(X,U.submenu.items),j.appendChild(X),B.appendChild(j);continue}if(U.disabled&&j.classList.add("disabled"),U.enabledWhen&&(j._enabledWhen=U.enabledWhen),U.checked){let tt=document.createElement("span");tt.className="menu-check",tt.textContent=U.checked()?"\u2713":"",j.appendChild(tt),j._checkedFn=U.checked}let V=document.createElement("span");if(V.textContent=U.label,j.appendChild(V),U.shortcut){let tt=document.createElement("span");tt.className="shortcut",tt.textContent=U.shortcut,j.appendChild(tt)}U.action&&j.addEventListener("click",tt=>{j.classList.contains("disabled")||(tt.stopPropagation(),E(),U.action())}),B.appendChild(j)}}function N(){for(let P of p.querySelectorAll(":scope > .menu-label"))P.remove();let B=p.firstChild;m=null,_.clear();for(let P of y()){let V=function(){for(let tt of j.querySelectorAll(".menu-item"))if(tt._enabledWhen&&tt.classList.toggle("disabled",!tt._enabledWhen()),tt._checkedFn){let Q=tt.querySelector(".menu-check");Q&&(Q.textContent=tt._checkedFn()?"\u2713":"")}},U=document.createElement("div");U.className="menu-label",U.textContent=P.label;let j=document.createElement("div");j.className="menu-dropdown",I(j,P.items),U.appendChild(j),U.addEventListener("click",tt=>{tt.stopPropagation(),m===U?E():(E(),V(),U.classList.add("open"),m=U)}),U.addEventListener("mouseenter",()=>{m&&m!==U&&(E(),V(),U.classList.add("open"),m=U)}),p.insertBefore(U,B)}}N(),d.rebuildMenuBar=N,document.addEventListener("click",E),n5e(_)}function n5e(d){document.addEventListener("keydown",s=>{if(d.size===0)return;let h=s.target.tagName;if(h==="INPUT"||h==="TEXTAREA"||s.target.isContentEditable)return;let p=d.get(e5e(s));p&&(s.preventDefault(),s.stopImmediatePropagation(),p())},!0)}function nQt(d,s,h){let p=h==="write_db",m=document.createElement("div");m.className="modal-overlay",m.innerHTML=` `,document.body.appendChild(m);let _=m.querySelector(".fb-breadcrumb"),S=m.querySelector(".fb-file-list"),y=m.querySelector(".fb-path-input"),R=m.querySelector(".modal-error"),N=m.querySelector(".ok"),B=m.querySelector(".cancel"),P="",U=null;function W(){m.remove()}function q(){let ft=y.value.trim();N.disabled=!ft}function nt(ft){_.innerHTML="";let xt=ft.split("/").filter(Boolean),Bt=document.createElement("span");Bt.className="fb-crumb",Bt.textContent="/",Bt.addEventListener("click",()=>X("/")),_.appendChild(Bt);let Ot="";for(let Pt of xt){Ot+="/"+Pt;let se=document.createElement("span");se.className="fb-crumb-sep",se.textContent=" / ",_.appendChild(se);let ot=document.createElement("span");ot.className="fb-crumb",ot.textContent=Pt;let Lt=Ot;ot.addEventListener("click",()=>X(Lt)),_.appendChild(ot)}}function Q(ft){if(S.innerHTML="",U=null,!ft||ft.length===0){let xt=document.createElement("div");xt.className="fb-empty",xt.textContent="(empty directory)",S.appendChild(xt);return}for(let xt of ft){let Bt=document.createElement("div");Bt.className="fb-entry",xt.is_dir&&Bt.classList.add("fb-dir");let Ot=document.createElement("span");Ot.className="fb-icon",Ot.textContent=xt.is_dir?"\u{1F4C1}":"\u{1F4C4}",Bt.appendChild(Ot);let Pt=document.createElement("span");if(Pt.className="fb-name",Pt.textContent=xt.name,Bt.appendChild(Pt),!xt.is_dir&&xt.size!==void 0){let se=document.createElement("span");se.className="fb-size",se.textContent=Uke(xt.size),Bt.appendChild(se)}xt.is_dir?Bt.addEventListener("click",()=>{X(P+"/"+xt.name)}):(Bt.addEventListener("click",()=>{let se=S.querySelector(".fb-selected");se&&se.classList.remove("fb-selected"),Bt.classList.add("fb-selected"),U=xt,y.value=P+"/"+xt.name,q()}),Bt.addEventListener("dblclick",()=>{y.value=P+"/"+xt.name,q(),gt()})),S.appendChild(Bt)}}async function X(ft){R.style.display="none",S.innerHTML='
Loading...
';try{let xt=await d.websocketManager.request({type:"list_dir",path:ft||""});if(P=xt.path,nt(xt.path),Q(xt.entries),g){let Ot=y.value.trim().split("/").pop();Ot&&!Ot.includes("/")?y.value=P+"/"+Ot:y.value=P+"/"}else y.value="",U=null;q()}catch(xt){S.innerHTML="",R.textContent=xt.message||String(xt),R.style.display=""}}async function gt(){let ft=y.value.trim();if(ft){N.disabled=!0,N.textContent="Working...",R.style.display="none";try{let xt=await d.websocketManager.request({type:"tcl_eval",cmd:`${h} ${ft}`});if(xt.is_error){R.textContent=xt.output||xt.result||"Command failed",R.style.display="",N.disabled=!1,N.textContent=g?"Save":"Open";return}if(W(),h==="read_db"){window.location.reload();return}}catch(xt){R.textContent=xt.message||"Request failed",R.style.display="",N.disabled=!1,N.textContent=g?"Save":"Open"}}}y.addEventListener("input",q),y.addEventListener("keydown",ft=>{if(ft.key==="Enter"){let xt=y.value.trim();xt.endsWith("/")?X(xt.replace(/\/+$/,"")||"/"):gt()}ft.key==="Escape"&&W()}),N.addEventListener("click",gt),B.addEventListener("click",W),m.addEventListener("click",ft=>{ft.target===m&&W()}),X("")}function Uke(d){return d<1024?d+" B":d<1024*1024?(d/1024).toFixed(1)+" KB":d<1024*1024*1024?(d/(1024*1024)).toFixed(1)+" MB":(d/(1024*1024*1024)).toFixed(1)+" GB"}function zJt(d){let s=document.getElementById("toolbar");if(!s)return;d._toolbarToggleState||(d._toolbarToggleState={});function h(){s.innerHTML="";let g=d.customToolbar||[],m=new Set(g.map(_=>_.key));for(let _ of Object.keys(d._toolbarToggleState))m.has(_)||delete d._toolbarToggleState[_];for(let _ of g){let S=document.createElement("button");if(S.className="or-btn or-btn-sm toolbar-button",S.dataset.key=_.key,_.tooltip&&(S.title=_.tooltip),_.icon){let y=document.createElement("span");if(y.className="toolbar-icon",/^(data:|https?:|\.?\/)/.test(_.icon)){let R=document.createElement("img");R.src=_.icon,R.alt="",y.appendChild(R)}else y.textContent=_.icon;S.appendChild(y)}if(_.text){let y=document.createElement("span");y.className="toolbar-label",y.textContent=_.text,S.appendChild(y)}_.toggle&&d._toolbarToggleState[_.key]&&S.classList.add("active"),S.addEventListener("click",()=>{if(_.toggle){let y=!d._toolbarToggleState[_.key];d._toolbarToggleState[_.key]=y,S.classList.toggle("active",y),zU(d,y?_.script:_.script_off,_.echo)}else zU(d,_.script,_.echo)}),s.appendChild(S)}}return h(),d.rebuildToolbar=h,{rebuild:h}}function HJt(d,s=""){let h=document.createElement("div");h.className="modal-overlay",h.innerHTML=` +
`,document.body.appendChild(m);let _=m.querySelector(".fb-breadcrumb"),E=m.querySelector(".fb-file-list"),y=m.querySelector(".fb-path-input"),I=m.querySelector(".modal-error"),N=m.querySelector(".ok"),B=m.querySelector(".cancel"),P="",U=null;function j(){m.remove()}function V(){let ft=y.value.trim();N.disabled=!ft}function tt(ft){_.innerHTML="";let xt=ft.split("/").filter(Boolean),Bt=document.createElement("span");Bt.className="fb-crumb",Bt.textContent="/",Bt.addEventListener("click",()=>X("/")),_.appendChild(Bt);let Ot="";for(let Pt of xt){Ot+="/"+Pt;let se=document.createElement("span");se.className="fb-crumb-sep",se.textContent=" / ",_.appendChild(se);let ot=document.createElement("span");ot.className="fb-crumb",ot.textContent=Pt;let Lt=Ot;ot.addEventListener("click",()=>X(Lt)),_.appendChild(ot)}}function Q(ft){if(E.innerHTML="",U=null,!ft||ft.length===0){let xt=document.createElement("div");xt.className="fb-empty",xt.textContent="(empty directory)",E.appendChild(xt);return}for(let xt of ft){let Bt=document.createElement("div");Bt.className="fb-entry",xt.is_dir&&Bt.classList.add("fb-dir");let Ot=document.createElement("span");Ot.className="fb-icon",Ot.textContent=xt.is_dir?"\u{1F4C1}":"\u{1F4C4}",Bt.appendChild(Ot);let Pt=document.createElement("span");if(Pt.className="fb-name",Pt.textContent=xt.name,Bt.appendChild(Pt),!xt.is_dir&&xt.size!==void 0){let se=document.createElement("span");se.className="fb-size",se.textContent=i5e(xt.size),Bt.appendChild(se)}xt.is_dir?Bt.addEventListener("click",()=>{X(P+"/"+xt.name)}):(Bt.addEventListener("click",()=>{let se=E.querySelector(".fb-selected");se&&se.classList.remove("fb-selected"),Bt.classList.add("fb-selected"),U=xt,y.value=P+"/"+xt.name,V()}),Bt.addEventListener("dblclick",()=>{y.value=P+"/"+xt.name,V(),gt()})),E.appendChild(Bt)}}async function X(ft){I.style.display="none",E.innerHTML='
Loading...
';try{let xt=await d.websocketManager.request({type:"list_dir",path:ft||""});if(P=xt.path,tt(xt.path),Q(xt.entries),p){let Ot=y.value.trim().split("/").pop();Ot&&!Ot.includes("/")?y.value=P+"/"+Ot:y.value=P+"/"}else y.value="",U=null;V()}catch(xt){E.innerHTML="",I.textContent=xt.message||String(xt),I.style.display=""}}async function gt(){let ft=y.value.trim();if(ft){N.disabled=!0,N.textContent="Working...",I.style.display="none";try{let xt=await d.websocketManager.request({type:"tcl_eval",cmd:`${h} ${ft}`});if(xt.is_error){I.textContent=xt.output||xt.result||"Command failed",I.style.display="",N.disabled=!1,N.textContent=p?"Save":"Open";return}if(j(),h==="read_db"){window.location.reload();return}}catch(xt){I.textContent=xt.message||"Request failed",I.style.display="",N.disabled=!1,N.textContent=p?"Save":"Open"}}}y.addEventListener("input",V),y.addEventListener("keydown",ft=>{if(ft.key==="Enter"){let xt=y.value.trim();xt.endsWith("/")?X(xt.replace(/\/+$/,"")||"/"):gt()}ft.key==="Escape"&&j()}),N.addEventListener("click",gt),B.addEventListener("click",j),m.addEventListener("click",ft=>{ft.target===m&&j()}),X("")}function i5e(d){return d<1024?d+" B":d<1024*1024?(d/1024).toFixed(1)+" KB":d<1024*1024*1024?(d/(1024*1024)).toFixed(1)+" MB":(d/(1024*1024*1024)).toFixed(1)+" GB"}function rQt(d){let s=document.getElementById("toolbar");if(!s)return;d._toolbarToggleState||(d._toolbarToggleState={});function h(){s.innerHTML="";let p=d.customToolbar||[],m=new Set(p.map(_=>_.key));for(let _ of Object.keys(d._toolbarToggleState))m.has(_)||delete d._toolbarToggleState[_];for(let _ of p){let E=document.createElement("button");if(E.className="or-btn or-btn-sm toolbar-button",E.dataset.key=_.key,_.tooltip&&(E.title=_.tooltip),_.icon){let y=document.createElement("span");if(y.className="toolbar-icon",/^(data:|https?:|\.?\/)/.test(_.icon)){let I=document.createElement("img");I.src=_.icon,I.alt="",y.appendChild(I)}else y.textContent=_.icon;E.appendChild(y)}if(_.text){let y=document.createElement("span");y.className="toolbar-label",y.textContent=_.text,E.appendChild(y)}_.toggle&&d._toolbarToggleState[_.key]&&E.classList.add("active"),E.addEventListener("click",()=>{if(_.toggle){let y=!d._toolbarToggleState[_.key];d._toolbarToggleState[_.key]=y,E.classList.toggle("active",y),jU(d,y?_.script:_.script_off,_.echo)}else jU(d,_.script,_.echo)}),s.appendChild(E)}}return h(),d.rebuildToolbar=h,{rebuild:h}}function oQt(d,s=""){let h=document.createElement("div");h.className="modal-overlay",h.innerHTML=` `,document.body.appendChild(h);function g(_){_.key==="Escape"&&m()}let m=()=>{h.remove(),document.removeEventListener("keydown",g)};return h.addEventListener("click",_=>{_.target===h&&m()}),document.addEventListener("keydown",g),{overlay:h,body:h.querySelector(".modal-body"),errorDiv:h.querySelector(".modal-error"),buttons:h.querySelector(".modal-buttons"),close:m}}function Sy(d,s){d.textContent=s,d.style.display=s?"":"none"}function vR(d,s,{primary:h=!1}={}){let g=document.createElement("button");return g.textContent=s,g.className="or-btn"+(h?" or-btn-primary":""),d.appendChild(g),g}function ant(d){return"{"+String(d)+"}"}function GJt(d){let s=HJt("Global Connect","gc-dialog"),h=document.createElement("div");h.className="gc-table",s.body.appendChild(h);let g=document.createElement("div");g.className="gc-form";let m=document.createElement("input");m.placeholder="Instance pattern (regex)",m.value=".*";let _=document.createElement("input");_.placeholder="Pin pattern (regex)";let S=document.createElement("select"),y=document.createElement("select"),R=document.createElement("span");R.innerHTML='',g.append(mS("Instance",m),mS("Pin",_),mS("Net",S),mS("Region",y),R);let N=vR(g,"Add rule");s.body.appendChild(g);function B(){let q=_.value.trim()!==""&&S.value!=="";for(let nt of[m,_])try{new RegExp(nt.value),nt.classList.remove("gc-invalid")}catch{nt.classList.add("gc-invalid"),q=!1}N.disabled=!q}m.addEventListener("input",B),_.addEventListener("input",B),S.addEventListener("change",B);function P(){d.websocketManager.request({type:"global_connect_info"}).then(q=>{h.innerHTML='
InstancePinNetRegion
',(q.rules||[]).forEach(nt=>{let Q=document.createElement("div");Q.className="gc-row",Q.innerHTML=`${GU(nt.inst)}${GU(nt.pin)}${GU(nt.net)}${GU(nt.region||"All")}`;let X=document.createElement("button");X.className="or-btn or-btn-sm or-btn-icon",X.textContent="\u2715",X.title="Delete rule",X.addEventListener("click",()=>{d.websocketManager.request({type:"global_connect_delete",inst:nt.inst,pin:nt.pin,net:nt.net,region:nt.region||""}).then(P).catch(gt=>Sy(s.errorDiv,String(gt)))}),Q.appendChild(X),h.appendChild(Q)}),G2t(S,q.nets||[]),G2t(y,["All",...q.regions||[]]),B()}).catch(q=>Sy(s.errorDiv,String(q)))}N.addEventListener("click",()=>{let q=g.querySelector('input[name="gc-pg"]:checked').value,nt=`add_global_connection -net ${ant(S.value)} -inst_pattern ${ant(m.value||".*")} -pin_pattern ${ant(_.value)} -${q}`;y.value&&y.value!=="All"&&(nt+=` -region ${ant(y.value)}`),jJt(d,nt,s.errorDiv,"Rule added.",P)}),vR(s.buttons,"Apply (force)").addEventListener("click",()=>{d.websocketManager.request({type:"global_connect_apply",force:!0}).then(q=>{if(!q.had_rules){Sy(s.errorDiv,"No global-connect rules defined \u2014 add a rule first.");return}Sy(s.errorDiv,`Connected ${q.connected} pin(s).`),d.scheduleRedrawAllLayers&&d.scheduleRedrawAllLayers(),P()}).catch(q=>Sy(s.errorDiv,q.message||String(q)))}),vR(s.buttons,"Clear all").addEventListener("click",()=>jJt(d,"clear_global_connect",s.errorDiv,"Rules cleared.",P)),vR(s.buttons,"Close").addEventListener("click",s.close),P()}function jJt(d,s,h,g,m){d.websocketManager.request({type:"tcl_eval",cmd:s}).then(_=>{if(_.is_error){Sy(h,_.output||_.result||"Command failed");return}Sy(h,g||""),d.scheduleRedrawAllLayers&&d.scheduleRedrawAllLayers(),m&&m()}).catch(_=>Sy(h,_.message||String(_)))}function WJt(d,s){let h=HJt(`Insert Buffer \u2014 ${GU(s)}`,"buf-dialog"),g=vR(h.buttons,"Insert",{primary:!0});g.disabled=!0,vR(h.buttons,"Cancel").addEventListener("click",h.close),d.websocketManager.request({type:"buffer_info",net:s}).then(_=>{if(!_.can_buffer){h.body.textContent=_.error||"This net has multiple drivers and cannot be buffered.";return}zke(d,h,s,_,g)}).catch(_=>{h.body.textContent=String(_)})}function zke(d,s,h,g,m){let _=document.createElement("div");_.className="buf-pins";let S=g.drivers||[],y=g.loads||[],R=new Set;function N(){_.innerHTML="";let q=(nt,Q)=>{let X=document.createElement("label");X.className="buf-pin";let gt=document.createElement("input");gt.type="checkbox",gt.checked=R.has(nt.id),gt.addEventListener("change",()=>{if(gt.checked){if(Q)R.clear();else for(let ft of S)R.delete(ft.id);R.add(nt.id)}else R.delete(nt.id);N(),W()}),X.append(gt,document.createTextNode(" "+nt.label)),_.appendChild(X)};S.forEach(nt=>q(nt,!0)),y.forEach(nt=>q(nt,!1))}S.length&&R.add(S[0].id),N();let B=document.createElement("select");G2t(B,g.masters||[]);let P=document.createElement("input");P.placeholder="Optional: new buffer name";let U=document.createElement("input");U.placeholder="Optional: new net name",s.body.append(mS("Pins to buffer",_),mS("Buffer master",B),mS("Buffer name",P),mS("Net name",U));function W(){m.disabled=R.size===0||!B.value}B.addEventListener("change",W),W(),m.addEventListener("click",()=>{let q=new Set(S.map(X=>X.id)),nt=[...R],Q=nt.some(X=>q.has(X))?"driver":"loads";d.websocketManager.request({type:"insert_buffer",net:h,mode:Q,pins:nt,master:B.value,buf_name:P.value.trim(),net_name:U.value.trim()}).then(X=>{if(X.is_error||X.ok===!1){Sy(s.errorDiv,X.error||X.result||"Insertion failed");return}s.close(),X.inst&&(d.selectedInstanceName=X.inst),d.scheduleRedrawAllLayers&&d.scheduleRedrawAllLayers()}).catch(X=>Sy(s.errorDiv,X.message||String(X)))})}function mS(d,s){let h=document.createElement("label");h.className="edit-field";let g=document.createElement("span");return g.textContent=d,h.append(g,s),h}function G2t(d,s){let h=d.value;d.innerHTML="";for(let g of s){let m=document.createElement("option");m.value=g,m.textContent=g,d.appendChild(m)}s.includes(h)&&(d.value=h)}function GU(d){return String(d??"").replace(/&/g,"&").replace(//g,">")}var $Jt="#00ffff",jke="#ffff00",W2t="#ffffff",fk=0,$2t=1,WU=2,unt=class{constructor(s,h,g,m){this._app=s,this._visibility=h,this._updateInspector=g,this._focusComponent=m,this._state=fk,this._rulers=[],this._nextId=0,this._pt0=null,this._selectedRulerId=null,this._ctrlHeld=!1,this._shiftHeld=!1,this._rulerPane=null,this._rulerLayerGroup=null,this._previewGroup=null,this._snapGroup=null,this._snapTimer=null,this._lastSnapResult=null,this._onMouseMove=this._handleMouseMove.bind(this),this._onMapClick=this._handleMapClick.bind(this),this._initLayers()}_initLayers(){let s=this._app.map;s&&(this._rulerPane=s.createPane("ruler-pane"),this._rulerPane.style.zIndex="700",this._rulerPane.style.pointerEvents="auto",this._rulerLayerGroup=L.layerGroup([],{pane:"ruler-pane"}).addTo(s),this._previewGroup=L.layerGroup([],{pane:"ruler-pane"}).addTo(s),this._snapGroup=L.layerGroup([],{pane:"ruler-pane"}).addTo(s))}isActive(){return this._state!==fk}updateVisibility(){this._rulerPane&&(this._rulerPane.style.display=this._visibility.rulers?"":"none")}toggleRulerMode(){this._state===fk?this._enterFirstPoint():this.cancelRulerBuild()}cancelRulerBuild(){this._state=fk,this._pt0=null,this._lastSnapResult=null,this._clearPreview(),this._clearSnap(),this._setCursor(!1),this._removeMapListeners()}clearAllRulers(){this._rulers=[],this._selectedRulerId=null,this._rulerLayerGroup.clearLayers(),this._clearPreview(),this._clearSnap(),this._state!==fk&&this.cancelRulerBuild()}_enterFirstPoint(){this._state=$2t,this._pt0=null,this._lastSnapResult=null,this._setCursor(!0),this._addMapListeners()}_enterMeasuring(s){this._state=WU,this._pt0=s}_addMapListeners(){let s=this._app.map;s&&(s.getContainer().addEventListener("mousemove",this._onMouseMove),s.on("click",this._onMapClick))}_removeMapListeners(){let s=this._app.map;s&&(s.getContainer().removeEventListener("mousemove",this._onMouseMove),s.off("click",this._onMapClick))}_handleMouseMove(s){if(this._state===fk)return;this._ctrlHeld=s.ctrlKey||s.metaKey,this._shiftHeld=s.shiftKey;let h=this._app.map,g=h.getContainer().getBoundingClientRect(),m=h.containerPointToLatLng([s.clientX-g.left,s.clientY-g.top]),_=Qw(m.lat,m.lng,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY);this._snapTimer&&clearTimeout(this._snapTimer),this._snapTimer=setTimeout(()=>{this._requestSnap(_.dbuX,_.dbuY)},50)}_handleMapClick(s){if(this._state===fk)return;L.DomEvent.stopPropagation(s);let h=s.originalEvent;h&&(this._ctrlHeld=h.ctrlKey||h.metaKey,this._shiftHeld=h.shiftKey);let g=Qw(s.latlng.lat,s.latlng.lng,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY),m=this._getSnappedPoint(g.dbuX,g.dbuY);this._state===$2t?this._enterMeasuring(m):this._state===WU&&(this._createRuler(this._pt0,m),this._state=$2t,this._pt0=null,this._clearPreview(),this._clearSnap(),this._lastSnapResult=null)}async _requestSnap(s,h){let g=this._app;if(!g.websocketManager||!g.designScale)return;if(this._ctrlHeld){this._lastSnapResult=null,this._clearSnap(),this._updatePreview(s,h);return}let _=g.techData?.dbu_per_micron||1e3,S=g.map.getZoom(),y=Math.pow(2,Math.max(0,S)),R=1/(g.designScale*y),N=Math.max(Math.round(10*R),10),B=!0,P=!0;if(this._shiftHeld)B=!0,P=!0;else if(this._state===WU&&this._pt0){let W=Math.abs(s-this._pt0.x),q=Math.abs(h-this._pt0.y);W>q?(B=!1,P=!0):q>W&&(B=!0,P=!1)}let U={};for(let[W,q]of Object.entries(this._visibility))U[W]=!!q;try{let W=await g.websocketManager.request({type:"snap",dbu_x:s,dbu_y:h,radius:_,point_threshold:N,horizontal:!!B,vertical:!!P,visible_layers:[...g.visibleLayerNames],...U});this._lastSnapResult=W,this._updateSnapIndicator(W),this._updatePreview(s,h)}catch{this._lastSnapResult=null,this._clearSnap()}}_getSnappedPoint(s,h){if(this._ctrlHeld)return{x:s,y:h};let g=this._lastSnapResult,m;if(g?.found&&g.is_point)m={x:g.edge[0][0],y:g.edge[0][1]};else if(g?.found){let _=g.edge;_[0][1]===_[1][1]?m={x:s,y:_[0][1]}:m={x:_[0][0],y:h}}else m={x:s,y:h};if(!this._shiftHeld&&this._state===WU&&this._pt0){let _=Math.abs(m.x-this._pt0.x),S=Math.abs(m.y-this._pt0.y);_{L.DomEvent.stopPropagation(se),this._selectRuler(s.id)}),B.addLayer(q);let nt=this._app.map.getZoom(),Q=Math.pow(2,Math.max(0,nt)),gt=8*(1/(h*Q)),ft=(se,ot,Lt)=>{let be=Math.sqrt(ot*ot+Lt*Lt);if(be===0)return;let ln=-Lt/be,Fn=ot/be,ne=Id(se.x+ln*gt,se.y+Fn*gt,h,g,m,_),xe=Id(se.x-ln*gt,se.y-Fn*gt,h,g,m,_);B.addLayer(L.polyline([ne,xe],{color:N,weight:2,pane:"ruler-pane",interactive:!1}))};if(P)ft(s.pt0,P.x-s.pt0.x,P.y-s.pt0.y),ft(s.pt1,s.pt1.x-P.x,s.pt1.y-P.y);else{let se=s.pt1.x-s.pt0.x,ot=s.pt1.y-s.pt0.y;ft(s.pt0,se,ot),ft(s.pt1,se,ot)}let xt=this._computeDistance(s.pt0,s.pt1,s.euclidian),Bt=U?U[0]:(S[0]+y[0])/2,Ot=U?U[1]:(S[1]+y[1])/2,Pt=L.marker([Bt,Ot],{icon:L.divIcon({className:"ruler-label",html:this._formatDistance(xt),iconSize:null}),pane:"ruler-pane",interactive:!1});B.addLayer(Pt),s._layerGroup=B,this._rulerLayerGroup.addLayer(B)}_rerenderAll(){this._rulerLayerGroup.clearLayers();for(let s of this._rulers)this._renderRuler(s)}_selectRuler(s){this._selectedRulerId=s,this._rerenderAll();let h=this._rulers.find(N=>N.id===s);if(!h)return;wg(this._app);let g=Math.abs(h.pt1.x-h.pt0.x),m=Math.abs(h.pt1.y-h.pt0.y),_=h.euclidian?Math.sqrt(g*g+m*m):g+m,S=N=>this._app.formatDbu(N,!0),y=N=>this._app.parseDbu(N),R={type:"Ruler",name:h.name,bbox:[Math.min(h.pt0.x,h.pt1.x),Math.min(h.pt0.y,h.pt1.y),Math.max(h.pt0.x,h.pt1.x),Math.max(h.pt0.y,h.pt1.y)],properties:[{name:"Name",value:h.name,editable:!0},{name:"Label",value:h.label||"",editable:!0},{name:"Point 0 - x",value:S(h.pt0.x),editable:!0},{name:"Point 0 - y",value:S(h.pt0.y),editable:!0},{name:"Point 1 - x",value:S(h.pt1.x),editable:!0},{name:"Point 1 - y",value:S(h.pt1.y),editable:!0},{name:"Delta x",value:S(g)},{name:"Delta y",value:S(m)},{name:"Length",value:S(_)},{name:"Euclidian",value:h.euclidian?"True":"False",editable:!0,editor:{type:"bool"}}],onPropertyChange:(N,B)=>{switch(N){case"Name":h.name=B;break;case"Label":h.label=B;break;case"Point 0 - x":{let P=y(B);P!==null&&(h.pt0.x=P);break}case"Point 0 - y":{let P=y(B);P!==null&&(h.pt0.y=P);break}case"Point 1 - x":{let P=y(B);P!==null&&(h.pt1.x=P);break}case"Point 1 - y":{let P=y(B);P!==null&&(h.pt1.y=P);break}case"Euclidian":h.euclidian=B.trim().toLowerCase()==="true";break}this._rerenderAll(),this._selectRuler(h.id)}};this._updateInspector(R),this._focusComponent("Inspector"),requestAnimationFrame(()=>{let N=this._app.inspectorEl?.querySelector(".inspector-toolbar");if(!N)return;let B=document.createElement("button");B.className="or-btn or-btn-icon",B.title="Delete ruler",B.innerHTML='',B.addEventListener("click",()=>{this.deleteRuler(s)}),N.appendChild(B)})}deleteRuler(s){let h=this._rulers.findIndex(m=>m.id===s);if(h===-1)return;let g=this._rulers[h];g._layerGroup&&this._rulerLayerGroup.removeLayer(g._layerGroup),this._rulers.splice(h,1),this._selectedRulerId===s&&(this._selectedRulerId=null,this._updateInspector(null))}_getManhattanJoinPt(s,h){return{x:h.x,y:s.y}}_computeDistance(s,h,g=!0){let m=Math.abs(h.x-s.x),_=Math.abs(h.y-s.y);return g?Math.sqrt(m*m+_*_):m+_}_formatDistance(s){return this._app.formatDistance(s)}_setCursor(s){let h=this._app.map?.getContainer();h&&(s?h.classList.add("ruler-mode-cursor"):h.classList.remove("ruler-mode-cursor"))}_clearPreview(){this._previewGroup?.clearLayers()}_clearSnap(){this._snapGroup?.clearLayers()}};var lnt=class{constructor(s,h,g,m){this._app=s,this._visibility=h,this._updateInspector=g,this._focusComponent=m,this._labels=[],this._anchors=[],this._mode=!1,this._selectedName=null,this._pane=null,this._handleGroup=null,this._initLayers()}_initLayers(){let s=this._app.map;s&&(this._pane=s.createPane("label-pane"),this._pane.style.zIndex="690",this._pane.style.pointerEvents="auto",this._handleGroup=L.layerGroup([],{pane:"label-pane"}).addTo(s))}isActive(){return this._mode}updateVisibility(){this._pane&&(this._pane.style.display=this._visibility.labels?"":"none")}toggleLabelMode(){this._mode=!this._mode,this._setCursor(this._mode)}cancelLabelMode(){this._mode=!1,this._setCursor(!1)}_setCursor(s){let h=this._app.map?.getContainer();h&&h.classList.toggle("label-mode-cursor",s)}_wm(){return this._app.websocketManager}_applyLabels(s){this._labels=s||[],this._renderHandles()}_refresh(s){this._applyLabels(s&&s.labels),this._app.refreshOverlay()}applyRemoteLabels(s){this._applyLabels(s),this._selectedName&&!this._labels.some(h=>h.name===this._selectedName)&&(this._selectedName=null,this._updateInspector(null),this._renderHandles()),this._app.refreshOverlay()}_updateLabel(s,h){return this._wm().request({type:"update_label",name:s,...h})}async reload(){let s=this._wm();if(s)try{let h=await s.request({type:"list_labels"});this._anchors=h.anchors||[],this._applyLabels(h.labels)}catch{this._applyLabels([])}}async handleMapClick(s,h){let g=window.prompt("Label text:");if(this._mode=!1,this._setCursor(!1),!!g)try{let m=await this._wm().request({type:"add_label",x:Math.round(s),y:Math.round(h),text:g});this._refresh(m)}catch(m){console.error("add_label failed:",m)}}_renderHandles(){if(!this._handleGroup)return;this._handleGroup.clearLayers();let s=this._app.designScale;if(!s)return;let h=this._app.designMaxDXDY,g=this._app.designOriginX,m=this._app.designOriginY;for(let _ of this._labels){let S=Id(_.x,_.y,s,h,g,m),y=_.name===this._selectedName,R=L.marker(S,{pane:"label-pane",draggable:!0,keyboard:!1,icon:L.divIcon({className:"label-handle"+(y?" label-handle-selected":""),html:"",iconSize:[10,10]}),title:_.text});R.on("click",N=>{L.DomEvent.stopPropagation(N),this._select(_.name)}),R.on("dragend",N=>{let B=N.target.getLatLng(),{dbuX:P,dbuY:U}=Qw(B.lat,B.lng,s,h,g,m);this._commitMove(_,Math.round(P),Math.round(U))}),this._handleGroup.addLayer(R)}}async _commitMove(s,h,g){try{let m=await this._updateLabel(s.name,{x:h,y:g,text:s.text,size:s.size||0,anchor:s.anchor||"center",color:s.color});this._refresh(m)}catch(m){console.error("move label failed:",m)}}_select(s){this._selectedName=s,this._renderHandles();let h=this._labels.find(_=>_.name===s);if(!h)return;let g=_=>this._app.formatDbu(_,!0),m={type:"Label",name:h.name,bbox:[h.x,h.y,h.x,h.y],properties:[{name:"Name",value:h.name},{name:"Text",value:h.text,editable:!0},{name:"x",value:g(h.x)},{name:"y",value:g(h.y)},{name:"Font size",value:String(h.size||0),editable:!0},{name:"Anchor",value:h.anchor||"center",editable:!0,editor:{type:"list",options:this._anchors}}],onPropertyChange:(_,S)=>{let y={text:h.text,size:h.size||0,anchor:h.anchor||"center"};_==="Text"?y.text=S:_==="Font size"?y.size=parseInt(S,10)||0:_==="Anchor"&&(y.anchor=S.trim()),this._edit(h,y)}};this._updateInspector(m),this._focusComponent("Inspector"),requestAnimationFrame(()=>{let _=this._app.inspectorEl?.querySelector(".inspector-toolbar");if(!_||_.querySelector(".delete-label-btn"))return;let S=document.createElement("button");S.className="or-btn or-btn-icon delete-label-btn",S.title="Delete label",S.innerHTML='',S.addEventListener("click",()=>this.deleteLabel(s)),_.appendChild(S)})}async _edit(s,h){try{let g=await this._updateLabel(s.name,{x:s.x,y:s.y,text:h.text,size:h.size,anchor:h.anchor,color:s.color});this._refresh(g),this._select(s.name)}catch(g){console.error("edit label failed:",g)}}async deleteLabel(s){try{let h=await this._wm().request({type:"delete_label",name:s});this._selectedName===s&&(this._selectedName=null,this._updateInspector(null)),this._refresh(h)}catch(h){console.error("delete_label failed:",h)}}async clearAllLabels(){try{let s=await this._wm().request({type:"clear_labels"});this._selectedName=null,this._refresh(s)}catch(s){console.error("clear_labels failed:",s)}}};var VJt="Select an instance in the layout to view its schematic.",hnt=class{constructor(s,h){this.container=s,this.appState=h,this.element=document.createElement("div"),this.element.className="schematic-widget",this.element.style.cssText="width:100%; height:100%; display:flex; flex-direction:column; background:var(--bg-panel); color:var(--fg-primary); overflow:hidden;",this.controls=document.createElement("div"),this.controls.style.cssText="padding:4px 8px; background:var(--bg-header); border-bottom:1px solid var(--border);flex-shrink:0; display:flex; align-items:center; gap:8px; flex-wrap:wrap;",this.controls.innerHTML='',this.element.appendChild(this.controls),this.svgContainer=document.createElement("div"),this.svgContainer.style.cssText="flex:1; overflow:hidden; position:relative; cursor:grab; background:var(--bg-main);",this.element.appendChild(this.svgContainer),this.container.element.appendChild(this.element),this.controls.querySelector("#schematic-refresh").addEventListener("click",()=>this.refresh()),this.controls.querySelector("#schematic-fit").addEventListener("click",()=>this.fitView()),this.controls.querySelector("#schematic-zoom-in").addEventListener("click",()=>this._zoomStep(1.5)),this.controls.querySelector("#schematic-zoom-out").addEventListener("click",()=>this._zoomStep(1/1.5)),this.controls.querySelector("#schematic-select").addEventListener("click",()=>this._toggleSelectMode()),this.controls.querySelector("#schematic-zoom-to").addEventListener("click",()=>this._zoomToSelected()),this.controls.querySelector("#schematic-save-svg").addEventListener("click",()=>this._exportSvg()),this.controls.querySelector("#schematic-save-png").addEventListener("click",()=>this._exportPng()),this.controls.querySelector("#schematic-copy").addEventListener("click",()=>this._copyImage()),this.appState.schematicWidget=this,this.netlistsvg=null,this.skin=null,this._svgEl=null,this._scale=1,this._panX=0,this._panY=0,this._selectMode=!1,this._selectedCell=null,this._svgIdToInstName=new Map,this._setupPanZoom(),this.initNetlistSVG()}_setupPanZoom(){let s=this.svgContainer,h=!1,g,m,_,S;s.addEventListener("wheel",y=>{if(!this._svgEl)return;y.preventDefault();let R=y.deltaY<0?1.2:1/1.2,N=s.getBoundingClientRect(),B=y.clientX-N.left,P=y.clientY-N.top;this._panX=B+(this._panX-B)*R,this._panY=P+(this._panY-P)*R,this._scale*=R,this._applyTransform()},{passive:!1}),s.addEventListener("mousedown",y=>{if(!(!this._svgEl||y.button!==0)){if(this._selectMode){this._handleSelectClick(y);return}h=!0,g=y.clientX,m=y.clientY,_=this._panX,S=this._panY,s.style.cursor="grabbing",y.preventDefault()}}),window.addEventListener("mousemove",y=>{h&&(this._panX=_+(y.clientX-g),this._panY=S+(y.clientY-m),this._applyTransform())}),window.addEventListener("mouseup",()=>{h&&(h=!1,s.style.cursor=this._selectMode?"default":"grab")})}_zoomStep(s){if(!this._svgEl)return;let h=this.svgContainer.getBoundingClientRect(),g=h.width/2,m=h.height/2;this._panX=g+(this._panX-g)*s,this._panY=m+(this._panY-m)*s,this._scale*=s,this._applyTransform()}_toggleSelectMode(){this._selectMode=!this._selectMode;let s=this.controls.querySelector("#schematic-select");this._selectMode?(s.style.background="var(--accent)",s.style.color="var(--fg-white)",this.svgContainer.style.cursor="default"):(s.style.background="",s.style.color="",this.svgContainer.style.cursor="grab",this._clearCellHighlight())}_handleSelectClick(s){if(!this._svgEl)return;let h=s.target,g=null;for(;h&&h!==this._svgEl;){if(h.tagName==="g"&&h.id&&this._svgIdToInstName.has(h.id)){g=h;break}h=h.parentElement}if(this._clearCellHighlight(),!g)return;let m=this._svgIdToInstName.get(g.id);try{let _=g.getBBox(),S=3,y=document.createElementNS("http://www.w3.org/2000/svg","rect");y.setAttribute("x",_.x-S),y.setAttribute("y",_.y-S),y.setAttribute("width",_.width+S*2),y.setAttribute("height",_.height+S*2),y.setAttribute("fill","none"),y.setAttribute("stroke","#e05a00"),y.setAttribute("stroke-width","1.5"),y.setAttribute("rx","3"),y.id="_schematic_highlight",g.appendChild(y),this._selectedCell=g}catch{}this.controls.querySelector("#schematic-zoom-to").disabled=!1,this.setStatus(`Selected: ${m}`),this._fetchInspect(m)}_fetchInspect(s){let h=this.appState.websocketManager;if(!h)return;console.log("[Schematic] inspect:",s);let g=wg(this.appState);h.request({type:"schematic_inspect",inst_name:s,use_dbu:this.appState.showDbu}).then(m=>{B0(this.appState,g)&&(this.appState.updateInspector&&this.appState.updateInspector(m),this.appState.focusComponent&&this.appState.focusComponent("Inspector"),this.appState.refreshOverlay&&this.appState.refreshOverlay())}).catch(m=>{console.error("schematic_inspect failed:",m),this.setStatus(`Inspect error: ${m}`)})}_clearCellHighlight(){if(this._svgEl){let s=this._svgEl.querySelector("#_schematic_highlight");s&&s.remove()}this._selectedCell=null,this.controls.querySelector("#schematic-zoom-to").disabled=!0}_zoomToSelected(){if(!this._selectedCell||!this._svgEl)return;let s=this.svgContainer.getBoundingClientRect(),h=this._selectedCell.getBoundingClientRect(),g=(h.left-s.left-this._panX)/this._scale,m=(h.top-s.top-this._panY)/this._scale,_=h.width/this._scale,S=h.height/this._scale,y=Math.min(s.width/_,s.height/S)*.9;this._scale=y,this._panX=s.width/2-(g+_/2)*y,this._panY=s.height/2-(m+S/2)*y,this._applyTransform()}_applyTransform(){this._svgEl&&(this._svgEl.style.transform=`translate(${this._panX}px, ${this._panY}px) scale(${this._scale})`,this._svgEl.style.transformOrigin="0 0")}fitView(){if(!this._svgEl)return;let s=this.svgContainer.getBoundingClientRect();if(s.width===0||s.height===0)return;let h=this._svgEl.viewBox&&this._svgEl.viewBox.baseVal,g=h&&h.width||this._svgEl.clientWidth||1,m=h&&h.height||this._svgEl.clientHeight||1;this._scale=Math.min(s.width/g,s.height/m)*.95,this._panX=(s.width-g*this._scale)/2,this._panY=(s.height-m*this._scale)/2,this._applyTransform()}initNetlistSVG(){this.netlistsvg=globalThis.netlistsvg,this.skin=globalThis.openroadSkin,this._netlistsvgReady=!!(this.netlistsvg&&this.skin),this._netlistsvgReady&&console.log("NetlistSVG ready."),this.setStatus(this._unreadyStatus()??VJt)}_unreadyStatus(){return this._netlistsvgReady?null:Sc(this.appState)?"The schematic is not available in saved reports.":"Init error: netlistsvg or its skin is missing from the page."}syncCone(s={}){let h=this.controls.querySelector("#schematic-fanin-depth"),g=this.controls.querySelector("#schematic-fanout-depth"),m=(_,S,y)=>{if(!_)return;let R=parseInt(_.max,10)||10;S===!1?_.value=0:y!==void 0&&(_.value=y>0?Math.min(y,R):R)};m(h,s.fanin,s.fanin_depth),m(g,s.fanout,s.fanout_depth),this.refresh(),this.appState.focusComponent&&this.appState.focusComponent("SchematicWidget")}refresh(){if(!this._netlistsvgReady){this.setStatus(this._unreadyStatus());return}let s=this.appState.selectedInstanceName;if(!s){this.setStatus(VJt);return}let h=this.appState.websocketManager;if(!h){this.setStatus("Waiting for server connection\u2026");return}this.setStatus(`Loading schematic for ${s}\u2026`);let g=parseInt(this.controls.querySelector("#schematic-fanin-depth").value,10),m=parseInt(this.controls.querySelector("#schematic-fanout-depth").value,10),_=isNaN(g)?1:g,S=isNaN(m)?1:m;h.readyPromise.then(()=>{h.request({type:"schematic_cone",inst_name:s,fanin_depth:_,fanout_depth:S}).then(y=>{let R=y.modules&&y.modules.top&&y.modules.top.cells;if(!R||Object.keys(R).length===0){this.setStatus("No cells found for selected instance.");return}this.renderNetlist(y)}).catch(y=>{this.setStatus(`Error: ${y}`)})})}setStatus(s){this.controls.querySelector("#schematic-status").textContent=s}_exportSvg(){if(!this._svgEl){this.setStatus("No schematic to export.");return}let s=B2t(this._svgEl);yJt(new Blob([s],{type:"image/svg+xml;charset=utf-8"}),"schematic.svg")}async _exportPng(){if(!this._svgEl){this.setStatus("No schematic to export.");return}try{let s=await F2t(this._svgEl,2);lk(s,"schematic.png")}catch{this.setStatus("PNG export failed.")}}async _copyImage(){if(!this._svgEl){this.setStatus("No schematic to export.");return}try{let s=await F2t(this._svgEl,2),h=await Zet(s);this.setStatus(h?"Schematic copied to clipboard.":"Clipboard not available.")}catch{this.setStatus("Copy failed.")}}async renderNetlist(s){try{this.setStatus("Rendering\u2026"),typeof window<"u"&&(window.__lastSchematic=s);let h=Vke(s),g,m=this.netlistsvg.render(this.skin,h);if(m&&typeof m.then=="function"?g=await m:g=await new Promise((y,R)=>{this.netlistsvg.render(this.skin,h,(N,B)=>{N?R(N):y(B)})}),typeof g!="string"||!g.includes("requestAnimationFrame(()=>this.fitView()));let S=Object.keys(s.modules.top.cells).length;this.setStatus(`${S} cell${S!==1?"s":""}`)}catch(h){console.error("NetlistSVG render failed:",h),this.setStatus(`Render error: ${h.message||h}`)}}_applyPinLabels(s){if(!this._svgEl)return;let h="http://www.w3.org/2000/svg",g="https://github.com/nturley/netlistsvg",m=s.modules&&s.modules.top&&s.modules.top.cells||{},_=(S,y)=>S.getAttribute("s:"+y)??S.getAttributeNS(g,y);for(let[S,y]of Object.entries(m)){let R=y.port_labels;if(!R)continue;let N=this._svgEl.querySelector("#"+CSS.escape("cell_"+S))||this._svgEl.querySelector("#"+CSS.escape(S));if(!N)continue;let B=y.port_directions||{};for(let P of Array.from(N.children)){if(P.tagName!=="g")continue;let U=_(P,"pid");if(!U||!(U in R))continue;let W=parseFloat(_(P,"x")),q=parseFloat(_(P,"y"));if(!isFinite(W)||!isFinite(q))continue;let nt=document.createElementNS(h,"text");B[U]==="input"?(nt.setAttribute("class","inputPortLabel"),nt.setAttribute("x",W-3)):nt.setAttribute("x",W+4),nt.setAttribute("y",q-4),nt.setAttribute("style","font-size:5px"),nt.setAttribute("pointer-events","none"),nt.textContent=R[U],N.appendChild(nt)}}}_scopeSkinStyles(){if(!this._svgEl)return;let s=".schematic-widget",h=g=>{for(let m of g)m.selectorText?m.selectorText=Hke(m.selectorText,s):m.cssRules&&h(m.cssRules)};for(let g of this._svgEl.querySelectorAll("style")){let m=g.sheet;if(m)try{h(m.cssRules)}catch{continue}}}};function Hke(d,s){return d.split(",").map(h=>{let g=h.trim();if(!g)return"";let m=g.charAt(s.length);return g.startsWith(s)&&(m===""||!/[\w-]/.test(m))?g:`${s} ${g}`}).filter(Boolean).join(", ")}var qJt={and:"$_AND_",nand:"$_NAND_",or:"$_OR_",nor:"$_NOR_",xor:"$_XOR_",xnor:"$_XNOR_",not:"$_NOT_",buf:"$_BUF_"},Gke=new Set(["aoi21","aoi22","aoi211","aoi221","aoi222","aoi33","oai21","oai22","oai211","oai221","oai222","oai33"]),Wke=new Set(["and3","and4","or3","or4","nand3","nand4","nor3","nor4"]),XJt=["A","B","C","D","E","F"];function $ke(d){let s=d&&d.gate_kind;if(!s)return d;let h=d.port_directions||{},g=null,m=[];for(let[P,U]of Object.entries(h))U==="output"&&g===null?g=P:U==="input"&&m.push(P);let _,S={};if(s==="aoi"||s==="oai"){let P=Array.isArray(d.gate_terms)?d.gate_terms:[];if(!P.length)return d;let U=P.map(nt=>nt.length);if(_=s+U.slice().sort((nt,Q)=>Q-nt).join(""),!Gke.has(_))return d;let W=P.map(nt=>nt.slice()).sort((nt,Q)=>nt.length-Q.length),q=0;for(let nt of W)for(let Q of nt)S[Q]=XJt[q]||"I"+q,q++}else{let P=m.length;if(s==="not"||s==="buf")_=qJt[s];else if(P<=2)_=qJt[s];else if(_=s+P,!Wke.has(_))return d;if(!_)return d;m.forEach((U,W)=>{S[U]=XJt[W]||"I"+W})}g!==null&&(S[g]="Y");let y=d.connections||{},R={},N={};for(let[P,U]of Object.entries(y))S[P]&&(R[S[P]]=U);for(let[P,U]of Object.entries(h))S[P]&&(N[S[P]]=U);let B={};for(let[P,U]of Object.entries(S))B[U]=P;return{...d,type:_,connections:R,port_directions:N,port_labels:B}}function Vke(d){let s=d&&d.modules&&d.modules.top;if(!s||!s.cells)return d;let h={};for(let[g,m]of Object.entries(s.cells))h[g]=$ke(m);return{...d,modules:{...d.modules,top:{...s,cells:h}}}}var fnt=class{constructor(s,h,g){this._app=s,this._redrawAllLayers=h,this._refreshOverlay=g||h,this._categories=[],this._activeCategory="",this._markerTree=null,this._expandedNodes=new Set,this._build(),this._app.websocketManager.readyPromise.then(()=>this.refresh())}_build(){let s=document.createElement("div");s.className="drc-widget";let h=document.createElement("div");h.className="drc-toolbar",this._categorySelect=document.createElement("select"),this._categorySelect.className="drc-category-select",h.appendChild(this._categorySelect),this._loadBtn=document.createElement("button"),this._loadBtn.className="or-btn or-btn-sm",this._loadBtn.textContent="Load...",h.appendChild(this._loadBtn),s.appendChild(h),this._infoBar=document.createElement("div"),this._infoBar.className="drc-info-bar",s.appendChild(this._infoBar),this._treeContainer=document.createElement("div"),this._treeContainer.className="drc-tree-container",s.appendChild(this._treeContainer),this.element=s,this._bindEvents()}_bindEvents(){this._categorySelect.addEventListener("change",()=>{this._activeCategory=this._categorySelect.value,this._loadMarkers()}),this._loadBtn.addEventListener("click",()=>{this._showLoadDialog()})}_loadCategories(){return this._app.websocketManager.request({type:"drc_categories"}).then(s=>{this._categories=s.categories||[],this._renderCategorySelect()}).catch(s=>{console.error("Failed to load DRC categories:",s)})}refresh(){this._loadCategories().then(()=>{!this._activeCategory&&this._categories.length>0&&(this._activeCategory=this._categories[0].name,this._categorySelect.value=this._activeCategory),this._activeCategory&&this._loadMarkers()})}_renderCategorySelect(){let s=this._categorySelect,h=s.value;s.innerHTML="";let g=document.createElement("option");g.value="",g.textContent="(none)",s.appendChild(g);for(let m of this._categories){let _=document.createElement("option");_.value=m.name,_.textContent=`${m.name} (${m.count})`,s.appendChild(_)}this._activeCategory&&this._categories.some(m=>m.name===this._activeCategory)?s.value=this._activeCategory:h&&this._categories.some(m=>m.name===h)?(s.value=h,this._activeCategory=h):this._activeCategory=""}_loadMarkers(){if(!this._activeCategory){this._markerTree=null,this._treeContainer.innerHTML="",this._infoBar.textContent="",this._refreshOverlay();return}this._treeContainer.innerHTML='
Loading...
',this._app.websocketManager.request({type:"drc_markers",category:this._activeCategory}).then(s=>{this._markerTree=s,this._renderTree(),this._refreshOverlay()}).catch(s=>{this._treeContainer.innerHTML="";let h=document.createElement("div");h.className="drc-error",h.textContent=`Error: ${s}`,this._treeContainer.appendChild(h),console.error("Failed to load DRC markers:",s)})}_renderTree(){if(this._treeContainer.innerHTML="",!this._markerTree)return;if(this._markerTree.error){let S=document.createElement("div");S.className="drc-error",S.textContent=this._markerTree.error,this._treeContainer.appendChild(S);return}let s=this._markerTree.total_count||0;this._infoBar.textContent=`${s} total violation${s!==1?"s":""}`;let h=this._markerTree.name||this._activeCategory,g=this._markerTree.subcategories||[],m=this._markerTree.markers||[];if(g.length===0&&m.length===0){this._treeContainer.innerHTML='
No violations
';return}let _=document.createElement("div");_.className="drc-tree",m.length>0&&_.appendChild(this._buildCategoryNode({name:h||"Markers",count:m.length,markers:m},[]));for(let S of g)_.appendChild(this._buildCategoryNode(S,[h]));this._treeContainer.appendChild(_)}_buildCategoryNode(s,h=[]){let g=[...h,s.name],m=document.createElement("div");m.className="drc-tree-node";let _=document.createElement("div");_.className="drc-tree-header";let S=document.createElement("span");S.className="drc-toggle";let y=s.subcategories&&s.subcategories.length>0||s.markers&&s.markers.length>0,R=JSON.stringify(g),N=this._expandedNodes.has(R);S.textContent=y?N?"\u25BC":"\u25B6":" ",_.appendChild(S);let B=document.createElement("input");B.type="checkbox",B.checked=this._allMarkersVisible(s),B.className="drc-visibility-check",B.addEventListener("change",q=>{q.stopPropagation(),this._toggleCategoryVisibility(s,B.checked,g)}),_.appendChild(B);let P=document.createElement("span");P.className="drc-category-label",P.textContent=s.name,_.appendChild(P);let U=document.createElement("span");U.className="drc-count",U.textContent=`${s.count} markers`,_.appendChild(U),m.appendChild(_);let W=document.createElement("div");if(W.className="drc-tree-children",W.style.display=N?"":"none",s.subcategories)for(let q of s.subcategories)W.appendChild(this._buildCategoryNode(q,g));if(s.markers)for(let q of s.markers)W.appendChild(this._buildMarkerNode(q));return m.appendChild(W),y&&(_.addEventListener("click",q=>{if(q.target===B)return;let nt=W.style.display!=="none";W.style.display=nt?"none":"",S.textContent=nt?"\u25B6":"\u25BC",nt?this._expandedNodes.delete(R):this._expandedNodes.add(R)}),_.style.cursor="pointer"),m}_buildMarkerNode(s){let h=document.createElement("div");h.className="drc-marker-row",h.dataset.markerId=s.id,s.visited||h.classList.add("drc-unvisited");let g=document.createElement("input");g.type="checkbox",g.checked=s.visible,g.className="drc-visibility-check",g.addEventListener("change",S=>{S.stopPropagation(),s.visible=g.checked,this._updateMarker(s.id,"visible",g.checked)}),h.appendChild(g);let m=document.createElement("span");m.className="drc-marker-index",m.textContent=s.index,h.appendChild(m);let _=document.createElement("span");if(_.className="drc-marker-name",_.textContent=s.name,s.layer&&(_.title=`Layer: ${s.layer}`),h.appendChild(_),s.layer){let S=document.createElement("span");S.className="drc-layer-badge",S.textContent=s.layer,h.appendChild(S)}return h.addEventListener("click",S=>{S.target!==g&&this._highlightMarker(s)}),h.addEventListener("dblclick",S=>{S.target!==g&&this._highlightMarker(s,!0)}),h}highlightMarkerById(s,h=!1){let g=this._findMarkerById(s);g&&this._highlightMarker(g,h)}_findMarkerById(s){let h=g=>{if(!g)return null;if(g.markers){for(let m of g.markers)if(m.id===s)return m}if(g.subcategories)for(let m of g.subcategories){let _=h(m);if(_)return _}return null};return h(this._markerTree)}_highlightMarker(s,h=!1){this._app.websocketManager.request({type:"drc_highlight",marker_id:s.id,open_inspector:h}).then(g=>{if(g.ok&&g.bbox){s.visited=!0;let m=this._treeContainer.querySelector(`.drc-marker-row[data-marker-id="${s.id}"]`);m&&m.classList.remove("drc-unvisited"),this._zoomToBBox(g.bbox),this._refreshOverlay(),h&&(g.select_id!=null&&this._app.navigateInspector&&this._app.navigateInspector(g.select_id),this._app.focusComponent&&this._app.focusComponent("Inspector"))}}).catch(g=>{console.error("Failed to highlight DRC marker:",g)})}_zoomToBBox(s){if(!this._app.designScale||!this._app.map)return;let[h,g,m,_]=s,S=m-h,y=_-g,N=10*this._app.getDbuPerMicron(),B=2*Math.max(S,y),P=Math.min(N,B);this._app.map.fitBounds(Vf(h-P,g-P,m+P,_+P,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY))}_updateMarker(s,h,g){this._app.websocketManager.request({type:"drc_update_marker",marker_id:s,field:h,value:!!g}).then(()=>{this._refreshOverlay(),h==="visible"&&(this._update3DHighlights(),g&&this._flashHighlight())}).catch(m=>{console.error("Failed to update DRC marker:",m)})}_flashHighlight(){let s=this._app.map?.getContainer();s&&(s.classList.remove("drc-flashing"),s.offsetWidth,s.classList.add("drc-flashing"),s.addEventListener("animationend",()=>{s.classList.remove("drc-flashing")},{once:!0}))}_update3DHighlights(){let s=this._app.threeDViewerWidget;if(!s)return;let h=[];this._collectVisibleMarkers(this._markerTree,h),h.length>0?s.highlightDRC(h):s.clearHighlightDRC()}_collectVisibleMarkers(s,h){if(s){if(s.markers)for(let g of s.markers)g.visible&&h.push(g);if(s.subcategories)for(let g of s.subcategories)this._collectVisibleMarkers(g,h)}}_setMarkersVisible(s,h){if(s){if(s.markers)for(let g of s.markers)g.visible=h;if(s.subcategories)for(let g of s.subcategories)this._setMarkersVisible(g,h)}}_snapshotMarkerVisibility(s,h=new Map){if(!s)return h;if(s.markers)for(let g of s.markers)h.set(g.id,g.visible);if(s.subcategories)for(let g of s.subcategories)this._snapshotMarkerVisibility(g,h);return h}_restoreMarkerVisibility(s,h){if(s){if(s.markers)for(let g of s.markers)h.has(g.id)&&(g.visible=h.get(g.id));if(s.subcategories)for(let g of s.subcategories)this._restoreMarkerVisibility(g,h)}}_allMarkersVisible(s){if(s.markers){for(let h of s.markers)if(!h.visible)return!1}if(s.subcategories){for(let h of s.subcategories)if(!this._allMarkersVisible(h))return!1}return!0}_toggleCategoryVisibility(s,h,g){let m=this._snapshotMarkerVisibility(s);this._setMarkersVisible(s,h),this._renderTree(),this._app.websocketManager.request({type:"drc_update_category_visibility",category:s.name,path:g||[s.name],visible:!!h}).then(()=>{this._refreshOverlay(),this._update3DHighlights(),h&&this._flashHighlight()}).catch(_=>{console.error("Failed to update category visibility:",_),this._restoreMarkerVisibility(s,m),this._renderTree()})}_showLoadDialog(){new V2t(this._app,h=>{this._activeCategory=h,this._loadCategories().then(()=>{this._categorySelect.value=this._activeCategory,this._loadMarkers()})}).open()}selectCategory(s){this._activeCategory=s,this._categorySelect.value=s,this._loadMarkers()}},V2t=class{constructor(s,h){this._app=s,this._onLoaded=h,this._currentPath="",this._disposers=[],this._closed=!1}open(){this._overlay=document.createElement("div"),this._overlay.className="modal-overlay",this._overlay.innerHTML=` +
`,document.body.appendChild(h);function p(_){_.key==="Escape"&&m()}let m=()=>{h.remove(),document.removeEventListener("keydown",p)};return h.addEventListener("click",_=>{_.target===h&&m()}),document.addEventListener("keydown",p),{overlay:h,body:h.querySelector(".modal-body"),errorDiv:h.querySelector(".modal-error"),buttons:h.querySelector(".modal-buttons"),close:m}}function Cy(d,s){d.textContent=s,d.style.display=s?"":"none"}function MR(d,s,{primary:h=!1}={}){let p=document.createElement("button");return p.textContent=s,p.className="or-btn"+(h?" or-btn-primary":""),d.appendChild(p),p}function _nt(d){return"{"+String(d)+"}"}function cQt(d){let s=oQt("Global Connect","gc-dialog"),h=document.createElement("div");h.className="gc-table",s.body.appendChild(h);let p=document.createElement("div");p.className="gc-form";let m=document.createElement("input");m.placeholder="Instance pattern (regex)",m.value=".*";let _=document.createElement("input");_.placeholder="Pin pattern (regex)";let E=document.createElement("select"),y=document.createElement("select"),I=document.createElement("span");I.innerHTML='',p.append(vS("Instance",m),vS("Pin",_),vS("Net",E),vS("Region",y),I);let N=MR(p,"Add rule");s.body.appendChild(p);function B(){let V=_.value.trim()!==""&&E.value!=="";for(let tt of[m,_])try{new RegExp(tt.value),tt.classList.remove("gc-invalid")}catch{tt.classList.add("gc-invalid"),V=!1}N.disabled=!V}m.addEventListener("input",B),_.addEventListener("input",B),E.addEventListener("change",B);function P(){d.websocketManager.request({type:"global_connect_info"}).then(V=>{h.innerHTML='
InstancePinNetRegion
',(V.rules||[]).forEach(tt=>{let Q=document.createElement("div");Q.className="gc-row",Q.innerHTML=`${qU(tt.inst)}${qU(tt.pin)}${qU(tt.net)}${qU(tt.region||"All")}`;let X=document.createElement("button");X.className="or-btn or-btn-sm or-btn-icon",X.textContent="\u2715",X.title="Delete rule",X.addEventListener("click",()=>{d.websocketManager.request({type:"global_connect_delete",inst:tt.inst,pin:tt.pin,net:tt.net,region:tt.region||""}).then(P).catch(gt=>Cy(s.errorDiv,String(gt)))}),Q.appendChild(X),h.appendChild(Q)}),Q2t(E,V.nets||[]),Q2t(y,["All",...V.regions||[]]),B()}).catch(V=>Cy(s.errorDiv,String(V)))}N.addEventListener("click",()=>{let V=p.querySelector('input[name="gc-pg"]:checked').value,tt=`add_global_connection -net ${_nt(E.value)} -inst_pattern ${_nt(m.value||".*")} -pin_pattern ${_nt(_.value)} -${V}`;y.value&&y.value!=="All"&&(tt+=` -region ${_nt(y.value)}`),sQt(d,tt,s.errorDiv,"Rule added.",P)}),MR(s.buttons,"Apply (force)").addEventListener("click",()=>{d.websocketManager.request({type:"global_connect_apply",force:!0}).then(V=>{if(!V.had_rules){Cy(s.errorDiv,"No global-connect rules defined \u2014 add a rule first.");return}Cy(s.errorDiv,`Connected ${V.connected} pin(s).`),d.scheduleRedrawAllLayers&&d.scheduleRedrawAllLayers(),P()}).catch(V=>Cy(s.errorDiv,V.message||String(V)))}),MR(s.buttons,"Clear all").addEventListener("click",()=>sQt(d,"clear_global_connect",s.errorDiv,"Rules cleared.",P)),MR(s.buttons,"Close").addEventListener("click",s.close),P()}function sQt(d,s,h,p,m){d.websocketManager.request({type:"tcl_eval",cmd:s}).then(_=>{if(_.is_error){Cy(h,_.output||_.result||"Command failed");return}Cy(h,p||""),d.scheduleRedrawAllLayers&&d.scheduleRedrawAllLayers(),m&&m()}).catch(_=>Cy(h,_.message||String(_)))}function aQt(d,s){let h=oQt(`Insert Buffer \u2014 ${qU(s)}`,"buf-dialog"),p=MR(h.buttons,"Insert",{primary:!0});p.disabled=!0,MR(h.buttons,"Cancel").addEventListener("click",h.close),d.websocketManager.request({type:"buffer_info",net:s}).then(_=>{if(!_.can_buffer){h.body.textContent=_.error||"This net has multiple drivers and cannot be buffered.";return}r5e(d,h,s,_,p)}).catch(_=>{h.body.textContent=String(_)})}function r5e(d,s,h,p,m){let _=document.createElement("div");_.className="buf-pins";let E=p.drivers||[],y=p.loads||[],I=new Set;function N(){_.innerHTML="";let V=(tt,Q)=>{let X=document.createElement("label");X.className="buf-pin";let gt=document.createElement("input");gt.type="checkbox",gt.checked=I.has(tt.id),gt.addEventListener("change",()=>{if(gt.checked){if(Q)I.clear();else for(let ft of E)I.delete(ft.id);I.add(tt.id)}else I.delete(tt.id);N(),j()}),X.append(gt,document.createTextNode(" "+tt.label)),_.appendChild(X)};E.forEach(tt=>V(tt,!0)),y.forEach(tt=>V(tt,!1))}E.length&&I.add(E[0].id),N();let B=document.createElement("select");Q2t(B,p.masters||[]);let P=document.createElement("input");P.placeholder="Optional: new buffer name";let U=document.createElement("input");U.placeholder="Optional: new net name",s.body.append(vS("Pins to buffer",_),vS("Buffer master",B),vS("Buffer name",P),vS("Net name",U));function j(){m.disabled=I.size===0||!B.value}B.addEventListener("change",j),j(),m.addEventListener("click",()=>{let V=new Set(E.map(X=>X.id)),tt=[...I],Q=tt.some(X=>V.has(X))?"driver":"loads";d.websocketManager.request({type:"insert_buffer",net:h,mode:Q,pins:tt,master:B.value,buf_name:P.value.trim(),net_name:U.value.trim()}).then(X=>{if(X.is_error||X.ok===!1){Cy(s.errorDiv,X.error||X.result||"Insertion failed");return}s.close(),X.inst&&(d.selectedInstanceName=X.inst),d.scheduleRedrawAllLayers&&d.scheduleRedrawAllLayers()}).catch(X=>Cy(s.errorDiv,X.message||String(X)))})}function vS(d,s){let h=document.createElement("label");h.className="edit-field";let p=document.createElement("span");return p.textContent=d,h.append(p,s),h}function Q2t(d,s){let h=d.value;d.innerHTML="";for(let p of s){let m=document.createElement("option");m.value=p,m.textContent=p,d.appendChild(m)}s.includes(h)&&(d.value=h)}function qU(d){return String(d??"").replace(/&/g,"&").replace(//g,">")}var uQt="#00ffff",s5e="#ffff00",txt="#ffffff",gk=0,ext=1,XU=2,ynt=class{constructor(s,h,p,m){this._app=s,this._visibility=h,this._updateInspector=p,this._focusComponent=m,this._state=gk,this._rulers=[],this._nextId=0,this._pt0=null,this._selectedRulerId=null,this._ctrlHeld=!1,this._shiftHeld=!1,this._rulerPane=null,this._rulerLayerGroup=null,this._previewGroup=null,this._snapGroup=null,this._snapTimer=null,this._lastSnapResult=null,this._onMouseMove=this._handleMouseMove.bind(this),this._onMapClick=this._handleMapClick.bind(this),this._initLayers()}_initLayers(){let s=this._app.map;s&&(this._rulerPane=s.createPane("ruler-pane"),this._rulerPane.style.zIndex="700",this._rulerPane.style.pointerEvents="auto",this._rulerLayerGroup=L.layerGroup([],{pane:"ruler-pane"}).addTo(s),this._previewGroup=L.layerGroup([],{pane:"ruler-pane"}).addTo(s),this._snapGroup=L.layerGroup([],{pane:"ruler-pane"}).addTo(s))}isActive(){return this._state!==gk}updateVisibility(){this._rulerPane&&(this._rulerPane.style.display=this._visibility.rulers?"":"none")}toggleRulerMode(){this._state===gk?this._enterFirstPoint():this.cancelRulerBuild()}cancelRulerBuild(){this._state=gk,this._pt0=null,this._lastSnapResult=null,this._clearPreview(),this._clearSnap(),this._setCursor(!1),this._removeMapListeners()}clearAllRulers(){this._rulers=[],this._selectedRulerId=null,this._rulerLayerGroup.clearLayers(),this._clearPreview(),this._clearSnap(),this._state!==gk&&this.cancelRulerBuild()}_enterFirstPoint(){this._state=ext,this._pt0=null,this._lastSnapResult=null,this._setCursor(!0),this._addMapListeners()}_enterMeasuring(s){this._state=XU,this._pt0=s}_addMapListeners(){let s=this._app.map;s&&(s.getContainer().addEventListener("mousemove",this._onMouseMove),s.on("click",this._onMapClick))}_removeMapListeners(){let s=this._app.map;s&&(s.getContainer().removeEventListener("mousemove",this._onMouseMove),s.off("click",this._onMapClick))}_handleMouseMove(s){if(this._state===gk)return;this._ctrlHeld=s.ctrlKey||s.metaKey,this._shiftHeld=s.shiftKey;let h=this._app.map,p=h.getContainer().getBoundingClientRect(),m=h.containerPointToLatLng([s.clientX-p.left,s.clientY-p.top]),_=tv(m.lat,m.lng,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY);this._snapTimer&&clearTimeout(this._snapTimer),this._snapTimer=setTimeout(()=>{this._requestSnap(_.dbuX,_.dbuY)},50)}_handleMapClick(s){if(this._state===gk)return;L.DomEvent.stopPropagation(s);let h=s.originalEvent;h&&(this._ctrlHeld=h.ctrlKey||h.metaKey,this._shiftHeld=h.shiftKey);let p=tv(s.latlng.lat,s.latlng.lng,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY),m=this._getSnappedPoint(p.dbuX,p.dbuY);this._state===ext?this._enterMeasuring(m):this._state===XU&&(this._createRuler(this._pt0,m),this._state=ext,this._pt0=null,this._clearPreview(),this._clearSnap(),this._lastSnapResult=null)}async _requestSnap(s,h){let p=this._app;if(!p.websocketManager||!p.designScale)return;if(this._ctrlHeld){this._lastSnapResult=null,this._clearSnap(),this._updatePreview(s,h);return}let _=p.techData?.dbu_per_micron||1e3,E=p.map.getZoom(),y=Math.pow(2,Math.max(0,E)),I=1/(p.designScale*y),N=Math.max(Math.round(10*I),10),B=!0,P=!0;if(this._shiftHeld)B=!0,P=!0;else if(this._state===XU&&this._pt0){let j=Math.abs(s-this._pt0.x),V=Math.abs(h-this._pt0.y);j>V?(B=!1,P=!0):V>j&&(B=!0,P=!1)}let U={};for(let[j,V]of Object.entries(this._visibility))U[j]=!!V;try{let j=await p.websocketManager.request({type:"snap",dbu_x:s,dbu_y:h,radius:_,point_threshold:N,horizontal:!!B,vertical:!!P,visible_layers:[...p.visibleLayerNames],...U});this._lastSnapResult=j,this._updateSnapIndicator(j),this._updatePreview(s,h)}catch{this._lastSnapResult=null,this._clearSnap()}}_getSnappedPoint(s,h){if(this._ctrlHeld)return{x:s,y:h};let p=this._lastSnapResult,m;if(p?.found&&p.is_point)m={x:p.edge[0][0],y:p.edge[0][1]};else if(p?.found){let _=p.edge;_[0][1]===_[1][1]?m={x:s,y:_[0][1]}:m={x:_[0][0],y:h}}else m={x:s,y:h};if(!this._shiftHeld&&this._state===XU&&this._pt0){let _=Math.abs(m.x-this._pt0.x),E=Math.abs(m.y-this._pt0.y);_{L.DomEvent.stopPropagation(se),this._selectRuler(s.id)}),B.addLayer(V);let tt=this._app.map.getZoom(),Q=Math.pow(2,Math.max(0,tt)),gt=8*(1/(h*Q)),ft=(se,ot,Lt)=>{let be=Math.sqrt(ot*ot+Lt*Lt);if(be===0)return;let ln=-Lt/be,Fn=ot/be,ne=Id(se.x+ln*gt,se.y+Fn*gt,h,p,m,_),xe=Id(se.x-ln*gt,se.y-Fn*gt,h,p,m,_);B.addLayer(L.polyline([ne,xe],{color:N,weight:2,pane:"ruler-pane",interactive:!1}))};if(P)ft(s.pt0,P.x-s.pt0.x,P.y-s.pt0.y),ft(s.pt1,s.pt1.x-P.x,s.pt1.y-P.y);else{let se=s.pt1.x-s.pt0.x,ot=s.pt1.y-s.pt0.y;ft(s.pt0,se,ot),ft(s.pt1,se,ot)}let xt=this._computeDistance(s.pt0,s.pt1,s.euclidian),Bt=U?U[0]:(E[0]+y[0])/2,Ot=U?U[1]:(E[1]+y[1])/2,Pt=L.marker([Bt,Ot],{icon:L.divIcon({className:"ruler-label",html:this._formatDistance(xt),iconSize:null}),pane:"ruler-pane",interactive:!1});B.addLayer(Pt),s._layerGroup=B,this._rulerLayerGroup.addLayer(B)}_rerenderAll(){this._rulerLayerGroup.clearLayers();for(let s of this._rulers)this._renderRuler(s)}_selectRuler(s){this._selectedRulerId=s,this._rerenderAll();let h=this._rulers.find(N=>N.id===s);if(!h)return;wg(this._app);let p=Math.abs(h.pt1.x-h.pt0.x),m=Math.abs(h.pt1.y-h.pt0.y),_=h.euclidian?Math.sqrt(p*p+m*m):p+m,E=N=>this._app.formatDbu(N,!0),y=N=>this._app.parseDbu(N),I={type:"Ruler",name:h.name,bbox:[Math.min(h.pt0.x,h.pt1.x),Math.min(h.pt0.y,h.pt1.y),Math.max(h.pt0.x,h.pt1.x),Math.max(h.pt0.y,h.pt1.y)],properties:[{name:"Name",value:h.name,editable:!0},{name:"Label",value:h.label||"",editable:!0},{name:"Point 0 - x",value:E(h.pt0.x),editable:!0},{name:"Point 0 - y",value:E(h.pt0.y),editable:!0},{name:"Point 1 - x",value:E(h.pt1.x),editable:!0},{name:"Point 1 - y",value:E(h.pt1.y),editable:!0},{name:"Delta x",value:E(p)},{name:"Delta y",value:E(m)},{name:"Length",value:E(_)},{name:"Euclidian",value:h.euclidian?"True":"False",editable:!0,editor:{type:"bool"}}],onPropertyChange:(N,B)=>{switch(N){case"Name":h.name=B;break;case"Label":h.label=B;break;case"Point 0 - x":{let P=y(B);P!==null&&(h.pt0.x=P);break}case"Point 0 - y":{let P=y(B);P!==null&&(h.pt0.y=P);break}case"Point 1 - x":{let P=y(B);P!==null&&(h.pt1.x=P);break}case"Point 1 - y":{let P=y(B);P!==null&&(h.pt1.y=P);break}case"Euclidian":h.euclidian=B.trim().toLowerCase()==="true";break}this._rerenderAll(),this._selectRuler(h.id)}};this._updateInspector(I),this._focusComponent("Inspector"),requestAnimationFrame(()=>{let N=this._app.inspectorEl?.querySelector(".inspector-toolbar");if(!N)return;let B=document.createElement("button");B.className="or-btn or-btn-icon",B.title="Delete ruler",B.innerHTML='',B.addEventListener("click",()=>{this.deleteRuler(s)}),N.appendChild(B)})}deleteRuler(s){let h=this._rulers.findIndex(m=>m.id===s);if(h===-1)return;let p=this._rulers[h];p._layerGroup&&this._rulerLayerGroup.removeLayer(p._layerGroup),this._rulers.splice(h,1),this._selectedRulerId===s&&(this._selectedRulerId=null,this._updateInspector(null))}_getManhattanJoinPt(s,h){return{x:h.x,y:s.y}}_computeDistance(s,h,p=!0){let m=Math.abs(h.x-s.x),_=Math.abs(h.y-s.y);return p?Math.sqrt(m*m+_*_):m+_}_formatDistance(s){return this._app.formatDistance(s)}_setCursor(s){let h=this._app.map?.getContainer();h&&(s?h.classList.add("ruler-mode-cursor"):h.classList.remove("ruler-mode-cursor"))}_clearPreview(){this._previewGroup?.clearLayers()}_clearSnap(){this._snapGroup?.clearLayers()}};var xnt=class{constructor(s,h,p,m){this._app=s,this._visibility=h,this._updateInspector=p,this._focusComponent=m,this._labels=[],this._anchors=[],this._mode=!1,this._selectedName=null,this._pane=null,this._handleGroup=null,this._initLayers()}_initLayers(){let s=this._app.map;s&&(this._pane=s.createPane("label-pane"),this._pane.style.zIndex="690",this._pane.style.pointerEvents="auto",this._handleGroup=L.layerGroup([],{pane:"label-pane"}).addTo(s))}isActive(){return this._mode}updateVisibility(){this._pane&&(this._pane.style.display=this._visibility.labels?"":"none")}toggleLabelMode(){this._mode=!this._mode,this._setCursor(this._mode)}cancelLabelMode(){this._mode=!1,this._setCursor(!1)}_setCursor(s){let h=this._app.map?.getContainer();h&&h.classList.toggle("label-mode-cursor",s)}_wm(){return this._app.websocketManager}_applyLabels(s){this._labels=s||[],this._renderHandles()}_refresh(s){this._applyLabels(s&&s.labels),this._app.refreshOverlay()}applyRemoteLabels(s){this._applyLabels(s),this._selectedName&&!this._labels.some(h=>h.name===this._selectedName)&&(this._selectedName=null,this._updateInspector(null),this._renderHandles()),this._app.refreshOverlay()}_updateLabel(s,h){return this._wm().request({type:"update_label",name:s,...h})}async reload(){let s=this._wm();if(s)try{let h=await s.request({type:"list_labels"});this._anchors=h.anchors||[],this._applyLabels(h.labels)}catch{this._applyLabels([])}}async handleMapClick(s,h){let p=window.prompt("Label text:");if(this._mode=!1,this._setCursor(!1),!!p)try{let m=await this._wm().request({type:"add_label",x:Math.round(s),y:Math.round(h),text:p});this._refresh(m)}catch(m){console.error("add_label failed:",m)}}_renderHandles(){if(!this._handleGroup)return;this._handleGroup.clearLayers();let s=this._app.designScale;if(!s)return;let h=this._app.designMaxDXDY,p=this._app.designOriginX,m=this._app.designOriginY;for(let _ of this._labels){let E=Id(_.x,_.y,s,h,p,m),y=_.name===this._selectedName,I=L.marker(E,{pane:"label-pane",draggable:!0,keyboard:!1,icon:L.divIcon({className:"label-handle"+(y?" label-handle-selected":""),html:"",iconSize:[10,10]}),title:_.text});I.on("click",N=>{L.DomEvent.stopPropagation(N),this._select(_.name)}),I.on("dragend",N=>{let B=N.target.getLatLng(),{dbuX:P,dbuY:U}=tv(B.lat,B.lng,s,h,p,m);this._commitMove(_,Math.round(P),Math.round(U))}),this._handleGroup.addLayer(I)}}async _commitMove(s,h,p){try{let m=await this._updateLabel(s.name,{x:h,y:p,text:s.text,size:s.size||0,anchor:s.anchor||"center",color:s.color});this._refresh(m)}catch(m){console.error("move label failed:",m)}}_select(s){this._selectedName=s,this._renderHandles();let h=this._labels.find(_=>_.name===s);if(!h)return;let p=_=>this._app.formatDbu(_,!0),m={type:"Label",name:h.name,bbox:[h.x,h.y,h.x,h.y],properties:[{name:"Name",value:h.name},{name:"Text",value:h.text,editable:!0},{name:"x",value:p(h.x)},{name:"y",value:p(h.y)},{name:"Font size",value:String(h.size||0),editable:!0},{name:"Anchor",value:h.anchor||"center",editable:!0,editor:{type:"list",options:this._anchors}}],onPropertyChange:(_,E)=>{let y={text:h.text,size:h.size||0,anchor:h.anchor||"center"};_==="Text"?y.text=E:_==="Font size"?y.size=parseInt(E,10)||0:_==="Anchor"&&(y.anchor=E.trim()),this._edit(h,y)}};this._updateInspector(m),this._focusComponent("Inspector"),requestAnimationFrame(()=>{let _=this._app.inspectorEl?.querySelector(".inspector-toolbar");if(!_||_.querySelector(".delete-label-btn"))return;let E=document.createElement("button");E.className="or-btn or-btn-icon delete-label-btn",E.title="Delete label",E.innerHTML='',E.addEventListener("click",()=>this.deleteLabel(s)),_.appendChild(E)})}async _edit(s,h){try{let p=await this._updateLabel(s.name,{x:s.x,y:s.y,text:h.text,size:h.size,anchor:h.anchor,color:s.color});this._refresh(p),this._select(s.name)}catch(p){console.error("edit label failed:",p)}}async deleteLabel(s){try{let h=await this._wm().request({type:"delete_label",name:s});this._selectedName===s&&(this._selectedName=null,this._updateInspector(null)),this._refresh(h)}catch(h){console.error("delete_label failed:",h)}}async clearAllLabels(){try{let s=await this._wm().request({type:"clear_labels"});this._selectedName=null,this._refresh(s)}catch(s){console.error("clear_labels failed:",s)}}};var lQt="Select an instance in the layout to view its schematic.",Mnt=class{constructor(s,h){this.container=s,this.appState=h,this.element=document.createElement("div"),this.element.className="schematic-widget",this.element.style.cssText="width:100%; height:100%; display:flex; flex-direction:column; background:var(--bg-panel); color:var(--fg-primary); overflow:hidden;",this.controls=document.createElement("div"),this.controls.style.cssText="padding:4px 8px; background:var(--bg-header); border-bottom:1px solid var(--border);flex-shrink:0; display:flex; align-items:center; gap:8px; flex-wrap:wrap;",this.controls.innerHTML='',this.element.appendChild(this.controls),this.svgContainer=document.createElement("div"),this.svgContainer.style.cssText="flex:1; overflow:hidden; position:relative; cursor:grab; background:var(--bg-main);",this.element.appendChild(this.svgContainer),this.container.element.appendChild(this.element),this.controls.querySelector("#schematic-refresh").addEventListener("click",()=>this.refresh()),this.controls.querySelector("#schematic-fit").addEventListener("click",()=>this.fitView()),this.controls.querySelector("#schematic-zoom-in").addEventListener("click",()=>this._zoomStep(1.5)),this.controls.querySelector("#schematic-zoom-out").addEventListener("click",()=>this._zoomStep(1/1.5)),this.controls.querySelector("#schematic-select").addEventListener("click",()=>this._toggleSelectMode()),this.controls.querySelector("#schematic-zoom-to").addEventListener("click",()=>this._zoomToSelected()),this.controls.querySelector("#schematic-save-svg").addEventListener("click",()=>this._exportSvg()),this.controls.querySelector("#schematic-save-png").addEventListener("click",()=>this._exportPng()),this.controls.querySelector("#schematic-copy").addEventListener("click",()=>this._copyImage()),this.appState.schematicWidget=this,this.netlistsvg=null,this.skin=null,this._svgEl=null,this._scale=1,this._panX=0,this._panY=0,this._selectMode=!1,this._selectedCell=null,this._svgIdToInstName=new Map,this._setupPanZoom(),this.initNetlistSVG()}_setupPanZoom(){let s=this.svgContainer,h=!1,p,m,_,E;s.addEventListener("wheel",y=>{if(!this._svgEl)return;y.preventDefault();let I=y.deltaY<0?1.2:1/1.2,N=s.getBoundingClientRect(),B=y.clientX-N.left,P=y.clientY-N.top;this._panX=B+(this._panX-B)*I,this._panY=P+(this._panY-P)*I,this._scale*=I,this._applyTransform()},{passive:!1}),s.addEventListener("mousedown",y=>{if(!(!this._svgEl||y.button!==0)){if(this._selectMode){this._handleSelectClick(y);return}h=!0,p=y.clientX,m=y.clientY,_=this._panX,E=this._panY,s.style.cursor="grabbing",y.preventDefault()}}),window.addEventListener("mousemove",y=>{h&&(this._panX=_+(y.clientX-p),this._panY=E+(y.clientY-m),this._applyTransform())}),window.addEventListener("mouseup",()=>{h&&(h=!1,s.style.cursor=this._selectMode?"default":"grab")})}_zoomStep(s){if(!this._svgEl)return;let h=this.svgContainer.getBoundingClientRect(),p=h.width/2,m=h.height/2;this._panX=p+(this._panX-p)*s,this._panY=m+(this._panY-m)*s,this._scale*=s,this._applyTransform()}_toggleSelectMode(){this._selectMode=!this._selectMode;let s=this.controls.querySelector("#schematic-select");this._selectMode?(s.style.background="var(--accent)",s.style.color="var(--fg-white)",this.svgContainer.style.cursor="default"):(s.style.background="",s.style.color="",this.svgContainer.style.cursor="grab",this._clearCellHighlight())}_handleSelectClick(s){if(!this._svgEl)return;let h=s.target,p=null;for(;h&&h!==this._svgEl;){if(h.tagName==="g"&&h.id&&this._svgIdToInstName.has(h.id)){p=h;break}h=h.parentElement}if(this._clearCellHighlight(),!p)return;let m=this._svgIdToInstName.get(p.id);try{let _=p.getBBox(),E=3,y=document.createElementNS("http://www.w3.org/2000/svg","rect");y.setAttribute("x",_.x-E),y.setAttribute("y",_.y-E),y.setAttribute("width",_.width+E*2),y.setAttribute("height",_.height+E*2),y.setAttribute("fill","none"),y.setAttribute("stroke","#e05a00"),y.setAttribute("stroke-width","1.5"),y.setAttribute("rx","3"),y.id="_schematic_highlight",p.appendChild(y),this._selectedCell=p}catch{}this.controls.querySelector("#schematic-zoom-to").disabled=!1,this.setStatus(`Selected: ${m}`),this._fetchInspect(m)}_fetchInspect(s){let h=this.appState.websocketManager;if(!h)return;console.log("[Schematic] inspect:",s);let p=wg(this.appState);h.request({type:"schematic_inspect",inst_name:s,use_dbu:this.appState.showDbu}).then(m=>{N0(this.appState,p)&&(this.appState.updateInspector&&this.appState.updateInspector(m),this.appState.focusComponent&&this.appState.focusComponent("Inspector"),this.appState.refreshOverlay&&this.appState.refreshOverlay())}).catch(m=>{console.error("schematic_inspect failed:",m),this.setStatus(`Inspect error: ${m}`)})}_clearCellHighlight(){if(this._svgEl){let s=this._svgEl.querySelector("#_schematic_highlight");s&&s.remove()}this._selectedCell=null,this.controls.querySelector("#schematic-zoom-to").disabled=!0}_zoomToSelected(){if(!this._selectedCell||!this._svgEl)return;let s=this.svgContainer.getBoundingClientRect(),h=this._selectedCell.getBoundingClientRect(),p=(h.left-s.left-this._panX)/this._scale,m=(h.top-s.top-this._panY)/this._scale,_=h.width/this._scale,E=h.height/this._scale,y=Math.min(s.width/_,s.height/E)*.9;this._scale=y,this._panX=s.width/2-(p+_/2)*y,this._panY=s.height/2-(m+E/2)*y,this._applyTransform()}_applyTransform(){this._svgEl&&(this._svgEl.style.transform=`translate(${this._panX}px, ${this._panY}px) scale(${this._scale})`,this._svgEl.style.transformOrigin="0 0")}fitView(){if(!this._svgEl)return;let s=this.svgContainer.getBoundingClientRect();if(s.width===0||s.height===0)return;let h=this._svgEl.viewBox&&this._svgEl.viewBox.baseVal,p=h&&h.width||this._svgEl.clientWidth||1,m=h&&h.height||this._svgEl.clientHeight||1;this._scale=Math.min(s.width/p,s.height/m)*.95,this._panX=(s.width-p*this._scale)/2,this._panY=(s.height-m*this._scale)/2,this._applyTransform()}initNetlistSVG(){this.netlistsvg=globalThis.netlistsvg,this.skin=globalThis.openroadSkin,this._netlistsvgReady=!!(this.netlistsvg&&this.skin),this._netlistsvgReady&&console.log("NetlistSVG ready."),this.setStatus(this._unreadyStatus()??lQt)}_unreadyStatus(){return this._netlistsvgReady?null:Sc(this.appState)?"The schematic is not available in saved reports.":"Init error: netlistsvg or its skin is missing from the page."}syncCone(s={}){let h=this.controls.querySelector("#schematic-fanin-depth"),p=this.controls.querySelector("#schematic-fanout-depth"),m=(_,E,y)=>{if(!_)return;let I=parseInt(_.max,10)||10;E===!1?_.value=0:y!==void 0&&(_.value=y>0?Math.min(y,I):I)};m(h,s.fanin,s.fanin_depth),m(p,s.fanout,s.fanout_depth),this.refresh(s.inst_name),this.appState.focusComponent&&this.appState.focusComponent("SchematicWidget",{reveal:!0})}refresh(s=this.appState.selectedInstanceName){if(!this._netlistsvgReady){this.setStatus(this._unreadyStatus());return}if(!s){this.setStatus(lQt);return}let h=this.appState.websocketManager;if(!h){this.setStatus("Waiting for server connection\u2026");return}this.setStatus(`Loading schematic for ${s}\u2026`);let p=parseInt(this.controls.querySelector("#schematic-fanin-depth").value,10),m=parseInt(this.controls.querySelector("#schematic-fanout-depth").value,10),_=isNaN(p)?1:p,E=isNaN(m)?1:m;h.readyPromise.then(()=>{h.request({type:"schematic_cone",inst_name:s,fanin_depth:_,fanout_depth:E}).then(y=>{let I=y.modules&&y.modules.top&&y.modules.top.cells;if(!I||Object.keys(I).length===0){this.setStatus("No cells found for selected instance.");return}this.renderNetlist(y)}).catch(y=>{this.setStatus(`Error: ${y}`)})})}setStatus(s){this.controls.querySelector("#schematic-status").textContent=s}_exportSvg(){if(!this._svgEl){this.setStatus("No schematic to export.");return}let s=q2t(this._svgEl);UJt(new Blob([s],{type:"image/svg+xml;charset=utf-8"}),"schematic.svg")}async _exportPng(){if(!this._svgEl){this.setStatus("No schematic to export.");return}try{let s=await X2t(this._svgEl,2);dk(s,"schematic.png")}catch{this.setStatus("PNG export failed.")}}async _copyImage(){if(!this._svgEl){this.setStatus("No schematic to export.");return}try{let s=await X2t(this._svgEl,2),h=await cnt(s);this.setStatus(h?"Schematic copied to clipboard.":"Clipboard not available.")}catch{this.setStatus("Copy failed.")}}async renderNetlist(s){try{this.setStatus("Rendering\u2026"),typeof window<"u"&&(window.__lastSchematic=s);let h=l5e(s),p,m=this.netlistsvg.render(this.skin,h);if(m&&typeof m.then=="function"?p=await m:p=await new Promise((y,I)=>{this.netlistsvg.render(this.skin,h,(N,B)=>{N?I(N):y(B)})}),typeof p!="string"||!p.includes("requestAnimationFrame(()=>this.fitView()));let E=Object.keys(s.modules.top.cells).length;this.setStatus(`${E} cell${E!==1?"s":""}`)}catch(h){console.error("NetlistSVG render failed:",h),this.setStatus(`Render error: ${h.message||h}`)}}_applyPinLabels(s){if(!this._svgEl)return;let h="http://www.w3.org/2000/svg",p="https://github.com/nturley/netlistsvg",m=s.modules&&s.modules.top&&s.modules.top.cells||{},_=(E,y)=>E.getAttribute("s:"+y)??E.getAttributeNS(p,y);for(let[E,y]of Object.entries(m)){let I=y.port_labels;if(!I)continue;let N=this._svgEl.querySelector("#"+CSS.escape("cell_"+E))||this._svgEl.querySelector("#"+CSS.escape(E));if(!N)continue;let B=y.port_directions||{};for(let P of Array.from(N.children)){if(P.tagName!=="g")continue;let U=_(P,"pid");if(!U||!(U in I))continue;let j=parseFloat(_(P,"x")),V=parseFloat(_(P,"y"));if(!isFinite(j)||!isFinite(V))continue;let tt=document.createElementNS(h,"text");B[U]==="input"?(tt.setAttribute("class","inputPortLabel"),tt.setAttribute("x",j-3)):tt.setAttribute("x",j+4),tt.setAttribute("y",V-4),tt.setAttribute("style","font-size:5px"),tt.setAttribute("pointer-events","none"),tt.textContent=I[U],N.appendChild(tt)}}}_scopeSkinStyles(){if(!this._svgEl)return;let s=".schematic-widget",h=p=>{for(let m of p)m.selectorText?m.selectorText=o5e(m.selectorText,s):m.cssRules&&h(m.cssRules)};for(let p of this._svgEl.querySelectorAll("style")){let m=p.sheet;if(m)try{h(m.cssRules)}catch{continue}}}};function o5e(d,s){return d.split(",").map(h=>{let p=h.trim();if(!p)return"";let m=p.charAt(s.length);return p.startsWith(s)&&(m===""||!/[\w-]/.test(m))?p:`${s} ${p}`}).filter(Boolean).join(", ")}var hQt={and:"$_AND_",nand:"$_NAND_",or:"$_OR_",nor:"$_NOR_",xor:"$_XOR_",xnor:"$_XNOR_",not:"$_NOT_",buf:"$_BUF_"},c5e=new Set(["aoi21","aoi22","aoi211","aoi221","aoi222","aoi33","oai21","oai22","oai211","oai221","oai222","oai33"]),a5e=new Set(["and3","and4","or3","or4","nand3","nand4","nor3","nor4"]),fQt=["A","B","C","D","E","F"];function u5e(d){let s=d&&d.gate_kind;if(!s)return d;let h=d.port_directions||{},p=null,m=[];for(let[P,U]of Object.entries(h))U==="output"&&p===null?p=P:U==="input"&&m.push(P);let _,E={};if(s==="aoi"||s==="oai"){let P=Array.isArray(d.gate_terms)?d.gate_terms:[];if(!P.length)return d;let U=P.map(tt=>tt.length);if(_=s+U.slice().sort((tt,Q)=>Q-tt).join(""),!c5e.has(_))return d;let j=P.map(tt=>tt.slice()).sort((tt,Q)=>tt.length-Q.length),V=0;for(let tt of j)for(let Q of tt)E[Q]=fQt[V]||"I"+V,V++}else{let P=m.length;if(s==="not"||s==="buf")_=hQt[s];else if(P<=2)_=hQt[s];else if(_=s+P,!a5e.has(_))return d;if(!_)return d;m.forEach((U,j)=>{E[U]=fQt[j]||"I"+j})}p!==null&&(E[p]="Y");let y=d.connections||{},I={},N={};for(let[P,U]of Object.entries(y))E[P]&&(I[E[P]]=U);for(let[P,U]of Object.entries(h))E[P]&&(N[E[P]]=U);let B={};for(let[P,U]of Object.entries(E))B[U]=P;return{...d,type:_,connections:I,port_directions:N,port_labels:B}}function l5e(d){let s=d&&d.modules&&d.modules.top;if(!s||!s.cells)return d;let h={};for(let[p,m]of Object.entries(s.cells))h[p]=u5e(m);return{...d,modules:{...d.modules,top:{...s,cells:h}}}}var Ent=class{constructor(s,h,p){this._app=s,this._redrawAllLayers=h,this._refreshOverlay=p||h,this._categories=[],this._activeCategory="",this._markerTree=null,this._expandedNodes=new Set,this._build(),this._app.websocketManager.readyPromise.then(()=>this.refresh())}_build(){let s=document.createElement("div");s.className="drc-widget";let h=document.createElement("div");h.className="drc-toolbar",this._categorySelect=document.createElement("select"),this._categorySelect.className="drc-category-select",h.appendChild(this._categorySelect),this._loadBtn=document.createElement("button"),this._loadBtn.className="or-btn or-btn-sm",this._loadBtn.textContent="Load...",h.appendChild(this._loadBtn),s.appendChild(h),this._infoBar=document.createElement("div"),this._infoBar.className="drc-info-bar",s.appendChild(this._infoBar),this._treeContainer=document.createElement("div"),this._treeContainer.className="drc-tree-container",s.appendChild(this._treeContainer),this.element=s,this._bindEvents()}_bindEvents(){this._categorySelect.addEventListener("change",()=>{this._activeCategory=this._categorySelect.value,this._loadMarkers()}),this._loadBtn.addEventListener("click",()=>{this._showLoadDialog()})}_loadCategories(){return this._app.websocketManager.request({type:"drc_categories"}).then(s=>{this._categories=s.categories||[],this._renderCategorySelect()}).catch(s=>{console.error("Failed to load DRC categories:",s)})}refresh(){this._loadCategories().then(()=>{!this._activeCategory&&this._categories.length>0&&(this._activeCategory=this._categories[0].name,this._categorySelect.value=this._activeCategory),this._activeCategory&&this._loadMarkers()})}_renderCategorySelect(){let s=this._categorySelect,h=s.value;s.innerHTML="";let p=document.createElement("option");p.value="",p.textContent="(none)",s.appendChild(p);for(let m of this._categories){let _=document.createElement("option");_.value=m.name,_.textContent=`${m.name} (${m.count})`,s.appendChild(_)}this._activeCategory&&this._categories.some(m=>m.name===this._activeCategory)?s.value=this._activeCategory:h&&this._categories.some(m=>m.name===h)?(s.value=h,this._activeCategory=h):this._activeCategory=""}_loadMarkers(){if(!this._activeCategory){this._markerTree=null,this._treeContainer.innerHTML="",this._infoBar.textContent="",this._refreshOverlay();return}this._treeContainer.innerHTML='
Loading...
',this._app.websocketManager.request({type:"drc_markers",category:this._activeCategory}).then(s=>{this._markerTree=s,this._renderTree(),this._refreshOverlay()}).catch(s=>{this._treeContainer.innerHTML="";let h=document.createElement("div");h.className="drc-error",h.textContent=`Error: ${s}`,this._treeContainer.appendChild(h),console.error("Failed to load DRC markers:",s)})}_renderTree(){if(this._treeContainer.innerHTML="",!this._markerTree)return;if(this._markerTree.error){let E=document.createElement("div");E.className="drc-error",E.textContent=this._markerTree.error,this._treeContainer.appendChild(E);return}let s=this._markerTree.total_count||0;this._infoBar.textContent=`${s} total violation${s!==1?"s":""}`;let h=this._markerTree.name||this._activeCategory,p=this._markerTree.subcategories||[],m=this._markerTree.markers||[];if(p.length===0&&m.length===0){this._treeContainer.innerHTML='
No violations
';return}let _=document.createElement("div");_.className="drc-tree",m.length>0&&_.appendChild(this._buildCategoryNode({name:h||"Markers",count:m.length,markers:m},[]));for(let E of p)_.appendChild(this._buildCategoryNode(E,[h]));this._treeContainer.appendChild(_)}_buildCategoryNode(s,h=[]){let p=[...h,s.name],m=document.createElement("div");m.className="drc-tree-node";let _=document.createElement("div");_.className="drc-tree-header";let E=document.createElement("span");E.className="drc-toggle";let y=s.subcategories&&s.subcategories.length>0||s.markers&&s.markers.length>0,I=JSON.stringify(p),N=this._expandedNodes.has(I);E.textContent=y?N?"\u25BC":"\u25B6":" ",_.appendChild(E);let B=document.createElement("input");B.type="checkbox",B.checked=this._allMarkersVisible(s),B.className="drc-visibility-check",B.addEventListener("change",V=>{V.stopPropagation(),this._toggleCategoryVisibility(s,B.checked,p)}),_.appendChild(B);let P=document.createElement("span");P.className="drc-category-label",P.textContent=s.name,_.appendChild(P);let U=document.createElement("span");U.className="drc-count",U.textContent=`${s.count} markers`,_.appendChild(U),m.appendChild(_);let j=document.createElement("div");if(j.className="drc-tree-children",j.style.display=N?"":"none",s.subcategories)for(let V of s.subcategories)j.appendChild(this._buildCategoryNode(V,p));if(s.markers)for(let V of s.markers)j.appendChild(this._buildMarkerNode(V));return m.appendChild(j),y&&(_.addEventListener("click",V=>{if(V.target===B)return;let tt=j.style.display!=="none";j.style.display=tt?"none":"",E.textContent=tt?"\u25B6":"\u25BC",tt?this._expandedNodes.delete(I):this._expandedNodes.add(I)}),_.style.cursor="pointer"),m}_buildMarkerNode(s){let h=document.createElement("div");h.className="drc-marker-row",h.dataset.markerId=s.id,s.visited||h.classList.add("drc-unvisited");let p=document.createElement("input");p.type="checkbox",p.checked=s.visible,p.className="drc-visibility-check",p.addEventListener("change",E=>{E.stopPropagation(),s.visible=p.checked,this._updateMarker(s.id,"visible",p.checked)}),h.appendChild(p);let m=document.createElement("span");m.className="drc-marker-index",m.textContent=s.index,h.appendChild(m);let _=document.createElement("span");if(_.className="drc-marker-name",_.textContent=s.name,s.layer&&(_.title=`Layer: ${s.layer}`),h.appendChild(_),s.layer){let E=document.createElement("span");E.className="drc-layer-badge",E.textContent=s.layer,h.appendChild(E)}return h.addEventListener("click",E=>{E.target!==p&&this._highlightMarker(s)}),h.addEventListener("dblclick",E=>{E.target!==p&&this._highlightMarker(s,!0)}),h}highlightMarkerById(s,h=!1){let p=this._findMarkerById(s);p&&this._highlightMarker(p,h)}_findMarkerById(s){let h=p=>{if(!p)return null;if(p.markers){for(let m of p.markers)if(m.id===s)return m}if(p.subcategories)for(let m of p.subcategories){let _=h(m);if(_)return _}return null};return h(this._markerTree)}_highlightMarker(s,h=!1){this._app.websocketManager.request({type:"drc_highlight",marker_id:s.id,open_inspector:h}).then(p=>{if(p.ok&&p.bbox){s.visited=!0;let m=this._treeContainer.querySelector(`.drc-marker-row[data-marker-id="${s.id}"]`);m&&m.classList.remove("drc-unvisited"),this._zoomToBBox(p.bbox),this._refreshOverlay(),h&&(p.select_id!=null&&this._app.navigateInspector&&this._app.navigateInspector(p.select_id),this._app.focusComponent&&this._app.focusComponent("Inspector"))}}).catch(p=>{console.error("Failed to highlight DRC marker:",p)})}_zoomToBBox(s){if(!this._app.designScale||!this._app.map)return;let[h,p,m,_]=s,E=m-h,y=_-p,N=10*this._app.getDbuPerMicron(),B=2*Math.max(E,y),P=Math.min(N,B);this._app.map.fitBounds(Vf(h-P,p-P,m+P,_+P,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY))}_updateMarker(s,h,p){this._app.websocketManager.request({type:"drc_update_marker",marker_id:s,field:h,value:!!p}).then(()=>{this._refreshOverlay(),h==="visible"&&(this._update3DHighlights(),p&&this._flashHighlight())}).catch(m=>{console.error("Failed to update DRC marker:",m)})}_flashHighlight(){let s=this._app.map?.getContainer();s&&(s.classList.remove("drc-flashing"),s.offsetWidth,s.classList.add("drc-flashing"),s.addEventListener("animationend",()=>{s.classList.remove("drc-flashing")},{once:!0}))}_update3DHighlights(){let s=this._app.threeDViewerWidget;if(!s)return;let h=[];this._collectVisibleMarkers(this._markerTree,h),h.length>0?s.highlightDRC(h):s.clearHighlightDRC()}_collectVisibleMarkers(s,h){if(s){if(s.markers)for(let p of s.markers)p.visible&&h.push(p);if(s.subcategories)for(let p of s.subcategories)this._collectVisibleMarkers(p,h)}}_setMarkersVisible(s,h){if(s){if(s.markers)for(let p of s.markers)p.visible=h;if(s.subcategories)for(let p of s.subcategories)this._setMarkersVisible(p,h)}}_snapshotMarkerVisibility(s,h=new Map){if(!s)return h;if(s.markers)for(let p of s.markers)h.set(p.id,p.visible);if(s.subcategories)for(let p of s.subcategories)this._snapshotMarkerVisibility(p,h);return h}_restoreMarkerVisibility(s,h){if(s){if(s.markers)for(let p of s.markers)h.has(p.id)&&(p.visible=h.get(p.id));if(s.subcategories)for(let p of s.subcategories)this._restoreMarkerVisibility(p,h)}}_allMarkersVisible(s){if(s.markers){for(let h of s.markers)if(!h.visible)return!1}if(s.subcategories){for(let h of s.subcategories)if(!this._allMarkersVisible(h))return!1}return!0}_toggleCategoryVisibility(s,h,p){let m=this._snapshotMarkerVisibility(s);this._setMarkersVisible(s,h),this._renderTree(),this._app.websocketManager.request({type:"drc_update_category_visibility",category:s.name,path:p||[s.name],visible:!!h}).then(()=>{this._refreshOverlay(),this._update3DHighlights(),h&&this._flashHighlight()}).catch(_=>{console.error("Failed to update category visibility:",_),this._restoreMarkerVisibility(s,m),this._renderTree()})}_showLoadDialog(){new nxt(this._app,h=>{this._activeCategory=h,this._loadCategories().then(()=>{this._categorySelect.value=this._activeCategory,this._loadMarkers()})}).open()}selectCategory(s){this._activeCategory=s,this._categorySelect.value=s,this._loadMarkers()}},nxt=class{constructor(s,h){this._app=s,this._onLoaded=h,this._currentPath="",this._disposers=[],this._closed=!1}open(){this._overlay=document.createElement("div"),this._overlay.className="modal-overlay",this._overlay.innerHTML=` -
`,document.body.appendChild(this._overlay),this._breadcrumb=this._overlay.querySelector(".fb-breadcrumb"),this._fileList=this._overlay.querySelector(".fb-file-list"),this._pathInput=this._overlay.querySelector(".fb-path-input"),this._errorDiv=this._overlay.querySelector(".modal-error"),this._okBtn=this._overlay.querySelector(".ok"),this._cancelBtn=this._overlay.querySelector(".cancel"),this._listen(this._pathInput,"input",()=>this._updateOkState()),this._listen(this._pathInput,"keydown",s=>{if(s.key==="Enter"){let h=this._pathInput.value.trim();h.endsWith("/")?this._navigate(h.replace(/\/+$/,"")||"/"):this._submit()}else s.key==="Escape"&&this.close()}),this._listen(this._okBtn,"click",()=>this._submit()),this._listen(this._cancelBtn,"click",()=>this.close()),this._listen(this._overlay,"click",s=>{s.target===this._overlay&&this.close()}),this._navigate("")}close(){if(!this._closed){this._closed=!0;for(let s of this._disposers)s();this._disposers.length=0,this._overlay&&(this._overlay.remove(),this._overlay=null)}}_listen(s,h,g){s.addEventListener(h,g),this._disposers.push(()=>s.removeEventListener(h,g))}_updateOkState(){this._okBtn.disabled=!this._pathInput.value.trim()}_renderBreadcrumb(s){this._breadcrumb.innerHTML="";let h=s.split("/").filter(Boolean),g=document.createElement("span");g.className="fb-crumb",g.textContent="/",this._listen(g,"click",()=>this._navigate("/")),this._breadcrumb.appendChild(g);let m="";for(let _ of h){m+="/"+_;let S=document.createElement("span");S.className="fb-crumb-sep",S.textContent=" / ",this._breadcrumb.appendChild(S);let y=document.createElement("span");y.className="fb-crumb",y.textContent=_;let R=m;this._listen(y,"click",()=>this._navigate(R)),this._breadcrumb.appendChild(y)}}_renderEntries(s){if(this._fileList.innerHTML="",!s||s.length===0){let h=document.createElement("div");h.className="fb-empty",h.textContent="(empty directory)",this._fileList.appendChild(h);return}for(let h of s){let g=document.createElement("div");g.className="fb-entry",h.is_dir&&g.classList.add("fb-dir");let m=document.createElement("span");m.className="fb-icon",m.textContent=h.is_dir?"\u{1F4C1}":"\u{1F4C4}",g.appendChild(m);let _=document.createElement("span");_.className="fb-name",_.textContent=h.name,g.appendChild(_),h.is_dir?this._listen(g,"click",()=>this._navigate(this._currentPath+"/"+h.name)):(this._listen(g,"click",()=>{let S=this._fileList.querySelector(".fb-selected");S&&S.classList.remove("fb-selected"),g.classList.add("fb-selected"),this._pathInput.value=this._currentPath+"/"+h.name,this._updateOkState()}),this._listen(g,"dblclick",()=>{this._pathInput.value=this._currentPath+"/"+h.name,this._updateOkState(),this._submit()})),this._fileList.appendChild(g)}}async _navigate(s){this._errorDiv.style.display="none",this._fileList.innerHTML='
Loading...
';try{let h=await this._app.websocketManager.request({type:"list_dir",path:s||""});if(this._closed)return;this._currentPath=h.path,this._renderBreadcrumb(h.path),this._renderEntries(h.entries),this._pathInput.value="",this._updateOkState()}catch(h){if(this._closed)return;this._fileList.innerHTML="",this._errorDiv.textContent=h.message||String(h),this._errorDiv.style.display=""}}async _submit(){let s=this._pathInput.value.trim();if(s){this._okBtn.disabled=!0,this._okBtn.textContent="Loading...",this._errorDiv.style.display="none";try{let h=await this._app.websocketManager.request({type:"drc_load_report",path:s});if(this._closed)return;if(h.ok){let g=h.category;this.close(),this._onLoaded(g)}else this._errorDiv.textContent=h.error||"Failed to load report",this._errorDiv.style.display="",this._okBtn.disabled=!1,this._okBtn.textContent="Load"}catch(h){if(this._closed)return;this._errorDiv.textContent=h.message||"Request failed",this._errorDiv.style.display="",this._okBtn.disabled=!1,this._okBtn.textContent="Load"}}}};var qke=` -\r[]{}`;var dnt=class{constructor(s,h){this._input=s,this._ws=h,this._popup=null,this._items=[],this._selectedIndex=-1,this._replaceStart=0,this._replaceEnd=0,this._debounceTimer=null,this._commandCache=null,this._history=[],this._historyIndex=-1,this._historyStash="",this._createPopup(),this._onInputBound=this._onInput.bind(this),this._onBlurBound=this._onBlur.bind(this),this._input.addEventListener("input",this._onInputBound),this._input.addEventListener("blur",this._onBlurBound)}_createPopup(){this._popup=document.createElement("div"),this._popup.className="tcl-complete-popup",this._popup.style.display="none",this._input.parentElement.appendChild(this._popup)}handleKeyDown(s){let h=this._popup.style.display!=="none";return s.key==="Tab"?(s.preventDefault(),h?this._tabAccept():this._tabComplete(this._input.value,this._input.selectionStart),!0):s.key==="Escape"?h?(this._hidePopup(),!0):!1:s.key==="ArrowDown"?h?(s.preventDefault(),this._selectItem(this._selectedIndex+1),!0):this._historyIndex>=0?(s.preventDefault(),this._historyIndex--,this._historyIndex<0?this._input.value=this._historyStash:this._input.value=this._history[this._historyIndex],!0):!1:s.key==="ArrowUp"?h?(s.preventDefault(),this._selectItem(this._selectedIndex-1),!0):this._historyIndex{let s=this._input.value,h=this._input.selectionStart,g=this._extractPrefix(s,h);g.length>=2||g.length>=1&&(g[0]==="$"||g[0]==="-")?this._requestCompletions(s,h):this._hidePopup()},100)}_onBlur(){setTimeout(()=>this._hidePopup(),150)}_extractPrefix(s,h){let g=h-1;for(;g>=0&&qke.indexOf(s[g])===-1;)g--;return s.substring(g+1,h)}_fetchCompletions(s,h,g){let m=this._extractPrefix(s,h),_=m.length>0&&m[0]==="$",S=m.length>0&&m[0]==="-",y=!_&&!S,R=h-m.length,N=s.substring(0,R),B=/^[\s\[]*$/.test(N);if(y&&B&&this._commandCache){let P=m.toLowerCase(),U=this._commandCache.filter(W=>W.toLowerCase().startsWith(P));g(U,R,h);return}this._ws.request({type:"tcl_complete",line:s,cursor_pos:h}).then(P=>{P.mode==="commands"&&!this._commandCache&&m===""&&(this._commandCache=P.completions),P.mode==="commands"&&!this._commandCache&&this._ws.request({type:"tcl_complete",line:"",cursor_pos:0}).then(U=>{U.mode==="commands"&&(this._commandCache=U.completions)}).catch(()=>{}),g(P.completions,P.replace_start,P.replace_end)}).catch(()=>g([],0,0))}_requestCompletions(s,h){this._fetchCompletions(s,h,(g,m,_)=>{this._showPopup(g,m,_)})}_tabAccept(){if(this._items.length===0){this._hidePopup();return}if(this._items.length===1){this._selectedIndex=0,this._acceptCompletion();return}this._advanceToCommonPrefix()}_tabComplete(s,h){this._fetchCompletions(s,h,(g,m,_)=>{if(!g||g.length===0){this._hidePopup();return}if(g.length===1){this._items=g,this._replaceStart=m,this._replaceEnd=_,this._selectedIndex=0,this._acceptCompletion();return}this._items=g,this._replaceStart=m,this._replaceEnd=_,this._advanceToCommonPrefix(),this._showPopup(g,this._replaceStart,this._replaceEnd)})}_advanceToCommonPrefix(){if(this._items.length<2)return!1;let s=this._items[0];for(let S=1;S0;S++){let y=this._items[S],R=0;for(;R{let R=document.createElement("div");R.className="tcl-complete-item",R.textContent=S,R.addEventListener("mousedown",N=>{N.preventDefault(),this._selectedIndex=y,this._acceptCompletion()}),this._popup.appendChild(R)}),s.length>15){let S=document.createElement("div");S.className="tcl-complete-more",S.textContent=`... ${s.length-15} more`,this._popup.appendChild(S)}this._selectedIndex=0,this._highlightSelected(),this._popup.style.display="block"}_hidePopup(){this._popup.style.display="none",this._items=[],this._selectedIndex=-1}_selectItem(s){if(this._items.length===0)return;let h=Math.min(this._items.length,15)-1;this._selectedIndex=Math.max(0,Math.min(s,h)),this._highlightSelected()}_highlightSelected(){let s=this._popup.querySelectorAll(".tcl-complete-item");s.forEach((h,g)=>{h.classList.toggle("selected",g===this._selectedIndex)}),s[this._selectedIndex]&&s[this._selectedIndex].scrollIntoView&&s[this._selectedIndex].scrollIntoView({block:"nearest"})}_acceptCompletion(){if(this._selectedIndex<0||this._selectedIndex>=this._items.length){this._hidePopup();return}let s=this._items[this._selectedIndex],h=this._input.value.substring(0,this._replaceStart),g=this._input.value.substring(this._replaceEnd),_=!s.endsWith("/")&&!s.endsWith("::")&&(g.length===0||g[0]!==" ")?" ":"";this._input.value=h+s+_+g;let S=this._replaceStart+s.length+_.length;this._input.setSelectionRange(S,S),this._input.focus(),this._hidePopup()}};var ZJt=[{key:"or_visibility",store:"cookie"},{key:"or_selectability",store:"cookie"},{key:"or_hidden_layers",store:"session"},{key:"or_nonselectable_layers",store:"session"},{key:"or_layer_patterns",store:"session"},{key:"or_hidden_chiplets",store:"cookie"},{key:"or_bg_color",store:"cookie"},{key:"or_show_dbu",store:"cookie"},{key:"or_theme",store:"theme"},{key:"or_use_true_z",store:"cookie"},{key:"or_ruler_style",store:"cookie"},{key:"or_wheel_zoom",store:"cookie"},{key:"or_arrow_step",store:"cookie"},{key:"or_font_family",store:"cookie"},{key:"or_font_scale",store:"cookie"}];function Xke(d,s){try{return window[d].getItem(s)}catch{return null}}function Zke(d,s,h){try{h===null?window[d].removeItem(s):window[d].setItem(s,h)}catch{}}function Yke({key:d,store:s}){return s==="session"?Xke("sessionStorage",d):qf(d)}function Kke({key:d,store:s},h){s==="session"?Zke("sessionStorage",d,h):s==="theme"?h===null?bJt():Xet(h):h===null?qet(d):Rd(d,h)}function YJt(){let d={};for(let s of ZJt){let h=Yke(s);h&&(d[s.key]=h)}return{version:1,entries:d}}function Jke(d){return typeof d=="string"&&d!==""&&!/[;\r\n]/.test(d)}function KJt(d){for(let s of ZJt){let h=d[s.key];Kke(s,Jke(h)?h:null)}}function JJt(d,s=typeof document<"u"?document:null){let h="OpenROAD",g=d?`${h} - ${d}`:h;return s&&(s.title=g),g}var Zs=globalThis.THREE,QJt=2,Qke=.002,t5e=.9,e5e=1.1,n5e=.1,i5e=20,r5e=3,dk=2,tQt=2,s5e=10,o5e=1e4,c5e=.15,a5e=300,u5e=6,pnt=Math.PI/180,eQt=[5025616,2201331,16750592,10233776,48340,16007990,2533018,7951688,15277667,4149685];function l5e(d){let s=new Array(d.length).fill(0),h=new Map;d.forEach((g,m)=>{let _=g.z;h.has(_)||h.set(_,[]),h.get(_).push({idx:m,chiplet:g})});for(let g of h.values()){if(g.length<=1)continue;let m=[];for(let{idx:_,chiplet:S}of g){let y=S.x,R=S.y,N=S.x+S.width,B=S.y+S.height,P=!1;for(let U=0;Uyq.x1&&Rq.y1)){m[U].push({x1:y,y1:R,x2:N,y2:B}),s[_]=U,P=!0;break}P||(m.push([{x1:y,y1:R,x2:N,y2:B}]),s[_]=m.length-1)}}return s}var gnt=class{constructor(s,h){if(this._app=h,this._container=s,this._element=document.createElement("div"),this._element.className="three-d-viewer-widget",s.element.appendChild(this._element),!Zs){Sc(h)?this._showInfo("The 3D view is not available in saved reports."):this._showError("three.js is missing from the page."),this._destroyed=!0;return}this._canvasContainer=document.createElement("div"),this._canvasContainer.className="three-d-canvas-container",this._element.appendChild(this._canvasContainer),this._tooltip=document.createElement("div"),this._tooltip.className="or-tooltip",this._canvasContainer.appendChild(this._tooltip),this._optionsOverlay=this._createOptionsOverlay(),this._canvasContainer.appendChild(this._optionsOverlay),this._raycaster=new Zs.Raycaster,this._scene=new Zs.Scene,this._applyTheme(),this._themeObserver=new MutationObserver(()=>{this._applyTheme(),this.render()}),this._themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),this._camera=new Zs.PerspectiveCamera(45,1,10,1e5),this._camera.position.set(0,0,1e3);try{this._renderer=new Zs.WebGLRenderer({antialias:!0,preserveDrawingBuffer:!0})}catch(S){console.error("3D viewer: failed to create WebGL context:",S),this._showWebGLUnavailable(S),this._themeObserver&&(this._themeObserver.disconnect(),this._themeObserver=null),this._destroyed=!0;return}this._renderer.setPixelRatio(window.devicePixelRatio),this._renderer.setSize(s.width,s.height),this._canvasContainer.appendChild(this._renderer.domElement),this._rotation=new Zs.Quaternion,this._distance=1e3,this._panX=0,this._panY=0,this._boundingRadius=1,this._sceneCenter=new Zs.Vector3,this._mouseDown=!1,this._mouseButton=-1,this._lastMousePos={x:0,y:0},this._setupMouseHandlers();let g=new Zs.AmbientLight(16777215,.5);this._scene.add(g);let m=new Zs.DirectionalLight(16777215,.8);m.position.set(1,1,1).normalize(),this._scene.add(m);let _=new Zs.DirectionalLight(16777215,.3);_.position.set(-1,-.5,.5).normalize(),this._scene.add(_),s.on("resize",this.onResize.bind(this)),s.on("open",this.onOpen.bind(this)),s.on("destroy",this.onDestroy.bind(this)),this._designGroup=new Zs.Group,this._scene.add(this._designGroup),this._chipletMeshes=[],this._loading=!1,this._destroyed=!1,this._edgeMaterial=null}_setupMouseHandlers(){let s=this._renderer.domElement;s.addEventListener("mousedown",h=>{this._mouseDown=!0,this._mouseButton=h.button,this._lastMousePos.x=h.clientX,this._lastMousePos.y=h.clientY,s.focus(),h.preventDefault()}),s.addEventListener("contextmenu",h=>h.preventDefault()),this._onMouseMove=h=>{if(!this._mouseDown)return;let g=h.clientX-this._lastMousePos.x,m=h.clientY-this._lastMousePos.y;this._lastMousePos.x=h.clientX,this._lastMousePos.y=h.clientY,!(g===0&&m===0)&&(this._mouseButton===0?this._handleRotate(g,m):this._mouseButton===2&&this._handlePan(g,m),this._updateCamera())},this._onMouseUp=h=>{this._mouseDown&&h.button===this._mouseButton&&(this._mouseDown=!1,this._mouseButton=-1)},window.addEventListener("mousemove",this._onMouseMove),window.addEventListener("mouseup",this._onMouseUp),s.addEventListener("wheel",h=>{h.preventDefault(),h.deltaY<0?this._distance*=t5e:this._distance*=e5e;let g=Math.max(this._boundingRadius*n5e,1),m=Math.max(this._boundingRadius*i5e,g);this._distance=Math.max(g,Math.min(m,this._distance)),this._updateCamera()},{passive:!1}),s.tabIndex=0,s.style.outline="none",s.addEventListener("keydown",h=>{h.key.toLowerCase()==="f"&&this.resetCamera()}),s.addEventListener("dblclick",h=>{h.preventDefault();let g=this._pickDrcMarkerId(h);if(g!=null&&this._app.drcWidget){this._app.drcWidget.highlightMarkerById(g,!0);return}this.resetCamera()}),s.addEventListener("mousemove",h=>{if(this._mouseDown){this._hideTooltip();return}this._updateTooltip(h)}),s.addEventListener("mouseleave",()=>{this._hideTooltip()})}_createOptionsOverlay(){let s=document.createElement("div");s.className="three-d-options";let h=document.createElement("label");h.title="Render chiplets at their true Z (disable stacking offset for overlapping chiplets at same Z).";let g=document.createElement("input");g.type="checkbox",g.checked=!!this._app.useTrueZ,g.addEventListener("change",()=>{this._app.useTrueZ=g.checked,Rd("or_use_true_z",g.checked?"1":"0"),this._app.syncDisplayState(),this.refreshSceneForOptions()}),h.appendChild(g),h.appendChild(document.createTextNode("True Z (no stacking)")),s.appendChild(h);let m=document.createElement("div");m.style.cssText="margin-top:4px; display:flex; gap:4px;";let _=document.createElement("button");_.className="or-btn or-btn-sm",_.textContent="Save PNG",_.title="Save the 3D view as a PNG image (2x resolution)",_.addEventListener("click",()=>this._exportPng(2));let S=document.createElement("button");return S.className="or-btn or-btn-sm",S.textContent="Copy",S.title="Copy the 3D view image to the clipboard",S.addEventListener("click",()=>this._copyImage(2)),m.appendChild(_),m.appendChild(S),s.appendChild(m),s}_capturePng(s=2){if(!this._renderer)return null;let h=this._renderer,g=h.domElement.clientWidth||h.domElement.width,m=h.domElement.clientHeight||h.domElement.height,_=h.getPixelRatio();try{return h.setPixelRatio(_*s),h.setSize(g,m,!1),this.render(),h.domElement.toDataURL("image/png")}finally{h.setPixelRatio(_),h.setSize(g,m,!1),this.render()}}_exportPng(s=2){let h=this._capturePng(s);h&&lk(h,"3d-view.png")}async _copyImage(s=2){let h=this._capturePng(s);h&&await Zet(h)}_setRaycasterFromEvent(s){let g=this._renderer.domElement.getBoundingClientRect(),m=new Zs.Vector2((s.clientX-g.left)/g.width*2-1,-((s.clientY-g.top)/g.height*2-1));this._raycaster.setFromCamera(m,this._camera)}_updateTooltip(s){if(!this._chipletMeshes.length){this._hideTooltip();return}this._setRaycasterFromEvent(s);let h=this._chipletMeshes.map(y=>y.mesh),g=this._raycaster.intersectObjects(h,!1);if(g.length===0){this._hideTooltip();return}let m=g[0].object,_=this._chipletMeshes.find(y=>y.mesh===m);if(!_){this._hideTooltip();return}this._tooltip.textContent=_.data.name,this._tooltip.style.display="block";let S=this._canvasContainer.getBoundingClientRect();this._tooltip.style.left=s.clientX-S.left+12+"px",this._tooltip.style.top=s.clientY-S.top+12+"px"}_hideTooltip(){this._tooltip&&(this._tooltip.style.display="none")}_pickDrcMarkerId(s){if(!this._drcHitboxMesh||!this._drcHitboxMarkerIds)return null;this._setRaycasterFromEvent(s);let h=this._raycaster.intersectObject(this._drcHitboxMesh,!1);if(h.length===0)return null;let g=h[0].instanceId;return g==null?null:this._drcHitboxMarkerIds[g]??null}_handleRotate(s,h){let g=Math.sqrt(s*s+h*h);if(g<.001)return;let m=new Zs.Vector3(h/g,s/g,0),_=g/QJt,y=new Zs.Quaternion().setFromAxisAngle(m,_*pnt).clone().multiply(this._rotation);if(new Zs.Vector3(0,0,1).applyQuaternion(y).z>=0)this._rotation.copy(y);else{let N=new Zs.Vector3(0,1,0),B=s/QJt*pnt,U=new Zs.Quaternion().setFromAxisAngle(N,B).clone().multiply(this._rotation);new Zs.Vector3(0,0,1).applyQuaternion(U).z>=0&&this._rotation.copy(U)}}_handlePan(s,h){let g=this._distance*Qke;this._panX+=s*g,this._panY-=h*g}_updateCamera(){let s=Math.max(this._boundingRadius,1e3),h=Math.max(this._distance-s*tQt,s5e),g=this._distance+s*tQt;g0;){let s=this._designGroup.children[0];this._designGroup.remove(s),s.geometry&&s.geometry.dispose(),s.material&&!s.material._shared&&s.material.dispose()}this._edgeMaterial&&(this._edgeMaterial.dispose(),this._edgeMaterial=null),this._onMouseMove&&(window.removeEventListener("mousemove",this._onMouseMove),this._onMouseMove=null),this._onMouseUp&&(window.removeEventListener("mouseup",this._onMouseUp),this._onMouseUp=null),this._renderer&&(this._renderer.dispose(),this._renderer=null),this._app.threeDViewerWidget===this&&(this._app.threeDViewerWidget=null)}}_setInitialCameraState(){this._distance=this._boundingRadius*r5e;let s=new Zs.Quaternion().setFromAxisAngle(new Zs.Vector3(1,0,0),-45*pnt),h=new Zs.Quaternion().setFromAxisAngle(new Zs.Vector3(0,0,1),45*pnt);this._rotation=s.multiply(h),this._panX=0,this._panY=0}resetCamera(){this._sceneBounds&&(this._setInitialCameraState(),this._updateCamera())}onResize(){if(this._destroyed)return;let s=this._canvasContainer.getBoundingClientRect(),h=s.width,g=s.height;h===0||g===0||(this._camera.aspect=h/g,this._camera.updateProjectionMatrix(),this._renderer.setSize(h,g),this.render())}render(){this._destroyed||this._renderer&&this._scene&&this._camera&&this._renderer.render(this._scene,this._camera)}_applyTheme(){let h=uk().bgMap||"#000000";this._scene.background=new Zs.Color(h)}async loadData(){if(!(this._loading||this._destroyed)){this._loading=!0;for(let s of[".three-d-error",".three-d-info"]){let h=this._element.querySelector(s);h&&h.remove()}try{await this._app.websocketManager.readyPromise;let s=await this._app.websocketManager.request({type:"get_3d_data"});if(this._destroyed)return;if(s&&s.error){this._showError(s.error);return}if(s&&s.info){this._showInfo(s.info);return}this.buildScene(s)}catch(s){if(this._destroyed)return;console.error("Failed to load 3D data:",s),this._showError(s.message||String(s))}finally{this._loading=!1}}}_showOverlay(s,h,g){let m=document.createElement("div");m.className=s,m.style.cssText="position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-family:monospace;text-align:center;",m.style.color=g,m.textContent=h,this._element.appendChild(m)}_showError(s){this._showOverlay("three-d-error","Failed to load 3D data: "+s,"var(--error)")}_showInfo(s){this._showOverlay("three-d-info",s,"var(--fg-muted, #888)")}_showWebGLUnavailable(s){let h=document.createElement("div");h.className="three-d-error",h.style.cssText="position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-family:monospace;text-align:center;max-width:80%;color:var(--error);";let g=s&&s.message?s.message:String(s||"");h.innerHTML='
3D viewer unavailable: WebGL context could not be created.
In Chrome, open chrome://flags/#ignore-gpu-blocklist and set Override software rendering list to Enabled, then relaunch the browser.
Otherwise enable hardware acceleration or try a different browser. See chrome://gpu for details.
'+(g?'
'+g+"
":""),this._element.appendChild(h)}buildScene(s){if(this._destroyed||(this._lastSceneData=s,this._clearScene(),!s||!s.chiplets||s.chiplets.length===0))return;let h=this._app.getDbuPerMicron(),g=this._buildChiplets(s.chiplets,h);g.minX!==1/0&&(this._buildGrid(g),this._setSceneBoundsAndCenter(g),this._setInitialCameraState(),this._updateCamera())}_clearScene(){for(this._chipletMeshes=[];this._designGroup.children.length>0;){let s=this._designGroup.children[0];this._designGroup.remove(s),s.geometry&&s.geometry.dispose(),s.material&&!s.material._shared&&s.material.dispose()}this._hideTooltip()}_buildChiplets(s,h){let g={minX:1/0,minY:1/0,minZ:1/0,maxX:-1/0,maxY:-1/0,maxZ:-1/0};this._edgeMaterial||(this._edgeMaterial=new Zs.LineBasicMaterial({color:0,linewidth:1}),this._edgeMaterial._shared=!0);let m=this._app.useTrueZ?new Array(s.length).fill(0):l5e(s);return s.forEach((_,S)=>{let y=_.width/h,R=_.height/h,N=_.thickness/h*dk,B=eQt[S%eQt.length],P=new Zs.MeshPhongMaterial({color:B,transparent:!1,opacity:1,side:Zs.DoubleSide,shininess:40}),U=new Zs.BoxGeometry(y,R,N),W=new Zs.Mesh(U,P),q=_.x/h+y/2,nt=_.y/h+R/2,Q=N*c5e,X=_.z/h*dk+N/2+m[S]*(N+Q);W.position.set(q,nt,X),this._designGroup.add(W),this._chipletMeshes.push({mesh:W,data:_,color:B});let gt=new Zs.EdgesGeometry(U),ft=new Zs.LineSegments(gt,this._edgeMaterial);ft.position.set(q,nt,X),this._designGroup.add(ft),g.minX=Math.min(g.minX,_.x/h),g.minY=Math.min(g.minY,_.y/h),g.minZ=Math.min(g.minZ,X-N/2),g.maxX=Math.max(g.maxX,_.x/h+y),g.maxY=Math.max(g.maxY,_.y/h+R),g.maxZ=Math.max(g.maxZ,X+N/2)}),g}_buildGrid(s){let h=s.maxX-s.minX,g=s.maxY-s.minY,m=Math.max(h,g)*1.4,_=10,S=new Zs.GridHelper(m,_,8947848,4473924);S.rotation.x=Math.PI/2,S.position.set((s.minX+s.maxX)/2,(s.minY+s.maxY)/2,s.minZ-1),this._designGroup.add(S)}_setSceneBoundsAndCenter(s){this._sceneBounds=s;let h=s.maxX-s.minX,g=s.maxY-s.minY,m=s.maxZ-s.minZ;this._boundingRadius=Math.sqrt(h*h+g*g+m*m)/2,this._sceneCenter.set((s.minX+s.maxX)/2,(s.minY+s.maxY)/2,(s.minZ+s.maxZ)/2)}_stackOffsetForPoint(s,h,g,m){for(let{mesh:_,data:S}of this._chipletMeshes){if(s!==S.z||hS.x+S.width||gS.y+S.height)continue;let y=S.thickness/m*dk,R=S.z/m*dk+y/2;return _.position.z-R}return 0}clearHighlightDRC(){this._drcBlinkInterval&&(clearInterval(this._drcBlinkInterval),this._drcBlinkInterval=null),this._drcMeshGroup&&(this._scene.remove(this._drcMeshGroup),this._drcMeshGroup.children.forEach(s=>{s.geometry&&s.geometry.dispose()}),this._drcMaterial&&(this._drcMaterial.dispose(),this._drcMaterial=null),this._drcHitboxMaterial&&(this._drcHitboxMaterial.dispose(),this._drcHitboxMaterial=null),this._drcHitboxMesh=null,this._drcHitboxMarkerIds=null,this._drcMeshGroup=null,this.render())}highlightDRC(s){if(this._destroyed||(this.clearHighlightDRC(),!s||s.length===0))return;let h=this._app.getDbuPerMicron(),g=0,m=1e4/h*dk;this._sceneBounds&&this._sceneBounds.minZ!==1/0&&(g=this._sceneBounds.minZ,m=this._sceneBounds.maxZ),g-=1,m+=1;let _=Math.max(m-g,1);this._drcMeshGroup=new Zs.Group,this._drcMaterial=new Zs.LineBasicMaterial({color:16776960,transparent:!0,opacity:1,depthTest:!1,depthWrite:!1}),this._drcHitboxMaterial=new Zs.MeshBasicMaterial({transparent:!0,opacity:0,depthWrite:!1});let S=[];for(let N of s){let B=N.rects&&N.rects.length>0?N.rects:[N.bbox];for(let P of B){let[U,W,q,nt,Q,X]=P,gt=Math.max((q-U)/h,.001),ft=Math.max((nt-W)/h,.001),xt=g,Bt=_,Ot=0;if(P.length>=6&&Q!==void 0&&X!==void 0){xt=Q/h*dk;let Lt=X/h*dk;Bt=Math.max(Lt-xt,.001),Ot=this._stackOffsetForPoint(Q,(U+q)/2,(W+nt)/2,h)}let Pt=U/h+gt/2,se=W/h+ft/2,ot=xt+Bt/2+Ot;S.push({cx:Pt,cy:se,cz:ot,width:gt,height:ft,depth:Bt,markerId:N.id})}}if(S.length>0){let N=new Zs.BoxGeometry(1,1,1);this._drcHitboxMesh=new Zs.InstancedMesh(N,this._drcHitboxMaterial,S.length),this._drcHitboxMarkerIds=new Array(S.length);let B=new Zs.Matrix4,P=new Zs.Vector3,U=new Zs.Vector3,W=new Zs.Quaternion;S.forEach((q,nt)=>{U.set(q.cx,q.cy,q.cz),P.set(q.width,q.height,q.depth),B.compose(U,W,P),this._drcHitboxMesh.setMatrixAt(nt,B),this._drcHitboxMarkerIds[nt]=q.markerId;let Q=new Zs.BoxGeometry(q.width,q.height,q.depth),X=new Zs.EdgesGeometry(Q);Q.dispose();let gt=new Zs.LineSegments(X,this._drcMaterial);gt.position.set(q.cx,q.cy,q.cz),gt.renderOrder=999,this._drcMeshGroup.add(gt)}),this._drcHitboxMesh.instanceMatrix.needsUpdate=!0,this._drcMeshGroup.add(this._drcHitboxMesh)}this._drcMeshGroup.renderOrder=999,this._scene.add(this._drcMeshGroup),this.render();let y=!0,R=0;this._drcBlinkInterval=setInterval(()=>{if(!(!this._drcMeshGroup||!this._drcMaterial)){if(R+=1,R>=u5e){this._drcMaterial.opacity=1,this.render(),clearInterval(this._drcBlinkInterval),this._drcBlinkInterval=null;return}y=!y,this._drcMaterial.opacity=y?1:.2,this.render()}},a5e)}refreshSceneForOptions(){this._destroyed||this._lastSceneData&&(this.clearHighlightDRC(),this.buildScene(this._lastSceneData))}};var h5e=[{name:"green",hex:"#00ff00"},{name:"yellow",hex:"#ffff00"},{name:"cyan",hex:"#00ffff"},{name:"magenta",hex:"#ff00ff"},{name:"red",hex:"#ff0000"},{name:"dark_green",hex:"#008000"},{name:"dark_magenta",hex:"#800080"},{name:"blue",hex:"#0000ff"},{name:"orange",hex:"#ffa500"},{name:"purple",hex:"#800080"},{name:"lime",hex:"#bfff00"},{name:"teal",hex:"#008080"},{name:"pink",hex:"#ffc0cb"},{name:"brown",hex:"#8b4513"},{name:"indigo",hex:"#4b0082"},{name:"turquoise",hex:"#40e0d0"}],f5e=[{label:"Connected Insts",suffix:"connected_insts",needsNet:!0},{label:"Output Nets",suffix:"connected_nets",args:{output:!0,input:!1}},{label:"Input Nets",suffix:"connected_nets",args:{output:!1,input:!0}},{label:"All Nets",suffix:"connected_nets",args:{output:!0,input:!0}},{label:"All buffer trees",suffix:"connected_buffer_trees"},{label:"All buffer trees (incl. inverters)",suffix:"connected_buffer_trees",args:{include_inverters:!0}}],mnt=class{constructor(s){this._app=s,this._el=document.createElement("div"),this._el.className="context-menu",this._el.style.display="none",this._el.style.zIndex="10000",document.body.appendChild(this._el),this._bindEvents()}_bindEvents(){document.addEventListener("mousedown",s=>{this._el.contains(s.target)||this.hide()}),this._app.map&&this._app.map.on("movestart",()=>this.hide())}show(s){this._el.innerHTML="";let h=!!this._app.selHasInst,g=!!this._app.selHasNet,m=!(h||g),_=W=>f5e.map(q=>({label:q.label,disabled:q.needsNet?!g:!h,...W(q.suffix,q.args||{})})),S=[{label:"Select",disabled:m,subMenu:_((W,q)=>({action:()=>this._sendContextAction("select_"+W,q)}))},{label:"Highlight",disabled:m,subMenu:_((W,q)=>({subMenu:this._buildColorSubmenu("highlight_"+W,q)}))},{label:"Save",subMenu:[{label:"Visible layout",action:()=>this._app.captureLayout?.({entire:!1})},{label:"Entire layout",action:()=>this._app.captureLayout?.({entire:!0})}]},{label:"Clear",subMenu:[{label:"Selections",action:()=>this._sendContextAction("clear_selections")},{label:"Highlights",action:()=>this._sendContextAction("clear_highlights")},{label:"Rulers",action:()=>{this._app.rulerManager?.clearAllRulers()}},{label:"Focus nets",action:()=>this._sendContextAction("clear_focus_nets")},{label:"Route Guides",action:()=>this._sendContextAction("clear_route_guides")},{label:"All",action:()=>{this._sendContextAction("clear_all"),this._app.rulerManager?.clearAllRulers()}}]}];this._buildMenu(S,this._el),this._el.style.display="block";let y=4,R=this._el.getBoundingClientRect(),N=window.innerWidth-R.width-y,B=window.innerHeight-R.height-y,P=Math.max(y,Math.min(s.originalEvent.clientX,N)),U=Math.max(y,Math.min(s.originalEvent.clientY,B));this._el.style.left=P+"px",this._el.style.top=U+"px"}hide(){this._el.style.display="none"}_buildColorSubmenu(s,h={}){return h5e.map(({name:g,hex:m},_)=>({label:g,swatch:m,action:()=>this._sendContextAction(s,{...h,group:_})}))}_buildMenu(s,h){s.forEach(g=>{let m=document.createElement("div");if(m.className="cm-item",g.swatch){let _=document.createElement("span");_.className="cm-swatch",_.style.background=g.swatch,m.appendChild(_)}if(m.appendChild(document.createTextNode(g.label)),g.disabled){m.classList.add("disabled"),g.subMenu&&m.classList.add("has-submenu"),h.appendChild(m);return}if(g.subMenu){m.classList.add("has-submenu");let _=document.createElement("div");_.className="cm-submenu",this._buildMenu(g.subMenu,_),m.appendChild(_),m.addEventListener("mouseenter",()=>{_.classList.remove("flip-left"),_.getBoundingClientRect().right>window.innerWidth&&_.classList.add("flip-left")})}else g.action&&m.addEventListener("click",_=>{_.stopPropagation(),this.hide();try{g.action()}catch(S){console.error("Context menu item action threw:",g.label,S)}});h.appendChild(m)})}_sendContextAction(s,h={}){this._app.websocketManager&&this._app.websocketManager.request({type:"context_action",action:s,...h}).then(g=>{dR(this._app,g),g&&g.connected_count===0&&ev('Nothing connected \u2014 select an instance (or a net for "Connected Insts") first.'),this._syncAfterAction(s)}).catch(g=>{console.error("Context action failed:",s,g)})}_syncAfterAction(s){let h=this._app;(s==="clear_focus_nets"||s==="clear_route_guides"||s==="clear_all")&&typeof h.redrawAllLayers=="function"&&h.redrawAllLayers(),s==="clear_selections"||s==="clear_all"?(h.updateInspector?.(null),h.stopSelectionAnimation?.(),h.highlightRect&&h.map&&(h.map.removeLayer(h.highlightRect),h.highlightRect=null),h.lastSelectionBounds=null):h.refreshInspector?.(),h.refreshOverlay?.()}};function nQt(d,s){if(!d)return;let h=URL.createObjectURL(d),g=document.createElement("a");g.href=h,g.download=s,g.style.display="none",document.body.appendChild(g),g.click(),document.body.removeChild(g),setTimeout(()=>URL.revokeObjectURL(h),0)}function rQt(d){return d.options&&d.options.opacity!=null?d.options.opacity:1}function sQt(d,s,h){if(!s||s.tagName==="IMG"&&(!s.complete||!s.naturalWidth))return;let g=s.getBoundingClientRect();if(!(g.width<=0||g.height<=0))try{d.drawImage(s,g.left-h.left,g.top-h.top,g.width,g.height)}catch{}}function d5e(d,s,h){let g=[];d.map.eachLayer(m=>{m instanceof L.GridLayer&&m._tiles&&g.push(m)}),g.sort((m,_)=>(m.options&&m.options.zIndex||0)-(_.options&&_.options.zIndex||0));for(let m of g){let _=rQt(m);if(!(_<=0)){s.globalAlpha=_;for(let S of Object.keys(m._tiles)){let y=m._tiles[S];!y||!y.current||sQt(s,y.el,h)}}}s.globalAlpha=1}function p5e(d,s,h){let g=d.map.getContainer().querySelectorAll(".leaflet-pane svg"),m=[];return g.forEach(_=>{let S=_.getBoundingClientRect();if(S.width<=0||S.height<=0)return;let y=_.cloneNode(!0);y.setAttribute("width",S.width),y.setAttribute("height",S.height);let R=new XMLSerializer().serializeToString(y),N="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(R);m.push(new Promise(B=>{let P=new Image;P.onload=()=>{try{s.drawImage(P,S.left-h.left,S.top-h.top,S.width,S.height)}catch{}B()},P.onerror=()=>B(),P.src=N}))}),Promise.all(m)}function g5e(d,s,h){d.map.getContainer().querySelectorAll(".leaflet-pane .ruler-label").forEach(m=>{let _=m.getBoundingClientRect();if(_.width<=0||_.height<=0)return;let S=m.textContent;if(!S)return;let y=getComputedStyle(m),R=_.left-h.left,N=_.top-h.top;s.save(),s.fillStyle=y.backgroundColor||"rgba(0, 0, 0, 0.75)";let B=Math.min(parseFloat(y.borderTopLeftRadius)||0,_.height/2);B>0&&typeof s.roundRect=="function"?(s.beginPath(),s.roundRect(R,N,_.width,_.height,B),s.fill()):s.fillRect(R,N,_.width,_.height),s.fillStyle=y.color||"#eee",s.font=y.font||`${y.fontSize||"12px"} ${y.fontFamily||"monospace"}`,s.textAlign="left",s.textBaseline="middle",s.fillText(S,R+(parseFloat(y.paddingLeft)||0),N+_.height/2),s.restore()})}function m5e(d){let s=0;return d.map.eachLayer(h=>{if(!(!(h instanceof L.GridLayer)||!h._tiles)){h._loading&&s++;for(let g of Object.keys(h._tiles)){let m=h._tiles[g],_=m&&m.el;m&&m.current&&_&&_.tagName==="IMG"&&(!_.complete||!_.naturalWidth)&&s++}}}),s}function b5e(d,s=6e3,h=32){return new Promise(g=>{let m=Date.now()+s,_=0,S=()=>{if(m5e(d)===0){if(++_>=2){g();return}}else _=0;if(Date.now()>=m){g();return}setTimeout(S,h)};setTimeout(S,h)})}function w5e(d,s,h){d.map.eachLayer(g=>{if(!(g instanceof L.ImageOverlay))return;let m=rQt(g);m<=0||(s.globalAlpha=m,sQt(s,g._image,h),s.globalAlpha=1)})}async function iQt(d){let s=d.map.getContainer(),h=s.getBoundingClientRect(),g=Math.max(1,Math.round(h.width)),m=Math.max(1,Math.round(h.height)),_=document.createElement("canvas");_.width=g,_.height=m;let S=_.getContext("2d"),y=getComputedStyle(s).backgroundColor;return S.fillStyle=y&&y!=="transparent"&&y!=="rgba(0, 0, 0, 0)"?y:"#000",S.fillRect(0,0,g,m),d5e(d,S,h),w5e(d,S,h),await p5e(d,S,h),g5e(d,S,h),new Promise(R=>_.toBlob(R,"image/png"))}async function oQt(d,{entire:s=!1}={}){if(!d.map)return;if(!s||!d.fitBounds){nQt(await iQt(d),"layout_visible.png");return}let h=d.map.getCenter(),g=d.map.getZoom();try{d.map.fitBounds(d.fitBounds,{animate:!1}),await b5e(d),nQt(await iQt(d),"layout_entire.png")}finally{d.map.setView(h,g,{animate:!1})}}var pk=document.getElementById("websocket-status"),$U=null,v5e=2e3,_5e=20;function q2t(){let d=ht.websocketManager&&ht.websocketManager.isConnected,s=ht.websocketManager?ht.websocketManager.pendingCount:0;if(d)$U&&(clearTimeout($U),$U=null),s>_5e?(pk.innerHTML=`
pending: ${s}
`,pk.style.display="block"):pk.style.display="none";else{if(ht.websocketManager?._shutdown)return;$U||($U=setTimeout(()=>{ht.websocketManager?.isConnected||(pk.innerHTML='
\u26A0 OpenROAD disconnected \u2014 retrying\u2026
',pk.style.display="block")},v5e))}y5e(s)}function y5e(d){let s=ht.tileProgressEl;s&&(s.classList.toggle("active",d>0),s.title=d>0?`${d} tile requests pending`:"")}function x5e(d){if(!d)return"";try{return decodeURIComponent(d)}catch{return""}}var ht={map:null,fitBounds:null,lastSelectionBounds:null,selHasInst:!1,selHasNet:!1,displayControlsEl:null,allLayers:[],designScale:null,designMaxDXDY:null,designOriginX:0,designOriginY:0,websocketManager:null,goldenLayout:null,hasLiberty:!1,techData:null,inspectorEl:null,tclOutputEl:null,highlightRect:null,hoverHighlightLayer:null,hoverHighlightPane:"hover-highlight-pane",modulesLayer:null,pinsLayer:null,overlayLayers:[],hierarchyBrowser:null,focusNets:new Set,routeGuideNets:new Set,visibleLayers:new Set,visibleLayerNames:new Set,visibleChiplets:null,layerPatterns:{},useTrueZ:qf("or_use_true_z")==="1",showDbu:qf("or_show_dbu")==="1",rulerStyle:qf("or_ruler_style")==="manhattan"?"manhattan":"euclidian",wheelZoom:qf("or_wheel_zoom")!=="0",arrowStep:pR(qf("or_arrow_step")),fontFamily:x5e(qf("or_font_family")),fontScale:jU(qf("or_font_scale")),polyDecomp:!1,labelManager:null,selectableLayers:new Set,heatMapData:null,activeHeatMap:"",heatMapLayer:null,heatMapLegendEl:null,renderHeatMapControls:null,rulerManager:null,selectionToken:0,selectionResetters:[],getDbuPerMicron(){return this.techData?.dbu_per_micron||1e3},unitOpts(){return{showDbu:this.showDbu,dbuPerMicron:this.getDbuPerMicron()}},formatDbu(d,s=!1){return lJt(d,this.unitOpts(),s)},parseDbu(d){return hJt(d,this.unitOpts())},formatDistance(d){return fJt(d,this.unitOpts())},unitLabel(){return dJt(this.unitOpts())}},Dd={stdcells:!0,macros:!0,pad_input:!0,pad_output:!0,pad_inout:!0,pad_power:!0,pad_spacer:!0,pad_areaio:!0,pad_other:!0,phys_fill:!1,phys_endcap:!0,phys_welltap:!0,phys_tie:!0,phys_antenna:!0,phys_cover:!0,phys_bump:!0,phys_other:!0,std_bufinv:!0,std_bufinv_timing:!0,std_clock_bufinv:!0,std_clock_gate:!0,std_level_shift:!0,std_sequential:!0,std_combinational:!0,net_signal:!0,net_power:!0,net_ground:!0,net_clock:!0,net_reset:!0,net_tieoff:!0,net_scan:!0,net_analog:!0,inst_names:!0,inst_pins:!0,inst_pin_names:!1,routing:!0,routing_segments:!0,routing_vias:!0,special_nets:!0,srouting_segments:!0,srouting_vias:!0,pins:!0,pin_names:!0,access_points:!1,regions:!0,mfg_grid:!1,gcell_grid:!1,flywires_only:!1,blockages:!0,placement_blockages:!0,routing_obstructions:!0,fills:!1,rows:!1,tracks_pref:!1,tracks_non_pref:!1,module_view:!1,detailed:!1,rulers:!0,labels:!0,scale_bar:!0,focused_nets_guides:!1,highlight_selected:!0,debug:!1};try{let d=qf("or_visibility");if(d){let s=JSON.parse(decodeURIComponent(d));for(let[h,g]of Object.entries(s))Dd[h]=!!g}}catch{}var gk={stdcells:!0,macros:!0,pad_input:!0,pad_output:!0,pad_inout:!0,pad_power:!0,pad_spacer:!0,pad_areaio:!0,pad_other:!0,phys_fill:!0,phys_endcap:!0,phys_welltap:!0,phys_tie:!0,phys_antenna:!0,phys_cover:!0,phys_bump:!0,phys_other:!0,std_bufinv:!0,std_bufinv_timing:!0,std_clock_bufinv:!0,std_clock_gate:!0,std_level_shift:!0,std_sequential:!0,std_combinational:!0,net_signal:!0,net_power:!0,net_ground:!0,net_clock:!0,net_reset:!0,net_tieoff:!0,net_scan:!0,net_analog:!0,pins:!0,inst_pins:!0,placement_blockages:!0,routing_obstructions:!0};ht.visibility=Dd;ht.selectability=gk;try{let d=qf("or_selectability");if(d){let s=JSON.parse(decodeURIComponent(d));for(let[h,g]of Object.entries(s))gk[h]=!!g}}catch{}var M5e=NKt(Dd,ht.visibleLayerNames,gk,ht.selectableLayers,ht);(function(){let s=null;try{s=new URLSearchParams(window.location.search)}catch{s=null}let h=_=>s?s.get(_):null;ht.mergeTiles=h("mergetiles")!=="0";let g=Number(h("tilebudget"));Number.isFinite(g)&&g>0&&(ht.tileBudgetBytes=Math.round(g*1024*1024));let m=Number(h("mergegroups"));Number.isFinite(m)&&m>0&&(ht.mergeGroupCount=Math.floor(m)),ht.tileDpr=ik,ht.MergedTileLayer=$Kt({visibility:Dd,selectability:gk,visibleLayers:ht.visibleLayerNames,selectableLayers:ht.selectableLayers,app:ht},{dpr:ik})})();var E5e=L.GridLayer.extend({initialize:function(d,s,h){this._websocketManager=d,this._appState=s,L.GridLayer.prototype.initialize.call(this,nk(h))},_clampZoom:function(d){return L.GridLayer.prototype._clampZoom.call(this,hR(this,d))},createTile:function(d,s){let h=document.createElement("img");h.alt="",h.setAttribute("role","presentation"),h._tileDone=!1,h.onload=()=>{h.src&&h.src.startsWith("blob:")&&URL.revokeObjectURL(h.src),h._tileDone||(h._tileDone=!0,s(null,h))},h.onerror=()=>{h._tileDone||(h._tileDone=!0,s(new Error("heat map tile load error"),h))};let g=this._appState.activeHeatMap;return g?(this._websocketManager.request({type:"heatmap_tile",name:g,z:d.z,x:d.x,y:d.y,...lR(ik(),this.getTileSize().x)}).then(m=>{h.src=m?URL.createObjectURL(m):s3}).catch(()=>{h.src=s3}),h):(h.src=s3,h)},refreshTiles:function(){if(this._map)for(let d in this._tiles){let s=this._tiles[d];if(!s||!s.el)continue;let h=s.el,g=s.coords,m=this._appState.activeHeatMap;if(!m){h.src&&h.src.startsWith("blob:")&&URL.revokeObjectURL(h.src),h.src=s3;continue}this._websocketManager.request({type:"heatmap_tile",name:m,z:g.z,x:g.x,y:g.y,...lR(ik(),this.getTileSize().x)}).then(_=>{h.src&&h.src.startsWith("blob:")&&URL.revokeObjectURL(h.src),h.src=_?URL.createObjectURL(_):s3}).catch(()=>{h.src=s3})}}});function Z2t(d){ht.heatMapData=d,ht.activeHeatMap=d.active||"",ht.heatMapLayer&&(ht.activeHeatMap?ht.map.hasLayer(ht.heatMapLayer)||ht.heatMapLayer.addTo(ht.map):ht.map.hasLayer(ht.heatMapLayer)&&ht.map.removeLayer(ht.heatMapLayer),ht.heatMapLayer.refreshTiles()),ht.renderHeatMapControls&&ht.renderHeatMapControls(d)}ht.updateHeatMaps=Z2t;function Y2t(){ht.overlayLayer&&ht.overlayLayer.refreshTiles()}var mk=UU(()=>{Y2t(),ht.selectionBrowser&&ht.selectionBrowser.scheduleRefresh()});ht.refreshOverlay=mk;function F0(){Rd("or_visibility",encodeURIComponent(JSON.stringify(Dd))),Rd("or_selectability",encodeURIComponent(JSON.stringify(gk))),o3();let d=[[ht.modulesLayer,Dd.module_view],[ht.pinsLayer,Dd.pins],...ht.overlayLayers.map(({def:s,layer:h})=>[h,snt(s.shown_by,Dd)])];for(let[s,h]of d)s&&(h&&!ht.map.hasLayer(s)?s.addTo(ht.map):!h&&ht.map.hasLayer(s)&&ht.map.removeLayer(s));for(let s of ht.allLayers)s.refreshTiles();if(ht.heatMapLayer&&ht.heatMapLayer.refreshTiles(),ht.highlightRect){let s=Dd.highlight_selected!==!1;!s&&ht.map.hasLayer(ht.highlightRect)?ht.map.removeLayer(ht.highlightRect):s&&!ht.map.hasLayer(ht.highlightRect)&&ht.highlightRect.addTo(ht.map)}!Dd.highlight_selected&&ht.clearSelectionPulse&&ht.clearSelectionPulse(),Y2t(),ht.rulerManager&&ht.rulerManager.updateVisibility(),ht.labelManager&&ht.labelManager.updateVisibility(),ht.updateScaleBar&&ht.updateScaleBar()}var _R=UU(F0),o3=UU(()=>{!ht.websocketManager||Sc(ht)||ht.websocketManager.request({type:"set_display_state",state:YJt()}).catch(()=>{})});ht.syncDisplayState=o3;function S5e(d){if(!d||typeof d!="object")return;let s=d.entries;if(!(!s||typeof s!="object")){KJt(s);try{if(ht.map&&typeof sessionStorage<"u"){let h=ht.map.getCenter();sessionStorage.setItem("or_restore_view",JSON.stringify({lat:h.lat,lng:h.lng,zoom:ht.map.getZoom()}))}}catch{}window.location.reload()}}ht.redrawAllLayers=F0;ht.captureLayout=(d={})=>oQt(ht,d);function T5e(d){let s=document.createElement("div");s.className="layout-viewer",s.style.width="100%",s.style.height="100%",s.style.backgroundColor="var(--bg-map)",d.element.appendChild(s);let h=document.createElement("div");h.className="or-hud or-hud-bottom-right heatmap-map-legend hidden",s.appendChild(h),ht.heatMapLegendEl=h;let g=document.createElement("div");g.className="or-progress",s.appendChild(g),ht.tileProgressEl=g,d.on("destroy",()=>{ht.tileProgressEl=null,ht.heatMapLegendEl=null}),ht.map=L.map(s,oJt(void 0,{wheelZoom:ht.wheelZoom,arrowStep:ht.arrowStep})),Sc(ht)||mJt(ht.map,()=>ht.wheelZoom),KKt(ht.map),RKt(()=>F0());let m=ht.map.createPane(ht.hoverHighlightPane);m.style.zIndex="650",m.style.pointerEvents="none";let _=L.Control.extend({onAdd:function(){let X=L.DomUtil.create("div","leaflet-bar leaflet-control leaflet-control-fit"),gt=L.DomUtil.create("a","",X);return gt.href="#",gt.title="Fit",gt.setAttribute("role","button"),gt.setAttribute("aria-label","Fit"),gt.textContent="\u2922",L.DomEvent.on(gt,"click",L.DomEvent.stop).on(gt,"click",()=>{ht.fitBounds&&ht.map.fitBounds(ht.fitBounds)}),X}});new _({position:"topleft"}).addTo(ht.map),new ResizeObserver(()=>{ht.map.invalidateSize({animate:!1})}).observe(s);let S=document.createElement("div");S.className="or-hud or-hud-bottom-left hidden";let y=document.createElement("div");y.id="scale-bar";let R=document.createElement("span");R.className="or-hud-divider";let N=document.createElement("div");N.id="coord-bar",S.appendChild(y),S.appendChild(R),S.appendChild(N),s.appendChild(S);function B(){let X=y.style.display!=="none"&&y.childElementCount>0,gt=N.textContent!=="";R.style.display=X&>?"":"none",S.classList.toggle("hidden",!X&&!gt)}B(),ht.map.on("mousemove",X=>{if(ht.lastMouseLatLng=X.latlng,!ht.designScale)return;let{dbuX:gt,dbuY:ft}=Qw(X.latlng.lat,X.latlng.lng,ht.designScale,ht.designMaxDXDY,ht.designOriginX,ht.designOriginY);N.textContent=`X: ${ht.formatDbu(gt)} Y: ${ht.formatDbu(ft)}`,B()}),ht.map.on("mouseout",X=>{let gt=X.originalEvent&&X.originalEvent.relatedTarget;gt&&s.contains(gt)||(ht.lastMouseLatLng=null,N.textContent="",B())});let P=22,U=8,W=22;function q(X,gt,ft){let Bt=2+U,Ot=W,Pt=W+X,se=P-2,ot=X>=40,Lt=[];if(Lt.push(``),ot&&ft>1)for(let be=1;be`)}ot&&Lt.push(`0`),Lt.push(`${gt}`),y.innerHTML=`${Lt.join("")}`}function nt(){if(!ht.designScale||!Dd.scale_bar){y.style.display="none",B();return}let X=ht.designScale*Math.pow(2,ht.map.getZoom()),gt=ht.map.getContainer().clientWidth||400,ft=gJt({targetPx:gt*.15,pxPerDbu:X,dbuPerMicron:ht.techData?.dbu_per_micron,showDbu:ht.showDbu});if(!ft){y.style.display="none",B();return}y.style.display="",q(ft.barPx,ft.label,ft.segments),B()}let Q=UU(nt);ht.map.on("zoom zoomend resize",Q),ht.updateScaleBar=nt,ht.rulerManager=new unt(ht,Dd,VU,bnt),ht.labelManager=new lnt(ht,Dd,VU,bnt)}function C5e(d){let s=document.createElement("div");s.className="display-controls",s.innerHTML='
Loading layers...
',d.element.appendChild(s),ht.displayControlsEl=s}var X2t="or_restore_console",A5e=1<<20;function k5e(){try{if(ht.tclOutputEl){let d=[...ht.tclOutputEl.children].map(m=>[m.textContent,m.className]),s=d.length,h=0;for(;s>0&&h+d[s-1][0].length<=A5e;)h+=d[--s][0].length;let g=d.slice(s);s>0&&g.unshift([`[earlier output not kept across reload] -`,""]),sessionStorage.setItem(X2t,JSON.stringify(g))}}catch{}window.location.reload()}function L5e(){try{let d=sessionStorage.getItem(X2t);if(!d)return;sessionStorage.removeItem(X2t);for(let[s,h]of JSON.parse(d))bS(s,h)}catch{}}function bS(d,s){if(!ht.tclOutputEl)return;let h=document.createElement("span");s&&(h.className=s),h.textContent=d,ht.tclOutputEl.appendChild(h),ht.tclOutputEl.scrollTop=ht.tclOutputEl.scrollHeight}function P5e(){if(ht._shutdownHandled)return;ht._shutdownHandled=!0,ht.websocketManager&&(ht.websocketManager._shutdown=!0,ht.websocketManager.onPush=()=>{});let d=document.createElement("div");d.style.cssText="position:fixed;inset:0;z-index:99999;background:#1e1e1e;color:#ddd;display:flex;flex-direction:column;align-items:center;justify-content:center;font-family:system-ui,sans-serif;font-size:16px;padding:24px;text-align:center;",d.innerHTML='
OpenROAD exited
You can close this tab.
',document.body.appendChild(d),setTimeout(()=>{try{window.close()}catch{}},1500)}function I5e(d){let s=document.createElement("div");if(s.className="tcl-console",s.innerHTML='
%
',d.element.appendChild(s),ht.tclOutputEl=s.querySelector(".tcl-output"),L5e(),Sc(ht)){s.querySelector(".tcl-input-row").style.display="none";let m=document.createElement("span");m.className="tcl-static-notice",m.setAttribute("role","status"),m.setAttribute("aria-live","polite"),m.textContent="Tcl console is not available in saved reports.",ht.tclOutputEl.appendChild(m);return}let h=s.querySelector(".tcl-input"),g=new dnt(h,ht.websocketManager);h.addEventListener("keydown",m=>{if(!g.handleKeyDown(m)&&m.key==="Enter"){let _=h.value.trim();if(!_)return;bS(`>>> ${_} -`,"tcl-cmd"),g.addToHistory(_),h.value="",ht.websocketManager.request({type:"tcl_eval",cmd:_}).then(S=>{S.result&&bS(S.result+` -`,S.is_error?"tcl-error":""),S.action==="shutdown"&&P5e(),!S.is_error&&ht.drcWidget&&ht.drcWidget.refresh()}).catch(S=>bS(`Error: ${S} -`,"tcl-error"))}})}ht.visibility=Dd;var wS=AJt(ht,F0,mk),R5e=wS.createInspector,VU=wS.updateInspector,D5e=wS.highlightBBox,N5e=wS.pulseHighlight;ht.updateInspector=VU;ht.navigateInspector=wS.navigateInspector;ht.refreshInspector=wS.refreshInspector;ht.animateSelection=wS.animateSelection;ht.stopSelectionAnimation=wS.stopSelectionAnimation;function O5e(d){new tnt(d,ht,F0)}function B5e(d){ht.timingWidget=new ak(ht,F0,mk),d.element.appendChild(ht.timingWidget.element)}function F5e(d){ht.drcWidget=new fnt(ht,F0,mk),d.element.appendChild(ht.drcWidget.element)}function U5e(d){ht.clockTreeWidget=new Jet(d,ht,F0,mk)}function z5e(d){ht.chartsWidget=new Qet(ht,F0),d.element.appendChild(ht.chartsWidget.element)}function j5e(d){let s=document.createElement("div");s.className="help-panel",s.innerHTML="

Keyboard Shortcuts

fFit design to viewport
scrollZoom in/out
dragPan the view
right-dragRubber-band zoom
Shift+clickAdd object to selection
Ctrl/Cmd+clickSelect object and its connected nets
kToggle ruler mode
Shift+KClear all rulers
EscapeCancel ruler (when building)
",d.element.appendChild(s)}function H5e(d){ht.selectionBrowser=new ent(d,ht,mk)}function G5e(d){new hnt(d,ht)}function W5e(d){ht.threeDViewerWidget=new gnt(d,ht)}var $5e=28,V5e={dimensions:{headerHeight:$5e},root:{type:"row",content:[{type:"component",componentType:"DisplayControls",title:"Display Controls",width:15},{type:"column",width:55,content:[{type:"stack",height:70,content:[{type:"component",componentType:"LayoutViewer",title:"Layout",isClosable:!1},{type:"component",componentType:"SchematicWidget",title:"Schematic"},{type:"component",componentType:"3DViewer",title:"3D Viewer"}]},{type:"component",componentType:"TclConsole",title:"Tcl Console",height:30}]},{type:"stack",width:30,content:[{type:"component",componentType:"Inspector",title:"Inspector"},{type:"component",componentType:"Browser",title:"Hierarchy"},{type:"component",componentType:"TimingWidget",title:"Timing"},{type:"component",componentType:"DRCWidget",title:"DRC"},{type:"component",componentType:"SelectHighlight",title:"Select Highlight"},{type:"component",componentType:"ClockWidget",title:"Clock Tree"},{type:"component",componentType:"ChartsWidget",title:"Charts"},{type:"component",componentType:"HelpWidget",title:"Help"}]}]}};ht.goldenLayout=new Het(document.getElementById("gl-container"));ht.goldenLayout.registerComponentFactoryFunction("LayoutViewer",T5e);ht.goldenLayout.registerComponentFactoryFunction("DisplayControls",C5e);ht.goldenLayout.registerComponentFactoryFunction("TclConsole",I5e);ht.goldenLayout.registerComponentFactoryFunction("Inspector",R5e);ht.goldenLayout.registerComponentFactoryFunction("Browser",O5e);ht.goldenLayout.registerComponentFactoryFunction("TimingWidget",B5e);ht.goldenLayout.registerComponentFactoryFunction("DRCWidget",F5e);ht.goldenLayout.registerComponentFactoryFunction("ClockWidget",U5e);ht.goldenLayout.registerComponentFactoryFunction("ChartsWidget",z5e);ht.goldenLayout.registerComponentFactoryFunction("SchematicWidget",G5e);ht.goldenLayout.registerComponentFactoryFunction("3DViewer",W5e);ht.goldenLayout.registerComponentFactoryFunction("HelpWidget",j5e);ht.goldenLayout.registerComponentFactoryFunction("SelectHighlight",H5e);var Ty=window.__STATIC_CACHE__||null;if(Ty)PKt(),ht.websocketManager=NU.fromCache(Ty,q2t);else{let d=eJt(window.location);ht.websocketManager=new NU(d,q2t),ht.layerExtents=new $et,ht.websocketManager.onReconnected=()=>{wnt(),Q2t(null,null,{reloadOnChange:!0}).catch(()=>{})}}q2t();ht.goldenLayout.loadLayout(V5e);function K2t(){ht.goldenLayout.updateSize()}ht.syncLayoutSize=K2t;window.addEventListener("resize",K2t);function bnt(d){ht.goldenLayout.focusComponent(d)}ht.focusComponent=bnt;ht.resetLayout=function(){ht.goldenLayout&&typeof ht.goldenLayout.resetLayout=="function"&&ht.goldenLayout.resetLayout()};ht.toggleTheme=function(){let d=document.documentElement.dataset.theme==="dark"?"light":"dark";document.documentElement.dataset.theme=d,N2t(d),Xet(d),ht.chartsWidget&&ht.chartsWidget.render(),ht.clockTreeWidget&&ht.clockTreeWidget.render(),o3()};ht.toggleShowDbu=function(){ht.showDbu=!ht.showDbu,Rd("or_show_dbu",ht.showDbu?"1":"0"),ht.rulerManager&&ht.rulerManager._rerenderAll(),ht.hierarchyBrowser&&ht.hierarchyBrowser._render(),ht.updateScaleBar&&ht.updateScaleBar(),ht.refreshInspector&&ht.refreshInspector(),o3()};ht.toggleRulerStyle=function(){ht.rulerStyle=ht.rulerStyle==="manhattan"?"euclidian":"manhattan",Rd("or_ruler_style",ht.rulerStyle),o3()};ht.toggleWheelZoom=function(){ht.wheelZoom=!ht.wheelZoom,Rd("or_wheel_zoom",ht.wheelZoom?"1":"0"),o3()};ht.setArrowStep=function(d){ht.arrowStep=pR(d),Rd("or_arrow_step",String(ht.arrowStep)),cJt(ht.map,ht.arrowStep),o3()};ht.setAppFont=function({family:d,scale:s}){ht.fontFamily=d??ht.fontFamily,ht.fontScale=jU(s??ht.fontScale),Rd("or_font_family",encodeURIComponent(ht.fontFamily)),Rd("or_font_scale",String(ht.fontScale)),ht.applyAppFont(),o3()};ht.applyAppFont=function(){let d=document.documentElement;ht.fontFamily?d.style.setProperty("--or-font-family",ht.fontFamily):d.style.removeProperty("--or-font-family"),d.style.setProperty("--or-font-scale",String(ht.fontScale/100)),ht.chartsWidget&&ht.chartsWidget.render(),ht.clockTreeWidget&&ht.clockTreeWidget.render()};ht.showArrowStepDialog=()=>PJt(ht);ht.showAppFontDialog=()=>IJt(ht);ht.togglePolyDecomp=function(){ht.websocketManager&&ht.websocketManager.request({type:"poly_decomp",value:!ht.polyDecomp}).then(d=>J2t(d.value)).catch(()=>{})};function J2t(d){ht.polyDecomp=!!d,ht.rebuildMenuBar&&ht.rebuildMenuBar(),ht.refreshOverlay&&ht.refreshOverlay()}ht.applyAppFont();ht.echoTcl=d=>bS(`>>> ${d} -`,"tcl-cmd");ht.runTclScript=(d,s)=>d?(s&&ht.echoTcl(d),ht.websocketManager.request({type:"tcl_eval",cmd:d}).then(h=>(h&&h.result&&bS(h.result+` -`,h.is_error?"tcl-error":""),h)).catch(h=>{bS(`Error: ${h} -`,"tcl-error")})):Promise.resolve();function cQt(d){d&&(ht.customMenu=d.menu||[],ht.customToolbar=d.toolbar||[],ht.rebuildMenuBar&&ht.rebuildMenuBar(),ht.rebuildToolbar&&ht.rebuildToolbar(),K2t())}ht.customMenu=[];ht.customToolbar=[];ht.scheduleRedrawAllLayers=_R;ht.showGlobalConnectDialog=()=>GJt(ht);ht.showInsertBufferDialog=d=>WJt(ht,d);UJt(ht);zJt(ht);ht.contextMenu=new mnt(ht);function q5e(){let d=document.getElementById("debug-continue-btn");return d||(d=document.createElement("button"),d.id="debug-continue-btn",d.className="debug-continue-btn",d.textContent="Continue",d.title="Advance the debugger (gpl, cts, ...)",d.addEventListener("click",()=>{ht.websocketManager.request({type:"debug_continue"}).catch(()=>{})}),(document.getElementById("menu-bar")||document.body).appendChild(d),d)}function aQt(d,s){let h=R2t(d,tv(),s);return h?(ht.currentBounds=d,ht.designScale=h.scale,ht.designMaxDXDY=h.maxDXDY,ht.designOriginX=h.originX,ht.designOriginY=h.originY,ht.fitBounds=h.fitBounds,ht.map.setMaxZoom(aJt(h.scale)),!0):!1}async function Q2t(d,s,{reloadOnChange:h=!1}={}){if(Sc(ht)||!ht.map)return!1;let g=d,m=s;if(!g)try{let y=await ht.websocketManager.request({type:"bounds"});g=y.bounds,m=y.fit_bounds}catch{return!1}if(!g||rJt(ht.currentBounds,g))return!1;if(h)return window.location.reload(),!0;let S=!!ht.designScale?Qw(ht.map.getCenter().lat,ht.map.getCenter().lng,ht.designScale,ht.designMaxDXDY,ht.designOriginX,ht.designOriginY):null;if(!aQt(g,m))return!1;if(S){let y=Id(S.dbuX,S.dbuY,ht.designScale,ht.designMaxDXDY,ht.designOriginX,ht.designOriginY);ht.map.setView(y,ht.map.getZoom(),{animate:!1})}return ht.highlightRect&&(ht.map.removeLayer(ht.highlightRect),ht.highlightRect=null),F0(),!0}function X5e(){let d=document.getElementById("loading-overlay");d.style.display="flex";let s=()=>{d.style.display!=="none"&&ht.websocketManager.request({type:"bounds"}).then(h=>{h.shapes_ready&&(d.style.display="none")}).catch(()=>{}).finally(()=>{d.style.display!=="none"&&setTimeout(s,1e3)})};setTimeout(s,1e3)}function wnt(){ht.layerExtents&&ht.layerExtents.refetch(d=>ht.websocketManager.request(d))}function Z5e(d){document.getElementById("loading-overlay").style.display="none",wnt(),Q2t(d.bounds,d.fit_bounds).then(s=>{s||F0()}).catch(()=>F0()),ht.refreshInspector&&ht.refreshInspector()}function Y5e(){let d=document.getElementById("script-running-badge");return d||(d=document.createElement("span"),d.id="script-running-badge",d.className="script-running-badge",d.textContent="Script running",d.title="The view updates when the script pauses or finishes",(document.getElementById("menu-bar")||document.body).appendChild(d),d)}function K5e(d){if(ht.scriptRunning=d,Y5e().style.display=d?"block":"none",!d){if(!ht.booted||!ht.designScale){k5e();return}ht.refreshPending&&(ht.refreshPending=!1,wnt(),ht.refreshInspector&&ht.refreshInspector()),Q2t().then(s=>{s||_R()}).catch(()=>_R())}}ht.websocketManager.onPush=d=>{if(d.type==="refresh"){if(ht.scriptRunning){ht.refreshPending=!0;return}Z5e(d)}else if(d.type==="script_running")K5e(!!d.running);else if(d.type==="renderer_controls_changed")ht.refreshRendererControls&&ht.refreshRendererControls(),_R();else if(d.type==="selection_invalidated")ht.updateInspector&&ht.updateInspector(null),ht.stopSelectionAnimation&&ht.stopSelectionAnimation(),ht.highlightRect&&ht.map&&(ht.map.removeLayer(ht.highlightRect),ht.highlightRect=null),mk();else if(d.type==="heatmaps_changed")ht.websocketManager.request({type:"heatmaps"}).then(Z2t).catch(s=>console.error("Heat map refresh failed",s));else if(d.type==="labels_changed")ht.labelManager&&ht.labelManager.applyRemoteLabels(d.labels);else if(d.type==="drcUpdated")ht._drcUpdateTimeout&&clearTimeout(ht._drcUpdateTimeout),ht._drcUpdateTimeout=setTimeout(()=>{ht.drcWidget&&ht.drcWidget.refresh()},500);else if(d.type==="debug_paused")ht.refreshRendererControls&&ht.refreshRendererControls(),q5e().style.display="block",_R(),ht.chartsWidget&&ht.websocketManager.request({type:"debug_charts"}).then(s=>ht.chartsWidget.setDebugCharts(s.charts||[])).catch(()=>{});else if(d.type==="debug_resumed"){let s=document.getElementById("debug-continue-btn");s&&(s.style.display="none")}else if(d.type==="debug_refresh"){if(ht.scriptRunning)return;ht.highlightRect&&(ht.map.removeLayer(ht.highlightRect),ht.highlightRect=null),_R()}else if(d.type==="log"){let s=d.text;s.endsWith(` -`)&&(s=s.slice(0,-1)),s&&bS(s+` -`,"")}else d.type==="restore_display_state"?S5e(d.state):d.type==="custom_ui"?cQt(d):d.type==="poly_decomp"?J2t(d.value):d.type==="shutdown"&&(ht.websocketManager._shutdown=!0,pk.innerHTML='
Server stopped
',pk.style.display="block")};ht.websocketManager.readyPromise.then(async()=>{try{let S=function(y,R={}){let{addToSelection:N=!1,focusInspector:B=!0,context:P=!1,showConnectivity:U=!1}=R;if(!ht.designScale)return Promise.resolve(null);let{dbuX:W,dbuY:q}=Qw(y.lat,y.lng,ht.designScale,ht.designMaxDXDY,ht.designOriginX,ht.designOriginY);if(ht.labelManager&&ht.labelManager.isActive()){ht.labelManager.handleMapClick(W,q);return}let nt=nJt(Dd,gk),Q={type:"select",dbu_x:W,dbu_y:q,zoom:Math.round(ht.map.getZoom()),visible_layers:[...ht.visibleLayerNames],selectable_layers:[...ht.selectableLayers],use_dbu:ht.showDbu,...nt};N&&(Q.add_to_selection=!0),P&&(Q.context=!0),U&&(Q.show_connectivity=!0),ht.visibleChiplets instanceof Set&&(Q.visible_chiplets=[...ht.visibleChiplets]);let X=wg(ht);return ht.websocketManager.request(Q).then(gt=>{if(B0(ht,X)){if(console.log("Select response:",gt,"at dbu",W,q),ht.map.closePopup(),dR(ht,gt),gt.selected&>.selected.length>0){let ft=gt.selected[0];ft.type==="Inst"&&(ht.selectedInstanceName=ft.name,ht.schematicWidget&&ht.schematicWidget.refresh()),VU(gt),B&&bnt("Inspector"),gt.bbox&&(D5e(gt.bbox[0],gt.bbox[1],gt.bbox[2],gt.bbox[3],gt.type),N5e(gt.bbox,gt.type),ht.lastSelectionBounds=Vf(gt.bbox[0],gt.bbox[1],gt.bbox[2],gt.bbox[3],ht.designScale,ht.designMaxDXDY,ht.designOriginX,ht.designOriginY)),Q.show_connectivity&>.connected_added>0&&ev(`Selected ${gt.connected_added} connected net`+(gt.connected_added>1?"s":""))}else!N&&!P&&(VU(null),ht.highlightRect&&(ht.map.removeLayer(ht.highlightRect),ht.highlightRect=null),ht.lastSelectionBounds=null);return Y2t(),gt}}).catch(gt=>(console.error("Select failed:",gt),null))},[d,s,h]=await Promise.all([ht.websocketManager.request({type:"tech"}),ht.websocketManager.request({type:"bounds"}),ht.websocketManager.request({type:"heatmaps"})]);wnt(),ht.hasLiberty=d.has_liberty,ht.techData=d,JJt(d.block_name),ht.websocketManager.request({type:"custom_ui"}).then(cQt).catch(()=>{}),ht.websocketManager.request({type:"poly_decomp"}).then(y=>J2t(y.value)).catch(()=>{});let g=s.bounds,m=s.fit_bounds;if(!Ty){let y=ht.map.getSize();IKt(uJt({designBounds:g,fitRect:m,viewW:y.x,viewH:y.y}))}let _=aQt(g,m);if(_){if(ht.labelManager&&ht.labelManager.reload(),ht.map.fitBounds(ht.fitBounds),Ty){let y=Ty.zoom;ht.map.setMinZoom(y),ht.map.setMaxZoom(y),ht.map.fitBounds(ht.fitBounds),ht.map.scrollWheelZoom.disable(),ht.map.touchZoom.disable(),ht.map.boxZoom.disable(),ht.map.doubleClickZoom.disable(),ht.pathOverlay=L.imageOverlay("",Vf(g[0][1],g[0][0],g[1][1],g[1][0],ht.designScale,ht.designMaxDXDY,ht.designOriginX,ht.designOriginY),{opacity:1,interactive:!1,zIndex:1e3}),Ty.setPathOverlay=R=>{R?(ht.pathOverlay.setUrl(R),ht.pathOverlay.addTo(ht.map)):ht.map.removeLayer(ht.pathOverlay)}}try{let y=sessionStorage.getItem("or_restore_view");if(y){sessionStorage.removeItem("or_restore_view");let R=JSON.parse(y);R&&isFinite(R.lat)&&isFinite(R.lng)&&isFinite(R.zoom)&&ht.map.setView([R.lat,R.lng],R.zoom)}}catch{}}if(Ty&&(document.getElementById("loading-overlay").style.display="none"),ht.selectAtLatLng=S,Ty||ht.map.on("click",y=>{if(ht.rulerManager&&ht.rulerManager.isActive())return;let R=y.originalEvent;S(y.latlng,{addToSelection:!!(R&&R.shiftKey),showConnectivity:!!(R&&(R.ctrlKey||R.metaKey))})}),!Ty){let y=ht.map.getContainer(),R=null,N=null;y.addEventListener("contextmenu",B=>{B.preventDefault()}),y.addEventListener("mousedown",B=>{B.button===2&&(R={x:B.clientX,y:B.clientY},ht.map.dragging.disable())}),window.addEventListener("mousemove",B=>{if(!R)return;let P=B.clientX-R.x,U=B.clientY-R.y;if(!N&&Math.abs(P)>=4&&Math.abs(U)>=4&&(N=document.createElement("div"),N.className="rubber-band",document.body.appendChild(N)),N){let W=Math.min(R.x,B.clientX),q=Math.min(R.y,B.clientY);N.style.left=W+"px",N.style.top=q+"px",N.style.width=Math.abs(P)+"px",N.style.height=Math.abs(U)+"px"}}),window.addEventListener("mouseup",B=>{if(!R)return;let P=!!N;N&&(N.remove(),N=null);let U=R;R=null,ht.map.dragging.enable();let W=y.getBoundingClientRect();if(P){let Q=ht.map.containerPointToLatLng([U.x-W.left,U.y-W.top]),X=ht.map.containerPointToLatLng([B.clientX-W.left,B.clientY-W.top]);ht.map.fitBounds([[Math.min(Q.lat,X.lat),Math.min(Q.lng,X.lng)],[Math.max(Q.lat,X.lat),Math.max(Q.lng,X.lng)]]);return}if(!(B.clientX>=W.left&&B.clientX<=W.right&&B.clientY>=W.top&&B.clientY<=W.bottom)||ht.rulerManager&&ht.rulerManager.isActive())return;let nt=ht.map.containerPointToLatLng([B.clientX-W.left,B.clientY-W.top]);ht.selectAtLatLng(nt,{context:!0,focusInspector:!1}).then(()=>ht.contextMenu.show({originalEvent:B}))})}if(NJt(ht,Dd,gk,M5e,d,F0,E5e),!ht.overlayLayer&&!Ty){let y=OKt(Dd,ht);ht.overlayLayer=new y(ht.websocketManager,{zIndex:ht.allLayers.length+5,opacity:1}),ht.overlayLayer.addTo(ht.map)}Z2t(h),_&&!s.shapes_ready&&X5e(),o3(),ht.booted=!0}catch(d){ht.scriptRunning||console.error("Failed to load initial data from server:",d)}});document.addEventListener("openroad-cone-sync",d=>{ht.schematicWidget?.syncCone(d.detail||{})});document.addEventListener("keydown",d=>{let s=d.target.tagName;if(s==="INPUT"||s==="TEXTAREA"||d.target.isContentEditable)return;let h=d.key.toLowerCase();h==="escape"&&ht.rulerManager&&ht.rulerManager.isActive()?ht.rulerManager.cancelRulerBuild():h==="escape"&&ht.labelManager&&ht.labelManager.isActive()?ht.labelManager.cancelLabelMode():h==="k"&&!d.shiftKey&&!d.ctrlKey&&!d.metaKey?ht.rulerManager&&ht.rulerManager.toggleRulerMode():h==="k"&&d.shiftKey&&!d.ctrlKey&&!d.metaKey?ht.rulerManager&&ht.rulerManager.clearAllRulers():h==="l"&&!d.shiftKey&&!d.ctrlKey&&!d.metaKey?ht.labelManager&&ht.labelManager.toggleLabelMode():h==="f"&&!d.ctrlKey&&!d.metaKey&&ht.fitBounds?ht.map.fitBounds(ht.fitBounds):h==="z"&&!d.shiftKey&&!d.ctrlKey&&ht.map?ht.lastMouseLatLng?ht.map.setZoomAround(ht.lastMouseLatLng,ht.map.getZoom()+1):ht.map.zoomIn():h==="z"&&d.shiftKey&&!d.ctrlKey&&ht.map?ht.lastMouseLatLng?ht.map.setZoomAround(ht.lastMouseLatLng,ht.map.getZoom()-1):ht.map.zoomOut():h==="f"&&(d.ctrlKey||d.metaKey)?(d.preventDefault(),ht.designScale&&ont(ht)):h==="g"&&d.shiftKey&&!d.ctrlKey&&!d.metaKey?(d.preventDefault(),ht.designScale&&cnt(ht)):h==="t"&&!d.shiftKey&&!d.ctrlKey&&!d.metaKey&&ht.toggleTheme()},!0);})(); + `,document.body.appendChild(this._overlay),this._breadcrumb=this._overlay.querySelector(".fb-breadcrumb"),this._fileList=this._overlay.querySelector(".fb-file-list"),this._pathInput=this._overlay.querySelector(".fb-path-input"),this._errorDiv=this._overlay.querySelector(".modal-error"),this._okBtn=this._overlay.querySelector(".ok"),this._cancelBtn=this._overlay.querySelector(".cancel"),this._listen(this._pathInput,"input",()=>this._updateOkState()),this._listen(this._pathInput,"keydown",s=>{if(s.key==="Enter"){let h=this._pathInput.value.trim();h.endsWith("/")?this._navigate(h.replace(/\/+$/,"")||"/"):this._submit()}else s.key==="Escape"&&this.close()}),this._listen(this._okBtn,"click",()=>this._submit()),this._listen(this._cancelBtn,"click",()=>this.close()),this._listen(this._overlay,"click",s=>{s.target===this._overlay&&this.close()}),this._navigate("")}close(){if(!this._closed){this._closed=!0;for(let s of this._disposers)s();this._disposers.length=0,this._overlay&&(this._overlay.remove(),this._overlay=null)}}_listen(s,h,p){s.addEventListener(h,p),this._disposers.push(()=>s.removeEventListener(h,p))}_updateOkState(){this._okBtn.disabled=!this._pathInput.value.trim()}_renderBreadcrumb(s){this._breadcrumb.innerHTML="";let h=s.split("/").filter(Boolean),p=document.createElement("span");p.className="fb-crumb",p.textContent="/",this._listen(p,"click",()=>this._navigate("/")),this._breadcrumb.appendChild(p);let m="";for(let _ of h){m+="/"+_;let E=document.createElement("span");E.className="fb-crumb-sep",E.textContent=" / ",this._breadcrumb.appendChild(E);let y=document.createElement("span");y.className="fb-crumb",y.textContent=_;let I=m;this._listen(y,"click",()=>this._navigate(I)),this._breadcrumb.appendChild(y)}}_renderEntries(s){if(this._fileList.innerHTML="",!s||s.length===0){let h=document.createElement("div");h.className="fb-empty",h.textContent="(empty directory)",this._fileList.appendChild(h);return}for(let h of s){let p=document.createElement("div");p.className="fb-entry",h.is_dir&&p.classList.add("fb-dir");let m=document.createElement("span");m.className="fb-icon",m.textContent=h.is_dir?"\u{1F4C1}":"\u{1F4C4}",p.appendChild(m);let _=document.createElement("span");_.className="fb-name",_.textContent=h.name,p.appendChild(_),h.is_dir?this._listen(p,"click",()=>this._navigate(this._currentPath+"/"+h.name)):(this._listen(p,"click",()=>{let E=this._fileList.querySelector(".fb-selected");E&&E.classList.remove("fb-selected"),p.classList.add("fb-selected"),this._pathInput.value=this._currentPath+"/"+h.name,this._updateOkState()}),this._listen(p,"dblclick",()=>{this._pathInput.value=this._currentPath+"/"+h.name,this._updateOkState(),this._submit()})),this._fileList.appendChild(p)}}async _navigate(s){this._errorDiv.style.display="none",this._fileList.innerHTML='
Loading...
';try{let h=await this._app.websocketManager.request({type:"list_dir",path:s||""});if(this._closed)return;this._currentPath=h.path,this._renderBreadcrumb(h.path),this._renderEntries(h.entries),this._pathInput.value="",this._updateOkState()}catch(h){if(this._closed)return;this._fileList.innerHTML="",this._errorDiv.textContent=h.message||String(h),this._errorDiv.style.display=""}}async _submit(){let s=this._pathInput.value.trim();if(s){this._okBtn.disabled=!0,this._okBtn.textContent="Loading...",this._errorDiv.style.display="none";try{let h=await this._app.websocketManager.request({type:"drc_load_report",path:s});if(this._closed)return;if(h.ok){let p=h.category;this.close(),this._onLoaded(p)}else this._errorDiv.textContent=h.error||"Failed to load report",this._errorDiv.style.display="",this._okBtn.disabled=!1,this._okBtn.textContent="Load"}catch(h){if(this._closed)return;this._errorDiv.textContent=h.message||"Request failed",this._errorDiv.style.display="",this._okBtn.disabled=!1,this._okBtn.textContent="Load"}}}};var h5e=` +\r[]{}`;var Snt=class{constructor(s,h){this._input=s,this._ws=h,this._popup=null,this._items=[],this._selectedIndex=-1,this._replaceStart=0,this._replaceEnd=0,this._debounceTimer=null,this._commandCache=null,this._history=[],this._historyIndex=-1,this._historyStash="",this._createPopup(),this._onInputBound=this._onInput.bind(this),this._onBlurBound=this._onBlur.bind(this),this._input.addEventListener("input",this._onInputBound),this._input.addEventListener("blur",this._onBlurBound)}_createPopup(){this._popup=document.createElement("div"),this._popup.className="tcl-complete-popup",this._popup.style.display="none",this._input.parentElement.appendChild(this._popup)}handleKeyDown(s){let h=this._popup.style.display!=="none";return s.key==="Tab"?(s.preventDefault(),h?this._tabAccept():this._tabComplete(this._input.value,this._input.selectionStart),!0):s.key==="Escape"?h?(this._hidePopup(),!0):!1:s.key==="ArrowDown"?h?(s.preventDefault(),this._selectItem(this._selectedIndex+1),!0):this._historyIndex>=0?(s.preventDefault(),this._historyIndex--,this._historyIndex<0?this._input.value=this._historyStash:this._input.value=this._history[this._historyIndex],!0):!1:s.key==="ArrowUp"?h?(s.preventDefault(),this._selectItem(this._selectedIndex-1),!0):this._historyIndex{let s=this._input.value,h=this._input.selectionStart,p=this._extractPrefix(s,h);p.length>=2||p.length>=1&&(p[0]==="$"||p[0]==="-")?this._requestCompletions(s,h):this._hidePopup()},100)}_onBlur(){setTimeout(()=>this._hidePopup(),150)}_extractPrefix(s,h){let p=h-1;for(;p>=0&&h5e.indexOf(s[p])===-1;)p--;return s.substring(p+1,h)}_fetchCompletions(s,h,p){let m=this._extractPrefix(s,h),_=m.length>0&&m[0]==="$",E=m.length>0&&m[0]==="-",y=!_&&!E,I=h-m.length,N=s.substring(0,I),B=/^[\s\[]*$/.test(N);if(y&&B&&this._commandCache){let P=m.toLowerCase(),U=this._commandCache.filter(j=>j.toLowerCase().startsWith(P));p(U,I,h);return}this._ws.request({type:"tcl_complete",line:s,cursor_pos:h}).then(P=>{P.mode==="commands"&&!this._commandCache&&m===""&&(this._commandCache=P.completions),P.mode==="commands"&&!this._commandCache&&this._ws.request({type:"tcl_complete",line:"",cursor_pos:0}).then(U=>{U.mode==="commands"&&(this._commandCache=U.completions)}).catch(()=>{}),p(P.completions,P.replace_start,P.replace_end)}).catch(()=>p([],0,0))}_requestCompletions(s,h){this._fetchCompletions(s,h,(p,m,_)=>{this._showPopup(p,m,_)})}_tabAccept(){if(this._items.length===0){this._hidePopup();return}if(this._items.length===1){this._selectedIndex=0,this._acceptCompletion();return}this._advanceToCommonPrefix()}_tabComplete(s,h){this._fetchCompletions(s,h,(p,m,_)=>{if(!p||p.length===0){this._hidePopup();return}if(p.length===1){this._items=p,this._replaceStart=m,this._replaceEnd=_,this._selectedIndex=0,this._acceptCompletion();return}this._items=p,this._replaceStart=m,this._replaceEnd=_,this._advanceToCommonPrefix(),this._showPopup(p,this._replaceStart,this._replaceEnd)})}_advanceToCommonPrefix(){if(this._items.length<2)return!1;let s=this._items[0];for(let E=1;E0;E++){let y=this._items[E],I=0;for(;I{let I=document.createElement("div");I.className="tcl-complete-item",I.textContent=E,I.addEventListener("mousedown",N=>{N.preventDefault(),this._selectedIndex=y,this._acceptCompletion()}),this._popup.appendChild(I)}),s.length>15){let E=document.createElement("div");E.className="tcl-complete-more",E.textContent=`... ${s.length-15} more`,this._popup.appendChild(E)}this._selectedIndex=0,this._highlightSelected(),this._popup.style.display="block"}_hidePopup(){this._popup.style.display="none",this._items=[],this._selectedIndex=-1}_selectItem(s){if(this._items.length===0)return;let h=Math.min(this._items.length,15)-1;this._selectedIndex=Math.max(0,Math.min(s,h)),this._highlightSelected()}_highlightSelected(){let s=this._popup.querySelectorAll(".tcl-complete-item");s.forEach((h,p)=>{h.classList.toggle("selected",p===this._selectedIndex)}),s[this._selectedIndex]&&s[this._selectedIndex].scrollIntoView&&s[this._selectedIndex].scrollIntoView({block:"nearest"})}_acceptCompletion(){if(this._selectedIndex<0||this._selectedIndex>=this._items.length){this._hidePopup();return}let s=this._items[this._selectedIndex],h=this._input.value.substring(0,this._replaceStart),p=this._input.value.substring(this._replaceEnd),_=!s.endsWith("/")&&!s.endsWith("::")&&(p.length===0||p[0]!==" ")?" ":"";this._input.value=h+s+_+p;let E=this._replaceStart+s.length+_.length;this._input.setSelectionRange(E,E),this._input.focus(),this._hidePopup()}};var dQt=[{key:"or_visibility",store:"cookie"},{key:"or_selectability",store:"cookie"},{key:"or_hidden_layers",store:"session"},{key:"or_nonselectable_layers",store:"session"},{key:"or_layer_patterns",store:"session"},{key:"or_hidden_chiplets",store:"cookie"},{key:"or_bg_color",store:"cookie"},{key:"or_show_dbu",store:"cookie"},{key:"or_theme",store:"theme"},{key:"or_use_true_z",store:"cookie"},{key:"or_ruler_style",store:"cookie"},{key:"or_wheel_zoom",store:"cookie"},{key:"or_arrow_step",store:"cookie"},{key:"or_font_family",store:"cookie"},{key:"or_font_scale",store:"cookie"}];function f5e(d,s){try{return window[d].getItem(s)}catch{return null}}function d5e(d,s,h){try{h===null?window[d].removeItem(s):window[d].setItem(s,h)}catch{}}function p5e({key:d,store:s}){return s==="session"?f5e("sessionStorage",d):qf(d)}function g5e({key:d,store:s},h){s==="session"?d5e("sessionStorage",d,h):s==="theme"?h===null?NJt():ont(h):h===null?snt(d):Rd(d,h)}function pQt(){let d={};for(let s of dQt){let h=p5e(s);h&&(d[s.key]=h)}return{version:1,entries:d}}function m5e(d){return typeof d=="string"&&d!==""&&!/[;\r\n]/.test(d)}function gQt(d){for(let s of dQt){let h=d[s.key];g5e(s,m5e(h)?h:null)}}function mQt(d,s=typeof document<"u"?document:null){let h="OpenROAD",p=d?`${h} - ${d}`:h;return s&&(s.title=p),p}var Zs=globalThis.THREE,bQt=2,b5e=.002,w5e=.9,v5e=1.1,_5e=.1,y5e=20,x5e=3,mk=2,wQt=2,M5e=10,E5e=1e4,S5e=.15,T5e=300,C5e=6,Tnt=Math.PI/180,vQt=[5025616,2201331,16750592,10233776,48340,16007990,2533018,7951688,15277667,4149685];function A5e(d){let s=new Array(d.length).fill(0),h=new Map;d.forEach((p,m)=>{let _=p.z;h.has(_)||h.set(_,[]),h.get(_).push({idx:m,chiplet:p})});for(let p of h.values()){if(p.length<=1)continue;let m=[];for(let{idx:_,chiplet:E}of p){let y=E.x,I=E.y,N=E.x+E.width,B=E.y+E.height,P=!1;for(let U=0;UyV.x1&&IV.y1)){m[U].push({x1:y,y1:I,x2:N,y2:B}),s[_]=U,P=!0;break}P||(m.push([{x1:y,y1:I,x2:N,y2:B}]),s[_]=m.length-1)}}return s}var Cnt=class{constructor(s,h){if(this._app=h,this._container=s,this._element=document.createElement("div"),this._element.className="three-d-viewer-widget",s.element.appendChild(this._element),!Zs){Sc(h)?this._showInfo("The 3D view is not available in saved reports."):this._showError("three.js is missing from the page."),this._destroyed=!0;return}this._canvasContainer=document.createElement("div"),this._canvasContainer.className="three-d-canvas-container",this._element.appendChild(this._canvasContainer),this._tooltip=document.createElement("div"),this._tooltip.className="or-tooltip",this._canvasContainer.appendChild(this._tooltip),this._optionsOverlay=this._createOptionsOverlay(),this._canvasContainer.appendChild(this._optionsOverlay),this._raycaster=new Zs.Raycaster,this._scene=new Zs.Scene,this._applyTheme(),this._themeObserver=new MutationObserver(()=>{this._applyTheme(),this.render()}),this._themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),this._camera=new Zs.PerspectiveCamera(45,1,10,1e5),this._camera.position.set(0,0,1e3);try{this._renderer=new Zs.WebGLRenderer({antialias:!0,preserveDrawingBuffer:!0})}catch(E){console.error("3D viewer: failed to create WebGL context:",E),this._showWebGLUnavailable(E),this._themeObserver&&(this._themeObserver.disconnect(),this._themeObserver=null),this._destroyed=!0;return}this._renderer.setPixelRatio(window.devicePixelRatio),this._renderer.setSize(s.width,s.height),this._canvasContainer.appendChild(this._renderer.domElement),this._rotation=new Zs.Quaternion,this._distance=1e3,this._panX=0,this._panY=0,this._boundingRadius=1,this._sceneCenter=new Zs.Vector3,this._mouseDown=!1,this._mouseButton=-1,this._lastMousePos={x:0,y:0},this._setupMouseHandlers();let p=new Zs.AmbientLight(16777215,.5);this._scene.add(p);let m=new Zs.DirectionalLight(16777215,.8);m.position.set(1,1,1).normalize(),this._scene.add(m);let _=new Zs.DirectionalLight(16777215,.3);_.position.set(-1,-.5,.5).normalize(),this._scene.add(_),s.on("resize",this.onResize.bind(this)),s.on("open",this.onOpen.bind(this)),s.on("destroy",this.onDestroy.bind(this)),this._designGroup=new Zs.Group,this._scene.add(this._designGroup),this._chipletMeshes=[],this._loading=!1,this._destroyed=!1,this._edgeMaterial=null}_setupMouseHandlers(){let s=this._renderer.domElement;s.addEventListener("mousedown",h=>{this._mouseDown=!0,this._mouseButton=h.button,this._lastMousePos.x=h.clientX,this._lastMousePos.y=h.clientY,s.focus(),h.preventDefault()}),s.addEventListener("contextmenu",h=>h.preventDefault()),this._onMouseMove=h=>{if(!this._mouseDown)return;let p=h.clientX-this._lastMousePos.x,m=h.clientY-this._lastMousePos.y;this._lastMousePos.x=h.clientX,this._lastMousePos.y=h.clientY,!(p===0&&m===0)&&(this._mouseButton===0?this._handleRotate(p,m):this._mouseButton===2&&this._handlePan(p,m),this._updateCamera())},this._onMouseUp=h=>{this._mouseDown&&h.button===this._mouseButton&&(this._mouseDown=!1,this._mouseButton=-1)},window.addEventListener("mousemove",this._onMouseMove),window.addEventListener("mouseup",this._onMouseUp),s.addEventListener("wheel",h=>{h.preventDefault(),h.deltaY<0?this._distance*=w5e:this._distance*=v5e;let p=Math.max(this._boundingRadius*_5e,1),m=Math.max(this._boundingRadius*y5e,p);this._distance=Math.max(p,Math.min(m,this._distance)),this._updateCamera()},{passive:!1}),s.tabIndex=0,s.style.outline="none",s.addEventListener("keydown",h=>{h.key.toLowerCase()==="f"&&this.resetCamera()}),s.addEventListener("dblclick",h=>{h.preventDefault();let p=this._pickDrcMarkerId(h);if(p!=null&&this._app.drcWidget){this._app.drcWidget.highlightMarkerById(p,!0);return}this.resetCamera()}),s.addEventListener("mousemove",h=>{if(this._mouseDown){this._hideTooltip();return}this._updateTooltip(h)}),s.addEventListener("mouseleave",()=>{this._hideTooltip()})}_createOptionsOverlay(){let s=document.createElement("div");s.className="three-d-options";let h=document.createElement("label");h.title="Render chiplets at their true Z (disable stacking offset for overlapping chiplets at same Z).";let p=document.createElement("input");p.type="checkbox",p.checked=!!this._app.useTrueZ,p.addEventListener("change",()=>{this._app.useTrueZ=p.checked,Rd("or_use_true_z",p.checked?"1":"0"),this._app.syncDisplayState(),this.refreshSceneForOptions()}),h.appendChild(p),h.appendChild(document.createTextNode("True Z (no stacking)")),s.appendChild(h);let m=document.createElement("div");m.style.cssText="margin-top:4px; display:flex; gap:4px;";let _=document.createElement("button");_.className="or-btn or-btn-sm",_.textContent="Save PNG",_.title="Save the 3D view as a PNG image (2x resolution)",_.addEventListener("click",()=>this._exportPng(2));let E=document.createElement("button");return E.className="or-btn or-btn-sm",E.textContent="Copy",E.title="Copy the 3D view image to the clipboard",E.addEventListener("click",()=>this._copyImage(2)),m.appendChild(_),m.appendChild(E),s.appendChild(m),s}_capturePng(s=2){if(!this._renderer)return null;let h=this._renderer,p=h.domElement.clientWidth||h.domElement.width,m=h.domElement.clientHeight||h.domElement.height,_=h.getPixelRatio();try{return h.setPixelRatio(_*s),h.setSize(p,m,!1),this.render(),h.domElement.toDataURL("image/png")}finally{h.setPixelRatio(_),h.setSize(p,m,!1),this.render()}}_exportPng(s=2){let h=this._capturePng(s);h&&dk(h,"3d-view.png")}async _copyImage(s=2){let h=this._capturePng(s);h&&await cnt(h)}_setRaycasterFromEvent(s){let p=this._renderer.domElement.getBoundingClientRect(),m=new Zs.Vector2((s.clientX-p.left)/p.width*2-1,-((s.clientY-p.top)/p.height*2-1));this._raycaster.setFromCamera(m,this._camera)}_updateTooltip(s){if(!this._chipletMeshes.length){this._hideTooltip();return}this._setRaycasterFromEvent(s);let h=this._chipletMeshes.map(y=>y.mesh),p=this._raycaster.intersectObjects(h,!1);if(p.length===0){this._hideTooltip();return}let m=p[0].object,_=this._chipletMeshes.find(y=>y.mesh===m);if(!_){this._hideTooltip();return}this._tooltip.textContent=_.data.name,this._tooltip.style.display="block";let E=this._canvasContainer.getBoundingClientRect();this._tooltip.style.left=s.clientX-E.left+12+"px",this._tooltip.style.top=s.clientY-E.top+12+"px"}_hideTooltip(){this._tooltip&&(this._tooltip.style.display="none")}_pickDrcMarkerId(s){if(!this._drcHitboxMesh||!this._drcHitboxMarkerIds)return null;this._setRaycasterFromEvent(s);let h=this._raycaster.intersectObject(this._drcHitboxMesh,!1);if(h.length===0)return null;let p=h[0].instanceId;return p==null?null:this._drcHitboxMarkerIds[p]??null}_handleRotate(s,h){let p=Math.sqrt(s*s+h*h);if(p<.001)return;let m=new Zs.Vector3(h/p,s/p,0),_=p/bQt,y=new Zs.Quaternion().setFromAxisAngle(m,_*Tnt).clone().multiply(this._rotation);if(new Zs.Vector3(0,0,1).applyQuaternion(y).z>=0)this._rotation.copy(y);else{let N=new Zs.Vector3(0,1,0),B=s/bQt*Tnt,U=new Zs.Quaternion().setFromAxisAngle(N,B).clone().multiply(this._rotation);new Zs.Vector3(0,0,1).applyQuaternion(U).z>=0&&this._rotation.copy(U)}}_handlePan(s,h){let p=this._distance*b5e;this._panX+=s*p,this._panY-=h*p}_updateCamera(){let s=Math.max(this._boundingRadius,1e3),h=Math.max(this._distance-s*wQt,M5e),p=this._distance+s*wQt;p0;){let s=this._designGroup.children[0];this._designGroup.remove(s),s.geometry&&s.geometry.dispose(),s.material&&!s.material._shared&&s.material.dispose()}this._edgeMaterial&&(this._edgeMaterial.dispose(),this._edgeMaterial=null),this._onMouseMove&&(window.removeEventListener("mousemove",this._onMouseMove),this._onMouseMove=null),this._onMouseUp&&(window.removeEventListener("mouseup",this._onMouseUp),this._onMouseUp=null),this._renderer&&(this._renderer.dispose(),this._renderer=null),this._app.threeDViewerWidget===this&&(this._app.threeDViewerWidget=null)}}_setInitialCameraState(){this._distance=this._boundingRadius*x5e;let s=new Zs.Quaternion().setFromAxisAngle(new Zs.Vector3(1,0,0),-45*Tnt),h=new Zs.Quaternion().setFromAxisAngle(new Zs.Vector3(0,0,1),45*Tnt);this._rotation=s.multiply(h),this._panX=0,this._panY=0}resetCamera(){this._sceneBounds&&(this._setInitialCameraState(),this._updateCamera())}onResize(){if(this._destroyed)return;let s=this._canvasContainer.getBoundingClientRect(),h=s.width,p=s.height;h===0||p===0||(this._camera.aspect=h/p,this._camera.updateProjectionMatrix(),this._renderer.setSize(h,p),this.render())}render(){this._destroyed||this._renderer&&this._scene&&this._camera&&this._renderer.render(this._scene,this._camera)}_applyTheme(){let h=fk().bgMap||"#000000";this._scene.background=new Zs.Color(h)}async loadData(){if(!(this._loading||this._destroyed)){this._loading=!0;for(let s of[".three-d-error",".three-d-info"]){let h=this._element.querySelector(s);h&&h.remove()}try{await this._app.websocketManager.readyPromise;let s=await this._app.websocketManager.request({type:"get_3d_data"});if(this._destroyed)return;if(s&&s.error){this._showError(s.error);return}if(s&&s.info){this._showInfo(s.info);return}this.buildScene(s)}catch(s){if(this._destroyed)return;console.error("Failed to load 3D data:",s),this._showError(s.message||String(s))}finally{this._loading=!1}}}_showOverlay(s,h,p){let m=document.createElement("div");m.className=s,m.style.cssText="position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-family:monospace;text-align:center;",m.style.color=p,m.textContent=h,this._element.appendChild(m)}_showError(s){this._showOverlay("three-d-error","Failed to load 3D data: "+s,"var(--error)")}_showInfo(s){this._showOverlay("three-d-info",s,"var(--fg-muted, #888)")}_showWebGLUnavailable(s){let h=document.createElement("div");h.className="three-d-error",h.style.cssText="position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-family:monospace;text-align:center;max-width:80%;color:var(--error);";let p=s&&s.message?s.message:String(s||"");h.innerHTML='
3D viewer unavailable: WebGL context could not be created.
In Chrome, open chrome://flags/#ignore-gpu-blocklist and set Override software rendering list to Enabled, then relaunch the browser.
Otherwise enable hardware acceleration or try a different browser. See chrome://gpu for details.
'+(p?'
'+p+"
":""),this._element.appendChild(h)}buildScene(s){if(this._destroyed||(this._lastSceneData=s,this._clearScene(),!s||!s.chiplets||s.chiplets.length===0))return;let h=this._app.getDbuPerMicron(),p=this._buildChiplets(s.chiplets,h);p.minX!==1/0&&(this._buildGrid(p),this._setSceneBoundsAndCenter(p),this._setInitialCameraState(),this._updateCamera())}_clearScene(){for(this._chipletMeshes=[];this._designGroup.children.length>0;){let s=this._designGroup.children[0];this._designGroup.remove(s),s.geometry&&s.geometry.dispose(),s.material&&!s.material._shared&&s.material.dispose()}this._hideTooltip()}_buildChiplets(s,h){let p={minX:1/0,minY:1/0,minZ:1/0,maxX:-1/0,maxY:-1/0,maxZ:-1/0};this._edgeMaterial||(this._edgeMaterial=new Zs.LineBasicMaterial({color:0,linewidth:1}),this._edgeMaterial._shared=!0);let m=this._app.useTrueZ?new Array(s.length).fill(0):A5e(s);return s.forEach((_,E)=>{let y=_.width/h,I=_.height/h,N=_.thickness/h*mk,B=vQt[E%vQt.length],P=new Zs.MeshPhongMaterial({color:B,transparent:!1,opacity:1,side:Zs.DoubleSide,shininess:40}),U=new Zs.BoxGeometry(y,I,N),j=new Zs.Mesh(U,P),V=_.x/h+y/2,tt=_.y/h+I/2,Q=N*S5e,X=_.z/h*mk+N/2+m[E]*(N+Q);j.position.set(V,tt,X),this._designGroup.add(j),this._chipletMeshes.push({mesh:j,data:_,color:B});let gt=new Zs.EdgesGeometry(U),ft=new Zs.LineSegments(gt,this._edgeMaterial);ft.position.set(V,tt,X),this._designGroup.add(ft),p.minX=Math.min(p.minX,_.x/h),p.minY=Math.min(p.minY,_.y/h),p.minZ=Math.min(p.minZ,X-N/2),p.maxX=Math.max(p.maxX,_.x/h+y),p.maxY=Math.max(p.maxY,_.y/h+I),p.maxZ=Math.max(p.maxZ,X+N/2)}),p}_buildGrid(s){let h=s.maxX-s.minX,p=s.maxY-s.minY,m=Math.max(h,p)*1.4,_=10,E=new Zs.GridHelper(m,_,8947848,4473924);E.rotation.x=Math.PI/2,E.position.set((s.minX+s.maxX)/2,(s.minY+s.maxY)/2,s.minZ-1),this._designGroup.add(E)}_setSceneBoundsAndCenter(s){this._sceneBounds=s;let h=s.maxX-s.minX,p=s.maxY-s.minY,m=s.maxZ-s.minZ;this._boundingRadius=Math.sqrt(h*h+p*p+m*m)/2,this._sceneCenter.set((s.minX+s.maxX)/2,(s.minY+s.maxY)/2,(s.minZ+s.maxZ)/2)}_stackOffsetForPoint(s,h,p,m){for(let{mesh:_,data:E}of this._chipletMeshes){if(s!==E.z||hE.x+E.width||pE.y+E.height)continue;let y=E.thickness/m*mk,I=E.z/m*mk+y/2;return _.position.z-I}return 0}clearHighlightDRC(){this._drcBlinkInterval&&(clearInterval(this._drcBlinkInterval),this._drcBlinkInterval=null),this._drcMeshGroup&&(this._scene.remove(this._drcMeshGroup),this._drcMeshGroup.children.forEach(s=>{s.geometry&&s.geometry.dispose()}),this._drcMaterial&&(this._drcMaterial.dispose(),this._drcMaterial=null),this._drcHitboxMaterial&&(this._drcHitboxMaterial.dispose(),this._drcHitboxMaterial=null),this._drcHitboxMesh=null,this._drcHitboxMarkerIds=null,this._drcMeshGroup=null,this.render())}highlightDRC(s){if(this._destroyed||(this.clearHighlightDRC(),!s||s.length===0))return;let h=this._app.getDbuPerMicron(),p=0,m=1e4/h*mk;this._sceneBounds&&this._sceneBounds.minZ!==1/0&&(p=this._sceneBounds.minZ,m=this._sceneBounds.maxZ),p-=1,m+=1;let _=Math.max(m-p,1);this._drcMeshGroup=new Zs.Group,this._drcMaterial=new Zs.LineBasicMaterial({color:16776960,transparent:!0,opacity:1,depthTest:!1,depthWrite:!1}),this._drcHitboxMaterial=new Zs.MeshBasicMaterial({transparent:!0,opacity:0,depthWrite:!1});let E=[];for(let N of s){let B=N.rects&&N.rects.length>0?N.rects:[N.bbox];for(let P of B){let[U,j,V,tt,Q,X]=P,gt=Math.max((V-U)/h,.001),ft=Math.max((tt-j)/h,.001),xt=p,Bt=_,Ot=0;if(P.length>=6&&Q!==void 0&&X!==void 0){xt=Q/h*mk;let Lt=X/h*mk;Bt=Math.max(Lt-xt,.001),Ot=this._stackOffsetForPoint(Q,(U+V)/2,(j+tt)/2,h)}let Pt=U/h+gt/2,se=j/h+ft/2,ot=xt+Bt/2+Ot;E.push({cx:Pt,cy:se,cz:ot,width:gt,height:ft,depth:Bt,markerId:N.id})}}if(E.length>0){let N=new Zs.BoxGeometry(1,1,1);this._drcHitboxMesh=new Zs.InstancedMesh(N,this._drcHitboxMaterial,E.length),this._drcHitboxMarkerIds=new Array(E.length);let B=new Zs.Matrix4,P=new Zs.Vector3,U=new Zs.Vector3,j=new Zs.Quaternion;E.forEach((V,tt)=>{U.set(V.cx,V.cy,V.cz),P.set(V.width,V.height,V.depth),B.compose(U,j,P),this._drcHitboxMesh.setMatrixAt(tt,B),this._drcHitboxMarkerIds[tt]=V.markerId;let Q=new Zs.BoxGeometry(V.width,V.height,V.depth),X=new Zs.EdgesGeometry(Q);Q.dispose();let gt=new Zs.LineSegments(X,this._drcMaterial);gt.position.set(V.cx,V.cy,V.cz),gt.renderOrder=999,this._drcMeshGroup.add(gt)}),this._drcHitboxMesh.instanceMatrix.needsUpdate=!0,this._drcMeshGroup.add(this._drcHitboxMesh)}this._drcMeshGroup.renderOrder=999,this._scene.add(this._drcMeshGroup),this.render();let y=!0,I=0;this._drcBlinkInterval=setInterval(()=>{if(!(!this._drcMeshGroup||!this._drcMaterial)){if(I+=1,I>=C5e){this._drcMaterial.opacity=1,this.render(),clearInterval(this._drcBlinkInterval),this._drcBlinkInterval=null;return}y=!y,this._drcMaterial.opacity=y?1:.2,this.render()}},T5e)}refreshSceneForOptions(){this._destroyed||this._lastSceneData&&(this.clearHighlightDRC(),this.buildScene(this._lastSceneData))}};var k5e=[{name:"green",hex:"#00ff00"},{name:"yellow",hex:"#ffff00"},{name:"cyan",hex:"#00ffff"},{name:"magenta",hex:"#ff00ff"},{name:"red",hex:"#ff0000"},{name:"dark_green",hex:"#008000"},{name:"dark_magenta",hex:"#800080"},{name:"blue",hex:"#0000ff"},{name:"orange",hex:"#ffa500"},{name:"purple",hex:"#800080"},{name:"lime",hex:"#bfff00"},{name:"teal",hex:"#008080"},{name:"pink",hex:"#ffc0cb"},{name:"brown",hex:"#8b4513"},{name:"indigo",hex:"#4b0082"},{name:"turquoise",hex:"#40e0d0"}],L5e=[{label:"Connected Insts",suffix:"connected_insts",needsNet:!0},{label:"Output Nets",suffix:"connected_nets",args:{output:!0,input:!1}},{label:"Input Nets",suffix:"connected_nets",args:{output:!1,input:!0}},{label:"All Nets",suffix:"connected_nets",args:{output:!0,input:!0}},{label:"All buffer trees",suffix:"connected_buffer_trees"},{label:"All buffer trees (incl. inverters)",suffix:"connected_buffer_trees",args:{include_inverters:!0}}],Ant=class{constructor(s){this._app=s,this._el=document.createElement("div"),this._el.className="context-menu",this._el.style.display="none",this._el.style.zIndex="10000",document.body.appendChild(this._el),this._bindEvents()}_bindEvents(){document.addEventListener("mousedown",s=>{this._el.contains(s.target)||this.hide()}),this._app.map&&this._app.map.on("movestart",()=>this.hide())}show(s){this._el.innerHTML="";let h=!!this._app.selHasInst,p=!!this._app.selHasNet,m=!(h||p),_=j=>L5e.map(V=>({label:V.label,disabled:V.needsNet?!p:!h,...j(V.suffix,V.args||{})})),E=[{label:"Select",disabled:m,subMenu:_((j,V)=>({action:()=>this._sendContextAction("select_"+j,V)}))},{label:"Highlight",disabled:m,subMenu:_((j,V)=>({subMenu:this._buildColorSubmenu("highlight_"+j,V)}))},{label:"Save",subMenu:[{label:"Visible layout",action:()=>this._app.captureLayout?.({entire:!1})},{label:"Entire layout",action:()=>this._app.captureLayout?.({entire:!0})}]},{label:"Clear",subMenu:[{label:"Selections",action:()=>this._sendContextAction("clear_selections")},{label:"Highlights",action:()=>this._sendContextAction("clear_highlights")},{label:"Rulers",action:()=>{this._app.rulerManager?.clearAllRulers()}},{label:"Focus nets",action:()=>this._sendContextAction("clear_focus_nets")},{label:"Route Guides",action:()=>this._sendContextAction("clear_route_guides")},{label:"All",action:()=>{this._sendContextAction("clear_all"),this._app.rulerManager?.clearAllRulers()}}]}];this._buildMenu(E,this._el),this._el.style.display="block";let y=4,I=this._el.getBoundingClientRect(),N=window.innerWidth-I.width-y,B=window.innerHeight-I.height-y,P=Math.max(y,Math.min(s.originalEvent.clientX,N)),U=Math.max(y,Math.min(s.originalEvent.clientY,B));this._el.style.left=P+"px",this._el.style.top=U+"px"}hide(){this._el.style.display="none"}_buildColorSubmenu(s,h={}){return k5e.map(({name:p,hex:m},_)=>({label:p,swatch:m,action:()=>this._sendContextAction(s,{...h,group:_})}))}_buildMenu(s,h){s.forEach(p=>{let m=document.createElement("div");if(m.className="cm-item",p.swatch){let _=document.createElement("span");_.className="cm-swatch",_.style.background=p.swatch,m.appendChild(_)}if(m.appendChild(document.createTextNode(p.label)),p.disabled){m.classList.add("disabled"),p.subMenu&&m.classList.add("has-submenu"),h.appendChild(m);return}if(p.subMenu){m.classList.add("has-submenu");let _=document.createElement("div");_.className="cm-submenu",this._buildMenu(p.subMenu,_),m.appendChild(_),m.addEventListener("mouseenter",()=>{_.classList.remove("flip-left"),_.getBoundingClientRect().right>window.innerWidth&&_.classList.add("flip-left")})}else p.action&&m.addEventListener("click",_=>{_.stopPropagation(),this.hide();try{p.action()}catch(E){console.error("Context menu item action threw:",p.label,E)}});h.appendChild(m)})}_sendContextAction(s,h={}){this._app.websocketManager&&this._app.websocketManager.request({type:"context_action",action:s,...h}).then(p=>{mR(this._app,p),p&&p.connected_count===0&&nv('Nothing connected \u2014 select an instance (or a net for "Connected Insts") first.'),this._syncAfterAction(s)}).catch(p=>{console.error("Context action failed:",s,p)})}_syncAfterAction(s){let h=this._app;(s==="clear_focus_nets"||s==="clear_route_guides"||s==="clear_all")&&typeof h.redrawAllLayers=="function"&&h.redrawAllLayers(),s==="clear_selections"||s==="clear_all"?(h.updateInspector?.(null),h.stopSelectionAnimation?.(),h.highlightRect&&h.map&&(h.map.removeLayer(h.highlightRect),h.highlightRect=null),h.lastSelectionBounds=null):h.refreshInspector?.(),h.refreshOverlay?.()}};function _Qt(d,s){if(!d)return;let h=URL.createObjectURL(d),p=document.createElement("a");p.href=h,p.download=s,p.style.display="none",document.body.appendChild(p),p.click(),document.body.removeChild(p),setTimeout(()=>URL.revokeObjectURL(h),0)}function xQt(d){return d.options&&d.options.opacity!=null?d.options.opacity:1}function MQt(d,s,h){if(!s||s.tagName==="IMG"&&(!s.complete||!s.naturalWidth))return;let p=s.getBoundingClientRect();if(!(p.width<=0||p.height<=0))try{d.drawImage(s,p.left-h.left,p.top-h.top,p.width,p.height)}catch{}}function P5e(d,s,h){let p=[];d.map.eachLayer(m=>{m instanceof L.GridLayer&&m._tiles&&p.push(m)}),p.sort((m,_)=>(m.options&&m.options.zIndex||0)-(_.options&&_.options.zIndex||0));for(let m of p){let _=xQt(m);if(!(_<=0)){s.globalAlpha=_;for(let E of Object.keys(m._tiles)){let y=m._tiles[E];!y||!y.current||MQt(s,y.el,h)}}}s.globalAlpha=1}function I5e(d,s,h){let p=d.map.getContainer().querySelectorAll(".leaflet-pane svg"),m=[];return p.forEach(_=>{let E=_.getBoundingClientRect();if(E.width<=0||E.height<=0)return;let y=_.cloneNode(!0);y.setAttribute("width",E.width),y.setAttribute("height",E.height);let I=new XMLSerializer().serializeToString(y),N="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(I);m.push(new Promise(B=>{let P=new Image;P.onload=()=>{try{s.drawImage(P,E.left-h.left,E.top-h.top,E.width,E.height)}catch{}B()},P.onerror=()=>B(),P.src=N}))}),Promise.all(m)}function R5e(d,s,h){d.map.getContainer().querySelectorAll(".leaflet-pane .ruler-label").forEach(m=>{let _=m.getBoundingClientRect();if(_.width<=0||_.height<=0)return;let E=m.textContent;if(!E)return;let y=getComputedStyle(m),I=_.left-h.left,N=_.top-h.top;s.save(),s.fillStyle=y.backgroundColor||"rgba(0, 0, 0, 0.75)";let B=Math.min(parseFloat(y.borderTopLeftRadius)||0,_.height/2);B>0&&typeof s.roundRect=="function"?(s.beginPath(),s.roundRect(I,N,_.width,_.height,B),s.fill()):s.fillRect(I,N,_.width,_.height),s.fillStyle=y.color||"#eee",s.font=y.font||`${y.fontSize||"12px"} ${y.fontFamily||"monospace"}`,s.textAlign="left",s.textBaseline="middle",s.fillText(E,I+(parseFloat(y.paddingLeft)||0),N+_.height/2),s.restore()})}function D5e(d){let s=0;return d.map.eachLayer(h=>{if(!(!(h instanceof L.GridLayer)||!h._tiles)){h._loading&&s++;for(let p of Object.keys(h._tiles)){let m=h._tiles[p],_=m&&m.el;m&&m.current&&_&&_.tagName==="IMG"&&(!_.complete||!_.naturalWidth)&&s++}}}),s}function N5e(d,s=6e3,h=32){return new Promise(p=>{let m=Date.now()+s,_=0,E=()=>{if(D5e(d)===0){if(++_>=2){p();return}}else _=0;if(Date.now()>=m){p();return}setTimeout(E,h)};setTimeout(E,h)})}function O5e(d,s,h){d.map.eachLayer(p=>{if(!(p instanceof L.ImageOverlay))return;let m=xQt(p);m<=0||(s.globalAlpha=m,MQt(s,p._image,h),s.globalAlpha=1)})}async function yQt(d){let s=d.map.getContainer(),h=s.getBoundingClientRect(),p=Math.max(1,Math.round(h.width)),m=Math.max(1,Math.round(h.height)),_=document.createElement("canvas");_.width=p,_.height=m;let E=_.getContext("2d"),y=getComputedStyle(s).backgroundColor;return E.fillStyle=y&&y!=="transparent"&&y!=="rgba(0, 0, 0, 0)"?y:"#000",E.fillRect(0,0,p,m),P5e(d,E,h),O5e(d,E,h),await I5e(d,E,h),R5e(d,E,h),new Promise(I=>_.toBlob(I,"image/png"))}async function EQt(d,{entire:s=!1}={}){if(!d.map)return;if(!s||!d.fitBounds){_Qt(await yQt(d),"layout_visible.png");return}let h=d.map.getCenter(),p=d.map.getZoom();try{d.map.fitBounds(d.fitBounds,{animate:!1}),await N5e(d),_Qt(await yQt(d),"layout_entire.png")}finally{d.map.setView(h,p,{animate:!1})}}var bk=document.getElementById("websocket-status"),ZU=null,B5e=2e3,F5e=20;function ixt(){let d=ht.websocketManager&&ht.websocketManager.isConnected,s=ht.websocketManager?ht.websocketManager.pendingCount:0;if(d)ZU&&(clearTimeout(ZU),ZU=null),s>F5e?(bk.innerHTML=`
pending: ${s}
`,bk.style.display="block"):bk.style.display="none";else{if(ht.websocketManager?._shutdown)return;ZU||(ZU=setTimeout(()=>{ht.websocketManager?.isConnected||(bk.innerHTML='
\u26A0 OpenROAD disconnected \u2014 retrying\u2026
',bk.style.display="block")},B5e))}U5e(s)}function U5e(d){let s=ht.tileProgressEl;s&&(s.classList.toggle("active",d>0),s.title=d>0?`${d} tile requests pending`:"")}function z5e(d){if(!d)return"";try{return decodeURIComponent(d)}catch{return""}}var ht={map:null,fitBounds:null,lastSelectionBounds:null,selHasInst:!1,selHasNet:!1,displayControlsEl:null,allLayers:[],designScale:null,designMaxDXDY:null,designOriginX:0,designOriginY:0,websocketManager:null,goldenLayout:null,hasLiberty:!1,techData:null,inspectorEl:null,tclOutputEl:null,highlightRect:null,hoverHighlightLayer:null,hoverHighlightPane:"hover-highlight-pane",modulesLayer:null,pinsLayer:null,overlayLayers:[],hierarchyBrowser:null,focusNets:new Set,routeGuideNets:new Set,visibleLayers:new Set,visibleLayerNames:new Set,visibleChiplets:null,layerPatterns:{},useTrueZ:qf("or_use_true_z")==="1",showDbu:qf("or_show_dbu")==="1",rulerStyle:qf("or_ruler_style")==="manhattan"?"manhattan":"euclidian",wheelZoom:qf("or_wheel_zoom")!=="0",arrowStep:bR(qf("or_arrow_step")),fontFamily:z5e(qf("or_font_family")),fontScale:$U(qf("or_font_scale")),polyDecomp:!1,labelManager:null,selectableLayers:new Set,heatMapData:null,activeHeatMap:"",heatMapLayer:null,heatMapLegendEl:null,renderHeatMapControls:null,rulerManager:null,selectionToken:0,selectionResetters:[],getDbuPerMicron(){return this.techData?.dbu_per_micron||1e3},unitOpts(){return{showDbu:this.showDbu,dbuPerMicron:this.getDbuPerMicron()}},formatDbu(d,s=!1){return cJt(d,this.unitOpts(),s)},parseDbu(d){return aJt(d,this.unitOpts())},formatDistance(d){return uJt(d,this.unitOpts())},unitLabel(){return lJt(this.unitOpts())}},Dd={stdcells:!0,macros:!0,pad_input:!0,pad_output:!0,pad_inout:!0,pad_power:!0,pad_spacer:!0,pad_areaio:!0,pad_other:!0,phys_fill:!1,phys_endcap:!0,phys_welltap:!0,phys_tie:!0,phys_antenna:!0,phys_cover:!0,phys_bump:!0,phys_other:!0,std_bufinv:!0,std_bufinv_timing:!0,std_clock_bufinv:!0,std_clock_gate:!0,std_level_shift:!0,std_sequential:!0,std_combinational:!0,net_signal:!0,net_power:!0,net_ground:!0,net_clock:!0,net_reset:!0,net_tieoff:!0,net_scan:!0,net_analog:!0,inst_names:!0,inst_pins:!0,inst_pin_names:!1,routing:!0,routing_segments:!0,routing_vias:!0,special_nets:!0,srouting_segments:!0,srouting_vias:!0,pins:!0,pin_names:!0,access_points:!1,regions:!0,mfg_grid:!1,gcell_grid:!1,flywires_only:!1,blockages:!0,placement_blockages:!0,routing_obstructions:!0,fills:!1,rows:!1,tracks_pref:!1,tracks_non_pref:!1,module_view:!1,detailed:!1,rulers:!0,labels:!0,scale_bar:!0,focused_nets_guides:!1,highlight_selected:!0,debug:!1};try{let d=qf("or_visibility");if(d){let s=JSON.parse(decodeURIComponent(d));for(let[h,p]of Object.entries(s))Dd[h]=!!p}}catch{}var wk={stdcells:!0,macros:!0,pad_input:!0,pad_output:!0,pad_inout:!0,pad_power:!0,pad_spacer:!0,pad_areaio:!0,pad_other:!0,phys_fill:!0,phys_endcap:!0,phys_welltap:!0,phys_tie:!0,phys_antenna:!0,phys_cover:!0,phys_bump:!0,phys_other:!0,std_bufinv:!0,std_bufinv_timing:!0,std_clock_bufinv:!0,std_clock_gate:!0,std_level_shift:!0,std_sequential:!0,std_combinational:!0,net_signal:!0,net_power:!0,net_ground:!0,net_clock:!0,net_reset:!0,net_tieoff:!0,net_scan:!0,net_analog:!0,pins:!0,inst_pins:!0,placement_blockages:!0,routing_obstructions:!0};ht.visibility=Dd;ht.selectability=wk;try{let d=qf("or_selectability");if(d){let s=JSON.parse(decodeURIComponent(d));for(let[h,p]of Object.entries(s))wk[h]=!!p}}catch{}var j5e=wJt(Dd,ht.visibleLayerNames,wk,ht.selectableLayers,ht);(function(){let s=null;try{s=new URLSearchParams(window.location.search)}catch{s=null}let h=_=>s?s.get(_):null;ht.mergeTiles=h("mergetiles")!=="0";let p=Number(h("tilebudget"));Number.isFinite(p)&&p>0&&(ht.tileBudgetBytes=Math.round(p*1024*1024));let m=Number(h("mergegroups"));Number.isFinite(m)&&m>0&&(ht.mergeGroupCount=Math.floor(m)),ht.tileDpr=uk,ht.MergedTileLayer=AJt({visibility:Dd,selectability:wk,visibleLayers:ht.visibleLayerNames,selectableLayers:ht.selectableLayers,app:ht},{dpr:uk})})();var H5e=L.GridLayer.extend({initialize:function(d,s,h){this._websocketManager=d,this._appState=s,L.GridLayer.prototype.initialize.call(this,sk(h))},_clampZoom:function(d){return L.GridLayer.prototype._clampZoom.call(this,gR(this,d))},createTile:function(d,s){let h=document.createElement("img");h.alt="",h.setAttribute("role","presentation"),h._tileDone=!1,h.onload=()=>{h.src&&h.src.startsWith("blob:")&&URL.revokeObjectURL(h.src),h._tileDone||(h._tileDone=!0,s(null,h))},h.onerror=()=>{h._tileDone||(h._tileDone=!0,s(new Error("heat map tile load error"),h))};let p=this._appState.activeHeatMap;return p?(this._websocketManager.request({type:"heatmap_tile",name:p,z:d.z,x:d.x,y:d.y,...pR(uk(),this.getTileSize().x)}).then(m=>{h.src=m?URL.createObjectURL(m):c3}).catch(()=>{h.src=c3}),h):(h.src=c3,h)},refreshTiles:function(){if(this._map)for(let d in this._tiles){let s=this._tiles[d];if(!s||!s.el)continue;let h=s.el,p=s.coords,m=this._appState.activeHeatMap;if(!m){h.src&&h.src.startsWith("blob:")&&URL.revokeObjectURL(h.src),h.src=c3;continue}this._websocketManager.request({type:"heatmap_tile",name:m,z:p.z,x:p.x,y:p.y,...pR(uk(),this.getTileSize().x)}).then(_=>{h.src&&h.src.startsWith("blob:")&&URL.revokeObjectURL(h.src),h.src=_?URL.createObjectURL(_):c3}).catch(()=>{h.src=c3})}}});function sxt(d){ht.heatMapData=d,ht.activeHeatMap=d.active||"",ht.heatMapLayer&&(ht.activeHeatMap?ht.map.hasLayer(ht.heatMapLayer)||ht.heatMapLayer.addTo(ht.map):ht.map.hasLayer(ht.heatMapLayer)&&ht.map.removeLayer(ht.heatMapLayer),ht.heatMapLayer.refreshTiles()),ht.renderHeatMapControls&&ht.renderHeatMapControls(d)}ht.updateHeatMaps=sxt;function oxt(){ht.overlayLayer&&ht.overlayLayer.refreshTiles()}var vk=zU(()=>{oxt(),ht.selectionBrowser&&ht.selectionBrowser.scheduleRefresh()});ht.refreshOverlay=vk;function F0(){Rd("or_visibility",encodeURIComponent(JSON.stringify(Dd))),Rd("or_selectability",encodeURIComponent(JSON.stringify(wk))),u3();let d=[[ht.modulesLayer,Dd.module_view],[ht.pinsLayer,Dd.pins],...ht.overlayLayers.map(({def:s,layer:h})=>[h,bnt(s.shown_by,Dd)])];for(let[s,h]of d)s&&(h&&!ht.map.hasLayer(s)?s.addTo(ht.map):!h&&ht.map.hasLayer(s)&&ht.map.removeLayer(s));for(let s of ht.allLayers)s.refreshTiles();if(ht.heatMapLayer&&ht.heatMapLayer.refreshTiles(),ht.highlightRect){let s=Dd.highlight_selected!==!1;!s&&ht.map.hasLayer(ht.highlightRect)?ht.map.removeLayer(ht.highlightRect):s&&!ht.map.hasLayer(ht.highlightRect)&&ht.highlightRect.addTo(ht.map)}!Dd.highlight_selected&&ht.clearSelectionPulse&&ht.clearSelectionPulse(),oxt(),ht.rulerManager&&ht.rulerManager.updateVisibility(),ht.labelManager&&ht.labelManager.updateVisibility(),ht.updateScaleBar&&ht.updateScaleBar()}var ER=zU(F0),u3=zU(()=>{!ht.websocketManager||Sc(ht)||ht.websocketManager.request({type:"set_display_state",state:pQt()}).catch(()=>{})});ht.syncDisplayState=u3;function G5e(d){if(!d||typeof d!="object")return;let s=d.entries;if(!(!s||typeof s!="object")){gQt(s);try{if(ht.map&&typeof sessionStorage<"u"){let h=ht.map.getCenter();sessionStorage.setItem("or_restore_view",JSON.stringify({lat:h.lat,lng:h.lng,zoom:ht.map.getZoom()}))}}catch{}window.location.reload()}}ht.redrawAllLayers=F0;ht.captureLayout=(d={})=>EQt(ht,d);function W5e(d){let s=document.createElement("div");s.className="layout-viewer",s.style.width="100%",s.style.height="100%",s.style.backgroundColor="var(--bg-map)",d.element.appendChild(s);let h=document.createElement("div");h.className="or-hud or-hud-bottom-right heatmap-map-legend hidden",s.appendChild(h),ht.heatMapLegendEl=h;let p=document.createElement("div");p.className="or-progress",s.appendChild(p),ht.tileProgressEl=p,d.on("destroy",()=>{ht.tileProgressEl=null,ht.heatMapLegendEl=null}),ht.map=L.map(s,iJt(void 0,{wheelZoom:ht.wheelZoom,arrowStep:ht.arrowStep})),Sc(ht)||dJt(ht.map,()=>ht.wheelZoom),DJt(ht.map),XKt(()=>F0());let m=ht.map.createPane(ht.hoverHighlightPane);m.style.zIndex="650",m.style.pointerEvents="none";let _=L.Control.extend({onAdd:function(){let X=L.DomUtil.create("div","leaflet-bar leaflet-control leaflet-control-fit"),gt=L.DomUtil.create("a","",X);return gt.href="#",gt.title="Fit",gt.setAttribute("role","button"),gt.setAttribute("aria-label","Fit"),gt.textContent="\u2922",L.DomEvent.on(gt,"click",L.DomEvent.stop).on(gt,"click",()=>{ht.fitBounds&&ht.map.fitBounds(ht.fitBounds)}),X}});new _({position:"topleft"}).addTo(ht.map),new ResizeObserver(()=>{ht.map.invalidateSize({animate:!1})}).observe(s);let E=document.createElement("div");E.className="or-hud or-hud-bottom-left hidden";let y=document.createElement("div");y.id="scale-bar";let I=document.createElement("span");I.className="or-hud-divider";let N=document.createElement("div");N.id="coord-bar",E.appendChild(y),E.appendChild(I),E.appendChild(N),s.appendChild(E);function B(){let X=y.style.display!=="none"&&y.childElementCount>0,gt=N.textContent!=="";I.style.display=X&>?"":"none",E.classList.toggle("hidden",!X&&!gt)}B(),ht.map.on("mousemove",X=>{if(ht.lastMouseLatLng=X.latlng,!ht.designScale)return;let{dbuX:gt,dbuY:ft}=tv(X.latlng.lat,X.latlng.lng,ht.designScale,ht.designMaxDXDY,ht.designOriginX,ht.designOriginY);N.textContent=`X: ${ht.formatDbu(gt)} Y: ${ht.formatDbu(ft)}`,B()}),ht.map.on("mouseout",X=>{let gt=X.originalEvent&&X.originalEvent.relatedTarget;gt&&s.contains(gt)||(ht.lastMouseLatLng=null,N.textContent="",B())});let P=22,U=8,j=22;function V(X,gt,ft){let Bt=2+U,Ot=j,Pt=j+X,se=P-2,ot=X>=40,Lt=[];if(Lt.push(``),ot&&ft>1)for(let be=1;be`)}ot&&Lt.push(`0`),Lt.push(`${gt}`),y.innerHTML=`${Lt.join("")}`}function tt(){if(!ht.designScale||!Dd.scale_bar){y.style.display="none",B();return}let X=ht.designScale*Math.pow(2,ht.map.getZoom()),gt=ht.map.getContainer().clientWidth||400,ft=fJt({targetPx:gt*.15,pxPerDbu:X,dbuPerMicron:ht.techData?.dbu_per_micron,showDbu:ht.showDbu});if(!ft){y.style.display="none",B();return}y.style.display="",V(ft.barPx,ft.label,ft.segments),B()}let Q=zU(tt);ht.map.on("zoom zoomend resize",Q),ht.updateScaleBar=tt,ht.rulerManager=new ynt(ht,Dd,YU,knt),ht.labelManager=new xnt(ht,Dd,YU,knt)}function $5e(d){let s=document.createElement("div");s.className="display-controls",s.innerHTML='
Loading layers...
',d.element.appendChild(s),ht.displayControlsEl=s}var rxt="or_restore_console",V5e=1<<20;function q5e(){try{if(ht.tclOutputEl){let d=[...ht.tclOutputEl.children].map(m=>[m.textContent,m.className]),s=d.length,h=0;for(;s>0&&h+d[s-1][0].length<=V5e;)h+=d[--s][0].length;let p=d.slice(s);s>0&&p.unshift([`[earlier output not kept across reload] +`,""]),sessionStorage.setItem(rxt,JSON.stringify(p))}}catch{}window.location.reload()}function X5e(){try{let d=sessionStorage.getItem(rxt);if(!d)return;sessionStorage.removeItem(rxt);for(let[s,h]of JSON.parse(d))_S(s,h)}catch{}}function _S(d,s){if(!ht.tclOutputEl)return;let h=document.createElement("span");s&&(h.className=s),h.textContent=d,ht.tclOutputEl.appendChild(h),ht.tclOutputEl.scrollTop=ht.tclOutputEl.scrollHeight}function Z5e(){if(ht._shutdownHandled)return;ht._shutdownHandled=!0,ht.websocketManager&&(ht.websocketManager._shutdown=!0,ht.websocketManager.onPush=()=>{});let d=document.createElement("div");d.style.cssText="position:fixed;inset:0;z-index:99999;background:#1e1e1e;color:#ddd;display:flex;flex-direction:column;align-items:center;justify-content:center;font-family:system-ui,sans-serif;font-size:16px;padding:24px;text-align:center;",d.innerHTML='
OpenROAD exited
You can close this tab.
',document.body.appendChild(d),setTimeout(()=>{try{window.close()}catch{}},1500)}function Y5e(d){let s=document.createElement("div");if(s.className="tcl-console",s.innerHTML='
%
',d.element.appendChild(s),ht.tclOutputEl=s.querySelector(".tcl-output"),X5e(),Sc(ht)){s.querySelector(".tcl-input-row").style.display="none";let m=document.createElement("span");m.className="tcl-static-notice",m.setAttribute("role","status"),m.setAttribute("aria-live","polite"),m.textContent="Tcl console is not available in saved reports.",ht.tclOutputEl.appendChild(m);return}let h=s.querySelector(".tcl-input"),p=new Snt(h,ht.websocketManager);h.addEventListener("keydown",m=>{if(!p.handleKeyDown(m)&&m.key==="Enter"){let _=h.value.trim();if(!_)return;_S(`>>> ${_} +`,"tcl-cmd"),p.addToHistory(_),h.value="",ht.websocketManager.request({type:"tcl_eval",cmd:_}).then(E=>{E.result&&_S(E.result+` +`,E.is_error?"tcl-error":""),E.action==="shutdown"&&Z5e(),!E.is_error&&ht.drcWidget&&ht.drcWidget.refresh()}).catch(E=>_S(`Error: ${E} +`,"tcl-error"))}})}ht.visibility=Dd;var yS=VJt(ht,F0,vk),K5e=yS.createInspector,YU=yS.updateInspector,J5e=yS.highlightBBox,Q5e=yS.pulseHighlight;ht.updateInspector=YU;ht.navigateInspector=yS.navigateInspector;ht.refreshInspector=yS.refreshInspector;ht.animateSelection=yS.animateSelection;ht.stopSelectionAnimation=yS.stopSelectionAnimation;function tLe(d){new fnt(d,ht,F0)}function eLe(d){ht.timingWidget=new hk(ht,F0,vk),d.element.appendChild(ht.timingWidget.element)}function nLe(d){ht.drcWidget=new Ent(ht,F0,vk),d.element.appendChild(ht.drcWidget.element)}function iLe(d){ht.clockTreeWidget=new lnt(d,ht,F0,vk)}function rLe(d){ht.chartsWidget=new hnt(ht,F0),d.element.appendChild(ht.chartsWidget.element)}function sLe(d){let s=document.createElement("div");s.className="help-panel",s.innerHTML="

Keyboard Shortcuts

fFit design to viewport
scrollZoom in/out
dragPan the view
right-dragRubber-band zoom
Shift+clickAdd object to selection
Ctrl/Cmd+clickSelect object and its connected nets
kToggle ruler mode
Shift+KClear all rulers
EscapeCancel ruler (when building)
",d.element.appendChild(s)}function oLe(d){ht.selectionBrowser=new dnt(d,ht,vk)}function cLe(d){new Mnt(d,ht)}function aLe(d){ht.threeDViewerWidget=new Cnt(d,ht)}var uLe=28,lLe={dimensions:{headerHeight:uLe},root:{type:"row",content:[{type:"component",componentType:"DisplayControls",title:"Display Controls",width:15},{type:"column",width:55,content:[{type:"stack",height:70,content:[{type:"component",componentType:"LayoutViewer",title:"Layout",isClosable:!1},{type:"component",componentType:"SchematicWidget",title:"Schematic"},{type:"component",componentType:"3DViewer",title:"3D Viewer"}]},{type:"component",componentType:"TclConsole",title:"Tcl Console",height:30}]},{type:"stack",width:30,content:[{type:"component",componentType:"Inspector",title:"Inspector"},{type:"component",componentType:"Browser",title:"Hierarchy"},{type:"component",componentType:"TimingWidget",title:"Timing"},{type:"component",componentType:"DRCWidget",title:"DRC"},{type:"component",componentType:"SelectHighlight",title:"Select Highlight"},{type:"component",componentType:"ClockWidget",title:"Clock Tree"},{type:"component",componentType:"ChartsWidget",title:"Charts"},{type:"component",componentType:"HelpWidget",title:"Help"}]}]}};ht.goldenLayout=new nnt(document.getElementById("gl-container"));ht.goldenLayout.registerComponentFactoryFunction("LayoutViewer",W5e);ht.goldenLayout.registerComponentFactoryFunction("DisplayControls",$5e);ht.goldenLayout.registerComponentFactoryFunction("TclConsole",Y5e);ht.goldenLayout.registerComponentFactoryFunction("Inspector",K5e);ht.goldenLayout.registerComponentFactoryFunction("Browser",tLe);ht.goldenLayout.registerComponentFactoryFunction("TimingWidget",eLe);ht.goldenLayout.registerComponentFactoryFunction("DRCWidget",nLe);ht.goldenLayout.registerComponentFactoryFunction("ClockWidget",iLe);ht.goldenLayout.registerComponentFactoryFunction("ChartsWidget",rLe);ht.goldenLayout.registerComponentFactoryFunction("SchematicWidget",cLe);ht.goldenLayout.registerComponentFactoryFunction("3DViewer",aLe);ht.goldenLayout.registerComponentFactoryFunction("HelpWidget",sLe);ht.goldenLayout.registerComponentFactoryFunction("SelectHighlight",oLe);var Ay=window.__STATIC_CACHE__||null;if(Ay)VKt(),ht.websocketManager=GU.fromCache(Ay,ixt);else{let d=JKt(window.location);ht.websocketManager=new GU(d,ixt),ht.layerExtents=new int,ht.websocketManager.onReconnected=()=>{Lnt(),uxt(null,null,{reloadOnChange:!0}).catch(()=>{})}}ixt();ht.goldenLayout.loadLayout(lLe);function cxt(){ht.goldenLayout.updateSize()}ht.syncLayoutSize=cxt;window.addEventListener("resize",cxt);function knt(d,s){ht.goldenLayout.focusComponent(d,s)}ht.focusComponent=knt;ht.resetLayout=function(){ht.goldenLayout&&typeof ht.goldenLayout.resetLayout=="function"&&ht.goldenLayout.resetLayout()};ht.toggleTheme=function(){let d=document.documentElement.dataset.theme==="dark"?"light":"dark";document.documentElement.dataset.theme=d,$2t(d),ont(d),ht.chartsWidget&&ht.chartsWidget.render(),ht.clockTreeWidget&&ht.clockTreeWidget.render(),u3()};ht.toggleShowDbu=function(){ht.showDbu=!ht.showDbu,Rd("or_show_dbu",ht.showDbu?"1":"0"),ht.rulerManager&&ht.rulerManager._rerenderAll(),ht.hierarchyBrowser&&ht.hierarchyBrowser._render(),ht.updateScaleBar&&ht.updateScaleBar(),ht.refreshInspector&&ht.refreshInspector(),u3()};ht.toggleRulerStyle=function(){ht.rulerStyle=ht.rulerStyle==="manhattan"?"euclidian":"manhattan",Rd("or_ruler_style",ht.rulerStyle),u3()};ht.toggleWheelZoom=function(){ht.wheelZoom=!ht.wheelZoom,Rd("or_wheel_zoom",ht.wheelZoom?"1":"0"),u3()};ht.setArrowStep=function(d){ht.arrowStep=bR(d),Rd("or_arrow_step",String(ht.arrowStep)),rJt(ht.map,ht.arrowStep),u3()};ht.setAppFont=function({family:d,scale:s}){ht.fontFamily=d??ht.fontFamily,ht.fontScale=$U(s??ht.fontScale),Rd("or_font_family",encodeURIComponent(ht.fontFamily)),Rd("or_font_scale",String(ht.fontScale)),ht.applyAppFont(),u3()};ht.applyAppFont=function(){let d=document.documentElement;ht.fontFamily?d.style.setProperty("--or-font-family",ht.fontFamily):d.style.removeProperty("--or-font-family"),d.style.setProperty("--or-font-scale",String(ht.fontScale/100)),ht.chartsWidget&&ht.chartsWidget.render(),ht.clockTreeWidget&&ht.clockTreeWidget.render()};ht.showArrowStepDialog=()=>ZJt(ht);ht.showAppFontDialog=()=>YJt(ht);ht.togglePolyDecomp=function(){ht.websocketManager&&ht.websocketManager.request({type:"poly_decomp",value:!ht.polyDecomp}).then(d=>axt(d.value)).catch(()=>{})};function axt(d){ht.polyDecomp=!!d,ht.rebuildMenuBar&&ht.rebuildMenuBar(),ht.refreshOverlay&&ht.refreshOverlay()}ht.applyAppFont();ht.echoTcl=d=>_S(`>>> ${d} +`,"tcl-cmd");ht.runTclScript=(d,s)=>d?(s&&ht.echoTcl(d),ht.websocketManager.request({type:"tcl_eval",cmd:d}).then(h=>(h&&h.result&&_S(h.result+` +`,h.is_error?"tcl-error":""),h)).catch(h=>{_S(`Error: ${h} +`,"tcl-error")})):Promise.resolve();function SQt(d){d&&(ht.customMenu=d.menu||[],ht.customToolbar=d.toolbar||[],ht.rebuildMenuBar&&ht.rebuildMenuBar(),ht.rebuildToolbar&&ht.rebuildToolbar(),cxt())}ht.customMenu=[];ht.customToolbar=[];ht.scheduleRedrawAllLayers=ER;ht.showGlobalConnectDialog=()=>cQt(ht);ht.showInsertBufferDialog=d=>aQt(ht,d);iQt(ht);rQt(ht);ht.contextMenu=new Ant(ht);function hLe(){let d=document.getElementById("debug-continue-btn");return d||(d=document.createElement("button"),d.id="debug-continue-btn",d.className="debug-continue-btn",d.textContent="Continue",d.title="Advance the debugger (gpl, cts, ...)",d.addEventListener("click",()=>{ht.websocketManager.request({type:"debug_continue"}).catch(()=>{})}),(document.getElementById("menu-bar")||document.body).appendChild(d),d)}function TQt(d,s){let h=R2t(d,ev(),s);return h?(ht.currentBounds=d,ht.designScale=h.scale,ht.designMaxDXDY=h.maxDXDY,ht.designOriginX=h.originX,ht.designOriginY=h.originY,ht.fitBounds=h.fitBounds,ht.map.setMaxZoom(sJt(h.scale)),!0):!1}async function uxt(d,s,{reloadOnChange:h=!1}={}){if(Sc(ht)||!ht.map)return!1;let p=d,m=s;if(!p)try{let y=await ht.websocketManager.request({type:"bounds"});p=y.bounds,m=y.fit_bounds}catch{return!1}if(!p||eJt(ht.currentBounds,p))return!1;if(h)return window.location.reload(),!0;let E=!!ht.designScale?tv(ht.map.getCenter().lat,ht.map.getCenter().lng,ht.designScale,ht.designMaxDXDY,ht.designOriginX,ht.designOriginY):null;if(!TQt(p,m))return!1;if(E){let y=Id(E.dbuX,E.dbuY,ht.designScale,ht.designMaxDXDY,ht.designOriginX,ht.designOriginY);ht.map.setView(y,ht.map.getZoom(),{animate:!1})}return ht.highlightRect&&(ht.map.removeLayer(ht.highlightRect),ht.highlightRect=null),F0(),!0}function fLe(){let d=document.getElementById("loading-overlay");d.style.display="flex";let s=()=>{d.style.display!=="none"&&ht.websocketManager.request({type:"bounds"}).then(h=>{h.shapes_ready&&(d.style.display="none")}).catch(()=>{}).finally(()=>{d.style.display!=="none"&&setTimeout(s,1e3)})};setTimeout(s,1e3)}function Lnt(){ht.layerExtents&&ht.layerExtents.refetch(d=>ht.websocketManager.request(d))}function dLe(d){document.getElementById("loading-overlay").style.display="none",Lnt(),uxt(d.bounds,d.fit_bounds).then(s=>{s||F0()}).catch(()=>F0()),ht.refreshInspector&&ht.refreshInspector()}function pLe(){let d=document.getElementById("script-running-badge");return d||(d=document.createElement("span"),d.id="script-running-badge",d.className="script-running-badge",d.textContent="Script running",d.title="The view updates when the script pauses or finishes",(document.getElementById("menu-bar")||document.body).appendChild(d),d)}function gLe(d){if(ht.scriptRunning=d,pLe().style.display=d?"block":"none",!d){if(!ht.booted||!ht.designScale){q5e();return}ht.refreshPending&&(ht.refreshPending=!1,Lnt(),ht.refreshInspector&&ht.refreshInspector()),uxt().then(s=>{s||ER()}).catch(()=>ER())}}ht.websocketManager.onPush=d=>{if(d.type==="refresh"){if(ht.scriptRunning){ht.refreshPending=!0;return}dLe(d)}else if(d.type==="script_running")gLe(!!d.running);else if(d.type==="renderer_controls_changed")ht.refreshRendererControls&&ht.refreshRendererControls(),ER();else if(d.type==="selection_invalidated")ht.updateInspector&&ht.updateInspector(null),ht.stopSelectionAnimation&&ht.stopSelectionAnimation(),ht.highlightRect&&ht.map&&(ht.map.removeLayer(ht.highlightRect),ht.highlightRect=null),vk();else if(d.type==="heatmaps_changed")ht.websocketManager.request({type:"heatmaps"}).then(sxt).catch(s=>console.error("Heat map refresh failed",s));else if(d.type==="labels_changed")ht.labelManager&&ht.labelManager.applyRemoteLabels(d.labels);else if(d.type==="drcUpdated")ht._drcUpdateTimeout&&clearTimeout(ht._drcUpdateTimeout),ht._drcUpdateTimeout=setTimeout(()=>{ht.drcWidget&&ht.drcWidget.refresh()},500);else if(d.type==="debug_paused")ht.refreshRendererControls&&ht.refreshRendererControls(),hLe().style.display="block",ER(),ht.chartsWidget&&ht.websocketManager.request({type:"debug_charts"}).then(s=>ht.chartsWidget.setDebugCharts(s.charts||[])).catch(()=>{});else if(d.type==="debug_resumed"){let s=document.getElementById("debug-continue-btn");s&&(s.style.display="none")}else if(d.type==="debug_refresh"){if(ht.scriptRunning)return;ht.highlightRect&&(ht.map.removeLayer(ht.highlightRect),ht.highlightRect=null),ER()}else if(d.type==="log"){let s=d.text;s.endsWith(` +`)&&(s=s.slice(0,-1)),s&&_S(s+` +`,"")}else d.type==="restore_display_state"?G5e(d.state):d.type==="custom_ui"?SQt(d):d.type==="poly_decomp"?axt(d.value):d.type==="shutdown"&&(ht.websocketManager._shutdown=!0,bk.innerHTML='
Server stopped
',bk.style.display="block")};ht.websocketManager.readyPromise.then(async()=>{try{let E=function(y,I={}){let{addToSelection:N=!1,focusInspector:B=!0,context:P=!1,showConnectivity:U=!1}=I;if(!ht.designScale)return Promise.resolve(null);let{dbuX:j,dbuY:V}=tv(y.lat,y.lng,ht.designScale,ht.designMaxDXDY,ht.designOriginX,ht.designOriginY);if(ht.labelManager&&ht.labelManager.isActive()){ht.labelManager.handleMapClick(j,V);return}let tt=QKt(Dd,wk),Q={type:"select",dbu_x:j,dbu_y:V,zoom:Math.round(ht.map.getZoom()),visible_layers:[...ht.visibleLayerNames],selectable_layers:[...ht.selectableLayers],use_dbu:ht.showDbu,...tt};N&&(Q.add_to_selection=!0),P&&(Q.context=!0),U&&(Q.show_connectivity=!0),ht.visibleChiplets instanceof Set&&(Q.visible_chiplets=[...ht.visibleChiplets]);let X=wg(ht);return ht.websocketManager.request(Q).then(gt=>{if(N0(ht,X)){if(console.log("Select response:",gt,"at dbu",j,V),ht.map.closePopup(),mR(ht,gt),gt.selected&>.selected.length>0){let ft=gt.selected[0];ft.type==="Inst"&&(ht.selectedInstanceName=ft.name,ht.schematicWidget&&ht.schematicWidget.refresh()),YU(gt),B&&knt("Inspector"),gt.bbox&&(J5e(gt.bbox[0],gt.bbox[1],gt.bbox[2],gt.bbox[3],gt.type),Q5e(gt.bbox,gt.type),ht.lastSelectionBounds=Vf(gt.bbox[0],gt.bbox[1],gt.bbox[2],gt.bbox[3],ht.designScale,ht.designMaxDXDY,ht.designOriginX,ht.designOriginY)),Q.show_connectivity&>.connected_added>0&&nv(`Selected ${gt.connected_added} connected net`+(gt.connected_added>1?"s":""))}else!N&&!P&&(YU(null),ht.highlightRect&&(ht.map.removeLayer(ht.highlightRect),ht.highlightRect=null),ht.lastSelectionBounds=null);return oxt(),gt}}).catch(gt=>(console.error("Select failed:",gt),null))},[d,s,h]=await Promise.all([ht.websocketManager.request({type:"tech"}),ht.websocketManager.request({type:"bounds"}),ht.websocketManager.request({type:"heatmaps"})]);Lnt(),ht.hasLiberty=d.has_liberty,ht.techData=d,mQt(d.block_name),ht.websocketManager.request({type:"custom_ui"}).then(SQt).catch(()=>{}),ht.websocketManager.request({type:"poly_decomp"}).then(y=>axt(y.value)).catch(()=>{});let p=s.bounds,m=s.fit_bounds;if(!Ay){let y=ht.map.getSize();qKt(oJt({designBounds:p,fitRect:m,viewW:y.x,viewH:y.y}))}let _=TQt(p,m);if(_){if(ht.labelManager&&ht.labelManager.reload(),ht.map.fitBounds(ht.fitBounds),Ay){let y=Ay.zoom;ht.map.setMinZoom(y),ht.map.setMaxZoom(y),ht.map.fitBounds(ht.fitBounds),ht.map.scrollWheelZoom.disable(),ht.map.touchZoom.disable(),ht.map.boxZoom.disable(),ht.map.doubleClickZoom.disable(),ht.pathOverlay=L.imageOverlay("",Vf(p[0][1],p[0][0],p[1][1],p[1][0],ht.designScale,ht.designMaxDXDY,ht.designOriginX,ht.designOriginY),{opacity:1,interactive:!1,zIndex:1e3}),Ay.setPathOverlay=I=>{I?(ht.pathOverlay.setUrl(I),ht.pathOverlay.addTo(ht.map)):ht.map.removeLayer(ht.pathOverlay)}}try{let y=sessionStorage.getItem("or_restore_view");if(y){sessionStorage.removeItem("or_restore_view");let I=JSON.parse(y);I&&isFinite(I.lat)&&isFinite(I.lng)&&isFinite(I.zoom)&&ht.map.setView([I.lat,I.lng],I.zoom)}}catch{}}if(Ay&&(document.getElementById("loading-overlay").style.display="none"),ht.selectAtLatLng=E,Ay||ht.map.on("click",y=>{if(ht.rulerManager&&ht.rulerManager.isActive())return;let I=y.originalEvent;E(y.latlng,{addToSelection:!!(I&&I.shiftKey),showConnectivity:!!(I&&(I.ctrlKey||I.metaKey))})}),!Ay){let y=ht.map.getContainer(),I=null,N=null;y.addEventListener("contextmenu",B=>{B.preventDefault()}),y.addEventListener("mousedown",B=>{B.button===2&&(I={x:B.clientX,y:B.clientY},ht.map.dragging.disable())}),window.addEventListener("mousemove",B=>{if(!I)return;let P=B.clientX-I.x,U=B.clientY-I.y;if(!N&&Math.abs(P)>=4&&Math.abs(U)>=4&&(N=document.createElement("div"),N.className="rubber-band",document.body.appendChild(N)),N){let j=Math.min(I.x,B.clientX),V=Math.min(I.y,B.clientY);N.style.left=j+"px",N.style.top=V+"px",N.style.width=Math.abs(P)+"px",N.style.height=Math.abs(U)+"px"}}),window.addEventListener("mouseup",B=>{if(!I)return;let P=!!N;N&&(N.remove(),N=null);let U=I;I=null,ht.map.dragging.enable();let j=y.getBoundingClientRect();if(P){let Q=ht.map.containerPointToLatLng([U.x-j.left,U.y-j.top]),X=ht.map.containerPointToLatLng([B.clientX-j.left,B.clientY-j.top]);ht.map.fitBounds([[Math.min(Q.lat,X.lat),Math.min(Q.lng,X.lng)],[Math.max(Q.lat,X.lat),Math.max(Q.lng,X.lng)]]);return}if(!(B.clientX>=j.left&&B.clientX<=j.right&&B.clientY>=j.top&&B.clientY<=j.bottom)||ht.rulerManager&&ht.rulerManager.isActive())return;let tt=ht.map.containerPointToLatLng([B.clientX-j.left,B.clientY-j.top]);ht.selectAtLatLng(tt,{context:!0,focusInspector:!1}).then(()=>ht.contextMenu.show({originalEvent:B}))})}if(QJt(ht,Dd,wk,j5e,d,F0,H5e),!ht.overlayLayer&&!Ay){let y=vJt(Dd,ht);ht.overlayLayer=new y(ht.websocketManager,{zIndex:ht.allLayers.length+5,opacity:1}),ht.overlayLayer.addTo(ht.map)}sxt(h),_&&!s.shapes_ready&&fLe(),u3(),ht.booted=!0}catch(d){ht.scriptRunning||console.error("Failed to load initial data from server:",d)}});document.addEventListener("openroad-cone-sync",d=>{ht.schematicWidget?.syncCone(d.detail||{})});document.addEventListener("keydown",d=>{let s=d.target.tagName;if(s==="INPUT"||s==="TEXTAREA"||d.target.isContentEditable)return;let h=d.key.toLowerCase();h==="escape"&&ht.rulerManager&&ht.rulerManager.isActive()?ht.rulerManager.cancelRulerBuild():h==="escape"&&ht.labelManager&&ht.labelManager.isActive()?ht.labelManager.cancelLabelMode():h==="k"&&!d.shiftKey&&!d.ctrlKey&&!d.metaKey?ht.rulerManager&&ht.rulerManager.toggleRulerMode():h==="k"&&d.shiftKey&&!d.ctrlKey&&!d.metaKey?ht.rulerManager&&ht.rulerManager.clearAllRulers():h==="l"&&!d.shiftKey&&!d.ctrlKey&&!d.metaKey?ht.labelManager&&ht.labelManager.toggleLabelMode():h==="f"&&!d.ctrlKey&&!d.metaKey&&ht.fitBounds?ht.map.fitBounds(ht.fitBounds):h==="z"&&!d.shiftKey&&!d.ctrlKey&&ht.map?ht.lastMouseLatLng?ht.map.setZoomAround(ht.lastMouseLatLng,ht.map.getZoom()+1):ht.map.zoomIn():h==="z"&&d.shiftKey&&!d.ctrlKey&&ht.map?ht.lastMouseLatLng?ht.map.setZoomAround(ht.lastMouseLatLng,ht.map.getZoom()-1):ht.map.zoomOut():h==="f"&&(d.ctrlKey||d.metaKey)?(d.preventDefault(),ht.designScale&&wnt(ht)):h==="g"&&d.shiftKey&&!d.ctrlKey&&!d.metaKey?(d.preventDefault(),ht.designScale&&vnt(ht)):h==="t"&&!d.shiftKey&&!d.ctrlKey&&!d.metaKey&&ht.toggleTheme()},!0);})(); /*! Bundled license information: leaflet/dist/leaflet-src.js: @@ -4187,4 +4325,32 @@ lit-html/directives/if-defined.js: * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) + +lit-html/directive.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +lit-html/directives/class-map.js: + (** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +lit-html/directive-helpers.js: + (** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +lit-html/directives/repeat.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) */ diff --git a/src/web/dist/report.min.js b/src/web/dist/report.min.js index 020dfd151c0..3848a8f13c1 100644 --- a/src/web/dist/report.min.js +++ b/src/web/dist/report.min.js @@ -1,6 +1,31 @@ -(()=>{var th=Object.create;var Ur=Object.defineProperty;var eh=Object.getOwnPropertyDescriptor;var ih=Object.getOwnPropertyNames;var nh=Object.getPrototypeOf,sh=Object.prototype.hasOwnProperty;var oh=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports);var rh=(s,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of ih(e))!sh.call(s,r)&&r!==i&&Ur(s,r,{get:()=>e[r],enumerable:!(o=eh(e,r))||o.enumerable});return s};var ah=(s,e,i)=>(i=s!=null?th(nh(s)):{},rh(e||!s||!s.__esModule?Ur(i,"default",{value:s,enumerable:!0}):i,s));var Yr=oh((Un,Vr)=>{(function(s,e){typeof Un=="object"&&typeof Vr<"u"?e(Un):typeof define=="function"&&define.amd?define(["exports"],e):(s=typeof globalThis<"u"?globalThis:s||self,e(s.leaflet={}))})(Un,function(s){"use strict";var e="1.9.4";function i(t){var n,a,c,d;for(a=1,c=arguments.length;a"u"||!L||!L.Mixin)){t=I(t)?t:[t];for(var n=0;n0?Math.floor(t):Math.ceil(t)};rt.prototype={clone:function(){return new rt(this.x,this.y)},add:function(t){return this.clone()._add(at(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(at(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new rt(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new rt(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=ye(this.x),this.y=ye(this.y),this},distanceTo:function(t){t=at(t);var n=t.x-this.x,a=t.y-this.y;return Math.sqrt(n*n+a*a)},equals:function(t){return t=at(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=at(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+y(this.x)+", "+y(this.y)+")"}};function at(t,n,a){return t instanceof rt?t:I(t)?new rt(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new rt(t.x,t.y):new rt(t,n,a)}function kt(t,n){if(t)for(var a=n?[t,n]:t,c=0,d=a.length;c=this.min.x&&a.x<=this.max.x&&n.y>=this.min.y&&a.y<=this.max.y},intersects:function(t){t=zt(t);var n=this.min,a=this.max,c=t.min,d=t.max,m=d.x>=n.x&&c.x<=a.x,x=d.y>=n.y&&c.y<=a.y;return m&&x},overlaps:function(t){t=zt(t);var n=this.min,a=this.max,c=t.min,d=t.max,m=d.x>n.x&&c.xn.y&&c.y=n.lat&&d.lat<=a.lat&&c.lng>=n.lng&&d.lng<=a.lng},intersects:function(t){t=Pt(t);var n=this._southWest,a=this._northEast,c=t.getSouthWest(),d=t.getNorthEast(),m=d.lat>=n.lat&&c.lat<=a.lat,x=d.lng>=n.lng&&c.lng<=a.lng;return m&&x},overlaps:function(t){t=Pt(t);var n=this._southWest,a=this._northEast,c=t.getSouthWest(),d=t.getNorthEast(),m=d.lat>n.lat&&c.latn.lng&&c.lng1,lt=function(){var t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",_,n),window.removeEventListener("testPassiveEventSupport",_,n)}catch{}return t}(),Bt=function(){return!!document.createElement("canvas").getContext}(),oe=!!(document.createElementNS&&Y("svg").createSVGRect),qe=!!oe&&function(){var t=document.createElement("div");return t.innerHTML="",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),Mn=!oe&&function(){try{var t=document.createElement("div");t.innerHTML='';var n=t.firstChild;return n.style.behavior="url(#default#VML)",n&&typeof n.adj=="object"}catch{return!1}}(),Vl=navigator.platform.indexOf("Mac")===0,Yl=navigator.platform.indexOf("Linux")===0;function Se(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var et={ie:A,ielt9:O,edge:ct,webkit:Lt,android:Xt,android23:Ot,androidStock:Le,opera:Ze,chrome:Nt,gecko:Qe,safari:M,phantom:H,opera12:F,win:W,ie3d:z,webkit3d:q,gecko3d:Z,any3d:D,mobile:X,mobileWebkit:j,mobileWebkit3d:vt,msPointer:mt,pointer:St,touch:Ht,touchNative:Tt,mobileOpera:ce,mobileGecko:K,retina:st,passiveEvents:lt,canvas:Bt,svg:oe,vml:Mn,inlineSvg:qe,mac:Vl,linux:Yl},Ko=et.msPointer?"MSPointerDown":"pointerdown",Jo=et.msPointer?"MSPointerMove":"pointermove",Qo=et.msPointer?"MSPointerUp":"pointerup",tr=et.msPointer?"MSPointerCancel":"pointercancel",Ps={touchstart:Ko,touchmove:Jo,touchend:Qo,touchcancel:tr},er={touchstart:tc,touchmove:En,touchend:En,touchcancel:En},Li={},ir=!1;function Xl(t,n,a){return n==="touchstart"&&Ql(),er[n]?(a=er[n].bind(this,a),t.addEventListener(Ps[n],a,!1),a):(console.warn("wrong event specified:",n),_)}function jl(t,n,a){if(!Ps[n]){console.warn("wrong event specified:",n);return}t.removeEventListener(Ps[n],a,!1)}function Kl(t){Li[t.pointerId]=t}function Jl(t){Li[t.pointerId]&&(Li[t.pointerId]=t)}function nr(t){delete Li[t.pointerId]}function Ql(){ir||(document.addEventListener(Ko,Kl,!0),document.addEventListener(Jo,Jl,!0),document.addEventListener(Qo,nr,!0),document.addEventListener(tr,nr,!0),ir=!0)}function En(t,n){if(n.pointerType!==(n.MSPOINTER_TYPE_MOUSE||"mouse")){n.touches=[];for(var a in Li)n.touches.push(Li[a]);n.changedTouches=[n],t(n)}}function tc(t,n){n.MSPOINTER_TYPE_TOUCH&&n.pointerType===n.MSPOINTER_TYPE_TOUCH&&Kt(n),En(t,n)}function ec(t){var n={},a,c;for(c in t)a=t[c],n[c]=a&&a.bind?a.bind(t):a;return t=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}var ic=200;function nc(t,n){t.addEventListener("dblclick",n);var a=0,c;function d(m){if(m.detail!==1){c=m.detail;return}if(!(m.pointerType==="mouse"||m.sourceCapabilities&&!m.sourceCapabilities.firesTouchEvents)){var x=lr(m);if(!(x.some(function(E){return E instanceof HTMLLabelElement&&E.attributes.for})&&!x.some(function(E){return E instanceof HTMLInputElement||E instanceof HTMLSelectElement}))){var k=Date.now();k-a<=ic?(c++,c===2&&n(ec(m))):c=1,a=k}}}return t.addEventListener("click",d),{dblclick:n,simDblclick:d}}function sc(t,n){t.removeEventListener("dblclick",n.dblclick),t.removeEventListener("click",n.simDblclick)}var Is=In(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Yi=In(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),sr=Yi==="webkitTransition"||Yi==="OTransition"?Yi+"End":"transitionend";function or(t){return typeof t=="string"?document.getElementById(t):t}function Xi(t,n){var a=t.style[n]||t.currentStyle&&t.currentStyle[n];if((!a||a==="auto")&&document.defaultView){var c=document.defaultView.getComputedStyle(t,null);a=c?c[n]:null}return a==="auto"?null:a}function xt(t,n,a){var c=document.createElement(t);return c.className=n||"",a&&a.appendChild(c),c}function Dt(t){var n=t.parentNode;n&&n.removeChild(t)}function Tn(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Si(t){var n=t.parentNode;n&&n.lastChild!==t&&n.appendChild(t)}function Mi(t){var n=t.parentNode;n&&n.firstChild!==t&&n.insertBefore(t,n.firstChild)}function As(t,n){if(t.classList!==void 0)return t.classList.contains(n);var a=Pn(t);return a.length>0&&new RegExp("(^|\\s)"+n+"(\\s|$)").test(a)}function pt(t,n){if(t.classList!==void 0)for(var a=b(n),c=0,d=a.length;c0?2*window.devicePixelRatio:1;function hr(t){return et.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/ac:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}function Ws(t,n){var a=n.relatedTarget;if(!a)return!0;try{for(;a&&a!==t;)a=a.parentNode}catch{return!1}return a!==t}var lc={__proto__:null,on:ut,off:Et,stopPropagation:ii,disableScrollPropagation:qs,disableClickPropagation:Qi,preventDefault:Kt,stop:ni,getPropagationPath:lr,getMousePosition:cr,getWheelDelta:hr,isExternalTarget:Ws,addListener:ut,removeListener:Et},dr=Yt.extend({run:function(t,n,a,c){this.stop(),this._el=t,this._inProgress=!0,this._duration=a||.25,this._easeOutPower=1/Math.max(c||.5,.2),this._startPos=ei(t),this._offset=n.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=nt(this._animate,this),this._step()},_step:function(t){var n=+new Date-this._startTime,a=this._duration*1e3;nthis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,n){this._enforcingBounds=!0;var a=this.getCenter(),c=this._limitCenter(a,this._zoom,Pt(t));return a.equals(c)||this.panTo(c,n),this._enforcingBounds=!1,this},panInside:function(t,n){n=n||{};var a=at(n.paddingTopLeft||n.padding||[0,0]),c=at(n.paddingBottomRight||n.padding||[0,0]),d=this.project(this.getCenter()),m=this.project(t),x=this.getPixelBounds(),k=zt([x.min.add(a),x.max.subtract(c)]),E=k.getSize();if(!k.contains(m)){this._enforcingBounds=!0;var N=m.subtract(k.getCenter()),V=k.extend(m).getSize().subtract(E);d.x+=N.x<0?-V.x:V.x,d.y+=N.y<0?-V.y:V.y,this.panTo(this.unproject(d),n),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},t===!0?{animate:!0}:t);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var a=this.getSize(),c=n.divideBy(2).round(),d=a.divideBy(2).round(),m=c.subtract(d);return!m.x&&!m.y?this:(t.animate&&t.pan?this.panBy(m):(t.pan&&this._rawPanBy(m),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(r(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:a}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=r(this._handleGeolocationResponse,this),a=r(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,a,t):navigator.geolocation.getCurrentPosition(n,a,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var n=t.code,a=t.message||(n===1?"permission denied":n===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:n,message:"Geolocation error: "+a+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var n=t.coords.latitude,a=t.coords.longitude,c=new yt(n,a),d=c.toBounds(t.coords.accuracy*2),m=this._locateOptions;if(m.setView){var x=this.getBoundsZoom(d);this.setView(c,m.maxZoom?Math.min(x,m.maxZoom):x)}var k={latlng:c,bounds:d,timestamp:t.timestamp};for(var E in t.coords)typeof t.coords[E]=="number"&&(k[E]=t.coords[E]);this.fire("locationfound",k)}},addHandler:function(t,n){if(!n)return this;var a=this[t]=new n(this);return this._handlers.push(a),this.options[t]&&a.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Dt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(tt(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)Dt(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,n){var a="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),c=xt("div",a,n||this._mapPane);return t&&(this._panes[t]=c),c},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),n=this.unproject(t.getBottomLeft()),a=this.unproject(t.getTopRight());return new Wt(n,a)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,n,a){t=Pt(t),a=at(a||[0,0]);var c=this.getZoom()||0,d=this.getMinZoom(),m=this.getMaxZoom(),x=t.getNorthWest(),k=t.getSouthEast(),E=this.getSize().subtract(a),N=zt(this.project(k,c),this.project(x,c)).getSize(),V=et.any3d?this.options.zoomSnap:1,ot=E.x/N.x,_t=E.y/N.y,ne=n?Math.max(ot,_t):Math.min(ot,_t);return c=this.getScaleZoom(ne,c),V&&(c=Math.round(c/(V/100))*(V/100),c=n?Math.ceil(c/V)*V:Math.floor(c/V)*V),Math.max(d,Math.min(m,c))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new rt(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,n){var a=this._getTopLeftPoint(t,n);return new kt(a,a.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,n){var a=this.options.crs;return n=n===void 0?this._zoom:n,a.scale(t)/a.scale(n)},getScaleZoom:function(t,n){var a=this.options.crs;n=n===void 0?this._zoom:n;var c=a.zoom(t*a.scale(n));return isNaN(c)?1/0:c},project:function(t,n){return n=n===void 0?this._zoom:n,this.options.crs.latLngToPoint(ft(t),n)},unproject:function(t,n){return n=n===void 0?this._zoom:n,this.options.crs.pointToLatLng(at(t),n)},layerPointToLatLng:function(t){var n=at(t).add(this.getPixelOrigin());return this.unproject(n)},latLngToLayerPoint:function(t){var n=this.project(ft(t))._round();return n._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(ft(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(Pt(t))},distance:function(t,n){return this.options.crs.distance(ft(t),ft(n))},containerPointToLayerPoint:function(t){return at(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return at(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var n=this.containerPointToLayerPoint(at(t));return this.layerPointToLatLng(n)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ft(t)))},mouseEventToContainerPoint:function(t){return cr(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var n=this._container=or(t);if(n){if(n._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");ut(n,"scroll",this._onScroll,this),this._containerId=h(n)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&et.any3d,pt(t,"leaflet-container"+(et.touch?" leaflet-touch":"")+(et.retina?" leaflet-retina":"")+(et.ielt9?" leaflet-oldie":"")+(et.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var n=Xi(t,"position");n!=="absolute"&&n!=="relative"&&n!=="fixed"&&n!=="sticky"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Zt(this._mapPane,new rt(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(pt(t.markerPane,"leaflet-zoom-hide"),pt(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,n,a){Zt(this._mapPane,new rt(0,0));var c=!this._loaded;this._loaded=!0,n=this._limitZoom(n),this.fire("viewprereset");var d=this._zoom!==n;this._moveStart(d,a)._move(t,n)._moveEnd(d),this.fire("viewreset"),c&&this.fire("load")},_moveStart:function(t,n){return t&&this.fire("zoomstart"),n||this.fire("movestart"),this},_move:function(t,n,a,c){n===void 0&&(n=this._zoom);var d=this._zoom!==n;return this._zoom=n,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),c?a&&a.pinch&&this.fire("zoom",a):((d||a&&a.pinch)&&this.fire("zoom",a),this.fire("move",a)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return tt(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Zt(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[h(this._container)]=this;var n=t?Et:ut;n(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&n(window,"resize",this._onResize,this),et.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){tt(this._resizeRequest),this._resizeRequest=nt(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,n){for(var a=[],c,d=n==="mouseout"||n==="mouseover",m=t.target||t.srcElement,x=!1;m;){if(c=this._targets[h(m)],c&&(n==="click"||n==="preclick")&&this._draggableMoved(c)){x=!0;break}if(c&&c.listens(n,!0)&&(d&&!Ws(m,t)||(a.push(c),d))||m===this._container)break;m=m.parentNode}return!a.length&&!x&&!d&&this.listens(n,!0)&&(a=[this]),a},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var n=t.target||t.srcElement;if(!(!this._loaded||n._leaflet_disable_events||t.type==="click"&&this._isClickDisabled(n))){var a=t.type;a==="mousedown"&&Os(n),this._fireDOMEvent(t,a)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,n,a){if(t.type==="click"){var c=i({},t);c.type="preclick",this._fireDOMEvent(c,c.type,a)}var d=this._findEventTargets(t,n);if(a){for(var m=[],x=0;x0?Math.round(t-n)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(n))},_limitZoom:function(t){var n=this.getMinZoom(),a=this.getMaxZoom(),c=et.any3d?this.options.zoomSnap:1;return c&&(t=Math.round(t/c)*c),Math.max(n,Math.min(a,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){$t(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,n){var a=this._getCenterOffset(t)._trunc();return(n&&n.animate)!==!0&&!this.getSize().contains(a)?!1:(this.panBy(a,n),!0)},_createAnimProxy:function(){var t=this._proxy=xt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(n){var a=Is,c=this._proxy.style[a];ti(this._proxy,this.project(n.center,n.zoom),this.getZoomScale(n.zoom,1)),c===this._proxy.style[a]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Dt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),n=this.getZoom();ti(this._proxy,this.project(t,n),this.getZoomScale(n,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,n,a){if(this._animatingZoom)return!0;if(a=a||{},!this._zoomAnimated||a.animate===!1||this._nothingToAnimate()||Math.abs(n-this._zoom)>this.options.zoomAnimationThreshold)return!1;var c=this.getZoomScale(n),d=this._getCenterOffset(t)._divideBy(1-1/c);return a.animate!==!0&&!this.getSize().contains(d)?!1:(nt(function(){this._moveStart(!0,a.noMoveStart||!1)._animateZoom(t,n,!0)},this),!0)},_animateZoom:function(t,n,a,c){this._mapPane&&(a&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=n,pt(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:n,noUpdate:c}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(r(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&$t(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function cc(t,n){return new bt(t,n)}var ve=Mt.extend({options:{position:"topright"},initialize:function(t){w(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var n=this._map;return n&&n.removeControl(this),this.options.position=t,n&&n.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var n=this._container=this.onAdd(t),a=this.getPosition(),c=t._controlCorners[a];return pt(n,"leaflet-control"),a.indexOf("bottom")!==-1?c.insertBefore(n,c.firstChild):c.appendChild(n),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Dt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),tn=function(t){return new ve(t)};bt.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},n="leaflet-",a=this._controlContainer=xt("div",n+"control-container",this._container);function c(d,m){var x=n+d+" "+n+m;t[d+m]=xt("div",x,a)}c("top","left"),c("top","right"),c("bottom","left"),c("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)Dt(this._controlCorners[t]);Dt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var ur=ve.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,n,a,c){return a1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=n&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var n=this._getLayer(h(t.target)),a=n.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;a&&this._map.fire(a,n)},_createRadioElement:function(t,n){var a='",c=document.createElement("div");return c.innerHTML=a,c.firstChild},_addItem:function(t){var n=document.createElement("label"),a=this._map.hasLayer(t.layer),c;t.overlay?(c=document.createElement("input"),c.type="checkbox",c.className="leaflet-control-layers-selector",c.defaultChecked=a):c=this._createRadioElement("leaflet-base-layers_"+h(this),a),this._layerControlInputs.push(c),c.layerId=h(t.layer),ut(c,"click",this._onInputClick,this);var d=document.createElement("span");d.innerHTML=" "+t.name;var m=document.createElement("span");n.appendChild(m),m.appendChild(c),m.appendChild(d);var x=t.overlay?this._overlaysList:this._baseLayersList;return x.appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,n,a,c=[],d=[];this._handlingClick=!0;for(var m=t.length-1;m>=0;m--)n=t[m],a=this._getLayer(n.layerId).layer,n.checked?c.push(a):n.checked||d.push(a);for(m=0;m=0;d--)n=t[d],a=this._getLayer(n.layerId).layer,n.disabled=a.options.minZoom!==void 0&&ca.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,ut(t,"click",Kt),this.expand();var n=this;setTimeout(function(){Et(t,"click",Kt),n._preventClick=!1})}}),hc=function(t,n,a){return new ur(t,n,a)},Gs=ve.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var n="leaflet-control-zoom",a=xt("div",n+" leaflet-bar"),c=this.options;return this._zoomInButton=this._createButton(c.zoomInText,c.zoomInTitle,n+"-in",a,this._zoomIn),this._zoomOutButton=this._createButton(c.zoomOutText,c.zoomOutTitle,n+"-out",a,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),a},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,n,a,c,d){var m=xt("a",a,c);return m.innerHTML=t,m.href="#",m.title=n,m.setAttribute("role","button"),m.setAttribute("aria-label",n),Qi(m),ut(m,"click",ni),ut(m,"click",d,this),ut(m,"click",this._refocusOnMap,this),m},_updateDisabled:function(){var t=this._map,n="leaflet-disabled";$t(this._zoomInButton,n),$t(this._zoomOutButton,n),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(pt(this._zoomOutButton,n),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(pt(this._zoomInButton,n),this._zoomInButton.setAttribute("aria-disabled","true"))}});bt.mergeOptions({zoomControl:!0}),bt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Gs,this.addControl(this.zoomControl))});var dc=function(t){return new Gs(t)},pr=ve.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var n="leaflet-control-scale",a=xt("div",n),c=this.options;return this._addScales(c,n+"-line",a),t.on(c.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),a},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,n,a){t.metric&&(this._mScale=xt("div",n,a)),t.imperial&&(this._iScale=xt("div",n,a))},_update:function(){var t=this._map,n=t.getSize().y/2,a=t.distance(t.containerPointToLatLng([0,n]),t.containerPointToLatLng([this.options.maxWidth,n]));this._updateScales(a)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var n=this._getRoundNum(t),a=n<1e3?n+" m":n/1e3+" km";this._updateScale(this._mScale,a,n/t)},_updateImperial:function(t){var n=t*3.2808399,a,c,d;n>5280?(a=n/5280,c=this._getRoundNum(a),this._updateScale(this._iScale,c+" mi",c/a)):(d=this._getRoundNum(n),this._updateScale(this._iScale,d+" ft",d/n))},_updateScale:function(t,n,a){t.style.width=Math.round(this.options.maxWidth*a)+"px",t.innerHTML=n},_getRoundNum:function(t){var n=Math.pow(10,(Math.floor(t)+"").length-1),a=t/n;return a=a>=10?10:a>=5?5:a>=3?3:a>=2?2:1,n*a}}),uc=function(t){return new pr(t)},pc='',Us=ve.extend({options:{position:"bottomright",prefix:''+(et.inlineSvg?pc+" ":"")+"Leaflet"},initialize:function(t){w(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=xt("div","leaflet-control-attribution"),Qi(this._container);for(var n in t._layers)t._layers[n].getAttribution&&this.addAttribution(t._layers[n].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var n in this._attributions)this._attributions[n]&&t.push(n);var a=[];this.options.prefix&&a.push(this.options.prefix),t.length&&a.push(t.join(", ")),this._container.innerHTML=a.join(' ')}}});bt.mergeOptions({attributionControl:!0}),bt.addInitHook(function(){this.options.attributionControl&&new Us().addTo(this)});var fc=function(t){return new Us(t)};ve.Layers=ur,ve.Zoom=Gs,ve.Scale=pr,ve.Attribution=Us,tn.layers=hc,tn.zoom=dc,tn.scale=uc,tn.attribution=fc;var Ee=Mt.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Ee.addTo=function(t,n){return t.addHandler(n,this),this};var mc={Events:At},fr=et.touch?"touchstart mousedown":"mousedown",We=Yt.extend({options:{clickTolerance:3},initialize:function(t,n,a,c){w(this,c),this._element=t,this._dragStartTarget=n||t,this._preventOutline=a},enable:function(){this._enabled||(ut(this._dragStartTarget,fr,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(We._dragging===this&&this.finishDrag(!0),Et(this._dragStartTarget,fr,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!As(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){We._dragging===this&&this.finishDrag();return}if(!(We._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(We._dragging=this,this._preventOutline&&Os(this._element),Ds(),ji(),!this._moving)){this.fire("down");var n=t.touches?t.touches[0]:t,a=rr(this._element);this._startPoint=new rt(n.clientX,n.clientY),this._startPos=ei(this._element),this._parentScale=Hs(a);var c=t.type==="mousedown";ut(document,c?"mousemove":"touchmove",this._onMove,this),ut(document,c?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var n=t.touches&&t.touches.length===1?t.touches[0]:t,a=new rt(n.clientX,n.clientY)._subtract(this._startPoint);!a.x&&!a.y||Math.abs(a.x)+Math.abs(a.y)m&&(x=k,m=E);m>a&&(n[x]=1,Ys(t,n,a,c,x),Ys(t,n,a,x,d))}function vc(t,n){for(var a=[t[0]],c=1,d=0,m=t.length;cn&&(a.push(t[c]),d=c);return dn.max.x&&(a|=2),t.yn.max.y&&(a|=8),a}function bc(t,n){var a=n.x-t.x,c=n.y-t.y;return a*a+c*c}function en(t,n,a,c){var d=n.x,m=n.y,x=a.x-d,k=a.y-m,E=x*x+k*k,N;return E>0&&(N=((t.x-d)*x+(t.y-m)*k)/E,N>1?(d=a.x,m=a.y):N>0&&(d+=x*N,m+=k*N)),x=t.x-d,k=t.y-m,c?x*x+k*k:new rt(d,m)}function _e(t){return!I(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]<"u"}function wr(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),_e(t)}function xr(t,n){var a,c,d,m,x,k,E,N;if(!t||t.length===0)throw new Error("latlngs not passed");_e(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var V=ft([0,0]),ot=Pt(t),_t=ot.getNorthWest().distanceTo(ot.getSouthWest())*ot.getNorthEast().distanceTo(ot.getNorthWest());_t<1700&&(V=Vs(t));var ne=t.length,Gt=[];for(a=0;ac){E=(m-c)/d,N=[k.x-E*(k.x-x.x),k.y-E*(k.y-x.y)];break}var re=n.unproject(at(N));return ft([re.lat+V.lat,re.lng+V.lng])}var wc={__proto__:null,simplify:gr,pointToSegmentDistance:yr,closestPointOnSegment:gc,clipSegment:br,_getEdgeIntersection:Bn,_getBitCode:si,_sqClosestPointOnSegment:en,isFlat:_e,_flat:wr,polylineCenter:xr},Xs={project:function(t){return new rt(t.lng,t.lat)},unproject:function(t){return new yt(t.y,t.x)},bounds:new kt([-180,-90],[180,90])},js={R:6378137,R_MINOR:6356752314245179e-9,bounds:new kt([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var n=Math.PI/180,a=this.R,c=t.lat*n,d=this.R_MINOR/a,m=Math.sqrt(1-d*d),x=m*Math.sin(c),k=Math.tan(Math.PI/4-c/2)/Math.pow((1-x)/(1+x),m/2);return c=-a*Math.log(Math.max(k,1e-10)),new rt(t.lng*n*a,c)},unproject:function(t){for(var n=180/Math.PI,a=this.R,c=this.R_MINOR/a,d=Math.sqrt(1-c*c),m=Math.exp(-t.y/a),x=Math.PI/2-2*Math.atan(m),k=0,E=.1,N;k<15&&Math.abs(E)>1e-7;k++)N=d*Math.sin(x),N=Math.pow((1-N)/(1+N),d/2),E=Math.PI/2-2*Math.atan(m*N)-x,x+=E;return new yt(x*n,t.x*n/a)}},xc={__proto__:null,LonLat:Xs,Mercator:js,SphericalMercator:ee},Cc=i({},ie,{code:"EPSG:3395",projection:js,transformation:function(){var t=.5/(Math.PI*js.R);return C(t,.5,-t,.5)}()}),Cr=i({},ie,{code:"EPSG:4326",projection:Xs,transformation:C(1/180,1,-1/180,.5)}),kc=i({},le,{projection:Xs,transformation:C(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,n){var a=n.lng-t.lng,c=n.lat-t.lat;return Math.sqrt(a*a+c*c)},infinite:!0});le.Earth=ie,le.EPSG3395=Cc,le.EPSG3857=$,le.EPSG900913=B,le.EPSG4326=Cr,le.Simple=kc;var be=Yt.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[h(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[h(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var n=t.target;if(n.hasLayer(this)){if(this._map=n,this._zoomAnimated=n._zoomAnimated,this.getEvents){var a=this.getEvents();n.on(a,this),this.once("remove",function(){n.off(a,this)},this)}this.onAdd(n),this.fire("add"),n.fire("layeradd",{layer:this})}}});bt.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var n=h(t);return this._layers[n]?this:(this._layers[n]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var n=h(t);return this._layers[n]?(this._loaded&&t.onRemove(this),delete this._layers[n],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return h(t)in this._layers},eachLayer:function(t,n){for(var a in this._layers)t.call(n,this._layers[a]);return this},_addLayers:function(t){t=t?I(t)?t:[t]:[];for(var n=0,a=t.length;nthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&n[0]instanceof yt&&n[0].equals(n[a-1])&&n.pop(),n},_setLatLngs:function(t){Be.prototype._setLatLngs.call(this,t),_e(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return _e(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,n=this.options.weight,a=new rt(n,n);if(t=new kt(t.min.subtract(a),t.max.add(a)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(var c=0,d=this._rings.length,m;ct.y!=d.y>t.y&&t.x<(d.x-c.x)*(t.y-c.y)/(d.y-c.y)+c.x&&(n=!n);return n||Be.prototype._containsPoint.call(this,t,!0)}});function Ac(t,n){return new Pi(t,n)}var De=Ne.extend({initialize:function(t,n){w(this,n),this._layers={},t&&this.addData(t)},addData:function(t){var n=I(t)?t:t.features,a,c,d;if(n){for(a=0,c=n.length;a0&&d.push(d[0].slice()),d}function Ii(t,n){return t.feature?i({},t.feature,{geometry:n}):$n(n)}function $n(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var to={toGeoJSON:function(t){return Ii(this,{type:"Point",coordinates:Qs(this.getLatLng(),t)})}};Dn.include(to),Ks.include(to),Rn.include(to),Be.include({toGeoJSON:function(t){var n=!_e(this._latlngs),a=Hn(this._latlngs,n?1:0,!1,t);return Ii(this,{type:(n?"Multi":"")+"LineString",coordinates:a})}}),Pi.include({toGeoJSON:function(t){var n=!_e(this._latlngs),a=n&&!_e(this._latlngs[0]),c=Hn(this._latlngs,a?2:n?1:0,!0,t);return n||(c=[c]),Ii(this,{type:(a?"Multi":"")+"Polygon",coordinates:c})}}),Ei.include({toMultiPoint:function(t){var n=[];return this.eachLayer(function(a){n.push(a.toGeoJSON(t).geometry.coordinates)}),Ii(this,{type:"MultiPoint",coordinates:n})},toGeoJSON:function(t){var n=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(n==="MultiPoint")return this.toMultiPoint(t);var a=n==="GeometryCollection",c=[];return this.eachLayer(function(d){if(d.toGeoJSON){var m=d.toGeoJSON(t);if(a)c.push(m.geometry);else{var x=$n(m);x.type==="FeatureCollection"?c.push.apply(c,x.features):c.push(x)}}}),a?Ii(this,{geometries:c,type:"GeometryCollection"}):{type:"FeatureCollection",features:c}}});function Sr(t,n){return new De(t,n)}var Nc=Sr,Fn=be.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,n,a){this._url=t,this._bounds=Pt(n),w(this,a)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(pt(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Dt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&Si(this._image),this},bringToBack:function(){return this._map&&Mi(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=Pt(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._url.tagName==="IMG",n=this._image=t?this._url:xt("img");if(pt(n,"leaflet-image-layer"),this._zoomAnimated&&pt(n,"leaflet-zoom-animated"),this.options.className&&pt(n,this.options.className),n.onselectstart=_,n.onmousemove=_,n.onload=r(this.fire,this,"load"),n.onerror=r(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(n.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t){this._url=n.src;return}n.src=this._url,n.alt=this.options.alt},_animateZoom:function(t){var n=this._map.getZoomScale(t.zoom),a=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;ti(this._image,a,n)},_reset:function(){var t=this._image,n=new kt(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),a=n.getSize();Zt(t,n.min),t.style.width=a.x+"px",t.style.height=a.y+"px"},_updateOpacity:function(){me(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Bc=function(t,n,a){return new Fn(t,n,a)},Mr=Fn.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t=this._url.tagName==="VIDEO",n=this._image=t?this._url:xt("video");if(pt(n,"leaflet-image-layer"),this._zoomAnimated&&pt(n,"leaflet-zoom-animated"),this.options.className&&pt(n,this.options.className),n.onselectstart=_,n.onmousemove=_,n.onloadeddata=r(this.fire,this,"load"),t){for(var a=n.getElementsByTagName("source"),c=[],d=0;d0?c:[n.src];return}I(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(n.style,"objectFit")&&(n.style.objectFit="fill"),n.autoplay=!!this.options.autoplay,n.loop=!!this.options.loop,n.muted=!!this.options.muted,n.playsInline=!!this.options.playsInline;for(var m=0;md?(n.height=d+"px",pt(t,m)):$t(t,m),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var n=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),a=this._getAnchor();Zt(this._container,n.add(a))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,n=parseInt(Xi(this._container,"marginBottom"),10)||0,a=this._container.offsetHeight+n,c=this._containerWidth,d=new rt(this._containerLeft,-a-this._containerBottom);d._add(ei(this._container));var m=t.layerPointToContainerPoint(d),x=at(this.options.autoPanPadding),k=at(this.options.autoPanPaddingTopLeft||x),E=at(this.options.autoPanPaddingBottomRight||x),N=t.getSize(),V=0,ot=0;m.x+c+E.x>N.x&&(V=m.x+c-N.x+E.x),m.x-V-k.x<0&&(V=m.x-k.x),m.y+a+E.y>N.y&&(ot=m.y+a-N.y+E.y),m.y-ot-k.y<0&&(ot=m.y-k.y),(V||ot)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([V,ot]))}},_getAnchor:function(){return at(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),zc=function(t,n){return new Zn(t,n)};bt.mergeOptions({closePopupOnClick:!0}),bt.include({openPopup:function(t,n,a){return this._initOverlay(Zn,t,n,a).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),be.include({bindPopup:function(t,n){return this._popup=this._initOverlay(Zn,this._popup,t,n),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof Ne||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(!(!this._popup||!this._map)){ni(t);var n=t.layer||t.target;if(this._popup._source===n&&!(n instanceof Ge)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng);return}this._popup._source=n,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){t.originalEvent.keyCode===13&&this._openPopup(t)}});var qn=Te.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Te.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Te.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Te.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip",n=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=xt("div",n),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+h(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var n,a,c=this._map,d=this._container,m=c.latLngToContainerPoint(c.getCenter()),x=c.layerPointToContainerPoint(t),k=this.options.direction,E=d.offsetWidth,N=d.offsetHeight,V=at(this.options.offset),ot=this._getAnchor();k==="top"?(n=E/2,a=N):k==="bottom"?(n=E/2,a=0):k==="center"?(n=E/2,a=N/2):k==="right"?(n=0,a=N/2):k==="left"?(n=E,a=N/2):x.xthis.options.maxZoom||ac?this._retainParent(d,m,x,c):!1)},_retainChildren:function(t,n,a,c){for(var d=2*t;d<2*t+2;d++)for(var m=2*n;m<2*n+2;m++){var x=new rt(d,m);x.z=a+1;var k=this._tileCoordsToKey(x),E=this._tiles[k];if(E&&E.active){E.retain=!0;continue}else E&&E.loaded&&(E.retain=!0);a+1this.options.maxZoom||this.options.minZoom!==void 0&&d1){this._setView(t,a);return}for(var ot=d.min.y;ot<=d.max.y;ot++)for(var _t=d.min.x;_t<=d.max.x;_t++){var ne=new rt(_t,ot);if(ne.z=this._tileZoom,!!this._isValidTile(ne)){var Gt=this._tiles[this._tileCoordsToKey(ne)];Gt?Gt.current=!0:x.push(ne)}}if(x.sort(function(re,Ni){return re.distanceTo(m)-Ni.distanceTo(m)}),x.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var ge=document.createDocumentFragment();for(_t=0;_ta.max.x)||!n.wrapLat&&(t.ya.max.y))return!1}if(!this.options.bounds)return!0;var c=this._tileCoordsToBounds(t);return Pt(this.options.bounds).overlaps(c)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var n=this._map,a=this.getTileSize(),c=t.scaleBy(a),d=c.add(a),m=n.unproject(c,t.z),x=n.unproject(d,t.z);return[m,x]},_tileCoordsToBounds:function(t){var n=this._tileCoordsToNwSe(t),a=new Wt(n[0],n[1]);return this.options.noWrap||(a=this._map.wrapLatLngBounds(a)),a},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var n=t.split(":"),a=new rt(+n[0],+n[1]);return a.z=+n[2],a},_removeTile:function(t){var n=this._tiles[t];n&&(Dt(n.el),delete this._tiles[t],this.fire("tileunload",{tile:n.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){pt(t,"leaflet-tile");var n=this.getTileSize();t.style.width=n.x+"px",t.style.height=n.y+"px",t.onselectstart=_,t.onmousemove=_,et.ielt9&&this.options.opacity<1&&me(t,this.options.opacity)},_addTile:function(t,n){var a=this._getTilePos(t),c=this._tileCoordsToKey(t),d=this.createTile(this._wrapCoords(t),r(this._tileReady,this,t));this._initTile(d),this.createTile.length<2&&nt(r(this._tileReady,this,t,null,d)),Zt(d,a),this._tiles[c]={el:d,coords:t,current:!0},n.appendChild(d),this.fire("tileloadstart",{tile:d,coords:t})},_tileReady:function(t,n,a){n&&this.fire("tileerror",{error:n,tile:a,coords:t});var c=this._tileCoordsToKey(t);a=this._tiles[c],a&&(a.loaded=+new Date,this._map._fadeAnimated?(me(a.el,0),tt(this._fadeFrame),this._fadeFrame=nt(this._updateOpacity,this)):(a.active=!0,this._pruneTiles()),n||(pt(a.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:a.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),et.ielt9||!this._map._fadeAnimated?nt(this._pruneTiles,this):setTimeout(r(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var n=new rt(this._wrapX?f(t.x,this._wrapX):t.x,this._wrapY?f(t.y,this._wrapY):t.y);return n.z=t.z,n},_pxBoundsToTileRange:function(t){var n=this.getTileSize();return new kt(t.min.unscaleBy(n).floor(),t.max.unscaleBy(n).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function $c(t){return new sn(t)}var Ai=sn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,n){this._url=t,n=w(this,n),n.detectRetina&&et.retina&&n.maxZoom>0?(n.tileSize=Math.floor(n.tileSize/2),n.zoomReverse?(n.zoomOffset--,n.minZoom=Math.min(n.maxZoom,n.minZoom+1)):(n.zoomOffset++,n.maxZoom=Math.max(n.minZoom,n.maxZoom-1)),n.minZoom=Math.max(0,n.minZoom)):n.zoomReverse?n.minZoom=Math.min(n.maxZoom,n.minZoom):n.maxZoom=Math.max(n.minZoom,n.maxZoom),typeof n.subdomains=="string"&&(n.subdomains=n.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,n){return this._url===t&&n===void 0&&(n=!0),this._url=t,n||this.redraw(),this},createTile:function(t,n){var a=document.createElement("img");return ut(a,"load",r(this._tileOnLoad,this,n,a)),ut(a,"error",r(this._tileOnError,this,n,a)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(a.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(a.referrerPolicy=this.options.referrerPolicy),a.alt="",a.src=this.getTileUrl(t),a},getTileUrl:function(t){var n={r:et.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var a=this._globalTileRange.max.y-t.y;this.options.tms&&(n.y=a),n["-y"]=a}return R(this._url,i(n,this.options))},_tileOnLoad:function(t,n){et.ielt9?setTimeout(r(t,this,null,n),0):t(null,n)},_tileOnError:function(t,n,a){var c=this.options.errorTileUrl;c&&n.getAttribute("src")!==c&&(n.src=c),t(a,n)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,n=this.options.maxZoom,a=this.options.zoomReverse,c=this.options.zoomOffset;return a&&(t=n-t),t+c},_getSubdomain:function(t){var n=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[n]},_abortLoading:function(){var t,n;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&(n=this._tiles[t].el,n.onload=_,n.onerror=_,!n.complete)){n.src=G;var a=this._tiles[t].coords;Dt(n),delete this._tiles[t],this.fire("tileabort",{tile:n,coords:a})}},_removeTile:function(t){var n=this._tiles[t];if(n)return n.el.setAttribute("src",G),sn.prototype._removeTile.call(this,t)},_tileReady:function(t,n,a){if(!(!this._map||a&&a.getAttribute("src")===G))return sn.prototype._tileReady.call(this,t,n,a)}});function Pr(t,n){return new Ai(t,n)}var Ir=Ai.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,n){this._url=t;var a=i({},this.defaultWmsParams);for(var c in n)c in this.options||(a[c]=n[c]);n=w(this,n);var d=n.detectRetina&&et.retina?2:1,m=this.getTileSize();a.width=m.x*d,a.height=m.y*d,this.wmsParams=a},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var n=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[n]=this._crs.code,Ai.prototype.onAdd.call(this,t)},getTileUrl:function(t){var n=this._tileCoordsToNwSe(t),a=this._crs,c=zt(a.project(n[0]),a.project(n[1])),d=c.min,m=c.max,x=(this._wmsVersion>=1.3&&this._crs===Cr?[d.y,d.x,m.y,m.x]:[d.x,d.y,m.x,m.y]).join(","),k=Ai.prototype.getTileUrl.call(this,t);return k+v(this.wmsParams,k,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+x},setParams:function(t,n){return i(this.wmsParams,t),n||this.redraw(),this}});function Fc(t,n){return new Ir(t,n)}Ai.WMS=Ir,Pr.wms=Fc;var Re=be.extend({options:{padding:.1},initialize:function(t){w(this,t),h(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),pt(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,n){var a=this._map.getZoomScale(n,this._zoom),c=this._map.getSize().multiplyBy(.5+this.options.padding),d=this._map.project(this._center,n),m=c.multiplyBy(-a).add(d).subtract(this._map._getNewPixelOrigin(t,n));et.any3d?ti(this._container,m,a):Zt(this._container,m)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,n=this._map.getSize(),a=this._map.containerPointToLayerPoint(n.multiplyBy(-t)).round();this._bounds=new kt(a,a.add(n.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Ar=Re.extend({options:{tolerance:0},getEvents:function(){var t=Re.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Re.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");ut(t,"mousemove",this._onMouseMove,this),ut(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ut(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){tt(this._redrawRequest),delete this._ctx,Dt(this._container),Et(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var n in this._layers)t=this._layers[n],t._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Re.prototype._update.call(this);var t=this._bounds,n=this._container,a=t.getSize(),c=et.retina?2:1;Zt(n,t.min),n.width=c*a.x,n.height=c*a.y,n.style.width=a.x+"px",n.style.height=a.y+"px",et.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Re.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[h(t)]=t;var n=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=n),this._drawLast=n,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var n=t._order,a=n.next,c=n.prev;a?a.prev=c:this._drawLast=c,c?c.next=a:this._drawFirst=a,delete t._order,delete this._layers[h(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray=="string"){var n=t.options.dashArray.split(/[, ]+/),a=[],c,d;for(d=0;d')}}catch{}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Zc={_initContainer:function(){this._container=xt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Re.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var n=t._container=on("shape");pt(n,"leaflet-vml-shape "+(this.options.className||"")),n.coordsize="1 1",t._path=on("path"),n.appendChild(t._path),this._updateStyle(t),this._layers[h(t)]=t},_addPath:function(t){var n=t._container;this._container.appendChild(n),t.options.interactive&&t.addInteractiveTarget(n)},_removePath:function(t){var n=t._container;Dt(n),t.removeInteractiveTarget(n),delete this._layers[h(t)]},_updateStyle:function(t){var n=t._stroke,a=t._fill,c=t.options,d=t._container;d.stroked=!!c.stroke,d.filled=!!c.fill,c.stroke?(n||(n=t._stroke=on("stroke")),d.appendChild(n),n.weight=c.weight+"px",n.color=c.color,n.opacity=c.opacity,c.dashArray?n.dashStyle=I(c.dashArray)?c.dashArray.join(" "):c.dashArray.replace(/( *, *)/g," "):n.dashStyle="",n.endcap=c.lineCap.replace("butt","flat"),n.joinstyle=c.lineJoin):n&&(d.removeChild(n),t._stroke=null),c.fill?(a||(a=t._fill=on("fill")),d.appendChild(a),a.color=c.fillColor||c.color,a.opacity=c.fillOpacity):a&&(d.removeChild(a),t._fill=null)},_updateCircle:function(t){var n=t._point.round(),a=Math.round(t._radius),c=Math.round(t._radiusY||a);this._setPath(t,t._empty()?"M0 0":"AL "+n.x+","+n.y+" "+a+","+c+" 0,"+65535*360)},_setPath:function(t,n){t._path.v=n},_bringToFront:function(t){Si(t._container)},_bringToBack:function(t){Mi(t._container)}},Wn=et.vml?on:Y,rn=Re.extend({_initContainer:function(){this._container=Wn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Wn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Dt(this._container),Et(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Re.prototype._update.call(this);var t=this._bounds,n=t.getSize(),a=this._container;(!this._svgSize||!this._svgSize.equals(n))&&(this._svgSize=n,a.setAttribute("width",n.x),a.setAttribute("height",n.y)),Zt(a,t.min),a.setAttribute("viewBox",[t.min.x,t.min.y,n.x,n.y].join(" ")),this.fire("update")}},_initPath:function(t){var n=t._path=Wn("path");t.options.className&&pt(n,t.options.className),t.options.interactive&&pt(n,"leaflet-interactive"),this._updateStyle(t),this._layers[h(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){Dt(t._path),t.removeInteractiveTarget(t._path),delete this._layers[h(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var n=t._path,a=t.options;n&&(a.stroke?(n.setAttribute("stroke",a.color),n.setAttribute("stroke-opacity",a.opacity),n.setAttribute("stroke-width",a.weight),n.setAttribute("stroke-linecap",a.lineCap),n.setAttribute("stroke-linejoin",a.lineJoin),a.dashArray?n.setAttribute("stroke-dasharray",a.dashArray):n.removeAttribute("stroke-dasharray"),a.dashOffset?n.setAttribute("stroke-dashoffset",a.dashOffset):n.removeAttribute("stroke-dashoffset")):n.setAttribute("stroke","none"),a.fill?(n.setAttribute("fill",a.fillColor||a.color),n.setAttribute("fill-opacity",a.fillOpacity),n.setAttribute("fill-rule",a.fillRule||"evenodd")):n.setAttribute("fill","none"))},_updatePoly:function(t,n){this._setPath(t,P(t._parts,n))},_updateCircle:function(t){var n=t._point,a=Math.max(Math.round(t._radius),1),c=Math.max(Math.round(t._radiusY),1)||a,d="a"+a+","+c+" 0 1,0 ",m=t._empty()?"M0 0":"M"+(n.x-a)+","+n.y+d+a*2+",0 "+d+-a*2+",0 ";this._setPath(t,m)},_setPath:function(t,n){t._path.setAttribute("d",n)},_bringToFront:function(t){Si(t._path)},_bringToBack:function(t){Mi(t._path)}});et.vml&&rn.include(Zc);function Br(t){return et.svg||et.vml?new rn(t):null}bt.include({getRenderer:function(t){var n=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return n||(n=this._renderer=this._createRenderer()),this.hasLayer(n)||this.addLayer(n),n},_getPaneRenderer:function(t){if(t==="overlayPane"||t===void 0)return!1;var n=this._paneRenderers[t];return n===void 0&&(n=this._createRenderer({pane:t}),this._paneRenderers[t]=n),n},_createRenderer:function(t){return this.options.preferCanvas&&Nr(t)||Br(t)}});var Dr=Pi.extend({initialize:function(t,n){Pi.prototype.initialize.call(this,this._boundsToLatLngs(t),n)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=Pt(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function qc(t,n){return new Dr(t,n)}rn.create=Wn,rn.pointsToPath=P,De.geometryToLayer=zn,De.coordsToLatLng=Js,De.coordsToLatLngs=On,De.latLngToCoords=Qs,De.latLngsToCoords=Hn,De.getFeature=Ii,De.asFeature=$n,bt.mergeOptions({boxZoom:!0});var Rr=Ee.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){ut(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Et(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Dt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),ji(),Ds(),this._startPoint=this._map.mouseEventToContainerPoint(t),ut(document,{contextmenu:ni,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=xt("div","leaflet-zoom-box",this._container),pt(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var n=new kt(this._point,this._startPoint),a=n.getSize();Zt(this._box,n.min),this._box.style.width=a.x+"px",this._box.style.height=a.y+"px"},_finish:function(){this._moved&&(Dt(this._box),$t(this._container,"leaflet-crosshair")),Ki(),Rs(),Et(document,{contextmenu:ni,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if(!(t.which!==1&&t.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(r(this._resetState,this),0);var n=new Wt(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(n).fire("boxzoomend",{boxZoomBounds:n})}},_onKeyDown:function(t){t.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});bt.addInitHook("addHandler","boxZoom",Rr),bt.mergeOptions({doubleClickZoom:!0});var zr=Ee.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var n=this._map,a=n.getZoom(),c=n.options.zoomDelta,d=t.originalEvent.shiftKey?a-c:a+c;n.options.doubleClickZoom==="center"?n.setZoom(d):n.setZoomAround(t.containerPoint,d)}});bt.addInitHook("addHandler","doubleClickZoom",zr),bt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Or=Ee.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new We(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}pt(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){$t(this._map._container,"leaflet-grab"),$t(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var n=Pt(this._map.options.maxBounds);this._offsetLimit=zt(this._map.latLngToContainerPoint(n.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(n.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var n=this._lastTime=+new Date,a=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(a),this._times.push(n),this._prunePositions(n)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),n=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=n.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,n){return t-(t-n)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var t=this._draggable._newPos.subtract(this._draggable._startPos),n=this._offsetLimit;t.xn.max.x&&(t.x=this._viscousLimit(t.x,n.max.x)),t.y>n.max.y&&(t.y=this._viscousLimit(t.y,n.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,n=Math.round(t/2),a=this._initialWorldOffset,c=this._draggable._newPos.x,d=(c-n+a)%t+n-a,m=(c+n+a)%t-n-a,x=Math.abs(d+a)0?m:-m))-n;this._delta=0,this._startTime=null,x&&(t.options.scrollWheelZoom==="center"?t.setZoom(n+x):t.setZoomAround(this._lastMousePos,n+x))}});bt.addInitHook("addHandler","scrollWheelZoom",$r);var Wc=600;bt.mergeOptions({tapHold:et.touchNative&&et.safari&&et.mobile,tapTolerance:15});var Fr=Ee.extend({addHooks:function(){ut(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Et(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),t.touches.length===1){var n=t.touches[0];this._startPos=this._newPos=new rt(n.clientX,n.clientY),this._holdTimeout=setTimeout(r(function(){this._cancel(),this._isTapValid()&&(ut(document,"touchend",Kt),ut(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",n))},this),Wc),ut(document,"touchend touchcancel contextmenu",this._cancel,this),ut(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Et(document,"touchend",Kt),Et(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Et(document,"touchend touchcancel contextmenu",this._cancel,this),Et(document,"touchmove",this._onMove,this)},_onMove:function(t){var n=t.touches[0];this._newPos=new rt(n.clientX,n.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,n){var a=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY});a._simulated=!0,n.target.dispatchEvent(a)}});bt.addInitHook("addHandler","tapHold",Fr),bt.mergeOptions({touchZoom:et.touch,bounceAtZoomLimits:!0});var Zr=Ee.extend({addHooks:function(){pt(this._map._container,"leaflet-touch-zoom"),ut(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){$t(this._map._container,"leaflet-touch-zoom"),Et(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var n=this._map;if(!(!t.touches||t.touches.length!==2||n._animatingZoom||this._zooming)){var a=n.mouseEventToContainerPoint(t.touches[0]),c=n.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=n.getSize()._divideBy(2),this._startLatLng=n.containerPointToLatLng(this._centerPoint),n.options.touchZoom!=="center"&&(this._pinchStartLatLng=n.containerPointToLatLng(a.add(c)._divideBy(2))),this._startDist=a.distanceTo(c),this._startZoom=n.getZoom(),this._moved=!1,this._zooming=!0,n._stop(),ut(document,"touchmove",this._onTouchMove,this),ut(document,"touchend touchcancel",this._onTouchEnd,this),Kt(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var n=this._map,a=n.mouseEventToContainerPoint(t.touches[0]),c=n.mouseEventToContainerPoint(t.touches[1]),d=a.distanceTo(c)/this._startDist;if(this._zoom=n.getScaleZoom(d,this._startZoom),!n.options.bounceAtZoomLimits&&(this._zoomn.getMaxZoom()&&d>1)&&(this._zoom=n._limitZoom(this._zoom)),n.options.touchZoom==="center"){if(this._center=this._startLatLng,d===1)return}else{var m=a._add(c)._divideBy(2)._subtract(this._centerPoint);if(d===1&&m.x===0&&m.y===0)return;this._center=n.unproject(n.project(this._pinchStartLatLng,this._zoom).subtract(m),this._zoom)}this._moved||(n._moveStart(!0,!1),this._moved=!0),tt(this._animRequest);var x=r(n._move,n,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=nt(x,this,!0),Kt(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,tt(this._animRequest),Et(document,"touchmove",this._onTouchMove,this),Et(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});bt.addInitHook("addHandler","touchZoom",Zr),bt.BoxZoom=Rr,bt.DoubleClickZoom=zr,bt.Drag=Or,bt.Keyboard=Hr,bt.ScrollWheelZoom=$r,bt.TapHold=Fr,bt.TouchZoom=Zr,s.Bounds=kt,s.Browser=et,s.CRS=le,s.Canvas=Ar,s.Circle=Ks,s.CircleMarker=Rn,s.Class=Mt,s.Control=ve,s.DivIcon=Tr,s.DivOverlay=Te,s.DomEvent=lc,s.DomUtil=rc,s.Draggable=We,s.Evented=Yt,s.FeatureGroup=Ne,s.GeoJSON=De,s.GridLayer=sn,s.Handler=Ee,s.Icon=Ti,s.ImageOverlay=Fn,s.LatLng=yt,s.LatLngBounds=Wt,s.Layer=be,s.LayerGroup=Ei,s.LineUtil=wc,s.Map=bt,s.Marker=Dn,s.Mixin=mc,s.Path=Ge,s.Point=rt,s.PolyUtil=_c,s.Polygon=Pi,s.Polyline=Be,s.Popup=Zn,s.PosAnimation=dr,s.Projection=xc,s.Rectangle=Dr,s.Renderer=Re,s.SVG=rn,s.SVGOverlay=Er,s.TileLayer=Ai,s.Tooltip=qn,s.Transformation=fe,s.Util=Ct,s.VideoOverlay=Mr,s.bind=r,s.bounds=zt,s.canvas=Nr,s.circle=Pc,s.circleMarker=Tc,s.control=tn,s.divIcon=Hc,s.extend=i,s.featureGroup=Sc,s.geoJSON=Sr,s.geoJson=Nc,s.gridLayer=$c,s.icon=Mc,s.imageOverlay=Bc,s.latLng=ft,s.latLngBounds=Pt,s.layerGroup=Lc,s.map=cc,s.marker=Ec,s.point=at,s.polygon=Ac,s.polyline=Ic,s.popup=zc,s.rectangle=qc,s.setOptions=w,s.stamp=h,s.svg=Br,s.svgOverlay=Rc,s.tileLayer=Pr,s.tooltip=Oc,s.transformation=C,s.version=e,s.videoOverlay=Dc;var Gc=window.L;s.noConflict=function(){return window.L=Gc,this},window.L=s})});var Ou=ah(Yr());var Vn=globalThis,Yn=Vn.ShadowRoot&&(Vn.ShadyCSS===void 0||Vn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,io=Symbol(),Xr=new WeakMap,an=class{constructor(e,i,o){if(this._$cssResult$=!0,o!==io)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=i}get styleSheet(){let e=this.o,i=this.t;if(Yn&&e===void 0){let o=i!==void 0&&i.length===1;o&&(e=Xr.get(i)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&Xr.set(i,e))}return e}toString(){return this.cssText}},jr=s=>new an(typeof s=="string"?s:s+"",void 0,io),Xn=(s,...e)=>{let i=s.length===1?s[0]:e.reduce((o,r,l)=>o+(h=>{if(h._$cssResult$===!0)return h.cssText;if(typeof h=="number")return h;throw Error("Value passed to 'css' function must be a 'css' function result: "+h+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+s[l+1],s[0]);return new an(i,s,io)},Kr=(s,e)=>{if(Yn)s.adoptedStyleSheets=e.map(i=>i instanceof CSSStyleSheet?i:i.styleSheet);else for(let i of e){let o=document.createElement("style"),r=Vn.litNonce;r!==void 0&&o.setAttribute("nonce",r),o.textContent=i.cssText,s.appendChild(o)}},no=Yn?s=>s:s=>s instanceof CSSStyleSheet?(e=>{let i="";for(let o of e.cssRules)i+=o.cssText;return jr(i)})(s):s;var{is:lh,defineProperty:ch,getOwnPropertyDescriptor:hh,getOwnPropertyNames:dh,getOwnPropertySymbols:uh,getPrototypeOf:ph}=Object,jn=globalThis,Jr=jn.trustedTypes,fh=Jr?Jr.emptyScript:"",mh=jn.reactiveElementPolyfillSupport,ln=(s,e)=>s,so={toAttribute(s,e){switch(e){case Boolean:s=s?fh:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,e){let i=s;switch(e){case Boolean:i=s!==null;break;case Number:i=s===null?null:Number(s);break;case Object:case Array:try{i=JSON.parse(s)}catch{i=null}}return i}},ta=(s,e)=>!lh(s,e),Qr={attribute:!0,type:String,converter:so,reflect:!1,useDefault:!1,hasChanged:ta};Symbol.metadata??=Symbol("metadata"),jn.litPropertyMetadata??=new WeakMap;var ze=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,i=Qr){if(i.state&&(i.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((i=Object.create(i)).wrapped=!0),this.elementProperties.set(e,i),!i.noAccessor){let o=Symbol(),r=this.getPropertyDescriptor(e,o,i);r!==void 0&&ch(this.prototype,e,r)}}static getPropertyDescriptor(e,i,o){let{get:r,set:l}=hh(this.prototype,e)??{get(){return this[i]},set(h){this[i]=h}};return{get:r,set(h){let u=r?.call(this);l?.call(this,h),this.requestUpdate(e,u,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Qr}static _$Ei(){if(this.hasOwnProperty(ln("elementProperties")))return;let e=ph(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(ln("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ln("properties"))){let i=this.properties,o=[...dh(i),...uh(i)];for(let r of o)this.createProperty(r,i[r])}let e=this[Symbol.metadata];if(e!==null){let i=litPropertyMetadata.get(e);if(i!==void 0)for(let[o,r]of i)this.elementProperties.set(o,r)}this._$Eh=new Map;for(let[i,o]of this.elementProperties){let r=this._$Eu(i,o);r!==void 0&&this._$Eh.set(r,i)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let i=[];if(Array.isArray(e)){let o=new Set(e.flat(1/0).reverse());for(let r of o)i.unshift(no(r))}else e!==void 0&&i.push(no(e));return i}static _$Eu(e,i){let o=i.attribute;return o===!1?void 0:typeof o=="string"?o:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,i=this.constructor.elementProperties;for(let o of i.keys())this.hasOwnProperty(o)&&(e.set(o,this[o]),delete this[o]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Kr(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,i,o){this._$AK(e,o)}_$ET(e,i){let o=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,o);if(r!==void 0&&o.reflect===!0){let l=(o.converter?.toAttribute!==void 0?o.converter:so).toAttribute(i,o.type);this._$Em=e,l==null?this.removeAttribute(r):this.setAttribute(r,l),this._$Em=null}}_$AK(e,i){let o=this.constructor,r=o._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let l=o.getPropertyOptions(r),h=typeof l.converter=="function"?{fromAttribute:l.converter}:l.converter?.fromAttribute!==void 0?l.converter:so;this._$Em=r;let u=h.fromAttribute(i,l.type);this[r]=u??this._$Ej?.get(r)??u,this._$Em=null}}requestUpdate(e,i,o,r=!1,l){if(e!==void 0){let h=this.constructor;if(r===!1&&(l=this[e]),o??=h.getPropertyOptions(e),!((o.hasChanged??ta)(l,i)||o.useDefault&&o.reflect&&l===this._$Ej?.get(e)&&!this.hasAttribute(h._$Eu(e,o))))return;this.C(e,i,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,i,{useDefault:o,reflect:r,wrapped:l},h){o&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,h??i??this[e]),l!==!0||h!==void 0)||(this._$AL.has(e)||(this.hasUpdated||o||(i=void 0),this._$AL.set(e,i)),r===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(i){Promise.reject(i)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,l]of this._$Ep)this[r]=l;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[r,l]of o){let{wrapped:h}=l,u=this[r];h!==!0||this._$AL.has(r)||u===void 0||this.C(r,void 0,l,u)}}let e=!1,i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(i)):this._$EM()}catch(o){throw e=!1,this._$EM(),o}e&&this._$AE(i)}willUpdate(e){}_$AE(e){this._$EO?.forEach(i=>i.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(i=>this._$ET(i,this[i])),this._$EM()}updated(e){}firstUpdated(e){}};ze.elementStyles=[],ze.shadowRootOptions={mode:"open"},ze[ln("elementProperties")]=new Map,ze[ln("finalized")]=new Map,mh?.({ReactiveElement:ze}),(jn.reactiveElementVersions??=[]).push("2.1.2");var uo=globalThis,ea=s=>s,Kn=uo.trustedTypes,ia=Kn?Kn.createPolicy("lit-html",{createHTML:s=>s}):void 0,la="$lit$",Ue=`lit$${Math.random().toFixed(9).slice(2)}$`,ca="?"+Ue,_h=`<${ca}>`,ai=document,hn=()=>ai.createComment(""),dn=s=>s===null||typeof s!="object"&&typeof s!="function",po=Array.isArray,gh=s=>po(s)||typeof s?.[Symbol.iterator]=="function",oo=`[ -\f\r]`,cn=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,na=/-->/g,sa=/>/g,oi=RegExp(`>|${oo}(?:([^\\s"'>=/]+)(${oo}*=${oo}*(?:[^ -\f\r"'\`<>=]|("|')|))|$)`,"g"),oa=/'/g,ra=/"/g,ha=/^(?:script|style|textarea|title)$/i,fo=s=>(e,...i)=>({_$litType$:s,strings:e,values:i}),ci=fo(1),se=fo(2),qu=fo(3),li=Symbol.for("lit-noChange"),Rt=Symbol.for("lit-nothing"),aa=new WeakMap,ri=ai.createTreeWalker(ai,129);function da(s,e){if(!po(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return ia!==void 0?ia.createHTML(e):e}var yh=(s,e)=>{let i=s.length-1,o=[],r,l=e===2?"":e===3?"":"",h=cn;for(let u=0;u"?(h=r??cn,g=-1):y[1]===void 0?g=-2:(g=h.lastIndex-y[2].length,_=y[1],h=y[3]===void 0?oi:y[3]==='"'?ra:oa):h===ra||h===oa?h=oi:h===na||h===sa?h=cn:(h=oi,r=void 0);let w=h===oi&&s[u+1].startsWith("/>")?" ":"";l+=h===cn?f+_h:g>=0?(o.push(_),f.slice(0,g)+la+f.slice(g)+Ue+w):f+Ue+(g===-2?u:w)}return[da(s,l+(s[i]||"")+(e===2?"":e===3?"":"")),o]},un=class s{constructor({strings:e,_$litType$:i},o){let r;this.parts=[];let l=0,h=0,u=e.length-1,f=this.parts,[_,y]=yh(e,i);if(this.el=s.createElement(_,o),ri.currentNode=this.el.content,i===2||i===3){let g=this.el.content.firstChild;g.replaceWith(...g.childNodes)}for(;(r=ri.nextNode())!==null&&f.length0){r.textContent=Kn?Kn.emptyScript:"";for(let w=0;w2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=Rt}_$AI(e,i=this,o,r){let l=this.strings,h=!1;if(l===void 0)e=Bi(this,e,i,0),h=!dn(e)||e!==this._$AH&&e!==li,h&&(this._$AH=e);else{let u=e,f,_;for(e=l[0],f=0;f{let o=i?.renderBefore??e,r=o._$litPart$;if(r===void 0){let l=i?.renderBefore??null;o._$litPart$=r=new pn(e.insertBefore(hn(),l),l,void 0,i??{})}return r._$AI(s),r};var mo=globalThis,Pe=class extends ze{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=ua(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return li}};Pe._$litElement$=!0,Pe.finalized=!0,mo.litElementHydrateSupport?.({LitElement:Pe});var bh=mo.litElementPolyfillSupport;bh?.({LitElement:Pe});(mo.litElementVersions??=[]).push("4.2.2");function _o(s,e,i){return s?e(s):i?.(s)}var go=s=>s??Rt;var Jn=class{constructor(){this.eventListeners=new Map}on(e,i){this.eventListeners.has(e)||this.eventListeners.set(e,new Set),this.eventListeners.get(e).add(i)}off(e,i){this.eventListeners.get(e)?.delete(i)}emit(e,...i){let o=this.eventListeners.get(e);if(o)for(let r of o)try{r(...i)}catch(l){console.error(l)}}fire(e,...i){this.emit(e,...i)}};function fn(s,e,i={}){s.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0,detail:i}))}var yo=class extends Pe{static properties={name:{type:String,reflect:!0},maximizable:{type:Boolean,reflect:!0},collapsible:{type:Boolean,reflect:!0},maximized:{type:Boolean,reflect:!0},collapsed:{type:Boolean,reflect:!0}};static styles=Xn` +(()=>{var yh=Object.create;var ia=Object.defineProperty;var vh=Object.getOwnPropertyDescriptor;var bh=Object.getOwnPropertyNames;var wh=Object.getPrototypeOf,xh=Object.prototype.hasOwnProperty;var Ch=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports);var kh=(s,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of bh(e))!xh.call(s,r)&&r!==i&&ia(s,r,{get:()=>e[r],enumerable:!(o=vh(e,r))||o.enumerable});return s};var Lh=(s,e,i)=>(i=s!=null?yh(wh(s)):{},kh(e||!s||!s.__esModule?ia(i,"default",{value:s,enumerable:!0}):i,s));var sa=Ch((jn,na)=>{(function(s,e){typeof jn=="object"&&typeof na<"u"?e(jn):typeof define=="function"&&define.amd?define(["exports"],e):(s=typeof globalThis<"u"?globalThis:s||self,e(s.leaflet={}))})(jn,function(s){"use strict";var e="1.9.4";function i(t){var n,a,c,d;for(a=1,c=arguments.length;a"u"||!L||!L.Mixin)){t=P(t)?t:[t];for(var n=0;n0?Math.floor(t):Math.ceil(t)};rt.prototype={clone:function(){return new rt(this.x,this.y)},add:function(t){return this.clone()._add(at(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(at(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new rt(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new rt(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=ye(this.x),this.y=ye(this.y),this},distanceTo:function(t){t=at(t);var n=t.x-this.x,a=t.y-this.y;return Math.sqrt(n*n+a*a)},equals:function(t){return t=at(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=at(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+y(this.x)+", "+y(this.y)+")"}};function at(t,n,a){return t instanceof rt?t:P(t)?new rt(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new rt(t.x,t.y):new rt(t,n,a)}function kt(t,n){if(t)for(var a=n?[t,n]:t,c=0,d=a.length;c=this.min.x&&a.x<=this.max.x&&n.y>=this.min.y&&a.y<=this.max.y},intersects:function(t){t=Ot(t);var n=this.min,a=this.max,c=t.min,d=t.max,m=d.x>=n.x&&c.x<=a.x,x=d.y>=n.y&&c.y<=a.y;return m&&x},overlaps:function(t){t=Ot(t);var n=this.min,a=this.max,c=t.min,d=t.max,m=d.x>n.x&&c.xn.y&&c.y=n.lat&&d.lat<=a.lat&&c.lng>=n.lng&&d.lng<=a.lng},intersects:function(t){t=At(t);var n=this._southWest,a=this._northEast,c=t.getSouthWest(),d=t.getNorthEast(),m=d.lat>=n.lat&&c.lat<=a.lat,x=d.lng>=n.lng&&c.lng<=a.lng;return m&&x},overlaps:function(t){t=At(t);var n=this._southWest,a=this._northEast,c=t.getSouthWest(),d=t.getNorthEast(),m=d.lat>n.lat&&c.latn.lng&&c.lng1,lt=function(){var t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",_,n),window.removeEventListener("testPassiveEventSupport",_,n)}catch{}return t}(),Dt=function(){return!!document.createElement("canvas").getContext}(),oe=!!(document.createElementNS&&Y("svg").createSVGRect),Ge=!!oe&&function(){var t=document.createElement("div");return t.innerHTML="",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),An=!oe&&function(){try{var t=document.createElement("div");t.innerHTML='';var n=t.firstChild;return n.style.behavior="url(#default#VML)",n&&typeof n.adj=="object"}catch{return!1}}(),dc=navigator.platform.indexOf("Mac")===0,uc=navigator.platform.indexOf("Linux")===0;function Me(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var et={ie:I,ielt9:z,edge:ct,webkit:Lt,android:Xt,android23:zt,androidStock:Se,opera:Ue,chrome:Bt,gecko:ii,safari:M,phantom:H,opera12:F,win:U,ie3d:O,webkit3d:W,gecko3d:q,any3d:R,mobile:X,mobileWebkit:j,mobileWebkit3d:vt,msPointer:mt,pointer:St,touch:Ht,touchNative:Tt,mobileOpera:ce,mobileGecko:K,retina:st,passiveEvents:lt,canvas:Dt,svg:oe,vml:An,inlineSvg:Ge,mac:dc,linux:uc},ar=et.msPointer?"MSPointerDown":"pointerdown",lr=et.msPointer?"MSPointerMove":"pointermove",cr=et.msPointer?"MSPointerUp":"pointerup",hr=et.msPointer?"MSPointerCancel":"pointercancel",Zs={touchstart:ar,touchmove:lr,touchend:cr,touchcancel:hr},dr={touchstart:yc,touchmove:In,touchend:In,touchcancel:In},Ei={},ur=!1;function pc(t,n,a){return n==="touchstart"&&gc(),dr[n]?(a=dr[n].bind(this,a),t.addEventListener(Zs[n],a,!1),a):(console.warn("wrong event specified:",n),_)}function fc(t,n,a){if(!Zs[n]){console.warn("wrong event specified:",n);return}t.removeEventListener(Zs[n],a,!1)}function mc(t){Ei[t.pointerId]=t}function _c(t){Ei[t.pointerId]&&(Ei[t.pointerId]=t)}function pr(t){delete Ei[t.pointerId]}function gc(){ur||(document.addEventListener(ar,mc,!0),document.addEventListener(lr,_c,!0),document.addEventListener(cr,pr,!0),document.addEventListener(hr,pr,!0),ur=!0)}function In(t,n){if(n.pointerType!==(n.MSPOINTER_TYPE_MOUSE||"mouse")){n.touches=[];for(var a in Ei)n.touches.push(Ei[a]);n.changedTouches=[n],t(n)}}function yc(t,n){n.MSPOINTER_TYPE_TOUCH&&n.pointerType===n.MSPOINTER_TYPE_TOUCH&&Kt(n),In(t,n)}function vc(t){var n={},a,c;for(c in t)a=t[c],n[c]=a&&a.bind?a.bind(t):a;return t=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}var bc=200;function wc(t,n){t.addEventListener("dblclick",n);var a=0,c;function d(m){if(m.detail!==1){c=m.detail;return}if(!(m.pointerType==="mouse"||m.sourceCapabilities&&!m.sourceCapabilities.firesTouchEvents)){var x=yr(m);if(!(x.some(function(E){return E instanceof HTMLLabelElement&&E.attributes.for})&&!x.some(function(E){return E instanceof HTMLInputElement||E instanceof HTMLSelectElement}))){var S=Date.now();S-a<=bc?(c++,c===2&&n(vc(m))):c=1,a=S}}}return t.addEventListener("click",d),{dblclick:n,simDblclick:d}}function xc(t,n){t.removeEventListener("dblclick",n.dblclick),t.removeEventListener("click",n.simDblclick)}var qs=Dn(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Ji=Dn(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),fr=Ji==="webkitTransition"||Ji==="OTransition"?Ji+"End":"transitionend";function mr(t){return typeof t=="string"?document.getElementById(t):t}function Qi(t,n){var a=t.style[n]||t.currentStyle&&t.currentStyle[n];if((!a||a==="auto")&&document.defaultView){var c=document.defaultView.getComputedStyle(t,null);a=c?c[n]:null}return a==="auto"?null:a}function xt(t,n,a){var c=document.createElement(t);return c.className=n||"",a&&a.appendChild(c),c}function Rt(t){var n=t.parentNode;n&&n.removeChild(t)}function Nn(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Ti(t){var n=t.parentNode;n&&n.lastChild!==t&&n.appendChild(t)}function Pi(t){var n=t.parentNode;n&&n.firstChild!==t&&n.insertBefore(t,n.firstChild)}function Ws(t,n){if(t.classList!==void 0)return t.classList.contains(n);var a=Bn(t);return a.length>0&&new RegExp("(^|\\s)"+n+"(\\s|$)").test(a)}function pt(t,n){if(t.classList!==void 0)for(var a=v(n),c=0,d=a.length;c0?2*window.devicePixelRatio:1;function br(t){return et.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/Lc:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}function io(t,n){var a=n.relatedTarget;if(!a)return!0;try{for(;a&&a!==t;)a=a.parentNode}catch{return!1}return a!==t}var Sc={__proto__:null,on:ut,off:Et,stopPropagation:oi,disableScrollPropagation:eo,disableClickPropagation:sn,preventDefault:Kt,stop:ri,getPropagationPath:yr,getMousePosition:vr,getWheelDelta:br,isExternalTarget:io,addListener:ut,removeListener:Et},wr=Yt.extend({run:function(t,n,a,c){this.stop(),this._el=t,this._inProgress=!0,this._duration=a||.25,this._easeOutPower=1/Math.max(c||.5,.2),this._startPos=si(t),this._offset=n.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=nt(this._animate,this),this._step()},_step:function(t){var n=+new Date-this._startTime,a=this._duration*1e3;nthis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,n){this._enforcingBounds=!0;var a=this.getCenter(),c=this._limitCenter(a,this._zoom,At(t));return a.equals(c)||this.panTo(c,n),this._enforcingBounds=!1,this},panInside:function(t,n){n=n||{};var a=at(n.paddingTopLeft||n.padding||[0,0]),c=at(n.paddingBottomRight||n.padding||[0,0]),d=this.project(this.getCenter()),m=this.project(t),x=this.getPixelBounds(),S=Ot([x.min.add(a),x.max.subtract(c)]),E=S.getSize();if(!S.contains(m)){this._enforcingBounds=!0;var N=m.subtract(S.getCenter()),V=S.extend(m).getSize().subtract(E);d.x+=N.x<0?-V.x:V.x,d.y+=N.y<0?-V.y:V.y,this.panTo(this.unproject(d),n),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},t===!0?{animate:!0}:t);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var a=this.getSize(),c=n.divideBy(2).round(),d=a.divideBy(2).round(),m=c.subtract(d);return!m.x&&!m.y?this:(t.animate&&t.pan?this.panBy(m):(t.pan&&this._rawPanBy(m),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(r(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:a}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=r(this._handleGeolocationResponse,this),a=r(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,a,t):navigator.geolocation.getCurrentPosition(n,a,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var n=t.code,a=t.message||(n===1?"permission denied":n===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:n,message:"Geolocation error: "+a+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var n=t.coords.latitude,a=t.coords.longitude,c=new yt(n,a),d=c.toBounds(t.coords.accuracy*2),m=this._locateOptions;if(m.setView){var x=this.getBoundsZoom(d);this.setView(c,m.maxZoom?Math.min(x,m.maxZoom):x)}var S={latlng:c,bounds:d,timestamp:t.timestamp};for(var E in t.coords)typeof t.coords[E]=="number"&&(S[E]=t.coords[E]);this.fire("locationfound",S)}},addHandler:function(t,n){if(!n)return this;var a=this[t]=new n(this);return this._handlers.push(a),this.options[t]&&a.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Rt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(tt(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)Rt(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,n){var a="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),c=xt("div",a,n||this._mapPane);return t&&(this._panes[t]=c),c},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),n=this.unproject(t.getBottomLeft()),a=this.unproject(t.getTopRight());return new Wt(n,a)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,n,a){t=At(t),a=at(a||[0,0]);var c=this.getZoom()||0,d=this.getMinZoom(),m=this.getMaxZoom(),x=t.getNorthWest(),S=t.getSouthEast(),E=this.getSize().subtract(a),N=Ot(this.project(S,c),this.project(x,c)).getSize(),V=et.any3d?this.options.zoomSnap:1,ot=E.x/N.x,_t=E.y/N.y,ne=n?Math.max(ot,_t):Math.min(ot,_t);return c=this.getScaleZoom(ne,c),V&&(c=Math.round(c/(V/100))*(V/100),c=n?Math.ceil(c/V)*V:Math.floor(c/V)*V),Math.max(d,Math.min(m,c))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new rt(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,n){var a=this._getTopLeftPoint(t,n);return new kt(a,a.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,n){var a=this.options.crs;return n=n===void 0?this._zoom:n,a.scale(t)/a.scale(n)},getScaleZoom:function(t,n){var a=this.options.crs;n=n===void 0?this._zoom:n;var c=a.zoom(t*a.scale(n));return isNaN(c)?1/0:c},project:function(t,n){return n=n===void 0?this._zoom:n,this.options.crs.latLngToPoint(ft(t),n)},unproject:function(t,n){return n=n===void 0?this._zoom:n,this.options.crs.pointToLatLng(at(t),n)},layerPointToLatLng:function(t){var n=at(t).add(this.getPixelOrigin());return this.unproject(n)},latLngToLayerPoint:function(t){var n=this.project(ft(t))._round();return n._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(ft(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(At(t))},distance:function(t,n){return this.options.crs.distance(ft(t),ft(n))},containerPointToLayerPoint:function(t){return at(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return at(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var n=this.containerPointToLayerPoint(at(t));return this.layerPointToLatLng(n)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ft(t)))},mouseEventToContainerPoint:function(t){return vr(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var n=this._container=mr(t);if(n){if(n._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");ut(n,"scroll",this._onScroll,this),this._containerId=h(n)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&et.any3d,pt(t,"leaflet-container"+(et.touch?" leaflet-touch":"")+(et.retina?" leaflet-retina":"")+(et.ielt9?" leaflet-oldie":"")+(et.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var n=Qi(t,"position");n!=="absolute"&&n!=="relative"&&n!=="fixed"&&n!=="sticky"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Zt(this._mapPane,new rt(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(pt(t.markerPane,"leaflet-zoom-hide"),pt(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,n,a){Zt(this._mapPane,new rt(0,0));var c=!this._loaded;this._loaded=!0,n=this._limitZoom(n),this.fire("viewprereset");var d=this._zoom!==n;this._moveStart(d,a)._move(t,n)._moveEnd(d),this.fire("viewreset"),c&&this.fire("load")},_moveStart:function(t,n){return t&&this.fire("zoomstart"),n||this.fire("movestart"),this},_move:function(t,n,a,c){n===void 0&&(n=this._zoom);var d=this._zoom!==n;return this._zoom=n,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),c?a&&a.pinch&&this.fire("zoom",a):((d||a&&a.pinch)&&this.fire("zoom",a),this.fire("move",a)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return tt(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Zt(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[h(this._container)]=this;var n=t?Et:ut;n(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&n(window,"resize",this._onResize,this),et.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){tt(this._resizeRequest),this._resizeRequest=nt(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,n){for(var a=[],c,d=n==="mouseout"||n==="mouseover",m=t.target||t.srcElement,x=!1;m;){if(c=this._targets[h(m)],c&&(n==="click"||n==="preclick")&&this._draggableMoved(c)){x=!0;break}if(c&&c.listens(n,!0)&&(d&&!io(m,t)||(a.push(c),d))||m===this._container)break;m=m.parentNode}return!a.length&&!x&&!d&&this.listens(n,!0)&&(a=[this]),a},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var n=t.target||t.srcElement;if(!(!this._loaded||n._leaflet_disable_events||t.type==="click"&&this._isClickDisabled(n))){var a=t.type;a==="mousedown"&&js(n),this._fireDOMEvent(t,a)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,n,a){if(t.type==="click"){var c=i({},t);c.type="preclick",this._fireDOMEvent(c,c.type,a)}var d=this._findEventTargets(t,n);if(a){for(var m=[],x=0;x0?Math.round(t-n)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(n))},_limitZoom:function(t){var n=this.getMinZoom(),a=this.getMaxZoom(),c=et.any3d?this.options.zoomSnap:1;return c&&(t=Math.round(t/c)*c),Math.max(n,Math.min(a,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){$t(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,n){var a=this._getCenterOffset(t)._trunc();return(n&&n.animate)!==!0&&!this.getSize().contains(a)?!1:(this.panBy(a,n),!0)},_createAnimProxy:function(){var t=this._proxy=xt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(n){var a=qs,c=this._proxy.style[a];ni(this._proxy,this.project(n.center,n.zoom),this.getZoomScale(n.zoom,1)),c===this._proxy.style[a]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Rt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),n=this.getZoom();ni(this._proxy,this.project(t,n),this.getZoomScale(n,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,n,a){if(this._animatingZoom)return!0;if(a=a||{},!this._zoomAnimated||a.animate===!1||this._nothingToAnimate()||Math.abs(n-this._zoom)>this.options.zoomAnimationThreshold)return!1;var c=this.getZoomScale(n),d=this._getCenterOffset(t)._divideBy(1-1/c);return a.animate!==!0&&!this.getSize().contains(d)?!1:(nt(function(){this._moveStart(!0,a.noMoveStart||!1)._animateZoom(t,n,!0)},this),!0)},_animateZoom:function(t,n,a,c){this._mapPane&&(a&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=n,pt(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:n,noUpdate:c}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(r(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&$t(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Mc(t,n){return new bt(t,n)}var ve=Mt.extend({options:{position:"topright"},initialize:function(t){w(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var n=this._map;return n&&n.removeControl(this),this.options.position=t,n&&n.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var n=this._container=this.onAdd(t),a=this.getPosition(),c=t._controlCorners[a];return pt(n,"leaflet-control"),a.indexOf("bottom")!==-1?c.insertBefore(n,c.firstChild):c.appendChild(n),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Rt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),on=function(t){return new ve(t)};bt.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},n="leaflet-",a=this._controlContainer=xt("div",n+"control-container",this._container);function c(d,m){var x=n+d+" "+n+m;t[d+m]=xt("div",x,a)}c("top","left"),c("top","right"),c("bottom","left"),c("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)Rt(this._controlCorners[t]);Rt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var xr=ve.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,n,a,c){return a1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=n&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var n=this._getLayer(h(t.target)),a=n.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;a&&this._map.fire(a,n)},_createRadioElement:function(t,n){var a='",c=document.createElement("div");return c.innerHTML=a,c.firstChild},_addItem:function(t){var n=document.createElement("label"),a=this._map.hasLayer(t.layer),c;t.overlay?(c=document.createElement("input"),c.type="checkbox",c.className="leaflet-control-layers-selector",c.defaultChecked=a):c=this._createRadioElement("leaflet-base-layers_"+h(this),a),this._layerControlInputs.push(c),c.layerId=h(t.layer),ut(c,"click",this._onInputClick,this);var d=document.createElement("span");d.innerHTML=" "+t.name;var m=document.createElement("span");n.appendChild(m),m.appendChild(c),m.appendChild(d);var x=t.overlay?this._overlaysList:this._baseLayersList;return x.appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,n,a,c=[],d=[];this._handlingClick=!0;for(var m=t.length-1;m>=0;m--)n=t[m],a=this._getLayer(n.layerId).layer,n.checked?c.push(a):n.checked||d.push(a);for(m=0;m=0;d--)n=t[d],a=this._getLayer(n.layerId).layer,n.disabled=a.options.minZoom!==void 0&&ca.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,ut(t,"click",Kt),this.expand();var n=this;setTimeout(function(){Et(t,"click",Kt),n._preventClick=!1})}}),Ec=function(t,n,a){return new xr(t,n,a)},no=ve.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var n="leaflet-control-zoom",a=xt("div",n+" leaflet-bar"),c=this.options;return this._zoomInButton=this._createButton(c.zoomInText,c.zoomInTitle,n+"-in",a,this._zoomIn),this._zoomOutButton=this._createButton(c.zoomOutText,c.zoomOutTitle,n+"-out",a,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),a},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,n,a,c,d){var m=xt("a",a,c);return m.innerHTML=t,m.href="#",m.title=n,m.setAttribute("role","button"),m.setAttribute("aria-label",n),sn(m),ut(m,"click",ri),ut(m,"click",d,this),ut(m,"click",this._refocusOnMap,this),m},_updateDisabled:function(){var t=this._map,n="leaflet-disabled";$t(this._zoomInButton,n),$t(this._zoomOutButton,n),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(pt(this._zoomOutButton,n),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(pt(this._zoomInButton,n),this._zoomInButton.setAttribute("aria-disabled","true"))}});bt.mergeOptions({zoomControl:!0}),bt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new no,this.addControl(this.zoomControl))});var Tc=function(t){return new no(t)},Cr=ve.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var n="leaflet-control-scale",a=xt("div",n),c=this.options;return this._addScales(c,n+"-line",a),t.on(c.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),a},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,n,a){t.metric&&(this._mScale=xt("div",n,a)),t.imperial&&(this._iScale=xt("div",n,a))},_update:function(){var t=this._map,n=t.getSize().y/2,a=t.distance(t.containerPointToLatLng([0,n]),t.containerPointToLatLng([this.options.maxWidth,n]));this._updateScales(a)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var n=this._getRoundNum(t),a=n<1e3?n+" m":n/1e3+" km";this._updateScale(this._mScale,a,n/t)},_updateImperial:function(t){var n=t*3.2808399,a,c,d;n>5280?(a=n/5280,c=this._getRoundNum(a),this._updateScale(this._iScale,c+" mi",c/a)):(d=this._getRoundNum(n),this._updateScale(this._iScale,d+" ft",d/n))},_updateScale:function(t,n,a){t.style.width=Math.round(this.options.maxWidth*a)+"px",t.innerHTML=n},_getRoundNum:function(t){var n=Math.pow(10,(Math.floor(t)+"").length-1),a=t/n;return a=a>=10?10:a>=5?5:a>=3?3:a>=2?2:1,n*a}}),Pc=function(t){return new Cr(t)},Ac='',so=ve.extend({options:{position:"bottomright",prefix:''+(et.inlineSvg?Ac+" ":"")+"Leaflet"},initialize:function(t){w(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=xt("div","leaflet-control-attribution"),sn(this._container);for(var n in t._layers)t._layers[n].getAttribution&&this.addAttribution(t._layers[n].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var n in this._attributions)this._attributions[n]&&t.push(n);var a=[];this.options.prefix&&a.push(this.options.prefix),t.length&&a.push(t.join(", ")),this._container.innerHTML=a.join(' ')}}});bt.mergeOptions({attributionControl:!0}),bt.addInitHook(function(){this.options.attributionControl&&new so().addTo(this)});var Ic=function(t){return new so(t)};ve.Layers=xr,ve.Zoom=no,ve.Scale=Cr,ve.Attribution=so,on.layers=Ec,on.zoom=Tc,on.scale=Pc,on.attribution=Ic;var Te=Mt.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Te.addTo=function(t,n){return t.addHandler(n,this),this};var Nc={Events:Nt},kr=et.touch?"touchstart mousedown":"mousedown",Ve=Yt.extend({options:{clickTolerance:3},initialize:function(t,n,a,c){w(this,c),this._element=t,this._dragStartTarget=n||t,this._preventOutline=a},enable:function(){this._enabled||(ut(this._dragStartTarget,kr,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Ve._dragging===this&&this.finishDrag(!0),Et(this._dragStartTarget,kr,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!Ws(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){Ve._dragging===this&&this.finishDrag();return}if(!(Ve._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(Ve._dragging=this,this._preventOutline&&js(this._element),Vs(),tn(),!this._moving)){this.fire("down");var n=t.touches?t.touches[0]:t,a=_r(this._element);this._startPoint=new rt(n.clientX,n.clientY),this._startPos=si(this._element),this._parentScale=Ks(a);var c=t.type==="mousedown";ut(document,c?"mousemove":"touchmove",this._onMove,this),ut(document,c?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var n=t.touches&&t.touches.length===1?t.touches[0]:t,a=new rt(n.clientX,n.clientY)._subtract(this._startPoint);!a.x&&!a.y||Math.abs(a.x)+Math.abs(a.y)m&&(x=S,m=E);m>a&&(n[x]=1,ro(t,n,a,c,x),ro(t,n,a,x,d))}function Oc(t,n){for(var a=[t[0]],c=1,d=0,m=t.length;cn&&(a.push(t[c]),d=c);return dn.max.x&&(a|=2),t.yn.max.y&&(a|=8),a}function zc(t,n){var a=n.x-t.x,c=n.y-t.y;return a*a+c*c}function rn(t,n,a,c){var d=n.x,m=n.y,x=a.x-d,S=a.y-m,E=x*x+S*S,N;return E>0&&(N=((t.x-d)*x+(t.y-m)*S)/E,N>1?(d=a.x,m=a.y):N>0&&(d+=x*N,m+=S*N)),x=t.x-d,S=t.y-m,c?x*x+S*S:new rt(d,m)}function _e(t){return!P(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]<"u"}function Ar(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),_e(t)}function Ir(t,n){var a,c,d,m,x,S,E,N;if(!t||t.length===0)throw new Error("latlngs not passed");_e(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var V=ft([0,0]),ot=At(t),_t=ot.getNorthWest().distanceTo(ot.getSouthWest())*ot.getNorthEast().distanceTo(ot.getNorthWest());_t<1700&&(V=oo(t));var ne=t.length,Ut=[];for(a=0;ac){E=(m-c)/d,N=[S.x-E*(S.x-x.x),S.y-E*(S.y-x.y)];break}var re=n.unproject(at(N));return ft([re.lat+V.lat,re.lng+V.lng])}var Hc={__proto__:null,simplify:Mr,pointToSegmentDistance:Er,closestPointOnSegment:Dc,clipSegment:Pr,_getEdgeIntersection:zn,_getBitCode:ai,_sqClosestPointOnSegment:rn,isFlat:_e,_flat:Ar,polylineCenter:Ir},ao={project:function(t){return new rt(t.lng,t.lat)},unproject:function(t){return new yt(t.y,t.x)},bounds:new kt([-180,-90],[180,90])},lo={R:6378137,R_MINOR:6356752314245179e-9,bounds:new kt([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var n=Math.PI/180,a=this.R,c=t.lat*n,d=this.R_MINOR/a,m=Math.sqrt(1-d*d),x=m*Math.sin(c),S=Math.tan(Math.PI/4-c/2)/Math.pow((1-x)/(1+x),m/2);return c=-a*Math.log(Math.max(S,1e-10)),new rt(t.lng*n*a,c)},unproject:function(t){for(var n=180/Math.PI,a=this.R,c=this.R_MINOR/a,d=Math.sqrt(1-c*c),m=Math.exp(-t.y/a),x=Math.PI/2-2*Math.atan(m),S=0,E=.1,N;S<15&&Math.abs(E)>1e-7;S++)N=d*Math.sin(x),N=Math.pow((1-N)/(1+N),d/2),E=Math.PI/2-2*Math.atan(m*N)-x,x+=E;return new yt(x*n,t.x*n/a)}},$c={__proto__:null,LonLat:ao,Mercator:lo,SphericalMercator:ee},Fc=i({},ie,{code:"EPSG:3395",projection:lo,transformation:function(){var t=.5/(Math.PI*lo.R);return k(t,.5,-t,.5)}()}),Nr=i({},ie,{code:"EPSG:4326",projection:ao,transformation:k(1/180,1,-1/180,.5)}),Zc=i({},le,{projection:ao,transformation:k(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,n){var a=n.lng-t.lng,c=n.lat-t.lat;return Math.sqrt(a*a+c*c)},infinite:!0});le.Earth=ie,le.EPSG3395=Fc,le.EPSG3857=$,le.EPSG900913=D,le.EPSG4326=Nr,le.Simple=Zc;var be=Yt.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[h(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[h(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var n=t.target;if(n.hasLayer(this)){if(this._map=n,this._zoomAnimated=n._zoomAnimated,this.getEvents){var a=this.getEvents();n.on(a,this),this.once("remove",function(){n.off(a,this)},this)}this.onAdd(n),this.fire("add"),n.fire("layeradd",{layer:this})}}});bt.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var n=h(t);return this._layers[n]?this:(this._layers[n]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var n=h(t);return this._layers[n]?(this._loaded&&t.onRemove(this),delete this._layers[n],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return h(t)in this._layers},eachLayer:function(t,n){for(var a in this._layers)t.call(n,this._layers[a]);return this},_addLayers:function(t){t=t?P(t)?t:[t]:[];for(var n=0,a=t.length;nthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&n[0]instanceof yt&&n[0].equals(n[a-1])&&n.pop(),n},_setLatLngs:function(t){Re.prototype._setLatLngs.call(this,t),_e(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return _e(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,n=this.options.weight,a=new rt(n,n);if(t=new kt(t.min.subtract(a),t.max.add(a)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(var c=0,d=this._rings.length,m;ct.y!=d.y>t.y&&t.x<(d.x-c.x)*(t.y-c.y)/(d.y-c.y)+c.x&&(n=!n);return n||Re.prototype._containsPoint.call(this,t,!0)}});function jc(t,n){return new Ni(t,n)}var Oe=De.extend({initialize:function(t,n){w(this,n),this._layers={},t&&this.addData(t)},addData:function(t){var n=P(t)?t:t.features,a,c,d;if(n){for(a=0,c=n.length;a0&&d.push(d[0].slice()),d}function Bi(t,n){return t.feature?i({},t.feature,{geometry:n}):Wn(n)}function Wn(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var po={toGeoJSON:function(t){return Bi(this,{type:"Point",coordinates:uo(this.getLatLng(),t)})}};Hn.include(po),co.include(po),$n.include(po),Re.include({toGeoJSON:function(t){var n=!_e(this._latlngs),a=qn(this._latlngs,n?1:0,!1,t);return Bi(this,{type:(n?"Multi":"")+"LineString",coordinates:a})}}),Ni.include({toGeoJSON:function(t){var n=!_e(this._latlngs),a=n&&!_e(this._latlngs[0]),c=qn(this._latlngs,a?2:n?1:0,!0,t);return n||(c=[c]),Bi(this,{type:(a?"Multi":"")+"Polygon",coordinates:c})}}),Ai.include({toMultiPoint:function(t){var n=[];return this.eachLayer(function(a){n.push(a.toGeoJSON(t).geometry.coordinates)}),Bi(this,{type:"MultiPoint",coordinates:n})},toGeoJSON:function(t){var n=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(n==="MultiPoint")return this.toMultiPoint(t);var a=n==="GeometryCollection",c=[];return this.eachLayer(function(d){if(d.toGeoJSON){var m=d.toGeoJSON(t);if(a)c.push(m.geometry);else{var x=Wn(m);x.type==="FeatureCollection"?c.push.apply(c,x.features):c.push(x)}}}),a?Bi(this,{geometries:c,type:"GeometryCollection"}):{type:"FeatureCollection",features:c}}});function Rr(t,n){return new Oe(t,n)}var Kc=Rr,Un=be.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,n,a){this._url=t,this._bounds=At(n),w(this,a)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(pt(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Rt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&Ti(this._image),this},bringToBack:function(){return this._map&&Pi(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=At(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._url.tagName==="IMG",n=this._image=t?this._url:xt("img");if(pt(n,"leaflet-image-layer"),this._zoomAnimated&&pt(n,"leaflet-zoom-animated"),this.options.className&&pt(n,this.options.className),n.onselectstart=_,n.onmousemove=_,n.onload=r(this.fire,this,"load"),n.onerror=r(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(n.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t){this._url=n.src;return}n.src=this._url,n.alt=this.options.alt},_animateZoom:function(t){var n=this._map.getZoomScale(t.zoom),a=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;ni(this._image,a,n)},_reset:function(){var t=this._image,n=new kt(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),a=n.getSize();Zt(t,n.min),t.style.width=a.x+"px",t.style.height=a.y+"px"},_updateOpacity:function(){me(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Jc=function(t,n,a){return new Un(t,n,a)},Or=Un.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t=this._url.tagName==="VIDEO",n=this._image=t?this._url:xt("video");if(pt(n,"leaflet-image-layer"),this._zoomAnimated&&pt(n,"leaflet-zoom-animated"),this.options.className&&pt(n,this.options.className),n.onselectstart=_,n.onmousemove=_,n.onloadeddata=r(this.fire,this,"load"),t){for(var a=n.getElementsByTagName("source"),c=[],d=0;d0?c:[n.src];return}P(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(n.style,"objectFit")&&(n.style.objectFit="fill"),n.autoplay=!!this.options.autoplay,n.loop=!!this.options.loop,n.muted=!!this.options.muted,n.playsInline=!!this.options.playsInline;for(var m=0;md?(n.height=d+"px",pt(t,m)):$t(t,m),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var n=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),a=this._getAnchor();Zt(this._container,n.add(a))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,n=parseInt(Qi(this._container,"marginBottom"),10)||0,a=this._container.offsetHeight+n,c=this._containerWidth,d=new rt(this._containerLeft,-a-this._containerBottom);d._add(si(this._container));var m=t.layerPointToContainerPoint(d),x=at(this.options.autoPanPadding),S=at(this.options.autoPanPaddingTopLeft||x),E=at(this.options.autoPanPaddingBottomRight||x),N=t.getSize(),V=0,ot=0;m.x+c+E.x>N.x&&(V=m.x+c-N.x+E.x),m.x-V-S.x<0&&(V=m.x-S.x),m.y+a+E.y>N.y&&(ot=m.y+a-N.y+E.y),m.y-ot-S.y<0&&(ot=m.y-S.y),(V||ot)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([V,ot]))}},_getAnchor:function(){return at(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),eh=function(t,n){return new Gn(t,n)};bt.mergeOptions({closePopupOnClick:!0}),bt.include({openPopup:function(t,n,a){return this._initOverlay(Gn,t,n,a).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),be.include({bindPopup:function(t,n){return this._popup=this._initOverlay(Gn,this._popup,t,n),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof De||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(!(!this._popup||!this._map)){ri(t);var n=t.layer||t.target;if(this._popup._source===n&&!(n instanceof Ye)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng);return}this._popup._source=n,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){t.originalEvent.keyCode===13&&this._openPopup(t)}});var Vn=Pe.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Pe.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Pe.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Pe.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip",n=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=xt("div",n),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+h(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var n,a,c=this._map,d=this._container,m=c.latLngToContainerPoint(c.getCenter()),x=c.layerPointToContainerPoint(t),S=this.options.direction,E=d.offsetWidth,N=d.offsetHeight,V=at(this.options.offset),ot=this._getAnchor();S==="top"?(n=E/2,a=N):S==="bottom"?(n=E/2,a=0):S==="center"?(n=E/2,a=N/2):S==="right"?(n=0,a=N/2):S==="left"?(n=E,a=N/2):x.xthis.options.maxZoom||ac?this._retainParent(d,m,x,c):!1)},_retainChildren:function(t,n,a,c){for(var d=2*t;d<2*t+2;d++)for(var m=2*n;m<2*n+2;m++){var x=new rt(d,m);x.z=a+1;var S=this._tileCoordsToKey(x),E=this._tiles[S];if(E&&E.active){E.retain=!0;continue}else E&&E.loaded&&(E.retain=!0);a+1this.options.maxZoom||this.options.minZoom!==void 0&&d1){this._setView(t,a);return}for(var ot=d.min.y;ot<=d.max.y;ot++)for(var _t=d.min.x;_t<=d.max.x;_t++){var ne=new rt(_t,ot);if(ne.z=this._tileZoom,!!this._isValidTile(ne)){var Ut=this._tiles[this._tileCoordsToKey(ne)];Ut?Ut.current=!0:x.push(ne)}}if(x.sort(function(re,Ri){return re.distanceTo(m)-Ri.distanceTo(m)}),x.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var ge=document.createDocumentFragment();for(_t=0;_ta.max.x)||!n.wrapLat&&(t.ya.max.y))return!1}if(!this.options.bounds)return!0;var c=this._tileCoordsToBounds(t);return At(this.options.bounds).overlaps(c)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var n=this._map,a=this.getTileSize(),c=t.scaleBy(a),d=c.add(a),m=n.unproject(c,t.z),x=n.unproject(d,t.z);return[m,x]},_tileCoordsToBounds:function(t){var n=this._tileCoordsToNwSe(t),a=new Wt(n[0],n[1]);return this.options.noWrap||(a=this._map.wrapLatLngBounds(a)),a},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var n=t.split(":"),a=new rt(+n[0],+n[1]);return a.z=+n[2],a},_removeTile:function(t){var n=this._tiles[t];n&&(Rt(n.el),delete this._tiles[t],this.fire("tileunload",{tile:n.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){pt(t,"leaflet-tile");var n=this.getTileSize();t.style.width=n.x+"px",t.style.height=n.y+"px",t.onselectstart=_,t.onmousemove=_,et.ielt9&&this.options.opacity<1&&me(t,this.options.opacity)},_addTile:function(t,n){var a=this._getTilePos(t),c=this._tileCoordsToKey(t),d=this.createTile(this._wrapCoords(t),r(this._tileReady,this,t));this._initTile(d),this.createTile.length<2&&nt(r(this._tileReady,this,t,null,d)),Zt(d,a),this._tiles[c]={el:d,coords:t,current:!0},n.appendChild(d),this.fire("tileloadstart",{tile:d,coords:t})},_tileReady:function(t,n,a){n&&this.fire("tileerror",{error:n,tile:a,coords:t});var c=this._tileCoordsToKey(t);a=this._tiles[c],a&&(a.loaded=+new Date,this._map._fadeAnimated?(me(a.el,0),tt(this._fadeFrame),this._fadeFrame=nt(this._updateOpacity,this)):(a.active=!0,this._pruneTiles()),n||(pt(a.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:a.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),et.ielt9||!this._map._fadeAnimated?nt(this._pruneTiles,this):setTimeout(r(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var n=new rt(this._wrapX?f(t.x,this._wrapX):t.x,this._wrapY?f(t.y,this._wrapY):t.y);return n.z=t.z,n},_pxBoundsToTileRange:function(t){var n=this.getTileSize();return new kt(t.min.unscaleBy(n).floor(),t.max.unscaleBy(n).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function sh(t){return new ln(t)}var Di=ln.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,n){this._url=t,n=w(this,n),n.detectRetina&&et.retina&&n.maxZoom>0?(n.tileSize=Math.floor(n.tileSize/2),n.zoomReverse?(n.zoomOffset--,n.minZoom=Math.min(n.maxZoom,n.minZoom+1)):(n.zoomOffset++,n.maxZoom=Math.max(n.minZoom,n.maxZoom-1)),n.minZoom=Math.max(0,n.minZoom)):n.zoomReverse?n.minZoom=Math.min(n.maxZoom,n.minZoom):n.maxZoom=Math.max(n.minZoom,n.maxZoom),typeof n.subdomains=="string"&&(n.subdomains=n.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,n){return this._url===t&&n===void 0&&(n=!0),this._url=t,n||this.redraw(),this},createTile:function(t,n){var a=document.createElement("img");return ut(a,"load",r(this._tileOnLoad,this,n,a)),ut(a,"error",r(this._tileOnError,this,n,a)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(a.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(a.referrerPolicy=this.options.referrerPolicy),a.alt="",a.src=this.getTileUrl(t),a},getTileUrl:function(t){var n={r:et.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var a=this._globalTileRange.max.y-t.y;this.options.tms&&(n.y=a),n["-y"]=a}return B(this._url,i(n,this.options))},_tileOnLoad:function(t,n){et.ielt9?setTimeout(r(t,this,null,n),0):t(null,n)},_tileOnError:function(t,n,a){var c=this.options.errorTileUrl;c&&n.getAttribute("src")!==c&&(n.src=c),t(a,n)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,n=this.options.maxZoom,a=this.options.zoomReverse,c=this.options.zoomOffset;return a&&(t=n-t),t+c},_getSubdomain:function(t){var n=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[n]},_abortLoading:function(){var t,n;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&(n=this._tiles[t].el,n.onload=_,n.onerror=_,!n.complete)){n.src=Z;var a=this._tiles[t].coords;Rt(n),delete this._tiles[t],this.fire("tileabort",{tile:n,coords:a})}},_removeTile:function(t){var n=this._tiles[t];if(n)return n.el.setAttribute("src",Z),ln.prototype._removeTile.call(this,t)},_tileReady:function(t,n,a){if(!(!this._map||a&&a.getAttribute("src")===Z))return ln.prototype._tileReady.call(this,t,n,a)}});function $r(t,n){return new Di(t,n)}var Fr=Di.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,n){this._url=t;var a=i({},this.defaultWmsParams);for(var c in n)c in this.options||(a[c]=n[c]);n=w(this,n);var d=n.detectRetina&&et.retina?2:1,m=this.getTileSize();a.width=m.x*d,a.height=m.y*d,this.wmsParams=a},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var n=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[n]=this._crs.code,Di.prototype.onAdd.call(this,t)},getTileUrl:function(t){var n=this._tileCoordsToNwSe(t),a=this._crs,c=Ot(a.project(n[0]),a.project(n[1])),d=c.min,m=c.max,x=(this._wmsVersion>=1.3&&this._crs===Nr?[d.y,d.x,m.y,m.x]:[d.x,d.y,m.x,m.y]).join(","),S=Di.prototype.getTileUrl.call(this,t);return S+b(this.wmsParams,S,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+x},setParams:function(t,n){return i(this.wmsParams,t),n||this.redraw(),this}});function oh(t,n){return new Fr(t,n)}Di.WMS=Fr,$r.wms=oh;var ze=be.extend({options:{padding:.1},initialize:function(t){w(this,t),h(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),pt(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,n){var a=this._map.getZoomScale(n,this._zoom),c=this._map.getSize().multiplyBy(.5+this.options.padding),d=this._map.project(this._center,n),m=c.multiplyBy(-a).add(d).subtract(this._map._getNewPixelOrigin(t,n));et.any3d?ni(this._container,m,a):Zt(this._container,m)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,n=this._map.getSize(),a=this._map.containerPointToLayerPoint(n.multiplyBy(-t)).round();this._bounds=new kt(a,a.add(n.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Zr=ze.extend({options:{tolerance:0},getEvents:function(){var t=ze.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ze.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");ut(t,"mousemove",this._onMouseMove,this),ut(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ut(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){tt(this._redrawRequest),delete this._ctx,Rt(this._container),Et(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var n in this._layers)t=this._layers[n],t._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ze.prototype._update.call(this);var t=this._bounds,n=this._container,a=t.getSize(),c=et.retina?2:1;Zt(n,t.min),n.width=c*a.x,n.height=c*a.y,n.style.width=a.x+"px",n.style.height=a.y+"px",et.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){ze.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[h(t)]=t;var n=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=n),this._drawLast=n,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var n=t._order,a=n.next,c=n.prev;a?a.prev=c:this._drawLast=c,c?c.next=a:this._drawFirst=a,delete t._order,delete this._layers[h(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray=="string"){var n=t.options.dashArray.split(/[, ]+/),a=[],c,d;for(d=0;d')}}catch{}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),rh={_initContainer:function(){this._container=xt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ze.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var n=t._container=cn("shape");pt(n,"leaflet-vml-shape "+(this.options.className||"")),n.coordsize="1 1",t._path=cn("path"),n.appendChild(t._path),this._updateStyle(t),this._layers[h(t)]=t},_addPath:function(t){var n=t._container;this._container.appendChild(n),t.options.interactive&&t.addInteractiveTarget(n)},_removePath:function(t){var n=t._container;Rt(n),t.removeInteractiveTarget(n),delete this._layers[h(t)]},_updateStyle:function(t){var n=t._stroke,a=t._fill,c=t.options,d=t._container;d.stroked=!!c.stroke,d.filled=!!c.fill,c.stroke?(n||(n=t._stroke=cn("stroke")),d.appendChild(n),n.weight=c.weight+"px",n.color=c.color,n.opacity=c.opacity,c.dashArray?n.dashStyle=P(c.dashArray)?c.dashArray.join(" "):c.dashArray.replace(/( *, *)/g," "):n.dashStyle="",n.endcap=c.lineCap.replace("butt","flat"),n.joinstyle=c.lineJoin):n&&(d.removeChild(n),t._stroke=null),c.fill?(a||(a=t._fill=cn("fill")),d.appendChild(a),a.color=c.fillColor||c.color,a.opacity=c.fillOpacity):a&&(d.removeChild(a),t._fill=null)},_updateCircle:function(t){var n=t._point.round(),a=Math.round(t._radius),c=Math.round(t._radiusY||a);this._setPath(t,t._empty()?"M0 0":"AL "+n.x+","+n.y+" "+a+","+c+" 0,"+65535*360)},_setPath:function(t,n){t._path.v=n},_bringToFront:function(t){Ti(t._container)},_bringToBack:function(t){Pi(t._container)}},Yn=et.vml?cn:Y,hn=ze.extend({_initContainer:function(){this._container=Yn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Yn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Rt(this._container),Et(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ze.prototype._update.call(this);var t=this._bounds,n=t.getSize(),a=this._container;(!this._svgSize||!this._svgSize.equals(n))&&(this._svgSize=n,a.setAttribute("width",n.x),a.setAttribute("height",n.y)),Zt(a,t.min),a.setAttribute("viewBox",[t.min.x,t.min.y,n.x,n.y].join(" ")),this.fire("update")}},_initPath:function(t){var n=t._path=Yn("path");t.options.className&&pt(n,t.options.className),t.options.interactive&&pt(n,"leaflet-interactive"),this._updateStyle(t),this._layers[h(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){Rt(t._path),t.removeInteractiveTarget(t._path),delete this._layers[h(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var n=t._path,a=t.options;n&&(a.stroke?(n.setAttribute("stroke",a.color),n.setAttribute("stroke-opacity",a.opacity),n.setAttribute("stroke-width",a.weight),n.setAttribute("stroke-linecap",a.lineCap),n.setAttribute("stroke-linejoin",a.lineJoin),a.dashArray?n.setAttribute("stroke-dasharray",a.dashArray):n.removeAttribute("stroke-dasharray"),a.dashOffset?n.setAttribute("stroke-dashoffset",a.dashOffset):n.removeAttribute("stroke-dashoffset")):n.setAttribute("stroke","none"),a.fill?(n.setAttribute("fill",a.fillColor||a.color),n.setAttribute("fill-opacity",a.fillOpacity),n.setAttribute("fill-rule",a.fillRule||"evenodd")):n.setAttribute("fill","none"))},_updatePoly:function(t,n){this._setPath(t,A(t._parts,n))},_updateCircle:function(t){var n=t._point,a=Math.max(Math.round(t._radius),1),c=Math.max(Math.round(t._radiusY),1)||a,d="a"+a+","+c+" 0 1,0 ",m=t._empty()?"M0 0":"M"+(n.x-a)+","+n.y+d+a*2+",0 "+d+-a*2+",0 ";this._setPath(t,m)},_setPath:function(t,n){t._path.setAttribute("d",n)},_bringToFront:function(t){Ti(t._path)},_bringToBack:function(t){Pi(t._path)}});et.vml&&hn.include(rh);function Wr(t){return et.svg||et.vml?new hn(t):null}bt.include({getRenderer:function(t){var n=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return n||(n=this._renderer=this._createRenderer()),this.hasLayer(n)||this.addLayer(n),n},_getPaneRenderer:function(t){if(t==="overlayPane"||t===void 0)return!1;var n=this._paneRenderers[t];return n===void 0&&(n=this._createRenderer({pane:t}),this._paneRenderers[t]=n),n},_createRenderer:function(t){return this.options.preferCanvas&&qr(t)||Wr(t)}});var Ur=Ni.extend({initialize:function(t,n){Ni.prototype.initialize.call(this,this._boundsToLatLngs(t),n)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=At(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function ah(t,n){return new Ur(t,n)}hn.create=Yn,hn.pointsToPath=A,Oe.geometryToLayer=Fn,Oe.coordsToLatLng=ho,Oe.coordsToLatLngs=Zn,Oe.latLngToCoords=uo,Oe.latLngsToCoords=qn,Oe.getFeature=Bi,Oe.asFeature=Wn,bt.mergeOptions({boxZoom:!0});var Gr=Te.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){ut(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Et(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Rt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),tn(),Vs(),this._startPoint=this._map.mouseEventToContainerPoint(t),ut(document,{contextmenu:ri,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=xt("div","leaflet-zoom-box",this._container),pt(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var n=new kt(this._point,this._startPoint),a=n.getSize();Zt(this._box,n.min),this._box.style.width=a.x+"px",this._box.style.height=a.y+"px"},_finish:function(){this._moved&&(Rt(this._box),$t(this._container,"leaflet-crosshair")),en(),Ys(),Et(document,{contextmenu:ri,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if(!(t.which!==1&&t.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(r(this._resetState,this),0);var n=new Wt(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(n).fire("boxzoomend",{boxZoomBounds:n})}},_onKeyDown:function(t){t.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});bt.addInitHook("addHandler","boxZoom",Gr),bt.mergeOptions({doubleClickZoom:!0});var Vr=Te.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var n=this._map,a=n.getZoom(),c=n.options.zoomDelta,d=t.originalEvent.shiftKey?a-c:a+c;n.options.doubleClickZoom==="center"?n.setZoom(d):n.setZoomAround(t.containerPoint,d)}});bt.addInitHook("addHandler","doubleClickZoom",Vr),bt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Yr=Te.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Ve(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}pt(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){$t(this._map._container,"leaflet-grab"),$t(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var n=At(this._map.options.maxBounds);this._offsetLimit=Ot(this._map.latLngToContainerPoint(n.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(n.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var n=this._lastTime=+new Date,a=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(a),this._times.push(n),this._prunePositions(n)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),n=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=n.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,n){return t-(t-n)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var t=this._draggable._newPos.subtract(this._draggable._startPos),n=this._offsetLimit;t.xn.max.x&&(t.x=this._viscousLimit(t.x,n.max.x)),t.y>n.max.y&&(t.y=this._viscousLimit(t.y,n.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,n=Math.round(t/2),a=this._initialWorldOffset,c=this._draggable._newPos.x,d=(c-n+a)%t+n-a,m=(c+n+a)%t-n-a,x=Math.abs(d+a)0?m:-m))-n;this._delta=0,this._startTime=null,x&&(t.options.scrollWheelZoom==="center"?t.setZoom(n+x):t.setZoomAround(this._lastMousePos,n+x))}});bt.addInitHook("addHandler","scrollWheelZoom",jr);var lh=600;bt.mergeOptions({tapHold:et.touchNative&&et.safari&&et.mobile,tapTolerance:15});var Kr=Te.extend({addHooks:function(){ut(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Et(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),t.touches.length===1){var n=t.touches[0];this._startPos=this._newPos=new rt(n.clientX,n.clientY),this._holdTimeout=setTimeout(r(function(){this._cancel(),this._isTapValid()&&(ut(document,"touchend",Kt),ut(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",n))},this),lh),ut(document,"touchend touchcancel contextmenu",this._cancel,this),ut(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Et(document,"touchend",Kt),Et(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Et(document,"touchend touchcancel contextmenu",this._cancel,this),Et(document,"touchmove",this._onMove,this)},_onMove:function(t){var n=t.touches[0];this._newPos=new rt(n.clientX,n.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,n){var a=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY});a._simulated=!0,n.target.dispatchEvent(a)}});bt.addInitHook("addHandler","tapHold",Kr),bt.mergeOptions({touchZoom:et.touch,bounceAtZoomLimits:!0});var Jr=Te.extend({addHooks:function(){pt(this._map._container,"leaflet-touch-zoom"),ut(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){$t(this._map._container,"leaflet-touch-zoom"),Et(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var n=this._map;if(!(!t.touches||t.touches.length!==2||n._animatingZoom||this._zooming)){var a=n.mouseEventToContainerPoint(t.touches[0]),c=n.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=n.getSize()._divideBy(2),this._startLatLng=n.containerPointToLatLng(this._centerPoint),n.options.touchZoom!=="center"&&(this._pinchStartLatLng=n.containerPointToLatLng(a.add(c)._divideBy(2))),this._startDist=a.distanceTo(c),this._startZoom=n.getZoom(),this._moved=!1,this._zooming=!0,n._stop(),ut(document,"touchmove",this._onTouchMove,this),ut(document,"touchend touchcancel",this._onTouchEnd,this),Kt(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var n=this._map,a=n.mouseEventToContainerPoint(t.touches[0]),c=n.mouseEventToContainerPoint(t.touches[1]),d=a.distanceTo(c)/this._startDist;if(this._zoom=n.getScaleZoom(d,this._startZoom),!n.options.bounceAtZoomLimits&&(this._zoomn.getMaxZoom()&&d>1)&&(this._zoom=n._limitZoom(this._zoom)),n.options.touchZoom==="center"){if(this._center=this._startLatLng,d===1)return}else{var m=a._add(c)._divideBy(2)._subtract(this._centerPoint);if(d===1&&m.x===0&&m.y===0)return;this._center=n.unproject(n.project(this._pinchStartLatLng,this._zoom).subtract(m),this._zoom)}this._moved||(n._moveStart(!0,!1),this._moved=!0),tt(this._animRequest);var x=r(n._move,n,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=nt(x,this,!0),Kt(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,tt(this._animRequest),Et(document,"touchmove",this._onTouchMove,this),Et(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});bt.addInitHook("addHandler","touchZoom",Jr),bt.BoxZoom=Gr,bt.DoubleClickZoom=Vr,bt.Drag=Yr,bt.Keyboard=Xr,bt.ScrollWheelZoom=jr,bt.TapHold=Kr,bt.TouchZoom=Jr,s.Bounds=kt,s.Browser=et,s.CRS=le,s.Canvas=Zr,s.Circle=co,s.CircleMarker=$n,s.Class=Mt,s.Control=ve,s.DivIcon=Hr,s.DivOverlay=Pe,s.DomEvent=Sc,s.DomUtil=kc,s.Draggable=Ve,s.Evented=Yt,s.FeatureGroup=De,s.GeoJSON=Oe,s.GridLayer=ln,s.Handler=Te,s.Icon=Ii,s.ImageOverlay=Un,s.LatLng=yt,s.LatLngBounds=Wt,s.Layer=be,s.LayerGroup=Ai,s.LineUtil=Hc,s.Map=bt,s.Marker=Hn,s.Mixin=Nc,s.Path=Ye,s.Point=rt,s.PolyUtil=Bc,s.Polygon=Ni,s.Polyline=Re,s.Popup=Gn,s.PosAnimation=wr,s.Projection=$c,s.Rectangle=Ur,s.Renderer=ze,s.SVG=hn,s.SVGOverlay=zr,s.TileLayer=Di,s.Tooltip=Vn,s.Transformation=fe,s.Util=Ct,s.VideoOverlay=Or,s.bind=r,s.bounds=Ot,s.canvas=qr,s.circle=Yc,s.circleMarker=Vc,s.control=on,s.divIcon=nh,s.extend=i,s.featureGroup=Wc,s.geoJSON=Rr,s.geoJson=Kc,s.gridLayer=sh,s.icon=Uc,s.imageOverlay=Jc,s.latLng=ft,s.latLngBounds=At,s.layerGroup=qc,s.map=Mc,s.marker=Gc,s.point=at,s.polygon=jc,s.polyline=Xc,s.popup=eh,s.rectangle=ah,s.setOptions=w,s.stamp=h,s.svg=Wr,s.svgOverlay=th,s.tileLayer=$r,s.tooltip=ih,s.transformation=k,s.version=e,s.videoOverlay=Qc;var ch=window.L;s.noConflict=function(){return window.L=ch,this},window.L=s})});var ip=Lh(sa());var Kn=globalThis,Jn=Kn.ShadowRoot&&(Kn.ShadyCSS===void 0||Kn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,mo=Symbol(),oa=new WeakMap,dn=class{constructor(e,i,o){if(this._$cssResult$=!0,o!==mo)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=i}get styleSheet(){let e=this.o,i=this.t;if(Jn&&e===void 0){let o=i!==void 0&&i.length===1;o&&(e=oa.get(i)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&oa.set(i,e))}return e}toString(){return this.cssText}},ra=s=>new dn(typeof s=="string"?s:s+"",void 0,mo),un=(s,...e)=>{let i=s.length===1?s[0]:e.reduce((o,r,l)=>o+(h=>{if(h._$cssResult$===!0)return h.cssText;if(typeof h=="number")return h;throw Error("Value passed to 'css' function must be a 'css' function result: "+h+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+s[l+1],s[0]);return new dn(i,s,mo)},aa=(s,e)=>{if(Jn)s.adoptedStyleSheets=e.map(i=>i instanceof CSSStyleSheet?i:i.styleSheet);else for(let i of e){let o=document.createElement("style"),r=Kn.litNonce;r!==void 0&&o.setAttribute("nonce",r),o.textContent=i.cssText,s.appendChild(o)}},_o=Jn?s=>s:s=>s instanceof CSSStyleSheet?(e=>{let i="";for(let o of e.cssRules)i+=o.cssText;return ra(i)})(s):s;var{is:Sh,defineProperty:Mh,getOwnPropertyDescriptor:Eh,getOwnPropertyNames:Th,getOwnPropertySymbols:Ph,getPrototypeOf:Ah}=Object,Qn=globalThis,la=Qn.trustedTypes,Ih=la?la.emptyScript:"",Nh=Qn.reactiveElementPolyfillSupport,pn=(s,e)=>s,go={toAttribute(s,e){switch(e){case Boolean:s=s?Ih:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,e){let i=s;switch(e){case Boolean:i=s!==null;break;case Number:i=s===null?null:Number(s);break;case Object:case Array:try{i=JSON.parse(s)}catch{i=null}}return i}},ha=(s,e)=>!Sh(s,e),ca={attribute:!0,type:String,converter:go,reflect:!1,useDefault:!1,hasChanged:ha};Symbol.metadata??=Symbol("metadata"),Qn.litPropertyMetadata??=new WeakMap;var He=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,i=ca){if(i.state&&(i.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((i=Object.create(i)).wrapped=!0),this.elementProperties.set(e,i),!i.noAccessor){let o=Symbol(),r=this.getPropertyDescriptor(e,o,i);r!==void 0&&Mh(this.prototype,e,r)}}static getPropertyDescriptor(e,i,o){let{get:r,set:l}=Eh(this.prototype,e)??{get(){return this[i]},set(h){this[i]=h}};return{get:r,set(h){let u=r?.call(this);l?.call(this,h),this.requestUpdate(e,u,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??ca}static _$Ei(){if(this.hasOwnProperty(pn("elementProperties")))return;let e=Ah(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(pn("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(pn("properties"))){let i=this.properties,o=[...Th(i),...Ph(i)];for(let r of o)this.createProperty(r,i[r])}let e=this[Symbol.metadata];if(e!==null){let i=litPropertyMetadata.get(e);if(i!==void 0)for(let[o,r]of i)this.elementProperties.set(o,r)}this._$Eh=new Map;for(let[i,o]of this.elementProperties){let r=this._$Eu(i,o);r!==void 0&&this._$Eh.set(r,i)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let i=[];if(Array.isArray(e)){let o=new Set(e.flat(1/0).reverse());for(let r of o)i.unshift(_o(r))}else e!==void 0&&i.push(_o(e));return i}static _$Eu(e,i){let o=i.attribute;return o===!1?void 0:typeof o=="string"?o:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,i=this.constructor.elementProperties;for(let o of i.keys())this.hasOwnProperty(o)&&(e.set(o,this[o]),delete this[o]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return aa(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,i,o){this._$AK(e,o)}_$ET(e,i){let o=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,o);if(r!==void 0&&o.reflect===!0){let l=(o.converter?.toAttribute!==void 0?o.converter:go).toAttribute(i,o.type);this._$Em=e,l==null?this.removeAttribute(r):this.setAttribute(r,l),this._$Em=null}}_$AK(e,i){let o=this.constructor,r=o._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let l=o.getPropertyOptions(r),h=typeof l.converter=="function"?{fromAttribute:l.converter}:l.converter?.fromAttribute!==void 0?l.converter:go;this._$Em=r;let u=h.fromAttribute(i,l.type);this[r]=u??this._$Ej?.get(r)??u,this._$Em=null}}requestUpdate(e,i,o,r=!1,l){if(e!==void 0){let h=this.constructor;if(r===!1&&(l=this[e]),o??=h.getPropertyOptions(e),!((o.hasChanged??ha)(l,i)||o.useDefault&&o.reflect&&l===this._$Ej?.get(e)&&!this.hasAttribute(h._$Eu(e,o))))return;this.C(e,i,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,i,{useDefault:o,reflect:r,wrapped:l},h){o&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,h??i??this[e]),l!==!0||h!==void 0)||(this._$AL.has(e)||(this.hasUpdated||o||(i=void 0),this._$AL.set(e,i)),r===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(i){Promise.reject(i)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,l]of this._$Ep)this[r]=l;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[r,l]of o){let{wrapped:h}=l,u=this[r];h!==!0||this._$AL.has(r)||u===void 0||this.C(r,void 0,l,u)}}let e=!1,i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(i)):this._$EM()}catch(o){throw e=!1,this._$EM(),o}e&&this._$AE(i)}willUpdate(e){}_$AE(e){this._$EO?.forEach(i=>i.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(i=>this._$ET(i,this[i])),this._$EM()}updated(e){}firstUpdated(e){}};He.elementStyles=[],He.shadowRootOptions={mode:"open"},He[pn("elementProperties")]=new Map,He[pn("finalized")]=new Map,Nh?.({ReactiveElement:He}),(Qn.reactiveElementVersions??=[]).push("2.1.2");var vo=globalThis,da=s=>s,ts=vo.trustedTypes,ua=ts?ts.createPolicy("lit-html",{createHTML:s=>s}):void 0,bo="$lit$",$e=`lit$${Math.random().toFixed(9).slice(2)}$`,wo="?"+$e,Bh=`<${wo}>`,hi=document,mn=()=>hi.createComment(""),_n=s=>s===null||typeof s!="object"&&typeof s!="function",xo=Array.isArray,ya=s=>xo(s)||typeof s?.[Symbol.iterator]=="function",yo=`[ +\f\r]`,fn=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,pa=/-->/g,fa=/>/g,li=RegExp(`>|${yo}(?:([^\\s"'>=/]+)(${yo}*=${yo}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),ma=/'/g,_a=/"/g,va=/^(?:script|style|textarea|title)$/i,Co=s=>(e,...i)=>({_$litType$:s,strings:e,values:i}),Ae=Co(1),se=Co(2),ap=Co(3),we=Symbol.for("lit-noChange"),Pt=Symbol.for("lit-nothing"),ga=new WeakMap,ci=hi.createTreeWalker(hi,129);function ba(s,e){if(!xo(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return ua!==void 0?ua.createHTML(e):e}var wa=(s,e)=>{let i=s.length-1,o=[],r,l=e===2?"":e===3?"":"",h=fn;for(let u=0;u"?(h=r??fn,g=-1):y[1]===void 0?g=-2:(g=h.lastIndex-y[2].length,_=y[1],h=y[3]===void 0?li:y[3]==='"'?_a:ma):h===_a||h===ma?h=li:h===pa||h===fa?h=fn:(h=li,r=void 0);let w=h===li&&s[u+1].startsWith("/>")?" ":"";l+=h===fn?f+Bh:g>=0?(o.push(_),f.slice(0,g)+bo+f.slice(g)+$e+w):f+$e+(g===-2?u:w)}return[ba(s,l+(s[i]||"")+(e===2?"":e===3?"":"")),o]},gn=class s{constructor({strings:e,_$litType$:i},o){let r;this.parts=[];let l=0,h=0,u=e.length-1,f=this.parts,[_,y]=wa(e,i);if(this.el=s.createElement(_,o),ci.currentNode=this.el.content,i===2||i===3){let g=this.el.content.firstChild;g.replaceWith(...g.childNodes)}for(;(r=ci.nextNode())!==null&&f.length0){r.textContent=ts?ts.emptyScript:"";for(let w=0;w2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=Pt}_$AI(e,i=this,o,r){let l=this.strings,h=!1;if(l===void 0)e=di(this,e,i,0),h=!_n(e)||e!==this._$AH&&e!==we,h&&(this._$AH=e);else{let u=e,f,_;for(e=l[0],f=0;f{let o=i?.renderBefore??e,r=o._$litPart$;if(r===void 0){let l=i?.renderBefore??null;o._$litPart$=r=new Oi(e.insertBefore(mn(),l),l,void 0,i??{})}return r._$AI(s),r};var ko=globalThis,Ie=class extends He{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ca(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return we}};Ie._$litElement$=!0,Ie.finalized=!0,ko.litElementHydrateSupport?.({LitElement:Ie});var Rh=ko.litElementPolyfillSupport;Rh?.({LitElement:Ie});(ko.litElementVersions??=[]).push("4.2.2");function Lo(s,e,i){return s?e(s):i?.(s)}var So=s=>s??Pt;var rs={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},as=s=>(...e)=>({_$litDirective$:s,values:e}),zi=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,i,o){this._$Ct=e,this._$AM=i,this._$Ci=o}_$AS(e,i){return this.update(e,i)}update(e,i){return this.render(...i)}};var ls=as(class extends zi{constructor(s){if(super(s),s.type!==rs.ATTRIBUTE||s.name!=="class"||s.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(e=>s[e]).join(" ")+" "}update(s,[e]){if(this.st===void 0){this.st=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(let o in e)e[o]&&!this.nt?.has(o)&&this.st.add(o);return this.render(e)}let i=s.element.classList;for(let o of this.st)o in e||(i.remove(o),this.st.delete(o));for(let o in e){let r=!!e[o];r===this.st.has(o)||this.nt?.has(o)||(r?(i.add(o),this.st.add(o)):(i.remove(o),this.st.delete(o)))}return we}});var{I:Oh}=xa,ka=s=>s;var La=()=>document.createComment(""),Hi=(s,e,i)=>{let o=s._$AA.parentNode,r=e===void 0?s._$AB:e._$AA;if(i===void 0){let l=o.insertBefore(La(),r),h=o.insertBefore(La(),r);i=new Oh(l,h,s,s.options)}else{let l=i._$AB.nextSibling,h=i._$AM,u=h!==s;if(u){let f;i._$AQ?.(s),i._$AM=s,i._$AP!==void 0&&(f=s._$AU)!==h._$AU&&i._$AP(f)}if(l!==r||u){let f=i._$AA;for(;f!==l;){let _=ka(f).nextSibling;ka(o).insertBefore(f,r),f=_}}}return i},Xe=(s,e,i=s)=>(s._$AI(e,i),s),zh={},Sa=(s,e=zh)=>s._$AH=e,Ma=s=>s._$AH,cs=s=>{s._$AR(),s._$AA.remove()};var Ea=(s,e,i)=>{let o=new Map;for(let r=e;r<=i;r++)o.set(s[r],r);return o},Ta=as(class extends zi{constructor(s){if(super(s),s.type!==rs.CHILD)throw Error("repeat() can only be used in text expressions")}dt(s,e,i){let o;i===void 0?i=e:e!==void 0&&(o=e);let r=[],l=[],h=0;for(let u of s)r[h]=o?o(u,h):h,l[h]=i(u,h),h++;return{values:l,keys:r}}render(s,e,i){return this.dt(s,e,i).values}update(s,[e,i,o]){let r=Ma(s),{values:l,keys:h}=this.dt(e,i,o);if(!Array.isArray(r))return this.ut=h,l;let u=this.ut??=[],f=[],_,y,g=0,v=r.length-1,w=0,b=l.length-1;for(;g<=v&&w<=b;)if(r[g]===null)g++;else if(r[v]===null)v--;else if(u[g]===h[w])f[w]=Xe(r[g],l[w]),g++,w++;else if(u[v]===h[b])f[b]=Xe(r[v],l[b]),v--,b--;else if(u[g]===h[b])f[b]=Xe(r[g],l[b]),Hi(s,f[b+1],r[g]),g++,b--;else if(u[v]===h[w])f[w]=Xe(r[v],l[w]),Hi(s,r[g],r[v]),v--,w++;else if(_===void 0&&(_=Ea(h,w,b),y=Ea(u,g,v)),_.has(u[g]))if(_.has(u[v])){let C=y.get(h[w]),B=C!==void 0?r[C]:null;if(B===null){let P=Hi(s,r[g]);Xe(P,l[w]),f[w]=P}else f[w]=Xe(B,l[w]),Hi(s,r[g],B),r[C]=null;w++}else cs(r[v]),v--;else cs(r[g]),g++;for(;w<=b;){let C=Hi(s,f[b+1]);Xe(C,l[w]),f[w++]=C}for(;g<=v;){let C=r[g++];C!==null&&cs(C)}return this.ut=h,Sa(s,f),we}});function Jt(s,e,i,o,r=0,l=0){return[(e-l-o)*i,(s-r)*i]}function Gt(s,e,i,o,r,l,h=0,u=0){return[[(e-u-l)*r,(s-h)*r],[(o-u-l)*r,(i-h)*r]]}function xe(s,e,i,o,r=0,l=0){return{dbuX:Math.round(r+e/i),dbuY:Math.round(l+o+s/i)}}function Hh(s){return!Number.isFinite(s)||s<=1?1:Math.round(Math.min(s,3)*100)/100}var Fe=240,$h=256,Ze="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Mo=Fe;function Ce(){return Mo}function Pa(){Mo=$h}var Wp=1/64,Eo=120;function Aa(s){Mo=s}function pi(s){let e={...s||{}};return e.tileSize===void 0&&(e.tileSize=Ce()),e}function hs(s,e){return Math.max(1,Math.round(s*e))}function $i(){let s=typeof window<"u"&&window.devicePixelRatio?window.devicePixelRatio:1;return!Number.isFinite(s)||s<=1?1:Math.min(s,3)}function Fi(s,e=Ce()){return{dpr:Hh(s),tile_px:hs(e,s)}}function ds(s,e,i,o,r=Ce()){let{visibility:l,selectability:h,visibleLayers:u,selectableLayers:f,app:_}=i,y={};for(let[v,w]of Object.entries(l||{}))y[v]=!!w;if(h)for(let[v,w]of Object.entries(h))y["s_"+v]=!!w;let g={type:"tile",layer:e,z:s.z,x:s.x,y:s.y,...Fi(o,r),visible_layers:u?[...u]:[],selectable_layers:f?[...f]:[],...y};if(_&&_.visibleChiplets instanceof Set&&(g.visible_chiplets=[..._.visibleChiplets]),_&&_.layerPatterns){let v=_.layerPatterns[e];v!==void 0&&v!==1&&(g.pattern=v)}return g}function Ia(s){if(typeof window>"u"||typeof window.matchMedia!="function"||typeof s!="function")return()=>{};let e=!1,i=null,o=null,r=()=>{if(e)return;let l=window.devicePixelRatio||1;i=window.matchMedia(`(resolution: ${l}dppx)`),o=()=>{e||(r(),s(window.devicePixelRatio||1))},i.addEventListener("change",o,{once:!0})};return r(),()=>{e=!0,i&&o&&i.removeEventListener("change",o),i=null,o=null}}function Zi(s,e){let i=s&&s._map?s._map.getZoom():e;return Math.floor(i)}function wt(s){return!!s?.websocketManager?.isStaticMode}function Ra(s){let e=s?.protocol==="https:"?"wss":"ws",i=s?.host||"localhost:8080";return`${e}://${i}/ws`}function Oa(s,e){let i={};for(let[o,r]of Object.entries(s||{}))i[o]=!!r;for(let[o,r]of Object.entries(e||{}))i["s_"+o]=!!r;return i}function qi(s,e){e&&typeof e.sel_has_inst=="boolean"&&(s.selHasInst=e.sel_has_inst,s.selHasNet=!!e.sel_has_net)}var To=null;function ke(s,e=4e3){let i=document.getElementById("or-toast");return i||(i=document.createElement("div"),i.id="or-toast",document.body.appendChild(i)),i.textContent=s,i.classList.add("visible"),To&&clearTimeout(To),To=setTimeout(()=>i.classList.remove("visible"),e),i}function za({title:s,message:e,confirmLabel:i="OK",danger:o=!1}){return new Promise(r=>{let l=document.createElement("div");l.className="or-modal-overlay";let h=document.createElement("div");h.className="or-modal";let u=document.createElement("div");u.className="or-modal-title",u.textContent=s;let f=document.createElement("div");f.className="or-modal-message",f.textContent=e;let _=document.createElement("div");_.className="or-modal-buttons";let y=document.createElement("button");y.className="or-btn",y.textContent="Cancel";let g=document.createElement("button");g.className="or-btn"+(o?" or-btn-danger":""),g.textContent=i;let v=b=>{document.removeEventListener("keydown",w,!0),l.remove(),r(b)},w=b=>{b.key==="Escape"&&(b.stopPropagation(),v(!1))};y.addEventListener("click",()=>v(!1)),g.addEventListener("click",()=>v(!0)),l.addEventListener("click",b=>{b.target===l&&v(!1)}),document.addEventListener("keydown",w,!0),_.appendChild(y),_.appendChild(g),h.appendChild(u),h.appendChild(f),h.appendChild(_),l.appendChild(h),document.body.appendChild(l),y.focus()})}var Fh=.05;function Zh([[s,e],[i,o]],r){let l=(o-e)*r,h=(i-s)*r;return[[s-h,e-l],[i+h,o+l]]}function Po(s,e=256,i=null){if(!Na(s))return null;let o=s[0][0],r=s[0][1],l=Math.max(s[1][1]-r,s[1][0]-o),h=e/l,u=Na(i)?i:s,[[f,_],[y,g]]=Zh(u,Fh);return{scale:h,maxDXDY:l,originX:r,originY:o,fitBounds:Gt(_,f,g,y,h,l,r,o)}}function Na(s){return!!s&&s[1][0]>s[0][0]&&s[1][1]>s[0][1]}function Ha(s,e){return!!s&&!!e&&s[0][0]===e[0][0]&&s[0][1]===e[0][1]&&s[1][0]===e[1][0]&&s[1][1]===e[1][1]}function ae(s){s.selectionToken=(s.selectionToken||0)+1;for(let e of s.selectionResetters||[])e();return s.selectionToken}function he(s,e){return s.selectionToken===e}function $a(s,e){s.selectionResetters||(s.selectionResetters=[]),s.selectionResetters.push(e)}function Fa(s=typeof L<"u"?L.CRS.Simple:void 0,e={}){return{crs:s,zoom:1,zoomSnap:1,zoomDelta:1,fadeAnimation:!1,attributionControl:!1,scrollWheelZoom:e.wheelZoom!==!1,keyboardPanDelta:Wi(e.arrowStep)}}var Ao=80,yn=10,vn=1e3;function Wi(s){let e=s===""||s===null?NaN:Math.round(Number(s));return Number.isFinite(e)?Math.min(vn,Math.max(yn,e)):Ao}function Za(s,e){s?.keyboard?._setPanDelta?.(e)}function fi(s="vis-group-header"){let e=document.createElement("div");e.className=s;let i=document.createElement("span");i.className="vis-arrow",e.appendChild(i);let o=document.createElement("span");return o.className="vis-name",e.appendChild(o),{header:e,arrow:i,name:o}}function mi(s,e,i,o){let r=l=>{i.classList.toggle("collapsed",l),e.textContent=l?"\u25B6":"\u25BC"};r(!!o),s.addEventListener("click",l=>{let h=l.target&&l.target.parentNode===s&&l.target.classList&&l.target.classList.contains("vis-name");l.target!==s&&l.target!==e&&!h||r(!i.classList.contains("collapsed"))})}var Ba=30;function qa(s,e=8){if(!Number.isFinite(s)||s<=0)return Ba;let i=Math.ceil(Math.log2(e/s));return Math.max(1,Math.min(Ba,i))}function Wa({designBounds:s,fitRect:e,viewW:i,viewH:o}){let r=Po(s,Fe,e),l=w=>Number.isFinite(w)&&w>0;if(!r||!l(i)||!l(o))return Fe;let h=r.fitBounds[1][1]-r.fitBounds[0][1],u=r.fitBounds[1][0]-r.fitBounds[0][0],f=Math.min(i/h,o/u),_=Math.log2(f);if(!Number.isFinite(_)||_<0)return Fe;let y=Math.floor(_),g=Fe*2**(_-y),v=Math.floor(g/Eo)*Eo;return v>Fe&&Math.log2(Fe*f/v)>=y?v:Fe}function Ua(s,{showDbu:e,dbuPerMicron:i},o=!1){if(e)return String(Math.round(s));let r=i>0?i:1e3,l=Math.ceil(Math.log10(r)),h=(s/r).toFixed(l);return o?h+" \xB5m":h}function Ga(s,{showDbu:e,dbuPerMicron:i}){let o=parseFloat(s);if(!Number.isFinite(o))return null;if(e)return Math.round(o);let r=i>0?i:1e3;return Math.round(o*r)}function Va(s,{showDbu:e,dbuPerMicron:i}){if(e)return String(Math.round(s));let o=i>0?i:1e3,r=s/o;return r>=1e3?(r/1e3).toFixed(3)+" mm":r>=1?r.toFixed(3)+" um":(r*1e3).toFixed(1)+" nm"}function Ya({showDbu:s}){return s?"DBU":"\xB5m"}function Ui(s){return typeof s=="string"&&/^#[0-9a-fA-F]{6}$/.test(s)}function Xa(s){if(typeof s!="string")return null;let e=s.trim();if(Ui(e))return e.toLowerCase();let i=e.match(/^#([0-9a-fA-F]{3})$/);if(i)return"#"+i[1].split("").map(r=>r+r).join("").toLowerCase();let o=e.match(/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/);if(o){let r=o.slice(1).map(Number);return r.some(l=>l>255)?null:"#"+r.map(l=>l.toString(16).padStart(2,"0")).join("")}return null}function bn(s){let e=null;return()=>{e===null&&(e=requestAnimationFrame(()=>{e=null,s()}))}}function Da(s){let e=Math.pow(10,Math.floor(Math.log10(s))),i=s/e,o;return i<1.5?o=1:i<3.5?o=2:i<7.5?o=5:o=10,{value:o*e,digit:o}}function ja({targetPx:s,pxPerDbu:e,dbuPerMicron:i,showDbu:o}){if(!Number.isFinite(e)||e<=0||!Number.isFinite(s)||s<=0)return null;let r,l,h;if(o){let f=Da(Math.max(1,s/e));h=f.digit,r=Math.round(f.value*e),l=String(Math.round(f.value))}else{let f=Number.isFinite(i)&&i>0?i:1e3,_=e*f,y=Da(s/_);h=y.digit;let g=y.value;r=Math.round(g*_);let v,w;g>=1e3?(v=1/1e3,w="mm"):g>=1?(v=1,w="\xB5m"):g>=.001?(v=1e3,w="nm"):(v=1e6,w="pm"),l=Math.round(g*v)+" "+w}return{barPx:r,label:l,segments:h===1?5:h}}function wn(s,e,i){return e?typeof s.runTclScript=="function"?s.runTclScript(e,i):(i&&typeof s.echoTcl=="function"&&s.echoTcl(e),s.websocketManager.request({type:"tcl_eval",cmd:e}).catch(()=>{})):Promise.resolve()}function _i(s,e){let i=s.querySelectorAll("thead th");(!e||!e[0])&&(s.style.tableLayout="auto",i.forEach(o=>o.style.width=""),e=Array.from(i,o=>o.offsetWidth+"px")),i.forEach((o,r)=>o.style.width=e[r]||""),s.style.tableLayout="fixed",i.forEach((o,r)=>{if(r===i.length-1)return;let l=document.createElement("div");l.className="col-resize-grip",o.style.position="relative",o.appendChild(l);let h,u,f=y=>{o.style.width=Math.max(30,u+y.clientX-h)+"px"},_=()=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",_);let y=g=>g.stopPropagation();document.addEventListener("click",y,{capture:!0,once:!0}),setTimeout(()=>{document.removeEventListener("click",y,{capture:!0})},0)};l.addEventListener("mousedown",y=>{y.preventDefault(),h=y.clientX,u=o.offsetWidth,document.addEventListener("mousemove",f),document.addEventListener("mouseup",_)})})}function Ka(s,e){s.scrollWheelZoom.disable(),s.getContainer().addEventListener("wheel",i=>{if(i.preventDefault(),e()===i.ctrlKey){let[r,l]=Io(i,()=>s.getContainer().clientHeight);s.panBy([r,l],{animate:!1});return}let o=i.deltaY<0?1:-1;s.setZoomAround(s.mouseEventToLatLng(i),s.getZoom()+o)},{passive:!1})}function Io(s,e){let o=1;return s.deltaMode===1?o=16:s.deltaMode===2&&(o=e()||16),[s.deltaX*o,s.deltaY*o]}function Gi(s,e,i,o){let r=document.createElement("div");r.className="modal-overlay",r.innerHTML=` + `,document.body.appendChild(r);let l=()=>r.remove();r.addEventListener("click",f=>{f.target===r&&l()}),r.addEventListener("keydown",f=>{f.key==="Escape"&&l()}),r.querySelector(".cancel").addEventListener("click",l),r.querySelector(".modal-close").addEventListener("click",l);let h=r.querySelector(".modal-error"),u=(f,_)=>{h.textContent=f,h.style.display=f?"block":"none",h.classList.toggle("info",!!_)};return{overlay:r,close:l,okBtn:r.querySelector(".ok"),showError:u}}var us=class{constructor(){this.eventListeners=new Map}on(e,i){this.eventListeners.has(e)||this.eventListeners.set(e,new Set),this.eventListeners.get(e).add(i)}off(e,i){this.eventListeners.get(e)?.delete(i)}emit(e,...i){let o=this.eventListeners.get(e);if(o)for(let r of o)try{r(...i)}catch(l){console.error(l)}}fire(e,...i){this.emit(e,...i)}};function xn(s,e,i={}){s.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0,detail:i}))}var tl=un` + .ide-tab-icon { + display: inline-flex; + align-items: center; + justify-content: center; + flex: none; + width: 13px; + height: 13px; + } + + .ide-tab-icon svg { + width: 100%; + height: 100%; + display: block; + } +`,No=class extends Ie{static properties={name:{type:String,reflect:!0},maximizable:{type:Boolean,reflect:!0},collapsible:{type:Boolean,reflect:!0},maximized:{type:Boolean,reflect:!0},collapsed:{type:Boolean,reflect:!0},_overflowing:{state:!0},_fadeStart:{state:!0},_fadeEnd:{state:!0},_menuOpen:{state:!0}};static styles=[tl,un` :host { display: flex; flex-direction: column; @@ -37,12 +62,38 @@ min-width: 0; overflow-x: auto; scrollbar-width: none; + --tab-fade: 24px; + /* Scrolling a tab into view keeps it clear of the faded edge. */ + scroll-padding-inline: var(--tab-fade); + -webkit-mask-image: var(--tab-mask, none); + mask-image: var(--tab-mask, none); } .ide-tabs::-webkit-scrollbar { display: none; } + /* The tabs at their full width: its size is the strip's scrollWidth. */ + .ide-tabs-track { + display: flex; + flex: none; + height: 100%; + } + + /* Fade the edge that has tabs scrolled past it. */ + .ide-tabs.fade-start { + --tab-mask: linear-gradient(to left, #000 calc(100% - var(--tab-fade)), transparent); + } + + .ide-tabs.fade-end { + --tab-mask: linear-gradient(to right, #000 calc(100% - var(--tab-fade)), transparent); + } + + .ide-tabs.fade-start.fade-end { + --tab-mask: linear-gradient(to right, transparent, #000 var(--tab-fade), + #000 calc(100% - var(--tab-fade)), transparent); + } + .ide-controls { display: flex; align-items: center; @@ -66,46 +117,161 @@ transition: background-color 120ms ease, color 120ms ease; } - .ide-btn:hover { + .ide-btn:hover, + .ide-btn-overflow[aria-expanded="true"] { background: var(--bg-hover); color: var(--fg-primary); } + /* Always laid out, so whether the tabs overflow never depends on it showing. */ + .ide-btn-overflow.idle { + visibility: hidden; + } + + .ide-btn.ide-btn-restore { + width: auto; + padding: 0 6px; + border: 1px solid var(--border-strong); + color: var(--fg-primary); + } + + .ide-btn.ide-btn-restore:hover { + color: var(--accent); + border-color: var(--accent); + } + .ide-content { flex: 1; position: relative; overflow: hidden; } - `;constructor(){super(),this._onMaximizeClick=this._onMaximizeClick.bind(this),this._onCollapseClick=this._onCollapseClick.bind(this)}connectedCallback(){super.connectedCallback(),this.classList.add("ide-pane",`ide-pane-${this.paneName}`)}get paneName(){return this.name||this.id.replace(/^pane-/,"")||"pane"}get _collapseIcon(){let e=this.paneName;return e==="bottom"?this.collapsed?"\u25B2":"\u25BC":e==="left"?this.collapsed?"\u25B6":"\u25C0":e==="right"?this.collapsed?"\u25C0":"\u25B6":"\u25BC"}get _collapseTitle(){let e=this.paneName,i=e.charAt(0).toUpperCase()+e.slice(1);return e==="bottom"?this.collapsed?"Expand Console":"Collapse Console":e==="left"?this.collapsed?"Expand Left Panel":"Collapse Left Panel":e==="right"?this.collapsed?"Expand Right Panel":"Collapse Right Panel":`Collapse ${i}`}_onMaximizeClick(e){e.stopPropagation(),fn(this,"ide-pane-maximize",{pane:this.paneName})}_onCollapseClick(e){e.stopPropagation(),fn(this,"ide-pane-collapse",{pane:this.paneName})}setMaximized(e){this.maximized=!!e}setCollapsed(e){this.collapsed=!!e}render(){let e=this.paneName,i=this.id||`pane-${e}`,o=this.maximizable,r=this.collapsible;return ci` + + /* Above Leaflet's controls (z-index 1000), below .context-menu. */ + .ide-tab-menu { + position: absolute; + top: 28px; + right: 4px; + z-index: 1100; + display: flex; + flex-direction: column; + min-width: min(160px, 100% - 8px); + max-width: calc(100% - 8px); + max-height: calc(100% - 32px); + overflow-y: auto; + padding: 4px 0; + background: var(--bg-context); + border: 1px solid var(--border-strong); + border-radius: var(--radius-sm); + box-shadow: 0 2px 8px var(--shadow); + box-sizing: border-box; + } + + .ide-tab-menu-item { + display: flex; + align-items: center; + gap: var(--space-sm, 6px); + padding: 5px 12px 5px 6px; + background: transparent; + border: none; + color: var(--fg-primary); + font-family: var(--font-sans); + font-size: var(--fs-12); + text-align: left; + white-space: nowrap; + cursor: pointer; + } + + .ide-tab-menu-item:hover, + .ide-tab-menu-item:focus-visible { + background: var(--bg-hover); + color: var(--fg-bright); + outline: none; + } + + .ide-tab-menu-item[aria-checked="true"] { + color: var(--accent-tab); + } + + .ide-tab-menu-check { + flex: none; + width: 12px; + text-align: center; + } + + .ide-tab-menu-title { + flex: 1; + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + } + `];constructor(){super(),this._overflowing=!1,this._fadeStart=!1,this._fadeEnd=!1,this._menuOpen=!1,this._tabsEl=null,this._tabsTrack=null,this._tabsSlot=null,this._tabsObserver=null,this._tabsMutations=null,this._menuAbort=null,this._menuHadFocus=!1,this._inUpdate=!1}connectedCallback(){super.connectedCallback(),this.classList.add("ide-pane",`ide-pane-${this.paneName}`),this.hasUpdated&&this._observeStrip()}disconnectedCallback(){super.disconnectedCallback(),this._tabsObserver?.disconnect(),this._closeMenu()}firstUpdated(){this._tabsEl=this.renderRoot.querySelector(".ide-tabs"),this._tabsTrack=this.renderRoot.querySelector(".ide-tabs-track"),this._tabsSlot=this.renderRoot.querySelector('slot[name="tabs"]'),this._tabsObserver=new ResizeObserver(()=>{this._updateOverflow(),this._tabs.find(e=>e.active)?.scrollIntoView({inline:"nearest",block:"nearest"})}),this._tabsMutations=new MutationObserver(()=>this.requestUpdate()),this._observeStrip()}willUpdate(e){this._menuHadFocus=this._menuOpen&&this._menuHasFocus(),this._inUpdate=!0,this._menuOpen&&(!this._overflowing||this.collapsed||e.has("maximized"))&&this._closeMenu(this._menuHadFocus)}updated(e){this._inUpdate=!1,this._menuOpen&&(e.has("_menuOpen")||this._menuHadFocus&&!this._menuHasFocus())&&this._focusMenuItem()}get _tabs(){return this._tabsSlot?.assignedElements()||[]}_observeStrip(){this._tabsObserver.observe(this._tabsEl),this._tabsObserver.observe(this._tabsTrack)}_observeTabs(){this._tabsMutations.disconnect();for(let e of this._tabs)this._tabsMutations.observe(e,{attributes:!0,attributeFilter:["active","hidden","title"]})}_onTabsSlotChange(){this._menuOpen&&(this._observeTabs(),this.requestUpdate())}_updateOverflow(){let e=this._tabsEl;if(!e)return;let i=e.scrollWidth-e.clientWidth;this._overflowing=i>1,this._fadeStart=this._overflowing&&e.scrollLeft>1,this._fadeEnd=this._overflowing&&e.scrollLeft=Math.abs(e.deltaY)||(e.preventDefault(),this._tabsEl.scrollLeft+=Io(e,()=>this._tabsEl.clientWidth)[1])}_onOverflowClick(){this._menuOpen?this._closeMenu(!0):this._openMenu()}_openMenu(){this._menuOpen=!0,this._observeTabs(),this._menuAbort=new AbortController;let{signal:e}=this._menuAbort;document.addEventListener("pointerdown",i=>{let o=i.composedPath();[".ide-tab-menu",".ide-btn-overflow"].some(l=>o.includes(this.renderRoot.querySelector(l)))||this._closeMenu()},{signal:e}),window.addEventListener("keydown",i=>this._onMenuKey(i),{capture:!0,signal:e})}_closeMenu(e=!1){this._menuAbort?.abort(),this._menuAbort=null,this._tabsMutations?.disconnect(),this._menuOpen=!1,e&&this.renderRoot.querySelector(".ide-btn-overflow")?.focus()}_menuHasFocus(){return!!this.renderRoot?.activeElement?.closest(".ide-tab-menu")}_focusMenuItem(){let e=[...this.renderRoot.querySelectorAll(".ide-tab-menu-item")];(e.find(i=>i.getAttribute("aria-checked")==="true")||e[0])?.focus()}_onMenuFocusout(e){this._inUpdate||this._menuOpen&&!e.currentTarget.contains(e.relatedTarget)&&this._closeMenu()}_keepMenuFocus(e){e.preventDefault()}_onMenuKey(e){let i=this.renderRoot.querySelector(".ide-tab-menu");if(!i||!e.composedPath().includes(i))return;let o=[...i.querySelectorAll(".ide-tab-menu-item")],r=o.length,l=o.indexOf(this.renderRoot.activeElement),h=null;if(e.key==="ArrowDown")h=o[(l+1)%r];else if(e.key==="ArrowUp")h=o[l<=0?r-1:l-1];else if(e.key==="Home")h=o[0];else if(e.key==="End")h=o[r-1];else if(e.key.length===1&&e.key!==" "&&!e.ctrlKey&&!e.metaKey&&!e.altKey){let u=e.key.toLowerCase();h=[...o.slice(l+1),...o.slice(0,l+1)].find(f=>f.querySelector(".ide-tab-menu-title").textContent.toLowerCase().startsWith(u))}else if(e.key!=="Escape")return;e.preventDefault(),e.stopPropagation(),e.key==="Escape"?this._closeMenu(!0):h?.focus()}_selectFromMenu(e){this._closeMenu(!0),e.select()}_renderTabMenu(){let e=this._tabs.filter(i=>!i.hidden);return Ae` + + `}get paneName(){return this.name||this.id.replace(/^pane-/,"")||"pane"}get _collapseIcon(){let e=this.paneName;return e==="bottom"?this.collapsed?"\u25B2":"\u25BC":e==="left"?this.collapsed?"\u25B6":"\u25C0":e==="right"?this.collapsed?"\u25C0":"\u25B6":"\u25BC"}get _collapseTitle(){let e=this.paneName,i=e.charAt(0).toUpperCase()+e.slice(1);return e==="bottom"?this.collapsed?"Expand Console":"Collapse Console":e==="left"?this.collapsed?"Expand Left Panel":"Collapse Left Panel":e==="right"?this.collapsed?"Expand Right Panel":"Collapse Right Panel":`Collapse ${i}`}_onMaximizeClick(e){e.stopPropagation(),xn(this,"ide-pane-maximize",{pane:this.paneName})}_onCollapseClick(e){e.stopPropagation(),xn(this,"ide-pane-collapse",{pane:this.paneName})}setMaximized(e){this.maximized=!!e}setCollapsed(e){this.collapsed=!!e}render(){let e=this.paneName,i=this.id||`pane-${e}`,o=this.maximizable,r=this.collapsible;return Ae`
-
- +
+
+ +
- ${_o(o,()=>ci` + + ${Lo(o,()=>Ae` + >${this.maximized?"\u29C9 Restore layout":"\u2922"} `)} - ${_o(r,()=>ci` + ${Lo(r,()=>Ae` `)}
+ ${this._menuOpen?this._renderTabMenu():Pt}
- `}},vo=class{constructor(e,i={}){(this.host=e).addController(this),this.options=i,this._abort=null,this.isDragging=!1,this.startPos=0}hostDisconnected(){this.stop()}start(e,i=!0){e.preventDefault();try{this.host.setPointerCapture(e.pointerId)}catch{}this.isDragging=!0,this.host.classList.add("dragging"),document.body&&document.body.classList.add("is-resizing",i?"is-resizing-v":"is-resizing-h"),this.startPos=i?e.clientX:e.clientY,this.options.onStart?.({startPos:this.startPos,event:e}),this._abort=new AbortController;let{signal:o}=this._abort;window.addEventListener("pointermove",l=>{let h=i?l.clientX:l.clientY,u=h-this.startPos;this.options.onDrag?.({delta:u,currentPos:h,startPos:this.startPos,event:l})},{signal:o});let r=l=>{try{this.host.releasePointerCapture(e.pointerId)}catch{}this.stop(i),this.options.onEnd?.({event:l})};window.addEventListener("pointerup",r,{signal:o}),window.addEventListener("pointercancel",r,{signal:o})}stop(e=!0){this.isDragging&&(this.isDragging=!1,this.host.classList.remove("dragging"),document.body&&document.body.classList.remove("is-resizing","is-resizing-v","is-resizing-h"),this._abort?.abort(),this._abort=null)}},bo=class extends Pe{static properties={for:{type:String},orientation:{type:String,reflect:!0}};constructor(){super(),this.orientation="vertical",this._connectedAbort=null,this.drag=new vo(this,{onStart:({startPos:e})=>this._emit("start",{startPos:e}),onDrag:({delta:e,currentPos:i,startPos:o})=>this._emit("drag",{delta:e,currentPos:i,startPos:o}),onEnd:()=>this._emit("end")})}connectedCallback(){super.connectedCallback(),this._connectedAbort=new AbortController;let{signal:e}=this._connectedAbort;this.setAttribute("role","separator"),this.classList.add("ide-splitter"),this.addEventListener("pointerdown",i=>this.drag.start(i,this.isVertical),{signal:e}),this.addEventListener("dblclick",()=>this._emit("reset"),{signal:e})}disconnectedCallback(){super.disconnectedCallback(),this._connectedAbort?.abort()}updated(e){super.updated(e);let i=this.isVertical;this.setAttribute("aria-orientation",i?"vertical":"horizontal"),this.classList.toggle("ide-splitter-v",i),this.classList.toggle("ide-splitter-h",!i)}get targetPane(){return this.for||""}get isVertical(){return this.orientation==="vertical"}_emit(e,i={}){fn(this,`ide-splitter-${e}`,{for:this.targetPane,orientation:this.isVertical?"vertical":"horizontal",...i})}},he=s=>se`{let h=i?l.clientX:l.clientY,u=h-this.startPos;this.options.onDrag?.({delta:u,currentPos:h,startPos:this.startPos,event:l})},{signal:o});let r=l=>{try{this.host.releasePointerCapture(e.pointerId)}catch{}this.stop(i),this.options.onEnd?.({event:l})};window.addEventListener("pointerup",r,{signal:o}),window.addEventListener("pointercancel",r,{signal:o})}stop(e=!0){this.isDragging&&(this.isDragging=!1,this.host.classList.remove("dragging"),document.body&&document.body.classList.remove("is-resizing","is-resizing-v","is-resizing-h"),this._abort?.abort(),this._abort=null)}},Do=class extends Ie{static properties={for:{type:String},orientation:{type:String,reflect:!0}};constructor(){super(),this.orientation="vertical",this._connectedAbort=null,this.drag=new Bo(this,{onStart:({startPos:e})=>this._emit("start",{startPos:e}),onDrag:({delta:e,currentPos:i,startPos:o})=>this._emit("drag",{delta:e,currentPos:i,startPos:o}),onEnd:()=>this._emit("end")})}connectedCallback(){super.connectedCallback(),this._connectedAbort=new AbortController;let{signal:e}=this._connectedAbort;this.setAttribute("role","separator"),this.classList.add("ide-splitter"),this.addEventListener("pointerdown",i=>this.drag.start(i,this.isVertical),{signal:e}),this.addEventListener("dblclick",()=>this._emit("reset"),{signal:e})}disconnectedCallback(){super.disconnectedCallback(),this._connectedAbort?.abort()}updated(e){super.updated(e);let i=this.isVertical;this.setAttribute("aria-orientation",i?"vertical":"horizontal"),this.classList.toggle("ide-splitter-v",i),this.classList.toggle("ide-splitter-h",!i)}get targetPane(){return this.for||""}get isVertical(){return this.orientation==="vertical"}_emit(e,i={}){xn(this,`ide-splitter-${e}`,{for:this.targetPane,orientation:this.isVertical?"vertical":"horizontal",...i})}},de=s=>se``,de=Object.freeze({LAYOUT:he(se``),SCHEMATIC:he(se``),VIEWER_3D:he(se``),DISPLAY_CONTROLS:he(se``),INSPECTOR:he(se``),HIERARCHY:he(se``),TIMING:he(se``),DRC:he(se``),SELECT_HIGHLIGHT:he(se``),CLOCK_TREE:he(se``),CHARTS:he(se``),TCL_CONSOLE:he(se``),HELP:he(se``)}),wo=class extends Pe{static properties={title:{type:String,reflect:!0},closable:{type:Boolean,reflect:!0},for:{type:String},active:{type:Boolean,reflect:!0},icon:{attribute:!1}};static styles=Xn` + aria-hidden="true">${s}`,ue=Object.freeze({LAYOUT:de(se``),SCHEMATIC:de(se``),VIEWER_3D:de(se``),DISPLAY_CONTROLS:de(se``),INSPECTOR:de(se``),HIERARCHY:de(se``),TIMING:de(se``),DRC:de(se``),SELECT_HIGHLIGHT:de(se``),CLOCK_TREE:de(se``),CHARTS:de(se``),TCL_CONSOLE:de(se``),HELP:de(se``)}),Ro=class extends Ie{static properties={title:{type:String,reflect:!0},closable:{type:Boolean,reflect:!0},for:{type:String},active:{type:Boolean,reflect:!0},icon:{attribute:!1}};static styles=[tl,un` :host { display: inline-flex; align-items: center; @@ -141,33 +307,15 @@ border-bottom: 2px solid var(--accent-tab); } - .ide-tab-icon, - ::slotted([slot="icon"]), - .or-tab-icon { - display: inline-flex; - align-items: center; - justify-content: center; - flex: none; - width: 13px; - height: 13px; + .ide-tab-icon { opacity: 0.7; } - :host([active]) .ide-tab-icon, - :host([active]) ::slotted([slot="icon"]), - :host([active]) .or-tab-icon { + :host([active]) .ide-tab-icon { color: var(--accent-tab); opacity: 1; } - .ide-tab-icon svg, - ::slotted([slot="icon"]) svg, - .or-tab-icon svg { - width: 100%; - height: 100%; - display: block; - } - .ide-tab-title { user-select: none; padding-top: 0; @@ -193,11 +341,11 @@ background: var(--bg-hover); color: var(--sem-error); } - `;constructor(){super(),this._connectedAbort=null,this.icon=null,this._onClick=this._onClick.bind(this),this._onCloseClick=this._onCloseClick.bind(this)}connectedCallback(){super.connectedCallback(),this._connectedAbort=new AbortController;let{signal:e}=this._connectedAbort;this.classList.add("ide-tab"),this.setAttribute("role","tab"),this.hasAttribute("aria-selected")||this.setAttribute("aria-selected","false"),this.addEventListener("click",this._onClick,{signal:e})}disconnectedCallback(){super.disconnectedCallback(),this._connectedAbort?.abort()}_onClick(e){(e.composedPath?e.composedPath():[e.target]).some(o=>o.classList?.contains("ide-tab-close"))||fn(this,"tab-select",{componentType:this.targetComponent})}_onCloseClick(e){e.stopPropagation(),fn(this,"tab-close",{componentType:this.targetComponent})}get targetComponent(){return this.for||this.getAttribute("data-component")||this.id.replace(/^tab-/,"")||""}setActive(e){this.active=!!e}updated(e){super.updated(e),e.has("active")&&this.setAttribute("aria-selected",this.active?"true":"false")}render(){return ci` - ${this.icon?ci`${this.icon}`:Rt} + `];constructor(){super(),this._connectedAbort=null,this.icon=null,this._onClick=this._onClick.bind(this),this._onCloseClick=this._onCloseClick.bind(this)}connectedCallback(){super.connectedCallback(),this._connectedAbort=new AbortController;let{signal:e}=this._connectedAbort;this.classList.add("ide-tab"),this.setAttribute("role","tab"),this.hasAttribute("aria-selected")||this.setAttribute("aria-selected","false"),this.addEventListener("click",this._onClick,{signal:e})}disconnectedCallback(){super.disconnectedCallback(),this._connectedAbort?.abort()}_onClick(e){(e.composedPath?e.composedPath():[e.target]).some(o=>o.classList?.contains("ide-tab-close"))||this.select()}select(){xn(this,"tab-select",{componentType:this.targetComponent})}_onCloseClick(e){e.stopPropagation(),xn(this,"tab-close",{componentType:this.targetComponent})}get targetComponent(){return this.for||this.getAttribute("data-component")||this.id.replace(/^tab-/,"")||""}setActive(e){this.active=!!e}updated(e){super.updated(e),e.has("active")&&this.setAttribute("aria-selected",this.active?"true":"false")}render(){return Ae` + ${this.icon?Ae`${this.icon}`:Pt} ${this.title||""} - ${this.closable?ci`✕`:Rt} - `}};customElements.get("ide-pane")||customElements.define("ide-pane",yo);customElements.get("ide-splitter")||customElements.define("ide-splitter",bo);customElements.get("ide-tab")||customElements.define("ide-tab",wo);var pa={DisplayControls:{pane:"left",title:"Display Controls",icon:de.DISPLAY_CONTROLS,closable:!1},LayoutViewer:{pane:"main",title:"Layout",icon:de.LAYOUT,closable:!1},SchematicWidget:{pane:"main",title:"Schematic",icon:de.SCHEMATIC},"3DViewer":{pane:"main",title:"3D Viewer",icon:de.VIEWER_3D},TclConsole:{pane:"bottom",title:"Tcl Console",icon:de.TCL_CONSOLE,closable:!1},Inspector:{pane:"right",title:"Inspector",icon:de.INSPECTOR},Browser:{pane:"right",title:"Hierarchy",icon:de.HIERARCHY},TimingWidget:{pane:"right",title:"Timing",icon:de.TIMING},DRCWidget:{pane:"right",title:"DRC",icon:de.DRC},SelectHighlight:{pane:"right",title:"Select Highlight",icon:de.SELECT_HIGHLIGHT},ClockWidget:{pane:"right",title:"Clock Tree",icon:de.CLOCK_TREE},ChartsWidget:{pane:"right",title:"Charts",icon:de.CHARTS},HelpWidget:{pane:"right",title:"Help",icon:de.HELP}},fa={left:"DisplayControls",main:"LayoutViewer",bottom:"TclConsole",right:"Inspector"},Oe={left:{cssVar:"--pane-left-width",defaultSize:240,minSize:140,maxFraction:.45},right:{cssVar:"--pane-right-width",defaultSize:340,minSize:160,maxFraction:.5,invertDelta:!0},bottom:{cssVar:"--pane-bottom-height",defaultSize:220,minSize:70,maxFraction:.75,invertDelta:!0}},Qn=class extends Jn{constructor(e){super(),this.containerEl=e,this.factories=new Map,this.components=new Map,this.activeTabs={left:null,main:null,bottom:null,right:null},this.closedComponents=new Set,this._resizeScheduled=!1,this._ensureDOM(),this._initSplitters(),this._initControls(),this._initResizeObserver()}_ensureDOM(){this.containerEl.classList.add("ide-layout"),this.containerEl.querySelector("#pane-left")||this._buildInitialLayoutTree(),this._resolvePaneReferences()}_buildInitialLayoutTree(){this.containerEl.innerHTML=` + ${this.closable?Ae`✕`:Pt} + `}};customElements.get("ide-pane")||customElements.define("ide-pane",No);customElements.get("ide-splitter")||customElements.define("ide-splitter",Do);customElements.get("ide-tab")||customElements.define("ide-tab",Ro);var Ja={DisplayControls:{pane:"left",title:"Display Controls",icon:ue.DISPLAY_CONTROLS,closable:!1},LayoutViewer:{pane:"main",title:"Layout",icon:ue.LAYOUT,closable:!1},SchematicWidget:{pane:"main",title:"Schematic",icon:ue.SCHEMATIC},"3DViewer":{pane:"main",title:"3D Viewer",icon:ue.VIEWER_3D},TclConsole:{pane:"bottom",title:"Tcl Console",icon:ue.TCL_CONSOLE,closable:!1},Inspector:{pane:"right",title:"Inspector",icon:ue.INSPECTOR},Browser:{pane:"right",title:"Hierarchy",icon:ue.HIERARCHY},TimingWidget:{pane:"right",title:"Timing",icon:ue.TIMING},DRCWidget:{pane:"right",title:"DRC",icon:ue.DRC},SelectHighlight:{pane:"right",title:"Select Highlight",icon:ue.SELECT_HIGHLIGHT},ClockWidget:{pane:"right",title:"Clock Tree",icon:ue.CLOCK_TREE},ChartsWidget:{pane:"right",title:"Charts",icon:ue.CHARTS},HelpWidget:{pane:"right",title:"Help",icon:ue.HELP}},Qa={left:"DisplayControls",main:"LayoutViewer",bottom:"TclConsole",right:"Inspector"},qe={left:{cssVar:"--pane-left-width",defaultSize:240,minSize:140,maxFraction:.45},right:{cssVar:"--pane-right-width",defaultSize:340,minSize:160,maxFraction:.5,invertDelta:!0},bottom:{cssVar:"--pane-bottom-height",defaultSize:220,minSize:70,maxFraction:.75,invertDelta:!0}},ps=class extends us{constructor(e){super(),this.containerEl=e,this.factories=new Map,this.components=new Map,this.activeTabs={left:null,main:null,bottom:null,right:null},this.closedComponents=new Set,this._resizeScheduled=!1,this._ensureDOM(),this._initSplitters(),this._initControls(),this._initResizeObserver()}_ensureDOM(){this.containerEl.classList.add("ide-layout"),this.containerEl.querySelector("#pane-left")||this._buildInitialLayoutTree(),this._resolvePaneReferences()}_buildInitialLayoutTree(){this.containerEl.innerHTML=` @@ -216,35 +364,25 @@ - `}_resolvePaneReferences(){let e=["left","main","bottom","right"];this.panes={};for(let i of e){let o=this.containerEl.querySelector(`#pane-${i}`);o&&(o.el=o,o.paneComponent=o),this.panes[i]=o}this.centerEl=this.containerEl.querySelector("#pane-center")}_initSplitters(){let e=null;this.containerEl.addEventListener("ide-splitter-start",i=>{let o=i.detail?.for,r=Oe[o];if(!r)return;let l=(i.detail?.orientation||"vertical")==="vertical",u=(l?this.containerEl:this.centerEl||this.containerEl).getBoundingClientRect(),f=this.panes[o]?.getBoundingClientRect()||{},_=l?u.width:u.height,y=l?f.width||r.defaultSize:f.height||r.defaultSize;e={paneName:o,cfg:r,startSize:y,maxLimit:Math.round(_*r.maxFraction)||500}}),this.containerEl.addEventListener("ide-splitter-drag",i=>{if(!e||e.paneName!==i.detail?.for)return;let{cfg:o,startSize:r,maxLimit:l}=e,h=o.invertDelta?-i.detail.delta:i.detail.delta,u=Math.round(r+h),f=Math.max(o.minSize,Math.min(l,u));this.containerEl.style.setProperty(o.cssVar,`${f}px`),this.notifyResize()}),this.containerEl.addEventListener("ide-splitter-end",()=>{e=null,this.saveLayout(),this.notifyResize()}),this.containerEl.addEventListener("ide-splitter-reset",i=>{let o=i.detail?.for;this._resetSplitterPane(o)})}_resetSplitterPane(e){let i=Oe[e];i&&(this.containerEl.style.setProperty(i.cssVar,`${i.defaultSize}px`),this.isPaneCollapsed(e)?this.restorePane(e):(this.saveLayout(),this.notifyResize()))}_initControls(){this.containerEl.addEventListener("ide-pane-maximize",e=>{this.toggleMaximize(e.detail?.pane)}),this.containerEl.addEventListener("ide-pane-collapse",e=>{this.toggleCollapse(e.detail?.pane)}),this.containerEl.addEventListener("ide-layout-reset",()=>{this.resetLayout()});for(let e of["left","right","bottom"]){let i=this.containerEl.querySelector(`#gutter-expand-${e}`);i&&i.addEventListener("click",()=>this.restorePane(e))}}isPaneMaximized(e){return e?!!this.panes[e]?.maximized:["main","bottom","right"].some(i=>!!this.panes[i]?.maximized)}setMaximizedPane(e,i=!0){let o=["main","bottom","right"];if(e&&!o.includes(e))return!1;let r=i?e:null;for(let l of o){let h=l===r;this.containerEl.classList.toggle(`maximized-${l}`,h),this.panes[l]&&(this.panes[l].maximized=h)}return this.notifyResize(),!!r}maximizePane(e){return this.setMaximizedPane(e,!0)}restoreMaximized(){return this.setMaximizedPane(null,!1)}toggleMaximize(e){return this.setMaximizedPane(e,!this.isPaneMaximized(e))}isPaneCollapsed(e){let i=e==="bottom"?this.centerEl:this.containerEl;return!!this.panes[e]?.collapsed||(i?i.classList.contains(`hide-${e}`):!1)}_setPaneCollapsed(e,i){let o=e==="bottom"?this.centerEl:this.containerEl;o&&(o.classList.toggle(`hide-${e}`,i),this.panes[e]&&(this.panes[e].collapsed=i),this.saveLayout(),this.notifyResize())}toggleCollapse(e){this._setPaneCollapsed(e,!this.isPaneCollapsed(e))}collapsePane(e){this._setPaneCollapsed(e,!0)}restorePane(e){this._setPaneCollapsed(e,!1)}resetLayout(){try{localStorage.removeItem("or_ide_layout")}catch{}for(let[e,i]of Object.entries(Oe))this.containerEl.style.setProperty(i.cssVar,`${i.defaultSize}px`);for(let e of["left","right","bottom"])this.restorePane(e);this.restoreMaximized(),this.closedComponents.clear();for(let e of this.components.values())e.tabEl.hidden=!1,e.contentDiv.hidden=!1;for(let e of Object.values(fa))this.components.has(e)&&this.activateTab(e);this.saveLayout(),this.notifyResize(),this.emit("stateChanged")}_initResizeObserver(){typeof ResizeObserver<"u"&&new ResizeObserver(()=>{this.notifyResize()}).observe(this.containerEl)}registerComponentFactoryFunction(e,i){this.factories.set(e,i)}loadLayout(e){for(let o of Object.keys(pa)){let r=this.factories.get(o);r&&this._mountComponent(o,r)}let i=null;try{let o=localStorage.getItem("or_ide_layout");o&&(i=JSON.parse(o))}catch{}if(i){if(i.leftWidth&&this.containerEl.style.setProperty("--pane-left-width",`${i.leftWidth}px`),i.rightWidth&&this.containerEl.style.setProperty("--pane-right-width",`${i.rightWidth}px`),i.bottomHeight&&this.containerEl.style.setProperty("--pane-bottom-height",`${i.bottomHeight}px`),i.closed)for(let o of i.closed)this.closeComponent(o,!1);for(let o of["left","right","bottom"]){let r=`hide${o[0].toUpperCase()}${o.slice(1)}`;i[r]&&this.collapsePane(o)}}for(let[o,r]of Object.entries(fa))this.activateTab(i?.activeTabs?.[o]||r);this.notifyResize(),this.emit("stateChanged")}_mountComponent(e,i){if(this.components.has(e))return;let o=pa[e]||{pane:"right",title:e,closable:!0},r=this.panes[o.pane];if(!r)return;let l=document.createElement("div");l.className="ide-component-container",l.id=`cmp-${e}`,r.appendChild(l);let h=o.closable!==!1,u=document.createElement("ide-tab");u.id=`tab-${e}`,u.slot="tabs",u.for=e,u.setAttribute("data-component",e),u.title=o.title,h&&u.setAttribute("closable",""),o.icon&&(u.icon=o.icon),u.addEventListener("tab-select",()=>this.activateTab(e)),u.addEventListener("tab-close",()=>this.closeComponent(e)),r.appendChild(u);let f=Object.assign(new Jn,{element:l,get width(){return l.clientWidth},get height(){return l.clientHeight},title:o.title,focus:()=>this.focusComponent(e),close:()=>this.closeComponent(e)}),_={componentType:e,paneName:o.pane,title:o.title,closable:h,tabEl:u,contentDiv:l,container:f};this.components.set(e,_);try{i(f)}catch(y){console.error(`Failed to initialize component ${e}:`,y)}}isComponentActive(e){return e?this.activeTabs[e.paneName]===e.componentType:!1}_setComponentActive(e,i){if(!e)return;let o=!!i;e.tabEl&&(e.tabEl.active=o),e.contentDiv?.classList.toggle("active",o)}activateTab(e){let i=this.components.get(e);if(!i||!this.panes[i.paneName])return;["left","right","bottom"].includes(i.paneName)&&this.isPaneCollapsed(i.paneName)&&this.restorePane(i.paneName);let r=this.activeTabs[i.paneName];if(r&&r!==e){let l=this.components.get(r);l&&(this._setComponentActive(l,!1),l.container.fire("hide"))}this.activeTabs[i.paneName]=e,i.tabEl.hidden=!1,i.contentDiv.hidden=!1,this._setComponentActive(i,!0),this.closedComponents.delete(e),i.container.fire("show"),i.container.fire("open"),i.container.fire("resize");try{i.tabEl.scrollIntoView({behavior:"smooth",inline:"nearest",block:"nearest"})}catch{}this.notifyResize(),this.emit("stateChanged")}closeComponent(e,i=!0){let o=this.components.get(e);if(!(!o||!o.closable)){if(o.tabEl.hidden=!0,o.contentDiv.hidden=!0,this._setComponentActive(o,!1),o.container.fire("hide"),this.closedComponents.add(e),i&&this.activeTabs[o.paneName]===e){let r=null;for(let l of this.components.values())if(l.paneName===o.paneName&&!this.closedComponents.has(l.componentType)){r=l;break}r?this.activateTab(r.componentType):(this.activeTabs[o.paneName]=null,["left","right","bottom"].includes(o.paneName)&&this.collapsePane(o.paneName))}this.notifyResize(),this.emit("stateChanged")}}focusComponent(e){if(!this.components.get(e)){let o=this.factories.get(e);if(o)this._mountComponent(e,o);else return}this.activateTab(e)}saveLayout(){let e={leftWidth:parseInt(this.containerEl.style.getPropertyValue(Oe.left.cssVar)||Oe.left.defaultSize,10),rightWidth:parseInt(this.containerEl.style.getPropertyValue(Oe.right.cssVar)||Oe.right.defaultSize,10),bottomHeight:parseInt(this.containerEl.style.getPropertyValue(Oe.bottom.cssVar)||Oe.bottom.defaultSize,10),hideLeft:this.isPaneCollapsed("left"),hideRight:this.isPaneCollapsed("right"),hideBottom:this.isPaneCollapsed("bottom"),activeTabs:{...this.activeTabs},closed:Array.from(this.closedComponents)};try{localStorage.setItem("or_ide_layout",JSON.stringify(e))}catch{}return e}notifyResize(){if(this._resizeScheduled)return;this._resizeScheduled=!0,(typeof requestAnimationFrame=="function"?requestAnimationFrame:i=>{i()})(()=>{this._resizeScheduled=!1;for(let i of this.components.values())this.isComponentActive(i)&&i.container.fire("resize");typeof app<"u"&&app&&app.map&&app.map.invalidateSize({animate:!1}),window.dispatchEvent(new Event("resize"))})}updateSize(){this.notifyResize()}setSize(e,i){this.notifyResize()}addComponent(e,i,o){this.focusComponent(e)}get rootItem(){return{contentItems:Array.from(this.components.keys()).map(e=>({isComponent:!0,componentType:e,focus:()=>this.focusComponent(e)}))}}};function Jt(s,e,i,o,r=0,l=0){return[(e-l-o)*i,(s-r)*i]}function Ut(s,e,i,o,r,l,h=0,u=0){return[[(e-u-l)*r,(s-h)*r],[(o-u-l)*r,(i-h)*r]]}function we(s,e,i,o,r=0,l=0){return{dbuX:Math.round(r+e/i),dbuY:Math.round(l+o+s/i)}}var mn=class s{constructor(e,i){this.url=e,this.socket=null,this.nextId=1,this.pending=new Map,this._queue=new Map,this._inFlight=0,this._inFlightIds=new Set,this._unknownPayloadTypes=new Set,this._maxInFlight=48,this._lastRecvAt=0,this._bufStuckSince=0,this._lastBuffered=0,this.reconnectDelay=1e3,this.readyPromise=null,this.readyResolve=null,this.onStatusChange=i||(()=>{}),this.onPush=null,this._cache=null,this._isConnected=!1,this._shutdown=!1,this._livenessTimer=void 0,this._startLivenessMonitor(),this.connect()}get isConnected(){return this._isConnected||this.socket&&this.socket.readyState===WebSocket.OPEN}get pendingCount(){return this.pending.size+(this._queue?this._queue.size:0)}static fromCache(e,i){let o=Object.create(s.prototype);return o.url=null,o.socket=null,o.nextId=1,o.pending=new Map,o._queue=new Map,o._inFlight=0,o._inFlightIds=new Set,o._unknownPayloadTypes=new Set,o._maxInFlight=48,o._lastRecvAt=0,o.reconnectDelay=0,o.onStatusChange=i||(()=>{}),o.onPush=null,o._cache=e,o._isConnected=!0,o.readyPromise=Promise.resolve(),o.readyResolve=null,o}get isStaticMode(){return!!this._cache}connect(){this.readyPromise=new Promise(e=>{this.readyResolve=e}),this.socket=new WebSocket(this.url),this.socket.binaryType="arraybuffer",this.socket.onopen=()=>{console.log("WebSocket connected");let e=this._everConnected===!0;this._everConnected=!0,this._isConnected=!0,this.reconnectDelay=1e3,this._lastRecvAt=typeof performance<"u"?performance.now():0,this.readyResolve(),this.onStatusChange(),this._pump(),e&&this.onReconnected&&this.onReconnected()},this.socket.onmessage=e=>{this.handleMessage(e.data)},this.socket.onclose=()=>this._handleClose(),this.socket.onerror=e=>{console.error("WebSocket error:",e)}}_handleClose(){this._isConnected=!1,this._inFlight=0,this._inFlightIds.clear(),this._bufStuckSince=0,this.onStatusChange();for(let[e,i]of this.pending)i.reject(new Error("WebSocket closed"));this.pending.clear();for(let[e,i]of this._queue)i.reject(new Error("WebSocket closed"));if(this._queue.clear(),this._shutdown){console.log("WebSocket closed (server stopped)"),this._stopLivenessMonitor();return}console.log("WebSocket closed, reconnecting..."),setTimeout(()=>this.connect(),this.reconnectDelay),this.reconnectDelay=Math.min(this.reconnectDelay*2,3e4)}_forceReconnect(){let e=this.socket;if(this.socket=null,e){e.onopen=null,e.onmessage=null,e.onclose=null,e.onerror=null;try{e.close()}catch{}}this._handleClose()}handleMessage(e){let i=new DataView(e),o=i.getUint32(0),r=i.getUint8(4);if(this._lastRecvAt=typeof performance<"u"?performance.now():0,o===0&&r===0){let u=e.slice(8),f;try{f=JSON.parse(new TextDecoder().decode(u))}catch(_){console.error("Failed to parse server push JSON:",_);return}if(f&&f.type==="config"){Number.isFinite(f.max_in_flight)&&(this._maxInFlight=Math.max(1,Math.min(4096,Math.floor(f.max_in_flight))),this._pump());return}this.onPush&&this.onPush(f);return}this._inFlightIds.delete(o)&&this._inFlight>0&&this._inFlight--;let l=this.pending.get(o);if(!l){this._pump();return}this.pending.delete(o),this._pump(),this.onStatusChange();let h=e.slice(8);if(r===2)l.reject(new Error(new TextDecoder().decode(h)));else if(r===0)try{l.resolve(JSON.parse(new TextDecoder().decode(h)))}catch(u){l.reject(new Error("JSON parse error: "+u.message))}else r===1?l.resolve(new Blob([h],{type:"image/png"})):r===3?l.resolve(null):(this._unknownPayloadTypes.has(r)||(this._unknownPayloadTypes.add(r),console.warn(`Unrecognized websocket payload type ${r}. The server is likely newer than this page \u2014 reload to pick up the current client.`)),l.reject(new Error(`Unsupported websocket payload type ${r}`)))}request(e){if(this._cache)return this._cacheRequest(e);let i=this.nextId++;if(e.id=i,!this.socket||this.socket.readyState!==WebSocket.OPEN)return Promise.reject(new Error("WebSocket not connected"));let o,r,l=new Promise((h,u)=>{o=h,r=u});return l.requestId=i,this._queue.set(i,{msg:e,resolve:o,reject:r}),this._pump(),l}_pump(){if(!(!this.socket||this.socket.readyState!==WebSocket.OPEN)){for(;this._inFlight0&&this.socket.bufferedAmount<524288;){let[e,i]=this._queue.entries().next().value;this._queue.delete(e),this.pending.set(e,{resolve:i.resolve,reject:i.reject}),this.socket.send(JSON.stringify(i.msg)),this._inFlightIds.add(e),this._inFlight++}this.onStatusChange()}}cancel(e){let i=this._queue.get(e);if(i){this._queue.delete(e),i.reject(new Error("Request cancelled")),this.onStatusChange();return}let o=this.pending.get(e),r=this.pending.delete(e);o&&o.reject(new Error("Request cancelled")),r&&!this._cache&&this.socket&&this.socket.readyState===WebSocket.OPEN&&this.socket.send(JSON.stringify({type:"cancel",cancel_id:e,id:this.nextId++})),this.onStatusChange()}_startLivenessMonitor(){typeof setInterval>"u"||(this._livenessTimer=setInterval(()=>this._checkLiveness(),3e3),this._livenessTimer&&typeof this._livenessTimer.unref=="function"&&this._livenessTimer.unref())}_stopLivenessMonitor(){this._livenessTimer!==void 0&&typeof clearInterval<"u"&&(clearInterval(this._livenessTimer),this._livenessTimer=void 0)}_checkLiveness(){if(this._cache)return;let e=this.socket;if(!e||e.readyState!==WebSocket.OPEN){this._bufStuckSince=0,this._lastBuffered=0;return}let i=e.bufferedAmount,o=typeof performance<"u"?performance.now():0,r=!1,l="";i<=262144||i12e3&&(r=!0,l=`send buffer stuck at ${i}B for ${Math.round(o-this._bufStuckSince)}ms`),this._lastBuffered=i,!r&&this._inFlight>=this._maxInFlight&&this._queue.size>0&&this._lastRecvAt>0&&o-this._lastRecvAt>3e4&&(r=!0,l=`saturated (${this._inFlight} in flight, ${this._queue.size} queued) but silent for ${Math.round(o-this._lastRecvAt)}ms`),r&&(console.warn(`WebSocket connection wedged \u2014 ${l}; reconnecting to recover`),this._bufStuckSince=0,this._forceReconnect())}_cacheRequest(e){let i=e.type;if(i==="tile"){let l=e.layer+"/"+e.z+"/"+e.x+"/"+e.y,h=this._cache.tiles&&this._cache.tiles[l];return h?Promise.resolve("data:image/png;base64,"+h):Promise.reject(new Error("Tile not cached: "+l))}if(i==="timing_highlight"){let l=e.path_index;if(l>=0&&this._cache.overlays){let h=e.is_setup?"setup":"hold",u=this._cache.overlays[h]?.[l];this._cache.setPathOverlay&&this._cache.setPathOverlay(u?"data:image/png;base64,"+u:null)}else this._cache.setPathOverlay&&this._cache.setPathOverlay(null);return Promise.resolve({})}if(i==="set_module_colors")return Promise.resolve({ok:1,count:0});let o=i;i==="timing_report"?o="timing_report:"+(e.is_setup?"setup":"hold"):i==="slack_histogram"&&(o="slack_histogram:"+(e.is_setup?"setup":"hold"));let r=this._cache.json&&this._cache.json[o];if(r!==void 0){if(i==="timing_report"&&e.slack_min!=null&&e.slack_max!=null&&r.paths){let l=[];return r.paths.forEach((h,u)=>{h.slack>=e.slack_min&&h.slack"u"||typeof window.matchMedia!="function"||typeof s!="function")return()=>{};let e=!1,i=null,o=null,r=()=>{if(e)return;let l=window.devicePixelRatio||1;i=window.matchMedia(`(resolution: ${l}dppx)`),o=()=>{e||(r(),s(window.devicePixelRatio||1))},i.addEventListener("change",o,{once:!0})};return r(),()=>{e=!0,i&&o&&i.removeEventListener("change",o),i=null,o=null}}function Oi(s,e){let i=s&&s._map?s._map.getZoom():e;return Math.floor(i)}var Ch=["tracks_pref","tracks_non_pref","debug","debug_renderers"],kh=1/16;function ko(s,e){if(s==null)return!1;if(!Array.isArray(s)||s.length!==4||!e)return!0;let i=Math.pow(2,e.z),o=kh/i,r=e.x/i-o,l=e.y/i-o,h=(e.x+1)/i+o,u=(e.y+1)/i+o,[f,_,y,g]=s;return f<=h&&y>=r&&_<=u&&g>=l}function Lh(s,e,i){let o=s&&Array.isArray(s.by_size)?s.by_size:[];if(o.length===0||!e||!(i>0))return!0;let r=s.min_css_px/(i*Math.pow(2,e.z)),l=o[0];for(let h of o)h[0]<=r&&(l=h);return ko(l[1],e)}var is=class{constructor(){this._layers=null,this._gated=new Map,this._sized=new Map,this._generation=0}invalidate(){return this._generation++,this._layers=null,this._gated=new Map,this._sized=new Map,this._generation}apply(e,i){if(e!==this._generation)return!1;if(!i||i.supported!==!0||!i.layers||typeof i.layers!="object")return this._layers=null,!1;let o=new Map;if(i.gated&&typeof i.gated=="object")for(let[r,l]of Object.entries(i.gated))l&&typeof l=="object"&&o.set(r,new Map(Object.entries(l)));return this._layers=new Map(Object.entries(i.layers)),this._gated=o,this._sized=new Map(i.sized&&typeof i.sized=="object"?Object.entries(i.sized):[]),!0}refetch(e){let i=this.invalidate();return Promise.resolve().then(()=>e({type:"layer_extents"})).then(o=>this.apply(i,o)).catch(()=>!1)}mayHaveContent(e,i,o,r=256){if(!this._layers||o&&Ch.some(l=>o[l]))return!0;if(this._sized.has(e))return Lh(this._sized.get(e),i,r);if(!this._layers.has(e)||ko(this._layers.get(e),i))return!0;for(let[l,h]of this._gated)if(!(o&&o[l]===!1)&&h.has(e)&&ko(h.get(e),i))return!0;return!1}};function _n(s,e,i){let o=s&&s.app&&s.app.layerExtents;return o?o.mayHaveContent(e,i,s.visibility,xe()):!0}function di(){return Ri()}function ya(s,e,i){return es(s,e,i,di(),xe())}function Hi(s,e){if(s.src&&s.src.startsWith("blob:")&&URL.revokeObjectURL(s.src),e==null){s.src=$e;return}s.src=typeof e=="string"?e:URL.createObjectURL(e)}function va(s,e,i,o,r){let l={visibility:s,selectability:i,visibleLayers:e,selectableLayers:o,app:r};return L.GridLayer.extend({_clampZoom:function(h){return L.GridLayer.prototype._clampZoom.call(this,Oi(this,h))},initialize:function(h,u,f){this._websocketManager=h,this._layerName=u,L.GridLayer.prototype.initialize.call(this,hi(f))},createTile:function(h,u){let f=document.createElement("img");return f.alt="",f.setAttribute("role","presentation"),f._tileDone=!1,f.onload=()=>{f.src&&f.src.startsWith("blob:")&&URL.revokeObjectURL(f.src),f._tileDone||(f._tileDone=!0,u(null,f))},f.onerror=()=>{f._tileDone||(f._tileDone=!0,u(new Error("tile image load error"),f))},f._websocketRequestId=this._websocketManager.nextId,_n(l,this._layerName,h)?(this._websocketManager.request(ya(h,this._layerName,l)).then(_=>{Hi(f,_)}).catch(_=>{}),f):(f._websocketRequestId=void 0,Hi(f,null),f)},refreshTiles:function(){if(this._map)for(let h in this._tiles){let u=this._tiles[h];if(!u||!u.el)continue;let f=u.el,_=u.coords;if(f._websocketRequestId!==void 0&&this._websocketManager.cancel(f._websocketRequestId),!_n(l,this._layerName,_)){f._websocketRequestId=void 0,Hi(f,null);continue}f._websocketRequestId=this._websocketManager.nextId,this._websocketManager.request(ya(_,this._layerName,l)).then(y=>{Hi(f,y)}).catch(y=>{})}},_removeTile:function(h){let u=this._tiles[h];u&&u.el&&(u.el._websocketRequestId!==void 0&&this._websocketManager.cancel(u.el._websocketRequestId),u.el.src&&u.el.src.startsWith("blob:")&&URL.revokeObjectURL(u.el.src)),L.GridLayer.prototype._removeTile.call(this,h)}})}function ba(s,e){function i(o,r){let l={type:"overlay_tile",z:o.z,x:o.x,y:o.y,...zi(di(),r),debug_renderers:!!s.debug_renderers,debug_live:!!s.debug_live,flywires_only:!!s.flywires_only,poly_decomp:!!(e&&e.polyDecomp),focused_nets_guides:!!s.focused_nets_guides,highlight_selected:s.highlight_selected!==!1,draw_labels:s.labels!==!1};return e&&e.visibleLayerNames&&(l.visible_layers=[...e.visibleLayerNames]),l}return L.GridLayer.extend({initialize:function(o,r){this._websocketManager=o,L.GridLayer.prototype.initialize.call(this,hi(r))},createTile:function(o,r){let l=document.createElement("img");l.alt="",l.setAttribute("role","presentation"),l._tileDone=!1,l.onload=()=>{l.src&&l.src.startsWith("blob:")&&URL.revokeObjectURL(l.src),l._tileDone||(l._tileDone=!0,r(null,l))},l.onerror=()=>{l._tileDone||(l._tileDone=!0,r(new Error("overlay tile load error"),l))};let h=this._websocketManager.nextId;return l._websocketRequestId=h,this._websocketManager.request(i(o,this.getTileSize().x)).then(u=>{l._websocketRequestId===h&&Hi(l,u)}).catch(u=>{}),l},refreshTiles:function(){if(this._map)for(let o in this._tiles){let r=this._tiles[o];if(!r||!r.el)continue;let l=r.el,h=r.coords;l._websocketRequestId!==void 0&&this._websocketManager.cancel(l._websocketRequestId);let u=this._websocketManager.nextId;l._websocketRequestId=u,this._websocketManager.request(i(h,this.getTileSize().x)).then(f=>{l._websocketRequestId===u&&Hi(l,f)}).catch(()=>{})}},_removeTile:function(o){let r=this._tiles[o];r&&r.el&&(r.el._websocketRequestId!==void 0&&(this._websocketManager.cancel(r.el._websocketRequestId),r.el._websocketRequestId=void 0),r.el.src&&r.el.src.startsWith("blob:")&&URL.revokeObjectURL(r.el.src)),L.GridLayer.prototype._removeTile.call(this,o)}})}function wa({zIndex:s=0,tileSize:e}={}){let i={opacity:1,zIndex:s};return e!==void 0&&(i.tileSize=e),i}var Sh=4,Lo=350*1024*1024;function xa(s,e=1){let i=Math.round(s*Math.max(0,e));return i*i*Sh}function Ca(s,e,i=256){return!(s>0)||!(e>0)||!(i>0)?1:(Math.ceil(s/i)+1)*(Math.ceil(e/i)+1)}function ka(s,e){let i=e||(typeof window<"u"?window:null),o=s&&s.clientWidth>0?s.clientWidth:i&&i.innerWidth>0?i.innerWidth:1024,r=s&&s.clientHeight>0?s.clientHeight:i&&i.innerHeight>0?i.innerHeight:768;return{width:o,height:r}}function So(s,e){if(!s)return!1;let i=!!e;return!!s.visible===i?!1:(s.visible=i,!0)}var ns=4;function La(s,e,i,o=ns){let r=e*i;return r>0?Math.max(r,s-o*r):s}function Sa({budgetBytes:s=Lo,tilesPerPane:e,bytesPerTile:i,paneCount:o}={}){if(!(e>0)||!(i>0)||!(o>0))return 1;let r=e*i;return Math.max(1,Math.min(o,Math.floor(s/r)))}function Mo(s,e){if(!Array.isArray(s)||s.length===0)return[];let i=Math.max(1,Math.min(Math.floor(e)||1,s.length)),o=Math.floor(s.length/i),r=s.length%i,l=[],h=0;for(let u=0;u0&&(f++,r--),l.push(s.slice(h,h+f)),h+=f}return l}function Ma(s,e,i){if(!s||!(i>0))return 0;s.clearRect(0,0,i,i);let o=0;for(let r of e||[]){let l=r?r.image:null;if(!l)continue;let h=r.opacity===void 0?1:r.opacity;h>0&&(s.globalAlpha=Math.min(1,h),s.drawImage(l,0,0,i,i),o++)}return s.globalAlpha=1,o}function Eo(s){for(let e of s||[])e&&typeof e.close=="function"&&e.close()}async function Ea({items:s,request:e,decode:i,draw:o,release:r=Eo,isStale:l=()=>!1,onFirstDraw:h}={}){let u=Array.isArray(s)?s:[],f={requested:u.length,arrived:0,decoded:0,drawn:0,paints:0,stale:!1};if(u.length===0)return typeof o=="function"&&o([]),f;let _=new Array(u.length).fill(null),y=!1;function g(){if(l()){f.stale=!0;return}f.drawn=o(u.map((b,w)=>({image:_[w],opacity:b.opacity})))||0,f.paints++,y||(y=!0,h&&h())}try{await Promise.all(u.map(async(b,w)=>{let v=null;try{v=await e(b)}catch{return}if(v==null)return;f.arrived++;let S=null;try{S=await i(v)}catch{return}S&&(_[w]=S,f.decoded++,g())})),y||g()}finally{r(_)}return f}function Mh(s){return s==null?Promise.resolve(null):typeof s=="string"?new Promise(e=>{let i=document.createElement("img");i.onload=()=>e(i),i.onerror=()=>e(null),i.src=s}):typeof createImageBitmap=="function"?createImageBitmap(s).catch(()=>null):new Promise(e=>{let i=URL.createObjectURL(s),o=new Image;o.onload=()=>{URL.revokeObjectURL(i),e(o)},o.onerror=()=>{URL.revokeObjectURL(i),e(null)},o.src=i})}function Ta(s,e={}){let i=e.decode||Mh,o=e.dpr||Ri;return L.GridLayer.extend({_clampZoom:function(r){return L.GridLayer.prototype._clampZoom.call(this,Oi(this,r))},initialize:function(r,l,h){this._websocketManager=r,this._items=l||[],this._generation=0,L.GridLayer.prototype.initialize.call(this,hi(h))},setItems:function(r){this._items=r||[],this.refreshTiles()},visibleItems:function(){return this._items.filter(r=>r&&r.visible!==!1)},createTile:function(r,l){let h=document.createElement("canvas");h.setAttribute("role","presentation");let u=o();return h._orDone=l,this._renderTile(h,r,u),h},_sizeCanvas:function(r,l,{empty:h=!1}={}){let u=this.getTileSize(),f=h?0:ts(u.x,l),_=h?0:ts(u.y,l);(r.width!==f||r.height!==_)&&(r.width=f,r.height=_),r.style.width=u.x+"px",r.style.height=u.y+"px"},_finishTile:function(r,l){r._orTileDone||!r._orDone||(r._orTileDone=!0,r._orDone(l||null,r))},_renderTile:function(r,l,h){let u=this._generation,f=this.visibleItems().filter(g=>_n(s,g.layer,l));this._sizeCanvas(r,h,{empty:f.length===0});let _=r.getContext("2d");r._orRequestIds=[];let y=()=>this._generation!==u||r._orRemoved===!0;Ea({items:f,request:g=>{let b=this._websocketManager.nextId;return r._orRequestIds.push(b),this._websocketManager.request(es(l,g.layer,s,h,this.getTileSize().x))},decode:i,draw:g=>Ma(_,g,r.width),release:Eo,isStale:y,onFirstDraw:()=>this._finishTile(r)}).then(()=>{y()||this._finishTile(r)}).catch(g=>{y()||this._finishTile(r,g)})},refreshTiles:function(){if(this._map){this._generation++;for(let r in this._tiles){let l=this._tiles[r];if(!l||!l.el)continue;this._cancelTile(l.el);let h=o();this._renderTile(l.el,l.coords,h)}}},_cancelTile:function(r){let l=r._orRequestIds;if(!(!l||!l.length)){for(let h of l)this._websocketManager.cancel(h);r._orRequestIds=[]}},_removeTile:function(r){let l=this._tiles[r];l&&l.el&&(l.el._orRemoved=!0,this._cancelTile(l.el),l.el.width=0,l.el.height=0),L.GridLayer.prototype._removeTile.call(this,r)}})}function Pa(s,e,i,o,r=0){let l=[];return i.forEach((h,u)=>{let f=new s(e,h,wa({zIndex:r+u}));o&&f.addTo(o),l.push(f)}),l}var Eh=".leaflet-tile-container",Na=".leaflet-tile";function Ia(s,e){if(!Number.isFinite(s)||!(e>0))return 0;let i=s*e;return(i-Math.round(i))/e}function Th(s,e,i=Ba){let o=s&&s.parentElement;if(!o)return null;let r=typeof s.querySelector=="function"?s.querySelector(Na):null;if(!r)return null;let l=i(r),h=Aa((o._orSnapDx||0)-Ia(l.left,e),e),u=Aa((o._orSnapDy||0)-Ia(l.top,e),e);return o._orSnapDx=h,o._orSnapDy=u,o.style.transform=h||u?`translate3d(${h}px, ${u}px, 0)`:"",{dx:h,dy:u}}function Ph(s,e,i=Ba){if(!s||typeof s.getPane!="function"||!(e>0)||Number.isInteger(e))return 0;let o=s.getPane("tilePane");if(!o||typeof o.querySelectorAll!="function")return 0;let r=0,l=[...o.querySelectorAll(Eh)].filter(Ih).map(h=>{let u=h.querySelector(Na);return{container:h,rect:u?i(u):null}});for(let{container:h,rect:u}of l)u&&Th(h,e,()=>u)&&r++;return r}function Ba(s){return s.getBoundingClientRect()}function Aa(s,e){return s-Math.round(s*e)/e}function Ih(s){let e=s.style&&s.style.transform||"",i=/scale\(([^)]*)\)/.exec(e);return!i||Number(i[1])===1}var Ah="move zoomend viewreset resize load";function Da(s,e=Ri){if(!s||typeof s.on!="function")return!1;let i=()=>Ph(s,e());return s.on(Ah,i),i(),!0}function wt(s){return!!s?.websocketManager?.isStaticMode}function Ha(s){let e=s?.protocol==="https:"?"wss":"ws",i=s?.host||"localhost:8080";return`${e}://${i}/ws`}function $a(s,e){let i={};for(let[o,r]of Object.entries(s||{}))i[o]=!!r;for(let[o,r]of Object.entries(e||{}))i["s_"+o]=!!r;return i}function $i(s,e){e&&typeof e.sel_has_inst=="boolean"&&(s.selHasInst=e.sel_has_inst,s.selHasNet=!!e.sel_has_net)}var To=null;function Ce(s,e=4e3){let i=document.getElementById("or-toast");return i||(i=document.createElement("div"),i.id="or-toast",document.body.appendChild(i)),i.textContent=s,i.classList.add("visible"),To&&clearTimeout(To),To=setTimeout(()=>i.classList.remove("visible"),e),i}function Fa({title:s,message:e,confirmLabel:i="OK",danger:o=!1}){return new Promise(r=>{let l=document.createElement("div");l.className="or-modal-overlay";let h=document.createElement("div");h.className="or-modal";let u=document.createElement("div");u.className="or-modal-title",u.textContent=s;let f=document.createElement("div");f.className="or-modal-message",f.textContent=e;let _=document.createElement("div");_.className="or-modal-buttons";let y=document.createElement("button");y.className="or-btn",y.textContent="Cancel";let g=document.createElement("button");g.className="or-btn"+(o?" or-btn-danger":""),g.textContent=i;let b=v=>{document.removeEventListener("keydown",w,!0),l.remove(),r(v)},w=v=>{v.key==="Escape"&&(v.stopPropagation(),b(!1))};y.addEventListener("click",()=>b(!1)),g.addEventListener("click",()=>b(!0)),l.addEventListener("click",v=>{v.target===l&&b(!1)}),document.addEventListener("keydown",w,!0),_.appendChild(y),_.appendChild(g),h.appendChild(u),h.appendChild(f),h.appendChild(_),l.appendChild(h),document.body.appendChild(l),y.focus()})}var Nh=.05;function Bh([[s,e],[i,o]],r){let l=(o-e)*r,h=(i-s)*r;return[[s-h,e-l],[i+h,o+l]]}function Po(s,e=256,i=null){if(!Ra(s))return null;let o=s[0][0],r=s[0][1],l=Math.max(s[1][1]-r,s[1][0]-o),h=e/l,u=Ra(i)?i:s,[[f,_],[y,g]]=Bh(u,Nh);return{scale:h,maxDXDY:l,originX:r,originY:o,fitBounds:Ut(_,f,g,y,h,l,r,o)}}function Ra(s){return!!s&&s[1][0]>s[0][0]&&s[1][1]>s[0][1]}function Za(s,e){return!!s&&!!e&&s[0][0]===e[0][0]&&s[0][1]===e[0][1]&&s[1][0]===e[1][0]&&s[1][1]===e[1][1]}function ae(s){s.selectionToken=(s.selectionToken||0)+1;for(let e of s.selectionResetters||[])e();return s.selectionToken}function ue(s,e){return s.selectionToken===e}function qa(s,e){s.selectionResetters||(s.selectionResetters=[]),s.selectionResetters.push(e)}function Wa(s=typeof L<"u"?L.CRS.Simple:void 0,e={}){return{crs:s,zoom:1,zoomSnap:1,zoomDelta:1,fadeAnimation:!1,attributionControl:!1,scrollWheelZoom:e.wheelZoom!==!1,keyboardPanDelta:Fi(e.arrowStep)}}var Io=80,gn=10,yn=1e3;function Fi(s){let e=s===""||s===null?NaN:Math.round(Number(s));return Number.isFinite(e)?Math.min(yn,Math.max(gn,e)):Io}function Ga(s,e){s?.keyboard?._setPanDelta?.(e)}function ui(s="vis-group-header"){let e=document.createElement("div");e.className=s;let i=document.createElement("span");i.className="vis-arrow",e.appendChild(i);let o=document.createElement("span");return o.className="vis-name",e.appendChild(o),{header:e,arrow:i,name:o}}function pi(s,e,i,o){let r=l=>{i.classList.toggle("collapsed",l),e.textContent=l?"\u25B6":"\u25BC"};r(!!o),s.addEventListener("click",l=>{let h=l.target&&l.target.parentNode===s&&l.target.classList&&l.target.classList.contains("vis-name");l.target!==s&&l.target!==e&&!h||r(!i.classList.contains("collapsed"))})}var za=30;function Ua(s,e=8){if(!Number.isFinite(s)||s<=0)return za;let i=Math.ceil(Math.log2(e/s));return Math.max(1,Math.min(za,i))}function Va({designBounds:s,fitRect:e,viewW:i,viewH:o}){let r=Po(s,He,e),l=w=>Number.isFinite(w)&&w>0;if(!r||!l(i)||!l(o))return He;let h=r.fitBounds[1][1]-r.fitBounds[0][1],u=r.fitBounds[1][0]-r.fitBounds[0][0],f=Math.min(i/h,o/u),_=Math.log2(f);if(!Number.isFinite(_)||_<0)return He;let y=Math.floor(_),g=He*2**(_-y),b=Math.floor(g/Co)*Co;return b>He&&Math.log2(He*f/b)>=y?b:He}function Ya(s,{showDbu:e,dbuPerMicron:i},o=!1){if(e)return String(Math.round(s));let r=i>0?i:1e3,l=Math.ceil(Math.log10(r)),h=(s/r).toFixed(l);return o?h+" \xB5m":h}function Xa(s,{showDbu:e,dbuPerMicron:i}){let o=parseFloat(s);if(!Number.isFinite(o))return null;if(e)return Math.round(o);let r=i>0?i:1e3;return Math.round(o*r)}function ja(s,{showDbu:e,dbuPerMicron:i}){if(e)return String(Math.round(s));let o=i>0?i:1e3,r=s/o;return r>=1e3?(r/1e3).toFixed(3)+" mm":r>=1?r.toFixed(3)+" um":(r*1e3).toFixed(1)+" nm"}function Ka({showDbu:s}){return s?"DBU":"\xB5m"}function Zi(s){return typeof s=="string"&&/^#[0-9a-fA-F]{6}$/.test(s)}function Ja(s){if(typeof s!="string")return null;let e=s.trim();if(Zi(e))return e.toLowerCase();let i=e.match(/^#([0-9a-fA-F]{3})$/);if(i)return"#"+i[1].split("").map(r=>r+r).join("").toLowerCase();let o=e.match(/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/);if(o){let r=o.slice(1).map(Number);return r.some(l=>l>255)?null:"#"+r.map(l=>l.toString(16).padStart(2,"0")).join("")}return null}function vn(s){let e=null;return()=>{e===null&&(e=requestAnimationFrame(()=>{e=null,s()}))}}function Oa(s){let e=Math.pow(10,Math.floor(Math.log10(s))),i=s/e,o;return i<1.5?o=1:i<3.5?o=2:i<7.5?o=5:o=10,{value:o*e,digit:o}}function Qa({targetPx:s,pxPerDbu:e,dbuPerMicron:i,showDbu:o}){if(!Number.isFinite(e)||e<=0||!Number.isFinite(s)||s<=0)return null;let r,l,h;if(o){let f=Oa(Math.max(1,s/e));h=f.digit,r=Math.round(f.value*e),l=String(Math.round(f.value))}else{let f=Number.isFinite(i)&&i>0?i:1e3,_=e*f,y=Oa(s/_);h=y.digit;let g=y.value;r=Math.round(g*_);let b,w;g>=1e3?(b=1/1e3,w="mm"):g>=1?(b=1,w="\xB5m"):g>=.001?(b=1e3,w="nm"):(b=1e6,w="pm"),l=Math.round(g*b)+" "+w}return{barPx:r,label:l,segments:h===1?5:h}}function bn(s,e,i){return e?typeof s.runTclScript=="function"?s.runTclScript(e,i):(i&&typeof s.echoTcl=="function"&&s.echoTcl(e),s.websocketManager.request({type:"tcl_eval",cmd:e}).catch(()=>{})):Promise.resolve()}function fi(s,e){let i=s.querySelectorAll("thead th");(!e||!e[0])&&(s.style.tableLayout="auto",i.forEach(o=>o.style.width=""),e=Array.from(i,o=>o.offsetWidth+"px")),i.forEach((o,r)=>o.style.width=e[r]||""),s.style.tableLayout="fixed",i.forEach((o,r)=>{if(r===i.length-1)return;let l=document.createElement("div");l.className="col-resize-grip",o.style.position="relative",o.appendChild(l);let h,u,f=y=>{o.style.width=Math.max(30,u+y.clientX-h)+"px"},_=()=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",_);let y=g=>g.stopPropagation();document.addEventListener("click",y,{capture:!0,once:!0}),setTimeout(()=>{document.removeEventListener("click",y,{capture:!0})},0)};l.addEventListener("mousedown",y=>{y.preventDefault(),h=y.clientX,u=o.offsetWidth,document.addEventListener("mousemove",f),document.addEventListener("mouseup",_)})})}function tl(s,e){s.scrollWheelZoom.disable(),s.getContainer().addEventListener("wheel",i=>{if(i.preventDefault(),e()===i.ctrlKey){let[r,l]=Dh(i,s.getContainer());s.panBy([r,l],{animate:!1});return}let o=i.deltaY<0?1:-1;s.setZoomAround(s.mouseEventToLatLng(i),s.getZoom()+o)},{passive:!1})}function Dh(s,e){let o=1;return s.deltaMode===1?o=16:s.deltaMode===2&&(o=e.clientHeight||16),[s.deltaX*o,s.deltaY*o]}function qi(s,e,i,o){let r=document.createElement("div");r.className="modal-overlay",r.innerHTML=` - `,document.body.appendChild(r);let l=()=>r.remove();r.addEventListener("click",f=>{f.target===r&&l()}),r.addEventListener("keydown",f=>{f.key==="Escape"&&l()}),r.querySelector(".cancel").addEventListener("click",l),r.querySelector(".modal-close").addEventListener("click",l);let h=r.querySelector(".modal-error"),u=(f,_)=>{h.textContent=f,h.style.display=f?"block":"none",h.classList.toggle("info",!!_)};return{overlay:r,close:l,okBtn:r.querySelector(".ok"),showError:u}}var _i=class s{constructor(e,i,o){this._app=e,this._redrawAllLayers=i,this._refreshOverlay=o||i,this._currentTab="setup",this._setupPaths=[],this._holdPaths=[],this._selectedPathIndex=-1,this._detailTab="data",this._selectedDetailIndex=-1,this._sortCol="slack",this._sortAscending=!0,this._build()}_build(){let e=document.createElement("div");e.className="timing-widget";let i=document.createElement("div");i.className="timing-toolbar",this._updateBtn=document.createElement("button"),this._updateBtn.className="or-btn",this._updateBtn.textContent="Update",wt(this._app)&&(this._updateBtn.style.display="none"),this._pathCountLabel=document.createElement("span"),this._pathCountLabel.className="timing-path-count",i.appendChild(this._updateBtn),i.appendChild(this._pathCountLabel),e.appendChild(i),e.appendChild(this._buildConePanel());let o=document.createElement("div");o.className="timing-tab-bar",this._setupTab=this._makeTab("Setup",!0),this._holdTab=this._makeTab("Hold",!1),o.appendChild(this._setupTab),o.appendChild(this._holdTab),e.appendChild(o),this._pathTableContainer=document.createElement("div"),this._pathTableContainer.className="timing-path-table-container",this._pathTable=document.createElement("table"),this._pathTable.className="timing-table",this._pathTableContainer.appendChild(this._pathTable),e.appendChild(this._pathTableContainer);let r=document.createElement("div");r.className="timing-tab-bar",this._dataTab=this._makeTab("Data Path",!0),this._captureTab=this._makeTab("Capture Path",!1),r.appendChild(this._dataTab),r.appendChild(this._captureTab),e.appendChild(r),this._detailTableContainer=document.createElement("div"),this._detailTableContainer.className="timing-detail-table-container",this._detailTable=document.createElement("table"),this._detailTable.className="timing-table",this._detailTableContainer.appendChild(this._detailTable),e.appendChild(this._detailTableContainer),this._headerTooltip=document.createElement("div"),this._headerTooltip.className="or-tooltip or-tooltip-fixed",e.appendChild(this._headerTooltip),this.element=e,this._bindEvents(),wt(this._app)&&setTimeout(()=>this.update(),0)}_makeTab(e,i){let o=document.createElement("button");return o.className="timing-tab"+(i?" active":""),o.textContent=e,o}_bindEvents(){this._setupTab.addEventListener("click",()=>{this._currentTab="setup",this._setupTab.classList.add("active"),this._holdTab.classList.remove("active"),this._selectedPathIndex=-1,this._renderPathTable(),this._renderDetailTable(),this._clearTimingHighlight()}),this._holdTab.addEventListener("click",()=>{this._currentTab="hold",this._holdTab.classList.add("active"),this._setupTab.classList.remove("active"),this._selectedPathIndex=-1,this._renderPathTable(),this._renderDetailTable(),this._clearTimingHighlight()}),this._dataTab.addEventListener("click",()=>{this._detailTab="data",this._dataTab.classList.add("active"),this._captureTab.classList.remove("active"),this._renderDetailTable()}),this._captureTab.addEventListener("click",()=>{this._detailTab="capture",this._captureTab.classList.add("active"),this._dataTab.classList.remove("active"),this._renderDetailTable()}),this._updateBtn.addEventListener("click",()=>this.update()),this._pathTableContainer.setAttribute("tabindex","0"),this._pathTableContainer.style.outline="none",this._pathTableContainer.addEventListener("keydown",e=>{if(e.key==="ArrowDown"){e.preventDefault();let i=this._pathTable.querySelectorAll("tbody tr");this._selectedPathIndex0&&this._selectPathRow(this._selectedPathIndex-1))}),this._detailTableContainer.setAttribute("tabindex","0"),this._detailTableContainer.style.outline="none",this._detailTableContainer.addEventListener("keydown",e=>{if(e.key==="ArrowDown"){e.preventDefault();let i=this._detailTable.querySelectorAll("tbody tr");this._selectedDetailIndex0&&this._selectDetailRow(this._selectedDetailIndex-1))})}_buildConePanel(){let e=document.createElement("div");e.className="timing-cone-panel";let i=document.createElement("span");i.className="timing-cone-title",i.textContent="Timing cone:",e.appendChild(i);let o=(y,g,b=!1)=>{let w=document.createElement("input");w.type="checkbox",w.id=y,w.checked=b;let v=document.createElement("label");return v.htmlFor=y,v.textContent=g,{input:w,lbl:v}},r=o("cone-fanin","Fanin",!0),l=o("cone-fanout","Fanout",!0);this._coneFanin=r.input,this._coneFanout=l.input,e.append(r.input,r.lbl,l.input,l.lbl);let h=y=>{let g=document.createElement("label");g.className="timing-cone-depth-label",g.textContent=y;let b=document.createElement("input");return b.type="number",b.min="0",b.value="0",b.className="timing-cone-depth",b.title="0 = unlimited",g.appendChild(b),{lbl:g,input:b}},u=h("in\u2264"),f=h("out\u2264");this._coneFaninDepth=u.input,this._coneFanoutDepth=f.input,e.append(u.lbl,f.lbl),this._coneColorMode=document.createElement("select"),this._coneColorMode.className="timing-cone-colormode";for(let[y,g]of[["slack","by slack"],["depth","by depth"]]){let b=document.createElement("option");b.value=y,b.textContent=g,this._coneColorMode.appendChild(b)}e.appendChild(this._coneColorMode);let _=o("cone-sync-schematic","Sync schematic");return this._coneSyncSchematic=_.input,e.append(_.input,_.lbl),this._coneApplyBtn=document.createElement("button"),this._coneApplyBtn.className="or-btn",this._coneApplyBtn.textContent="Cone",this._coneApplyBtn.title="Show the timing cone for the selected instance",this._coneClearBtn=document.createElement("button"),this._coneClearBtn.className="or-btn",this._coneClearBtn.textContent="Clear",e.append(this._coneApplyBtn,this._coneClearBtn),this._coneStatus=document.createElement("span"),this._coneStatus.className="timing-cone-status",e.appendChild(this._coneStatus),this._coneApplyBtn.addEventListener("click",()=>this._applyCone()),this._coneClearBtn.addEventListener("click",()=>this._clearCone()),e}_coneTarget(){return this._app.selectedInstanceName||""}async _applyCone(){let e=this._coneFanin.checked,i=this._coneFanout.checked;if(!e&&!i){this._coneStatus.textContent="select fanin and/or fanout";return}let o=this._coneTarget();if(!o){this._coneStatus.textContent="select an instance first";return}let r={type:"timing_cone",fanin:e,fanout:i,fanin_depth:Math.max(0,parseInt(this._coneFaninDepth.value,10)||0),fanout_depth:Math.max(0,parseInt(this._coneFanoutDepth.value,10)||0),color_mode:this._coneColorMode.value,inst_name:o};this._coneApplyBtn.disabled=!0,this._coneStatus.textContent="computing\u2026";try{let l=await this._app.websocketManager.request(r);this._refreshOverlay(),this._renderConeStatus(l),this._coneSyncSchematic.checked&&o&&document.dispatchEvent(new CustomEvent("openroad-cone-sync",{detail:{inst_name:o,fanin:r.fanin,fanout:r.fanout,fanin_depth:r.fanin_depth,fanout_depth:r.fanout_depth}}))}catch(l){this._coneStatus.textContent="cone error: "+(l.message||l)}this._coneApplyBtn.disabled=!1}_renderConeStatus(e){if(!e){this._coneStatus.textContent="";return}let i=e.node_count||0;if(i===0){this._coneStatus.textContent="empty cone";return}let o=i+" pins";if(e.color_mode==="depth")o+=`, depth \xB1${e.max_depth}`;else if(e.constrained){let r=e.time_unit||"";o+=`, slack ${mi(e.min_slack)}\u2026${mi(e.max_slack)}${r}`}else o+=", unconstrained";this._coneStatus.textContent=o}_clearCone(){this._app.websocketManager.request({type:"timing_cone",clear:!0}).then(()=>this._refreshOverlay()),this._coneStatus.textContent=""}showPaths(e,i){this._currentTab=e,e==="setup"?(this._setupPaths=[...i],this._setupTab.classList.add("active"),this._holdTab.classList.remove("active")):(this._holdPaths=[...i],this._holdTab.classList.add("active"),this._setupTab.classList.remove("active")),this._applySort(),this._selectedPathIndex=-1,this._pathCountLabel.textContent=i.length+" paths",this._renderPathTable(),this._renderDetailTable(),this._clearTimingHighlight()}async update(){this._updateBtn.disabled=!0,this._updateBtn.textContent="Loading...";try{let[e,i]=await Promise.all([this._app.websocketManager.request({type:"timing_report",is_setup:!0,max_paths:100}),this._app.websocketManager.request({type:"timing_report",is_setup:!1,max_paths:100})]);this._setupPaths=[...e.paths||[]],this._holdPaths=[...i.paths||[]],this._applySort(),this._selectedPathIndex=-1,this._renderPathTable(),this._renderDetailTable(),this._clearTimingHighlight()}catch(e){console.error("Timing fetch failed:",e)}this._updateBtn.disabled=!1,this._updateBtn.textContent="Update"}_applySort(){for(let e of[this._setupPaths,this._holdPaths]){e.forEach((r,l)=>{r._originalIndex===void 0&&(r._originalIndex=l)});let i=this._sortAscending?1:-1,o=this._sortCol;e.sort((r,l)=>{let h=r[o],u=l[o],f=typeof h=="number"&&typeof u=="number"?h-u:String(h).localeCompare(String(u));return i*f})}}_showHeaderTooltip(e,i){if(e.buttons!==0){this._hideHeaderTooltip();return}let o=this._headerTooltip;o.textContent=i,o.style.display="block";let r=Math.min(e.clientX+12,window.innerWidth-o.offsetWidth-8);o.style.left=Math.max(0,r)+"px",o.style.top=e.clientY+14+"px"}_hideHeaderTooltip(){this._headerTooltip.style.display="none"}_sortBy(e){this._sortCol===e?this._sortAscending=!this._sortAscending:(this._sortCol=e,this._sortAscending=!0),this._applySort(),this._selectedPathIndex=-1,this._renderPathTable(),this._renderDetailTable(),this._clearTimingHighlight()}_clearTimingHighlight(){this._app.websocketManager.request({type:"timing_highlight",path_index:-1}).then(()=>this._refreshOverlay())}_selectPathRow(e){let i=this._pathTable.querySelectorAll("tbody tr");if(e<0||e>=i.length)return;this._selectedPathIndex=e;for(let l of i)l.classList.remove("selected");i[e].classList.add("selected"),i[e].scrollIntoView({block:"nearest"}),this._pathTableContainer.focus(),this._renderDetailTable();let r=(this._currentTab==="setup"?this._setupPaths:this._holdPaths)[e]?._originalIndex??e;this._app.websocketManager.request({type:"timing_highlight",path_index:r,is_setup:this._currentTab==="setup"}).then(()=>this._refreshOverlay()).catch(l=>console.error("timing_highlight error:",l))}_renderPathTable(){this._hideHeaderTooltip();let e=this._currentTab==="setup"?this._setupPaths:this._holdPaths;this._pathCountLabel.textContent=e.length+" paths";let i=this._pathTable.querySelectorAll("thead th"),o=Array.from(i,f=>f.style.width);this._pathTable.innerHTML="";let r=document.createElement("thead"),l=document.createElement("tr");for(let f of s.PATH_COLS){let _=document.createElement("th");_.classList.add("sortable"),f.num&&_.classList.add("num"),_.textContent=f.label+(f.key===this._sortCol?this._sortAscending?" \u25B2":" \u25BC":""),f.tooltip&&(_.addEventListener("mousemove",y=>this._showHeaderTooltip(y,f.tooltip)),_.addEventListener("mouseleave",()=>this._hideHeaderTooltip())),_.addEventListener("click",()=>this._sortBy(f.key)),l.appendChild(_)}r.appendChild(l),this._pathTable.appendChild(r);let h=document.createElement("tbody"),u=e.reduce((f,_)=>Math.max(f,Math.abs(Number(_.slack)||0)),0);if(e.forEach((f,_)=>{let y=document.createElement("tr");_===this._selectedPathIndex&&y.classList.add("selected");for(let g of s.PATH_COLS){let b=document.createElement("td"),w=f[g.key];if(b.textContent=g.time?mi(w):w,g.num&&b.classList.add("num"),g.key==="slack"){let v=Number(f.slack);v<0&&b.classList.add("slack-negative"),Number.isFinite(v)&&u>0&&(b.classList.add("slack-cell",v<0?"slack-under":"slack-over"),b.style.setProperty("--slack-frac",String(Math.abs(v)/u)))}y.appendChild(b)}y.style.cursor="pointer",y.addEventListener("click",()=>this._selectPathRow(_)),h.appendChild(y)}),e.length===0){let f=document.createElement("tr"),_=document.createElement("td");_.colSpan=s.PATH_COLS.length,_.style.textAlign="center",_.style.color="var(--fg-secondary)",_.textContent=wt(this._app)?"No timing data available":'Click "Update" to load timing paths',f.appendChild(_),h.appendChild(f)}this._pathTable.appendChild(h),fi(this._pathTable,o)}_selectDetailRow(e){let i=this._detailTable.querySelectorAll("tbody tr");if(e<0||e>=i.length)return;this._selectedDetailIndex=e;for(let u of i)u.classList.remove("timing-selected-row");i[e].classList.add("timing-selected-row"),i[e].scrollIntoView({block:"nearest"}),this._detailTableContainer.focus();let r=(this._currentTab==="setup"?this._setupPaths:this._holdPaths)[this._selectedPathIndex],l=this._detailTab==="data"?r.data_nodes:r.capture_nodes,h=r._originalIndex??this._selectedPathIndex;this._app.websocketManager.request({type:"timing_highlight",path_index:h,is_setup:this._currentTab==="setup",pin_name:l[e].pin}).then(()=>this._refreshOverlay())}_renderDetailTable(){let e=this._detailTable.querySelectorAll("thead th"),i=Array.from(e,_=>_.style.width);this._detailTable.innerHTML="",this._selectedDetailIndex=-1;let o=this._currentTab==="setup"?this._setupPaths:this._holdPaths;if(this._selectedPathIndex<0||this._selectedPathIndex>=o.length)return;let r=o[this._selectedPathIndex],l=this._detailTab==="data"?r.data_nodes:r.capture_nodes,h=document.createElement("thead"),u=document.createElement("tr");for(let _ of s.DETAIL_COLS){let y=document.createElement("th");s.DETAIL_NUM_COLS.has(_)&&y.classList.add("num"),y.textContent=_,u.appendChild(y)}h.appendChild(u),this._detailTable.appendChild(h);let f=document.createElement("tbody");if(l.forEach((_,y)=>{let g=document.createElement("tr");_.clk&&g.classList.add("timing-clock-row"),[_.pin,_.fanout,_.rise?"\u2191":"\u2193",mi(_.time),mi(_.delay),mi(_.slew),mi(_.load)].forEach((w,v)=>{let S=document.createElement("td");s.DETAIL_NUM_COLS.has(s.DETAIL_COLS[v])&&S.classList.add("num"),S.textContent=w,g.appendChild(S)}),g.style.cursor="pointer",g.addEventListener("click",()=>this._selectDetailRow(y)),f.appendChild(g)}),this._detailTable.appendChild(f),fi(this._detailTable,i),!i[0]){let _=this._detailTable.querySelector("thead th");_&&(_.style.width="30ch")}}};function mi(s){return s==null?"":typeof s=="number"?s.toFixed(4):String(s)}_i.PATH_COLS=[{label:"Clock",key:"end_clk"},{label:"Required",key:"required",time:!0,num:!0},{label:"Arrival",key:"arrival",time:!0,num:!0},{label:"Slack",key:"slack",time:!0,num:!0},{label:"Skew",key:"skew",time:!0,num:!0,tooltip:`The difference in arrival times between + `}_resolvePaneReferences(){let e=["left","main","bottom","right"];this.panes={};for(let i of e){let o=this.containerEl.querySelector(`#pane-${i}`);o&&(o.el=o,o.paneComponent=o),this.panes[i]=o}this.centerEl=this.containerEl.querySelector("#pane-center")}_initSplitters(){let e=null;this.containerEl.addEventListener("ide-splitter-start",i=>{let o=i.detail?.for,r=qe[o];if(!r)return;let l=(i.detail?.orientation||"vertical")==="vertical",u=(l?this.containerEl:this.centerEl||this.containerEl).getBoundingClientRect(),f=this.panes[o]?.getBoundingClientRect()||{},_=l?u.width:u.height,y=l?f.width||r.defaultSize:f.height||r.defaultSize;e={paneName:o,cfg:r,startSize:y,maxLimit:Math.round(_*r.maxFraction)||500}}),this.containerEl.addEventListener("ide-splitter-drag",i=>{if(!e||e.paneName!==i.detail?.for)return;let{cfg:o,startSize:r,maxLimit:l}=e,h=o.invertDelta?-i.detail.delta:i.detail.delta,u=Math.round(r+h),f=Math.max(o.minSize,Math.min(l,u));this.containerEl.style.setProperty(o.cssVar,`${f}px`),this.notifyResize()}),this.containerEl.addEventListener("ide-splitter-end",()=>{e=null,this.saveLayout(),this.notifyResize()}),this.containerEl.addEventListener("ide-splitter-reset",i=>{let o=i.detail?.for;this._resetSplitterPane(o)})}_resetSplitterPane(e){let i=qe[e];i&&(this.containerEl.style.setProperty(i.cssVar,`${i.defaultSize}px`),this.isPaneCollapsed(e)?this.restorePane(e):(this.saveLayout(),this.notifyResize()))}_initControls(){this.containerEl.addEventListener("ide-pane-maximize",e=>{this.toggleMaximize(e.detail?.pane)}),this.containerEl.addEventListener("ide-pane-collapse",e=>{this.toggleCollapse(e.detail?.pane)}),this.containerEl.addEventListener("ide-layout-reset",()=>{this.resetLayout()});for(let e of["left","right","bottom"]){let i=this.containerEl.querySelector(`#gutter-expand-${e}`);i&&i.addEventListener("click",()=>this.restorePane(e))}}isPaneMaximized(e){return e?!!this.panes[e]?.maximized:["main","bottom","right"].some(i=>!!this.panes[i]?.maximized)}setMaximizedPane(e,i=!0){let o=["main","bottom","right"];if(e&&!o.includes(e))return!1;let r=i?e:null;for(let l of o){let h=l===r;this.containerEl.classList.toggle(`maximized-${l}`,h),this.panes[l]&&(this.panes[l].maximized=h)}return this.notifyResize(),!!r}maximizePane(e){return this.setMaximizedPane(e,!0)}restoreMaximized(){return this.setMaximizedPane(null,!1)}toggleMaximize(e){return this.setMaximizedPane(e,!this.isPaneMaximized(e))}isPaneCollapsed(e){let i=e==="bottom"?this.centerEl:this.containerEl;return!!this.panes[e]?.collapsed||(i?i.classList.contains(`hide-${e}`):!1)}_setPaneCollapsed(e,i){let o=e==="bottom"?this.centerEl:this.containerEl;o&&(o.classList.toggle(`hide-${e}`,i),this.panes[e]&&(this.panes[e].collapsed=i),this.saveLayout(),this.notifyResize())}toggleCollapse(e){this._setPaneCollapsed(e,!this.isPaneCollapsed(e))}collapsePane(e){this._setPaneCollapsed(e,!0)}restorePane(e){this._setPaneCollapsed(e,!1)}resetLayout(){try{localStorage.removeItem("or_ide_layout")}catch{}for(let[e,i]of Object.entries(qe))this.containerEl.style.setProperty(i.cssVar,`${i.defaultSize}px`);for(let e of["left","right","bottom"])this.restorePane(e);this.restoreMaximized(),this.closedComponents.clear();for(let e of this.components.values())e.tabEl.hidden=!1,e.contentDiv.hidden=!1;for(let e of Object.values(Qa))this.components.has(e)&&this.activateTab(e);this.saveLayout(),this.notifyResize(),this.emit("stateChanged")}_initResizeObserver(){typeof ResizeObserver<"u"&&new ResizeObserver(()=>{this.notifyResize()}).observe(this.containerEl)}registerComponentFactoryFunction(e,i){this.factories.set(e,i)}loadLayout(e){for(let o of Object.keys(Ja)){let r=this.factories.get(o);r&&this._mountComponent(o,r)}let i=null;try{let o=localStorage.getItem("or_ide_layout");o&&(i=JSON.parse(o))}catch{}if(i){if(i.leftWidth&&this.containerEl.style.setProperty("--pane-left-width",`${i.leftWidth}px`),i.rightWidth&&this.containerEl.style.setProperty("--pane-right-width",`${i.rightWidth}px`),i.bottomHeight&&this.containerEl.style.setProperty("--pane-bottom-height",`${i.bottomHeight}px`),i.closed)for(let o of i.closed)this.closeComponent(o,!1);for(let o of["left","right","bottom"]){let r=`hide${o[0].toUpperCase()}${o.slice(1)}`;i[r]&&this.collapsePane(o)}}for(let[o,r]of Object.entries(Qa))this.activateTab(i?.activeTabs?.[o]||r);this.notifyResize(),this.emit("stateChanged")}_mountComponent(e,i){if(this.components.has(e))return;let o=Ja[e]||{pane:"right",title:e,closable:!0},r=this.panes[o.pane];if(!r)return;let l=document.createElement("div");l.className="ide-component-container",l.id=`cmp-${e}`,r.appendChild(l);let h=o.closable!==!1,u=document.createElement("ide-tab");u.id=`tab-${e}`,u.slot="tabs",u.for=e,u.setAttribute("data-component",e),u.title=o.title,h&&u.setAttribute("closable",""),o.icon&&(u.icon=o.icon),u.addEventListener("tab-select",()=>this.activateTab(e)),u.addEventListener("tab-close",()=>this.closeComponent(e)),r.appendChild(u);let f=Object.assign(new us,{element:l,get width(){return l.clientWidth},get height(){return l.clientHeight},title:o.title,focus:()=>this.focusComponent(e),close:()=>this.closeComponent(e)}),_={componentType:e,paneName:o.pane,title:o.title,closable:h,tabEl:u,contentDiv:l,container:f};this.components.set(e,_);try{i(f)}catch(y){console.error(`Failed to initialize component ${e}:`,y)}}isComponentActive(e){return e?this.activeTabs[e.paneName]===e.componentType:!1}_setComponentActive(e,i){if(!e)return;let o=!!i;e.tabEl&&(e.tabEl.active=o),e.contentDiv?.classList.toggle("active",o)}activateTab(e){let i=this.components.get(e);if(!i||!this.panes[i.paneName])return;["left","right","bottom"].includes(i.paneName)&&this.isPaneCollapsed(i.paneName)&&this.restorePane(i.paneName);let r=this.activeTabs[i.paneName];if(r&&r!==e){let l=this.components.get(r);l&&(this._setComponentActive(l,!1),l.container.fire("hide"))}this.activeTabs[i.paneName]=e,i.tabEl.hidden=!1,i.contentDiv.hidden=!1,this._setComponentActive(i,!0),this.closedComponents.delete(e),i.container.fire("show"),i.container.fire("open"),i.container.fire("resize");try{i.tabEl.scrollIntoView({behavior:"smooth",inline:"nearest",block:"nearest"})}catch{}this.notifyResize(),this.emit("stateChanged")}closeComponent(e,i=!0){let o=this.components.get(e);if(!(!o||!o.closable)){if(o.tabEl.hidden=!0,o.contentDiv.hidden=!0,this._setComponentActive(o,!1),o.container.fire("hide"),this.closedComponents.add(e),i&&this.activeTabs[o.paneName]===e){let r=null;for(let l of this.components.values())if(l.paneName===o.paneName&&!this.closedComponents.has(l.componentType)){r=l;break}r?this.activateTab(r.componentType):(this.activeTabs[o.paneName]=null,["left","right","bottom"].includes(o.paneName)&&this.collapsePane(o.paneName))}this.notifyResize(),this.emit("stateChanged")}}focusComponent(e,i){if(!this.components.has(e)){let r=this.factories.get(e);if(!r)return;this._mountComponent(e,r)}let o=this.components.get(e);i?.reveal&&o&&this.isPaneMaximized()&&!this.isPaneMaximized(o.paneName)&&this.restoreMaximized(),this.activateTab(e)}saveLayout(){let e={leftWidth:parseInt(this.containerEl.style.getPropertyValue(qe.left.cssVar)||qe.left.defaultSize,10),rightWidth:parseInt(this.containerEl.style.getPropertyValue(qe.right.cssVar)||qe.right.defaultSize,10),bottomHeight:parseInt(this.containerEl.style.getPropertyValue(qe.bottom.cssVar)||qe.bottom.defaultSize,10),hideLeft:this.isPaneCollapsed("left"),hideRight:this.isPaneCollapsed("right"),hideBottom:this.isPaneCollapsed("bottom"),activeTabs:{...this.activeTabs},closed:Array.from(this.closedComponents)};try{localStorage.setItem("or_ide_layout",JSON.stringify(e))}catch{}return e}notifyResize(){if(this._resizeScheduled)return;this._resizeScheduled=!0,(typeof requestAnimationFrame=="function"?requestAnimationFrame:i=>{i()})(()=>{this._resizeScheduled=!1;for(let i of this.components.values())this.isComponentActive(i)&&i.container.fire("resize");typeof app<"u"&&app&&app.map&&app.map.invalidateSize({animate:!1}),window.dispatchEvent(new Event("resize"))})}updateSize(){this.notifyResize()}setSize(e,i){this.notifyResize()}addComponent(e,i,o){this.focusComponent(e)}get rootItem(){return{contentItems:Array.from(this.components.keys()).map(e=>({isComponent:!0,componentType:e,focus:()=>this.focusComponent(e)}))}}};var Cn=class s{constructor(e,i){this.url=e,this.socket=null,this.nextId=1,this.pending=new Map,this._queue=new Map,this._inFlight=0,this._inFlightIds=new Set,this._unknownPayloadTypes=new Set,this._maxInFlight=48,this._lastRecvAt=0,this._bufStuckSince=0,this._lastBuffered=0,this.reconnectDelay=1e3,this.readyPromise=null,this.readyResolve=null,this.onStatusChange=i||(()=>{}),this.onPush=null,this._cache=null,this._isConnected=!1,this._shutdown=!1,this._livenessTimer=void 0,this._startLivenessMonitor(),this.connect()}get isConnected(){return this._isConnected||this.socket&&this.socket.readyState===WebSocket.OPEN}get pendingCount(){return this.pending.size+(this._queue?this._queue.size:0)}static fromCache(e,i){let o=Object.create(s.prototype);return o.url=null,o.socket=null,o.nextId=1,o.pending=new Map,o._queue=new Map,o._inFlight=0,o._inFlightIds=new Set,o._unknownPayloadTypes=new Set,o._maxInFlight=48,o._lastRecvAt=0,o.reconnectDelay=0,o.onStatusChange=i||(()=>{}),o.onPush=null,o._cache=e,o._isConnected=!0,o.readyPromise=Promise.resolve(),o.readyResolve=null,o}get isStaticMode(){return!!this._cache}connect(){this.readyPromise=new Promise(e=>{this.readyResolve=e}),this.socket=new WebSocket(this.url),this.socket.binaryType="arraybuffer",this.socket.onopen=()=>{console.log("WebSocket connected");let e=this._everConnected===!0;this._everConnected=!0,this._isConnected=!0,this.reconnectDelay=1e3,this._lastRecvAt=typeof performance<"u"?performance.now():0,this.readyResolve(),this.onStatusChange(),this._pump(),e&&this.onReconnected&&this.onReconnected()},this.socket.onmessage=e=>{this.handleMessage(e.data)},this.socket.onclose=()=>this._handleClose(),this.socket.onerror=e=>{console.error("WebSocket error:",e)}}_handleClose(){this._isConnected=!1,this._inFlight=0,this._inFlightIds.clear(),this._bufStuckSince=0,this.onStatusChange();for(let[e,i]of this.pending)i.reject(new Error("WebSocket closed"));this.pending.clear();for(let[e,i]of this._queue)i.reject(new Error("WebSocket closed"));if(this._queue.clear(),this._shutdown){console.log("WebSocket closed (server stopped)"),this._stopLivenessMonitor();return}console.log("WebSocket closed, reconnecting..."),setTimeout(()=>this.connect(),this.reconnectDelay),this.reconnectDelay=Math.min(this.reconnectDelay*2,3e4)}_forceReconnect(){let e=this.socket;if(this.socket=null,e){e.onopen=null,e.onmessage=null,e.onclose=null,e.onerror=null;try{e.close()}catch{}}this._handleClose()}handleMessage(e){let i=new DataView(e),o=i.getUint32(0),r=i.getUint8(4);if(this._lastRecvAt=typeof performance<"u"?performance.now():0,o===0&&r===0){let u=e.slice(8),f;try{f=JSON.parse(new TextDecoder().decode(u))}catch(_){console.error("Failed to parse server push JSON:",_);return}if(f&&f.type==="config"){Number.isFinite(f.max_in_flight)&&(this._maxInFlight=Math.max(1,Math.min(4096,Math.floor(f.max_in_flight))),this._pump());return}this.onPush&&this.onPush(f);return}this._inFlightIds.delete(o)&&this._inFlight>0&&this._inFlight--;let l=this.pending.get(o);if(!l){this._pump();return}this.pending.delete(o),this._pump(),this.onStatusChange();let h=e.slice(8);if(r===2)l.reject(new Error(new TextDecoder().decode(h)));else if(r===0)try{l.resolve(JSON.parse(new TextDecoder().decode(h)))}catch(u){l.reject(new Error("JSON parse error: "+u.message))}else r===1?l.resolve(new Blob([h],{type:"image/png"})):r===3?l.resolve(null):(this._unknownPayloadTypes.has(r)||(this._unknownPayloadTypes.add(r),console.warn(`Unrecognized websocket payload type ${r}. The server is likely newer than this page \u2014 reload to pick up the current client.`)),l.reject(new Error(`Unsupported websocket payload type ${r}`)))}request(e){if(this._cache)return this._cacheRequest(e);let i=this.nextId++;if(e.id=i,!this.socket||this.socket.readyState!==WebSocket.OPEN)return Promise.reject(new Error("WebSocket not connected"));let o,r,l=new Promise((h,u)=>{o=h,r=u});return l.requestId=i,this._queue.set(i,{msg:e,resolve:o,reject:r}),this._pump(),l}_pump(){if(!(!this.socket||this.socket.readyState!==WebSocket.OPEN)){for(;this._inFlight0&&this.socket.bufferedAmount<524288;){let[e,i]=this._queue.entries().next().value;this._queue.delete(e),this.pending.set(e,{resolve:i.resolve,reject:i.reject}),this.socket.send(JSON.stringify(i.msg)),this._inFlightIds.add(e),this._inFlight++}this.onStatusChange()}}cancel(e){let i=this._queue.get(e);if(i){this._queue.delete(e),i.reject(new Error("Request cancelled")),this.onStatusChange();return}let o=this.pending.get(e),r=this.pending.delete(e);o&&o.reject(new Error("Request cancelled")),r&&!this._cache&&this.socket&&this.socket.readyState===WebSocket.OPEN&&this.socket.send(JSON.stringify({type:"cancel",cancel_id:e,id:this.nextId++})),this.onStatusChange()}_startLivenessMonitor(){typeof setInterval>"u"||(this._livenessTimer=setInterval(()=>this._checkLiveness(),3e3),this._livenessTimer&&typeof this._livenessTimer.unref=="function"&&this._livenessTimer.unref())}_stopLivenessMonitor(){this._livenessTimer!==void 0&&typeof clearInterval<"u"&&(clearInterval(this._livenessTimer),this._livenessTimer=void 0)}_checkLiveness(){if(this._cache)return;let e=this.socket;if(!e||e.readyState!==WebSocket.OPEN){this._bufStuckSince=0,this._lastBuffered=0;return}let i=e.bufferedAmount,o=typeof performance<"u"?performance.now():0,r=!1,l="";i<=262144||i12e3&&(r=!0,l=`send buffer stuck at ${i}B for ${Math.round(o-this._bufStuckSince)}ms`),this._lastBuffered=i,!r&&this._inFlight>=this._maxInFlight&&this._queue.size>0&&this._lastRecvAt>0&&o-this._lastRecvAt>3e4&&(r=!0,l=`saturated (${this._inFlight} in flight, ${this._queue.size} queued) but silent for ${Math.round(o-this._lastRecvAt)}ms`),r&&(console.warn(`WebSocket connection wedged \u2014 ${l}; reconnecting to recover`),this._bufStuckSince=0,this._forceReconnect())}_cacheRequest(e){let i=e.type;if(i==="tile"){let l=e.layer+"/"+e.z+"/"+e.x+"/"+e.y,h=this._cache.tiles&&this._cache.tiles[l];return h?Promise.resolve("data:image/png;base64,"+h):Promise.reject(new Error("Tile not cached: "+l))}if(i==="timing_highlight"){let l=e.path_index;if(l>=0&&this._cache.overlays){let h=e.is_setup?"setup":"hold",u=this._cache.overlays[h]?.[l];this._cache.setPathOverlay&&this._cache.setPathOverlay(u?"data:image/png;base64,"+u:null)}else this._cache.setPathOverlay&&this._cache.setPathOverlay(null);return Promise.resolve({})}if(i==="set_module_colors")return Promise.resolve({ok:1,count:0});let o=i;i==="timing_report"?o="timing_report:"+(e.is_setup?"setup":"hold"):i==="slack_histogram"&&(o="slack_histogram:"+(e.is_setup?"setup":"hold"));let r=this._cache.json&&this._cache.json[o];if(r!==void 0){if(i==="timing_report"&&e.slack_min!=null&&e.slack_max!=null&&r.paths){let l=[];return r.paths.forEach((h,u)=>{h.slack>=e.slack_min&&h.slack=r&&_<=u&&g>=l}function Uh(s,e,i){let o=s&&Array.isArray(s.by_size)?s.by_size:[];if(o.length===0||!e||!(i>0))return!0;let r=s.min_css_px/(i*Math.pow(2,e.z)),l=o[0];for(let h of o)h[0]<=r&&(l=h);return Oo(l[1],e)}var fs=class{constructor(){this._layers=null,this._gated=new Map,this._sized=new Map,this._generation=0}invalidate(){return this._generation++,this._layers=null,this._gated=new Map,this._sized=new Map,this._generation}apply(e,i){if(e!==this._generation)return!1;if(!i||i.supported!==!0||!i.layers||typeof i.layers!="object")return this._layers=null,!1;let o=new Map;if(i.gated&&typeof i.gated=="object")for(let[r,l]of Object.entries(i.gated))l&&typeof l=="object"&&o.set(r,new Map(Object.entries(l)));return this._layers=new Map(Object.entries(i.layers)),this._gated=o,this._sized=new Map(i.sized&&typeof i.sized=="object"?Object.entries(i.sized):[]),!0}refetch(e){let i=this.invalidate();return Promise.resolve().then(()=>e({type:"layer_extents"})).then(o=>this.apply(i,o)).catch(()=>!1)}mayHaveContent(e,i,o,r=256){if(!this._layers||o&&qh.some(l=>o[l]))return!0;if(this._sized.has(e))return Uh(this._sized.get(e),i,r);if(!this._layers.has(e)||Oo(this._layers.get(e),i))return!0;for(let[l,h]of this._gated)if(!(o&&o[l]===!1)&&h.has(e)&&Oo(h.get(e),i))return!0;return!1}};function kn(s,e,i){let o=s&&s.app&&s.app.layerExtents;return o?o.mayHaveContent(e,i,s.visibility,Ce()):!0}function gi(){return $i()}function el(s,e,i){return ds(s,e,i,gi(),Ce())}function Vi(s,e){if(s.src&&s.src.startsWith("blob:")&&URL.revokeObjectURL(s.src),e==null){s.src=Ze;return}s.src=typeof e=="string"?e:URL.createObjectURL(e)}function il(s,e,i,o,r){let l={visibility:s,selectability:i,visibleLayers:e,selectableLayers:o,app:r};return L.GridLayer.extend({_clampZoom:function(h){return L.GridLayer.prototype._clampZoom.call(this,Zi(this,h))},initialize:function(h,u,f){this._websocketManager=h,this._layerName=u,L.GridLayer.prototype.initialize.call(this,pi(f))},createTile:function(h,u){let f=document.createElement("img");return f.alt="",f.setAttribute("role","presentation"),f._tileDone=!1,f.onload=()=>{f.src&&f.src.startsWith("blob:")&&URL.revokeObjectURL(f.src),f._tileDone||(f._tileDone=!0,u(null,f))},f.onerror=()=>{f._tileDone||(f._tileDone=!0,u(new Error("tile image load error"),f))},f._websocketRequestId=this._websocketManager.nextId,kn(l,this._layerName,h)?(this._websocketManager.request(el(h,this._layerName,l)).then(_=>{Vi(f,_)}).catch(_=>{}),f):(f._websocketRequestId=void 0,Vi(f,null),f)},refreshTiles:function(){if(this._map)for(let h in this._tiles){let u=this._tiles[h];if(!u||!u.el)continue;let f=u.el,_=u.coords;if(f._websocketRequestId!==void 0&&this._websocketManager.cancel(f._websocketRequestId),!kn(l,this._layerName,_)){f._websocketRequestId=void 0,Vi(f,null);continue}f._websocketRequestId=this._websocketManager.nextId,this._websocketManager.request(el(_,this._layerName,l)).then(y=>{Vi(f,y)}).catch(y=>{})}},_removeTile:function(h){let u=this._tiles[h];u&&u.el&&(u.el._websocketRequestId!==void 0&&this._websocketManager.cancel(u.el._websocketRequestId),u.el.src&&u.el.src.startsWith("blob:")&&URL.revokeObjectURL(u.el.src)),L.GridLayer.prototype._removeTile.call(this,h)}})}function nl(s,e){function i(o,r){let l={type:"overlay_tile",z:o.z,x:o.x,y:o.y,...Fi(gi(),r),debug_renderers:!!s.debug_renderers,debug_live:!!s.debug_live,flywires_only:!!s.flywires_only,poly_decomp:!!(e&&e.polyDecomp),focused_nets_guides:!!s.focused_nets_guides,highlight_selected:s.highlight_selected!==!1,draw_labels:s.labels!==!1};return e&&e.visibleLayerNames&&(l.visible_layers=[...e.visibleLayerNames]),l}return L.GridLayer.extend({initialize:function(o,r){this._websocketManager=o,L.GridLayer.prototype.initialize.call(this,pi(r))},createTile:function(o,r){let l=document.createElement("img");l.alt="",l.setAttribute("role","presentation"),l._tileDone=!1,l.onload=()=>{l.src&&l.src.startsWith("blob:")&&URL.revokeObjectURL(l.src),l._tileDone||(l._tileDone=!0,r(null,l))},l.onerror=()=>{l._tileDone||(l._tileDone=!0,r(new Error("overlay tile load error"),l))};let h=this._websocketManager.nextId;return l._websocketRequestId=h,this._websocketManager.request(i(o,this.getTileSize().x)).then(u=>{l._websocketRequestId===h&&Vi(l,u)}).catch(u=>{}),l},refreshTiles:function(){if(this._map)for(let o in this._tiles){let r=this._tiles[o];if(!r||!r.el)continue;let l=r.el,h=r.coords;l._websocketRequestId!==void 0&&this._websocketManager.cancel(l._websocketRequestId);let u=this._websocketManager.nextId;l._websocketRequestId=u,this._websocketManager.request(i(h,this.getTileSize().x)).then(f=>{l._websocketRequestId===u&&Vi(l,f)}).catch(()=>{})}},_removeTile:function(o){let r=this._tiles[o];r&&r.el&&(r.el._websocketRequestId!==void 0&&(this._websocketManager.cancel(r.el._websocketRequestId),r.el._websocketRequestId=void 0),r.el.src&&r.el.src.startsWith("blob:")&&URL.revokeObjectURL(r.el.src)),L.GridLayer.prototype._removeTile.call(this,o)}})}function sl({zIndex:s=0,tileSize:e}={}){let i={opacity:1,zIndex:s};return e!==void 0&&(i.tileSize=e),i}var Gh=4,zo=350*1024*1024;function ol(s,e=1){let i=Math.round(s*Math.max(0,e));return i*i*Gh}function rl(s,e,i=256){return!(s>0)||!(e>0)||!(i>0)?1:(Math.ceil(s/i)+1)*(Math.ceil(e/i)+1)}function al(s,e){let i=e||(typeof window<"u"?window:null),o=s&&s.clientWidth>0?s.clientWidth:i&&i.innerWidth>0?i.innerWidth:1024,r=s&&s.clientHeight>0?s.clientHeight:i&&i.innerHeight>0?i.innerHeight:768;return{width:o,height:r}}function Ho(s,e){if(!s)return!1;let i=!!e;return!!s.visible===i?!1:(s.visible=i,!0)}var ms=4;function ll(s,e,i,o=ms){let r=e*i;return r>0?Math.max(r,s-o*r):s}function cl({budgetBytes:s=zo,tilesPerPane:e,bytesPerTile:i,paneCount:o}={}){if(!(e>0)||!(i>0)||!(o>0))return 1;let r=e*i;return Math.max(1,Math.min(o,Math.floor(s/r)))}function $o(s,e){if(!Array.isArray(s)||s.length===0)return[];let i=Math.max(1,Math.min(Math.floor(e)||1,s.length)),o=Math.floor(s.length/i),r=s.length%i,l=[],h=0;for(let u=0;u0&&(f++,r--),l.push(s.slice(h,h+f)),h+=f}return l}function hl(s,e,i){if(!s||!(i>0))return 0;s.clearRect(0,0,i,i);let o=0;for(let r of e||[]){let l=r?r.image:null;if(!l)continue;let h=r.opacity===void 0?1:r.opacity;h>0&&(s.globalAlpha=Math.min(1,h),s.drawImage(l,0,0,i,i),o++)}return s.globalAlpha=1,o}function Fo(s){for(let e of s||[])e&&typeof e.close=="function"&&e.close()}async function dl({items:s,request:e,decode:i,draw:o,release:r=Fo,isStale:l=()=>!1,onFirstDraw:h}={}){let u=Array.isArray(s)?s:[],f={requested:u.length,arrived:0,decoded:0,drawn:0,paints:0,stale:!1};if(u.length===0)return typeof o=="function"&&o([]),f;let _=new Array(u.length).fill(null),y=!1;function g(){if(l()){f.stale=!0;return}f.drawn=o(u.map((v,w)=>({image:_[w],opacity:v.opacity})))||0,f.paints++,y||(y=!0,h&&h())}try{await Promise.all(u.map(async(v,w)=>{let b=null;try{b=await e(v)}catch{return}if(b==null)return;f.arrived++;let C=null;try{C=await i(b)}catch{return}C&&(_[w]=C,f.decoded++,g())})),y||g()}finally{r(_)}return f}function Vh(s){return s==null?Promise.resolve(null):typeof s=="string"?new Promise(e=>{let i=document.createElement("img");i.onload=()=>e(i),i.onerror=()=>e(null),i.src=s}):typeof createImageBitmap=="function"?createImageBitmap(s).catch(()=>null):new Promise(e=>{let i=URL.createObjectURL(s),o=new Image;o.onload=()=>{URL.revokeObjectURL(i),e(o)},o.onerror=()=>{URL.revokeObjectURL(i),e(null)},o.src=i})}function ul(s,e={}){let i=e.decode||Vh,o=e.dpr||$i;return L.GridLayer.extend({_clampZoom:function(r){return L.GridLayer.prototype._clampZoom.call(this,Zi(this,r))},initialize:function(r,l,h){this._websocketManager=r,this._items=l||[],this._generation=0,L.GridLayer.prototype.initialize.call(this,pi(h))},setItems:function(r){this._items=r||[],this.refreshTiles()},visibleItems:function(){return this._items.filter(r=>r&&r.visible!==!1)},createTile:function(r,l){let h=document.createElement("canvas");h.setAttribute("role","presentation");let u=o();return h._orDone=l,this._renderTile(h,r,u),h},_sizeCanvas:function(r,l,{empty:h=!1}={}){let u=this.getTileSize(),f=h?0:hs(u.x,l),_=h?0:hs(u.y,l);(r.width!==f||r.height!==_)&&(r.width=f,r.height=_),r.style.width=u.x+"px",r.style.height=u.y+"px"},_finishTile:function(r,l){r._orTileDone||!r._orDone||(r._orTileDone=!0,r._orDone(l||null,r))},_renderTile:function(r,l,h){let u=this._generation,f=this.visibleItems().filter(g=>kn(s,g.layer,l));this._sizeCanvas(r,h,{empty:f.length===0});let _=r.getContext("2d");r._orRequestIds=[];let y=()=>this._generation!==u||r._orRemoved===!0;dl({items:f,request:g=>{let v=this._websocketManager.nextId;return r._orRequestIds.push(v),this._websocketManager.request(ds(l,g.layer,s,h,this.getTileSize().x))},decode:i,draw:g=>hl(_,g,r.width),release:Fo,isStale:y,onFirstDraw:()=>this._finishTile(r)}).then(()=>{y()||this._finishTile(r)}).catch(g=>{y()||this._finishTile(r,g)})},refreshTiles:function(){if(this._map){this._generation++;for(let r in this._tiles){let l=this._tiles[r];if(!l||!l.el)continue;this._cancelTile(l.el);let h=o();this._renderTile(l.el,l.coords,h)}}},_cancelTile:function(r){let l=r._orRequestIds;if(!(!l||!l.length)){for(let h of l)this._websocketManager.cancel(h);r._orRequestIds=[]}},_removeTile:function(r){let l=this._tiles[r];l&&l.el&&(l.el._orRemoved=!0,this._cancelTile(l.el),l.el.width=0,l.el.height=0),L.GridLayer.prototype._removeTile.call(this,r)}})}function pl(s,e,i,o,r=0){let l=[];return i.forEach((h,u)=>{let f=new s(e,h,sl({zIndex:r+u}));o&&f.addTo(o),l.push(f)}),l}var Yh=".leaflet-tile-container",_l=".leaflet-tile";function fl(s,e){if(!Number.isFinite(s)||!(e>0))return 0;let i=s*e;return(i-Math.round(i))/e}function Xh(s,e,i=gl){let o=s&&s.parentElement;if(!o)return null;let r=typeof s.querySelector=="function"?s.querySelector(_l):null;if(!r)return null;let l=i(r),h=ml((o._orSnapDx||0)-fl(l.left,e),e),u=ml((o._orSnapDy||0)-fl(l.top,e),e);return o._orSnapDx=h,o._orSnapDy=u,o.style.transform=h||u?`translate3d(${h}px, ${u}px, 0)`:"",{dx:h,dy:u}}function jh(s,e,i=gl){if(!s||typeof s.getPane!="function"||!(e>0)||Number.isInteger(e))return 0;let o=s.getPane("tilePane");if(!o||typeof o.querySelectorAll!="function")return 0;let r=0,l=[...o.querySelectorAll(Yh)].filter(Kh).map(h=>{let u=h.querySelector(_l);return{container:h,rect:u?i(u):null}});for(let{container:h,rect:u}of l)u&&Xh(h,e,()=>u)&&r++;return r}function gl(s){return s.getBoundingClientRect()}function ml(s,e){return s-Math.round(s*e)/e}function Kh(s){let e=s.style&&s.style.transform||"",i=/scale\(([^)]*)\)/.exec(e);return!i||Number(i[1])===1}var Jh="move zoomend viewreset resize load";function yl(s,e=$i){if(!s||typeof s.on!="function")return!1;let i=()=>jh(s,e());return s.on(Jh,i),i(),!0}function Qh(s){let e=s.lastIndexOf("/");return e>0?s.slice(0,e):""}var vi=class s{constructor(e,i,o){this._app=e,this._redrawAllLayers=i,this._refreshOverlay=o||i,this._currentTab="setup",this._setupPaths=[],this._holdPaths=[],this._selectedPathIndex=-1,this._detailTab="data",this._selectedDetailIndex=-1,this._rowSelectionInst="",this._sortCol="slack",this._sortAscending=!0,this._build()}_build(){let e=document.createElement("div");e.className="timing-widget";let i=document.createElement("div");i.className="timing-toolbar",this._updateBtn=document.createElement("button"),this._updateBtn.className="or-btn",this._updateBtn.textContent="Update",wt(this._app)&&(this._updateBtn.style.display="none"),this._pathCountLabel=document.createElement("span"),this._pathCountLabel.className="timing-path-count",i.appendChild(this._updateBtn),i.appendChild(this._pathCountLabel),e.appendChild(i),e.appendChild(this._buildConePanel());let o=document.createElement("div");o.className="timing-tab-bar",this._setupTab=this._makeTab("Setup",!0),this._holdTab=this._makeTab("Hold",!1),o.appendChild(this._setupTab),o.appendChild(this._holdTab),e.appendChild(o),this._pathTableContainer=document.createElement("div"),this._pathTableContainer.className="timing-path-table-container",this._pathTable=document.createElement("table"),this._pathTable.className="timing-table",this._pathTableContainer.appendChild(this._pathTable),e.appendChild(this._pathTableContainer);let r=document.createElement("div");r.className="timing-tab-bar",this._dataTab=this._makeTab("Data Path",!0),this._captureTab=this._makeTab("Capture Path",!1),r.appendChild(this._dataTab),r.appendChild(this._captureTab),e.appendChild(r),this._detailTableContainer=document.createElement("div"),this._detailTableContainer.className="timing-detail-table-container",this._detailTable=document.createElement("table"),this._detailTable.className="timing-table",this._detailTableContainer.appendChild(this._detailTable),e.appendChild(this._detailTableContainer),this._headerTooltip=document.createElement("div"),this._headerTooltip.className="or-tooltip or-tooltip-fixed",e.appendChild(this._headerTooltip),this.element=e,this._bindEvents(),wt(this._app)&&setTimeout(()=>this.update(),0)}_makeTab(e,i){let o=document.createElement("button");return o.className="timing-tab"+(i?" active":""),o.textContent=e,o}_bindEvents(){this._setupTab.addEventListener("click",()=>{this._currentTab="setup",this._setupTab.classList.add("active"),this._holdTab.classList.remove("active"),this._selectedPathIndex=-1,this._renderPathTable(),this._renderDetailTable(),this._clearTimingHighlight()}),this._holdTab.addEventListener("click",()=>{this._currentTab="hold",this._holdTab.classList.add("active"),this._setupTab.classList.remove("active"),this._selectedPathIndex=-1,this._renderPathTable(),this._renderDetailTable(),this._clearTimingHighlight()}),this._dataTab.addEventListener("click",()=>{this._detailTab="data",this._dataTab.classList.add("active"),this._captureTab.classList.remove("active"),this._renderDetailTable()}),this._captureTab.addEventListener("click",()=>{this._detailTab="capture",this._captureTab.classList.add("active"),this._dataTab.classList.remove("active"),this._renderDetailTable()}),this._updateBtn.addEventListener("click",()=>this.update()),this._pathTableContainer.setAttribute("tabindex","0"),this._pathTableContainer.style.outline="none",this._pathTableContainer.addEventListener("keydown",e=>{if(e.key==="ArrowDown"){e.preventDefault();let i=this._pathTable.querySelectorAll("tbody tr");this._selectedPathIndex0&&this._selectPathRow(this._selectedPathIndex-1))}),this._detailTableContainer.setAttribute("tabindex","0"),this._detailTableContainer.style.outline="none",this._detailTableContainer.addEventListener("keydown",e=>{if(e.key==="ArrowDown"){e.preventDefault();let i=this._detailTable.querySelectorAll("tbody tr");this._selectedDetailIndex0&&this._selectDetailRow(this._selectedDetailIndex-1))})}_buildConePanel(){let e=document.createElement("div");e.className="timing-cone-panel";let i=document.createElement("span");i.className="timing-cone-title",i.textContent="Timing cone:",e.appendChild(i);let o=(y,g,v=!1)=>{let w=document.createElement("input");w.type="checkbox",w.id=y,w.checked=v;let b=document.createElement("label");return b.htmlFor=y,b.textContent=g,{input:w,lbl:b}},r=o("cone-fanin","Fanin",!0),l=o("cone-fanout","Fanout",!0);this._coneFanin=r.input,this._coneFanout=l.input,e.append(r.input,r.lbl,l.input,l.lbl);let h=y=>{let g=document.createElement("label");g.className="timing-cone-depth-label",g.textContent=y;let v=document.createElement("input");return v.type="number",v.min="0",v.value="0",v.className="timing-cone-depth",v.title="0 = unlimited",g.appendChild(v),{lbl:g,input:v}},u=h("in\u2264"),f=h("out\u2264");this._coneFaninDepth=u.input,this._coneFanoutDepth=f.input,e.append(u.lbl,f.lbl),this._coneColorMode=document.createElement("select"),this._coneColorMode.className="timing-cone-colormode";for(let[y,g]of[["slack","by slack"],["depth","by depth"]]){let v=document.createElement("option");v.value=y,v.textContent=g,this._coneColorMode.appendChild(v)}e.appendChild(this._coneColorMode);let _=o("cone-sync-schematic","Sync schematic");return this._coneSyncSchematic=_.input,e.append(_.input,_.lbl),this._coneApplyBtn=document.createElement("button"),this._coneApplyBtn.className="or-btn",this._coneApplyBtn.textContent="Cone",this._coneApplyBtn.title="Show the timing cone for the selected path pin or instance",this._coneClearBtn=document.createElement("button"),this._coneClearBtn.className="or-btn",this._coneClearBtn.textContent="Clear",e.append(this._coneApplyBtn,this._coneClearBtn),this._coneStatus=document.createElement("span"),this._coneStatus.className="timing-cone-status",e.appendChild(this._coneStatus),this._coneApplyBtn.addEventListener("click",()=>this._applyCone()),this._coneClearBtn.addEventListener("click",()=>this._clearCone()),e}_coneTarget(){let e=this._detailNodes[this._selectedDetailIndex],i=this._app.selectedInstanceName||"";return e?.pin&&i===this._rowSelectionInst?{pin:e.pin,inst:Qh(e.pin)}:{pin:"",inst:i}}async _applyCone(){let e=this._coneFanin.checked,i=this._coneFanout.checked;if(!e&&!i){this._coneStatus.textContent="select fanin and/or fanout";return}let{pin:o,inst:r}=this._coneTarget();if(!o&&!r){this._coneStatus.textContent="select an instance or a path pin first";return}let l={type:"timing_cone",fanin:e,fanout:i,fanin_depth:Math.max(0,parseInt(this._coneFaninDepth.value,10)||0),fanout_depth:Math.max(0,parseInt(this._coneFanoutDepth.value,10)||0),color_mode:this._coneColorMode.value,inst_name:r};o&&(l.pin_name=o),this._coneApplyBtn.disabled=!0,this._coneStatus.textContent="computing\u2026";try{let h=await this._app.websocketManager.request(l);this._refreshOverlay(),this._renderConeStatus(h),this._coneSyncSchematic.checked&&r&&document.dispatchEvent(new CustomEvent("openroad-cone-sync",{detail:{inst_name:r,fanin:l.fanin,fanout:l.fanout,fanin_depth:l.fanin_depth,fanout_depth:l.fanout_depth}}))}catch(h){this._coneStatus.textContent="cone error: "+(h.message||h)}this._coneApplyBtn.disabled=!1}_renderConeStatus(e){if(!e){this._coneStatus.textContent="";return}let i=e.node_count||0;if(i===0){this._coneStatus.textContent="empty cone";return}let o=i+" pins";if(e.color_mode==="depth")o+=`, depth \xB1${e.max_depth}`;else if(e.constrained){let r=e.time_unit||"";o+=`, slack ${yi(e.min_slack)}\u2026${yi(e.max_slack)}${r}`}else o+=", unconstrained";this._coneStatus.textContent=o}_clearCone(){this._app.websocketManager.request({type:"timing_cone",clear:!0}).then(()=>this._refreshOverlay()),this._coneStatus.textContent=""}showPaths(e,i){this._currentTab=e,e==="setup"?(this._setupPaths=[...i],this._setupTab.classList.add("active"),this._holdTab.classList.remove("active")):(this._holdPaths=[...i],this._holdTab.classList.add("active"),this._setupTab.classList.remove("active")),this._applySort(),this._selectedPathIndex=-1,this._pathCountLabel.textContent=i.length+" paths",this._renderPathTable(),this._renderDetailTable(),this._clearTimingHighlight()}async update(){this._updateBtn.disabled=!0,this._updateBtn.textContent="Loading...";try{let[e,i]=await Promise.all([this._app.websocketManager.request({type:"timing_report",is_setup:!0,max_paths:100}),this._app.websocketManager.request({type:"timing_report",is_setup:!1,max_paths:100})]);this._setupPaths=[...e.paths||[]],this._holdPaths=[...i.paths||[]],this._applySort(),this._selectedPathIndex=-1,this._renderPathTable(),this._renderDetailTable(),this._clearTimingHighlight()}catch(e){console.error("Timing fetch failed:",e)}this._updateBtn.disabled=!1,this._updateBtn.textContent="Update"}_applySort(){for(let e of[this._setupPaths,this._holdPaths]){e.forEach((r,l)=>{r._originalIndex===void 0&&(r._originalIndex=l)});let i=this._sortAscending?1:-1,o=this._sortCol;e.sort((r,l)=>{let h=r[o],u=l[o],f=typeof h=="number"&&typeof u=="number"?h-u:String(h).localeCompare(String(u));return i*f})}}_showHeaderTooltip(e,i){if(e.buttons!==0){this._hideHeaderTooltip();return}let o=this._headerTooltip;o.textContent=i,o.style.display="block";let r=Math.min(e.clientX+12,window.innerWidth-o.offsetWidth-8);o.style.left=Math.max(0,r)+"px",o.style.top=e.clientY+14+"px"}_hideHeaderTooltip(){this._headerTooltip.style.display="none"}_sortBy(e){this._sortCol===e?this._sortAscending=!this._sortAscending:(this._sortCol=e,this._sortAscending=!0),this._applySort(),this._selectedPathIndex=-1,this._renderPathTable(),this._renderDetailTable(),this._clearTimingHighlight()}_clearTimingHighlight(){this._app.websocketManager.request({type:"timing_highlight",path_index:-1}).then(()=>this._refreshOverlay())}_selectPathRow(e){let i=this._pathTable.querySelectorAll("tbody tr");if(e<0||e>=i.length)return;this._selectedPathIndex=e;for(let l of i)l.classList.remove("selected");i[e].classList.add("selected"),i[e].scrollIntoView({block:"nearest"}),this._pathTableContainer.focus(),this._renderDetailTable();let r=(this._currentTab==="setup"?this._setupPaths:this._holdPaths)[e]?._originalIndex??e;this._app.websocketManager.request({type:"timing_highlight",path_index:r,is_setup:this._currentTab==="setup"}).then(()=>this._refreshOverlay()).catch(l=>console.error("timing_highlight error:",l))}_renderPathTable(){this._hideHeaderTooltip();let e=this._currentTab==="setup"?this._setupPaths:this._holdPaths;this._pathCountLabel.textContent=e.length+" paths";let i=this._pathTable.querySelectorAll("thead th"),o=Array.from(i,f=>f.style.width);this._pathTable.innerHTML="";let r=document.createElement("thead"),l=document.createElement("tr");for(let f of s.PATH_COLS){let _=document.createElement("th");_.classList.add("sortable"),f.num&&_.classList.add("num"),_.textContent=f.label+(f.key===this._sortCol?this._sortAscending?" \u25B2":" \u25BC":""),f.tooltip&&(_.addEventListener("mousemove",y=>this._showHeaderTooltip(y,f.tooltip)),_.addEventListener("mouseleave",()=>this._hideHeaderTooltip())),_.addEventListener("click",()=>this._sortBy(f.key)),l.appendChild(_)}r.appendChild(l),this._pathTable.appendChild(r);let h=document.createElement("tbody"),u=e.reduce((f,_)=>Math.max(f,Math.abs(Number(_.slack)||0)),0);if(e.forEach((f,_)=>{let y=document.createElement("tr");_===this._selectedPathIndex&&y.classList.add("selected");for(let g of s.PATH_COLS){let v=document.createElement("td"),w=f[g.key];if(v.textContent=g.time?yi(w):w,g.num&&v.classList.add("num"),g.key==="slack"){let b=Number(f.slack);b<0&&v.classList.add("slack-negative"),Number.isFinite(b)&&u>0&&(v.classList.add("slack-cell",b<0?"slack-under":"slack-over"),v.style.setProperty("--slack-frac",String(Math.abs(b)/u)))}y.appendChild(v)}y.style.cursor="pointer",y.addEventListener("click",()=>this._selectPathRow(_)),h.appendChild(y)}),e.length===0){let f=document.createElement("tr"),_=document.createElement("td");_.colSpan=s.PATH_COLS.length,_.style.textAlign="center",_.style.color="var(--fg-secondary)",_.textContent=wt(this._app)?"No timing data available":'Click "Update" to load timing paths',f.appendChild(_),h.appendChild(f)}this._pathTable.appendChild(h),_i(this._pathTable,o)}_selectDetailRow(e){let i=this._detailTable.querySelectorAll("tbody tr");if(e<0||e>=i.length)return;this._selectedDetailIndex=e;for(let h of i)h.classList.remove("timing-selected-row");i[e].classList.add("timing-selected-row"),i[e].scrollIntoView({block:"nearest"}),this._detailTableContainer.focus(),this._rowSelectionInst=this._app.selectedInstanceName||"";let l=(this._currentTab==="setup"?this._setupPaths:this._holdPaths)[this._selectedPathIndex]._originalIndex??this._selectedPathIndex;this._app.websocketManager.request({type:"timing_highlight",path_index:l,is_setup:this._currentTab==="setup",pin_name:this._detailNodes[e].pin}).then(()=>this._refreshOverlay())}get _detailNodes(){let i=(this._currentTab==="setup"?this._setupPaths:this._holdPaths)[this._selectedPathIndex];return i?(this._detailTab==="data"?i.data_nodes:i.capture_nodes)||[]:[]}_renderDetailTable(){let e=this._detailTable.querySelectorAll("thead th"),i=Array.from(e,f=>f.style.width);this._detailTable.innerHTML="",this._selectedDetailIndex=-1;let o=this._currentTab==="setup"?this._setupPaths:this._holdPaths;if(this._selectedPathIndex<0||this._selectedPathIndex>=o.length)return;let r=this._detailNodes,l=document.createElement("thead"),h=document.createElement("tr");for(let f of s.DETAIL_COLS){let _=document.createElement("th");s.DETAIL_NUM_COLS.has(f)&&_.classList.add("num"),_.textContent=f,h.appendChild(_)}l.appendChild(h),this._detailTable.appendChild(l);let u=document.createElement("tbody");if(r.forEach((f,_)=>{let y=document.createElement("tr");f.clk&&y.classList.add("timing-clock-row"),[f.pin,f.fanout,f.rise?"\u2191":"\u2193",yi(f.time),yi(f.delay),yi(f.slew),yi(f.load)].forEach((v,w)=>{let b=document.createElement("td");s.DETAIL_NUM_COLS.has(s.DETAIL_COLS[w])&&b.classList.add("num"),b.textContent=v,y.appendChild(b)}),y.style.cursor="pointer",y.addEventListener("click",()=>this._selectDetailRow(_)),u.appendChild(y)}),this._detailTable.appendChild(u),_i(this._detailTable,i),!i[0]){let f=this._detailTable.querySelector("thead th");f&&(f.style.width="30ch")}}};function yi(s){return s==null?"":typeof s=="number"?s.toFixed(4):String(s)}vi.PATH_COLS=[{label:"Clock",key:"end_clk"},{label:"Required",key:"required",time:!0,num:!0},{label:"Arrival",key:"arrival",time:!0,num:!0},{label:"Slack",key:"slack",time:!0,num:!0},{label:"Skew",key:"skew",time:!0,num:!0,tooltip:`The difference in arrival times between source and destination clock pins of a macro/register, adjusted for CRPR and subtracting a clock period. -Setup and hold times account for internal clock delays.`},{label:"Logic Delay",key:"path_delay",time:!0,num:!0,tooltip:"Path delay from instances (excluding buffers and consecutive inverter pairs)"},{label:"Logic Depth",key:"logic_depth",num:!0,tooltip:"Path instances (excluding buffers and consecutive inverter pairs)"},{label:"Fanout",key:"fanout",num:!0},{label:"Start",key:"start_pin"},{label:"End",key:"end_pin"}];_i.DETAIL_COLS=["Pin","Fanout","R/F","Time","Delay","Slew","Load"];_i.DETAIL_NUM_COLS=new Set(["Fanout","Time","Delay","Slew","Load"]);function Vt(s){let e=document.cookie.match("(?:^|; )"+s+"=([^;]*)");return e?e[1]:null}function Qt(s,e){document.cookie=s+"="+e+"; path=/; max-age=31536000; SameSite=Lax"}function ss(s){document.cookie=s+"=; path=/; max-age=0; SameSite=Lax"}function os(s){Qt("or_theme",s);try{window.localStorage.setItem("or_theme",s)}catch{}}function el(){ss("or_theme");try{window.localStorage.removeItem("or_theme")}catch{}}function Ao(s){let e=document.getElementById("gl-theme-dark"),i=document.getElementById("gl-theme-light");!e||!i||(e.disabled=s!=="dark",i.disabled=s!=="light")}function il(s,e){Zi(s)&&(document.documentElement.style.setProperty("--bg-map",s),Qt("or_bg_color",s),sl(e),e.syncDisplayState())}function nl(s){document.documentElement.style.removeProperty("--bg-map"),ss("or_bg_color"),sl(s),s.syncDisplayState()}function No(){return Ja(getComputedStyle(document.documentElement).getPropertyValue("--bg-map"))??"#000000"}function sl(s){s.threeDViewerWidget?.render?.()}if(typeof document<"u"){let s=Vt("or_theme")||typeof localStorage<"u"&&localStorage.getItem("or_theme")||(matchMedia("(prefers-color-scheme: light)").matches?"light":"dark");document.documentElement.dataset.theme=s,Ao(s);let e=Vt("or_bg_color");Zi(e)&&document.documentElement.style.setProperty("--bg-map",e)}function gi(){let s=getComputedStyle(document.documentElement),e=i=>s.getPropertyValue(i).trim();return{canvasBg:e("--canvas-bg"),canvasText:e("--canvas-text"),canvasAxis:e("--canvas-axis"),canvasLabel:e("--canvas-label"),canvasGrid:e("--canvas-grid"),canvasTitle:e("--canvas-title"),fgPrimary:e("--fg-primary"),fgMuted:e("--fg-muted"),bgPanel:e("--bg-panel"),bgMap:e("--bg-map"),fontMono:e("--font-mono"),fontSans:e("--font-sans")}}function yi(s,e){let i=document.createElement("a");i.href=s,i.download=e,document.body.appendChild(i),i.click(),i.remove()}function ol(s,e){let i=URL.createObjectURL(s);yi(i,e),setTimeout(()=>URL.revokeObjectURL(i),1e3)}function Bo(s){let e=s.cloneNode(!0);if(e.getAttribute("xmlns")||e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.getAttribute("xmlns:xlink")||e.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),!e.getAttribute("width")||!e.getAttribute("height")){let i=s.viewBox&&s.viewBox.baseVal;i&&i.width&&i.height&&(e.setAttribute("width",i.width),e.setAttribute("height",i.height))}return` -`+new XMLSerializer().serializeToString(e)}function Rh(s){let e=s.viewBox&&s.viewBox.baseVal;if(e&&e.width&&e.height)return{width:e.width,height:e.height};let i=parseFloat(s.getAttribute("width")),o=parseFloat(s.getAttribute("height"));if(i&&o)return{width:i,height:o};let r=s.getBoundingClientRect();return{width:r.width||800,height:r.height||600}}function Do(s,e=2){let{width:i,height:o}=Rh(s),r=Bo(s),l=new Blob([r],{type:"image/svg+xml;charset=utf-8"}),h=URL.createObjectURL(l);return new Promise((u,f)=>{let _=new Image;_.onload=()=>{let y=document.createElement("canvas");y.width=Math.max(1,Math.round(i*e)),y.height=Math.max(1,Math.round(o*e));let g=y.getContext("2d");g.fillStyle="#ffffff",g.fillRect(0,0,y.width,y.height),g.drawImage(_,0,0,y.width,y.height),URL.revokeObjectURL(h),u(y.toDataURL("image/png"))},_.onerror=y=>{URL.revokeObjectURL(h),f(y)},_.src=h})}async function rs(s){try{if(!navigator.clipboard||!window.ClipboardItem)return!1;let e=await(await fetch(s)).blob();return await navigator.clipboard.write([new ClipboardItem({"image/png":e})]),!0}catch{return!1}}function zh(s){return(String(s||"").replace(/[^A-Za-z0-9._-]/g,"_").replace(/^_+|_+$/g,"")||"clock_tree")+".png"}var Ro=24,zo=10,ls=40,Oh=40,Oo=70,Hh=20,as={root:"#ff4444",buffer:"#4488ff",inverter:"#00b0b0",clock_gate:"#cc44cc",register:"#ff4444",macro:"#00b0b0",unknown:"#888888"};function $h(s){let e=parseInt(s.slice(1,3),16),i=parseInt(s.slice(3,5),16),o=parseInt(s.slice(5,7),16),r=h=>Math.round((h+255)/2),l=h=>h.toString(16).padStart(2,"0");return"#"+l(r(e))+l(r(i))+l(r(o))}function Fh(s){let e=s.nodes;if(!e||e.length===0)return{layout:[],layoutWidth:0,layoutHeight:0,timeMin:0,timeMax:0,timeUnit:"",sceneHeight:0,layoutById:new Map};let i=new Map;for(let T of e)i.set(T.id,[]);for(let T of e)T.parent_id>=0&&i.has(T.parent_id)&&i.get(T.parent_id).push(T.id);let o=new Map;for(let T of e)o.set(T.id,T);let r=new Map,l=T=>{let G=i.get(T)||[];if(G.length===0)return r.set(T,1),1;let U=0;for(let dt of G)U+=l(dt);return r.set(T,U),U},h=e.filter(T=>T.parent_id===-1),u=0;for(let T of h)u+=l(T.id);let f=s.min_arrival,_=s.max_arrival,y=_-f||1,g=Math.max(200,u*Ro*.6),b=[],w=(T,G)=>{let U=o.get(T),dt=r.get(T),gt=Oo+(G+dt/2)*Ro,it=ls+(U.arrival-f)/y*g;b.push({id:U.id,x:gt,y:it,type:U.type,name:U.name,pin_name:U.pin_name,arrival:U.arrival,delay:U.delay,fanout:U.fanout,level:U.level,parent_id:U.parent_id});let Q=G,nt=i.get(T)||[];for(let tt of nt)w(tt,Q),Q+=r.get(tt)},v=0;for(let T of h)w(T.id,v),v+=r.get(T.id);let S=Oo+u*Ro+Hh,R=ls+g+Oh,I=new Map;for(let T of b)I.set(T.id,T);return{layout:b,layoutWidth:S,layoutHeight:R,timeMin:f,timeMax:_,timeUnit:s.time_unit||"",sceneHeight:g,layoutById:I}}var cs=class{constructor(e,i,o,r){this._app=i,this._redrawAllLayers=o,this._refreshOverlay=r||o,this._clockData=[],this._selectedClockIdx=0,this._selectedNodeId=-1,this._tx=0,this._ty=0,this._scale=1,this._layout=[],this._dragging=!1,this._dragStartX=0,this._dragStartY=0,this._dragStartTx=0,this._dragStartTy=0,this._build(e)}_build(e){let i=document.createElement("div");i.className="clock-tree-widget";let o=document.createElement("div");o.className="clock-tree-toolbar",this._updateBtn=document.createElement("button"),this._updateBtn.className="or-btn",this._updateBtn.textContent="Update",wt(this._app)&&(this._updateBtn.style.display="none"),this._fitBtn=document.createElement("button"),this._fitBtn.className="or-btn",this._fitBtn.textContent="Fit",this._pngBtn=document.createElement("button"),this._pngBtn.className="or-btn",this._pngBtn.textContent="PNG",this._pngBtn.title="Export the clock tree as a PNG image",this._statusLabel=document.createElement("span"),this._statusLabel.className="timing-path-count",o.appendChild(this._updateBtn),o.appendChild(this._fitBtn),o.appendChild(this._pngBtn),o.appendChild(this._statusLabel),i.appendChild(o),this._tabBar=document.createElement("div"),this._tabBar.className="timing-tab-bar",i.appendChild(this._tabBar),this._canvas=document.createElement("canvas"),this._canvas.className="clock-tree-canvas",i.appendChild(this._canvas),this._tooltip=document.createElement("div"),this._tooltip.className="or-tooltip",this._tooltip.style.display="none",i.appendChild(this._tooltip),e.element.appendChild(i),this._el=i,this._ctx=this._canvas.getContext("2d"),this._bindEvents(),wt(this._app)&&setTimeout(()=>this.update(),0)}_fit(){this._sizeCanvas(),this._fitToView(),this._render()}_pngFileName(){let e=this._clockData[this._selectedClockIdx];return zh(e&&e.name)}_exportPng(){try{yi(this._canvas.toDataURL("image/png"),this._pngFileName())}catch(e){console.error("PNG export failed:",e)}}_bindEvents(){this._updateBtn.addEventListener("click",()=>this.update()),this._fitBtn.addEventListener("click",()=>this._fit()),this._pngBtn.addEventListener("click",()=>this._exportPng()),this._canvas.addEventListener("keydown",e=>{e.key==="f"&&this._fit()}),this._canvas.tabIndex=0,this._canvas.addEventListener("wheel",e=>{e.preventDefault();let i=this._canvas.getBoundingClientRect(),o=e.clientX-i.left,r=e.clientY-i.top,l=e.deltaY<0?1.15:1/1.15;this._tx=o-(o-this._tx)*l,this._ty=r-(r-this._ty)*l,this._scale*=l,this._render()}),this._canvas.addEventListener("mousedown",e=>{this._dragging=!0,this._dragStartX=e.clientX,this._dragStartY=e.clientY,this._dragStartTx=this._tx,this._dragStartTy=this._ty,this._canvas.style.cursor="grabbing"}),window.addEventListener("mousemove",e=>{this._dragging?(this._tx=this._dragStartTx+(e.clientX-this._dragStartX),this._ty=this._dragStartTy+(e.clientY-this._dragStartY),this._render()):this._handleHover(e)}),window.addEventListener("mouseup",()=>{this._dragging&&(this._dragging=!1,this._canvas.style.cursor="grab")}),this._canvas.addEventListener("click",e=>this._handleClick(e)),this._resizeObserver=new ResizeObserver(()=>{this._sizeCanvas(),this._render()}),this._resizeObserver.observe(this._canvas)}_sizeCanvas(){let e=this._canvas.getBoundingClientRect(),i=window.devicePixelRatio||1;this._canvas.width=e.width*i,this._canvas.height=e.height*i,this._ctx.setTransform(i,0,0,i,0,0)}async update(){this._statusLabel.textContent="Loading...";try{let e=await this._app.websocketManager.request({type:"clock_tree"});this._clockData=e.clocks||[],this._buildTabs(),this._selectClock(0),this._statusLabel.textContent=this._clockData.length+" clock"+(this._clockData.length!==1?"s":"")}catch(e){console.error("Clock tree error:",e),this._statusLabel.textContent="Error: "+e.message}}_buildTabs(){this._tabBar.innerHTML="",this._clockData.forEach((e,i)=>{let o=document.createElement("button");o.className="timing-tab"+(i===this._selectedClockIdx?" active":""),o.textContent=e.name,o.addEventListener("click",()=>this._selectClock(i)),this._tabBar.appendChild(o)})}_selectClock(e){if(e<0||e>=this._clockData.length)return;this._selectedClockIdx=e,this._selectedNodeId=-1,this._tabBar.querySelectorAll(".timing-tab").forEach((o,r)=>{o.classList.toggle("active",r===e)}),this._computeLayout(this._clockData[e]),requestAnimationFrame(()=>{this._sizeCanvas(),this._fitToView(),this._render()})}_computeLayout(e){let i=Fh(e);this._layout=i.layout,this._layoutWidth=i.layoutWidth,this._layoutHeight=i.layoutHeight,this._timeMin=i.timeMin,this._timeMax=i.timeMax,this._timeUnit=i.timeUnit,this._sceneHeight=i.sceneHeight,this._layoutById=i.layoutById}_fitToView(){if(!this._layout.length)return;let e=this._canvas.getBoundingClientRect(),i=e.width,o=e.height,r=i/this._layoutWidth,l=o/this._layoutHeight;this._scale=Math.min(r,l)*.9,this._tx=(i-this._layoutWidth*this._scale)/2,this._ty=(o-this._layoutHeight*this._scale)/2}render(){this._render()}_render(){let e=this._ctx,i=this._canvas.getBoundingClientRect(),o=i.width,r=i.height,l=gi();if(e.clearRect(0,0,o,r),e.fillStyle=l.canvasBg,e.fillRect(0,0,o,r),!this._layout.length){e.fillStyle=l.canvasText,e.font="14px "+l.fontSans,e.textAlign="center";let h=wt(this._app)?"No clock tree data available":'Click "Update" to load clock tree data';e.fillText(h,o/2,r/2);return}e.save(),e.translate(this._tx,this._ty),e.scale(this._scale,this._scale),this._drawConnections(e);for(let h of this._layout)this._drawNode(e,h,h.id===this._selectedNodeId);e.restore(),this._drawTimeScale(e,o,r,l)}_drawConnections(e){let i=1.5/this._scale,o=zo,r=this._timeMax-this._timeMin||1;for(let l of this._layout){if(l.parent_id<0)continue;let h=this._layoutById.get(l.parent_id);if(!h)continue;let u=h.x,f=l.x,_=(h.delay||0)/r*this._sceneHeight,y=h.y+_,g=l.y,b=h.type==="root"?h.y:h.y+o;if(y>b){let v=as[h.type]||as.unknown;e.strokeStyle=v,e.lineWidth=i,e.beginPath(),e.moveTo(u,b),e.lineTo(u,y);let S=o/20;e.moveTo(u-S,y),e.lineTo(u+S,y),e.stroke()}e.strokeStyle="#006400",e.lineWidth=i;let w=(y+g)/2;e.beginPath(),e.moveTo(u,y),e.bezierCurveTo(u,w,f,w,f,g),e.stroke()}}_drawNode(e,i,o){let r=i.x,l=i.y,h=zo,u=as[i.type]||as.unknown;switch(e.fillStyle=$h(u),e.strokeStyle=u,e.lineWidth=1/this._scale,i.type){case"root":{e.beginPath(),e.moveTo(r-h/2,l-h),e.lineTo(r+h/2,l-h),e.lineTo(r,l),e.closePath(),e.fill(),e.stroke();break}case"buffer":{e.beginPath(),e.moveTo(r-h/2,l),e.lineTo(r+h/2,l),e.lineTo(r,l+h),e.closePath(),e.fill(),e.stroke();break}case"inverter":{let f=h*.1,_=l+h-f;e.beginPath(),e.moveTo(r-h/2,l),e.lineTo(r+h/2,l),e.lineTo(r,_),e.closePath(),e.fill(),e.stroke(),e.beginPath(),e.arc(r,_+f/2,f/2,0,Math.PI*2),e.fill(),e.stroke();break}case"clock_gate":{e.beginPath(),e.arc(r,l+h/2,h/2,0,Math.PI*2),e.fill(),e.stroke();break}case"register":case"macro":{e.beginPath(),e.rect(r-h/2,l,h,h),e.fill(),e.stroke(),e.beginPath(),e.moveTo(r-h/8,l),e.lineTo(r+h/8,l),e.lineTo(r,l+h/4),e.closePath(),e.stroke();break}default:{e.beginPath(),e.arc(r,l+h/2,h/2,0,Math.PI*2),e.fill(),e.stroke();break}}if(o){e.strokeStyle="#ffff00",e.lineWidth=2/this._scale;let f=i.type==="root"?l-h/2:l+h/2;e.beginPath(),e.arc(r,f,h/2+3,0,Math.PI*2),e.stroke()}}_drawTimeScale(e,i,o,r){if(!this._sceneHeight)return;let l=S=>S*this._scale+this._ty,h=l(ls),u=l(ls+this._sceneHeight);if(u<0||h>o)return;e.save(),e.fillStyle=r.canvasLabel,e.strokeStyle=r.canvasAxis,e.font="11px "+r.fontMono,e.textAlign="right",e.textBaseline="middle";let f=this._timeMax-this._timeMin;if(f<=0){e.restore();return}let _=u-h,y=Math.max(2,Math.floor(_/40)),g=f/y,b=Math.pow(10,Math.floor(Math.log10(g))),w=b;g/b>5?w=10*b:g/b>2?w=5*b:g/b>1&&(w=2*b);let v=Math.ceil(this._timeMin/w)*w;e.beginPath();for(let S=v;S<=this._timeMax;S+=w){let R=(S-this._timeMin)/f,I=h+R*(u-h);e.moveTo(0,I),e.lineTo(i,I);let T=S.toFixed(w<.01?3:w<.1?2:1)+" "+this._timeUnit;e.fillText(T,Oo-4,I)}e.stroke(),e.restore()}_screenToLayout(e,i){return{x:(e-this._tx)/this._scale,y:(i-this._ty)/this._scale}}_hitTest(e,i){let o=this._screenToLayout(e,i),r=zo;for(let l of this._layout){let h=l.type==="root"?l.y-r:l.y,u=l.type==="root"?l.y:l.y+r;if(o.x>=l.x-r/2&&o.x<=l.x+r/2&&o.y>=h&&o.y<=u)return l}return null}_handleClick(e){let i=this._canvas.getBoundingClientRect(),o=e.clientX-i.left,r=e.clientY-i.top,l=this._hitTest(o,r);l?(this._selectedNodeId=l.id,this._render(),this._app.websocketManager.request({type:"clock_tree_highlight",inst_name:l.name}).then(()=>this._refreshOverlay())):this._selectedNodeId>=0&&(this._selectedNodeId=-1,this._render(),this._app.websocketManager.request({type:"clock_tree_highlight",inst_name:""}).then(()=>this._refreshOverlay()))}_handleHover(e){let i=this._canvas.getBoundingClientRect(),o=e.clientX-i.left,r=e.clientY-i.top;if(o<0||r<0||o>i.width||r>i.height){this._tooltip.style.display="none";return}let l=this._hitTest(o,r);if(l){let h=[l.name,"Type: "+l.type,"Arrival: "+l.arrival.toFixed(3)+" "+(this._timeUnit||"")];l.delay&&h.push("Delay: "+l.delay.toFixed(3)+" "+(this._timeUnit||"")),l.fanout&&h.push("Fanout: "+l.fanout),this._tooltip.textContent=h.join(` -`),this._tooltip.style.display="block",this._tooltip.style.left=e.clientX+12+"px",this._tooltip.style.top=e.clientY+12+"px"}else this._tooltip.style.display="none"}};var al=60,ll=20,cl=30,hl=50,rl=2,Zh="#f08080",qh="#8b0000",Wh="#90ee90",Gh="#006400",Ve=["#4e79a7","#f28e2b","#e15759","#76b7b2","#59a14f","#edc948","#b07aa1","#ff9da7"],Uh="rgba(240,128,128,0.12)",Vh="rgba(144,238,144,0.12)",Yh="#ff9999",Xh="#b0ffb0",jh=[{value:"setup",label:"Setup Slack"},{value:"hold",label:"Hold Slack"},{value:"fanout",label:"Net Fanout"},{value:"netlength",label:"Net Length (HPWL)"}];function Kh(s,e,i,o){if(!s||!e||oe.bottom)return null;for(let r of s)if(i>=r.x&&i<=r.x+r.width)return r;return null}function Jh(s,e,i){return i?Math.log10(s+1)/Math.log10(e+1):s/e}function Qh(s,e,i,o={}){let r=!!o.logY,l=s?.bins;if(!l||l.length===0)return{bars:[],yMax:0,yTicks:[],chartArea:null,logY:r};let h=al,u=e-ll,f=cl,_=i-hl,y=u-h,g=_-f;if(y<=0||g<=0)return{bars:[],yMax:0,yTicks:[],chartArea:null,logY:r};let b={left:h,right:u,top:f,bottom:_},w=0;for(let T of l)T.count>w&&(w=T.count);w===0&&(w=1);let{yMax:v,yTicks:S}=r?ed(w):td(w),R=(y-rl*(l.length-1))/l.length,I=[];for(let T=0;T[_.x,..._.ys||[]].join(","));return[u,...f].join(` +Setup and hold times account for internal clock delays.`},{label:"Logic Delay",key:"path_delay",time:!0,num:!0,tooltip:"Path delay from instances (excluding buffers and consecutive inverter pairs)"},{label:"Logic Depth",key:"logic_depth",num:!0,tooltip:"Path instances (excluding buffers and consecutive inverter pairs)"},{label:"Fanout",key:"fanout",num:!0},{label:"Start",key:"start_pin"},{label:"End",key:"end_pin"}];vi.DETAIL_COLS=["Pin","Fanout","R/F","Time","Delay","Slew","Load"];vi.DETAIL_NUM_COLS=new Set(["Fanout","Time","Delay","Slew","Load"]);function Vt(s){let e=document.cookie.match("(?:^|; )"+s+"=([^;]*)");return e?e[1]:null}function Qt(s,e){document.cookie=s+"="+e+"; path=/; max-age=31536000; SameSite=Lax"}function _s(s){document.cookie=s+"=; path=/; max-age=0; SameSite=Lax"}function gs(s){Qt("or_theme",s);try{window.localStorage.setItem("or_theme",s)}catch{}}function vl(){_s("or_theme");try{window.localStorage.removeItem("or_theme")}catch{}}function Zo(s){let e=document.getElementById("gl-theme-dark"),i=document.getElementById("gl-theme-light");!e||!i||(e.disabled=s!=="dark",i.disabled=s!=="light")}function bl(s,e){Ui(s)&&(document.documentElement.style.setProperty("--bg-map",s),Qt("or_bg_color",s),xl(e),e.syncDisplayState())}function wl(s){document.documentElement.style.removeProperty("--bg-map"),_s("or_bg_color"),xl(s),s.syncDisplayState()}function qo(){return Xa(getComputedStyle(document.documentElement).getPropertyValue("--bg-map"))??"#000000"}function xl(s){s.threeDViewerWidget?.render?.()}if(typeof document<"u"){let s=Vt("or_theme")||typeof localStorage<"u"&&localStorage.getItem("or_theme")||(matchMedia("(prefers-color-scheme: light)").matches?"light":"dark");document.documentElement.dataset.theme=s,Zo(s);let e=Vt("or_bg_color");Ui(e)&&document.documentElement.style.setProperty("--bg-map",e)}function bi(){let s=getComputedStyle(document.documentElement),e=i=>s.getPropertyValue(i).trim();return{canvasBg:e("--canvas-bg"),canvasText:e("--canvas-text"),canvasAxis:e("--canvas-axis"),canvasLabel:e("--canvas-label"),canvasGrid:e("--canvas-grid"),canvasTitle:e("--canvas-title"),fgPrimary:e("--fg-primary"),fgMuted:e("--fg-muted"),bgPanel:e("--bg-panel"),bgMap:e("--bg-map"),fontMono:e("--font-mono"),fontSans:e("--font-sans")}}function wi(s,e){let i=document.createElement("a");i.href=s,i.download=e,document.body.appendChild(i),i.click(),i.remove()}function Cl(s,e){let i=URL.createObjectURL(s);wi(i,e),setTimeout(()=>URL.revokeObjectURL(i),1e3)}function Wo(s){let e=s.cloneNode(!0);if(e.getAttribute("xmlns")||e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.getAttribute("xmlns:xlink")||e.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),!e.getAttribute("width")||!e.getAttribute("height")){let i=s.viewBox&&s.viewBox.baseVal;i&&i.width&&i.height&&(e.setAttribute("width",i.width),e.setAttribute("height",i.height))}return` +`+new XMLSerializer().serializeToString(e)}function td(s){let e=s.viewBox&&s.viewBox.baseVal;if(e&&e.width&&e.height)return{width:e.width,height:e.height};let i=parseFloat(s.getAttribute("width")),o=parseFloat(s.getAttribute("height"));if(i&&o)return{width:i,height:o};let r=s.getBoundingClientRect();return{width:r.width||800,height:r.height||600}}function Uo(s,e=2){let{width:i,height:o}=td(s),r=Wo(s),l=new Blob([r],{type:"image/svg+xml;charset=utf-8"}),h=URL.createObjectURL(l);return new Promise((u,f)=>{let _=new Image;_.onload=()=>{let y=document.createElement("canvas");y.width=Math.max(1,Math.round(i*e)),y.height=Math.max(1,Math.round(o*e));let g=y.getContext("2d");g.fillStyle="#ffffff",g.fillRect(0,0,y.width,y.height),g.drawImage(_,0,0,y.width,y.height),URL.revokeObjectURL(h),u(y.toDataURL("image/png"))},_.onerror=y=>{URL.revokeObjectURL(h),f(y)},_.src=h})}async function ys(s){try{if(!navigator.clipboard||!window.ClipboardItem)return!1;let e=await(await fetch(s)).blob();return await navigator.clipboard.write([new ClipboardItem({"image/png":e})]),!0}catch{return!1}}function ed(s){return(String(s||"").replace(/[^A-Za-z0-9._-]/g,"_").replace(/^_+|_+$/g,"")||"clock_tree")+".png"}var Go=24,Vo=10,bs=40,id=40,Yo=70,nd=20,vs={root:"#ff4444",buffer:"#4488ff",inverter:"#00b0b0",clock_gate:"#cc44cc",register:"#ff4444",macro:"#00b0b0",unknown:"#888888"};function sd(s){let e=parseInt(s.slice(1,3),16),i=parseInt(s.slice(3,5),16),o=parseInt(s.slice(5,7),16),r=h=>Math.round((h+255)/2),l=h=>h.toString(16).padStart(2,"0");return"#"+l(r(e))+l(r(i))+l(r(o))}function od(s){let e=s.nodes;if(!e||e.length===0)return{layout:[],layoutWidth:0,layoutHeight:0,timeMin:0,timeMax:0,timeUnit:"",sceneHeight:0,layoutById:new Map};let i=new Map;for(let T of e)i.set(T.id,[]);for(let T of e)T.parent_id>=0&&i.has(T.parent_id)&&i.get(T.parent_id).push(T.id);let o=new Map;for(let T of e)o.set(T.id,T);let r=new Map,l=T=>{let Z=i.get(T)||[];if(Z.length===0)return r.set(T,1),1;let G=0;for(let dt of Z)G+=l(dt);return r.set(T,G),G},h=e.filter(T=>T.parent_id===-1),u=0;for(let T of h)u+=l(T.id);let f=s.min_arrival,_=s.max_arrival,y=_-f||1,g=Math.max(200,u*Go*.6),v=[],w=(T,Z)=>{let G=o.get(T),dt=r.get(T),gt=Yo+(Z+dt/2)*Go,it=bs+(G.arrival-f)/y*g;v.push({id:G.id,x:gt,y:it,type:G.type,name:G.name,pin_name:G.pin_name,arrival:G.arrival,delay:G.delay,fanout:G.fanout,level:G.level,parent_id:G.parent_id});let Q=Z,nt=i.get(T)||[];for(let tt of nt)w(tt,Q),Q+=r.get(tt)},b=0;for(let T of h)w(T.id,b),b+=r.get(T.id);let C=Yo+u*Go+nd,B=bs+g+id,P=new Map;for(let T of v)P.set(T.id,T);return{layout:v,layoutWidth:C,layoutHeight:B,timeMin:f,timeMax:_,timeUnit:s.time_unit||"",sceneHeight:g,layoutById:P}}var ws=class{constructor(e,i,o,r){this._app=i,this._redrawAllLayers=o,this._refreshOverlay=r||o,this._clockData=[],this._selectedClockIdx=0,this._selectedNodeId=-1,this._tx=0,this._ty=0,this._scale=1,this._layout=[],this._dragging=!1,this._dragStartX=0,this._dragStartY=0,this._dragStartTx=0,this._dragStartTy=0,this._build(e)}_build(e){let i=document.createElement("div");i.className="clock-tree-widget";let o=document.createElement("div");o.className="clock-tree-toolbar",this._updateBtn=document.createElement("button"),this._updateBtn.className="or-btn",this._updateBtn.textContent="Update",wt(this._app)&&(this._updateBtn.style.display="none"),this._fitBtn=document.createElement("button"),this._fitBtn.className="or-btn",this._fitBtn.textContent="Fit",this._pngBtn=document.createElement("button"),this._pngBtn.className="or-btn",this._pngBtn.textContent="PNG",this._pngBtn.title="Export the clock tree as a PNG image",this._statusLabel=document.createElement("span"),this._statusLabel.className="timing-path-count",o.appendChild(this._updateBtn),o.appendChild(this._fitBtn),o.appendChild(this._pngBtn),o.appendChild(this._statusLabel),i.appendChild(o),this._tabBar=document.createElement("div"),this._tabBar.className="timing-tab-bar",i.appendChild(this._tabBar),this._canvas=document.createElement("canvas"),this._canvas.className="clock-tree-canvas",i.appendChild(this._canvas),this._tooltip=document.createElement("div"),this._tooltip.className="or-tooltip",this._tooltip.style.display="none",i.appendChild(this._tooltip),e.element.appendChild(i),this._el=i,this._ctx=this._canvas.getContext("2d"),this._bindEvents(),wt(this._app)&&setTimeout(()=>this.update(),0)}_fit(){this._sizeCanvas(),this._fitToView(),this._render()}_pngFileName(){let e=this._clockData[this._selectedClockIdx];return ed(e&&e.name)}_exportPng(){try{wi(this._canvas.toDataURL("image/png"),this._pngFileName())}catch(e){console.error("PNG export failed:",e)}}_bindEvents(){this._updateBtn.addEventListener("click",()=>this.update()),this._fitBtn.addEventListener("click",()=>this._fit()),this._pngBtn.addEventListener("click",()=>this._exportPng()),this._canvas.addEventListener("keydown",e=>{e.key==="f"&&this._fit()}),this._canvas.tabIndex=0,this._canvas.addEventListener("wheel",e=>{e.preventDefault();let i=this._canvas.getBoundingClientRect(),o=e.clientX-i.left,r=e.clientY-i.top,l=e.deltaY<0?1.15:1/1.15;this._tx=o-(o-this._tx)*l,this._ty=r-(r-this._ty)*l,this._scale*=l,this._render()}),this._canvas.addEventListener("mousedown",e=>{this._dragging=!0,this._dragStartX=e.clientX,this._dragStartY=e.clientY,this._dragStartTx=this._tx,this._dragStartTy=this._ty,this._canvas.style.cursor="grabbing"}),window.addEventListener("mousemove",e=>{this._dragging?(this._tx=this._dragStartTx+(e.clientX-this._dragStartX),this._ty=this._dragStartTy+(e.clientY-this._dragStartY),this._render()):this._handleHover(e)}),window.addEventListener("mouseup",()=>{this._dragging&&(this._dragging=!1,this._canvas.style.cursor="grab")}),this._canvas.addEventListener("click",e=>this._handleClick(e)),this._resizeObserver=new ResizeObserver(()=>{this._sizeCanvas(),this._render()}),this._resizeObserver.observe(this._canvas)}_sizeCanvas(){let e=this._canvas.getBoundingClientRect(),i=window.devicePixelRatio||1;this._canvas.width=e.width*i,this._canvas.height=e.height*i,this._ctx.setTransform(i,0,0,i,0,0)}async update(){this._statusLabel.textContent="Loading...";try{let e=await this._app.websocketManager.request({type:"clock_tree"});this._clockData=e.clocks||[],this._buildTabs(),this._selectClock(0),this._statusLabel.textContent=this._clockData.length+" clock"+(this._clockData.length!==1?"s":"")}catch(e){console.error("Clock tree error:",e),this._statusLabel.textContent="Error: "+e.message}}_buildTabs(){this._tabBar.innerHTML="",this._clockData.forEach((e,i)=>{let o=document.createElement("button");o.className="timing-tab"+(i===this._selectedClockIdx?" active":""),o.textContent=e.name,o.addEventListener("click",()=>this._selectClock(i)),this._tabBar.appendChild(o)})}_selectClock(e){if(e<0||e>=this._clockData.length)return;this._selectedClockIdx=e,this._selectedNodeId=-1,this._tabBar.querySelectorAll(".timing-tab").forEach((o,r)=>{o.classList.toggle("active",r===e)}),this._computeLayout(this._clockData[e]),requestAnimationFrame(()=>{this._sizeCanvas(),this._fitToView(),this._render()})}_computeLayout(e){let i=od(e);this._layout=i.layout,this._layoutWidth=i.layoutWidth,this._layoutHeight=i.layoutHeight,this._timeMin=i.timeMin,this._timeMax=i.timeMax,this._timeUnit=i.timeUnit,this._sceneHeight=i.sceneHeight,this._layoutById=i.layoutById}_fitToView(){if(!this._layout.length)return;let e=this._canvas.getBoundingClientRect(),i=e.width,o=e.height,r=i/this._layoutWidth,l=o/this._layoutHeight;this._scale=Math.min(r,l)*.9,this._tx=(i-this._layoutWidth*this._scale)/2,this._ty=(o-this._layoutHeight*this._scale)/2}render(){this._render()}_render(){let e=this._ctx,i=this._canvas.getBoundingClientRect(),o=i.width,r=i.height,l=bi();if(e.clearRect(0,0,o,r),e.fillStyle=l.canvasBg,e.fillRect(0,0,o,r),!this._layout.length){e.fillStyle=l.canvasText,e.font="14px "+l.fontSans,e.textAlign="center";let h=wt(this._app)?"No clock tree data available":'Click "Update" to load clock tree data';e.fillText(h,o/2,r/2);return}e.save(),e.translate(this._tx,this._ty),e.scale(this._scale,this._scale),this._drawConnections(e);for(let h of this._layout)this._drawNode(e,h,h.id===this._selectedNodeId);e.restore(),this._drawTimeScale(e,o,r,l)}_drawConnections(e){let i=1.5/this._scale,o=Vo,r=this._timeMax-this._timeMin||1;for(let l of this._layout){if(l.parent_id<0)continue;let h=this._layoutById.get(l.parent_id);if(!h)continue;let u=h.x,f=l.x,_=(h.delay||0)/r*this._sceneHeight,y=h.y+_,g=l.y,v=h.type==="root"?h.y:h.y+o;if(y>v){let b=vs[h.type]||vs.unknown;e.strokeStyle=b,e.lineWidth=i,e.beginPath(),e.moveTo(u,v),e.lineTo(u,y);let C=o/20;e.moveTo(u-C,y),e.lineTo(u+C,y),e.stroke()}e.strokeStyle="#006400",e.lineWidth=i;let w=(y+g)/2;e.beginPath(),e.moveTo(u,y),e.bezierCurveTo(u,w,f,w,f,g),e.stroke()}}_drawNode(e,i,o){let r=i.x,l=i.y,h=Vo,u=vs[i.type]||vs.unknown;switch(e.fillStyle=sd(u),e.strokeStyle=u,e.lineWidth=1/this._scale,i.type){case"root":{e.beginPath(),e.moveTo(r-h/2,l-h),e.lineTo(r+h/2,l-h),e.lineTo(r,l),e.closePath(),e.fill(),e.stroke();break}case"buffer":{e.beginPath(),e.moveTo(r-h/2,l),e.lineTo(r+h/2,l),e.lineTo(r,l+h),e.closePath(),e.fill(),e.stroke();break}case"inverter":{let f=h*.1,_=l+h-f;e.beginPath(),e.moveTo(r-h/2,l),e.lineTo(r+h/2,l),e.lineTo(r,_),e.closePath(),e.fill(),e.stroke(),e.beginPath(),e.arc(r,_+f/2,f/2,0,Math.PI*2),e.fill(),e.stroke();break}case"clock_gate":{e.beginPath(),e.arc(r,l+h/2,h/2,0,Math.PI*2),e.fill(),e.stroke();break}case"register":case"macro":{e.beginPath(),e.rect(r-h/2,l,h,h),e.fill(),e.stroke(),e.beginPath(),e.moveTo(r-h/8,l),e.lineTo(r+h/8,l),e.lineTo(r,l+h/4),e.closePath(),e.stroke();break}default:{e.beginPath(),e.arc(r,l+h/2,h/2,0,Math.PI*2),e.fill(),e.stroke();break}}if(o){e.strokeStyle="#ffff00",e.lineWidth=2/this._scale;let f=i.type==="root"?l-h/2:l+h/2;e.beginPath(),e.arc(r,f,h/2+3,0,Math.PI*2),e.stroke()}}_drawTimeScale(e,i,o,r){if(!this._sceneHeight)return;let l=C=>C*this._scale+this._ty,h=l(bs),u=l(bs+this._sceneHeight);if(u<0||h>o)return;e.save(),e.fillStyle=r.canvasLabel,e.strokeStyle=r.canvasAxis,e.font="11px "+r.fontMono,e.textAlign="right",e.textBaseline="middle";let f=this._timeMax-this._timeMin;if(f<=0){e.restore();return}let _=u-h,y=Math.max(2,Math.floor(_/40)),g=f/y,v=Math.pow(10,Math.floor(Math.log10(g))),w=v;g/v>5?w=10*v:g/v>2?w=5*v:g/v>1&&(w=2*v);let b=Math.ceil(this._timeMin/w)*w;e.beginPath();for(let C=b;C<=this._timeMax;C+=w){let B=(C-this._timeMin)/f,P=h+B*(u-h);e.moveTo(0,P),e.lineTo(i,P);let T=C.toFixed(w<.01?3:w<.1?2:1)+" "+this._timeUnit;e.fillText(T,Yo-4,P)}e.stroke(),e.restore()}_screenToLayout(e,i){return{x:(e-this._tx)/this._scale,y:(i-this._ty)/this._scale}}_hitTest(e,i){let o=this._screenToLayout(e,i),r=Vo;for(let l of this._layout){let h=l.type==="root"?l.y-r:l.y,u=l.type==="root"?l.y:l.y+r;if(o.x>=l.x-r/2&&o.x<=l.x+r/2&&o.y>=h&&o.y<=u)return l}return null}_handleClick(e){let i=this._canvas.getBoundingClientRect(),o=e.clientX-i.left,r=e.clientY-i.top,l=this._hitTest(o,r);l?(this._selectedNodeId=l.id,this._render(),this._app.websocketManager.request({type:"clock_tree_highlight",inst_name:l.name}).then(()=>this._refreshOverlay())):this._selectedNodeId>=0&&(this._selectedNodeId=-1,this._render(),this._app.websocketManager.request({type:"clock_tree_highlight",inst_name:""}).then(()=>this._refreshOverlay()))}_handleHover(e){let i=this._canvas.getBoundingClientRect(),o=e.clientX-i.left,r=e.clientY-i.top;if(o<0||r<0||o>i.width||r>i.height){this._tooltip.style.display="none";return}let l=this._hitTest(o,r);if(l){let h=[l.name,"Type: "+l.type,"Arrival: "+l.arrival.toFixed(3)+" "+(this._timeUnit||"")];l.delay&&h.push("Delay: "+l.delay.toFixed(3)+" "+(this._timeUnit||"")),l.fanout&&h.push("Fanout: "+l.fanout),this._tooltip.textContent=h.join(` +`),this._tooltip.style.display="block",this._tooltip.style.left=e.clientX+12+"px",this._tooltip.style.top=e.clientY+12+"px"}else this._tooltip.style.display="none"}};var Ll=60,Sl=20,Ml=30,El=50,kl=2,rd="#f08080",ad="#8b0000",ld="#90ee90",cd="#006400",je=["#4e79a7","#f28e2b","#e15759","#76b7b2","#59a14f","#edc948","#b07aa1","#ff9da7"],hd="rgba(240,128,128,0.12)",dd="rgba(144,238,144,0.12)",ud="#ff9999",pd="#b0ffb0",fd=[{value:"setup",label:"Setup Slack"},{value:"hold",label:"Hold Slack"},{value:"fanout",label:"Net Fanout"},{value:"netlength",label:"Net Length (HPWL)"}];function md(s,e,i,o){if(!s||!e||oe.bottom)return null;for(let r of s)if(i>=r.x&&i<=r.x+r.width)return r;return null}function _d(s,e,i){return i?Math.log10(s+1)/Math.log10(e+1):s/e}function gd(s,e,i,o={}){let r=!!o.logY,l=s?.bins;if(!l||l.length===0)return{bars:[],yMax:0,yTicks:[],chartArea:null,logY:r};let h=Ll,u=e-Sl,f=Ml,_=i-El,y=u-h,g=_-f;if(y<=0||g<=0)return{bars:[],yMax:0,yTicks:[],chartArea:null,logY:r};let v={left:h,right:u,top:f,bottom:_},w=0;for(let T of l)T.count>w&&(w=T.count);w===0&&(w=1);let{yMax:b,yTicks:C}=r?vd(w):yd(w),B=(y-kl*(l.length-1))/l.length,P=[];for(let T=0;T[_.x,..._.ys||[]].join(","));return[u,...f].join(` `)}let i=e.bins||[],o=Array.isArray(e.series)?e.series:[],r=["lower","upper","count",...o.map(h=>h.name||"group")].join(","),l=i.map((h,u)=>{let f=[h.lower,h.upper,h.count];for(let _ of o)f.push(_.counts&&_.counts[u]||0);return f.join(",")});return[r,...l].join(` -`)}var hs=class{constructor(e,i){this._app=e,this._redrawAllLayers=i,this._currentTab="setup",this._histogramData=null,this._bars=[],this._yMax=0,this._yTicks=[],this._chartArea=null,this._hoveredBar=null,this._debugCharts=[],this._activeDebugChart=-1,this._build()}_build(){let e=document.createElement("div");e.className="charts-widget";let i=document.createElement("div");i.className="charts-toolbar",this._updateBtn=document.createElement("button"),this._updateBtn.className="or-btn",this._updateBtn.textContent="Update",wt(this._app)&&(this._updateBtn.style.display="none"),this._chartSelect=document.createElement("select"),this._chartSelect.className="charts-select",this._csvBtn=document.createElement("button"),this._csvBtn.className="or-btn",this._csvBtn.textContent="CSV",this._csvBtn.title="Export the current chart data as CSV",this._pngBtn=document.createElement("button"),this._pngBtn.className="or-btn",this._pngBtn.textContent="PNG",this._pngBtn.title="Export the current chart as a PNG image",this._statusLabel=document.createElement("span"),this._statusLabel.className="timing-path-count",i.appendChild(this._updateBtn),i.appendChild(this._chartSelect),i.appendChild(this._csvBtn),i.appendChild(this._pngBtn),i.appendChild(this._statusLabel),e.appendChild(i);let o=document.createElement("div");o.className="charts-toolbar";let r=document.createElement("span");r.textContent="Path Groups:",r.style.color="var(--fg-muted)",r.style.fontSize="var(--fs-12)",this._pathGroupSelect=document.createElement("select"),this._pathGroupSelect.className="charts-select",this._pathGroupSelect.multiple=!0,this._pathGroupSelect.size=1,this._pathGroupSelect.title="Select 0 = all, or \u22651 to stack by group";let l=document.createElement("span");l.textContent="Clock:",l.style.color="var(--fg-muted)",l.style.fontSize="var(--fs-12)",this._clockSelect=document.createElement("select"),this._clockSelect.className="charts-select",this._clockSelect.innerHTML='',o.appendChild(r),o.appendChild(this._pathGroupSelect),o.appendChild(l),o.appendChild(this._clockSelect),e.appendChild(o),this._canvas=document.createElement("canvas"),this._canvas.className="charts-canvas",e.appendChild(this._canvas),this._tooltip=document.createElement("div"),this._tooltip.className="or-tooltip",this._tooltip.style.display="none",e.appendChild(this._tooltip),this._filterRow=o,this.element=e,this._ctx=this._canvas.getContext("2d"),this._rebuildSelect(),this._bindEvents(),wt(this._app)&&setTimeout(()=>this.update(),0)}_bindEvents(){this._updateBtn.addEventListener("click",()=>this.update()),this._chartSelect.addEventListener("change",()=>this._onSelectChange()),this._csvBtn.addEventListener("click",()=>this._exportCsv()),this._pngBtn.addEventListener("click",()=>this._exportPng()),this._pathGroupSelect.addEventListener("change",()=>this._fetchHistogram()),this._clockSelect.addEventListener("change",()=>this._fetchHistogram()),this._canvas.addEventListener("mousemove",i=>this._handleHover(i)),this._canvas.addEventListener("mouseleave",()=>{this._hoveredBar=null,this._tooltip.style.display="none",this._syncView()}),this._canvas.addEventListener("click",i=>this._handleClick(i)),this._canvas.addEventListener("dblclick",i=>this._handleDblClick(i)),new ResizeObserver(()=>this._syncView()).observe(this._canvas)}_sizeCanvas(){let e=this._canvas.getBoundingClientRect(),i=window.devicePixelRatio||1;this._canvas.width=e.width*i,this._canvas.height=e.height*i,this._ctx.setTransform(i,0,0,i,0,0)}_rebuildSelect(){let e=this._chartSelect;e.innerHTML="";for(let i of jh){let o=document.createElement("option");o.value=i.value,o.textContent=i.label,e.appendChild(o)}this._debugCharts.forEach((i,o)=>{let r=document.createElement("option");r.value="gen:"+o,r.textContent=i.name||"Chart "+o,e.appendChild(r)}),e.value=this._activeDebugChart>=0?"gen:"+this._activeDebugChart:this._currentTab}_onSelectChange(){let e=this._chartSelect.value;e.startsWith("gen:")?(this._activeDebugChart=parseInt(e.slice(4),10)||0,this._hoveredBar=null,this._tooltip.style.display="none",this._syncView()):this._selectTab(e)}async update(){this._updateBtn.disabled=!0,this._updateBtn.textContent="Loading...",this._statusLabel.textContent="";try{this._activeDebugChart<0?((this._currentTab==="setup"||this._currentTab==="hold")&&await this._fetchFilters(),await Promise.all([this._fetchHistogram(),this._fetchGenericCharts()])):await this._fetchGenericCharts()}catch(e){this._statusLabel.textContent="Error: "+e.message}this._updateBtn.disabled=!1,this._updateBtn.textContent="Update"}async _fetchFilters(){let e=await this._app.websocketManager.request({type:"chart_filters"});this._populatePathGroups(e.path_groups||[]),this._populateClocks(e.clocks||[])}_populatePathGroups(e){let i=new Set(Array.from(this._pathGroupSelect.selectedOptions,o=>o.value));this._pathGroupSelect.innerHTML="";for(let o of e){let r=document.createElement("option");r.value=o,r.textContent=o,r.selected=i.has(o),this._pathGroupSelect.appendChild(r)}}_populateClocks(e){let i=this._clockSelect.value;this._clockSelect.innerHTML='';for(let o of e){let r=document.createElement("option");r.value=o,r.textContent=o,this._clockSelect.appendChild(r)}e.includes(i)&&(this._clockSelect.value=i)}async _fetchGenericCharts(){try{let e=await this._app.websocketManager.request({type:"debug_charts"});this.setDebugCharts(e.charts||[])}catch{}}async _fetchHistogram(){try{let e=this._currentTab,i;if(e==="fanout")i={type:"fanout_histogram"};else if(e==="netlength")i={type:"net_length_histogram",use_dbu:!!this._app.showDbu};else{i={type:"slack_histogram",is_setup:e==="setup"};let r=Array.from(this._pathGroupSelect.selectedOptions,l=>l.value).filter(Boolean);r.length>0&&(i.path_groups=r),this._clockSelect.value&&(i.clock_name=this._clockSelect.value)}let o=await this._app.websocketManager.request(i);if(this._currentTab!==e)return;if(this._histogramData=o,this._syncView(),e==="fanout"||e==="netlength"){let r=o.total_nets||0;this._statusLabel.textContent=`${r} nets`}else{let r=o.total_endpoints||0,l=o.unconstrained_count||0,h=r-l;this._statusLabel.textContent=`${h} endpoints`+(l>0?`, ${l} unconstrained`:"")}}catch(e){this._statusLabel.textContent="Error: "+e.message}}_selectTab(e){this._currentTab===e&&this._activeDebugChart<0||(this._currentTab=e,this._activeDebugChart=-1,this._chartSelect&&(this._chartSelect.value=e),this._filterRow.style.display=e==="setup"||e==="hold"?"":"none",this._hoveredBar=null,this._tooltip.style.display="none",this.update())}_computeLayout(){if(!this._histogramData)return;let e=this._canvas.getBoundingClientRect(),i=Qh(this._histogramData,e.width,e.height,{logY:this._currentTab==="fanout"});this._bars=i.bars,this._yMax=i.yMax,this._yTicks=i.yTicks,this._chartArea=i.chartArea,this._logY=!!i.logY}render(){this._syncView()}_stackedSeries(){let e=this._histogramData?.series;return Array.isArray(e)&&e.length>1?e:null}_render(){let e=this._canvas.getBoundingClientRect(),i=e.width,o=e.height,r=this._ctx,l=gi();if(r.clearRect(0,0,i,o),r.fillStyle=l.canvasBg,r.fillRect(0,0,i,o),!this._bars||this._bars.length===0){r.fillStyle=l.canvasText,r.font="14px "+l.fontSans,r.textAlign="center",r.textBaseline="middle";let h=wt(this._app)?"No histogram data available":'Click "Update" to load histogram';r.fillText(h,i/2,o/2);return}this._drawAxes(r,l),this._drawBars(r),this._drawTitle(r,i,l),this._stackedSeries()&&this._drawSeriesLegend(r,l)}_drawAxes(e,i){let o=this._chartArea;if(!o)return;e.strokeStyle=i.canvasAxis,e.lineWidth=1,e.beginPath(),e.moveTo(o.left,o.top),e.lineTo(o.left,o.bottom),e.stroke(),e.beginPath(),e.moveTo(o.left,o.bottom),e.lineTo(o.right,o.bottom),e.stroke(),e.fillStyle=i.canvasLabel,e.font="11px "+i.fontMono,e.textAlign="right",e.textBaseline="middle";let r=o.bottom-o.top;for(let b of this._yTicks){let w=this._logY?Math.log10(b+1)/Math.log10(this._yMax+1):b/this._yMax,v=o.bottom-w*r;e.fillText(this._formatCount(b),o.left-6,v),b>0&&(e.strokeStyle=i.canvasGrid,e.beginPath(),e.moveTo(o.left,v),e.lineTo(o.right,v),e.stroke(),e.strokeStyle=i.canvasAxis)}let l=this._currentTab,h=l==="fanout"||l==="netlength";e.save(),e.translate(14,(o.top+o.bottom)/2),e.rotate(-Math.PI/2),e.textAlign="center",e.textBaseline="middle",e.fillStyle=i.canvasTitle,e.font="11px "+i.fontMono,e.fillText(this._logY?"Nets (log)":h?"Nets":"Endpoints",0,0),e.restore(),e.textAlign="center",e.textBaseline="top",e.fillStyle=i.canvasLabel,e.font="10px "+i.fontMono;let u=this._histogramData.bins,f=this._histogramData.time_unit||this._histogramData.length_unit||"",_=u.length>0?u[0].upper-u[0].lower:1,y=l==="fanout"?0:Math.max(0,-Math.floor(Math.log10(_)));for(let b=0;b<=this._bars.length;b++){let w=b=0){this._hoveredBar=null,this._tooltip.style.display="none";return}let i=this._hitTestBar(e);if(i!==this._hoveredBar&&(this._hoveredBar=i,this._render()),i){let o=this._currentTab,r=i.upper-i.lower;if(o==="fanout"){let b=i.upper-1,w=i.lower===b?`${i.lower}`:`[${i.lower}, ${b}]`;this._tooltip.textContent=`Nets: ${i.count} -Fanout: ${w}`}else if(o==="netlength"){let b=this._histogramData?.length_unit||"",w=Math.max(0,-Math.floor(Math.log10(r)));this._tooltip.textContent=`Nets: ${i.count} -Length: [${i.lower.toFixed(w)}, ${i.upper.toFixed(w)}) ${b}`}else{let b=this._histogramData?.time_unit||"",w=Math.max(0,-Math.floor(Math.log10(r)));this._tooltip.textContent=`Endpoints: ${i.count} -Slack: [${i.lower.toFixed(w)}, ${i.upper.toFixed(w)}) ${b}`}this._tooltip.style.display="block";let l=this.element.getBoundingClientRect(),h=this._tooltip.getBoundingClientRect(),u=4,f=e.clientX-l.left,_=e.clientY-l.top,y=f+12;y+h.width>l.width-u&&(y=f-12-h.width),y=Math.max(u,y);let g=_-10;g=Math.min(l.height-h.height-u,Math.max(u,g)),this._tooltip.style.left=y+"px",this._tooltip.style.top=g+"px"}else this._tooltip.style.display="none"}async _handleClick(e){if(this._activeDebugChart>=0||this._currentTab==="fanout"||this._currentTab==="netlength")return;let i=this._hitTestBar(e);if(!(!i||i.count===0))try{let o=await this._app.websocketManager.request({type:"timing_report",is_setup:this._currentTab==="setup",max_paths:50,slack_min:i.lower,slack_max:i.upper});this._app.timingWidget&&(this._app.timingWidget.showPaths(this._currentTab,o.paths||[]),this._app.focusComponent&&this._app.focusComponent("TimingWidget"))}catch(o){console.error("Charts bar click error:",o)}}async _handleDblClick(e){if(this._activeDebugChart>=0)return;let i;if(this._currentTab==="fanout")i="select_fanout_bin";else if(this._currentTab==="netlength")i="select_net_length_bin";else return;let o=this._hitTestBar(e);if(!o||o.count===0)return;let r=ae(this._app);try{let l=await this._app.websocketManager.request({type:i,lower:o.lower,upper:o.upper,use_dbu:this._app.showDbu});if(!ue(this._app,r))return;l&&l.truncated&&console.warn(`Bin has ${l.count} nets; selection capped at ${l.selection_limit} for performance.`),this._app.updateInspector&&this._app.updateInspector(l),this._app.focusComponent&&this._app.focusComponent("Inspector"),this._redrawAllLayers&&this._redrawAllLayers()}catch(l){console.error("Net bin select failed:",l)}}_activeChartData(){return this._activeDebugChart>=0?{kind:"generic",data:this._debugCharts[this._activeDebugChart]}:{kind:"histogram",data:this._histogramData}}_chartBaseName(){return this._activeDebugChart>=0?this._debugCharts[this._activeDebugChart].name||"chart":this._currentTab}_triggerDownload(e,i,{revoke:o=!1}={}){let r=document.createElement("a");r.href=i,r.download=e,document.body.appendChild(r),r.click(),r.remove(),o&&URL.revokeObjectURL(i)}_download(e,i,o){try{let r=URL.createObjectURL(new Blob([o],{type:i}));this._triggerDownload(e,r,{revoke:!0})}catch(r){console.error("Download failed:",r)}}_exportCsv(){let{kind:e,data:i}=this._activeChartData();if(!i)return;let o=id(e,i);this._download(this._chartBaseName()+".csv","text/csv",o)}_exportPng(){try{let e=this._canvas.toDataURL("image/png");this._triggerDownload(this._chartBaseName()+".png",e)}catch(e){console.error("PNG export failed:",e)}}setDebugCharts(e){this._debugCharts=e,e.length===0?this._activeDebugChart=-1:this._activeDebugChart>=e.length&&(this._activeDebugChart=0),this._rebuildSelect(),this._syncView()}_syncView(){let e=this._activeDebugChart>=0;e&&(this._hoveredBar=null,this._tooltip.style.display="none");let i=!e&&(this._currentTab==="setup"||this._currentTab==="hold");this._filterRow&&(this._filterRow.style.display=i?"":"none"),this._sizeCanvas(),e?this._renderLineChart(this._debugCharts[this._activeDebugChart]):(this._computeLayout(),this._render())}_renderLineChart(e){let i=this._canvas.getBoundingClientRect(),o=i.width,r=i.height,l=this._ctx,h=gi();l.clearRect(0,0,o,r),l.fillStyle=h.canvasBg,l.fillRect(0,0,o,r);let u=e.points;if(!u||u.length===0){l.fillStyle=h.canvasText,l.font="14px "+h.fontSans,l.textAlign="center",l.textBaseline="middle",l.fillText("No data points yet",o/2,r/2);return}let f=e.y_labels?e.y_labels.length:1,_=al,y=o-ll,g=cl,b=r-hl,w=y-_,v=b-g;if(w<=0||v<=0)return;let S=u[0].x,R=u[0].x,I=1/0,T=-1/0;for(let it of u){it.xR&&(R=it.x);for(let Q of it.ys)QT&&(T=Q)}S===R&&(R=S+1),(!isFinite(I)||!isFinite(T))&&(I=0,T=1);let G=(T-I)*.05||1;I-=G,T+=G;let U=it=>_+(it-S)/(R-S)*w,dt=it=>b-(it-I)/(T-I)*v;l.strokeStyle=h.canvasAxis,l.lineWidth=1,l.beginPath(),l.moveTo(_,g),l.lineTo(_,b),l.lineTo(y,b),l.stroke(),l.fillStyle=h.canvasLabel,l.font="10px "+h.fontMono,l.textAlign="right",l.textBaseline="middle";let gt=5;for(let it=0;it<=gt;it++){let Q=I+(T-I)*it/gt,nt=dt(Q);l.fillText(this._formatNum(Q),_-4,nt),it>0&&it1&&e.y_labels){l.font="10px "+h.fontMono,l.textAlign="left",l.textBaseline="top";let it=_+8,Q=g+4;for(let nt=0;nt=1e6?(e/1e6).toFixed(1)+"M":i>=1e3?(e/1e3).toFixed(1)+"k":i>=1?e.toFixed(1):e.toPrecision(3)}_formatCount(e){return e===0?"0":e>=1e6?e/1e6+"M":e>=1e3?e/1e3+"k":String(e)}};var ke=class{constructor(e){this.onChange=e,this.roots=[],this._nodeMap=new Map}addFromSpec(e,i=null){let o=this._makeNode(e.id,i,e);if(o.checked=e.checked!==!1,e.children){for(let r of e.children)o.children.push(this.addFromSpec(r,o));o.hasCheckbox&&this._computeParent(o)}return i||this.roots.push(o),o}buildFromNodes(e){this._nodeMap.clear(),this.roots=[];for(let i of e)this._makeNode(i.id,null,i);for(let i of e){let o=this._nodeMap.get(i.id);if(i.parentId!=null&&this._nodeMap.has(i.parentId)){let r=this._nodeMap.get(i.parentId);o.parent=r,r.children.push(o)}else this.roots.push(o)}for(let i=e.length-1;i>=0;i--){let o=this._nodeMap.get(e[i].id);o.hasCheckbox&&o.children.length>0&&this._computeParent(o)}return this.roots}get(e){return this._nodeMap.get(e)}isVisible(e){let i=this.get(e);return i?i.checked:!1}check(e,i){let o=this._nodeMap.get(e);if(o){o.checked=i,o.indeterminate=!1;for(let r of o.children)this._setSubtree(r,i);for(let r=o.parent;r;r=r.parent)r.hasCheckbox&&this._computeParent(r);this.onChange()}}cascadeQuiet(e,i){let o=this._nodeMap.get(e);if(o){o.checked=i,o.indeterminate=!1;for(let r of o.children)this._setSubtree(r,i);for(let r=o.parent;r;r=r.parent)r.hasCheckbox&&this._computeParent(r)}}checkSet(e){for(let[i,o]of Object.entries(e)){let r=this._nodeMap.get(i);r&&(r.checked=o,r.indeterminate=!1)}this._recomputeAllParents(),this.onChange()}mirrorStates(e){this._applyMirror(e),this.onChange()}mirrorStatesQuiet(e){this._applyMirror(e)}_applyMirror(e){for(let[i,o]of Object.entries(e)){let r=this._nodeMap.get(i);r&&(r.checked=!!o.checked,r.indeterminate=!!o.indeterminate)}}forEach(e){let i=o=>{e(o);for(let r of o.children)i(r)};for(let o of this.roots)i(o)}_makeNode(e,i,o){let r={id:e,parent:i,children:[],hasCheckbox:o.hasCheckbox!==!1,checked:o.checked!==!1,indeterminate:!1,data:o.data!=null?o.data:o};return this._nodeMap.set(e,r),r}_checkboxDescendants(e){let i=[];for(let o of e.children)o.hasCheckbox?i.push(o):i.push(...this._checkboxDescendants(o));return i}_computeParent(e){let i=this._checkboxDescendants(e);if(i.length===0)return;let o=i.every(l=>l.checked&&!l.indeterminate),r=i.every(l=>!l.checked&&!l.indeterminate);e.checked=o,e.indeterminate=!o&&!r}_setSubtree(e,i){e.hasCheckbox&&(e.checked=i,e.indeterminate=!1);for(let o of e.children)this._setSubtree(o,i)}_recomputeAllParents(){let e=i=>{for(let o of i.children)e(o);i.hasCheckbox&&i.children.length>0&&this._computeParent(i)};for(let i of this.roots)e(i)}};var dl=["Instance","Module","Instances","Macros","Modules","Area","Local Inst","Local Macros","Local Modules"],Ye={MODULE:0,LEAF_GROUP:1,TYPE_GROUP:2,INSTANCE:3,NAME_GROUP:4};function vi(s){return s===Ye.MODULE||s===Ye.NAME_GROUP}var ds=class{constructor(e,i,o){this._app=i,this._redrawAllLayers=o,this._nodes=[],this._nameGrouped=!1,this._nameGroupsCapped=!1,this._rows=[],this._childrenMap=new Map,this._collapsed=new Set,this._moduleState=new Map,this._checkModel=null,this._build(e),i.hierarchyBrowser=this,wt(i)&&this.update()}_build(e){let i=document.createElement("div");i.className="hierarchy-widget";let o=document.createElement("div");o.className="timing-toolbar",this._updateBtn=document.createElement("button"),this._updateBtn.className="or-btn",this._updateBtn.textContent="Update",wt(this._app)&&(this._updateBtn.style.display="none"),this._statusLabel=document.createElement("span"),this._statusLabel.className="timing-path-count",o.appendChild(this._updateBtn),o.appendChild(this._statusLabel),i.appendChild(o),this._tableContainer=document.createElement("div"),this._tableContainer.className="hierarchy-table-container",this._table=document.createElement("table"),this._table.className="timing-table",this._tableContainer.appendChild(this._table),i.appendChild(this._tableContainer),e.element.appendChild(i),this._bindEvents()}_bindEvents(){this._updateBtn.addEventListener("click",()=>this.update())}async update(){this._updateBtn.disabled=!0,this._updateBtn.textContent="Loading...",this._statusLabel.textContent="";try{let e=await this._app.websocketManager.request({type:"module_hierarchy"});this._nodes=e.nodes||[],this._nameGrouped=!!e.name_grouped,this._nameGroupsCapped=!!e.name_groups_capped,this._buildTree(),this._readServerColors(),this._computeEffectiveColors(),this._render(),this._statusLabel.textContent=this._statusText(),await this._sendModuleColors()}catch(e){this._statusLabel.textContent="Error: "+e.message}this._updateBtn.disabled=!1,this._updateBtn.textContent="Update"}_statusText(){let e=this._nodes.filter(r=>vi(r.node_kind||0)).length;if(!this._nameGrouped)return e+" modules";let o=Math.max(0,e-1)+" groups from instance names \u2014 this design has no module hierarchy";return this._nameGroupsCapped&&(o+=" (truncated: too many groups)"),o}_buildTree(){this._childrenMap.clear(),this._collapsed.clear();for(let i of this._nodes)this._childrenMap.set(i.id,[]);for(let i of this._nodes)i.parent_id>=0&&this._childrenMap.has(i.parent_id)&&this._childrenMap.get(i.parent_id).push(i.id);this._nodeMap=new Map;for(let i of this._nodes)this._nodeMap.set(i.id,i);for(let i of this._nodes){let o=this._childrenMap.get(i.id);if(!o||o.length===0)continue;let r=i.node_kind||0;r===Ye.LEAF_GROUP||r===Ye.TYPE_GROUP?this._collapsed.add(i.id):vi(r)&&i.parent_id>=0&&this._collapsed.add(i.id)}this._rows=[];let e=this._nodes.filter(i=>i.parent_id<0);for(let i of e)this._dfs(i.id,0);this._checkModel=new ke(()=>{this._checkModel.forEach(i=>{if(!i.hasCheckbox)return;let o=this._moduleState.get(i.data.odb_id);o&&(o.visible=i.checked)}),this._sendModuleColors()}),this._checkModel.buildFromNodes(this._nodes.map(i=>({id:i.id,parentId:i.parent_id,hasCheckbox:vi(i.node_kind||0)&&i.odb_id!=null,checked:!0,data:i})))}_readServerColors(){this._moduleState.clear();for(let e of this._rows){let i=this._nodeMap.get(e.id);if(!i||!vi(i.node_kind||0)||i.odb_id==null)continue;let o=i.color||[128,128,128];this._moduleState.set(i.odb_id,{color:o,effectiveColor:o,visible:!0,nodeId:i.id})}}_computeEffectiveColors(){for(let e of this._rows){let i=this._nodeMap.get(e.id);if(!i||!vi(i.node_kind||0))continue;let o=this._moduleState.get(i.odb_id);if(!o)continue;let r=i.parent_id,l=null;for(;r>=0;){let h=this._nodeMap.get(r);if(!h)break;if(vi(h.node_kind||0)){let u=this._moduleState.get(h.odb_id);u&&this._collapsed.has(h.id)&&(l=u.effectiveColor)}r=h.parent_id}o.effectiveColor=l||o.color}}async _sendModuleColors(){let e=[];for(let[o,r]of this._moduleState){if(!r.visible)continue;let[l,h,u]=r.effectiveColor;e.push(`${o}:${l},${h},${u},100`)}let i=e.join(";");try{let o=await this._app.websocketManager.request({type:"set_module_colors",colors:i});console.log("set_module_colors:",o.count,"modules,",e.length,"sent")}catch(o){console.error("set_module_colors failed:",o)}this._redrawAllLayers()}_dfs(e,i){this._rows.push({id:e,depth:i});let o=this._childrenMap.get(e)||[];for(let r of o)this._dfs(r,i+1)}_render(){this._table.innerHTML="";let e=document.createElement("thead"),i=document.createElement("tr");for(let r of dl){let l=document.createElement("th");l.textContent=r,i.appendChild(l)}e.appendChild(i),this._table.appendChild(e);let o=document.createElement("tbody");for(let r of this._rows){let l=this._nodeMap.get(r.id);if(!l||this._isHidden(l))continue;let h=document.createElement("tr"),u=l.node_kind||0,_=(this._childrenMap.get(r.id)||[]).length>0,y=this._collapsed.has(r.id);u===Ye.LEAF_GROUP||u===Ye.TYPE_GROUP?(h.style.fontStyle="italic",h.style.color="var(--fg-disabled)"):u===Ye.INSTANCE?h.style.color="var(--fg-secondary)":u===Ye.NAME_GROUP&&(h.classList.add("hierarchy-name-group"),h.title="Recovered from instance names \u2014 this design has no module hierarchy");let g=document.createElement("td");if(g.style.paddingLeft=8+r.depth*16+"px",g.style.whiteSpace="nowrap",vi(u)&&l.odb_id!=null){let v=this._moduleState.get(l.odb_id),S=this._checkModel?this._checkModel.get(l.id):null;if(v&&S){let R=document.createElement("input");R.type="checkbox",R.checked=S.checked,R.indeterminate=S.indeterminate,R.className="hierarchy-module-cb",S.cb=R,R.addEventListener("change",dt=>{dt.stopPropagation(),this._checkModel.check(l.id,R.checked),this._render()}),g.appendChild(R);let I=document.createElement("span");I.className="hierarchy-color-swatch";let[T,G,U]=v.effectiveColor;I.style.backgroundColor=`rgb(${T},${G},${U})`,g.appendChild(I)}}if(_){let v=document.createElement("span");v.className="hierarchy-arrow",v.textContent=y?"\u25B6":"\u25BC",v.addEventListener("click",S=>{S.stopPropagation(),this._toggleNode(r.id)}),g.appendChild(v)}else{let v=document.createElement("span");v.className="hierarchy-arrow",v.style.visibility="hidden",v.textContent="\u25B6",g.appendChild(v)}let b=document.createElement("span");b.textContent=l.inst_name,g.appendChild(b),h.appendChild(g);let w=[l.module_name,Wi(l.insts),Wi(l.macros),Wi(l.modules),this._fmtArea(l.area),Wi(l.local_insts),Wi(l.local_macros),Wi(l.local_modules)];for(let v of w){let S=document.createElement("td");S.textContent=v,S.style.textAlign="right",h.appendChild(S)}h.children[1].style.textAlign="left",o.appendChild(h)}if(this._rows.length===0){let r=document.createElement("tr"),l=document.createElement("td");l.colSpan=dl.length,l.style.textAlign="center",l.style.color="var(--fg-secondary)",l.textContent=wt(this._app)?"No hierarchy data available":'Click "Update" to load hierarchy',r.appendChild(l),o.appendChild(r)}this._table.appendChild(o),fi(this._table)}_isHidden(e){let i=e.parent_id;for(;i>=0;){if(this._collapsed.has(i))return!0;let o=this._nodeMap.get(i);if(!o)break;i=o.parent_id}return!1}_toggleNode(e){this._collapsed.has(e)?this._collapsed.delete(e):this._collapsed.add(e),this._computeEffectiveColors(),this._render(),this._sendModuleColors()}_fmtArea(e){if(e==null)return"";if(this._app.showDbu){let i=this._app.getDbuPerMicron();return String(Math.round(e*i*i))}return e>=1e6?(e/1e6).toFixed(3)+" mm\xB2":e.toFixed(3)+" \u03BCm\xB2"}};function Wi(s){return s!=null?String(s):""}var nd='',sd='',od='',rd='',ad='',ld='',cd='',hd='',dd='',ud='',pd='',fd='';function ul(s,e,i){i=i||e;let o=null,r=null,l=null,h=!1,u=10;function f(C,$){return h?Promise.resolve():(h=!0,s.websocketManager.request({type:"set_property",name:C,use_dbu:s.showDbu,...$}).then(B=>{!B.ok&&B.error&&Ce(B.error),Ft(B),B.ok&&B.bbox&&Mt(B.bbox)}).catch(B=>{console.error("set_property failed:",B),Ce("Edit failed: "+B),o&&Ft(o)}).finally(()=>{h=!1}))}function _(C,$){let B=document.createElement("select");B.className="inspector-editor-select";let Y=C.editor.type==="bool"?["True","False"]:C.editor.options||[];for(let P of Y){let J=document.createElement("option");J.value=P,J.textContent=P,P===C.value&&(J.selected=!0),B.appendChild(J)}if(!Y.includes(C.value)){let P=document.createElement("option");P.value=C.value||"",P.textContent=C.value||"",P.selected=!0,P.disabled=!0,B.insertBefore(P,B.firstChild)}return B.addEventListener("change",()=>{if($.onPropertyChange){$.onPropertyChange(C.name,B.value);return}if(C.editor.type==="bool")$.onPropertyEdit(C,{value:B.value==="True"});else{let P=(C.editor.options||[]).indexOf(B.value);$.onPropertyEdit(C,{option_index:P,option_name:B.value})}}),B}async function y(C,$){if(!h&&!(C==="Delete"&&!await Fa({title:"Delete "+($.type||"object"),message:"Delete "+($.type||"object")+' "'+($.name||"")+'"? This cannot be undone.',confirmLabel:"Delete",danger:!0}))){h=!0;try{let B=await s.websocketManager.request({type:"trigger_action",name:C,use_dbu:s.showDbu});!B.ok&&B.error&&Ce(B.error),Ft(B.properties?B:null),B.deleted&&s.highlightRect&&s.map&&(s.map.removeLayer(s.highlightRect),s.highlightRect=null),T(),i()}catch(B){console.error("trigger_action failed:",B),Ce("Action failed: "+B)}finally{h=!1}}}function g(C){s.websocketManager.request({...C,use_dbu:s.showDbu}).then($=>{!$.ok&&$.error&&Ce($.error),Ft($),i()}).catch($=>{console.error(C.type+" failed:",$)})}function b(){let C=document.getElementById("highlight-picker");C&&C.remove()}function w(C,$){b();let B=s.techData?.highlight_colors||[];if(!B.length)return;let Y=document.createElement("div");Y.id="highlight-picker";let P=document.createElement("div");if(P.className="highlight-swatch-grid",B.forEach((O,ct)=>{let Lt=document.createElement("button");Lt.className="highlight-swatch",Lt.title="Group "+(ct+1),Lt.style.backgroundColor=`rgb(${O[0]}, ${O[1]}, ${O[2]})`,ct===$.highlight_group&&Lt.classList.add("active"),Lt.addEventListener("click",()=>{b(),g({type:"highlight",group:ct})}),P.appendChild(Lt)}),Y.appendChild(P),$.highlight_group>=0){let O=document.createElement("button");O.className="highlight-remove",O.textContent="Remove highlight",O.addEventListener("click",()=>{b(),g({type:"unhighlight"})}),Y.appendChild(O)}document.body.appendChild(Y);let J=C.getBoundingClientRect();Y.style.left=J.left+"px",Y.style.top=J.bottom+4+"px";let A=O=>{O.type==="keydown"&&O.key!=="Escape"||O.type==="mousedown"&&Y.contains(O.target)||(b(),document.removeEventListener("mousedown",A,!0),document.removeEventListener("keydown",A,!0))};setTimeout(()=>{document.addEventListener("mousedown",A,!0),document.addEventListener("keydown",A,!0)},0)}function v(){if(!s.inspectorEl)return;s.inspectorEl.innerHTML="";let C=document.createElement("div");C.className="stub-panel",C.innerHTML='
Loading\u2026
Fetching properties from server.
',s.inspectorEl.appendChild(C)}async function S(C){let $=s.focusNets.has(C)?"remove":"add";$==="add"?s.focusNets.add(C):s.focusNets.delete(C);try{await s.websocketManager.request({type:"set_focus_nets",action:$,net_name:C})}catch(B){console.error("set_focus_nets failed:",B)}e(),o&&Ft(o)}async function R(){s.focusNets.clear();try{await s.websocketManager.request({type:"set_focus_nets",action:"clear",net_name:""})}catch(C){console.error("set_focus_nets clear failed:",C)}e(),o&&Ft(o)}async function I(C){let $=s.routeGuideNets.has(C)?"remove":"add";$==="add"?s.routeGuideNets.add(C):s.routeGuideNets.delete(C);try{await s.websocketManager.request({type:"set_route_guides",action:$,net_name:C})}catch(B){console.error("set_route_guides failed:",B)}i(),o&&Ft(o)}function T(){s.hoverHighlightLayer&&(s.map.removeLayer(s.hoverHighlightLayer),s.hoverHighlightLayer=null)}function G(){T(),s.websocketManager.request({type:"hover",select_id:-1}).then(()=>{}).catch(()=>{})}function U(C,$,B,Y){let P=L.latLngBounds(Ut(C,$,B,Y,s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY));if(!s.map)return P;let J=P.getSouthWest(),A=P.getNorthEast(),O=s.map.latLngToContainerPoint(J),ct=s.map.latLngToContainerPoint(A),Lt=Math.min(O.x,ct.x),Xt=Math.max(O.x,ct.x),Ot=Math.min(O.y,ct.y),jt=Math.max(O.y,ct.y),Le=Lt,Ze=Xt,Nt=Ot,Qe=jt;if(Xt-LtL.rectangle(U($,B,Y,P),{color:"#ffe85c",weight:3,fill:!0,fillColor:"#fff27a",fillOpacity:.14,opacity:1,interactive:!1,className:"hover-highlight",pane:s.hoverHighlightPane}))).addTo(s.map))}function gt(C,$){C.classList.add("inspector-link"),C.addEventListener("click",B=>{B.stopPropagation(),Q($)}),C.addEventListener("mouseenter",()=>{l!==null&&(s.websocketManager.cancel(l),l=null);let B=s.websocketManager.request({type:"hover",select_id:$});l=B.requestId,B.then(Y=>{l=null,dt(Y.rects||[]),i()}).catch(()=>{l=null})}),C.addEventListener("mouseleave",()=>{G(),i()})}function it(C){let $=C>0?"select_next":"select_prev";r!==null&&(s.websocketManager.cancel(r),r=null),v();let B=ae(s),Y=s.websocketManager.request({type:$,use_dbu:s.showDbu});r=Y.requestId,Y.then(P=>{if(r=null,!!ue(s,B)){if(P.error){console.error("Selection cycle error:",P.error),Ft(o);return}if(Ft(P),P.type==="Inst"&&P.name&&(s.selectedInstanceName=P.name,s.schematicWidget&&s.schematicWidget.refresh()),s.map&&s.map.closePopup(),T(),s.highlightRect&&s.map&&(s.map.removeLayer(s.highlightRect),s.highlightRect=null),P.bbox&&s.map&&s.designScale){let[J,A,O,ct]=P.bbox;P.type!=="Inst"&&tt(J,A,O,ct,P.type),P.selection_count>1?rt(P.bbox):Mt(P.bbox,P.type)}e()}}).catch(P=>{r=null,console.error("Selection cycle failed:",P),Ft(o)})}function Q(C){r!==null&&(s.websocketManager.cancel(r),r=null),v();let $=ae(s),B=s.websocketManager.request({type:"inspect",select_id:C,use_dbu:s.showDbu});r=B.requestId,B.then(Y=>{if(r=null,!!ue(s,$)){if(Y.error){console.error("Inspect error:",Y.error);return}if(Ft(Y),s.map.closePopup(),T(),s.highlightRect&&(s.map.removeLayer(s.highlightRect),s.highlightRect=null),Y.bbox&&s.map&&s.designScale){let[P,J,A,O]=Y.bbox;Y.type!=="Inst"&&tt(P,J,A,O,Y.type),Mt(Y.bbox,Y.type)}i()}}).catch(Y=>{r=null,console.error("Inspect failed:",Y)})}function nt(){r!==null&&(s.websocketManager.cancel(r),r=null),v();let C=ae(s),$=s.websocketManager.request({type:"inspect_back",use_dbu:s.showDbu});r=$.requestId,$.then(B=>{if(r=null,!!ue(s,C)){if(B.error){console.error("Inspect back error:",B.error);return}if(Ft(B),s.map.closePopup(),T(),s.highlightRect&&(s.map.removeLayer(s.highlightRect),s.highlightRect=null),B.bbox&&s.map&&s.designScale){if(B.type!=="Inst"){let[Y,P,J,A]=B.bbox;tt(Y,P,J,A,B.type)}Mt(B.bbox,B.type)}i()}}).catch(B=>{r=null,console.error("Inspect back failed:",B)})}function tt(C,$,B,Y,P){if(s.highlightRect&&(s.map.removeLayer(s.highlightRect),s.highlightRect=null),P==="Net")return;let J=Ut(C,$,B,Y,s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY);s.highlightRect=L.rectangle(J,{color:"#ff0",weight:2,fill:!1,dashArray:"6,4"}),s.visibility&&s.visibility.highlight_selected===!1||s.highlightRect.addTo(s.map)}let Ct=null;function Mt(C,$){if(!C||!s.map||!s.designScale||(At!==null&&Yt(),Ct&&(s.map.removeLayer(Ct),Ct=null),s.visibility&&s.visibility.highlight_selected===!1)||$==="Net")return;let[B,Y,P,J]=C,A=Ut(B,Y,P,J,s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY);Ct=L.rectangle(A,{color:"#ff0",weight:3,fill:!0,fillColor:"#ff0",fillOpacity:.25,opacity:1,interactive:!1,className:"selection-pulse",pane:s.hoverHighlightPane}).addTo(s.map);let O=Ct;setTimeout(()=>{O&&s.map&&s.map.hasLayer(O)&&s.map.removeLayer(O),Ct===O&&(Ct=null)},1100)}let It=null,At=null;function Yt(){At!==null&&(clearInterval(At),At=null),It&&(s.map&&s.map.hasLayer(It)&&s.map.removeLayer(It),It=null)}function rt(C,{repeats:$=6,intervalMs:B=300}={}){if(!C||!s.map||!s.designScale)return;if(Yt(),typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches){Mt(C);return}let[Y,P,J,A]=C,O=Ut(Y,P,J,A,s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY);It=L.rectangle(O,{color:"#ff0",weight:1,fill:!0,fillColor:"#ff0",fillOpacity:.39,opacity:1,interactive:!1,pane:s.hoverHighlightPane}).addTo(s.map);let ct=0,Lt=$>0?$*3:1/0;At=setInterval(()=>{if(ct+=1,ct>=Lt){Yt();return}let Xt=ct%3+1;It.setStyle({weight:Xt,fillOpacity:Xt===1?.39:0})},B)}s.clearSelectionPulse=function(){Ct&&(s.map.removeLayer(Ct),Ct=null)};function ye(C,$,B){let Y=document.createElement("div");Y.className="inspector-group";let P=document.createElement("div");P.className="inspector-group-header";let J=document.createElement("span");J.className="vis-arrow";let A=document.createElement("span");if(A.className="inspector-prop-name",A.textContent=C,A.title=C,P.appendChild(J),P.appendChild(A),$!==null){let ct=document.createElement("span");ct.className="inspector-count",ct.textContent=`(${$})`,P.appendChild(ct)}Y.appendChild(P);let O=document.createElement("div");return O.className="inspector-group-children"+(B?" collapsed":""),J.textContent=B?"\u25B6":"\u25BC",Y.appendChild(O),P.addEventListener("click",()=>{O.classList.toggle("collapsed"),J.textContent=O.classList.contains("collapsed")?"\u25B6":"\u25BC"}),{group:Y,header:P,arrow:J,body:O}}function at(C){let $=C.column_headers||[],B=C.row_headers||[],Y=C.data||[],P=$.some(ct=>ct!==""),J=B.some(ct=>ct!==""),A=document.createElement("table");if(A.className="inspector-table",P){let ct=document.createElement("thead"),Lt=document.createElement("tr");J&&Lt.appendChild(document.createElement("th"));for(let Xt of $){let Ot=document.createElement("th");Ot.textContent=Xt,Lt.appendChild(Ot)}ct.appendChild(Lt),A.appendChild(ct)}let O=document.createElement("tbody");return Y.forEach((ct,Lt)=>{let Xt=document.createElement("tr");if(J){let Ot=document.createElement("th");Ot.textContent=B[Lt]||"",Xt.appendChild(Ot)}for(let Ot of ct){let jt=document.createElement("td");jt.textContent=Ot,Xt.appendChild(jt)}O.appendChild(Xt)}),A.appendChild(O),A}function kt(C,$){if(C.table){let A=(C.table.data||[]).length,{group:O,body:ct}=ye(C.name,A,A>=10),Lt=document.createElement("div");return Lt.className="inspector-table-scroll",Lt.appendChild(at(C.table)),ct.appendChild(Lt),O}if(C.children){let A=C.children.length<10,{group:O,body:ct}=ye(C.name,C.children.length,!A);for(let Lt of C.children)ct.appendChild(kt(Lt,$));return O}let B=document.createElement("div");B.className="inspector-prop";let Y=document.createElement("span");Y.className="inspector-prop-name",Y.textContent=C.name||"",Y.title=C.name||"";let P=document.createElement("span");P.className="inspector-prop-value",P.textContent=C.value||"",B.appendChild(Y),B.appendChild(P);let J=C.editable&&$&&($.onPropertyEdit||$.onPropertyChange)&&C.editor&&(C.editor.type==="list"||C.editor.type==="bool");if(J&&C.value_select_id===void 0)B.replaceChild(_(C,$),P);else if(J){let A=document.createElement("button");A.className="inspector-edit-btn",A.title="Edit "+C.name,A.textContent="\u270E",A.addEventListener("click",O=>{O.stopPropagation();let ct=_(C,$);B.replaceChild(ct,P),A.remove(),ct.focus()}),B.appendChild(A)}else C.editable&&$&&($.onPropertyChange||$.onPropertyEdit)&&(P.contentEditable=!0,P.classList.add("inspector-editable"),P.addEventListener("blur",()=>{let A=P.textContent;if(A!==C.value){if($.onPropertyChange){$.onPropertyChange(C.name,A);return}if(C.editor&&C.editor.type==="number"){let O=Number(A);if(A.trim()===""||Number.isNaN(O)){Ce("Not a number: "+A),P.textContent=C.value;return}$.onPropertyEdit(C,{value:O});return}$.onPropertyEdit(C,{value:A})}}),P.addEventListener("keydown",A=>{A.key==="Enter"&&(A.preventDefault(),P.blur()),A.key==="Escape"&&(P.textContent=C.value,P.blur())}));return C.name_select_id!==void 0&&C.value_select_id===void 0?(gt(B,C.name_select_id),Y.classList.add("inspector-link")):C.name_select_id!==void 0&>(Y,C.name_select_id),C.value_select_id!==void 0&>(P,C.value_select_id),B}let zt=140,Wt=60,Pt=500,yt=zt;function ft(){s.inspectorEl&&s.inspectorEl.style.setProperty("--inspector-name-w",yt+"px")}function le(){let C=document.createElement("div");return C.className="inspector-col-resizer",C.title="Drag to resize the name column",C.addEventListener("mousedown",$=>{$.preventDefault();let B=$.clientX,Y=yt;C.classList.add("dragging");let P=A=>{yt=Math.max(Wt,Math.min(Pt,Y+A.clientX-B)),ft()},J=()=>{C.classList.remove("dragging"),document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",J)};document.addEventListener("mousemove",P),document.addEventListener("mouseup",J)}),C}function ie(C){if(!C||!s.map||!s.designScale)return;let[$,B,Y,P]=C;s.map.fitBounds(Ut($,B,Y,P,s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY),{padding:[20,20]})}function Ft(C){if(!s.inspectorEl)return;if(o=C,s.inspectorEl.innerHTML="",!C||!C.properties||C.properties.length===0){Yt();let P=document.createElement("div");P.className="stub-panel",P.innerHTML='
Inspector
Select an object in the layout to inspect its properties.
',s.inspectorEl.appendChild(P);return}if(!C.onPropertyChange&&!C.onPropertyEdit&&!wt(s)&&(C.onPropertyEdit=(P,J)=>f(P.name,J)),C){let P=document.createElement("div");P.className="inspector-toolbar";let J=document.createElement("button");if(J.className="or-btn or-btn-icon",J.title="Back",J.innerHTML=rd,J.disabled=!C.can_navigate_back,J.addEventListener("click",()=>nt()),P.appendChild(J),C.bbox){let A=document.createElement("button");A.className="or-btn or-btn-icon",A.title="Zoom to",A.innerHTML=od,A.addEventListener("click",()=>ie(C.bbox)),P.appendChild(A)}if(C.type==="Net"&&C.name){let A=s.focusNets.has(C.name),O=document.createElement("button");O.className="or-btn or-btn-icon",O.title=A?"De-focus net":"Focus net",O.innerHTML=A?ld:ad,O.addEventListener("click",()=>S(C.name)),P.appendChild(O)}if(C.type==="Net"&&C.name&&C.has_guides){let A=s.routeGuideNets.has(C.name),O=document.createElement("button");O.className="or-btn or-btn-icon",O.title=A?"Hide route guides":"Show route guides",O.innerHTML=A?hd:cd,O.addEventListener("click",()=>I(C.name)),P.appendChild(O)}if(C.type==="Net"&&C.name&&s.showInsertBufferDialog){let A=document.createElement("button");A.className="or-btn or-btn-icon",A.title="Insert buffer",A.innerHTML=fd,A.addEventListener("click",()=>s.showInsertBufferDialog(C.name)),P.appendChild(A)}if(s.focusNets.size>0){let A=document.createElement("button");A.className="or-btn or-btn-icon",A.title="Clear focus nets",A.innerHTML=dd,A.addEventListener("click",()=>R()),P.appendChild(A)}if(typeof C.highlight_group=="number"&&!wt(s)&&(s.techData?.highlight_colors||[]).length){let A=document.createElement("button");A.className="or-btn or-btn-icon inspector-highlight-btn";let O=C.highlight_group;if(A.title=O>=0?"Highlight group "+(O+1):"Add to highlight group",A.innerHTML=sd,O>=0){let ct=s.techData.highlight_colors[O];A.style.backgroundColor=`rgba(${ct[0]}, ${ct[1]}, ${ct[2]}, 0.45)`,A.style.borderColor=`rgb(${ct[0]}, ${ct[1]}, ${ct[2]})`}A.addEventListener("click",()=>w(A,C)),P.appendChild(A)}if(Array.isArray(C.actions)&&!wt(s))for(let A of C.actions){let O=document.createElement("button");O.className="or-btn inspector-action-btn",O.title=A,A==="Delete"?(O.classList.add("or-btn-icon","or-btn-danger-hover"),O.innerHTML=nd):(O.classList.add("or-btn-sm"),O.textContent=A),O.addEventListener("click",()=>y(A,C)),P.appendChild(O)}s.inspectorEl.appendChild(P)}let $=C.selection_count||0,B=typeof C.selection_index=="number"?C.selection_index:-1;if($>1&&B>=0){let P=document.createElement("div");P.className="inspector-selection-nav";let J=document.createElement("button");J.className="or-btn or-btn-icon",J.title="Previous (Shift+click to multi-select)",J.innerHTML=ud,J.addEventListener("click",()=>it(-1));let A=document.createElement("span");A.className="inspector-selection-label",A.textContent=B+1+" / "+$;let O=document.createElement("button");O.className="or-btn or-btn-icon",O.title="Next",O.innerHTML=pd,O.addEventListener("click",()=>it(1)),P.appendChild(J),P.appendChild(A),P.appendChild(O),s.inspectorEl.appendChild(P)}let Y=document.createElement("div");Y.className="inspector-rows";for(let P of C.properties)Y.appendChild(kt(P,C));Y.appendChild(le()),s.inspectorEl.appendChild(Y),ft()}function ee(C){let $=document.createElement("div");$.className="inspector",s.inspectorEl=$,C.element.appendChild($),Ft(null)}function fe(){if(o){if(o.type==="Ruler"){s.rulerManager&&s.rulerManager._selectedRulerId!==null&&s.rulerManager._selectRuler(s.rulerManager._selectedRulerId);return}s.websocketManager&&Q(-1)}}return{createInspector:ee,updateInspector:Ft,highlightBBox:tt,pulseHighlight:Mt,animateSelection:rt,stopSelectionAnimation:Yt,navigateInspector:Q,refreshInspector:fe}}var us=class{constructor(e,i,o){this._app=i,this._refreshOverlay=o||(()=>{}),this._data={selection:[],groups:[],truncated:!1},this._tab="selected",this._filter="",this._sortKey=null,this._sortAsc=!0,this._pendingRefresh=null,this._inFlight=!1,this._staleWhileInFlight=!1,this._visible=!0,this._el=document.createElement("div"),this._el.className="selection-browser",e.element.appendChild(this._el),e.on?.("show",()=>{this._visible=!0,this.refresh()}),e.on?.("hide",()=>{this._visible=!1}),e.on?.("destroy",()=>{this._visible=!1,this._staleWhileInFlight=!1,this._pendingRefresh!==null&&(clearTimeout(this._pendingRefresh),this._pendingRefresh=null)}),this._render(),this.refresh()}scheduleRefresh(){!this._visible||this._pendingRefresh!==null||(this._pendingRefresh=setTimeout(()=>{this._pendingRefresh=null,this.refresh()},150))}refresh(){if(!this._visible||wt(this._app))return;if(this._inFlight){this._staleWhileInFlight=!0;return}this._inFlight=!0;let e=()=>{this._inFlight=!1,this._staleWhileInFlight&&(this._staleWhileInFlight=!1,this.refresh())};this._app.websocketManager.request({type:"list_selection"}).then(i=>{i.ok&&(this._data=i,this._render()),e()}).catch(e)}_entries(){let e;this._tab==="selected"?e=(this._data.selection||[]).map((o,r)=>({row:o,index:r,group:-1})):e=(this._data.groups||[]).flatMap((o,r)=>o.map((l,h)=>({row:l,index:h,group:r})));let i=this._filter.trim().toLowerCase();if(i&&(e=e.filter(({row:o})=>(o.name||"").toLowerCase().includes(i)||(o.type||"").toLowerCase().includes(i))),this._sortKey){let o=this._sortKey,r=this._sortAsc?1:-1;e=e.slice().sort((l,h)=>r*String(l.row[o]||"").localeCompare(String(h.row[o]||"")))}return e}_fmtCoord(e){if(this._app.showDbu)return String(e);let i=this._app.getDbuPerMicron?this._app.getDbuPerMicron():1e3;return(e/i).toFixed(3)}_fmtBounds(e){if(!e)return"";let[i,o,r,l]=e;return`(${this._fmtCoord(i)}, ${this._fmtCoord(o)}), (${this._fmtCoord(r)}, ${this._fmtCoord(l)})`}_inspectRow(e,i){let o=e.group<0?{type:"inspect_selection",index:e.index,use_dbu:this._app.showDbu}:{type:"inspect_group",group:e.group,index:e.index,use_dbu:this._app.showDbu};this._app.websocketManager.request(o).then(r=>{if(!r.ok){this.refresh();return}this._app.updateInspector&&this._app.updateInspector(r),i&&this._app.focusComponent&&this._app.focusComponent("Inspector"),this._refreshOverlay()}).catch(()=>{})}_deselectRow(e){this._app.websocketManager.request({type:"deselect",index:e.index}).then(()=>{this.refresh(),this._refreshOverlay()}).catch(()=>{})}_clearHighlights(){this._app.websocketManager.request({type:"clear_highlights",group:-1}).then(()=>{this.refresh(),this._refreshOverlay(),this._app.refreshInspector&&this._app.refreshInspector()}).catch(()=>{})}_zoomToBBox(e){if(!e||!this._app.designScale||!this._app.map)return;let[i,o,r,l]=e,h=this._app.getDbuPerMicron?this._app.getDbuPerMicron():1e3,u=Math.min(10*h,2*Math.max(r-i,l-o));this._app.map.fitBounds(Ut(i-u,o-u,r+u,l+u,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY))}_render(){this._app.stopSelectionAnimation&&this._app.stopSelectionAnimation(),this._el.innerHTML="";let e=(this._data.selection||[]).length,i=(this._data.groups||[]).reduce((h,u)=>h+u.length,0),o=document.createElement("div");o.className="sb-tabs";for(let[h,u,f]of[["selected","Selected",e],["highlighted","Highlighted",i]]){let _=document.createElement("button");_.className="sb-tab"+(this._tab===h?" active":""),_.textContent=`${u} (${f})`,_.addEventListener("click",()=>{this._tab=h,this._render()}),o.appendChild(_)}let r=document.createElement("button");if(r.className="or-btn or-btn-sm sb-tool",r.title="Refresh",r.textContent="\u27F3",r.addEventListener("click",()=>this.refresh()),o.appendChild(r),this._tab==="highlighted"&&i>0){let h=document.createElement("button");h.className="or-btn or-btn-sm sb-tool",h.title="Clear all highlights",h.textContent="Clear",h.addEventListener("click",()=>this._clearHighlights()),o.appendChild(h)}this._el.appendChild(o);let l=document.createElement("input");if(l.type="text",l.className="sb-filter",l.placeholder="Filter by name or type\u2026",l.value=this._filter,l.addEventListener("input",()=>{this._filter=l.value,this._renderTable()}),this._el.appendChild(l),this._data.truncated){let h=document.createElement("div");h.className="sb-truncated",h.textContent="List truncated \u2014 showing the first 1000 entries per set.",this._el.appendChild(h)}this._tableWrap=document.createElement("div"),this._tableWrap.className="sb-table-wrap",this._el.appendChild(this._tableWrap),this._renderTable()}_renderTable(){this._tableWrap.innerHTML="";let e=this._entries();if(!e.length){let f=document.createElement("div");f.className="sb-empty",f.textContent=this._tab==="selected"?"Nothing selected.":"Nothing highlighted.",this._tableWrap.appendChild(f);return}let i=document.createElement("table");i.className="sb-table";let o=document.createElement("thead"),r=document.createElement("tr"),l=[["name","Object"],["type","Type"],[null,"Bounds"]];this._tab==="highlighted"&&l.push([null,"Group"]),l.push([null,""]);for(let[f,_]of l){let y=document.createElement("th");y.textContent=_,f&&(y.classList.add("sb-sortable"),this._sortKey===f&&(y.textContent+=this._sortAsc?" \u25B2":" \u25BC"),y.addEventListener("click",()=>{this._sortKey===f?this._sortAsc=!this._sortAsc:(this._sortKey=f,this._sortAsc=!0),this._renderTable()})),r.appendChild(y)}o.appendChild(r),i.appendChild(o);let h=document.createElement("tbody"),u=this._app.techData?.highlight_colors||[];for(let f of e){let _=document.createElement("tr");_.className="sb-row";let y=document.createElement("td");y.textContent=f.row.name||"";let g=document.createElement("td");g.textContent=f.row.type||"";let b=document.createElement("td");if(b.textContent=this._fmtBounds(f.row.bbox),_.appendChild(y),_.appendChild(g),_.appendChild(b),this._tab==="highlighted"){let v=document.createElement("td"),S=document.createElement("span");S.className="sb-chip";let R=u[f.group];R&&(S.style.backgroundColor=`rgb(${R[0]}, ${R[1]}, ${R[2]})`),v.appendChild(S),v.appendChild(document.createTextNode(` Group ${f.group+1}`)),_.appendChild(v)}let w=document.createElement("td");if(w.className="sb-actions",f.row.bbox){let v=document.createElement("button");v.className="sb-row-btn",v.title="Zoom to",v.textContent="\u2316",v.addEventListener("click",S=>{S.stopPropagation(),this._zoomToBBox(f.row.bbox)}),w.appendChild(v)}if(this._tab==="selected"){let v=document.createElement("button");v.className="sb-row-btn",v.title="De-select",v.textContent="\u2715",v.addEventListener("click",S=>{S.stopPropagation(),this._deselectRow(f)}),w.appendChild(v)}_.appendChild(w),_.addEventListener("click",()=>this._inspectRow(f,!1)),_.addEventListener("dblclick",()=>this._inspectRow(f,!0)),f.row.bbox&&(_.addEventListener("mouseenter",()=>{this._app.animateSelection&&this._app.animateSelection(f.row.bbox,{repeats:0})}),_.addEventListener("mouseleave",()=>{this._app.stopSelectionAnimation&&this._app.stopSelectionAnimation()})),h.appendChild(_)}i.appendChild(h),this._tableWrap.appendChild(i),fi(i)}};var fl="options-dialog",pl=[{label:"System default",value:""},{label:"Sans-serif",value:"sans-serif"},{label:"Serif",value:"serif"},{label:"Monospace",value:"monospace"},{label:"Helvetica / Arial",value:"Helvetica, Arial, sans-serif"},{label:"Georgia",value:"Georgia, 'Times New Roman', serif"},{label:"Courier",value:"'Courier New', Courier, monospace"}],md=100,ps=70,fs=200;function wn(s){let e=s===""||s===null?NaN:Math.round(Number(s));return Number.isFinite(e)?Math.min(fs,Math.max(ps,e)):md}function ml(s){let{overlay:e,close:i,okBtn:o,showError:r}=qi("Arrow keys scroll step",` +`)}var xs=class{constructor(e,i){this._app=e,this._redrawAllLayers=i,this._currentTab="setup",this._histogramData=null,this._bars=[],this._yMax=0,this._yTicks=[],this._chartArea=null,this._hoveredBar=null,this._debugCharts=[],this._activeDebugChart=-1,this._build()}_build(){let e=document.createElement("div");e.className="charts-widget";let i=document.createElement("div");i.className="charts-toolbar",this._updateBtn=document.createElement("button"),this._updateBtn.className="or-btn",this._updateBtn.textContent="Update",wt(this._app)&&(this._updateBtn.style.display="none"),this._chartSelect=document.createElement("select"),this._chartSelect.className="charts-select",this._csvBtn=document.createElement("button"),this._csvBtn.className="or-btn",this._csvBtn.textContent="CSV",this._csvBtn.title="Export the current chart data as CSV",this._pngBtn=document.createElement("button"),this._pngBtn.className="or-btn",this._pngBtn.textContent="PNG",this._pngBtn.title="Export the current chart as a PNG image",this._statusLabel=document.createElement("span"),this._statusLabel.className="timing-path-count",i.appendChild(this._updateBtn),i.appendChild(this._chartSelect),i.appendChild(this._csvBtn),i.appendChild(this._pngBtn),i.appendChild(this._statusLabel),e.appendChild(i);let o=document.createElement("div");o.className="charts-toolbar";let r=document.createElement("span");r.textContent="Path Groups:",r.style.color="var(--fg-muted)",r.style.fontSize="var(--fs-12)",this._pathGroupSelect=document.createElement("select"),this._pathGroupSelect.className="charts-select",this._pathGroupSelect.multiple=!0,this._pathGroupSelect.size=1,this._pathGroupSelect.title="Select 0 = all, or \u22651 to stack by group";let l=document.createElement("span");l.textContent="Clock:",l.style.color="var(--fg-muted)",l.style.fontSize="var(--fs-12)",this._clockSelect=document.createElement("select"),this._clockSelect.className="charts-select",this._clockSelect.innerHTML='',o.appendChild(r),o.appendChild(this._pathGroupSelect),o.appendChild(l),o.appendChild(this._clockSelect),e.appendChild(o),this._canvas=document.createElement("canvas"),this._canvas.className="charts-canvas",e.appendChild(this._canvas),this._tooltip=document.createElement("div"),this._tooltip.className="or-tooltip",this._tooltip.style.display="none",e.appendChild(this._tooltip),this._filterRow=o,this.element=e,this._ctx=this._canvas.getContext("2d"),this._rebuildSelect(),this._bindEvents(),wt(this._app)&&setTimeout(()=>this.update(),0)}_bindEvents(){this._updateBtn.addEventListener("click",()=>this.update()),this._chartSelect.addEventListener("change",()=>this._onSelectChange()),this._csvBtn.addEventListener("click",()=>this._exportCsv()),this._pngBtn.addEventListener("click",()=>this._exportPng()),this._pathGroupSelect.addEventListener("change",()=>this._fetchHistogram()),this._clockSelect.addEventListener("change",()=>this._fetchHistogram()),this._canvas.addEventListener("mousemove",i=>this._handleHover(i)),this._canvas.addEventListener("mouseleave",()=>{this._hoveredBar=null,this._tooltip.style.display="none",this._syncView()}),this._canvas.addEventListener("click",i=>this._handleClick(i)),this._canvas.addEventListener("dblclick",i=>this._handleDblClick(i)),new ResizeObserver(()=>this._syncView()).observe(this._canvas)}_sizeCanvas(){let e=this._canvas.getBoundingClientRect(),i=window.devicePixelRatio||1;this._canvas.width=e.width*i,this._canvas.height=e.height*i,this._ctx.setTransform(i,0,0,i,0,0)}_rebuildSelect(){let e=this._chartSelect;e.innerHTML="";for(let i of fd){let o=document.createElement("option");o.value=i.value,o.textContent=i.label,e.appendChild(o)}this._debugCharts.forEach((i,o)=>{let r=document.createElement("option");r.value="gen:"+o,r.textContent=i.name||"Chart "+o,e.appendChild(r)}),e.value=this._activeDebugChart>=0?"gen:"+this._activeDebugChart:this._currentTab}_onSelectChange(){let e=this._chartSelect.value;e.startsWith("gen:")?(this._activeDebugChart=parseInt(e.slice(4),10)||0,this._hoveredBar=null,this._tooltip.style.display="none",this._syncView()):this._selectTab(e)}async update(){this._updateBtn.disabled=!0,this._updateBtn.textContent="Loading...",this._statusLabel.textContent="";try{this._activeDebugChart<0?((this._currentTab==="setup"||this._currentTab==="hold")&&await this._fetchFilters(),await Promise.all([this._fetchHistogram(),this._fetchGenericCharts()])):await this._fetchGenericCharts()}catch(e){this._statusLabel.textContent="Error: "+e.message}this._updateBtn.disabled=!1,this._updateBtn.textContent="Update"}async _fetchFilters(){let e=await this._app.websocketManager.request({type:"chart_filters"});this._populatePathGroups(e.path_groups||[]),this._populateClocks(e.clocks||[])}_populatePathGroups(e){let i=new Set(Array.from(this._pathGroupSelect.selectedOptions,o=>o.value));this._pathGroupSelect.innerHTML="";for(let o of e){let r=document.createElement("option");r.value=o,r.textContent=o,r.selected=i.has(o),this._pathGroupSelect.appendChild(r)}}_populateClocks(e){let i=this._clockSelect.value;this._clockSelect.innerHTML='';for(let o of e){let r=document.createElement("option");r.value=o,r.textContent=o,this._clockSelect.appendChild(r)}e.includes(i)&&(this._clockSelect.value=i)}async _fetchGenericCharts(){try{let e=await this._app.websocketManager.request({type:"debug_charts"});this.setDebugCharts(e.charts||[])}catch{}}async _fetchHistogram(){try{let e=this._currentTab,i;if(e==="fanout")i={type:"fanout_histogram"};else if(e==="netlength")i={type:"net_length_histogram",use_dbu:!!this._app.showDbu};else{i={type:"slack_histogram",is_setup:e==="setup"};let r=Array.from(this._pathGroupSelect.selectedOptions,l=>l.value).filter(Boolean);r.length>0&&(i.path_groups=r),this._clockSelect.value&&(i.clock_name=this._clockSelect.value)}let o=await this._app.websocketManager.request(i);if(this._currentTab!==e)return;if(this._histogramData=o,this._syncView(),e==="fanout"||e==="netlength"){let r=o.total_nets||0;this._statusLabel.textContent=`${r} nets`}else{let r=o.total_endpoints||0,l=o.unconstrained_count||0,h=r-l;this._statusLabel.textContent=`${h} endpoints`+(l>0?`, ${l} unconstrained`:"")}}catch(e){this._statusLabel.textContent="Error: "+e.message}}_selectTab(e){this._currentTab===e&&this._activeDebugChart<0||(this._currentTab=e,this._activeDebugChart=-1,this._chartSelect&&(this._chartSelect.value=e),this._filterRow.style.display=e==="setup"||e==="hold"?"":"none",this._hoveredBar=null,this._tooltip.style.display="none",this.update())}_computeLayout(){if(!this._histogramData)return;let e=this._canvas.getBoundingClientRect(),i=gd(this._histogramData,e.width,e.height,{logY:this._currentTab==="fanout"});this._bars=i.bars,this._yMax=i.yMax,this._yTicks=i.yTicks,this._chartArea=i.chartArea,this._logY=!!i.logY}render(){this._syncView()}_stackedSeries(){let e=this._histogramData?.series;return Array.isArray(e)&&e.length>1?e:null}_render(){let e=this._canvas.getBoundingClientRect(),i=e.width,o=e.height,r=this._ctx,l=bi();if(r.clearRect(0,0,i,o),r.fillStyle=l.canvasBg,r.fillRect(0,0,i,o),!this._bars||this._bars.length===0){r.fillStyle=l.canvasText,r.font="14px "+l.fontSans,r.textAlign="center",r.textBaseline="middle";let h=wt(this._app)?"No histogram data available":'Click "Update" to load histogram';r.fillText(h,i/2,o/2);return}this._drawAxes(r,l),this._drawBars(r),this._drawTitle(r,i,l),this._stackedSeries()&&this._drawSeriesLegend(r,l)}_drawAxes(e,i){let o=this._chartArea;if(!o)return;e.strokeStyle=i.canvasAxis,e.lineWidth=1,e.beginPath(),e.moveTo(o.left,o.top),e.lineTo(o.left,o.bottom),e.stroke(),e.beginPath(),e.moveTo(o.left,o.bottom),e.lineTo(o.right,o.bottom),e.stroke(),e.fillStyle=i.canvasLabel,e.font="11px "+i.fontMono,e.textAlign="right",e.textBaseline="middle";let r=o.bottom-o.top;for(let v of this._yTicks){let w=this._logY?Math.log10(v+1)/Math.log10(this._yMax+1):v/this._yMax,b=o.bottom-w*r;e.fillText(this._formatCount(v),o.left-6,b),v>0&&(e.strokeStyle=i.canvasGrid,e.beginPath(),e.moveTo(o.left,b),e.lineTo(o.right,b),e.stroke(),e.strokeStyle=i.canvasAxis)}let l=this._currentTab,h=l==="fanout"||l==="netlength";e.save(),e.translate(14,(o.top+o.bottom)/2),e.rotate(-Math.PI/2),e.textAlign="center",e.textBaseline="middle",e.fillStyle=i.canvasTitle,e.font="11px "+i.fontMono,e.fillText(this._logY?"Nets (log)":h?"Nets":"Endpoints",0,0),e.restore(),e.textAlign="center",e.textBaseline="top",e.fillStyle=i.canvasLabel,e.font="10px "+i.fontMono;let u=this._histogramData.bins,f=this._histogramData.time_unit||this._histogramData.length_unit||"",_=u.length>0?u[0].upper-u[0].lower:1,y=l==="fanout"?0:Math.max(0,-Math.floor(Math.log10(_)));for(let v=0;v<=this._bars.length;v++){let w=v=0){this._hoveredBar=null,this._tooltip.style.display="none";return}let i=this._hitTestBar(e);if(i!==this._hoveredBar&&(this._hoveredBar=i,this._render()),i){let o=this._currentTab,r=i.upper-i.lower;if(o==="fanout"){let v=i.upper-1,w=i.lower===v?`${i.lower}`:`[${i.lower}, ${v}]`;this._tooltip.textContent=`Nets: ${i.count} +Fanout: ${w}`}else if(o==="netlength"){let v=this._histogramData?.length_unit||"",w=Math.max(0,-Math.floor(Math.log10(r)));this._tooltip.textContent=`Nets: ${i.count} +Length: [${i.lower.toFixed(w)}, ${i.upper.toFixed(w)}) ${v}`}else{let v=this._histogramData?.time_unit||"",w=Math.max(0,-Math.floor(Math.log10(r)));this._tooltip.textContent=`Endpoints: ${i.count} +Slack: [${i.lower.toFixed(w)}, ${i.upper.toFixed(w)}) ${v}`}this._tooltip.style.display="block";let l=this.element.getBoundingClientRect(),h=this._tooltip.getBoundingClientRect(),u=4,f=e.clientX-l.left,_=e.clientY-l.top,y=f+12;y+h.width>l.width-u&&(y=f-12-h.width),y=Math.max(u,y);let g=_-10;g=Math.min(l.height-h.height-u,Math.max(u,g)),this._tooltip.style.left=y+"px",this._tooltip.style.top=g+"px"}else this._tooltip.style.display="none"}async _handleClick(e){if(this._activeDebugChart>=0||this._currentTab==="fanout"||this._currentTab==="netlength")return;let i=this._hitTestBar(e);if(!(!i||i.count===0))try{let o=await this._app.websocketManager.request({type:"timing_report",is_setup:this._currentTab==="setup",max_paths:50,slack_min:i.lower,slack_max:i.upper});this._app.timingWidget&&(this._app.timingWidget.showPaths(this._currentTab,o.paths||[]),this._app.focusComponent&&this._app.focusComponent("TimingWidget"))}catch(o){console.error("Charts bar click error:",o)}}async _handleDblClick(e){if(this._activeDebugChart>=0)return;let i;if(this._currentTab==="fanout")i="select_fanout_bin";else if(this._currentTab==="netlength")i="select_net_length_bin";else return;let o=this._hitTestBar(e);if(!o||o.count===0)return;let r=ae(this._app);try{let l=await this._app.websocketManager.request({type:i,lower:o.lower,upper:o.upper,use_dbu:this._app.showDbu});if(!he(this._app,r))return;l&&l.truncated&&console.warn(`Bin has ${l.count} nets; selection capped at ${l.selection_limit} for performance.`),this._app.updateInspector&&this._app.updateInspector(l),this._app.focusComponent&&this._app.focusComponent("Inspector"),this._redrawAllLayers&&this._redrawAllLayers()}catch(l){console.error("Net bin select failed:",l)}}_activeChartData(){return this._activeDebugChart>=0?{kind:"generic",data:this._debugCharts[this._activeDebugChart]}:{kind:"histogram",data:this._histogramData}}_chartBaseName(){return this._activeDebugChart>=0?this._debugCharts[this._activeDebugChart].name||"chart":this._currentTab}_triggerDownload(e,i,{revoke:o=!1}={}){let r=document.createElement("a");r.href=i,r.download=e,document.body.appendChild(r),r.click(),r.remove(),o&&URL.revokeObjectURL(i)}_download(e,i,o){try{let r=URL.createObjectURL(new Blob([o],{type:i}));this._triggerDownload(e,r,{revoke:!0})}catch(r){console.error("Download failed:",r)}}_exportCsv(){let{kind:e,data:i}=this._activeChartData();if(!i)return;let o=bd(e,i);this._download(this._chartBaseName()+".csv","text/csv",o)}_exportPng(){try{let e=this._canvas.toDataURL("image/png");this._triggerDownload(this._chartBaseName()+".png",e)}catch(e){console.error("PNG export failed:",e)}}setDebugCharts(e){this._debugCharts=e,e.length===0?this._activeDebugChart=-1:this._activeDebugChart>=e.length&&(this._activeDebugChart=0),this._rebuildSelect(),this._syncView()}_syncView(){let e=this._activeDebugChart>=0;e&&(this._hoveredBar=null,this._tooltip.style.display="none");let i=!e&&(this._currentTab==="setup"||this._currentTab==="hold");this._filterRow&&(this._filterRow.style.display=i?"":"none"),this._sizeCanvas(),e?this._renderLineChart(this._debugCharts[this._activeDebugChart]):(this._computeLayout(),this._render())}_renderLineChart(e){let i=this._canvas.getBoundingClientRect(),o=i.width,r=i.height,l=this._ctx,h=bi();l.clearRect(0,0,o,r),l.fillStyle=h.canvasBg,l.fillRect(0,0,o,r);let u=e.points;if(!u||u.length===0){l.fillStyle=h.canvasText,l.font="14px "+h.fontSans,l.textAlign="center",l.textBaseline="middle",l.fillText("No data points yet",o/2,r/2);return}let f=e.y_labels?e.y_labels.length:1,_=Ll,y=o-Sl,g=Ml,v=r-El,w=y-_,b=v-g;if(w<=0||b<=0)return;let C=u[0].x,B=u[0].x,P=1/0,T=-1/0;for(let it of u){it.xB&&(B=it.x);for(let Q of it.ys)QT&&(T=Q)}C===B&&(B=C+1),(!isFinite(P)||!isFinite(T))&&(P=0,T=1);let Z=(T-P)*.05||1;P-=Z,T+=Z;let G=it=>_+(it-C)/(B-C)*w,dt=it=>v-(it-P)/(T-P)*b;l.strokeStyle=h.canvasAxis,l.lineWidth=1,l.beginPath(),l.moveTo(_,g),l.lineTo(_,v),l.lineTo(y,v),l.stroke(),l.fillStyle=h.canvasLabel,l.font="10px "+h.fontMono,l.textAlign="right",l.textBaseline="middle";let gt=5;for(let it=0;it<=gt;it++){let Q=P+(T-P)*it/gt,nt=dt(Q);l.fillText(this._formatNum(Q),_-4,nt),it>0&&it1&&e.y_labels){l.font="10px "+h.fontMono,l.textAlign="left",l.textBaseline="top";let it=_+8,Q=g+4;for(let nt=0;nt=1e6?(e/1e6).toFixed(1)+"M":i>=1e3?(e/1e3).toFixed(1)+"k":i>=1?e.toFixed(1):e.toPrecision(3)}_formatCount(e){return e===0?"0":e>=1e6?e/1e6+"M":e>=1e3?e/1e3+"k":String(e)}};var Le=class{constructor(e){this.onChange=e,this.roots=[],this._nodeMap=new Map}addFromSpec(e,i=null){let o=this._makeNode(e.id,i,e);if(o.checked=e.checked!==!1,e.children){for(let r of e.children)o.children.push(this.addFromSpec(r,o));o.hasCheckbox&&this._computeParent(o)}return i||this.roots.push(o),o}buildFromNodes(e){this._nodeMap.clear(),this.roots=[];for(let i of e)this._makeNode(i.id,null,i);for(let i of e){let o=this._nodeMap.get(i.id);if(i.parentId!=null&&this._nodeMap.has(i.parentId)){let r=this._nodeMap.get(i.parentId);o.parent=r,r.children.push(o)}else this.roots.push(o)}for(let i=e.length-1;i>=0;i--){let o=this._nodeMap.get(e[i].id);o.hasCheckbox&&o.children.length>0&&this._computeParent(o)}return this.roots}get(e){return this._nodeMap.get(e)}isVisible(e){let i=this.get(e);return i?i.checked:!1}check(e,i){let o=this._nodeMap.get(e);if(o){o.checked=i,o.indeterminate=!1;for(let r of o.children)this._setSubtree(r,i);for(let r=o.parent;r;r=r.parent)r.hasCheckbox&&this._computeParent(r);this.onChange()}}cascadeQuiet(e,i){let o=this._nodeMap.get(e);if(o){o.checked=i,o.indeterminate=!1;for(let r of o.children)this._setSubtree(r,i);for(let r=o.parent;r;r=r.parent)r.hasCheckbox&&this._computeParent(r)}}checkSet(e){for(let[i,o]of Object.entries(e)){let r=this._nodeMap.get(i);r&&(r.checked=o,r.indeterminate=!1)}this._recomputeAllParents(),this.onChange()}mirrorStates(e){this._applyMirror(e),this.onChange()}mirrorStatesQuiet(e){this._applyMirror(e)}_applyMirror(e){for(let[i,o]of Object.entries(e)){let r=this._nodeMap.get(i);r&&(r.checked=!!o.checked,r.indeterminate=!!o.indeterminate)}}forEach(e){let i=o=>{e(o);for(let r of o.children)i(r)};for(let o of this.roots)i(o)}_makeNode(e,i,o){let r={id:e,parent:i,children:[],hasCheckbox:o.hasCheckbox!==!1,checked:o.checked!==!1,indeterminate:!1,data:o.data!=null?o.data:o};return this._nodeMap.set(e,r),r}_checkboxDescendants(e){let i=[];for(let o of e.children)o.hasCheckbox?i.push(o):i.push(...this._checkboxDescendants(o));return i}_computeParent(e){let i=this._checkboxDescendants(e);if(i.length===0)return;let o=i.every(l=>l.checked&&!l.indeterminate),r=i.every(l=>!l.checked&&!l.indeterminate);e.checked=o,e.indeterminate=!o&&!r}_setSubtree(e,i){e.hasCheckbox&&(e.checked=i,e.indeterminate=!1);for(let o of e.children)this._setSubtree(o,i)}_recomputeAllParents(){let e=i=>{for(let o of i.children)e(o);i.hasCheckbox&&i.children.length>0&&this._computeParent(i)};for(let i of this.roots)e(i)}};var Tl=["Instance","Module","Instances","Macros","Modules","Area","Local Inst","Local Macros","Local Modules"],Ke={MODULE:0,LEAF_GROUP:1,TYPE_GROUP:2,INSTANCE:3,NAME_GROUP:4};function xi(s){return s===Ke.MODULE||s===Ke.NAME_GROUP}var Cs=class{constructor(e,i,o){this._app=i,this._redrawAllLayers=o,this._nodes=[],this._nameGrouped=!1,this._nameGroupsCapped=!1,this._rows=[],this._childrenMap=new Map,this._collapsed=new Set,this._moduleState=new Map,this._checkModel=null,this._build(e),i.hierarchyBrowser=this,wt(i)&&this.update()}_build(e){let i=document.createElement("div");i.className="hierarchy-widget";let o=document.createElement("div");o.className="timing-toolbar",this._updateBtn=document.createElement("button"),this._updateBtn.className="or-btn",this._updateBtn.textContent="Update",wt(this._app)&&(this._updateBtn.style.display="none"),this._statusLabel=document.createElement("span"),this._statusLabel.className="timing-path-count",o.appendChild(this._updateBtn),o.appendChild(this._statusLabel),i.appendChild(o),this._tableContainer=document.createElement("div"),this._tableContainer.className="hierarchy-table-container",this._table=document.createElement("table"),this._table.className="timing-table",this._tableContainer.appendChild(this._table),i.appendChild(this._tableContainer),e.element.appendChild(i),this._bindEvents()}_bindEvents(){this._updateBtn.addEventListener("click",()=>this.update())}async update(){this._updateBtn.disabled=!0,this._updateBtn.textContent="Loading...",this._statusLabel.textContent="";try{let e=await this._app.websocketManager.request({type:"module_hierarchy"});this._nodes=e.nodes||[],this._nameGrouped=!!e.name_grouped,this._nameGroupsCapped=!!e.name_groups_capped,this._buildTree(),this._readServerColors(),this._computeEffectiveColors(),this._render(),this._statusLabel.textContent=this._statusText(),await this._sendModuleColors()}catch(e){this._statusLabel.textContent="Error: "+e.message}this._updateBtn.disabled=!1,this._updateBtn.textContent="Update"}_statusText(){let e=this._nodes.filter(r=>xi(r.node_kind||0)).length;if(!this._nameGrouped)return e+" modules";let o=Math.max(0,e-1)+" groups from instance names \u2014 this design has no module hierarchy";return this._nameGroupsCapped&&(o+=" (truncated: too many groups)"),o}_buildTree(){this._childrenMap.clear(),this._collapsed.clear();for(let i of this._nodes)this._childrenMap.set(i.id,[]);for(let i of this._nodes)i.parent_id>=0&&this._childrenMap.has(i.parent_id)&&this._childrenMap.get(i.parent_id).push(i.id);this._nodeMap=new Map;for(let i of this._nodes)this._nodeMap.set(i.id,i);for(let i of this._nodes){let o=this._childrenMap.get(i.id);if(!o||o.length===0)continue;let r=i.node_kind||0;r===Ke.LEAF_GROUP||r===Ke.TYPE_GROUP?this._collapsed.add(i.id):xi(r)&&i.parent_id>=0&&this._collapsed.add(i.id)}this._rows=[];let e=this._nodes.filter(i=>i.parent_id<0);for(let i of e)this._dfs(i.id,0);this._checkModel=new Le(()=>{this._checkModel.forEach(i=>{if(!i.hasCheckbox)return;let o=this._moduleState.get(i.data.odb_id);o&&(o.visible=i.checked)}),this._sendModuleColors()}),this._checkModel.buildFromNodes(this._nodes.map(i=>({id:i.id,parentId:i.parent_id,hasCheckbox:xi(i.node_kind||0)&&i.odb_id!=null,checked:!0,data:i})))}_readServerColors(){this._moduleState.clear();for(let e of this._rows){let i=this._nodeMap.get(e.id);if(!i||!xi(i.node_kind||0)||i.odb_id==null)continue;let o=i.color||[128,128,128];this._moduleState.set(i.odb_id,{color:o,effectiveColor:o,visible:!0,nodeId:i.id})}}_computeEffectiveColors(){for(let e of this._rows){let i=this._nodeMap.get(e.id);if(!i||!xi(i.node_kind||0))continue;let o=this._moduleState.get(i.odb_id);if(!o)continue;let r=i.parent_id,l=null;for(;r>=0;){let h=this._nodeMap.get(r);if(!h)break;if(xi(h.node_kind||0)){let u=this._moduleState.get(h.odb_id);u&&this._collapsed.has(h.id)&&(l=u.effectiveColor)}r=h.parent_id}o.effectiveColor=l||o.color}}async _sendModuleColors(){let e=[];for(let[o,r]of this._moduleState){if(!r.visible)continue;let[l,h,u]=r.effectiveColor;e.push(`${o}:${l},${h},${u},100`)}let i=e.join(";");try{let o=await this._app.websocketManager.request({type:"set_module_colors",colors:i});console.log("set_module_colors:",o.count,"modules,",e.length,"sent")}catch(o){console.error("set_module_colors failed:",o)}this._redrawAllLayers()}_dfs(e,i){this._rows.push({id:e,depth:i});let o=this._childrenMap.get(e)||[];for(let r of o)this._dfs(r,i+1)}_render(){this._table.innerHTML="";let e=document.createElement("thead"),i=document.createElement("tr");for(let r of Tl){let l=document.createElement("th");l.textContent=r,i.appendChild(l)}e.appendChild(i),this._table.appendChild(e);let o=document.createElement("tbody");for(let r of this._rows){let l=this._nodeMap.get(r.id);if(!l||this._isHidden(l))continue;let h=document.createElement("tr"),u=l.node_kind||0,_=(this._childrenMap.get(r.id)||[]).length>0,y=this._collapsed.has(r.id);u===Ke.LEAF_GROUP||u===Ke.TYPE_GROUP?(h.style.fontStyle="italic",h.style.color="var(--fg-disabled)"):u===Ke.INSTANCE?h.style.color="var(--fg-secondary)":u===Ke.NAME_GROUP&&(h.classList.add("hierarchy-name-group"),h.title="Recovered from instance names \u2014 this design has no module hierarchy");let g=document.createElement("td");if(g.style.paddingLeft=8+r.depth*16+"px",g.style.whiteSpace="nowrap",xi(u)&&l.odb_id!=null){let b=this._moduleState.get(l.odb_id),C=this._checkModel?this._checkModel.get(l.id):null;if(b&&C){let B=document.createElement("input");B.type="checkbox",B.checked=C.checked,B.indeterminate=C.indeterminate,B.className="hierarchy-module-cb",C.cb=B,B.addEventListener("change",dt=>{dt.stopPropagation(),this._checkModel.check(l.id,B.checked),this._render()}),g.appendChild(B);let P=document.createElement("span");P.className="hierarchy-color-swatch";let[T,Z,G]=b.effectiveColor;P.style.backgroundColor=`rgb(${T},${Z},${G})`,g.appendChild(P)}}if(_){let b=document.createElement("span");b.className="hierarchy-arrow",b.textContent=y?"\u25B6":"\u25BC",b.addEventListener("click",C=>{C.stopPropagation(),this._toggleNode(r.id)}),g.appendChild(b)}else{let b=document.createElement("span");b.className="hierarchy-arrow",b.style.visibility="hidden",b.textContent="\u25B6",g.appendChild(b)}let v=document.createElement("span");v.textContent=l.inst_name,g.appendChild(v),h.appendChild(g);let w=[l.module_name,Yi(l.insts),Yi(l.macros),Yi(l.modules),this._fmtArea(l.area),Yi(l.local_insts),Yi(l.local_macros),Yi(l.local_modules)];for(let b of w){let C=document.createElement("td");C.textContent=b,C.style.textAlign="right",h.appendChild(C)}h.children[1].style.textAlign="left",o.appendChild(h)}if(this._rows.length===0){let r=document.createElement("tr"),l=document.createElement("td");l.colSpan=Tl.length,l.style.textAlign="center",l.style.color="var(--fg-secondary)",l.textContent=wt(this._app)?"No hierarchy data available":'Click "Update" to load hierarchy',r.appendChild(l),o.appendChild(r)}this._table.appendChild(o),_i(this._table)}_isHidden(e){let i=e.parent_id;for(;i>=0;){if(this._collapsed.has(i))return!0;let o=this._nodeMap.get(i);if(!o)break;i=o.parent_id}return!1}_toggleNode(e){this._collapsed.has(e)?this._collapsed.delete(e):this._collapsed.add(e),this._computeEffectiveColors(),this._render(),this._sendModuleColors()}_fmtArea(e){if(e==null)return"";if(this._app.showDbu){let i=this._app.getDbuPerMicron();return String(Math.round(e*i*i))}return e>=1e6?(e/1e6).toFixed(3)+" mm\xB2":e.toFixed(3)+" \u03BCm\xB2"}};function Yi(s){return s!=null?String(s):""}var wd='',xd='',Cd='',kd='',Ld='',Sd='',Md='',Ed='',Td='',Pd='',Ad='',Id='';function Pl(s,e,i){i=i||e;let o=null,r=null,l=null,h=!1,u=10;function f(k,$){return h?Promise.resolve():(h=!0,s.websocketManager.request({type:"set_property",name:k,use_dbu:s.showDbu,...$}).then(D=>{!D.ok&&D.error&&ke(D.error),Ft(D),D.ok&&D.bbox&&Mt(D.bbox)}).catch(D=>{console.error("set_property failed:",D),ke("Edit failed: "+D),o&&Ft(o)}).finally(()=>{h=!1}))}function _(k,$){let D=document.createElement("select");D.className="inspector-editor-select";let Y=k.editor.type==="bool"?["True","False"]:k.editor.options||[];for(let A of Y){let J=document.createElement("option");J.value=A,J.textContent=A,A===k.value&&(J.selected=!0),D.appendChild(J)}if(!Y.includes(k.value)){let A=document.createElement("option");A.value=k.value||"",A.textContent=k.value||"",A.selected=!0,A.disabled=!0,D.insertBefore(A,D.firstChild)}return D.addEventListener("change",()=>{if($.onPropertyChange){$.onPropertyChange(k.name,D.value);return}if(k.editor.type==="bool")$.onPropertyEdit(k,{value:D.value==="True"});else{let A=(k.editor.options||[]).indexOf(D.value);$.onPropertyEdit(k,{option_index:A,option_name:D.value})}}),D}async function y(k,$){if(!h&&!(k==="Delete"&&!await za({title:"Delete "+($.type||"object"),message:"Delete "+($.type||"object")+' "'+($.name||"")+'"? This cannot be undone.',confirmLabel:"Delete",danger:!0}))){h=!0;try{let D=await s.websocketManager.request({type:"trigger_action",name:k,use_dbu:s.showDbu});!D.ok&&D.error&&ke(D.error),Ft(D.properties?D:null),D.deleted&&s.highlightRect&&s.map&&(s.map.removeLayer(s.highlightRect),s.highlightRect=null),T(),i()}catch(D){console.error("trigger_action failed:",D),ke("Action failed: "+D)}finally{h=!1}}}function g(k){s.websocketManager.request({...k,use_dbu:s.showDbu}).then($=>{!$.ok&&$.error&&ke($.error),Ft($),i()}).catch($=>{console.error(k.type+" failed:",$)})}function v(){let k=document.getElementById("highlight-picker");k&&k.remove()}function w(k,$){v();let D=s.techData?.highlight_colors||[];if(!D.length)return;let Y=document.createElement("div");Y.id="highlight-picker";let A=document.createElement("div");if(A.className="highlight-swatch-grid",D.forEach((z,ct)=>{let Lt=document.createElement("button");Lt.className="highlight-swatch",Lt.title="Group "+(ct+1),Lt.style.backgroundColor=`rgb(${z[0]}, ${z[1]}, ${z[2]})`,ct===$.highlight_group&&Lt.classList.add("active"),Lt.addEventListener("click",()=>{v(),g({type:"highlight",group:ct})}),A.appendChild(Lt)}),Y.appendChild(A),$.highlight_group>=0){let z=document.createElement("button");z.className="highlight-remove",z.textContent="Remove highlight",z.addEventListener("click",()=>{v(),g({type:"unhighlight"})}),Y.appendChild(z)}document.body.appendChild(Y);let J=k.getBoundingClientRect();Y.style.left=J.left+"px",Y.style.top=J.bottom+4+"px";let I=z=>{z.type==="keydown"&&z.key!=="Escape"||z.type==="mousedown"&&Y.contains(z.target)||(v(),document.removeEventListener("mousedown",I,!0),document.removeEventListener("keydown",I,!0))};setTimeout(()=>{document.addEventListener("mousedown",I,!0),document.addEventListener("keydown",I,!0)},0)}function b(){if(!s.inspectorEl)return;s.inspectorEl.innerHTML="";let k=document.createElement("div");k.className="stub-panel",k.innerHTML='
Loading\u2026
Fetching properties from server.
',s.inspectorEl.appendChild(k)}async function C(k){let $=s.focusNets.has(k)?"remove":"add";$==="add"?s.focusNets.add(k):s.focusNets.delete(k);try{await s.websocketManager.request({type:"set_focus_nets",action:$,net_name:k})}catch(D){console.error("set_focus_nets failed:",D)}e(),o&&Ft(o)}async function B(){s.focusNets.clear();try{await s.websocketManager.request({type:"set_focus_nets",action:"clear",net_name:""})}catch(k){console.error("set_focus_nets clear failed:",k)}e(),o&&Ft(o)}async function P(k){let $=s.routeGuideNets.has(k)?"remove":"add";$==="add"?s.routeGuideNets.add(k):s.routeGuideNets.delete(k);try{await s.websocketManager.request({type:"set_route_guides",action:$,net_name:k})}catch(D){console.error("set_route_guides failed:",D)}i(),o&&Ft(o)}function T(){s.hoverHighlightLayer&&(s.map.removeLayer(s.hoverHighlightLayer),s.hoverHighlightLayer=null)}function Z(){T(),s.websocketManager.request({type:"hover",select_id:-1}).then(()=>{}).catch(()=>{})}function G(k,$,D,Y){let A=L.latLngBounds(Gt(k,$,D,Y,s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY));if(!s.map)return A;let J=A.getSouthWest(),I=A.getNorthEast(),z=s.map.latLngToContainerPoint(J),ct=s.map.latLngToContainerPoint(I),Lt=Math.min(z.x,ct.x),Xt=Math.max(z.x,ct.x),zt=Math.min(z.y,ct.y),jt=Math.max(z.y,ct.y),Se=Lt,Ue=Xt,Bt=zt,ii=jt;if(Xt-LtL.rectangle(G($,D,Y,A),{color:"#ffe85c",weight:3,fill:!0,fillColor:"#fff27a",fillOpacity:.14,opacity:1,interactive:!1,className:"hover-highlight",pane:s.hoverHighlightPane}))).addTo(s.map))}function gt(k,$){k.classList.add("inspector-link"),k.addEventListener("click",D=>{D.stopPropagation(),Q($)}),k.addEventListener("mouseenter",()=>{l!==null&&(s.websocketManager.cancel(l),l=null);let D=s.websocketManager.request({type:"hover",select_id:$});l=D.requestId,D.then(Y=>{l=null,dt(Y.rects||[]),i()}).catch(()=>{l=null})}),k.addEventListener("mouseleave",()=>{Z(),i()})}function it(k){let $=k>0?"select_next":"select_prev";r!==null&&(s.websocketManager.cancel(r),r=null),b();let D=ae(s),Y=s.websocketManager.request({type:$,use_dbu:s.showDbu});r=Y.requestId,Y.then(A=>{if(r=null,!!he(s,D)){if(A.error){console.error("Selection cycle error:",A.error),Ft(o);return}if(Ft(A),A.type==="Inst"&&A.name&&(s.selectedInstanceName=A.name,s.schematicWidget&&s.schematicWidget.refresh()),s.map&&s.map.closePopup(),T(),s.highlightRect&&s.map&&(s.map.removeLayer(s.highlightRect),s.highlightRect=null),A.bbox&&s.map&&s.designScale){let[J,I,z,ct]=A.bbox;A.type!=="Inst"&&tt(J,I,z,ct,A.type),A.selection_count>1?rt(A.bbox):Mt(A.bbox,A.type)}e()}}).catch(A=>{r=null,console.error("Selection cycle failed:",A),Ft(o)})}function Q(k){r!==null&&(s.websocketManager.cancel(r),r=null),b();let $=ae(s),D=s.websocketManager.request({type:"inspect",select_id:k,use_dbu:s.showDbu});r=D.requestId,D.then(Y=>{if(r=null,!!he(s,$)){if(Y.error){console.error("Inspect error:",Y.error);return}if(Ft(Y),s.map.closePopup(),T(),s.highlightRect&&(s.map.removeLayer(s.highlightRect),s.highlightRect=null),Y.bbox&&s.map&&s.designScale){let[A,J,I,z]=Y.bbox;Y.type!=="Inst"&&tt(A,J,I,z,Y.type),Mt(Y.bbox,Y.type)}i()}}).catch(Y=>{r=null,console.error("Inspect failed:",Y)})}function nt(){r!==null&&(s.websocketManager.cancel(r),r=null),b();let k=ae(s),$=s.websocketManager.request({type:"inspect_back",use_dbu:s.showDbu});r=$.requestId,$.then(D=>{if(r=null,!!he(s,k)){if(D.error){console.error("Inspect back error:",D.error);return}if(Ft(D),s.map.closePopup(),T(),s.highlightRect&&(s.map.removeLayer(s.highlightRect),s.highlightRect=null),D.bbox&&s.map&&s.designScale){if(D.type!=="Inst"){let[Y,A,J,I]=D.bbox;tt(Y,A,J,I,D.type)}Mt(D.bbox,D.type)}i()}}).catch(D=>{r=null,console.error("Inspect back failed:",D)})}function tt(k,$,D,Y,A){if(s.highlightRect&&(s.map.removeLayer(s.highlightRect),s.highlightRect=null),A==="Net")return;let J=Gt(k,$,D,Y,s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY);s.highlightRect=L.rectangle(J,{color:"#ff0",weight:2,fill:!1,dashArray:"6,4"}),s.visibility&&s.visibility.highlight_selected===!1||s.highlightRect.addTo(s.map)}let Ct=null;function Mt(k,$){if(!k||!s.map||!s.designScale||(Nt!==null&&Yt(),Ct&&(s.map.removeLayer(Ct),Ct=null),s.visibility&&s.visibility.highlight_selected===!1)||$==="Net")return;let[D,Y,A,J]=k,I=Gt(D,Y,A,J,s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY);Ct=L.rectangle(I,{color:"#ff0",weight:3,fill:!0,fillColor:"#ff0",fillOpacity:.25,opacity:1,interactive:!1,className:"selection-pulse",pane:s.hoverHighlightPane}).addTo(s.map);let z=Ct;setTimeout(()=>{z&&s.map&&s.map.hasLayer(z)&&s.map.removeLayer(z),Ct===z&&(Ct=null)},1100)}let It=null,Nt=null;function Yt(){Nt!==null&&(clearInterval(Nt),Nt=null),It&&(s.map&&s.map.hasLayer(It)&&s.map.removeLayer(It),It=null)}function rt(k,{repeats:$=6,intervalMs:D=300}={}){if(!k||!s.map||!s.designScale)return;if(Yt(),typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches){Mt(k);return}let[Y,A,J,I]=k,z=Gt(Y,A,J,I,s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY);It=L.rectangle(z,{color:"#ff0",weight:1,fill:!0,fillColor:"#ff0",fillOpacity:.39,opacity:1,interactive:!1,pane:s.hoverHighlightPane}).addTo(s.map);let ct=0,Lt=$>0?$*3:1/0;Nt=setInterval(()=>{if(ct+=1,ct>=Lt){Yt();return}let Xt=ct%3+1;It.setStyle({weight:Xt,fillOpacity:Xt===1?.39:0})},D)}s.clearSelectionPulse=function(){Ct&&(s.map.removeLayer(Ct),Ct=null)};function ye(k,$,D){let Y=document.createElement("div");Y.className="inspector-group";let A=document.createElement("div");A.className="inspector-group-header";let J=document.createElement("span");J.className="vis-arrow";let I=document.createElement("span");if(I.className="inspector-prop-name",I.textContent=k,I.title=k,A.appendChild(J),A.appendChild(I),$!==null){let ct=document.createElement("span");ct.className="inspector-count",ct.textContent=`(${$})`,A.appendChild(ct)}Y.appendChild(A);let z=document.createElement("div");return z.className="inspector-group-children"+(D?" collapsed":""),J.textContent=D?"\u25B6":"\u25BC",Y.appendChild(z),A.addEventListener("click",()=>{z.classList.toggle("collapsed"),J.textContent=z.classList.contains("collapsed")?"\u25B6":"\u25BC"}),{group:Y,header:A,arrow:J,body:z}}function at(k){let $=k.column_headers||[],D=k.row_headers||[],Y=k.data||[],A=$.some(ct=>ct!==""),J=D.some(ct=>ct!==""),I=document.createElement("table");if(I.className="inspector-table",A){let ct=document.createElement("thead"),Lt=document.createElement("tr");J&&Lt.appendChild(document.createElement("th"));for(let Xt of $){let zt=document.createElement("th");zt.textContent=Xt,Lt.appendChild(zt)}ct.appendChild(Lt),I.appendChild(ct)}let z=document.createElement("tbody");return Y.forEach((ct,Lt)=>{let Xt=document.createElement("tr");if(J){let zt=document.createElement("th");zt.textContent=D[Lt]||"",Xt.appendChild(zt)}for(let zt of ct){let jt=document.createElement("td");jt.textContent=zt,Xt.appendChild(jt)}z.appendChild(Xt)}),I.appendChild(z),I}function kt(k,$){if(k.table){let I=(k.table.data||[]).length,{group:z,body:ct}=ye(k.name,I,I>=10),Lt=document.createElement("div");return Lt.className="inspector-table-scroll",Lt.appendChild(at(k.table)),ct.appendChild(Lt),z}if(k.children){let I=k.children.length<10,{group:z,body:ct}=ye(k.name,k.children.length,!I);for(let Lt of k.children)ct.appendChild(kt(Lt,$));return z}let D=document.createElement("div");D.className="inspector-prop";let Y=document.createElement("span");Y.className="inspector-prop-name",Y.textContent=k.name||"",Y.title=k.name||"";let A=document.createElement("span");A.className="inspector-prop-value",A.textContent=k.value||"",D.appendChild(Y),D.appendChild(A);let J=k.editable&&$&&($.onPropertyEdit||$.onPropertyChange)&&k.editor&&(k.editor.type==="list"||k.editor.type==="bool");if(J&&k.value_select_id===void 0)D.replaceChild(_(k,$),A);else if(J){let I=document.createElement("button");I.className="inspector-edit-btn",I.title="Edit "+k.name,I.textContent="\u270E",I.addEventListener("click",z=>{z.stopPropagation();let ct=_(k,$);D.replaceChild(ct,A),I.remove(),ct.focus()}),D.appendChild(I)}else k.editable&&$&&($.onPropertyChange||$.onPropertyEdit)&&(A.contentEditable=!0,A.classList.add("inspector-editable"),A.addEventListener("blur",()=>{let I=A.textContent;if(I!==k.value){if($.onPropertyChange){$.onPropertyChange(k.name,I);return}if(k.editor&&k.editor.type==="number"){let z=Number(I);if(I.trim()===""||Number.isNaN(z)){ke("Not a number: "+I),A.textContent=k.value;return}$.onPropertyEdit(k,{value:z});return}$.onPropertyEdit(k,{value:I})}}),A.addEventListener("keydown",I=>{I.key==="Enter"&&(I.preventDefault(),A.blur()),I.key==="Escape"&&(A.textContent=k.value,A.blur())}));return k.name_select_id!==void 0&&k.value_select_id===void 0?(gt(D,k.name_select_id),Y.classList.add("inspector-link")):k.name_select_id!==void 0&>(Y,k.name_select_id),k.value_select_id!==void 0&>(A,k.value_select_id),D}let Ot=140,Wt=60,At=500,yt=Ot;function ft(){s.inspectorEl&&s.inspectorEl.style.setProperty("--inspector-name-w",yt+"px")}function le(){let k=document.createElement("div");return k.className="inspector-col-resizer",k.title="Drag to resize the name column",k.addEventListener("mousedown",$=>{$.preventDefault();let D=$.clientX,Y=yt;k.classList.add("dragging");let A=I=>{yt=Math.max(Wt,Math.min(At,Y+I.clientX-D)),ft()},J=()=>{k.classList.remove("dragging"),document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",J)};document.addEventListener("mousemove",A),document.addEventListener("mouseup",J)}),k}function ie(k){if(!k||!s.map||!s.designScale)return;let[$,D,Y,A]=k;s.map.fitBounds(Gt($,D,Y,A,s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY),{padding:[20,20]})}function Ft(k){if(!s.inspectorEl)return;if(o=k,s.inspectorEl.innerHTML="",!k||!k.properties||k.properties.length===0){Yt();let A=document.createElement("div");A.className="stub-panel",A.innerHTML='
Inspector
Select an object in the layout to inspect its properties.
',s.inspectorEl.appendChild(A);return}if(!k.onPropertyChange&&!k.onPropertyEdit&&!wt(s)&&(k.onPropertyEdit=(A,J)=>f(A.name,J)),k){let A=document.createElement("div");A.className="inspector-toolbar";let J=document.createElement("button");if(J.className="or-btn or-btn-icon",J.title="Back",J.innerHTML=kd,J.disabled=!k.can_navigate_back,J.addEventListener("click",()=>nt()),A.appendChild(J),k.bbox){let I=document.createElement("button");I.className="or-btn or-btn-icon",I.title="Zoom to",I.innerHTML=Cd,I.addEventListener("click",()=>ie(k.bbox)),A.appendChild(I)}if(k.type==="Net"&&k.name){let I=s.focusNets.has(k.name),z=document.createElement("button");z.className="or-btn or-btn-icon",z.title=I?"De-focus net":"Focus net",z.innerHTML=I?Sd:Ld,z.addEventListener("click",()=>C(k.name)),A.appendChild(z)}if(k.type==="Net"&&k.name&&k.has_guides){let I=s.routeGuideNets.has(k.name),z=document.createElement("button");z.className="or-btn or-btn-icon",z.title=I?"Hide route guides":"Show route guides",z.innerHTML=I?Ed:Md,z.addEventListener("click",()=>P(k.name)),A.appendChild(z)}if(k.type==="Net"&&k.name&&s.showInsertBufferDialog){let I=document.createElement("button");I.className="or-btn or-btn-icon",I.title="Insert buffer",I.innerHTML=Id,I.addEventListener("click",()=>s.showInsertBufferDialog(k.name)),A.appendChild(I)}if(s.focusNets.size>0){let I=document.createElement("button");I.className="or-btn or-btn-icon",I.title="Clear focus nets",I.innerHTML=Td,I.addEventListener("click",()=>B()),A.appendChild(I)}if(typeof k.highlight_group=="number"&&!wt(s)&&(s.techData?.highlight_colors||[]).length){let I=document.createElement("button");I.className="or-btn or-btn-icon inspector-highlight-btn";let z=k.highlight_group;if(I.title=z>=0?"Highlight group "+(z+1):"Add to highlight group",I.innerHTML=xd,z>=0){let ct=s.techData.highlight_colors[z];I.style.backgroundColor=`rgba(${ct[0]}, ${ct[1]}, ${ct[2]}, 0.45)`,I.style.borderColor=`rgb(${ct[0]}, ${ct[1]}, ${ct[2]})`}I.addEventListener("click",()=>w(I,k)),A.appendChild(I)}if(Array.isArray(k.actions)&&!wt(s))for(let I of k.actions){let z=document.createElement("button");z.className="or-btn inspector-action-btn",z.title=I,I==="Delete"?(z.classList.add("or-btn-icon","or-btn-danger-hover"),z.innerHTML=wd):(z.classList.add("or-btn-sm"),z.textContent=I),z.addEventListener("click",()=>y(I,k)),A.appendChild(z)}s.inspectorEl.appendChild(A)}let $=k.selection_count||0,D=typeof k.selection_index=="number"?k.selection_index:-1;if($>1&&D>=0){let A=document.createElement("div");A.className="inspector-selection-nav";let J=document.createElement("button");J.className="or-btn or-btn-icon",J.title="Previous (Shift+click to multi-select)",J.innerHTML=Pd,J.addEventListener("click",()=>it(-1));let I=document.createElement("span");I.className="inspector-selection-label",I.textContent=D+1+" / "+$;let z=document.createElement("button");z.className="or-btn or-btn-icon",z.title="Next",z.innerHTML=Ad,z.addEventListener("click",()=>it(1)),A.appendChild(J),A.appendChild(I),A.appendChild(z),s.inspectorEl.appendChild(A)}let Y=document.createElement("div");Y.className="inspector-rows";for(let A of k.properties)Y.appendChild(kt(A,k));Y.appendChild(le()),s.inspectorEl.appendChild(Y),ft()}function ee(k){let $=document.createElement("div");$.className="inspector",s.inspectorEl=$,k.element.appendChild($),Ft(null)}function fe(){if(o){if(o.type==="Ruler"){s.rulerManager&&s.rulerManager._selectedRulerId!==null&&s.rulerManager._selectRuler(s.rulerManager._selectedRulerId);return}s.websocketManager&&Q(-1)}}return{createInspector:ee,updateInspector:Ft,highlightBBox:tt,pulseHighlight:Mt,animateSelection:rt,stopSelectionAnimation:Yt,navigateInspector:Q,refreshInspector:fe}}var ks=class{constructor(e,i,o){this._app=i,this._refreshOverlay=o||(()=>{}),this._data={selection:[],groups:[],truncated:!1},this._tab="selected",this._filter="",this._sortKey=null,this._sortAsc=!0,this._pendingRefresh=null,this._inFlight=!1,this._staleWhileInFlight=!1,this._visible=!0,this._el=document.createElement("div"),this._el.className="selection-browser",e.element.appendChild(this._el),e.on?.("show",()=>{this._visible=!0,this.refresh()}),e.on?.("hide",()=>{this._visible=!1}),e.on?.("destroy",()=>{this._visible=!1,this._staleWhileInFlight=!1,this._pendingRefresh!==null&&(clearTimeout(this._pendingRefresh),this._pendingRefresh=null)}),this._render(),this.refresh()}scheduleRefresh(){!this._visible||this._pendingRefresh!==null||(this._pendingRefresh=setTimeout(()=>{this._pendingRefresh=null,this.refresh()},150))}refresh(){if(!this._visible||wt(this._app))return;if(this._inFlight){this._staleWhileInFlight=!0;return}this._inFlight=!0;let e=()=>{this._inFlight=!1,this._staleWhileInFlight&&(this._staleWhileInFlight=!1,this.refresh())};this._app.websocketManager.request({type:"list_selection"}).then(i=>{i.ok&&(this._data=i,this._render()),e()}).catch(e)}_entries(){let e;this._tab==="selected"?e=(this._data.selection||[]).map((o,r)=>({row:o,index:r,group:-1})):e=(this._data.groups||[]).flatMap((o,r)=>o.map((l,h)=>({row:l,index:h,group:r})));let i=this._filter.trim().toLowerCase();if(i&&(e=e.filter(({row:o})=>(o.name||"").toLowerCase().includes(i)||(o.type||"").toLowerCase().includes(i))),this._sortKey){let o=this._sortKey,r=this._sortAsc?1:-1;e=e.slice().sort((l,h)=>r*String(l.row[o]||"").localeCompare(String(h.row[o]||"")))}return e}_fmtCoord(e){if(this._app.showDbu)return String(e);let i=this._app.getDbuPerMicron?this._app.getDbuPerMicron():1e3;return(e/i).toFixed(3)}_fmtBounds(e){if(!e)return"";let[i,o,r,l]=e;return`(${this._fmtCoord(i)}, ${this._fmtCoord(o)}), (${this._fmtCoord(r)}, ${this._fmtCoord(l)})`}_inspectRow(e,i){let o=e.group<0?{type:"inspect_selection",index:e.index,use_dbu:this._app.showDbu}:{type:"inspect_group",group:e.group,index:e.index,use_dbu:this._app.showDbu};this._app.websocketManager.request(o).then(r=>{if(!r.ok){this.refresh();return}this._app.updateInspector&&this._app.updateInspector(r),i&&this._app.focusComponent&&this._app.focusComponent("Inspector"),this._refreshOverlay()}).catch(()=>{})}_deselectRow(e){this._app.websocketManager.request({type:"deselect",index:e.index}).then(()=>{this.refresh(),this._refreshOverlay()}).catch(()=>{})}_clearHighlights(){this._app.websocketManager.request({type:"clear_highlights",group:-1}).then(()=>{this.refresh(),this._refreshOverlay(),this._app.refreshInspector&&this._app.refreshInspector()}).catch(()=>{})}_zoomToBBox(e){if(!e||!this._app.designScale||!this._app.map)return;let[i,o,r,l]=e,h=this._app.getDbuPerMicron?this._app.getDbuPerMicron():1e3,u=Math.min(10*h,2*Math.max(r-i,l-o));this._app.map.fitBounds(Gt(i-u,o-u,r+u,l+u,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY))}_render(){this._app.stopSelectionAnimation&&this._app.stopSelectionAnimation(),this._el.innerHTML="";let e=(this._data.selection||[]).length,i=(this._data.groups||[]).reduce((h,u)=>h+u.length,0),o=document.createElement("div");o.className="sb-tabs";for(let[h,u,f]of[["selected","Selected",e],["highlighted","Highlighted",i]]){let _=document.createElement("button");_.className="sb-tab"+(this._tab===h?" active":""),_.textContent=`${u} (${f})`,_.addEventListener("click",()=>{this._tab=h,this._render()}),o.appendChild(_)}let r=document.createElement("button");if(r.className="or-btn or-btn-sm sb-tool",r.title="Refresh",r.textContent="\u27F3",r.addEventListener("click",()=>this.refresh()),o.appendChild(r),this._tab==="highlighted"&&i>0){let h=document.createElement("button");h.className="or-btn or-btn-sm sb-tool",h.title="Clear all highlights",h.textContent="Clear",h.addEventListener("click",()=>this._clearHighlights()),o.appendChild(h)}this._el.appendChild(o);let l=document.createElement("input");if(l.type="text",l.className="sb-filter",l.placeholder="Filter by name or type\u2026",l.value=this._filter,l.addEventListener("input",()=>{this._filter=l.value,this._renderTable()}),this._el.appendChild(l),this._data.truncated){let h=document.createElement("div");h.className="sb-truncated",h.textContent="List truncated \u2014 showing the first 1000 entries per set.",this._el.appendChild(h)}this._tableWrap=document.createElement("div"),this._tableWrap.className="sb-table-wrap",this._el.appendChild(this._tableWrap),this._renderTable()}_renderTable(){this._tableWrap.innerHTML="";let e=this._entries();if(!e.length){let f=document.createElement("div");f.className="sb-empty",f.textContent=this._tab==="selected"?"Nothing selected.":"Nothing highlighted.",this._tableWrap.appendChild(f);return}let i=document.createElement("table");i.className="sb-table";let o=document.createElement("thead"),r=document.createElement("tr"),l=[["name","Object"],["type","Type"],[null,"Bounds"]];this._tab==="highlighted"&&l.push([null,"Group"]),l.push([null,""]);for(let[f,_]of l){let y=document.createElement("th");y.textContent=_,f&&(y.classList.add("sb-sortable"),this._sortKey===f&&(y.textContent+=this._sortAsc?" \u25B2":" \u25BC"),y.addEventListener("click",()=>{this._sortKey===f?this._sortAsc=!this._sortAsc:(this._sortKey=f,this._sortAsc=!0),this._renderTable()})),r.appendChild(y)}o.appendChild(r),i.appendChild(o);let h=document.createElement("tbody"),u=this._app.techData?.highlight_colors||[];for(let f of e){let _=document.createElement("tr");_.className="sb-row";let y=document.createElement("td");y.textContent=f.row.name||"";let g=document.createElement("td");g.textContent=f.row.type||"";let v=document.createElement("td");if(v.textContent=this._fmtBounds(f.row.bbox),_.appendChild(y),_.appendChild(g),_.appendChild(v),this._tab==="highlighted"){let b=document.createElement("td"),C=document.createElement("span");C.className="sb-chip";let B=u[f.group];B&&(C.style.backgroundColor=`rgb(${B[0]}, ${B[1]}, ${B[2]})`),b.appendChild(C),b.appendChild(document.createTextNode(` Group ${f.group+1}`)),_.appendChild(b)}let w=document.createElement("td");if(w.className="sb-actions",f.row.bbox){let b=document.createElement("button");b.className="sb-row-btn",b.title="Zoom to",b.textContent="\u2316",b.addEventListener("click",C=>{C.stopPropagation(),this._zoomToBBox(f.row.bbox)}),w.appendChild(b)}if(this._tab==="selected"){let b=document.createElement("button");b.className="sb-row-btn",b.title="De-select",b.textContent="\u2715",b.addEventListener("click",C=>{C.stopPropagation(),this._deselectRow(f)}),w.appendChild(b)}_.appendChild(w),_.addEventListener("click",()=>this._inspectRow(f,!1)),_.addEventListener("dblclick",()=>this._inspectRow(f,!0)),f.row.bbox&&(_.addEventListener("mouseenter",()=>{this._app.animateSelection&&this._app.animateSelection(f.row.bbox,{repeats:0})}),_.addEventListener("mouseleave",()=>{this._app.stopSelectionAnimation&&this._app.stopSelectionAnimation()})),h.appendChild(_)}i.appendChild(h),this._tableWrap.appendChild(i),_i(i)}};var Il="options-dialog",Al=[{label:"System default",value:""},{label:"Sans-serif",value:"sans-serif"},{label:"Serif",value:"serif"},{label:"Monospace",value:"monospace"},{label:"Helvetica / Arial",value:"Helvetica, Arial, sans-serif"},{label:"Georgia",value:"Georgia, 'Times New Roman', serif"},{label:"Courier",value:"'Courier New', Courier, monospace"}],Nd=100,Ls=70,Ss=200;function Ln(s){let e=s===""||s===null?NaN:Math.round(Number(s));return Number.isFinite(e)?Math.min(Ss,Math.max(Ls,e)):Nd}function Nl(s){let{overlay:e,close:i,okBtn:o,showError:r}=Gi("Arrow keys scroll step",`
+ min="${yn}" max="${vn}" step="1" + value="${Wi(s.arrowStep)}">
How far one arrow-key press pans the layout. - Default ${Io}.
`,"Apply",fl),l=e.querySelector(".opt-step");l.focus(),l.select();function h(){let u=l.value.trim(),f=Number(u);if(u===""||!Number.isFinite(f)){r("Step must be a number.");return}if(fyn){r(`Step must be between ${gn} and ${yn} px.`);return}s.setArrowStep(f),i()}return o.addEventListener("click",h),l.addEventListener("keydown",u=>{u.key==="Enter"&&(u.preventDefault(),h())}),{close:i}}function _l(s){let e=s.fontFamily||"",i=pl.some(v=>v.value===e),o=pl.map(v=>``).join("")+(i?"":``),{overlay:r,close:l,okBtn:h,showError:u}=qi("Application font",` + Default ${Ao}.
`,"Apply",Il),l=e.querySelector(".opt-step");l.focus(),l.select();function h(){let u=l.value.trim(),f=Number(u);if(u===""||!Number.isFinite(f)){r("Step must be a number.");return}if(fvn){r(`Step must be between ${yn} and ${vn} px.`);return}s.setArrowStep(f),i()}return o.addEventListener("click",h),l.addEventListener("keydown",u=>{u.key==="Enter"&&(u.preventDefault(),h())}),{close:i}}function Bl(s){let e=s.fontFamily||"",i=Al.some(b=>b.value===e),o=Al.map(b=>``).join("")+(i?"":``),{overlay:r,close:l,okBtn:h,showError:u}=Gi("Application font",`
@@ -253,19 +391,19 @@ Slack: [${i.lower.toFixed(w)}, ${i.upper.toFixed(w)}) ${b}`}this._tooltip.style. + value="${i?"":Xo(e)}">
+ min="${Ls}" max="${Ss}" step="5" + value="${Ln(s.fontScale)}">
The quick brown fox jumps over the lazy dog 0123456789
Applies to the panels, menus and console. Text drawn into the layout is rendered on the server and is not - affected.
`,"Apply",fl),f=r.querySelector(".opt-family"),_=r.querySelector(".opt-custom"),y=r.querySelector(".opt-scale"),g=r.querySelector(".opt-preview");function b(){g.style.fontFamily=_.value.trim()||f.value,g.style.fontSize=`calc(13px * ${wn(y.value)/100})`}for(let v of[f,_,y])v.addEventListener("input",b);b();function w(){let v=y.value.trim(),S=Number(v);if(v===""||!Number.isFinite(S)){u("Size must be a number.");return}if(Sfs){u(`Size must be between ${ps} and ${fs} %.`);return}s.setAppFont({family:_.value.trim()||f.value,scale:S}),l()}h.addEventListener("click",w);for(let v of[_,y])v.addEventListener("keydown",S=>{S.key==="Enter"&&(S.preventDefault(),w())});return{close:l}}function Ho(s){return String(s).replace(/&/g,"&").replace(/"/g,""").replace(//g,">")}var _d='',gd='';function Gi(s){let e=document.createElement("span");return e.className="vis-name",s!=null&&(e.textContent=s),e}function Xe(){let s=document.createElement("span");return s.className="vis-sel-cb vis-sel-spacer",s}function gl(){let s=document.createElement("div");s.className="display-controls-header",s.appendChild(Gi(""));for(let[e,i]of[[_d,"Visible"],[gd,"Selectable"]]){let o=document.createElement("span");o.className="vis-header-icon",o.title=i,o.innerHTML=e,s.appendChild(o)}return s}var ms=class{constructor(e,i,o){this.visibility=e,this.selectability=i,this.onChange=o;let r=()=>{this._syncAll(),this.onChange()};this.model=new ke(r),this.selModel=new ke(r)}add(e){return this.model.addFromSpec(this._enrichSpec(e,"")),this.selModel.addFromSpec(this._enrichSelSpec(e,"",!1)),this}render(e){for(let i of this.model.roots)e.appendChild(this._dom(i));this._syncAll()}_nodeId(e,i){let o=e.key||e.label;return i?i+"/"+o:o}_enrichSpec(e,i){let o=this._nodeId(e,i),r={id:o,data:e};return e.children?r.children=e.children.map(l=>this._enrichSpec(l,o)):e.key&&(r.checked=!!this.visibility[e.key]),e.disabled!=null&&(r.disabled=e.disabled),r}_enrichSelSpec(e,i,o){let r=e.addSelectable===!0?!0:e.addSelectable===!1?!1:o,l=this._nodeId(e,i),h={id:l,data:e,hasCheckbox:!1};if(e.children){h.children=e.children.map(f=>this._enrichSelSpec(f,l,r));let u=f=>f.some(_=>_.hasCheckbox||_.children&&u(_.children));h.hasCheckbox=u(h.children),h.hasCheckbox&&(h.checked=!0)}else if(e.key){let u=e.selectable===!0||e.selectable!==!1&&o;h.hasCheckbox=u,u&&(h.checked=this.selectability[e.key]!==!1)}return h}_syncAll(){this.model.forEach(e=>{e.cb&&(e.cb.checked=e.checked,e.cb.indeterminate=e.indeterminate);let i=e.data;i.key&&(this.visibility[i.key]=e.checked),i.visKey&&(this.visibility[i.visKey]=e.checked||e.indeterminate)}),this.selModel.forEach(e=>{if(!e.hasCheckbox)return;let i=e.data;if(i.key&&(this.selectability[i.key]=e.checked),!e.selCb)return;e.selCb.checked=e.checked,e.selCb.indeterminate=e.indeterminate;let o=this.model.get(e.id),r=o&&!o.checked&&!o.indeterminate;e.selCb.disabled=r,e.selLabel&&e.selLabel.classList.toggle("vis-sel-disabled",r)}),this.model.forEach(e=>{let i=e.data;if(i.disabledBy&&e.el){let o=!this.visibility[i.disabledBy];e.el.classList.toggle("disabled",o)}})}_buildSelCheckbox(e){let i=this.selModel.get(e.id);if(!i||!i.hasCheckbox)return null;let o=document.createElement("input");return o.type="checkbox",o.className="vis-sel-cb",o.title="Selectable",o.addEventListener("change",()=>{this.selModel.check(i.id,o.checked)}),i.selCb=o,o}_dom(e){let i=e.data,o=document.createElement("input");o.type="checkbox",o.className="vis-cb",o.title="Visible",e.cb=o,o.addEventListener("change",()=>this.model.check(e.id,o.checked));let r=this._buildSelCheckbox(e),l=g=>{if(g.appendChild(o),r){g.appendChild(r);let b=this.selModel.get(e.id);b&&(b.selLabel=g)}else g.appendChild(Xe())};if(!e.children.length){let g=document.createElement("div");g.className="vis-leaf";let b=document.createElement("span");return b.className="vis-arrow",b.style.visibility="hidden",b.textContent="\u25B6",g.appendChild(b),g.appendChild(Gi(i.label)),l(g),e.el=g,g}let h=document.createElement("div");h.className="vis-group";let{header:u,arrow:f,name:_}=ui();_.textContent=i.label,l(u),h.appendChild(u);let y=document.createElement("div");y.className="vis-group-children",i.disabled&&y.classList.add("disabled");for(let g of e.children)y.appendChild(this._dom(g));return h.appendChild(y),pi(u,f,y,!0),h}};function xn(s,e,i,o){let r=new Set,l=Math.max(0,s-e),h=Math.min(o-1,s+i);for(let u=l;u<=h;u++)r.add(u);return r}function yd(s){let e={};for(let[i,o]of Object.entries(s||{}))o!==1&&(e[i]=o);return e}function _s(s,e){return(s||[]).some(i=>i.every(o=>!!e[o]))}function vd(s,e){return s.map(i=>{let o=!e.has(i.path);return{id:i.path,parentId:i.parent!=null?i.parent:null,hasCheckbox:i.parent!=null,checked:o,data:{path:i.path,name:i.name,master:i.master,depth:i.depth}}})}var yl=[[70,130,210],[200,50,50],[50,180,80],[200,160,40],[160,60,200],[40,190,190],[220,120,50],[180,70,150]];function vl(s,e,i,o,r,l,h){if(!s.displayControlsEl)return;s.displayControlsEl.innerHTML="",s.allLayers=[],s.displayControlsEl.appendChild(gl());let u=s.mergeTiles?s.MergedTileLayer:null,f=new Set;function _(){for(let M of f)M.refreshTiles();f.clear()}function y(M,H){if(!u){let W=new o(s.websocketManager,M,{opacity:1,zIndex:H});return W._orShow=()=>W.addTo(s.map),W._orHide=()=>s.map.removeLayer(W),W}let F={layer:M,opacity:1,visible:!1};return{_orItem:F,_orPane:null,refreshTiles(){this._orPane&&(f.add(this._orPane),_())},_orShow(){So(F,!0)&&this._orPane&&f.add(this._orPane)},_orHide(){So(F,!1)&&this._orPane&&f.add(this._orPane)}}}function g(M,H,F,W){let z=new o(s.websocketManager,M,{zIndex:F});return W&&z.addTo(s.map),H&&(s[H]=z),s.allLayers.push(z),z}g("_instances",null,0,!0),g("_pins","pinsLayer",1,e.pins),g("_modules","modulesLayer",2,e.module_view),s.overlayLayers=(r&&r.overlays||[]).map(M=>({def:M,layer:g(M.name,null,M.z_index,_s(M.shown_by,e))}));let b=[],w=[],v=null,S=new Set,R=new Set;try{let M=window.sessionStorage.getItem("or_hidden_layers");M&&(S=new Set(JSON.parse(M)))}catch{}try{let M=window.sessionStorage.getItem("or_nonselectable_layers");M&&(R=new Set(JSON.parse(M)))}catch{}try{let M=window.sessionStorage.getItem("or_layer_patterns");M&&Object.assign(s.layerPatterns,JSON.parse(M))}catch{}function I(){try{window.sessionStorage.setItem("or_layer_patterns",JSON.stringify(yd(s.layerPatterns)))}catch{}}function T(M,H,F){F===1?delete s.layerPatterns[M]:s.layerPatterns[M]=F,I(),H&&typeof H.refreshTiles=="function"&&H.refreshTiles()}let G=[{label:"Solid",value:1},{label:"Diagonal",value:2},{label:"Cross",value:3},{label:"Dots",value:4},{label:"None (no fill)",value:0}],U=0,dt=3;function gt(M,H="layers",F=void 0){let W=[],z=M.type==="category"?F:M.path,q=M.flipped===!0,Z=M.instances||[],D=Z.filter(Ht=>Ht.type!=="category"),X=Z.filter(Ht=>Ht.type==="category"),j=M.layers||[],vt=U;U+=j.length;function mt(Ht,ce){let K=Ht.map((st,lt)=>lt);ce&&K.reverse(),K.forEach(st=>{let lt=Ht[st],Bt=H+"/"+(lt.name||st);W.push(gt(lt,Bt,z))})}function St(){(q?j.map((ce,K)=>K).reverse():j.map((ce,K)=>K)).forEach(ce=>{let K=j[ce],st=K.name||K,lt=vt+ce,Bt=dt++,oe=y(st,Bt),qe=`${H}/${st}`;oe._nodeId=qe;let Mn=!S.has(qe);Mn&&(oe._orShow(),s.visibleLayers.add(qe),s.visibleLayerNames.add(st)),u||s.allLayers.push(oe),b.push(oe),w.push(qe),W.push({id:qe,data:{name:st,layer:oe,color:K.color,colorIndex:lt,nodeId:qe,ownerChipletPath:z},checked:Mn})})}mt(D,!1),q&&St(),mt(X,q),q||St();let Tt={name:M.name,isInstance:!0};return M.type==="category"&&(M.name==="Implant"||M.name==="Other")&&(Tt.startCollapsed=!0),M.type!=="category"&&(Tt.chipletPath=M.path),{id:H,data:Tt,children:W}}let it;if(r.layer_hierarchy?it=gt(r.layer_hierarchy,"layers_parent"):it={id:"layers_parent",children:r.layers.map((M,H)=>{let F=y(M,H+3),W=`layers_parent/${M}`;F._nodeId=W;let z=!S.has(W);return z&&(F._orShow(),s.visibleLayers.add(W),s.visibleLayerNames.add(M)),u||s.allLayers.push(F),b.push(F),w.push(W),{id:W,data:{name:M,layer:F,colorIndex:H,nodeId:W},checked:z}})},u&&b.length>0){let F=function(){let{width:X,height:j}=ka(s.map.getContainer()),vt=xe(),mt=Ca(X,j,vt),St=xa(vt,s.tileDpr?s.tileDpr():1);return{count:s.mergeGroupCount||Sa({budgetBytes:La(H,mt,St),tilesPerPane:mt,bytesPerTile:St,paneCount:M.length}),tilesPerPane:mt,perTile:St}},W=function(X,j,vt){let mt=(X+ns)*j*vt;return{layers:M.length,groups:X,tilesPerPane:j,unmergedPanes:ns,budgetMB:Math.round(H/(1024*1024)),estimatedMB:Math.round(mt/(1024*1024))}},z=function(X,j){let vt=0;j.forEach((mt,St)=>{for(let Tt=0;TtX._orItem),H=s.tileBudgetBytes||Lo,q=F(),Z=Mo(M,q.count),D=Pa(u,s.websocketManager,Z,s.map,3);z(D,Z),s.allLayers.push(...D),s.mergedPanes=D,s.mergeStats=W(D.length,q.tilesPerPane,q.perTile),console.log("[tiles] merged %d layers into %d panes (~%d MB of %d MB budget, %d tiles/pane)",s.mergeStats.layers,s.mergeStats.groups,s.mergeStats.estimatedMB,s.mergeStats.budgetMB,q.tilesPerPane),s.map.on("resize",()=>{let X=F();if(X.count>=s.mergedPanes.length)return;let j=Mo(M,X.count),vt=s.mergedPanes.slice(0,j.length);for(let mt of s.mergedPanes.slice(j.length)){s.map.removeLayer(mt);let St=s.allLayers.indexOf(mt);St>=0&&s.allLayers.splice(St,1)}s.mergedPanes=vt,z(vt,j),vt.forEach((mt,St)=>mt.setItems(j[St])),s.mergeStats=W(vt.length,X.tilesPerPane,X.perTile),console.log("[tiles] window grew \u2014 regrouped %d layers into %d panes (~%d MB of %d MB budget, %d tiles/pane)",s.mergeStats.layers,s.mergeStats.groups,s.mergeStats.estimatedMB,s.mergeStats.budgetMB,X.tilesPerPane)})}function Q(M){if(!M.children||M.children.length===0){let H=M.data&&M.data.name,F=H?!R.has(H):!0;return F&&H&&s.selectableLayers.add(H),{id:M.id,data:{name:H},checked:F}}return{id:M.id,data:{name:M.data&&M.data.name},children:M.children.map(Q)}}let nt=Q(it),tt=new ke(()=>{s.visibleLayerNames.clear();let M=[],H={},F=!1,W=!1,z=v&&s.visibleChiplets instanceof Set;tt.forEach(Z=>{if(Z.cb&&(Z.cb.checked=Z.checked,Z.cb.indeterminate=Z.indeterminate),Z.data&&Z.data.layer){let D=Z.data.nodeId||Z.data.name;M.push(D),Z.checked?(Z.data.layer._orShow(),s.visibleLayers.add(D),s.visibleLayerNames.add(Z.data.name)):(Z.data.layer._orHide(),s.visibleLayers.delete(D))}if(z&&Z.data&&Z.data.chipletPath){let D=Z.data.chipletPath,X=v.get(D);if(X){let j=Z.checked||Z.indeterminate,vt={checked:Z.checked,indeterminate:Z.indeterminate};(X.checked!==Z.checked||X.indeterminate!==Z.indeterminate)&&(H[D]=vt,F=!0),s.visibleChiplets.has(D)!==j&&(W=!0)}}}),_(),Mt(),s.pinsLayer&&s.map.hasLayer(s.pinsLayer)&&s.pinsLayer.refreshTiles();for(let{def:Z,layer:D}of s.overlayLayers||[])_s(Z.layers_by,e)&&s.map.hasLayer(D)&&D.refreshTiles();let q=M.filter(Z=>!s.visibleLayers.has(Z));try{window.sessionStorage.setItem("or_hidden_layers",JSON.stringify(q))}catch{}s.syncDisplayState(),W?v.mirrorStates(H):F&&(v.mirrorStatesQuiet(H),v.forEach(Z=>{Z.cb&&(Z.cb.checked=Z.checked,Z.cb.indeterminate=Z.indeterminate)}))});s.layerModel=tt,tt.addFromSpec(it);let Ct=new ke(()=>{s.selectableLayers.clear(),Ct.forEach(H=>{H.checked&&H.data&&H.data.name&&s.selectableLayers.add(H.data.name)}),Mt();let M=r.layers.filter(H=>!s.selectableLayers.has(H));try{window.sessionStorage.setItem("or_nonselectable_layers",JSON.stringify(M))}catch{}s.syncDisplayState()});Ct.addFromSpec(nt);function Mt(){Ct.forEach(M=>{if(!M.selCb)return;M.selCb.checked=M.checked,M.selCb.indeterminate=M.indeterminate;let H=tt.get(M.id),F=H&&!H.checked&&!H.indeterminate;M.selCb.disabled=F})}let It=document.createElement("div");It.className="context-menu",It.style.display="none",document.body.appendChild(It);function At(M){let H={};w.forEach((F,W)=>{F&&(H[F]=M.has(W))}),tt.checkSet(H)}function Yt(){It.style.display="none"}function rt(M,H){let F=document.createElement("div");F.className="context-menu-item",F.textContent=M,F.addEventListener("click",()=>{H(),Yt()}),It.appendChild(F)}let ye=b.length,at=[{label:"Show only this layer",fn:M=>xn(M,0,0,ye)},{label:"Show layer range \u2195",fn:M=>xn(M,1,1,ye)},{label:"Show layer range \u2195\u2195",fn:M=>xn(M,2,2,ye)},{label:"Show layer range \u2193",fn:M=>xn(M,1,0,ye)},{label:"Show layer range \u2191",fn:M=>xn(M,0,1,ye)}];document.addEventListener("click",M=>{It.contains(M.target)||Yt()}),document.addEventListener("keydown",M=>{M.key==="Escape"&&Yt()});let kt=!wt(s),zt=null;function Wt(){zt&&(zt.classList.remove("vis-row-selected"),zt=null)}kt&&qa(s,Wt);function Pt(M,H,F){let W=ae(s);zt=M,M.classList.add("vis-row-selected");let z={type:"select_layer",layer:H,use_dbu:s.showDbu};F&&(z.chiplet=F),s.websocketManager.request(z).then(q=>{ue(s,W)&&(s.updateInspector&&s.updateInspector(q),s.focusComponent&&s.focusComponent("Inspector"),s.refreshOverlay&&s.refreshOverlay())}).catch(q=>{console.error("select_layer failed:",q),ue(s,W)&&Wt()})}function yt(M,H=!1){let F=Ct.get(M.id);if(!M.children||M.children.length===0){let W=document.createElement("div");W.className=kt?"vis-leaf vis-leaf-selectable":"vis-leaf";let z=document.createElement("span");z.className="vis-arrow",z.style.visibility="hidden",z.textContent="\u25B6",W.appendChild(z);let q=M.data.colorIndex,Z=M.data.name,D=Gi(),X=document.createElement("span");X.className="layer-color";let j=M.data.color||r.layer_colors&&r.layer_colors[q]||yl[q%yl.length];X.style.backgroundColor=`rgb(${j[0]},${j[1]},${j[2]})`,D.appendChild(X),D.appendChild(document.createTextNode(Z)),W.appendChild(D),kt&&D.addEventListener("click",()=>{Pt(W,Z,M.data.ownerChipletPath)});let vt=document.createElement("input");if(vt.type="checkbox",vt.className="vis-cb",vt.title="Visible",vt.checked=M.checked,M.cb=vt,vt.addEventListener("change",()=>{tt.check(M.id,vt.checked)}),W.appendChild(vt),F){let mt=document.createElement("input");mt.type="checkbox",mt.className="vis-sel-cb",mt.title="Selectable",mt.checked=F.checked,F.selCb=mt,mt.addEventListener("change",()=>{Ct.check(M.id,mt.checked)}),W.appendChild(mt)}else W.appendChild(Xe());return W.addEventListener("contextmenu",mt=>{mt.preventDefault(),mt.stopPropagation(),It.innerHTML="";for(let Ht of at)rt(Ht.label,()=>At(Ht.fn(q)));let St=document.createElement("div");St.className="context-menu-separator",St.style.borderTop="1px solid #555",St.style.margin="4px 0",It.appendChild(St);let Tt=s.layerPatterns[Z]??1;for(let Ht of G){let ce=Tt===Ht.value?"\u25CF ":" ";rt(ce+"Fill: "+Ht.label,()=>T(Z,M.data.layer,Ht.value))}It.style.left=mt.clientX+"px",It.style.top=mt.clientY+"px",It.style.display="block"}),W}else{let W=document.createElement("div");W.className="vis-group";let{header:z,arrow:q,name:Z}=ui();Z.textContent=H?"Layers":M.data.name||"Group";let D=document.createElement("input");if(D.type="checkbox",D.className="vis-cb",D.title="Visible",D.checked=M.checked,D.indeterminate=M.indeterminate,M.cb=D,D.addEventListener("change",()=>{tt.check(M.id,D.checked)}),z.appendChild(D),F){let j=document.createElement("input");j.type="checkbox",j.className="vis-sel-cb",j.title="Selectable",j.checked=F.checked,j.indeterminate=F.indeterminate,F.selCb=j,j.addEventListener("change",()=>{Ct.check(M.id,j.checked)}),z.appendChild(j)}else z.appendChild(Xe());W.appendChild(z);let X=document.createElement("div");X.className="vis-group-children";for(let j of M.children)X.appendChild(yt(j,!1));return W.appendChild(X),pi(z,q,X,!!(M.data&&M.data.startCollapsed)),W}}let ft=tt.roots[0]||tt.get("layers_parent"),le=yt(ft,!0);s.displayControlsEl.appendChild(le),Mt();let ie=r&&Array.isArray(r.chiplets)?r.chiplets:[];if(ie.length>1){let X=function(K,st){let lt=D.get(K);lt&&(tt.cascadeQuiet(lt.id,st),tt.onChange())},ce=function(K){let st=K.data;if(K!==Tt){let lt=document.createElement("div");lt.className="vis-leaf",lt.style.paddingLeft=8*(st.depth-1)+"px",lt.title=st.path+(st.master?` (${st.master})`:""),lt.appendChild(Gi(st.name));let Bt=document.createElement("input");Bt.type="checkbox",Bt.className="vis-cb",Bt.checked=K.checked,Bt.indeterminate=K.indeterminate,K.cb=Bt,Bt.addEventListener("change",()=>{v.check(K.id,Bt.checked),X(st.path,Bt.checked)}),lt.appendChild(Bt),lt.appendChild(Xe()),Ht.appendChild(lt)}K.children&&K.children.forEach(ce)},M=r&&r.block_name||"",H=M!=="",F={};if(H)try{let K=Vt("or_hidden_chiplets");if(K){let st=JSON.parse(decodeURIComponent(K));st&&typeof st=="object"&&!Array.isArray(st)&&(F=st)}}catch{}let W=new Set(Array.isArray(F[M])?F[M]:[]),z=vd(ie,W),q=z.findIndex(K=>K.parentId===null),Z=q>=0?z[q].id:null;if(q>=0&&(z[q].hasCheckbox=!0),s.visibleChiplets=new Set(ie.filter(K=>!W.has(K.path)).map(K=>K.path)),v=new ke(()=>{let K=new Set;if(v.forEach(st=>{st.cb&&(st.cb.checked=st.checked,st.cb.indeterminate=st.indeterminate),st.data&&st.data.path&&(st.checked||st.indeterminate)&&K.add(st.data.path)}),s.visibleChiplets=K,H){let st=ie.filter(Bt=>!K.has(Bt.path)).map(Bt=>Bt.path),lt={};try{let Bt=Vt("or_hidden_chiplets");if(Bt){let oe=JSON.parse(decodeURIComponent(Bt));oe&&typeof oe=="object"&&!Array.isArray(oe)&&(lt=oe)}}catch{}st.length===0?delete lt[M]:lt[M]=st,Qt("or_hidden_chiplets",encodeURIComponent(JSON.stringify(lt)))}l()}),v.buildFromNodes(z),typeof console<"u"&&console.warn){let K=new Set;tt.forEach(lt=>{lt.data&<.data.chipletPath&&K.add(lt.data.chipletPath)});let st=new Set;v.forEach(lt=>{lt.data&<.data.path&&st.add(lt.data.path)});for(let lt of st)K.has(lt)||console.warn(`[display-controls] chiplet "${lt}" missing from layer_hierarchy \u2014 Layers/Chiplets sync may drift`);for(let lt of K)st.has(lt)||console.warn(`[display-controls] layer hierarchy node "${lt}" has no matching chiplet \u2014 Layers/Chiplets sync may drift`)}let D=new Map;tt.forEach(K=>{K.data&&K.data.chipletPath&&D.set(K.data.chipletPath,K)});{let K={};if(tt.forEach(st=>{if(!st.data||!st.data.chipletPath)return;let lt=st.data.chipletPath;W.has(lt)||v.get(lt)&&(K[lt]={checked:st.checked,indeterminate:st.indeterminate})}),Object.keys(K).length>0){v.mirrorStatesQuiet(K);let st=new Set;v.forEach(lt=>{lt.data&<.data.path&&(lt.checked||lt.indeterminate)&&st.add(lt.data.path)}),s.visibleChiplets=st}}let j=document.createElement("div");j.className="vis-group";let{header:vt,arrow:mt,name:St}=ui();St.textContent="Chiplets";let Tt=Z!=null?v.get(Z):null;if(Tt){let K=document.createElement("input");K.type="checkbox",K.className="vis-cb",K.checked=Tt.checked,K.indeterminate=Tt.indeterminate,Tt.cb=K,K.addEventListener("change",st=>{st.stopPropagation(),v.check(Z,K.checked),Tt.data&&Tt.data.path&&X(Tt.data.path,K.checked)}),vt.appendChild(K)}vt.appendChild(Xe()),j.appendChild(vt);let Ht=document.createElement("div");Ht.className="vis-group-children",v.roots.forEach(ce),j.appendChild(Ht),pi(vt,mt,Ht,!1),s.displayControlsEl.appendChild(j)}else s.visibleChiplets=null;let Ft=!!e.debug_renderers,ee=new ms(e,i,()=>{l(),!!e.debug_renderers!==Ft&&(Ft=!!e.debug_renderers,s.refreshRendererControls&&s.refreshRendererControls())});ee.add({label:"Nets",addSelectable:!0,children:[{key:"net_signal",label:"Signal"},{key:"net_power",label:"Power"},{key:"net_ground",label:"Ground"},{key:"net_clock",label:"Clock"},{key:"net_reset",label:"Reset"},{key:"net_tieoff",label:"Tie off"},{key:"net_scan",label:"Scan"},{key:"net_analog",label:"Analog"}]}),ee.add({label:"Instances",addSelectable:!0,children:[{label:"Std Cells",visKey:"stdcells",disabled:!s.hasLiberty,children:[{label:"Bufs/Invs",children:[{key:"std_bufinv_timing",label:"Timing opt."},{key:"std_bufinv",label:"Netlist"}]},{key:"std_combinational",label:"Combinational"},{key:"std_sequential",label:"Sequential"},{label:"Clock tree",children:[{key:"std_clock_bufinv",label:"Buffer/Inverter"},{key:"std_clock_gate",label:"Clock gate"}]},{key:"std_level_shift",label:"Level shifter"}]},{key:"macros",label:"Macros"},{label:"Pads",children:[{key:"pad_input",label:"Input"},{key:"pad_output",label:"Output"},{key:"pad_inout",label:"Inout"},{key:"pad_power",label:"Power"},{key:"pad_spacer",label:"Spacer"},{key:"pad_areaio",label:"Area IO"},{key:"pad_other",label:"Other"}]},{label:"Physical",children:[{key:"phys_fill",label:"Fill"},{key:"phys_endcap",label:"Endcap"},{key:"phys_welltap",label:"Welltap"},{key:"phys_tie",label:"Tie Hi/Lo"},{key:"phys_antenna",label:"Antenna"},{key:"phys_cover",label:"Cover"},{key:"phys_bump",label:"Bump"},{key:"phys_other",label:"Other"}]}]}),ee.add({label:"Blockages",addSelectable:!0,children:[{key:"placement_blockages",label:"Placement"},{key:"routing_obstructions",label:"Routing"}]}),r.sites&&r.sites.length>0&&ee.add({label:"Rows",visKey:"rows",addSelectable:!0,children:r.sites.map(M=>({key:"site_"+M,label:M}))}),ee.add({label:"Tracks",children:[{key:"tracks_pref",label:"Pref"},{key:"tracks_non_pref",label:"Non Pref"}]}),ee.add({label:"Shapes",children:[{label:"Routing",visKey:"routing",children:[{key:"routing_segments",label:"Segments"},{key:"routing_vias",label:"Vias"}]},{label:"Special Routing",visKey:"special_nets",children:[{key:"srouting_segments",label:"Segments"},{key:"srouting_vias",label:"Vias"}]},{key:"pins",label:"Pins",selectable:!0},{key:"pin_names",label:"Pin Names",disabledBy:"pins"},{key:"fills",label:"Fills"}]}),ee.add({label:"Misc",children:[{label:"Instances",children:[{key:"inst_names",label:"Names"},{key:"inst_pins",label:"Pins",selectable:!0},{key:"inst_pin_names",label:"Pin Names",disabledBy:"inst_pins"},{key:"blockages",label:"Blockages"}]},{key:"detailed",label:"Detailed view"},{key:"rulers",label:"Rulers"},{key:"labels",label:"Labels"},{key:"scale_bar",label:"Scale bar"},{key:"access_points",label:"Access Points"},{key:"regions",label:"Regions"},{key:"mfg_grid",label:"Manufacturing grid"},{key:"gcell_grid",label:"GCell grid"},{key:"flywires_only",label:"Flywires only"},{key:"focused_nets_guides",label:"Focused nets guides"},{key:"highlight_selected",label:"Highlight selected"}]}),ee.add({key:"module_view",label:"Module view"}),ee.add({label:"Debug Graphics",children:[{key:"debug_renderers",label:"Renderers"},{key:"debug_live",label:"Live (don't require pause)",disabledBy:"debug_renderers"},{key:"debug",label:"Tiles"}]}),ee.render(s.displayControlsEl);let fe=document.createElement("div");fe.className="renderer-controls",s.displayControlsEl.appendChild(fe);function C(M){return Promise.all(M.map(({path:H,value:F})=>s.websocketManager.request({type:"set_renderer_control",path:H,value:F}))).catch(()=>{})}function $(M){fe.innerHTML="";let H=new Map;for(let F of M||[]){let W=F.group||"";H.has(W)||H.set(W,[]),H.get(W).push(F)}for(let[F,W]of H){let z=fe;if(F){let q=document.createElement("div");q.className="vis-group";let{header:Z,arrow:D,name:X}=ui();X.textContent=F;let j=document.createElement("input");j.type="checkbox",j.className="vis-cb",j.title="Visible";let vt=W.filter(St=>St.visible).length;j.checked=vt===W.length,j.indeterminate=vt>0&&vt{let St=j.checked;C(W.filter(Tt=>!!Tt.visible!==St).map(Tt=>({path:Tt.path,value:St})))}),Z.appendChild(j),Z.appendChild(Xe()),q.appendChild(Z);let mt=document.createElement("div");mt.className="vis-group-children",q.appendChild(mt),pi(Z,D,mt,!1),fe.appendChild(q),z=mt}for(let q of W){let Z=document.createElement("div");Z.className="vis-leaf";let D=document.createElement("span");D.className="vis-arrow",D.style.visibility="hidden",D.textContent="\u25B6",Z.appendChild(D),Z.appendChild(Gi(q.name));let X=document.createElement("input");X.type="checkbox",X.className="vis-cb",X.title="Visible",X.checked=!!q.visible,X.addEventListener("change",()=>C([{path:q.path,value:X.checked}])),Z.appendChild(X),Z.appendChild(Xe()),z.appendChild(Z)}}}s.refreshRendererControls=function(){return!s.websocketManager||wt(s)||!e.debug_renderers?(fe.innerHTML="",Promise.resolve()):s.websocketManager.request({type:"renderer_controls"}).then(M=>$(M.controls)).catch(()=>{})},s.refreshRendererControls();let B=document.createElement("div");B.className="bg-color-row";let Y=document.createElement("span");Y.textContent="Background";let P=document.createElement("input");P.type="color",P.className="bg-color-input",P.title="Layout background color";let J=Vt("or_bg_color");P.value=Zi(J)?J:No(),P.addEventListener("input",()=>{document.documentElement.style.setProperty("--bg-map",P.value)}),P.addEventListener("change",()=>{il(P.value,s)});let A=document.createElement("button");A.className="bg-color-reset",A.textContent="Reset",A.title="Reset background to the theme default",A.addEventListener("click",()=>{nl(s),P.value=No()}),B.appendChild(Y),B.appendChild(P),B.appendChild(A),s.heatMapLayer||(s.heatMapLayer=new h(s.websocketManager,s,{zIndex:b.length+10,opacity:1}));let O=document.createElement("div");O.className="vis-group heatmap-controls",s.displayControlsEl.appendChild(O);let{header:ct,arrow:Lt,name:Xt}=ui("vis-group-header heatmap-header");Xt.textContent="Heat Maps",O.appendChild(ct);let Ot=document.createElement("div");Ot.className="vis-group-children heatmap-group-children",O.appendChild(Ot),pi(ct,Lt,Ot,!0),s.displayControlsEl.appendChild(B);function jt(M,H,F,W){let z=document.createElement("label");z.className="heatmap-setting";let q=document.createElement("input");q.type="checkbox",q.checked=F,q.addEventListener("change",()=>W(q.checked)),z.appendChild(q),z.appendChild(document.createTextNode(H)),M.appendChild(z)}function Le(M,H,F,W,z){let q=document.createElement("label");q.className="heatmap-setting";let Z=document.createElement("span");Z.textContent=H;let D=document.createElement("input");D.type="number",D.value=String(F),D.step=String(W||1),D.addEventListener("change",()=>z(parseFloat(D.value))),q.appendChild(Z),q.appendChild(D),M.appendChild(q)}function Ze(M,H,F,W,z){let q=document.createElement("label");q.className="heatmap-setting";let Z=document.createElement("span");Z.textContent=H;let D=document.createElement("select");for(let X of W){let j=document.createElement("option");j.value=X,j.textContent=X,X===F&&(j.selected=!0),D.appendChild(j)}D.addEventListener("change",()=>z(D.value)),q.appendChild(Z),q.appendChild(D),M.appendChild(q)}function Nt(M){s.websocketManager.request(M).then(H=>{s.updateHeatMaps&&s.updateHeatMaps(H)}).catch(H=>console.error("Heat map update failed",H))}function Qe(M){if(!s.heatMapLegendEl)return;let H=s.heatMapLegendEl;if(H.innerHTML="",!M||!M.show_legend||!M.legend||M.legend.length===0){H.classList.add("hidden");return}let F=document.createElement("div");F.className="heatmap-map-legend-title",F.textContent=M.title,H.appendChild(F);let W=document.createElement("div");W.className="heatmap-map-legend-units",W.textContent=M.units||"",H.appendChild(W);let z=document.createElement("div");z.className="heatmap-map-legend-list";for(let q of M.legend){let Z=document.createElement("div");Z.className="heatmap-legend-row";let D=document.createElement("span");D.className="heatmap-legend-swatch",D.style.backgroundColor=`rgba(${q.color[0]}, ${q.color[1]}, ${q.color[2]}, ${q.color[3]/255})`;let X=document.createElement("span");X.textContent=q.value,Z.appendChild(D),Z.appendChild(X),z.appendChild(Z)}H.appendChild(z),H.classList.remove("hidden")}s.renderHeatMapControls=M=>{Ot.innerHTML="";let H=document.createElement("div");H.className="heatmap-list",Ot.appendChild(H);let F=document.createElement("label");F.className="heatmap-setting";let W=document.createElement("input");W.type="radio",W.name="active-heatmap",W.checked=!M.active,W.addEventListener("change",()=>{Nt({type:"set_active_heatmap",name:""})}),F.appendChild(W),F.appendChild(document.createTextNode("Off")),H.appendChild(F);for(let D of M.heatmaps||[]){let X=document.createElement("label");X.className="heatmap-setting";let j=document.createElement("input");j.type="radio",j.name="active-heatmap",j.checked=D.name===M.active,j.addEventListener("change",()=>{Nt({type:"set_active_heatmap",name:D.name})}),X.appendChild(j),X.appendChild(document.createTextNode(D.title)),H.appendChild(X)}let z=(M.heatmaps||[]).find(D=>D.name===M.active);if(Qe(z),!z)return;let q=document.createElement("div");q.className="heatmap-settings",Ot.appendChild(q),Le(q,"Display min",z.display_min,z.display_range_increment,D=>{Nt({type:"set_heatmap",name:z.name,option:"DisplayMin",value:D})}),Le(q,"Display max",z.display_max,z.display_range_increment,D=>{Nt({type:"set_heatmap",name:z.name,option:"DisplayMax",value:D})}),jt(q,"Show below min",z.draw_below_min,D=>{Nt({type:"set_heatmap",name:z.name,option:"ShowMin",value:D})}),jt(q,"Show above max",z.draw_above_max,D=>{Nt({type:"set_heatmap",name:z.name,option:"ShowMax",value:D})}),jt(q,"Log scale",z.log_scale,D=>{Nt({type:"set_heatmap",name:z.name,option:"LogScale",value:D})}),jt(q,"Reverse log",z.reverse_log,D=>{Nt({type:"set_heatmap",name:z.name,option:"ReverseLog",value:D})}),z.can_adjust_grid&&(Le(q,"Grid X",z.grid_x,.1,D=>{Nt({type:"set_heatmap",name:z.name,option:"GridX",value:D})}),Le(q,"Grid Y",z.grid_y,.1,D=>{Nt({type:"set_heatmap",name:z.name,option:"GridY",value:D})})),Le(q,"Alpha",z.alpha,1,D=>{Nt({type:"set_heatmap",name:z.name,option:"Alpha",value:D})}),jt(q,"Legend",z.show_legend,D=>{Nt({type:"set_heatmap",name:z.name,option:"ShowLegend",value:D})}),z.supports_numbers&&jt(q,"Show numbers",z.show_numbers,D=>{Nt({type:"set_heatmap",name:z.name,option:"ShowNumbers",value:D})});for(let D of z.options||[])D.type==="bool"?jt(q,D.label,D.value,X=>{Nt({type:"set_heatmap",name:z.name,option:D.name,value:X})}):D.type==="choice"&&Ze(q,D.label,D.value,D.choices||[],X=>{Nt({type:"set_heatmap",name:z.name,option:D.name,value:X})});z.selection_filter_label&&jt(q,z.selection_filter_label,z.use_selected_only,D=>{Nt({type:"set_heatmap",name:z.name,option:"use_selected_only",value:D})});let Z=document.createElement("button");Z.className="or-btn or-btn-sm heatmap-rebuild",Z.textContent="Rebuild data",Z.addEventListener("click",()=>{Nt({type:"set_heatmap",name:z.name,option:"rebuild",value:1})}),q.appendChild(Z)}}var bl="search-nav-dialog",bd=[{label:"Instance",value:"inst"},{label:"Net",value:"net"},{label:"Port",value:"port"}];function gs(s){if(!s.designScale)return;let e=bd.map(y=>``).join(""),{overlay:i,close:o,okBtn:r,showError:l}=qi("Find Object",` + affected.`,"Apply",Il),f=r.querySelector(".opt-family"),_=r.querySelector(".opt-custom"),y=r.querySelector(".opt-scale"),g=r.querySelector(".opt-preview");function v(){g.style.fontFamily=_.value.trim()||f.value,g.style.fontSize=`calc(13px * ${Ln(y.value)/100})`}for(let b of[f,_,y])b.addEventListener("input",v);v();function w(){let b=y.value.trim(),C=Number(b);if(b===""||!Number.isFinite(C)){u("Size must be a number.");return}if(CSs){u(`Size must be between ${Ls} and ${Ss} %.`);return}s.setAppFont({family:_.value.trim()||f.value,scale:C}),l()}h.addEventListener("click",w);for(let b of[_,y])b.addEventListener("keydown",C=>{C.key==="Enter"&&(C.preventDefault(),w())});return{close:l}}function Xo(s){return String(s).replace(/&/g,"&").replace(/"/g,""").replace(//g,">")}var Bd='',Dd='';function Xi(s){let e=document.createElement("span");return e.className="vis-name",s!=null&&(e.textContent=s),e}function Je(){let s=document.createElement("span");return s.className="vis-sel-cb vis-sel-spacer",s}function Dl(){let s=document.createElement("div");s.className="display-controls-header",s.appendChild(Xi(""));for(let[e,i]of[[Bd,"Visible"],[Dd,"Selectable"]]){let o=document.createElement("span");o.className="vis-header-icon",o.title=i,o.innerHTML=e,s.appendChild(o)}return s}var Ms=class{constructor(e,i,o){this.visibility=e,this.selectability=i,this.onChange=o;let r=()=>{this._syncAll(),this.onChange()};this.model=new Le(r),this.selModel=new Le(r)}add(e){return this.model.addFromSpec(this._enrichSpec(e,"")),this.selModel.addFromSpec(this._enrichSelSpec(e,"",!1)),this}render(e){for(let i of this.model.roots)e.appendChild(this._dom(i));this._syncAll()}_nodeId(e,i){let o=e.key||e.label;return i?i+"/"+o:o}_enrichSpec(e,i){let o=this._nodeId(e,i),r={id:o,data:e};return e.children?r.children=e.children.map(l=>this._enrichSpec(l,o)):e.key&&(r.checked=!!this.visibility[e.key]),e.disabled!=null&&(r.disabled=e.disabled),r}_enrichSelSpec(e,i,o){let r=e.addSelectable===!0?!0:e.addSelectable===!1?!1:o,l=this._nodeId(e,i),h={id:l,data:e,hasCheckbox:!1};if(e.children){h.children=e.children.map(f=>this._enrichSelSpec(f,l,r));let u=f=>f.some(_=>_.hasCheckbox||_.children&&u(_.children));h.hasCheckbox=u(h.children),h.hasCheckbox&&(h.checked=!0)}else if(e.key){let u=e.selectable===!0||e.selectable!==!1&&o;h.hasCheckbox=u,u&&(h.checked=this.selectability[e.key]!==!1)}return h}_syncAll(){this.model.forEach(e=>{e.cb&&(e.cb.checked=e.checked,e.cb.indeterminate=e.indeterminate);let i=e.data;i.key&&(this.visibility[i.key]=e.checked),i.visKey&&(this.visibility[i.visKey]=e.checked||e.indeterminate)}),this.selModel.forEach(e=>{if(!e.hasCheckbox)return;let i=e.data;if(i.key&&(this.selectability[i.key]=e.checked),!e.selCb)return;e.selCb.checked=e.checked,e.selCb.indeterminate=e.indeterminate;let o=this.model.get(e.id),r=o&&!o.checked&&!o.indeterminate;e.selCb.disabled=r,e.selLabel&&e.selLabel.classList.toggle("vis-sel-disabled",r)}),this.model.forEach(e=>{let i=e.data;if(i.disabledBy&&e.el){let o=!this.visibility[i.disabledBy];e.el.classList.toggle("disabled",o)}})}_buildSelCheckbox(e){let i=this.selModel.get(e.id);if(!i||!i.hasCheckbox)return null;let o=document.createElement("input");return o.type="checkbox",o.className="vis-sel-cb",o.title="Selectable",o.addEventListener("change",()=>{this.selModel.check(i.id,o.checked)}),i.selCb=o,o}_dom(e){let i=e.data,o=document.createElement("input");o.type="checkbox",o.className="vis-cb",o.title="Visible",e.cb=o,o.addEventListener("change",()=>this.model.check(e.id,o.checked));let r=this._buildSelCheckbox(e),l=g=>{if(g.appendChild(o),r){g.appendChild(r);let v=this.selModel.get(e.id);v&&(v.selLabel=g)}else g.appendChild(Je())};if(!e.children.length){let g=document.createElement("div");g.className="vis-leaf";let v=document.createElement("span");return v.className="vis-arrow",v.style.visibility="hidden",v.textContent="\u25B6",g.appendChild(v),g.appendChild(Xi(i.label)),l(g),e.el=g,g}let h=document.createElement("div");h.className="vis-group";let{header:u,arrow:f,name:_}=fi();_.textContent=i.label,l(u),h.appendChild(u);let y=document.createElement("div");y.className="vis-group-children",i.disabled&&y.classList.add("disabled");for(let g of e.children)y.appendChild(this._dom(g));return h.appendChild(y),mi(u,f,y,!0),h}};function Sn(s,e,i,o){let r=new Set,l=Math.max(0,s-e),h=Math.min(o-1,s+i);for(let u=l;u<=h;u++)r.add(u);return r}function Rd(s){let e={};for(let[i,o]of Object.entries(s||{}))o!==1&&(e[i]=o);return e}function Es(s,e){return(s||[]).some(i=>i.every(o=>!!e[o]))}function Od(s,e){return s.map(i=>{let o=!e.has(i.path);return{id:i.path,parentId:i.parent!=null?i.parent:null,hasCheckbox:i.parent!=null,checked:o,data:{path:i.path,name:i.name,master:i.master,depth:i.depth}}})}var Rl=[[70,130,210],[200,50,50],[50,180,80],[200,160,40],[160,60,200],[40,190,190],[220,120,50],[180,70,150]];function Ol(s,e,i,o,r,l,h){if(!s.displayControlsEl)return;s.displayControlsEl.innerHTML="",s.allLayers=[],s.displayControlsEl.appendChild(Dl());let u=s.mergeTiles?s.MergedTileLayer:null,f=new Set;function _(){for(let M of f)M.refreshTiles();f.clear()}function y(M,H){if(!u){let U=new o(s.websocketManager,M,{opacity:1,zIndex:H});return U._orShow=()=>U.addTo(s.map),U._orHide=()=>s.map.removeLayer(U),U}let F={layer:M,opacity:1,visible:!1};return{_orItem:F,_orPane:null,refreshTiles(){this._orPane&&(f.add(this._orPane),_())},_orShow(){Ho(F,!0)&&this._orPane&&f.add(this._orPane)},_orHide(){Ho(F,!1)&&this._orPane&&f.add(this._orPane)}}}function g(M,H,F,U){let O=new o(s.websocketManager,M,{zIndex:F});return U&&O.addTo(s.map),H&&(s[H]=O),s.allLayers.push(O),O}g("_instances",null,0,!0),g("_pins","pinsLayer",1,e.pins),g("_modules","modulesLayer",2,e.module_view),s.overlayLayers=(r&&r.overlays||[]).map(M=>({def:M,layer:g(M.name,null,M.z_index,Es(M.shown_by,e))}));let v=[],w=[],b=null,C=new Set,B=new Set;try{let M=window.sessionStorage.getItem("or_hidden_layers");M&&(C=new Set(JSON.parse(M)))}catch{}try{let M=window.sessionStorage.getItem("or_nonselectable_layers");M&&(B=new Set(JSON.parse(M)))}catch{}try{let M=window.sessionStorage.getItem("or_layer_patterns");M&&Object.assign(s.layerPatterns,JSON.parse(M))}catch{}function P(){try{window.sessionStorage.setItem("or_layer_patterns",JSON.stringify(Rd(s.layerPatterns)))}catch{}}function T(M,H,F){F===1?delete s.layerPatterns[M]:s.layerPatterns[M]=F,P(),H&&typeof H.refreshTiles=="function"&&H.refreshTiles()}let Z=[{label:"Solid",value:1},{label:"Diagonal",value:2},{label:"Cross",value:3},{label:"Dots",value:4},{label:"None (no fill)",value:0}],G=0,dt=3;function gt(M,H="layers",F=void 0){let U=[],O=M.type==="category"?F:M.path,W=M.flipped===!0,q=M.instances||[],R=q.filter(Ht=>Ht.type!=="category"),X=q.filter(Ht=>Ht.type==="category"),j=M.layers||[],vt=G;G+=j.length;function mt(Ht,ce){let K=Ht.map((st,lt)=>lt);ce&&K.reverse(),K.forEach(st=>{let lt=Ht[st],Dt=H+"/"+(lt.name||st);U.push(gt(lt,Dt,O))})}function St(){(W?j.map((ce,K)=>K).reverse():j.map((ce,K)=>K)).forEach(ce=>{let K=j[ce],st=K.name||K,lt=vt+ce,Dt=dt++,oe=y(st,Dt),Ge=`${H}/${st}`;oe._nodeId=Ge;let An=!C.has(Ge);An&&(oe._orShow(),s.visibleLayers.add(Ge),s.visibleLayerNames.add(st)),u||s.allLayers.push(oe),v.push(oe),w.push(Ge),U.push({id:Ge,data:{name:st,layer:oe,color:K.color,colorIndex:lt,nodeId:Ge,ownerChipletPath:O},checked:An})})}mt(R,!1),W&&St(),mt(X,W),W||St();let Tt={name:M.name,isInstance:!0};return M.type==="category"&&(M.name==="Implant"||M.name==="Other")&&(Tt.startCollapsed=!0),M.type!=="category"&&(Tt.chipletPath=M.path),{id:H,data:Tt,children:U}}let it;if(r.layer_hierarchy?it=gt(r.layer_hierarchy,"layers_parent"):it={id:"layers_parent",children:r.layers.map((M,H)=>{let F=y(M,H+3),U=`layers_parent/${M}`;F._nodeId=U;let O=!C.has(U);return O&&(F._orShow(),s.visibleLayers.add(U),s.visibleLayerNames.add(M)),u||s.allLayers.push(F),v.push(F),w.push(U),{id:U,data:{name:M,layer:F,colorIndex:H,nodeId:U},checked:O}})},u&&v.length>0){let F=function(){let{width:X,height:j}=al(s.map.getContainer()),vt=Ce(),mt=rl(X,j,vt),St=ol(vt,s.tileDpr?s.tileDpr():1);return{count:s.mergeGroupCount||cl({budgetBytes:ll(H,mt,St),tilesPerPane:mt,bytesPerTile:St,paneCount:M.length}),tilesPerPane:mt,perTile:St}},U=function(X,j,vt){let mt=(X+ms)*j*vt;return{layers:M.length,groups:X,tilesPerPane:j,unmergedPanes:ms,budgetMB:Math.round(H/(1024*1024)),estimatedMB:Math.round(mt/(1024*1024))}},O=function(X,j){let vt=0;j.forEach((mt,St)=>{for(let Tt=0;TtX._orItem),H=s.tileBudgetBytes||zo,W=F(),q=$o(M,W.count),R=pl(u,s.websocketManager,q,s.map,3);O(R,q),s.allLayers.push(...R),s.mergedPanes=R,s.mergeStats=U(R.length,W.tilesPerPane,W.perTile),console.log("[tiles] merged %d layers into %d panes (~%d MB of %d MB budget, %d tiles/pane)",s.mergeStats.layers,s.mergeStats.groups,s.mergeStats.estimatedMB,s.mergeStats.budgetMB,W.tilesPerPane),s.map.on("resize",()=>{let X=F();if(X.count>=s.mergedPanes.length)return;let j=$o(M,X.count),vt=s.mergedPanes.slice(0,j.length);for(let mt of s.mergedPanes.slice(j.length)){s.map.removeLayer(mt);let St=s.allLayers.indexOf(mt);St>=0&&s.allLayers.splice(St,1)}s.mergedPanes=vt,O(vt,j),vt.forEach((mt,St)=>mt.setItems(j[St])),s.mergeStats=U(vt.length,X.tilesPerPane,X.perTile),console.log("[tiles] window grew \u2014 regrouped %d layers into %d panes (~%d MB of %d MB budget, %d tiles/pane)",s.mergeStats.layers,s.mergeStats.groups,s.mergeStats.estimatedMB,s.mergeStats.budgetMB,X.tilesPerPane)})}function Q(M){if(!M.children||M.children.length===0){let H=M.data&&M.data.name,F=H?!B.has(H):!0;return F&&H&&s.selectableLayers.add(H),{id:M.id,data:{name:H},checked:F}}return{id:M.id,data:{name:M.data&&M.data.name},children:M.children.map(Q)}}let nt=Q(it),tt=new Le(()=>{s.visibleLayerNames.clear();let M=[],H={},F=!1,U=!1,O=b&&s.visibleChiplets instanceof Set;tt.forEach(q=>{if(q.cb&&(q.cb.checked=q.checked,q.cb.indeterminate=q.indeterminate),q.data&&q.data.layer){let R=q.data.nodeId||q.data.name;M.push(R),q.checked?(q.data.layer._orShow(),s.visibleLayers.add(R),s.visibleLayerNames.add(q.data.name)):(q.data.layer._orHide(),s.visibleLayers.delete(R))}if(O&&q.data&&q.data.chipletPath){let R=q.data.chipletPath,X=b.get(R);if(X){let j=q.checked||q.indeterminate,vt={checked:q.checked,indeterminate:q.indeterminate};(X.checked!==q.checked||X.indeterminate!==q.indeterminate)&&(H[R]=vt,F=!0),s.visibleChiplets.has(R)!==j&&(U=!0)}}}),_(),Mt(),s.pinsLayer&&s.map.hasLayer(s.pinsLayer)&&s.pinsLayer.refreshTiles();for(let{def:q,layer:R}of s.overlayLayers||[])Es(q.layers_by,e)&&s.map.hasLayer(R)&&R.refreshTiles();let W=M.filter(q=>!s.visibleLayers.has(q));try{window.sessionStorage.setItem("or_hidden_layers",JSON.stringify(W))}catch{}s.syncDisplayState(),U?b.mirrorStates(H):F&&(b.mirrorStatesQuiet(H),b.forEach(q=>{q.cb&&(q.cb.checked=q.checked,q.cb.indeterminate=q.indeterminate)}))});s.layerModel=tt,tt.addFromSpec(it);let Ct=new Le(()=>{s.selectableLayers.clear(),Ct.forEach(H=>{H.checked&&H.data&&H.data.name&&s.selectableLayers.add(H.data.name)}),Mt();let M=r.layers.filter(H=>!s.selectableLayers.has(H));try{window.sessionStorage.setItem("or_nonselectable_layers",JSON.stringify(M))}catch{}s.syncDisplayState()});Ct.addFromSpec(nt);function Mt(){Ct.forEach(M=>{if(!M.selCb)return;M.selCb.checked=M.checked,M.selCb.indeterminate=M.indeterminate;let H=tt.get(M.id),F=H&&!H.checked&&!H.indeterminate;M.selCb.disabled=F})}let It=document.createElement("div");It.className="context-menu",It.style.display="none",document.body.appendChild(It);function Nt(M){let H={};w.forEach((F,U)=>{F&&(H[F]=M.has(U))}),tt.checkSet(H)}function Yt(){It.style.display="none"}function rt(M,H){let F=document.createElement("div");F.className="context-menu-item",F.textContent=M,F.addEventListener("click",()=>{H(),Yt()}),It.appendChild(F)}let ye=v.length,at=[{label:"Show only this layer",fn:M=>Sn(M,0,0,ye)},{label:"Show layer range \u2195",fn:M=>Sn(M,1,1,ye)},{label:"Show layer range \u2195\u2195",fn:M=>Sn(M,2,2,ye)},{label:"Show layer range \u2193",fn:M=>Sn(M,1,0,ye)},{label:"Show layer range \u2191",fn:M=>Sn(M,0,1,ye)}];document.addEventListener("click",M=>{It.contains(M.target)||Yt()}),document.addEventListener("keydown",M=>{M.key==="Escape"&&Yt()});let kt=!wt(s),Ot=null;function Wt(){Ot&&(Ot.classList.remove("vis-row-selected"),Ot=null)}kt&&$a(s,Wt);function At(M,H,F){let U=ae(s);Ot=M,M.classList.add("vis-row-selected");let O={type:"select_layer",layer:H,use_dbu:s.showDbu};F&&(O.chiplet=F),s.websocketManager.request(O).then(W=>{he(s,U)&&(s.updateInspector&&s.updateInspector(W),s.focusComponent&&s.focusComponent("Inspector"),s.refreshOverlay&&s.refreshOverlay())}).catch(W=>{console.error("select_layer failed:",W),he(s,U)&&Wt()})}function yt(M,H=!1){let F=Ct.get(M.id);if(!M.children||M.children.length===0){let U=document.createElement("div");U.className=kt?"vis-leaf vis-leaf-selectable":"vis-leaf";let O=document.createElement("span");O.className="vis-arrow",O.style.visibility="hidden",O.textContent="\u25B6",U.appendChild(O);let W=M.data.colorIndex,q=M.data.name,R=Xi(),X=document.createElement("span");X.className="layer-color";let j=M.data.color||r.layer_colors&&r.layer_colors[W]||Rl[W%Rl.length];X.style.backgroundColor=`rgb(${j[0]},${j[1]},${j[2]})`,R.appendChild(X),R.appendChild(document.createTextNode(q)),U.appendChild(R),kt&&R.addEventListener("click",()=>{At(U,q,M.data.ownerChipletPath)});let vt=document.createElement("input");if(vt.type="checkbox",vt.className="vis-cb",vt.title="Visible",vt.checked=M.checked,M.cb=vt,vt.addEventListener("change",()=>{tt.check(M.id,vt.checked)}),U.appendChild(vt),F){let mt=document.createElement("input");mt.type="checkbox",mt.className="vis-sel-cb",mt.title="Selectable",mt.checked=F.checked,F.selCb=mt,mt.addEventListener("change",()=>{Ct.check(M.id,mt.checked)}),U.appendChild(mt)}else U.appendChild(Je());return U.addEventListener("contextmenu",mt=>{mt.preventDefault(),mt.stopPropagation(),It.innerHTML="";for(let Ht of at)rt(Ht.label,()=>Nt(Ht.fn(W)));let St=document.createElement("div");St.className="context-menu-separator",St.style.borderTop="1px solid #555",St.style.margin="4px 0",It.appendChild(St);let Tt=s.layerPatterns[q]??1;for(let Ht of Z){let ce=Tt===Ht.value?"\u25CF ":" ";rt(ce+"Fill: "+Ht.label,()=>T(q,M.data.layer,Ht.value))}It.style.left=mt.clientX+"px",It.style.top=mt.clientY+"px",It.style.display="block"}),U}else{let U=document.createElement("div");U.className="vis-group";let{header:O,arrow:W,name:q}=fi();q.textContent=H?"Layers":M.data.name||"Group";let R=document.createElement("input");if(R.type="checkbox",R.className="vis-cb",R.title="Visible",R.checked=M.checked,R.indeterminate=M.indeterminate,M.cb=R,R.addEventListener("change",()=>{tt.check(M.id,R.checked)}),O.appendChild(R),F){let j=document.createElement("input");j.type="checkbox",j.className="vis-sel-cb",j.title="Selectable",j.checked=F.checked,j.indeterminate=F.indeterminate,F.selCb=j,j.addEventListener("change",()=>{Ct.check(M.id,j.checked)}),O.appendChild(j)}else O.appendChild(Je());U.appendChild(O);let X=document.createElement("div");X.className="vis-group-children";for(let j of M.children)X.appendChild(yt(j,!1));return U.appendChild(X),mi(O,W,X,!!(M.data&&M.data.startCollapsed)),U}}let ft=tt.roots[0]||tt.get("layers_parent"),le=yt(ft,!0);s.displayControlsEl.appendChild(le),Mt();let ie=r&&Array.isArray(r.chiplets)?r.chiplets:[];if(ie.length>1){let X=function(K,st){let lt=R.get(K);lt&&(tt.cascadeQuiet(lt.id,st),tt.onChange())},ce=function(K){let st=K.data;if(K!==Tt){let lt=document.createElement("div");lt.className="vis-leaf",lt.style.paddingLeft=8*(st.depth-1)+"px",lt.title=st.path+(st.master?` (${st.master})`:""),lt.appendChild(Xi(st.name));let Dt=document.createElement("input");Dt.type="checkbox",Dt.className="vis-cb",Dt.checked=K.checked,Dt.indeterminate=K.indeterminate,K.cb=Dt,Dt.addEventListener("change",()=>{b.check(K.id,Dt.checked),X(st.path,Dt.checked)}),lt.appendChild(Dt),lt.appendChild(Je()),Ht.appendChild(lt)}K.children&&K.children.forEach(ce)},M=r&&r.block_name||"",H=M!=="",F={};if(H)try{let K=Vt("or_hidden_chiplets");if(K){let st=JSON.parse(decodeURIComponent(K));st&&typeof st=="object"&&!Array.isArray(st)&&(F=st)}}catch{}let U=new Set(Array.isArray(F[M])?F[M]:[]),O=Od(ie,U),W=O.findIndex(K=>K.parentId===null),q=W>=0?O[W].id:null;if(W>=0&&(O[W].hasCheckbox=!0),s.visibleChiplets=new Set(ie.filter(K=>!U.has(K.path)).map(K=>K.path)),b=new Le(()=>{let K=new Set;if(b.forEach(st=>{st.cb&&(st.cb.checked=st.checked,st.cb.indeterminate=st.indeterminate),st.data&&st.data.path&&(st.checked||st.indeterminate)&&K.add(st.data.path)}),s.visibleChiplets=K,H){let st=ie.filter(Dt=>!K.has(Dt.path)).map(Dt=>Dt.path),lt={};try{let Dt=Vt("or_hidden_chiplets");if(Dt){let oe=JSON.parse(decodeURIComponent(Dt));oe&&typeof oe=="object"&&!Array.isArray(oe)&&(lt=oe)}}catch{}st.length===0?delete lt[M]:lt[M]=st,Qt("or_hidden_chiplets",encodeURIComponent(JSON.stringify(lt)))}l()}),b.buildFromNodes(O),typeof console<"u"&&console.warn){let K=new Set;tt.forEach(lt=>{lt.data&<.data.chipletPath&&K.add(lt.data.chipletPath)});let st=new Set;b.forEach(lt=>{lt.data&<.data.path&&st.add(lt.data.path)});for(let lt of st)K.has(lt)||console.warn(`[display-controls] chiplet "${lt}" missing from layer_hierarchy \u2014 Layers/Chiplets sync may drift`);for(let lt of K)st.has(lt)||console.warn(`[display-controls] layer hierarchy node "${lt}" has no matching chiplet \u2014 Layers/Chiplets sync may drift`)}let R=new Map;tt.forEach(K=>{K.data&&K.data.chipletPath&&R.set(K.data.chipletPath,K)});{let K={};if(tt.forEach(st=>{if(!st.data||!st.data.chipletPath)return;let lt=st.data.chipletPath;U.has(lt)||b.get(lt)&&(K[lt]={checked:st.checked,indeterminate:st.indeterminate})}),Object.keys(K).length>0){b.mirrorStatesQuiet(K);let st=new Set;b.forEach(lt=>{lt.data&<.data.path&&(lt.checked||lt.indeterminate)&&st.add(lt.data.path)}),s.visibleChiplets=st}}let j=document.createElement("div");j.className="vis-group";let{header:vt,arrow:mt,name:St}=fi();St.textContent="Chiplets";let Tt=q!=null?b.get(q):null;if(Tt){let K=document.createElement("input");K.type="checkbox",K.className="vis-cb",K.checked=Tt.checked,K.indeterminate=Tt.indeterminate,Tt.cb=K,K.addEventListener("change",st=>{st.stopPropagation(),b.check(q,K.checked),Tt.data&&Tt.data.path&&X(Tt.data.path,K.checked)}),vt.appendChild(K)}vt.appendChild(Je()),j.appendChild(vt);let Ht=document.createElement("div");Ht.className="vis-group-children",b.roots.forEach(ce),j.appendChild(Ht),mi(vt,mt,Ht,!1),s.displayControlsEl.appendChild(j)}else s.visibleChiplets=null;let Ft=!!e.debug_renderers,ee=new Ms(e,i,()=>{l(),!!e.debug_renderers!==Ft&&(Ft=!!e.debug_renderers,s.refreshRendererControls&&s.refreshRendererControls())});ee.add({label:"Nets",addSelectable:!0,children:[{key:"net_signal",label:"Signal"},{key:"net_power",label:"Power"},{key:"net_ground",label:"Ground"},{key:"net_clock",label:"Clock"},{key:"net_reset",label:"Reset"},{key:"net_tieoff",label:"Tie off"},{key:"net_scan",label:"Scan"},{key:"net_analog",label:"Analog"}]}),ee.add({label:"Instances",addSelectable:!0,children:[{label:"Std Cells",visKey:"stdcells",disabled:!s.hasLiberty,children:[{label:"Bufs/Invs",children:[{key:"std_bufinv_timing",label:"Timing opt."},{key:"std_bufinv",label:"Netlist"}]},{key:"std_combinational",label:"Combinational"},{key:"std_sequential",label:"Sequential"},{label:"Clock tree",children:[{key:"std_clock_bufinv",label:"Buffer/Inverter"},{key:"std_clock_gate",label:"Clock gate"}]},{key:"std_level_shift",label:"Level shifter"}]},{key:"macros",label:"Macros"},{label:"Pads",children:[{key:"pad_input",label:"Input"},{key:"pad_output",label:"Output"},{key:"pad_inout",label:"Inout"},{key:"pad_power",label:"Power"},{key:"pad_spacer",label:"Spacer"},{key:"pad_areaio",label:"Area IO"},{key:"pad_other",label:"Other"}]},{label:"Physical",children:[{key:"phys_fill",label:"Fill"},{key:"phys_endcap",label:"Endcap"},{key:"phys_welltap",label:"Welltap"},{key:"phys_tie",label:"Tie Hi/Lo"},{key:"phys_antenna",label:"Antenna"},{key:"phys_cover",label:"Cover"},{key:"phys_bump",label:"Bump"},{key:"phys_other",label:"Other"}]}]}),ee.add({label:"Blockages",addSelectable:!0,children:[{key:"placement_blockages",label:"Placement"},{key:"routing_obstructions",label:"Routing"}]}),r.sites&&r.sites.length>0&&ee.add({label:"Rows",visKey:"rows",addSelectable:!0,children:r.sites.map(M=>({key:"site_"+M,label:M}))}),ee.add({label:"Tracks",children:[{key:"tracks_pref",label:"Pref"},{key:"tracks_non_pref",label:"Non Pref"}]}),ee.add({label:"Shapes",children:[{label:"Routing",visKey:"routing",children:[{key:"routing_segments",label:"Segments"},{key:"routing_vias",label:"Vias"}]},{label:"Special Routing",visKey:"special_nets",children:[{key:"srouting_segments",label:"Segments"},{key:"srouting_vias",label:"Vias"}]},{key:"pins",label:"Pins",selectable:!0},{key:"pin_names",label:"Pin Names",disabledBy:"pins"},{key:"fills",label:"Fills"}]}),ee.add({label:"Misc",children:[{label:"Instances",children:[{key:"inst_names",label:"Names"},{key:"inst_pins",label:"Pins",selectable:!0},{key:"inst_pin_names",label:"Pin Names",disabledBy:"inst_pins"},{key:"blockages",label:"Blockages"}]},{key:"detailed",label:"Detailed view"},{key:"rulers",label:"Rulers"},{key:"labels",label:"Labels"},{key:"scale_bar",label:"Scale bar"},{key:"access_points",label:"Access Points"},{key:"regions",label:"Regions"},{key:"mfg_grid",label:"Manufacturing grid"},{key:"gcell_grid",label:"GCell grid"},{key:"flywires_only",label:"Flywires only"},{key:"focused_nets_guides",label:"Focused nets guides"},{key:"highlight_selected",label:"Highlight selected"}]}),ee.add({key:"module_view",label:"Module view"}),ee.add({label:"Debug Graphics",children:[{key:"debug_renderers",label:"Renderers"},{key:"debug_live",label:"Live (don't require pause)",disabledBy:"debug_renderers"},{key:"debug",label:"Tiles"}]}),ee.render(s.displayControlsEl);let fe=document.createElement("div");fe.className="renderer-controls",s.displayControlsEl.appendChild(fe);function k(M){return Promise.all(M.map(({path:H,value:F})=>s.websocketManager.request({type:"set_renderer_control",path:H,value:F}))).catch(()=>{})}function $(M){fe.innerHTML="";let H=new Map;for(let F of M||[]){let U=F.group||"";H.has(U)||H.set(U,[]),H.get(U).push(F)}for(let[F,U]of H){let O=fe;if(F){let W=document.createElement("div");W.className="vis-group";let{header:q,arrow:R,name:X}=fi();X.textContent=F;let j=document.createElement("input");j.type="checkbox",j.className="vis-cb",j.title="Visible";let vt=U.filter(St=>St.visible).length;j.checked=vt===U.length,j.indeterminate=vt>0&&vt{let St=j.checked;k(U.filter(Tt=>!!Tt.visible!==St).map(Tt=>({path:Tt.path,value:St})))}),q.appendChild(j),q.appendChild(Je()),W.appendChild(q);let mt=document.createElement("div");mt.className="vis-group-children",W.appendChild(mt),mi(q,R,mt,!1),fe.appendChild(W),O=mt}for(let W of U){let q=document.createElement("div");q.className="vis-leaf";let R=document.createElement("span");R.className="vis-arrow",R.style.visibility="hidden",R.textContent="\u25B6",q.appendChild(R),q.appendChild(Xi(W.name));let X=document.createElement("input");X.type="checkbox",X.className="vis-cb",X.title="Visible",X.checked=!!W.visible,X.addEventListener("change",()=>k([{path:W.path,value:X.checked}])),q.appendChild(X),q.appendChild(Je()),O.appendChild(q)}}}s.refreshRendererControls=function(){return!s.websocketManager||wt(s)||!e.debug_renderers?(fe.innerHTML="",Promise.resolve()):s.websocketManager.request({type:"renderer_controls"}).then(M=>$(M.controls)).catch(()=>{})},s.refreshRendererControls();let D=document.createElement("div");D.className="bg-color-row";let Y=document.createElement("span");Y.textContent="Background";let A=document.createElement("input");A.type="color",A.className="bg-color-input",A.title="Layout background color";let J=Vt("or_bg_color");A.value=Ui(J)?J:qo(),A.addEventListener("input",()=>{document.documentElement.style.setProperty("--bg-map",A.value)}),A.addEventListener("change",()=>{bl(A.value,s)});let I=document.createElement("button");I.className="bg-color-reset",I.textContent="Reset",I.title="Reset background to the theme default",I.addEventListener("click",()=>{wl(s),A.value=qo()}),D.appendChild(Y),D.appendChild(A),D.appendChild(I),s.heatMapLayer||(s.heatMapLayer=new h(s.websocketManager,s,{zIndex:v.length+10,opacity:1}));let z=document.createElement("div");z.className="vis-group heatmap-controls",s.displayControlsEl.appendChild(z);let{header:ct,arrow:Lt,name:Xt}=fi("vis-group-header heatmap-header");Xt.textContent="Heat Maps",z.appendChild(ct);let zt=document.createElement("div");zt.className="vis-group-children heatmap-group-children",z.appendChild(zt),mi(ct,Lt,zt,!0),s.displayControlsEl.appendChild(D);function jt(M,H,F,U){let O=document.createElement("label");O.className="heatmap-setting";let W=document.createElement("input");W.type="checkbox",W.checked=F,W.addEventListener("change",()=>U(W.checked)),O.appendChild(W),O.appendChild(document.createTextNode(H)),M.appendChild(O)}function Se(M,H,F,U,O){let W=document.createElement("label");W.className="heatmap-setting";let q=document.createElement("span");q.textContent=H;let R=document.createElement("input");R.type="number",R.value=String(F),R.step=String(U||1),R.addEventListener("change",()=>O(parseFloat(R.value))),W.appendChild(q),W.appendChild(R),M.appendChild(W)}function Ue(M,H,F,U,O){let W=document.createElement("label");W.className="heatmap-setting";let q=document.createElement("span");q.textContent=H;let R=document.createElement("select");for(let X of U){let j=document.createElement("option");j.value=X,j.textContent=X,X===F&&(j.selected=!0),R.appendChild(j)}R.addEventListener("change",()=>O(R.value)),W.appendChild(q),W.appendChild(R),M.appendChild(W)}function Bt(M){s.websocketManager.request(M).then(H=>{s.updateHeatMaps&&s.updateHeatMaps(H)}).catch(H=>console.error("Heat map update failed",H))}function ii(M){if(!s.heatMapLegendEl)return;let H=s.heatMapLegendEl;if(H.innerHTML="",!M||!M.show_legend||!M.legend||M.legend.length===0){H.classList.add("hidden");return}let F=document.createElement("div");F.className="heatmap-map-legend-title",F.textContent=M.title,H.appendChild(F);let U=document.createElement("div");U.className="heatmap-map-legend-units",U.textContent=M.units||"",H.appendChild(U);let O=document.createElement("div");O.className="heatmap-map-legend-list";for(let W of M.legend){let q=document.createElement("div");q.className="heatmap-legend-row";let R=document.createElement("span");R.className="heatmap-legend-swatch",R.style.backgroundColor=`rgba(${W.color[0]}, ${W.color[1]}, ${W.color[2]}, ${W.color[3]/255})`;let X=document.createElement("span");X.textContent=W.value,q.appendChild(R),q.appendChild(X),O.appendChild(q)}H.appendChild(O),H.classList.remove("hidden")}s.renderHeatMapControls=M=>{zt.innerHTML="";let H=document.createElement("div");H.className="heatmap-list",zt.appendChild(H);let F=document.createElement("label");F.className="heatmap-setting";let U=document.createElement("input");U.type="radio",U.name="active-heatmap",U.checked=!M.active,U.addEventListener("change",()=>{Bt({type:"set_active_heatmap",name:""})}),F.appendChild(U),F.appendChild(document.createTextNode("Off")),H.appendChild(F);for(let R of M.heatmaps||[]){let X=document.createElement("label");X.className="heatmap-setting";let j=document.createElement("input");j.type="radio",j.name="active-heatmap",j.checked=R.name===M.active,j.addEventListener("change",()=>{Bt({type:"set_active_heatmap",name:R.name})}),X.appendChild(j),X.appendChild(document.createTextNode(R.title)),H.appendChild(X)}let O=(M.heatmaps||[]).find(R=>R.name===M.active);if(ii(O),!O)return;let W=document.createElement("div");W.className="heatmap-settings",zt.appendChild(W),Se(W,"Display min",O.display_min,O.display_range_increment,R=>{Bt({type:"set_heatmap",name:O.name,option:"DisplayMin",value:R})}),Se(W,"Display max",O.display_max,O.display_range_increment,R=>{Bt({type:"set_heatmap",name:O.name,option:"DisplayMax",value:R})}),jt(W,"Show below min",O.draw_below_min,R=>{Bt({type:"set_heatmap",name:O.name,option:"ShowMin",value:R})}),jt(W,"Show above max",O.draw_above_max,R=>{Bt({type:"set_heatmap",name:O.name,option:"ShowMax",value:R})}),jt(W,"Log scale",O.log_scale,R=>{Bt({type:"set_heatmap",name:O.name,option:"LogScale",value:R})}),jt(W,"Reverse log",O.reverse_log,R=>{Bt({type:"set_heatmap",name:O.name,option:"ReverseLog",value:R})}),O.can_adjust_grid&&(Se(W,"Grid X",O.grid_x,.1,R=>{Bt({type:"set_heatmap",name:O.name,option:"GridX",value:R})}),Se(W,"Grid Y",O.grid_y,.1,R=>{Bt({type:"set_heatmap",name:O.name,option:"GridY",value:R})})),Se(W,"Alpha",O.alpha,1,R=>{Bt({type:"set_heatmap",name:O.name,option:"Alpha",value:R})}),jt(W,"Legend",O.show_legend,R=>{Bt({type:"set_heatmap",name:O.name,option:"ShowLegend",value:R})}),O.supports_numbers&&jt(W,"Show numbers",O.show_numbers,R=>{Bt({type:"set_heatmap",name:O.name,option:"ShowNumbers",value:R})});for(let R of O.options||[])R.type==="bool"?jt(W,R.label,R.value,X=>{Bt({type:"set_heatmap",name:O.name,option:R.name,value:X})}):R.type==="choice"&&Ue(W,R.label,R.value,R.choices||[],X=>{Bt({type:"set_heatmap",name:O.name,option:R.name,value:X})});O.selection_filter_label&&jt(W,O.selection_filter_label,O.use_selected_only,R=>{Bt({type:"set_heatmap",name:O.name,option:"use_selected_only",value:R})});let q=document.createElement("button");q.className="or-btn or-btn-sm heatmap-rebuild",q.textContent="Rebuild data",q.addEventListener("click",()=>{Bt({type:"set_heatmap",name:O.name,option:"rebuild",value:1})}),W.appendChild(q)}}var zl="search-nav-dialog",zd=[{label:"Instance",value:"inst"},{label:"Net",value:"net"},{label:"Port",value:"port"}];function Ts(s){if(!s.designScale)return;let e=zd.map(y=>``).join(""),{overlay:i,close:o,okBtn:r,showError:l}=Gi("Find Object",`
`,"Find",bl),h=i.querySelector(".sn-pattern"),u=i.querySelector(".sn-type"),f=i.querySelector(".sn-case");h.focus();function _(){let y=h.value.trim();if(!y){l("Enter a name or glob pattern.");return}s.websocketManager&&(l("Searching\u2026",!0),s.websocketManager.request({type:"find",obj_type:u.value,pattern:y,match_case:f.checked}).then(g=>{$i(s,g);let b=g&&g.count?g.count:0;if(!b){l("No objects found.");return}Array.isArray(g.bbox)&&(s.lastSelectionBounds=Ut(g.bbox[0],g.bbox[1],g.bbox[2],g.bbox[3],s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY),s.map.fitBounds(s.lastSelectionBounds)),typeof s.updateInspector=="function"&&s.updateInspector(g),typeof s.redrawAllLayers=="function"&&s.redrawAllLayers();let w=g.selection_count||b;l(g.truncated?`${b} found (showing first ${w}).`:`${b} found.`,!0)}).catch(g=>l("Find failed: "+g)))}return r.addEventListener("click",_),h.addEventListener("keydown",y=>{y.key==="Enter"&&(y.preventDefault(),_())}),{close:o}}function ys(s){if(!s.designScale||!s.map)return;let e=v=>s.formatDbu(v),i=v=>s.parseDbu(v),o=s.unitLabel(),r=s.map.getCenter(),l=we(r.lat,r.lng,s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY),{overlay:h,close:u,okBtn:f,showError:_}=qi("Go to Position",` + `,"Find",zl),h=i.querySelector(".sn-pattern"),u=i.querySelector(".sn-type"),f=i.querySelector(".sn-case");h.focus();function _(){let y=h.value.trim();if(!y){l("Enter a name or glob pattern.");return}s.websocketManager&&(l("Searching\u2026",!0),s.websocketManager.request({type:"find",obj_type:u.value,pattern:y,match_case:f.checked}).then(g=>{qi(s,g);let v=g&&g.count?g.count:0;if(!v){l("No objects found.");return}Array.isArray(g.bbox)&&(s.lastSelectionBounds=Gt(g.bbox[0],g.bbox[1],g.bbox[2],g.bbox[3],s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY),s.map.fitBounds(s.lastSelectionBounds)),typeof s.updateInspector=="function"&&s.updateInspector(g),typeof s.redrawAllLayers=="function"&&s.redrawAllLayers();let w=g.selection_count||v;l(g.truncated?`${v} found (showing first ${w}).`:`${v} found.`,!0)}).catch(g=>l("Find failed: "+g)))}return r.addEventListener("click",_),h.addEventListener("keydown",y=>{y.key==="Enter"&&(y.preventDefault(),_())}),{close:o}}function Ps(s){if(!s.designScale||!s.map)return;let e=b=>s.formatDbu(b),i=b=>s.parseDbu(b),o=s.unitLabel(),r=s.map.getCenter(),l=xe(r.lat,r.lng,s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY),{overlay:h,close:u,okBtn:f,showError:_}=Gi("Go to Position",`
-
`,"Go to",bl),y=h.querySelector(".sn-x"),g=h.querySelector(".sn-y"),b=h.querySelector(".sn-size");y.focus(),y.select();function w(){let v=i(y.value),S=i(g.value);if(v===null||S===null){_(`X and Y must be numbers (${o}).`);return}let R=Jt(v,S,s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY),I=b.value.trim(),T=I?i(I):null;if(T!==null&&T>0){let G=T/2;s.map.fitBounds(Ut(v-G,S-G,v+G,S+G,s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY))}else s.map.setView(R,s.map.getZoom());u()}f.addEventListener("click",w);for(let v of[y,g,b])v.addEventListener("keydown",S=>{S.key==="Enter"&&(S.preventDefault(),w())});return{close:u}}var wl={ctrl:"ctrl",control:"ctrl",shift:"shift",alt:"alt",meta:"meta",cmd:"meta",command:"meta",super:"meta"};function wd(s){if(typeof s!="string")return null;let e=s.split("+").map(l=>l.trim().toLowerCase()).filter(Boolean);if(e.length===0)return null;let i=e.pop();if(wl[i]!==void 0)return null;let o=new Set;for(let l of e){let h=wl[l];if(h===void 0)return null;o.add(h)}return[...["ctrl","alt","shift","meta"].filter(l=>o.has(l)),i].join("+")}function xd(s){let e=[];return s.ctrlKey&&e.push("ctrl"),s.altKey&&e.push("alt"),s.shiftKey&&e.push("shift"),s.metaKey&&e.push("meta"),[...e,String(s.key).toLowerCase()].join("+")}function Cl(s){let e=[{label:"File",items:[{label:"Open DB...",action:()=>xl(s,"Open DB","read_db"),enabledWhen:()=>!s.designScale},{label:"Save DB...",action:()=>xl(s,"Save DB","write_db"),enabledWhen:()=>!!s.designScale}]},{label:"View",items:[{label:"Fit",shortcut:"F",action:()=>{s.fitBounds&&s.map.fitBounds(s.fitBounds)}},{label:"Zoom In",shortcut:"Z",action:()=>s.map.zoomIn()},{label:"Zoom Out",shortcut:"Shift+Z",action:()=>s.map.zoomOut()},{type:"separator"},{label:"Toggle Theme",shortcut:"T",action:()=>s.toggleTheme()},{type:"separator"},{label:"Find...",shortcut:"Ctrl+F",action:()=>gs(s),enabledWhen:()=>!!s.designScale},{label:"Go to Position...",shortcut:"Shift+G",action:()=>ys(s),enabledWhen:()=>!!s.designScale}]},{label:"Tools",items:[{label:"Ruler",shortcut:"K",action:()=>{s.rulerManager&&s.rulerManager.toggleRulerMode()}},{label:"Clear Rulers",shortcut:"Shift+K",action:()=>{s.rulerManager&&s.rulerManager.clearAllRulers()}},{type:"separator"},{label:"Add Label",shortcut:"L",action:()=>{s.labelManager&&s.labelManager.toggleLabelMode()}},{label:"Clear Labels",action:()=>{s.labelManager&&s.labelManager.clearAllLabels()}},{type:"separator"},{label:"Clear Highlights",action:()=>{s.websocketManager.request({type:"clear_highlights",group:-1}).then(()=>{s.refreshOverlay&&s.refreshOverlay(),s.refreshInspector&&s.refreshInspector()}).catch(()=>{})}},{type:"separator"},{label:"Global Connect...",action:()=>{s.showGlobalConnectDialog&&s.showGlobalConnectDialog()},enabledWhen:()=>!!s.designScale}]},{label:"Options",items:[{label:"Show DBU",action:()=>s.toggleShowDbu(),checked:()=>s.showDbu},{label:"Make euclidian rulers",action:()=>s.toggleRulerStyle(),checked:()=>s.rulerStyle!=="manhattan"},{type:"separator"},{label:"Mouse wheel mapped to zoom by default",action:()=>s.toggleWheelZoom(),checked:()=>s.wheelZoom},{label:"Arrow keys scroll step...",action:()=>s.showArrowStepDialog()},{label:"Application font...",action:()=>s.showAppFontDialog()},{type:"separator"},{label:"Show polygon decomposition",action:()=>s.togglePolyDecomp(),checked:()=>s.polyDecomp,enabledWhen:()=>!!s.designScale}]},{label:"Windows",items:[{label:"Layout Viewer",action:()=>s.focusComponent("LayoutViewer")},{label:"3D Viewer",action:()=>s.focusComponent("3DViewer")},{label:"Display Controls",action:()=>s.focusComponent("DisplayControls")},{label:"Inspector",action:()=>s.focusComponent("Inspector")},{label:"Selection Browser",action:()=>s.focusComponent("SelectHighlight")},{label:"Tcl Console",action:()=>s.focusComponent("TclConsole")},{label:"Hierarchy Browser",action:()=>s.focusComponent("Browser")},{label:"Timing",action:()=>s.focusComponent("TimingWidget")},{label:"DRC Viewer",action:()=>s.focusComponent("DRCWidget")},{label:"Clock Tree",action:()=>s.focusComponent("ClockWidget")},{label:"Charts",action:()=>s.focusComponent("ChartsWidget")},{label:"Help",action:()=>s.focusComponent("HelpWidget")},{type:"separator"},{label:"Reset to Default Layout",action:()=>s.resetLayout()}]},{label:"Help",items:[{label:"Keyboard Shortcuts",action:()=>s.focusComponent("HelpWidget")}]}],i=document.getElementById("menu-bar"),o=null,r=new Map;function l(){o&&(o.classList.remove("open"),o=null)}function h(){let _=e.map(w=>({label:w.label,items:w.items.slice()})),y=new Map(_.map(w=>[w.label,w]));function g(w){let v=y.get(w);return v||(v={label:w,items:[]},y.set(w,v),_.push(v)),v}function b(w,v){let S=w.items.find(R=>R.submenu&&R.label===v);return S||(S={label:v,submenu:{label:v,items:[]}},w.items.push(S)),S.submenu}for(let w of s.customMenu||[]){let v=String(w.path||"Custom Scripts").split("/").map(T=>T.trim()).filter(Boolean);v.length===0&&v.push("Custom Scripts");let S=g(v[0]);for(let T=1;Tbn(s,w.script,w.echo);S.items.push({label:w.text,shortcut:w.shortcut,action:R});let I=wd(w.shortcut);I&&r.set(I,R)}return _}function u(_,y){for(let g of y){if(g.type==="separator"){let v=document.createElement("div");v.className="menu-separator",_.appendChild(v);continue}let b=document.createElement("div");if(b.className="menu-item",g.submenu){b.classList.add("submenu-item");let v=document.createElement("span");v.textContent=g.label,b.appendChild(v);let S=document.createElement("span");S.className="submenu-arrow",S.textContent="\u25B8",b.appendChild(S);let R=document.createElement("div");R.className="menu-dropdown submenu",u(R,g.submenu.items),b.appendChild(R),_.appendChild(b);continue}if(g.disabled&&b.classList.add("disabled"),g.enabledWhen&&(b._enabledWhen=g.enabledWhen),g.checked){let v=document.createElement("span");v.className="menu-check",v.textContent=g.checked()?"\u2713":"",b.appendChild(v),b._checkedFn=g.checked}let w=document.createElement("span");if(w.textContent=g.label,b.appendChild(w),g.shortcut){let v=document.createElement("span");v.className="shortcut",v.textContent=g.shortcut,b.appendChild(v)}g.action&&b.addEventListener("click",v=>{b.classList.contains("disabled")||(v.stopPropagation(),l(),g.action())}),_.appendChild(b)}}function f(){for(let y of i.querySelectorAll(":scope > .menu-label"))y.remove();let _=i.firstChild;o=null,r.clear();for(let y of h()){let w=function(){for(let v of b.querySelectorAll(".menu-item"))if(v._enabledWhen&&v.classList.toggle("disabled",!v._enabledWhen()),v._checkedFn){let S=v.querySelector(".menu-check");S&&(S.textContent=v._checkedFn()?"\u2713":"")}},g=document.createElement("div");g.className="menu-label",g.textContent=y.label;let b=document.createElement("div");b.className="menu-dropdown",u(b,y.items),g.appendChild(b),g.addEventListener("click",v=>{v.stopPropagation(),o===g?l():(l(),w(),g.classList.add("open"),o=g)}),g.addEventListener("mouseenter",()=>{o&&o!==g&&(l(),w(),g.classList.add("open"),o=g)}),i.insertBefore(g,_)}}f(),s.rebuildMenuBar=f,document.addEventListener("click",l),Cd(r)}function Cd(s){document.addEventListener("keydown",e=>{if(s.size===0)return;let i=e.target.tagName;if(i==="INPUT"||i==="TEXTAREA"||e.target.isContentEditable)return;let o=s.get(xd(e));o&&(e.preventDefault(),e.stopImmediatePropagation(),o())},!0)}function xl(s,e,i){let o=i==="write_db",r=document.createElement("div");r.className="modal-overlay",r.innerHTML=` +
`,"Go to",zl),y=h.querySelector(".sn-x"),g=h.querySelector(".sn-y"),v=h.querySelector(".sn-size");y.focus(),y.select();function w(){let b=i(y.value),C=i(g.value);if(b===null||C===null){_(`X and Y must be numbers (${o}).`);return}let B=Jt(b,C,s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY),P=v.value.trim(),T=P?i(P):null;if(T!==null&&T>0){let Z=T/2;s.map.fitBounds(Gt(b-Z,C-Z,b+Z,C+Z,s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY))}else s.map.setView(B,s.map.getZoom());u()}f.addEventListener("click",w);for(let b of[y,g,v])b.addEventListener("keydown",C=>{C.key==="Enter"&&(C.preventDefault(),w())});return{close:u}}var Hl={ctrl:"ctrl",control:"ctrl",shift:"shift",alt:"alt",meta:"meta",cmd:"meta",command:"meta",super:"meta"};function Hd(s){if(typeof s!="string")return null;let e=s.split("+").map(l=>l.trim().toLowerCase()).filter(Boolean);if(e.length===0)return null;let i=e.pop();if(Hl[i]!==void 0)return null;let o=new Set;for(let l of e){let h=Hl[l];if(h===void 0)return null;o.add(h)}return[...["ctrl","alt","shift","meta"].filter(l=>o.has(l)),i].join("+")}function $d(s){let e=[];return s.ctrlKey&&e.push("ctrl"),s.altKey&&e.push("alt"),s.shiftKey&&e.push("shift"),s.metaKey&&e.push("meta"),[...e,String(s.key).toLowerCase()].join("+")}function Fl(s){let e=y=>()=>s.focusComponent(y,{reveal:!0}),i=[{label:"File",items:[{label:"Open DB...",action:()=>$l(s,"Open DB","read_db"),enabledWhen:()=>!s.designScale},{label:"Save DB...",action:()=>$l(s,"Save DB","write_db"),enabledWhen:()=>!!s.designScale}]},{label:"View",items:[{label:"Fit",shortcut:"F",action:()=>{s.fitBounds&&s.map.fitBounds(s.fitBounds)}},{label:"Zoom In",shortcut:"Z",action:()=>s.map.zoomIn()},{label:"Zoom Out",shortcut:"Shift+Z",action:()=>s.map.zoomOut()},{type:"separator"},{label:"Toggle Theme",shortcut:"T",action:()=>s.toggleTheme()},{type:"separator"},{label:"Find...",shortcut:"Ctrl+F",action:()=>Ts(s),enabledWhen:()=>!!s.designScale},{label:"Go to Position...",shortcut:"Shift+G",action:()=>Ps(s),enabledWhen:()=>!!s.designScale}]},{label:"Tools",items:[{label:"Ruler",shortcut:"K",action:()=>{s.rulerManager&&s.rulerManager.toggleRulerMode()}},{label:"Clear Rulers",shortcut:"Shift+K",action:()=>{s.rulerManager&&s.rulerManager.clearAllRulers()}},{type:"separator"},{label:"Add Label",shortcut:"L",action:()=>{s.labelManager&&s.labelManager.toggleLabelMode()}},{label:"Clear Labels",action:()=>{s.labelManager&&s.labelManager.clearAllLabels()}},{type:"separator"},{label:"Clear Highlights",action:()=>{s.websocketManager.request({type:"clear_highlights",group:-1}).then(()=>{s.refreshOverlay&&s.refreshOverlay(),s.refreshInspector&&s.refreshInspector()}).catch(()=>{})}},{type:"separator"},{label:"Global Connect...",action:()=>{s.showGlobalConnectDialog&&s.showGlobalConnectDialog()},enabledWhen:()=>!!s.designScale}]},{label:"Options",items:[{label:"Show DBU",action:()=>s.toggleShowDbu(),checked:()=>s.showDbu},{label:"Make euclidian rulers",action:()=>s.toggleRulerStyle(),checked:()=>s.rulerStyle!=="manhattan"},{type:"separator"},{label:"Mouse wheel mapped to zoom by default",action:()=>s.toggleWheelZoom(),checked:()=>s.wheelZoom},{label:"Arrow keys scroll step...",action:()=>s.showArrowStepDialog()},{label:"Application font...",action:()=>s.showAppFontDialog()},{type:"separator"},{label:"Show polygon decomposition",action:()=>s.togglePolyDecomp(),checked:()=>s.polyDecomp,enabledWhen:()=>!!s.designScale}]},{label:"Windows",items:[{label:"Layout Viewer",action:e("LayoutViewer")},{label:"3D Viewer",action:e("3DViewer")},{label:"Display Controls",action:e("DisplayControls")},{label:"Inspector",action:e("Inspector")},{label:"Selection Browser",action:e("SelectHighlight")},{label:"Tcl Console",action:e("TclConsole")},{label:"Hierarchy Browser",action:e("Browser")},{label:"Timing",action:e("TimingWidget")},{label:"DRC Viewer",action:e("DRCWidget")},{label:"Clock Tree",action:e("ClockWidget")},{label:"Charts",action:e("ChartsWidget")},{label:"Help",action:e("HelpWidget")},{type:"separator"},{label:"Reset to Default Layout",action:()=>s.resetLayout()}]},{label:"Help",items:[{label:"Keyboard Shortcuts",action:e("HelpWidget")}]}],o=document.getElementById("menu-bar"),r=null,l=new Map;function h(){r&&(r.classList.remove("open"),r=null)}function u(){let y=i.map(b=>({label:b.label,items:b.items.slice()})),g=new Map(y.map(b=>[b.label,b]));function v(b){let C=g.get(b);return C||(C={label:b,items:[]},g.set(b,C),y.push(C)),C}function w(b,C){let B=b.items.find(P=>P.submenu&&P.label===C);return B||(B={label:C,submenu:{label:C,items:[]}},b.items.push(B)),B.submenu}for(let b of s.customMenu||[]){let C=String(b.path||"Custom Scripts").split("/").map(Z=>Z.trim()).filter(Boolean);C.length===0&&C.push("Custom Scripts");let B=v(C[0]);for(let Z=1;Zwn(s,b.script,b.echo);B.items.push({label:b.text,shortcut:b.shortcut,action:P});let T=Hd(b.shortcut);T&&l.set(T,P)}return y}function f(y,g){for(let v of g){if(v.type==="separator"){let C=document.createElement("div");C.className="menu-separator",y.appendChild(C);continue}let w=document.createElement("div");if(w.className="menu-item",v.submenu){w.classList.add("submenu-item");let C=document.createElement("span");C.textContent=v.label,w.appendChild(C);let B=document.createElement("span");B.className="submenu-arrow",B.textContent="\u25B8",w.appendChild(B);let P=document.createElement("div");P.className="menu-dropdown submenu",f(P,v.submenu.items),w.appendChild(P),y.appendChild(w);continue}if(v.disabled&&w.classList.add("disabled"),v.enabledWhen&&(w._enabledWhen=v.enabledWhen),v.checked){let C=document.createElement("span");C.className="menu-check",C.textContent=v.checked()?"\u2713":"",w.appendChild(C),w._checkedFn=v.checked}let b=document.createElement("span");if(b.textContent=v.label,w.appendChild(b),v.shortcut){let C=document.createElement("span");C.className="shortcut",C.textContent=v.shortcut,w.appendChild(C)}v.action&&w.addEventListener("click",C=>{w.classList.contains("disabled")||(C.stopPropagation(),h(),v.action())}),y.appendChild(w)}}function _(){for(let g of o.querySelectorAll(":scope > .menu-label"))g.remove();let y=o.firstChild;r=null,l.clear();for(let g of u()){let b=function(){for(let C of w.querySelectorAll(".menu-item"))if(C._enabledWhen&&C.classList.toggle("disabled",!C._enabledWhen()),C._checkedFn){let B=C.querySelector(".menu-check");B&&(B.textContent=C._checkedFn()?"\u2713":"")}},v=document.createElement("div");v.className="menu-label",v.textContent=g.label;let w=document.createElement("div");w.className="menu-dropdown",f(w,g.items),v.appendChild(w),v.addEventListener("click",C=>{C.stopPropagation(),r===v?h():(h(),b(),v.classList.add("open"),r=v)}),v.addEventListener("mouseenter",()=>{r&&r!==v&&(h(),b(),v.classList.add("open"),r=v)}),o.insertBefore(v,y)}}_(),s.rebuildMenuBar=_,document.addEventListener("click",h),Fd(l)}function Fd(s){document.addEventListener("keydown",e=>{if(s.size===0)return;let i=e.target.tagName;if(i==="INPUT"||i==="TEXTAREA"||e.target.isContentEditable)return;let o=s.get($d(e));o&&(e.preventDefault(),e.stopImmediatePropagation(),o())},!0)}function $l(s,e,i){let o=i==="write_db",r=document.createElement("div");r.className="modal-overlay",r.innerHTML=` - `,document.body.appendChild(r);let l=r.querySelector(".fb-breadcrumb"),h=r.querySelector(".fb-file-list"),u=r.querySelector(".fb-path-input"),f=r.querySelector(".modal-error"),_=r.querySelector(".ok"),y=r.querySelector(".cancel"),g="",b=null;function w(){r.remove()}function v(){let G=u.value.trim();_.disabled=!G}function S(G){l.innerHTML="";let U=G.split("/").filter(Boolean),dt=document.createElement("span");dt.className="fb-crumb",dt.textContent="/",dt.addEventListener("click",()=>I("/")),l.appendChild(dt);let gt="";for(let it of U){gt+="/"+it;let Q=document.createElement("span");Q.className="fb-crumb-sep",Q.textContent=" / ",l.appendChild(Q);let nt=document.createElement("span");nt.className="fb-crumb",nt.textContent=it;let tt=gt;nt.addEventListener("click",()=>I(tt)),l.appendChild(nt)}}function R(G){if(h.innerHTML="",b=null,!G||G.length===0){let U=document.createElement("div");U.className="fb-empty",U.textContent="(empty directory)",h.appendChild(U);return}for(let U of G){let dt=document.createElement("div");dt.className="fb-entry",U.is_dir&&dt.classList.add("fb-dir");let gt=document.createElement("span");gt.className="fb-icon",gt.textContent=U.is_dir?"\u{1F4C1}":"\u{1F4C4}",dt.appendChild(gt);let it=document.createElement("span");if(it.className="fb-name",it.textContent=U.name,dt.appendChild(it),!U.is_dir&&U.size!==void 0){let Q=document.createElement("span");Q.className="fb-size",Q.textContent=kd(U.size),dt.appendChild(Q)}U.is_dir?dt.addEventListener("click",()=>{I(g+"/"+U.name)}):(dt.addEventListener("click",()=>{let Q=h.querySelector(".fb-selected");Q&&Q.classList.remove("fb-selected"),dt.classList.add("fb-selected"),b=U,u.value=g+"/"+U.name,v()}),dt.addEventListener("dblclick",()=>{u.value=g+"/"+U.name,v(),T()})),h.appendChild(dt)}}async function I(G){f.style.display="none",h.innerHTML='
Loading...
';try{let U=await s.websocketManager.request({type:"list_dir",path:G||""});if(g=U.path,S(U.path),R(U.entries),o){let gt=u.value.trim().split("/").pop();gt&&!gt.includes("/")?u.value=g+"/"+gt:u.value=g+"/"}else u.value="",b=null;v()}catch(U){h.innerHTML="",f.textContent=U.message||String(U),f.style.display=""}}async function T(){let G=u.value.trim();if(G){_.disabled=!0,_.textContent="Working...",f.style.display="none";try{let U=await s.websocketManager.request({type:"tcl_eval",cmd:`${i} ${G}`});if(U.is_error){f.textContent=U.output||U.result||"Command failed",f.style.display="",_.disabled=!1,_.textContent=o?"Save":"Open";return}if(w(),i==="read_db"){window.location.reload();return}}catch(U){f.textContent=U.message||"Request failed",f.style.display="",_.disabled=!1,_.textContent=o?"Save":"Open"}}}u.addEventListener("input",v),u.addEventListener("keydown",G=>{if(G.key==="Enter"){let U=u.value.trim();U.endsWith("/")?I(U.replace(/\/+$/,"")||"/"):T()}G.key==="Escape"&&w()}),_.addEventListener("click",T),y.addEventListener("click",w),r.addEventListener("click",G=>{G.target===r&&w()}),I("")}function kd(s){return s<1024?s+" B":s<1024*1024?(s/1024).toFixed(1)+" KB":s<1024*1024*1024?(s/(1024*1024)).toFixed(1)+" MB":(s/(1024*1024*1024)).toFixed(1)+" GB"}function kl(s){let e=document.getElementById("toolbar");if(!e)return;s._toolbarToggleState||(s._toolbarToggleState={});function i(){e.innerHTML="";let o=s.customToolbar||[],r=new Set(o.map(l=>l.key));for(let l of Object.keys(s._toolbarToggleState))r.has(l)||delete s._toolbarToggleState[l];for(let l of o){let h=document.createElement("button");if(h.className="or-btn or-btn-sm toolbar-button",h.dataset.key=l.key,l.tooltip&&(h.title=l.tooltip),l.icon){let u=document.createElement("span");if(u.className="toolbar-icon",/^(data:|https?:|\.?\/)/.test(l.icon)){let f=document.createElement("img");f.src=l.icon,f.alt="",u.appendChild(f)}else u.textContent=l.icon;h.appendChild(u)}if(l.text){let u=document.createElement("span");u.className="toolbar-label",u.textContent=l.text,h.appendChild(u)}l.toggle&&s._toolbarToggleState[l.key]&&h.classList.add("active"),h.addEventListener("click",()=>{if(l.toggle){let u=!s._toolbarToggleState[l.key];s._toolbarToggleState[l.key]=u,h.classList.toggle("active",u),bn(s,u?l.script:l.script_off,l.echo)}else bn(s,l.script,l.echo)}),e.appendChild(h)}}return i(),s.rebuildToolbar=i,{rebuild:i}}function Sl(s,e=""){let i=document.createElement("div");i.className="modal-overlay",i.innerHTML=` + `,document.body.appendChild(r);let l=r.querySelector(".fb-breadcrumb"),h=r.querySelector(".fb-file-list"),u=r.querySelector(".fb-path-input"),f=r.querySelector(".modal-error"),_=r.querySelector(".ok"),y=r.querySelector(".cancel"),g="",v=null;function w(){r.remove()}function b(){let Z=u.value.trim();_.disabled=!Z}function C(Z){l.innerHTML="";let G=Z.split("/").filter(Boolean),dt=document.createElement("span");dt.className="fb-crumb",dt.textContent="/",dt.addEventListener("click",()=>P("/")),l.appendChild(dt);let gt="";for(let it of G){gt+="/"+it;let Q=document.createElement("span");Q.className="fb-crumb-sep",Q.textContent=" / ",l.appendChild(Q);let nt=document.createElement("span");nt.className="fb-crumb",nt.textContent=it;let tt=gt;nt.addEventListener("click",()=>P(tt)),l.appendChild(nt)}}function B(Z){if(h.innerHTML="",v=null,!Z||Z.length===0){let G=document.createElement("div");G.className="fb-empty",G.textContent="(empty directory)",h.appendChild(G);return}for(let G of Z){let dt=document.createElement("div");dt.className="fb-entry",G.is_dir&&dt.classList.add("fb-dir");let gt=document.createElement("span");gt.className="fb-icon",gt.textContent=G.is_dir?"\u{1F4C1}":"\u{1F4C4}",dt.appendChild(gt);let it=document.createElement("span");if(it.className="fb-name",it.textContent=G.name,dt.appendChild(it),!G.is_dir&&G.size!==void 0){let Q=document.createElement("span");Q.className="fb-size",Q.textContent=Zd(G.size),dt.appendChild(Q)}G.is_dir?dt.addEventListener("click",()=>{P(g+"/"+G.name)}):(dt.addEventListener("click",()=>{let Q=h.querySelector(".fb-selected");Q&&Q.classList.remove("fb-selected"),dt.classList.add("fb-selected"),v=G,u.value=g+"/"+G.name,b()}),dt.addEventListener("dblclick",()=>{u.value=g+"/"+G.name,b(),T()})),h.appendChild(dt)}}async function P(Z){f.style.display="none",h.innerHTML='
Loading...
';try{let G=await s.websocketManager.request({type:"list_dir",path:Z||""});if(g=G.path,C(G.path),B(G.entries),o){let gt=u.value.trim().split("/").pop();gt&&!gt.includes("/")?u.value=g+"/"+gt:u.value=g+"/"}else u.value="",v=null;b()}catch(G){h.innerHTML="",f.textContent=G.message||String(G),f.style.display=""}}async function T(){let Z=u.value.trim();if(Z){_.disabled=!0,_.textContent="Working...",f.style.display="none";try{let G=await s.websocketManager.request({type:"tcl_eval",cmd:`${i} ${Z}`});if(G.is_error){f.textContent=G.output||G.result||"Command failed",f.style.display="",_.disabled=!1,_.textContent=o?"Save":"Open";return}if(w(),i==="read_db"){window.location.reload();return}}catch(G){f.textContent=G.message||"Request failed",f.style.display="",_.disabled=!1,_.textContent=o?"Save":"Open"}}}u.addEventListener("input",b),u.addEventListener("keydown",Z=>{if(Z.key==="Enter"){let G=u.value.trim();G.endsWith("/")?P(G.replace(/\/+$/,"")||"/"):T()}Z.key==="Escape"&&w()}),_.addEventListener("click",T),y.addEventListener("click",w),r.addEventListener("click",Z=>{Z.target===r&&w()}),P("")}function Zd(s){return s<1024?s+" B":s<1024*1024?(s/1024).toFixed(1)+" KB":s<1024*1024*1024?(s/(1024*1024)).toFixed(1)+" MB":(s/(1024*1024*1024)).toFixed(1)+" GB"}function Zl(s){let e=document.getElementById("toolbar");if(!e)return;s._toolbarToggleState||(s._toolbarToggleState={});function i(){e.innerHTML="";let o=s.customToolbar||[],r=new Set(o.map(l=>l.key));for(let l of Object.keys(s._toolbarToggleState))r.has(l)||delete s._toolbarToggleState[l];for(let l of o){let h=document.createElement("button");if(h.className="or-btn or-btn-sm toolbar-button",h.dataset.key=l.key,l.tooltip&&(h.title=l.tooltip),l.icon){let u=document.createElement("span");if(u.className="toolbar-icon",/^(data:|https?:|\.?\/)/.test(l.icon)){let f=document.createElement("img");f.src=l.icon,f.alt="",u.appendChild(f)}else u.textContent=l.icon;h.appendChild(u)}if(l.text){let u=document.createElement("span");u.className="toolbar-label",u.textContent=l.text,h.appendChild(u)}l.toggle&&s._toolbarToggleState[l.key]&&h.classList.add("active"),h.addEventListener("click",()=>{if(l.toggle){let u=!s._toolbarToggleState[l.key];s._toolbarToggleState[l.key]=u,h.classList.toggle("active",u),wn(s,u?l.script:l.script_off,l.echo)}else wn(s,l.script,l.echo)}),e.appendChild(h)}}return i(),s.rebuildToolbar=i,{rebuild:i}}function Wl(s,e=""){let i=document.createElement("div");i.className="modal-overlay",i.innerHTML=` `,document.body.appendChild(i);function o(l){l.key==="Escape"&&r()}let r=()=>{i.remove(),document.removeEventListener("keydown",o)};return i.addEventListener("click",l=>{l.target===i&&r()}),document.addEventListener("keydown",o),{overlay:i,body:i.querySelector(".modal-body"),errorDiv:i.querySelector(".modal-error"),buttons:i.querySelector(".modal-buttons"),close:r}}function Ie(s,e){s.textContent=e,s.style.display=e?"":"none"}function Ui(s,e,{primary:i=!1}={}){let o=document.createElement("button");return o.textContent=e,o.className="or-btn"+(i?" or-btn-primary":""),s.appendChild(o),o}function vs(s){return"{"+String(s)+"}"}function Ml(s){let e=Sl("Global Connect","gc-dialog"),i=document.createElement("div");i.className="gc-table",e.body.appendChild(i);let o=document.createElement("div");o.className="gc-form";let r=document.createElement("input");r.placeholder="Instance pattern (regex)",r.value=".*";let l=document.createElement("input");l.placeholder="Pin pattern (regex)";let h=document.createElement("select"),u=document.createElement("select"),f=document.createElement("span");f.innerHTML='',o.append(je("Instance",r),je("Pin",l),je("Net",h),je("Region",u),f);let _=Ui(o,"Add rule");e.body.appendChild(o);function y(){let v=l.value.trim()!==""&&h.value!=="";for(let S of[r,l])try{new RegExp(S.value),S.classList.remove("gc-invalid")}catch{S.classList.add("gc-invalid"),v=!1}_.disabled=!v}r.addEventListener("input",y),l.addEventListener("input",y),h.addEventListener("change",y);function g(){s.websocketManager.request({type:"global_connect_info"}).then(v=>{i.innerHTML='
InstancePinNetRegion
',(v.rules||[]).forEach(S=>{let R=document.createElement("div");R.className="gc-row",R.innerHTML=`${Cn(S.inst)}${Cn(S.pin)}${Cn(S.net)}${Cn(S.region||"All")}`;let I=document.createElement("button");I.className="or-btn or-btn-sm or-btn-icon",I.textContent="\u2715",I.title="Delete rule",I.addEventListener("click",()=>{s.websocketManager.request({type:"global_connect_delete",inst:S.inst,pin:S.pin,net:S.net,region:S.region||""}).then(g).catch(T=>Ie(e.errorDiv,String(T)))}),R.appendChild(I),i.appendChild(R)}),$o(h,v.nets||[]),$o(u,["All",...v.regions||[]]),y()}).catch(v=>Ie(e.errorDiv,String(v)))}_.addEventListener("click",()=>{let v=o.querySelector('input[name="gc-pg"]:checked').value,S=`add_global_connection -net ${vs(h.value)} -inst_pattern ${vs(r.value||".*")} -pin_pattern ${vs(l.value)} -${v}`;u.value&&u.value!=="All"&&(S+=` -region ${vs(u.value)}`),Ll(s,S,e.errorDiv,"Rule added.",g)}),Ui(e.buttons,"Apply (force)").addEventListener("click",()=>{s.websocketManager.request({type:"global_connect_apply",force:!0}).then(v=>{if(!v.had_rules){Ie(e.errorDiv,"No global-connect rules defined \u2014 add a rule first.");return}Ie(e.errorDiv,`Connected ${v.connected} pin(s).`),s.scheduleRedrawAllLayers&&s.scheduleRedrawAllLayers(),g()}).catch(v=>Ie(e.errorDiv,v.message||String(v)))}),Ui(e.buttons,"Clear all").addEventListener("click",()=>Ll(s,"clear_global_connect",e.errorDiv,"Rules cleared.",g)),Ui(e.buttons,"Close").addEventListener("click",e.close),g()}function Ll(s,e,i,o,r){s.websocketManager.request({type:"tcl_eval",cmd:e}).then(l=>{if(l.is_error){Ie(i,l.output||l.result||"Command failed");return}Ie(i,o||""),s.scheduleRedrawAllLayers&&s.scheduleRedrawAllLayers(),r&&r()}).catch(l=>Ie(i,l.message||String(l)))}function El(s,e){let i=Sl(`Insert Buffer \u2014 ${Cn(e)}`,"buf-dialog"),o=Ui(i.buttons,"Insert",{primary:!0});o.disabled=!0,Ui(i.buttons,"Cancel").addEventListener("click",i.close),s.websocketManager.request({type:"buffer_info",net:e}).then(l=>{if(!l.can_buffer){i.body.textContent=l.error||"This net has multiple drivers and cannot be buffered.";return}Ld(s,i,e,l,o)}).catch(l=>{i.body.textContent=String(l)})}function Ld(s,e,i,o,r){let l=document.createElement("div");l.className="buf-pins";let h=o.drivers||[],u=o.loads||[],f=new Set;function _(){l.innerHTML="";let v=(S,R)=>{let I=document.createElement("label");I.className="buf-pin";let T=document.createElement("input");T.type="checkbox",T.checked=f.has(S.id),T.addEventListener("change",()=>{if(T.checked){if(R)f.clear();else for(let G of h)f.delete(G.id);f.add(S.id)}else f.delete(S.id);_(),w()}),I.append(T,document.createTextNode(" "+S.label)),l.appendChild(I)};h.forEach(S=>v(S,!0)),u.forEach(S=>v(S,!1))}h.length&&f.add(h[0].id),_();let y=document.createElement("select");$o(y,o.masters||[]);let g=document.createElement("input");g.placeholder="Optional: new buffer name";let b=document.createElement("input");b.placeholder="Optional: new net name",e.body.append(je("Pins to buffer",l),je("Buffer master",y),je("Buffer name",g),je("Net name",b));function w(){r.disabled=f.size===0||!y.value}y.addEventListener("change",w),w(),r.addEventListener("click",()=>{let v=new Set(h.map(I=>I.id)),S=[...f],R=S.some(I=>v.has(I))?"driver":"loads";s.websocketManager.request({type:"insert_buffer",net:i,mode:R,pins:S,master:y.value,buf_name:g.value.trim(),net_name:b.value.trim()}).then(I=>{if(I.is_error||I.ok===!1){Ie(e.errorDiv,I.error||I.result||"Insertion failed");return}e.close(),I.inst&&(s.selectedInstanceName=I.inst),s.scheduleRedrawAllLayers&&s.scheduleRedrawAllLayers()}).catch(I=>Ie(e.errorDiv,I.message||String(I)))})}function je(s,e){let i=document.createElement("label");i.className="edit-field";let o=document.createElement("span");return o.textContent=s,i.append(o,e),i}function $o(s,e){let i=s.value;s.innerHTML="";for(let o of e){let r=document.createElement("option");r.value=o,r.textContent=o,s.appendChild(r)}e.includes(i)&&(s.value=i)}function Cn(s){return String(s??"").replace(/&/g,"&").replace(//g,">")}var Tl="#00ffff",Sd="#ffff00",Fo="#ffffff",bi=0,Zo=1,kn=2,bs=class{constructor(e,i,o,r){this._app=e,this._visibility=i,this._updateInspector=o,this._focusComponent=r,this._state=bi,this._rulers=[],this._nextId=0,this._pt0=null,this._selectedRulerId=null,this._ctrlHeld=!1,this._shiftHeld=!1,this._rulerPane=null,this._rulerLayerGroup=null,this._previewGroup=null,this._snapGroup=null,this._snapTimer=null,this._lastSnapResult=null,this._onMouseMove=this._handleMouseMove.bind(this),this._onMapClick=this._handleMapClick.bind(this),this._initLayers()}_initLayers(){let e=this._app.map;e&&(this._rulerPane=e.createPane("ruler-pane"),this._rulerPane.style.zIndex="700",this._rulerPane.style.pointerEvents="auto",this._rulerLayerGroup=L.layerGroup([],{pane:"ruler-pane"}).addTo(e),this._previewGroup=L.layerGroup([],{pane:"ruler-pane"}).addTo(e),this._snapGroup=L.layerGroup([],{pane:"ruler-pane"}).addTo(e))}isActive(){return this._state!==bi}updateVisibility(){this._rulerPane&&(this._rulerPane.style.display=this._visibility.rulers?"":"none")}toggleRulerMode(){this._state===bi?this._enterFirstPoint():this.cancelRulerBuild()}cancelRulerBuild(){this._state=bi,this._pt0=null,this._lastSnapResult=null,this._clearPreview(),this._clearSnap(),this._setCursor(!1),this._removeMapListeners()}clearAllRulers(){this._rulers=[],this._selectedRulerId=null,this._rulerLayerGroup.clearLayers(),this._clearPreview(),this._clearSnap(),this._state!==bi&&this.cancelRulerBuild()}_enterFirstPoint(){this._state=Zo,this._pt0=null,this._lastSnapResult=null,this._setCursor(!0),this._addMapListeners()}_enterMeasuring(e){this._state=kn,this._pt0=e}_addMapListeners(){let e=this._app.map;e&&(e.getContainer().addEventListener("mousemove",this._onMouseMove),e.on("click",this._onMapClick))}_removeMapListeners(){let e=this._app.map;e&&(e.getContainer().removeEventListener("mousemove",this._onMouseMove),e.off("click",this._onMapClick))}_handleMouseMove(e){if(this._state===bi)return;this._ctrlHeld=e.ctrlKey||e.metaKey,this._shiftHeld=e.shiftKey;let i=this._app.map,o=i.getContainer().getBoundingClientRect(),r=i.containerPointToLatLng([e.clientX-o.left,e.clientY-o.top]),l=we(r.lat,r.lng,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY);this._snapTimer&&clearTimeout(this._snapTimer),this._snapTimer=setTimeout(()=>{this._requestSnap(l.dbuX,l.dbuY)},50)}_handleMapClick(e){if(this._state===bi)return;L.DomEvent.stopPropagation(e);let i=e.originalEvent;i&&(this._ctrlHeld=i.ctrlKey||i.metaKey,this._shiftHeld=i.shiftKey);let o=we(e.latlng.lat,e.latlng.lng,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY),r=this._getSnappedPoint(o.dbuX,o.dbuY);this._state===Zo?this._enterMeasuring(r):this._state===kn&&(this._createRuler(this._pt0,r),this._state=Zo,this._pt0=null,this._clearPreview(),this._clearSnap(),this._lastSnapResult=null)}async _requestSnap(e,i){let o=this._app;if(!o.websocketManager||!o.designScale)return;if(this._ctrlHeld){this._lastSnapResult=null,this._clearSnap(),this._updatePreview(e,i);return}let l=o.techData?.dbu_per_micron||1e3,h=o.map.getZoom(),u=Math.pow(2,Math.max(0,h)),f=1/(o.designScale*u),_=Math.max(Math.round(10*f),10),y=!0,g=!0;if(this._shiftHeld)y=!0,g=!0;else if(this._state===kn&&this._pt0){let w=Math.abs(e-this._pt0.x),v=Math.abs(i-this._pt0.y);w>v?(y=!1,g=!0):v>w&&(y=!0,g=!1)}let b={};for(let[w,v]of Object.entries(this._visibility))b[w]=!!v;try{let w=await o.websocketManager.request({type:"snap",dbu_x:e,dbu_y:i,radius:l,point_threshold:_,horizontal:!!y,vertical:!!g,visible_layers:[...o.visibleLayerNames],...b});this._lastSnapResult=w,this._updateSnapIndicator(w),this._updatePreview(e,i)}catch{this._lastSnapResult=null,this._clearSnap()}}_getSnappedPoint(e,i){if(this._ctrlHeld)return{x:e,y:i};let o=this._lastSnapResult,r;if(o?.found&&o.is_point)r={x:o.edge[0][0],y:o.edge[0][1]};else if(o?.found){let l=o.edge;l[0][1]===l[1][1]?r={x:e,y:l[0][1]}:r={x:l[0][0],y:i}}else r={x:e,y:i};if(!this._shiftHeld&&this._state===kn&&this._pt0){let l=Math.abs(r.x-this._pt0.x),h=Math.abs(r.y-this._pt0.y);l{L.DomEvent.stopPropagation(Q),this._selectRuler(e.id)}),y.addLayer(v);let S=this._app.map.getZoom(),R=Math.pow(2,Math.max(0,S)),T=8*(1/(i*R)),G=(Q,nt,tt)=>{let Ct=Math.sqrt(nt*nt+tt*tt);if(Ct===0)return;let Mt=-tt/Ct,It=nt/Ct,At=Jt(Q.x+Mt*T,Q.y+It*T,i,o,r,l),Yt=Jt(Q.x-Mt*T,Q.y-It*T,i,o,r,l);y.addLayer(L.polyline([At,Yt],{color:_,weight:2,pane:"ruler-pane",interactive:!1}))};if(g)G(e.pt0,g.x-e.pt0.x,g.y-e.pt0.y),G(e.pt1,e.pt1.x-g.x,e.pt1.y-g.y);else{let Q=e.pt1.x-e.pt0.x,nt=e.pt1.y-e.pt0.y;G(e.pt0,Q,nt),G(e.pt1,Q,nt)}let U=this._computeDistance(e.pt0,e.pt1,e.euclidian),dt=b?b[0]:(h[0]+u[0])/2,gt=b?b[1]:(h[1]+u[1])/2,it=L.marker([dt,gt],{icon:L.divIcon({className:"ruler-label",html:this._formatDistance(U),iconSize:null}),pane:"ruler-pane",interactive:!1});y.addLayer(it),e._layerGroup=y,this._rulerLayerGroup.addLayer(y)}_rerenderAll(){this._rulerLayerGroup.clearLayers();for(let e of this._rulers)this._renderRuler(e)}_selectRuler(e){this._selectedRulerId=e,this._rerenderAll();let i=this._rulers.find(_=>_.id===e);if(!i)return;ae(this._app);let o=Math.abs(i.pt1.x-i.pt0.x),r=Math.abs(i.pt1.y-i.pt0.y),l=i.euclidian?Math.sqrt(o*o+r*r):o+r,h=_=>this._app.formatDbu(_,!0),u=_=>this._app.parseDbu(_),f={type:"Ruler",name:i.name,bbox:[Math.min(i.pt0.x,i.pt1.x),Math.min(i.pt0.y,i.pt1.y),Math.max(i.pt0.x,i.pt1.x),Math.max(i.pt0.y,i.pt1.y)],properties:[{name:"Name",value:i.name,editable:!0},{name:"Label",value:i.label||"",editable:!0},{name:"Point 0 - x",value:h(i.pt0.x),editable:!0},{name:"Point 0 - y",value:h(i.pt0.y),editable:!0},{name:"Point 1 - x",value:h(i.pt1.x),editable:!0},{name:"Point 1 - y",value:h(i.pt1.y),editable:!0},{name:"Delta x",value:h(o)},{name:"Delta y",value:h(r)},{name:"Length",value:h(l)},{name:"Euclidian",value:i.euclidian?"True":"False",editable:!0,editor:{type:"bool"}}],onPropertyChange:(_,y)=>{switch(_){case"Name":i.name=y;break;case"Label":i.label=y;break;case"Point 0 - x":{let g=u(y);g!==null&&(i.pt0.x=g);break}case"Point 0 - y":{let g=u(y);g!==null&&(i.pt0.y=g);break}case"Point 1 - x":{let g=u(y);g!==null&&(i.pt1.x=g);break}case"Point 1 - y":{let g=u(y);g!==null&&(i.pt1.y=g);break}case"Euclidian":i.euclidian=y.trim().toLowerCase()==="true";break}this._rerenderAll(),this._selectRuler(i.id)}};this._updateInspector(f),this._focusComponent("Inspector"),requestAnimationFrame(()=>{let _=this._app.inspectorEl?.querySelector(".inspector-toolbar");if(!_)return;let y=document.createElement("button");y.className="or-btn or-btn-icon",y.title="Delete ruler",y.innerHTML='',y.addEventListener("click",()=>{this.deleteRuler(e)}),_.appendChild(y)})}deleteRuler(e){let i=this._rulers.findIndex(r=>r.id===e);if(i===-1)return;let o=this._rulers[i];o._layerGroup&&this._rulerLayerGroup.removeLayer(o._layerGroup),this._rulers.splice(i,1),this._selectedRulerId===e&&(this._selectedRulerId=null,this._updateInspector(null))}_getManhattanJoinPt(e,i){return{x:i.x,y:e.y}}_computeDistance(e,i,o=!0){let r=Math.abs(i.x-e.x),l=Math.abs(i.y-e.y);return o?Math.sqrt(r*r+l*l):r+l}_formatDistance(e){return this._app.formatDistance(e)}_setCursor(e){let i=this._app.map?.getContainer();i&&(e?i.classList.add("ruler-mode-cursor"):i.classList.remove("ruler-mode-cursor"))}_clearPreview(){this._previewGroup?.clearLayers()}_clearSnap(){this._snapGroup?.clearLayers()}};var ws=class{constructor(e,i,o,r){this._app=e,this._visibility=i,this._updateInspector=o,this._focusComponent=r,this._labels=[],this._anchors=[],this._mode=!1,this._selectedName=null,this._pane=null,this._handleGroup=null,this._initLayers()}_initLayers(){let e=this._app.map;e&&(this._pane=e.createPane("label-pane"),this._pane.style.zIndex="690",this._pane.style.pointerEvents="auto",this._handleGroup=L.layerGroup([],{pane:"label-pane"}).addTo(e))}isActive(){return this._mode}updateVisibility(){this._pane&&(this._pane.style.display=this._visibility.labels?"":"none")}toggleLabelMode(){this._mode=!this._mode,this._setCursor(this._mode)}cancelLabelMode(){this._mode=!1,this._setCursor(!1)}_setCursor(e){let i=this._app.map?.getContainer();i&&i.classList.toggle("label-mode-cursor",e)}_wm(){return this._app.websocketManager}_applyLabels(e){this._labels=e||[],this._renderHandles()}_refresh(e){this._applyLabels(e&&e.labels),this._app.refreshOverlay()}applyRemoteLabels(e){this._applyLabels(e),this._selectedName&&!this._labels.some(i=>i.name===this._selectedName)&&(this._selectedName=null,this._updateInspector(null),this._renderHandles()),this._app.refreshOverlay()}_updateLabel(e,i){return this._wm().request({type:"update_label",name:e,...i})}async reload(){let e=this._wm();if(e)try{let i=await e.request({type:"list_labels"});this._anchors=i.anchors||[],this._applyLabels(i.labels)}catch{this._applyLabels([])}}async handleMapClick(e,i){let o=window.prompt("Label text:");if(this._mode=!1,this._setCursor(!1),!!o)try{let r=await this._wm().request({type:"add_label",x:Math.round(e),y:Math.round(i),text:o});this._refresh(r)}catch(r){console.error("add_label failed:",r)}}_renderHandles(){if(!this._handleGroup)return;this._handleGroup.clearLayers();let e=this._app.designScale;if(!e)return;let i=this._app.designMaxDXDY,o=this._app.designOriginX,r=this._app.designOriginY;for(let l of this._labels){let h=Jt(l.x,l.y,e,i,o,r),u=l.name===this._selectedName,f=L.marker(h,{pane:"label-pane",draggable:!0,keyboard:!1,icon:L.divIcon({className:"label-handle"+(u?" label-handle-selected":""),html:"",iconSize:[10,10]}),title:l.text});f.on("click",_=>{L.DomEvent.stopPropagation(_),this._select(l.name)}),f.on("dragend",_=>{let y=_.target.getLatLng(),{dbuX:g,dbuY:b}=we(y.lat,y.lng,e,i,o,r);this._commitMove(l,Math.round(g),Math.round(b))}),this._handleGroup.addLayer(f)}}async _commitMove(e,i,o){try{let r=await this._updateLabel(e.name,{x:i,y:o,text:e.text,size:e.size||0,anchor:e.anchor||"center",color:e.color});this._refresh(r)}catch(r){console.error("move label failed:",r)}}_select(e){this._selectedName=e,this._renderHandles();let i=this._labels.find(l=>l.name===e);if(!i)return;let o=l=>this._app.formatDbu(l,!0),r={type:"Label",name:i.name,bbox:[i.x,i.y,i.x,i.y],properties:[{name:"Name",value:i.name},{name:"Text",value:i.text,editable:!0},{name:"x",value:o(i.x)},{name:"y",value:o(i.y)},{name:"Font size",value:String(i.size||0),editable:!0},{name:"Anchor",value:i.anchor||"center",editable:!0,editor:{type:"list",options:this._anchors}}],onPropertyChange:(l,h)=>{let u={text:i.text,size:i.size||0,anchor:i.anchor||"center"};l==="Text"?u.text=h:l==="Font size"?u.size=parseInt(h,10)||0:l==="Anchor"&&(u.anchor=h.trim()),this._edit(i,u)}};this._updateInspector(r),this._focusComponent("Inspector"),requestAnimationFrame(()=>{let l=this._app.inspectorEl?.querySelector(".inspector-toolbar");if(!l||l.querySelector(".delete-label-btn"))return;let h=document.createElement("button");h.className="or-btn or-btn-icon delete-label-btn",h.title="Delete label",h.innerHTML='',h.addEventListener("click",()=>this.deleteLabel(e)),l.appendChild(h)})}async _edit(e,i){try{let o=await this._updateLabel(e.name,{x:e.x,y:e.y,text:i.text,size:i.size,anchor:i.anchor,color:e.color});this._refresh(o),this._select(e.name)}catch(o){console.error("edit label failed:",o)}}async deleteLabel(e){try{let i=await this._wm().request({type:"delete_label",name:e});this._selectedName===e&&(this._selectedName=null,this._updateInspector(null)),this._refresh(i)}catch(i){console.error("delete_label failed:",i)}}async clearAllLabels(){try{let e=await this._wm().request({type:"clear_labels"});this._selectedName=null,this._refresh(e)}catch(e){console.error("clear_labels failed:",e)}}};var Pl="Select an instance in the layout to view its schematic.",xs=class{constructor(e,i){this.container=e,this.appState=i,this.element=document.createElement("div"),this.element.className="schematic-widget",this.element.style.cssText="width:100%; height:100%; display:flex; flex-direction:column; background:var(--bg-panel); color:var(--fg-primary); overflow:hidden;",this.controls=document.createElement("div"),this.controls.style.cssText="padding:4px 8px; background:var(--bg-header); border-bottom:1px solid var(--border);flex-shrink:0; display:flex; align-items:center; gap:8px; flex-wrap:wrap;",this.controls.innerHTML='',this.element.appendChild(this.controls),this.svgContainer=document.createElement("div"),this.svgContainer.style.cssText="flex:1; overflow:hidden; position:relative; cursor:grab; background:var(--bg-main);",this.element.appendChild(this.svgContainer),this.container.element.appendChild(this.element),this.controls.querySelector("#schematic-refresh").addEventListener("click",()=>this.refresh()),this.controls.querySelector("#schematic-fit").addEventListener("click",()=>this.fitView()),this.controls.querySelector("#schematic-zoom-in").addEventListener("click",()=>this._zoomStep(1.5)),this.controls.querySelector("#schematic-zoom-out").addEventListener("click",()=>this._zoomStep(1/1.5)),this.controls.querySelector("#schematic-select").addEventListener("click",()=>this._toggleSelectMode()),this.controls.querySelector("#schematic-zoom-to").addEventListener("click",()=>this._zoomToSelected()),this.controls.querySelector("#schematic-save-svg").addEventListener("click",()=>this._exportSvg()),this.controls.querySelector("#schematic-save-png").addEventListener("click",()=>this._exportPng()),this.controls.querySelector("#schematic-copy").addEventListener("click",()=>this._copyImage()),this.appState.schematicWidget=this,this.netlistsvg=null,this.skin=null,this._svgEl=null,this._scale=1,this._panX=0,this._panY=0,this._selectMode=!1,this._selectedCell=null,this._svgIdToInstName=new Map,this._setupPanZoom(),this.initNetlistSVG()}_setupPanZoom(){let e=this.svgContainer,i=!1,o,r,l,h;e.addEventListener("wheel",u=>{if(!this._svgEl)return;u.preventDefault();let f=u.deltaY<0?1.2:1/1.2,_=e.getBoundingClientRect(),y=u.clientX-_.left,g=u.clientY-_.top;this._panX=y+(this._panX-y)*f,this._panY=g+(this._panY-g)*f,this._scale*=f,this._applyTransform()},{passive:!1}),e.addEventListener("mousedown",u=>{if(!(!this._svgEl||u.button!==0)){if(this._selectMode){this._handleSelectClick(u);return}i=!0,o=u.clientX,r=u.clientY,l=this._panX,h=this._panY,e.style.cursor="grabbing",u.preventDefault()}}),window.addEventListener("mousemove",u=>{i&&(this._panX=l+(u.clientX-o),this._panY=h+(u.clientY-r),this._applyTransform())}),window.addEventListener("mouseup",()=>{i&&(i=!1,e.style.cursor=this._selectMode?"default":"grab")})}_zoomStep(e){if(!this._svgEl)return;let i=this.svgContainer.getBoundingClientRect(),o=i.width/2,r=i.height/2;this._panX=o+(this._panX-o)*e,this._panY=r+(this._panY-r)*e,this._scale*=e,this._applyTransform()}_toggleSelectMode(){this._selectMode=!this._selectMode;let e=this.controls.querySelector("#schematic-select");this._selectMode?(e.style.background="var(--accent)",e.style.color="var(--fg-white)",this.svgContainer.style.cursor="default"):(e.style.background="",e.style.color="",this.svgContainer.style.cursor="grab",this._clearCellHighlight())}_handleSelectClick(e){if(!this._svgEl)return;let i=e.target,o=null;for(;i&&i!==this._svgEl;){if(i.tagName==="g"&&i.id&&this._svgIdToInstName.has(i.id)){o=i;break}i=i.parentElement}if(this._clearCellHighlight(),!o)return;let r=this._svgIdToInstName.get(o.id);try{let l=o.getBBox(),h=3,u=document.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",l.x-h),u.setAttribute("y",l.y-h),u.setAttribute("width",l.width+h*2),u.setAttribute("height",l.height+h*2),u.setAttribute("fill","none"),u.setAttribute("stroke","#e05a00"),u.setAttribute("stroke-width","1.5"),u.setAttribute("rx","3"),u.id="_schematic_highlight",o.appendChild(u),this._selectedCell=o}catch{}this.controls.querySelector("#schematic-zoom-to").disabled=!1,this.setStatus(`Selected: ${r}`),this._fetchInspect(r)}_fetchInspect(e){let i=this.appState.websocketManager;if(!i)return;console.log("[Schematic] inspect:",e);let o=ae(this.appState);i.request({type:"schematic_inspect",inst_name:e,use_dbu:this.appState.showDbu}).then(r=>{ue(this.appState,o)&&(this.appState.updateInspector&&this.appState.updateInspector(r),this.appState.focusComponent&&this.appState.focusComponent("Inspector"),this.appState.refreshOverlay&&this.appState.refreshOverlay())}).catch(r=>{console.error("schematic_inspect failed:",r),this.setStatus(`Inspect error: ${r}`)})}_clearCellHighlight(){if(this._svgEl){let e=this._svgEl.querySelector("#_schematic_highlight");e&&e.remove()}this._selectedCell=null,this.controls.querySelector("#schematic-zoom-to").disabled=!0}_zoomToSelected(){if(!this._selectedCell||!this._svgEl)return;let e=this.svgContainer.getBoundingClientRect(),i=this._selectedCell.getBoundingClientRect(),o=(i.left-e.left-this._panX)/this._scale,r=(i.top-e.top-this._panY)/this._scale,l=i.width/this._scale,h=i.height/this._scale,u=Math.min(e.width/l,e.height/h)*.9;this._scale=u,this._panX=e.width/2-(o+l/2)*u,this._panY=e.height/2-(r+h/2)*u,this._applyTransform()}_applyTransform(){this._svgEl&&(this._svgEl.style.transform=`translate(${this._panX}px, ${this._panY}px) scale(${this._scale})`,this._svgEl.style.transformOrigin="0 0")}fitView(){if(!this._svgEl)return;let e=this.svgContainer.getBoundingClientRect();if(e.width===0||e.height===0)return;let i=this._svgEl.viewBox&&this._svgEl.viewBox.baseVal,o=i&&i.width||this._svgEl.clientWidth||1,r=i&&i.height||this._svgEl.clientHeight||1;this._scale=Math.min(e.width/o,e.height/r)*.95,this._panX=(e.width-o*this._scale)/2,this._panY=(e.height-r*this._scale)/2,this._applyTransform()}initNetlistSVG(){this.netlistsvg=globalThis.netlistsvg,this.skin=globalThis.openroadSkin,this._netlistsvgReady=!!(this.netlistsvg&&this.skin),this._netlistsvgReady&&console.log("NetlistSVG ready."),this.setStatus(this._unreadyStatus()??Pl)}_unreadyStatus(){return this._netlistsvgReady?null:wt(this.appState)?"The schematic is not available in saved reports.":"Init error: netlistsvg or its skin is missing from the page."}syncCone(e={}){let i=this.controls.querySelector("#schematic-fanin-depth"),o=this.controls.querySelector("#schematic-fanout-depth"),r=(l,h,u)=>{if(!l)return;let f=parseInt(l.max,10)||10;h===!1?l.value=0:u!==void 0&&(l.value=u>0?Math.min(u,f):f)};r(i,e.fanin,e.fanin_depth),r(o,e.fanout,e.fanout_depth),this.refresh(),this.appState.focusComponent&&this.appState.focusComponent("SchematicWidget")}refresh(){if(!this._netlistsvgReady){this.setStatus(this._unreadyStatus());return}let e=this.appState.selectedInstanceName;if(!e){this.setStatus(Pl);return}let i=this.appState.websocketManager;if(!i){this.setStatus("Waiting for server connection\u2026");return}this.setStatus(`Loading schematic for ${e}\u2026`);let o=parseInt(this.controls.querySelector("#schematic-fanin-depth").value,10),r=parseInt(this.controls.querySelector("#schematic-fanout-depth").value,10),l=isNaN(o)?1:o,h=isNaN(r)?1:r;i.readyPromise.then(()=>{i.request({type:"schematic_cone",inst_name:e,fanin_depth:l,fanout_depth:h}).then(u=>{let f=u.modules&&u.modules.top&&u.modules.top.cells;if(!f||Object.keys(f).length===0){this.setStatus("No cells found for selected instance.");return}this.renderNetlist(u)}).catch(u=>{this.setStatus(`Error: ${u}`)})})}setStatus(e){this.controls.querySelector("#schematic-status").textContent=e}_exportSvg(){if(!this._svgEl){this.setStatus("No schematic to export.");return}let e=Bo(this._svgEl);ol(new Blob([e],{type:"image/svg+xml;charset=utf-8"}),"schematic.svg")}async _exportPng(){if(!this._svgEl){this.setStatus("No schematic to export.");return}try{let e=await Do(this._svgEl,2);yi(e,"schematic.png")}catch{this.setStatus("PNG export failed.")}}async _copyImage(){if(!this._svgEl){this.setStatus("No schematic to export.");return}try{let e=await Do(this._svgEl,2),i=await rs(e);this.setStatus(i?"Schematic copied to clipboard.":"Clipboard not available.")}catch{this.setStatus("Copy failed.")}}async renderNetlist(e){try{this.setStatus("Rendering\u2026"),typeof window<"u"&&(window.__lastSchematic=e);let i=Id(e),o,r=this.netlistsvg.render(this.skin,i);if(r&&typeof r.then=="function"?o=await r:o=await new Promise((u,f)=>{this.netlistsvg.render(this.skin,i,(_,y)=>{_?f(_):u(y)})}),typeof o!="string"||!o.includes("requestAnimationFrame(()=>this.fitView()));let h=Object.keys(e.modules.top.cells).length;this.setStatus(`${h} cell${h!==1?"s":""}`)}catch(i){console.error("NetlistSVG render failed:",i),this.setStatus(`Render error: ${i.message||i}`)}}_applyPinLabels(e){if(!this._svgEl)return;let i="http://www.w3.org/2000/svg",o="https://github.com/nturley/netlistsvg",r=e.modules&&e.modules.top&&e.modules.top.cells||{},l=(h,u)=>h.getAttribute("s:"+u)??h.getAttributeNS(o,u);for(let[h,u]of Object.entries(r)){let f=u.port_labels;if(!f)continue;let _=this._svgEl.querySelector("#"+CSS.escape("cell_"+h))||this._svgEl.querySelector("#"+CSS.escape(h));if(!_)continue;let y=u.port_directions||{};for(let g of Array.from(_.children)){if(g.tagName!=="g")continue;let b=l(g,"pid");if(!b||!(b in f))continue;let w=parseFloat(l(g,"x")),v=parseFloat(l(g,"y"));if(!isFinite(w)||!isFinite(v))continue;let S=document.createElementNS(i,"text");y[b]==="input"?(S.setAttribute("class","inputPortLabel"),S.setAttribute("x",w-3)):S.setAttribute("x",w+4),S.setAttribute("y",v-4),S.setAttribute("style","font-size:5px"),S.setAttribute("pointer-events","none"),S.textContent=f[b],_.appendChild(S)}}}_scopeSkinStyles(){if(!this._svgEl)return;let e=".schematic-widget",i=o=>{for(let r of o)r.selectorText?r.selectorText=Md(r.selectorText,e):r.cssRules&&i(r.cssRules)};for(let o of this._svgEl.querySelectorAll("style")){let r=o.sheet;if(r)try{i(r.cssRules)}catch{continue}}}};function Md(s,e){return s.split(",").map(i=>{let o=i.trim();if(!o)return"";let r=o.charAt(e.length);return o.startsWith(e)&&(r===""||!/[\w-]/.test(r))?o:`${e} ${o}`}).filter(Boolean).join(", ")}var Il={and:"$_AND_",nand:"$_NAND_",or:"$_OR_",nor:"$_NOR_",xor:"$_XOR_",xnor:"$_XNOR_",not:"$_NOT_",buf:"$_BUF_"},Ed=new Set(["aoi21","aoi22","aoi211","aoi221","aoi222","aoi33","oai21","oai22","oai211","oai221","oai222","oai33"]),Td=new Set(["and3","and4","or3","or4","nand3","nand4","nor3","nor4"]),Al=["A","B","C","D","E","F"];function Pd(s){let e=s&&s.gate_kind;if(!e)return s;let i=s.port_directions||{},o=null,r=[];for(let[g,b]of Object.entries(i))b==="output"&&o===null?o=g:b==="input"&&r.push(g);let l,h={};if(e==="aoi"||e==="oai"){let g=Array.isArray(s.gate_terms)?s.gate_terms:[];if(!g.length)return s;let b=g.map(S=>S.length);if(l=e+b.slice().sort((S,R)=>R-S).join(""),!Ed.has(l))return s;let w=g.map(S=>S.slice()).sort((S,R)=>S.length-R.length),v=0;for(let S of w)for(let R of S)h[R]=Al[v]||"I"+v,v++}else{let g=r.length;if(e==="not"||e==="buf")l=Il[e];else if(g<=2)l=Il[e];else if(l=e+g,!Td.has(l))return s;if(!l)return s;r.forEach((b,w)=>{h[b]=Al[w]||"I"+w})}o!==null&&(h[o]="Y");let u=s.connections||{},f={},_={};for(let[g,b]of Object.entries(u))h[g]&&(f[h[g]]=b);for(let[g,b]of Object.entries(i))h[g]&&(_[h[g]]=b);let y={};for(let[g,b]of Object.entries(h))y[b]=g;return{...s,type:l,connections:f,port_directions:_,port_labels:y}}function Id(s){let e=s&&s.modules&&s.modules.top;if(!e||!e.cells)return s;let i={};for(let[o,r]of Object.entries(e.cells))i[o]=Pd(r);return{...s,modules:{...s.modules,top:{...e,cells:i}}}}var Cs=class{constructor(e,i,o){this._app=e,this._redrawAllLayers=i,this._refreshOverlay=o||i,this._categories=[],this._activeCategory="",this._markerTree=null,this._expandedNodes=new Set,this._build(),this._app.websocketManager.readyPromise.then(()=>this.refresh())}_build(){let e=document.createElement("div");e.className="drc-widget";let i=document.createElement("div");i.className="drc-toolbar",this._categorySelect=document.createElement("select"),this._categorySelect.className="drc-category-select",i.appendChild(this._categorySelect),this._loadBtn=document.createElement("button"),this._loadBtn.className="or-btn or-btn-sm",this._loadBtn.textContent="Load...",i.appendChild(this._loadBtn),e.appendChild(i),this._infoBar=document.createElement("div"),this._infoBar.className="drc-info-bar",e.appendChild(this._infoBar),this._treeContainer=document.createElement("div"),this._treeContainer.className="drc-tree-container",e.appendChild(this._treeContainer),this.element=e,this._bindEvents()}_bindEvents(){this._categorySelect.addEventListener("change",()=>{this._activeCategory=this._categorySelect.value,this._loadMarkers()}),this._loadBtn.addEventListener("click",()=>{this._showLoadDialog()})}_loadCategories(){return this._app.websocketManager.request({type:"drc_categories"}).then(e=>{this._categories=e.categories||[],this._renderCategorySelect()}).catch(e=>{console.error("Failed to load DRC categories:",e)})}refresh(){this._loadCategories().then(()=>{!this._activeCategory&&this._categories.length>0&&(this._activeCategory=this._categories[0].name,this._categorySelect.value=this._activeCategory),this._activeCategory&&this._loadMarkers()})}_renderCategorySelect(){let e=this._categorySelect,i=e.value;e.innerHTML="";let o=document.createElement("option");o.value="",o.textContent="(none)",e.appendChild(o);for(let r of this._categories){let l=document.createElement("option");l.value=r.name,l.textContent=`${r.name} (${r.count})`,e.appendChild(l)}this._activeCategory&&this._categories.some(r=>r.name===this._activeCategory)?e.value=this._activeCategory:i&&this._categories.some(r=>r.name===i)?(e.value=i,this._activeCategory=i):this._activeCategory=""}_loadMarkers(){if(!this._activeCategory){this._markerTree=null,this._treeContainer.innerHTML="",this._infoBar.textContent="",this._refreshOverlay();return}this._treeContainer.innerHTML='
Loading...
',this._app.websocketManager.request({type:"drc_markers",category:this._activeCategory}).then(e=>{this._markerTree=e,this._renderTree(),this._refreshOverlay()}).catch(e=>{this._treeContainer.innerHTML="";let i=document.createElement("div");i.className="drc-error",i.textContent=`Error: ${e}`,this._treeContainer.appendChild(i),console.error("Failed to load DRC markers:",e)})}_renderTree(){if(this._treeContainer.innerHTML="",!this._markerTree)return;if(this._markerTree.error){let h=document.createElement("div");h.className="drc-error",h.textContent=this._markerTree.error,this._treeContainer.appendChild(h);return}let e=this._markerTree.total_count||0;this._infoBar.textContent=`${e} total violation${e!==1?"s":""}`;let i=this._markerTree.name||this._activeCategory,o=this._markerTree.subcategories||[],r=this._markerTree.markers||[];if(o.length===0&&r.length===0){this._treeContainer.innerHTML='
No violations
';return}let l=document.createElement("div");l.className="drc-tree",r.length>0&&l.appendChild(this._buildCategoryNode({name:i||"Markers",count:r.length,markers:r},[]));for(let h of o)l.appendChild(this._buildCategoryNode(h,[i]));this._treeContainer.appendChild(l)}_buildCategoryNode(e,i=[]){let o=[...i,e.name],r=document.createElement("div");r.className="drc-tree-node";let l=document.createElement("div");l.className="drc-tree-header";let h=document.createElement("span");h.className="drc-toggle";let u=e.subcategories&&e.subcategories.length>0||e.markers&&e.markers.length>0,f=JSON.stringify(o),_=this._expandedNodes.has(f);h.textContent=u?_?"\u25BC":"\u25B6":" ",l.appendChild(h);let y=document.createElement("input");y.type="checkbox",y.checked=this._allMarkersVisible(e),y.className="drc-visibility-check",y.addEventListener("change",v=>{v.stopPropagation(),this._toggleCategoryVisibility(e,y.checked,o)}),l.appendChild(y);let g=document.createElement("span");g.className="drc-category-label",g.textContent=e.name,l.appendChild(g);let b=document.createElement("span");b.className="drc-count",b.textContent=`${e.count} markers`,l.appendChild(b),r.appendChild(l);let w=document.createElement("div");if(w.className="drc-tree-children",w.style.display=_?"":"none",e.subcategories)for(let v of e.subcategories)w.appendChild(this._buildCategoryNode(v,o));if(e.markers)for(let v of e.markers)w.appendChild(this._buildMarkerNode(v));return r.appendChild(w),u&&(l.addEventListener("click",v=>{if(v.target===y)return;let S=w.style.display!=="none";w.style.display=S?"none":"",h.textContent=S?"\u25B6":"\u25BC",S?this._expandedNodes.delete(f):this._expandedNodes.add(f)}),l.style.cursor="pointer"),r}_buildMarkerNode(e){let i=document.createElement("div");i.className="drc-marker-row",i.dataset.markerId=e.id,e.visited||i.classList.add("drc-unvisited");let o=document.createElement("input");o.type="checkbox",o.checked=e.visible,o.className="drc-visibility-check",o.addEventListener("change",h=>{h.stopPropagation(),e.visible=o.checked,this._updateMarker(e.id,"visible",o.checked)}),i.appendChild(o);let r=document.createElement("span");r.className="drc-marker-index",r.textContent=e.index,i.appendChild(r);let l=document.createElement("span");if(l.className="drc-marker-name",l.textContent=e.name,e.layer&&(l.title=`Layer: ${e.layer}`),i.appendChild(l),e.layer){let h=document.createElement("span");h.className="drc-layer-badge",h.textContent=e.layer,i.appendChild(h)}return i.addEventListener("click",h=>{h.target!==o&&this._highlightMarker(e)}),i.addEventListener("dblclick",h=>{h.target!==o&&this._highlightMarker(e,!0)}),i}highlightMarkerById(e,i=!1){let o=this._findMarkerById(e);o&&this._highlightMarker(o,i)}_findMarkerById(e){let i=o=>{if(!o)return null;if(o.markers){for(let r of o.markers)if(r.id===e)return r}if(o.subcategories)for(let r of o.subcategories){let l=i(r);if(l)return l}return null};return i(this._markerTree)}_highlightMarker(e,i=!1){this._app.websocketManager.request({type:"drc_highlight",marker_id:e.id,open_inspector:i}).then(o=>{if(o.ok&&o.bbox){e.visited=!0;let r=this._treeContainer.querySelector(`.drc-marker-row[data-marker-id="${e.id}"]`);r&&r.classList.remove("drc-unvisited"),this._zoomToBBox(o.bbox),this._refreshOverlay(),i&&(o.select_id!=null&&this._app.navigateInspector&&this._app.navigateInspector(o.select_id),this._app.focusComponent&&this._app.focusComponent("Inspector"))}}).catch(o=>{console.error("Failed to highlight DRC marker:",o)})}_zoomToBBox(e){if(!this._app.designScale||!this._app.map)return;let[i,o,r,l]=e,h=r-i,u=l-o,_=10*this._app.getDbuPerMicron(),y=2*Math.max(h,u),g=Math.min(_,y);this._app.map.fitBounds(Ut(i-g,o-g,r+g,l+g,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY))}_updateMarker(e,i,o){this._app.websocketManager.request({type:"drc_update_marker",marker_id:e,field:i,value:!!o}).then(()=>{this._refreshOverlay(),i==="visible"&&(this._update3DHighlights(),o&&this._flashHighlight())}).catch(r=>{console.error("Failed to update DRC marker:",r)})}_flashHighlight(){let e=this._app.map?.getContainer();e&&(e.classList.remove("drc-flashing"),e.offsetWidth,e.classList.add("drc-flashing"),e.addEventListener("animationend",()=>{e.classList.remove("drc-flashing")},{once:!0}))}_update3DHighlights(){let e=this._app.threeDViewerWidget;if(!e)return;let i=[];this._collectVisibleMarkers(this._markerTree,i),i.length>0?e.highlightDRC(i):e.clearHighlightDRC()}_collectVisibleMarkers(e,i){if(e){if(e.markers)for(let o of e.markers)o.visible&&i.push(o);if(e.subcategories)for(let o of e.subcategories)this._collectVisibleMarkers(o,i)}}_setMarkersVisible(e,i){if(e){if(e.markers)for(let o of e.markers)o.visible=i;if(e.subcategories)for(let o of e.subcategories)this._setMarkersVisible(o,i)}}_snapshotMarkerVisibility(e,i=new Map){if(!e)return i;if(e.markers)for(let o of e.markers)i.set(o.id,o.visible);if(e.subcategories)for(let o of e.subcategories)this._snapshotMarkerVisibility(o,i);return i}_restoreMarkerVisibility(e,i){if(e){if(e.markers)for(let o of e.markers)i.has(o.id)&&(o.visible=i.get(o.id));if(e.subcategories)for(let o of e.subcategories)this._restoreMarkerVisibility(o,i)}}_allMarkersVisible(e){if(e.markers){for(let i of e.markers)if(!i.visible)return!1}if(e.subcategories){for(let i of e.subcategories)if(!this._allMarkersVisible(i))return!1}return!0}_toggleCategoryVisibility(e,i,o){let r=this._snapshotMarkerVisibility(e);this._setMarkersVisible(e,i),this._renderTree(),this._app.websocketManager.request({type:"drc_update_category_visibility",category:e.name,path:o||[e.name],visible:!!i}).then(()=>{this._refreshOverlay(),this._update3DHighlights(),i&&this._flashHighlight()}).catch(l=>{console.error("Failed to update category visibility:",l),this._restoreMarkerVisibility(e,r),this._renderTree()})}_showLoadDialog(){new qo(this._app,i=>{this._activeCategory=i,this._loadCategories().then(()=>{this._categorySelect.value=this._activeCategory,this._loadMarkers()})}).open()}selectCategory(e){this._activeCategory=e,this._categorySelect.value=e,this._loadMarkers()}},qo=class{constructor(e,i){this._app=e,this._onLoaded=i,this._currentPath="",this._disposers=[],this._closed=!1}open(){this._overlay=document.createElement("div"),this._overlay.className="modal-overlay",this._overlay.innerHTML=` + `,document.body.appendChild(i);function o(l){l.key==="Escape"&&r()}let r=()=>{i.remove(),document.removeEventListener("keydown",o)};return i.addEventListener("click",l=>{l.target===i&&r()}),document.addEventListener("keydown",o),{overlay:i,body:i.querySelector(".modal-body"),errorDiv:i.querySelector(".modal-error"),buttons:i.querySelector(".modal-buttons"),close:r}}function Ne(s,e){s.textContent=e,s.style.display=e?"":"none"}function ji(s,e,{primary:i=!1}={}){let o=document.createElement("button");return o.textContent=e,o.className="or-btn"+(i?" or-btn-primary":""),s.appendChild(o),o}function As(s){return"{"+String(s)+"}"}function Ul(s){let e=Wl("Global Connect","gc-dialog"),i=document.createElement("div");i.className="gc-table",e.body.appendChild(i);let o=document.createElement("div");o.className="gc-form";let r=document.createElement("input");r.placeholder="Instance pattern (regex)",r.value=".*";let l=document.createElement("input");l.placeholder="Pin pattern (regex)";let h=document.createElement("select"),u=document.createElement("select"),f=document.createElement("span");f.innerHTML='',o.append(Qe("Instance",r),Qe("Pin",l),Qe("Net",h),Qe("Region",u),f);let _=ji(o,"Add rule");e.body.appendChild(o);function y(){let b=l.value.trim()!==""&&h.value!=="";for(let C of[r,l])try{new RegExp(C.value),C.classList.remove("gc-invalid")}catch{C.classList.add("gc-invalid"),b=!1}_.disabled=!b}r.addEventListener("input",y),l.addEventListener("input",y),h.addEventListener("change",y);function g(){s.websocketManager.request({type:"global_connect_info"}).then(b=>{i.innerHTML='
InstancePinNetRegion
',(b.rules||[]).forEach(C=>{let B=document.createElement("div");B.className="gc-row",B.innerHTML=`${Mn(C.inst)}${Mn(C.pin)}${Mn(C.net)}${Mn(C.region||"All")}`;let P=document.createElement("button");P.className="or-btn or-btn-sm or-btn-icon",P.textContent="\u2715",P.title="Delete rule",P.addEventListener("click",()=>{s.websocketManager.request({type:"global_connect_delete",inst:C.inst,pin:C.pin,net:C.net,region:C.region||""}).then(g).catch(T=>Ne(e.errorDiv,String(T)))}),B.appendChild(P),i.appendChild(B)}),jo(h,b.nets||[]),jo(u,["All",...b.regions||[]]),y()}).catch(b=>Ne(e.errorDiv,String(b)))}_.addEventListener("click",()=>{let b=o.querySelector('input[name="gc-pg"]:checked').value,C=`add_global_connection -net ${As(h.value)} -inst_pattern ${As(r.value||".*")} -pin_pattern ${As(l.value)} -${b}`;u.value&&u.value!=="All"&&(C+=` -region ${As(u.value)}`),ql(s,C,e.errorDiv,"Rule added.",g)}),ji(e.buttons,"Apply (force)").addEventListener("click",()=>{s.websocketManager.request({type:"global_connect_apply",force:!0}).then(b=>{if(!b.had_rules){Ne(e.errorDiv,"No global-connect rules defined \u2014 add a rule first.");return}Ne(e.errorDiv,`Connected ${b.connected} pin(s).`),s.scheduleRedrawAllLayers&&s.scheduleRedrawAllLayers(),g()}).catch(b=>Ne(e.errorDiv,b.message||String(b)))}),ji(e.buttons,"Clear all").addEventListener("click",()=>ql(s,"clear_global_connect",e.errorDiv,"Rules cleared.",g)),ji(e.buttons,"Close").addEventListener("click",e.close),g()}function ql(s,e,i,o,r){s.websocketManager.request({type:"tcl_eval",cmd:e}).then(l=>{if(l.is_error){Ne(i,l.output||l.result||"Command failed");return}Ne(i,o||""),s.scheduleRedrawAllLayers&&s.scheduleRedrawAllLayers(),r&&r()}).catch(l=>Ne(i,l.message||String(l)))}function Gl(s,e){let i=Wl(`Insert Buffer \u2014 ${Mn(e)}`,"buf-dialog"),o=ji(i.buttons,"Insert",{primary:!0});o.disabled=!0,ji(i.buttons,"Cancel").addEventListener("click",i.close),s.websocketManager.request({type:"buffer_info",net:e}).then(l=>{if(!l.can_buffer){i.body.textContent=l.error||"This net has multiple drivers and cannot be buffered.";return}qd(s,i,e,l,o)}).catch(l=>{i.body.textContent=String(l)})}function qd(s,e,i,o,r){let l=document.createElement("div");l.className="buf-pins";let h=o.drivers||[],u=o.loads||[],f=new Set;function _(){l.innerHTML="";let b=(C,B)=>{let P=document.createElement("label");P.className="buf-pin";let T=document.createElement("input");T.type="checkbox",T.checked=f.has(C.id),T.addEventListener("change",()=>{if(T.checked){if(B)f.clear();else for(let Z of h)f.delete(Z.id);f.add(C.id)}else f.delete(C.id);_(),w()}),P.append(T,document.createTextNode(" "+C.label)),l.appendChild(P)};h.forEach(C=>b(C,!0)),u.forEach(C=>b(C,!1))}h.length&&f.add(h[0].id),_();let y=document.createElement("select");jo(y,o.masters||[]);let g=document.createElement("input");g.placeholder="Optional: new buffer name";let v=document.createElement("input");v.placeholder="Optional: new net name",e.body.append(Qe("Pins to buffer",l),Qe("Buffer master",y),Qe("Buffer name",g),Qe("Net name",v));function w(){r.disabled=f.size===0||!y.value}y.addEventListener("change",w),w(),r.addEventListener("click",()=>{let b=new Set(h.map(P=>P.id)),C=[...f],B=C.some(P=>b.has(P))?"driver":"loads";s.websocketManager.request({type:"insert_buffer",net:i,mode:B,pins:C,master:y.value,buf_name:g.value.trim(),net_name:v.value.trim()}).then(P=>{if(P.is_error||P.ok===!1){Ne(e.errorDiv,P.error||P.result||"Insertion failed");return}e.close(),P.inst&&(s.selectedInstanceName=P.inst),s.scheduleRedrawAllLayers&&s.scheduleRedrawAllLayers()}).catch(P=>Ne(e.errorDiv,P.message||String(P)))})}function Qe(s,e){let i=document.createElement("label");i.className="edit-field";let o=document.createElement("span");return o.textContent=s,i.append(o,e),i}function jo(s,e){let i=s.value;s.innerHTML="";for(let o of e){let r=document.createElement("option");r.value=o,r.textContent=o,s.appendChild(r)}e.includes(i)&&(s.value=i)}function Mn(s){return String(s??"").replace(/&/g,"&").replace(//g,">")}var Vl="#00ffff",Wd="#ffff00",Ko="#ffffff",Ci=0,Jo=1,En=2,Is=class{constructor(e,i,o,r){this._app=e,this._visibility=i,this._updateInspector=o,this._focusComponent=r,this._state=Ci,this._rulers=[],this._nextId=0,this._pt0=null,this._selectedRulerId=null,this._ctrlHeld=!1,this._shiftHeld=!1,this._rulerPane=null,this._rulerLayerGroup=null,this._previewGroup=null,this._snapGroup=null,this._snapTimer=null,this._lastSnapResult=null,this._onMouseMove=this._handleMouseMove.bind(this),this._onMapClick=this._handleMapClick.bind(this),this._initLayers()}_initLayers(){let e=this._app.map;e&&(this._rulerPane=e.createPane("ruler-pane"),this._rulerPane.style.zIndex="700",this._rulerPane.style.pointerEvents="auto",this._rulerLayerGroup=L.layerGroup([],{pane:"ruler-pane"}).addTo(e),this._previewGroup=L.layerGroup([],{pane:"ruler-pane"}).addTo(e),this._snapGroup=L.layerGroup([],{pane:"ruler-pane"}).addTo(e))}isActive(){return this._state!==Ci}updateVisibility(){this._rulerPane&&(this._rulerPane.style.display=this._visibility.rulers?"":"none")}toggleRulerMode(){this._state===Ci?this._enterFirstPoint():this.cancelRulerBuild()}cancelRulerBuild(){this._state=Ci,this._pt0=null,this._lastSnapResult=null,this._clearPreview(),this._clearSnap(),this._setCursor(!1),this._removeMapListeners()}clearAllRulers(){this._rulers=[],this._selectedRulerId=null,this._rulerLayerGroup.clearLayers(),this._clearPreview(),this._clearSnap(),this._state!==Ci&&this.cancelRulerBuild()}_enterFirstPoint(){this._state=Jo,this._pt0=null,this._lastSnapResult=null,this._setCursor(!0),this._addMapListeners()}_enterMeasuring(e){this._state=En,this._pt0=e}_addMapListeners(){let e=this._app.map;e&&(e.getContainer().addEventListener("mousemove",this._onMouseMove),e.on("click",this._onMapClick))}_removeMapListeners(){let e=this._app.map;e&&(e.getContainer().removeEventListener("mousemove",this._onMouseMove),e.off("click",this._onMapClick))}_handleMouseMove(e){if(this._state===Ci)return;this._ctrlHeld=e.ctrlKey||e.metaKey,this._shiftHeld=e.shiftKey;let i=this._app.map,o=i.getContainer().getBoundingClientRect(),r=i.containerPointToLatLng([e.clientX-o.left,e.clientY-o.top]),l=xe(r.lat,r.lng,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY);this._snapTimer&&clearTimeout(this._snapTimer),this._snapTimer=setTimeout(()=>{this._requestSnap(l.dbuX,l.dbuY)},50)}_handleMapClick(e){if(this._state===Ci)return;L.DomEvent.stopPropagation(e);let i=e.originalEvent;i&&(this._ctrlHeld=i.ctrlKey||i.metaKey,this._shiftHeld=i.shiftKey);let o=xe(e.latlng.lat,e.latlng.lng,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY),r=this._getSnappedPoint(o.dbuX,o.dbuY);this._state===Jo?this._enterMeasuring(r):this._state===En&&(this._createRuler(this._pt0,r),this._state=Jo,this._pt0=null,this._clearPreview(),this._clearSnap(),this._lastSnapResult=null)}async _requestSnap(e,i){let o=this._app;if(!o.websocketManager||!o.designScale)return;if(this._ctrlHeld){this._lastSnapResult=null,this._clearSnap(),this._updatePreview(e,i);return}let l=o.techData?.dbu_per_micron||1e3,h=o.map.getZoom(),u=Math.pow(2,Math.max(0,h)),f=1/(o.designScale*u),_=Math.max(Math.round(10*f),10),y=!0,g=!0;if(this._shiftHeld)y=!0,g=!0;else if(this._state===En&&this._pt0){let w=Math.abs(e-this._pt0.x),b=Math.abs(i-this._pt0.y);w>b?(y=!1,g=!0):b>w&&(y=!0,g=!1)}let v={};for(let[w,b]of Object.entries(this._visibility))v[w]=!!b;try{let w=await o.websocketManager.request({type:"snap",dbu_x:e,dbu_y:i,radius:l,point_threshold:_,horizontal:!!y,vertical:!!g,visible_layers:[...o.visibleLayerNames],...v});this._lastSnapResult=w,this._updateSnapIndicator(w),this._updatePreview(e,i)}catch{this._lastSnapResult=null,this._clearSnap()}}_getSnappedPoint(e,i){if(this._ctrlHeld)return{x:e,y:i};let o=this._lastSnapResult,r;if(o?.found&&o.is_point)r={x:o.edge[0][0],y:o.edge[0][1]};else if(o?.found){let l=o.edge;l[0][1]===l[1][1]?r={x:e,y:l[0][1]}:r={x:l[0][0],y:i}}else r={x:e,y:i};if(!this._shiftHeld&&this._state===En&&this._pt0){let l=Math.abs(r.x-this._pt0.x),h=Math.abs(r.y-this._pt0.y);l{L.DomEvent.stopPropagation(Q),this._selectRuler(e.id)}),y.addLayer(b);let C=this._app.map.getZoom(),B=Math.pow(2,Math.max(0,C)),T=8*(1/(i*B)),Z=(Q,nt,tt)=>{let Ct=Math.sqrt(nt*nt+tt*tt);if(Ct===0)return;let Mt=-tt/Ct,It=nt/Ct,Nt=Jt(Q.x+Mt*T,Q.y+It*T,i,o,r,l),Yt=Jt(Q.x-Mt*T,Q.y-It*T,i,o,r,l);y.addLayer(L.polyline([Nt,Yt],{color:_,weight:2,pane:"ruler-pane",interactive:!1}))};if(g)Z(e.pt0,g.x-e.pt0.x,g.y-e.pt0.y),Z(e.pt1,e.pt1.x-g.x,e.pt1.y-g.y);else{let Q=e.pt1.x-e.pt0.x,nt=e.pt1.y-e.pt0.y;Z(e.pt0,Q,nt),Z(e.pt1,Q,nt)}let G=this._computeDistance(e.pt0,e.pt1,e.euclidian),dt=v?v[0]:(h[0]+u[0])/2,gt=v?v[1]:(h[1]+u[1])/2,it=L.marker([dt,gt],{icon:L.divIcon({className:"ruler-label",html:this._formatDistance(G),iconSize:null}),pane:"ruler-pane",interactive:!1});y.addLayer(it),e._layerGroup=y,this._rulerLayerGroup.addLayer(y)}_rerenderAll(){this._rulerLayerGroup.clearLayers();for(let e of this._rulers)this._renderRuler(e)}_selectRuler(e){this._selectedRulerId=e,this._rerenderAll();let i=this._rulers.find(_=>_.id===e);if(!i)return;ae(this._app);let o=Math.abs(i.pt1.x-i.pt0.x),r=Math.abs(i.pt1.y-i.pt0.y),l=i.euclidian?Math.sqrt(o*o+r*r):o+r,h=_=>this._app.formatDbu(_,!0),u=_=>this._app.parseDbu(_),f={type:"Ruler",name:i.name,bbox:[Math.min(i.pt0.x,i.pt1.x),Math.min(i.pt0.y,i.pt1.y),Math.max(i.pt0.x,i.pt1.x),Math.max(i.pt0.y,i.pt1.y)],properties:[{name:"Name",value:i.name,editable:!0},{name:"Label",value:i.label||"",editable:!0},{name:"Point 0 - x",value:h(i.pt0.x),editable:!0},{name:"Point 0 - y",value:h(i.pt0.y),editable:!0},{name:"Point 1 - x",value:h(i.pt1.x),editable:!0},{name:"Point 1 - y",value:h(i.pt1.y),editable:!0},{name:"Delta x",value:h(o)},{name:"Delta y",value:h(r)},{name:"Length",value:h(l)},{name:"Euclidian",value:i.euclidian?"True":"False",editable:!0,editor:{type:"bool"}}],onPropertyChange:(_,y)=>{switch(_){case"Name":i.name=y;break;case"Label":i.label=y;break;case"Point 0 - x":{let g=u(y);g!==null&&(i.pt0.x=g);break}case"Point 0 - y":{let g=u(y);g!==null&&(i.pt0.y=g);break}case"Point 1 - x":{let g=u(y);g!==null&&(i.pt1.x=g);break}case"Point 1 - y":{let g=u(y);g!==null&&(i.pt1.y=g);break}case"Euclidian":i.euclidian=y.trim().toLowerCase()==="true";break}this._rerenderAll(),this._selectRuler(i.id)}};this._updateInspector(f),this._focusComponent("Inspector"),requestAnimationFrame(()=>{let _=this._app.inspectorEl?.querySelector(".inspector-toolbar");if(!_)return;let y=document.createElement("button");y.className="or-btn or-btn-icon",y.title="Delete ruler",y.innerHTML='',y.addEventListener("click",()=>{this.deleteRuler(e)}),_.appendChild(y)})}deleteRuler(e){let i=this._rulers.findIndex(r=>r.id===e);if(i===-1)return;let o=this._rulers[i];o._layerGroup&&this._rulerLayerGroup.removeLayer(o._layerGroup),this._rulers.splice(i,1),this._selectedRulerId===e&&(this._selectedRulerId=null,this._updateInspector(null))}_getManhattanJoinPt(e,i){return{x:i.x,y:e.y}}_computeDistance(e,i,o=!0){let r=Math.abs(i.x-e.x),l=Math.abs(i.y-e.y);return o?Math.sqrt(r*r+l*l):r+l}_formatDistance(e){return this._app.formatDistance(e)}_setCursor(e){let i=this._app.map?.getContainer();i&&(e?i.classList.add("ruler-mode-cursor"):i.classList.remove("ruler-mode-cursor"))}_clearPreview(){this._previewGroup?.clearLayers()}_clearSnap(){this._snapGroup?.clearLayers()}};var Ns=class{constructor(e,i,o,r){this._app=e,this._visibility=i,this._updateInspector=o,this._focusComponent=r,this._labels=[],this._anchors=[],this._mode=!1,this._selectedName=null,this._pane=null,this._handleGroup=null,this._initLayers()}_initLayers(){let e=this._app.map;e&&(this._pane=e.createPane("label-pane"),this._pane.style.zIndex="690",this._pane.style.pointerEvents="auto",this._handleGroup=L.layerGroup([],{pane:"label-pane"}).addTo(e))}isActive(){return this._mode}updateVisibility(){this._pane&&(this._pane.style.display=this._visibility.labels?"":"none")}toggleLabelMode(){this._mode=!this._mode,this._setCursor(this._mode)}cancelLabelMode(){this._mode=!1,this._setCursor(!1)}_setCursor(e){let i=this._app.map?.getContainer();i&&i.classList.toggle("label-mode-cursor",e)}_wm(){return this._app.websocketManager}_applyLabels(e){this._labels=e||[],this._renderHandles()}_refresh(e){this._applyLabels(e&&e.labels),this._app.refreshOverlay()}applyRemoteLabels(e){this._applyLabels(e),this._selectedName&&!this._labels.some(i=>i.name===this._selectedName)&&(this._selectedName=null,this._updateInspector(null),this._renderHandles()),this._app.refreshOverlay()}_updateLabel(e,i){return this._wm().request({type:"update_label",name:e,...i})}async reload(){let e=this._wm();if(e)try{let i=await e.request({type:"list_labels"});this._anchors=i.anchors||[],this._applyLabels(i.labels)}catch{this._applyLabels([])}}async handleMapClick(e,i){let o=window.prompt("Label text:");if(this._mode=!1,this._setCursor(!1),!!o)try{let r=await this._wm().request({type:"add_label",x:Math.round(e),y:Math.round(i),text:o});this._refresh(r)}catch(r){console.error("add_label failed:",r)}}_renderHandles(){if(!this._handleGroup)return;this._handleGroup.clearLayers();let e=this._app.designScale;if(!e)return;let i=this._app.designMaxDXDY,o=this._app.designOriginX,r=this._app.designOriginY;for(let l of this._labels){let h=Jt(l.x,l.y,e,i,o,r),u=l.name===this._selectedName,f=L.marker(h,{pane:"label-pane",draggable:!0,keyboard:!1,icon:L.divIcon({className:"label-handle"+(u?" label-handle-selected":""),html:"",iconSize:[10,10]}),title:l.text});f.on("click",_=>{L.DomEvent.stopPropagation(_),this._select(l.name)}),f.on("dragend",_=>{let y=_.target.getLatLng(),{dbuX:g,dbuY:v}=xe(y.lat,y.lng,e,i,o,r);this._commitMove(l,Math.round(g),Math.round(v))}),this._handleGroup.addLayer(f)}}async _commitMove(e,i,o){try{let r=await this._updateLabel(e.name,{x:i,y:o,text:e.text,size:e.size||0,anchor:e.anchor||"center",color:e.color});this._refresh(r)}catch(r){console.error("move label failed:",r)}}_select(e){this._selectedName=e,this._renderHandles();let i=this._labels.find(l=>l.name===e);if(!i)return;let o=l=>this._app.formatDbu(l,!0),r={type:"Label",name:i.name,bbox:[i.x,i.y,i.x,i.y],properties:[{name:"Name",value:i.name},{name:"Text",value:i.text,editable:!0},{name:"x",value:o(i.x)},{name:"y",value:o(i.y)},{name:"Font size",value:String(i.size||0),editable:!0},{name:"Anchor",value:i.anchor||"center",editable:!0,editor:{type:"list",options:this._anchors}}],onPropertyChange:(l,h)=>{let u={text:i.text,size:i.size||0,anchor:i.anchor||"center"};l==="Text"?u.text=h:l==="Font size"?u.size=parseInt(h,10)||0:l==="Anchor"&&(u.anchor=h.trim()),this._edit(i,u)}};this._updateInspector(r),this._focusComponent("Inspector"),requestAnimationFrame(()=>{let l=this._app.inspectorEl?.querySelector(".inspector-toolbar");if(!l||l.querySelector(".delete-label-btn"))return;let h=document.createElement("button");h.className="or-btn or-btn-icon delete-label-btn",h.title="Delete label",h.innerHTML='',h.addEventListener("click",()=>this.deleteLabel(e)),l.appendChild(h)})}async _edit(e,i){try{let o=await this._updateLabel(e.name,{x:e.x,y:e.y,text:i.text,size:i.size,anchor:i.anchor,color:e.color});this._refresh(o),this._select(e.name)}catch(o){console.error("edit label failed:",o)}}async deleteLabel(e){try{let i=await this._wm().request({type:"delete_label",name:e});this._selectedName===e&&(this._selectedName=null,this._updateInspector(null)),this._refresh(i)}catch(i){console.error("delete_label failed:",i)}}async clearAllLabels(){try{let e=await this._wm().request({type:"clear_labels"});this._selectedName=null,this._refresh(e)}catch(e){console.error("clear_labels failed:",e)}}};var Yl="Select an instance in the layout to view its schematic.",Bs=class{constructor(e,i){this.container=e,this.appState=i,this.element=document.createElement("div"),this.element.className="schematic-widget",this.element.style.cssText="width:100%; height:100%; display:flex; flex-direction:column; background:var(--bg-panel); color:var(--fg-primary); overflow:hidden;",this.controls=document.createElement("div"),this.controls.style.cssText="padding:4px 8px; background:var(--bg-header); border-bottom:1px solid var(--border);flex-shrink:0; display:flex; align-items:center; gap:8px; flex-wrap:wrap;",this.controls.innerHTML='',this.element.appendChild(this.controls),this.svgContainer=document.createElement("div"),this.svgContainer.style.cssText="flex:1; overflow:hidden; position:relative; cursor:grab; background:var(--bg-main);",this.element.appendChild(this.svgContainer),this.container.element.appendChild(this.element),this.controls.querySelector("#schematic-refresh").addEventListener("click",()=>this.refresh()),this.controls.querySelector("#schematic-fit").addEventListener("click",()=>this.fitView()),this.controls.querySelector("#schematic-zoom-in").addEventListener("click",()=>this._zoomStep(1.5)),this.controls.querySelector("#schematic-zoom-out").addEventListener("click",()=>this._zoomStep(1/1.5)),this.controls.querySelector("#schematic-select").addEventListener("click",()=>this._toggleSelectMode()),this.controls.querySelector("#schematic-zoom-to").addEventListener("click",()=>this._zoomToSelected()),this.controls.querySelector("#schematic-save-svg").addEventListener("click",()=>this._exportSvg()),this.controls.querySelector("#schematic-save-png").addEventListener("click",()=>this._exportPng()),this.controls.querySelector("#schematic-copy").addEventListener("click",()=>this._copyImage()),this.appState.schematicWidget=this,this.netlistsvg=null,this.skin=null,this._svgEl=null,this._scale=1,this._panX=0,this._panY=0,this._selectMode=!1,this._selectedCell=null,this._svgIdToInstName=new Map,this._setupPanZoom(),this.initNetlistSVG()}_setupPanZoom(){let e=this.svgContainer,i=!1,o,r,l,h;e.addEventListener("wheel",u=>{if(!this._svgEl)return;u.preventDefault();let f=u.deltaY<0?1.2:1/1.2,_=e.getBoundingClientRect(),y=u.clientX-_.left,g=u.clientY-_.top;this._panX=y+(this._panX-y)*f,this._panY=g+(this._panY-g)*f,this._scale*=f,this._applyTransform()},{passive:!1}),e.addEventListener("mousedown",u=>{if(!(!this._svgEl||u.button!==0)){if(this._selectMode){this._handleSelectClick(u);return}i=!0,o=u.clientX,r=u.clientY,l=this._panX,h=this._panY,e.style.cursor="grabbing",u.preventDefault()}}),window.addEventListener("mousemove",u=>{i&&(this._panX=l+(u.clientX-o),this._panY=h+(u.clientY-r),this._applyTransform())}),window.addEventListener("mouseup",()=>{i&&(i=!1,e.style.cursor=this._selectMode?"default":"grab")})}_zoomStep(e){if(!this._svgEl)return;let i=this.svgContainer.getBoundingClientRect(),o=i.width/2,r=i.height/2;this._panX=o+(this._panX-o)*e,this._panY=r+(this._panY-r)*e,this._scale*=e,this._applyTransform()}_toggleSelectMode(){this._selectMode=!this._selectMode;let e=this.controls.querySelector("#schematic-select");this._selectMode?(e.style.background="var(--accent)",e.style.color="var(--fg-white)",this.svgContainer.style.cursor="default"):(e.style.background="",e.style.color="",this.svgContainer.style.cursor="grab",this._clearCellHighlight())}_handleSelectClick(e){if(!this._svgEl)return;let i=e.target,o=null;for(;i&&i!==this._svgEl;){if(i.tagName==="g"&&i.id&&this._svgIdToInstName.has(i.id)){o=i;break}i=i.parentElement}if(this._clearCellHighlight(),!o)return;let r=this._svgIdToInstName.get(o.id);try{let l=o.getBBox(),h=3,u=document.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",l.x-h),u.setAttribute("y",l.y-h),u.setAttribute("width",l.width+h*2),u.setAttribute("height",l.height+h*2),u.setAttribute("fill","none"),u.setAttribute("stroke","#e05a00"),u.setAttribute("stroke-width","1.5"),u.setAttribute("rx","3"),u.id="_schematic_highlight",o.appendChild(u),this._selectedCell=o}catch{}this.controls.querySelector("#schematic-zoom-to").disabled=!1,this.setStatus(`Selected: ${r}`),this._fetchInspect(r)}_fetchInspect(e){let i=this.appState.websocketManager;if(!i)return;console.log("[Schematic] inspect:",e);let o=ae(this.appState);i.request({type:"schematic_inspect",inst_name:e,use_dbu:this.appState.showDbu}).then(r=>{he(this.appState,o)&&(this.appState.updateInspector&&this.appState.updateInspector(r),this.appState.focusComponent&&this.appState.focusComponent("Inspector"),this.appState.refreshOverlay&&this.appState.refreshOverlay())}).catch(r=>{console.error("schematic_inspect failed:",r),this.setStatus(`Inspect error: ${r}`)})}_clearCellHighlight(){if(this._svgEl){let e=this._svgEl.querySelector("#_schematic_highlight");e&&e.remove()}this._selectedCell=null,this.controls.querySelector("#schematic-zoom-to").disabled=!0}_zoomToSelected(){if(!this._selectedCell||!this._svgEl)return;let e=this.svgContainer.getBoundingClientRect(),i=this._selectedCell.getBoundingClientRect(),o=(i.left-e.left-this._panX)/this._scale,r=(i.top-e.top-this._panY)/this._scale,l=i.width/this._scale,h=i.height/this._scale,u=Math.min(e.width/l,e.height/h)*.9;this._scale=u,this._panX=e.width/2-(o+l/2)*u,this._panY=e.height/2-(r+h/2)*u,this._applyTransform()}_applyTransform(){this._svgEl&&(this._svgEl.style.transform=`translate(${this._panX}px, ${this._panY}px) scale(${this._scale})`,this._svgEl.style.transformOrigin="0 0")}fitView(){if(!this._svgEl)return;let e=this.svgContainer.getBoundingClientRect();if(e.width===0||e.height===0)return;let i=this._svgEl.viewBox&&this._svgEl.viewBox.baseVal,o=i&&i.width||this._svgEl.clientWidth||1,r=i&&i.height||this._svgEl.clientHeight||1;this._scale=Math.min(e.width/o,e.height/r)*.95,this._panX=(e.width-o*this._scale)/2,this._panY=(e.height-r*this._scale)/2,this._applyTransform()}initNetlistSVG(){this.netlistsvg=globalThis.netlistsvg,this.skin=globalThis.openroadSkin,this._netlistsvgReady=!!(this.netlistsvg&&this.skin),this._netlistsvgReady&&console.log("NetlistSVG ready."),this.setStatus(this._unreadyStatus()??Yl)}_unreadyStatus(){return this._netlistsvgReady?null:wt(this.appState)?"The schematic is not available in saved reports.":"Init error: netlistsvg or its skin is missing from the page."}syncCone(e={}){let i=this.controls.querySelector("#schematic-fanin-depth"),o=this.controls.querySelector("#schematic-fanout-depth"),r=(l,h,u)=>{if(!l)return;let f=parseInt(l.max,10)||10;h===!1?l.value=0:u!==void 0&&(l.value=u>0?Math.min(u,f):f)};r(i,e.fanin,e.fanin_depth),r(o,e.fanout,e.fanout_depth),this.refresh(e.inst_name),this.appState.focusComponent&&this.appState.focusComponent("SchematicWidget",{reveal:!0})}refresh(e=this.appState.selectedInstanceName){if(!this._netlistsvgReady){this.setStatus(this._unreadyStatus());return}if(!e){this.setStatus(Yl);return}let i=this.appState.websocketManager;if(!i){this.setStatus("Waiting for server connection\u2026");return}this.setStatus(`Loading schematic for ${e}\u2026`);let o=parseInt(this.controls.querySelector("#schematic-fanin-depth").value,10),r=parseInt(this.controls.querySelector("#schematic-fanout-depth").value,10),l=isNaN(o)?1:o,h=isNaN(r)?1:r;i.readyPromise.then(()=>{i.request({type:"schematic_cone",inst_name:e,fanin_depth:l,fanout_depth:h}).then(u=>{let f=u.modules&&u.modules.top&&u.modules.top.cells;if(!f||Object.keys(f).length===0){this.setStatus("No cells found for selected instance.");return}this.renderNetlist(u)}).catch(u=>{this.setStatus(`Error: ${u}`)})})}setStatus(e){this.controls.querySelector("#schematic-status").textContent=e}_exportSvg(){if(!this._svgEl){this.setStatus("No schematic to export.");return}let e=Wo(this._svgEl);Cl(new Blob([e],{type:"image/svg+xml;charset=utf-8"}),"schematic.svg")}async _exportPng(){if(!this._svgEl){this.setStatus("No schematic to export.");return}try{let e=await Uo(this._svgEl,2);wi(e,"schematic.png")}catch{this.setStatus("PNG export failed.")}}async _copyImage(){if(!this._svgEl){this.setStatus("No schematic to export.");return}try{let e=await Uo(this._svgEl,2),i=await ys(e);this.setStatus(i?"Schematic copied to clipboard.":"Clipboard not available.")}catch{this.setStatus("Copy failed.")}}async renderNetlist(e){try{this.setStatus("Rendering\u2026"),typeof window<"u"&&(window.__lastSchematic=e);let i=Xd(e),o,r=this.netlistsvg.render(this.skin,i);if(r&&typeof r.then=="function"?o=await r:o=await new Promise((u,f)=>{this.netlistsvg.render(this.skin,i,(_,y)=>{_?f(_):u(y)})}),typeof o!="string"||!o.includes("requestAnimationFrame(()=>this.fitView()));let h=Object.keys(e.modules.top.cells).length;this.setStatus(`${h} cell${h!==1?"s":""}`)}catch(i){console.error("NetlistSVG render failed:",i),this.setStatus(`Render error: ${i.message||i}`)}}_applyPinLabels(e){if(!this._svgEl)return;let i="http://www.w3.org/2000/svg",o="https://github.com/nturley/netlistsvg",r=e.modules&&e.modules.top&&e.modules.top.cells||{},l=(h,u)=>h.getAttribute("s:"+u)??h.getAttributeNS(o,u);for(let[h,u]of Object.entries(r)){let f=u.port_labels;if(!f)continue;let _=this._svgEl.querySelector("#"+CSS.escape("cell_"+h))||this._svgEl.querySelector("#"+CSS.escape(h));if(!_)continue;let y=u.port_directions||{};for(let g of Array.from(_.children)){if(g.tagName!=="g")continue;let v=l(g,"pid");if(!v||!(v in f))continue;let w=parseFloat(l(g,"x")),b=parseFloat(l(g,"y"));if(!isFinite(w)||!isFinite(b))continue;let C=document.createElementNS(i,"text");y[v]==="input"?(C.setAttribute("class","inputPortLabel"),C.setAttribute("x",w-3)):C.setAttribute("x",w+4),C.setAttribute("y",b-4),C.setAttribute("style","font-size:5px"),C.setAttribute("pointer-events","none"),C.textContent=f[v],_.appendChild(C)}}}_scopeSkinStyles(){if(!this._svgEl)return;let e=".schematic-widget",i=o=>{for(let r of o)r.selectorText?r.selectorText=Ud(r.selectorText,e):r.cssRules&&i(r.cssRules)};for(let o of this._svgEl.querySelectorAll("style")){let r=o.sheet;if(r)try{i(r.cssRules)}catch{continue}}}};function Ud(s,e){return s.split(",").map(i=>{let o=i.trim();if(!o)return"";let r=o.charAt(e.length);return o.startsWith(e)&&(r===""||!/[\w-]/.test(r))?o:`${e} ${o}`}).filter(Boolean).join(", ")}var Xl={and:"$_AND_",nand:"$_NAND_",or:"$_OR_",nor:"$_NOR_",xor:"$_XOR_",xnor:"$_XNOR_",not:"$_NOT_",buf:"$_BUF_"},Gd=new Set(["aoi21","aoi22","aoi211","aoi221","aoi222","aoi33","oai21","oai22","oai211","oai221","oai222","oai33"]),Vd=new Set(["and3","and4","or3","or4","nand3","nand4","nor3","nor4"]),jl=["A","B","C","D","E","F"];function Yd(s){let e=s&&s.gate_kind;if(!e)return s;let i=s.port_directions||{},o=null,r=[];for(let[g,v]of Object.entries(i))v==="output"&&o===null?o=g:v==="input"&&r.push(g);let l,h={};if(e==="aoi"||e==="oai"){let g=Array.isArray(s.gate_terms)?s.gate_terms:[];if(!g.length)return s;let v=g.map(C=>C.length);if(l=e+v.slice().sort((C,B)=>B-C).join(""),!Gd.has(l))return s;let w=g.map(C=>C.slice()).sort((C,B)=>C.length-B.length),b=0;for(let C of w)for(let B of C)h[B]=jl[b]||"I"+b,b++}else{let g=r.length;if(e==="not"||e==="buf")l=Xl[e];else if(g<=2)l=Xl[e];else if(l=e+g,!Vd.has(l))return s;if(!l)return s;r.forEach((v,w)=>{h[v]=jl[w]||"I"+w})}o!==null&&(h[o]="Y");let u=s.connections||{},f={},_={};for(let[g,v]of Object.entries(u))h[g]&&(f[h[g]]=v);for(let[g,v]of Object.entries(i))h[g]&&(_[h[g]]=v);let y={};for(let[g,v]of Object.entries(h))y[v]=g;return{...s,type:l,connections:f,port_directions:_,port_labels:y}}function Xd(s){let e=s&&s.modules&&s.modules.top;if(!e||!e.cells)return s;let i={};for(let[o,r]of Object.entries(e.cells))i[o]=Yd(r);return{...s,modules:{...s.modules,top:{...e,cells:i}}}}var Ds=class{constructor(e,i,o){this._app=e,this._redrawAllLayers=i,this._refreshOverlay=o||i,this._categories=[],this._activeCategory="",this._markerTree=null,this._expandedNodes=new Set,this._build(),this._app.websocketManager.readyPromise.then(()=>this.refresh())}_build(){let e=document.createElement("div");e.className="drc-widget";let i=document.createElement("div");i.className="drc-toolbar",this._categorySelect=document.createElement("select"),this._categorySelect.className="drc-category-select",i.appendChild(this._categorySelect),this._loadBtn=document.createElement("button"),this._loadBtn.className="or-btn or-btn-sm",this._loadBtn.textContent="Load...",i.appendChild(this._loadBtn),e.appendChild(i),this._infoBar=document.createElement("div"),this._infoBar.className="drc-info-bar",e.appendChild(this._infoBar),this._treeContainer=document.createElement("div"),this._treeContainer.className="drc-tree-container",e.appendChild(this._treeContainer),this.element=e,this._bindEvents()}_bindEvents(){this._categorySelect.addEventListener("change",()=>{this._activeCategory=this._categorySelect.value,this._loadMarkers()}),this._loadBtn.addEventListener("click",()=>{this._showLoadDialog()})}_loadCategories(){return this._app.websocketManager.request({type:"drc_categories"}).then(e=>{this._categories=e.categories||[],this._renderCategorySelect()}).catch(e=>{console.error("Failed to load DRC categories:",e)})}refresh(){this._loadCategories().then(()=>{!this._activeCategory&&this._categories.length>0&&(this._activeCategory=this._categories[0].name,this._categorySelect.value=this._activeCategory),this._activeCategory&&this._loadMarkers()})}_renderCategorySelect(){let e=this._categorySelect,i=e.value;e.innerHTML="";let o=document.createElement("option");o.value="",o.textContent="(none)",e.appendChild(o);for(let r of this._categories){let l=document.createElement("option");l.value=r.name,l.textContent=`${r.name} (${r.count})`,e.appendChild(l)}this._activeCategory&&this._categories.some(r=>r.name===this._activeCategory)?e.value=this._activeCategory:i&&this._categories.some(r=>r.name===i)?(e.value=i,this._activeCategory=i):this._activeCategory=""}_loadMarkers(){if(!this._activeCategory){this._markerTree=null,this._treeContainer.innerHTML="",this._infoBar.textContent="",this._refreshOverlay();return}this._treeContainer.innerHTML='
Loading...
',this._app.websocketManager.request({type:"drc_markers",category:this._activeCategory}).then(e=>{this._markerTree=e,this._renderTree(),this._refreshOverlay()}).catch(e=>{this._treeContainer.innerHTML="";let i=document.createElement("div");i.className="drc-error",i.textContent=`Error: ${e}`,this._treeContainer.appendChild(i),console.error("Failed to load DRC markers:",e)})}_renderTree(){if(this._treeContainer.innerHTML="",!this._markerTree)return;if(this._markerTree.error){let h=document.createElement("div");h.className="drc-error",h.textContent=this._markerTree.error,this._treeContainer.appendChild(h);return}let e=this._markerTree.total_count||0;this._infoBar.textContent=`${e} total violation${e!==1?"s":""}`;let i=this._markerTree.name||this._activeCategory,o=this._markerTree.subcategories||[],r=this._markerTree.markers||[];if(o.length===0&&r.length===0){this._treeContainer.innerHTML='
No violations
';return}let l=document.createElement("div");l.className="drc-tree",r.length>0&&l.appendChild(this._buildCategoryNode({name:i||"Markers",count:r.length,markers:r},[]));for(let h of o)l.appendChild(this._buildCategoryNode(h,[i]));this._treeContainer.appendChild(l)}_buildCategoryNode(e,i=[]){let o=[...i,e.name],r=document.createElement("div");r.className="drc-tree-node";let l=document.createElement("div");l.className="drc-tree-header";let h=document.createElement("span");h.className="drc-toggle";let u=e.subcategories&&e.subcategories.length>0||e.markers&&e.markers.length>0,f=JSON.stringify(o),_=this._expandedNodes.has(f);h.textContent=u?_?"\u25BC":"\u25B6":" ",l.appendChild(h);let y=document.createElement("input");y.type="checkbox",y.checked=this._allMarkersVisible(e),y.className="drc-visibility-check",y.addEventListener("change",b=>{b.stopPropagation(),this._toggleCategoryVisibility(e,y.checked,o)}),l.appendChild(y);let g=document.createElement("span");g.className="drc-category-label",g.textContent=e.name,l.appendChild(g);let v=document.createElement("span");v.className="drc-count",v.textContent=`${e.count} markers`,l.appendChild(v),r.appendChild(l);let w=document.createElement("div");if(w.className="drc-tree-children",w.style.display=_?"":"none",e.subcategories)for(let b of e.subcategories)w.appendChild(this._buildCategoryNode(b,o));if(e.markers)for(let b of e.markers)w.appendChild(this._buildMarkerNode(b));return r.appendChild(w),u&&(l.addEventListener("click",b=>{if(b.target===y)return;let C=w.style.display!=="none";w.style.display=C?"none":"",h.textContent=C?"\u25B6":"\u25BC",C?this._expandedNodes.delete(f):this._expandedNodes.add(f)}),l.style.cursor="pointer"),r}_buildMarkerNode(e){let i=document.createElement("div");i.className="drc-marker-row",i.dataset.markerId=e.id,e.visited||i.classList.add("drc-unvisited");let o=document.createElement("input");o.type="checkbox",o.checked=e.visible,o.className="drc-visibility-check",o.addEventListener("change",h=>{h.stopPropagation(),e.visible=o.checked,this._updateMarker(e.id,"visible",o.checked)}),i.appendChild(o);let r=document.createElement("span");r.className="drc-marker-index",r.textContent=e.index,i.appendChild(r);let l=document.createElement("span");if(l.className="drc-marker-name",l.textContent=e.name,e.layer&&(l.title=`Layer: ${e.layer}`),i.appendChild(l),e.layer){let h=document.createElement("span");h.className="drc-layer-badge",h.textContent=e.layer,i.appendChild(h)}return i.addEventListener("click",h=>{h.target!==o&&this._highlightMarker(e)}),i.addEventListener("dblclick",h=>{h.target!==o&&this._highlightMarker(e,!0)}),i}highlightMarkerById(e,i=!1){let o=this._findMarkerById(e);o&&this._highlightMarker(o,i)}_findMarkerById(e){let i=o=>{if(!o)return null;if(o.markers){for(let r of o.markers)if(r.id===e)return r}if(o.subcategories)for(let r of o.subcategories){let l=i(r);if(l)return l}return null};return i(this._markerTree)}_highlightMarker(e,i=!1){this._app.websocketManager.request({type:"drc_highlight",marker_id:e.id,open_inspector:i}).then(o=>{if(o.ok&&o.bbox){e.visited=!0;let r=this._treeContainer.querySelector(`.drc-marker-row[data-marker-id="${e.id}"]`);r&&r.classList.remove("drc-unvisited"),this._zoomToBBox(o.bbox),this._refreshOverlay(),i&&(o.select_id!=null&&this._app.navigateInspector&&this._app.navigateInspector(o.select_id),this._app.focusComponent&&this._app.focusComponent("Inspector"))}}).catch(o=>{console.error("Failed to highlight DRC marker:",o)})}_zoomToBBox(e){if(!this._app.designScale||!this._app.map)return;let[i,o,r,l]=e,h=r-i,u=l-o,_=10*this._app.getDbuPerMicron(),y=2*Math.max(h,u),g=Math.min(_,y);this._app.map.fitBounds(Gt(i-g,o-g,r+g,l+g,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY))}_updateMarker(e,i,o){this._app.websocketManager.request({type:"drc_update_marker",marker_id:e,field:i,value:!!o}).then(()=>{this._refreshOverlay(),i==="visible"&&(this._update3DHighlights(),o&&this._flashHighlight())}).catch(r=>{console.error("Failed to update DRC marker:",r)})}_flashHighlight(){let e=this._app.map?.getContainer();e&&(e.classList.remove("drc-flashing"),e.offsetWidth,e.classList.add("drc-flashing"),e.addEventListener("animationend",()=>{e.classList.remove("drc-flashing")},{once:!0}))}_update3DHighlights(){let e=this._app.threeDViewerWidget;if(!e)return;let i=[];this._collectVisibleMarkers(this._markerTree,i),i.length>0?e.highlightDRC(i):e.clearHighlightDRC()}_collectVisibleMarkers(e,i){if(e){if(e.markers)for(let o of e.markers)o.visible&&i.push(o);if(e.subcategories)for(let o of e.subcategories)this._collectVisibleMarkers(o,i)}}_setMarkersVisible(e,i){if(e){if(e.markers)for(let o of e.markers)o.visible=i;if(e.subcategories)for(let o of e.subcategories)this._setMarkersVisible(o,i)}}_snapshotMarkerVisibility(e,i=new Map){if(!e)return i;if(e.markers)for(let o of e.markers)i.set(o.id,o.visible);if(e.subcategories)for(let o of e.subcategories)this._snapshotMarkerVisibility(o,i);return i}_restoreMarkerVisibility(e,i){if(e){if(e.markers)for(let o of e.markers)i.has(o.id)&&(o.visible=i.get(o.id));if(e.subcategories)for(let o of e.subcategories)this._restoreMarkerVisibility(o,i)}}_allMarkersVisible(e){if(e.markers){for(let i of e.markers)if(!i.visible)return!1}if(e.subcategories){for(let i of e.subcategories)if(!this._allMarkersVisible(i))return!1}return!0}_toggleCategoryVisibility(e,i,o){let r=this._snapshotMarkerVisibility(e);this._setMarkersVisible(e,i),this._renderTree(),this._app.websocketManager.request({type:"drc_update_category_visibility",category:e.name,path:o||[e.name],visible:!!i}).then(()=>{this._refreshOverlay(),this._update3DHighlights(),i&&this._flashHighlight()}).catch(l=>{console.error("Failed to update category visibility:",l),this._restoreMarkerVisibility(e,r),this._renderTree()})}_showLoadDialog(){new Qo(this._app,i=>{this._activeCategory=i,this._loadCategories().then(()=>{this._categorySelect.value=this._activeCategory,this._loadMarkers()})}).open()}selectCategory(e){this._activeCategory=e,this._categorySelect.value=e,this._loadMarkers()}},Qo=class{constructor(e,i){this._app=e,this._onLoaded=i,this._currentPath="",this._disposers=[],this._closed=!1}open(){this._overlay=document.createElement("div"),this._overlay.className="modal-overlay",this._overlay.innerHTML=` - `,document.body.appendChild(this._overlay),this._breadcrumb=this._overlay.querySelector(".fb-breadcrumb"),this._fileList=this._overlay.querySelector(".fb-file-list"),this._pathInput=this._overlay.querySelector(".fb-path-input"),this._errorDiv=this._overlay.querySelector(".modal-error"),this._okBtn=this._overlay.querySelector(".ok"),this._cancelBtn=this._overlay.querySelector(".cancel"),this._listen(this._pathInput,"input",()=>this._updateOkState()),this._listen(this._pathInput,"keydown",e=>{if(e.key==="Enter"){let i=this._pathInput.value.trim();i.endsWith("/")?this._navigate(i.replace(/\/+$/,"")||"/"):this._submit()}else e.key==="Escape"&&this.close()}),this._listen(this._okBtn,"click",()=>this._submit()),this._listen(this._cancelBtn,"click",()=>this.close()),this._listen(this._overlay,"click",e=>{e.target===this._overlay&&this.close()}),this._navigate("")}close(){if(!this._closed){this._closed=!0;for(let e of this._disposers)e();this._disposers.length=0,this._overlay&&(this._overlay.remove(),this._overlay=null)}}_listen(e,i,o){e.addEventListener(i,o),this._disposers.push(()=>e.removeEventListener(i,o))}_updateOkState(){this._okBtn.disabled=!this._pathInput.value.trim()}_renderBreadcrumb(e){this._breadcrumb.innerHTML="";let i=e.split("/").filter(Boolean),o=document.createElement("span");o.className="fb-crumb",o.textContent="/",this._listen(o,"click",()=>this._navigate("/")),this._breadcrumb.appendChild(o);let r="";for(let l of i){r+="/"+l;let h=document.createElement("span");h.className="fb-crumb-sep",h.textContent=" / ",this._breadcrumb.appendChild(h);let u=document.createElement("span");u.className="fb-crumb",u.textContent=l;let f=r;this._listen(u,"click",()=>this._navigate(f)),this._breadcrumb.appendChild(u)}}_renderEntries(e){if(this._fileList.innerHTML="",!e||e.length===0){let i=document.createElement("div");i.className="fb-empty",i.textContent="(empty directory)",this._fileList.appendChild(i);return}for(let i of e){let o=document.createElement("div");o.className="fb-entry",i.is_dir&&o.classList.add("fb-dir");let r=document.createElement("span");r.className="fb-icon",r.textContent=i.is_dir?"\u{1F4C1}":"\u{1F4C4}",o.appendChild(r);let l=document.createElement("span");l.className="fb-name",l.textContent=i.name,o.appendChild(l),i.is_dir?this._listen(o,"click",()=>this._navigate(this._currentPath+"/"+i.name)):(this._listen(o,"click",()=>{let h=this._fileList.querySelector(".fb-selected");h&&h.classList.remove("fb-selected"),o.classList.add("fb-selected"),this._pathInput.value=this._currentPath+"/"+i.name,this._updateOkState()}),this._listen(o,"dblclick",()=>{this._pathInput.value=this._currentPath+"/"+i.name,this._updateOkState(),this._submit()})),this._fileList.appendChild(o)}}async _navigate(e){this._errorDiv.style.display="none",this._fileList.innerHTML='
Loading...
';try{let i=await this._app.websocketManager.request({type:"list_dir",path:e||""});if(this._closed)return;this._currentPath=i.path,this._renderBreadcrumb(i.path),this._renderEntries(i.entries),this._pathInput.value="",this._updateOkState()}catch(i){if(this._closed)return;this._fileList.innerHTML="",this._errorDiv.textContent=i.message||String(i),this._errorDiv.style.display=""}}async _submit(){let e=this._pathInput.value.trim();if(e){this._okBtn.disabled=!0,this._okBtn.textContent="Loading...",this._errorDiv.style.display="none";try{let i=await this._app.websocketManager.request({type:"drc_load_report",path:e});if(this._closed)return;if(i.ok){let o=i.category;this.close(),this._onLoaded(o)}else this._errorDiv.textContent=i.error||"Failed to load report",this._errorDiv.style.display="",this._okBtn.disabled=!1,this._okBtn.textContent="Load"}catch(i){if(this._closed)return;this._errorDiv.textContent=i.message||"Request failed",this._errorDiv.style.display="",this._okBtn.disabled=!1,this._okBtn.textContent="Load"}}}};var Ad=` -\r[]{}`;var ks=class{constructor(e,i){this._input=e,this._ws=i,this._popup=null,this._items=[],this._selectedIndex=-1,this._replaceStart=0,this._replaceEnd=0,this._debounceTimer=null,this._commandCache=null,this._history=[],this._historyIndex=-1,this._historyStash="",this._createPopup(),this._onInputBound=this._onInput.bind(this),this._onBlurBound=this._onBlur.bind(this),this._input.addEventListener("input",this._onInputBound),this._input.addEventListener("blur",this._onBlurBound)}_createPopup(){this._popup=document.createElement("div"),this._popup.className="tcl-complete-popup",this._popup.style.display="none",this._input.parentElement.appendChild(this._popup)}handleKeyDown(e){let i=this._popup.style.display!=="none";return e.key==="Tab"?(e.preventDefault(),i?this._tabAccept():this._tabComplete(this._input.value,this._input.selectionStart),!0):e.key==="Escape"?i?(this._hidePopup(),!0):!1:e.key==="ArrowDown"?i?(e.preventDefault(),this._selectItem(this._selectedIndex+1),!0):this._historyIndex>=0?(e.preventDefault(),this._historyIndex--,this._historyIndex<0?this._input.value=this._historyStash:this._input.value=this._history[this._historyIndex],!0):!1:e.key==="ArrowUp"?i?(e.preventDefault(),this._selectItem(this._selectedIndex-1),!0):this._historyIndex{let e=this._input.value,i=this._input.selectionStart,o=this._extractPrefix(e,i);o.length>=2||o.length>=1&&(o[0]==="$"||o[0]==="-")?this._requestCompletions(e,i):this._hidePopup()},100)}_onBlur(){setTimeout(()=>this._hidePopup(),150)}_extractPrefix(e,i){let o=i-1;for(;o>=0&&Ad.indexOf(e[o])===-1;)o--;return e.substring(o+1,i)}_fetchCompletions(e,i,o){let r=this._extractPrefix(e,i),l=r.length>0&&r[0]==="$",h=r.length>0&&r[0]==="-",u=!l&&!h,f=i-r.length,_=e.substring(0,f),y=/^[\s\[]*$/.test(_);if(u&&y&&this._commandCache){let g=r.toLowerCase(),b=this._commandCache.filter(w=>w.toLowerCase().startsWith(g));o(b,f,i);return}this._ws.request({type:"tcl_complete",line:e,cursor_pos:i}).then(g=>{g.mode==="commands"&&!this._commandCache&&r===""&&(this._commandCache=g.completions),g.mode==="commands"&&!this._commandCache&&this._ws.request({type:"tcl_complete",line:"",cursor_pos:0}).then(b=>{b.mode==="commands"&&(this._commandCache=b.completions)}).catch(()=>{}),o(g.completions,g.replace_start,g.replace_end)}).catch(()=>o([],0,0))}_requestCompletions(e,i){this._fetchCompletions(e,i,(o,r,l)=>{this._showPopup(o,r,l)})}_tabAccept(){if(this._items.length===0){this._hidePopup();return}if(this._items.length===1){this._selectedIndex=0,this._acceptCompletion();return}this._advanceToCommonPrefix()}_tabComplete(e,i){this._fetchCompletions(e,i,(o,r,l)=>{if(!o||o.length===0){this._hidePopup();return}if(o.length===1){this._items=o,this._replaceStart=r,this._replaceEnd=l,this._selectedIndex=0,this._acceptCompletion();return}this._items=o,this._replaceStart=r,this._replaceEnd=l,this._advanceToCommonPrefix(),this._showPopup(o,this._replaceStart,this._replaceEnd)})}_advanceToCommonPrefix(){if(this._items.length<2)return!1;let e=this._items[0];for(let h=1;h0;h++){let u=this._items[h],f=0;for(;f{let f=document.createElement("div");f.className="tcl-complete-item",f.textContent=h,f.addEventListener("mousedown",_=>{_.preventDefault(),this._selectedIndex=u,this._acceptCompletion()}),this._popup.appendChild(f)}),e.length>15){let h=document.createElement("div");h.className="tcl-complete-more",h.textContent=`... ${e.length-15} more`,this._popup.appendChild(h)}this._selectedIndex=0,this._highlightSelected(),this._popup.style.display="block"}_hidePopup(){this._popup.style.display="none",this._items=[],this._selectedIndex=-1}_selectItem(e){if(this._items.length===0)return;let i=Math.min(this._items.length,15)-1;this._selectedIndex=Math.max(0,Math.min(e,i)),this._highlightSelected()}_highlightSelected(){let e=this._popup.querySelectorAll(".tcl-complete-item");e.forEach((i,o)=>{i.classList.toggle("selected",o===this._selectedIndex)}),e[this._selectedIndex]&&e[this._selectedIndex].scrollIntoView&&e[this._selectedIndex].scrollIntoView({block:"nearest"})}_acceptCompletion(){if(this._selectedIndex<0||this._selectedIndex>=this._items.length){this._hidePopup();return}let e=this._items[this._selectedIndex],i=this._input.value.substring(0,this._replaceStart),o=this._input.value.substring(this._replaceEnd),l=!e.endsWith("/")&&!e.endsWith("::")&&(o.length===0||o[0]!==" ")?" ":"";this._input.value=i+e+l+o;let h=this._replaceStart+e.length+l.length;this._input.setSelectionRange(h,h),this._input.focus(),this._hidePopup()}};var Nl=[{key:"or_visibility",store:"cookie"},{key:"or_selectability",store:"cookie"},{key:"or_hidden_layers",store:"session"},{key:"or_nonselectable_layers",store:"session"},{key:"or_layer_patterns",store:"session"},{key:"or_hidden_chiplets",store:"cookie"},{key:"or_bg_color",store:"cookie"},{key:"or_show_dbu",store:"cookie"},{key:"or_theme",store:"theme"},{key:"or_use_true_z",store:"cookie"},{key:"or_ruler_style",store:"cookie"},{key:"or_wheel_zoom",store:"cookie"},{key:"or_arrow_step",store:"cookie"},{key:"or_font_family",store:"cookie"},{key:"or_font_scale",store:"cookie"}];function Nd(s,e){try{return window[s].getItem(e)}catch{return null}}function Bd(s,e,i){try{i===null?window[s].removeItem(e):window[s].setItem(e,i)}catch{}}function Dd({key:s,store:e}){return e==="session"?Nd("sessionStorage",s):Vt(s)}function Rd({key:s,store:e},i){e==="session"?Bd("sessionStorage",s,i):e==="theme"?i===null?el():os(i):i===null?ss(s):Qt(s,i)}function Bl(){let s={};for(let e of Nl){let i=Dd(e);i&&(s[e.key]=i)}return{version:1,entries:s}}function zd(s){return typeof s=="string"&&s!==""&&!/[;\r\n]/.test(s)}function Dl(s){for(let e of Nl){let i=s[e.key];Rd(e,zd(i)?i:null)}}function Rl(s,e=typeof document<"u"?document:null){let i="OpenROAD",o=s?`${i} - ${s}`:i;return e&&(e.title=o),o}var ht=globalThis.THREE,zl=2,Od=.002,Hd=.9,$d=1.1,Fd=.1,Zd=20,qd=3,wi=2,Ol=2,Wd=10,Gd=1e4,Ud=.15,Vd=300,Yd=6,Ls=Math.PI/180,Hl=[5025616,2201331,16750592,10233776,48340,16007990,2533018,7951688,15277667,4149685];function Xd(s){let e=new Array(s.length).fill(0),i=new Map;s.forEach((o,r)=>{let l=o.z;i.has(l)||i.set(l,[]),i.get(l).push({idx:r,chiplet:o})});for(let o of i.values()){if(o.length<=1)continue;let r=[];for(let{idx:l,chiplet:h}of o){let u=h.x,f=h.y,_=h.x+h.width,y=h.y+h.height,g=!1;for(let b=0;buv.x1&&fv.y1)){r[b].push({x1:u,y1:f,x2:_,y2:y}),e[l]=b,g=!0;break}g||(r.push([{x1:u,y1:f,x2:_,y2:y}]),e[l]=r.length-1)}}return e}var Ss=class{constructor(e,i){if(this._app=i,this._container=e,this._element=document.createElement("div"),this._element.className="three-d-viewer-widget",e.element.appendChild(this._element),!ht){wt(i)?this._showInfo("The 3D view is not available in saved reports."):this._showError("three.js is missing from the page."),this._destroyed=!0;return}this._canvasContainer=document.createElement("div"),this._canvasContainer.className="three-d-canvas-container",this._element.appendChild(this._canvasContainer),this._tooltip=document.createElement("div"),this._tooltip.className="or-tooltip",this._canvasContainer.appendChild(this._tooltip),this._optionsOverlay=this._createOptionsOverlay(),this._canvasContainer.appendChild(this._optionsOverlay),this._raycaster=new ht.Raycaster,this._scene=new ht.Scene,this._applyTheme(),this._themeObserver=new MutationObserver(()=>{this._applyTheme(),this.render()}),this._themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),this._camera=new ht.PerspectiveCamera(45,1,10,1e5),this._camera.position.set(0,0,1e3);try{this._renderer=new ht.WebGLRenderer({antialias:!0,preserveDrawingBuffer:!0})}catch(h){console.error("3D viewer: failed to create WebGL context:",h),this._showWebGLUnavailable(h),this._themeObserver&&(this._themeObserver.disconnect(),this._themeObserver=null),this._destroyed=!0;return}this._renderer.setPixelRatio(window.devicePixelRatio),this._renderer.setSize(e.width,e.height),this._canvasContainer.appendChild(this._renderer.domElement),this._rotation=new ht.Quaternion,this._distance=1e3,this._panX=0,this._panY=0,this._boundingRadius=1,this._sceneCenter=new ht.Vector3,this._mouseDown=!1,this._mouseButton=-1,this._lastMousePos={x:0,y:0},this._setupMouseHandlers();let o=new ht.AmbientLight(16777215,.5);this._scene.add(o);let r=new ht.DirectionalLight(16777215,.8);r.position.set(1,1,1).normalize(),this._scene.add(r);let l=new ht.DirectionalLight(16777215,.3);l.position.set(-1,-.5,.5).normalize(),this._scene.add(l),e.on("resize",this.onResize.bind(this)),e.on("open",this.onOpen.bind(this)),e.on("destroy",this.onDestroy.bind(this)),this._designGroup=new ht.Group,this._scene.add(this._designGroup),this._chipletMeshes=[],this._loading=!1,this._destroyed=!1,this._edgeMaterial=null}_setupMouseHandlers(){let e=this._renderer.domElement;e.addEventListener("mousedown",i=>{this._mouseDown=!0,this._mouseButton=i.button,this._lastMousePos.x=i.clientX,this._lastMousePos.y=i.clientY,e.focus(),i.preventDefault()}),e.addEventListener("contextmenu",i=>i.preventDefault()),this._onMouseMove=i=>{if(!this._mouseDown)return;let o=i.clientX-this._lastMousePos.x,r=i.clientY-this._lastMousePos.y;this._lastMousePos.x=i.clientX,this._lastMousePos.y=i.clientY,!(o===0&&r===0)&&(this._mouseButton===0?this._handleRotate(o,r):this._mouseButton===2&&this._handlePan(o,r),this._updateCamera())},this._onMouseUp=i=>{this._mouseDown&&i.button===this._mouseButton&&(this._mouseDown=!1,this._mouseButton=-1)},window.addEventListener("mousemove",this._onMouseMove),window.addEventListener("mouseup",this._onMouseUp),e.addEventListener("wheel",i=>{i.preventDefault(),i.deltaY<0?this._distance*=Hd:this._distance*=$d;let o=Math.max(this._boundingRadius*Fd,1),r=Math.max(this._boundingRadius*Zd,o);this._distance=Math.max(o,Math.min(r,this._distance)),this._updateCamera()},{passive:!1}),e.tabIndex=0,e.style.outline="none",e.addEventListener("keydown",i=>{i.key.toLowerCase()==="f"&&this.resetCamera()}),e.addEventListener("dblclick",i=>{i.preventDefault();let o=this._pickDrcMarkerId(i);if(o!=null&&this._app.drcWidget){this._app.drcWidget.highlightMarkerById(o,!0);return}this.resetCamera()}),e.addEventListener("mousemove",i=>{if(this._mouseDown){this._hideTooltip();return}this._updateTooltip(i)}),e.addEventListener("mouseleave",()=>{this._hideTooltip()})}_createOptionsOverlay(){let e=document.createElement("div");e.className="three-d-options";let i=document.createElement("label");i.title="Render chiplets at their true Z (disable stacking offset for overlapping chiplets at same Z).";let o=document.createElement("input");o.type="checkbox",o.checked=!!this._app.useTrueZ,o.addEventListener("change",()=>{this._app.useTrueZ=o.checked,Qt("or_use_true_z",o.checked?"1":"0"),this._app.syncDisplayState(),this.refreshSceneForOptions()}),i.appendChild(o),i.appendChild(document.createTextNode("True Z (no stacking)")),e.appendChild(i);let r=document.createElement("div");r.style.cssText="margin-top:4px; display:flex; gap:4px;";let l=document.createElement("button");l.className="or-btn or-btn-sm",l.textContent="Save PNG",l.title="Save the 3D view as a PNG image (2x resolution)",l.addEventListener("click",()=>this._exportPng(2));let h=document.createElement("button");return h.className="or-btn or-btn-sm",h.textContent="Copy",h.title="Copy the 3D view image to the clipboard",h.addEventListener("click",()=>this._copyImage(2)),r.appendChild(l),r.appendChild(h),e.appendChild(r),e}_capturePng(e=2){if(!this._renderer)return null;let i=this._renderer,o=i.domElement.clientWidth||i.domElement.width,r=i.domElement.clientHeight||i.domElement.height,l=i.getPixelRatio();try{return i.setPixelRatio(l*e),i.setSize(o,r,!1),this.render(),i.domElement.toDataURL("image/png")}finally{i.setPixelRatio(l),i.setSize(o,r,!1),this.render()}}_exportPng(e=2){let i=this._capturePng(e);i&&yi(i,"3d-view.png")}async _copyImage(e=2){let i=this._capturePng(e);i&&await rs(i)}_setRaycasterFromEvent(e){let o=this._renderer.domElement.getBoundingClientRect(),r=new ht.Vector2((e.clientX-o.left)/o.width*2-1,-((e.clientY-o.top)/o.height*2-1));this._raycaster.setFromCamera(r,this._camera)}_updateTooltip(e){if(!this._chipletMeshes.length){this._hideTooltip();return}this._setRaycasterFromEvent(e);let i=this._chipletMeshes.map(u=>u.mesh),o=this._raycaster.intersectObjects(i,!1);if(o.length===0){this._hideTooltip();return}let r=o[0].object,l=this._chipletMeshes.find(u=>u.mesh===r);if(!l){this._hideTooltip();return}this._tooltip.textContent=l.data.name,this._tooltip.style.display="block";let h=this._canvasContainer.getBoundingClientRect();this._tooltip.style.left=e.clientX-h.left+12+"px",this._tooltip.style.top=e.clientY-h.top+12+"px"}_hideTooltip(){this._tooltip&&(this._tooltip.style.display="none")}_pickDrcMarkerId(e){if(!this._drcHitboxMesh||!this._drcHitboxMarkerIds)return null;this._setRaycasterFromEvent(e);let i=this._raycaster.intersectObject(this._drcHitboxMesh,!1);if(i.length===0)return null;let o=i[0].instanceId;return o==null?null:this._drcHitboxMarkerIds[o]??null}_handleRotate(e,i){let o=Math.sqrt(e*e+i*i);if(o<.001)return;let r=new ht.Vector3(i/o,e/o,0),l=o/zl,u=new ht.Quaternion().setFromAxisAngle(r,l*Ls).clone().multiply(this._rotation);if(new ht.Vector3(0,0,1).applyQuaternion(u).z>=0)this._rotation.copy(u);else{let _=new ht.Vector3(0,1,0),y=e/zl*Ls,b=new ht.Quaternion().setFromAxisAngle(_,y).clone().multiply(this._rotation);new ht.Vector3(0,0,1).applyQuaternion(b).z>=0&&this._rotation.copy(b)}}_handlePan(e,i){let o=this._distance*Od;this._panX+=e*o,this._panY-=i*o}_updateCamera(){let e=Math.max(this._boundingRadius,1e3),i=Math.max(this._distance-e*Ol,Wd),o=this._distance+e*Ol;o0;){let e=this._designGroup.children[0];this._designGroup.remove(e),e.geometry&&e.geometry.dispose(),e.material&&!e.material._shared&&e.material.dispose()}this._edgeMaterial&&(this._edgeMaterial.dispose(),this._edgeMaterial=null),this._onMouseMove&&(window.removeEventListener("mousemove",this._onMouseMove),this._onMouseMove=null),this._onMouseUp&&(window.removeEventListener("mouseup",this._onMouseUp),this._onMouseUp=null),this._renderer&&(this._renderer.dispose(),this._renderer=null),this._app.threeDViewerWidget===this&&(this._app.threeDViewerWidget=null)}}_setInitialCameraState(){this._distance=this._boundingRadius*qd;let e=new ht.Quaternion().setFromAxisAngle(new ht.Vector3(1,0,0),-45*Ls),i=new ht.Quaternion().setFromAxisAngle(new ht.Vector3(0,0,1),45*Ls);this._rotation=e.multiply(i),this._panX=0,this._panY=0}resetCamera(){this._sceneBounds&&(this._setInitialCameraState(),this._updateCamera())}onResize(){if(this._destroyed)return;let e=this._canvasContainer.getBoundingClientRect(),i=e.width,o=e.height;i===0||o===0||(this._camera.aspect=i/o,this._camera.updateProjectionMatrix(),this._renderer.setSize(i,o),this.render())}render(){this._destroyed||this._renderer&&this._scene&&this._camera&&this._renderer.render(this._scene,this._camera)}_applyTheme(){let i=gi().bgMap||"#000000";this._scene.background=new ht.Color(i)}async loadData(){if(!(this._loading||this._destroyed)){this._loading=!0;for(let e of[".three-d-error",".three-d-info"]){let i=this._element.querySelector(e);i&&i.remove()}try{await this._app.websocketManager.readyPromise;let e=await this._app.websocketManager.request({type:"get_3d_data"});if(this._destroyed)return;if(e&&e.error){this._showError(e.error);return}if(e&&e.info){this._showInfo(e.info);return}this.buildScene(e)}catch(e){if(this._destroyed)return;console.error("Failed to load 3D data:",e),this._showError(e.message||String(e))}finally{this._loading=!1}}}_showOverlay(e,i,o){let r=document.createElement("div");r.className=e,r.style.cssText="position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-family:monospace;text-align:center;",r.style.color=o,r.textContent=i,this._element.appendChild(r)}_showError(e){this._showOverlay("three-d-error","Failed to load 3D data: "+e,"var(--error)")}_showInfo(e){this._showOverlay("three-d-info",e,"var(--fg-muted, #888)")}_showWebGLUnavailable(e){let i=document.createElement("div");i.className="three-d-error",i.style.cssText="position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-family:monospace;text-align:center;max-width:80%;color:var(--error);";let o=e&&e.message?e.message:String(e||"");i.innerHTML='
3D viewer unavailable: WebGL context could not be created.
In Chrome, open chrome://flags/#ignore-gpu-blocklist and set Override software rendering list to Enabled, then relaunch the browser.
Otherwise enable hardware acceleration or try a different browser. See chrome://gpu for details.
'+(o?'
'+o+"
":""),this._element.appendChild(i)}buildScene(e){if(this._destroyed||(this._lastSceneData=e,this._clearScene(),!e||!e.chiplets||e.chiplets.length===0))return;let i=this._app.getDbuPerMicron(),o=this._buildChiplets(e.chiplets,i);o.minX!==1/0&&(this._buildGrid(o),this._setSceneBoundsAndCenter(o),this._setInitialCameraState(),this._updateCamera())}_clearScene(){for(this._chipletMeshes=[];this._designGroup.children.length>0;){let e=this._designGroup.children[0];this._designGroup.remove(e),e.geometry&&e.geometry.dispose(),e.material&&!e.material._shared&&e.material.dispose()}this._hideTooltip()}_buildChiplets(e,i){let o={minX:1/0,minY:1/0,minZ:1/0,maxX:-1/0,maxY:-1/0,maxZ:-1/0};this._edgeMaterial||(this._edgeMaterial=new ht.LineBasicMaterial({color:0,linewidth:1}),this._edgeMaterial._shared=!0);let r=this._app.useTrueZ?new Array(e.length).fill(0):Xd(e);return e.forEach((l,h)=>{let u=l.width/i,f=l.height/i,_=l.thickness/i*wi,y=Hl[h%Hl.length],g=new ht.MeshPhongMaterial({color:y,transparent:!1,opacity:1,side:ht.DoubleSide,shininess:40}),b=new ht.BoxGeometry(u,f,_),w=new ht.Mesh(b,g),v=l.x/i+u/2,S=l.y/i+f/2,R=_*Ud,I=l.z/i*wi+_/2+r[h]*(_+R);w.position.set(v,S,I),this._designGroup.add(w),this._chipletMeshes.push({mesh:w,data:l,color:y});let T=new ht.EdgesGeometry(b),G=new ht.LineSegments(T,this._edgeMaterial);G.position.set(v,S,I),this._designGroup.add(G),o.minX=Math.min(o.minX,l.x/i),o.minY=Math.min(o.minY,l.y/i),o.minZ=Math.min(o.minZ,I-_/2),o.maxX=Math.max(o.maxX,l.x/i+u),o.maxY=Math.max(o.maxY,l.y/i+f),o.maxZ=Math.max(o.maxZ,I+_/2)}),o}_buildGrid(e){let i=e.maxX-e.minX,o=e.maxY-e.minY,r=Math.max(i,o)*1.4,l=10,h=new ht.GridHelper(r,l,8947848,4473924);h.rotation.x=Math.PI/2,h.position.set((e.minX+e.maxX)/2,(e.minY+e.maxY)/2,e.minZ-1),this._designGroup.add(h)}_setSceneBoundsAndCenter(e){this._sceneBounds=e;let i=e.maxX-e.minX,o=e.maxY-e.minY,r=e.maxZ-e.minZ;this._boundingRadius=Math.sqrt(i*i+o*o+r*r)/2,this._sceneCenter.set((e.minX+e.maxX)/2,(e.minY+e.maxY)/2,(e.minZ+e.maxZ)/2)}_stackOffsetForPoint(e,i,o,r){for(let{mesh:l,data:h}of this._chipletMeshes){if(e!==h.z||ih.x+h.width||oh.y+h.height)continue;let u=h.thickness/r*wi,f=h.z/r*wi+u/2;return l.position.z-f}return 0}clearHighlightDRC(){this._drcBlinkInterval&&(clearInterval(this._drcBlinkInterval),this._drcBlinkInterval=null),this._drcMeshGroup&&(this._scene.remove(this._drcMeshGroup),this._drcMeshGroup.children.forEach(e=>{e.geometry&&e.geometry.dispose()}),this._drcMaterial&&(this._drcMaterial.dispose(),this._drcMaterial=null),this._drcHitboxMaterial&&(this._drcHitboxMaterial.dispose(),this._drcHitboxMaterial=null),this._drcHitboxMesh=null,this._drcHitboxMarkerIds=null,this._drcMeshGroup=null,this.render())}highlightDRC(e){if(this._destroyed||(this.clearHighlightDRC(),!e||e.length===0))return;let i=this._app.getDbuPerMicron(),o=0,r=1e4/i*wi;this._sceneBounds&&this._sceneBounds.minZ!==1/0&&(o=this._sceneBounds.minZ,r=this._sceneBounds.maxZ),o-=1,r+=1;let l=Math.max(r-o,1);this._drcMeshGroup=new ht.Group,this._drcMaterial=new ht.LineBasicMaterial({color:16776960,transparent:!0,opacity:1,depthTest:!1,depthWrite:!1}),this._drcHitboxMaterial=new ht.MeshBasicMaterial({transparent:!0,opacity:0,depthWrite:!1});let h=[];for(let _ of e){let y=_.rects&&_.rects.length>0?_.rects:[_.bbox];for(let g of y){let[b,w,v,S,R,I]=g,T=Math.max((v-b)/i,.001),G=Math.max((S-w)/i,.001),U=o,dt=l,gt=0;if(g.length>=6&&R!==void 0&&I!==void 0){U=R/i*wi;let tt=I/i*wi;dt=Math.max(tt-U,.001),gt=this._stackOffsetForPoint(R,(b+v)/2,(w+S)/2,i)}let it=b/i+T/2,Q=w/i+G/2,nt=U+dt/2+gt;h.push({cx:it,cy:Q,cz:nt,width:T,height:G,depth:dt,markerId:_.id})}}if(h.length>0){let _=new ht.BoxGeometry(1,1,1);this._drcHitboxMesh=new ht.InstancedMesh(_,this._drcHitboxMaterial,h.length),this._drcHitboxMarkerIds=new Array(h.length);let y=new ht.Matrix4,g=new ht.Vector3,b=new ht.Vector3,w=new ht.Quaternion;h.forEach((v,S)=>{b.set(v.cx,v.cy,v.cz),g.set(v.width,v.height,v.depth),y.compose(b,w,g),this._drcHitboxMesh.setMatrixAt(S,y),this._drcHitboxMarkerIds[S]=v.markerId;let R=new ht.BoxGeometry(v.width,v.height,v.depth),I=new ht.EdgesGeometry(R);R.dispose();let T=new ht.LineSegments(I,this._drcMaterial);T.position.set(v.cx,v.cy,v.cz),T.renderOrder=999,this._drcMeshGroup.add(T)}),this._drcHitboxMesh.instanceMatrix.needsUpdate=!0,this._drcMeshGroup.add(this._drcHitboxMesh)}this._drcMeshGroup.renderOrder=999,this._scene.add(this._drcMeshGroup),this.render();let u=!0,f=0;this._drcBlinkInterval=setInterval(()=>{if(!(!this._drcMeshGroup||!this._drcMaterial)){if(f+=1,f>=Yd){this._drcMaterial.opacity=1,this.render(),clearInterval(this._drcBlinkInterval),this._drcBlinkInterval=null;return}u=!u,this._drcMaterial.opacity=u?1:.2,this.render()}},Vd)}refreshSceneForOptions(){this._destroyed||this._lastSceneData&&(this.clearHighlightDRC(),this.buildScene(this._lastSceneData))}};var jd=[{name:"green",hex:"#00ff00"},{name:"yellow",hex:"#ffff00"},{name:"cyan",hex:"#00ffff"},{name:"magenta",hex:"#ff00ff"},{name:"red",hex:"#ff0000"},{name:"dark_green",hex:"#008000"},{name:"dark_magenta",hex:"#800080"},{name:"blue",hex:"#0000ff"},{name:"orange",hex:"#ffa500"},{name:"purple",hex:"#800080"},{name:"lime",hex:"#bfff00"},{name:"teal",hex:"#008080"},{name:"pink",hex:"#ffc0cb"},{name:"brown",hex:"#8b4513"},{name:"indigo",hex:"#4b0082"},{name:"turquoise",hex:"#40e0d0"}],Kd=[{label:"Connected Insts",suffix:"connected_insts",needsNet:!0},{label:"Output Nets",suffix:"connected_nets",args:{output:!0,input:!1}},{label:"Input Nets",suffix:"connected_nets",args:{output:!1,input:!0}},{label:"All Nets",suffix:"connected_nets",args:{output:!0,input:!0}},{label:"All buffer trees",suffix:"connected_buffer_trees"},{label:"All buffer trees (incl. inverters)",suffix:"connected_buffer_trees",args:{include_inverters:!0}}],Ms=class{constructor(e){this._app=e,this._el=document.createElement("div"),this._el.className="context-menu",this._el.style.display="none",this._el.style.zIndex="10000",document.body.appendChild(this._el),this._bindEvents()}_bindEvents(){document.addEventListener("mousedown",e=>{this._el.contains(e.target)||this.hide()}),this._app.map&&this._app.map.on("movestart",()=>this.hide())}show(e){this._el.innerHTML="";let i=!!this._app.selHasInst,o=!!this._app.selHasNet,r=!(i||o),l=w=>Kd.map(v=>({label:v.label,disabled:v.needsNet?!o:!i,...w(v.suffix,v.args||{})})),h=[{label:"Select",disabled:r,subMenu:l((w,v)=>({action:()=>this._sendContextAction("select_"+w,v)}))},{label:"Highlight",disabled:r,subMenu:l((w,v)=>({subMenu:this._buildColorSubmenu("highlight_"+w,v)}))},{label:"Save",subMenu:[{label:"Visible layout",action:()=>this._app.captureLayout?.({entire:!1})},{label:"Entire layout",action:()=>this._app.captureLayout?.({entire:!0})}]},{label:"Clear",subMenu:[{label:"Selections",action:()=>this._sendContextAction("clear_selections")},{label:"Highlights",action:()=>this._sendContextAction("clear_highlights")},{label:"Rulers",action:()=>{this._app.rulerManager?.clearAllRulers()}},{label:"Focus nets",action:()=>this._sendContextAction("clear_focus_nets")},{label:"Route Guides",action:()=>this._sendContextAction("clear_route_guides")},{label:"All",action:()=>{this._sendContextAction("clear_all"),this._app.rulerManager?.clearAllRulers()}}]}];this._buildMenu(h,this._el),this._el.style.display="block";let u=4,f=this._el.getBoundingClientRect(),_=window.innerWidth-f.width-u,y=window.innerHeight-f.height-u,g=Math.max(u,Math.min(e.originalEvent.clientX,_)),b=Math.max(u,Math.min(e.originalEvent.clientY,y));this._el.style.left=g+"px",this._el.style.top=b+"px"}hide(){this._el.style.display="none"}_buildColorSubmenu(e,i={}){return jd.map(({name:o,hex:r},l)=>({label:o,swatch:r,action:()=>this._sendContextAction(e,{...i,group:l})}))}_buildMenu(e,i){e.forEach(o=>{let r=document.createElement("div");if(r.className="cm-item",o.swatch){let l=document.createElement("span");l.className="cm-swatch",l.style.background=o.swatch,r.appendChild(l)}if(r.appendChild(document.createTextNode(o.label)),o.disabled){r.classList.add("disabled"),o.subMenu&&r.classList.add("has-submenu"),i.appendChild(r);return}if(o.subMenu){r.classList.add("has-submenu");let l=document.createElement("div");l.className="cm-submenu",this._buildMenu(o.subMenu,l),r.appendChild(l),r.addEventListener("mouseenter",()=>{l.classList.remove("flip-left"),l.getBoundingClientRect().right>window.innerWidth&&l.classList.add("flip-left")})}else o.action&&r.addEventListener("click",l=>{l.stopPropagation(),this.hide();try{o.action()}catch(h){console.error("Context menu item action threw:",o.label,h)}});i.appendChild(r)})}_sendContextAction(e,i={}){this._app.websocketManager&&this._app.websocketManager.request({type:"context_action",action:e,...i}).then(o=>{$i(this._app,o),o&&o.connected_count===0&&Ce('Nothing connected \u2014 select an instance (or a net for "Connected Insts") first.'),this._syncAfterAction(e)}).catch(o=>{console.error("Context action failed:",e,o)})}_syncAfterAction(e){let i=this._app;(e==="clear_focus_nets"||e==="clear_route_guides"||e==="clear_all")&&typeof i.redrawAllLayers=="function"&&i.redrawAllLayers(),e==="clear_selections"||e==="clear_all"?(i.updateInspector?.(null),i.stopSelectionAnimation?.(),i.highlightRect&&i.map&&(i.map.removeLayer(i.highlightRect),i.highlightRect=null),i.lastSelectionBounds=null):i.refreshInspector?.(),i.refreshOverlay?.()}};function $l(s,e){if(!s)return;let i=URL.createObjectURL(s),o=document.createElement("a");o.href=i,o.download=e,o.style.display="none",document.body.appendChild(o),o.click(),document.body.removeChild(o),setTimeout(()=>URL.revokeObjectURL(i),0)}function Zl(s){return s.options&&s.options.opacity!=null?s.options.opacity:1}function ql(s,e,i){if(!e||e.tagName==="IMG"&&(!e.complete||!e.naturalWidth))return;let o=e.getBoundingClientRect();if(!(o.width<=0||o.height<=0))try{s.drawImage(e,o.left-i.left,o.top-i.top,o.width,o.height)}catch{}}function Jd(s,e,i){let o=[];s.map.eachLayer(r=>{r instanceof L.GridLayer&&r._tiles&&o.push(r)}),o.sort((r,l)=>(r.options&&r.options.zIndex||0)-(l.options&&l.options.zIndex||0));for(let r of o){let l=Zl(r);if(!(l<=0)){e.globalAlpha=l;for(let h of Object.keys(r._tiles)){let u=r._tiles[h];!u||!u.current||ql(e,u.el,i)}}}e.globalAlpha=1}function Qd(s,e,i){let o=s.map.getContainer().querySelectorAll(".leaflet-pane svg"),r=[];return o.forEach(l=>{let h=l.getBoundingClientRect();if(h.width<=0||h.height<=0)return;let u=l.cloneNode(!0);u.setAttribute("width",h.width),u.setAttribute("height",h.height);let f=new XMLSerializer().serializeToString(u),_="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(f);r.push(new Promise(y=>{let g=new Image;g.onload=()=>{try{e.drawImage(g,h.left-i.left,h.top-i.top,h.width,h.height)}catch{}y()},g.onerror=()=>y(),g.src=_}))}),Promise.all(r)}function tu(s,e,i){s.map.getContainer().querySelectorAll(".leaflet-pane .ruler-label").forEach(r=>{let l=r.getBoundingClientRect();if(l.width<=0||l.height<=0)return;let h=r.textContent;if(!h)return;let u=getComputedStyle(r),f=l.left-i.left,_=l.top-i.top;e.save(),e.fillStyle=u.backgroundColor||"rgba(0, 0, 0, 0.75)";let y=Math.min(parseFloat(u.borderTopLeftRadius)||0,l.height/2);y>0&&typeof e.roundRect=="function"?(e.beginPath(),e.roundRect(f,_,l.width,l.height,y),e.fill()):e.fillRect(f,_,l.width,l.height),e.fillStyle=u.color||"#eee",e.font=u.font||`${u.fontSize||"12px"} ${u.fontFamily||"monospace"}`,e.textAlign="left",e.textBaseline="middle",e.fillText(h,f+(parseFloat(u.paddingLeft)||0),_+l.height/2),e.restore()})}function eu(s){let e=0;return s.map.eachLayer(i=>{if(!(!(i instanceof L.GridLayer)||!i._tiles)){i._loading&&e++;for(let o of Object.keys(i._tiles)){let r=i._tiles[o],l=r&&r.el;r&&r.current&&l&&l.tagName==="IMG"&&(!l.complete||!l.naturalWidth)&&e++}}}),e}function iu(s,e=6e3,i=32){return new Promise(o=>{let r=Date.now()+e,l=0,h=()=>{if(eu(s)===0){if(++l>=2){o();return}}else l=0;if(Date.now()>=r){o();return}setTimeout(h,i)};setTimeout(h,i)})}function nu(s,e,i){s.map.eachLayer(o=>{if(!(o instanceof L.ImageOverlay))return;let r=Zl(o);r<=0||(e.globalAlpha=r,ql(e,o._image,i),e.globalAlpha=1)})}async function Fl(s){let e=s.map.getContainer(),i=e.getBoundingClientRect(),o=Math.max(1,Math.round(i.width)),r=Math.max(1,Math.round(i.height)),l=document.createElement("canvas");l.width=o,l.height=r;let h=l.getContext("2d"),u=getComputedStyle(e).backgroundColor;return h.fillStyle=u&&u!=="transparent"&&u!=="rgba(0, 0, 0, 0)"?u:"#000",h.fillRect(0,0,o,r),Jd(s,h,i),nu(s,h,i),await Qd(s,h,i),tu(s,h,i),new Promise(f=>l.toBlob(f,"image/png"))}async function Wl(s,{entire:e=!1}={}){if(!s.map)return;if(!e||!s.fitBounds){$l(await Fl(s),"layout_visible.png");return}let i=s.map.getCenter(),o=s.map.getZoom();try{s.map.fitBounds(s.fitBounds,{animate:!1}),await iu(s),$l(await Fl(s),"layout_entire.png")}finally{s.map.setView(i,o,{animate:!1})}}var xi=document.getElementById("websocket-status"),Ln=null,su=2e3,ou=20;function Wo(){let s=p.websocketManager&&p.websocketManager.isConnected,e=p.websocketManager?p.websocketManager.pendingCount:0;if(s)Ln&&(clearTimeout(Ln),Ln=null),e>ou?(xi.innerHTML=`
pending: ${e}
`,xi.style.display="block"):xi.style.display="none";else{if(p.websocketManager?._shutdown)return;Ln||(Ln=setTimeout(()=>{p.websocketManager?.isConnected||(xi.innerHTML='
\u26A0 OpenROAD disconnected \u2014 retrying\u2026
',xi.style.display="block")},su))}ru(e)}function ru(s){let e=p.tileProgressEl;e&&(e.classList.toggle("active",s>0),e.title=s>0?`${s} tile requests pending`:"")}function au(s){if(!s)return"";try{return decodeURIComponent(s)}catch{return""}}var p={map:null,fitBounds:null,lastSelectionBounds:null,selHasInst:!1,selHasNet:!1,displayControlsEl:null,allLayers:[],designScale:null,designMaxDXDY:null,designOriginX:0,designOriginY:0,websocketManager:null,goldenLayout:null,hasLiberty:!1,techData:null,inspectorEl:null,tclOutputEl:null,highlightRect:null,hoverHighlightLayer:null,hoverHighlightPane:"hover-highlight-pane",modulesLayer:null,pinsLayer:null,overlayLayers:[],hierarchyBrowser:null,focusNets:new Set,routeGuideNets:new Set,visibleLayers:new Set,visibleLayerNames:new Set,visibleChiplets:null,layerPatterns:{},useTrueZ:Vt("or_use_true_z")==="1",showDbu:Vt("or_show_dbu")==="1",rulerStyle:Vt("or_ruler_style")==="manhattan"?"manhattan":"euclidian",wheelZoom:Vt("or_wheel_zoom")!=="0",arrowStep:Fi(Vt("or_arrow_step")),fontFamily:au(Vt("or_font_family")),fontScale:wn(Vt("or_font_scale")),polyDecomp:!1,labelManager:null,selectableLayers:new Set,heatMapData:null,activeHeatMap:"",heatMapLayer:null,heatMapLegendEl:null,renderHeatMapControls:null,rulerManager:null,selectionToken:0,selectionResetters:[],getDbuPerMicron(){return this.techData?.dbu_per_micron||1e3},unitOpts(){return{showDbu:this.showDbu,dbuPerMicron:this.getDbuPerMicron()}},formatDbu(s,e=!1){return Ya(s,this.unitOpts(),e)},parseDbu(s){return Xa(s,this.unitOpts())},formatDistance(s){return ja(s,this.unitOpts())},unitLabel(){return Ka(this.unitOpts())}},te={stdcells:!0,macros:!0,pad_input:!0,pad_output:!0,pad_inout:!0,pad_power:!0,pad_spacer:!0,pad_areaio:!0,pad_other:!0,phys_fill:!1,phys_endcap:!0,phys_welltap:!0,phys_tie:!0,phys_antenna:!0,phys_cover:!0,phys_bump:!0,phys_other:!0,std_bufinv:!0,std_bufinv_timing:!0,std_clock_bufinv:!0,std_clock_gate:!0,std_level_shift:!0,std_sequential:!0,std_combinational:!0,net_signal:!0,net_power:!0,net_ground:!0,net_clock:!0,net_reset:!0,net_tieoff:!0,net_scan:!0,net_analog:!0,inst_names:!0,inst_pins:!0,inst_pin_names:!1,routing:!0,routing_segments:!0,routing_vias:!0,special_nets:!0,srouting_segments:!0,srouting_vias:!0,pins:!0,pin_names:!0,access_points:!1,regions:!0,mfg_grid:!1,gcell_grid:!1,flywires_only:!1,blockages:!0,placement_blockages:!0,routing_obstructions:!0,fills:!1,rows:!1,tracks_pref:!1,tracks_non_pref:!1,module_view:!1,detailed:!1,rulers:!0,labels:!0,scale_bar:!0,focused_nets_guides:!1,highlight_selected:!0,debug:!1};try{let s=Vt("or_visibility");if(s){let e=JSON.parse(decodeURIComponent(s));for(let[i,o]of Object.entries(e))te[i]=!!o}}catch{}var Ci={stdcells:!0,macros:!0,pad_input:!0,pad_output:!0,pad_inout:!0,pad_power:!0,pad_spacer:!0,pad_areaio:!0,pad_other:!0,phys_fill:!0,phys_endcap:!0,phys_welltap:!0,phys_tie:!0,phys_antenna:!0,phys_cover:!0,phys_bump:!0,phys_other:!0,std_bufinv:!0,std_bufinv_timing:!0,std_clock_bufinv:!0,std_clock_gate:!0,std_level_shift:!0,std_sequential:!0,std_combinational:!0,net_signal:!0,net_power:!0,net_ground:!0,net_clock:!0,net_reset:!0,net_tieoff:!0,net_scan:!0,net_analog:!0,pins:!0,inst_pins:!0,placement_blockages:!0,routing_obstructions:!0};p.visibility=te;p.selectability=Ci;try{let s=Vt("or_selectability");if(s){let e=JSON.parse(decodeURIComponent(s));for(let[i,o]of Object.entries(e))Ci[i]=!!o}}catch{}var lu=va(te,p.visibleLayerNames,Ci,p.selectableLayers,p);(function(){let e=null;try{e=new URLSearchParams(window.location.search)}catch{e=null}let i=l=>e?e.get(l):null;p.mergeTiles=i("mergetiles")!=="0";let o=Number(i("tilebudget"));Number.isFinite(o)&&o>0&&(p.tileBudgetBytes=Math.round(o*1024*1024));let r=Number(i("mergegroups"));Number.isFinite(r)&&r>0&&(p.mergeGroupCount=Math.floor(r)),p.tileDpr=di,p.MergedTileLayer=Ta({visibility:te,selectability:Ci,visibleLayers:p.visibleLayerNames,selectableLayers:p.selectableLayers,app:p},{dpr:di})})();var cu=L.GridLayer.extend({initialize:function(s,e,i){this._websocketManager=s,this._appState=e,L.GridLayer.prototype.initialize.call(this,hi(i))},_clampZoom:function(s){return L.GridLayer.prototype._clampZoom.call(this,Oi(this,s))},createTile:function(s,e){let i=document.createElement("img");i.alt="",i.setAttribute("role","presentation"),i._tileDone=!1,i.onload=()=>{i.src&&i.src.startsWith("blob:")&&URL.revokeObjectURL(i.src),i._tileDone||(i._tileDone=!0,e(null,i))},i.onerror=()=>{i._tileDone||(i._tileDone=!0,e(new Error("heat map tile load error"),i))};let o=this._appState.activeHeatMap;return o?(this._websocketManager.request({type:"heatmap_tile",name:o,z:s.z,x:s.x,y:s.y,...zi(di(),this.getTileSize().x)}).then(r=>{i.src=r?URL.createObjectURL(r):$e}).catch(()=>{i.src=$e}),i):(i.src=$e,i)},refreshTiles:function(){if(this._map)for(let s in this._tiles){let e=this._tiles[s];if(!e||!e.el)continue;let i=e.el,o=e.coords,r=this._appState.activeHeatMap;if(!r){i.src&&i.src.startsWith("blob:")&&URL.revokeObjectURL(i.src),i.src=$e;continue}this._websocketManager.request({type:"heatmap_tile",name:r,z:o.z,x:o.x,y:o.y,...zi(di(),this.getTileSize().x)}).then(l=>{i.src&&i.src.startsWith("blob:")&&URL.revokeObjectURL(i.src),i.src=l?URL.createObjectURL(l):$e}).catch(()=>{i.src=$e})}}});function Uo(s){p.heatMapData=s,p.activeHeatMap=s.active||"",p.heatMapLayer&&(p.activeHeatMap?p.map.hasLayer(p.heatMapLayer)||p.heatMapLayer.addTo(p.map):p.map.hasLayer(p.heatMapLayer)&&p.map.removeLayer(p.heatMapLayer),p.heatMapLayer.refreshTiles()),p.renderHeatMapControls&&p.renderHeatMapControls(s)}p.updateHeatMaps=Uo;function Vo(){p.overlayLayer&&p.overlayLayer.refreshTiles()}var ki=vn(()=>{Vo(),p.selectionBrowser&&p.selectionBrowser.scheduleRefresh()});p.refreshOverlay=ki;function pe(){Qt("or_visibility",encodeURIComponent(JSON.stringify(te))),Qt("or_selectability",encodeURIComponent(JSON.stringify(Ci))),Fe();let s=[[p.modulesLayer,te.module_view],[p.pinsLayer,te.pins],...p.overlayLayers.map(({def:e,layer:i})=>[i,_s(e.shown_by,te)])];for(let[e,i]of s)e&&(i&&!p.map.hasLayer(e)?e.addTo(p.map):!i&&p.map.hasLayer(e)&&p.map.removeLayer(e));for(let e of p.allLayers)e.refreshTiles();if(p.heatMapLayer&&p.heatMapLayer.refreshTiles(),p.highlightRect){let e=te.highlight_selected!==!1;!e&&p.map.hasLayer(p.highlightRect)?p.map.removeLayer(p.highlightRect):e&&!p.map.hasLayer(p.highlightRect)&&p.highlightRect.addTo(p.map)}!te.highlight_selected&&p.clearSelectionPulse&&p.clearSelectionPulse(),Vo(),p.rulerManager&&p.rulerManager.updateVisibility(),p.labelManager&&p.labelManager.updateVisibility(),p.updateScaleBar&&p.updateScaleBar()}var Vi=vn(pe),Fe=vn(()=>{!p.websocketManager||wt(p)||p.websocketManager.request({type:"set_display_state",state:Bl()}).catch(()=>{})});p.syncDisplayState=Fe;function hu(s){if(!s||typeof s!="object")return;let e=s.entries;if(!(!e||typeof e!="object")){Dl(e);try{if(p.map&&typeof sessionStorage<"u"){let i=p.map.getCenter();sessionStorage.setItem("or_restore_view",JSON.stringify({lat:i.lat,lng:i.lng,zoom:p.map.getZoom()}))}}catch{}window.location.reload()}}p.redrawAllLayers=pe;p.captureLayout=(s={})=>Wl(p,s);function du(s){let e=document.createElement("div");e.className="layout-viewer",e.style.width="100%",e.style.height="100%",e.style.backgroundColor="var(--bg-map)",s.element.appendChild(e);let i=document.createElement("div");i.className="or-hud or-hud-bottom-right heatmap-map-legend hidden",e.appendChild(i),p.heatMapLegendEl=i;let o=document.createElement("div");o.className="or-progress",e.appendChild(o),p.tileProgressEl=o,s.on("destroy",()=>{p.tileProgressEl=null,p.heatMapLegendEl=null}),p.map=L.map(e,Wa(void 0,{wheelZoom:p.wheelZoom,arrowStep:p.arrowStep})),wt(p)||tl(p.map,()=>p.wheelZoom),Da(p.map),ga(()=>pe());let r=p.map.createPane(p.hoverHighlightPane);r.style.zIndex="650",r.style.pointerEvents="none";let l=L.Control.extend({onAdd:function(){let I=L.DomUtil.create("div","leaflet-bar leaflet-control leaflet-control-fit"),T=L.DomUtil.create("a","",I);return T.href="#",T.title="Fit",T.setAttribute("role","button"),T.setAttribute("aria-label","Fit"),T.textContent="\u2922",L.DomEvent.on(T,"click",L.DomEvent.stop).on(T,"click",()=>{p.fitBounds&&p.map.fitBounds(p.fitBounds)}),I}});new l({position:"topleft"}).addTo(p.map),new ResizeObserver(()=>{p.map.invalidateSize({animate:!1})}).observe(e);let h=document.createElement("div");h.className="or-hud or-hud-bottom-left hidden";let u=document.createElement("div");u.id="scale-bar";let f=document.createElement("span");f.className="or-hud-divider";let _=document.createElement("div");_.id="coord-bar",h.appendChild(u),h.appendChild(f),h.appendChild(_),e.appendChild(h);function y(){let I=u.style.display!=="none"&&u.childElementCount>0,T=_.textContent!=="";f.style.display=I&&T?"":"none",h.classList.toggle("hidden",!I&&!T)}y(),p.map.on("mousemove",I=>{if(p.lastMouseLatLng=I.latlng,!p.designScale)return;let{dbuX:T,dbuY:G}=we(I.latlng.lat,I.latlng.lng,p.designScale,p.designMaxDXDY,p.designOriginX,p.designOriginY);_.textContent=`X: ${p.formatDbu(T)} Y: ${p.formatDbu(G)}`,y()}),p.map.on("mouseout",I=>{let T=I.originalEvent&&I.originalEvent.relatedTarget;T&&e.contains(T)||(p.lastMouseLatLng=null,_.textContent="",y())});let g=22,b=8,w=22;function v(I,T,G){let dt=2+b,gt=w,it=w+I,Q=g-2,nt=I>=40,tt=[];if(tt.push(``),nt&&G>1)for(let Ct=1;Ct`)}nt&&tt.push(`0`),tt.push(`${T}`),u.innerHTML=`${tt.join("")}`}function S(){if(!p.designScale||!te.scale_bar){u.style.display="none",y();return}let I=p.designScale*Math.pow(2,p.map.getZoom()),T=p.map.getContainer().clientWidth||400,G=Qa({targetPx:T*.15,pxPerDbu:I,dbuPerMicron:p.techData?.dbu_per_micron,showDbu:p.showDbu});if(!G){u.style.display="none",y();return}u.style.display="",v(G.barPx,G.label,G.segments),y()}let R=vn(S);p.map.on("zoom zoomend resize",R),p.updateScaleBar=S,p.rulerManager=new bs(p,te,Sn,Es),p.labelManager=new ws(p,te,Sn,Es)}function uu(s){let e=document.createElement("div");e.className="display-controls",e.innerHTML='
Loading layers...
',s.element.appendChild(e),p.displayControlsEl=e}var Go="or_restore_console",pu=1<<20;function fu(){try{if(p.tclOutputEl){let s=[...p.tclOutputEl.children].map(r=>[r.textContent,r.className]),e=s.length,i=0;for(;e>0&&i+s[e-1][0].length<=pu;)i+=s[--e][0].length;let o=s.slice(e);e>0&&o.unshift([`[earlier output not kept across reload] -`,""]),sessionStorage.setItem(Go,JSON.stringify(o))}}catch{}window.location.reload()}function mu(){try{let s=sessionStorage.getItem(Go);if(!s)return;sessionStorage.removeItem(Go);for(let[e,i]of JSON.parse(s))Ke(e,i)}catch{}}function Ke(s,e){if(!p.tclOutputEl)return;let i=document.createElement("span");e&&(i.className=e),i.textContent=s,p.tclOutputEl.appendChild(i),p.tclOutputEl.scrollTop=p.tclOutputEl.scrollHeight}function _u(){if(p._shutdownHandled)return;p._shutdownHandled=!0,p.websocketManager&&(p.websocketManager._shutdown=!0,p.websocketManager.onPush=()=>{});let s=document.createElement("div");s.style.cssText="position:fixed;inset:0;z-index:99999;background:#1e1e1e;color:#ddd;display:flex;flex-direction:column;align-items:center;justify-content:center;font-family:system-ui,sans-serif;font-size:16px;padding:24px;text-align:center;",s.innerHTML='
OpenROAD exited
You can close this tab.
',document.body.appendChild(s),setTimeout(()=>{try{window.close()}catch{}},1500)}function gu(s){let e=document.createElement("div");if(e.className="tcl-console",e.innerHTML='
%
',s.element.appendChild(e),p.tclOutputEl=e.querySelector(".tcl-output"),mu(),wt(p)){e.querySelector(".tcl-input-row").style.display="none";let r=document.createElement("span");r.className="tcl-static-notice",r.setAttribute("role","status"),r.setAttribute("aria-live","polite"),r.textContent="Tcl console is not available in saved reports.",p.tclOutputEl.appendChild(r);return}let i=e.querySelector(".tcl-input"),o=new ks(i,p.websocketManager);i.addEventListener("keydown",r=>{if(!o.handleKeyDown(r)&&r.key==="Enter"){let l=i.value.trim();if(!l)return;Ke(`>>> ${l} -`,"tcl-cmd"),o.addToHistory(l),i.value="",p.websocketManager.request({type:"tcl_eval",cmd:l}).then(h=>{h.result&&Ke(h.result+` -`,h.is_error?"tcl-error":""),h.action==="shutdown"&&_u(),!h.is_error&&p.drcWidget&&p.drcWidget.refresh()}).catch(h=>Ke(`Error: ${h} -`,"tcl-error"))}})}p.visibility=te;var Je=ul(p,pe,ki),yu=Je.createInspector,Sn=Je.updateInspector,vu=Je.highlightBBox,bu=Je.pulseHighlight;p.updateInspector=Sn;p.navigateInspector=Je.navigateInspector;p.refreshInspector=Je.refreshInspector;p.animateSelection=Je.animateSelection;p.stopSelectionAnimation=Je.stopSelectionAnimation;function wu(s){new ds(s,p,pe)}function xu(s){p.timingWidget=new _i(p,pe,ki),s.element.appendChild(p.timingWidget.element)}function Cu(s){p.drcWidget=new Cs(p,pe,ki),s.element.appendChild(p.drcWidget.element)}function ku(s){p.clockTreeWidget=new cs(s,p,pe,ki)}function Lu(s){p.chartsWidget=new hs(p,pe),s.element.appendChild(p.chartsWidget.element)}function Su(s){let e=document.createElement("div");e.className="help-panel",e.innerHTML="

Keyboard Shortcuts

fFit design to viewport
scrollZoom in/out
dragPan the view
right-dragRubber-band zoom
Shift+clickAdd object to selection
Ctrl/Cmd+clickSelect object and its connected nets
kToggle ruler mode
Shift+KClear all rulers
EscapeCancel ruler (when building)
",s.element.appendChild(e)}function Mu(s){p.selectionBrowser=new us(s,p,ki)}function Eu(s){new xs(s,p)}function Tu(s){p.threeDViewerWidget=new Ss(s,p)}var Pu=28,Iu={dimensions:{headerHeight:Pu},root:{type:"row",content:[{type:"component",componentType:"DisplayControls",title:"Display Controls",width:15},{type:"column",width:55,content:[{type:"stack",height:70,content:[{type:"component",componentType:"LayoutViewer",title:"Layout",isClosable:!1},{type:"component",componentType:"SchematicWidget",title:"Schematic"},{type:"component",componentType:"3DViewer",title:"3D Viewer"}]},{type:"component",componentType:"TclConsole",title:"Tcl Console",height:30}]},{type:"stack",width:30,content:[{type:"component",componentType:"Inspector",title:"Inspector"},{type:"component",componentType:"Browser",title:"Hierarchy"},{type:"component",componentType:"TimingWidget",title:"Timing"},{type:"component",componentType:"DRCWidget",title:"DRC"},{type:"component",componentType:"SelectHighlight",title:"Select Highlight"},{type:"component",componentType:"ClockWidget",title:"Clock Tree"},{type:"component",componentType:"ChartsWidget",title:"Charts"},{type:"component",componentType:"HelpWidget",title:"Help"}]}]}};p.goldenLayout=new Qn(document.getElementById("gl-container"));p.goldenLayout.registerComponentFactoryFunction("LayoutViewer",du);p.goldenLayout.registerComponentFactoryFunction("DisplayControls",uu);p.goldenLayout.registerComponentFactoryFunction("TclConsole",gu);p.goldenLayout.registerComponentFactoryFunction("Inspector",yu);p.goldenLayout.registerComponentFactoryFunction("Browser",wu);p.goldenLayout.registerComponentFactoryFunction("TimingWidget",xu);p.goldenLayout.registerComponentFactoryFunction("DRCWidget",Cu);p.goldenLayout.registerComponentFactoryFunction("ClockWidget",ku);p.goldenLayout.registerComponentFactoryFunction("ChartsWidget",Lu);p.goldenLayout.registerComponentFactoryFunction("SchematicWidget",Eu);p.goldenLayout.registerComponentFactoryFunction("3DViewer",Tu);p.goldenLayout.registerComponentFactoryFunction("HelpWidget",Su);p.goldenLayout.registerComponentFactoryFunction("SelectHighlight",Mu);var Ae=window.__STATIC_CACHE__||null;if(Ae)ma(),p.websocketManager=mn.fromCache(Ae,Wo);else{let s=Ha(window.location);p.websocketManager=new mn(s,Wo),p.layerExtents=new is,p.websocketManager.onReconnected=()=>{Ts(),jo(null,null,{reloadOnChange:!0}).catch(()=>{})}}Wo();p.goldenLayout.loadLayout(Iu);function Yo(){p.goldenLayout.updateSize()}p.syncLayoutSize=Yo;window.addEventListener("resize",Yo);function Es(s){p.goldenLayout.focusComponent(s)}p.focusComponent=Es;p.resetLayout=function(){p.goldenLayout&&typeof p.goldenLayout.resetLayout=="function"&&p.goldenLayout.resetLayout()};p.toggleTheme=function(){let s=document.documentElement.dataset.theme==="dark"?"light":"dark";document.documentElement.dataset.theme=s,Ao(s),os(s),p.chartsWidget&&p.chartsWidget.render(),p.clockTreeWidget&&p.clockTreeWidget.render(),Fe()};p.toggleShowDbu=function(){p.showDbu=!p.showDbu,Qt("or_show_dbu",p.showDbu?"1":"0"),p.rulerManager&&p.rulerManager._rerenderAll(),p.hierarchyBrowser&&p.hierarchyBrowser._render(),p.updateScaleBar&&p.updateScaleBar(),p.refreshInspector&&p.refreshInspector(),Fe()};p.toggleRulerStyle=function(){p.rulerStyle=p.rulerStyle==="manhattan"?"euclidian":"manhattan",Qt("or_ruler_style",p.rulerStyle),Fe()};p.toggleWheelZoom=function(){p.wheelZoom=!p.wheelZoom,Qt("or_wheel_zoom",p.wheelZoom?"1":"0"),Fe()};p.setArrowStep=function(s){p.arrowStep=Fi(s),Qt("or_arrow_step",String(p.arrowStep)),Ga(p.map,p.arrowStep),Fe()};p.setAppFont=function({family:s,scale:e}){p.fontFamily=s??p.fontFamily,p.fontScale=wn(e??p.fontScale),Qt("or_font_family",encodeURIComponent(p.fontFamily)),Qt("or_font_scale",String(p.fontScale)),p.applyAppFont(),Fe()};p.applyAppFont=function(){let s=document.documentElement;p.fontFamily?s.style.setProperty("--or-font-family",p.fontFamily):s.style.removeProperty("--or-font-family"),s.style.setProperty("--or-font-scale",String(p.fontScale/100)),p.chartsWidget&&p.chartsWidget.render(),p.clockTreeWidget&&p.clockTreeWidget.render()};p.showArrowStepDialog=()=>ml(p);p.showAppFontDialog=()=>_l(p);p.togglePolyDecomp=function(){p.websocketManager&&p.websocketManager.request({type:"poly_decomp",value:!p.polyDecomp}).then(s=>Xo(s.value)).catch(()=>{})};function Xo(s){p.polyDecomp=!!s,p.rebuildMenuBar&&p.rebuildMenuBar(),p.refreshOverlay&&p.refreshOverlay()}p.applyAppFont();p.echoTcl=s=>Ke(`>>> ${s} -`,"tcl-cmd");p.runTclScript=(s,e)=>s?(e&&p.echoTcl(s),p.websocketManager.request({type:"tcl_eval",cmd:s}).then(i=>(i&&i.result&&Ke(i.result+` -`,i.is_error?"tcl-error":""),i)).catch(i=>{Ke(`Error: ${i} -`,"tcl-error")})):Promise.resolve();function Gl(s){s&&(p.customMenu=s.menu||[],p.customToolbar=s.toolbar||[],p.rebuildMenuBar&&p.rebuildMenuBar(),p.rebuildToolbar&&p.rebuildToolbar(),Yo())}p.customMenu=[];p.customToolbar=[];p.scheduleRedrawAllLayers=Vi;p.showGlobalConnectDialog=()=>Ml(p);p.showInsertBufferDialog=s=>El(p,s);Cl(p);kl(p);p.contextMenu=new Ms(p);function Au(){let s=document.getElementById("debug-continue-btn");return s||(s=document.createElement("button"),s.id="debug-continue-btn",s.className="debug-continue-btn",s.textContent="Continue",s.title="Advance the debugger (gpl, cts, ...)",s.addEventListener("click",()=>{p.websocketManager.request({type:"debug_continue"}).catch(()=>{})}),(document.getElementById("menu-bar")||document.body).appendChild(s),s)}function Ul(s,e){let i=Po(s,xe(),e);return i?(p.currentBounds=s,p.designScale=i.scale,p.designMaxDXDY=i.maxDXDY,p.designOriginX=i.originX,p.designOriginY=i.originY,p.fitBounds=i.fitBounds,p.map.setMaxZoom(Ua(i.scale)),!0):!1}async function jo(s,e,{reloadOnChange:i=!1}={}){if(wt(p)||!p.map)return!1;let o=s,r=e;if(!o)try{let u=await p.websocketManager.request({type:"bounds"});o=u.bounds,r=u.fit_bounds}catch{return!1}if(!o||Za(p.currentBounds,o))return!1;if(i)return window.location.reload(),!0;let h=!!p.designScale?we(p.map.getCenter().lat,p.map.getCenter().lng,p.designScale,p.designMaxDXDY,p.designOriginX,p.designOriginY):null;if(!Ul(o,r))return!1;if(h){let u=Jt(h.dbuX,h.dbuY,p.designScale,p.designMaxDXDY,p.designOriginX,p.designOriginY);p.map.setView(u,p.map.getZoom(),{animate:!1})}return p.highlightRect&&(p.map.removeLayer(p.highlightRect),p.highlightRect=null),pe(),!0}function Nu(){let s=document.getElementById("loading-overlay");s.style.display="flex";let e=()=>{s.style.display!=="none"&&p.websocketManager.request({type:"bounds"}).then(i=>{i.shapes_ready&&(s.style.display="none")}).catch(()=>{}).finally(()=>{s.style.display!=="none"&&setTimeout(e,1e3)})};setTimeout(e,1e3)}function Ts(){p.layerExtents&&p.layerExtents.refetch(s=>p.websocketManager.request(s))}function Bu(s){document.getElementById("loading-overlay").style.display="none",Ts(),jo(s.bounds,s.fit_bounds).then(e=>{e||pe()}).catch(()=>pe()),p.refreshInspector&&p.refreshInspector()}function Du(){let s=document.getElementById("script-running-badge");return s||(s=document.createElement("span"),s.id="script-running-badge",s.className="script-running-badge",s.textContent="Script running",s.title="The view updates when the script pauses or finishes",(document.getElementById("menu-bar")||document.body).appendChild(s),s)}function Ru(s){if(p.scriptRunning=s,Du().style.display=s?"block":"none",!s){if(!p.booted||!p.designScale){fu();return}p.refreshPending&&(p.refreshPending=!1,Ts(),p.refreshInspector&&p.refreshInspector()),jo().then(e=>{e||Vi()}).catch(()=>Vi())}}p.websocketManager.onPush=s=>{if(s.type==="refresh"){if(p.scriptRunning){p.refreshPending=!0;return}Bu(s)}else if(s.type==="script_running")Ru(!!s.running);else if(s.type==="renderer_controls_changed")p.refreshRendererControls&&p.refreshRendererControls(),Vi();else if(s.type==="selection_invalidated")p.updateInspector&&p.updateInspector(null),p.stopSelectionAnimation&&p.stopSelectionAnimation(),p.highlightRect&&p.map&&(p.map.removeLayer(p.highlightRect),p.highlightRect=null),ki();else if(s.type==="heatmaps_changed")p.websocketManager.request({type:"heatmaps"}).then(Uo).catch(e=>console.error("Heat map refresh failed",e));else if(s.type==="labels_changed")p.labelManager&&p.labelManager.applyRemoteLabels(s.labels);else if(s.type==="drcUpdated")p._drcUpdateTimeout&&clearTimeout(p._drcUpdateTimeout),p._drcUpdateTimeout=setTimeout(()=>{p.drcWidget&&p.drcWidget.refresh()},500);else if(s.type==="debug_paused")p.refreshRendererControls&&p.refreshRendererControls(),Au().style.display="block",Vi(),p.chartsWidget&&p.websocketManager.request({type:"debug_charts"}).then(e=>p.chartsWidget.setDebugCharts(e.charts||[])).catch(()=>{});else if(s.type==="debug_resumed"){let e=document.getElementById("debug-continue-btn");e&&(e.style.display="none")}else if(s.type==="debug_refresh"){if(p.scriptRunning)return;p.highlightRect&&(p.map.removeLayer(p.highlightRect),p.highlightRect=null),Vi()}else if(s.type==="log"){let e=s.text;e.endsWith(` -`)&&(e=e.slice(0,-1)),e&&Ke(e+` -`,"")}else s.type==="restore_display_state"?hu(s.state):s.type==="custom_ui"?Gl(s):s.type==="poly_decomp"?Xo(s.value):s.type==="shutdown"&&(p.websocketManager._shutdown=!0,xi.innerHTML='
Server stopped
',xi.style.display="block")};p.websocketManager.readyPromise.then(async()=>{try{let h=function(u,f={}){let{addToSelection:_=!1,focusInspector:y=!0,context:g=!1,showConnectivity:b=!1}=f;if(!p.designScale)return Promise.resolve(null);let{dbuX:w,dbuY:v}=we(u.lat,u.lng,p.designScale,p.designMaxDXDY,p.designOriginX,p.designOriginY);if(p.labelManager&&p.labelManager.isActive()){p.labelManager.handleMapClick(w,v);return}let S=$a(te,Ci),R={type:"select",dbu_x:w,dbu_y:v,zoom:Math.round(p.map.getZoom()),visible_layers:[...p.visibleLayerNames],selectable_layers:[...p.selectableLayers],use_dbu:p.showDbu,...S};_&&(R.add_to_selection=!0),g&&(R.context=!0),b&&(R.show_connectivity=!0),p.visibleChiplets instanceof Set&&(R.visible_chiplets=[...p.visibleChiplets]);let I=ae(p);return p.websocketManager.request(R).then(T=>{if(ue(p,I)){if(console.log("Select response:",T,"at dbu",w,v),p.map.closePopup(),$i(p,T),T.selected&&T.selected.length>0){let G=T.selected[0];G.type==="Inst"&&(p.selectedInstanceName=G.name,p.schematicWidget&&p.schematicWidget.refresh()),Sn(T),y&&Es("Inspector"),T.bbox&&(vu(T.bbox[0],T.bbox[1],T.bbox[2],T.bbox[3],T.type),bu(T.bbox,T.type),p.lastSelectionBounds=Ut(T.bbox[0],T.bbox[1],T.bbox[2],T.bbox[3],p.designScale,p.designMaxDXDY,p.designOriginX,p.designOriginY)),R.show_connectivity&&T.connected_added>0&&Ce(`Selected ${T.connected_added} connected net`+(T.connected_added>1?"s":""))}else!_&&!g&&(Sn(null),p.highlightRect&&(p.map.removeLayer(p.highlightRect),p.highlightRect=null),p.lastSelectionBounds=null);return Vo(),T}}).catch(T=>(console.error("Select failed:",T),null))},[s,e,i]=await Promise.all([p.websocketManager.request({type:"tech"}),p.websocketManager.request({type:"bounds"}),p.websocketManager.request({type:"heatmaps"})]);Ts(),p.hasLiberty=s.has_liberty,p.techData=s,Rl(s.block_name),p.websocketManager.request({type:"custom_ui"}).then(Gl).catch(()=>{}),p.websocketManager.request({type:"poly_decomp"}).then(u=>Xo(u.value)).catch(()=>{});let o=e.bounds,r=e.fit_bounds;if(!Ae){let u=p.map.getSize();_a(Va({designBounds:o,fitRect:r,viewW:u.x,viewH:u.y}))}let l=Ul(o,r);if(l){if(p.labelManager&&p.labelManager.reload(),p.map.fitBounds(p.fitBounds),Ae){let u=Ae.zoom;p.map.setMinZoom(u),p.map.setMaxZoom(u),p.map.fitBounds(p.fitBounds),p.map.scrollWheelZoom.disable(),p.map.touchZoom.disable(),p.map.boxZoom.disable(),p.map.doubleClickZoom.disable(),p.pathOverlay=L.imageOverlay("",Ut(o[0][1],o[0][0],o[1][1],o[1][0],p.designScale,p.designMaxDXDY,p.designOriginX,p.designOriginY),{opacity:1,interactive:!1,zIndex:1e3}),Ae.setPathOverlay=f=>{f?(p.pathOverlay.setUrl(f),p.pathOverlay.addTo(p.map)):p.map.removeLayer(p.pathOverlay)}}try{let u=sessionStorage.getItem("or_restore_view");if(u){sessionStorage.removeItem("or_restore_view");let f=JSON.parse(u);f&&isFinite(f.lat)&&isFinite(f.lng)&&isFinite(f.zoom)&&p.map.setView([f.lat,f.lng],f.zoom)}}catch{}}if(Ae&&(document.getElementById("loading-overlay").style.display="none"),p.selectAtLatLng=h,Ae||p.map.on("click",u=>{if(p.rulerManager&&p.rulerManager.isActive())return;let f=u.originalEvent;h(u.latlng,{addToSelection:!!(f&&f.shiftKey),showConnectivity:!!(f&&(f.ctrlKey||f.metaKey))})}),!Ae){let u=p.map.getContainer(),f=null,_=null;u.addEventListener("contextmenu",y=>{y.preventDefault()}),u.addEventListener("mousedown",y=>{y.button===2&&(f={x:y.clientX,y:y.clientY},p.map.dragging.disable())}),window.addEventListener("mousemove",y=>{if(!f)return;let g=y.clientX-f.x,b=y.clientY-f.y;if(!_&&Math.abs(g)>=4&&Math.abs(b)>=4&&(_=document.createElement("div"),_.className="rubber-band",document.body.appendChild(_)),_){let w=Math.min(f.x,y.clientX),v=Math.min(f.y,y.clientY);_.style.left=w+"px",_.style.top=v+"px",_.style.width=Math.abs(g)+"px",_.style.height=Math.abs(b)+"px"}}),window.addEventListener("mouseup",y=>{if(!f)return;let g=!!_;_&&(_.remove(),_=null);let b=f;f=null,p.map.dragging.enable();let w=u.getBoundingClientRect();if(g){let R=p.map.containerPointToLatLng([b.x-w.left,b.y-w.top]),I=p.map.containerPointToLatLng([y.clientX-w.left,y.clientY-w.top]);p.map.fitBounds([[Math.min(R.lat,I.lat),Math.min(R.lng,I.lng)],[Math.max(R.lat,I.lat),Math.max(R.lng,I.lng)]]);return}if(!(y.clientX>=w.left&&y.clientX<=w.right&&y.clientY>=w.top&&y.clientY<=w.bottom)||p.rulerManager&&p.rulerManager.isActive())return;let S=p.map.containerPointToLatLng([y.clientX-w.left,y.clientY-w.top]);p.selectAtLatLng(S,{context:!0,focusInspector:!1}).then(()=>p.contextMenu.show({originalEvent:y}))})}if(vl(p,te,Ci,lu,s,pe,cu),!p.overlayLayer&&!Ae){let u=ba(te,p);p.overlayLayer=new u(p.websocketManager,{zIndex:p.allLayers.length+5,opacity:1}),p.overlayLayer.addTo(p.map)}Uo(i),l&&!e.shapes_ready&&Nu(),Fe(),p.booted=!0}catch(s){p.scriptRunning||console.error("Failed to load initial data from server:",s)}});document.addEventListener("openroad-cone-sync",s=>{p.schematicWidget?.syncCone(s.detail||{})});document.addEventListener("keydown",s=>{let e=s.target.tagName;if(e==="INPUT"||e==="TEXTAREA"||s.target.isContentEditable)return;let i=s.key.toLowerCase();i==="escape"&&p.rulerManager&&p.rulerManager.isActive()?p.rulerManager.cancelRulerBuild():i==="escape"&&p.labelManager&&p.labelManager.isActive()?p.labelManager.cancelLabelMode():i==="k"&&!s.shiftKey&&!s.ctrlKey&&!s.metaKey?p.rulerManager&&p.rulerManager.toggleRulerMode():i==="k"&&s.shiftKey&&!s.ctrlKey&&!s.metaKey?p.rulerManager&&p.rulerManager.clearAllRulers():i==="l"&&!s.shiftKey&&!s.ctrlKey&&!s.metaKey?p.labelManager&&p.labelManager.toggleLabelMode():i==="f"&&!s.ctrlKey&&!s.metaKey&&p.fitBounds?p.map.fitBounds(p.fitBounds):i==="z"&&!s.shiftKey&&!s.ctrlKey&&p.map?p.lastMouseLatLng?p.map.setZoomAround(p.lastMouseLatLng,p.map.getZoom()+1):p.map.zoomIn():i==="z"&&s.shiftKey&&!s.ctrlKey&&p.map?p.lastMouseLatLng?p.map.setZoomAround(p.lastMouseLatLng,p.map.getZoom()-1):p.map.zoomOut():i==="f"&&(s.ctrlKey||s.metaKey)?(s.preventDefault(),p.designScale&&gs(p)):i==="g"&&s.shiftKey&&!s.ctrlKey&&!s.metaKey?(s.preventDefault(),p.designScale&&ys(p)):i==="t"&&!s.shiftKey&&!s.ctrlKey&&!s.metaKey&&p.toggleTheme()},!0);})(); + `,document.body.appendChild(this._overlay),this._breadcrumb=this._overlay.querySelector(".fb-breadcrumb"),this._fileList=this._overlay.querySelector(".fb-file-list"),this._pathInput=this._overlay.querySelector(".fb-path-input"),this._errorDiv=this._overlay.querySelector(".modal-error"),this._okBtn=this._overlay.querySelector(".ok"),this._cancelBtn=this._overlay.querySelector(".cancel"),this._listen(this._pathInput,"input",()=>this._updateOkState()),this._listen(this._pathInput,"keydown",e=>{if(e.key==="Enter"){let i=this._pathInput.value.trim();i.endsWith("/")?this._navigate(i.replace(/\/+$/,"")||"/"):this._submit()}else e.key==="Escape"&&this.close()}),this._listen(this._okBtn,"click",()=>this._submit()),this._listen(this._cancelBtn,"click",()=>this.close()),this._listen(this._overlay,"click",e=>{e.target===this._overlay&&this.close()}),this._navigate("")}close(){if(!this._closed){this._closed=!0;for(let e of this._disposers)e();this._disposers.length=0,this._overlay&&(this._overlay.remove(),this._overlay=null)}}_listen(e,i,o){e.addEventListener(i,o),this._disposers.push(()=>e.removeEventListener(i,o))}_updateOkState(){this._okBtn.disabled=!this._pathInput.value.trim()}_renderBreadcrumb(e){this._breadcrumb.innerHTML="";let i=e.split("/").filter(Boolean),o=document.createElement("span");o.className="fb-crumb",o.textContent="/",this._listen(o,"click",()=>this._navigate("/")),this._breadcrumb.appendChild(o);let r="";for(let l of i){r+="/"+l;let h=document.createElement("span");h.className="fb-crumb-sep",h.textContent=" / ",this._breadcrumb.appendChild(h);let u=document.createElement("span");u.className="fb-crumb",u.textContent=l;let f=r;this._listen(u,"click",()=>this._navigate(f)),this._breadcrumb.appendChild(u)}}_renderEntries(e){if(this._fileList.innerHTML="",!e||e.length===0){let i=document.createElement("div");i.className="fb-empty",i.textContent="(empty directory)",this._fileList.appendChild(i);return}for(let i of e){let o=document.createElement("div");o.className="fb-entry",i.is_dir&&o.classList.add("fb-dir");let r=document.createElement("span");r.className="fb-icon",r.textContent=i.is_dir?"\u{1F4C1}":"\u{1F4C4}",o.appendChild(r);let l=document.createElement("span");l.className="fb-name",l.textContent=i.name,o.appendChild(l),i.is_dir?this._listen(o,"click",()=>this._navigate(this._currentPath+"/"+i.name)):(this._listen(o,"click",()=>{let h=this._fileList.querySelector(".fb-selected");h&&h.classList.remove("fb-selected"),o.classList.add("fb-selected"),this._pathInput.value=this._currentPath+"/"+i.name,this._updateOkState()}),this._listen(o,"dblclick",()=>{this._pathInput.value=this._currentPath+"/"+i.name,this._updateOkState(),this._submit()})),this._fileList.appendChild(o)}}async _navigate(e){this._errorDiv.style.display="none",this._fileList.innerHTML='
Loading...
';try{let i=await this._app.websocketManager.request({type:"list_dir",path:e||""});if(this._closed)return;this._currentPath=i.path,this._renderBreadcrumb(i.path),this._renderEntries(i.entries),this._pathInput.value="",this._updateOkState()}catch(i){if(this._closed)return;this._fileList.innerHTML="",this._errorDiv.textContent=i.message||String(i),this._errorDiv.style.display=""}}async _submit(){let e=this._pathInput.value.trim();if(e){this._okBtn.disabled=!0,this._okBtn.textContent="Loading...",this._errorDiv.style.display="none";try{let i=await this._app.websocketManager.request({type:"drc_load_report",path:e});if(this._closed)return;if(i.ok){let o=i.category;this.close(),this._onLoaded(o)}else this._errorDiv.textContent=i.error||"Failed to load report",this._errorDiv.style.display="",this._okBtn.disabled=!1,this._okBtn.textContent="Load"}catch(i){if(this._closed)return;this._errorDiv.textContent=i.message||"Request failed",this._errorDiv.style.display="",this._okBtn.disabled=!1,this._okBtn.textContent="Load"}}}};var jd=` +\r[]{}`;var Rs=class{constructor(e,i){this._input=e,this._ws=i,this._popup=null,this._items=[],this._selectedIndex=-1,this._replaceStart=0,this._replaceEnd=0,this._debounceTimer=null,this._commandCache=null,this._history=[],this._historyIndex=-1,this._historyStash="",this._createPopup(),this._onInputBound=this._onInput.bind(this),this._onBlurBound=this._onBlur.bind(this),this._input.addEventListener("input",this._onInputBound),this._input.addEventListener("blur",this._onBlurBound)}_createPopup(){this._popup=document.createElement("div"),this._popup.className="tcl-complete-popup",this._popup.style.display="none",this._input.parentElement.appendChild(this._popup)}handleKeyDown(e){let i=this._popup.style.display!=="none";return e.key==="Tab"?(e.preventDefault(),i?this._tabAccept():this._tabComplete(this._input.value,this._input.selectionStart),!0):e.key==="Escape"?i?(this._hidePopup(),!0):!1:e.key==="ArrowDown"?i?(e.preventDefault(),this._selectItem(this._selectedIndex+1),!0):this._historyIndex>=0?(e.preventDefault(),this._historyIndex--,this._historyIndex<0?this._input.value=this._historyStash:this._input.value=this._history[this._historyIndex],!0):!1:e.key==="ArrowUp"?i?(e.preventDefault(),this._selectItem(this._selectedIndex-1),!0):this._historyIndex{let e=this._input.value,i=this._input.selectionStart,o=this._extractPrefix(e,i);o.length>=2||o.length>=1&&(o[0]==="$"||o[0]==="-")?this._requestCompletions(e,i):this._hidePopup()},100)}_onBlur(){setTimeout(()=>this._hidePopup(),150)}_extractPrefix(e,i){let o=i-1;for(;o>=0&&jd.indexOf(e[o])===-1;)o--;return e.substring(o+1,i)}_fetchCompletions(e,i,o){let r=this._extractPrefix(e,i),l=r.length>0&&r[0]==="$",h=r.length>0&&r[0]==="-",u=!l&&!h,f=i-r.length,_=e.substring(0,f),y=/^[\s\[]*$/.test(_);if(u&&y&&this._commandCache){let g=r.toLowerCase(),v=this._commandCache.filter(w=>w.toLowerCase().startsWith(g));o(v,f,i);return}this._ws.request({type:"tcl_complete",line:e,cursor_pos:i}).then(g=>{g.mode==="commands"&&!this._commandCache&&r===""&&(this._commandCache=g.completions),g.mode==="commands"&&!this._commandCache&&this._ws.request({type:"tcl_complete",line:"",cursor_pos:0}).then(v=>{v.mode==="commands"&&(this._commandCache=v.completions)}).catch(()=>{}),o(g.completions,g.replace_start,g.replace_end)}).catch(()=>o([],0,0))}_requestCompletions(e,i){this._fetchCompletions(e,i,(o,r,l)=>{this._showPopup(o,r,l)})}_tabAccept(){if(this._items.length===0){this._hidePopup();return}if(this._items.length===1){this._selectedIndex=0,this._acceptCompletion();return}this._advanceToCommonPrefix()}_tabComplete(e,i){this._fetchCompletions(e,i,(o,r,l)=>{if(!o||o.length===0){this._hidePopup();return}if(o.length===1){this._items=o,this._replaceStart=r,this._replaceEnd=l,this._selectedIndex=0,this._acceptCompletion();return}this._items=o,this._replaceStart=r,this._replaceEnd=l,this._advanceToCommonPrefix(),this._showPopup(o,this._replaceStart,this._replaceEnd)})}_advanceToCommonPrefix(){if(this._items.length<2)return!1;let e=this._items[0];for(let h=1;h0;h++){let u=this._items[h],f=0;for(;f{let f=document.createElement("div");f.className="tcl-complete-item",f.textContent=h,f.addEventListener("mousedown",_=>{_.preventDefault(),this._selectedIndex=u,this._acceptCompletion()}),this._popup.appendChild(f)}),e.length>15){let h=document.createElement("div");h.className="tcl-complete-more",h.textContent=`... ${e.length-15} more`,this._popup.appendChild(h)}this._selectedIndex=0,this._highlightSelected(),this._popup.style.display="block"}_hidePopup(){this._popup.style.display="none",this._items=[],this._selectedIndex=-1}_selectItem(e){if(this._items.length===0)return;let i=Math.min(this._items.length,15)-1;this._selectedIndex=Math.max(0,Math.min(e,i)),this._highlightSelected()}_highlightSelected(){let e=this._popup.querySelectorAll(".tcl-complete-item");e.forEach((i,o)=>{i.classList.toggle("selected",o===this._selectedIndex)}),e[this._selectedIndex]&&e[this._selectedIndex].scrollIntoView&&e[this._selectedIndex].scrollIntoView({block:"nearest"})}_acceptCompletion(){if(this._selectedIndex<0||this._selectedIndex>=this._items.length){this._hidePopup();return}let e=this._items[this._selectedIndex],i=this._input.value.substring(0,this._replaceStart),o=this._input.value.substring(this._replaceEnd),l=!e.endsWith("/")&&!e.endsWith("::")&&(o.length===0||o[0]!==" ")?" ":"";this._input.value=i+e+l+o;let h=this._replaceStart+e.length+l.length;this._input.setSelectionRange(h,h),this._input.focus(),this._hidePopup()}};var Kl=[{key:"or_visibility",store:"cookie"},{key:"or_selectability",store:"cookie"},{key:"or_hidden_layers",store:"session"},{key:"or_nonselectable_layers",store:"session"},{key:"or_layer_patterns",store:"session"},{key:"or_hidden_chiplets",store:"cookie"},{key:"or_bg_color",store:"cookie"},{key:"or_show_dbu",store:"cookie"},{key:"or_theme",store:"theme"},{key:"or_use_true_z",store:"cookie"},{key:"or_ruler_style",store:"cookie"},{key:"or_wheel_zoom",store:"cookie"},{key:"or_arrow_step",store:"cookie"},{key:"or_font_family",store:"cookie"},{key:"or_font_scale",store:"cookie"}];function Kd(s,e){try{return window[s].getItem(e)}catch{return null}}function Jd(s,e,i){try{i===null?window[s].removeItem(e):window[s].setItem(e,i)}catch{}}function Qd({key:s,store:e}){return e==="session"?Kd("sessionStorage",s):Vt(s)}function tu({key:s,store:e},i){e==="session"?Jd("sessionStorage",s,i):e==="theme"?i===null?vl():gs(i):i===null?_s(s):Qt(s,i)}function Jl(){let s={};for(let e of Kl){let i=Qd(e);i&&(s[e.key]=i)}return{version:1,entries:s}}function eu(s){return typeof s=="string"&&s!==""&&!/[;\r\n]/.test(s)}function Ql(s){for(let e of Kl){let i=s[e.key];tu(e,eu(i)?i:null)}}function tc(s,e=typeof document<"u"?document:null){let i="OpenROAD",o=s?`${i} - ${s}`:i;return e&&(e.title=o),o}var ht=globalThis.THREE,ec=2,iu=.002,nu=.9,su=1.1,ou=.1,ru=20,au=3,ki=2,ic=2,lu=10,cu=1e4,hu=.15,du=300,uu=6,Os=Math.PI/180,nc=[5025616,2201331,16750592,10233776,48340,16007990,2533018,7951688,15277667,4149685];function pu(s){let e=new Array(s.length).fill(0),i=new Map;s.forEach((o,r)=>{let l=o.z;i.has(l)||i.set(l,[]),i.get(l).push({idx:r,chiplet:o})});for(let o of i.values()){if(o.length<=1)continue;let r=[];for(let{idx:l,chiplet:h}of o){let u=h.x,f=h.y,_=h.x+h.width,y=h.y+h.height,g=!1;for(let v=0;vub.x1&&fb.y1)){r[v].push({x1:u,y1:f,x2:_,y2:y}),e[l]=v,g=!0;break}g||(r.push([{x1:u,y1:f,x2:_,y2:y}]),e[l]=r.length-1)}}return e}var zs=class{constructor(e,i){if(this._app=i,this._container=e,this._element=document.createElement("div"),this._element.className="three-d-viewer-widget",e.element.appendChild(this._element),!ht){wt(i)?this._showInfo("The 3D view is not available in saved reports."):this._showError("three.js is missing from the page."),this._destroyed=!0;return}this._canvasContainer=document.createElement("div"),this._canvasContainer.className="three-d-canvas-container",this._element.appendChild(this._canvasContainer),this._tooltip=document.createElement("div"),this._tooltip.className="or-tooltip",this._canvasContainer.appendChild(this._tooltip),this._optionsOverlay=this._createOptionsOverlay(),this._canvasContainer.appendChild(this._optionsOverlay),this._raycaster=new ht.Raycaster,this._scene=new ht.Scene,this._applyTheme(),this._themeObserver=new MutationObserver(()=>{this._applyTheme(),this.render()}),this._themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),this._camera=new ht.PerspectiveCamera(45,1,10,1e5),this._camera.position.set(0,0,1e3);try{this._renderer=new ht.WebGLRenderer({antialias:!0,preserveDrawingBuffer:!0})}catch(h){console.error("3D viewer: failed to create WebGL context:",h),this._showWebGLUnavailable(h),this._themeObserver&&(this._themeObserver.disconnect(),this._themeObserver=null),this._destroyed=!0;return}this._renderer.setPixelRatio(window.devicePixelRatio),this._renderer.setSize(e.width,e.height),this._canvasContainer.appendChild(this._renderer.domElement),this._rotation=new ht.Quaternion,this._distance=1e3,this._panX=0,this._panY=0,this._boundingRadius=1,this._sceneCenter=new ht.Vector3,this._mouseDown=!1,this._mouseButton=-1,this._lastMousePos={x:0,y:0},this._setupMouseHandlers();let o=new ht.AmbientLight(16777215,.5);this._scene.add(o);let r=new ht.DirectionalLight(16777215,.8);r.position.set(1,1,1).normalize(),this._scene.add(r);let l=new ht.DirectionalLight(16777215,.3);l.position.set(-1,-.5,.5).normalize(),this._scene.add(l),e.on("resize",this.onResize.bind(this)),e.on("open",this.onOpen.bind(this)),e.on("destroy",this.onDestroy.bind(this)),this._designGroup=new ht.Group,this._scene.add(this._designGroup),this._chipletMeshes=[],this._loading=!1,this._destroyed=!1,this._edgeMaterial=null}_setupMouseHandlers(){let e=this._renderer.domElement;e.addEventListener("mousedown",i=>{this._mouseDown=!0,this._mouseButton=i.button,this._lastMousePos.x=i.clientX,this._lastMousePos.y=i.clientY,e.focus(),i.preventDefault()}),e.addEventListener("contextmenu",i=>i.preventDefault()),this._onMouseMove=i=>{if(!this._mouseDown)return;let o=i.clientX-this._lastMousePos.x,r=i.clientY-this._lastMousePos.y;this._lastMousePos.x=i.clientX,this._lastMousePos.y=i.clientY,!(o===0&&r===0)&&(this._mouseButton===0?this._handleRotate(o,r):this._mouseButton===2&&this._handlePan(o,r),this._updateCamera())},this._onMouseUp=i=>{this._mouseDown&&i.button===this._mouseButton&&(this._mouseDown=!1,this._mouseButton=-1)},window.addEventListener("mousemove",this._onMouseMove),window.addEventListener("mouseup",this._onMouseUp),e.addEventListener("wheel",i=>{i.preventDefault(),i.deltaY<0?this._distance*=nu:this._distance*=su;let o=Math.max(this._boundingRadius*ou,1),r=Math.max(this._boundingRadius*ru,o);this._distance=Math.max(o,Math.min(r,this._distance)),this._updateCamera()},{passive:!1}),e.tabIndex=0,e.style.outline="none",e.addEventListener("keydown",i=>{i.key.toLowerCase()==="f"&&this.resetCamera()}),e.addEventListener("dblclick",i=>{i.preventDefault();let o=this._pickDrcMarkerId(i);if(o!=null&&this._app.drcWidget){this._app.drcWidget.highlightMarkerById(o,!0);return}this.resetCamera()}),e.addEventListener("mousemove",i=>{if(this._mouseDown){this._hideTooltip();return}this._updateTooltip(i)}),e.addEventListener("mouseleave",()=>{this._hideTooltip()})}_createOptionsOverlay(){let e=document.createElement("div");e.className="three-d-options";let i=document.createElement("label");i.title="Render chiplets at their true Z (disable stacking offset for overlapping chiplets at same Z).";let o=document.createElement("input");o.type="checkbox",o.checked=!!this._app.useTrueZ,o.addEventListener("change",()=>{this._app.useTrueZ=o.checked,Qt("or_use_true_z",o.checked?"1":"0"),this._app.syncDisplayState(),this.refreshSceneForOptions()}),i.appendChild(o),i.appendChild(document.createTextNode("True Z (no stacking)")),e.appendChild(i);let r=document.createElement("div");r.style.cssText="margin-top:4px; display:flex; gap:4px;";let l=document.createElement("button");l.className="or-btn or-btn-sm",l.textContent="Save PNG",l.title="Save the 3D view as a PNG image (2x resolution)",l.addEventListener("click",()=>this._exportPng(2));let h=document.createElement("button");return h.className="or-btn or-btn-sm",h.textContent="Copy",h.title="Copy the 3D view image to the clipboard",h.addEventListener("click",()=>this._copyImage(2)),r.appendChild(l),r.appendChild(h),e.appendChild(r),e}_capturePng(e=2){if(!this._renderer)return null;let i=this._renderer,o=i.domElement.clientWidth||i.domElement.width,r=i.domElement.clientHeight||i.domElement.height,l=i.getPixelRatio();try{return i.setPixelRatio(l*e),i.setSize(o,r,!1),this.render(),i.domElement.toDataURL("image/png")}finally{i.setPixelRatio(l),i.setSize(o,r,!1),this.render()}}_exportPng(e=2){let i=this._capturePng(e);i&&wi(i,"3d-view.png")}async _copyImage(e=2){let i=this._capturePng(e);i&&await ys(i)}_setRaycasterFromEvent(e){let o=this._renderer.domElement.getBoundingClientRect(),r=new ht.Vector2((e.clientX-o.left)/o.width*2-1,-((e.clientY-o.top)/o.height*2-1));this._raycaster.setFromCamera(r,this._camera)}_updateTooltip(e){if(!this._chipletMeshes.length){this._hideTooltip();return}this._setRaycasterFromEvent(e);let i=this._chipletMeshes.map(u=>u.mesh),o=this._raycaster.intersectObjects(i,!1);if(o.length===0){this._hideTooltip();return}let r=o[0].object,l=this._chipletMeshes.find(u=>u.mesh===r);if(!l){this._hideTooltip();return}this._tooltip.textContent=l.data.name,this._tooltip.style.display="block";let h=this._canvasContainer.getBoundingClientRect();this._tooltip.style.left=e.clientX-h.left+12+"px",this._tooltip.style.top=e.clientY-h.top+12+"px"}_hideTooltip(){this._tooltip&&(this._tooltip.style.display="none")}_pickDrcMarkerId(e){if(!this._drcHitboxMesh||!this._drcHitboxMarkerIds)return null;this._setRaycasterFromEvent(e);let i=this._raycaster.intersectObject(this._drcHitboxMesh,!1);if(i.length===0)return null;let o=i[0].instanceId;return o==null?null:this._drcHitboxMarkerIds[o]??null}_handleRotate(e,i){let o=Math.sqrt(e*e+i*i);if(o<.001)return;let r=new ht.Vector3(i/o,e/o,0),l=o/ec,u=new ht.Quaternion().setFromAxisAngle(r,l*Os).clone().multiply(this._rotation);if(new ht.Vector3(0,0,1).applyQuaternion(u).z>=0)this._rotation.copy(u);else{let _=new ht.Vector3(0,1,0),y=e/ec*Os,v=new ht.Quaternion().setFromAxisAngle(_,y).clone().multiply(this._rotation);new ht.Vector3(0,0,1).applyQuaternion(v).z>=0&&this._rotation.copy(v)}}_handlePan(e,i){let o=this._distance*iu;this._panX+=e*o,this._panY-=i*o}_updateCamera(){let e=Math.max(this._boundingRadius,1e3),i=Math.max(this._distance-e*ic,lu),o=this._distance+e*ic;o0;){let e=this._designGroup.children[0];this._designGroup.remove(e),e.geometry&&e.geometry.dispose(),e.material&&!e.material._shared&&e.material.dispose()}this._edgeMaterial&&(this._edgeMaterial.dispose(),this._edgeMaterial=null),this._onMouseMove&&(window.removeEventListener("mousemove",this._onMouseMove),this._onMouseMove=null),this._onMouseUp&&(window.removeEventListener("mouseup",this._onMouseUp),this._onMouseUp=null),this._renderer&&(this._renderer.dispose(),this._renderer=null),this._app.threeDViewerWidget===this&&(this._app.threeDViewerWidget=null)}}_setInitialCameraState(){this._distance=this._boundingRadius*au;let e=new ht.Quaternion().setFromAxisAngle(new ht.Vector3(1,0,0),-45*Os),i=new ht.Quaternion().setFromAxisAngle(new ht.Vector3(0,0,1),45*Os);this._rotation=e.multiply(i),this._panX=0,this._panY=0}resetCamera(){this._sceneBounds&&(this._setInitialCameraState(),this._updateCamera())}onResize(){if(this._destroyed)return;let e=this._canvasContainer.getBoundingClientRect(),i=e.width,o=e.height;i===0||o===0||(this._camera.aspect=i/o,this._camera.updateProjectionMatrix(),this._renderer.setSize(i,o),this.render())}render(){this._destroyed||this._renderer&&this._scene&&this._camera&&this._renderer.render(this._scene,this._camera)}_applyTheme(){let i=bi().bgMap||"#000000";this._scene.background=new ht.Color(i)}async loadData(){if(!(this._loading||this._destroyed)){this._loading=!0;for(let e of[".three-d-error",".three-d-info"]){let i=this._element.querySelector(e);i&&i.remove()}try{await this._app.websocketManager.readyPromise;let e=await this._app.websocketManager.request({type:"get_3d_data"});if(this._destroyed)return;if(e&&e.error){this._showError(e.error);return}if(e&&e.info){this._showInfo(e.info);return}this.buildScene(e)}catch(e){if(this._destroyed)return;console.error("Failed to load 3D data:",e),this._showError(e.message||String(e))}finally{this._loading=!1}}}_showOverlay(e,i,o){let r=document.createElement("div");r.className=e,r.style.cssText="position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-family:monospace;text-align:center;",r.style.color=o,r.textContent=i,this._element.appendChild(r)}_showError(e){this._showOverlay("three-d-error","Failed to load 3D data: "+e,"var(--error)")}_showInfo(e){this._showOverlay("three-d-info",e,"var(--fg-muted, #888)")}_showWebGLUnavailable(e){let i=document.createElement("div");i.className="three-d-error",i.style.cssText="position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-family:monospace;text-align:center;max-width:80%;color:var(--error);";let o=e&&e.message?e.message:String(e||"");i.innerHTML='
3D viewer unavailable: WebGL context could not be created.
In Chrome, open chrome://flags/#ignore-gpu-blocklist and set Override software rendering list to Enabled, then relaunch the browser.
Otherwise enable hardware acceleration or try a different browser. See chrome://gpu for details.
'+(o?'
'+o+"
":""),this._element.appendChild(i)}buildScene(e){if(this._destroyed||(this._lastSceneData=e,this._clearScene(),!e||!e.chiplets||e.chiplets.length===0))return;let i=this._app.getDbuPerMicron(),o=this._buildChiplets(e.chiplets,i);o.minX!==1/0&&(this._buildGrid(o),this._setSceneBoundsAndCenter(o),this._setInitialCameraState(),this._updateCamera())}_clearScene(){for(this._chipletMeshes=[];this._designGroup.children.length>0;){let e=this._designGroup.children[0];this._designGroup.remove(e),e.geometry&&e.geometry.dispose(),e.material&&!e.material._shared&&e.material.dispose()}this._hideTooltip()}_buildChiplets(e,i){let o={minX:1/0,minY:1/0,minZ:1/0,maxX:-1/0,maxY:-1/0,maxZ:-1/0};this._edgeMaterial||(this._edgeMaterial=new ht.LineBasicMaterial({color:0,linewidth:1}),this._edgeMaterial._shared=!0);let r=this._app.useTrueZ?new Array(e.length).fill(0):pu(e);return e.forEach((l,h)=>{let u=l.width/i,f=l.height/i,_=l.thickness/i*ki,y=nc[h%nc.length],g=new ht.MeshPhongMaterial({color:y,transparent:!1,opacity:1,side:ht.DoubleSide,shininess:40}),v=new ht.BoxGeometry(u,f,_),w=new ht.Mesh(v,g),b=l.x/i+u/2,C=l.y/i+f/2,B=_*hu,P=l.z/i*ki+_/2+r[h]*(_+B);w.position.set(b,C,P),this._designGroup.add(w),this._chipletMeshes.push({mesh:w,data:l,color:y});let T=new ht.EdgesGeometry(v),Z=new ht.LineSegments(T,this._edgeMaterial);Z.position.set(b,C,P),this._designGroup.add(Z),o.minX=Math.min(o.minX,l.x/i),o.minY=Math.min(o.minY,l.y/i),o.minZ=Math.min(o.minZ,P-_/2),o.maxX=Math.max(o.maxX,l.x/i+u),o.maxY=Math.max(o.maxY,l.y/i+f),o.maxZ=Math.max(o.maxZ,P+_/2)}),o}_buildGrid(e){let i=e.maxX-e.minX,o=e.maxY-e.minY,r=Math.max(i,o)*1.4,l=10,h=new ht.GridHelper(r,l,8947848,4473924);h.rotation.x=Math.PI/2,h.position.set((e.minX+e.maxX)/2,(e.minY+e.maxY)/2,e.minZ-1),this._designGroup.add(h)}_setSceneBoundsAndCenter(e){this._sceneBounds=e;let i=e.maxX-e.minX,o=e.maxY-e.minY,r=e.maxZ-e.minZ;this._boundingRadius=Math.sqrt(i*i+o*o+r*r)/2,this._sceneCenter.set((e.minX+e.maxX)/2,(e.minY+e.maxY)/2,(e.minZ+e.maxZ)/2)}_stackOffsetForPoint(e,i,o,r){for(let{mesh:l,data:h}of this._chipletMeshes){if(e!==h.z||ih.x+h.width||oh.y+h.height)continue;let u=h.thickness/r*ki,f=h.z/r*ki+u/2;return l.position.z-f}return 0}clearHighlightDRC(){this._drcBlinkInterval&&(clearInterval(this._drcBlinkInterval),this._drcBlinkInterval=null),this._drcMeshGroup&&(this._scene.remove(this._drcMeshGroup),this._drcMeshGroup.children.forEach(e=>{e.geometry&&e.geometry.dispose()}),this._drcMaterial&&(this._drcMaterial.dispose(),this._drcMaterial=null),this._drcHitboxMaterial&&(this._drcHitboxMaterial.dispose(),this._drcHitboxMaterial=null),this._drcHitboxMesh=null,this._drcHitboxMarkerIds=null,this._drcMeshGroup=null,this.render())}highlightDRC(e){if(this._destroyed||(this.clearHighlightDRC(),!e||e.length===0))return;let i=this._app.getDbuPerMicron(),o=0,r=1e4/i*ki;this._sceneBounds&&this._sceneBounds.minZ!==1/0&&(o=this._sceneBounds.minZ,r=this._sceneBounds.maxZ),o-=1,r+=1;let l=Math.max(r-o,1);this._drcMeshGroup=new ht.Group,this._drcMaterial=new ht.LineBasicMaterial({color:16776960,transparent:!0,opacity:1,depthTest:!1,depthWrite:!1}),this._drcHitboxMaterial=new ht.MeshBasicMaterial({transparent:!0,opacity:0,depthWrite:!1});let h=[];for(let _ of e){let y=_.rects&&_.rects.length>0?_.rects:[_.bbox];for(let g of y){let[v,w,b,C,B,P]=g,T=Math.max((b-v)/i,.001),Z=Math.max((C-w)/i,.001),G=o,dt=l,gt=0;if(g.length>=6&&B!==void 0&&P!==void 0){G=B/i*ki;let tt=P/i*ki;dt=Math.max(tt-G,.001),gt=this._stackOffsetForPoint(B,(v+b)/2,(w+C)/2,i)}let it=v/i+T/2,Q=w/i+Z/2,nt=G+dt/2+gt;h.push({cx:it,cy:Q,cz:nt,width:T,height:Z,depth:dt,markerId:_.id})}}if(h.length>0){let _=new ht.BoxGeometry(1,1,1);this._drcHitboxMesh=new ht.InstancedMesh(_,this._drcHitboxMaterial,h.length),this._drcHitboxMarkerIds=new Array(h.length);let y=new ht.Matrix4,g=new ht.Vector3,v=new ht.Vector3,w=new ht.Quaternion;h.forEach((b,C)=>{v.set(b.cx,b.cy,b.cz),g.set(b.width,b.height,b.depth),y.compose(v,w,g),this._drcHitboxMesh.setMatrixAt(C,y),this._drcHitboxMarkerIds[C]=b.markerId;let B=new ht.BoxGeometry(b.width,b.height,b.depth),P=new ht.EdgesGeometry(B);B.dispose();let T=new ht.LineSegments(P,this._drcMaterial);T.position.set(b.cx,b.cy,b.cz),T.renderOrder=999,this._drcMeshGroup.add(T)}),this._drcHitboxMesh.instanceMatrix.needsUpdate=!0,this._drcMeshGroup.add(this._drcHitboxMesh)}this._drcMeshGroup.renderOrder=999,this._scene.add(this._drcMeshGroup),this.render();let u=!0,f=0;this._drcBlinkInterval=setInterval(()=>{if(!(!this._drcMeshGroup||!this._drcMaterial)){if(f+=1,f>=uu){this._drcMaterial.opacity=1,this.render(),clearInterval(this._drcBlinkInterval),this._drcBlinkInterval=null;return}u=!u,this._drcMaterial.opacity=u?1:.2,this.render()}},du)}refreshSceneForOptions(){this._destroyed||this._lastSceneData&&(this.clearHighlightDRC(),this.buildScene(this._lastSceneData))}};var fu=[{name:"green",hex:"#00ff00"},{name:"yellow",hex:"#ffff00"},{name:"cyan",hex:"#00ffff"},{name:"magenta",hex:"#ff00ff"},{name:"red",hex:"#ff0000"},{name:"dark_green",hex:"#008000"},{name:"dark_magenta",hex:"#800080"},{name:"blue",hex:"#0000ff"},{name:"orange",hex:"#ffa500"},{name:"purple",hex:"#800080"},{name:"lime",hex:"#bfff00"},{name:"teal",hex:"#008080"},{name:"pink",hex:"#ffc0cb"},{name:"brown",hex:"#8b4513"},{name:"indigo",hex:"#4b0082"},{name:"turquoise",hex:"#40e0d0"}],mu=[{label:"Connected Insts",suffix:"connected_insts",needsNet:!0},{label:"Output Nets",suffix:"connected_nets",args:{output:!0,input:!1}},{label:"Input Nets",suffix:"connected_nets",args:{output:!1,input:!0}},{label:"All Nets",suffix:"connected_nets",args:{output:!0,input:!0}},{label:"All buffer trees",suffix:"connected_buffer_trees"},{label:"All buffer trees (incl. inverters)",suffix:"connected_buffer_trees",args:{include_inverters:!0}}],Hs=class{constructor(e){this._app=e,this._el=document.createElement("div"),this._el.className="context-menu",this._el.style.display="none",this._el.style.zIndex="10000",document.body.appendChild(this._el),this._bindEvents()}_bindEvents(){document.addEventListener("mousedown",e=>{this._el.contains(e.target)||this.hide()}),this._app.map&&this._app.map.on("movestart",()=>this.hide())}show(e){this._el.innerHTML="";let i=!!this._app.selHasInst,o=!!this._app.selHasNet,r=!(i||o),l=w=>mu.map(b=>({label:b.label,disabled:b.needsNet?!o:!i,...w(b.suffix,b.args||{})})),h=[{label:"Select",disabled:r,subMenu:l((w,b)=>({action:()=>this._sendContextAction("select_"+w,b)}))},{label:"Highlight",disabled:r,subMenu:l((w,b)=>({subMenu:this._buildColorSubmenu("highlight_"+w,b)}))},{label:"Save",subMenu:[{label:"Visible layout",action:()=>this._app.captureLayout?.({entire:!1})},{label:"Entire layout",action:()=>this._app.captureLayout?.({entire:!0})}]},{label:"Clear",subMenu:[{label:"Selections",action:()=>this._sendContextAction("clear_selections")},{label:"Highlights",action:()=>this._sendContextAction("clear_highlights")},{label:"Rulers",action:()=>{this._app.rulerManager?.clearAllRulers()}},{label:"Focus nets",action:()=>this._sendContextAction("clear_focus_nets")},{label:"Route Guides",action:()=>this._sendContextAction("clear_route_guides")},{label:"All",action:()=>{this._sendContextAction("clear_all"),this._app.rulerManager?.clearAllRulers()}}]}];this._buildMenu(h,this._el),this._el.style.display="block";let u=4,f=this._el.getBoundingClientRect(),_=window.innerWidth-f.width-u,y=window.innerHeight-f.height-u,g=Math.max(u,Math.min(e.originalEvent.clientX,_)),v=Math.max(u,Math.min(e.originalEvent.clientY,y));this._el.style.left=g+"px",this._el.style.top=v+"px"}hide(){this._el.style.display="none"}_buildColorSubmenu(e,i={}){return fu.map(({name:o,hex:r},l)=>({label:o,swatch:r,action:()=>this._sendContextAction(e,{...i,group:l})}))}_buildMenu(e,i){e.forEach(o=>{let r=document.createElement("div");if(r.className="cm-item",o.swatch){let l=document.createElement("span");l.className="cm-swatch",l.style.background=o.swatch,r.appendChild(l)}if(r.appendChild(document.createTextNode(o.label)),o.disabled){r.classList.add("disabled"),o.subMenu&&r.classList.add("has-submenu"),i.appendChild(r);return}if(o.subMenu){r.classList.add("has-submenu");let l=document.createElement("div");l.className="cm-submenu",this._buildMenu(o.subMenu,l),r.appendChild(l),r.addEventListener("mouseenter",()=>{l.classList.remove("flip-left"),l.getBoundingClientRect().right>window.innerWidth&&l.classList.add("flip-left")})}else o.action&&r.addEventListener("click",l=>{l.stopPropagation(),this.hide();try{o.action()}catch(h){console.error("Context menu item action threw:",o.label,h)}});i.appendChild(r)})}_sendContextAction(e,i={}){this._app.websocketManager&&this._app.websocketManager.request({type:"context_action",action:e,...i}).then(o=>{qi(this._app,o),o&&o.connected_count===0&&ke('Nothing connected \u2014 select an instance (or a net for "Connected Insts") first.'),this._syncAfterAction(e)}).catch(o=>{console.error("Context action failed:",e,o)})}_syncAfterAction(e){let i=this._app;(e==="clear_focus_nets"||e==="clear_route_guides"||e==="clear_all")&&typeof i.redrawAllLayers=="function"&&i.redrawAllLayers(),e==="clear_selections"||e==="clear_all"?(i.updateInspector?.(null),i.stopSelectionAnimation?.(),i.highlightRect&&i.map&&(i.map.removeLayer(i.highlightRect),i.highlightRect=null),i.lastSelectionBounds=null):i.refreshInspector?.(),i.refreshOverlay?.()}};function sc(s,e){if(!s)return;let i=URL.createObjectURL(s),o=document.createElement("a");o.href=i,o.download=e,o.style.display="none",document.body.appendChild(o),o.click(),document.body.removeChild(o),setTimeout(()=>URL.revokeObjectURL(i),0)}function rc(s){return s.options&&s.options.opacity!=null?s.options.opacity:1}function ac(s,e,i){if(!e||e.tagName==="IMG"&&(!e.complete||!e.naturalWidth))return;let o=e.getBoundingClientRect();if(!(o.width<=0||o.height<=0))try{s.drawImage(e,o.left-i.left,o.top-i.top,o.width,o.height)}catch{}}function _u(s,e,i){let o=[];s.map.eachLayer(r=>{r instanceof L.GridLayer&&r._tiles&&o.push(r)}),o.sort((r,l)=>(r.options&&r.options.zIndex||0)-(l.options&&l.options.zIndex||0));for(let r of o){let l=rc(r);if(!(l<=0)){e.globalAlpha=l;for(let h of Object.keys(r._tiles)){let u=r._tiles[h];!u||!u.current||ac(e,u.el,i)}}}e.globalAlpha=1}function gu(s,e,i){let o=s.map.getContainer().querySelectorAll(".leaflet-pane svg"),r=[];return o.forEach(l=>{let h=l.getBoundingClientRect();if(h.width<=0||h.height<=0)return;let u=l.cloneNode(!0);u.setAttribute("width",h.width),u.setAttribute("height",h.height);let f=new XMLSerializer().serializeToString(u),_="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(f);r.push(new Promise(y=>{let g=new Image;g.onload=()=>{try{e.drawImage(g,h.left-i.left,h.top-i.top,h.width,h.height)}catch{}y()},g.onerror=()=>y(),g.src=_}))}),Promise.all(r)}function yu(s,e,i){s.map.getContainer().querySelectorAll(".leaflet-pane .ruler-label").forEach(r=>{let l=r.getBoundingClientRect();if(l.width<=0||l.height<=0)return;let h=r.textContent;if(!h)return;let u=getComputedStyle(r),f=l.left-i.left,_=l.top-i.top;e.save(),e.fillStyle=u.backgroundColor||"rgba(0, 0, 0, 0.75)";let y=Math.min(parseFloat(u.borderTopLeftRadius)||0,l.height/2);y>0&&typeof e.roundRect=="function"?(e.beginPath(),e.roundRect(f,_,l.width,l.height,y),e.fill()):e.fillRect(f,_,l.width,l.height),e.fillStyle=u.color||"#eee",e.font=u.font||`${u.fontSize||"12px"} ${u.fontFamily||"monospace"}`,e.textAlign="left",e.textBaseline="middle",e.fillText(h,f+(parseFloat(u.paddingLeft)||0),_+l.height/2),e.restore()})}function vu(s){let e=0;return s.map.eachLayer(i=>{if(!(!(i instanceof L.GridLayer)||!i._tiles)){i._loading&&e++;for(let o of Object.keys(i._tiles)){let r=i._tiles[o],l=r&&r.el;r&&r.current&&l&&l.tagName==="IMG"&&(!l.complete||!l.naturalWidth)&&e++}}}),e}function bu(s,e=6e3,i=32){return new Promise(o=>{let r=Date.now()+e,l=0,h=()=>{if(vu(s)===0){if(++l>=2){o();return}}else l=0;if(Date.now()>=r){o();return}setTimeout(h,i)};setTimeout(h,i)})}function wu(s,e,i){s.map.eachLayer(o=>{if(!(o instanceof L.ImageOverlay))return;let r=rc(o);r<=0||(e.globalAlpha=r,ac(e,o._image,i),e.globalAlpha=1)})}async function oc(s){let e=s.map.getContainer(),i=e.getBoundingClientRect(),o=Math.max(1,Math.round(i.width)),r=Math.max(1,Math.round(i.height)),l=document.createElement("canvas");l.width=o,l.height=r;let h=l.getContext("2d"),u=getComputedStyle(e).backgroundColor;return h.fillStyle=u&&u!=="transparent"&&u!=="rgba(0, 0, 0, 0)"?u:"#000",h.fillRect(0,0,o,r),_u(s,h,i),wu(s,h,i),await gu(s,h,i),yu(s,h,i),new Promise(f=>l.toBlob(f,"image/png"))}async function lc(s,{entire:e=!1}={}){if(!s.map)return;if(!e||!s.fitBounds){sc(await oc(s),"layout_visible.png");return}let i=s.map.getCenter(),o=s.map.getZoom();try{s.map.fitBounds(s.fitBounds,{animate:!1}),await bu(s),sc(await oc(s),"layout_entire.png")}finally{s.map.setView(i,o,{animate:!1})}}var Li=document.getElementById("websocket-status"),Tn=null,xu=2e3,Cu=20;function tr(){let s=p.websocketManager&&p.websocketManager.isConnected,e=p.websocketManager?p.websocketManager.pendingCount:0;if(s)Tn&&(clearTimeout(Tn),Tn=null),e>Cu?(Li.innerHTML=`
pending: ${e}
`,Li.style.display="block"):Li.style.display="none";else{if(p.websocketManager?._shutdown)return;Tn||(Tn=setTimeout(()=>{p.websocketManager?.isConnected||(Li.innerHTML='
\u26A0 OpenROAD disconnected \u2014 retrying\u2026
',Li.style.display="block")},xu))}ku(e)}function ku(s){let e=p.tileProgressEl;e&&(e.classList.toggle("active",s>0),e.title=s>0?`${s} tile requests pending`:"")}function Lu(s){if(!s)return"";try{return decodeURIComponent(s)}catch{return""}}var p={map:null,fitBounds:null,lastSelectionBounds:null,selHasInst:!1,selHasNet:!1,displayControlsEl:null,allLayers:[],designScale:null,designMaxDXDY:null,designOriginX:0,designOriginY:0,websocketManager:null,goldenLayout:null,hasLiberty:!1,techData:null,inspectorEl:null,tclOutputEl:null,highlightRect:null,hoverHighlightLayer:null,hoverHighlightPane:"hover-highlight-pane",modulesLayer:null,pinsLayer:null,overlayLayers:[],hierarchyBrowser:null,focusNets:new Set,routeGuideNets:new Set,visibleLayers:new Set,visibleLayerNames:new Set,visibleChiplets:null,layerPatterns:{},useTrueZ:Vt("or_use_true_z")==="1",showDbu:Vt("or_show_dbu")==="1",rulerStyle:Vt("or_ruler_style")==="manhattan"?"manhattan":"euclidian",wheelZoom:Vt("or_wheel_zoom")!=="0",arrowStep:Wi(Vt("or_arrow_step")),fontFamily:Lu(Vt("or_font_family")),fontScale:Ln(Vt("or_font_scale")),polyDecomp:!1,labelManager:null,selectableLayers:new Set,heatMapData:null,activeHeatMap:"",heatMapLayer:null,heatMapLegendEl:null,renderHeatMapControls:null,rulerManager:null,selectionToken:0,selectionResetters:[],getDbuPerMicron(){return this.techData?.dbu_per_micron||1e3},unitOpts(){return{showDbu:this.showDbu,dbuPerMicron:this.getDbuPerMicron()}},formatDbu(s,e=!1){return Ua(s,this.unitOpts(),e)},parseDbu(s){return Ga(s,this.unitOpts())},formatDistance(s){return Va(s,this.unitOpts())},unitLabel(){return Ya(this.unitOpts())}},te={stdcells:!0,macros:!0,pad_input:!0,pad_output:!0,pad_inout:!0,pad_power:!0,pad_spacer:!0,pad_areaio:!0,pad_other:!0,phys_fill:!1,phys_endcap:!0,phys_welltap:!0,phys_tie:!0,phys_antenna:!0,phys_cover:!0,phys_bump:!0,phys_other:!0,std_bufinv:!0,std_bufinv_timing:!0,std_clock_bufinv:!0,std_clock_gate:!0,std_level_shift:!0,std_sequential:!0,std_combinational:!0,net_signal:!0,net_power:!0,net_ground:!0,net_clock:!0,net_reset:!0,net_tieoff:!0,net_scan:!0,net_analog:!0,inst_names:!0,inst_pins:!0,inst_pin_names:!1,routing:!0,routing_segments:!0,routing_vias:!0,special_nets:!0,srouting_segments:!0,srouting_vias:!0,pins:!0,pin_names:!0,access_points:!1,regions:!0,mfg_grid:!1,gcell_grid:!1,flywires_only:!1,blockages:!0,placement_blockages:!0,routing_obstructions:!0,fills:!1,rows:!1,tracks_pref:!1,tracks_non_pref:!1,module_view:!1,detailed:!1,rulers:!0,labels:!0,scale_bar:!0,focused_nets_guides:!1,highlight_selected:!0,debug:!1};try{let s=Vt("or_visibility");if(s){let e=JSON.parse(decodeURIComponent(s));for(let[i,o]of Object.entries(e))te[i]=!!o}}catch{}var Si={stdcells:!0,macros:!0,pad_input:!0,pad_output:!0,pad_inout:!0,pad_power:!0,pad_spacer:!0,pad_areaio:!0,pad_other:!0,phys_fill:!0,phys_endcap:!0,phys_welltap:!0,phys_tie:!0,phys_antenna:!0,phys_cover:!0,phys_bump:!0,phys_other:!0,std_bufinv:!0,std_bufinv_timing:!0,std_clock_bufinv:!0,std_clock_gate:!0,std_level_shift:!0,std_sequential:!0,std_combinational:!0,net_signal:!0,net_power:!0,net_ground:!0,net_clock:!0,net_reset:!0,net_tieoff:!0,net_scan:!0,net_analog:!0,pins:!0,inst_pins:!0,placement_blockages:!0,routing_obstructions:!0};p.visibility=te;p.selectability=Si;try{let s=Vt("or_selectability");if(s){let e=JSON.parse(decodeURIComponent(s));for(let[i,o]of Object.entries(e))Si[i]=!!o}}catch{}var Su=il(te,p.visibleLayerNames,Si,p.selectableLayers,p);(function(){let e=null;try{e=new URLSearchParams(window.location.search)}catch{e=null}let i=l=>e?e.get(l):null;p.mergeTiles=i("mergetiles")!=="0";let o=Number(i("tilebudget"));Number.isFinite(o)&&o>0&&(p.tileBudgetBytes=Math.round(o*1024*1024));let r=Number(i("mergegroups"));Number.isFinite(r)&&r>0&&(p.mergeGroupCount=Math.floor(r)),p.tileDpr=gi,p.MergedTileLayer=ul({visibility:te,selectability:Si,visibleLayers:p.visibleLayerNames,selectableLayers:p.selectableLayers,app:p},{dpr:gi})})();var Mu=L.GridLayer.extend({initialize:function(s,e,i){this._websocketManager=s,this._appState=e,L.GridLayer.prototype.initialize.call(this,pi(i))},_clampZoom:function(s){return L.GridLayer.prototype._clampZoom.call(this,Zi(this,s))},createTile:function(s,e){let i=document.createElement("img");i.alt="",i.setAttribute("role","presentation"),i._tileDone=!1,i.onload=()=>{i.src&&i.src.startsWith("blob:")&&URL.revokeObjectURL(i.src),i._tileDone||(i._tileDone=!0,e(null,i))},i.onerror=()=>{i._tileDone||(i._tileDone=!0,e(new Error("heat map tile load error"),i))};let o=this._appState.activeHeatMap;return o?(this._websocketManager.request({type:"heatmap_tile",name:o,z:s.z,x:s.x,y:s.y,...Fi(gi(),this.getTileSize().x)}).then(r=>{i.src=r?URL.createObjectURL(r):Ze}).catch(()=>{i.src=Ze}),i):(i.src=Ze,i)},refreshTiles:function(){if(this._map)for(let s in this._tiles){let e=this._tiles[s];if(!e||!e.el)continue;let i=e.el,o=e.coords,r=this._appState.activeHeatMap;if(!r){i.src&&i.src.startsWith("blob:")&&URL.revokeObjectURL(i.src),i.src=Ze;continue}this._websocketManager.request({type:"heatmap_tile",name:r,z:o.z,x:o.x,y:o.y,...Fi(gi(),this.getTileSize().x)}).then(l=>{i.src&&i.src.startsWith("blob:")&&URL.revokeObjectURL(i.src),i.src=l?URL.createObjectURL(l):Ze}).catch(()=>{i.src=Ze})}}});function ir(s){p.heatMapData=s,p.activeHeatMap=s.active||"",p.heatMapLayer&&(p.activeHeatMap?p.map.hasLayer(p.heatMapLayer)||p.heatMapLayer.addTo(p.map):p.map.hasLayer(p.heatMapLayer)&&p.map.removeLayer(p.heatMapLayer),p.heatMapLayer.refreshTiles()),p.renderHeatMapControls&&p.renderHeatMapControls(s)}p.updateHeatMaps=ir;function nr(){p.overlayLayer&&p.overlayLayer.refreshTiles()}var Mi=bn(()=>{nr(),p.selectionBrowser&&p.selectionBrowser.scheduleRefresh()});p.refreshOverlay=Mi;function pe(){Qt("or_visibility",encodeURIComponent(JSON.stringify(te))),Qt("or_selectability",encodeURIComponent(JSON.stringify(Si))),We();let s=[[p.modulesLayer,te.module_view],[p.pinsLayer,te.pins],...p.overlayLayers.map(({def:e,layer:i})=>[i,Es(e.shown_by,te)])];for(let[e,i]of s)e&&(i&&!p.map.hasLayer(e)?e.addTo(p.map):!i&&p.map.hasLayer(e)&&p.map.removeLayer(e));for(let e of p.allLayers)e.refreshTiles();if(p.heatMapLayer&&p.heatMapLayer.refreshTiles(),p.highlightRect){let e=te.highlight_selected!==!1;!e&&p.map.hasLayer(p.highlightRect)?p.map.removeLayer(p.highlightRect):e&&!p.map.hasLayer(p.highlightRect)&&p.highlightRect.addTo(p.map)}!te.highlight_selected&&p.clearSelectionPulse&&p.clearSelectionPulse(),nr(),p.rulerManager&&p.rulerManager.updateVisibility(),p.labelManager&&p.labelManager.updateVisibility(),p.updateScaleBar&&p.updateScaleBar()}var Ki=bn(pe),We=bn(()=>{!p.websocketManager||wt(p)||p.websocketManager.request({type:"set_display_state",state:Jl()}).catch(()=>{})});p.syncDisplayState=We;function Eu(s){if(!s||typeof s!="object")return;let e=s.entries;if(!(!e||typeof e!="object")){Ql(e);try{if(p.map&&typeof sessionStorage<"u"){let i=p.map.getCenter();sessionStorage.setItem("or_restore_view",JSON.stringify({lat:i.lat,lng:i.lng,zoom:p.map.getZoom()}))}}catch{}window.location.reload()}}p.redrawAllLayers=pe;p.captureLayout=(s={})=>lc(p,s);function Tu(s){let e=document.createElement("div");e.className="layout-viewer",e.style.width="100%",e.style.height="100%",e.style.backgroundColor="var(--bg-map)",s.element.appendChild(e);let i=document.createElement("div");i.className="or-hud or-hud-bottom-right heatmap-map-legend hidden",e.appendChild(i),p.heatMapLegendEl=i;let o=document.createElement("div");o.className="or-progress",e.appendChild(o),p.tileProgressEl=o,s.on("destroy",()=>{p.tileProgressEl=null,p.heatMapLegendEl=null}),p.map=L.map(e,Fa(void 0,{wheelZoom:p.wheelZoom,arrowStep:p.arrowStep})),wt(p)||Ka(p.map,()=>p.wheelZoom),yl(p.map),Ia(()=>pe());let r=p.map.createPane(p.hoverHighlightPane);r.style.zIndex="650",r.style.pointerEvents="none";let l=L.Control.extend({onAdd:function(){let P=L.DomUtil.create("div","leaflet-bar leaflet-control leaflet-control-fit"),T=L.DomUtil.create("a","",P);return T.href="#",T.title="Fit",T.setAttribute("role","button"),T.setAttribute("aria-label","Fit"),T.textContent="\u2922",L.DomEvent.on(T,"click",L.DomEvent.stop).on(T,"click",()=>{p.fitBounds&&p.map.fitBounds(p.fitBounds)}),P}});new l({position:"topleft"}).addTo(p.map),new ResizeObserver(()=>{p.map.invalidateSize({animate:!1})}).observe(e);let h=document.createElement("div");h.className="or-hud or-hud-bottom-left hidden";let u=document.createElement("div");u.id="scale-bar";let f=document.createElement("span");f.className="or-hud-divider";let _=document.createElement("div");_.id="coord-bar",h.appendChild(u),h.appendChild(f),h.appendChild(_),e.appendChild(h);function y(){let P=u.style.display!=="none"&&u.childElementCount>0,T=_.textContent!=="";f.style.display=P&&T?"":"none",h.classList.toggle("hidden",!P&&!T)}y(),p.map.on("mousemove",P=>{if(p.lastMouseLatLng=P.latlng,!p.designScale)return;let{dbuX:T,dbuY:Z}=xe(P.latlng.lat,P.latlng.lng,p.designScale,p.designMaxDXDY,p.designOriginX,p.designOriginY);_.textContent=`X: ${p.formatDbu(T)} Y: ${p.formatDbu(Z)}`,y()}),p.map.on("mouseout",P=>{let T=P.originalEvent&&P.originalEvent.relatedTarget;T&&e.contains(T)||(p.lastMouseLatLng=null,_.textContent="",y())});let g=22,v=8,w=22;function b(P,T,Z){let dt=2+v,gt=w,it=w+P,Q=g-2,nt=P>=40,tt=[];if(tt.push(``),nt&&Z>1)for(let Ct=1;Ct`)}nt&&tt.push(`0`),tt.push(`${T}`),u.innerHTML=`${tt.join("")}`}function C(){if(!p.designScale||!te.scale_bar){u.style.display="none",y();return}let P=p.designScale*Math.pow(2,p.map.getZoom()),T=p.map.getContainer().clientWidth||400,Z=ja({targetPx:T*.15,pxPerDbu:P,dbuPerMicron:p.techData?.dbu_per_micron,showDbu:p.showDbu});if(!Z){u.style.display="none",y();return}u.style.display="",b(Z.barPx,Z.label,Z.segments),y()}let B=bn(C);p.map.on("zoom zoomend resize",B),p.updateScaleBar=C,p.rulerManager=new Is(p,te,Pn,$s),p.labelManager=new Ns(p,te,Pn,$s)}function Pu(s){let e=document.createElement("div");e.className="display-controls",e.innerHTML='
Loading layers...
',s.element.appendChild(e),p.displayControlsEl=e}var er="or_restore_console",Au=1<<20;function Iu(){try{if(p.tclOutputEl){let s=[...p.tclOutputEl.children].map(r=>[r.textContent,r.className]),e=s.length,i=0;for(;e>0&&i+s[e-1][0].length<=Au;)i+=s[--e][0].length;let o=s.slice(e);e>0&&o.unshift([`[earlier output not kept across reload] +`,""]),sessionStorage.setItem(er,JSON.stringify(o))}}catch{}window.location.reload()}function Nu(){try{let s=sessionStorage.getItem(er);if(!s)return;sessionStorage.removeItem(er);for(let[e,i]of JSON.parse(s))ti(e,i)}catch{}}function ti(s,e){if(!p.tclOutputEl)return;let i=document.createElement("span");e&&(i.className=e),i.textContent=s,p.tclOutputEl.appendChild(i),p.tclOutputEl.scrollTop=p.tclOutputEl.scrollHeight}function Bu(){if(p._shutdownHandled)return;p._shutdownHandled=!0,p.websocketManager&&(p.websocketManager._shutdown=!0,p.websocketManager.onPush=()=>{});let s=document.createElement("div");s.style.cssText="position:fixed;inset:0;z-index:99999;background:#1e1e1e;color:#ddd;display:flex;flex-direction:column;align-items:center;justify-content:center;font-family:system-ui,sans-serif;font-size:16px;padding:24px;text-align:center;",s.innerHTML='
OpenROAD exited
You can close this tab.
',document.body.appendChild(s),setTimeout(()=>{try{window.close()}catch{}},1500)}function Du(s){let e=document.createElement("div");if(e.className="tcl-console",e.innerHTML='
%
',s.element.appendChild(e),p.tclOutputEl=e.querySelector(".tcl-output"),Nu(),wt(p)){e.querySelector(".tcl-input-row").style.display="none";let r=document.createElement("span");r.className="tcl-static-notice",r.setAttribute("role","status"),r.setAttribute("aria-live","polite"),r.textContent="Tcl console is not available in saved reports.",p.tclOutputEl.appendChild(r);return}let i=e.querySelector(".tcl-input"),o=new Rs(i,p.websocketManager);i.addEventListener("keydown",r=>{if(!o.handleKeyDown(r)&&r.key==="Enter"){let l=i.value.trim();if(!l)return;ti(`>>> ${l} +`,"tcl-cmd"),o.addToHistory(l),i.value="",p.websocketManager.request({type:"tcl_eval",cmd:l}).then(h=>{h.result&&ti(h.result+` +`,h.is_error?"tcl-error":""),h.action==="shutdown"&&Bu(),!h.is_error&&p.drcWidget&&p.drcWidget.refresh()}).catch(h=>ti(`Error: ${h} +`,"tcl-error"))}})}p.visibility=te;var ei=Pl(p,pe,Mi),Ru=ei.createInspector,Pn=ei.updateInspector,Ou=ei.highlightBBox,zu=ei.pulseHighlight;p.updateInspector=Pn;p.navigateInspector=ei.navigateInspector;p.refreshInspector=ei.refreshInspector;p.animateSelection=ei.animateSelection;p.stopSelectionAnimation=ei.stopSelectionAnimation;function Hu(s){new Cs(s,p,pe)}function $u(s){p.timingWidget=new vi(p,pe,Mi),s.element.appendChild(p.timingWidget.element)}function Fu(s){p.drcWidget=new Ds(p,pe,Mi),s.element.appendChild(p.drcWidget.element)}function Zu(s){p.clockTreeWidget=new ws(s,p,pe,Mi)}function qu(s){p.chartsWidget=new xs(p,pe),s.element.appendChild(p.chartsWidget.element)}function Wu(s){let e=document.createElement("div");e.className="help-panel",e.innerHTML="

Keyboard Shortcuts

fFit design to viewport
scrollZoom in/out
dragPan the view
right-dragRubber-band zoom
Shift+clickAdd object to selection
Ctrl/Cmd+clickSelect object and its connected nets
kToggle ruler mode
Shift+KClear all rulers
EscapeCancel ruler (when building)
",s.element.appendChild(e)}function Uu(s){p.selectionBrowser=new ks(s,p,Mi)}function Gu(s){new Bs(s,p)}function Vu(s){p.threeDViewerWidget=new zs(s,p)}var Yu=28,Xu={dimensions:{headerHeight:Yu},root:{type:"row",content:[{type:"component",componentType:"DisplayControls",title:"Display Controls",width:15},{type:"column",width:55,content:[{type:"stack",height:70,content:[{type:"component",componentType:"LayoutViewer",title:"Layout",isClosable:!1},{type:"component",componentType:"SchematicWidget",title:"Schematic"},{type:"component",componentType:"3DViewer",title:"3D Viewer"}]},{type:"component",componentType:"TclConsole",title:"Tcl Console",height:30}]},{type:"stack",width:30,content:[{type:"component",componentType:"Inspector",title:"Inspector"},{type:"component",componentType:"Browser",title:"Hierarchy"},{type:"component",componentType:"TimingWidget",title:"Timing"},{type:"component",componentType:"DRCWidget",title:"DRC"},{type:"component",componentType:"SelectHighlight",title:"Select Highlight"},{type:"component",componentType:"ClockWidget",title:"Clock Tree"},{type:"component",componentType:"ChartsWidget",title:"Charts"},{type:"component",componentType:"HelpWidget",title:"Help"}]}]}};p.goldenLayout=new ps(document.getElementById("gl-container"));p.goldenLayout.registerComponentFactoryFunction("LayoutViewer",Tu);p.goldenLayout.registerComponentFactoryFunction("DisplayControls",Pu);p.goldenLayout.registerComponentFactoryFunction("TclConsole",Du);p.goldenLayout.registerComponentFactoryFunction("Inspector",Ru);p.goldenLayout.registerComponentFactoryFunction("Browser",Hu);p.goldenLayout.registerComponentFactoryFunction("TimingWidget",$u);p.goldenLayout.registerComponentFactoryFunction("DRCWidget",Fu);p.goldenLayout.registerComponentFactoryFunction("ClockWidget",Zu);p.goldenLayout.registerComponentFactoryFunction("ChartsWidget",qu);p.goldenLayout.registerComponentFactoryFunction("SchematicWidget",Gu);p.goldenLayout.registerComponentFactoryFunction("3DViewer",Vu);p.goldenLayout.registerComponentFactoryFunction("HelpWidget",Wu);p.goldenLayout.registerComponentFactoryFunction("SelectHighlight",Uu);var Be=window.__STATIC_CACHE__||null;if(Be)Pa(),p.websocketManager=Cn.fromCache(Be,tr);else{let s=Ra(window.location);p.websocketManager=new Cn(s,tr),p.layerExtents=new fs,p.websocketManager.onReconnected=()=>{Fs(),rr(null,null,{reloadOnChange:!0}).catch(()=>{})}}tr();p.goldenLayout.loadLayout(Xu);function sr(){p.goldenLayout.updateSize()}p.syncLayoutSize=sr;window.addEventListener("resize",sr);function $s(s,e){p.goldenLayout.focusComponent(s,e)}p.focusComponent=$s;p.resetLayout=function(){p.goldenLayout&&typeof p.goldenLayout.resetLayout=="function"&&p.goldenLayout.resetLayout()};p.toggleTheme=function(){let s=document.documentElement.dataset.theme==="dark"?"light":"dark";document.documentElement.dataset.theme=s,Zo(s),gs(s),p.chartsWidget&&p.chartsWidget.render(),p.clockTreeWidget&&p.clockTreeWidget.render(),We()};p.toggleShowDbu=function(){p.showDbu=!p.showDbu,Qt("or_show_dbu",p.showDbu?"1":"0"),p.rulerManager&&p.rulerManager._rerenderAll(),p.hierarchyBrowser&&p.hierarchyBrowser._render(),p.updateScaleBar&&p.updateScaleBar(),p.refreshInspector&&p.refreshInspector(),We()};p.toggleRulerStyle=function(){p.rulerStyle=p.rulerStyle==="manhattan"?"euclidian":"manhattan",Qt("or_ruler_style",p.rulerStyle),We()};p.toggleWheelZoom=function(){p.wheelZoom=!p.wheelZoom,Qt("or_wheel_zoom",p.wheelZoom?"1":"0"),We()};p.setArrowStep=function(s){p.arrowStep=Wi(s),Qt("or_arrow_step",String(p.arrowStep)),Za(p.map,p.arrowStep),We()};p.setAppFont=function({family:s,scale:e}){p.fontFamily=s??p.fontFamily,p.fontScale=Ln(e??p.fontScale),Qt("or_font_family",encodeURIComponent(p.fontFamily)),Qt("or_font_scale",String(p.fontScale)),p.applyAppFont(),We()};p.applyAppFont=function(){let s=document.documentElement;p.fontFamily?s.style.setProperty("--or-font-family",p.fontFamily):s.style.removeProperty("--or-font-family"),s.style.setProperty("--or-font-scale",String(p.fontScale/100)),p.chartsWidget&&p.chartsWidget.render(),p.clockTreeWidget&&p.clockTreeWidget.render()};p.showArrowStepDialog=()=>Nl(p);p.showAppFontDialog=()=>Bl(p);p.togglePolyDecomp=function(){p.websocketManager&&p.websocketManager.request({type:"poly_decomp",value:!p.polyDecomp}).then(s=>or(s.value)).catch(()=>{})};function or(s){p.polyDecomp=!!s,p.rebuildMenuBar&&p.rebuildMenuBar(),p.refreshOverlay&&p.refreshOverlay()}p.applyAppFont();p.echoTcl=s=>ti(`>>> ${s} +`,"tcl-cmd");p.runTclScript=(s,e)=>s?(e&&p.echoTcl(s),p.websocketManager.request({type:"tcl_eval",cmd:s}).then(i=>(i&&i.result&&ti(i.result+` +`,i.is_error?"tcl-error":""),i)).catch(i=>{ti(`Error: ${i} +`,"tcl-error")})):Promise.resolve();function cc(s){s&&(p.customMenu=s.menu||[],p.customToolbar=s.toolbar||[],p.rebuildMenuBar&&p.rebuildMenuBar(),p.rebuildToolbar&&p.rebuildToolbar(),sr())}p.customMenu=[];p.customToolbar=[];p.scheduleRedrawAllLayers=Ki;p.showGlobalConnectDialog=()=>Ul(p);p.showInsertBufferDialog=s=>Gl(p,s);Fl(p);Zl(p);p.contextMenu=new Hs(p);function ju(){let s=document.getElementById("debug-continue-btn");return s||(s=document.createElement("button"),s.id="debug-continue-btn",s.className="debug-continue-btn",s.textContent="Continue",s.title="Advance the debugger (gpl, cts, ...)",s.addEventListener("click",()=>{p.websocketManager.request({type:"debug_continue"}).catch(()=>{})}),(document.getElementById("menu-bar")||document.body).appendChild(s),s)}function hc(s,e){let i=Po(s,Ce(),e);return i?(p.currentBounds=s,p.designScale=i.scale,p.designMaxDXDY=i.maxDXDY,p.designOriginX=i.originX,p.designOriginY=i.originY,p.fitBounds=i.fitBounds,p.map.setMaxZoom(qa(i.scale)),!0):!1}async function rr(s,e,{reloadOnChange:i=!1}={}){if(wt(p)||!p.map)return!1;let o=s,r=e;if(!o)try{let u=await p.websocketManager.request({type:"bounds"});o=u.bounds,r=u.fit_bounds}catch{return!1}if(!o||Ha(p.currentBounds,o))return!1;if(i)return window.location.reload(),!0;let h=!!p.designScale?xe(p.map.getCenter().lat,p.map.getCenter().lng,p.designScale,p.designMaxDXDY,p.designOriginX,p.designOriginY):null;if(!hc(o,r))return!1;if(h){let u=Jt(h.dbuX,h.dbuY,p.designScale,p.designMaxDXDY,p.designOriginX,p.designOriginY);p.map.setView(u,p.map.getZoom(),{animate:!1})}return p.highlightRect&&(p.map.removeLayer(p.highlightRect),p.highlightRect=null),pe(),!0}function Ku(){let s=document.getElementById("loading-overlay");s.style.display="flex";let e=()=>{s.style.display!=="none"&&p.websocketManager.request({type:"bounds"}).then(i=>{i.shapes_ready&&(s.style.display="none")}).catch(()=>{}).finally(()=>{s.style.display!=="none"&&setTimeout(e,1e3)})};setTimeout(e,1e3)}function Fs(){p.layerExtents&&p.layerExtents.refetch(s=>p.websocketManager.request(s))}function Ju(s){document.getElementById("loading-overlay").style.display="none",Fs(),rr(s.bounds,s.fit_bounds).then(e=>{e||pe()}).catch(()=>pe()),p.refreshInspector&&p.refreshInspector()}function Qu(){let s=document.getElementById("script-running-badge");return s||(s=document.createElement("span"),s.id="script-running-badge",s.className="script-running-badge",s.textContent="Script running",s.title="The view updates when the script pauses or finishes",(document.getElementById("menu-bar")||document.body).appendChild(s),s)}function tp(s){if(p.scriptRunning=s,Qu().style.display=s?"block":"none",!s){if(!p.booted||!p.designScale){Iu();return}p.refreshPending&&(p.refreshPending=!1,Fs(),p.refreshInspector&&p.refreshInspector()),rr().then(e=>{e||Ki()}).catch(()=>Ki())}}p.websocketManager.onPush=s=>{if(s.type==="refresh"){if(p.scriptRunning){p.refreshPending=!0;return}Ju(s)}else if(s.type==="script_running")tp(!!s.running);else if(s.type==="renderer_controls_changed")p.refreshRendererControls&&p.refreshRendererControls(),Ki();else if(s.type==="selection_invalidated")p.updateInspector&&p.updateInspector(null),p.stopSelectionAnimation&&p.stopSelectionAnimation(),p.highlightRect&&p.map&&(p.map.removeLayer(p.highlightRect),p.highlightRect=null),Mi();else if(s.type==="heatmaps_changed")p.websocketManager.request({type:"heatmaps"}).then(ir).catch(e=>console.error("Heat map refresh failed",e));else if(s.type==="labels_changed")p.labelManager&&p.labelManager.applyRemoteLabels(s.labels);else if(s.type==="drcUpdated")p._drcUpdateTimeout&&clearTimeout(p._drcUpdateTimeout),p._drcUpdateTimeout=setTimeout(()=>{p.drcWidget&&p.drcWidget.refresh()},500);else if(s.type==="debug_paused")p.refreshRendererControls&&p.refreshRendererControls(),ju().style.display="block",Ki(),p.chartsWidget&&p.websocketManager.request({type:"debug_charts"}).then(e=>p.chartsWidget.setDebugCharts(e.charts||[])).catch(()=>{});else if(s.type==="debug_resumed"){let e=document.getElementById("debug-continue-btn");e&&(e.style.display="none")}else if(s.type==="debug_refresh"){if(p.scriptRunning)return;p.highlightRect&&(p.map.removeLayer(p.highlightRect),p.highlightRect=null),Ki()}else if(s.type==="log"){let e=s.text;e.endsWith(` +`)&&(e=e.slice(0,-1)),e&&ti(e+` +`,"")}else s.type==="restore_display_state"?Eu(s.state):s.type==="custom_ui"?cc(s):s.type==="poly_decomp"?or(s.value):s.type==="shutdown"&&(p.websocketManager._shutdown=!0,Li.innerHTML='
Server stopped
',Li.style.display="block")};p.websocketManager.readyPromise.then(async()=>{try{let h=function(u,f={}){let{addToSelection:_=!1,focusInspector:y=!0,context:g=!1,showConnectivity:v=!1}=f;if(!p.designScale)return Promise.resolve(null);let{dbuX:w,dbuY:b}=xe(u.lat,u.lng,p.designScale,p.designMaxDXDY,p.designOriginX,p.designOriginY);if(p.labelManager&&p.labelManager.isActive()){p.labelManager.handleMapClick(w,b);return}let C=Oa(te,Si),B={type:"select",dbu_x:w,dbu_y:b,zoom:Math.round(p.map.getZoom()),visible_layers:[...p.visibleLayerNames],selectable_layers:[...p.selectableLayers],use_dbu:p.showDbu,...C};_&&(B.add_to_selection=!0),g&&(B.context=!0),v&&(B.show_connectivity=!0),p.visibleChiplets instanceof Set&&(B.visible_chiplets=[...p.visibleChiplets]);let P=ae(p);return p.websocketManager.request(B).then(T=>{if(he(p,P)){if(console.log("Select response:",T,"at dbu",w,b),p.map.closePopup(),qi(p,T),T.selected&&T.selected.length>0){let Z=T.selected[0];Z.type==="Inst"&&(p.selectedInstanceName=Z.name,p.schematicWidget&&p.schematicWidget.refresh()),Pn(T),y&&$s("Inspector"),T.bbox&&(Ou(T.bbox[0],T.bbox[1],T.bbox[2],T.bbox[3],T.type),zu(T.bbox,T.type),p.lastSelectionBounds=Gt(T.bbox[0],T.bbox[1],T.bbox[2],T.bbox[3],p.designScale,p.designMaxDXDY,p.designOriginX,p.designOriginY)),B.show_connectivity&&T.connected_added>0&&ke(`Selected ${T.connected_added} connected net`+(T.connected_added>1?"s":""))}else!_&&!g&&(Pn(null),p.highlightRect&&(p.map.removeLayer(p.highlightRect),p.highlightRect=null),p.lastSelectionBounds=null);return nr(),T}}).catch(T=>(console.error("Select failed:",T),null))},[s,e,i]=await Promise.all([p.websocketManager.request({type:"tech"}),p.websocketManager.request({type:"bounds"}),p.websocketManager.request({type:"heatmaps"})]);Fs(),p.hasLiberty=s.has_liberty,p.techData=s,tc(s.block_name),p.websocketManager.request({type:"custom_ui"}).then(cc).catch(()=>{}),p.websocketManager.request({type:"poly_decomp"}).then(u=>or(u.value)).catch(()=>{});let o=e.bounds,r=e.fit_bounds;if(!Be){let u=p.map.getSize();Aa(Wa({designBounds:o,fitRect:r,viewW:u.x,viewH:u.y}))}let l=hc(o,r);if(l){if(p.labelManager&&p.labelManager.reload(),p.map.fitBounds(p.fitBounds),Be){let u=Be.zoom;p.map.setMinZoom(u),p.map.setMaxZoom(u),p.map.fitBounds(p.fitBounds),p.map.scrollWheelZoom.disable(),p.map.touchZoom.disable(),p.map.boxZoom.disable(),p.map.doubleClickZoom.disable(),p.pathOverlay=L.imageOverlay("",Gt(o[0][1],o[0][0],o[1][1],o[1][0],p.designScale,p.designMaxDXDY,p.designOriginX,p.designOriginY),{opacity:1,interactive:!1,zIndex:1e3}),Be.setPathOverlay=f=>{f?(p.pathOverlay.setUrl(f),p.pathOverlay.addTo(p.map)):p.map.removeLayer(p.pathOverlay)}}try{let u=sessionStorage.getItem("or_restore_view");if(u){sessionStorage.removeItem("or_restore_view");let f=JSON.parse(u);f&&isFinite(f.lat)&&isFinite(f.lng)&&isFinite(f.zoom)&&p.map.setView([f.lat,f.lng],f.zoom)}}catch{}}if(Be&&(document.getElementById("loading-overlay").style.display="none"),p.selectAtLatLng=h,Be||p.map.on("click",u=>{if(p.rulerManager&&p.rulerManager.isActive())return;let f=u.originalEvent;h(u.latlng,{addToSelection:!!(f&&f.shiftKey),showConnectivity:!!(f&&(f.ctrlKey||f.metaKey))})}),!Be){let u=p.map.getContainer(),f=null,_=null;u.addEventListener("contextmenu",y=>{y.preventDefault()}),u.addEventListener("mousedown",y=>{y.button===2&&(f={x:y.clientX,y:y.clientY},p.map.dragging.disable())}),window.addEventListener("mousemove",y=>{if(!f)return;let g=y.clientX-f.x,v=y.clientY-f.y;if(!_&&Math.abs(g)>=4&&Math.abs(v)>=4&&(_=document.createElement("div"),_.className="rubber-band",document.body.appendChild(_)),_){let w=Math.min(f.x,y.clientX),b=Math.min(f.y,y.clientY);_.style.left=w+"px",_.style.top=b+"px",_.style.width=Math.abs(g)+"px",_.style.height=Math.abs(v)+"px"}}),window.addEventListener("mouseup",y=>{if(!f)return;let g=!!_;_&&(_.remove(),_=null);let v=f;f=null,p.map.dragging.enable();let w=u.getBoundingClientRect();if(g){let B=p.map.containerPointToLatLng([v.x-w.left,v.y-w.top]),P=p.map.containerPointToLatLng([y.clientX-w.left,y.clientY-w.top]);p.map.fitBounds([[Math.min(B.lat,P.lat),Math.min(B.lng,P.lng)],[Math.max(B.lat,P.lat),Math.max(B.lng,P.lng)]]);return}if(!(y.clientX>=w.left&&y.clientX<=w.right&&y.clientY>=w.top&&y.clientY<=w.bottom)||p.rulerManager&&p.rulerManager.isActive())return;let C=p.map.containerPointToLatLng([y.clientX-w.left,y.clientY-w.top]);p.selectAtLatLng(C,{context:!0,focusInspector:!1}).then(()=>p.contextMenu.show({originalEvent:y}))})}if(Ol(p,te,Si,Su,s,pe,Mu),!p.overlayLayer&&!Be){let u=nl(te,p);p.overlayLayer=new u(p.websocketManager,{zIndex:p.allLayers.length+5,opacity:1}),p.overlayLayer.addTo(p.map)}ir(i),l&&!e.shapes_ready&&Ku(),We(),p.booted=!0}catch(s){p.scriptRunning||console.error("Failed to load initial data from server:",s)}});document.addEventListener("openroad-cone-sync",s=>{p.schematicWidget?.syncCone(s.detail||{})});document.addEventListener("keydown",s=>{let e=s.target.tagName;if(e==="INPUT"||e==="TEXTAREA"||s.target.isContentEditable)return;let i=s.key.toLowerCase();i==="escape"&&p.rulerManager&&p.rulerManager.isActive()?p.rulerManager.cancelRulerBuild():i==="escape"&&p.labelManager&&p.labelManager.isActive()?p.labelManager.cancelLabelMode():i==="k"&&!s.shiftKey&&!s.ctrlKey&&!s.metaKey?p.rulerManager&&p.rulerManager.toggleRulerMode():i==="k"&&s.shiftKey&&!s.ctrlKey&&!s.metaKey?p.rulerManager&&p.rulerManager.clearAllRulers():i==="l"&&!s.shiftKey&&!s.ctrlKey&&!s.metaKey?p.labelManager&&p.labelManager.toggleLabelMode():i==="f"&&!s.ctrlKey&&!s.metaKey&&p.fitBounds?p.map.fitBounds(p.fitBounds):i==="z"&&!s.shiftKey&&!s.ctrlKey&&p.map?p.lastMouseLatLng?p.map.setZoomAround(p.lastMouseLatLng,p.map.getZoom()+1):p.map.zoomIn():i==="z"&&s.shiftKey&&!s.ctrlKey&&p.map?p.lastMouseLatLng?p.map.setZoomAround(p.lastMouseLatLng,p.map.getZoom()-1):p.map.zoomOut():i==="f"&&(s.ctrlKey||s.metaKey)?(s.preventDefault(),p.designScale&&Ts(p)):i==="g"&&s.shiftKey&&!s.ctrlKey&&!s.metaKey?(s.preventDefault(),p.designScale&&Ps(p)):i==="t"&&!s.shiftKey&&!s.ctrlKey&&!s.metaKey&&p.toggleTheme()},!0);})(); /*! Bundled license information: leaflet/dist/leaflet-src.js: @@ -380,4 +518,32 @@ lit-html/directives/if-defined.js: * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) + +lit-html/directive.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +lit-html/directives/class-map.js: + (** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +lit-html/directive-helpers.js: + (** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +lit-html/directives/repeat.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) */ diff --git a/src/web/src/grid-layout.js b/src/web/src/grid-layout.js index 9e0ec15a11b..3350a3e02da 100644 --- a/src/web/src/grid-layout.js +++ b/src/web/src/grid-layout.js @@ -4,6 +4,9 @@ import { LitElement, html, css, svg, nothing } from 'lit'; import { when } from 'lit/directives/when.js'; import { ifDefined } from 'lit/directives/if-defined.js'; +import { classMap } from 'lit/directives/class-map.js'; +import { repeat } from 'lit/directives/repeat.js'; +import { wheelDeltaPx } from './ui-utils.js'; // ─── Native CSS Grid IDE Layout Manager & Custom Elements ──────────────────── @@ -51,6 +54,24 @@ export function emitEvent(host, type, detail = {}) { })); } +// A tab icon's box, shared by the tab strip and the overflow menu. +const tabIconStyles = css` + .ide-tab-icon { + display: inline-flex; + align-items: center; + justify-content: center; + flex: none; + width: 13px; + height: 13px; + } + + .ide-tab-icon svg { + width: 100%; + height: 100%; + display: block; + } +`; + /** * - Encapsulated IDE window pane custom element using Lit. * Manages its header (tab bar and action controls) and content viewport. @@ -62,9 +83,13 @@ export class IdePaneElement extends LitElement { collapsible: { type: Boolean, reflect: true }, maximized: { type: Boolean, reflect: true }, collapsed: { type: Boolean, reflect: true }, + _overflowing: { state: true }, + _fadeStart: { state: true }, + _fadeEnd: { state: true }, + _menuOpen: { state: true }, }; - static styles = css` + static styles = [tabIconStyles, css` :host { display: flex; flex-direction: column; @@ -101,12 +126,38 @@ export class IdePaneElement extends LitElement { min-width: 0; overflow-x: auto; scrollbar-width: none; + --tab-fade: 24px; + /* Scrolling a tab into view keeps it clear of the faded edge. */ + scroll-padding-inline: var(--tab-fade); + -webkit-mask-image: var(--tab-mask, none); + mask-image: var(--tab-mask, none); } .ide-tabs::-webkit-scrollbar { display: none; } + /* The tabs at their full width: its size is the strip's scrollWidth. */ + .ide-tabs-track { + display: flex; + flex: none; + height: 100%; + } + + /* Fade the edge that has tabs scrolled past it. */ + .ide-tabs.fade-start { + --tab-mask: linear-gradient(to left, #000 calc(100% - var(--tab-fade)), transparent); + } + + .ide-tabs.fade-end { + --tab-mask: linear-gradient(to right, #000 calc(100% - var(--tab-fade)), transparent); + } + + .ide-tabs.fade-start.fade-end { + --tab-mask: linear-gradient(to right, transparent, #000 var(--tab-fade), + #000 calc(100% - var(--tab-fade)), transparent); + } + .ide-controls { display: flex; align-items: center; @@ -130,27 +181,318 @@ export class IdePaneElement extends LitElement { transition: background-color 120ms ease, color 120ms ease; } - .ide-btn:hover { + .ide-btn:hover, + .ide-btn-overflow[aria-expanded="true"] { background: var(--bg-hover); color: var(--fg-primary); } + /* Always laid out, so whether the tabs overflow never depends on it showing. */ + .ide-btn-overflow.idle { + visibility: hidden; + } + + .ide-btn.ide-btn-restore { + width: auto; + padding: 0 6px; + border: 1px solid var(--border-strong); + color: var(--fg-primary); + } + + .ide-btn.ide-btn-restore:hover { + color: var(--accent); + border-color: var(--accent); + } + .ide-content { flex: 1; position: relative; overflow: hidden; } - `; + + /* Above Leaflet's controls (z-index 1000), below .context-menu. */ + .ide-tab-menu { + position: absolute; + top: 28px; + right: 4px; + z-index: 1100; + display: flex; + flex-direction: column; + min-width: min(160px, 100% - 8px); + max-width: calc(100% - 8px); + max-height: calc(100% - 32px); + overflow-y: auto; + padding: 4px 0; + background: var(--bg-context); + border: 1px solid var(--border-strong); + border-radius: var(--radius-sm); + box-shadow: 0 2px 8px var(--shadow); + box-sizing: border-box; + } + + .ide-tab-menu-item { + display: flex; + align-items: center; + gap: var(--space-sm, 6px); + padding: 5px 12px 5px 6px; + background: transparent; + border: none; + color: var(--fg-primary); + font-family: var(--font-sans); + font-size: var(--fs-12); + text-align: left; + white-space: nowrap; + cursor: pointer; + } + + .ide-tab-menu-item:hover, + .ide-tab-menu-item:focus-visible { + background: var(--bg-hover); + color: var(--fg-bright); + outline: none; + } + + .ide-tab-menu-item[aria-checked="true"] { + color: var(--accent-tab); + } + + .ide-tab-menu-check { + flex: none; + width: 12px; + text-align: center; + } + + .ide-tab-menu-title { + flex: 1; + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + } + `]; constructor() { super(); - this._onMaximizeClick = this._onMaximizeClick.bind(this); - this._onCollapseClick = this._onCollapseClick.bind(this); + this._overflowing = false; + this._fadeStart = false; + this._fadeEnd = false; + this._menuOpen = false; + this._tabsEl = null; + this._tabsTrack = null; + this._tabsSlot = null; + this._tabsObserver = null; + this._tabsMutations = null; + this._menuAbort = null; + this._menuHadFocus = false; + this._inUpdate = false; } connectedCallback() { super.connectedCallback(); this.classList.add('ide-pane', `ide-pane-${this.paneName}`); + if (this.hasUpdated) this._observeStrip(); + } + + disconnectedCallback() { + super.disconnectedCallback(); + this._tabsObserver?.disconnect(); + this._closeMenu(); + } + + firstUpdated() { + this._tabsEl = this.renderRoot.querySelector('.ide-tabs'); + this._tabsTrack = this.renderRoot.querySelector('.ide-tabs-track'); + this._tabsSlot = this.renderRoot.querySelector('slot[name="tabs"]'); + // Its first callback takes the first measurement. + this._tabsObserver = new ResizeObserver(() => { + this._updateOverflow(); + // A narrower strip must not leave the active tab out of view. + this._tabs.find(tab => tab.active) + ?.scrollIntoView({ inline: 'nearest', block: 'nearest' }); + }); + // The open menu shows the tabs' state, which is not the pane's. + this._tabsMutations = new MutationObserver(() => this.requestUpdate()); + this._observeStrip(); + } + + willUpdate(changedProperties) { + this._menuHadFocus = this._menuOpen && this._menuHasFocus(); + this._inUpdate = true; + if (this._menuOpen && (!this._overflowing || this.collapsed + || changedProperties.has('maximized'))) { + this._closeMenu(this._menuHadFocus); + } + } + + updated(changedProperties) { + this._inUpdate = false; + // On opening, or when the focused item's tab went away in this render. + if (this._menuOpen && (changedProperties.has('_menuOpen') + || (this._menuHadFocus && !this._menuHasFocus()))) { + this._focusMenuItem(); + } + } + + get _tabs() { + return this._tabsSlot?.assignedElements() || []; + } + + // The strip's box and its tabs' full width bound its scroll range. + _observeStrip() { + this._tabsObserver.observe(this._tabsEl); + this._tabsObserver.observe(this._tabsTrack); + } + + _observeTabs() { + this._tabsMutations.disconnect(); + for (const tab of this._tabs) { + this._tabsMutations.observe(tab, { + attributes: true, attributeFilter: ['active', 'hidden', 'title'], + }); + } + } + + _onTabsSlotChange() { + if (!this._menuOpen) return; + this._observeTabs(); + this.requestUpdate(); + } + + _updateOverflow() { + const el = this._tabsEl; + if (!el) return; + const max = el.scrollWidth - el.clientWidth; + this._overflowing = max > 1; + this._fadeStart = this._overflowing && el.scrollLeft > 1; + this._fadeEnd = this._overflowing && el.scrollLeft < max - 1; + } + + _onTabsWheel(e) { + // Ctrl+wheel and trackpad pinch zoom the page. + if (e.ctrlKey || !this._overflowing + || Math.abs(e.deltaX) >= Math.abs(e.deltaY)) return; + e.preventDefault(); + // The vertical delta scrolls sideways, so a page is the strip's width. + this._tabsEl.scrollLeft += wheelDeltaPx(e, () => this._tabsEl.clientWidth)[1]; + } + + _onOverflowClick() { + if (this._menuOpen) { + this._closeMenu(true); + } else { + this._openMenu(); + } + } + + _openMenu() { + this._menuOpen = true; + this._observeTabs(); + this._menuAbort = new AbortController(); + const { signal } = this._menuAbort; + + document.addEventListener('pointerdown', (e) => { + const path = e.composedPath(); + const inside = ['.ide-tab-menu', '.ide-btn-overflow'].some( + sel => path.includes(this.renderRoot.querySelector(sel))); + if (!inside) this._closeMenu(); + }, { signal }); + + // Window capture: main.js reads Escape and single letters as shortcuts + // in document capture, which runs before any listener on the menu. + window.addEventListener('keydown', (e) => this._onMenuKey(e), { capture: true, signal }); + } + + _closeMenu(restoreFocus = false) { + this._menuAbort?.abort(); + this._menuAbort = null; + this._tabsMutations?.disconnect(); + this._menuOpen = false; + if (restoreFocus) this.renderRoot.querySelector('.ide-btn-overflow')?.focus(); + } + + _menuHasFocus() { + return !!this.renderRoot?.activeElement?.closest('.ide-tab-menu'); + } + + // The active tab's item, else the first. + _focusMenuItem() { + const items = [...this.renderRoot.querySelectorAll('.ide-tab-menu-item')]; + (items.find(item => item.getAttribute('aria-checked') === 'true') || items[0])?.focus(); + } + + _onMenuFocusout(e) { + // Chrome blurs a focused item as a render removes it; updated() then + // focuses another one, so this is not focus leaving the menu. + if (this._inUpdate) return; + if (this._menuOpen && !e.currentTarget.contains(e.relatedTarget)) this._closeMenu(); + } + + // A press must not move focus off the menu before the click: on the ▾ the + // focusout would close it, and Safari does not focus a clicked item. + _keepMenuFocus(e) { + e.preventDefault(); + } + + _onMenuKey(e) { + const menu = this.renderRoot.querySelector('.ide-tab-menu'); + if (!menu || !e.composedPath().includes(menu)) return; + const items = [...menu.querySelectorAll('.ide-tab-menu-item')]; + const n = items.length; + const i = items.indexOf(this.renderRoot.activeElement); + let target = null; + if (e.key === 'ArrowDown') { + target = items[(i + 1) % n]; + } else if (e.key === 'ArrowUp') { + target = items[i <= 0 ? n - 1 : i - 1]; + } else if (e.key === 'Home') { + target = items[0]; + } else if (e.key === 'End') { + target = items[n - 1]; + } else if (e.key.length === 1 && e.key !== ' ' && !e.ctrlKey && !e.metaKey && !e.altKey) { + // Type-ahead: the next item whose title starts with the letter. + const letter = e.key.toLowerCase(); + target = [...items.slice(i + 1), ...items.slice(0, i + 1)].find(item => + item.querySelector('.ide-tab-menu-title').textContent.toLowerCase().startsWith(letter)); + } else if (e.key !== 'Escape') { + return; + } + e.preventDefault(); + e.stopPropagation(); + if (e.key === 'Escape') { + this._closeMenu(true); + } else { + target?.focus(); + } + } + + _selectFromMenu(tab) { + this._closeMenu(true); + tab.select(); + } + + _renderTabMenu() { + const tabs = this._tabs.filter(tab => !tab.hidden); + return html` + + `; } get paneName() { @@ -200,17 +542,45 @@ export class IdePaneElement extends LitElement { return html`
-
- +
+
+ +
+ ${when(hasMax, () => html` + >${this.maximized ? '⧉ Restore layout' : '⤢'} `)} ${when(hasCol, () => html`
+ ${this._menuOpen ? this._renderTabMenu() : nothing}
@@ -389,7 +760,7 @@ export class IdeTabElement extends LitElement { icon: { attribute: false }, }; - static styles = css` + static styles = [tabIconStyles, css` :host { display: inline-flex; align-items: center; @@ -425,33 +796,15 @@ export class IdeTabElement extends LitElement { border-bottom: 2px solid var(--accent-tab); } - .ide-tab-icon, - ::slotted([slot="icon"]), - .or-tab-icon { - display: inline-flex; - align-items: center; - justify-content: center; - flex: none; - width: 13px; - height: 13px; + .ide-tab-icon { opacity: 0.7; } - :host([active]) .ide-tab-icon, - :host([active]) ::slotted([slot="icon"]), - :host([active]) .or-tab-icon { + :host([active]) .ide-tab-icon { color: var(--accent-tab); opacity: 1; } - .ide-tab-icon svg, - ::slotted([slot="icon"]) svg, - .or-tab-icon svg { - width: 100%; - height: 100%; - display: block; - } - .ide-tab-title { user-select: none; padding-top: 0; @@ -477,7 +830,7 @@ export class IdeTabElement extends LitElement { background: var(--bg-hover); color: var(--sem-error); } - `; + `]; constructor() { super(); @@ -508,6 +861,11 @@ export class IdeTabElement extends LitElement { _onClick(e) { const path = e.composedPath ? e.composedPath() : [e.target]; if (path.some(el => el.classList?.contains('ide-tab-close'))) return; + this.select(); + } + + // Asks the layout to activate this tab. + select() { emitEvent(this, 'tab-select', { componentType: this.targetComponent }); } @@ -533,7 +891,7 @@ export class IdeTabElement extends LitElement { render() { return html` - ${this.icon ? html`${this.icon}` : nothing} + ${this.icon ? html`${this.icon}` : nothing} ${this.title || ''} ${this.closable ? html`✕` : nothing} `; @@ -1062,15 +1420,20 @@ export class GridLayoutManager extends EventEmitter { this.emit('stateChanged'); } - focusComponent(componentType) { - const comp = this.components.get(componentType); - if (!comp) { + /** + * Activates a component's tab, mounting it first if needed. With reveal, + * also restores a maximized pane that hides the component's pane. + */ + focusComponent(componentType, options) { + if (!this.components.has(componentType)) { const factory = this.factories.get(componentType); - if (factory) { - this._mountComponent(componentType, factory); - } else { - return; - } + if (!factory) return; + this._mountComponent(componentType, factory); + } + const comp = this.components.get(componentType); + if (options?.reveal && comp && this.isPaneMaximized() + && !this.isPaneMaximized(comp.paneName)) { + this.restoreMaximized(); } this.activateTab(componentType); } diff --git a/src/web/src/main.js b/src/web/src/main.js index 424e90b41bb..c407d7c8345 100644 --- a/src/web/src/main.js +++ b/src/web/src/main.js @@ -1285,9 +1285,10 @@ app.syncLayoutSize = syncLayoutSize; window.addEventListener('resize', syncLayoutSize); -// Focus a component tab, or re-create it if it was closed. -function focusComponent(componentType) { - app.goldenLayout.focusComponent(componentType); +// Focus a component tab, or re-create it if it was closed. `options.reveal` +// also restores a maximized pane that hides it (see GridLayoutManager). +function focusComponent(componentType, options) { + app.goldenLayout.focusComponent(componentType, options); } app.focusComponent = focusComponent; diff --git a/src/web/src/menu-bar.js b/src/web/src/menu-bar.js index ca4e7baa6f4..1b19aad5fd9 100644 --- a/src/web/src/menu-bar.js +++ b/src/web/src/menu-bar.js @@ -64,6 +64,10 @@ export function eventShortcut(e) { // Builds the bar and returns nothing; call app.rebuildMenuBar() after // updating app.customMenu to re-render live. export function createMenuBar(app) { + // Picking a window from a menu must show it, even behind a maximized pane. + const show = (componentType) => + () => app.focusComponent(componentType, { reveal: true }); + const staticMenus = [ { label: 'File', items: [ { label: 'Open DB...', action: () => showPathDialog(app, 'Open DB', 'read_db'), @@ -135,24 +139,23 @@ export function createMenuBar(app) { enabledWhen: () => !!app.designScale }, ]}, { label: 'Windows', items: [ - { label: 'Layout Viewer', action: () => app.focusComponent('LayoutViewer') }, - { label: '3D Viewer', action: () => app.focusComponent('3DViewer') }, - { label: 'Display Controls', action: () => app.focusComponent('DisplayControls') }, - { label: 'Inspector', action: () => app.focusComponent('Inspector') }, - { label: 'Selection Browser', - action: () => app.focusComponent('SelectHighlight') }, - { label: 'Tcl Console', action: () => app.focusComponent('TclConsole') }, - { label: 'Hierarchy Browser', action: () => app.focusComponent('Browser') }, - { label: 'Timing', action: () => app.focusComponent('TimingWidget') }, - { label: 'DRC Viewer', action: () => app.focusComponent('DRCWidget') }, - { label: 'Clock Tree', action: () => app.focusComponent('ClockWidget') }, - { label: 'Charts', action: () => app.focusComponent('ChartsWidget') }, - { label: 'Help', action: () => app.focusComponent('HelpWidget') }, + { label: 'Layout Viewer', action: show('LayoutViewer') }, + { label: '3D Viewer', action: show('3DViewer') }, + { label: 'Display Controls', action: show('DisplayControls') }, + { label: 'Inspector', action: show('Inspector') }, + { label: 'Selection Browser', action: show('SelectHighlight') }, + { label: 'Tcl Console', action: show('TclConsole') }, + { label: 'Hierarchy Browser', action: show('Browser') }, + { label: 'Timing', action: show('TimingWidget') }, + { label: 'DRC Viewer', action: show('DRCWidget') }, + { label: 'Clock Tree', action: show('ClockWidget') }, + { label: 'Charts', action: show('ChartsWidget') }, + { label: 'Help', action: show('HelpWidget') }, { type: 'separator' }, { label: 'Reset to Default Layout', action: () => app.resetLayout() }, ]}, { label: 'Help', items: [ - { label: 'Keyboard Shortcuts', action: () => app.focusComponent('HelpWidget') }, + { label: 'Keyboard Shortcuts', action: show('HelpWidget') }, ]}, ]; diff --git a/src/web/src/schematic-widget.js b/src/web/src/schematic-widget.js index b7735f2953f..77ca29df612 100644 --- a/src/web/src/schematic-widget.js +++ b/src/web/src/schematic-widget.js @@ -339,21 +339,22 @@ export class SchematicWidget { }; apply(faninEl, detail.fanin, detail.fanin_depth); apply(fanoutEl, detail.fanout, detail.fanout_depth); - this.refresh(); + // The cone's instance, which a path pin picks without selecting it. + this.refresh(detail.inst_name); + // Applying with "sync schematic" asks to see it, past a maximized pane. if (this.appState.focusComponent) { - this.appState.focusComponent('SchematicWidget'); + this.appState.focusComponent('SchematicWidget', { reveal: true }); } } // ── Refresh ────────────────────────────────────────────────────────────── - refresh() { + refresh(instName = this.appState.selectedInstanceName) { if (!this._netlistsvgReady) { this.setStatus(this._unreadyStatus()); return; } - const instName = this.appState.selectedInstanceName; if (!instName) { this.setStatus(kIdleStatus); return; diff --git a/src/web/src/timing-widget.js b/src/web/src/timing-widget.js index 60051428d4f..afdbf6fe0d2 100644 --- a/src/web/src/timing-widget.js +++ b/src/web/src/timing-widget.js @@ -5,6 +5,13 @@ import { isStaticMode, makeResizableHeaders } from './ui-utils.js'; +// A path node is an instance pin ("inst/PIN"; master pins have no '/') or a +// top-level port, which has no instance. +function instanceOfPin(pin) { + const slash = pin.lastIndexOf('/'); + return slash > 0 ? pin.slice(0, slash) : ''; +} + export class TimingWidget { constructor(app, redrawAllLayers, refreshOverlay) { this._app = app; @@ -17,6 +24,8 @@ export class TimingWidget { this._selectedPathIndex = -1; this._detailTab = 'data'; this._selectedDetailIndex = -1; + // The selected instance when a path row was last picked (_coneTarget). + this._rowSelectionInst = ''; // Default to sorting by slack, matching the Qt GUI. this._sortCol = 'slack'; this._sortAscending = true; @@ -247,7 +256,7 @@ export class TimingWidget { this._coneApplyBtn = document.createElement('button'); this._coneApplyBtn.className = 'or-btn'; this._coneApplyBtn.textContent = 'Cone'; - this._coneApplyBtn.title = 'Show the timing cone for the selected instance'; + this._coneApplyBtn.title = 'Show the timing cone for the selected path pin or instance'; this._coneClearBtn = document.createElement('button'); this._coneClearBtn.className = 'or-btn'; this._coneClearBtn.textContent = 'Clear'; @@ -263,11 +272,16 @@ export class TimingWidget { return panel; } - // The cone target: the currently selected instance. (The backend also - // accepts pin_name for a future per-pin cone, but the web UI has no pin - // selection yet, so we always target the instance.) + // The cone target: the pin of the path row picked last, unless an instance + // was selected (layout, Inspector) after it; else the selected instance. + // The backend prefers pin_name and falls back to inst_name. _coneTarget() { - return this._app.selectedInstanceName || ''; + const node = this._detailNodes[this._selectedDetailIndex]; + const inst = this._app.selectedInstanceName || ''; + if (node?.pin && inst === this._rowSelectionInst) { + return { pin: node.pin, inst: instanceOfPin(node.pin) }; + } + return { pin: '', inst }; } async _applyCone() { @@ -277,9 +291,9 @@ export class TimingWidget { this._coneStatus.textContent = 'select fanin and/or fanout'; return; } - const inst = this._coneTarget(); - if (!inst) { - this._coneStatus.textContent = 'select an instance first'; + const { pin, inst } = this._coneTarget(); + if (!pin && !inst) { + this._coneStatus.textContent = 'select an instance or a path pin first'; return; } const req = { @@ -291,6 +305,7 @@ export class TimingWidget { color_mode: this._coneColorMode.value, inst_name: inst, }; + if (pin) req.pin_name = pin; this._coneApplyBtn.disabled = true; this._coneStatus.textContent = 'computing…'; try { @@ -570,10 +585,10 @@ export class TimingWidget { rows[idx].classList.add('timing-selected-row'); rows[idx].scrollIntoView({ block: 'nearest' }); this._detailTableContainer.focus(); + this._rowSelectionInst = this._app.selectedInstanceName || ''; const paths = this._currentTab === 'setup' ? this._setupPaths : this._holdPaths; const path = paths[this._selectedPathIndex]; - const nodes = this._detailTab === 'data' ? path.data_nodes : path.capture_nodes; // Use _originalIndex when paths were filtered (e.g. by histogram // column click in static mode) so the overlay lookup matches. const highlightIdx = path._originalIndex ?? this._selectedPathIndex; @@ -581,10 +596,18 @@ export class TimingWidget { type: 'timing_highlight', path_index: highlightIdx, is_setup: this._currentTab === 'setup', - pin_name: nodes[idx].pin, + pin_name: this._detailNodes[idx].pin, }).then(() => this._refreshOverlay()); } + // The nodes the detail table shows: the selected path's data or capture side. + get _detailNodes() { + const paths = this._currentTab === 'setup' ? this._setupPaths : this._holdPaths; + const path = paths[this._selectedPathIndex]; + if (!path) return []; + return (this._detailTab === 'data' ? path.data_nodes : path.capture_nodes) || []; + } + _renderDetailTable() { // Preserve column widths across re-renders. const oldHeaders = this._detailTable.querySelectorAll('thead th'); @@ -595,8 +618,7 @@ export class TimingWidget { const paths = this._currentTab === 'setup' ? this._setupPaths : this._holdPaths; if (this._selectedPathIndex < 0 || this._selectedPathIndex >= paths.length) return; - const path = paths[this._selectedPathIndex]; - const nodes = this._detailTab === 'data' ? path.data_nodes : path.capture_nodes; + const nodes = this._detailNodes; const thead = document.createElement('thead'); const hr = document.createElement('tr'); diff --git a/src/web/src/ui-utils.js b/src/web/src/ui-utils.js index a4f98cbb67b..6ef43831e7b 100644 --- a/src/web/src/ui-utils.js +++ b/src/web/src/ui-utils.js @@ -675,7 +675,7 @@ export function installWheelPanning(map, wheelZoomEnabled) { map.getContainer().addEventListener('wheel', (e) => { e.preventDefault(); if (wheelZoomEnabled() === e.ctrlKey) { - const [dx, dy] = wheelDeltaPx(e, map.getContainer()); + const [dx, dy] = wheelDeltaPx(e, () => map.getContainer().clientHeight); map.panBy([dx, dy], { animate: false }); return; } @@ -688,14 +688,16 @@ export function installWheelPanning(map, wheelZoomEnabled) { // A wheel event's scroll amount in CSS pixels. deltaMode is not always pixels: // Firefox reports lines, and a page-mode event (rare, but produced by some // remote-desktop stacks) means a viewport at a time. Treating either as pixels -// would make one notch pan by a couple of pixels. -function wheelDeltaPx(e, container) { +// would make one notch pan by a couple of pixels. `pagePx()` gives the +// viewport's size along the direction the caller scrolls; it is called only +// for page-mode events, keeping the layout read off the common path. +export function wheelDeltaPx(e, pagePx) { const kLineHeightPx = 16; let scale = 1; if (e.deltaMode === 1) { scale = kLineHeightPx; } else if (e.deltaMode === 2) { - scale = container.clientHeight || kLineHeightPx; + scale = pagePx() || kLineHeightPx; } return [e.deltaX * scale, e.deltaY * scale]; } diff --git a/src/web/test/js/setup-dom.js b/src/web/test/js/setup-dom.js index 54abef1edf4..28244892985 100644 --- a/src/web/test/js/setup-dom.js +++ b/src/web/test/js/setup-dom.js @@ -15,6 +15,7 @@ globalThis.Element = dom.window.Element; globalThis.HTMLElement = dom.window.HTMLElement; globalThis.HTMLCanvasElement = dom.window.HTMLCanvasElement; globalThis.XMLSerializer = dom.window.XMLSerializer; +globalThis.MutationObserver = dom.window.MutationObserver; globalThis.getComputedStyle = dom.window.getComputedStyle.bind(dom.window); globalThis.localStorage = dom.window.localStorage; globalThis.matchMedia = globalThis.matchMedia || (() => ({ diff --git a/src/web/test/js/test-ide-layout.js b/src/web/test/js/test-ide-layout.js index c373d2b2a1a..72f30c06240 100644 --- a/src/web/test/js/test-ide-layout.js +++ b/src/web/test/js/test-ide-layout.js @@ -9,6 +9,38 @@ import { TabIcon, COMPONENT_CONFIG } from '../../src/grid-layout.js'; +const PointerEvt = window.PointerEvent || window.MouseEvent; + +// jsdom has no layout: give a tab strip the geometry a browser would. +function stubTabStrip(tabsEl, { scrollWidth, clientWidth }) { + let scrollLeft = 0; + Object.defineProperty(tabsEl, 'scrollWidth', { value: scrollWidth, configurable: true }); + Object.defineProperty(tabsEl, 'clientWidth', { value: clientWidth, configurable: true }); + Object.defineProperty(tabsEl, 'scrollLeft', { + get: () => scrollLeft, + set: (v) => { scrollLeft = v; }, + configurable: true, + }); + tabsEl.dispatchEvent(new Event('scroll')); +} + +// A keydown that crosses into the pane's shadow DOM; returns the event. +function pressKey(target, key) { + const e = new window.KeyboardEvent('keydown', { + key, bubbles: true, composed: true, cancelable: true, + }); + target.dispatchEvent(e); + return e; +} + +// Lets MutationObserver and slotchange callbacks run. +const tick = () => new Promise(resolve => setTimeout(resolve, 0)); + +const menuOf = (pane) => pane.shadowRoot.querySelector('.ide-tab-menu'); +const menuItems = (pane) => [...pane.shadowRoot.querySelectorAll('.ide-tab-menu-item')]; +const focusedTitle = (pane) => pane.shadowRoot.activeElement + ?.querySelector('.ide-tab-menu-title')?.textContent; + describe('GridLayoutManager', () => { let containerEl; let layout; @@ -20,6 +52,29 @@ describe('GridLayoutManager', () => { layout = new GridLayoutManager(containerEl); }); + async function mountRightPane() { + for (const type of ['Inspector', 'Browser', 'TimingWidget', 'ChartsWidget']) { + layout.registerComponentFactoryFunction(type, () => {}); + } + layout.loadLayout({}); + const pane = layout.panes.right; + await pane.updateComplete; + return { pane, tabsEl: pane.shadowRoot.querySelector('.ide-tabs') }; + } + + // The right pane with its tabs overflowing; with `open`, the ▾ menu too. + async function mountOverflowingPane({ open = false } = {}) { + const { pane, tabsEl } = await mountRightPane(); + stubTabStrip(tabsEl, { scrollWidth: 700, clientWidth: 300 }); + await pane.updateComplete; + const btn = pane.shadowRoot.querySelector('.ide-btn-overflow'); + if (open) { + btn.click(); + await pane.updateComplete; + } + return { pane, tabsEl, btn }; + } + it('initializes the CSS Grid DOM structure when empty', () => { assert.ok(containerEl.classList.contains('ide-layout')); assert.ok(containerEl.querySelector('#pane-left')); @@ -296,6 +351,350 @@ describe('GridLayoutManager', () => { assert.ok(!bottomPane.collapsed); }); + it('focusComponent with reveal restores a maximized pane that hides the target', () => { + layout.registerComponentFactoryFunction('LayoutViewer', () => {}); + layout.registerComponentFactoryFunction('TimingWidget', () => {}); + layout.registerComponentFactoryFunction('ChartsWidget', () => {}); + layout.loadLayout({}); + + // Programmatic focus leaves the user's maximized pane alone. + layout.maximizePane('main'); + layout.focusComponent('ChartsWidget'); + assert.ok(containerEl.classList.contains('maximized-main')); + + layout.focusComponent('ChartsWidget', { reveal: true }); + assert.ok(!layout.isPaneMaximized()); + assert.ok(!containerEl.classList.contains('maximized-main')); + assert.equal(layout.activeTabs.right, 'ChartsWidget'); + + // The target is in the maximized pane itself: nothing to restore. + layout.maximizePane('right'); + layout.focusComponent('TimingWidget', { reveal: true }); + assert.ok(containerEl.classList.contains('maximized-right')); + assert.equal(layout.activeTabs.right, 'TimingWidget'); + + layout.focusComponent('ChartsWidget', null); + assert.equal(layout.activeTabs.right, 'ChartsWidget'); + }); + + it('shows the overflow button and edge fades only while the tabs overflow', async () => { + const { pane, tabsEl } = await mountRightPane(); + const btn = pane.shadowRoot.querySelector('.ide-btn-overflow'); + assert.ok(btn.classList.contains('idle'), 'laid out, but hidden until the tabs overflow'); + assert.ok(!tabsEl.classList.contains('fade-end')); + + stubTabStrip(tabsEl, { scrollWidth: 700, clientWidth: 300 }); + await pane.updateComplete; + assert.ok(!btn.classList.contains('idle')); + assert.ok(!tabsEl.classList.contains('fade-start')); + assert.ok(tabsEl.classList.contains('fade-end')); + + tabsEl.scrollLeft = 200; + tabsEl.dispatchEvent(new Event('scroll')); + await pane.updateComplete; + assert.ok(tabsEl.classList.contains('fade-start')); + assert.ok(tabsEl.classList.contains('fade-end')); + + tabsEl.scrollLeft = 400; + tabsEl.dispatchEvent(new Event('scroll')); + await pane.updateComplete; + assert.ok(tabsEl.classList.contains('fade-start')); + assert.ok(!tabsEl.classList.contains('fade-end')); + + stubTabStrip(tabsEl, { scrollWidth: 300, clientWidth: 300 }); + await pane.updateComplete; + assert.ok(btn.classList.contains('idle')); + assert.ok(!tabsEl.classList.contains('fade-start')); + assert.ok(!tabsEl.classList.contains('fade-end')); + }); + + it('lists the open tabs in the overflow menu and activates the chosen one', async () => { + const { pane, btn } = await mountOverflowingPane(); + layout.closeComponent('Browser'); + assert.equal(btn.getAttribute('aria-expanded'), 'false'); + btn.click(); + await pane.updateComplete; + assert.equal(btn.getAttribute('aria-expanded'), 'true'); + + const items = menuItems(pane); + assert.deepEqual( + items.map(item => item.querySelector('.ide-tab-menu-title').textContent), + ['Inspector', 'Timing', 'Charts']); + assert.deepEqual( + items.map(item => item.getAttribute('aria-checked')), + ['true', 'false', 'false']); + assert.ok(items[2].querySelector('.ide-tab-icon svg')); + + // Opening focuses the active tab's item; arrows, Home and End move + // between items, which stay out of the Tab order. + assert.ok(items.every(item => item.getAttribute('tabindex') === '-1')); + assert.equal(pane.shadowRoot.activeElement, items[0]); + const key = (k) => pressKey(pane.shadowRoot.activeElement, k); + key('ArrowUp'); + assert.equal(pane.shadowRoot.activeElement, items[2]); + key('ArrowDown'); + assert.equal(pane.shadowRoot.activeElement, items[0]); + key('End'); + assert.equal(pane.shadowRoot.activeElement, items[2]); + key('Home'); + assert.equal(pane.shadowRoot.activeElement, items[0]); + key('End'); + + items[2].click(); + await pane.updateComplete; + assert.equal(layout.activeTabs.right, 'ChartsWidget'); + assert.equal(menuOf(pane), null); + assert.equal(btn.getAttribute('aria-expanded'), 'false'); + assert.equal(pane.shadowRoot.activeElement, btn, 'focus returns to the ▾'); + }); + + it('lets a click on the overflow button reach document listeners', async () => { + const { btn } = await mountOverflowingPane(); + + // The menu bar and the layer context menu close on a document click. + let clicks = 0; + const onClick = () => { clicks++; }; + document.addEventListener('click', onClick); + try { + btn.click(); + assert.equal(clicks, 1); + } finally { + document.removeEventListener('click', onClick); + } + }); + + it('keeps keyboard focus and Escape within the overflow menu', async () => { + const { pane, btn } = await mountOverflowingPane(); + const focused = () => pane.shadowRoot.activeElement; + const open = async () => { + btn.click(); + await pane.updateComplete; + assert.ok(menuOf(pane)); + }; + + // Like main.js's shortcuts: registered first, in document capture. + const seen = []; + const onKeydown = (e) => seen.push(e.key); + document.addEventListener('keydown', onKeydown, true); + try { + await open(); + assert.ok(!pressKey(document, 'Escape').defaultPrevented); + await pane.updateComplete; + assert.ok(menuOf(pane), 'an Escape outside the menu leaves it open'); + assert.equal(seen.length, 1); + + const e = pressKey(focused(), 'Escape'); + await pane.updateComplete; + assert.ok(e.defaultPrevented); + assert.equal(menuOf(pane), null); + assert.equal(focused(), btn); + assert.equal(seen.length, 1, 'the menu\'s Escape stops at the menu'); + + // A letter jumps to the next item starting with it, and is no + // shortcut ('t' toggles the theme, 'k' the ruler). + await open(); + assert.ok(pressKey(focused(), 't').defaultPrevented); + assert.equal(focusedTitle(pane), 'Timing'); + pressKey(focused(), 'h'); + assert.equal(focusedTitle(pane), 'Hierarchy', 'wraps past the end'); + assert.ok(pressKey(focused(), 'x').defaultPrevented, 'no match'); + assert.equal(focusedTitle(pane), 'Hierarchy'); + assert.equal(seen.length, 1); + + // Enter is left to the button. + assert.ok(!pressKey(focused(), 'Enter').defaultPrevented); + assert.equal(seen.length, 2); + pressKey(focused(), 'Escape'); + await pane.updateComplete; + } finally { + document.removeEventListener('keydown', onKeydown, true); + } + + // Focus moving between items keeps it open; leaving the menu closes it. + await open(); + const focusout = (relatedTarget) => menuItems(pane)[0].dispatchEvent( + new window.FocusEvent('focusout', { bubbles: true, composed: true, relatedTarget })); + focusout(menuItems(pane)[1]); + await pane.updateComplete; + assert.ok(menuOf(pane)); + focusout(document.body); + await pane.updateComplete; + assert.equal(menuOf(pane), null); + + // A press on an item must not move focus off the menu first. + await open(); + const press = new window.MouseEvent('mousedown', { bubbles: true, cancelable: true }); + menuItems(pane)[1].dispatchEvent(press); + assert.ok(press.defaultPrevented); + + menuItems(pane)[0].dispatchEvent( + new PointerEvt('pointerdown', { bubbles: true, composed: true })); + await pane.updateComplete; + assert.ok(menuOf(pane), 'a pointerdown inside the menu keeps it open'); + document.body.dispatchEvent(new PointerEvt('pointerdown', { bubbles: true })); + await pane.updateComplete; + assert.equal(menuOf(pane), null); + + // Maximizing the pane closes it too. + await open(); + layout.maximizePane('right'); + await pane.updateComplete; + assert.equal(menuOf(pane), null); + }); + + it('updates the open overflow menu when the active tab changes', async () => { + const { pane } = await mountOverflowingPane({ open: true }); + + // E.g. a selection response focusing another tab while the menu is open. + layout.activateTab('TimingWidget'); + await layout.components.get('TimingWidget').tabEl.updateComplete; + await tick(); + await pane.updateComplete; + + const checked = menuItems(pane) + .filter(item => item.getAttribute('aria-checked') === 'true') + .map(item => item.querySelector('.ide-tab-menu-title').textContent); + assert.deepEqual(checked, ['Timing']); + }); + + it('closes the overflow menu from the button that opened it', async () => { + const { pane, btn } = await mountOverflowingPane({ open: true }); + + // Pressing the ▾ must not take focus out of the menu: the focusout + // would close it, and the click would then open it again. + const press = new window.MouseEvent('mousedown', { bubbles: true, cancelable: true }); + btn.dispatchEvent(press); + assert.ok(press.defaultPrevented); + + btn.click(); + await pane.updateComplete; + assert.equal(menuOf(pane), null); + assert.equal(pane.shadowRoot.activeElement, btn); + }); + + it('keeps focus in the overflow menu when the focused item goes away', async () => { + const { pane, btn } = await mountOverflowingPane({ open: true }); + pressKey(pane.shadowRoot.activeElement, 'End'); + assert.equal(focusedTitle(pane), 'Charts'); + + // Chrome blurs a focused node as it removes it; jsdom does not. + const focused = pane.shadowRoot.activeElement; + const remove = focused.remove.bind(focused); + focused.remove = () => { + focused.dispatchEvent(new window.FocusEvent('focusout', { + bubbles: true, composed: true, relatedTarget: null, + })); + remove(); + }; + + // E.g. a Tcl command closing the window while the menu is open. + layout.closeComponent('ChartsWidget'); + await tick(); + await pane.updateComplete; + assert.ok(menuOf(pane)); + assert.equal(focusedTitle(pane), 'Inspector', 'back on the active tab\'s item'); + + // A close the user did not ask for still hands focus back to the ▾. + layout.maximizePane('right'); + await pane.updateComplete; + assert.equal(menuOf(pane), null); + assert.equal(pane.shadowRoot.activeElement, btn); + }); + + it('lists a tab added while the overflow menu is open', async () => { + const { pane } = await mountOverflowingPane({ open: true }); + + const extra = document.createElement('ide-tab'); + extra.slot = 'tabs'; + extra.title = 'Extra'; + pane.appendChild(extra); + await tick(); + await pane.updateComplete; + + const titles = menuItems(pane) + .map(item => item.querySelector('.ide-tab-menu-title').textContent); + assert.ok(titles.includes('Extra'), titles.join()); + }); + + it('observes the strip and the tabs\' full width, not each tab', async () => { + const observers = []; + const RealResizeObserver = globalThis.ResizeObserver; + globalThis.ResizeObserver = class { + constructor(callback) { + this.callback = callback; + this.observed = new Set(); + observers.push(this); + } + observe(el) { this.observed.add(el); } + disconnect() { this.observed.clear(); } + }; + try { + // A fresh layout, so its panes are built with the fake observer. + document.body.innerHTML = '
'; + containerEl = document.getElementById('gl-container'); + layout = new GridLayoutManager(containerEl); + const { pane, tabsEl } = await mountRightPane(); + const track = pane.shadowRoot.querySelector('.ide-tabs-track'); + + const ro = observers.find(o => o.observed.has(tabsEl)); + assert.ok(ro, 'the tab strip is observed'); + assert.deepEqual([...ro.observed], [tabsEl, track]); + + // A tab mounted later resizes the track; nothing new to observe. + layout.registerComponentFactoryFunction('ClockWidget', () => {}); + layout.focusComponent('ClockWidget'); + await tick(); + assert.deepEqual([...ro.observed], [tabsEl, track]); + + // Without dispatching scroll: only the observer can notice this. + Object.defineProperty(tabsEl, 'scrollWidth', { value: 700, configurable: true }); + Object.defineProperty(tabsEl, 'clientWidth', { value: 300, configurable: true }); + // A narrower strip brings the active tab back into view. + const scrolls = []; + layout.components.get('ClockWidget').tabEl.scrollIntoView = (opts) => scrolls.push(opts); + ro.callback([]); + await pane.updateComplete; + assert.ok(!pane.shadowRoot.querySelector('.ide-btn-overflow').classList.contains('idle')); + assert.deepEqual(scrolls, [{ inline: 'nearest', block: 'nearest' }]); + } finally { + globalThis.ResizeObserver = RealResizeObserver; + } + }); + + it('scrolls an overflowing tab strip horizontally with a vertical wheel', async () => { + const { pane, tabsEl } = await mountRightPane(); + const spin = (init) => { + const e = new window.WheelEvent('wheel', { bubbles: true, cancelable: true, ...init }); + tabsEl.dispatchEvent(e); + return e; + }; + + stubTabStrip(tabsEl, { scrollWidth: 300, clientWidth: 300 }); + await pane.updateComplete; + assert.ok(!spin({ deltaY: 100 }).defaultPrevented); + assert.equal(tabsEl.scrollLeft, 0); + + stubTabStrip(tabsEl, { scrollWidth: 700, clientWidth: 300 }); + await pane.updateComplete; + assert.ok(spin({ deltaY: 100 }).defaultPrevented); + assert.equal(tabsEl.scrollLeft, 100); + + spin({ deltaY: 3, deltaMode: 1 }); + assert.equal(tabsEl.scrollLeft, 148); + + // The strip scrolls sideways, so a page is its width (300). + spin({ deltaY: 1, deltaMode: 2 }); + assert.equal(tabsEl.scrollLeft, 448); + + // Horizontal gestures are left to the browser. + assert.ok(!spin({ deltaX: 50, deltaY: 10 }).defaultPrevented); + assert.equal(tabsEl.scrollLeft, 448); + + // So are Ctrl+wheel and trackpad pinch, which zoom the page. + assert.ok(!spin({ deltaY: 100, ctrlKey: true }).defaultPrevented); + assert.equal(tabsEl.scrollLeft, 448); + }); + it('persists and restores layout dimensions and active tabs', () => { layout.registerComponentFactoryFunction('DisplayControls', () => {}); layout.registerComponentFactoryFunction('LayoutViewer', () => {}); @@ -369,13 +768,15 @@ describe('GridLayoutManager', () => { await pane.updateComplete; assert.ok(pane.hasAttribute('maximized')); assert.ok(pane.maximized); - assert.equal(maxBtn.textContent, '⧉'); + assert.equal(maxBtn.textContent.trim(), '⧉ Restore layout'); + assert.ok(maxBtn.classList.contains('ide-btn-restore')); pane.setMaximized(false); await pane.updateComplete; assert.ok(!pane.hasAttribute('maximized')); assert.ok(!pane.maximized); assert.equal(maxBtn.textContent, '⤢'); + assert.ok(!maxBtn.classList.contains('ide-btn-restore')); pane.remove(); }); @@ -412,7 +813,6 @@ describe('GridLayoutManager', () => { dragDetail = e.detail; }); - const PointerEvt = window.PointerEvent || window.MouseEvent; splitter.dispatchEvent(new PointerEvt('pointerdown', { bubbles: true, clientX: 100, clientY: 50 })); assert.ok(splitter.classList.contains('dragging')); assert.ok(document.body.classList.contains('is-resizing')); @@ -520,17 +920,17 @@ describe('GridLayoutManager', () => { // Test TabIcon enum rendering tab.icon = TabIcon.LAYOUT; await tab.updateComplete; - assert.ok(tab.shadowRoot.querySelector('.or-tab-icon svg')); + assert.ok(tab.shadowRoot.querySelector('.ide-tab-icon svg')); // Test updating to another TabIcon tab.icon = TabIcon.TCL_CONSOLE; await tab.updateComplete; - assert.ok(tab.shadowRoot.querySelector('.or-tab-icon svg')); + assert.ok(tab.shadowRoot.querySelector('.ide-tab-icon svg')); // Tabs without an icon do not render an icon container tab.icon = null; await tab.updateComplete; - assert.equal(tab.shadowRoot.querySelector('.or-tab-icon'), null); + assert.equal(tab.shadowRoot.querySelector('.ide-tab-icon'), null); tab.remove(); }); diff --git a/src/web/test/js/test-menu-bar.js b/src/web/test/js/test-menu-bar.js index 21d78d7c220..cb317bf0f83 100644 --- a/src/web/test/js/test-menu-bar.js +++ b/src/web/test/js/test-menu-bar.js @@ -378,3 +378,21 @@ describe('Options menu', () => { assert.ok(row.classList.contains('disabled')); }); }); + +describe('Windows menu', () => { + it('reveals the window it opens, even behind a maximized pane', () => { + document.body.innerHTML = ''; + const focused = []; + createMenuBar(optionsApp({ + focusComponent(...args) { focused.push(args); }, + })); + + rowByLabel(openMenu('Windows'), 'Charts').click(); + rowByLabel(openMenu('Help'), 'Keyboard Shortcuts').click(); + + assert.deepEqual(focused, [ + ['ChartsWidget', { reveal: true }], + ['HelpWidget', { reveal: true }], + ]); + }); +}); diff --git a/src/web/test/js/test-schematic-widget.js b/src/web/test/js/test-schematic-widget.js index 1d9ff4952f7..7c8b03ee0ea 100644 --- a/src/web/test/js/test-schematic-widget.js +++ b/src/web/test/js/test-schematic-widget.js @@ -279,7 +279,7 @@ describe('SchematicWidget.syncCone', () => { const stub = { controls, refreshed: 0, - refresh() { this.refreshed++; }, + refresh(inst) { this.refreshed++; this.refreshedFor = inst; }, appState: {}, }; return stub; @@ -318,6 +318,18 @@ describe('SchematicWidget.syncCone', () => { }); assert.deepEqual(depths(s), ['2', '10']); }); + + // The timing panel's Apply asks to see the schematic, which a maximized + // right pane would otherwise hide. + it('reveals the schematic it synced', () => { + const s = makeStub(); + const focused = []; + s.appState.focusComponent = (...args) => focused.push(args); + SchematicWidget.prototype.syncCone.call(s, { inst_name: 'b0', fanin: true }); + assert.deepEqual(focused, [['SchematicWidget', { reveal: true }]]); + // The cone's instance, which a timing path pin can pick unselected. + assert.equal(s.refreshedFor, 'b0'); + }); }); // A stand-in again: building the widget needs a window. diff --git a/src/web/test/js/test-timing-widget.js b/src/web/test/js/test-timing-widget.js index dd8dde41da5..762534c4ccf 100644 --- a/src/web/test/js/test-timing-widget.js +++ b/src/web/test/js/test-timing-widget.js @@ -340,3 +340,70 @@ describe('TimingWidget path table sorting', () => { assert.equal(tip.style.display, 'none'); }); }); + +describe('TimingWidget cone target', () => { + const nodes = [{ pin: 'in1' }, { pin: '_12_/A' }, { pin: '_12_/Z' }]; + + // One setup path, selected, so its detail table lists `nodes`. + function makeWidget(app) { + const widget = new TimingWidget(app, () => {}); + widget.showPaths('setup', [makePath(-0.1, '_12_/Z', { data_nodes: nodes })]); + widget._selectPathRow(0); + return widget; + } + + // Presses Cone with "Sync schematic" ticked. + async function applyCone(widget, app) { + const synced = []; + const onSync = (e) => synced.push(e.detail.inst_name); + document.addEventListener('openroad-cone-sync', onSync); + try { + app.requests.length = 0; + widget._coneSyncSchematic.checked = true; + await widget._applyCone(); + } finally { + document.removeEventListener('openroad-cone-sync', onSync); + } + return { cone: app.requests.find(r => r.type === 'timing_cone'), synced }; + } + + it('targets the pin of the picked path row and syncs its instance', async () => { + const app = createMockApp(); + const widget = makeWidget(app); + widget._selectDetailRow(2); + const { cone, synced } = await applyCone(widget, app); + assert.equal(cone.pin_name, '_12_/Z'); + assert.equal(cone.inst_name, '_12_'); + assert.deepEqual(synced, ['_12_']); + }); + + it('targets an instance selected after the row instead', async () => { + const app = createMockApp(); + const widget = makeWidget(app); + widget._selectDetailRow(2); + app.selectedInstanceName = 'u9'; + const { cone, synced } = await applyCone(widget, app); + assert.equal(cone.pin_name, undefined); + assert.equal(cone.inst_name, 'u9'); + assert.deepEqual(synced, ['u9']); + }); + + it('cones a port row without syncing the schematic', async () => { + const app = createMockApp(); + const widget = makeWidget(app); + widget._selectDetailRow(0); + const { cone, synced } = await applyCone(widget, app); + assert.equal(cone.pin_name, 'in1'); + assert.equal(cone.inst_name, ''); + assert.deepEqual(synced, []); + }); + + it('asks for a target when there is none', async () => { + const app = createMockApp(); + const widget = makeWidget(app); + const { cone, synced } = await applyCone(widget, app); + assert.equal(cone, undefined); + assert.deepEqual(synced, []); + assert.equal(widget._coneStatus.textContent, 'select an instance or a path pin first'); + }); +}); diff --git a/src/web/test/js/test-ui-utils.js b/src/web/test/js/test-ui-utils.js index 16ed17ccb01..de66afb06a0 100644 --- a/src/web/test/js/test-ui-utils.js +++ b/src/web/test/js/test-ui-utils.js @@ -442,6 +442,13 @@ describe('installWheelPanning', () => { assert.deepEqual(calls.zoom, []); }); + it('pans a page-mode notch by the map\'s height', () => { + const { map, calls, fire } = makeWheelMap({ clientHeight: 600 }); + installWheelPanning(map, () => false); + fire({ deltaY: 1, deltaMode: 2 }); + assert.deepEqual(calls.pan, [[0, 600]]); + }); + it('zooms on Ctrl+wheel when the preference is off', () => { const { map, calls, fire } = makeWheelMap({ zoom: 3 }); installWheelPanning(map, () => false); From e9b1aeb22d3c4abb3aeae3e9705f95fb145626b4 Mon Sep 17 00:00:00 2001 From: Jorge Ferreira Date: Tue, 3 Nov 2026 22:59:57 +0000 Subject: [PATCH 2/6] web: add Schematic to Windows and refine the timing cone target Signed-off-by: Jorge Ferreira --- src/web/src/menu-bar.js | 1 + src/web/src/schematic-widget.js | 9 ++++++- src/web/src/timing-widget.js | 12 ++++----- src/web/test/js/test-menu-bar.js | 3 +++ src/web/test/js/test-schematic-widget.js | 33 ++++++++++++++++++++++++ src/web/test/js/test-timing-widget.js | 14 ++++++++++ 6 files changed, 65 insertions(+), 7 deletions(-) diff --git a/src/web/src/menu-bar.js b/src/web/src/menu-bar.js index 1b19aad5fd9..96f09ce7169 100644 --- a/src/web/src/menu-bar.js +++ b/src/web/src/menu-bar.js @@ -140,6 +140,7 @@ export function createMenuBar(app) { ]}, { label: 'Windows', items: [ { label: 'Layout Viewer', action: show('LayoutViewer') }, + { label: 'Schematic', action: show('SchematicWidget') }, { label: '3D Viewer', action: show('3DViewer') }, { label: 'Display Controls', action: show('DisplayControls') }, { label: 'Inspector', action: show('Inspector') }, diff --git a/src/web/src/schematic-widget.js b/src/web/src/schematic-widget.js index 77ca29df612..fd0fa2d0d5f 100644 --- a/src/web/src/schematic-widget.js +++ b/src/web/src/schematic-widget.js @@ -54,7 +54,7 @@ export class SchematicWidget { this.container.element.appendChild(this.element); // Button listeners - this.controls.querySelector('#schematic-refresh').addEventListener('click', () => this.refresh()); + this.controls.querySelector('#schematic-refresh').addEventListener('click', () => this._onRefresh()); this.controls.querySelector('#schematic-fit').addEventListener('click', () => this.fitView()); this.controls.querySelector('#schematic-zoom-in').addEventListener('click', () => this._zoomStep(1.5)); this.controls.querySelector('#schematic-zoom-out').addEventListener('click', () => this._zoomStep(1 / 1.5)); @@ -349,7 +349,14 @@ export class SchematicWidget { // ── Refresh ────────────────────────────────────────────────────────────── + // Redraws the instance last asked for, including one a timing cone picked + // without selecting it. + _onRefresh() { + this.refresh(this._instName); + } + refresh(instName = this.appState.selectedInstanceName) { + this._instName = instName; if (!this._netlistsvgReady) { this.setStatus(this._unreadyStatus()); return; diff --git a/src/web/src/timing-widget.js b/src/web/src/timing-widget.js index afdbf6fe0d2..7513d2ba62d 100644 --- a/src/web/src/timing-widget.js +++ b/src/web/src/timing-widget.js @@ -24,8 +24,8 @@ export class TimingWidget { this._selectedPathIndex = -1; this._detailTab = 'data'; this._selectedDetailIndex = -1; - // The selected instance when a path row was last picked (_coneTarget). - this._rowSelectionInst = ''; + // app.selectionToken when a path row was last picked (_coneTarget). + this._rowSelectionToken = null; // Default to sorting by slack, matching the Qt GUI. this._sortCol = 'slack'; this._sortAscending = true; @@ -272,13 +272,13 @@ export class TimingWidget { return panel; } - // The cone target: the pin of the path row picked last, unless an instance - // was selected (layout, Inspector) after it; else the selected instance. + // The cone target: the pin of the path row picked last, unless any selection + // (layout, Inspector, Charts…) came after it; else the selected instance. // The backend prefers pin_name and falls back to inst_name. _coneTarget() { const node = this._detailNodes[this._selectedDetailIndex]; const inst = this._app.selectedInstanceName || ''; - if (node?.pin && inst === this._rowSelectionInst) { + if (node?.pin && this._app.selectionToken === this._rowSelectionToken) { return { pin: node.pin, inst: instanceOfPin(node.pin) }; } return { pin: '', inst }; @@ -585,7 +585,7 @@ export class TimingWidget { rows[idx].classList.add('timing-selected-row'); rows[idx].scrollIntoView({ block: 'nearest' }); this._detailTableContainer.focus(); - this._rowSelectionInst = this._app.selectedInstanceName || ''; + this._rowSelectionToken = this._app.selectionToken; const paths = this._currentTab === 'setup' ? this._setupPaths : this._holdPaths; const path = paths[this._selectedPathIndex]; diff --git a/src/web/test/js/test-menu-bar.js b/src/web/test/js/test-menu-bar.js index cb317bf0f83..ef2ec261138 100644 --- a/src/web/test/js/test-menu-bar.js +++ b/src/web/test/js/test-menu-bar.js @@ -388,10 +388,13 @@ describe('Windows menu', () => { })); rowByLabel(openMenu('Windows'), 'Charts').click(); + // Closable, so the menu must be able to bring it back. + rowByLabel(openMenu('Windows'), 'Schematic').click(); rowByLabel(openMenu('Help'), 'Keyboard Shortcuts').click(); assert.deepEqual(focused, [ ['ChartsWidget', { reveal: true }], + ['SchematicWidget', { reveal: true }], ['HelpWidget', { reveal: true }], ]); }); diff --git a/src/web/test/js/test-schematic-widget.js b/src/web/test/js/test-schematic-widget.js index 7c8b03ee0ea..74c4b8e55af 100644 --- a/src/web/test/js/test-schematic-widget.js +++ b/src/web/test/js/test-schematic-widget.js @@ -332,6 +332,39 @@ describe('SchematicWidget.syncCone', () => { }); }); +// The real refresh() on a stand-in, recording the instances it asks for. +describe('SchematicWidget.refresh', () => { + function makeStub() { + const requested = []; + const stub = Object.create(SchematicWidget.prototype); + stub._netlistsvgReady = true; + stub.controls = document.createElement('div'); + stub.controls.innerHTML = + '' + + ''; + stub.setStatus = () => {}; + stub.appState = { + selectedInstanceName: '', + websocketManager: { + readyPromise: Promise.resolve(), + request(msg) { + requested.push(msg.inst_name); + return Promise.resolve({}); + }, + }, + }; + return { stub, requested }; + } + + it('redraws the instance a timing cone picked when Refresh is pressed', async () => { + const { stub, requested } = makeStub(); + stub.refresh('b0'); // syncCone, for a path pin nothing selected + stub._onRefresh(); + await new Promise(resolve => setTimeout(resolve, 0)); + assert.deepEqual(requested, ['b0', 'b0']); + }); +}); + // A stand-in again: building the widget needs a window. describe('SchematicWidget without netlistsvg', () => { function makeStub(isStaticMode) { diff --git a/src/web/test/js/test-timing-widget.js b/src/web/test/js/test-timing-widget.js index 762534c4ccf..16eed70dd82 100644 --- a/src/web/test/js/test-timing-widget.js +++ b/src/web/test/js/test-timing-widget.js @@ -5,6 +5,7 @@ import './setup-dom.js'; import { describe, it } from 'node:test'; import assert from 'node:assert/strict'; import { TimingWidget } from '../../src/timing-widget.js'; +import { beginSelection } from '../../src/ui-utils.js'; // jsdom does not implement scrollIntoView; stub it so _selectPathRow runs. if (!window.HTMLElement.prototype.scrollIntoView) { @@ -381,6 +382,7 @@ describe('TimingWidget cone target', () => { const app = createMockApp(); const widget = makeWidget(app); widget._selectDetailRow(2); + beginSelection(app); app.selectedInstanceName = 'u9'; const { cone, synced } = await applyCone(widget, app); assert.equal(cone.pin_name, undefined); @@ -388,6 +390,18 @@ describe('TimingWidget cone target', () => { assert.deepEqual(synced, ['u9']); }); + it('targets the instance when it is selected again after the row', async () => { + const app = createMockApp(); + app.selectedInstanceName = 'u9'; + const widget = makeWidget(app); + widget._selectDetailRow(2); + // Same name as before the row: only the selection token tells them apart. + beginSelection(app); + const { cone } = await applyCone(widget, app); + assert.equal(cone.pin_name, undefined); + assert.equal(cone.inst_name, 'u9'); + }); + it('cones a port row without syncing the schematic', async () => { const app = createMockApp(); const widget = makeWidget(app); From 558826dec3feb611cfa91db4b09ed5b9ec4bd357 Mon Sep 17 00:00:00 2001 From: Jorge Ferreira Date: Tue, 3 Nov 2026 22:59:57 +0000 Subject: [PATCH 3/6] web: show the tab menu button on every pane, drop overflow tracking Signed-off-by: Jorge Ferreira --- src/web/dist/app.min.js | 305 +++++++++++++---------------- src/web/dist/report.min.js | 199 ++++++++----------- src/web/src/grid-layout.js | 250 +++++++---------------- src/web/test/js/setup-dom.js | 1 - src/web/test/js/test-ide-layout.js | 221 ++++++++------------- 5 files changed, 383 insertions(+), 593 deletions(-) diff --git a/src/web/dist/app.min.js b/src/web/dist/app.min.js index 2e1c2dbbb8d..041918e560b 100644 --- a/src/web/dist/app.min.js +++ b/src/web/dist/app.min.js @@ -1,51 +1,51 @@ -(()=>{var sMe=Object.create;var P_t=Object.defineProperty;var oMe=Object.getOwnPropertyDescriptor;var cMe=Object.getOwnPropertyNames;var aMe=Object.getPrototypeOf,uMe=Object.prototype.hasOwnProperty;var kI=(d=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(d,{get:(s,h)=>(typeof require<"u"?require:s)[h]}):d)(function(d){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+d+'" is not supported')});var Ld=(d,s)=>()=>(s||d((s={exports:{}}).exports,s),s.exports),lMe=(d,s)=>{for(var h in s)P_t(d,h,{get:s[h],enumerable:!0})},hMe=(d,s,h,p)=>{if(s&&typeof s=="object"||typeof s=="function")for(let m of cMe(s))!uMe.call(d,m)&&m!==h&&P_t(d,m,{get:()=>s[m],enumerable:!(p=oMe(s,m))||p.enumerable});return d};var FXt=(d,s,h)=>(h=d!=null?sMe(aMe(d)):{},hMe(s||!d||!d.__esModule?P_t(h,"default",{value:d,enumerable:!0}):h,d));var zXt=Ld((ytt,UXt)=>{(function(d,s){typeof ytt=="object"&&typeof UXt<"u"?s(ytt):typeof define=="function"&&define.amd?define(["exports"],s):(d=typeof globalThis<"u"?globalThis:d||self,s(d.leaflet={}))})(ytt,function(d){"use strict";var s="1.9.4";function h(w){var S,D,q,st;for(D=1,q=arguments.length;D"u"||!L||!L.Mixin)){w=X(w)?w:[w];for(var S=0;S0?Math.floor(w):Math.ceil(w)};re.prototype={clone:function(){return new re(this.x,this.y)},add:function(w){return this.clone()._add(Se(w))},_add:function(w){return this.x+=w.x,this.y+=w.y,this},subtract:function(w){return this.clone()._subtract(Se(w))},_subtract:function(w){return this.x-=w.x,this.y-=w.y,this},divideBy:function(w){return this.clone()._divideBy(w)},_divideBy:function(w){return this.x/=w,this.y/=w,this},multiplyBy:function(w){return this.clone()._multiplyBy(w)},_multiplyBy:function(w){return this.x*=w,this.y*=w,this},scaleBy:function(w){return new re(this.x*w.x,this.y*w.y)},unscaleBy:function(w){return new re(this.x/w.x,this.y/w.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=hn(this.x),this.y=hn(this.y),this},distanceTo:function(w){w=Se(w);var S=w.x-this.x,D=w.y-this.y;return Math.sqrt(S*S+D*D)},equals:function(w){return w=Se(w),w.x===this.x&&w.y===this.y},contains:function(w){return w=Se(w),Math.abs(w.x)<=Math.abs(this.x)&&Math.abs(w.y)<=Math.abs(this.y)},toString:function(){return"Point("+B(this.x)+", "+B(this.y)+")"}};function Se(w,S,D){return w instanceof re?w:X(w)?new re(w[0],w[1]):w==null?w:typeof w=="object"&&"x"in w&&"y"in w?new re(w.x,w.y):new re(w,S,D)}function ke(w,S){if(w)for(var D=S?[w,S]:w,q=0,st=D.length;q=this.min.x&&D.x<=this.max.x&&S.y>=this.min.y&&D.y<=this.max.y},intersects:function(w){w=mn(w);var S=this.min,D=this.max,q=w.min,st=w.max,vt=st.x>=S.x&&q.x<=D.x,$t=st.y>=S.y&&q.y<=D.y;return vt&&$t},overlaps:function(w){w=mn(w);var S=this.min,D=this.max,q=w.min,st=w.max,vt=st.x>S.x&&q.xS.y&&q.y=S.lat&&st.lat<=D.lat&&q.lng>=S.lng&&st.lng<=D.lng},intersects:function(w){w=Qn(w);var S=this._southWest,D=this._northEast,q=w.getSouthWest(),st=w.getNorthEast(),vt=st.lat>=S.lat&&q.lat<=D.lat,$t=st.lng>=S.lng&&q.lng<=D.lng;return vt&&$t},overlaps:function(w){w=Qn(w);var S=this._southWest,D=this._northEast,q=w.getSouthWest(),st=w.getNorthEast(),vt=st.lat>S.lat&&q.latS.lng&&q.lng1,oi=function(){var w=!1;try{var S=Object.defineProperty({},"passive",{get:function(){w=!0}});window.addEventListener("testPassiveEventSupport",N,S),window.removeEventListener("testPassiveEventSupport",N,S)}catch{}return w}(),Jr=function(){return!!document.createElement("canvas").getContext}(),Bs=!!(document.createElementNS&&ut("svg").createSVGRect),Oc=!!Bs&&function(){var w=document.createElement("div");return w.innerHTML="",(w.firstChild&&w.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),ru=!Bs&&function(){try{var w=document.createElement("div");w.innerHTML='';var S=w.firstChild;return S.style.behavior="url(#default#VML)",S&&typeof S.adj=="object"}catch{return!1}}(),fc=navigator.platform.indexOf("Mac")===0,il=navigator.platform.indexOf("Linux")===0;function va(w){return navigator.userAgent.toLowerCase().indexOf(w)>=0}var Mr={ie,ielt9:rn,edge:Pn,webkit:Tt,android:yt,android23:ue,androidStock:An,opera:zn,chrome:Li,gecko:xi,safari:Jt,phantom:nn,opera12:vn,win:he,ie3d:Mn,webkit3d:Sn,gecko3d:gn,any3d:Ce,mobile:dn,mobileWebkit:jn,mobileWebkit3d:ar,msPointer:gr,pointer:tr,touch:Qt,touchNative:Ln,mobileOpera:Mi,mobileGecko:sn,retina:Zn,passiveEvents:oi,canvas:Jr,svg:Bs,vml:ru,inlineSvg:Oc,mac:fc,linux:il},rv=Mr.msPointer?"MSPointerDown":"pointerdown",U0=Mr.msPointer?"MSPointerMove":"pointermove",sv=Mr.msPointer?"MSPointerUp":"pointerup",z0=Mr.msPointer?"MSPointerCancel":"pointercancel",j0={touchstart:rv,touchmove:U0,touchend:sv,touchcancel:z0},ov={touchstart:Pr,touchmove:Hi,touchend:Hi,touchcancel:Hi},vg={},cv=!1;function l3(w,S,D){return S==="touchstart"&&Ze(),ov[S]?(D=ov[S].bind(this,D),w.addEventListener(j0[S],D,!1),D):(console.warn("wrong event specified:",S),N)}function Rt(w,S,D){if(!j0[S]){console.warn("wrong event specified:",S);return}w.removeEventListener(j0[S],D,!1)}function ve(w){vg[w.pointerId]=w}function Je(w){vg[w.pointerId]&&(vg[w.pointerId]=w)}function tn(w){delete vg[w.pointerId]}function Ze(){cv||(document.addEventListener(rv,ve,!0),document.addEventListener(U0,Je,!0),document.addEventListener(sv,tn,!0),document.addEventListener(z0,tn,!0),cv=!0)}function Hi(w,S){if(S.pointerType!==(S.MSPOINTER_TYPE_MOUSE||"mouse")){S.touches=[];for(var D in vg)S.touches.push(vg[D]);S.changedTouches=[S],w(S)}}function Pr(w,S){S.MSPOINTER_TYPE_TOUCH&&S.pointerType===S.MSPOINTER_TYPE_TOUCH&&sl(S),Hi(w,S)}function Gr(w){var S={},D,q;for(q in w)D=w[q],S[q]=D&&D.bind?D.bind(w):D;return w=S,S.type="dblclick",S.detail=2,S.isTrusted=!1,S._simulated=!0,S}var hs=200;function Fs(w,S){w.addEventListener("dblclick",S);var D=0,q;function st(vt){if(vt.detail!==1){q=vt.detail;return}if(!(vt.pointerType==="mouse"||vt.sourceCapabilities&&!vt.sourceCapabilities.firesTouchEvents)){var $t=Bc(vt);if(!($t.some(function(Ye){return Ye instanceof HTMLLabelElement&&Ye.attributes.for})&&!$t.some(function(Ye){return Ye instanceof HTMLInputElement||Ye instanceof HTMLSelectElement}))){var _e=Date.now();_e-D<=hs?(q++,q===2&&S(Gr(vt))):q=1,D=_e}}}return w.addEventListener("click",st),{dblclick:S,simDblclick:st}}function Ms(w,S){w.removeEventListener("dblclick",S.dblclick),w.removeEventListener("click",S.simDblclick)}var bs=u1(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Tc=u1(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),rl=Tc==="webkitTransition"||Tc==="OTransition"?Tc+"End":"transitionend";function Oa(w){return typeof w=="string"?document.getElementById(w):w}function wh(w,S){var D=w.style[S]||w.currentStyle&&w.currentStyle[S];if((!D||D==="auto")&&document.defaultView){var q=document.defaultView.getComputedStyle(w,null);D=q?q[S]:null}return D==="auto"?null:D}function Nr(w,S,D){var q=document.createElement(w);return q.className=S||"",D&&D.appendChild(q),q}function mr(w){var S=w.parentNode;S&&S.removeChild(w)}function a1(w){for(;w.firstChild;)w.removeChild(w.firstChild)}function dc(w){var S=w.parentNode;S&&S.lastChild!==w&&S.appendChild(w)}function vh(w){var S=w.parentNode;S&&S.firstChild!==w&&S.insertBefore(w,S.firstChild)}function _g(w,S){if(w.classList!==void 0)return w.classList.contains(S);var D=ff(w);return D.length>0&&new RegExp("(^|\\s)"+S+"(\\s|$)").test(D)}function ws(w,S){if(w.classList!==void 0)for(var D=U(S),q=0,st=D.length;q0?2*window.devicePixelRatio:1;function SS(w){return Mr.edge?w.wheelDeltaY/2:w.deltaY&&w.deltaMode===0?-w.deltaY/yk:w.deltaY&&w.deltaMode===1?-w.deltaY*20:w.deltaY&&w.deltaMode===2?-w.deltaY*60:w.deltaX||w.deltaZ?0:w.wheelDelta?(w.wheelDeltaY||w.wheelDelta)/2:w.detail&&Math.abs(w.detail)<32765?-w.detail*20:w.detail?w.detail/-32765*60:0}function m3(w,S){var D=S.relatedTarget;if(!D)return!0;try{for(;D&&D!==w;)D=D.parentNode}catch{return!1}return D!==w}var xk={__proto__:null,on:As,off:Vc,stopPropagation:W0,disableScrollPropagation:g3,disableClickPropagation:hv,preventDefault:sl,stop:rc,getPropagationPath:Bc,getMousePosition:ES,getWheelDelta:SS,isExternalTarget:m3,addListener:As,removeListener:Vc},TS=xe.extend({run:function(w,S,D,q){this.stop(),this._el=w,this._inProgress=!0,this._duration=D||.25,this._easeOutPower=1/Math.max(q||.5,.2),this._startPos=yg(w),this._offset=S.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=ot(this._animate,this),this._step()},_step:function(w){var S=+new Date-this._startTime,D=this._duration*1e3;Sthis.options.maxZoom)?this.setZoom(w):this},panInsideBounds:function(w,S){this._enforcingBounds=!0;var D=this.getCenter(),q=this._limitCenter(D,this._zoom,Qn(w));return D.equals(q)||this.panTo(q,S),this._enforcingBounds=!1,this},panInside:function(w,S){S=S||{};var D=Se(S.paddingTopLeft||S.padding||[0,0]),q=Se(S.paddingBottomRight||S.padding||[0,0]),st=this.project(this.getCenter()),vt=this.project(w),$t=this.getPixelBounds(),_e=mn([$t.min.add(D),$t.max.subtract(q)]),Ye=_e.getSize();if(!_e.contains(vt)){this._enforcingBounds=!0;var Un=vt.subtract(_e.getCenter()),Ji=_e.extend(vt).getSize().subtract(Ye);st.x+=Un.x<0?-Ji.x:Ji.x,st.y+=Un.y<0?-Ji.y:Ji.y,this.panTo(this.unproject(st),S),this._enforcingBounds=!1}return this},invalidateSize:function(w){if(!this._loaded)return this;w=h({animate:!1,pan:!0},w===!0?{animate:!0}:w);var S=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var D=this.getSize(),q=S.divideBy(2).round(),st=D.divideBy(2).round(),vt=q.subtract(st);return!vt.x&&!vt.y?this:(w.animate&&w.pan?this.panBy(vt):(w.pan&&this._rawPanBy(vt),this.fire("move"),w.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(m(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:S,newSize:D}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(w){if(w=this._locateOptions=h({timeout:1e4,watch:!1},w),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var S=m(this._handleGeolocationResponse,this),D=m(this._handleGeolocationError,this);return w.watch?this._locationWatchId=navigator.geolocation.watchPosition(S,D,w):navigator.geolocation.getCurrentPosition(S,D,w),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(w){if(this._container._leaflet_id){var S=w.code,D=w.message||(S===1?"permission denied":S===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:S,message:"Geolocation error: "+D+"."})}},_handleGeolocationResponse:function(w){if(this._container._leaflet_id){var S=w.coords.latitude,D=w.coords.longitude,q=new ge(S,D),st=q.toBounds(w.coords.accuracy*2),vt=this._locateOptions;if(vt.setView){var $t=this.getBoundsZoom(st);this.setView(q,vt.maxZoom?Math.min($t,vt.maxZoom):$t)}var _e={latlng:q,bounds:st,timestamp:w.timestamp};for(var Ye in w.coords)typeof w.coords[Ye]=="number"&&(_e[Ye]=w.coords[Ye]);this.fire("locationfound",_e)}},addHandler:function(w,S){if(!S)return this;var D=this[w]=new S(this);return this._handlers.push(D),this.options[w]&&D.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),mr(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(Lt(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var w;for(w in this._layers)this._layers[w].remove();for(w in this._panes)mr(this._panes[w]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(w,S){var D="leaflet-pane"+(w?" leaflet-"+w.replace("Pane","")+"-pane":""),q=Nr("div",D,S||this._mapPane);return w&&(this._panes[w]=q),q},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var w=this.getPixelBounds(),S=this.unproject(w.getBottomLeft()),D=this.unproject(w.getTopRight());return new en(S,D)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(w,S,D){w=Qn(w),D=Se(D||[0,0]);var q=this.getZoom()||0,st=this.getMinZoom(),vt=this.getMaxZoom(),$t=w.getNorthWest(),_e=w.getSouthEast(),Ye=this.getSize().subtract(D),Un=mn(this.project(_e,q),this.project($t,q)).getSize(),Ji=Mr.any3d?this.options.zoomSnap:1,Qr=Ye.x/Un.x,Is=Ye.y/Un.y,ol=S?Math.max(Qr,Is):Math.min(Qr,Is);return q=this.getScaleZoom(ol,q),Ji&&(q=Math.round(q/(Ji/100))*(Ji/100),q=S?Math.ceil(q/Ji)*Ji:Math.floor(q/Ji)*Ji),Math.max(st,Math.min(vt,q))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new re(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(w,S){var D=this._getTopLeftPoint(w,S);return new ke(D,D.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(w){return this.options.crs.getProjectedBounds(w===void 0?this.getZoom():w)},getPane:function(w){return typeof w=="string"?this._panes[w]:w},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(w,S){var D=this.options.crs;return S=S===void 0?this._zoom:S,D.scale(w)/D.scale(S)},getScaleZoom:function(w,S){var D=this.options.crs;S=S===void 0?this._zoom:S;var q=D.zoom(w*D.scale(S));return isNaN(q)?1/0:q},project:function(w,S){return S=S===void 0?this._zoom:S,this.options.crs.latLngToPoint(Pe(w),S)},unproject:function(w,S){return S=S===void 0?this._zoom:S,this.options.crs.pointToLatLng(Se(w),S)},layerPointToLatLng:function(w){var S=Se(w).add(this.getPixelOrigin());return this.unproject(S)},latLngToLayerPoint:function(w){var S=this.project(Pe(w))._round();return S._subtract(this.getPixelOrigin())},wrapLatLng:function(w){return this.options.crs.wrapLatLng(Pe(w))},wrapLatLngBounds:function(w){return this.options.crs.wrapLatLngBounds(Qn(w))},distance:function(w,S){return this.options.crs.distance(Pe(w),Pe(S))},containerPointToLayerPoint:function(w){return Se(w).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(w){return Se(w).add(this._getMapPanePos())},containerPointToLatLng:function(w){var S=this.containerPointToLayerPoint(Se(w));return this.layerPointToLatLng(S)},latLngToContainerPoint:function(w){return this.layerPointToContainerPoint(this.latLngToLayerPoint(Pe(w)))},mouseEventToContainerPoint:function(w){return ES(w,this._container)},mouseEventToLayerPoint:function(w){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(w))},mouseEventToLatLng:function(w){return this.layerPointToLatLng(this.mouseEventToLayerPoint(w))},_initContainer:function(w){var S=this._container=Oa(w);if(S){if(S._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");As(S,"scroll",this._onScroll,this),this._containerId=E(S)},_initLayout:function(){var w=this._container;this._fadeAnimated=this.options.fadeAnimation&&Mr.any3d,ws(w,"leaflet-container"+(Mr.touch?" leaflet-touch":"")+(Mr.retina?" leaflet-retina":"")+(Mr.ielt9?" leaflet-oldie":"")+(Mr.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var S=wh(w,"position");S!=="absolute"&&S!=="relative"&&S!=="fixed"&&S!=="sticky"&&(w.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var w=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ya(this._mapPane,new re(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ws(w.markerPane,"leaflet-zoom-hide"),ws(w.shadowPane,"leaflet-zoom-hide"))},_resetView:function(w,S,D){ya(this._mapPane,new re(0,0));var q=!this._loaded;this._loaded=!0,S=this._limitZoom(S),this.fire("viewprereset");var st=this._zoom!==S;this._moveStart(st,D)._move(w,S)._moveEnd(st),this.fire("viewreset"),q&&this.fire("load")},_moveStart:function(w,S){return w&&this.fire("zoomstart"),S||this.fire("movestart"),this},_move:function(w,S,D,q){S===void 0&&(S=this._zoom);var st=this._zoom!==S;return this._zoom=S,this._lastCenter=w,this._pixelOrigin=this._getNewPixelOrigin(w),q?D&&D.pinch&&this.fire("zoom",D):((st||D&&D.pinch)&&this.fire("zoom",D),this.fire("move",D)),this},_moveEnd:function(w){return w&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return Lt(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(w){ya(this._mapPane,this._getMapPanePos().subtract(w))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(w){this._targets={},this._targets[E(this._container)]=this;var S=w?Vc:As;S(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&S(window,"resize",this._onResize,this),Mr.any3d&&this.options.transform3DLimit&&(w?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){Lt(this._resizeRequest),this._resizeRequest=ot(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var w=this._getMapPanePos();Math.max(Math.abs(w.x),Math.abs(w.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(w,S){for(var D=[],q,st=S==="mouseout"||S==="mouseover",vt=w.target||w.srcElement,$t=!1;vt;){if(q=this._targets[E(vt)],q&&(S==="click"||S==="preclick")&&this._draggableMoved(q)){$t=!0;break}if(q&&q.listens(S,!0)&&(st&&!m3(vt,w)||(D.push(q),st))||vt===this._container)break;vt=vt.parentNode}return!D.length&&!$t&&!st&&this.listens(S,!0)&&(D=[this]),D},_isClickDisabled:function(w){for(;w&&w!==this._container;){if(w._leaflet_disable_click)return!0;w=w.parentNode}},_handleDOMEvent:function(w){var S=w.target||w.srcElement;if(!(!this._loaded||S._leaflet_disable_events||w.type==="click"&&this._isClickDisabled(S))){var D=w.type;D==="mousedown"&&Py(S),this._fireDOMEvent(w,D)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(w,S,D){if(w.type==="click"){var q=h({},w);q.type="preclick",this._fireDOMEvent(q,q.type,D)}var st=this._findEventTargets(w,S);if(D){for(var vt=[],$t=0;$t0?Math.round(w-S)/2:Math.max(0,Math.ceil(w))-Math.max(0,Math.floor(S))},_limitZoom:function(w){var S=this.getMinZoom(),D=this.getMaxZoom(),q=Mr.any3d?this.options.zoomSnap:1;return q&&(w=Math.round(w/q)*q),Math.max(S,Math.min(D,w))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){$c(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(w,S){var D=this._getCenterOffset(w)._trunc();return(S&&S.animate)!==!0&&!this.getSize().contains(D)?!1:(this.panBy(D,S),!0)},_createAnimProxy:function(){var w=this._proxy=Nr("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(w),this.on("zoomanim",function(S){var D=bs,q=this._proxy.style[D];Nd(this._proxy,this.project(S.center,S.zoom),this.getZoomScale(S.zoom,1)),q===this._proxy.style[D]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){mr(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var w=this.getCenter(),S=this.getZoom();Nd(this._proxy,this.project(w,S),this.getZoomScale(S,1))},_catchTransitionEnd:function(w){this._animatingZoom&&w.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(w,S,D){if(this._animatingZoom)return!0;if(D=D||{},!this._zoomAnimated||D.animate===!1||this._nothingToAnimate()||Math.abs(S-this._zoom)>this.options.zoomAnimationThreshold)return!1;var q=this.getZoomScale(S),st=this._getCenterOffset(w)._divideBy(1-1/q);return D.animate!==!0&&!this.getSize().contains(st)?!1:(ot(function(){this._moveStart(!0,D.noMoveStart||!1)._animateZoom(w,S,!0)},this),!0)},_animateZoom:function(w,S,D,q){this._mapPane&&(D&&(this._animatingZoom=!0,this._animateToCenter=w,this._animateToZoom=S,ws(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:w,zoom:S,noUpdate:q}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(m(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&$c(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Mk(w,S){return new Co(w,S)}var Cc=ln.extend({options:{position:"topright"},initialize:function(w){j(this,w)},getPosition:function(){return this.options.position},setPosition:function(w){var S=this._map;return S&&S.removeControl(this),this.options.position=w,S&&S.addControl(this),this},getContainer:function(){return this._container},addTo:function(w){this.remove(),this._map=w;var S=this._container=this.onAdd(w),D=this.getPosition(),q=w._controlCorners[D];return ws(S,"leaflet-control"),D.indexOf("bottom")!==-1?q.insertBefore(S,q.firstChild):q.appendChild(S),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(mr(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(w){this._map&&w&&w.screenX>0&&w.screenY>0&&this._map.getContainer().focus()}}),$0=function(w){return new Cc(w)};Co.include({addControl:function(w){return w.addTo(this),this},removeControl:function(w){return w.remove(),this},_initControlPos:function(){var w=this._controlCorners={},S="leaflet-",D=this._controlContainer=Nr("div",S+"control-container",this._container);function q(st,vt){var $t=S+st+" "+S+vt;w[st+vt]=Nr("div",$t,D)}q("top","left"),q("top","right"),q("bottom","left"),q("bottom","right")},_clearControlPos:function(){for(var w in this._controlCorners)mr(this._controlCorners[w]);mr(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Mg=Cc.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(w,S,D,q){return D1,this._baseLayersList.style.display=w?"":"none"),this._separator.style.display=S&&w?"":"none",this},_onLayerChange:function(w){this._handlingClick||this._update();var S=this._getLayer(E(w.target)),D=S.overlay?w.type==="add"?"overlayadd":"overlayremove":w.type==="add"?"baselayerchange":null;D&&this._map.fire(D,S)},_createRadioElement:function(w,S){var D='",q=document.createElement("div");return q.innerHTML=D,q.firstChild},_addItem:function(w){var S=document.createElement("label"),D=this._map.hasLayer(w.layer),q;w.overlay?(q=document.createElement("input"),q.type="checkbox",q.className="leaflet-control-layers-selector",q.defaultChecked=D):q=this._createRadioElement("leaflet-base-layers_"+E(this),D),this._layerControlInputs.push(q),q.layerId=E(w.layer),As(q,"click",this._onInputClick,this);var st=document.createElement("span");st.innerHTML=" "+w.name;var vt=document.createElement("span");S.appendChild(vt),vt.appendChild(q),vt.appendChild(st);var $t=w.overlay?this._overlaysList:this._baseLayersList;return $t.appendChild(S),this._checkDisabledLayers(),S},_onInputClick:function(){if(!this._preventClick){var w=this._layerControlInputs,S,D,q=[],st=[];this._handlingClick=!0;for(var vt=w.length-1;vt>=0;vt--)S=w[vt],D=this._getLayer(S.layerId).layer,S.checked?q.push(D):S.checked||st.push(D);for(vt=0;vt=0;st--)S=w[st],D=this._getLayer(S.layerId).layer,S.disabled=D.options.minZoom!==void 0&&qD.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var w=this._section;this._preventClick=!0,As(w,"click",sl),this.expand();var S=this;setTimeout(function(){Vc(w,"click",sl),S._preventClick=!1})}}),CS=function(w,S,D){return new Mg(w,S,D)},fv=Cc.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(w){var S="leaflet-control-zoom",D=Nr("div",S+" leaflet-bar"),q=this.options;return this._zoomInButton=this._createButton(q.zoomInText,q.zoomInTitle,S+"-in",D,this._zoomIn),this._zoomOutButton=this._createButton(q.zoomOutText,q.zoomOutTitle,S+"-out",D,this._zoomOut),this._updateDisabled(),w.on("zoomend zoomlevelschange",this._updateDisabled,this),D},onRemove:function(w){w.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(w){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(w.shiftKey?3:1))},_createButton:function(w,S,D,q,st){var vt=Nr("a",D,q);return vt.innerHTML=w,vt.href="#",vt.title=S,vt.setAttribute("role","button"),vt.setAttribute("aria-label",S),hv(vt),As(vt,"click",rc),As(vt,"click",st,this),As(vt,"click",this._refocusOnMap,this),vt},_updateDisabled:function(){var w=this._map,S="leaflet-disabled";$c(this._zoomInButton,S),$c(this._zoomOutButton,S),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||w._zoom===w.getMinZoom())&&(ws(this._zoomOutButton,S),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||w._zoom===w.getMaxZoom())&&(ws(this._zoomInButton,S),this._zoomInButton.setAttribute("aria-disabled","true"))}});Co.mergeOptions({zoomControl:!0}),Co.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new fv,this.addControl(this.zoomControl))});var Xf=function(w){return new fv(w)},b3=Cc.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(w){var S="leaflet-control-scale",D=Nr("div",S),q=this.options;return this._addScales(q,S+"-line",D),w.on(q.updateWhenIdle?"moveend":"move",this._update,this),w.whenReady(this._update,this),D},onRemove:function(w){w.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(w,S,D){w.metric&&(this._mScale=Nr("div",S,D)),w.imperial&&(this._iScale=Nr("div",S,D))},_update:function(){var w=this._map,S=w.getSize().y/2,D=w.distance(w.containerPointToLatLng([0,S]),w.containerPointToLatLng([this.options.maxWidth,S]));this._updateScales(D)},_updateScales:function(w){this.options.metric&&w&&this._updateMetric(w),this.options.imperial&&w&&this._updateImperial(w)},_updateMetric:function(w){var S=this._getRoundNum(w),D=S<1e3?S+" m":S/1e3+" km";this._updateScale(this._mScale,D,S/w)},_updateImperial:function(w){var S=w*3.2808399,D,q,st;S>5280?(D=S/5280,q=this._getRoundNum(D),this._updateScale(this._iScale,q+" mi",q/D)):(st=this._getRoundNum(S),this._updateScale(this._iScale,st+" ft",st/S))},_updateScale:function(w,S,D){w.style.width=Math.round(this.options.maxWidth*D)+"px",w.innerHTML=S},_getRoundNum:function(w){var S=Math.pow(10,(Math.floor(w)+"").length-1),D=w/S;return D=D>=10?10:D>=5?5:D>=3?3:D>=2?2:1,S*D}}),AS=function(w){return new b3(w)},kS='',Iy=Cc.extend({options:{position:"bottomright",prefix:''+(Mr.inlineSvg?kS+" ":"")+"Leaflet"},initialize:function(w){j(this,w),this._attributions={}},onAdd:function(w){w.attributionControl=this,this._container=Nr("div","leaflet-control-attribution"),hv(this._container);for(var S in w._layers)w._layers[S].getAttribution&&this.addAttribution(w._layers[S].getAttribution());return this._update(),w.on("layeradd",this._addAttribution,this),this._container},onRemove:function(w){w.off("layeradd",this._addAttribution,this)},_addAttribution:function(w){w.layer.getAttribution&&(this.addAttribution(w.layer.getAttribution()),w.layer.once("remove",function(){this.removeAttribution(w.layer.getAttribution())},this))},setPrefix:function(w){return this.options.prefix=w,this._update(),this},addAttribution:function(w){return w?(this._attributions[w]||(this._attributions[w]=0),this._attributions[w]++,this._update(),this):this},removeAttribution:function(w){return w?(this._attributions[w]&&(this._attributions[w]--,this._update()),this):this},_update:function(){if(this._map){var w=[];for(var S in this._attributions)this._attributions[S]&&w.push(S);var D=[];this.options.prefix&&D.push(this.options.prefix),w.length&&D.push(w.join(", ")),this._container.innerHTML=D.join(' ')}}});Co.mergeOptions({attributionControl:!0}),Co.addInitHook(function(){this.options.attributionControl&&new Iy().addTo(this)});var LS=function(w){return new Iy(w)};Cc.Layers=Mg,Cc.Zoom=fv,Cc.Scale=b3,Cc.Attribution=Iy,$0.layers=CS,$0.zoom=Xf,$0.scale=AS,$0.attribution=LS;var Od=ln.extend({initialize:function(w){this._map=w},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Od.addTo=function(w,S){return w.addHandler(S,this),this};var df={Events:ne},PS=Mr.touch?"touchstart mousedown":"mousedown",su=xe.extend({options:{clickTolerance:3},initialize:function(w,S,D,q){j(this,q),this._element=w,this._dragStartTarget=S||w,this._preventOutline=D},enable:function(){this._enabled||(As(this._dragStartTarget,PS,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(su._dragging===this&&this.finishDrag(!0),Vc(this._dragStartTarget,PS,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(w){if(this._enabled&&(this._moved=!1,!_g(this._element,"leaflet-zoom-anim"))){if(w.touches&&w.touches.length!==1){su._dragging===this&&this.finishDrag();return}if(!(su._dragging||w.shiftKey||w.which!==1&&w.button!==1&&!w.touches)&&(su._dragging=this,this._preventOutline&&Py(this._element),ky(),H0(),!this._moving)){this.fire("down");var S=w.touches?w.touches[0]:w,D=xS(this._element);this._startPoint=new re(S.clientX,S.clientY),this._startPos=yg(this._element),this._parentScale=f3(D);var q=w.type==="mousedown";As(document,q?"mousemove":"touchmove",this._onMove,this),As(document,q?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(w){if(this._enabled){if(w.touches&&w.touches.length>1){this._moved=!0;return}var S=w.touches&&w.touches.length===1?w.touches[0]:w,D=new re(S.clientX,S.clientY)._subtract(this._startPoint);!D.x&&!D.y||Math.abs(D.x)+Math.abs(D.y)vt&&($t=_e,vt=Ye);vt>D&&(S[$t]=1,_3(w,S,D,q,$t),_3(w,S,D,$t,st))}function y3(w,S){for(var D=[w[0]],q=1,st=0,vt=w.length;qS&&(D.push(w[q]),st=q);return stS.max.x&&(D|=2),w.yS.max.y&&(D|=8),D}function Oy(w,S){var D=S.x-w.x,q=S.y-w.y;return D*D+q*q}function vp(w,S,D,q){var st=S.x,vt=S.y,$t=D.x-st,_e=D.y-vt,Ye=$t*$t+_e*_e,Un;return Ye>0&&(Un=((w.x-st)*$t+(w.y-vt)*_e)/Ye,Un>1?(st=D.x,vt=D.y):Un>0&&(st+=$t*Un,vt+=_e*Un)),$t=w.x-st,_e=w.y-vt,q?$t*$t+_e*_e:new re(st,vt)}function Zf(w){return!X(w[0])||typeof w[0][0]!="object"&&typeof w[0][0]<"u"}function x3(w){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Zf(w)}function M3(w,S){var D,q,st,vt,$t,_e,Ye,Un;if(!w||w.length===0)throw new Error("latlngs not passed");Zf(w)||(console.warn("latlngs are not flat! Only the first ring will be used"),w=w[0]);var Ji=Pe([0,0]),Qr=Qn(w),Is=Qr.getNorthWest().distanceTo(Qr.getSouthWest())*Qr.getNorthEast().distanceTo(Qr.getNorthWest());Is<1700&&(Ji=wp(w));var ol=w.length,xa=[];for(D=0;Dq){Ye=(vt-q)/st,Un=[_e.x-Ye*(_e.x-$t.x),_e.y-Ye*(_e.y-$t.y)];break}var zu=S.unproject(Se(Un));return Pe([zu.lat+Ji.lat,zu.lng+Ji.lng])}var E3={__proto__:null,simplify:Dy,pointToSegmentDistance:ea,closestPointOnSegment:Eg,clipSegment:DS,_getEdgeIntersection:Ny,_getBitCode:Sg,_sqClosestPointOnSegment:vp,isFlat:Zf,_flat:x3,polylineCenter:M3},dv={project:function(w){return new re(w.lng,w.lat)},unproject:function(w){return new ge(w.y,w.x)},bounds:new ke([-180,-90],[180,90])},By={R:6378137,R_MINOR:6356752314245179e-9,bounds:new ke([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(w){var S=Math.PI/180,D=this.R,q=w.lat*S,st=this.R_MINOR/D,vt=Math.sqrt(1-st*st),$t=vt*Math.sin(q),_e=Math.tan(Math.PI/4-q/2)/Math.pow((1-$t)/(1+$t),vt/2);return q=-D*Math.log(Math.max(_e,1e-10)),new re(w.lng*S*D,q)},unproject:function(w){for(var S=180/Math.PI,D=this.R,q=this.R_MINOR/D,st=Math.sqrt(1-q*q),vt=Math.exp(-w.y/D),$t=Math.PI/2-2*Math.atan(vt),_e=0,Ye=.1,Un;_e<15&&Math.abs(Ye)>1e-7;_e++)Un=st*Math.sin($t),Un=Math.pow((1-Un)/(1+Un),st/2),Ye=Math.PI/2-2*Math.atan(vt*Un)-$t,$t+=Ye;return new ge($t*S,w.x*S/D)}},Ek={__proto__:null,LonLat:dv,Mercator:By,SphericalMercator:lr},S3=h({},Yi,{code:"EPSG:3395",projection:By,transformation:function(){var w=.5/(Math.PI*By.R);return Kt(w,.5,-w,.5)}()}),Fy=h({},Yi,{code:"EPSG:4326",projection:dv,transformation:Kt(1/180,1,-1/180,.5)}),Sk=h({},ti,{projection:dv,transformation:Kt(1,0,-1,0),scale:function(w){return Math.pow(2,w)},zoom:function(w){return Math.log(w)/Math.LN2},distance:function(w,S){var D=S.lng-w.lng,q=S.lat-w.lat;return Math.sqrt(D*D+q*q)},infinite:!0});ti.Earth=Yi,ti.EPSG3395=S3,ti.EPSG3857=wn,ti.EPSG900913=it,ti.EPSG4326=Fy,ti.Simple=Sk;var Yf=xe.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(w){return w.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(w){return w&&w.removeLayer(this),this},getPane:function(w){return this._map.getPane(w?this.options[w]||w:this.options.pane)},addInteractiveTarget:function(w){return this._map._targets[E(w)]=this,this},removeInteractiveTarget:function(w){return delete this._map._targets[E(w)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(w){var S=w.target;if(S.hasLayer(this)){if(this._map=S,this._zoomAnimated=S._zoomAnimated,this.getEvents){var D=this.getEvents();S.on(D,this),this.once("remove",function(){S.off(D,this)},this)}this.onAdd(S),this.fire("add"),S.fire("layeradd",{layer:this})}}});Co.include({addLayer:function(w){if(!w._layerAdd)throw new Error("The provided object is not a Layer.");var S=E(w);return this._layers[S]?this:(this._layers[S]=w,w._mapToAdd=this,w.beforeAdd&&w.beforeAdd(this),this.whenReady(w._layerAdd,w),this)},removeLayer:function(w){var S=E(w);return this._layers[S]?(this._loaded&&w.onRemove(this),delete this._layers[S],this._loaded&&(this.fire("layerremove",{layer:w}),w.fire("remove")),w._map=w._mapToAdd=null,this):this},hasLayer:function(w){return E(w)in this._layers},eachLayer:function(w,S){for(var D in this._layers)w.call(S,this._layers[D]);return this},_addLayers:function(w){w=w?X(w)?w:[w]:[];for(var S=0,D=w.length;Sthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&S[0]instanceof ge&&S[0].equals(S[D-1])&&S.pop(),S},_setLatLngs:function(w){Fl.prototype._setLatLngs.call(this,w),Zf(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Zf(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var w=this._renderer._bounds,S=this.options.weight,D=new re(S,S);if(w=new ke(w.min.subtract(D),w.max.add(D)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(w))){if(this.options.noClip){this._parts=this._rings;return}for(var q=0,st=this._rings.length,vt;qw.y!=st.y>w.y&&w.x<(st.x-q.x)*(w.y-q.y)/(st.y-q.y)+q.x&&(S=!S);return S||Fl.prototype._containsPoint.call(this,w,!0)}});function kk(w,S){return new _b(w,S)}var l1=pf.extend({initialize:function(w,S){j(this,S),this._layers={},w&&this.addData(w)},addData:function(w){var S=X(w)?w:w.features,D,q,st;if(S){for(D=0,q=S.length;D0&&st.push(st[0].slice()),st}function yb(w,S){return w.feature?h({},w.feature,{geometry:S}):$y(S)}function $y(w){return w.type==="Feature"||w.type==="FeatureCollection"?w:{type:"Feature",properties:{},geometry:w}}var Bd={toGeoJSON:function(w){return yb(this,{type:"Point",coordinates:C3(this.getLatLng(),w)})}};Uy.include(Bd),gv.include(Bd),zy.include(Bd),Fl.include({toGeoJSON:function(w){var S=!Zf(this._latlngs),D=Wy(this._latlngs,S?1:0,!1,w);return yb(this,{type:(S?"Multi":"")+"LineString",coordinates:D})}}),_b.include({toGeoJSON:function(w){var S=!Zf(this._latlngs),D=S&&!Zf(this._latlngs[0]),q=Wy(this._latlngs,D?2:S?1:0,!0,w);return S||(q=[q]),yb(this,{type:(D?"Multi":"")+"Polygon",coordinates:q})}}),Uu.include({toMultiPoint:function(w){var S=[];return this.eachLayer(function(D){S.push(D.toGeoJSON(w).geometry.coordinates)}),yb(this,{type:"MultiPoint",coordinates:S})},toGeoJSON:function(w){var S=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(S==="MultiPoint")return this.toMultiPoint(w);var D=S==="GeometryCollection",q=[];return this.eachLayer(function(st){if(st.toGeoJSON){var vt=st.toGeoJSON(w);if(D)q.push(vt.geometry);else{var $t=$y(vt);$t.type==="FeatureCollection"?q.push.apply(q,$t.features):q.push($t)}}}),D?yb(this,{geometries:q,type:"GeometryCollection"}):{type:"FeatureCollection",features:q}}});function oe(w,S){return new l1(w,S)}var _n=oe,$e=Yf.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(w,S,D){this._url=w,this._bounds=Qn(S),j(this,D)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ws(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){mr(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(w){return this.options.opacity=w,this._image&&this._updateOpacity(),this},setStyle:function(w){return w.opacity&&this.setOpacity(w.opacity),this},bringToFront:function(){return this._map&&dc(this._image),this},bringToBack:function(){return this._map&&vh(this._image),this},setUrl:function(w){return this._url=w,this._image&&(this._image.src=w),this},setBounds:function(w){return this._bounds=Qn(w),this._map&&this._reset(),this},getEvents:function(){var w={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(w.zoomanim=this._animateZoom),w},setZIndex:function(w){return this.options.zIndex=w,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var w=this._url.tagName==="IMG",S=this._image=w?this._url:Nr("img");if(ws(S,"leaflet-image-layer"),this._zoomAnimated&&ws(S,"leaflet-zoom-animated"),this.options.className&&ws(S,this.options.className),S.onselectstart=N,S.onmousemove=N,S.onload=m(this.fire,this,"load"),S.onerror=m(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(S.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),w){this._url=S.src;return}S.src=this._url,S.alt=this.options.alt},_animateZoom:function(w){var S=this._map.getZoomScale(w.zoom),D=this._map._latLngBoundsToNewLayerBounds(this._bounds,w.zoom,w.center).min;Nd(this._image,D,S)},_reset:function(){var w=this._image,S=new ke(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),D=S.getSize();ya(w,S.min),w.style.width=D.x+"px",w.style.height=D.y+"px"},_updateOpacity:function(){Bl(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var w=this.options.errorOverlayUrl;w&&this._url!==w&&(this._url=w,this._image.src=w)},getCenter:function(){return this._bounds.getCenter()}}),er=function(w,S,D){return new $e(w,S,D)},vs=$e.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var w=this._url.tagName==="VIDEO",S=this._image=w?this._url:Nr("video");if(ws(S,"leaflet-image-layer"),this._zoomAnimated&&ws(S,"leaflet-zoom-animated"),this.options.className&&ws(S,this.options.className),S.onselectstart=N,S.onmousemove=N,S.onloadeddata=m(this.fire,this,"load"),w){for(var D=S.getElementsByTagName("source"),q=[],st=0;st0?q:[S.src];return}X(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(S.style,"objectFit")&&(S.style.objectFit="fill"),S.autoplay=!!this.options.autoplay,S.loop=!!this.options.loop,S.muted=!!this.options.muted,S.playsInline=!!this.options.playsInline;for(var vt=0;vtst?(S.height=st+"px",ws(w,vt)):$c(w,vt),this._containerWidth=this._container.offsetWidth},_animateZoom:function(w){var S=this._map._latLngToNewLayerPoint(this._latlng,w.zoom,w.center),D=this._getAnchor();ya(this._container,S.add(D))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var w=this._map,S=parseInt(wh(this._container,"marginBottom"),10)||0,D=this._container.offsetHeight+S,q=this._containerWidth,st=new re(this._containerLeft,-D-this._containerBottom);st._add(yg(this._container));var vt=w.layerPointToContainerPoint(st),$t=Se(this.options.autoPanPadding),_e=Se(this.options.autoPanPaddingTopLeft||$t),Ye=Se(this.options.autoPanPaddingBottomRight||$t),Un=w.getSize(),Ji=0,Qr=0;vt.x+q+Ye.x>Un.x&&(Ji=vt.x+q-Un.x+Ye.x),vt.x-Ji-_e.x<0&&(Ji=vt.x-_e.x),vt.y+D+Ye.y>Un.y&&(Qr=vt.y+D-Un.y+Ye.y),vt.y-Qr-_e.y<0&&(Qr=vt.y-_e.y),(Ji||Qr)&&(this.options.keepInView&&(this._autopanning=!0),w.fire("autopanstart").panBy([Ji,Qr]))}},_getAnchor:function(){return Se(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Jf=function(w,S){return new Vy(w,S)};Co.mergeOptions({closePopupOnClick:!0}),Co.include({openPopup:function(w,S,D){return this._initOverlay(Vy,w,S,D).openOn(this),this},closePopup:function(w){return w=arguments.length?w:this._popup,w&&w.close(),this}}),Yf.include({bindPopup:function(w,S){return this._popup=this._initOverlay(Vy,this._popup,w,S),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(w){return this._popup&&(this instanceof pf||(this._popup._source=this),this._popup._prepareOpen(w||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(w){return this._popup&&this._popup.setContent(w),this},getPopup:function(){return this._popup},_openPopup:function(w){if(!(!this._popup||!this._map)){rc(w);var S=w.layer||w.target;if(this._popup._source===S&&!(S instanceof gf)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(w.latlng);return}this._popup._source=S,this.openPopup(w.latlng)}},_movePopup:function(w){this._popup.setLatLng(w.latlng)},_onKeyPress:function(w){w.originalEvent.keyCode===13&&this._openPopup(w)}});var q0=mf.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(w){mf.prototype.onAdd.call(this,w),this.setOpacity(this.options.opacity),w.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(w){mf.prototype.onRemove.call(this,w),w.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var w=mf.prototype.getEvents.call(this);return this.options.permanent||(w.preclick=this.close),w},_initLayout:function(){var w="leaflet-tooltip",S=w+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Nr("div",S),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+E(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(w){var S,D,q=this._map,st=this._container,vt=q.latLngToContainerPoint(q.getCenter()),$t=q.layerPointToContainerPoint(w),_e=this.options.direction,Ye=st.offsetWidth,Un=st.offsetHeight,Ji=Se(this.options.offset),Qr=this._getAnchor();_e==="top"?(S=Ye/2,D=Un):_e==="bottom"?(S=Ye/2,D=0):_e==="center"?(S=Ye/2,D=Un/2):_e==="right"?(S=0,D=Un/2):_e==="left"?(S=Ye,D=Un/2):$t.xthis.options.maxZoom||Dq?this._retainParent(st,vt,$t,q):!1)},_retainChildren:function(w,S,D,q){for(var st=2*w;st<2*w+2;st++)for(var vt=2*S;vt<2*S+2;vt++){var $t=new re(st,vt);$t.z=D+1;var _e=this._tileCoordsToKey($t),Ye=this._tiles[_e];if(Ye&&Ye.active){Ye.retain=!0;continue}else Ye&&Ye.loaded&&(Ye.retain=!0);D+1this.options.maxZoom||this.options.minZoom!==void 0&&st1){this._setView(w,D);return}for(var Qr=st.min.y;Qr<=st.max.y;Qr++)for(var Is=st.min.x;Is<=st.max.x;Is++){var ol=new re(Is,Qr);if(ol.z=this._tileZoom,!!this._isValidTile(ol)){var xa=this._tiles[this._tileCoordsToKey(ol)];xa?xa.current=!0:$t.push(ol)}}if($t.sort(function(zu,d1){return zu.distanceTo(vt)-d1.distanceTo(vt)}),$t.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Ul=document.createDocumentFragment();for(Is=0;Is<$t.length;Is++)this._addTile($t[Is],Ul);this._level.el.appendChild(Ul)}}}},_isValidTile:function(w){var S=this._map.options.crs;if(!S.infinite){var D=this._globalTileRange;if(!S.wrapLng&&(w.xD.max.x)||!S.wrapLat&&(w.yD.max.y))return!1}if(!this.options.bounds)return!0;var q=this._tileCoordsToBounds(w);return Qn(this.options.bounds).overlaps(q)},_keyToBounds:function(w){return this._tileCoordsToBounds(this._keyToTileCoords(w))},_tileCoordsToNwSe:function(w){var S=this._map,D=this.getTileSize(),q=w.scaleBy(D),st=q.add(D),vt=S.unproject(q,w.z),$t=S.unproject(st,w.z);return[vt,$t]},_tileCoordsToBounds:function(w){var S=this._tileCoordsToNwSe(w),D=new en(S[0],S[1]);return this.options.noWrap||(D=this._map.wrapLatLngBounds(D)),D},_tileCoordsToKey:function(w){return w.x+":"+w.y+":"+w.z},_keyToTileCoords:function(w){var S=w.split(":"),D=new re(+S[0],+S[1]);return D.z=+S[2],D},_removeTile:function(w){var S=this._tiles[w];S&&(mr(S.el),delete this._tiles[w],this.fire("tileunload",{tile:S.el,coords:this._keyToTileCoords(w)}))},_initTile:function(w){ws(w,"leaflet-tile");var S=this.getTileSize();w.style.width=S.x+"px",w.style.height=S.y+"px",w.onselectstart=N,w.onmousemove=N,Mr.ielt9&&this.options.opacity<1&&Bl(w,this.options.opacity)},_addTile:function(w,S){var D=this._getTilePos(w),q=this._tileCoordsToKey(w),st=this.createTile(this._wrapCoords(w),m(this._tileReady,this,w));this._initTile(st),this.createTile.length<2&&ot(m(this._tileReady,this,w,null,st)),ya(st,D),this._tiles[q]={el:st,coords:w,current:!0},S.appendChild(st),this.fire("tileloadstart",{tile:st,coords:w})},_tileReady:function(w,S,D){S&&this.fire("tileerror",{error:S,tile:D,coords:w});var q=this._tileCoordsToKey(w);D=this._tiles[q],D&&(D.loaded=+new Date,this._map._fadeAnimated?(Bl(D.el,0),Lt(this._fadeFrame),this._fadeFrame=ot(this._updateOpacity,this)):(D.active=!0,this._pruneTiles()),S||(ws(D.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:D.el,coords:w})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Mr.ielt9||!this._map._fadeAnimated?ot(this._pruneTiles,this):setTimeout(m(this._pruneTiles,this),250)))},_getTilePos:function(w){return w.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(w){var S=new re(this._wrapX?I(w.x,this._wrapX):w.x,this._wrapY?I(w.y,this._wrapY):w.y);return S.z=w.z,S},_pxBoundsToTileRange:function(w){var S=this.getTileSize();return new ke(w.min.unscaleBy(S).floor(),w.max.unscaleBy(S).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var w in this._tiles)if(!this._tiles[w].loaded)return!1;return!0}});function pc(w){return new Tg(w)}var xb=Tg.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(w,S){this._url=w,S=j(this,S),S.detectRetina&&Mr.retina&&S.maxZoom>0?(S.tileSize=Math.floor(S.tileSize/2),S.zoomReverse?(S.zoomOffset--,S.minZoom=Math.min(S.maxZoom,S.minZoom+1)):(S.zoomOffset++,S.maxZoom=Math.max(S.minZoom,S.maxZoom-1)),S.minZoom=Math.max(0,S.minZoom)):S.zoomReverse?S.minZoom=Math.min(S.maxZoom,S.minZoom):S.maxZoom=Math.max(S.minZoom,S.maxZoom),typeof S.subdomains=="string"&&(S.subdomains=S.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(w,S){return this._url===w&&S===void 0&&(S=!0),this._url=w,S||this.redraw(),this},createTile:function(w,S){var D=document.createElement("img");return As(D,"load",m(this._tileOnLoad,this,S,D)),As(D,"error",m(this._tileOnError,this,S,D)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(D.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(D.referrerPolicy=this.options.referrerPolicy),D.alt="",D.src=this.getTileUrl(w),D},getTileUrl:function(w){var S={r:Mr.retina?"@2x":"",s:this._getSubdomain(w),x:w.x,y:w.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var D=this._globalTileRange.max.y-w.y;this.options.tms&&(S.y=D),S["-y"]=D}return Q(this._url,h(S,this.options))},_tileOnLoad:function(w,S){Mr.ielt9?setTimeout(m(w,this,null,S),0):w(null,S)},_tileOnError:function(w,S,D){var q=this.options.errorTileUrl;q&&S.getAttribute("src")!==q&&(S.src=q),w(D,S)},_onTileRemove:function(w){w.tile.onload=null},_getZoomForUrl:function(){var w=this._tileZoom,S=this.options.maxZoom,D=this.options.zoomReverse,q=this.options.zoomOffset;return D&&(w=S-w),w+q},_getSubdomain:function(w){var S=Math.abs(w.x+w.y)%this.options.subdomains.length;return this.options.subdomains[S]},_abortLoading:function(){var w,S;for(w in this._tiles)if(this._tiles[w].coords.z!==this._tileZoom&&(S=this._tiles[w].el,S.onload=N,S.onerror=N,!S.complete)){S.src=ft;var D=this._tiles[w].coords;mr(S),delete this._tiles[w],this.fire("tileabort",{tile:S,coords:D})}},_removeTile:function(w){var S=this._tiles[w];if(S)return S.el.setAttribute("src",ft),Tg.prototype._removeTile.call(this,w)},_tileReady:function(w,S,D){if(!(!this._map||D&&D.getAttribute("src")===ft))return Tg.prototype._tileReady.call(this,w,S,D)}});function A3(w,S){return new xb(w,S)}var mv=xb.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(w,S){this._url=w;var D=h({},this.defaultWmsParams);for(var q in S)q in this.options||(D[q]=S[q]);S=j(this,S);var st=S.detectRetina&&Mr.retina?2:1,vt=this.getTileSize();D.width=vt.x*st,D.height=vt.y*st,this.wmsParams=D},onAdd:function(w){this._crs=this.options.crs||w.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var S=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[S]=this._crs.code,xb.prototype.onAdd.call(this,w)},getTileUrl:function(w){var S=this._tileCoordsToNwSe(w),D=this._crs,q=mn(D.project(S[0]),D.project(S[1])),st=q.min,vt=q.max,$t=(this._wmsVersion>=1.3&&this._crs===Fy?[st.y,st.x,vt.y,vt.x]:[st.x,st.y,vt.x,vt.y]).join(","),_e=xb.prototype.getTileUrl.call(this,w);return _e+V(this.wmsParams,_e,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+$t},setParams:function(w,S){return h(this.wmsParams,w),S||this.redraw(),this}});function Pk(w,S){return new mv(w,S)}xb.WMS=mv,A3.wms=Pk;var f1=Yf.extend({options:{padding:.1},initialize:function(w){j(this,w),E(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),ws(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var w={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(w.zoomanim=this._onAnimZoom),w},_onAnimZoom:function(w){this._updateTransform(w.center,w.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(w,S){var D=this._map.getZoomScale(S,this._zoom),q=this._map.getSize().multiplyBy(.5+this.options.padding),st=this._map.project(this._center,S),vt=q.multiplyBy(-D).add(st).subtract(this._map._getNewPixelOrigin(w,S));Mr.any3d?Nd(this._container,vt,D):ya(this._container,vt)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var w in this._layers)this._layers[w]._reset()},_onZoomEnd:function(){for(var w in this._layers)this._layers[w]._project()},_updatePaths:function(){for(var w in this._layers)this._layers[w]._update()},_update:function(){var w=this.options.padding,S=this._map.getSize(),D=this._map.containerPointToLayerPoint(S.multiplyBy(-w)).round();this._bounds=new ke(D,D.add(S.multiplyBy(1+w*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),FS=f1.extend({options:{tolerance:0},getEvents:function(){var w=f1.prototype.getEvents.call(this);return w.viewprereset=this._onViewPreReset,w},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){f1.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var w=this._container=document.createElement("canvas");As(w,"mousemove",this._onMouseMove,this),As(w,"click dblclick mousedown mouseup contextmenu",this._onClick,this),As(w,"mouseout",this._handleMouseOut,this),w._leaflet_disable_events=!0,this._ctx=w.getContext("2d")},_destroyContainer:function(){Lt(this._redrawRequest),delete this._ctx,mr(this._container),Vc(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var w;this._redrawBounds=null;for(var S in this._layers)w=this._layers[S],w._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){f1.prototype._update.call(this);var w=this._bounds,S=this._container,D=w.getSize(),q=Mr.retina?2:1;ya(S,w.min),S.width=q*D.x,S.height=q*D.y,S.style.width=D.x+"px",S.style.height=D.y+"px",Mr.retina&&this._ctx.scale(2,2),this._ctx.translate(-w.min.x,-w.min.y),this.fire("update")}},_reset:function(){f1.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(w){this._updateDashArray(w),this._layers[E(w)]=w;var S=w._order={layer:w,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=S),this._drawLast=S,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(w){this._requestRedraw(w)},_removePath:function(w){var S=w._order,D=S.next,q=S.prev;D?D.prev=q:this._drawLast=q,q?q.next=D:this._drawFirst=D,delete w._order,delete this._layers[E(w)],this._requestRedraw(w)},_updatePath:function(w){this._extendRedrawBounds(w),w._project(),w._update(),this._requestRedraw(w)},_updateStyle:function(w){this._updateDashArray(w),this._requestRedraw(w)},_updateDashArray:function(w){if(typeof w.options.dashArray=="string"){var S=w.options.dashArray.split(/[, ]+/),D=[],q,st;for(st=0;st')}}catch{}return function(w){return document.createElement("<"+w+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Xy={_initContainer:function(){this._container=Nr("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(f1.prototype._update.call(this),this.fire("update"))},_initPath:function(w){var S=w._container=Qf("shape");ws(S,"leaflet-vml-shape "+(this.options.className||"")),S.coordsize="1 1",w._path=Qf("path"),S.appendChild(w._path),this._updateStyle(w),this._layers[E(w)]=w},_addPath:function(w){var S=w._container;this._container.appendChild(S),w.options.interactive&&w.addInteractiveTarget(S)},_removePath:function(w){var S=w._container;mr(S),w.removeInteractiveTarget(S),delete this._layers[E(w)]},_updateStyle:function(w){var S=w._stroke,D=w._fill,q=w.options,st=w._container;st.stroked=!!q.stroke,st.filled=!!q.fill,q.stroke?(S||(S=w._stroke=Qf("stroke")),st.appendChild(S),S.weight=q.weight+"px",S.color=q.color,S.opacity=q.opacity,q.dashArray?S.dashStyle=X(q.dashArray)?q.dashArray.join(" "):q.dashArray.replace(/( *, *)/g," "):S.dashStyle="",S.endcap=q.lineCap.replace("butt","flat"),S.joinstyle=q.lineJoin):S&&(st.removeChild(S),w._stroke=null),q.fill?(D||(D=w._fill=Qf("fill")),st.appendChild(D),D.color=q.fillColor||q.color,D.opacity=q.fillOpacity):D&&(st.removeChild(D),w._fill=null)},_updateCircle:function(w){var S=w._point.round(),D=Math.round(w._radius),q=Math.round(w._radiusY||D);this._setPath(w,w._empty()?"M0 0":"AL "+S.x+","+S.y+" "+D+","+q+" 0,"+65535*360)},_setPath:function(w,S){w._path.v=S},_bringToFront:function(w){dc(w._container)},_bringToBack:function(w){vh(w._container)}},wv=Mr.vml?Qf:ut,Cg=f1.extend({_initContainer:function(){this._container=wv("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=wv("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){mr(this._container),Vc(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){f1.prototype._update.call(this);var w=this._bounds,S=w.getSize(),D=this._container;(!this._svgSize||!this._svgSize.equals(S))&&(this._svgSize=S,D.setAttribute("width",S.x),D.setAttribute("height",S.y)),ya(D,w.min),D.setAttribute("viewBox",[w.min.x,w.min.y,S.x,S.y].join(" ")),this.fire("update")}},_initPath:function(w){var S=w._path=wv("path");w.options.className&&ws(S,w.options.className),w.options.interactive&&ws(S,"leaflet-interactive"),this._updateStyle(w),this._layers[E(w)]=w},_addPath:function(w){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(w._path),w.addInteractiveTarget(w._path)},_removePath:function(w){mr(w._path),w.removeInteractiveTarget(w._path),delete this._layers[E(w)]},_updatePath:function(w){w._project(),w._update()},_updateStyle:function(w){var S=w._path,D=w.options;S&&(D.stroke?(S.setAttribute("stroke",D.color),S.setAttribute("stroke-opacity",D.opacity),S.setAttribute("stroke-width",D.weight),S.setAttribute("stroke-linecap",D.lineCap),S.setAttribute("stroke-linejoin",D.lineJoin),D.dashArray?S.setAttribute("stroke-dasharray",D.dashArray):S.removeAttribute("stroke-dasharray"),D.dashOffset?S.setAttribute("stroke-dashoffset",D.dashOffset):S.removeAttribute("stroke-dashoffset")):S.setAttribute("stroke","none"),D.fill?(S.setAttribute("fill",D.fillColor||D.color),S.setAttribute("fill-opacity",D.fillOpacity),S.setAttribute("fill-rule",D.fillRule||"evenodd")):S.setAttribute("fill","none"))},_updatePoly:function(w,S){this._setPath(w,kt(w._parts,S))},_updateCircle:function(w){var S=w._point,D=Math.max(Math.round(w._radius),1),q=Math.max(Math.round(w._radiusY),1)||D,st="a"+D+","+q+" 0 1,0 ",vt=w._empty()?"M0 0":"M"+(S.x-D)+","+S.y+st+D*2+",0 "+st+-D*2+",0 ";this._setPath(w,vt)},_setPath:function(w,S){w._path.setAttribute("d",S)},_bringToFront:function(w){dc(w._path)},_bringToBack:function(w){vh(w._path)}});Mr.vml&&Cg.include(Xy);function k3(w){return Mr.svg||Mr.vml?new Cg(w):null}Co.include({getRenderer:function(w){var S=w.options.renderer||this._getPaneRenderer(w.options.pane)||this.options.renderer||this._renderer;return S||(S=this._renderer=this._createRenderer()),this.hasLayer(S)||this.addLayer(S),S},_getPaneRenderer:function(w){if(w==="overlayPane"||w===void 0)return!1;var S=this._paneRenderers[w];return S===void 0&&(S=this._createRenderer({pane:w}),this._paneRenderers[w]=S),S},_createRenderer:function(w){return this.options.preferCanvas&&bv(w)||k3(w)}});var L3=_b.extend({initialize:function(w,S){_b.prototype.initialize.call(this,this._boundsToLatLngs(w),S)},setBounds:function(w){return this.setLatLngs(this._boundsToLatLngs(w))},_boundsToLatLngs:function(w){return w=Qn(w),[w.getSouthWest(),w.getNorthWest(),w.getNorthEast(),w.getSouthEast()]}});function Zy(w,S){return new L3(w,S)}Cg.create=wv,Cg.pointsToPath=kt,l1.geometryToLayer=h1,l1.coordsToLatLng=Hy,l1.coordsToLatLngs=Gy,l1.latLngToCoords=C3,l1.latLngsToCoords=Wy,l1.getFeature=yb,l1.asFeature=$y,Co.mergeOptions({boxZoom:!0});var P3=Od.extend({initialize:function(w){this._map=w,this._container=w._container,this._pane=w._panes.overlayPane,this._resetStateTimeout=0,w.on("unload",this._destroy,this)},addHooks:function(){As(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Vc(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){mr(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(w){if(!w.shiftKey||w.which!==1&&w.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),H0(),ky(),this._startPoint=this._map.mouseEventToContainerPoint(w),As(document,{contextmenu:rc,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(w){this._moved||(this._moved=!0,this._box=Nr("div","leaflet-zoom-box",this._container),ws(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(w);var S=new ke(this._point,this._startPoint),D=S.getSize();ya(this._box,S.min),this._box.style.width=D.x+"px",this._box.style.height=D.y+"px"},_finish:function(){this._moved&&(mr(this._box),$c(this._container,"leaflet-crosshair")),G0(),h3(),Vc(document,{contextmenu:rc,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(w){if(!(w.which!==1&&w.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(m(this._resetState,this),0);var S=new en(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(S).fire("boxzoomend",{boxZoomBounds:S})}},_onKeyDown:function(w){w.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Co.addInitHook("addHandler","boxZoom",P3),Co.mergeOptions({doubleClickZoom:!0});var Mb=Od.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(w){var S=this._map,D=S.getZoom(),q=S.options.zoomDelta,st=w.originalEvent.shiftKey?D-q:D+q;S.options.doubleClickZoom==="center"?S.setZoom(st):S.setZoomAround(w.containerPoint,st)}});Co.addInitHook("addHandler","doubleClickZoom",Mb),Co.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Ag=Od.extend({addHooks:function(){if(!this._draggable){var w=this._map;this._draggable=new su(w._mapPane,w._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),w.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),w.on("zoomend",this._onZoomEnd,this),w.whenReady(this._onZoomEnd,this))}ws(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){$c(this._map._container,"leaflet-grab"),$c(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var w=this._map;if(w._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var S=Qn(this._map.options.maxBounds);this._offsetLimit=mn(this._map.latLngToContainerPoint(S.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(S.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;w.fire("movestart").fire("dragstart"),w.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(w){if(this._map.options.inertia){var S=this._lastTime=+new Date,D=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(D),this._times.push(S),this._prunePositions(S)}this._map.fire("move",w).fire("drag",w)},_prunePositions:function(w){for(;this._positions.length>1&&w-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var w=this._map.getSize().divideBy(2),S=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=S.subtract(w).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(w,S){return w-(w-S)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var w=this._draggable._newPos.subtract(this._draggable._startPos),S=this._offsetLimit;w.xS.max.x&&(w.x=this._viscousLimit(w.x,S.max.x)),w.y>S.max.y&&(w.y=this._viscousLimit(w.y,S.max.y)),this._draggable._newPos=this._draggable._startPos.add(w)}},_onPreDragWrap:function(){var w=this._worldWidth,S=Math.round(w/2),D=this._initialWorldOffset,q=this._draggable._newPos.x,st=(q-S+D)%w+S-D,vt=(q+S+D)%w-S-D,$t=Math.abs(st+D)0?vt:-vt))-S;this._delta=0,this._startTime=null,$t&&(w.options.scrollWheelZoom==="center"?w.setZoom(S+$t):w.setZoomAround(this._lastMousePos,S+$t))}});Co.addInitHook("addHandler","scrollWheelZoom",US);var Ik=600;Co.mergeOptions({tapHold:Mr.touchNative&&Mr.safari&&Mr.mobile,tapTolerance:15});var zS=Od.extend({addHooks:function(){As(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Vc(this._map._container,"touchstart",this._onDown,this)},_onDown:function(w){if(clearTimeout(this._holdTimeout),w.touches.length===1){var S=w.touches[0];this._startPos=this._newPos=new re(S.clientX,S.clientY),this._holdTimeout=setTimeout(m(function(){this._cancel(),this._isTapValid()&&(As(document,"touchend",sl),As(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",S))},this),Ik),As(document,"touchend touchcancel contextmenu",this._cancel,this),As(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function w(){Vc(document,"touchend",sl),Vc(document,"touchend touchcancel",w)},_cancel:function(){clearTimeout(this._holdTimeout),Vc(document,"touchend touchcancel contextmenu",this._cancel,this),Vc(document,"touchmove",this._onMove,this)},_onMove:function(w){var S=w.touches[0];this._newPos=new re(S.clientX,S.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(w,S){var D=new MouseEvent(w,{bubbles:!0,cancelable:!0,view:window,screenX:S.screenX,screenY:S.screenY,clientX:S.clientX,clientY:S.clientY});D._simulated=!0,S.target.dispatchEvent(D)}});Co.addInitHook("addHandler","tapHold",zS),Co.mergeOptions({touchZoom:Mr.touch,bounceAtZoomLimits:!0});var _v=Od.extend({addHooks:function(){ws(this._map._container,"leaflet-touch-zoom"),As(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){$c(this._map._container,"leaflet-touch-zoom"),Vc(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(w){var S=this._map;if(!(!w.touches||w.touches.length!==2||S._animatingZoom||this._zooming)){var D=S.mouseEventToContainerPoint(w.touches[0]),q=S.mouseEventToContainerPoint(w.touches[1]);this._centerPoint=S.getSize()._divideBy(2),this._startLatLng=S.containerPointToLatLng(this._centerPoint),S.options.touchZoom!=="center"&&(this._pinchStartLatLng=S.containerPointToLatLng(D.add(q)._divideBy(2))),this._startDist=D.distanceTo(q),this._startZoom=S.getZoom(),this._moved=!1,this._zooming=!0,S._stop(),As(document,"touchmove",this._onTouchMove,this),As(document,"touchend touchcancel",this._onTouchEnd,this),sl(w)}},_onTouchMove:function(w){if(!(!w.touches||w.touches.length!==2||!this._zooming)){var S=this._map,D=S.mouseEventToContainerPoint(w.touches[0]),q=S.mouseEventToContainerPoint(w.touches[1]),st=D.distanceTo(q)/this._startDist;if(this._zoom=S.getScaleZoom(st,this._startZoom),!S.options.bounceAtZoomLimits&&(this._zoomS.getMaxZoom()&&st>1)&&(this._zoom=S._limitZoom(this._zoom)),S.options.touchZoom==="center"){if(this._center=this._startLatLng,st===1)return}else{var vt=D._add(q)._divideBy(2)._subtract(this._centerPoint);if(st===1&&vt.x===0&&vt.y===0)return;this._center=S.unproject(S.project(this._pinchStartLatLng,this._zoom).subtract(vt),this._zoom)}this._moved||(S._moveStart(!0,!1),this._moved=!0),Lt(this._animRequest);var $t=m(S._move,S,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=ot($t,this,!0),sl(w)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,Lt(this._animRequest),Vc(document,"touchmove",this._onTouchMove,this),Vc(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});Co.addInitHook("addHandler","touchZoom",_v),Co.BoxZoom=P3,Co.DoubleClickZoom=Mb,Co.Drag=Ag,Co.Keyboard=vv,Co.ScrollWheelZoom=US,Co.TapHold=zS,Co.TouchZoom=_v,d.Bounds=ke,d.Browser=Mr,d.CRS=ti,d.Canvas=FS,d.Circle=gv,d.CircleMarker=zy,d.Class=ln,d.Control=Cc,d.DivIcon=X0,d.DivOverlay=mf,d.DomEvent=xk,d.DomUtil=_k,d.Draggable=su,d.Evented=xe,d.FeatureGroup=pf,d.GeoJSON=l1,d.GridLayer=Tg,d.Handler=Od,d.Icon=V0,d.ImageOverlay=$e,d.LatLng=ge,d.LatLngBounds=en,d.Layer=Yf,d.LayerGroup=Uu,d.LineUtil=E3,d.Map=Co,d.Marker=Uy,d.Mixin=df,d.Path=gf,d.Point=re,d.PolyUtil=Ry,d.Polygon=_b,d.Polyline=Fl,d.Popup=Vy,d.PosAnimation=TS,d.Projection=Ek,d.Rectangle=L3,d.Renderer=f1,d.SVG=Cg,d.SVGOverlay=Wa,d.TileLayer=xb,d.Tooltip=q0,d.Transformation=pr,d.Util=be,d.VideoOverlay=vs,d.bind=m,d.bounds=mn,d.canvas=bv,d.circle=BS,d.circleMarker=Ak,d.control=$0,d.divIcon=qy,d.extend=h,d.featureGroup=NS,d.geoJSON=oe,d.geoJson=_n,d.gridLayer=pc,d.icon=Tk,d.imageOverlay=er,d.latLng=Pe,d.latLngBounds=Qn,d.layerGroup=T3,d.map=Mk,d.marker=Ck,d.point=Se,d.polygon=kk,d.polyline=jy,d.popup=Jf,d.rectangle=Zy,d.setOptions=j,d.stamp=E,d.svg=k3,d.svgOverlay=Fc,d.tileLayer=A3,d.tooltip=Lk,d.transformation=Kt,d.version=s,d.videoOverlay=Wo;var Yy=window.L;d.noConflict=function(){return window.L=Yy,this},window.L=d})});var HXt=Ld((jXt,I_t)=>{(function(d){if(typeof jXt=="object"&&typeof I_t<"u")I_t.exports=d();else if(typeof define=="function"&&define.amd)define([],d);else{var s;typeof window<"u"?s=window:typeof global<"u"?s=global:typeof self<"u"?s=self:s=this,s.ELK=d()}})(function(){var d,s,h;return function p(m,_,E){function y(B,P){if(!_[B]){if(!m[B]){var U=typeof kI=="function"&&kI;if(!P&&U)return U(B,!0);if(I)return I(B,!0);var j=new Error("Cannot find module '"+B+"'");throw j.code="MODULE_NOT_FOUND",j}var V=_[B]={exports:{}};m[B][0].call(V.exports,function(tt){var Q=m[B][1][tt];return y(Q||tt)},V,V.exports,p,m,_,E)}return _[B].exports}for(var I=typeof kI=="function"&&kI,N=0;N0&&arguments[0]!==void 0?arguments[0]:{},j=U.defaultLayoutOptions,V=j===void 0?{}:j,tt=U.algorithms,Q=tt===void 0?["layered","stress","mrtree","radial","force","disco"]:tt,X=U.workerFactory,gt=U.workerUrl;if(y(this,B),this.defaultLayoutOptions=V,this.initialized=!1,typeof gt>"u"&&typeof X>"u")throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.");var ft=X;typeof gt<"u"&&typeof X>"u"&&(ft=function(Ot){return new Worker(Ot)});var xt=ft(gt);if(typeof xt.postMessage!="function")throw new TypeError("Created worker does not provide the required 'postMessage' function.");this.worker=new N(xt),this.worker.postMessage({cmd:"register",algorithms:Q}).then(function(Bt){return P.initialized=!0}).catch(console.err)}return E(B,[{key:"layout",value:function(U){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},V=j.layoutOptions,tt=V===void 0?this.defaultLayoutOptions:V;return U?this.worker.postMessage({cmd:"layout",graph:U,options:tt}):Promise.reject(new Error("Missing mandatory parameter 'graph'."))}},{key:"knownLayoutAlgorithms",value:function(){return this.worker.postMessage({cmd:"algorithms"})}},{key:"knownLayoutOptions",value:function(){return this.worker.postMessage({cmd:"options"})}},{key:"knownLayoutCategories",value:function(){return this.worker.postMessage({cmd:"categories"})}},{key:"terminateWorker",value:function(){this.worker.terminate()}}]),B}();_.default=I;var N=function(){function B(P){var U=this;if(y(this,B),P===void 0)throw new Error("Missing mandatory parameter 'worker'.");this.resolvers={},this.worker=P,this.worker.onmessage=function(j){setTimeout(function(){U.receive(U,j)},0)}}return E(B,[{key:"postMessage",value:function(U){var j=this.id||0;this.id=j+1,U.id=j;var V=this;return new Promise(function(tt,Q){V.resolvers[j]=function(X,gt){X?Q(X):tt(gt)},V.worker.postMessage(U)})}},{key:"receive",value:function(U,j){var V=j.data,tt=U.resolvers[V.id];tt&&(delete U.resolvers[V.id],V.error?tt(V.error):tt(null,V.data))}},{key:"terminate",value:function(){this.worker.terminate&&this.worker.terminate()}}]),B}()},{}],2:[function(p,m,_){(function(E){var y;typeof window<"u"?y=window:typeof E<"u"?y=E:typeof self<"u"&&(y=self);var I,N;function B(){}function P(){}function U(){}function j(){}function V(){}function tt(){}function Q(){}function X(){}function gt(){}function ft(){}function xt(){}function Bt(){}function Ot(){}function Pt(){}function se(){}function ot(){}function Lt(){}function be(){}function ln(){}function Fn(){}function ne(){}function xe(){}function re(){}function hn(){}function Se(){}function ke(){}function mn(){}function en(){}function Qn(){}function ge(){}function Pe(){}function ti(){}function Yi(){}function ki(){}function lr(){}function pr(){}function Kt(){}function wn(){}function it(){}function ut(){}function kt(){}function Nt(){}function ie(){}function rn(){}function Pn(){}function Tt(){}function yt(){}function ue(){}function fn(){}function An(){}function zn(){}function Li(){}function xi(){}function Jt(){}function nn(){}function vn(){}function he(){}function Mn(){}function Sn(){}function gn(){}function Ce(){}function dn(){}function jn(){}function ar(){}function gr(){}function tr(){}function Ln(){}function Qt(){}function Mi(){}function sn(){}function Zn(){}function oi(){}function Jr(){}function Bs(){}function Oc(){}function ru(){}function fc(){}function il(){}function va(){}function Mr(){}function rv(){}function U0(){}function sv(){}function z0(){}function j0(){}function ov(){}function vg(){}function cv(){}function l3(){}function Rt(){}function ve(){}function Je(){}function tn(){}function Ze(){}function Hi(){}function Pr(){}function Gr(){}function hs(){}function Fs(){}function Ms(){}function bs(){}function Tc(){}function rl(){}function Oa(){}function wh(){}function Nr(){}function mr(){}function a1(){}function dc(){}function vh(){}function _g(){}function ws(){}function $c(){}function _a(){}function ff(){}function Bl(){}function _h(){}function u1(){}function Nd(){}function ya(){}function yg(){}function H0(){}function G0(){}function xg(){}function vb(){}function ky(){}function h3(){}function av(){}function Ly(){}function Py(){}function uv(){}function xS(){}function f3(){}function _k(){}function As(){}function bp(){}function Vc(){}function MS(){}function d3(){}function lv(){}function p3(){}function W0(){}function g3(){}function hv(){}function sl(){}function rc(){}function Bc(){}function ES(){}function yk(){}function SS(){}function m3(){}function xk(){}function TS(){}function Co(){}function Mk(){}function Cc(){}function $0(){}function Mg(){}function CS(){}function fv(){}function Xf(){}function b3(){}function AS(){}function kS(){}function Iy(){}function LS(){}function Od(){}function df(){}function PS(){}function su(){}function IS(){}function w3(){}function wp(){}function Ry(){}function Dy(){}function ea(){}function Eg(){}function v3(){}function _3(){}function y3(){}function RS(){}function DS(){}function Ny(){}function Sg(){}function Oy(){}function vp(){}function Zf(){}function x3(){}function M3(){}function E3(){}function dv(){}function By(){}function Ek(){}function S3(){}function Fy(){}function Sk(){}function Yf(){}function Uu(){}function T3(){}function pf(){}function NS(){}function V0(){}function Tk(){}function pv(){}function OS(){}function Uy(){}function Ck(){}function gf(){}function zy(){}function Ak(){}function gv(){}function BS(){}function Fl(){}function jy(){}function _b(){}function kk(){}function l1(){}function h1(){}function Kf(){}function Hy(){}function Gy(){}function C3(){}function Wy(){}function yb(){}function $y(){}function Bd(){}function oe(){}function _n(){}function $e(){}function er(){}function vs(){}function Wo(){}function Wa(){}function Fc(){}function mf(){}function Vy(){}function Jf(){}function q0(){}function Lk(){}function X0(){}function qy(){}function Tg(){}function pc(){}function xb(){}function A3(){}function mv(){}function Pk(){}function f1(){}function FS(){}function bv(){}function Qf(){}function Xy(){}function wv(){}function Cg(){}function k3(){}function L3(){}function Zy(){}function P3(){}function Mb(){}function Ag(){}function vv(){}function US(){}function Ik(){}function zS(){}function _v(){}function Yy(){}function w(){}function S(){}function D(){}function q(){}function st(){}function vt(){}function $t(){}function _e(){}function Ye(){}function Un(){}function Ji(){}function Qr(){}function Is(){}function ol(){}function xa(){}function Ul(){}function zu(){}function d1(){}function Eb(){}function Rk(){}function Dk(){}function jS(){}function Nk(){}function HS(){}function Ma(){}function kg(){}function GS(){}function Mt(){}function Sb(){}function Tb(){}function bf(){}function po(){}function KU(){}function JU(){}function QU(){}function yv(){}function Z0(){}function Cb(){}function SR(){}function tz(){}function ez(){}function Y0(){}function nz(){}function iz(){}function rz(){}function sz(){}function oz(){}function K0(){}function cz(){}function az(){}function uz(){}function lz(){}function hz(){}function xv(){}function fz(){}function dz(){}function p1(){}function pz(){}function gz(){}function mz(){}function bz(){}function Ie(){}function TR(){}function CR(){}function wz(){}function vz(){}function Ok(){}function I3(){}function R3(){}function _z(){}function AR(){}function yz(){}function Lg(){}function Bk(){}function Mv(){}function _p(){}function xz(){}function kR(){}function LR(){}function D3(){}function Ab(){}function PR(){}function Mz(){}function WS(){}function Ez(){}function N3(){}function yh(){}function $S(){}function O3(){}function Pg(){}function VS(){}function qS(){}function J0(){}function IR(){}function zl(){}function Fk(){}function Sz(){}function Tz(){}function Cz(){}function Ky(){}function Az(){}function B3(){}function RR(){}function kz(){}function DR(){}function F3(){}function Uk(){}function NR(){}function zk(){}function OR(){}function Lz(){}function Pz(){}function Iz(){}function BR(){}function jk(){}function Rz(){}function Hk(){}function FR(){}function UR(){}function zR(){}function XS(){}function Dz(){}function jR(){}function kb(){}function Gk(){}function HR(){}function Nz(){}function Wk(){}function GR(){}function $k(){}function Oz(){}function Vk(){}function oo(){}function Bz(){}function Fz(){}function U3(){}function WR(){}function Uz(){}function zz(){}function yp(){}function jz(){}function ZS(){}function qk(){}function $R(){}function VR(){}function Fd(){}function Lb(){}function Xk(){}function qR(){}function YS(){}function XR(){}function Zk(){}function ZR(){}function Yk(){}function Kk(){}function Pb(){}function Hz(){}function Ib(){}function YR(){}function KR(){}function Jk(){}function Gz(){}function Wz(){}function $z(){}function JR(){}function QR(){}function Vz(){}function t8(){}function e8(){}function td(){}function Ig(){}function qz(){}function Xz(){}function KS(){}function Jy(){}function n8(){}function i8(){}function Zz(){}function r8(){}function Qy(){}function z3(){}function Yz(){}function s8(){}function o8(){}function JS(){}function c8(){}function QS(){}function Qk(){}function tT(){}function Kz(){}function a8(){}function eT(){}function u8(){}function t5(){}function Jz(){}function l8(){}function Q0(){}function h8(){}function f8(){}function Qz(){}function d8(){}function tj(){}function ej(){}function tm(){}function e5(){}function n5(){}function i5(){}function nT(){}function t2(){}function cs(){}function iT(){}function r5(){}function Ev(){}function nj(){}function s5(){}function p8(){}function zh(){}function ij(){}function rj(){}function g8(){}function sj(){}function m8(){}function oj(){}function cj(){}function aj(){}function em(){}function jh(){}function o5(){}function uj(){}function lj(t){}function lxt(t){}function c5(){Wr()}function j3(){v7()}function b8(){hq()}function w8(){GC()}function hj(){eft()}function fj(){wlt()}function dj(){zL()}function pj(){Ph()}function v8(){zut()}function _8(){R5()}function gj(){lL()}function a5(){P5t()}function y8(){YRt()}function H3(){C3t()}function u5(){qit()}function x8(){qt()}function M8(){lAt()}function rT(){ZLt()}function E8(){dAt()}function g1(){URt()}function Sv(){pAt()}function mj(){Eat()}function S8(){_6t()}function bj(){sw()}function wj(){gAt()}function vj(){B5t()}function _j(){wNt()}function yj(){A3t()}function xj(){Glt()}function Mj(){tw()}function wf(){CTt()}function Ej(){M7()}function Sj(){dr()}function T8(){q7()}function C8(){jN()}function A8(){gut()}function l5(){XV()}function Tj(){Aht()}function Cj(t){this.a=t}function Aj(t){this.a=t}function G3(t){this.a=t}function kj(t){this.a=t}function Lj(t){this.a=t}function Pj(t){this.a=t}function k8(t){this.a=t}function Ij(t){this.a=t}function L8(t){this.a=t}function Ud(t){this.a=t}function Rj(t){this.a=t}function h5(t){this.a=t}function Dj(t){this.a=t}function P8(t){this.a=t}function Nj(t){this.a=t}function Oj(t){this.a=t}function Bj(t){this.a=t}function Fj(t){this.a=t}function f5(t){this.a=t}function d5(t){this.b=t}function Uj(t){this.a=t}function zj(t){this.a=t}function jj(t){this.a=t}function Hj(t){this.a=t}function Gj(t){this.a=t}function I8(t){this.a=t}function R8(t){this.a=t}function p5(t){this.a=t}function sT(t){this.a=t}function W3(t){this.a=t}function Wj(t){this.a=t}function D8(t){this.a=t}function Rb(t){this.a=t}function N8(t){this.a=t}function O8(t){this.a=t}function B8(t){this.a=t}function xp(t){this.a=t}function Tv(t){this.a=t}function g5(t){this.a=t}function vf(t){this.a=t}function nm(t){this.a=t}function $3(t){this.d=t}function Rg(){this.a=[]}function vi(){uu(this)}function Pnt(t,e){t.i=e}function Int(t,e){t.g=e}function Rnt(t,e){t.b=e}function Dnt(t,e){t.b=e}function Nnt(t,e){t.a=e}function F8(t,e){t.a=e}function Ont(t,e){t.c=e}function m5(t,e){t.c=e}function Bnt(t,e){t.b=e}function Fnt(t,e){t.d=e}function Unt(t,e){t.d=e}function jl(t,e){t.j=e}function znt(t,e){t.a=e}function jnt(t,e){t.f=e}function Hnt(t,e){t.f=e}function $j(t,e){t.e=e}function U8(t,e){t.k=e}function Gnt(t,e){t.a=e}function Wnt(t,e){t.b=e}function z8(t,e){t.g=e}function j8(t,e){t.j=e}function $nt(t,e){t.n=e}function Vnt(t,e){t.a=e}function qnt(t,e){t.a=e}function Vj(t,e){t.c=e}function qj(t,e){t.c=e}function Xnt(t,e){t.d=e}function Znt(t,e){t.e=e}function Ynt(t,e){t.g=e}function Knt(t,e){t.a=e}function b5(t,e){t.c=e}function Jnt(t,e){t.d=e}function Qnt(t,e){t.e=e}function tit(t,e){t.f=e}function eit(t,e){t.j=e}function nit(t,e){t.a=e}function iit(t,e){t.a=e}function rit(t,e){t.b=e}function Xj(t){t.b=t.a}function Zj(t){t.c=t.d.d}function Yj(t){hi(si(t))}function H8(t){this.b=t}function Cv(t){this.a=t}function oT(t){this.a=t}function cT(t){this.a=t}function Db(t){this.b=t}function Dg(t){this.b=t}function G8(t){this.a=t}function W8(t){this.a=t}function _r(t){this.a=t}function $8(t){this.a=t}function V8(t){this.a=t}function Kj(t){this.a=t}function q8(t){this.a=t}function e2(t){this.a=t}function aT(t){this.a=t}function Jj(t){this.a=t}function Qj(t){this.a=t}function w5(t){this.a=t}function X8(t){this.a=t}function tH(t){this.a=t}function eH(t){this.a=t}function nH(t){this.a=t}function iH(t){this.a=t}function rH(t){this.a=t}function sH(t){this.a=t}function oH(t){this.a=t}function cH(t){this.a=t}function aH(t){this.a=t}function uH(t){this.a=t}function lH(t){this.a=t}function Av(t){this.a=t}function m1(t){this.a=t}function hH(t){this.a=t}function fH(t){this.a=t}function kv(t){this.a=t}function Us(t){this.a=t}function Z8(t){this.a=t}function xh(t){this.a=t}function H(t){this.c=t}function uT(t){this.e=t}function zd(t){this.a=t}function dH(t){this.a=t}function Lv(t){this.a=t}function Y8(t){this.a=t}function pH(t){this.a=t}function gH(t){this.a=t}function v5(t){this.a=t}function mH(t){this.a=t}function im(t){this.a=t}function K8(t){this.a=t}function lT(t){this.a=t}function $a(t){this.a=t}function ou(t){this.a=t}function J8(t){this.a=t}function _5(t){this.a=t}function bH(t){this.a=t}function wH(t){this.a=t}function vH(t){this.a=t}function _H(t){this.a=t}function yH(t){this.a=t}function Q8(t){this.a=t}function V3(t){this.a=t}function Nb(t){this.a=t}function xH(t){this.a=t}function t9(t){this.a=t}function hT(t){this.a=t}function jd(t){this.a=t}function n2(t){this.a=t}function MH(t){this.a=t}function EH(t){this.a=t}function SH(t){this.a=t}function TH(t){this.a=t}function CH(t){this.a=t}function e9(t){this.a=t}function rm(t){this.a=t}function Ys(t){this.a=t}function n9(t){this.a=t}function Mp(t){this.a=t}function i9(t){this.a=t}function AH(t){this.b=t}function Ac(t){this.a=t}function kH(t){this.a=t}function r9(t){this.a=t}function s9(t){this.c=t}function y5(t){this.a=t}function LH(t){this.a=t}function PH(t){this.a=t}function IH(t){this.a=t}function RH(t){this.a=t}function DH(t){this.a=t}function NH(t){this.a=t}function OH(t){this.a=t}function BH(t){this.a=t}function FH(t){this.a=t}function UH(t){this.a=t}function zH(t){this.a=t}function jH(t){this.a=t}function x5(t){this.a=t}function HH(t){this.a=t}function M5(t){this.a=t}function GH(t){this.a=t}function WH(t){this.a=t}function $H(t){this.a=t}function Hl(t){this.a=t}function ed(t){this.a=t}function Hd(t){this.a=t}function Ob(t){this.a=t}function VH(t){this.a=t}function o9(t){this.a=t}function qH(t){this.a=t}function XH(t){this.a=t}function fT(t){this.a=t}function c9(t){this.f=t}function ZH(t){this.i=t}function E5(t){this.a=t}function YH(t){this.a=t}function a9(t){this.a=t}function u9(t){this.a=t}function KH(t){this.a=t}function JH(t){this.a=t}function QH(t){this.a=t}function tG(t){this.a=t}function i2(t){this.a=t}function eG(t){this.a=t}function nG(t){this.a=t}function iG(t){this.a=t}function rG(t){this.a=t}function sG(t){this.a=t}function l9(t){this.a=t}function h9(t){this.a=t}function oG(t){this.a=t}function cG(t){this.a=t}function aG(t){this.a=t}function uG(t){this.a=t}function lG(t){this.a=t}function hG(t){this.a=t}function fG(t){this.a=t}function dG(t){this.a=t}function pG(t){this.a=t}function gG(t){this.a=t}function mG(t){this.a=t}function bG(t){this.a=t}function wG(t){this.a=t}function vG(t){this.a=t}function _G(t){this.a=t}function f9(t){this.a=t}function kr(t){this.b=t}function yG(t){this.a=t}function xG(t){this.a=t}function MG(t){this.a=t}function EG(t){this.a=t}function SG(t){this.a=t}function TG(t){this.a=t}function CG(t){this.a=t}function AG(t){this.b=t}function S5(t){this.a=t}function r2(t){this.a=t}function d9(t){this.a=t}function dT(t){this.a=t}function pT(t){this.a=t}function T5(t){this.a=t}function C5(t){this.a=t}function kG(t){this.d=t}function p9(t){this.c=t}function gT(t){this.e=t}function Ba(t){this.e=t}function mT(t){this.a=t}function g9(t){this.a=t}function q3(){this.a=0}function X3(){ZEt(this)}function Dt(){NW(this)}function Z3(){p4t(this)}function sit(){Dit(),Xxe()}function m9(){return null}function oit(){return null}function cit(t){return t.a}function ait(t){return t.a}function uit(t){return t.a}function LG(t){return t.a}function lit(t){return t.a}function K(t){return t.e}function b1(){this.c=t_t}function A5(){this.a=this}function bT(t){this.a=Ole(t)}function b9(){Ep.call(this)}function Y3(){Ep.call(this)}function na(){Ep.call(this)}function w9(){Ep.call(this)}function k5(){Ep.call(this)}function v9(){RSt.call(this)}function Ep(){RSt.call(this)}function s2(){Ep.call(this)}function Oi(){Ep.call(this)}function _9(){w9.call(this)}function hit(t){t.b.Te(t.e)}function PG(t,e){e.jd(t.a)}function o2(t,e){t.a=e-t.a}function c2(t,e){t.b=e-t.b}function IG(t,e){t.b+=e}function fit(t,e){t.d.b.$b(e)}function K3(t,e){t.e=e,e.b=t}function RG(t,e){t.length=e}function y9(t){t.a=new Fr}function x9(){x9=P,new vi}function DG(){this.b=new irt}function x(){this.Bb|=256}function C(){Ep.call(this)}function F(){Ep.call(this)}function J(){Ep.call(this)}function mt(){Ep.call(this)}function St(t){k7(t.c,t.b)}function Vt(t,e){xlt(t.c,e)}function ee(t,e){m7(t.a,e)}function fe(t,e){Tq(t.a,e)}function Cn(t,e){Ut(t.a,e)}function kn(t,e){Ir(t.b,e)}function Wn(t,e){Bi(t.e,e)}function Ki(t){TM(),CK.Rd(t)}function Er(){Er=P,w1t=new tt}function Wr(){Wr=P,xK=new j}function no(){no=P,b1t=new U}function Zr(){Zr=P,MK=new s3t}function co(){co=P,EK=new o3t}function $o(){$o=P,Azt=new ot}function Hh(){Hh=P,F4=new Lt}function _f(){_f=P,Dzt=new Fn}function $r(){this.a=new vi}function yu(){this.a=new NAt}function nd(){this.a=new Dt}function sm(){this.a=new Dt}function M9(){this.a=new Dt}function hxt(){this.a=new Dt}function fxt(){this.a=new Dt}function dxt(){this.a=new $r}function dit(){this.a=new rMt}function pit(){this.a=new MAt}function git(){this.a=new hTt}function mit(){this.a=new rv}function cl(){this.a=new Jf}function NG(){this.a=new Dt}function bit(){this.a=new Dt}function pxt(){this.b=new Dt}function wit(){this.f=new Dt}function gxt(){this.d=new Dt}function mxt(){this.a=new Dt}function Ng(){this.a=new c5t}function vit(){this.a=new Mt}function bxt(){this.j=new Dt}function Va(){Fr.call(this)}function wxt(){Dt.call(this)}function OG(){nd.call(this)}function _it(){a2.call(this)}function a2(){wh.call(this)}function u2(){wh.call(this)}function yit(){u2.call(this)}function vxt(){vi.call(this)}function _xt(){vi.call(this)}function yxt(){vi.call(this)}function xxt(){X4t.call(this)}function Mxt(){X4t.call(this)}function Ext(){yD.call(this)}function Sxt(){jxt.call(this)}function Txt(){jxt.call(this)}function xit(){yh.call(this)}function Mit(){yh.call(this)}function BG(){Xrt.call(this)}function FG(){Xrt.call(this)}function UG(){tPt.call(this)}function Eit(){zl.call(this)}function Cxt(){zl.call(this)}function Axt(){Eit.call(this)}function kxt(){x.call(this)}function Lxt(){$r.call(this)}function Sit(){vi.call(this)}function zG(){vi.call(this)}function Pxt(){vi.call(this)}function Ixt(){jh.call(this)}function CQt(t){K3t.call(this,t)}function Tit(t){K3t.call(this,t)}function AQt(t){Tit.call(this,t)}function Rxt(t){vPt.call(this,t)}function Dxt(t){vPt.call(this,t)}function Nxt(t){Rst.call(this,t)}function Cit(t){tW.call(this,t)}function Ait(t){sAt.call(this,t)}function Pv(t){sM.call(this,t)}function sc(t){WCt.call(this,t)}function Oxt(t){sc.call(this,t)}function E9(t){sc.call(this,t)}function Uc(t){sc.call(this,t)}function Bxt(t){sc.call(this,t)}function jG(t){WCt.call(this,t)}function kit(t){Uc.call(this,t)}function wT(t){sc.call(this,t)}function yn(t){sc.call(this,t)}function yc(t){sc.call(this,t)}function Fxt(t){sc.call(this,t)}function vT(t){sc.call(this,t)}function yf(t){yn.call(this,t)}function _T(){sT.call(this,{})}function Sp(){W3.call(this,"")}function yT(){W3.call(this,"")}function om(){W3.call(this,"")}function Bb(){W3.call(this,"")}function Uxt(t){Uc.call(this,t)}function Tp(t){sc.call(this,t)}function Lit(t){J7t(),Cxe(this,t)}function HG(t){fM(),this.a=t}function L5(t){t.b=null,t.c=0}function kQt(t,e){t.a=e,x0e(t)}function LQt(t,e){return t*t/e}function J3(t){return t<0?-t:t}function GG(t){kPt(),this.a=t}function WG(t){_$(),this.f=t}function $G(t){_$(),this.f=t}function VG(t,e,n){t.a[e.g]=n}function PQt(t,e,n){e1e(n,t,e)}function IQt(t,e,n){b2e(n,t,e)}function RQt(t,e,n){bde(t,n,e)}function zxt(){this.d=new Dt}function jxt(){this.a=new Az}function Hxt(){throw K(new Oi)}function Pit(){throw K(new Oi)}function DQt(){throw K(new Oi)}function NQt(){throw K(new Oi)}function OQt(){throw K(new Oi)}function Gxt(){throw K(new Oi)}function P5(t){this.c=hi(si(t))}function BQt(t){return new p5(t)}function FQt(t){return new S2(t)}function Z(t,e){return aAt(t,e)}function UQt(t,e){return t.a-e.a}function zQt(t,e){return t.a-e.a}function jQt(t,e){return t.a-e.a}function Wxt(t,e){return t.g-e.g}function Mh(t,e){return t>e?t:e}function cm(t,e){return t0}function KG(t,e){return Pc(t,e)<0}function nM(t){return t.d.c+t.e.c}function go(){this.a=0,this.b=0}function A9(t){TD.call(this,t)}function w1(t){i_.call(this,t)}function y3t(t){$$.call(this,t)}function x3t(t){$$.call(this,t)}function k9(t){l6t.call(this,t,0)}function M3t(t){this.c=(En(t),t)}function L9(t){this.a=new k9(t)}function Ub(t){this.a=new x$(t)}function cte(){throw K(new J)}function ate(){throw K(new J)}function iM(){iM=P,$1t=new MEt}function Dv(){Dv=P,Z_=new re}function E3t(){E3t=P,Zzt=new fn}function P9(){P9=P,FK=new jSt}function Wit(){Wit=P,Ujt=new ov}function S3t(){S3t=P,zjt=new Rt}function $it(){$it=P,jjt=new RCt}function Vit(){Vit=P,jgt=new Hi}function T3t(){T3t=P,Zjt=new rl}function ST(){ST=P,rHt=new $y}function C3t(){C3t=P,iHt=new CS}function qit(){qit=P,P0t=new _3}function R5(){R5=P,Jjt=new go}function A3t(){A3t=P,z$t=new as}function k3t(){this.b=new IX(qbt)}function L3t(){this.a=new IX(cwt)}function P3t(){this.a=(Js(),Ff)}function I3t(){this.a=(Js(),Ff)}function I9(t){this.a=0,this.b=t}function R9(t){return t.b!=t.d.c}function R3t(t,e){return t.d[e.o]}function D3t(t,e){for(;t.sd(e););}function Xit(t,e,n){t.splice(e,n)}function ute(t,e,n){tc(t.d,e.f,n)}function lte(t,e){EX(Et(t.a),e)}function hte(t,e){EX(Et(t.a),e)}function N3t(t){t.c?sNt(t):oNt(t)}function O3t(){O3t=P,Lqt=new RR}function B3t(){B3t=P,Wqt=new _xt}function F3t(){F3t=P,$qt=new yxt}function v1(){v1=P,Nl=new Sit}function Zit(){Zit=P,Jvt=new Pxt}function D9(){D9=P,XF=new vi}function Yit(){Yit=P,u_t=new Dt}function _1(){_1=P,hg=new uj}function TT(){TT=P,htt=new cSt}function Ap(){Ap=P,yI=new aSt}function JG(){JG=P,iXt=new Ig}function Jo(){Jo=P,sXt=new qz}function D5(t){this.a=new iMt(t)}function U3t(t){this.a=a(si(t),13)}function z3t(t,e){this.b=t,this.c=e}function j3t(t,e){this.b=t,this.a=e}function Kit(t,e){this.b=t,this.d=e}function rM(t,e){this.e=t,this.d=e}function Jit(t,e){this.b=t,this.c=e}function H3t(t,e){this.a=t,this.b=e}function G3t(t,e){this.a=t,this.b=e}function W3t(t,e){this.a=t,this.b=e}function $3t(t,e){this.a=t,this.b=e}function V3t(t,e){this.b=t,this.a=e}function g2(t,e){pM.call(this,t,e)}function Nv(t,e){g2.call(this,t,e)}function q3t(t,e){this.b=t,this.a=e}function X3t(t,e){this.a=t,this.b=e}function N5(t,e){this.g=t,this.i=e}function Z3t(t,e){this.b=t,this.a=e}function QG(t,e){this.a=t,this.b=e}function Y3t(t,e){this.a=t,this.f=e}function K3t(t){UW(t.Wb()),this.c=t}function J3t(t,e){this.b=t,this.c=e}function Gi(t,e){this.f=t,this.g=e}function Q3t(t,e){Gi.call(this,t,e)}function tMt(t,e){this.e=t,this.c=e}function tW(t){this.b=a(si(t),43)}function eMt(t){this.a=a(si(t),15)}function sM(t){this.a=a(si(t),15)}function Qit(t,e){this.a=t,this.b=e}function fte(t,e){return t>e&&e0?t:e}function NEt(t){return ia(t.l,t.m,t.h)}function PW(t){return t<10?"0"+t:""+t}function qte(t){return t==Xm||t==vw}function Xte(t){return t==Xm||t==ww}function ql(t){return nc(t.b.b,t,0)}function OEt(t){this.a=$Mt(),this.b=t}function BEt(t){this.a=$Mt(),this.b=t}function y2(t){this.a=t,c5.call(this)}function FEt(t){this.a=t,c5.call(this)}function Rrt(t,e){NL(t,0,t.length,e)}function UEt(t,e){return Ut(t.a,e),e}function Zte(t,e){return Ut(t.c,e),t}function zEt(t,e){return pa(t.a,e),t}function Yte(t,e){return Zl(),e.a+=t}function Kte(t,e){return Zl(),e.c+=t}function Jte(t,e){return Zl(),e.a+=t}function jEt(t){return t==sy||t==ry}function jv(t){return t==ah||t==uh}function Y5(t){return t==cg||t==fp}function Gd(t){return t!=dp&&t!=ob}function Xl(t){return t.eg()&&t.fg()}function rD(t){return pa(new as,t)}function HEt(){HEt=P,uQ=new BC(qQ)}function qa(){q8.call(this,new xm)}function GEt(){JD.call(this,0,0,0,0)}function lM(){qh.call(this,0,0,0,0)}function Drt(t){gEt.call(this,t,!0)}function Oo(t){this.a=t.a,this.b=t.b}function Wd(t,e,n){th(t,e),eh(t,n)}function sD(t,e,n){c_(t,e),o_(t,n)}function Nrt(t,e,n){OV(t,e),BV(t,n)}function IW(t,e,n){MC(t,e),xC(t,n)}function RW(t,e,n){EC(t,e),SC(t,n)}function DW(t,e){mq(t,e),FV(t,t.D)}function WEt(t,e){return new FM(e,t)}function Qte(t,e){return new FM(e,t)}function Lp(t,e){return te?1:0}function GT(t){return yot(t.b.tc(),t.a)}function id(t){return tC(t.a.tc(),t.b)}function $Et(t){return ml(t,0,t.length)}function oD(t){return t!=null?Yr(t):0}function $d(t){sAt.call(this,new Ait(t))}function VEt(){U9.call(this,"Head",1)}function qEt(){U9.call(this,"Tail",3)}function Ort(t,e,n){QW.call(this,t,e,n)}function tee(t,e,n){F8(t,e.le(t.a,n))}function XEt(t,e){return parseInt(t,e)}function eee(t,e){return _C(e,Tf(t))}function nee(t,e){return _C(e,Tf(t))}function x2(t){JD.call(this,t,t,t,t)}function NW(t){t.c=dt(un,te,1,0,5,1)}function ZEt(t){t.a=dt(un,te,1,8,5,1)}function Brt(t){return t.b&&YX(t),t.a}function Frt(t){return t.b&&YX(t),t.c}function OW(t){return t.d&&wX(t),t.c}function BW(t){return t.d&&wX(t),t.b}function Urt(t){return t.d&&wX(t),t.a}function zrt(t,e,n){return Vr(t,e,n),n}function YEt(t,e,n){Vr(t.c[e.g],e.g,n)}function iee(t,e,n){return wr(t.g,n,e)}function ree(t,e,n){return wr(t.k,n,e)}function see(t,e,n){Wd(n,n.i+t,n.j+e)}function xc(t,e){es.call(this,t.b,e)}function WT(t){Ai(),Ba.call(this,t)}function Hu(){Hu=P,lg=(O3t(),Lqt)}function Kn(){Kn=P,new KEt,new Dt}function KEt(){new vi,new vi,new vi}function Ao(){Ao=P,Szt=new xt,m1t=new Bt}function Hv(){Hv=P,p6=new fMt,g6=new PEt}function al(){al=P,d1t=Nee(new P5(Rc))}function ts(){ts=P,new Yj((al(),"="))}function cD(t){t.j=dt(P1t,wt,287,0,0,1)}function JEt(t){this.a=t,Vst.call(this,t)}function oee(t){return t==null?0:Yr(t)}function $T(t){return t==null?tu:Yc(t)}function bo(t,e){return t.charCodeAt(e)}function hM(t,e,n){return Grt(t,Ca(e),n)}function ia(t,e,n){return{l:t,m:e,h:n}}function Qo(t){return t.ae-1?0:e-1}function Tee(t,e,n){return n?e!=0:e!=t-1}function HW(t,e,n){return t.a[e.g][n.g]}function Cee(t,e){return t.e[e.c.o][e.o]}function Aee(t,e){return t.a[e.c.o][e.o]}function Wh(t,e){return t.a[e.c.o][e.o]}function kee(t,e){return t.j[e.o]=sbe(e)}function Lee(t,e){return ro(t.c.d,e.c.d)}function Pee(t,e){return ro(t.c.c,e.c.c)}function Iee(t,e,n){X2e(t.a,t.b,t.c,e,n)}function Ree(t,e,n,i){Vr(t.a[e.g],n.g,i)}function XT(t,e,n){return Vr(t.g,e,n),n}function hl(t,e){return t.a*=e,t.b*=e,t}function Dee(t,e){t.q.setHours(e),c4(t,e)}function Ss(t,e,n){hL.call(this,t,e,n)}function lD(t,e,n){Ss.call(this,t,e,n)}function Gu(t,e,n){Ss.call(this,t,e,n)}function mSt(t,e,n){lD.call(this,t,e,n)}function Vrt(t,e,n){PD.call(this,t,e,n)}function bSt(t,e,n){PD.call(this,t,e,n)}function wSt(t,e,n){Vrt.call(this,t,e,n)}function vSt(t,e,n){qrt.call(this,t,e,n)}function qrt(t,e,n){hL.call(this,t,e,n)}function dM(t,e,n){hL.call(this,t,e,n)}function pM(t,e){this.a=t,nW.call(this,e)}function $n(t){this.i=t,this.f=this.i.j}function x1(t){this.c=t,this.a=this.c.a}function Xrt(){this.Bb|=256,this.Bb|=512}function _St(t,e){this.a=t,tW.call(this,e)}function ySt(t,e){this.a=e,tW.call(this,t)}function Zrt(t){this.b=t,this.a=this.b.a.e}function xSt(t){t.b.jc(),--t.d.f.d,$D(t.d)}function MSt(t){t.a=a(an(t.b.a,4),116)}function ESt(t){t.a=a(an(t.b.a,4),116)}function SSt(t){h5.call(this,a(si(t),34))}function TSt(t){h5.call(this,a(si(t),34))}function Nee(t){return si(tu),new eCt(t,t)}function CSt(t,e){return new r9t(t.a,t.b,e)}function $h(t,e,n){return t.substr(e,n-e)}function Oee(t){return t==null?null:t.name}function Bee(t){return t.l+t.m*rx+t.h*o0}function Gb(t){return typeof t=="number"}function Vo(t){return typeof t=="number"}function Pp(t,e){return!!e&&t.b[e.g]==e}function Yrt(t,e){var n;n=t[N_],e[N_]=n}function hD(t){Db.call(this,t),this.a=t}function Krt(t){Dg.call(this,t),this.a=t}function J5(t){Iv.call(this,t),this.a=t}function Jrt(t){q8.call(this,new Bct(t))}function ASt(t){if(!t)throw K(new C)}function Hn(t){if(!t)throw K(new J)}function Vd(t){t.o==null&&Ome(t)}function GW(t){return Hn(t.a!=null),t.a}function kSt(t,e){return Ut(e.a,t.a),t.a}function LSt(t,e){return Ut(e.b,t.a),t.a}function Fee(t,e){e&&(t.a=(Yv(e),e.a))}function Qrt(t,e){return cC(t.a,e)!=null}function fa(t,e){return a(rr(t.a,e),15)}function WW(t){return t.b=a(y4t(t.a),38)}function lm(t){return t.$H||(t.$H=++U3e)}function $W(t){return Qo(t.a)||Qo(t.b)}function Wb(t,e){return!!t.p&&dm(t.p,e)}function Uee(t,e){return t.k.b=(En(e),e)}function zee(t,e){return t.k.b=(En(e),e)}function fD(t,e){return++t.b,Ut(t.a,e)}function tst(t,e){return++t.b,Lc(t.a,e)}function jee(t,e,n){return hkt(t,e,n,t.b)}function est(t,e,n){return hkt(t,e,n,t.c)}function nst(t,e){Eut.call(this,t,e,null)}function PSt(t,e){this.a=e,tW.call(this,t)}function Q5(t){this.a=t,H8.call(this,t)}function ISt(){ST(),this.b=new n2(this)}function VW(t,e){_$(),this.f=e,this.d=t}function RSt(){cD(this),tN(this),this.Pd()}function ZT(t){this.d=t,$n.call(this,t)}function M2(t){this.c=t,$n.call(this,t)}function tL(t){this.c=t,ZT.call(this,t)}function Hee(t,e,n){Tq(t.a,n),m7(t.a,e)}function ist(t,e,n){a(DL(t,e),19).nc(n)}function hm(t,e){return Ut(e.a,t.a),t.a}function sd(t){var e;e=t.a,t.a=t.b,t.b=e}function eL(t,e){TT(),this.a=t,this.b=e}function dD(t,e){Ap(),this.b=t,this.c=e}function DSt(t,e,n,i){got.call(this,t,e,n,i)}function pD(t,e,n){var i;i=t.fd(e),i.Bc(n)}function NSt(t,e,n){try{t[e]=n}catch{}}function gD(){gD=P,zF=new es(LBt,0)}function YT(){YT=P,pA=new kr("root")}function KT(){KT=P,_I=new Txt,new Sxt}function Gee(t){return++Ar,new Yb(3,t)}function od(t){return Ah(t,ex),new qu(t)}function rst(t){return Ao(),si(t),new RTt(t)}function Wee(t){return Hv(),$i((kAt(),Czt),t)}function OSt(t){return TM(),parseInt(t)||-1}function $ee(t,e){return me(),t==e?0:t?1:-1}function Vee(t){return t==null?null:Yc(t)}function qee(t){return t==null?null:Yc(t)}function nL(t){return t.f!=null?t.f:""+t.g}function qW(t){return kot(t.c,t.c.length)}function BSt(t){t.b=new zSt(t),t.c=new vi}function sst(t){this.q=new y.Date(AM(t))}function FSt(t){this.c=t,this.a=1,this.b=1}function ost(t){iM(),this.b=t,this.a=!0}function USt(){this.a=new Ov,this.b=new Ov}function zSt(t){Zst.call(this,t,null,null)}function jSt(){Gi.call(this,"POLYOMINO",0)}function iL(t){ct(t,142)&&a(t,142).Xg()}function XW(t){return Hn(t.b!=0),t.a.a.c}function mD(t){return Hn(t.b!=0),t.c.b.c}function Wu(t,e,n){return t.a+=e,t.b+=n,t}function Xee(t,e,n){return t.a*=e,t.b*=n,t}function rL(t,e,n){return t.a-=e,t.b-=n,t}function HSt(t,e,n){return t.a+=ml(e,0,n),t}function ZW(t){return t.a=-t.a,t.b=-t.b,t}function YW(t){return J3(t.d.e-t.e.e)-t.a}function Zee(t,e){return t.c.nc(a(e,134))}function Yee(t,e,n){return Ut(e,wIt(t,n))}function Kee(t,e){return t>0?e*e/t:e*e*100}function Jee(t,e){return t>0?e/(t*t):e*100}function Qee(t,e,n){QL(kc(t.a),e,CAt(n))}function tne(t,e,n){QL(Ya(t.a),e,AAt(n))}function Mu(t,e,n){lu.call(this,t,e,n,2)}function GSt(t,e){TT(),eL.call(this,t,e)}function cst(t,e){Ap(),dD.call(this,t,e)}function WSt(t,e){Ap(),dD.call(this,t,e)}function $St(t,e){Ap(),cst.call(this,t,e)}function KW(t,e){Hu(),UD.call(this,t,e)}function ast(t,e){Hu(),UD.call(this,t,e)}function VSt(t,e){Hu(),KW.call(this,t,e)}function ust(t,e){Hu(),KW.call(this,t,e)}function qSt(t,e){Hu(),ust.call(this,t,e)}function XSt(t,e){Hu(),ast.call(this,t,e)}function ZSt(t,e){Hu(),UD.call(this,t,e)}function ene(t,e,n){return e.ak(t.e,t.c,n)}function nne(t,e,n){return e.bk(t.e,t.c,n)}function lst(t,e,n){return Z7(BL(t,e),n)}function JW(t,e){return B1(t.e,a(e,42))}function ine(t){return t==null?null:cxe(t)}function rne(t){return t==null?null:Bge(t)}function YSt(t){this.c=t,th(t,0),eh(t,0)}function gM(t,e){this.c=t,rM.call(this,t,e)}function JT(t,e){this.a=t,gM.call(this,t,e)}function hst(t){this.a=t,this.b=e4t(this.a.d)}function sne(t,e){this.d=t,Zj(this),this.b=e}function fst(){tPt.call(this),this.Bb|=ao}function bD(){uhe.call(this,new xm,new vi)}function QW(t,e,n){CL.call(this,t,e,n,null)}function dst(t,e,n){CL.call(this,t,e,n,null)}function cd(t,e){t.a.bd(t.b,e),++t.b,t.c=-1}function pst(t,e){var n;return n=t.e,t.e=e,n}function de(t){return qT(t==null||Hb(t)),t}function Yt(t){return qT(t==null||Gb(t)),t}function hi(t){return qT(t==null||Es(t)),t}function one(t,e){return si(t),si(e),TC(t,e)}function KSt(t){return t>8?0:t+1}function JSt(t){uu(t.c),t.b.b=t.b,t.b.a=t.b}function QSt(t,e){O5t.call(this,t),this.a=e}function gi(t,e){O5t.call(this,t),this.a=e}function cne(t){mut.call(this,0,0),this.f=t}function t$(t){var e;e=t[N_]|0,t[N_]=e+1}function ane(t,e,n){return t.Ld(e,n)<=0?n:e}function une(t,e){return a(O2(t.b,e),180)}function lne(t,e){return a(O2(t.c,e),199)}function e$(t){return a(Ee(t.a,t.b),269)}function tTt(t){return new We(t.c,t.d+t.a)}function gst(t){return N1(Jre(Vo(t)?gl(t):t))}function eTt(t){return Eu(),jEt(a(t,179))}function Fg(){Fg=P,Ovt=qe((Ju(),E0))}function wD(){wD=P,y.Math.pow(2,-65)}function sL(t,e,n){++t.j,t.Yh(),wV(t,e,n)}function nTt(t,e,n){++t.j,t.Vh(e,t.Ch(e,n))}function mst(t,e,n){return n=Lu(t,e,3,n),n}function bst(t,e,n){return n=Lu(t,e,6,n),n}function wst(t,e,n){return n=Lu(t,e,9,n),n}function qd(t,e){return I$(e,Spt),t.f=e,t}function vst(t,e){return(e&qi)%t.d.length}function hne(t,e){return R5(),VM(e.d.g,t)}function iTt(t,e){return wr(t.a,e,"")==null}function rTt(t,e,n){return Bht(t.c,t.b,e,n)}function fne(t,e,n){var i;i=t.fd(e),i.Bc(n)}function sTt(t,e){this.a=t,AG.call(this,e)}function oL(t,e){this.a=t,AG.call(this,e)}function oTt(t,e){this.c=t,i_.call(this,e)}function cTt(t){this.b=t,this.a=this.b.b.Tb()}function _st(t,e){p9.call(this,t),this.a=e}function n$(t,e){p9.call(this,t),this.a=e}function es(t,e){kr.call(this,t),this.a=e}function $v(t,e){Uc.call(this,A4+t+DO+e)}function vD(){CQt.call(this,new vi),this.a=3}function cL(t){return!t.a&&(t.a=new ln),t.a}function _D(t){t.b?_D(t.b):t.f.c.Zb(t.e,t.d)}function aTt(t){this.a=(we(),new cT(si(t)))}function M1(t,e){if(!t)throw K(new yc(e))}function yst(t,e){if(!t)throw K(new yn(e))}function xst(t,e,n){return t.lastIndexOf(e,n)}function dne(t,e,n){return t.apply(e,n);var i}function i$(t,e,n){return E2(t,a(e,23),n)}function pne(t,e){return YG(WIt(t.a,e,!0))}function gne(t,e){return YG($It(t.a,e,!0))}function uTt(t){return new M3t((Yv(t),t.a))}function r$(t){return String.fromCharCode(t)}function mne(t){return t==null?null:t.message}function bne(t,e){t.e=e,e!=null&&NSt(e,vZ,t)}function wne(t,e,n){return ro(t[e.b],t[n.b])}function Mst(t,e,n,i){JD.call(this,t,e,n,i)}function aL(t){Sle.call(this,t,(EN(),RK))}function vne(t,e){return t.k.a=(En(e),e+10)}function _ne(t,e){return t.k.a=(En(e),e+10)}function yne(t,e){return R5(),!VM(e.d.g,t)}function lTt(){lTt=P,T1t=dt(Io,wt,21,256,0,1)}function me(){me=P,$m=(me(),!1),TE=!0}function hTt(){this.b=new go,this.c=new Dt}function Est(){this.d=new go,this.e=new go}function Sst(){this.k=new go,this.n=new go}function fTt(){this.b=new k3t,this.a=new _e}function dTt(){this.b=new vi,this.a=new vi}function pTt(){this.b=new $r,this.a=new $r}function gTt(){this.a=new Dt,this.d=new Dt}function mTt(){this.a=new Dt,this.b=new Dt}function bTt(){this.a=new rv,this.b=new DG}function wTt(){this.a=new M9,this.c=new bs}function yD(){this.n=new u2,this.i=new lM}function vTt(){yD.call(this),this.a=new go}function Tst(t,e,n){return n=Lu(t,e,11,n),n}function sr(t,e){return t.a+=e.a,t.b+=e.b,t}function za(t,e){return t.a-=e.a,t.b-=e.b,t}function xne(t,e){var n;return n=e.Yg(t.a),n}function Cst(t,e){return a(t.b.cd(e),190).a}function Mne(t,e){return e==t||ZC(B7(e),t)}function Ene(t){return t<100?null:new w1(t)}function Sne(t,e,n){n!=null&&dat(e,Jq(t,n))}function Tne(t,e,n){n!=null&&pat(e,Jq(t,n))}function mM(t,e,n,i){Wt.call(this,t,e,n,i)}function Ast(t,e,n,i){Wt.call(this,t,e,n,i)}function _Tt(t,e,n,i){Ast.call(this,t,e,n,i)}function yTt(t,e,n,i){XD.call(this,t,e,n,i)}function s$(t,e,n,i){XD.call(this,t,e,n,i)}function kst(t,e,n,i){XD.call(this,t,e,n,i)}function xTt(t,e,n,i){s$.call(this,t,e,n,i)}function Lst(t,e,n,i){s$.call(this,t,e,n,i)}function pn(t,e,n,i){kst.call(this,t,e,n,i)}function MTt(t,e,n,i){Lst.call(this,t,e,n,i)}function ETt(t,e,n,i){_ot.call(this,t,e,n,i)}function STt(t,e,n){this.a=t,Kit.call(this,e,n)}function Cne(t,e,n){return t.d=a(e.Kb(n),206)}function TTt(t,e){return t.Pi().dh().Zg(t,e)}function Pst(t,e){return t.Pi().dh()._g(t,e)}function o$(t,e){return Ao(),Zle(t.tc(),e)!=-1}function Ane(t,e){return ts(),new PSt(t.tc(),e)}function xD(t){return Ao(),t.hc()?t.ic():null}function Ist(t){return Gb(t)?(En(t),t):t.$d()}function MD(t){return!isNaN(t)&&!isFinite(t)}function Rst(t){$b(),this.b=(we(),new Iv(t))}function $b(){$b=P,new Dj((we(),we(),fo))}function CTt(){CTt=P,Jqt=dt(un,te,1,0,5,1)}function Dst(){Dst=P,Qqt=dt(un,te,1,0,5,1)}function ATt(){ATt=P,Oqt=dt(un,te,1,0,5,1)}function kTt(){kTt=P,E1t=dt(px,wt,192,256,0,1)}function LTt(){LTt=P,C1t=dt(Vm,wt,149,256,0,1)}function PTt(){PTt=P,L1t=dt(qm,wt,168,256,0,1)}function ITt(){ITt=P,S1t=dt(U4,wt,159,128,0,1)}function RTt(t){this.b=t,this.a=(Ao(),Ao(),m1t)}function DTt(t){this.b=t,nD.call(this,rO,0)}function NTt(t){this.c=t,nD.call(this,rO,0)}function OTt(t){return t.c?nc(t.c.a,t,0):-1}function c$(t,e){return YG($It(t.a,e,!1))}function a$(t,e){return YG(WIt(t.a,e,!1))}function Vv(t,e){return t.b.sd(new ort(t,e))}function BTt(t,e){return t.b.sd(new wMt(t,e))}function ED(t,e){if(!t)throw K(new yn(e))}function Nst(t,e){if(!t)throw K(new Bxt(e))}function Ost(t,e){y9(this),this.e=t,this.f=e}function Bst(){y9(this),this.e=0,this.f=!0}function Fst(t,e){this.c=t,A$.call(this,t,e)}function FTt(t,e){return ct(e,15)&&rNt(t.c,e)}function SD(t,e,n){return a(t.c,64).yj(e,n)}function kne(t,e,n){return a(t.c,64).xj(e,n)}function Lne(t,e,n){return ene(t,a(e,311),n)}function Ust(t,e,n){return nne(t,a(e,311),n)}function Pne(t,e,n){return w8t(t,a(e,311),n)}function UTt(t,e,n){return mge(t,a(e,311),n)}function Ine(t,e){return rd(),ni(Et(t.a),e)}function Rne(t,e){return rd(),ni(Et(t.a),e)}function Dne(t){return Ao(),R9(t.a)?mkt(t):null}function zTt(t,e){return t.b.Qb(e)?l4t(t,e):null}function uL(t,e){return t.substr(e,t.length-e)}function jTt(t){return a(t,11).f.c.length!=0}function HTt(t){return a(t,11).d.c.length!=0}function QT(t){return t==Nx||t==Sd||t==Gc}function GTt(t){Th(t.a),D5t(t.c,t.b),t.b=null}function Eh(t){NW(this),Kst(this.c,0,t.yc())}function TD(t){eSt(this),ld(this),yo(this,t)}function WTt(t,e,n){this.d=t,this.b=n,this.a=e}function ja(t,e,n){this.a=t,this.b=e,this.c=n}function $Tt(t,e,n){this.a=t,this.b=e,this.c=n}function VTt(t,e,n){this.c=t,this.a=e,this.b=n}function Nne(t,e,n,i){t.d.b.$b(n),t.d.b.Zb(i,e)}function tC(t,e){return Ao(),si(e),new ySt(t,e)}function One(t){return h7(),$i((Mkt(),Qzt),t)}function Bne(t){return CN(),$i((Ekt(),tjt),t)}function Fne(t){return EN(),$i((V5t(),qzt),t)}function Une(t){return z1(),$i((e5t(),Xzt),t)}function zne(t){return H7(),$i((XPt(),ejt),t)}function jne(t){return $2(),$i((Z5t(),ijt),t)}function Hne(t){return $C(),$i((Y5t(),sjt),t)}function Gne(t){return P9(),$i((KAt(),ojt),t)}function Wne(t){return kN(),$i((Skt(),Mjt),t)}function $ne(t){return wC(),$i((w5t(),Djt),t)}function Vne(t){return Mo(),$i((bLt(),Fjt),t)}function qne(t){return jM(),$i((X5t(),Gjt),t)}function Xne(t){return Ke(),$i((xPt(),Kjt),t)}function u$(t){JD.call(this,t.d,t.c,t.a,t.b)}function zst(t){JD.call(this,t.d,t.c,t.a,t.b)}function Zne(t){return RC(),$i((v5t(),eHt),t)}function Yne(t){return Po(),$i((qMt(),nHt),t)}function Kne(t){return XC(),$i((gLt(),uHt),t)}function Jne(t){return vN(),$i((Tkt(),lHt),t)}function Qne(t){return KM(),$i(($Lt(),hHt),t)}function tie(t){return I2(),$i((Ckt(),fHt),t)}function eie(t){return IN(),$i((u5t(),dHt),t)}function nie(t){return BN(),$i((a5t(),pHt),t)}function iie(t){return l_(),$i((l5t(),mHt),t)}function rie(t){return C7(),$i((HLt(),bHt),t)}function sie(t){return mP(),$i((GLt(),wHt),t)}function oie(t){return QM(),$i((WLt(),vHt),t)}function cie(t){return So(),$i((v6t(),_Ht),t)}function aie(t){return BM(),$i((m5t(),yHt),t)}function uie(t){return tp(),$i((b5t(),MHt),t)}function lie(t){return dN(),$i((Akt(),EHt),t)}function hie(t){return bl(),$i((mLt(),THt),t)}function fie(t){return E7(),$i((VLt(),eWt),t)}function die(t){return nw(),$i((q5t(),nWt),t)}function pie(t){return WC(),$i((pLt(),iWt),t)}function gie(t){return T_(),$i((OPt(),rWt),t)}function mie(t){return Fo(),$i((h5t(),oWt),t)}function bie(t){return s7(),$i((f5t(),cWt),t)}function wie(t){return NN(),$i((d5t(),aWt),t)}function vie(t){return U2(),$i((g5t(),uWt),t)}function _ie(t){return WN(),$i((p5t(),lWt),t)}function jst(t,e){for(;t.b.sd(new ort(t,e)););}function CD(t,e,n){this.b=t,this.a=e,this.c=n}function Hst(t,e,n){this.a=t,this.b=e,this.c=n}function qTt(t,e,n){this.a=t,this.b=e,this.c=n}function AD(t,e,n){this.e=e,this.b=t,this.d=n}function l$(t){var e;return e=new q0,e.e=t,e}function yie(t){return!t.e&&(t.e=new Dt),t.e}function Zl(){Zl=P,sHt=new Ak,oHt=new gv}function h$(){h$=P,G1t=new Pn,Vzt=new Tt}function lL(){lL=P,mB=new Bc,bB=new ES}function xie(t){return pC(),$i((Bkt(),LWt),t)}function Mie(t){return Tm(),$i((_5t(),TWt),t)}function Eie(t){return ZM(),$i((K5t(),E$t),t)}function Sie(t){return JC(),$i((ULt(),T$t),t)}function Tie(t){return Sf(),$i((Lkt(),BWt),t)}function Cie(t){return Zh(),$i((kkt(),UWt),t)}function Aie(t){return RL(),$i((Pkt(),jWt),t)}function kie(t){return mu(),$i((XMt(),g$t),t)}function Lie(t){return JL(),$i((x5t(),$$t),t)}function Pie(t){return MN(),$i((Okt(),W$t),t)}function Iie(t){return vm(),$i((Ikt(),M$t),t)}function Rie(t){return sN(),$i((Dkt(),N$t),t)}function Die(t){return cN(),$i((Nkt(),O$t),t)}function Nie(t){return RN(),$i((Rkt(),j$t),t)}function Oie(t){return r7(),$i((y5t(),G$t),t)}function Bie(t){return b7(),$i((J5t(),eVt),t)}function Fie(t){return FN(),$i((M5t(),nVt),t)}function Uie(t){return t0(),$i((vLt(),rVt),t)}function zie(t){return i0(),$i((BPt(),oVt),t)}function jie(t){return md(),$i((zLt(),cVt),t)}function Hie(t){return Kh(),$i((E5t(),NVt),t)}function Gie(t){return Ht(),$i((oLt(),OVt),t)}function Wie(t){return Ls(),$i((PLt(),DVt),t)}function $ie(t){return Kg(),$i((T5t(),PVt),t)}function Vie(t){return r0(),$i((YPt(),IVt),t)}function qie(t){return G1(),$i((wLt(),RVt),t)}function Xie(t){return Js(),$i((_Lt(),TVt),t)}function Zie(t){return ip(),$i((Q5t(),CVt),t)}function Yie(t){return gd(),$i((tLt(),AVt),t)}function Kie(t){return S7(),$i((jLt(),kVt),t)}function Jie(t){return Ju(),$i((eLt(),jVt),t)}function Qie(t){return ma(),$i((ZPt(),HVt),t)}function tre(t){return a7(),$i((iLt(),GVt),t)}function ere(t){return Cu(),$i((rLt(),VVt),t)}function nre(t){return Ch(),$i((S5t(),XVt),t)}function ire(t){return hu(),$i((C5t(),YVt),t)}function rre(t){return Ha(),$i((A5t(),JVt),t)}function sre(t){return Q7(),$i((AEt(),yqt),t)}function ore(t){return Am(),$i((nLt(),Mqt),t)}function cre(t){return eE(),$i((FPt(),Nqt),t)}function f$(t,e,n){return t=e)throw K(new _9)}function Dre(t,e){var n;for(n=0;n0?1:0}function aot(t){return!Array.isArray(t)&&t.sl===B}function LCt(t){return t!=null&&S$(t)&&t.sl!==B}function uot(t,e){return ct(e,23)&&Pp(t,a(e,23))}function PCt(t,e){return ct(e,23)&&Nue(t,a(e,23))}function Fre(t,e){return t.a.get(e)!==void 0}function lot(t){return pu(t,26)*d4+pu(t,27)*p4}function ICt(t,e){return $ue(new ie,new Jj(t),e)}function hot(t,e){if(t==null)throw K(new vT(e))}function E2(t,e,n){return Tu(t.a,e),xot(t,e.g,n)}function HD(t,e,n){R6t(0,e,t.length),NL(t,0,e,n)}function pm(t,e,n){t_(e,t.c.length),z5(t.c,e,n)}function Ure(t,e,n){oDt(n,t,1),Ut(e,new kMt(n,t))}function zre(t,e,n){VC(n,t,1),Ut(e,new TMt(n,t))}function fot(){this.d=new xi,this.e=new V4t(this)}function RCt(){this.b=new tn,this.c=new $4t(this)}function DCt(){hAt(),this.e=new Fr,this.d=new Fr}function v$(t,e){this.b=new Fr,this.a=t,this.c=e}function Xv(t,e,n){V1(),this.e=t,this.d=e,this.a=n}function GD(t,e,n){var i;t&&(i=t.i,i.d=e,i.a=n)}function WD(t,e,n){var i;t&&(i=t.i,i.c=e,i.b=n)}function NCt(t,e,n){var i;for(i=0;i0?y.Math.log(t/e):-100}function nse(t,e){return ro(t.c.c+t.c.b,e.c.c+e.c.b)}function A$(t,e){this.d=t,$n.call(this,t),this.e=e}function qb(t,e,n){return Qle(t,e.g,n),Tu(t.c,e),t}function ise(t){return L_(t,(Js(),ah)),t.d=!0,t}function si(t){if(t==null)throw K(new s2);return t}function S2(t){if(t==null)throw K(new s2);this.a=t}function k$(t){t.a=null,t.e=null,uu(t.b),t.d=0,++t.c}function L$(t){return!t.j&&eit(t,Sve(t.g,t.b)),t.j}function rse(t){return t.b.k.a+=t.a.f*(t.a.a-1),null}function rC(t){Wv(t.b!=-1),Em(t.c,t.a=t.b),t.b=-1}function XCt(t){ZEt(this),RG(this.a,kat(8>t?8:t)<<1)}function Tot(t,e){Ba.call(this,1),this.a=t,this.b=e}function P$(t,e,n){this.a=t,lV(n,e),this.c=e,this.b=n}function ZCt(t,e){this.a=t,this.b=e,this.c=this.b.lc()}function mL(t,e){hSt(t,ct(e,184)?e:a(e,1630).rk())}function YCt(t){return si(t),ct(t,476)?a(t,476):Yc(t)}function Cot(t,e){return e?yo(t,e):!1}function wM(t,e){return t.a+=String.fromCharCode(e),t}function S1(t,e){return t.a+=String.fromCharCode(e),t}function sse(t,e,n,i){return t.a+=""+e.substr(n,i-n),t}function ose(t,e,n){var i;return i=B2(t,e),Fkt(t,e,n),i}function cse(t,e,n){var i;for(i=0;i=t.g}function xse(t,e){return L2(),t==n0(e)?Dm(e):n0(e)}function wr(t,e,n){return Es(e)?tc(t,e,n):Au(t.d,e,n)}function N$(t,e,n){var i;return i=GV(t,e,n),wht(t,i)}function oC(t,e){var n;return n=t.a._b(),fce(e,n),n-1-e}function Iot(t,e){var n;return n=new EL(t),cut(n,e),n}function Vr(t,e,n){return vee(n==null||o_e(t,n)),t[e]=n}function C2(t,e){var n;n=t.a.length,B2(t,n),Fkt(t,n,e)}function r4t(t,e){var n;++t.j,n=t.hi(),t.Wh(t.Ch(n,e))}function Mse(t,e){C2(t,new S2(e.f!=null?e.f:""+e.g))}function Ese(t,e){C2(t,new S2(e.f!=null?e.f:""+e.g))}function s4t(t){this.b=new Dt,this.a=new Dt,this.c=t}function dl(t){this.c=new go,this.a=new Dt,this.b=t}function o4t(t){Est.call(this),this.a=new go,this.c=t}function Rot(t,e,n){gT.call(this,e),this.a=t,this.b=n}function Dot(t,e,n){Ba.call(this,t),this.a=e,this.b=n}function Not(t,e,n){this.a=t,p9.call(this,e),this.b=n}function c4t(t,e,n){this.a=t,pct.call(this,8,e,null,n)}function a4t(t){this.c=t,this.a=new Fr,this.b=new Fr}function u4t(t){this.c=t,this.b=this.c.a,this.a=this.c.e}function Sse(t){this.a=(En(ui),ui),this.b=t,new Sit}function mm(t){return!t.d&&(t.d=new Ss(Do,t,1)),t.d}function l4t(t,e){var n;return n=t.b.$b(e),t.d.b.$b(n),n}function Oot(t,e){for(;e-- >0;)t=t<<1|(t<0?1:0);return t}function Rp(t,e){return zt(t)===zt(e)||t!=null&&Fi(t,e)}function bm(t,e){return nC(e,t.a.c.length),Ee(t.a,e)}function O$(t){return y.Math.sqrt(t.a*t.a+t.b*t.b)}function Tse(t){return String.fromCharCode.apply(null,t)}function Dp(t){return ct(t,13)?a(t,13)._b():gC(t.tc())}function h4t(t){return ct(t,543)?t:new hMt(t)}function Mc(t){return!t.a&&t.c?t.c.b:t.a}function B$(t){t.c?B$(t.c):(t.d=!0,Zbe(t))}function Yv(t){t.c?Yv(t.c):($M(t),t.d=!0)}function f4t(t){wL(t.a),t.b=dt(un,te,1,t.b.length,5,1)}function F$(t){this.c=t,this.b=t.a.b.a,Yrt(t.a.c,this)}function Cse(t,e){t.c<0||t.b.b0?new Ost(t-1,e):new Ost(t,e)}function v4t(t,e){return LD(),new Cut(new TSt(t),new SSt(e))}function xM(t){if(du(t.d),t.d.d!=t.c)throw K(new C)}function Ose(t,e){var n;return n=t.a.get(e),n??[]}function Bse(t,e){var n;return n=zi(t.f,e),Mat(e,n),null}function _i(t,e,n,i){return t6t(t,e,n,!1),Jat(t,i),t}function Fse(t,e){return t.a=$h(t.a,0,e)+""+uL(t.a,e+1),t}function Use(t){return t.j.c=dt(un,te,1,0,5,1),t.a=-1,t}function zse(t){return!t.c&&(t.c=new pn(Si,t,5,8)),t.c}function jse(t){return!t.b&&(t.b=new pn(Si,t,4,7)),t.b}function j$(t){return!t.n&&(t.n=new Wt(ic,t,1,7)),t.n}function jot(t){return!t.c&&(t.c=new Wt(Rl,t,9,9)),t.c}function MM(t){return t.e==ME&&Qnt(t,nde(t.g,t.b)),t.e}function bL(t){return t.f==ME&&tit(t,Lpe(t.g,t.b)),t.f}function _4t(t){return qT(t==null||S$(t)&&t.sl!==B),t}function Hot(t,e){if(t==null)throw K(new vT(e));return t}function Xb(t){var e;return e=t.b,!e&&(t.b=e=new jj(t)),e}function Got(t){var e;return e=t.Gh(t.f),ni(t,e),e.hc()}function wL(t){var e;for(e=t.tc();e.hc();)e.ic(),e.jc()}function y4t(t){return Hn(t.bi&&++i,i}function Kd(t){var e,n;return n=(e=new b1,e),yC(n,t),n}function W$(t){var e,n;return n=(e=new b1,e),I8t(n,t),n}function Vse(t){if(t.p!=5)throw K(new na);return or(t.f)}function qse(t){if(t.p!=5)throw K(new na);return or(t.k)}function P4t(t){return t?t.Wb():!null.tc().hc()}function tN(t){return t.n&&(t.e!==IOt&&t.Pd(),t.j=null),t}function Xse(t){return t!=null&&AT(ZF,t.toLowerCase())}function $$(t){this.f=t,this.c=this.f.e,t.f>0&&e8t(this)}function jg(t,e,n,i){this.e=t,this.a=e,this.c=n,this.d=i}function I4t(t,e,n,i){Hu(),i5t.call(this,e,n,i),this.a=t}function R4t(t,e,n,i){Hu(),i5t.call(this,e,n,i),this.a=t}function D4t(t,e,n,i){this.b=t,this.c=i,nD.call(this,e,n)}function N4t(t,e){this.a=t,sne.call(this,t,a(t.d,15).fd(e))}function ld(t){t.a.a=t.c,t.c.b=t.a,t.a.b=t.c.a=null,t.b=0}function $ot(t,e){return t.b=e.b,t.c=e.c,t.d=e.d,t.a=e.a,t}function Zse(t,e,n){t.i=0,t.e=0,e!=n&&E6t(t,e,n)}function Yse(t,e,n){t.i=0,t.e=0,e!=n&&S6t(t,e,n)}function O4t(t,e){var n;return n=EV(e),a(zi(t.c,n),21).a}function Kse(t,e,n){return n>=0&&le(t.substr(n,e.length),e)}function V$(t,e){return e==null?!!Ea(t.d,null):Fre(t.e,e)}function B4t(t,e){t.d&&!t.d.a&&(IG(t.d,e),B4t(t.d,e))}function F4t(t,e){t.e&&!t.e.a&&(IG(t.e,e),F4t(t.e,e))}function U4t(t,e){this.g=t,this.d=Y(Z(Cl,1),Ih,8,0,[e])}function Vot(t,e){new Fr,this.a=new Va,this.b=t,this.c=e}function z4t(){_lt(this,new T8),this.wb=(T1(),Ae),Q3()}function j4t(t,e){return ct(e,166)&&le(t.b,a(e,166).Lf())}function Jse(t,e){return fu(t),fu(e),Wxt(a(t,23),a(e,23))}function qot(t,e,n,i,r,c){$5t.call(this,t,e,n,i,r,c?-2:-1)}function H4t(t,e,n,i){Art.call(this,e,n),this.b=t,this.a=i}function G4t(t,e){AQt.call(this,new x$(t)),this.a=t,this.b=e}function Xot(t){this.b=t,this.c=t,t.e=null,t.c=null,this.a=1}function W4t(t,e){var n;return n=Og(t.ql),e==null?n:n+": "+e}function ns(t,e){return N1(Wre(Vo(t)?gl(t):t,Vo(e)?gl(e):e))}function Xh(t,e){return N1($re(Vo(t)?gl(t):t,Vo(e)?gl(e):e))}function Qse(t,e){return N1(Vre(Vo(t)?gl(t):t,Vo(e)?gl(e):e))}function Zot(t){return t&&t.hashCode?t.hashCode():lm(t)}function EM(t){return we(),ct(t,49)?new XG(t):new hD(t)}function we(){we=P,fo=new xe,ap=new hn,iB=new Se}function SM(){SM=P,j1t=new ke,jzt=new ke,H1t=new mn}function Yot(){Yot=P,Yzt=new An,Jzt=new fot,Kzt=new zn}function TM(){TM=P;var t,e;e=!Ufe(),t=new ft,CK=e?new Q:t}function $4t(t){this.c=t,this.b=new Ub(a(si(new Je),65))}function V4t(t){this.c=t,this.b=new Ub(a(si(new Li),65))}function Np(){this.a=new Va,this.b=(Ah(3,ex),new qu(3))}function q$(t,e,n){this.a=t,this.e=!1,this.d=e,this.c=n}function q4t(t,e,n){return t.f?t.f.re(e,n):!1}function Et(t){return!t.s&&(t.s=new Wt(Ra,t,21,17)),t.s}function Wi(t){return!t.q&&(t.q=new Wt(ph,t,11,10)),t.q}function Kot(t){return!t.a&&(t.a=new Wt(zr,t,10,11)),t.a}function toe(t,e){var n;return n=Wrt(t.a,e),n&&(e.d=null),n}function Kv(t,e,n,i){Vr(t.c[e.g],n.g,i),Vr(t.c[n.g],e.g,i)}function eN(t,e,n,i){Vr(t.c[e.g],e.g,n),Vr(t.b[e.g],e.g,i)}function A2(t,e,n){gN(),t&&wr(ctt,t,e),t&&wr(wI,t,n)}function eoe(t,e){pSt(t,or(ns(E1(e,24),oO)),or(ns(e,oO)))}function da(t){var e;return e=a(an(t,16),24),e||t.Rg()}function noe(t){if(t.p!=0)throw K(new na);return CT(t.f,0)}function ioe(t){if(t.p!=0)throw K(new na);return CT(t.k,0)}function Bo(t){return t.u||(pl(t),t.u=new sTt(t,t)),t.u}function roe(t){return t==hp||t==Zp}function soe(t){T9(),y.setTimeout(function(){throw t},0)}function X$(t){this.c=t.c,this.d=t.d,this.b=t.b,this.a=t.a}function Op(t,e){this.e=t,this.a=un,this.b=yNt(e),this.c=e}function X4t(){this.b=new $r,this.c=new Fr,this.d=new OG}function Sf(){Sf=P,Qm=new brt(gE,0),Xp=new brt(pE,1)}function vm(){vm=P,sg=new xrt(pE,0),cy=new xrt(gE,1)}function Z4t(){Z4t=P,$b(),g1t=($o(),Azt),Ezt=new Uot(new Ub(g1t))}function ooe(t){return Z4t(),si(t),g1t==t?Ezt:new Uot(new Ub(t))}function Hg(t,e,n,i,r,c,l){return new aV(t.e,e,n,i,r,c,l)}function Y4t(t,e,n,i,r,c){this.a=t,zV.call(this,e,n,i,r,c)}function K4t(t,e,n,i,r,c){this.a=t,zV.call(this,e,n,i,r,c)}function Jot(t){this.e=t,this.b=this.e.a.entries(),this.a=[]}function Qot(t){t.d=t.d-15,t.b=t.b-15,t.c=t.c+15,t.a=t.a+15}function J4t(t,e){var n;n=a(Wct(t.e,e),249),n&&(t.d=!0)}function Zc(t,e){return e==null?Ua(Ea(t.d,null)):RT(t.e,e)}function Ea(t,e){return C6t(t,e,Ose(t,e==null?0:t.b.he(e)))}function Q4t(t,e){return e===t?"(this Map)":e==null?tu:Yc(e)}function coe(t,e){return t.a?e.pg().tc():a(e.pg(),64).oh()}function _L(t,e,n){return t.a=$h(t.a,0,e)+(""+n)+uL(t.a,e),t}function Gg(t,e){if(e==null)throw K(new s2);return Xfe(t,e)}function aoe(){return h7(),Y(Z(egt,1),jt,391,0,[NK,tgt])}function uoe(){return CN(),Y(Z(igt,1),jt,390,0,[ngt,OK])}function loe(){return kN(),Y(Z(Cgt,1),jt,387,0,[GK,hB])}function hoe(){return vN(),Y(Z(O0t,1),jt,386,0,[N0t,wJ])}function foe(){return I2(),Y(Z(U0t,1),jt,317,0,[T6,S6])}function doe(){return dN(),Y(Z(rmt,1),jt,383,0,[RJ,imt])}function poe(){return cN(),Y(Z(owt,1),jt,388,0,[_Q,swt])}function goe(){return sN(),Y(Z(rwt,1),jt,438,0,[vQ,iwt])}function moe(){return RN(),Y(Z(cwt,1),jt,447,0,[vF,UE])}function boe(){return RL(),Y(Z($bt,1),jt,437,0,[Wbt,lF])}function woe(){return Sf(),Y(Z(OWt,1),jt,466,0,[Qm,Xp])}function voe(){return Zh(),Y(Z(FWt,1),jt,465,0,[x0,rf])}function _oe(){return vm(),Y(Z(x$t,1),jt,417,0,[sg,cy])}function yoe(){return pC(),Y(Z(kWt,1),jt,472,0,[cA,oA])}function xoe(){return MN(),Y(Z(uwt,1),jt,389,0,[awt,EQ])}function nN(t,e,n,i){return n>=0?t.Dg(e,n,i):t.lg(null,n,i)}function Moe(t,e){var n;n=a(cn(e,(YT(),pA)),35),o7t(t,n)}function Z$(t){var e;return e=fl(t.b),yo(e,t.c),yo(e,t.i),e}function tct(t){return zt(t.a)===zt((XV(),ltt))&&Uye(t),t.a}function tAt(t){return t.b.b==0?t.a.Be():g$(t.b)}function ect(t){var e;return e=t.g,a(e||(t.g=new k8(t)),15)}function Zh(){Zh=P,x0=new wrt(BY,0),rf=new wrt("UP",1)}function Y$(t,e){Gnt(this,new We(t.a,t.b)),Wnt(this,fl(e))}function eAt(t,e){yD.call(this),nat(this),this.a=t,this.c=e}function nct(t,e,n){Hu(),gT.call(this,e),this.a=t,this.b=n}function K$(t,e,n){Ai(),Ba.call(this,t),this.b=e,this.a=n}function Eoe(t,e){var n=TK[t.charCodeAt(0)];return n??t}function Soe(t,e){var n;return n=Cue(t.f,e),sr(ZW(n),t.f.d)}function nAt(t){var e;e=t.c.b.b,t.b=e,t.a=t.c.b,e.a=t.c.b.b=t}function Toe(t){return t.b==0?null:(Hn(t.b!=0),Ql(t,t.a.a))}function Coe(t){return so(Yd(Ka(pu(t,32)),32),Ka(pu(t,32)))}function iAt(t){return ct(t,62)&&(a(a(t,17),62).Bb&ca)!=0}function Tr(t){return Math.max(Math.min(t,qi),-2147483648)|0}function iN(t,e){return mct(e),Qae(t,dt(Gn,pi,22,e,15,1),e)}function Aoe(t,e){return L2(),t==io(n0(e))||t==io(Dm(e))}function rAt(t){var e;return e=wN(t),"n_"+(e??""+t.o)}function sAt(t){this.b=(Ao(),Ao(),Ao(),Szt),this.a=a(si(t),43)}function oAt(t){yD.call(this),nat(this),this.a=t,this.c=!0}function cAt(t,e,n){this.d=t,this.b=new Dt,this.c=e,this.a=n}function J$(t,e,n,i){var r;r=new vTt,e.a[n.g]=r,E2(t.b,i,r)}function aAt(t,e){var n=t.a=t.a||[];return n[e]||(n[e]=t._d(e))}function yL(t,e){var n;n=t.q.getHours(),t.q.setDate(e),c4(t,n)}function uAt(t){var e;return e=new L9(tq(t.length)),XL(e,t),e}function koe(t){function e(){}return e.prototype=t||{},new e}function Loe(t,e){return i6t(t,e)?(ePt(t),!0):!1}function rN(t){return t.Db>>16!=3?null:a(t.Cb,35)}function Tf(t){return t.Db>>16!=9?null:a(t.Cb,35)}function Poe(t){if(t.p!=2)throw K(new na);return or(t.f)&qr}function Ioe(t){if(t.p!=2)throw K(new na);return or(t.k)&qr}function sN(){sN=P,vQ=new Mrt(qBt,0),iwt=new Mrt("FAN",1)}function Q$(t,e,n){var i;i=M6t(t,e,n),t.b=new WV(i.c.length)}function tc(t,e,n){return e==null?Au(t.d,null,n):km(t.e,e,n)}function ict(t,e){return Qg(so(Qg(a(t,149).a).a,a(e,149).a))}function lAt(){lAt=P,Gbt=v4t(Xt(1),Xt(4)),Hbt=v4t(Xt(1),Xt(2))}function hAt(){hAt=P,fWt=Xa(new as,(Mo(),Yo),(Po(),TB))}function fAt(){fAt=P,hWt=Xa(new as,(Mo(),Yo),(Po(),TB))}function dAt(){dAt=P,PWt=Ni(new as,(Mo(),Yo),(Po(),W4))}function Eu(){Eu=P,DWt=Ni(new as,(Mo(),Yo),(Po(),W4))}function pAt(){pAt=P,NWt=Ni(new as,(Mo(),Yo),(Po(),W4))}function tV(){tV=P,zWt=Ni(new as,(Mo(),Yo),(Po(),W4))}function gAt(){gAt=P,B$t=Xa(new as,(ZM(),lA),(JC(),lQ))}function mAt(t){return t.Db>>16!=6?null:a(t.Cb,105)}function bAt(t){return t.Db>>16!=7?null:a(t.Cb,207)}function wAt(t){return t.Db>>16!=7?null:a(t.Cb,253)}function io(t){return t.Db>>16!=11?null:a(t.Cb,35)}function Zb(t){return t.Db>>16!=17?null:a(t.Cb,24)}function vAt(t){return t.Db>>16!=3?null:a(t.Cb,139)}function CM(t){return t.Db>>16!=6?null:a(t.Cb,207)}function uC(t,e,n,i,r,c){return new Qd(t.e,e,t.pi(),n,i,r,c)}function rct(t,e){return PCt(t.a,e)?xot(t,a(e,23).g,null):null}function Roe(t,e){return kCt(Ka(t.q.getTime()),Ka(e.q.getTime()))}function Doe(t,e){var n;n=t.q.getHours(),t.q.setMonth(e),c4(t,n)}function Hs(t,e){t.c&&Lc(t.c.f,t),t.c=e,t.c&&Ut(t.c.f,t)}function Ks(t,e){t.c&&Lc(t.c.a,t),t.c=e,t.c&&Ut(t.c.a,t)}function Ts(t,e){t.d&&Lc(t.d.d,t),t.d=e,t.d&&Ut(t.d.d,t)}function ds(t,e){t.g&&Lc(t.g.i,t),t.g=e,t.g&&Ut(t.g.i,t)}function _At(t,e){return t.b+=e.b,t.c+=e.c,t.d+=e.d,t.a+=e.a,t}function sct(t){return uD(t.c),t.e=t.a=t.c,t.c=t.c.c,++t.d,t.a.f}function yAt(t){return uD(t.e),t.c=t.a=t.e,t.e=t.e.e,--t.d,t.a.f}function xAt(t,e){var n;return n=new dl(t),e.c[e.c.length]=n,n}function Noe(t,e){var n,i;n=e.c,i=n!=null,i&&C2(t,new S2(e.c))}function Ooe(t){var e;e=Mfe(a(cn(t,(tw(),TQ)),349)),e.Ef(t)}function eV(t,e){ct(t.Cb,96)&&e4(pl(a(t.Cb,96)),4),kh(t,e)}function oN(t,e){ct(t.Cb,248)&&(a(t.Cb,248).tb=null),kh(t,e)}function Boe(t,e){hIt(t,e),ct(t.Cb,96)&&e4(pl(a(t.Cb,96)),2)}function Foe(t,e){cD(this),this.f=e,this.g=t,tN(this),this.Pd()}function k2(t){this.c=new Fr,this.b=t.b,this.d=t.c,this.a=t.a}function MAt(){this.a=new qa,this.e=new $r,this.g=0,this.i=0}function C1(t,e,n){q6t(e,n,t._b()),this.c=t,this.a=e,this.b=n-e}function Gs(t,e){this.a=t,$3.call(this,t),t_(e,t._b()),this.b=e}function EAt(t){this.a=t,this.b=dt(CWt,wt,1637,t.e.length,0,2)}function Jv(t){this.a=y.Math.cos(t),this.b=y.Math.sin(t)}function Ei(t,e){this.b=(En(t),t),this.a=e&zm?e:e|64|Lf}function SAt(t,e,n){var i;q6t(e,n,t.c.length),i=n-e,Xit(t.c,e,i)}function TAt(t,e){var n;return n=a(XM(gm(t.a),e),13),n?n._b():0}function CAt(t){var e,n;return n=(Q3(),e=new b1,e),yC(n,t),n}function AAt(t){var e,n;return n=(Q3(),e=new b1,e),yC(n,t),n}function Qv(t){return ST(),ct(t.g,8)?a(t.g,8):null}function Uoe(t,e){var n;n=a(zi(t.g,e),57),pd(e.d,new IMt(t,n))}function Za(t,e){return Jo(),Yct(e)?new ND(e,t):new X5(e,t)}function Yl(t){return zo(Y(Z(ss,1),wt,9,0,[t.g.k,t.k,t.a]))}function zoe(){return RC(),Y(Z(tHt,1),jt,412,0,[iJ,rJ,nJ])}function joe(){return z1(),Y(Z(tf,1),jt,150,0,[K1t,Qh,bw])}function Hoe(){return tp(),Y(Z(xHt,1),jt,280,0,[k6,ty,wx])}function Goe(){return BM(),Y(Z(nmt,1),jt,318,0,[PJ,IJ,BB])}function Woe(){return IN(),Y(Z(j0t,1),jt,319,0,[z0t,PB,_J])}function $oe(){return BN(),Y(Z(G0t,1),jt,384,0,[yJ,H0t,xJ])}function Voe(){return l_(),Y(Z(gHt,1),jt,406,0,[MJ,C6,$4])}function qoe(){return Fo(),Y(Z(sWt,1),jt,410,0,[sF,Ga,ba])}function Xoe(){return s7(),Y(Z(Obt,1),jt,345,0,[Dbt,sQ,Nbt])}function Zoe(){return NN(),Y(Z(Ubt,1),jt,347,0,[Fbt,oQ,Bbt])}function Yoe(){return WN(),Y(Z(jbt,1),jt,346,0,[cQ,aQ,q6])}function Koe(){return U2(),Y(Z(zbt,1),jt,385,0,[V6,W6,$6])}function Joe(){return wC(),Y(Z(Ugt,1),jt,348,0,[qK,VK,XK])}function Qoe(){return JL(),Y(Z(fwt,1),jt,349,0,[_F,lwt,hwt])}function tce(){return r7(),Y(Z(H$t,1),jt,401,0,[MQ,yQ,xQ])}function ece(){return Tm(),Y(Z(SWt,1),jt,413,0,[oF,sA,cF])}function nce(){return hu(),Y(Z(ZVt,1),jt,419,0,[jf,lb,fh])}function ice(){return Ha(),Y(Z(KVt,1),jt,420,0,[Fh,hb,dh])}function rce(){return Kh(),Y(Z(Avt,1),jt,275,0,[hy,cb,DF])}function sce(){return FN(),Y(Z(Swt,1),jt,277,0,[AQ,Ewt,Mwt])}function oce(){return Ch(),Y(Z(Dw,1),jt,203,0,[lc,ta,hc])}function cce(){return Kg(),Y(Z(Evt,1),jt,316,0,[RF,Dx,yA])}function kAt(){kAt=P,Czt=Vi((Hv(),Y(Z(SK,1),jt,350,0,[p6,g6])))}function cN(){cN=P,_Q=new Ert("DFS",0),swt=new Ert("BFS",1)}function L2(){L2=P,lB=new Dt,HK=(ts(),new vi),jK=new Dt}function LAt(t,e,n){var i;i=new q,i.b=e,i.a=n,++e.b,Ut(t.d,i)}function PAt(t,e,n){Ba.call(this,25),this.b=t,this.a=e,this.c=n}function Su(t){Ai(),Ba.call(this,t),this.c=!1,this.a=!1}function ace(t){return t.a==(PM(),QF)&&Knt(t,Xbe(t.g,t.b)),t.a}function lC(t){return t.d==(PM(),QF)&&Jnt(t,t_e(t.g,t.b)),t.d}function uce(t,e){var n;return n=(En(t),t).g,$rt(!!n),En(e),n(e)}function nV(t,e){var n,i;return i=bM(t,e),n=t.a.fd(i),new J3t(t,n)}function AM(t){var e;return Vo(t)?(e=t,e==-0?0:e):yue(t)}function lce(t){return t.Db>>16!=6?null:a(SX(t),207)}function G(t){return Hn(t.a=e)throw K(new Uc(b0e(t,e)));return t}function IAt(t,e,n){if(t<0||en)throw K(new Uc(Xge(t,e,n)))}function dce(t){return Ao(),S1(tut((al(),d1t),S1(new om,91),t),93).a}function aN(t){return si(t),tX((Ao(),new $d(id(Zd(t.a,new X)))))}function uN(t){return new qu((Ah(t,bZ),FL(so(so(5,t),t/10|0))))}function oct(t,e){return t&&t.equals?t.equals(e):zt(t)===zt(e)}function cct(t,e){return e==0?!!t.o&&t.o.f!=0:Hq(t,e)}function pce(t,e){var n;n=lt(Yt(t.a.xe((dr(),PF)))),oOt(t,e,n)}function RAt(t,e,n){var i;i=xr(t.d,e),i>=0?P7(t,i,n):Qlt(t,e,n)}function rV(t,e,n){var i;i=t.d[e.o],t.d[e.o]=t.d[n.o],t.d[n.o]=i}function DAt(t,e){var n;for(n=t+"";n.length0&&t.a[--t.d]==0;);t.a[t.d++]==0&&(t.e=0)}function gce(t){return!!t.u&&kc(t.u.a).i!=0&&!(t.n&&Xq(t.n))}function hN(t){sC(),this.a=(we(),ct(t,49)?new XG(t):new hD(t))}function NAt(){this.c=new sSt,this.a=new wTt,this.b=new EEt,T3t()}function OAt(t,e,n){this.d=t,this.j=e,this.e=n,this.o=-1,this.p=3}function BAt(t,e,n){this.d=t,this.k=e,this.f=n,this.o=-1,this.p=5}function FAt(t,e,n,i,r,c){rat.call(this,t,e,n,i,r),c&&(this.o=-2)}function UAt(t,e,n,i,r,c){sat.call(this,t,e,n,i,r),c&&(this.o=-2)}function zAt(t,e,n,i,r,c){Cct.call(this,t,e,n,i,r),c&&(this.o=-2)}function jAt(t,e,n,i,r,c){aat.call(this,t,e,n,i,r),c&&(this.o=-2)}function HAt(t,e,n,i,r,c){Act.call(this,t,e,n,i,r),c&&(this.o=-2)}function GAt(t,e,n,i,r,c){oat.call(this,t,e,n,i,r),c&&(this.o=-2)}function WAt(t,e,n,i,r,c){cat.call(this,t,e,n,i,r),c&&(this.o=-2)}function $At(t,e,n,i,r,c){kct.call(this,t,e,n,i,r),c&&(this.o=-2)}function VAt(t,e,n,i){gT.call(this,n),this.b=t,this.c=e,this.d=i}function qAt(t,e){this.f=t,this.a=(PM(),JF),this.c=JF,this.b=e}function XAt(t,e){this.g=t,this.d=(PM(),QF),this.a=QF,this.b=e}function ZAt(t,e){!t.c&&(t.c=new _s(t,0)),eZ(t.c,(fr(),EI),e)}function oc(t,e,n,i,r,c){return t6t(t,e,n,c),eIt(t,i),nIt(t,r),t}function YAt(t,e){return ct(e,38)?Qq(t.a,a(e,38)):!1}function mce(t){if(!("stack"in t))try{throw t}catch{}return t}function bce(t){if(t.p!=1)throw K(new na);return or(t.f)<<24>>24}function wce(t){if(t.p!=1)throw K(new na);return or(t.k)<<24>>24}function vce(t){if(t.p!=7)throw K(new na);return or(t.k)<<16>>16}function _ce(t){if(t.p!=7)throw K(new na);return or(t.f)<<16>>16}function fN(t){ult(),pSt(this,or(ns(E1(t,24),oO)),or(ns(t,oO)))}function KAt(){KAt=P,ojt=Vi((P9(),Y(Z(_gt,1),jt,439,0,[FK])))}function dN(){dN=P,RJ=new grt(y4,0),imt=new grt("TOP_LEFT",1)}function JAt(t,e){var n;t.e=new vit,n=ow(e),gc(n,t.c),eNt(t,n,0)}function pe(t,e,n,i){var r;r=new SR,r.a=e,r.b=n,r.c=i,Xi(t.b,r)}function Sa(t,e,n,i){var r;r=new SR,r.a=e,r.b=n,r.c=i,Xi(t.a,r)}function yce(t,e,n){var i;return i=a(t.Hc().Vb(e),13),!!i&&i.pc(n)}function QAt(t,e,n){var i;return i=a(t.Hc().Vb(e),13),!!i&&i.vc(n)}function tkt(t,e){var n;return n=1-e,t.a[n]=DN(t.a[n],n),DN(t,e)}function kM(t){return Hn(t.b.b!=t.d.a),t.c=t.b=t.b.b,--t.a,t.c.c}function ekt(t){return DD(t),uD(t.c),t.e=t.a=t.c,t.c=t.c.b,++t.d,t.a}function nkt(t){return DD(t),uD(t.e),t.c=t.a=t.e,t.e=t.e.d,--t.d,t.a}function In(t){if(!Jn(t))throw K(new J);return t.c=t.b,t.b.ic()}function ikt(t,e){return ct(e,38)?Qq(t.a,a(e,38)):!1}function rkt(t,e){return ct(e,38)?Qq(t.a,a(e,38)):!1}function skt(t){var e;return Yv(t),e=new en,jst(t.a,new nH(e)),e}function uct(){var t,e,n;return e=(n=(t=new b1,t),n),Ut(u_t,e),e}function xce(t){var e;return e=(mu(),mu(),e$t),t.d&&wX(t),DQt(),e}function lct(t){return t.j.c=dt(un,te,1,0,5,1),wL(t.c),Use(t.a),t}function as(){bxt.call(this),this.j.c=dt(un,te,1,0,5,1),this.a=-1}function okt(t,e,n){this.b=new r9(this),this.c=t,this.f=e,this.d=n}function Mce(t,e,n){t.d&&Lc(t.d.d,t),t.d=e,t.d&&pm(t.d.d,n,t)}function Ece(t){return!!t.a&&Ya(t.a.a).i!=0&&!(t.b&&Zq(t.b))}function Sce(t){return Eu(),!ec(t)&&!(!ec(t)&&t.c.g.c==t.d.g.c)}function Tce(t){return gN(),dm(ctt,t)?a(zi(ctt,t),337).Mf():null}function fC(t){return ct(t,13)?new dL((al(),a(t,13))):are(t.tc())}function Cce(t,e,n){return n.f.c.length>0?Eot(t.a,e,n):Eot(t.b,e,n)}function ckt(t,e,n){var i;return i=FC(n),wr(t.b,i,e),wr(t.c,e,n),e}function _m(t,e){var n,i;return n=Gg(t,e),i=null,n&&(i=n.Vd()),i}function xL(t,e){var n,i;return n=Gg(t,e),i=null,n&&(i=n.Yd()),i}function LM(t,e){var n,i;return n=B2(t,e),i=null,n&&(i=n.Yd()),i}function Jd(t,e){var n,i;return n=Gg(t,e),i=null,n&&(i=J8t(n)),i}function hct(t){var e;return e=t.Fh(t.i),t.i>0&&Aa(t.g,0,e,0,t.i),e}function ML(t){var e;return e=(si(t),new Eh((al(),t))),QC(e),cq(e)}function kc(t){return t.n||(pl(t),t.n=new uSt(Do,t),Bo(t)),t.n}function akt(t,e){var n;return n=new Bb,t.wd(n),n.a+="..",e.xd(n),n.a}function ukt(t,e){D9();var n;return n=a(zi(XF,t),47),!n||n.Li(e)}function ym(t){return ct(t,13)?a(t,13).Wb():!t.tc().hc()}function Ace(t){if(t.ee())return null;var e=t.n,n=KO[e];return n}function Yn(t){return Hn(t.b!=t.d.c),t.c=t.b,t.b=t.b.a,++t.a,t.c.c}function fct(t,e){En(e),Vr(t.a,t.c,e),t.c=t.c+1&t.a.length-1,pRt(t)}function dC(t,e){En(e),t.b=t.b-1&t.a.length-1,Vr(t.a,t.b,e),pRt(t)}function lkt(t){var e;e=t.pg(),this.a=ct(e,64)?a(e,64).oh():e.tc()}function kce(t,e,n){var i;i=Ffe();try{return dne(t,e,n)}finally{bae(i)}}function dct(t,e,n,i){return ct(n,49)?new DSt(t,e,n,i):new got(t,e,n,i)}function Lce(){return EN(),Y(Z(rB,1),jt,278,0,[RK,X1t,Z1t,Y1t])}function Pce(){return jM(),Y(Z(Hjt,1),jt,373,0,[Xm,vw,ww,Y_])}function Ice(){return $2(),Y(Z(njt,1),jt,304,0,[b6,m6,w6,v6])}function Rce(){return $C(),Y(Z(rjt,1),jt,362,0,[_6,cB,aB,y6])}function Dce(t){return lt(de(z(t,(Ft(),_w))))&&z(t,li)!=null}function Nce(t){return lt(de(z(t,(Ft(),_w))))&&z(t,li)!=null}function P2(t){return ST(),ct(t.g,153)?a(t.g,153):null}function Oce(t,e,n){var i;i=a(zi(t.g,n),57),Ut(t.a.c,new zs(e,i))}function hkt(t,e,n,i){var r;return r=i[e.g][n.g],lt(Yt(z(t.a,r)))}function fkt(t,e,n,i){this.e=i,this.d=null,this.c=t,this.a=e,this.b=n}function pct(t,e,n,i){this.d=t,this.n=e,this.g=n,this.o=i,this.p=-1}function dkt(t,e,n,i,r){this.c=t,this.e=e,this.d=n,this.b=i,this.a=r}function gct(t,e,n,i,r){this.i=t,this.a=e,this.e=n,this.j=i,this.f=r}function A1(t,e,n,i,r){Gi.call(this,t,e),this.a=n,this.b=i,this.c=r}function pC(){pC=P,cA=new mrt("UPPER",0),oA=new mrt("LOWER",1)}function Bce(){return ZM(),Y(Z(qbt,1),jt,360,0,[fF,uA,X6,lA])}function Fce(){return b7(),Y(Z(xwt,1),jt,320,0,[CQ,_wt,ywt,vwt])}function Uce(){return ip(),Y(Z(dvt,1),jt,226,0,[IF,wA,Rx,vA])}function zce(){return gd(),Y(Z(qQ,1),jt,197,0,[VQ,$Q,GE,rb])}function jce(){return Ju(),Y(Z(EA,1),jt,344,0,[lI,E0,uI,ub])}function Hce(){return Am(),Y(Z(xqt,1),jt,374,0,[pI,dI,ett,ntt])}function Gce(){return a7(),Y(Z(Nvt,1),jt,288,0,[JQ,Ivt,Dvt,Rvt])}function Wce(){return Cu(),Y(Z($Vt,1),jt,265,0,[fI,kd,ag,hI])}function $ce(){return nw(),Y(Z(nQ,1),jt,179,0,[nF,eQ,sy,ry])}function Vu(t,e,n){return e<0?yX(t,n):a(n,61).aj().fj(t,t.Qg(),e)}function pkt(t,e){var n;for(n=t.j.c.length;n=0&&t.a[n]===e[n];n--);return n<0}function vct(t,e){var n;n=t.q.getHours(),t.q.setFullYear(e+Fm),c4(t,n)}function R2(t,e){return e==0||t.e==0?t:e>0?LIt(t,e):BDt(t,-e)}function _ct(t,e){return e==0||t.e==0?t:e>0?BDt(t,e):LIt(t,-e)}function yct(t){t.b!=t.c&&(t.a=dt(un,te,1,8,5,1),t.b=0,t.c=0)}function D2(t){return Hn(t.a0;)i+=t.a[n],n-=n&-n;return i}function jkt(t,e){var n;for(n=e;n;)Wu(t,-n.i,-n.j),n=io(n);return t}function $g(t,e){return t.a?Ii(t.a,t.b):t.a=new ll(t.d),b2(t.a,e),t}function Hkt(t,e){for(En(e);t.a||(t.a=Vv(t.c,t)),t.a;)e.ie(pN(t))}function uV(t){return t.c&&t.d?act(t.c)+"->"+act(t.d):"e_"+lm(t)}function Jce(t,e,n){return a(e==null?Au(t.d,null,n):km(t.e,e,n),261)}function Qce(t,e,n){var i,r;i=Gg(t,n),r=null,i&&(r=J8t(i)),q0e(e,n,r)}function tae(t,e){var n;n=new _T,zg(n,"x",e.a),zg(n,"y",e.b),C2(t,n)}function eae(t,e){var n;n=new _T,zg(n,"x",e.a),zg(n,"y",e.b),C2(t,n)}function nae(t,e){return Qme(t,e,ct(e,62)&&(a(a(e,17),62).Bb&ao)!=0)}function fd(t){return si(t),ct(t,13)?new Eh((al(),a(t,13))):p$(t.tc())}function iae(){return Ht(),Y(Z(Ia,1),jt,69,0,[Wc,Tn,Qe,fi,on])}function rae(t){return T9(),function(){return kce(t,this,arguments);var e}}function sae(){return Date.now?Date.now():new Date().getTime()}function Mct(t){if(!t.c.Cc())throw K(new J);return t.a=!0,t.c.Ec()}function lV(t,e){if(t<0||t>e)throw K(new Uc(Elt(t,e,"index")));return t}function Ect(t,e){return ct(e,180)?le(t.c,a(e,180).c):!1}function oae(t){return t.d=3,t.c=Wue(t),t.d!=2?(t.d=0,!0):!1}function Gkt(t,e){var n,i;return n=(i=t.slice(0,e),bC(i,t)),n.length=e,n}function Kl(t,e,n){var i;return i=(mi(e,t.c.length),t.c[e]),t.c[e]=n,i}function hV(t,e,n,i){var r;return r=dt(Gn,pi,22,e,15,1),b1e(r,t,e,n,i),r}function Wkt(t,e,n,i){this.e=t,this.b=new Dt,this.d=e,this.a=n,this.c=i}function Mm(t,e){this.b=Rc,this.d=t,this.e=e,this.c=this.d+(""+this.e)}function $kt(){NW(this),this.b=new We(is,is),this.a=new We(Ps,Ps)}function PM(){PM=P;var t,e;JF=(Q3(),e=new x,e),QF=(t=new UG,t)}function Vkt(){xN(),this.b=(ts(),new vi),this.a=new vi,this.c=new Dt}function uu(t){var e;t.d=new OEt(t),t.e=new BEt(t),e=t[N_]|0,t[N_]=e+1}function mN(t,e){return($M(t),Bat(new gi(t,new Fct(e,t.a)))).a!=null}function cae(){return Mo(),Y(Z(zgt,1),jt,328,0,[Of,bx,aa,ua,Yo])}function aae(){return XC(),Y(Z(D0t,1),jt,276,0,[mJ,bJ,pJ,R0t,gJ])}function uae(){return bl(),Y(Z(gmt,1),jt,178,0,[Sx,D6,xw,Z4,Km])}function lae(){return WC(),Y(Z(Abt,1),jt,292,0,[Cbt,iQ,rQ,z6,j6])}function hae(){return G1(),Y(Z(MA,1),jt,225,0,[sb,ZQ,Svt,xA,Tvt])}function fae(){return t0(),Y(Z(Jp,1),jt,163,0,[On,vc,Md,ib,og])}function dae(){return Js(),Y(Z(bA,1),jt,110,0,[Ff,uh,ah,fp,cg])}function pae(t,e){var n;return n=e!=null?Zc(t,e):Ua(Ea(t.d,null)),uM(n)}function gae(t,e){var n;return n=e!=null?Zc(t,e):Ua(Ea(t.d,null)),uM(n)}function Sct(t,e){var n;return n=a(O2(t.d,e),27),n||a(O2(t.e,e),27)}function Tct(t,e){var n;return n=0,t&&(n+=t.f.a/2),e&&(n+=e.f.a/2),n}function pl(t){return t.t||(t.t=new TG(t),QL(new $xt(t),0,t.t)),t.t}function qkt(t){var e;return t.c||(e=t.r,ct(e,96)&&(t.c=a(e,24))),t.c}function Xkt(t,e){return dm(t.a,e)?(IM(t.a,e),!0):!1}function ec(t){return!t.c||!t.d?!1:!!t.c.g&&t.c.g==t.d.g}function mae(t){return Ah(t,"size"),or(KG(Zg(t,8),Q2)?Zg(t,8):Q2),new Bb}function Bp(t,e){return IEt((sC(),new hN(uIt(Y(Z(un,1),te,1,5,[t,e])))))}function bae(t){t&&Eue((Er(),w1t)),--JO,t&&QO!=-1&&(vte(QO),QO=-1)}function wae(t,e){var n,i;n=a(Jfe(t.c,e),13),n&&(i=n._b(),n.Pb(),t.d-=i)}function gC(t){Ao();var e;for(e=0;t.hc();)t.ic(),e=so(e,1);return FL(e)}function fV(t){var e,n,i;return e=t&eu,n=t>>22&eu,i=t<0?sp:0,ia(e,n,i)}function Zkt(t,e){var n,i;return n=e.kc(),i=Fat(t,n),!!i&&au(i.e,e.lc())}function Ykt(t){var e;return e=t.e+t.f,isNaN(e)&&MD(t.d)?t.d:e}function Kkt(t){this.b=t,$n.call(this,t),this.a=a(an(this.b.a,4),116)}function Jkt(t){this.b=t,M2.call(this,t),this.a=a(an(this.b.a,4),116)}function Jl(t,e,n,i,r){r5t.call(this,e,i,r),this.c=t,this.b=n}function Cct(t,e,n,i,r){OAt.call(this,e,i,r),this.c=t,this.a=n}function Act(t,e,n,i,r){BAt.call(this,e,i,r),this.c=t,this.a=n}function kct(t,e,n,i,r){r5t.call(this,e,i,r),this.c=t,this.a=n}function Qkt(t,e){this.d=new a2,this.a=t,this.b=e,this.e=new Oo(e.Qe())}function Fp(t,e){V1(),this.e=t,this.d=1,this.a=Y(Z(Gn,1),pi,22,15,[e])}function IM(t,e){return Es(e)?e==null?zlt(t.d,null):r6t(t.e,e):zlt(t.d,e)}function Lct(t,e,n){var i;return i=t.rg(e),i>=0?t.ug(i,n,!0):Z2(t,e,n)}function vae(t,e,n){var i;i=(si(t),new Eh((al(),t))),h1e(new ykt(i,e,n))}function SL(t,e,n){var i;i=(si(t),new Eh((al(),t))),xpe(new xkt(i,e,n))}function _ae(t,e,n){var i;return i=FC(n),YC(t.d,i,e,!1),wr(t.e,e,n),e}function yae(t,e,n){var i;return i=FC(n),YC(t.j,i,e,!1),wr(t.k,e,n),e}function t5t(t,e,n){var i;i=new Hrt(t.a),ZV(i,t.a.a),Au(i.d,e,n),t.a.a=i}function dV(t){var e;return e=new Np,Uo(e,t),Ct(e,(qt(),Ro),null),e}function Vg(t){var e,n;return si(t),e=_se(t.length),n=new qu(e),XL(n,t),n}function mC(t){var e,n;++t.j,e=t.g,n=t.i,t.g=null,t.i=0,t.uh(n,e),t.th()}function TL(t,e){t.Eh(t.i+1),XT(t,t.i,t.Ch(t.i,e)),t.sh(t.i++,e),t.th()}function Em(t,e){var n;return n=(mi(e,t.c.length),t.c[e]),Xit(t.c,e,1),n}function pV(t,e,n,i){var r;return r=dt(Gn,pi,22,e+1,15,1),Kve(r,t,e,n,i),r}function Pct(t,e,n,i){var r;for(r=0;re.o?-1:0}function t_(t,e){if(t<0||t>e)throw K(new Uc("Index: "+t+", Size: "+e))}function Oct(t,e,n){if(t<0||e>n||e=e)throw K(new Uc("Index: "+t+", Size: "+e))}function Tae(t,e){var n;n=t.q.getHours()+(e/60|0),t.q.setMinutes(e),c4(t,n)}function _N(t,e,n){this.a=t,this.b=e,this.c=n,Ut(t.q,this),Ut(e.g,this)}function CL(t,e,n,i){this.f=t,this.e=e,this.d=n,this.b=i,this.c=i?i.d:null}function Bct(t){l6t.call(this,t,0),BSt(this),this.b.b=this.b,this.b.a=this.b}function Fct(t,e){nD.call(this,e.rd(),e.qd()&-65),En(t),this.a=t,this.c=e}function L5t(t,e,n){this.d=(En(t),t),this.a=n&zm?n:n|64|Lf,this.c=e}function yN(){this.b=new Fr,this.a=new Fr,this.b=new Fr,this.a=new Fr}function P5t(){P5t=P,dWt=Xa(Ni(new as,(Mo(),Of),(Po(),aJ)),Yo,TB)}function I5t(){I5t=P,pWt=Ni(Ni(new as,(Mo(),Of),(Po(),G4)),aa,PE)}function mV(t,e){return!t.o&&(t.o=new lu((Ic(),pp),ug,t,0)),Rq(t.o,e)}function Cae(t,e){di(e,"Label management",1),uM(z(t,(gV(),J6))),Vn(e)}function Aae(t,e){var n;return n=t.c,e>0?a(Ee(n.a,e-1),8):null}function bV(t){var e;return e=t.b,e.b==0?null:a(H1(e,0),170).b}function Uct(t){var e,n,i,r;r=t.d,e=t.a,n=t.b,i=t.c,t.d=n,t.a=i,t.b=r,t.c=e}function kae(t,e){var n;t.A&&(n=a(js(t.b,e),114).n,n.d=t.A.d,n.a=t.A.a)}function wV(t,e,n){var i,r;if(n!=null)for(i=0;i=0,"Initial capacity must not be negative")}function N5t(t){this.b=(ts(),new vi),this.c=new vi,this.d=new vi,this.a=t}function O5t(t){t?(this.c=t,this.b=null):(this.c=null,this.b=new Dt)}function vV(t,e){F9.call(this,t,e),this.a=dt(O3e,te,398,2,0,1),this.b=!0}function _V(t,e,n){return XX(t,e,n,ct(e,62)&&(a(a(e,17),62).Bb&ao)!=0)}function zae(t,e,n){return a4(t,e,n,ct(e,62)&&(a(a(e,17),62).Bb&ao)!=0)}function jae(t,e,n){return tbe(t,e,n,ct(e,62)&&(a(a(e,17),62).Bb&ao)!=0)}function Hae(t,e){return ro(lt(Yt(z(t,(Ft(),Ym)))),lt(Yt(z(e,Ym))))}function Gae(){return KM(),Y(Z(vJ,1),jt,290,0,[F0t,LB,kB,B0t,CB,AB])}function Wae(){return C7(),Y(Z(W0t,1),jt,241,0,[SJ,EJ,CJ,TJ,AJ,IB])}function $ae(){return mP(),Y(Z(Z0t,1),jt,255,0,[RB,V0t,X0t,$0t,q0t,kJ])}function Vae(){return QM(),Y(Z(emt,1),jt,256,0,[V4,K0t,tmt,Q0t,J0t,Y0t])}function qae(){return E7(),Y(Z(Tbt,1),jt,291,0,[tQ,Ebt,QJ,Mbt,Sbt,eF])}function Xae(){return Ls(),Y(Z(Cvt,1),jt,83,0,[ob,dp,Ox,Nx,Sd,Gc])}function Zae(){return JC(),Y(Z(S$t,1),jt,308,0,[dF,hQ,dQ,fQ,pQ,lQ])}function Yae(){return md(),Y(Z(kwt,1),jt,224,0,[LQ,Q6,tI,SF,MF,EF])}function Kae(){return S7(),Y(Z(vvt,1),jt,289,0,[XQ,mvt,wvt,pvt,bvt,gvt])}function B5t(){B5t=P,F$t=UC(UC(ert(new as,(ZM(),uA)),(JC(),dF)),hQ)}function xN(){xN=P,new kr("org.eclipse.elk.addLayoutConfig"),iVt=new Sb}function F5t(){F5t=P,q7(),b_t=is,xXt=Ps,w_t=new Rb(is),MXt=new Rb(Ps)}function U5t(t,e,n){Ai();var i;return i=Z1(t,e),n&&i&&vse(t)&&(i=null),i}function dt(t,e,n,i,r,c){var l;return l=DRt(r,i),r!=10&&Y(Z(t,c),e,n,r,l),l}function Jae(t,e,n){return IEt((sC(),new hN(uIt(Y(Z(un,1),te,1,5,[t,e,n])))))}function z5t(t,e){var n;return n=e.kc(),ts(),new N5(n,i8t(t.e,n,a(e.lc(),13)))}function j5t(t,e){var n,i;return n=t.a-e.a,i=t.b-e.b,y.Math.sqrt(n*n+i*i)}function zct(t,e,n){var i;i=t.b[n.c.o][n.o],i.b+=e.b,i.c+=e.c,i.a+=e.a,++i.a}function Qae(t,e,n){var i,r;return r=t.length,i=n=t.i)throw K(new kW(e,t.i));return t.g[e]}function G5t(t,e,n){if(LC(t,n),n!=null&&!t.Li(n))throw K(new k5);return n}function Cf(t,e){return I$(e,"Horizontal alignment cannot be null"),t.b=e,t}function kL(t,e){var n;return n=t.rg(e),n>=0?t.ug(n,!0,!0):Z2(t,e,!0)}function LL(t,e,n){var i,r;return r=(i=nE(t.b,e),i),r?Z7(BL(t,r),n):null}function tue(t){return ct(t,159)?""+a(t,159).a:t==null?null:Yc(t)}function eue(t){return ct(t,159)?""+a(t,159).a:t==null?null:Yc(t)}function DM(t){var e;return Vo(t)&&(e=0-t,!isNaN(e))?e:N1(zM(t))}function nue(t){var e;return t=t>2?t:2,e=kat(t),t>e?(e<<=1,e>0?e:Q2):e}function PL(t){var e,n;return e=t+128,n=(kTt(),E1t)[e],!n&&(n=E1t[e]=new Wj(t)),n}function bC(t,e){return UL(e)!=10&&Y(fu(e),e.rl,e.__elementTypeId$,UL(e),t),t}function e_(t,e){return e.e==0||t.e==0?AE:(tE(),LX(t,e))}function iue(t){for(;!t.a;)if(!Qct(t.b,new iH(t)))return!1;return!0}function rue(t){for(;!t.a;)if(!BTt(t.c,new oH(t)))return!1;return!0}function W5t(t,e){if(e.a)throw K(new sc(qOt));Ir(t.a,e),e.a=t,!t.j&&(t.j=e)}function yV(t,e,n,i,r,c){pct.call(this,e,i,r,c),this.c=t,this.b=n}function $5t(t,e,n,i,r,c){pct.call(this,e,i,r,c),this.c=t,this.a=n}function lu(t,e,n,i){this.Gi(),this.a=e,this.b=t,this.c=new _ot(this,e,n,i)}function IL(t,e){this.e=e,this.a=bPt(t),this.a<54?this.f=AM(t):this.c=oP(t)}function sue(t,e){t.a.Ld(e.d,t.b)>0&&(Ut(t.c,new Yst(e.c,e.d,t.d)),t.b=e.d)}function xV(t){t.a=dt(Gn,pi,22,t.b+1,15,1),t.c=dt(Gn,pi,22,t.b,15,1),t.d=0}function V5t(){V5t=P,qzt=Vi((EN(),Y(Z(rB,1),jt,278,0,[RK,X1t,Z1t,Y1t])))}function q5t(){q5t=P,nWt=Vi((nw(),Y(Z(nQ,1),jt,179,0,[nF,eQ,sy,ry])))}function X5t(){X5t=P,Gjt=Vi((jM(),Y(Z(Hjt,1),jt,373,0,[Xm,vw,ww,Y_])))}function Z5t(){Z5t=P,ijt=Vi(($2(),Y(Z(njt,1),jt,304,0,[b6,m6,w6,v6])))}function Y5t(){Y5t=P,sjt=Vi(($C(),Y(Z(rjt,1),jt,362,0,[_6,cB,aB,y6])))}function K5t(){K5t=P,E$t=Vi((ZM(),Y(Z(qbt,1),jt,360,0,[fF,uA,X6,lA])))}function J5t(){J5t=P,eVt=Vi((b7(),Y(Z(xwt,1),jt,320,0,[CQ,_wt,ywt,vwt])))}function Q5t(){Q5t=P,CVt=Vi((ip(),Y(Z(dvt,1),jt,226,0,[IF,wA,Rx,vA])))}function tLt(){tLt=P,AVt=Vi((gd(),Y(Z(qQ,1),jt,197,0,[VQ,$Q,GE,rb])))}function eLt(){eLt=P,jVt=Vi((Ju(),Y(Z(EA,1),jt,344,0,[lI,E0,uI,ub])))}function nLt(){nLt=P,Mqt=Vi((Am(),Y(Z(xqt,1),jt,374,0,[pI,dI,ett,ntt])))}function iLt(){iLt=P,GVt=Vi((a7(),Y(Z(Nvt,1),jt,288,0,[JQ,Ivt,Dvt,Rvt])))}function rLt(){rLt=P,VVt=Vi((Cu(),Y(Z($Vt,1),jt,265,0,[fI,kd,ag,hI])))}function hu(){hu=P,jf=new CW(pE,0),lb=new CW(y4,1),fh=new CW(gE,2)}function RL(){RL=P,Wbt=new vrt(jm,0),lF=new vrt("IMPROVE_STRAIGHTNESS",1)}function MN(){MN=P,awt=new yrt("LEAF_NUMBER",0),EQ=new yrt("NODE_SIZE",1)}function EN(){EN=P,RK=new U9("All",0),X1t=new VEt,Z1t=new iSt,Y1t=new qEt}function Ya(t){return t.b||(t.b=new lSt(Do,t),!t.a&&(t.a=new oL(t,t))),t.b}function DL(t,e){if(e<0)throw K(new Uc(eFt+e));return pkt(t,e+1),Ee(t.j,e)}function N2(t){var e;if(!u_(t))throw K(new J);return t.d=1,e=t.c,t.c=null,e}function SN(t){var e,n;return n=t.length,e=dt(nl,Pf,22,n,15,1),$Ct(t,0,n,e,0),e}function MV(t,e){var n;this.f=t,this.b=e,n=a(zi(t.b,e),264),this.c=n?n.b:null}function oue(t,e,n){var i;return i=M6t(t,e,n),t.b=new WV(i.c.length),uht(t,i)}function cue(t,e){var n;return n=a(XM(t.d,e),13),n?i8t(t.e,e,n):null}function Wct(t,e){var n;return n=a(IM(t.c,e),353),n?(tot(n),n.e):null}function aue(t){var e,n;if(!t.b)return null;for(n=t.b;e=n.a[0];)n=e;return n}function uue(t,e,n){var i;return i=FC(n),YC(t.g,i,e,!1),YC(t.i,e,n,!1),e}function NL(t,e,n,i){var r;i=(SM(),i||j1t),r=t.slice(e,n),Alt(r,t,e,n,-e,i)}function Xu(t,e,n,i,r){return e<0?Z2(t,n,i):a(n,61).aj().cj(t,t.Qg(),e,i,r)}function lue(t,e){return e0?qi:Pc(t,Vs)<0?Vs:or(t)}function gue(t,e){if(!t)throw K(new yn(Cbe("Enum constant undefined: %s",e)))}function TN(t){cD(this),this.g=t?W4t(t,t.Od()):null,this.f=t,tN(this),this.Pd()}function Qd(t,e,n,i,r,c,l){zV.call(this,e,i,r,c,l),this.c=t,this.b=n}function dd(t,e,n){var i,r;for(i=10,r=0;r=0?(t.gd(n),!0):!1}function LV(t,e){var n;return n=xr(t.d,e),n>=0?g7(t,n,!0,!0):Z2(t,e,!0)}function vue(t,e){var n;for(n=0;t.e!=t.i._b();)Iee(e,ci(t),Xt(n)),n!=qi&&++n}function cLt(t,e){var n,i,r;for(r=0,i=t.tc();i.hc();)n=i.ic(),Vr(e,r++,n);return e}function P1(t,e,n){var i;if(e==null)throw K(new s2);return i=Gg(t,e),Vce(t,e,n),i}function I1(t){if(t<0)throw K(new yn("tolerance ("+t+") must be >= 0"));return t}function PV(t){var e;return e=t.b.c.length==0?null:Ee(t.b,0),e!=null&&bat(t,0),e}function aLt(t,e){var n,i,r;for(i=0,r=e.length;i=t.a.c.length;)Ut(t.a,new Fr);return a(Ee(t.a,e),15)}function yue(t){return Zut(t,(NM(),x1t))<0?-Bee(zM(t)):t.l+t.m*rx+t.h*o0}function uLt(t){var e,n;return e=t/60|0,n=t%60,n==0?""+e:""+e+":"+(""+n)}function xue(t,e){var n;return n=ffe(t.e.c,e.e.c),n==0?ro(t.e.d,e.e.d):n}function B2(t,e){var n=t.a[e],i=(fq(),AK)[typeof n];return i?i(n):qat(typeof n)}function lLt(t,e){return e==(h$(),h$(),Vzt)?t.toLocaleLowerCase():t.toLowerCase()}function UL(t){return t.__elementTypeCategory$==null?10:t.__elementTypeCategory$}function Kct(t){return(t.i&2?"interface ":t.i&1?"":"class ")+(Vd(t),t.o)}function Mue(t,e,n){var i;return i=t.a.e[a(e.a,8).o]-t.a.e[a(n.a,8).o],Tr(oCt(i))}function hLt(t,e){var n;for(++t.d,++t.c[e],n=e+1;n=0&&et||t>e)throw K(new kit("fromIndex: 0, toIndex: "+t+wft+e))}function PN(t,e){var n,i;for(i=t.tc();i.hc();)n=a(i.ic(),68),Ct(n,(Ft(),xx),e)}function kue(t,e,n){var i;i=y.Math.max(0,t.b/2-.5),VC(n,i,1),Ut(e,new CMt(n,i))}function Lue(t){var e;return e=lt(Yt(z(t,(qt(),up)))),e<0&&(e=0,Ct(t,up,e)),e}function r_(t){wD();var e,n;for(n=cpt,e=0;en&&(n=t[e]);return n}function Pue(){r3t();for(var t=yK,e=0;e=t.i)throw K(new kW(e,t.i));return t.zh(e,t.g[e])}function RLt(t,e,n){if(LC(t,n),!t.Nj()&&n!=null&&!t.Li(n))throw K(new k5);return n}function _C(t,e){var n;for(n=t;io(n);)if(n=io(n),n==e)return!0;return!1}function Nue(t,e){return e&&t.b[e.g]==e?(Vr(t.b,e.g,null),--t.c,!0):!1}function Ql(t,e){var n;return n=e.c,e.a.b=e.b,e.b.a=e.a,e.a=e.b=null,e.c=null,--t.b,n}function pd(t,e){var n,i,r,c;for(En(e),i=t.c,r=0,c=i.length;r>5,r=e&31,i=ns(qv(t.n[n][c],or(Yd(r,1))),3),i}function DLt(t,e){for(;e[0]=0;)++e[0]}function NLt(t,e){yD.call(this),nat(this),this.a=t,this.c=!0,this.b=e.d,this.f=e.e}function OLt(t,e){return Ef(),I1(Y1),y.Math.abs(t-e)<=Y1||t==e||isNaN(t)&&isNaN(e)}function eat(t){return t.a<54?t.f<0?-1:t.f>0?1:0:(!t.c&&(t.c=KL(t.f)),t.c).e}function BLt(t){return t.c&&t.d?t.c.g+"("+t.c+")->"+t.d.g+"("+t.d+")":"e_"+lm(t)}function FLt(t,e,n){var i,r;i=e;do r=lt(t.p[i.o])+n,t.p[i.o]=r,i=t.a[i.o];while(i!=e)}function Bue(t,e,n){var i,r,c;for(r=e[n],i=0;i=14&&e<=16))),t}function DV(t,e){Ao();var n;for(si(t),si(e),n=!1;e.hc();)n=n|t.nc(e.ic());return n}function Ah(t,e){if(t<0)throw K(new yn(e+" cannot be negative but was: "+t));return t}function NV(t,e){var n,i;for(i=new H(t);i.an)throw K(new $v(e,n));return new Fst(t,e)}function a_(t,e){var n;n=t.s,t.s=e,t.Db&4&&!(t.Db&1)&&Bi(t,new cV(t,4,n,t.s))}function OM(t,e){var n;n=t.t,t.t=e,t.Db&4&&!(t.Db&1)&&Bi(t,new cV(t,5,n,t.t))}function iat(t,e){var n;n=t.d,t.d=e,t.Db&4&&!(t.Db&1)&&Bi(t,new cV(t,2,n,t.d))}function FV(t,e){var n;n=t.F,t.F=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,5,n,e))}function Uue(t,e){var n,i,r;return n=(i=(am(),r=new VS,r),e&&IDt(i,e),i),rPt(n,t),n}function Tm(){Tm=P,oF=new vW("BARYCENTER",0),sA=new vW(EBt,1),cF=new vW(SBt,2)}function IN(){IN=P,z0t=new uW("ARD",0),PB=new uW("MSD",1),_J=new uW("MANUAL",2)}function Fo(){Fo=P,sF=new pW(cx,0),Ga=new pW("INPUT",1),ba=new pW("OUTPUT",2)}function qLt(){Zl(),this.b=(ts(),new vi),this.f=new vi,this.g=new vi,this.e=new vi}function rat(t,e,n,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=1,this.c=t,this.a=n}function sat(t,e,n,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=2,this.c=t,this.a=n}function oat(t,e,n,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=6,this.c=t,this.a=n}function cat(t,e,n,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=7,this.c=t,this.a=n}function aat(t,e,n,i,r){this.d=e,this.j=i,this.e=r,this.o=-1,this.p=4,this.c=t,this.a=n}function uat(t,e){return Ef(),I1(Y1),y.Math.abs(t-e)<=Y1||t==e||isNaN(t)&&isNaN(e)}function zue(){return H7(),Y(Z(vgt,1),jt,228,0,[wgt,pgt,ggt,dgt,BK,bgt,mgt,fgt,hgt])}function jue(){return r0(),Y(Z(to,1),jt,86,0,[kl,Uf,Pl,Bh,hh,lh,Nu,Il,Ll])}function Hue(){return ma(),Y(Z(Pvt,1),jt,239,0,[WE,SA,OF,TA,BF,FF,Fx,KQ,NF])}function XLt(){XLt=P,Ozt=Y(Z(Gn,1),pi,22,15,[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15])}function ZLt(){ZLt=P,MWt=Xa(Ni(Ni(new as,(Mo(),aa),(Po(),hJ)),ua,uJ),Yo,lJ)}function UV(){return kQ||(kQ=new fNt,CC(kQ,Y(Z(j4,1),te,154,0,[new Sj]))),kQ}function _o(t,e,n){return GM(t,e),kh(t,n),a_(t,0),OM(t,1),d_(t,!0),f_(t,!0),t}function YLt(t,e){var n;return ct(e,38)?t.c.vc(e):(n=Rq(t,e),aP(t,e),n)}function vr(t){var e;return ct(t,78)?t:(e=t&&t[vZ],e||(e=new vIt(t),Ki(e)),e)}function lat(t){var e,n;if(t==0)return 32;for(n=0,e=1;!(e&t);e<<=1)++n;return n}function Gue(t,e){var n;return n=t.c,e=0),ede(t.d,t.c)<0&&(t.a=t.a-1&t.d.a.length-1,t.b=t.d.c),t.c=-1}function jV(t,e){t.j>0&&t.c0&&t.e!=0&&jV(t.g,e/t.j*t.g.d))}function nPt(t,e){var n;n=t.c,t.c=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,1,n,t.c))}function iPt(t,e){var n;n=t.b,t.b=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,0,n,t.b))}function GL(t,e){var n;n=t.k,t.k=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,2,n,t.k))}function dat(t,e){var n;n=t.f,t.f=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,8,n,t.f))}function pat(t,e){var n;n=t.i,t.i=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,7,n,t.i))}function rPt(t,e){var n;n=t.a,t.a=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,8,n,t.a))}function sPt(t,e){var n;n=t.d,t.d=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,1,n,t.d))}function oPt(t,e){var n;n=t.c,t.c=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,1,n,t.c))}function gat(t,e){var n;n=t.c,t.c=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,4,n,t.c))}function HV(t,e){var n;n=t.D,t.D=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,2,n,t.D))}function cPt(t,e){var n;n=t.b,t.b=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,0,n,t.b))}function Xue(t,e,n){var i;t.b=e,t.a=n,i=(t.a&512)==512?new Ixt:new jh,t.c=Lwe(i,t.b,t.a)}function aPt(t,e){return Om(t.e,e)?(Jo(),Yct(e)?new ND(e,t):new X5(e,t)):new xEt(e,t)}function TC(t,e){return me(),Es(t)?cot(t,hi(e)):Gb(t)?_Ct(t,Yt(e)):Hb(t)?Ire(t,de(e)):t.vd(e)}function Zue(t){var e=/function(?:\s+([\w$]+))?\s*\(/,n=e.exec(t);return n&&n[1]||_Z}function Yue(t,e){var n,i;return n=t.o+t.p,i=e.o+e.p,n>>31;i!=0&&(t[n]=i)}function bPt(t){var e;return Pc(t,0)<0&&(t=gst(t)),e=or(E1(t,32)),64-(e!=0?MP(e):MP(or(t))+32)}function nle(t){var e,n;for(n=t.c.a.Xb().tc();n.hc();)e=a(n.ic(),204),znt(e,new zCt(e.f))}function wPt(t){var e,n;for(n=t.c.a.Xb().tc();n.hc();)e=a(n.ic(),204),jnt(e,new g8t(e.e))}function vPt(t){this.d=t,this.c=t.c.Tb().tc(),this.b=null,this.a=null,this.e=(Ao(),Ao(),m1t)}function _Pt(t){this.e=t,this.d=new L9(tq(bot(this.e)._b())),this.c=this.e.a,this.b=this.e.c}function WV(t){this.b=t,this.a=dt(Gn,pi,22,t+1,15,1),this.c=dt(Gn,pi,22,t,15,1),this.d=0}function ile(t){t.a=null,t.e=null,t.b.c=dt(un,te,1,0,5,1),t.f.c=dt(un,te,1,0,5,1),t.c=null}function nr(t,e){var n,i;i=(n=new fst,n),i.n=e,ni((!t.s&&(t.s=new Wt(Ra,t,21,17)),t.s),i)}function Cr(t,e){var n,i;n=(i=new UG,i),n.n=e,ni((!t.s&&(t.s=new Wt(Ra,t,21,17)),t.s),n)}function kh(t,e){var n;n=t.zb,t.zb=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,1,n,t.zb))}function $V(t,e){var n;n=t.xb,t.xb=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,3,n,t.xb))}function VV(t,e){var n;n=t.yb,t.yb=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,2,n,t.yb))}function qV(t,e,n){var i,r,c;return r=_m(e,"labels"),i=new sEt(t,n),c=(Nwe(i.a,i.b,r),r),c}function Rr(t,e,n,i,r,c,l,f,g,b,v,M,k){return c9t(t,e,n,i,r,c,l,f,g,b,v,M,k),iut(t,!1),t}function yo(t,e){var n,i,r;for(En(e),n=!1,r=e.tc();r.hc();)i=r.ic(),n=n|t.nc(i);return n}function yPt(t){if(t){if(t.Wb())throw K(new J);return t.cd(t._b()-1)}return mkt(null.tc())}function rle(t){if(En(t),t.length==0)throw K(new yf("Zero length BigInteger"));$we(this,t)}function NN(){NN=P,Fbt=new mW("NO",0),oQ=new mW("GREEDY",1),Bbt=new mW("LOOK_BACK",2)}function XV(){XV=P,PA=new Lxt,ltt=Y(Z(Ra,1),$_,158,0,[]),tXt=Y(Z(ph,1),Jpt,53,0,[])}function xPt(){xPt=P,Kjt=Vi((Ke(),Y(Z(QK,1),jt,232,0,[gs,Hr,rs,uc,bu,Jc,ef])))}function sle(){return So(),Y(Z(LJ,1),jt,233,0,[DB,Al,q4,NB,J_,Q_,A6,IE,RE,OB])}function ole(t,e){return jM(),t==Xm&&e==vw||t==vw&&e==Xm||t==Y_&&e==ww||t==ww&&e==Y_}function cle(t,e){return jM(),t==Xm&&e==ww||t==Xm&&e==Y_||t==vw&&e==Y_||t==vw&&e==ww}function MPt(t,e){return lt(Yt(GW(nP(Vh(new gi(null,new Ei(t.c.b,16)),new n9(t)),e))))}function _at(t,e){return lt(Yt(GW(nP(Vh(new gi(null,new Ei(t.c.b,16)),new Ys(t)),e))))}function EPt(t,e){e?t.B==null&&(t.B=t.D,t.D=null):t.B!=null&&(t.D=t.B,t.B=null)}function ale(t){var e;return ct(t,182)?(e=a(t,182),new Ait(e.a)):(Ao(),new d5(t))}function SPt(t){var e;return e=skt(t),zb(e.a,0)?(iM(),iM(),$1t):(iM(),new ost(e.b))}function TPt(t){var e;return e=skt(t),zb(e.a,0)?(iM(),iM(),$1t):(iM(),new ost(e.c))}function CPt(t){fot.call(this),this.b=lt(Yt(z(t,(qt(),nf)))),this.a=a(z(t,ig),197)}function APt(){this.c=new I9(0),this.b=new I9($Bt),this.d=new I9(WBt),this.a=new I9(rY)}function ON(t){this.b=(si(t),new Eh((al(),t))),this.a=new Dt,this.d=new Dt,this.e=new go}function ep(){ep=P,eJ=new Nr,tJ=new mr,$gt=new a1,Wgt=new dc,Vgt=new vh,qgt=new _g}function BN(){BN=P,yJ=new lW("GREEDY",0),H0t=new lW("DEPTH_FIRST",1),xJ=new lW(hY,2)}function Kh(){Kh=P,hy=new SW("OUTSIDE",0),cb=new SW("INSIDE",1),DF=new SW("FIXED",2)}function kPt(){kPt=P,EWt=UC(jte(Ni(Ni(new as,(Mo(),aa),(Po(),hJ)),ua,uJ),Yo),lJ)}function ule(t){return t.b.c.g.j==(Ke(),rs)?a(z(t.b.c.g,(Ft(),li)),11):t.b.c}function LPt(t){return t.b.d.g.j==(Ke(),rs)?a(z(t.b.d.g,(Ft(),li)),11):t.b.d}function PPt(t){var e;if(t.b==-2){if(t.e==0)e=-1;else for(e=0;t.a[e]==0;e++);t.b=e}return t.b}function IPt(t){var e,n,i;for(e=0,i=t.tc();i.hc();)n=i.ic(),e+=n!=null?Yr(n):0,e=~~e;return e}function yat(t,e,n){var i,r;for(r=qn(t,0);r.b!=r.d.c;)i=a(Yn(r),9),i.a+=e,i.b+=n;return t}function WL(t){var e,n,i;for(e=0,i=t.tc();i.hc();)n=Yt(i.ic()),e+=(En(n),n);return e/t._b()}function RPt(t){var e;return t==0?"UTC":(t<0?(t=-t,e="UTC+"):e="UTC-",e+uLt(t))}function lle(t,e){we();var n,i;for(i=new Dt,n=0;n0&&(this.g=this.Fh(this.i+(this.i/8|0)+1),t.zc(this.g))}function NPt(t,e){return Ef(),I1(yd),y.Math.abs(0-e)<=yd||e==0||isNaN(0)&&isNaN(e)?0:t/e}function _s(t,e){PD.call(this,eXt,t,e),this.b=this,this.a=gu(t.mg(),Ve(this.e.mg(),this.c))}function $L(t,e){var n,i;for(i=e.length,n=0;nr&&e.ac&&e.b1||t.hc())return++t.a,t.g=0,e=t.i,t.hc(),e;throw K(new J)}function VPt(t){var e;t.d==null?(++t.e,t.f=0,W6t(null)):(++t.e,e=t.d,t.d=null,t.f=0,W6t(e))}function zN(t,e){var n;ct(e,109)?(a(t.c,81).ij(),n=a(e,109),lPt(t,n)):a(t.c,81).Gc(e)}function Cm(t){return ct(t,193)?ML(a(t,193)):ct(t,160)?a(t,160).a:ct(t,49)?new Pv(t):new sM(t)}function _le(t,e,n){return t==(Tm(),cF)?new Qf:pu(e,1)!=0?new Uit(n.length):new p3t(n.length)}function Bi(t,e){var n,i,r;if(n=t.cg(),n!=null&&t.fg())for(i=0,r=n.length;i=128?!1:t<64?CT(ns(Yd(1,t),n),0):CT(ns(Yd(1,t-64),e),0)}function Cle(t){var e;return e=a(z(t,(Ft(),wc)),69),t.j==(Ke(),rs)&&(e==(Ht(),on)||e==Qe)}function QV(t,e){var n;return ct(e,13)?(n=(al(),a(e,13)),t.oc(n)):DV(t,a(si(e),20).tc())}function Ale(t){HEt();var e;return mMt(uQ,t)||(e=new vt,e.a=t,i$(uQ,t,e)),a(js(uQ,t),573)}function tq(t){return ts(),t<3?(Ah(t,"expectedSize"),t+1):t>22),r=t.h+e.h+(i>>22),ia(n&eu,i&eu,r&sp)}function n6t(t,e){var n,i,r;return n=t.l-e.l,i=t.m-e.m+(n>>22),r=t.h-e.h+(i>>22),ia(n&eu,i&eu,r&sp)}function nq(t,e,n,i){return n==1?(!t.n&&(t.n=new Wt(ic,t,1,7)),$s(t.n,e,i)):vlt(t,e,n,i)}function i6t(t,e){if(e==null)return!1;for(;t.a!=t.b;)if(Fi(e,XN(t)))return!0;return!1}function Tat(t){return t.a.hc()?!0:t.a!=t.d?!1:(t.a=new Jot(t.e.d),t.a.hc())}function Or(t,e){var n,i;return n=e.yc(),i=n.length,i==0?!1:(Kst(t.c,t.c.length,n),!0)}function Rle(t,e,n){var i,r;for(r=e.Tb().tc();r.hc();)i=a(r.ic(),38),t.Yb(i.kc(),i.lc(),n);return t}function r6t(t,e){var n;return n=t.a.get(e),n===void 0?++t.d:(t.a[GZ](e),--t.c,t$(t.b)),n}function FM(t,e){this.b=t,this.e=e,this.d=e.j,this.f=(Jo(),a(t,61).bj()),this.k=gu(e.e.mg(),t)}function s6t(t){this.o=t,this.g=new Dt,this.j=new Fr,this.n=new Fr,this.e=new Dt,this.b=new Dt}function o6t(t){this.a=dt(yWt,wt,1704,t.length,0,2),this.b=dt(xWt,wt,1705,t.length,0,2),this.c=new PIt}function Dle(t,e){t.d==(Js(),ah)||t.d==cg?a(e.a,57).c.nc(a(e.b,57)):a(e.b,57).c.nc(a(e.a,57))}function c6t(t,e){var n,i;for(i=new H(t.b);i.ae?1:t==e?0:isNaN(t)?isNaN(e)?0:1:-1}function u6t(t,e){return!t||!e||t==e?!1:VIt(t.d.c,e.d.c+e.d.b)&&VIt(e.d.c,t.d.c+t.d.b)}function l6t(t,e){ED(t>=0,"Negative initial capacity"),ED(e>=0,"Non-positive load factor"),uu(this)}function h6t(t){var e,n;return n=(e=new Gk,e),kh(n,"T"),ni((!t.d&&(t.d=new Gu(wu,t,11)),t.d),n),n}function f6t(t,e){var n;return n=od(e.a._b()),qc(ALt(new gi(null,new Ei(e,1)),t.i),new eEt(t,n)),n}function Cat(t){var e,n,i;for(e=new Fr,i=qn(t.d,0);i.b!=i.d.c;)n=a(Yn(i),170),Xi(e,n.c);return e}function Aat(t){var e,n,i,r;for(e=1,n=0,r=t._b();n>=1);return e}function Ole(t){var e;return e=rw(t),e>pft?is:e<-34028234663852886e22?Ps:e}function Y(t,e,n,i,r){return r.ql=t,r.rl=e,r.sl=B,r.__elementTypeId$=n,r.__elementTypeCategory$=i,r}function UM(t,e,n,i,r){var c,l;for(l=n;l<=r;l++)for(c=e;c<=i;c++)g_(t,c,l)||G7(t,c,l,!0,!1)}function Ble(t){var e,n,i,r;for(n=t.a,i=0,r=n.length;it.f,n=t.u+t.e[t.o.o]*t.d>t.f*t.s*t.d,e||n}function $N(t,e,n){var i,r;return i=new vV(e,n),r=new it,t.b=VDt(t,t.b,i,r),r.b||++t.c,t.b.b=!1,r.d}function Rat(t){var e;return(!t.c||!(t.Bb&1)&&t.c.Db&64)&&(e=wl(t),ct(e,96)&&(t.c=a(e,24))),t.c}function F1(t){var e,n;for(n=new H(t.a.b);n.a=0&&t[i]===e[i];i--);return i<0?0:KG(ns(t[i],uo),ns(e[i],uo))?-1:1}function Xle(t){var e;return t==null?!0:(e=t.length,e>0&&t.charCodeAt(e-1)==58&&!uq(t,kA,LA))}function IC(t){switch(t.g){case 1:return WBt;default:case 2:return 0;case 3:return rY;case 4:return $Bt}}function cq(t){switch(t._b()){case 0:return p1t;case 1:return new aTt(t.tc().ic());default:return new hN(t)}}function Zle(t,e){Ao();var n,i;for(Hot(e,"predicate"),i=0;t.hc();i++)if(n=t.ic(),e.Mb(n))return i;return-1}function Yle(t,e,n){if(si(e),n.hc())for(rrt(e,t.Lb(n.ic()));n.hc();)rrt(e,t.c),rrt(e,t.Lb(n.ic()));return e}function aq(t,e){var n;return e===t?!0:ct(e,238)?(n=a(e,238),Fi(t.Hc(),n.Hc())):!1}function Pc(t,e){var n;return Vo(t)&&Vo(e)&&(n=t-e,!isNaN(n))?n:Zut(Vo(t)?gl(t):t,Vo(e)?gl(e):e)}function KL(t){return V1(),t<0?t!=-1?new Tut(-1,-t):PK:t<=10?z1t[Tr(t)]:new Tut(1,t)}function Kle(){Ai();var t;return mtt||(t=Gee(Z1("M",!0)),t=jD(Z1("M",!1),t),mtt=t,mtt)}function h_(t,e,n){var i,r;return r=(i=new BG,i),_o(r,e,n),ni((!t.q&&(t.q=new Wt(ph,t,11,10)),t.q),r),r}function uq(t,e,n){var i,r;for(i=0,r=t.length;i=t.b.c.length||(jat(t,2*e+1),n=2*e+2,ne)throw K(new yn(cO+t+WOt+e));if(t<0||e>n)throw K(new kit(cO+t+vft+e+wft+n))}function Qle(t,e,n){if(e<0)throw K(new Uc(eFt+e));e0)return nC(e-1,t.a.c.length),Em(t.a,e-1);throw K(new F)}function N6t(t,e){var n;if(e.c.length!=0){for(;blt(t,e);)R7(t,e,!1);n=GN(e),t.a&&(t.a.If(n),N6t(t,n))}}function ihe(t,e){var n,i;for(i=qn(t,0);i.b!=i.d.c;)n=a(Yn(i),204),n.e.length>0&&(e.td(n),n.i&&Nhe(n))}function gq(t,e,n){var i,r,c;for(i=new Fr,c=qn(n,0);c.b!=c.d.c;)r=a(Yn(c),9),Xi(i,new Oo(r));khe(t,e,i)}function O6t(t,e){var n;return n=new OX((t.f&256)!=0,t.i,t.a,t.d,(t.f&16)!=0,t.j,t.g,e),t.e!=null||(n.c=t),n}function rhe(t,e){var n,i;return n=a(t.d.$b(e),13),n?(i=t.e.Oc(),i.oc(n),t.e.d-=n._b(),n.Pb(),i):null}function VN(t){var e,n,i,r;for(r=0,n=0,i=t.length;n1||e>=0&&t.b<3)}function Qb(t){var e;++t.j,t.i==0?t.g=null:t.i>>0).toString(16):t.toString()}function mq(t,e){t.D==null&&t.B!=null&&(t.D=t.B,t.B=null),HV(t,e==null?null:(En(e),e)),t.C&&t.Kj(null)}function che(t,e){var n,i;for(n=t.a.length-1,t.c=t.c-1&n;e!=t.c;)i=e+1&n,Vr(t.a,e,t.a[i]),e=i;Vr(t.a,t.c,null)}function ahe(t,e){var n,i;for(n=t.a.length-1;e!=t.b;)i=e-1&n,Vr(t.a,e,t.a[i]),e=i;Vr(t.a,t.b,null),t.b=t.b+1&n}function uhe(t,e){aD(!this.b),aD(!this.d),UW(nM(t.c)==0),UW(e.d.c+e.e.c==0),UW(!0),this.b=t,this.d=this.ec(e)}function U6t(t,e,n,i,r){i?Zpe(t,e):(l1e(t,e,r),x2e(t,e,n)),e.c.length>1&&(we(),gc(e,t.b),_ve(t.c,e))}function lhe(t,e,n,i,r){e==0||i==0||(e==1?r[i]=Mut(r,n,i,t[0]):i==1?r[e]=Mut(r,t,e,n[0]):Z0e(t,n,r,e,i))}function hhe(t){var e,n;if(t==null)return null;for(e=0,n=t.length;e=t.c.b:t.a<=t.c.b))throw K(new J);return e=t.a,t.a+=t.c.c,++t.b,Xt(e)}function HM(t){var e,n;return t>-129&&t<128?(e=t+128,n=(PTt(),L1t)[e],!n&&(n=L1t[e]=new B8(t)),n):new B8(t)}function Xt(t){var e,n;return t>-129&&t<128?(e=t+128,n=(lTt(),T1t)[e],!n&&(n=T1t[e]=new N8(t)),n):new N8(t)}function wq(t,e){return!t||e&&!t.j||ct(t,114)&&a(t,114).a.b==0?0:t.Pf()}function qN(t,e){return!t||e&&!t.k||ct(t,114)&&a(t,114).a.a==0?0:t.Qf()}function Fi(t,e){return Es(t)?le(t,e):Gb(t)||Hb(t)?(En(t),t===e):aot(t)?t.Fb(e):iot(t)?t===e:oct(t,e)}function Yr(t){return Es(t)?j1(t):Gb(t)?Tr((En(t),t)):Hb(t)?(En(t),t?1231:1237):aot(t)?t.Hb():iot(t)?lm(t):Zot(t)}function fu(t){return Es(t)?At:Gb(t)?To:Hb(t)?ho:aot(t)||iot(t)?t.ql:t.ql||Array.isArray(t)&&Z(Lzt,1)||Lzt}function phe(t){return t?t.i&1?t==Ol?ho:t==Gn?Io:t==Gw?CE:t==Os?To:t==k0?Vm:t==_y?qm:t==Da?px:U4:t:null}function tw(){tw=P,Q$t=(dr(),Ix),tVt=ly,SQ=(Glt(),V$t),TQ=q$t,bwt=X$t,yF=Z$t,xF=Y$t,Y6=K$t,wwt=J$t}function vq(){vq=P,YK=uAt(Y(Z(bA,1),jt,110,0,[(Js(),ah),uh])),KK=uAt(Y(Z(bA,1),jt,110,0,[cg,fp]))}function RC(){RC=P,iJ=new aW("MIRROR_X",0),rJ=new aW("TRANSPOSE",1),nJ=new aW("MIRROR_AND_TRANSPOSE",2)}function ghe(t){var e;return e=new xLt(t),SL(t.a,Xjt,new ju(Y(Z(M6,1),te,341,0,[e]))),e.d&&Ut(e.f,e.d),e.f}function mhe(t){var e,n;for(n=new H(t.r);n.a=48&&t<58?t-48:t>=97&&t<97?t-97+10:t>=65&&t<65?t-65+10:-1}function bhe(t){var e,n;if(t==null)return!1;for(e=0,n=t.length;edw?t-n>dw:n-t>dw}function so(t,e){var n;return Vo(t)&&Vo(e)&&(n=t+e,GPi)throw K(new $v(e,i));if(t.xh()&&t.pc(n))throw K(new yn(o6));t.mh(e,n)}function q6t(t,e,n){if(t<0||e>n)throw K(new Uc(cO+t+vft+e+", size: "+n));if(t>e)throw K(new yn(cO+t+WOt+e))}function qat(t){throw fq(),K(new Oxt("Unexpected typeof result '"+t+"'; please report this bug to the GWT team"))}function zp(t){switch($b(),t.c){case 0:return yM(),B4;case 1:return new l2(Bme(new oM(t)));default:return new Nxt(t)}}function X6t(t){var e;return t.Db&64?nh(t):(e=new ul(nh(t)),e.a+=" (source: ",mo(e,t.d),e.a+=")",e.a)}function Ct(t,e,n){return n==null?(!t.p&&(t.p=(ts(),new vi)),IM(t.p,e)):(!t.p&&(t.p=(ts(),new vi)),wr(t.p,e,n)),t}function tP(t,e,n){return n==null?(!t.p&&(t.p=(ts(),new vi)),IM(t.p,e)):(!t.p&&(t.p=(ts(),new vi)),wr(t.p,e,n)),t}function eP(t,e,n){var i;t.Eh(t.i+1),i=t.Ch(e,n),e!=t.i&&Aa(t.g,e,t.g,e+1,t.i-e),Vr(t.g,e,i),++t.i,t.sh(e,n),t.th()}function xq(t,e,n){var i,r,c;for(i=0,c=qn(t,0);c.b!=c.d.c&&(r=lt(Yt(Yn(c))),!(r>n));)r>=e&&++i;return i}function Mq(t,e){var n,i,r;for(n=0,r=ac(t,e).tc();r.hc();)i=a(r.ic(),11),n+=z(i,(Ft(),Du))!=null?1:0;return n}function Ehe(t){var e;return e=a(O2(t.c.c,""),199),e||(e=new k2(eM(tM(new Cb,""),"Other")),Pm(t.c.c,"",e)),e}function Z6t(t){this.a=new qa,this.d=new qa,this.b=new qa,this.c=new qa,this.g=new qa,this.i=new qa,this.f=t}function Js(){Js=P,Ff=new $5(cx,0),uh=new $5(gE,1),ah=new $5(pE,2),fp=new $5(BY,3),cg=new $5("UP",4)}function Kg(){Kg=P,RF=new EW("INHERIT",0),Dx=new EW("INCLUDE_CHILDREN",1),yA=new EW("SEPARATE_CHILDREN",2)}function She(t,e,n){var i,r;return i=new Qd(t.e,3,13,null,(r=e.c,r||(ye(),Hf)),Hp(t,e),!1),n?n.Sh(i):n=i,n}function The(t,e,n){var i,r;return i=new Qd(t.e,4,13,(r=e.c,r||(ye(),Hf)),null,Hp(t,e),!1),n?n.Sh(i):n=i,n}function Xat(t,e,n){var i,r;return r=t.sb,t.sb=e,t.Db&4&&!(t.Db&1)&&(i=new fs(t,1,4,r,e),n?n.Sh(i):n=i),n}function Zat(t,e,n){var i,r;return r=t.r,t.r=e,t.Db&4&&!(t.Db&1)&&(i=new fs(t,1,8,r,t.r),n?n.Sh(i):n=i),n}function jp(t,e){var n,i;return n=a(e,614),i=n.Hj(),!i&&n.Ij(i=ct(e,96)?new wEt(t,a(e,24)):new qAt(t,a(e,140))),i}function Yat(t,e){var n;return t===e?!0:ct(e,89)?(n=a(e,89),t.e==n.e&&t.d==n.d&&Xce(t,n.a)):!1}function Che(t,e){var n;if(n=CP(t,e),ct(n,335))return a(n,29);throw K(new yn(G_+e+"' is not a valid attribute"))}function nP(t,e){var n;return n=new ue,t.a.sd(n)?(fM(),new HG(En(sLt(t,n.a,e)))):(Yv(t),fM(),fM(),W1t)}function Y6t(t,e){var n;t.c.length!=0&&(n=a(xo(t,dt(Cl,Ih,8,t.c.length,0,1)),123),Rrt(n,new g3),D9t(n,e))}function K6t(t,e){var n;t.c.length!=0&&(n=a(xo(t,dt(Cl,Ih,8,t.c.length,0,1)),123),Rrt(n,new hv),D9t(n,e))}function WM(t,e){switch(e.g){case 2:case 1:return ac(t,e);case 3:case 4:return Cm(ac(t,e))}return we(),we(),fo}function Kat(t,e,n,i){switch(e){case 1:return!t.n&&(t.n=new Wt(ic,t,1,7)),t.n;case 2:return t.k}return Uut(t,e,n,i)}function Ahe(t,e,n,i,r,c,l,f){var g;for(g=n;c=i||e=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:t>=48&&t<=57?t-48:0}function tIt(t){return t-=t>>1&1431655765,t=(t>>2&858993459)+(t&858993459),t=(t>>4)+t&252645135,t+=t>>8,t+=t>>16,t&63}function f_(t,e){var n;n=(t.Bb&256)!=0,e?t.Bb|=256:t.Bb&=-257,t.Db&4&&!(t.Db&1)&&Bi(t,new Jl(t,1,2,n,e))}function eIt(t,e){var n;n=(t.Bb&256)!=0,e?t.Bb|=256:t.Bb&=-257,t.Db&4&&!(t.Db&1)&&Bi(t,new Jl(t,1,8,n,e))}function Jat(t,e){var n;n=(t.Bb&256)!=0,e?t.Bb|=256:t.Bb&=-257,t.Db&4&&!(t.Db&1)&&Bi(t,new Jl(t,1,8,n,e))}function nIt(t,e){var n;n=(t.Bb&512)!=0,e?t.Bb|=512:t.Bb&=-513,t.Db&4&&!(t.Db&1)&&Bi(t,new Jl(t,1,9,n,e))}function d_(t,e){var n;n=(t.Bb&512)!=0,e?t.Bb|=512:t.Bb&=-513,t.Db&4&&!(t.Db&1)&&Bi(t,new Jl(t,1,3,n,e))}function NC(t,e){var n;return t.b==-1&&t.a&&(n=t.a.Vi(),t.b=n?t.c.qg(t.a.pi(),n):xr(t.c.mg(),t.a)),t.c.hg(t.b,e)}function Phe(t,e,n){var i,r;return r=t.a,t.a=e,t.Db&4&&!(t.Db&1)&&(i=new fs(t,1,5,r,t.a),n?olt(n,i):n=i),n}function Ihe(t,e){var n;if(n=kp(t.i,e),n==null)throw K(new xf("Node did not exist in input."));return Mat(e,n),null}function Rhe(t,e){var n;if(n=zi(t.k,e),n==null)throw K(new xf("Port did not exist in input."));return Mat(e,n),null}function $M(t){if(t.c)$M(t.c);else if(t.d)throw K(new yc("Stream already terminated, can't be modified or used"))}function Dhe(t){var e;if(!t.a)throw K(new yc("Cannot offset an unassigned cut."));e=t.c-t.b,t.b+=e,B4t(t,e),F4t(t,e)}function Nhe(t){var e;t.g&&(e=t.c.pf()?t.f:t.a,aht(e.a,t.o,!0),aht(e.a,t.o,!1),Ct(t.o,(qt(),Qi),(Ls(),Nx)))}function Ohe(t){var e,n,i;for(e=a(z(t,(mc(),Xbt)),15),i=e.tc();i.hc();)n=a(i.ic(),170),Xi(n.b.d,n),Xi(n.c.b,n)}function iIt(t){var e,n,i;for(i=0,n=(Ao(),new $d(id(Zd(t.a,new X))));Jn(n);)e=a(In(n),14),e.c.g==e.d.g||++i;return i}function rIt(t,e){var n,i;for(i=new $n(t);i.e!=i.i._b();)if(n=a(ci(i),24),zt(e)===zt(n))return!0;return!1}function sIt(t,e){var n,i;for(i=new $n(t);i.e!=i.i._b();)if(n=a(ci(i),133),zt(e)===zt(n))return!0;return!1}function Bhe(t,e,n){var i,r,c;return c=(r=nE(t.b,e),r),c&&(i=a(Z7(BL(t,c),""),24),i)?Zlt(t,i,e,n):null}function Eq(t,e,n){var i,r,c;return c=(r=nE(t.b,e),r),c&&(i=a(Z7(BL(t,c),""),24),i)?Ylt(t,i,e,n):null}function Qat(t){var e,n;return e=t.j,e==(Ke(),rs)?(n=a(z(t,(Ft(),wc)),69),n==(Ht(),Tn)||n==fi):!1}function oIt(t){var e;return e=new om,e.a+="VerticalSegment ",Fa(e,t.e),e.a+=" ",Ii(e,zW(new P5(Rc),new H(t.k))),e.a}function Fhe(t){var e,n,i;for(e=new Dt,i=new H(t.b);i.a0&&(i+=r,++n);return n>1&&(i+=t.d*(n-1)),i}function Zhe(t,e,n){var i,r;for(r=t.a.Xb().tc();r.hc();)if(i=a(r.ic(),8),O1(n,a(Ee(e,i.o),13)))return i;return null}function Aq(t,e,n,i){var r;if(r=t.length,e>=r)return r;for(e=e>0?e:0;e=1?uh:fp):n}function Khe(t){var e,n,i;for(e=0,i=new H(t.c.a);i.a=64&&e<128&&(r=Xh(r,Yd(1,e-64)));return r}function dIt(t,e,n){var i,r,c;for(r=Rn(e?Rs(t):br(t));Jn(r);)i=a(In(r),14),c=e?i.c.g:i.d.g,c.j==(Ke(),bu)&&Ks(c,n)}function Jhe(t,e,n){var i;i=new Qkt(t,e),cr(t.r,e.ef(),i),n&&t.t!=(Kh(),DF)&&(i.c=new oAt(t.d),pd(e.We(),new YH(i)))}function pIt(t,e,n){var i,r;return i=(am(),r=new N3,r),OV(i,e),BV(i,n),t&&ni((!t.a&&(t.a=new Ss(sf,t,5)),t.a),i),i}function Vn(t){if(t.i==null)throw K(new yc("The task has not begun yet."));t.b||(t.c0&&e.charCodeAt(0)==43?e.substr(1,e.length-1):e))}function nfe(t){var e;return t==null?null:new y1((e=Hc(t,!0),e.length>0&&e.charCodeAt(0)==43?e.substr(1,e.length-1):e))}function sut(t){var e;return e=dt(nl,Pf,22,2,15,1),t-=ao,e[0]=(t>>10)+WP&qr,e[1]=(t&1023)+56320&qr,ml(e,0,e.length)}function ife(t){var e,n;for(n=zme(Zu(Zb(t))).tc();n.hc();)if(e=hi(n.ic()),o4(t,e))return gae((F3t(),$qt),e);return null}function ml(t,e,n){var i,r,c,l;for(c=e+n,Oct(e,c,t.length),l="",r=e;re&&i.Ld(t[c-1],t[c])>0;--c)l=t[c],Vr(t,c,t[c-1]),Vr(t,c-1,l)}function sfe(t,e){var n;t.c=e,t.a=dfe(e),t.a<54&&(t.f=(n=e.d>1?Xh(Yd(e.a[1],32),ns(e.a[0],uo)):ns(e.a[0],uo),AM(Zg(e.e,n))))}function kq(){ult();var t,e,n;n=N3e+++xae(),t=Tr(y.Math.floor(n*VP))&oO,e=Tr(n-t*bft),this.a=t^1502,this.b=e^WZ}function ofe(t,e,n){t.n=Vb(k0,[wt,gft],[378,22],14,[n,Tr(y.Math.ceil(e/32))],2),t.o=e,t.p=n,t.j=e-1>>1,t.k=n-1>>1}function cfe(t,e){var n,i,r;i=Qv(e),r=lt(Yt(qM(i,(qt(),nf)))),n=y.Math.max(0,r/2-.5),VC(e,n,1),Ut(t,new AMt(e,n))}function gIt(t,e){var n,i;for(n=qn(t,0);n.b!=n.d.c;){if(i=lt(Yt(Yn(n))),i==e)return;if(i>e){kM(n);break}}vM(n,e)}function He(t,e){var n,i,r,c,l;if(n=e.f,Pm(t.c.d,n,e),e.g!=null)for(r=e.g,c=0,l=r.length;ce?1:iD(isNaN(t),isNaN(e))}function vIt(t){no(),cD(this),tN(this),this.e=t,t!=null&&NSt(t,vZ,this),this.g=t==null?tu:Yc(t),this.a="",this.b=t,this.a=""}function BC(t){var e;this.a=(e=a(t.e&&t.e(),10),new ja(e,a(cu(e,e.length),10),0)),this.b=dt(un,te,1,this.a.a.length,5,1)}function i7(t,e){var n,i;return n=t._b(),e.lengthn&&Vr(e,n,null),e}function aut(t){var e,n,i;for(i=new Sp,i.a+="[",e=0,n=t._b();e>5,e=t&31,i=dt(Gn,pi,22,n+1,15,1),i[n]=1<c?e:c;return Xt(e)}function bfe(t,e){var n,i;for(i=t.e.a.Xb().tc();i.hc();)if(n=a(i.ic(),247),Sge(e,n.d)||k0e(e,n.d))return!0;return!1}function _It(t,e){var n,i,r,c;for(c=t.g.ed(),n=0;c.hc();){if(i=lt(Yt(c.ic())),r=i-e,r>U_)return n;r>TO&&++n}return n}function yIt(t,e){var n,i,r;r=e.d.g,i=r.j,!(i==(Ke(),gs)||i==Jc||i==ef)&&(n=Rn(br(r)),Jn(n)&&wr(t.k,e,a(In(n),14)))}function xIt(t,e){var n,i;n=e==(XC(),gJ),i=lut(t),n&&!i||!n&&i?Ct(t,(qt(),Bf),(md(),tI)):Ct(t,(qt(),Bf),(md(),Q6))}function gd(){gd=P,VQ=new X9(cx,0),$Q=new X9("POLYLINE",1),GE=new X9("ORTHOGONAL",2),rb=new X9("SPLINES",3)}function r7(){r7=P,MQ=new xW("OVERLAP_REMOVAL",0),yQ=new xW("COMPACTION",1),xQ=new xW("GRAPH_SIZE_CALCULATION",2)}function s7(){s7=P,Dbt=new gW("EQUALLY_DISTRIBUTED",0),sQ=new gW("NORTH_STACKED",1),Nbt=new gW("NORTH_SEQUENCE",2)}function wfe(t){var e,n,i,r,c;return c=llt(t),n=O9(t.c),i=!n,i&&(r=new Rg,P1(c,"knownLayouters",r),e=new vG(r),vo(t.c,e)),c}function vfe(t,e,n){var i,r;for(r=ct(e,62)&&a(a(e,17),62).Bb&ao?new LW(e,t):new FM(e,t),i=0;i3;)r*=10,--c;t=(t+(r>>1))/r|0}return i.i=t,!0}function j2(t,e,n){var i,r;for(r=t.tc();r.hc();)if(i=r.ic(),zt(e)===zt(i)||e!=null&&Fi(e,i))return n&&r.jc(),!0;return!1}function kIt(t,e){var n,i;if(e){for(n=0;n0&&(e.lengtht.i&&Vr(e,t.i,null),e}function LIt(t,e){var n,i,r,c;return n=e>>5,e&=31,r=t.d+n+(e==0?0:1),i=dt(Gn,pi,22,r,15,1),$1e(i,t.a,n,e),c=new Xv(t.e,r,i),hC(c),c}function c7(t,e){_rt();var n,i;return n=cL((Hh(),Hh(),F4)),i=null,e==n&&(i=a(Zc(v1t,t),556)),i||(i=new n4t(t),e==n&&tc(v1t,t,i)),i}function xr(t,e){var n,i,r;if(n=(t.i==null&&q1(t),t.i),i=e.pi(),i!=-1){for(r=n.length;i=0;--i)for(e=n[i],r=0;r0&&Pc(t,128)<0?(e=or(t)+128,n=(LTt(),C1t)[e],!n&&(n=C1t[e]=new O8(t)),n):new O8(t)}function oP(t){return V1(),Pc(t,0)<0?Pc(t,-1)!=0?new Yut(-1,DM(t)):PK:Pc(t,10)<=0?z1t[or(t)]:new Yut(1,t)}function PIt(){Tit.call(this,new Bct(16)),Ah(2,"expectedValuesPerKey"),this.b=2,this.a=new Fot(null,null,0,null),K3(this.a,this.a)}function a7(){a7=P,JQ=new Y9("SIMPLE",0),Ivt=new Y9("GROUP_DEC",1),Dvt=new Y9("GROUP_MIXED",2),Rvt=new Y9("GROUP_INC",3)}function gut(){gut=P,Lvt=new x2(15),FVt=new xc((dr(),uy),Lvt),zVt=new xc(ly,15),UVt=new xc(HQ,Xt(0)),BVt=new xc(jE,fE)}function Iq(){Iq=P,ftt=new jk,e_t=new Rz,n_t=new Hk,i_t=new FR,r_t=new UR,s_t=new zR,o_t=new XS,c_t=new Dz,a_t=new jR}function IIt(t){this.e=dt(Gn,pi,22,t.length,15,1),this.c=dt(Ol,a0,22,t.length,16,1),this.b=dt(Ol,a0,22,t.length,16,1),this.f=0}function mut(t,e){this.n=Vb(k0,[wt,gft],[378,22],14,[e,Tr(y.Math.ceil(t/32))],2),this.o=t,this.p=e,this.j=t-1>>1,this.k=e-1>>1}function RIt(t,e,n){ILt(),Ext.call(this),this.a=Vb(qVt,[wt,Gft],[537,171],0,[UF,QQ],2),this.c=new lM,this.g=t,this.f=e,this.d=n}function Kc(t,e,n){var i,r,c;return t.ti()?(i=t.i,c=t.ui(),eP(t,i,e),r=t.mi(3,null,e,i,c),n?n.Sh(r):n=r):eP(t,t.i,e),n}function Lh(t,e){var n,i,r;return t.f>0&&(t.Fi(),i=e==null?0:Yr(e),r=(i&qi)%t.d.length,n=Dlt(t,r,i,e),n)?n.lc():null}function Rq(t,e){var n,i,r;return t.f>0?(t.Fi(),i=e==null?0:Yr(e),r=(i&qi)%t.d.length,n=lDt(t,r,i,e),n!=-1):!1}function cP(t,e){var n,i,r,c;for(c=gu(t.e.mg(),e),n=a(t.g,124),r=0;r2e3&&(Pzt=t,QO=y.setTimeout(kte,10))),JO++==0?(Sue((Er(),w1t)),!0):!1}function Ufe(){return Error.stackTraceLimit>0?(y.Error.stackTraceLimit=Error.stackTraceLimit=64,!0):"stack"in new Error}function UIt(t,e){return t.e>e.e?1:t.ee.d?t.e:t.d=0?c=c.a[1]:(r=c,c=c.a[0])}return r}function $It(t,e,n){var i,r,c;for(r=null,c=t.b;c;){if(i=t.a.Ld(e,c.d),n&&i==0)return c;i<=0?c=c.a[0]:(r=c,c=c.a[1])}return r}function Hfe(t,e,n,i){var r,c,l;return r=!1,c2e(t.f,n,i)&&(rde(t.f,t.a[e][n],t.a[e][i]),c=t.a[e],l=c[i],c[i]=c[n],c[n]=l,r=!0),r}function vut(t,e){var n,i,r;for(r=t.g.ed();r.hc();)if(n=lt(Yt(r.ic())),i=y.Math.abs(n-e),ie?1:iD(isNaN(t),isNaN(e)))>0}function yut(t,e){return Ef(),Ef(),I1(Y1),(y.Math.abs(t-e)<=Y1||t==e||isNaN(t)&&isNaN(e)?0:te?1:iD(isNaN(t),isNaN(e)))<0}function VIt(t,e){return Ef(),Ef(),I1(Y1),(y.Math.abs(t-e)<=Y1||t==e||isNaN(t)&&isNaN(e)?0:te?1:iD(isNaN(t),isNaN(e)))<=0}function $fe(t,e){if(e.c==t)return e.d;if(e.d==t)return e.c;throw K(new yn("Input edge is not connected to the input port."))}function u7(t,e){return En(t),e==null?!1:le(t,e)?!0:t.length==e.length&&le(t.toLowerCase(),e.toLowerCase())}function qIt(t){var e,n,i,r,c;if(t==null)return null;for(c=new Dt,n=lq(t),i=0,r=n.length;ie.e?1:t.fe.f?1:Yr(t)-Yr(e)}function XM(t,e){ts(),si(t);try{return t.Vb(e)}catch(n){if(n=vr(n),ct(n,177))return null;if(ct(n,169))return null;throw K(n)}}function Jfe(t,e){ts(),si(t);try{return t.$b(e)}catch(n){if(n=vr(n),ct(n,177))return null;if(ct(n,169))return null;throw K(n)}}function tRt(t){V1(),t.length==0?(this.e=0,this.d=1,this.a=Y(Z(Gn,1),pi,22,15,[0])):(this.e=1,this.d=t.length,this.a=t,hC(this))}function Mut(t,e,n,i){tE();var r,c;for(r=0,c=0;c=c?(che(t,e),-1):(ahe(t,e),1)}function eRt(t,e){var n,i,r;++t.j,i=t.g==null?0:t.g.length,e>i&&(r=t.g,n=i+(i/2|0)+4,njZ)return n.zg();if(i=n.sg(),i||n==t)break}return i}function nRt(t,e){var n,i;return n=e.Yg(t.a),n&&(i=hi(Lh((!n.b&&(n.b=new Mu((ye(),Ho),Dc,n)),n.b),Ti)),i!=null)?i:e.be()}function nde(t,e){var n,i;return n=e.Yg(t.a),n&&(i=hi(Lh((!n.b&&(n.b=new Mu((ye(),Ho),Dc,n)),n.b),Ti)),i!=null)?i:e.be()}function Xe(t){var e;if(ct(t.a,4)){if(e=jIt(t.a),e==null)throw K(new yc(nFt+t.b+"'. "+wpt+(Vd(vI),vI.k)+vpt));return e}else return t.a}function ide(t){var e;if(t==null)return null;if(e=ebe(Hc(t,!0)),e==null)throw K(new qG("Invalid hexBinary value: '"+t+"'"));return e}function iRt(t,e){var n,i,r;if(Ut(lB,t),e.nc(t),n=a(zi(HK,t),19),n)for(r=n.tc();r.hc();)i=a(r.ic(),35),nc(lB,i,0)!=-1||iRt(i,e)}function rde(t,e,n){var i,r;fX(t.e,e,n,(Ht(),on)),fX(t.i,e,n,Qe),t.a&&(r=a(z(e,(Ft(),li)),11),i=a(z(n,li),11),rV(t.g,r,i))}function rRt(t){var e;zt(cn(t,(dr(),ay)))===zt((Kg(),RF))&&(io(t)?(e=a(cn(io(t),ay),316),ga(t,ay,e)):ga(t,ay,yA))}function Eut(t,e,n){this.c=t,this.f=new Dt,this.e=new go,this.j=new oot,this.n=new oot,this.b=e,this.g=new qh(e.c,e.d,e.b,e.a),this.a=n}function Sut(t,e,n,i,r,c){jrt(this),this.e=t,this.f=e,this.d=n,this.c=i,this.g=r,this.b=c,this.j=lt(Yt(r.tc().ic())),this.i=lt(Yt(yPt(r)))}function sde(t){var e;for(e=a(In(Rn(Rs(t))),14).c.g;e.j==(Ke(),Hr);)Ct(e,(Ft(),I6),(me(),me(),!0)),e=a(In(Rn(Rs(e))),14).c.g}function ode(t,e,n){var i,r,c,l;return c=e.i,l=n.i,c!=l?c.g-l.g:(i=t.f[e.o],r=t.f[n.o],i==0&&r==0?0:i==0?-1:r==0?1:ro(i,r))}function ci(t){var e;try{return e=t.i.cd(t.e),t.Bi(),t.g=t.e++,e}catch(n){throw n=vr(n),ct(n,79)?(t.Bi(),K(new J)):K(n)}}function Fq(t){var e;try{return e=t.c.yh(t.e),t.Bi(),t.g=t.e++,e}catch(n){throw n=vr(n),ct(n,79)?(t.Bi(),K(new J)):K(n)}}function H1(t,e){var n;n=t.fd(e);try{return n.ic()}catch(i){throw i=vr(i),ct(i,101)?K(new Uc("Can't get element "+e)):K(i)}}function sRt(t,e){al(),si(t);try{return t.pc(e)}catch(n){if(n=vr(n),ct(n,177))return!1;if(ct(n,169))return!1;throw K(n)}}function cde(t,e){ts(),si(t);try{return t.Qb(e)}catch(n){if(n=vr(n),ct(n,177))return!1;if(ct(n,169))return!1;throw K(n)}}function oRt(t,e,n){return new qh(y.Math.min(t.a,e.a)-n/2,y.Math.min(t.b,e.b)-n/2,y.Math.abs(t.a-e.a)+n,y.Math.abs(t.b-e.b)+n)}function cRt(t,e){var n,i,r,c;for(n=0,r=new H(e.a);r.a0),e.a.cd(e.c=--e.b))}function t0(){t0=P,On=new W5("PARENTS",0),vc=new W5("NODES",1),Md=new W5("EDGES",2),ib=new W5("PORTS",3),og=new W5("LABELS",4)}function G1(){G1=P,sb=new V5("DISTRIBUTED",0),ZQ=new V5("JUSTIFIED",1),Svt=new V5("BEGIN",2),xA=new V5(y4,3),Tvt=new V5("END",4)}function HC(t,e,n){Ext.call(this),this.a=dt(qVt,Gft,171,(Ch(),Y(Z(Dw,1),jt,203,0,[lc,ta,hc])).length,0,1),this.b=t,this.d=e,this.c=n}function lP(t,e){var n,i;if(++t.j,e!=null&&(n=(i=t.a.Cb,ct(i,92)?a(i,92).cg():null),ume(e,n))){zC(t.a,4,n);return}zC(t.a,4,a(e,116))}function ade(t,e){var n,i;return e!=null&&iw(e).length!=0&&(n=_ht(t,e),n)?n:Nn.length!=0&&(i=_ht(t,Nn),i)?i:null}function ude(t){var e,n;if(t.j==(Ke(),Hr)){for(n=Rn(Jg(t));Jn(n);)if(e=a(In(n),14),!ec(e)&&t.c==sX(e,t).c)return!0}return!1}function h7(){h7=P,NK=new art("NUM_OF_EXTERNAL_SIDES_THAN_NUM_OF_EXTENSIONS_LAST",0),tgt=new art("CORNER_CASES_THAN_SINGLE_SIDE_LAST",1)}function Uq(){return Q7(),Y(Z(_qt,1),jt,147,0,[wqt,bqt,vqt,uqt,aqt,lqt,dqt,fqt,hqt,mqt,gqt,pqt,oqt,sqt,cqt,iqt,nqt,rqt,tqt,QVt,eqt,ttt])}function zq(t,e){var n;switch(n=!t.v.pc((Ju(),E0))||t.q==(Ls(),Gc),t.t.g){case 1:n?Axe(t,e):Y7t(t,e);break;case 0:n?$2e(t,e):V7t(t,e)}}function lde(t,e,n){var i;switch(i=n.q.getFullYear()-Fm+Fm,i<0&&(i=-i),e){case 1:t.a+=i;break;case 2:dd(t,i%100,2);break;default:dd(t,i,e)}}function hde(t){var e;switch(e=t.Mh(null),e){case 10:return 0;case 15:return 1;case 14:return 2;case 11:return 3;case 21:return 4}return-1}function jq(t){switch(t.g){case 1:return Js(),cg;case 4:return Js(),ah;case 2:return Js(),uh;case 3:return Js(),fp}return Js(),Ff}function fde(t,e,n,i){var r,c,l;return r=new Qd(t.e,1,13,(l=e.c,l||(ye(),Hf)),(c=n.c,c||(ye(),Hf)),Hp(t,e),!1),i?i.Sh(r):i=r,i}function qn(t,e){var n,i;if(t_(e,t.b),e>=t.b>>1)for(i=t.c,n=t.b;n>e;--n)i=i.b;else for(i=t.a.a,n=0;n=0?t.Fg(r):yX(t,i)):n<0?yX(t,i):a(i,61).aj().fj(t,t.Qg(),n)}function uRt(t){var e,n,i;for(i=(!t.o&&(t.o=new lu((Ic(),pp),ug,t,0)),t.o),n=i.c.tc();n.e!=n.i._b();)e=a(n.Ci(),38),e.lc();return AL(i)}function wde(t){var e,n,i,r;for(i=dt(k3e,te,144,t.c.length,0,1),r=0,n=new H(t);n.a0&&(Ut(t.b,new sCt(e.a,n)),i=e.a.length,0i&&(e.a+=$Et(dt(nl,Pf,22,-i,15,1))))}function d7(t){switch(Vit(),this.c=new Dt,this.d=t,t.g){case 0:case 2:this.a=zot(jgt),this.b=is;break;case 3:case 1:this.a=jgt,this.b=Ps}}function Tut(t,e){this.e=t,e.5&&c<50;)r=EDt(i),n=V2(i,r,!0),e=y.Math.abs(n.b),++c;return V2(t,r,!1)}function fRt(t){var e,n,i,r,c;for(i=JX(t),e=is,c=0,r=0;e>.5&&c<50;)r=MDt(i),n=V2(i,r,!0),e=y.Math.abs(n.a),++c;return V2(t,r,!1)}function xde(t,e){var n,i,r,c;for(c=0,i=qn(t,0);i.b!=i.d.c;)n=a(Yn(i),35),c+=y.Math.pow(n.g*n.f-e,2);return r=y.Math.sqrt(c/(t.b-1)),r}function dRt(t,e){var n,i,r;for(n=t.o,r=a(a(rr(t.r,e),19),60).tc();r.hc();)i=a(r.ic(),111),i.e.a=bpe(i,n.a),i.e.b=n.b*lt(Yt(i.b.xe(zF)))}function H2(t,e,n,i){var r;return n>=0?t.Bg(e,n,i):(t.yg()&&(i=(r=t.og(),r>=0?t.jg(i):t.yg().Cg(t,-1-r,null,i))),t.lg(e,n,i))}function G2(t,e,n){var i,r;if(r=t._b(),e>=r)throw K(new $v(e,r));if(t.xh()&&(i=t.dd(n),i>=0&&i!=e))throw K(new yn(o6));return t.Ah(e,n)}function Mde(t,e,n){var i,r,c,l;return i=t.dd(e),i!=-1&&(t.ti()?(c=t.ui(),l=OD(t,i),r=t.mi(4,l,null,i,c),n?n.Sh(r):n=r):OD(t,i)),n}function $s(t,e,n){var i,r,c,l;return i=t.dd(e),i!=-1&&(t.ti()?(c=t.ui(),l=W2(t,i),r=t.mi(4,l,null,i,c),n?n.Sh(r):n=r):W2(t,i)),n}function pRt(t){var e,n,i;t.b==t.c&&(i=t.a.length,n=kat(8>i?8:i)<<1,t.b!=0?(e=cu(t.a,n),mPt(t,e,i),t.a=e,t.b=0):RG(t.a,n),t.c=i)}function Ede(t){var e,n;e=new Dt,n=t;do n=a(In(Rn(br(n))),14).d.g,n.j==(Ke(),Hr)&&(e.c[e.c.length]=n);while(n.j==(Ke(),Hr));return e}function gRt(t){var e,n;for(this.b=new Dt,this.c=t,this.a=!1,n=new H(t.a);n.a0||t==(Zr(),MK)||e==(co(),EK))throw K(new yn("Invalid range: "+akt(t,e)))}function Sde(t){switch(t.g){case 1:return Am(),pI;case 3:return Am(),dI;case 2:return Am(),ntt;case 4:return Am(),ett;default:return null}}function Wq(t){switch(t.g){case 0:return null;case 1:return new APt;case 2:return new vit;default:throw K(new yn(jY+(t.f!=null?t.f:""+t.g)))}}function Tde(t,e,n){if(t.e)switch(t.b){case 1:Zse(t.c,e,n);break;case 0:Yse(t.c,e,n)}else bkt(t.c,e,n);t.a[e.o][n.o]=t.c.i,t.a[n.o][e.o]=t.c.e}function nw(){nw=P,nF=new W9(jm,0),eQ=new W9("PORT_POSITION",1),sy=new W9("NODE_SIZE_WHERE_SPACE_PERMITS",2),ry=new W9("NODE_SIZE",3)}function wRt(t){var e,n,i;for(n=new H(t.a);n.a=0?t.ug(l,n,!0):Z2(t,c,n)):a(c,61).aj().cj(t,t.Qg(),r,n,i)}function Cde(t,e){var n,i,r,c;return c=t.o,n=t.p,c=0)return r;if(t.Rj()){for(i=0;ir&&Vr(e,r,null),e}function vRt(t,e){var n,i,r;for(r=t.a.length,e.lengthr&&Vr(e,r,null),e}function g_(t,e,n){try{return zb(IV(t,e,n),1)}catch(i){throw i=vr(i),ct(i,305)?K(new Uc(KZ+t.o+"*"+t.p+JZ+e+Rc+n+QZ)):K(i)}}function _Rt(t,e,n){try{return zb(IV(t,e,n),0)}catch(i){throw i=vr(i),ct(i,305)?K(new Uc(KZ+t.o+"*"+t.p+JZ+e+Rc+n+QZ)):K(i)}}function yRt(t,e,n){try{return zb(IV(t,e,n),2)}catch(i){throw i=vr(i),ct(i,305)?K(new Uc(KZ+t.o+"*"+t.p+JZ+e+Rc+n+QZ)):K(i)}}function xRt(t,e,n){var i;try{return g_(t,e+t.j,n+t.k)}catch(r){throw r=vr(r),ct(r,79)?(i=r,K(new Uc(i.g+uO+e+Rc+n+")."))):K(r)}}function Ade(t,e,n){var i;try{return _Rt(t,e+t.j,n+t.k)}catch(r){throw r=vr(r),ct(r,79)?(i=r,K(new Uc(i.g+uO+e+Rc+n+")."))):K(r)}}function kde(t,e,n){var i;try{return yRt(t,e+t.j,n+t.k)}catch(r){throw r=vr(r),ct(r,79)?(i=r,K(new Uc(i.g+uO+e+Rc+n+")."))):K(r)}}function MRt(t,e){if(t.g==-1)throw K(new na);t.Bi();try{t.d.hd(t.g,e),t.f=t.d.j}catch(n){throw n=vr(n),ct(n,79)?K(new C):K(n)}}function ERt(t,e,n){di(n,"Compound graph preprocessor",1),t.a=new Ov,q7t(t,e,null),cye(t,e),Ibe(t),Ct(e,(Ft(),umt),t.a),t.a=null,uu(t.b),Vn(n)}function $q(t,e){var n,i;if($rt(e>0),(e&-e)==e)return Tr(e*pu(t,31)*4656612873077393e-25);do n=pu(t,31),i=n%e;while(n-i+(e-1)<0);return Tr(i)}function Lde(t,e,n){switch(n.g){case 1:t.a=e.a/2,t.b=0;break;case 2:t.a=e.a,t.b=e.b/2;break;case 3:t.a=e.a/2,t.b=e.b;break;case 4:t.a=0,t.b=e.b/2}}function Pde(t){var e,n;for(n=a(z(t,(Ft(),WB)),15).tc();n.hc();)if(e=a(n.ic(),68),Wb(e,(qt(),XB)))return a(z(e,XB),276);return null}function Ide(t,e){var n,i,r;for(n=hm(new Ng,t),r=new H(e);r.a1&&(c=Ide(t,e)),c}function Ode(t,e){var n,i,r,c;for(c=new H(e.a);c.a102?-1:t<=57?t-48:t<65?-1:t<=70?t-65+10:t<97?-1:t-97+10}function kRt(t,e){var n,i,r;for(t.b[e.g]=1,i=qn(e.d,0);i.b!=i.d.c;)n=a(Yn(i),170),r=n.c,t.b[r.g]==1?Xi(t.a,n):t.b[r.g]==2?t.b[r.g]=1:kRt(t,r)}function LRt(t,e){var n;return n=Y(Z(Os,1),Xo,22,15,[wq(t.a[0],e),wq(t.a[1],e),wq(t.a[2],e)]),t.d&&(n[0]=y.Math.max(n[0],n[2]),n[2]=n[0]),n}function PRt(t,e){var n;return n=Y(Z(Os,1),Xo,22,15,[qN(t.a[0],e),qN(t.a[1],e),qN(t.a[2],e)]),t.d&&(n[0]=y.Math.max(n[0],n[2]),n[2]=n[0]),n}function Bde(t){var e,n,i;for(L5(t.b.a),t.a=dt(oB,te,57,t.c.c.a.b.c.length,0,1),e=0,i=new H(t.c.c.a.b);i.ai&&t.charCodeAt(e-1)<=32;)--e;return i>0||ec&&Vr(e,c,null),e}function tX(t){Ao();var e;if(e=ohe(t),!Jn(t))throw K(new Uc("position (0) must be less than the number of elements that remained ("+e+")"));return In(t)}function ipe(t){var e;return e=(XLt(),Ozt),e[t>>>28]|e[t>>24&15]<<4|e[t>>20&15]<<8|e[t>>16&15]<<12|e[t>>12&15]<<16|e[t>>8&15]<<20|e[t>>4&15]<<24|e[t&15]<<28}function NRt(t){var e,n,i;for(i=t.f,t.k=dt(Os,Xo,22,i,15,1),t.d=dt(Os,Xo,22,i,15,1),e=0;e0&&(r.b+=e),r}function w7(t,e){var n,i,r;for(r=new go,i=t.tc();i.hc();)n=a(i.ic(),31),kP(n,0,r.b),r.b+=n.e.b+e,r.a=y.Math.max(r.a,n.e.a);return r.a>0&&(r.a+=e),r}function ape(t,e){var n,i;if(e<0||e>=t._b())return null;for(n=e;n=t.i)throw K(new kW(e,t.i));return++t.j,n=t.g[e],i=t.i-e-1,i>0&&Aa(t.g,e+1,t.g,e,i),Vr(t.g,--t.i,null),t.vh(e,n),t.th(),n}function nX(t,e){var n,i;return t.Db>>16==6?t.Cb.Cg(t,5,of,e):(i=jo(a(Ve((n=a(an(t,16),24),n||t.Rg()),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function But(t,e){var n,i;n=t.fd(e);try{return i=n.ic(),n.jc(),i}catch(r){throw r=vr(r),ct(r,101)?K(new Uc("Can't remove element "+e)):K(r)}}function dpe(t,e){var n,i,r;return r=new Ei(new ju(Y(Z(F3e,1),te,1700,0,[t,e])),16),i=new DTt(r),n=new gi(null,i),Aot(n,new rH(t)),Aot(n,new sH(e)),n}function Fut(t,e,n,i,r,c){var l,f,g;for(zt(t)===zt(n)&&(t=t.slice(e,e+r),e=0),f=e,g=e+r;f>22),r+=i>>22,r<0)?!1:(t.l=n&eu,t.m=i&eu,t.h=r&sp,!0)}function _pe(t,e,n,i,r,c,l){var f,g;return!(e.je()&&(g=t.a.Ld(n,i),g<0||!r&&g==0)||e.ke()&&(f=t.a.Ld(n,c),f>0||!l&&f==0))}function $2(){$2=P,b6=new j9("NORTH",0),m6=new j9("EAST",1),w6=new j9("SOUTH",2),v6=new j9("WEST",3),b6.a=!1,m6.a=!0,w6.a=!1,v6.a=!0}function $C(){$C=P,_6=new H9("NORTH",0),cB=new H9("EAST",1),aB=new H9("SOUTH",2),y6=new H9("WEST",3),_6.a=!1,cB.a=!0,aB.a=!1,y6.a=!0}function Cu(){Cu=P,fI=new K9("UNKNOWN",0),kd=new K9("ABOVE",1),ag=new K9("BELOW",2),hI=new K9("INLINE",3),new es("org.eclipse.elk.labelSide",fI)}function W1(t,e,n){if(n&&(e<0||e>n.a.c.length))throw K(new yn("index must be >= 0 and <= layer node count"));t.c&&Lc(t.c.a,t),t.c=n,n&&pm(n.a,e,t)}function HRt(t){switch(t.g){case 0:return EJ;case 1:return SJ;case 2:return TJ;case 3:return CJ;case 4:return IB;case 5:return AJ;default:return null}}function ZM(){ZM=P,fF=new $9("P1_TREEIFICATION",0),uA=new $9("P2_NODE_ORDERING",1),X6=new $9("P3_NODE_PLACEMENT",2),lA=new $9("P4_EDGE_ROUTING",3)}function Lo(t,e,n){var i,r;return i=(r=new FG,GM(r,e),kh(r,n),ni((!t.c&&(t.c=new Wt(Fw,t,12,10)),t.c),r),r),a_(i,0),OM(i,1),d_(i,!0),f_(i,!0),i}function GRt(t,e){var n,i;return t.Db>>16==17?t.Cb.Cg(t,21,Dl,e):(i=jo(a(Ve((n=a(an(t,16),24),n||t.Rg()),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function ype(t,e){var n,i,r;if(i=new z9,r=new Pat(i.q.getFullYear()-Fm,i.q.getMonth(),i.q.getDate()),n=F_e(t,e,r),n==0||n>16==6?t.Cb.Cg(t,6,Xs,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(Ic(),jF)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function Gut(t,e){var n,i;return t.Db>>16==7?t.Cb.Cg(t,1,gI,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(Ic(),Fvt)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function Wut(t,e){var n,i;return t.Db>>16==9?t.Cb.Cg(t,9,zr,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(Ic(),zvt)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function $ut(t,e){var n,i;return t.Db>>16==3?t.Cb.Cg(t,12,zr,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(Ic(),Bvt)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function Vut(t,e){var n,i;return t.Db>>16==3?t.Cb.Cg(t,0,bI,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(ye(),S0)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function $Rt(t,e){var n,i;return t.Db>>16==7?t.Cb.Cg(t,6,of,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(ye(),A0)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function VRt(t,e){var n,i;return t.Db>>16==5?t.Cb.Cg(t,9,YF,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(ye(),T0)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function YM(t,e){var n,i;if(e){if(e==t)return!0;for(n=0,i=a(e,42).yg();i&&i!=e;i=i.yg()){if(++n>jZ)return YM(t,i);if(i==t)return!0}}return!1}function Dpe(t){var e,n;e=a(z(t,(Ph(),Tjt)),21),e?(n=e.a,n==0?Ct(t,(R1(),pB),new kq):Ct(t,(R1(),pB),new fN(n))):Ct(t,(R1(),pB),new fN(1))}function Npe(t,e){var n;switch(n=t.g,e.g){case 1:return-(t.k.b+t.n.b);case 2:return t.k.a-n.n.a;case 3:return t.k.b-n.n.b;case 4:return-(t.k.a+t.n.a)}return 0}function qut(t,e,n,i){var r,c,l;if(t.a[e.o]==-1)for(t.a[e.o]=n,t.b[e.o]=i,c=Rn(br(e));Jn(c);)r=a(In(c),14),!ec(r)&&(l=r.d.g,qut(t,l,n+1,i))}function Ope(t){switch(gD(),t.q.g){case 5:A9t(t,(Ht(),Tn)),A9t(t,fi);break;case 4:bDt(t,(Ht(),Tn)),bDt(t,fi);break;default:tOt(t,(Ht(),Tn)),tOt(t,fi)}}function Bpe(t){switch(gD(),t.q.g){case 5:U9t(t,(Ht(),Qe)),U9t(t,on);break;case 4:dRt(t,(Ht(),Qe)),dRt(t,on);break;default:eOt(t,(Ht(),Qe)),eOt(t,on)}}function wl(t){var e;return!(t.Bb&1)&&t.r&&t.r.Eg()&&(e=a(t.r,42),t.r=a(B1(t,e),133),t.r!=e&&t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,9,8,e,t.r))),t.r}function VC(t,e,n){var i,r;i=e*n,ct(t.g,153)?(r=P2(t),r.f.d?r.f.a||(t.d.a+=i+yd):(t.d.d-=i+yd,t.d.a+=i+yd)):ct(t.g,8)&&(t.d.d-=i,t.d.a+=2*i)}function qRt(){U7(),this.c=new Dt,this.i=new Dt,this.e=new qa,this.f=new qa,this.g=new qa,this.j=new Dt,this.a=new Dt,this.b=(ts(),new vi),this.k=new vi}function Fpe(t,e){var n,i,r,c;for(di(e,"Dull edge routing",1),c=qn(t.b,0);c.b!=c.d.c;)for(r=a(Yn(c),76),i=qn(r.d,0);i.b!=i.d.c;)n=a(Yn(i),170),ld(n.a)}function rX(t,e,n){var i;return i=Y(Z(Os,1),Xo,22,15,[glt(t,(Ch(),lc),e,n),glt(t,ta,e,n),glt(t,hc,e,n)]),t.f&&(i[0]=y.Math.max(i[0],i[2]),i[2]=i[0]),i}function Upe(){q7();var t,e;try{if(e=a(slt((v1(),Nl),yE),1698),e)return e}catch(n){if(n=vr(n),ct(n,104))t=n,qst((Kn(),t));else throw K(n)}return new Pg}function zpe(){q7();var t,e;try{if(e=a(slt((v1(),Nl),xl),1635),e)return e}catch(n){if(n=vr(n),ct(n,104))t=n,qst((Kn(),t));else throw K(n)}return new HR}function jpe(){F5t();var t,e;try{if(e=a(slt((v1(),Nl),m0),1710),e)return e}catch(n){if(n=vr(n),ct(n,104))t=n,qst((Kn(),t));else throw K(n)}return new KS}function Xut(t,e){var n,i;return t.Db>>16==11?t.Cb.Cg(t,10,zr,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(Ic(),Uvt)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function XRt(t,e){var n,i;return t.Db>>16==10?t.Cb.Cg(t,11,Dl,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(ye(),C0)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function ZRt(t,e){var n,i;return t.Db>>16==10?t.Cb.Cg(t,12,ph,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(ye(),zw)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function Hpe(t,e){var n,i,r,c,l;if(e)for(r=e.a.length,n=new Ug(r),l=(n.b-n.a)*n.c<0?(_1(),hg):new x1(n);l.hc();)c=a(l.ic(),21),i=LM(e,c.a),i&&sDt(t,i)}function Gpe(){Yit();var t,e;for(g3e((T1(),Ae)),a3e(Ae),iX(Ae),t_t=(ye(),Hf),e=new H(u_t);e.a>19,b=e.h>>19,g!=b?b-g:(r=t.h,f=e.h,r!=f?r-f:(i=t.m,l=e.m,i!=l?i-l:(n=t.l,c=e.l,n-c)))}function Wpe(t,e){var n,i,r;if(i=t.b.d.d,t.a||(i+=t.b.d.a),r=e.b.d.d,e.a||(r+=e.b.d.a),n=ro(i,r),n==0){if(!t.a&&e.a)return-1;if(!e.a&&t.a)return 1}return n}function $pe(t,e){var n,i,r;if(i=t.b.g.d,t.a||(i+=t.b.g.a),r=e.b.g.d,e.a||(r+=e.b.g.a),n=ro(i,r),n==0){if(!t.a&&e.a)return-1;if(!e.a&&t.a)return 1}return n}function Vpe(t,e,n,i){var r,c,l,f;for(r=0;rl&&(f=l/i),r>c&&(g=c/r),hl(t,y.Math.min(f,g)),t}function Xpe(t,e,n){var i,r;return r=t.e,t.e=e,t.Db&4&&!(t.Db&1)&&(i=new fs(t,1,4,r,e),n?n.Sh(i):n=i),r!=e&&(e?n=cE(t,O7(t,e),n):n=cE(t,t.a,n)),n}function QRt(){z9.call(this),this.e=-1,this.a=!1,this.p=Vs,this.k=-1,this.c=-1,this.b=-1,this.g=!1,this.f=-1,this.j=-1,this.n=-1,this.i=-1,this.d=-1,this.o=Vs}function Zpe(t,e){var n,i;for(i=new H(e);i.a=0?(n=dP(t,sO),i=rP(t,sO)):(e=qv(t,1),n=dP(e,5e8),i=rP(e,5e8),i=so(Yd(i,1),ns(t,1))),Xh(Yd(i,32),ns(n,uo))}function v7(){v7=P,lgt=(H7(),BK),ugt=new bn(_ft,lgt),agt=(CN(),OK),cgt=new bn(yft,agt),ogt=(h7(),NK),sgt=new bn(xft,ogt),rgt=new bn(Mft,(me(),me(),!0))}function sX(t,e){if(e==t.c.g)return t.d.g;if(e==t.d.g)return t.c.g;throw K(new yn("'node' must either be the source node or target node of the edge."))}function Qpe(t,e,n){var i,r;for(di(n,"Interactive node placement",1),t.a=a(z(e,(Ft(),yw)),266),r=new H(e.b);r.a0&&(l=(c&qi)%t.d.length,r=Dlt(t,l,c,e),r)?(f=r.mc(n),f):(i=t.Ii(c,e,n),t.c.nc(i),null)}function Qut(t,e){var n,i,r,c;switch(jp(t,e).lk()){case 3:case 2:{for(n=k_(e),r=0,c=n.i;r=0;i--)if(le(t[i].d,e)||le(t[i].d,n)){t.length>=i+1&&t.splice(0,i+1);break}return t}function tlt(t,e,n){this.b=new vD,this.i=new Dt,this.d=new $a(this),this.g=t,this.a=e.c.length,this.c=e,this.e=a(Ee(this.c,this.c.c.length-1),8),this.f=n,j_e(this)}function r8t(){this.a=new Sz,this.g=new bD,this.j=new bD,this.b=(ts(),new vi),this.d=new bD,this.i=new bD,this.k=new vi,this.c=new vi,this.e=new vi,this.f=new vi}function a1e(t){var e,n,i,r,c;for(i=new qg(new xp(t.b).a);i.b;)n=Sm(i),e=a(n.kc(),8),c=a(a(n.lc(),48).a,8),r=a(a(n.lc(),48).b,9),sr(Gh(e.k),sr(Xc(c.k),r))}function XC(){XC=P,mJ=new j5("MEDIAN_LAYER",0),bJ=new j5("WIDEST_LAYER",1),pJ=new j5("CENTER_LAYER",2),R0t=new j5("TAIL_LAYER",3),gJ=new j5("HEAD_LAYER",4)}function u1e(t){var e,n,i;for(n=new H(t.p);n.an);return r}function nlt(t,e,n){switch(e){case 1:!t.n&&(t.n=new Wt(ic,t,1,7)),Dr(t.n),!t.n&&(t.n=new Wt(ic,t,1,7)),Lr(t.n,a(n,13));return;case 2:GL(t,hi(n));return}Oat(t,e,n)}function ilt(t,e,n){switch(e){case 3:o_(t,lt(Yt(n)));return;case 4:c_(t,lt(Yt(n)));return;case 5:th(t,lt(Yt(n)));return;case 6:eh(t,lt(Yt(n)));return}nlt(t,e,n)}function y7(t,e,n){var i,r,c;c=(i=new FG,i),r=$1(c,e,null),r&&r.Th(),kh(c,n),ni((!t.c&&(t.c=new Wt(Fw,t,12,10)),t.c),c),a_(c,0),OM(c,1),d_(c,!0),f_(c,!0)}function rlt(t){var e;return t.Db&64?o7(t):(e=new ul(o7(t)),e.a+=" (abstract: ",Cp(e,(t.Bb&256)!=0),e.a+=", interface: ",Cp(e,(t.Bb&512)!=0),e.a+=")",e.a)}function slt(t,e){var n,i,r;return n=RT(t.e,e),ct(n,207)?(r=a(n,207),r.gh()==null,r.dh()):ct(n,456)?(i=a(n,1631),r=i.b,r):null}function a8t(t,e){var n;if(this.f=t,this.b=this.f.c,n=t.d,lV(e,n),e>=(n/2|0))for(this.e=t.e,this.d=n;e++0;)ekt(this);this.a=null}function u8t(t,e,n,i,r,c,l){var f,g,b,v,M;if(v=r[c],b=c==l-1,f=b?i:0,M=DRt(f,v),i!=10&&Y(Z(t,l-c),e[c],n[c],f,M),!b)for(++c,g=0;g0&&bo(t,t.length-1)==33)try{return e=L9t($h(t,0,t.length-1)),e.e==null}catch(n){if(n=vr(n),!ct(n,30))throw K(n)}return!1}function _1e(t,e,n){var i,r,c,l;for(n=H2(e,t.e,-1-t.c,n),l=Bot(t.a),c=(i=new qg(new xp(l.a).a),new pT(i));c.a.b;)r=a(Sm(c.a).kc(),84),n=cE(r,O7(r,t.a),n);return n}function y1e(t,e,n){var i,r,c,l;for(n=nN(e,t.e,-1-t.c,n),l=Bot(t.a),c=(i=new qg(new xp(l.a).a),new pT(i));c.a.b;)r=a(Sm(c.a).kc(),84),n=cE(r,O7(r,t.a),n);return n}function l8t(t){var e,n,i;if(t==null)return null;if(n=a(t,15),n.Wb())return"";for(i=new Sp,e=n.tc();e.hc();)mo(i,(fr(),hi(e.ic()))),i.a+=" ";return B9(i,i.a.length-1)}function h8t(t){var e,n,i;if(t==null)return null;if(n=a(t,15),n.Wb())return"";for(i=new Sp,e=n.tc();e.hc();)mo(i,(fr(),hi(e.ic()))),i.a+=" ";return B9(i,i.a.length-1)}function x1e(t,e){tE();var n,i;for(i=(V1(),eB),n=t;e>1;e>>=1)e&1&&(i=e_(i,n)),n.d==1?n=e_(n,n):n=new tRt(CNt(n.a,n.d,dt(Gn,pi,22,n.d<<1,15,1)));return i=e_(i,n),i}function KC(t,e){return t.b.a=y.Math.min(t.b.a,e.c),t.b.b=y.Math.min(t.b.b,e.d),t.a.a=y.Math.max(t.a.a,e.c),t.a.b=y.Math.max(t.a.b,e.d),t.c[t.c.length]=e,!0}function M1e(t){var e,n,i,r;for(r=-1,i=0,n=new H(t);n.a=0&&le(t.substr(e,3),"GMT")||e>=0&&le(t.substr(e,3),"UTC"))&&(n[0]=e+3),Tht(t,n,i)}function ult(){ult=P;var t,e,n,i;for(V1t=dt(Os,Xo,22,25,15,1),q1t=dt(Os,Xo,22,33,15,1),i=152587890625e-16,e=32;e>=0;e--)q1t[e]=i,i*=.5;for(n=1,t=24;t>=0;t--)V1t[t]=n,n*=.5}function b8t(t,e,n){var i,r;switch(i=(Hn(e.b!=0),a(Ql(e,e.a.a),9)),n.g){case 0:i.b=0;break;case 2:i.b=t.f;break;case 3:i.a=0;break;default:i.a=t.g}return r=qn(e,0),vM(r,i),e}function E7(){E7=P,tQ=new FT(UBt,0),Ebt=new FT("LONGEST_PATH",1),QJ=new FT("COFFMAN_GRAHAM",2),Mbt=new FT(hY,3),Sbt=new FT("STRETCH_WIDTH",4),eF=new FT("MIN_WIDTH",5)}function H1e(t,e){var n,i,r,c;for(n=0,i=0,c=new H(e.b);c.an;c--)t[c]|=e[c-n-1]>>>l,t[c-1]=e[c-n-1]<=t.f)break;c.c[c.c.length]=n}return c}function q1e(t,e,n){var i,r,c;return c=0,i=n[e],e>4&15,c=t[i]&15,l[r++]=jvt[n],l[r++]=jvt[c];return ml(l,0,l.length)}function _8t(t,e,n){var i,r,c,l,f;for(i=n._b(),eRt(t,t.i+i),f=t.i-e,f>0&&Aa(t.g,e,t.g,e+i,f),l=n.tc(),t.i+=i,r=0;r=ao?(e=WP+(t-ao>>10&1023)&qr,n=56320+(t-ao&1023)&qr,String.fromCharCode(e)+(""+String.fromCharCode(n))):String.fromCharCode(t&qr)}function tge(t){var e,n,i;for(i=t.e.c.length,t.a=Vb(Gn,[wt,pi],[37,22],15,[i,i],2),n=new H(t.c);n.a0&&zRt(this,this.c-1,(Ht(),Qe)),this.c1&&(e.c[e.c.length]=c))}function nge(t){var e,n,i;for(n=new $n((!t.a&&(t.a=new Wt(zr,t,10,11)),t.a));n.e!=n.i._b();)if(e=a(ci(n),35),i=SP(e),!Jn((Ao(),new $d(id(Zd(i.a,new X))))))return e;return null}function y8t(t,e,n){var i,r;for(r=new $n((!t.a&&(t.a=new Wt(zr,t,10,11)),t.a));r.e!=r.i._b();)i=a(ci(r),35),Wd(i,i.i+e,i.j+n);vo((!t.b&&(t.b=new Wt(Xs,t,12,3)),t.b),new ZMt(e,n))}function x8t(t,e,n,i,r){var c,l,f;for(c=KDt(t,e,n,i,r),f=!1;!c;)R7(t,r,!0),f=!0,c=KDt(t,e,n,i,r);f&&R7(t,r,!1),l=GN(r),l.c.length!=0&&(t.d&&t.d.If(l),x8t(t,r,n,i,l))}function plt(t,e){var n;n=Zc((v1(),Nl),t),ct(n,456)?tc(Nl,t,new mEt(this,e)):tc(Nl,t,this),_lt(this,e),e==(Q3(),Qvt)?(this.wb=a(this,1633),a(e,1635)):this.wb=(T1(),Ae)}function ige(t){var e,n,i;if(t==null)return null;for(e=null,n=0;n0;){if(n=i,i=(i-1)/2|0,t.a.Ld(Ee(t.b,i),e)<=0)return Kl(t.b,n,e),!0;Kl(t.b,n,Ee(t.b,i))}return Kl(t.b,i,e),!0}function age(t){for(var e,n,i,r;t.o.a.c.length!=0;)n=a(Hat(t.o),48),i=a(n.a,113),e=a(n.b,189),r=n7(e,i),e.e==i?(fD(r.g,e),i.e=r.e+e.a):(fD(r.b,e),i.e=r.e-e.a),Ut(t.e.a,i)}function glt(t,e,n,i){var r,c;if(r=0,n)r=qN(t.a[n.g][e.g],i);else for(c=0;cjZ)return T8t(n);if(i=n,n==t)throw K(new yc("There is a cycle in the containment hierarchy of "+t))}return i}function C8t(){C8t=P,Hzt=Y(Z(At,1),wt,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),Gzt=Y(Z(At,1),wt,2,6,["Jan","Feb","Mar","Apr",nx,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"])}function lge(t,e,n,i){var r,c;for(c=e,r=c.d==null||t.a.Ld(n.d,c.d)>0?1:0;c.a[r]!=n;)c=c.a[r],r=t.a.Ld(n.d,c.d)>0?1:0;c.a[r]=i,i.b=n.b,i.a[0]=n.a[0],i.a[1]=n.a[1],n.a[0]=null,n.a[1]=null}function Mo(){Mo=P,Of=new U5("P1_CYCLE_BREAKING",0),bx=new U5("P2_LAYERING",1),aa=new U5("P3_NODE_ORDERING",2),ua=new U5("P4_NODE_PLACEMENT",3),Yo=new U5("P5_EDGE_ROUTING",4)}function A8t(t){var e,n;return n=y.Math.sqrt(t.f*(t.i==null&&(t.i=_at(t,new Wo)),lt(t.i))/(t.b*(t.g==null&&(t.g=MPt(t,new Wa)),lt(t.g)))),e=or(Ka(y.Math.round(n))),e=cm(e,t.f),e}function k8t(t){var e,n;n=t.k,e=sr(new We(n.a,n.b),t.n),this.d=y.Math.min(n.b,e.b),this.a=y.Math.max(n.b,e.b),this.b=y.Math.min(n.a,e.a),this.c=y.Math.max(n.a,e.a)}function hge(t){var e,n;if(t.a>=t.c.c.length)return yM(),B4;if(n=G(t),t.a>=t.c.c.length)return new l2(n);e=new qa,Ir(e,si(n));do Ir(e,si(G(t)));while(t.a0&&DNt((mi(0,n.c.length),a(n.c[0],26)),t),n.c.length>1&&DNt(a(Ee(n,n.c.length-1),26),t),Vn(e)}function pge(t,e,n,i){var r,c,l,f,g;return l=jRt(t.a,e,n),f=a(l.a,21).a,c=a(l.b,21).a,i&&(g=a(z(e,(Ft(),Du)),8),r=a(z(n,Du),8),g&&r&&(bkt(t.b,g,r),f+=t.b.i,c+=t.b.e)),f>c}function P8t(t,e){var n,i,r;if(blt(t,e))return!0;for(i=new H(e);i.ac&&Bre(b,lLt(n[f],G1t))&&(r=f,c=g);return r>=0&&(i[0]=e+c),r}function T7(t,e){var n,i,r;if(r=0,i=e[0],i>=t.length)return-1;for(n=t.charCodeAt(i);n>=48&&n<=57&&(r=r*10+(n-48),++i,!(i>=t.length));)n=t.charCodeAt(i);return i>e[0]?e[0]=i:r=-1,r}function bge(t,e){var n,i,r;return i=($C(),_6),r=y.Math.abs(t.b),n=y.Math.abs(e.f-t.b),ne$(t.d).c?(t.i+=t.g.c,Nq(t.d)):e$(t.d).c>e$(t.g).c?(t.e+=t.d.c,Nq(t.g)):(t.i+=MCt(t.g),t.e+=MCt(t.d),Nq(t.g),Nq(t.d))}function QM(){QM=P,V4=new BT(jm,0),K0t=new BT(pE,1),tmt=new BT(gE,2),Q0t=new BT("LEFT_RIGHT_CONSTRAINT_LOCKING",3),J0t=new BT("LEFT_RIGHT_CONNECTION_LOCKING",4),Y0t=new BT(ABt,5)}function _ge(t){var e,n,i,r,c,l;for(i=INt(JX(t)),e=is,c=0,r=0;e>.5&&c<50;)r=EDt(i),n=V2(i,r,!0),e=y.Math.abs(n.b),++c;return l=Yt(H1(fl(t.g),fl(t.g).b-1)),V2(t,(En(l),l-r),!1)}function yge(t){var e,n,i,r,c,l;for(i=INt(JX(t)),e=is,c=0,r=0;e>.5&&c<50;)r=MDt(i),n=V2(i,r,!0),e=y.Math.abs(n.a),++c;return l=Yt(H1(fl(t.g),fl(t.g).b-1)),V2(t,(En(l),l-r),!1)}function D8t(t,e,n,i){t.a.d=y.Math.min(e,n),t.a.a=y.Math.max(e,i)-t.a.d,ef&&(g=f/i),r>c&&(b=c/r),l=y.Math.min(g,b),t.a+=l*(e.a-t.a),t.b+=l*(e.b-t.b)}function Sge(t,e){wD();var n,i,r,c;if(e.b<2)return!1;for(c=qn(e,0),n=a(Yn(c),9),i=n;c.b!=c.d.c;){if(r=a(Yn(c),9),_Dt(t,i,r))return!0;i=r}return!!_Dt(t,i,n)}function vlt(t,e,n,i){var r,c;return n==0?(!t.o&&(t.o=new lu((Ic(),pp),ug,t,0)),SD(t.o,e,i)):(c=a(Ve((r=a(an(t,16),24),r||t.Rg()),n),61),c.aj().ej(t,ra(t),n-ei(t.Rg()),e,i))}function Tge(t,e){var n;e!=t.a?(n=null,t.a&&(n=a(t.a,42).Cg(t,4,of,null)),e&&(n=a(e,42).Ag(t,4,of,n)),n=Vat(t,e,n),n&&n.Th()):t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,1,e,e))}function B8t(t){var e;return t.Db&64?dX(t):(e=new ll(Cpt),!t.a||Ii(Ii((e.a+=' "',e),t.a),'"'),Ii(um(Ii(um(Ii(um(Ii(um((e.a+=" (",e),t.i),","),t.j)," | "),t.g),","),t.f),")"),e.a)}function Cge(t){var e,n,i,r,c,l,f,g,b;return b=llt(t),n=t.e,c=n!=null,c&&eC(b,PO,t.e),f=t.k,l=!!f,l&&eC(b,"type",nL(t.k)),i=O9(t.j),r=!i,r&&(g=new Rg,P1(b,tK,g),e=new _G(g),vo(t.j,e)),b}function Age(t,e){var n;if(e!=null&&!t.c.jj().Li(e))throw n=ct(e,51)?a(e,51).mg().zb:Og(fu(e)),K(new wT(G_+t.c.be()+"'s type '"+t.c.jj().be()+"' does not permit a value of type '"+n+"'"))}function kge(t,e){var n,i,r,c;if(En(e),c=t.a._b(),c>22-e,r=t.h<>22-e):e<44?(n=0,i=t.l<>44-e):(n=0,i=0,r=t.l<>>r|n[l+i+1]<>>r,++l}return c}function U8t(t){Rut();var e,n,i,r;return i=a(z(t,(qt(),qB)),318),r=lt(de(z(t,$J)))||zt(z(t,OE))===zt((I2(),S6)),e=a(z(t,Umt),21).a,n=t.a.c.length,!r&&i!=(BM(),BB)&&(e==0||e>n)}function Rge(t,e,n){var i,r;for(r=new Gs(t.b,0);r.b=l)return rn.a._b()?a(Ee(i,r-n.a._b()-1),8):null;return null}function _lt(t,e){var n;e!=t.sb?(n=null,t.sb&&(n=a(t.sb,42).Cg(t,1,CA,null)),e&&(n=a(e,42).Ag(t,1,CA,n)),n=Xat(t,e,n),n&&n.Th()):t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,4,e,e))}function Oge(t,e,n){var i,r,c,l,f;if(n)for(r=n.a.length,i=new Ug(r),f=(i.b-i.a)*i.c<0?(_1(),hg):new x1(i);f.hc();)l=a(f.ic(),21),c=LM(n,l.a),Rpt in c.a||tK in c.a?sve(t,c,e):l3e(t,c,e)}function j8t(t){switch(t.g){case 0:return new GG((Tm(),oF));case 1:return new rT;default:throw K(new yn("No implementation is available for the crossing minimizer "+(t.f!=null?t.f:""+t.g)))}}function Bge(t){lht();var e,n,i,r,c;if(t==null)return null;for(i=t.length,r=i*2,e=dt(nl,Pf,22,r,15,1),n=0;n>4],e[n*2+1]=iU[c&15];return ml(e,0,e.length)}function Eo(){ep(),Sst.call(this),this.i=(Ht(),Wc),this.a=new go,new _it,this.e=(Ah(2,ex),new qu(2)),this.d=(Ah(4,ex),new qu(4)),this.f=(Ah(4,ex),new qu(4)),this.c=new yMt(this.d,this.f)}function Fge(t,e){var n,i;return!(lt(de(z(e,(Ft(),eg))))||t==(bl(),D6)&&(i=e.c.g,i.j==(Ke(),bu)||(n=a(z(i,(qt(),la)),178),n==xw)))}function Uge(t,e){var n,i;return!(lt(de(z(e,(Ft(),eg))))||t==(bl(),Z4)&&(i=e.d.g,i.j==(Ke(),bu)||(n=a(z(i,(qt(),la)),178),n==Km)))}function zge(t,e){var n,i,r;n=fre(e,t.e),i=a(zi(t.g.f,n),21).a,r=t.a.c.length-1,t.a.c.length!=0&&a(Ee(t.a,r),269).c==i?(++a(Ee(t.a,r),269).a,++a(Ee(t.a,r),269).b):Ut(t.a,new FSt(i))}function H8t(t,e,n,i,r){if(ii&&(t.a=i),t.br&&(t.b=r),t}function jge(t){if(ct(t,180))return Nbe(a(t,180));if(ct(t,199))return wfe(a(t,199));if(ct(t,27))return Cge(a(t,27));throw K(new yn(zpt+Gp(new ju(Y(Z(un,1),te,1,5,[t])))))}function Ja(t,e){switch(e.g){case 1:return Xd(t.i,(ep(),$gt));case 2:return Xd(t.i,(ep(),Wgt));case 3:return Xd(t.i,(ep(),Vgt));case 4:return Xd(t.i,(ep(),qgt));default:return we(),we(),fo}}function G8t(t){var e;this.a=t,e=(Ke(),Y(Z(QK,1),jt,232,0,[gs,Hr,rs,uc,bu,Jc,ef])).length,this.b=Vb(Twt,[wt,zBt],[616,166],0,[e,e],2),this.c=Vb(Twt,[wt,zBt],[616,166],0,[e,e],2),X_e(this)}function Hge(t){var e,n;return n=a(z(t,(Ft(),Qc)),19),e=new as,(n.pc((So(),J_))||lt(de(z(t,(qt(),N6)))))&&(pa(e,KWt),n.pc(Q_)&&pa(e,JWt)),n.pc(IE)&&pa(e,ZWt),n.pc(RE)&&pa(e,YWt),e}function W8t(t,e,n){var i,r,c,l;if(e.b!=0){for(i=new Fr,l=qn(e,0);l.b!=l.d.c;)c=a(Yn(l),76),yo(i,Cat(c)),r=c.e,r.a=a(z(c,(mc(),wQ)),21).a,r.b=a(z(c,Zbt),21).a;W8t(t,i,Ta(n,i.b/t.a|0))}}function bP(t){var e,n,i;for(i=new Va,Xi(i,new We(t.j,t.k)),n=new $n((!t.a&&(t.a=new Ss(sf,t,5)),t.a));n.e!=n.i._b();)e=a(ci(n),531),Xi(i,new We(e.a,e.b));return Xi(i,new We(t.b,t.c)),i}function Gge(t,e,n,i,r){var c,l,f,g,b,v;if(r)for(g=r.a.length,c=new Ug(g),v=(c.b-c.a)*c.c<0?(_1(),hg):new x1(c);v.hc();)b=a(v.ic(),21),f=LM(r,b.a),l=new A4t(t,e,n,i),Gve(l.a,l.b,l.c,l.d,f)}function M_(t){$b();var e,n,i;for(i=new qa,XL(i,t),n=i.a.Xb().tc();n.hc();)e=n.ic(),si(e);switch(i.a._b()){case 0:return yM(),B4;case 1:return new l2(i.a.Xb().tc().ic());default:return new iW(i)}}function ylt(t,e){var n,i,r;for(r=qi,i=new H(p_(e));i.a1&&(t.e.b+=t.a)):(t.e.a+=n.a,t.e.b=y.Math.max(t.e.b,n.b),t.d.c.length>1&&(t.e.a+=t.a))}function $8t(t,e,n){var i,r,c,l;if(c=a(an(t.a,8),1629),c!=null)for(i=0,r=c.length;i1)throw K(new yn("In straight spline segments there may be only one edge."));i=t.a.c,n=t.a.c+t.a.b,Xi(a(e.a.Xb().tc().ic(),14).a,new We(i+(n-i)/2,t.b))}function V8t(t,e,n,i){var r;this.b=i,this.e=t==(Tm(),sA),r=e[n],this.d=Vb(Ol,[wt,a0],[221,22],16,[r.length,r.length],2),this.a=Vb(Gn,[wt,pi],[37,22],15,[r.length,r.length],2),this.c=new flt(e,n)}function gX(t){var e,n,i;if(t.a==null)for(t.a=dt(Ol,a0,22,t.c.b.c.length,16,1),t.a[0]=!1,i=new H(t.c.b),i.a>>e,r=t.m>>e|n<<22-e,i=t.l>>e|t.m<<22-e):e<44?(c=0,r=n>>>e-22,i=t.m>>e-22|t.h<<44-e):(c=0,r=0,i=n>>>e-44),ia(i&eu,r&eu,c&sp)}function X8t(t,e,n){var i,r,c,l,f;for(f=gu(t.e.mg(),e),r=a(t.g,124),i=0,l=0;ln?Elt(t,n,"start index"):e<0||e>n?Elt(e,n,"end index"):EP("end index (%s) must not be less than start index (%s)",Y(Z(un,1),te,1,5,[Xt(e),Xt(t)]))}function Z8t(t,e){var n,i,r;if(e===t)return!0;if(!ct(e,109)||(r=a(e,109),t._b()!=r._b()))return!1;for(i=r.Tb().tc();i.hc();)if(n=a(i.ic(),38),!t.Wc(n))return!1;return!0}function Y8t(t,e){var n,i,r,c;for(i=0,r=t.length;i0?f[l-1]:dt(Cl,Ih,8,0,0,1),r=f[l],b=l0&&e9t(t,c,n));e.o=0}function r0e(t,e){var n,i,r;for(r=new H(e.f);r.ae)throw K(new yn("Top must be smaller or equal to bottom."));if(0>t)throw K(new yn("Left must be smaller or equal to right."));this.d=0,this.c=t,this.a=e,this.b=0}function i9t(t,e){var n,i,r;if(e.c.length!=0){for(n=P8t(t,e),r=!1;!n;)R7(t,e,!0),r=!0,n=P8t(t,e);r&&R7(t,e,!1),i=GN(e),t.b&&t.b.If(i),t.a=G6t(t,(mi(0,e.c.length),a(e.c[0],35))),i9t(t,i)}}function De(t){var e;this.c=new Fr,this.f=t.e,this.e=t.d,this.i=t.g,this.d=t.c,this.b=t.b,this.k=t.j,this.a=t.a,t.i?this.j=t.i:this.j=(e=a(xu(Jp),10),new ja(e,a(cu(e,e.length),10),0)),this.g=t.f}function i0(){i0=P,Cwt=new v2(cx,0),Ec=new v2("BOOLEAN",1),Pa=new v2("INT",2),K6=new v2("STRING",3),ha=new v2("DOUBLE",4),xs=new v2("ENUM",5),zE=new v2("ENUMSET",6),Ed=new v2("OBJECT",7)}function Qa(){Qa=P,f_t=Y(Z(At,1),wt,2,6,[e1t,u6,HO,XUt,GO,lK,PO]),h_t=Y(Z(At,1),wt,2,6,[e1t,"empty",u6,a6,"elementOnly"]),d_t=Y(Z(At,1),wt,2,6,[e1t,"preserve","replace",Nh]),eo=new lCt}function rr(t,e){var n;return n=a(t.c.Vb(e),13),!n&&(n=t.Pc(e)),ct(n,196)?new Ort(t,e,a(n,196)):ct(n,60)?new QW(t,e,a(n,60)):ct(n,19)?new dst(t,e,a(n,19)):ct(n,15)?dct(t,e,a(n,15),null):new CL(t,e,n,null)}function z(t,e){var n,i;return i=(!t.p&&(t.p=(ts(),new vi)),zi(t.p,e)),i??(n=e.Of(),ct(n,4)&&(n==null?(!t.p&&(t.p=(ts(),new vi)),IM(t.p,e)):(!t.p&&(t.p=(ts(),new vi)),wr(t.p,e,n))),n)}function s0e(t,e){var n,i,r,c;if(t.e.c.length==0)return null;for(c=new lM,i=new H(t.e);i.a=(r/2|0))for(this.e=i?i.c:null,this.d=r;n++0;)sct(this);this.b=e,this.a=null}function u0e(t){var e,n,i,r,c;return r=a(t.a,21).a,c=a(t.b,21).a,e=(r<0?-r:r)>(c<0?-c:c)?r<0?-r:r:c<0?-c:c,r<=0&&r==c?(n=0,i=c-1):r==-e&&c!=e?(n=c,i=r,c>=0&&++n):(n=-c,i=r),new zs(Xt(n),Xt(i))}function l0e(t,e){var n;return t.c.length==0?!1:(n=NIt((mi(0,t.c.length),a(t.c[0],14)).c.g),Eu(),n==(nw(),sy)||n==ry?!0:mN(Vh(new gi(null,new Ei(t,16)),new A3),new FH(e)))}function Slt(t,e,n){var i,r,c;if(!t.b[e.g]){for(t.b[e.g]=!0,i=n,!n&&(i=new yN),Xi(i.b,e),c=t.a[e.g].tc();c.hc();)r=a(c.ic(),170),r.b!=e&&Slt(t,r.b,i),r.c!=e&&Slt(t,r.c,i),Xi(i.a,r);return i}return null}function h0e(t){switch(t.g){case 0:case 1:case 2:return Ht(),Tn;case 3:case 4:case 5:return Ht(),fi;case 6:case 7:case 8:return Ht(),on;case 9:case 10:case 11:return Ht(),Qe;default:return Ht(),Wc}}function f0e(t){var e,n,i,r;for(e=0,i=t.length,r=i-4,n=0;n0)try{r=ku(e,Vs,qi)}catch(c){throw c=vr(c),ct(c,118)?(i=c,K(new TN(i))):K(c)}return n=(!t.a&&(t.a=new T5(t)),t.a),r=0?a(at(n,r),51):null}function _0e(t,e,n,i){var r;return r=x_(t,n,Y(Z(At,1),wt,2,6,[IZ,RZ,DZ,NZ,OZ,BZ,FZ]),e),r<0&&(r=x_(t,n,Y(Z(At,1),wt,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),e)),r<0?!1:(i.d=r,!0)}function y0e(t,e,n,i){var r;return r=x_(t,n,Y(Z(At,1),wt,2,6,[IZ,RZ,DZ,NZ,OZ,BZ,FZ]),e),r<0&&(r=x_(t,n,Y(Z(At,1),wt,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),e)),r<0?!1:(i.d=r,!0)}function x0e(t){var e,n,i;for(ibe(t),i=new Dt,n=new H(t.a.a.b);n.a>1),Alt(e,t,g,b,-r,c),Alt(e,t,b,f,-r,c),c.Ld(t[b-1],t[b])<=0){for(;n=0?(e||(e=new yT,i>0&&mo(e,t.substr(0,i))),e.a+="\\",wM(e,n&qr)):e&&wM(e,n&qr);return e?e.a:t}function S0e(t,e,n){var i,r,c,l;c=t.c,l=t.d,r=(zo(Y(Z(ss,1),wt,9,0,[c.g.k,c.k,c.a])).b+zo(Y(Z(ss,1),wt,9,0,[l.g.k,l.k,l.a])).b)/2,c.i==(Ht(),Qe)?i=new We(e+c.g.c.c.a+n,r):i=new We(e-n,r),pD(t.a,0,i)}function l9t(t,e){var n,i;return lct(t.a),qb(t.a,(RN(),vF),vF),qb(t.a,UE,UE),i=new as,Ni(i,UE,(r7(),MQ)),zt(cn(e,(tw(),TQ)))!==zt((JL(),_F))&&Ni(i,UE,yQ),Ni(i,UE,xQ),zEt(t.a,i),n=zht(t.a,e),n}function h9t(t){if(!t)return _f(),Dzt;var e=t.valueOf?t.valueOf():t;if(e!==t){var n=AK[typeof e];return n?n(e):qat(typeof e)}else return t instanceof Array||t instanceof y.Array?new I8(t):new sT(t)}function _P(t,e){var n;if(e<0)throw K(new E9("Negative exponent"));if(e==0)return eB;if(e==1||Yat(t,eB)||Yat(t,AE))return t;if(!$9t(t,0)){for(n=1;!$9t(t,n);)++n;return e_(pfe(n*e),_P(_ct(t,n),e))}return x1e(t,e)}function T0e(t,e){var n,i,r;return ct(e.g,8)&&a(e.g,8).j==(Ke(),rs)?is:(r=P2(e),r?y.Math.max(0,t.b/2-.5):(n=Qv(e),n?(i=lt(Yt(qM(n,(qt(),lp)))),y.Math.max(0,i/2-.5)):is))}function C0e(t,e){var n,i,r;return ct(e.g,8)&&a(e.g,8).j==(Ke(),rs)?is:(r=P2(e),r?y.Math.max(0,t.b/2-.5):(n=Qv(e),n?(i=lt(Yt(qM(n,(qt(),lp)))),y.Math.max(0,i/2-.5)):is))}function A0e(t,e){var n,i,r,c,l;if(!e.Wb()){if(r=a(e.cd(0),125),e._b()==1){LDt(t,r,r,1,0,e);return}for(n=1;nc.a&&!e&&(r.b=c.a),r.c=-(r.b-c.a)/2,n.g){case 1:r.d=-r.a;break;case 3:r.d=c.b}VX(i),qX(i)}function g9t(t,e,n){var i,r,c;switch(c=t.o,i=a(js(t.p,n),219),r=i.i,r.b=xP(i),r.a=yP(i),r.a=y.Math.max(r.a,c.b),r.a>c.b&&!e&&(r.a=c.b),r.d=-(r.a-c.b)/2,n.g){case 4:r.c=-r.b;break;case 2:r.c=c.a}VX(i),qX(i)}function e4(t,e){bNt(t,e),t.b&1&&(t.a.a=null),t.b&2&&(t.a.f=null),t.b&4&&(t.a.g=null,t.a.i=null),t.b&16&&(t.a.d=null,t.a.e=null),t.b&8&&(t.a.b=null),t.b&32&&(t.a.j=null,t.a.c=null)}function m9t(t){var e,n,i,r;if(n=a(t,42).Kg(),n)try{if(i=null,e=nE((v1(),Nl),FNt(xfe(n))),e&&(r=e.Lg(),r&&(i=r.gk(hi(lt(n.e))))),i&&i!=t)return m9t(i)}catch(c){if(c=vr(c),!ct(c,54))throw K(c)}return t}function b9t(t,e){var n;e.d?e.d.b=e.b:t.a=e.b,e.b?e.b.d=e.d:t.e=e.d,!e.e&&!e.c?(n=a(IM(t.b,e.a),264),n.a=0,++t.c):(n=a(zi(t.b,e.a),264),--n.a,e.e?e.e.c=e.c:n.b=e.c,e.c?e.c.e=e.e:n.c=e.e),--t.d}function Llt(t){var e,n;return t>-0x800000000000&&t<0x800000000000?t==0?0:(e=t<0,e&&(t=-t),n=Tr(y.Math.floor(y.Math.log(t)/.6931471805599453)),(!e||t!=y.Math.pow(2,n))&&++n,n):bPt(Ka(t))}function w9t(t,e){var n,i,r,c,l,f;for(n=t.b.c.length,r=Ee(t.b,e);e*2+10)for(l=t.c.d,f=t.d.d,r=hl(za(new We(f.a,f.b),l),1/(i+1)),c=new We(l.a,l.b),n=new H(t.a);n.a0&&(l+=n,++e);e>1&&(l+=t.c*(e-1))}else l=c3t(SPt(vL(wo(Sot(t.a),new Bk),new Mv)));return l>0?l+t.n.d+t.n.a:0}function xP(t){var e,n,i,r,c,l;if(l=0,t.b==0)l=c3t(SPt(vL(wo(Sot(t.a),new yz),new Lg)));else{for(c=PRt(t,!0),e=0,i=0,r=c.length;i0&&(l+=n,++e);e>1&&(l+=t.c*(e-1))}return l>0?l+t.n.b+t.n.c:0}function P0e(t){var e,n;return n=-t.a,e=Y(Z(nl,1),Pf,22,15,[43,48,48,48,48]),n<0&&(e[0]=45,n=-n),e[1]=e[1]+((n/60|0)/10|0)&qr,e[2]=e[2]+(n/60|0)%10&qr,e[3]=e[3]+(n%60/10|0)&qr,e[4]=e[4]+n%10&qr,ml(e,0,e.length)}function I0e(t){var e,n,i,r,c,l;for(l=WM(t.d,t.e),c=l.tc();c.hc();)for(r=a(c.ic(),11),i=t.e==(Ht(),on)?r.d:r.f,n=new H(i);n.a=0;c+=n?1:-1)l=l|e.c.qf(g,c,n,i),l=l|e.q.xf(g,c,n),l=l|ONt(t,g[c],n,i);return Ir(t.c,e),l}function y9t(t,e){var n,i,r,c,l,f;for(c=new H(t.b);c.a=0&&i0;){if(e=a(t.k.cd(t.n-1),75),n=e.nj(),ct(n,62)&&a(a(n,17),62).Bb&ca&&(!t.e||n.Vi()!=$E||n.pi()!=0)&&e.lc()!=null)return!0;--t.n}return!1}else return t.n>0}function Plt(t,e){var n,i,r,c;if(Ci(t),t.c!=0||t.a!=123)throw K(new ri(ai((Kn(),eUt))));if(c=e==112,i=t.d,n=hM(t.i,125,i),n<0)throw K(new ri(ai((Kn(),nUt))));return r=$h(t.i,i,n),t.d=n+1,U5t(r,c,(t.e&512)==512)}function N0e(t){var e,n;return n=-t.a,e=Y(Z(nl,1),Pf,22,15,[43,48,48,58,48,48]),n<0&&(e[0]=45,n=-n),e[1]=e[1]+((n/60|0)/10|0)&qr,e[2]=e[2]+(n/60|0)%10&qr,e[4]=e[4]+(n%60/10|0)&qr,e[5]=e[5]+n%10&qr,ml(e,0,e.length)}function O0e(t){var e;return e=Y(Z(nl,1),Pf,22,15,[71,77,84,45,48,48,58,48,48]),t<=0&&(e[3]=43,t=-t),e[4]=e[4]+((t/60|0)/10|0)&qr,e[5]=e[5]+(t/60|0)%10&qr,e[7]=e[7]+(t%60/10|0)&qr,e[8]=e[8]+t%10&qr,ml(e,0,e.length)}function E9t(t,e){var n,i,r;return i=new Jh(t),Uo(i,e),Ct(i,(Ft(),HB),e),Ct(i,(qt(),Qi),(Ls(),Gc)),Ct(i,Bf,(md(),EF)),jl(i,(Ke(),rs)),n=new Eo,ds(n,i),yr(n,(Ht(),on)),r=new Eo,ds(r,i),yr(r,Qe),i}function S9t(t,e){var n,i,r,c,l;for(t.c[e.o]=!0,Ut(t.a,e),l=new H(e.i);l.a0&&(r=n),l=new H(t.f.e);l.a=c)l.Pb();else for(r=l.tc(),i=0;i0?Pit():l<0&&Rlt(t,e,-l),!0):!1}function j0e(t){var e,n,i,r,c,l,f,g,b,v;for(n=t.o,e=t.p,l=qi,r=Vs,f=qi,c=Vs,b=0;bb?r:b,f=fv?c:v);return g=r-l+1,i=c-f+1,new E4t(Xt(l),Xt(f),Xt(g),Xt(i))}function H0e(t,e){var n,i,r;return n=a(z(e,(Ph(),kE)),21).a-a(z(t,kE),21).a,n==0?(i=za(Xc(a(z(t,(R1(),x6)),9)),a(z(t,H4),9)),r=za(Xc(a(z(e,x6),9)),a(z(e,H4),9)),ro(i.a*i.b,r.a*r.b)):n}function G0e(t,e){var n,i,r;return n=a(z(e,(sw(),wF)),21).a-a(z(t,wF),21).a,n==0?(i=za(Xc(a(z(t,(mc(),Z6)),9)),a(z(t,hA),9)),r=za(Xc(a(z(e,Z6),9)),a(z(e,hA),9)),ro(i.a*i.b,r.a*r.b)):n}function W0e(t,e,n){var i,r,c,l,f,g;if(!t||t.c.length==0)return null;for(c=new eAt(e,!n),r=new H(t);r.a0)switch(e.g){case 2:c.n.c=t.s;break;case 4:c.n.b=t.s}}function yX(t,e){var n,i,r;if(r=oE((Qa(),eo),t.mg(),e),r)return Jo(),a(r,61).bj()||(r=lC(qo(eo,r))),i=(n=t.rg(r),a(n>=0?t.ug(n,!0,!0):Z2(t,r,!0),184)),a(i,237).wk(e);throw K(new yn(G_+e.be()+Lpt))}function q0e(t,e,n){var i,r,c,l;return c=A7t(UV(),e),i=null,c&&(l=x7t(c,n),r=null,l!=null&&(r=(l==null?(!t.o&&(t.o=new lu((Ic(),pp),ug,t,0)),aP(t.o,c)):(!t.o&&(t.o=new lu((Ic(),pp),ug,t,0)),gP(t.o,c,l)),t)),i=r),i}function Dlt(t,e,n,i){var r,c,l,f,g;if(r=t.d[e],r){if(c=r.g,g=r.i,i!=null){for(f=0;f1||n==-1?(t.b=-1,!0):(e=wl(t),e&&(Jo(),e.Ri()==RUt)?(t.b=-1,!0):(t.b=1,!1));default:case 1:return!1}}function X0e(t,e){var n,i,r,c,l;for(i=(!e.s&&(e.s=new Wt(Ra,e,21,17)),e.s),c=null,r=0,l=i.i;rr)?(Hn(c.a!=null),a(c.a,8)):null}function J0e(t,e){Zl();var n,i,r,c,l,f;for(n=null,l=e.tc();l.hc();)c=a(l.ic(),125),!c.k&&(i=pee(c.a),r=dre(c.a),f=new u4(i,r,null,a(c.d.a.Xb().tc().ic(),14)),Ut(f.c,c.a),t.c[t.c.length]=f,n&&Ut(n.d,f),n=f)}function Q0e(t,e,n){var i,r,c,l,f,g;for(i=a(rr(t.c,e),15),r=a(rr(t.c,n),15),c=i.fd(i._b()),l=r.fd(r._b());c.Cc()&&l.Cc();)if(f=a(c.Ec(),21),g=a(l.Ec(),21),f!=g)return Lp(f.a,g.a);return!c.hc()&&!l.hc()?0:c.hc()?1:-1}function n4(t,e,n,i,r){var c,l,f,g;return g=JW(t,a(r,51)),zt(g)!==zt(r)?(f=a(t.g[n],75),c=k1(e,g),XT(t,n,lX(t,n,c)),Xl(t.e)&&(l=Hg(t,9,c.nj(),r,g,i,!1),olt(l,new Qd(t.e,9,t.c,f,c,i,!1)),SV(l)),g):r}function tme(t,e,n){var i,r,c,l;for(r=n,c=uTt(vL(a(a(rr(t.r,e),19),60).xc(),new Ab)),l=0;c.a||(c.a=Vv(c.c,c)),c.a;)if(r){pN(c),r=!1;continue}else i=pN(c),c.a||(c.a=Vv(c.c,c)),c.a&&(l=y.Math.max(l,i));return l}function cr(t,e,n){var i;if(i=a(t.c.Vb(e),13),i)return i.nc(n)?(++t.d,!0):!1;if(i=t.Pc(e),i.nc(n))return++t.d,t.c.Zb(e,i),!0;throw K(new sV("New Collection violated the Collection spec"))}function eme(t){var e,n,i,r,c,l;for(r=0,t.q=new Dt,e=new $r,l=new H(t.p);l.a>16),e=i>>16&16,n=16-e,t=t>>e,i=t-256,e=i>>16&8,n+=e,t<<=e,i=t-zm,e=i>>16&4,n+=e,t<<=e,i=t-Lf,e=i>>16&2,n+=e,t<<=e,i=t>>14,e=i&~(i>>1),n+2-e)}function ime(t,e,n,i){var r,c,l,f,g,b;for(r=0;r=0&&b>=0&&g=0?t.ug(i,!0,!0):Z2(t,c,!0),184)),a(r,237).sk(e,n);throw K(new yn(G_+e.be()+Lpt))}function P9t(t){var e,n;if(Gd(a(z(t,(qt(),Qi)),83)))for(n=new H(t.i);n.a>24;return l}function ame(t,e){var n,i,r,c,l;if(n=a(an(t.a,4),116),l=n==null?0:n.length,e>=l)throw K(new $v(e,l));return r=n[e],l==1?i=null:(i=dt(att,aK,380,l-1,0,1),Aa(n,0,i,0,e),c=l-e-1,c>0&&Aa(n,e+1,i,e,c)),lP(t,i),$8t(t,e,r),r}function ume(t,e){var n,i,r;if(zt(t)===zt(e))return!0;if(t==null||e==null||t.length!=e.length)return!1;for(n=0;n=null.tl()?(D7(t),Flt(t)):e.hc()}function xX(t){var e,n;if(ym(t))throw K(new yn(GBt));for(n=qn(t,0);n.b!=n.d.c;)e=a(Yn(n),9),this.d=y.Math.min(this.d,e.b),this.c=y.Math.max(this.c,e.a),this.a=y.Math.max(this.a,e.b),this.b=y.Math.min(this.b,e.a)}function fme(t){var e,n;return e=new as,pa(e,m$t),n=a(z(t,(Ft(),Qc)),19),n.pc((So(),A6))&&pa(e,y$t),n.pc(IE)&&pa(e,b$t),(n.pc(J_)||lt(de(z(t,(qt(),N6)))))&&(pa(e,v$t),n.pc(Q_)&&pa(e,_$t)),n.pc(RE)&&pa(e,w$t),e}function MX(t){var e,n;if(e=hi(cn(t,(dr(),Nwt))),n=ade(UV(),e),!n)throw e==null||e.length==0?K(new I5("No layout algorithm has been specified ("+t+").")):K(new I5("Layout algorithm not found: "+e));return n}function Y2(){Y2=P,Hx=a(at(Et((Nit(),_c).qb),6),29),jx=a(at(Et(_c.qb),3),29),ptt=a(at(Et(_c.qb),4),29),gtt=a(at(Et(_c.qb),5),17),x7(Hx),x7(jx),x7(ptt),x7(gtt),oXt=new ju(Y(Z(Ra,1),$_,158,0,[Hx,jx]))}function B9t(t){var e=(!TK&&(TK=Uxe()),TK),n=t.replace(/[\x00-\x1f\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200b-\u200f\u2028-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb"\\]/g,function(i){return Eoe(i,e)});return'"'+n+'"'}function dme(t){var e,n,i,r,c,l;for(r=t.e.c.length,i=dt(Sl,fw,15,r,0,1),l=new H(t.e);l.a=0;)i=n[c],l.Bk(i.nj())&&ni(r,i);!Hxe(t,r)&&Xl(t.e)&&Wn(t,e.lj()?Hg(t,6,e,(we(),fo),null,-1,!1):Hg(t,e.Zi()?2:1,e,null,null,-1,!1))}function wme(t,e){var n,i,r,c,l;return t.a==(QM(),V4)?!0:(c=e.a.c,n=e.a.c+e.a.b,!(e.i&&(i=e.u,l=i.c.c.a-i.n.a/2,r=c-(i.k.a+i.n.a),r>l)||e.n&&(i=e.v,l=i.c.c.a-i.n.a/2,r=i.k.a-n,r>l)))}function j9t(t,e,n){var i,r,c,l,f,g;for(i=0,g=n,e||(i=n*(t.c.length-1),g*=-1),c=new H(t);c.a1?t.e*=lt(t.a):t.f/=lt(t.a),whe(t),Yfe(t),rve(t),Ct(t.b,(GC(),uB),t.g)}function _me(t){L2();var e,n,i,r;for(lB=new Dt,HK=(ts(),new vi),jK=new Dt,e=(!t.a&&(t.a=new Wt(zr,t,10,11)),t.a),Txe(e),r=new $n(e);r.e!=r.i._b();)i=a(ci(r),35),nc(lB,i,0)==-1&&(n=new Dt,Ut(jK,n),iRt(i,n));return jK}function yme(t,e){var n,i,r,c,l,f,g;if(i=tIt(t.Db&254),i==1)t.Eb=null;else if(c=s_(t.Eb),i==2)r=eX(t,e),t.Eb=c[r==0?1:0];else{for(l=dt(un,te,1,i-1,5,1),n=2,f=0,g=0;n<=128;n<<=1)n==e?++f:t.Db&n&&(l[g++]=c[f++]);t.Eb=l}t.Db&=~e}function W9t(t,e,n){var i,r,c;t.ti()?(c=t.ui(),eP(t,e,n),i=t.mi(3,null,n,e,c),t.qi()?(r=t.ri(n,null),t.xi()&&(r=t.yi(n,r)),r?(r.Sh(i),r.Th()):t.ni(i)):t.ni(i)):(eP(t,e,n),t.qi()&&(r=t.ri(n,null),r&&r.Th()))}function EX(t,e){var n,i,r,c;t.ti()?(n=t.i,c=t.ui(),TL(t,e),i=t.mi(3,null,e,n,c),t.qi()?(r=t.ri(e,null),t.xi()&&(r=t.yi(e,r)),r?(r.Sh(i),r.Th()):t.ni(i)):t.ni(i)):(TL(t,e),t.qi()&&(r=t.ri(e,null),r&&r.Th()))}function jlt(t,e){var n,i,r,c,l;if(e===t)return!0;if(!ct(e,15)||(l=a(e,15),t._b()!=l._b()))return!1;for(c=l.tc(),i=t.tc();i.hc();)if(n=i.ic(),r=c.ic(),!(zt(n)===zt(r)||n!=null&&Fi(n,r)))return!1;return!0}function $9t(t,e){var n,i,r;if(e==0)return(t.a[0]&1)!=0;if(e<0)throw K(new E9("Negative bit address"));if(r=e>>5,r>=t.d)return t.e<0;if(n=t.a[r],e=1<<(e&31),t.e<0){if(i=PPt(t),r=0?t.jg(null):t.yg().Cg(t,-1-e,null,null)),t.kg(a(r,42),n),i&&i.Th(),t.eg()&&t.fg()&&n>-1&&Bi(t,new fs(t,9,n,c,r)),r):c}function eE(){eE=P,ott=new _2(kBt,0),$F=new _2("INSIDE_SELF_LOOPS",1),VF=new _2("MULTI_EDGES",2),WF=new _2("EDGE_LABELS",3),stt=new _2("PORTS",4),GF=new _2("COMPOUND",5),HF=new _2("CLUSTERS",6),rtt=new _2("DISCONNECTED",7)}function V9t(t){var e,n;if(t.f){for(;t.n>16)),15).dd(c),f0&&(!(jv(t.a.c)&&e.n.d)&&!(Y5(t.a.c)&&e.n.b)&&(e.g.d+=y.Math.max(0,i/2-.5)),!(jv(t.a.c)&&e.n.a)&&!(Y5(t.a.c)&&e.n.c)&&(e.g.a-=i-1))}function J9t(t,e,n){var i,r,c,l,f,g;c=a(Ee(e.d,0),14).c,i=c.g,r=i.j,g=a(Ee(n.f,0),14).d,l=g.g,f=l.j,r==(Ke(),Hr)?Ct(t,(Ft(),Iu),a(z(i,Iu),11)):Ct(t,(Ft(),Iu),c),f==Hr?Ct(t,(Ft(),Ru),a(z(l,Ru),11)):Ct(t,(Ft(),Ru),g)}function TX(t){var e,n,i;if(t.length==0)throw K(new yn(GBt));for(n=0,i=t.length;n>e,c=t.m>>e|n<<22-e,r=t.l>>e|t.m<<22-e):e<44?(l=i?sp:0,c=n>>e-22,r=t.m>>e-22|n<<44-e):(l=i?sp:0,c=i?eu:0,r=n>>e-44),ia(r&eu,c&eu,l&sp)}function CX(t){var e,n,i,r,c,l;for(this.c=new Dt,this.d=t,i=is,r=is,e=Ps,n=Ps,l=qn(t,0);l.b!=l.d.c;)c=a(Yn(l),9),i=y.Math.min(i,c.a),r=y.Math.min(r,c.b),e=y.Math.max(e,c.a),n=y.Math.max(n,c.b);this.a=new qh(i,r,e-i,n-r)}function Vlt(t){var e,n,i;this.c=t,i=a(z(t,(qt(),ch)),110),e=lt(Yt(z(t,$B))),n=lt(Yt(z(t,gbt))),i==(Js(),ah)||i==uh||i==Ff?this.b=e*n:this.b=1/(e*n),this.j=lt(Yt(z(t,Aw))),this.e=lt(Yt(z(t,lp))),this.f=t.b.c.length}function Q9t(t){switch(t.g){case 0:return new Sv;case 1:return new E8;case 2:return new g1;case 3:return new GMt;case 4:return new C4t;default:throw K(new yn("No implementation is available for the node placer "+(t.f!=null?t.f:""+t.g)))}}function nh(t){var e;return e=new ll(Og(t.ql)),e.a+="@",Ii(e,(Yr(t)>>>0).toString(16)),t.Eg()?(e.a+=" (eProxyURI: ",Fa(e,t.Kg()),t.tg()&&(e.a+=" eClass: ",Fa(e,t.tg())),e.a+=")"):t.tg()&&(e.a+=" (eClass: ",Fa(e,t.tg()),e.a+=")"),e.a}function tDt(t,e){var n,i,r,c,l,f,g,b,v;if(t.a.f>0&&ct(e,38)&&(t.a.Fi(),b=a(e,38),g=b.kc(),c=g==null?0:Yr(g),l=vst(t.a,c),n=t.a.d[l],n)){for(i=a(n.g,339),v=n.i,f=0;f0&&r0):r<0&&-r0):!1}function L7(t,e,n,i,r){var c,l,f,g,b,v;for(c=i,b=a(a(rr(t.r,e),19),60).tc();b.hc();){if(g=a(b.ic(),111),c){c=!1;continue}l=0,r>0?l=r:g.c&&(l=ID(g.c)),l>0&&(n?(v=g.b.Re().a,l>v&&(f=(l-v)/2,g.d.b=f,g.d.c=f)):g.d.c=t.s+l)}}function qlt(t,e,n){switch(e){case 7:!t.e&&(t.e=new pn(Xs,t,7,4)),Dr(t.e),!t.e&&(t.e=new pn(Xs,t,7,4)),Lr(t.e,a(n,13));return;case 8:!t.d&&(t.d=new pn(Xs,t,8,5)),Dr(t.d),!t.d&&(t.d=new pn(Xs,t,8,5)),Lr(t.d,a(n,13));return}ilt(t,e,n)}function kme(t){var e,n;if(t.c.length!=2)throw K(new yc("Order only allowed for two paths."));e=(mi(0,t.c.length),a(t.c[0],14)),n=(mi(1,t.c.length),a(t.c[1],14)),e.d.g!=n.c.g&&(t.c=dt(un,te,1,0,5,1),t.c[t.c.length]=n,t.c[t.c.length]=e)}function Lme(t){var e,n,i,r;if(t==null)return null;if(i=Hc(t,!0),r=h6.length,le(i.substr(i.length-r,r),h6)){if(n=i.length,n==4){if(e=i.charCodeAt(0),e==43)return b_t;if(e==45)return xXt}else if(n==3)return b_t}return rw(i)}function Pme(t,e,n){var i;i=null,e&&(i=e.d),KC(t,new aM(e.k.a-i.b+n.a,e.k.b-i.d+n.b)),KC(t,new aM(e.k.a-i.b+n.a,e.k.b+e.n.b+i.a+n.b)),KC(t,new aM(e.k.a+e.n.a+i.c+n.a,e.k.b-i.d+n.b)),KC(t,new aM(e.k.a+e.n.a+i.c+n.a,e.k.b+e.n.b+i.a+n.b))}function Ime(t,e){var n,i,r,c,l;for(di(e,"Port side processing",1),l=new H(t.a);l.ag-n&&f=t.c.a.length)return e;for(i=Fa(Ii(new om,"expected one element but was: <"),e),n=0;n<4&&t.a=0?t.Mg(c,n):Qlt(t,r,n);else throw K(new yn(G_+r.be()+VY));else throw K(new yn("The feature ID"+e+" is not a valid feature ID"));else Ku(t,i,r,n)}function AX(t,e,n,i,r){var c,l,f,g,b,v,M,k,R;return l=n-t,f=i-e,c=y.Math.atan2(l,f),g=c+rY,b=c-rY,v=r*y.Math.sin(g)+t,k=r*y.Math.cos(g)+e,M=r*y.Math.sin(b)+t,R=r*y.Math.cos(b)+e,Vg(Y(Z(ss,1),wt,9,0,[new We(v,k),new We(M,R)]))}function cDt(t){var e,n,i,r,c,l,f;for(c=0,r=t.f.e,n=0;n=0)return r;for(c=1,f=new H(e.i);f.ag+1?c:g+1);return Sfe(t,e,c),c}function r0(){r0=P,kl=new Fv("H_LEFT",0),Uf=new Fv("H_CENTER",1),Pl=new Fv("H_RIGHT",2),Bh=new Fv("V_TOP",3),hh=new Fv("V_CENTER",4),lh=new Fv("V_BOTTOM",5),Nu=new Fv("INSIDE",6),Il=new Fv("OUTSIDE",7),Ll=new Fv("H_PRIORITY",8)}function cn(t,e){var n,i;return i=(!t.o&&(t.o=new lu((Ic(),pp),ug,t,0)),Lh(t.o,e)),i??(n=e.Of(),ct(n,4)&&(n==null?(!t.o&&(t.o=new lu((Ic(),pp),ug,t,0)),aP(t.o,e)):(!t.o&&(t.o=new lu((Ic(),pp),ug,t,0)),gP(t.o,e,n))),n)}function zme(t){var e,n,i,r,c,l,f;if(e=t.Yg(xl),e&&(f=hi(Lh((!e.b&&(e.b=new Mu((ye(),Ho),Dc,e)),e.b),"settingDelegates")),f!=null)){for(n=new Dt,r=K2(f,"\\w+"),c=0,l=r.length;c0?(e-=1,n-=1):i>=0&&r<0?(e+=1,n+=1):i>0&&r>=0?(e-=1,n+=1):(e+=1,n-=1),new zs(Xt(e),Xt(n))}function Xlt(t,e,n){var i,r,c;if(e!=n){i=e;do sr(t,i.c),r=a(z(i,(Ft(),tg)),8),r&&(c=i.d,Wu(t,c.b,c.d),sr(t,r.k),i=Mc(r));while(r);i=n;do za(t,i.c),r=a(z(i,(Ft(),tg)),8),r&&(c=i.d,rL(t,c.b,c.d),za(t,r.k),i=Mc(r));while(r)}}function Gme(t,e,n){var i,r,c,l,f,g;i=new Dt,i.c[i.c.length]=e,g=e,f=0;do g=gxe(t,g),g&&(i.c[i.c.length]=g),++f;while(g);for(l=(n-(i.c.length-1)*t.d.d)/i.c.length,c=new H(i);c.ae.c?1:t.be.b?1:t.a!=e.a?Yr(t.a)-Yr(e.a):t.d==(pC(),cA)&&e.d==oA?-1:t.d==oA&&e.d==cA?1:0}function kX(t){var e,n,i,r,c,l,f,g;for(r=is,i=Ps,n=new H(t.e.b);n.a=0;e-=2)for(n=0;n<=e;n+=2)(t.b[n]>t.b[n+2]||t.b[n]===t.b[n+2]&&t.b[n+1]>t.b[n+3])&&(i=t.b[n+2],t.b[n+2]=t.b[n],t.b[n]=i,i=t.b[n+3],t.b[n+3]=t.b[n+1],t.b[n+1]=i);t.c=!0}}function fDt(t,e){var n,i,r,c,l,f,g,b;for(l=e==1?KK:YK,c=l.a.Xb().tc();c.hc();)for(r=a(c.ic(),110),g=a(rr(t.f.c,r),19).tc();g.hc();)switch(f=a(g.ic(),48),i=a(f.b,80),b=a(f.a,172),n=b.c,r.g){case 2:case 1:i.g.d+=n;break;case 4:case 3:i.g.c+=n}}function ebe(t){lht();var e,n,i,r,c,l,f;if(t==null||(r=t.length,r%2!=0))return null;for(e=SN(t),c=r/2|0,n=dt(Da,W_,22,c,15,1),i=0;i>24}return n}function nE(t,e){var n,i,r;return n=e==null?Ua(Ea(t.d,null)):RT(t.e,e),ct(n,207)?(r=a(n,207),r.gh()==null,r):ct(n,456)?(i=a(n,1631),r=i.a,r&&(r.yb==null||(e==null?Au(t.d,null,r):km(t.e,e,r))),r):null}function nbe(t,e){var n,i,r,c,l;if(i=e.nj(),Om(t.e,i)){if(i.xh()&&_V(t,i,e.lc()))return!1}else for(l=gu(t.e.mg(),i),n=a(t.g,124),r=0;r0&&(!(jv(t.a.c)&&e.n.d)&&!(Y5(t.a.c)&&e.n.b)&&(e.g.d-=y.Math.max(0,i/2-.5)),!(jv(t.a.c)&&e.n.a)&&!(Y5(t.a.c)&&e.n.c)&&(e.g.a+=y.Math.max(0,i-1)))}function dDt(t,e,n){var i,r;if((t.c-t.b&t.a.length-1)==2)e==(Ht(),Tn)||e==Qe?(PN(a(kC(t),15),(Cu(),kd)),PN(a(kC(t),15),ag)):(PN(a(kC(t),15),(Cu(),ag)),PN(a(kC(t),15),kd));else for(r=new aC(t);r.a!=r.b;)i=a(XN(r),15),PN(i,n)}function pDt(t){var e,n,i,r,c,l,f;if(t&&(e=t.Yg(xl),e&&(l=hi(Lh((!e.b&&(e.b=new Mu((ye(),Ho),Dc,e)),e.b),"conversionDelegates")),l!=null))){for(f=new Dt,i=K2(l,"\\w+"),r=0,c=i.length;r=2147483648&&(i-=HZ),i)}function gDt(t,e,n){var i,r,c,l;O4t(t,e)>O4t(t,n)?(i=ac(n,(Ht(),Qe)),t.d=i.Wb()?0:fL(a(i.cd(0),11)),l=ac(e,on),t.b=l.Wb()?0:fL(a(l.cd(0),11))):(r=ac(n,(Ht(),on)),t.d=r.Wb()?0:fL(a(r.cd(0),11)),c=ac(e,Qe),t.b=c.Wb()?0:fL(a(c.cd(0),11)))}function rbe(t){var e,n,i,r,c,l;if(r=a(Ee(t.i,0),11),r.d.c.length+r.f.c.length==0)t.k.a=0;else{for(l=0,i=Rn(Bp(new zd(r),new Lv(r)));Jn(i);)n=a(In(i),11),l+=n.g.k.a+n.k.a+n.a.a;e=a(z(t,(qt(),Sw)),9),c=e?e.a:0,t.k.a=l/(r.d.c.length+r.f.c.length)-c}}function mDt(t){switch(t.g){case 0:return new rSt;case 1:return new y8;case 2:return new HMt;case 3:return new X0;case 4:return new pTt;case 5:return new M8;default:throw K(new yn("No implementation is available for the layerer "+(t.f!=null?t.f:""+t.g)))}}function bDt(t,e){var n,i,r,c;for(n=t.o.a,c=a(a(rr(t.r,e),19),60).tc();c.hc();)r=a(c.ic(),111),r.e.a=n*lt(Yt(r.b.xe(zF))),r.e.b=(i=r.b,i.ye((dr(),nu))?i.ef()==(Ht(),Tn)?-i.Re().b-lt(Yt(i.xe(nu))):lt(Yt(i.xe(nu))):i.ef()==(Ht(),Tn)?-i.Re().b:0)}function LX(t,e){tE();var n,i,r,c,l,f,g,b,v;return e.d>t.d&&(f=t,t=e,e=f),e.d<63?twe(t,e):(l=(t.d&-2)<<4,b=_ct(t,l),v=_ct(e,l),i=$X(t,R2(b,l)),r=$X(e,R2(v,l)),g=LX(b,v),n=LX(i,r),c=LX($X(b,i),$X(r,v)),c=QX(QX(c,g),n),c=R2(c,l),g=R2(g,l<<1),QX(QX(g,c),n))}function wDt(t,e,n){var i,r,c;for(cne.call(this,new Dt),this.a=e,this.b=n,this.e=t,i=(t.b&&YX(t),t.a),this.d=L4t(i.a,this.a),this.c=L4t(i.b,this.b),ofe(this,this.d,this.c),F0e(this),c=this.e.e.a.Xb().tc();c.hc();)r=a(c.ic(),247),r.c.c.length>0&&Oye(this,r)}function sbe(t){var e,n,i,r;for(e=0,n=0,r=new H(t.i);r.a1||n>1)return 2;return e+n==1?2:0}function obe(t,e,n){var i,r,c,l,f,g,b;i=n,r=e;do r=t.a[r.o],l=(b=t.g[r.o],lt(t.p[b.o])+lt(t.d[r.o])-r.d.d),f=Aae(r,r.c?nc(r.c.a,r,0):-1),f&&(c=(g=t.g[f.o],lt(t.p[g.o])+lt(t.d[f.o])+f.n.b+f.d.a),i=y.Math.min(i,l-(c+Gv(t.k,r,f))));while(e!=r);return i}function cbe(t,e,n){var i,r,c,l,f,g,b;i=n,r=e;do r=t.a[r.o],c=(b=t.g[r.o],lt(t.p[b.o])+lt(t.d[r.o])+r.n.b+r.d.a),f=Gue(r,r.c?nc(r.c.a,r,0):-1),f&&(l=(g=t.g[f.o],lt(t.p[g.o])+lt(t.d[f.o])-f.d.d),i=y.Math.min(i,l-(c+Gv(t.k,r,f))));while(e!=r);return i}function abe(t,e,n){var i,r,c,l;for(r=n,c=uTt(vL(a(a(rr(t.r,e),19),60).xc(),new _p)),l=0;c.a||(c.a=Vv(c.c,c)),c.a;)if(r){Hn((c.a||(c.a=Vv(c.c,c)),c.a)),c.a=!1,r=!1;continue}else i=pN(c),c.a||(c.a=Vv(c.c,c)),c.a&&(l=y.Math.max(l,i));return l}function ube(t,e,n){var i,r,c,l,f,g,b,v;if(n)for(c=n.a.length,i=new Ug(c),f=(i.b-i.a)*i.c<0?(_1(),hg):new x1(i);f.hc();)l=a(f.ic(),21),r=LM(n,l.a),r&&(g=yae(t,(b=(am(),v=new Mit,v),e&&TDt(b,e),b),r),GL(g,Jd(r,Df)),_7(r,g),Mlt(r,g),qV(t,r,g))}function lbe(t){var e,n,i;return n=a(t.a,21).a,i=a(t.b,21).a,e=(n<0?-n:n)>(i<0?-i:i)?n<0?-n:n:i<0?-i:i,n=-e&&i==e?new zs(Xt(n-1),Xt(i)):new zs(Xt(n),Xt(i-1))}function vDt(t){var e,n,i,r,c,l;for(l=a(xo(t.a,dt(Cl,Ih,8,t.a.c.length,0,1)),123),Rrt(l,new p3),n=null,r=0,c=l.length;ri.o?yr(r,fi):r.i==fi&&i.o>t.o&&yr(r,Tn);break}return i}function Klt(t,e,n){var i,r,c;for(c=new H(t.e);c.a0&&(i.b.c-=i.c,i.b.c<=0&&i.b.f>0&&Xi(e,i.b));for(r=new H(t.b);r.a0&&(i.a.f-=i.c,i.a.f<=0&&i.a.c>0&&Xi(n,i.a))}function Jlt(t,e,n){var i,r,c;for(c=new H(t.q);c.a0&&(i.b.j-=i.c,i.b.j<=0&&i.b.r>0&&Xi(e,i.b));for(r=new H(t.g);r.a0&&(i.a.r-=i.c,i.a.r<=0&&i.a.j>0&&Xi(n,i.a))}function D7(t){var e,n,i,r,c;if(t.g==null&&(t.d=t.Gh(t.f),ni(t,t.d),t.c))return c=t.f,c;if(e=a(t.g[t.i-1],43),r=e.ic(),t.e=e,n=t.Gh(r),n.hc())t.d=n,ni(t,n);else for(t.d=null;!e.hc()&&(Vr(t.g,--t.i,null),t.i!=0);)i=a(t.g[t.i-1],43),e=i;return r}function EP(t,e){var n,i,r,c;for(t=t,n=new Bb,c=0,i=0;i=0?t.ug(i,!0,!0):Z2(t,c,!0),184)),a(r,237).xk(e,n)}else throw K(new yn(G_+e.be()+VY))}function tht(t,e,n){switch(n.g){case 1:return new We(e.a,y.Math.min(t.d.b,e.b));case 2:return new We(y.Math.max(t.c.a,e.a),e.b);case 3:return new We(e.a,y.Math.max(t.c.b,e.b));case 4:return new We(y.Math.min(e.a,t.d.a),e.b)}return new We(e.a,e.b)}function SP(t){var e,n,i;for(e=od(1+(!t.c&&(t.c=new Wt(Rl,t,9,9)),t.c).i),Ut(e,(!t.d&&(t.d=new pn(Xs,t,8,5)),t.d)),i=new $n((!t.c&&(t.c=new Wt(Rl,t,9,9)),t.c));i.e!=i.i._b();)n=a(ci(i),121),Ut(e,(!n.d&&(n.d=new pn(Xs,n,8,5)),n.d));return si(e),new y2(e)}function Af(t){var e,n,i;for(e=od(1+(!t.c&&(t.c=new Wt(Rl,t,9,9)),t.c).i),Ut(e,(!t.e&&(t.e=new pn(Xs,t,7,4)),t.e)),i=new $n((!t.c&&(t.c=new Wt(Rl,t,9,9)),t.c));i.e!=i.i._b();)n=a(ci(i),121),Ut(e,(!n.e&&(n.e=new pn(Xs,n,7,4)),n.e));return si(e),new y2(e)}function gbe(t,e){var n,i,r,c,l;if(di(e,"Breaking Point Processor",1),H2e(t),lt(de(z(t,(qt(),_bt))))){for(r=new H(t.b);r.a3&&dd(t,0,e-3))}function wbe(t){var e,n,i;return n=t.l,n&n-1||(i=t.m,i&i-1)||(e=t.h,e&e-1)||e==0&&i==0&&n==0?-1:e==0&&i==0&&n!=0?lat(n):e==0&&i!=0&&n==0?lat(i)+22:e!=0&&i==0&&n==0?lat(e)+44:-1}function vbe(t,e){var n,i,r,c,l;for(di(e,"Edge joining",1),n=lt(de(z(t,(qt(),KJ)))),r=new H(t.b);r.a0),c.a.cd(c.c=--c.b),cd(c,r),Hn(c.bU_,g=vU_,g=vU_,g=vU_,g=v=0){if(e==n)return new zs(Xt(-e-1),Xt(-e-1));if(e==-n)return new zs(Xt(-e),Xt(n+1))}return(e<0?-e:e)>(n<0?-n:n)?e<0?new zs(Xt(-e),Xt(n)):new zs(Xt(-e),Xt(n+1)):new zs(Xt(e+1),Xt(n))}function Tbe(t,e,n){var i,r,c,l,f;return r=a(cn(e,(M7(),Dwt)),21),!r&&(r=Xt(0)),c=a(cn(n,Dwt),21),!c&&(c=Xt(0)),r.a>c.a?-1:r.a1)for(e=hm((n=new Ng,++t.b,n),t.d),f=qn(c,0);f.b!=f.d.c;)l=a(Yn(f),113),ih($l(Wl(Vl(Gl(new cl,1),0),e),l))}function Lbe(t,e,n){var i,r,c,l,f;for(di(n,"Breaking Point Removing",1),t.a=a(z(e,(qt(),ig)),197),c=new H(e.b);c.a>16!=6&&e){if(YM(t,e))throw K(new yn(T4+I9t(t)));i=null,t.Cb&&(i=(n=t.Db>>16,n>=0?Hut(t,null):t.Cb.Cg(t,-1-n,null,null))),e&&(i=H2(e,t,6,i)),i=bst(t,e,i),i&&i.Th()}else t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,6,e,e))}function SDt(t,e){var n,i;if(e!=t.Cb||t.Db>>16!=3&&e){if(YM(t,e))throw K(new yn(T4+h7t(t)));i=null,t.Cb&&(i=(n=t.Db>>16,n>=0?$ut(t,null):t.Cb.Cg(t,-1-n,null,null))),e&&(i=H2(e,t,12,i)),i=mst(t,e,i),i&&i.Th()}else t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,3,e,e))}function TDt(t,e){var n,i;if(e!=t.Cb||t.Db>>16!=9&&e){if(YM(t,e))throw K(new yn(T4+_Nt(t)));i=null,t.Cb&&(i=(n=t.Db>>16,n>=0?Wut(t,null):t.Cb.Cg(t,-1-n,null,null))),e&&(i=H2(e,t,9,i)),i=wst(t,e,i),i&&i.Th()}else t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,9,e,e))}function CDt(t,e){var n,i;if(e!=t.Cb||t.Db>>16!=11&&e){if(YM(t,e))throw K(new yn(T4+vht(t)));i=null,t.Cb&&(i=(n=t.Db>>16,n>=0?Xut(t,null):t.Cb.Cg(t,-1-n,null,null))),e&&(i=H2(e,t,10,i)),i=Tst(t,e,i),i&&i.Th()}else t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,11,e,e))}function Dbe(t,e){if(ct(e,246))return Ihe(t,a(e,35));if(ct(e,187))return Rhe(t,a(e,121));if(ct(e,263))return Bse(t,a(e,137));if(ct(e,183))return Xwe(t,a(e,105));if(e)return null;throw K(new yn(zpt+Gp(new ju(Y(Z(un,1),te,1,5,[null])))))}function Nbe(t){var e,n,i,r,c,l,f,g,b,v,M;return M=llt(t),e=t.a,g=e!=null,g&&eC(M,"category",t.a),r=O9(new Tv(t.d)),l=!r,l&&(b=new Rg,P1(M,"knownOptions",b),n=new bG(b),vo(new Tv(t.d),n)),c=O9(t.g),f=!c,f&&(v=new Rg,P1(M,"supportedFeatures",v),i=new wG(v),vo(t.g,i)),M}function Obe(t,e,n){var i,r,c;for(r=new H(t.a.b);r.ag){for(v=t.d,t.d=dt(Gvt,Ypt,55,2*g+4,0,1),c=0;c=9223372036854776e3?(NM(),_1t):(r=!1,t<0&&(r=!0,t=-t),i=0,t>=o0&&(i=Tr(t/o0),t-=i*o0),n=0,t>=rx&&(n=Tr(t/rx),t-=n*rx),e=Tr(t),c=ia(e,n,i),r&&rq(c),c)}function ADt(t,e,n){var i,r,c,l,f,g;if(!ym(e)){for(g=Ta(n,(ct(e,13)?a(e,13)._b():gC(e.tc()))/t.a|0),di(g,VBt,1),f=new ol,l=0,c=e.tc();c.hc();)i=a(c.ic(),76),f=Bp(f,new Hd(i)),ldw,c=i-ldw,(r||c)&&(g=a(e.e,249).b,l=a(e.e,249).a,f=a(e.d,129),g==0&&l==0)))return f;return f}function kDt(t,e,n,i){var r,c,l,f;return l=new Jh(t),jl(l,(Ke(),Hr)),Ct(l,(Ft(),li),e),Ct(l,(qt(),Qi),(Ls(),Gc)),Ct(l,Iu,n),Ct(l,Ru,i),c=new Eo,yr(c,(Ht(),on)),ds(c,l),f=new Eo,yr(f,Qe),ds(f,l),Ts(e,c),r=new Np,Uo(r,e),Ct(r,Ro,null),Hs(r,f),Ts(r,i),l}function Wbe(t,e,n,i,r){var c,l;(!ec(e)&&e.c.g.c==e.d.g.c||!pPt(zo(Y(Z(ss,1),wt,9,0,[r.g.k,r.k,r.a])),n))&&(e.c==r?pD(e.a,0,new Oo(n)):Xi(e.a,new Oo(n)),i&&!kT(t.a,n)&&(l=a(z(e,(qt(),Ro)),74),l||(l=new Va,Ct(e,Ro,l)),c=new Oo(n),Ws(l,c,l.c.b,l.c),Ir(t.a,c)))}function $be(t,e){var n,i;if(i=VD(t.b,e.b),!i)throw K(new yc("Invalid hitboxes for scanline constraint calculation."));(u6t(e.b,a(gne(t.b,e.b),57))||u6t(e.b,a(pne(t.b,e.b),57)))&&(rd(),e.b+""),t.a[e.b.f]=a(c$(t.b,e.b),57),n=a(a$(t.b,e.b),57),n&&(t.a[n.f]=e.b)}function LDt(t,e,n,i,r,c){var l,f,g,b,v,M,k,R,O,$,W,nt;for(v=i,e.i&&e.k?(R=a(zi(t.f,e.u),57),$=R.d.c+R.d.b,--v):$=e.a.c+e.a.b,M=r,n.n&&n.k?(R=a(zi(t.f,n.v),57),b=R.d.c,++M):b=n.a.c,W=b-$,g=2>M-v?2:M-v,f=W/g,O=$+f,k=v;k>16!=7&&e){if(YM(t,e))throw K(new yn(T4+B8t(t)));i=null,t.Cb&&(i=(n=t.Db>>16,n>=0?Gut(t,null):t.Cb.Cg(t,-1-n,null,null))),e&&(i=a(e,42).Ag(t,1,gI,i)),i=dot(t,e,i),i&&i.Th()}else t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,7,e,e))}function Vbe(t,e){var n,i;if(e!=t.Cb||t.Db>>16!=3&&e){if(YM(t,e))throw K(new yn(T4+X6t(t)));i=null,t.Cb&&(i=(n=t.Db>>16,n>=0?Vut(t,null):t.Cb.Cg(t,-1-n,null,null))),e&&(i=a(e,42).Ag(t,0,bI,i)),i=pot(t,e,i),i&&i.Th()}else t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,3,e,e))}function RDt(t){var e,n,i,r,c,l,f;for(c=new H(t.a.a);c.a0&&c>0?l.o=e++:i>0?l.o=n++:c>0?l.o=r++:l.o=n++}we(),gc(t.i,new Eg)}function DDt(t,e){var n,i,r;for(r=(!e.a&&(e.a=new Wt(zr,e,10,11)),e.a).i,i=new $n((!e.a&&(e.a=new Wt(zr,e,10,11)),e.a));i.e!=i.i._b();)n=a(ci(i),35),zt(cn(n,(dr(),ay)))!==zt((Kg(),yA))&&Ect(MX(e),MX(n))&&((!n.a&&(n.a=new Wt(zr,n,10,11)),n.a).i==0||(r+=DDt(t,n)));return r}function Xbe(t,e){var n,i,r;return n=e.Yg(t.a),n&&(r=hi(Lh((!n.b&&(n.b=new Mu((ye(),Ho),Dc,n)),n.b),"affiliation")),r!=null)?(i=jW(r,Ca(35)),i==-1?Eq(t,iC(t,Zu(e.Wi())),r):i==0?Eq(t,null,r.substr(1,r.length-1)):Eq(t,r.substr(0,i),r.substr(i+1,r.length-(i+1)))):null}function Zbe(t){var e,n,i,r,c;if(c=new Dt,pd(t.b,new uH(c)),t.b.c=dt(un,te,1,0,5,1),c.c.length!=0){for(e=(mi(0,c.c.length),a(c.c[0],78)),n=1,i=c.c.length;n=t.a||!alt(e,n))return-1;if(ym(a(i.Kb(e),20)))return 1;for(r=0,l=a(i.Kb(e),20).tc();l.hc();)if(c=a(l.ic(),14),g=c.c.g==e?c.d.g:c.c.g,f=rht(t,g,n,i),f==-1||(r=r>f?r:f,r>t.c-1))return-1;return r+1}function Ybe(t,e,n,i){var r,c,l,f,g,b,v,M,k;for(M=i?(Ht(),on):(Ht(),Qe),r=!1,g=e[n],b=0,v=g.length;b>5,e&=31,i>=t.d)return t.e<0?(V1(),PK):(V1(),AE);if(c=t.d-i,r=dt(Gn,pi,22,c+1,15,1),Ige(r,c,t.a,i,e),t.e<0){for(n=0;n0&&t.a[n]<<32-e){for(n=0;n0&&(c=a(Ee(this.b,0),157),r+=c.o,i+=c.p),r*=2,i*=2,e>1?r=Tr(y.Math.ceil(r*e)):i=Tr(y.Math.ceil(i/e)),this.a=new mut(r,i)}function cht(t,e,n,i,r,c){var l,f,g,b,v,M;for(b=n.c.length,c&&(t.c=dt(Gn,pi,22,e.length,15,1)),l=r?0:e.length-1;r?l=0;l+=r?1:-1){for(f=e[l],g=i==(Ht(),Qe)?r?ac(f,i):Cm(ac(f,i)):r?Cm(ac(f,i)):ac(f,i),c&&(t.c[f.o]=g._b()),M=g.tc();M.hc();)v=a(M.ic(),11),t.d[v.o]=b++;Or(n,g)}}function HDt(t,e,n){var i,r,c,l,f,g,b,v;for(c=lt(Yt(t.b.tc().ic())),b=lt(Yt(yPt(e.b))),i=hl(Xc(t.a),b-n),r=hl(Xc(e.a),n-c),v=sr(i,r),hl(v,1/(b-c)),this.a=v,this.b=new Dt,f=!0,l=t.b.tc(),l.ic();l.hc();)g=lt(Yt(l.ic())),f&&g-n>U_&&(this.b.nc(n),f=!1),this.b.nc(g);f&&this.b.nc(n)}function awe(t){var e,n,i,r;if(fve(t,t.n),t.d.c.length>0){for(xT(t.c);Ult(t,a(G(new H(t.e.a)),113))=r&&(t.c=!1,t.a=!1),t.b[i++]=r,t.b[i]=c,t.c||E_(t)}}function GDt(t){var e,n,i,r;return r=Tf(t),n=new m1(r),i=new hH(r),e=new Dt,Or(e,(!t.d&&(t.d=new pn(Xs,t,8,5)),t.d)),Or(e,(!t.e&&(t.e=new pn(Xs,t,7,4)),t.e)),a(hd(Vh(wo(new gi(null,new Ei(e,16)),n),i),n_(new ti,new Qn,new Kt,new kt,Y(Z(tf,1),jt,150,0,[(z1(),bw),Qh]))),19)}function WDt(t){var e,n,i;if(n=a(z(t,(Ft(),Du)),8),n?yr(t,a(z(n,wc),69)):t.d.c.length-t.f.c.length<0?yr(t,(Ht(),Qe)):yr(t,(Ht(),on)),!t.b)switch(i=t.n,e=t.a,t.i.g){case 1:e.a=i.a/2,e.b=0;break;case 2:e.a=i.a,e.b=i.b/2;break;case 3:e.a=i.a/2,e.b=i.b;break;case 4:e.a=0,e.b=i.b/2}}function uwe(t,e,n){var i,r,c,l,f;for(di(n,"Longest path layering",1),t.a=e,f=t.a.a,t.b=dt(Gn,pi,22,f.c.length,15,1),i=0,l=new H(f);l.a=0?!1:(n=oE((Qa(),eo),r,e),n?(i=n.kj(),(i>1||i==-1)&&wm(qo(eo,n))!=3):!0)):!1}function lwe(t,e){var n;switch(n=a(z(t,(qt(),J4)),241),di(e,"Label side selection ("+n+")",1),n.g){case 0:y9t(t,(Cu(),kd));break;case 1:y9t(t,(Cu(),ag));break;case 2:NNt(t,(Cu(),kd));break;case 3:NNt(t,(Cu(),ag));break;case 4:JDt(t,(Cu(),kd));break;case 5:JDt(t,(Cu(),ag))}Vn(e)}function aht(t,e,n){var i,r,c,l,f,g;if(i=JQt(n,t.length),l=t[i],l[0].j==(Ke(),rs))for(c=l3t(n,l.length),g=e.i,r=0;r0&&(n[0]+=t.d,l-=n[0]),n[2]>0&&(n[2]+=t.d,l-=n[2]),c=y.Math.max(0,l),n[1]=y.Math.max(n[1],l),Pct(t,ta,r.c+i.b+n[0]-(n[1]-l)/2,n),e==ta&&(t.c.b=c,t.c.c=r.c+i.b+(c-l)/2)}function mwe(t,e){var n,i,r,c,l,f,g;for(n=Ps,f=(Ke(),gs),r=new H(e.a);r.a0?l=n:g.c&&(l=b$(g.c)),l>0&&(i&&(Fg(),g.a.B&&(!lt(de(g.a.e.xe((dr(),rI))))||g.b.ff()))?g.d.a=t.s+l:(v=g.b.Re().b,l>v&&(f=(l-v)/2,g.d.d=f,g.d.a=f)))}}function vwe(t,e){var n,i,r,c,l;return r=e.Yg(t.a),r&&(i=(!r.b&&(r.b=new Mu((ye(),Ho),Dc,r)),r.b),n=hi(Lh(i,Ns)),n!=null&&(c=n.lastIndexOf("#"),l=c==-1?lst(t,e.Pi(),n):c==0?LL(t,null,n.substr(1,n.length-1)):LL(t,n.substr(0,c),n.substr(c+1,n.length-(c+1))),ct(l,140)))?a(l,140):null}function _we(t,e){var n,i,r,c,l;return i=e.Yg(t.a),i&&(n=(!i.b&&(i.b=new Mu((ye(),Ho),Dc,i)),i.b),c=hi(Lh(n,hK)),c!=null&&(r=c.lastIndexOf("#"),l=r==-1?lst(t,e.Pi(),c):r==0?LL(t,null,c.substr(1,c.length-1)):LL(t,c.substr(0,r),c.substr(r+1,c.length-(r+1))),ct(l,140)))?a(l,140):null}function KDt(t,e,n,i,r){var c,l,f,g,b,v;if(t.d&&t.d.If(r),c=a(r.cd(0),35),CRt(t,n,c,!1)||(l=a(r.cd(r._b()-1),35),CRt(t,i,l,!0))||blt(t,r))return!0;for(v=r.tc();v.hc();)for(b=a(v.ic(),35),g=e.tc();g.hc();)if(f=a(g.ic(),35),j7(t,b,f))return!0;return!1}function ywe(t,e,n){var i,r,c,l,f,g,b,v,M,k;k=e.c.length,M=(b=t.rg(n),a(b>=0?t.ug(b,!1,!0):Z2(t,n,!1),52));t:for(c=M.tc();c.hc();){for(r=a(c.ic(),51),v=0;vt.d[l.o]&&(n+=zkt(t.b,c),dC(t.a,Xt(c)));for(;!Iit(t.a);)hLt(t.b,a(C$(t.a),21).a)}return n}function C_(t,e,n){var i,r;if((!t.a&&(t.a=new Wt(os,t,6,6)),t.a).i==0)return g6t(t);if(i=a(at((!t.a&&(t.a=new Wt(os,t,6,6)),t.a),0),270),e&&(Dr((!i.a&&(i.a=new Ss(sf,i,5)),i.a)),EC(i,0),SC(i,0),MC(i,0),xC(i,0)),n)for(r=(!t.a&&(t.a=new Wt(os,t,6,6)),t.a);r.i>1;)cw(r,r.i-1);return i}function Swe(t,e){var n,i,r,c;if(c=PNt(e),r=a(z(c,(Ft(),Qc)),19),M2e(e,r),r.pc((So(),Al)))for(i=new $n((!e.c&&(e.c=new Wt(Rl,e,9,9)),e.c));i.e!=i.i._b();)n=a(ci(i),121),I2e(t,e,c,n);return nwe(e,c),lt(de(z(c,(qt(),abt))))&&r.nc(OB),zt(cn(e,Q4))===zt((Kg(),Dx))?Fxe(t,e,c):P2e(t,e,c),c}function So(){So=P,DB=new jb("COMMENTS",0),Al=new jb("EXTERNAL_PORTS",1),q4=new jb("HYPEREDGES",2),NB=new jb("HYPERNODES",3),J_=new jb("NON_FREE_PORTS",4),Q_=new jb("NORTH_SOUTH_PORTS",5),A6=new jb(kBt,6),IE=new jb("CENTER_LABELS",7),RE=new jb("END_LABELS",8),OB=new jb("PARTITIONS",9)}function QDt(t,e,n){var i,r,c,l;for(c=(!e.a&&(e.a=new Wt(zr,e,10,11)),e.a).i,r=new $n((!e.a&&(e.a=new Wt(zr,e,10,11)),e.a));r.e!=r.i._b();)i=a(ci(r),35),(!i.a&&(i.a=new Wt(zr,i,10,11)),i.a).i==0||(c+=QDt(t,i,!1));if(n)for(l=io(e);l;)c+=(!l.a&&(l.a=new Wt(zr,l,10,11)),l.a).i,l=io(l);return c}function cw(t,e){var n,i,r,c;return t.ti()?(i=null,r=t.ui(),t.xi()&&(i=t.zi(t.Dh(e),null)),n=t.mi(4,c=W2(t,e),null,e,r),t.qi()&&c!=null&&(i=t.si(c,i)),i?(i.Sh(n),i.Th()):t.ni(n),c):(c=W2(t,e),t.qi()&&c!=null&&(i=t.si(c,null),i&&i.Th()),c)}function Twe(t){var e,n,i,r,c,l,f,g,b;for(l=is,g=is,f=null,n=new F$(new e2(t.e));n.b!=n.c.a.b;)if(e=Hct(n),(zt(e.d)===zt((mu(),Zp))||zt(e.d)===zt(Lw))&&(i=a(e.e,249).a,b=a(e.e,249).b,r=l-i>dw,c=i-ldw,(r||c)&&(g=a(e.e,249).b,l=a(e.e,249).a,f=a(e.d,129),g==0&&l==0)))return f;return f}function Cwe(t){var e,n,i,r,c,l,f,g,b,v;for(c=t.a,e=new $r,b=0,i=new H(t.d);i.ag.d&&(v=g.d+g.a+c));n.c.d=v,e.a.Zb(n,e),b=y.Math.max(b,n.c.d+n.c.a)}return b}function Awe(t,e,n,i,r){return i<0?(i=x_(t,r,Y(Z(At,1),wt,2,6,[yZ,xZ,MZ,EZ,nx,SZ,TZ,CZ,AZ,kZ,LZ,PZ]),e),i<0&&(i=x_(t,r,Y(Z(At,1),wt,2,6,["Jan","Feb","Mar","Apr",nx,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),e)),i<0?!1:(n.k=i,!0)):i>0?(n.k=i-1,!0):!1}function kwe(t,e,n,i,r){return i<0?(i=x_(t,r,Y(Z(At,1),wt,2,6,[yZ,xZ,MZ,EZ,nx,SZ,TZ,CZ,AZ,kZ,LZ,PZ]),e),i<0&&(i=x_(t,r,Y(Z(At,1),wt,2,6,["Jan","Feb","Mar","Apr",nx,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),e)),i<0?!1:(n.k=i,!0)):i>0?(n.k=i-1,!0):!1}function Lwe(t,e,n){var i,r,c;if(t.e=n,t.d=0,t.b=0,t.f=1,t.i=e,(t.e&16)==16&&(t.i=eve(t.i)),t.j=t.i.length,Ci(t),c=Lm(t),t.d!=t.j)throw K(new ri(ai((Kn(),VFt))));if(t.g){for(i=0;iJBt?gc(g,t.b):i<=JBt&&i>QBt?gc(g,t.d):i<=QBt&&i>tFt?gc(g,t.c):i<=tFt&&gc(g,t.a),c=eNt(t,g,c);return r}function nNt(t){m2(t,new y_(p2(h2(d2(f2(new Z0,kO),"Randomizer"),'Distributes the nodes randomly on the plane, leading to very obfuscating layouts. Can be useful to demonstrate the power of "real" layout algorithms.'),new wz))),pe(t,kO,ox,Lvt),pe(t,kO,dE,15),pe(t,kO,fO,Xt(0)),pe(t,kO,hE,fE)}function Iwe(t,e){var n,i,r,c,l,f,g,b,v,M;for(g=e.a.length,f=Tr(y.Math.ceil(g/t.a)),M=e.a,l=0,b=f,c=0;cl?0:l)l?0:l:g,(0>(bl?0:l)l?0:l:g)),l=b,b+=f,i=a(Ee(t.c,c),8),n=new FW(v),n.n.b=e.n.b,cr(t.b,e,n),Ut(i.b,n);Lc(t.g.b,e),Ut(t.i,(r=new MMt(t,e),r))}function iNt(t,e,n){var i,r,c,l,f,g,b,v,M;for(e.o=1,c=e.c,M=ew(e,(Fo(),ba)).tc();M.hc();)for(v=a(M.ic(),11),r=new H(v.f);r.a=t.length||(f=t.charCodeAt(e[0]),f!=43&&f!=45)||(++e[0],i=T7(t,e),i<0))return!1;f==45&&(i=-i)}return f==32&&e[0]-n==2&&r.b==2&&(g=new z9,b=g.q.getFullYear()-Fm+Fm-80,l=b%100,c.a=i==l,i+=(b/100|0)*100+(i0){if(t.Fi(),e!=null){for(c=0;c=48;n--)IA[n]=n-48<<24>>24;for(i=70;i>=65;i--)IA[i]=i-65+10<<24>>24;for(r=102;r>=97;r--)IA[r]=r-97+10<<24>>24;for(c=0;c<10;c++)iU[c]=48+c&qr;for(t=10;t<=15;t++)iU[t]=65+t-10&qr}function aNt(t){var e,n,i,r;n=lt(Yt(z(t.a,(Ph(),Ajt)))),i=t.a.c.d,r=t.a.d.d,e=t.d,i.a>=r.a?i.b>=r.b?(e.a=r.a+(i.a-r.a)/2+n,e.b=r.b+(i.b-r.b)/2-n):(e.a=r.a+(i.a-r.a)/2+n,e.b=i.b+(r.b-i.b)/2+n):i.b>=r.b?(e.a=i.a+(r.a-i.a)/2+n,e.b=r.b+(i.b-r.b)/2+n):(e.a=i.a+(r.a-i.a)/2+n,e.b=i.b+(r.b-i.b)/2-n)}function Fwe(t,e,n,i){var r,c,l,f,g;return f=zc(a(at((!e.b&&(e.b=new pn(Si,e,4,7)),e.b),0),97)),g=zc(a(at((!e.c&&(e.c=new pn(Si,e,5,8)),e.c),0),97)),io(f)==io(g)||_C(g,f)?null:(l=rN(e),l==n?i:(c=a(zi(t.a,l),8),c&&(r=a(z(c,(Ft(),xd)),31),r)?r:null))}function Uwe(t,e,n,i){var r,c,l,f,g;for(c=t.i.c.length,g=dt(Q3e,Gft,267,c,0,1),l=0;lk+g&&i.jc();for(l=new H(R);l.a>19)return"-"+lNt(zM(t));for(n=t,i="";!(n.l==0&&n.m==0&&n.h==0);){if(r=fV(sO),n=Hht(n,r,!0),e=""+_3t(Q1),!(n.l==0&&n.m==0&&n.h==0))for(c=9-e.length;c>0;c--)e="0"+e;i=e+i}return i}function ku(t,e,n){var i,r,c,l,f;if(t==null)throw K(new yf(tu));for(c=t.length,l=c>0&&(t.charCodeAt(0)==45||t.charCodeAt(0)==43)?1:0,i=l;in)throw K(new yf(Um+t+'"'));return f}function jwe(){if(!Object.create||!Object.getOwnPropertyNames)return!1;var t="__proto__",e=Object.create(null);if(e[t]!==void 0)return!1;var n=Object.getOwnPropertyNames(e);return!(n.length!=0||(e[t]=42,e[t]!==42)||Object.getOwnPropertyNames(e).length==0)}function Hwe(t,e){var n,i,r,c;for(di(e,"Resize child graph to fit parent.",1),i=new H(t.b);i.a>24;case 97:case 98:case 99:case 100:case 101:case 102:return t-97+10<<24>>24;case 65:case 66:case 67:case 68:case 69:case 70:return t-65+10<<24>>24;default:throw K(new yf("Invalid hexadecimal"))}}function Xwe(t,e){var n,i,r,c,l,f,g,b,v;if(b=a(zi(t.c,e),191),!b)throw K(new xf("Edge did not exist in input."));return l=FC(b),v=new Rg,n=new XTt(t,l,v),Lte((!e.a&&(e.a=new Wt(os,e,6,6)),e.a),n),P1(b,Dpt,v),f=a(cn(e,(dr(),Px)),74),r=!f||P4t(f),c=!r,c&&(g=new Rg,i=new iG(g),vo(f,i),P1(b,"junctionPoints",g)),null}function Zwe(t,e,n){var i,r,c,l;di(n,"Orthogonally routing hierarchical port edges",1),t.a=0,i=lye(e),l2e(e,i),Nye(t,e,i),wxe(e),r=a(z(e,(qt(),Qi)),83),c=e.b,X7t((mi(0,c.c.length),a(c.c[0],26)),r,e),X7t(a(Ee(c,c.c.length-1),26),r,e),l=e.b,e7t((mi(0,l.c.length),a(l.c[0],26))),e7t(a(Ee(l,l.c.length-1),26)),Vn(n)}function Ywe(t){var e,n,i;switch(e=a(z(t.d,(qt(),ig)),197),e.g){case 2:n=qxe(t);break;case 3:n=(i=new Dt,qc(wo(Vh(Yh(Yh(new gi(null,new Ei(t.d.b,16)),new Hy),new Gy),new C3),new zy),new rm(i)),i);break;default:throw K(new yc("Compaction not supported for "+e+" edges."))}Tye(t,n),vo(new Tv(t.g),new SH(t))}function Kwe(t,e,n,i){var r,c,l,f,g;for(r=!1,c=!1,f=new H(i.i);f.a1&&(n?l=ql(e.c)+1:l=ql(b.c)-1,f=a(Ee(t.a.b,l),26),Ks(b,f)),dht(t,b,n));return e}function hNt(t,e,n,i,r,c){if(this.b=n,this.d=r,t>=e.length)throw K(new Uc("Greedy SwitchDecider: Free layer not in graph."));this.c=e[t],this.e=new K5(i),GV(this.e,this.c,(Ht(),on)),this.i=new K5(i),GV(this.i,this.c,Qe),this.f=new TCt(this.c),this.a=!c&&r.i&&!r.s&&this.c[0].j==(Ke(),rs),this.a&&e0e(this,t,e.length)}function Jwe(t,e,n){var i,r,c,l;for(di(n,"Processor order nodes",2),t.a=lt(Yt(z(e,(sw(),nwt)))),r=new Fr,l=qn(e.b,0);l.b!=l.d.c;)c=a(Yn(l),76),lt(de(z(c,(mc(),Rw))))&&Ws(r,c,r.c.b,r.c);i=(Hn(r.b!=0),a(r.a.a.c,76)),d7t(t,i),!n.b&&jV(n,1),bht(t,i,0-lt(Yt(z(i,(mc(),mF))))/2,0),!n.b&&jV(n,1),Vn(n)}function fNt(){this.b=(ts(),new xm),this.d=new xm,this.e=new xm,this.c=new xm,this.a=new vi,this.f=new vi,A2(ss,new tz,new ez),A2(Awt,new az,new uz),A2(Hgt,new lz,new hz),A2(Ggt,new xv,new fz),A2(P3e,new dz,new bz),A2(D3e,new Y0,new nz),A2(I3e,new iz,new rz),A2(R3e,new sz,new oz),A2(B3e,new K0,new cz)}function dNt(t,e,n,i){var r,c,l,f,g,b;for(g=aX(t,n),b=aX(e,n),r=!1;g&&b&&(i||upe(g,b,n));)l=aX(g,n),f=aX(b,n),OL(e),OL(t),c=g.c,cZ(g,!1),cZ(b,!1),n?(W1(e,b.o,c),e.o=b.o,W1(t,g.o+1,c),t.o=g.o):(W1(t,g.o,c),t.o=g.o,W1(e,b.o+1,c),e.o=b.o),Ks(g,null),Ks(b,null),g=l,b=f,r=!0;return r}function OX(t,e,n,i,r,c,l,f){var g,b,v;for(g=0,e!=null&&(g^=j1(e.toLowerCase())),n!=null&&(g^=j1(n)),i!=null&&(g^=j1(i)),l!=null&&(g^=j1(l)),f!=null&&(g^=j1(f)),b=0,v=c.length;bg?new LN(e,t,f-g):f>0&&g>0&&(new LN(t,e,0),new LN(e,t,0)))}function pNt(t){m2(t,new y_(p2(h2(d2(f2(new Z0,r6),SFt),"Keeps the current layout as it is, without any automatic modification. Optional coordinates can be given for nodes and edge bend points."),new CR))),pe(t,r6,ox,Mvt),pe(t,r6,SO,Xe(_A)),pe(t,r6,xpt,Xe(_vt)),pe(t,r6,MO,Xe(yvt)),pe(t,r6,EO,Xe(xvt))}function gNt(t){var e,n,i;i=a(z(t,(qt(),Oh)),19),!i.Wb()&&(n=(e=a(xu(to),10),new ja(e,a(cu(e,e.length),10),0)),i.pc((r0(),Nu))?Tu(n,Nu):Tu(n,Il),i.pc(Ll)||Tu(n,Ll),i.pc(kl)?Tu(n,Bh):i.pc(Uf)?Tu(n,hh):i.pc(Pl)&&Tu(n,lh),i.pc(Bh)?Tu(n,kl):i.pc(hh)?Tu(n,Uf):i.pc(lh)&&Tu(n,Pl),Ct(t,Oh,n))}function pht(t,e){var n,i,r,c;if(0<(ct(t,13)?a(t,13)._b():gC(t.tc()))){if(r=e,1=t.o)throw K(new _9);f=e>>5,l=e&31,c=Yd(1,or(Yd(l,1))),r?t.n[n][f]=Xh(t.n[n][f],c):t.n[n][f]=ns(t.n[n][f],gst(c)),c=Yd(c,1),i?t.n[n][f]=Xh(t.n[n][f],c):t.n[n][f]=ns(t.n[n][f],gst(c))}catch(g){throw g=vr(g),ct(g,305)?K(new Uc(KZ+t.o+"*"+t.p+JZ+e+Rc+n+QZ)):K(g)}}function BX(t,e){var n,i,r,c,l,f,g;for(r=new Dt,g=new Dt,n=a(js(K_,t),15).tc();n.hc();)i=a(n.ic(),151),JIt(r,i.b),JIt(r,OIt(i)),n.hc()&&(i=a(n.ic(),151),Or(g,OIt(i)),Or(g,i.b));for(NV(r,t.b),NV(g,t.a),f=new H(r);f.at.d[f.o]&&(n+=zkt(t.b,c),dC(t.a,Xt(c)))):++l;for(n+=t.b.d*l;!Iit(t.a);)hLt(t.b,a(C$(t.a),21).a)}return n}function cve(t){var e,n,i,r,c,l;if(r=t.g.ed(),i=t.b.ed(),t.e)for(n=0;nU_;){for(c=e,l=0;y.Math.abs(e-c)0&&(i=(!t.n&&(t.n=new Wt(ic,t,1,7)),a(a(at(t.n,0),137),263)).a,!i||Ii(Ii((e.a+=' "',e),i),'"'))),Ii(um(Ii(um(Ii(um(Ii(um((e.a+=" (",e),t.i),","),t.j)," | "),t.g),","),t.f),")"),e.a)}function _Nt(t){var e,n,i;return t.Db&64?dX(t):(e=new ll(kpt),n=t.k,n?Ii(Ii((e.a+=' "',e),n),'"'):(!t.n&&(t.n=new Wt(ic,t,1,7)),t.n.i>0&&(i=(!t.n&&(t.n=new Wt(ic,t,1,7)),a(a(at(t.n,0),137),263)).a,!i||Ii(Ii((e.a+=' "',e),i),'"'))),Ii(um(Ii(um(Ii(um(Ii(um((e.a+=" (",e),t.i),","),t.j)," | "),t.g),","),t.f),")"),e.a)}function yNt(t){var e,n,i,r,c,l;return c=0,e=wl(t),e.Qi()&&(c|=4),t.Bb&La&&(c|=2),ct(t,62)?(n=a(t,17),r=jo(n),n.Bb&ca&&(c|=32),r&&(ei(Zb(r)),c|=8,l=r.t,(l>1||l==-1)&&(c|=16),r.Bb&ca&&(c|=64)),n.Bb&ao&&(c|=mw),c|=oh):ct(e,425)?c|=512:(i=e.Qi(),i&&i.i&1&&(c|=256)),t.Bb&512&&(c|=128),c}function _ht(t,e){var n,i,r,c,l,f,g;if(e==null||e.length==0)return null;if(r=a(Zc(t.a,e),180),!r){for(i=(f=new vf(t.b).a.Tb().tc(),new nm(f));i.a.hc();)if(n=(c=a(i.a.ic(),38),a(c.lc(),180)),l=n.c,g=e.length,le(l.substr(l.length-g,g),e)&&(e.length==l.length||bo(l,l.length-e.length-1)==46)){if(r)return null;r=n}r&&tc(t.a,e,r)}return r}function uve(t,e){var n;return t.f==dtt?(n=wm(qo((Qa(),eo),e)),t.e?n==4&&e!=(Y2(),Hx)&&e!=(Y2(),jx)&&e!=(Y2(),ptt)&&e!=(Y2(),gtt):n==2):t.d&&(t.d.pc(e)||t.d.pc(lC(qo((Qa(),eo),e)))||t.d.pc(oE((Qa(),eo),t.b,e)))?!0:t.f&&nht((Qa(),t.f),bL(qo(eo,e)))?(n=wm(qo(eo,e)),t.e?n==4:n==2):!1}function lve(t,e,n,i){var r,c,l,f,g,b,v,M;return l=a(cn(n,(dr(),Ix)),9),g=l.a,v=l.b+t,r=y.Math.atan2(v,g),r<0&&(r+=lx),r+=e,r>lx&&(r-=lx),f=a(cn(i,Ix),9),b=f.a,M=f.b+t,c=y.Math.atan2(M,b),c<0&&(c+=lx),c+=e,c>lx&&(c-=lx),Ef(),I1(1e-10),y.Math.abs(r-c)<=1e-10||r==c||isNaN(r)&&isNaN(c)?0:rc?1:iD(isNaN(r),isNaN(c))}function hve(t,e,n,i){var r,c;for(Vpe(t,e,n,i),Int(e,t.j-e.j+n),Pnt(e,t.k-e.k+i),c=new H(e.f);c.an.k&&fb&&i>b)b=lt(n.p[f.o])+lt(n.d[f.o])+f.n.b+f.d.a;else{r=!1,t.a&&rd();break}if(!r)break}return t.a&&rd(),r}function Mve(t,e){var n,i,r,c,l;for(t.c==null||t.c.lengthc*2?(v=new ON(M),b=$u(l)/Sh(l),g=uZ(v,e,new u2,n,i,r,b),sr(Gh(v.e),g),M.c=dt(un,te,1,0,5,1),M.c[M.c.length]=v,M.c[M.c.length]=l,c=$u(v)*Sh(v)+$u(l)*Sh(l)):(M.c[M.c.length]=l,c+=$u(l)*Sh(l));return M}function rE(t){switch(t){case 100:return I_(O4,!0);case 68:return I_(O4,!1);case 119:return I_(mK,!0);case 87:return I_(mK,!1);case 115:return I_(bK,!0);case 83:return I_(bK,!1);case 99:return I_(wK,!0);case 67:return I_(wK,!1);case 105:return I_(vK,!0);case 73:return I_(vK,!1);default:throw K(new sc(hzt+t.toString(16)))}}function LNt(t,e,n){var i,r,c,l,f,g,b,v;if(e.o==0){for(e.o=1,l=n,n||(r=new Dt,c=(i=a(xu(Ia),10),new ja(i,a(cu(i,i.length),10),0)),l=new zs(r,c)),a(l.a,15).nc(e),e.j==(Ke(),rs)&&a(l.b,19).nc(a(z(e,(Ft(),wc)),69)),g=new H(e.i);g.af&&(f=r,v.c=dt(un,te,1,0,5,1)),r==f&&Ut(v,new zs(n.c.g,n)));we(),gc(v,t.c),pm(t.b,g.o,v)}}function Dve(t,e){var n,i,r,c,l,f,g,b,v;for(l=new H(e.b);l.af&&(f=r,v.c=dt(un,te,1,0,5,1)),r==f&&Ut(v,new zs(n.d.g,n)));we(),gc(v,t.c),pm(t.f,g.o,v)}}function Nve(t,e,n,i){var r,c,l,f,g,b,v,M,k;for(g=new We(n,i),za(g,a(z(e,(R1(),H4)),9)),k=new H(e.e);k.a=40,l&&p_e(t),rye(t),awe(t),n=cIt(t),i=0;n&&i0&&Xi(t.e,c)):(t.c[l]-=b+1,t.c[l]<=0&&t.a[l]>0&&Xi(t.d,c))))}function INt(t){var e,n,i,r,c,l,f,g,b,v,M;for(f=new Dt,c=lt(Yt(t.g.cd(t.g._b()-1))),M=t.g.tc();M.hc();)v=Yt(M.ic()),pm(f,0,c-(En(v),v));for(l=PC(KV(t)),b=new Dt,r=new H(f),g=new Dt,e=0;e1)&&e==1&&a(t.a[t.b],8).j==(Ke(),bu)?J2(a(t.a[t.b],8),(Cu(),kd)):i&&(!n||(t.c-t.b&t.a.length-1)>1)&&e==1&&a(t.a[t.c-1&t.a.length-1],8).j==(Ke(),bu)?J2(a(t.a[t.c-1&t.a.length-1],8),(Cu(),ag)):(t.c-t.b&t.a.length-1)==2?(J2(a(kC(t),8),(Cu(),kd)),J2(a(kC(t),8),ag)):hbe(t,r),yct(t)}function Fve(t){var e,n;if(!t.Wb()){for(n=a(t.cd(0),151).f,new kht(t),e=new Gs(n.i,0),__((mu(),hp),e),b_(oy,e),uP((Ht(),Tn),e),BX(rg,e),b_(nb,e),S_(kw,e),__(Zp,e),uP(Qe,e),BX(tb,e),__(Lw,e),S_(eb,e),__(nb,e),uP(fi,e),BX(Yp,e),__(oy,e),S_(Iw,e),b_(Lw,e);e.b=0&&(f=vpe(t,l),!(f&&(b<22?g.l|=1<>>1,l.m=v>>>1|(M&1)<<21,l.l=k>>>1|(v&1)<<21,--b;return n&&rq(g),c&&(i?(Q1=zM(t),r&&(Q1=n6t(Q1,(NM(),y1t)))):Q1=ia(t.l,t.m,t.h)),g}function UNt(t,e,n,i){var r,c,l,f,g,b,v,M;if(Bue(t,e,n),c=e[n],M=i?(Ht(),on):(Ht(),Qe),Tee(e.length,n,i)){for(r=e[i?n-1:n+1],Nct(t,r,i?(Fo(),ba):(Fo(),Ga)),g=0,v=c.length;g0){for(r=f.length;r>0&&f[r-1]=="";)--r;r=0&&f!=n&&(c=new fs(t,1,f,l,null),i?i.Sh(c):i=c),n>=0&&(c=new fs(t,1,n,f==n?l:null,e),i?i.Sh(c):i=c)),i}function Yve(t,e,n,i){var r,c,l,f,g,b,v;if(ime(t,e,n,i))return!0;for(l=new H(e.f);l.a=r){for(l=1;l0){if(r=a(t.Ab.g,1627),e==null){for(c=0;c1)for(i=new H(r);i.ae.f?1:0:(i=t.e-e.e,n=(t.d>0?t.d:y.Math.floor((t.a-1)*UOt)+1)-(e.d>0?e.d:y.Math.floor((e.a-1)*UOt)+1),n>i+1?r:n0&&(l=e_(l,QNt(i))),UIt(c,l))):rg+O&&($=M.i+k.i,k.a=(k.i*k.a+M.i*M.a)/$,k.i=$,M.g=k,n=!0)),c=f,M=k;return n}function WNt(t,e){var n,i,r,c,l,f,g,b,v;if(r=t.g,l=r.n.a,c=r.n.b,l<=0&&c<=0)return Ht(),Wc;switch(b=t.k.a,v=t.k.b,f=t.n.a,n=t.n.b,e.g){case 2:case 1:if(b<0)return Ht(),on;if(b+f>l)return Ht(),Qe;break;case 4:case 3:if(v<0)return Ht(),Tn;if(v+n>c)return Ht(),fi}return g=(b+f/2)/l,i=(v+n/2)/c,g+i<=1&&g-i<=0?(Ht(),on):g+i>=1&&g-i>=0?(Ht(),Qe):i<.5?(Ht(),Tn):(Ht(),fi)}function Tht(t,e,n){var i,r,c,l;if(e[0]>=t.length)return n.o=0,!0;switch(t.charCodeAt(e[0])){case 43:r=1;break;case 45:r=-1;break;default:return n.o=0,!0}if(++e[0],c=e[0],l=T7(t,e),l==0&&e[0]==c)return!1;if(e[0]=14&&n<=16));case 11:return e!=null&&typeof e===hZ;case 12:return e!=null&&(typeof e===FP||typeof e==hZ);case 0:return Gq(e,t.__elementTypeId$);case 2:return S$(e)&&e.sl!==B;case 1:return S$(e)&&e.sl!==B||Gq(e,t.__elementTypeId$);default:return!0}}function J2(t,e){var n,i,r,c,l,f;if(t.j==(Ke(),bu)&&(n=Bat(wo(a(z(t,(Ft(),WB)),15).xc(),new V8(new LS))).a==null?(Cu(),hI):e,Ct(t,xx,n),n!=(Cu(),ag)))for(i=a(z(t,li),14),f=lt(Yt(z(i,(qt(),up)))),l=0,n==kd?l=t.n.b-y.Math.ceil(f/2):n==hI&&(t.n.b-=lt(Yt(z(Mc(t),F6))),l=(t.n.b-y.Math.ceil(f))/2),c=new H(t.i);c.a0&&(YL(g,!1,(Js(),ah)),YL(g,!0,uh)),pd(e.g,new RMt(t,n)),wr(t.g,e,n)}function a_e(t,e){var n,i,r,c,l,f,g;for(c=0,f=0,g=0,r=new H(t.f.e);r.a0&&t.d!=(wC(),XK)&&(f+=l*(i.d.a+t.a[e.b][i.b]*(e.d.a-i.d.a)/n)),n>0&&t.d!=(wC(),VK)&&(g+=l*(i.d.b+t.a[e.b][i.b]*(e.d.b-i.d.b)/n)));switch(t.d.g){case 1:return new We(f/c,e.d.b);case 2:return new We(e.d.a,g/c);default:return new We(f/c,g/c)}}function kht(t){P6t();var e,n,i,r,c,l,f,g,b,v;for(this.b=new M3,this.c=new Dt,this.a=new Dt,g=iq(),b=0,v=g.length;b0){for(l=0;l>16==-15&&t.Cb.Hg()&&SV(new yV(t.Cb,9,13,n,t.c,Hp(Ya(a(t.Cb,53)),t))):ct(t.Cb,96)&&t.Db>>16==-23&&t.Cb.Hg()&&(e=t.c,ct(e,96)||(e=(ye(),gh)),ct(n,96)||(n=(ye(),gh)),SV(new yV(t.Cb,9,10,n,e,Hp(kc(a(t.Cb,24)),t)))))),t.c}function aw(t){Ai();var e,n,i,r,c;if(t.e!=4&&t.e!=5)throw K(new yn("Token#complementRanges(): must be RANGE: "+t.e));for(E_(t),h4(t),i=t.b.length+2,t.b[0]==0&&(i-=2),n=t.b[t.b.length-1],n==EE&&(i-=2),r=(++Ar,new Su(4)),r.b=dt(Gn,pi,22,i,15,1),c=0,t.b[0]>0&&(r.b[c++]=0,r.b[c++]=t.b[0]-1),e=1;e=65;n--)af[n]=n-65<<24>>24;for(i=122;i>=97;i--)af[i]=i-97+26<<24>>24;for(r=57;r>=48;r--)af[r]=r-48+52<<24>>24;for(af[43]=62,af[47]=63,c=0;c<=25;c++)t1[c]=65+c&qr;for(l=26,g=0;l<=51;++l,g++)t1[l]=97+g&qr;for(t=52,f=0;t<=61;++t,f++)t1[t]=48+f&qr;t1[62]=43,t1[63]=47}function d_e(t,e){var n,i,r,c,l,f,g,b,v,M;if(l=t.d,v=a(z(t,(Ft(),Ex)),15),M=0,v){for(g=0,c=v.tc();c.hc();)r=a(c.ic(),8),g=y.Math.max(g,r.n.b),M+=r.n.a;M+=e/2*(v._b()-1),l.d+=g+e}if(n=a(z(t,vx),15),i=0,n){for(g=0,c=n.tc();c.hc();)r=a(c.ic(),8),g=y.Math.max(g,r.n.b),i+=r.n.a;i+=e/2*(n._b()-1),l.a+=g+e}f=y.Math.max(M,i),f>t.n.a&&(b=(f-t.n.a)/2,l.b=y.Math.max(l.b,b),l.c=y.Math.max(l.c,b))}function p_e(t){var e,n,i,r,c,l,f;for(t.o=new OG,i=new Fr,l=new H(t.e.a);l.a0,f=n7(e,c),tst(n?f.b:f.g,e),p_(f).c.length==1&&Ws(i,f,i.c.b,i.c),r=new zs(c,e),UEt(t.o,r),Lc(t.e.a,c))}function ZNt(t,e){var n,i,r,c,l;for(e.d?r=t.a.c==(Sf(),Qm)?Rs(e.b):br(e.b):r=t.a.c==(Sf(),Xp)?Rs(e.b):br(e.b),c=!1,i=(Ao(),new $d(id(Zd(r.a,new X))));Jn(i);)if(n=a(In(i),14),l=lt(t.a.f[t.a.g[e.b.o].o]),!(!l&&!ec(n)&&n.c.g.c==n.d.g.c)&&!(lt(t.a.n[t.a.g[e.b.o].o])||lt(t.a.n[t.a.g[e.b.o].o]))&&(c=!0,kT(t.b,t.a.g[qde(n,e.b).o])))return e.c=!0,e.a=n,e;return e.c=c,e.a=null,e}function Rht(t,e){var n,i,r,c,l,f,g;if(!Tf(t))throw K(new yc(TFt));if(i=Tf(t),c=i.g,r=i.f,c<=0&&r<=0)return Ht(),Wc;switch(f=t.i,g=t.j,e.g){case 2:case 1:if(f<0)return Ht(),on;if(f+t.g>c)return Ht(),Qe;break;case 4:case 3:if(g<0)return Ht(),Tn;if(g+t.f>r)return Ht(),fi}return l=(f+t.g/2)/c,n=(g+t.f/2)/r,l+n<=1&&l-n<=0?(Ht(),on):l+n>=1&&l-n>=0?(Ht(),Qe):n<.5?(Ht(),Tn):(Ht(),fi)}function g_e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R;if(t.Wb())return new go;for(b=0,M=0,r=t.tc();r.hc();)i=a(r.ic(),31),c=i.e,b=y.Math.max(b,c.a),M+=c.a*c.b;for(b=y.Math.max(b,y.Math.sqrt(M)*lt(Yt(z(a(t.tc().ic(),31),(qt(),$B))))),k=0,R=0,g=0,n=e,f=t.tc();f.hc();)l=a(f.ic(),31),v=l.e,k+v.a>b&&(k=0,R+=g+e,g=0),kP(l,k,R),n=y.Math.max(n,k+v.a),g=y.Math.max(g,v.b),k+=v.a+e;return new We(n+e,R+g+e)}function WX(t,e,n){var i,r,c,l,f,g,b,v;if(i=n._b(),i==0)return!1;if(t.ti())if(b=t.ui(),_8t(t,e,n),l=i==1?t.mi(3,null,n.tc().ic(),e,b):t.mi(5,null,n,e,b),t.qi()){for(f=i<100?null:new w1(i),c=e+i,r=e;r1)for(i=qn(r,0);i.b!=i.d.c;)for(n=a(Yn(i),202),c=0,g=new H(n.e);g.af?1:-1:Uat(t.a,e.a,c),r==-1)M=-g,v=l==g?hV(e.a,f,t.a,c):pV(e.a,f,t.a,c);else if(M=l,l==g){if(r==0)return V1(),AE;v=hV(t.a,c,e.a,f)}else v=pV(t.a,c,e.a,f);return b=new Xv(M,v.length,v),hC(b),b}function QNt(t){tE();var e,n,i,r;if(e=Tr(t),t1e6)throw K(new E9("power of ten too big"));if(t<=qi)return R2(_P(gx[1],e),e);for(i=_P(gx[1],qi),r=i,n=Ka(t-qi),e=Tr(t%qi);Pc(n,qi)>0;)r=e_(r,i),n=Yg(n,qi);for(r=e_(r,_P(gx[1],e)),r=R2(r,qi),n=Ka(t-qi);Pc(n,qi)>0;)r=R2(r,qi),n=Yg(n,qi);return r=R2(r,e),r}function v_e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W;n=hm(new Ng,t.f),b=t.i[e.c.g.o],R=t.i[e.d.g.o],g=e.c,k=e.d,f=g.a.b,M=k.a.b,b.b||(f+=g.k.b),R.b||(M+=k.k.b),v=Tr(y.Math.max(0,f-M)),l=Tr(y.Math.max(0,M-f)),O=($=Mh(1,a(z(e,(qt(),Cx)),21).a),W=wct(e.c.g.j,e.d.g.j),$*W),r=ih($l(Wl(Gl(Vl(new cl,O),l),n),a(zi(t.k,e.c),113))),c=ih($l(Wl(Gl(Vl(new cl,O),v),n),a(zi(t.k,e.d),113))),i=new NMt(r,c),t.c[e.o]=i}function VX(t){var e,n,i,r,c,l,f,g,b,v,M,k,R;if(n=t.i,e=t.n,t.b==0)for(R=n.c+e.b,k=n.b-e.b-e.c,l=t.a,g=0,v=l.length;g0&&(M-=i[0]+t.c,i[0]+=t.c),i[2]>0&&(M-=i[2]+t.c),i[1]=y.Math.max(i[1],M),WD(t.a[1],n.c+e.b+i[0]-(i[1]-M)/2,i[1]);for(c=t.a,f=0,b=c.length;f0&&(e[0]+=t.c,M-=e[0]),e[2]>0&&(M-=e[2]+t.c),e[1]=y.Math.max(e[1],M),GD(t.a[1],i.d+n.d+e[0]-(e[1]-M)/2,e[1]);else for(O=i.d+n.d,R=i.a-n.d-n.a,l=t.a,g=0,v=l.length;g>>0).toString(16),n="\\x"+$h(e,e.length-2,e.length)):t>=ao?(e="0"+(t>>>0).toString(16),n="\\v"+$h(e,e.length-6,e.length)):n=""+String.fromCharCode(t&qr)}return n}function Dht(t){var e,n,i,r,c,l;for(jrt(this),n=t._b()-1;n<3;n++)t.bd(0,a(t.cd(0),9));if(t._b()<4)throw K(new yn("At (least dimension + 1) control points are necessary!"));for(this.c=3,this.e=!0,this.f=!0,this.d=!1,Vme(this,t._b()+this.c-1),l=new Dt,c=this.g.tc(),e=0;e=0&&c!=n))throw K(new yn(o6));for(r=0,g=0;glt(Wh(l.g,l.d[0]).a)?(Hn(g.b>0),g.a.cd(g.c=--g.b),cd(g,l),r=!0):f.e&&f.e._b()>0&&(c=(!f.e&&(f.e=new Dt),f.e).vc(e),b=(!f.e&&(f.e=new Dt),f.e).vc(n),(c||b)&&((!f.e&&(f.e=new Dt),f.e).nc(l),++l.c));r||(i.c[i.c.length]=l)}function E_e(t,e,n){var i,r,c,l,f,g;for(i=0,c=new $n((!t.a&&(t.a=new Wt(zr,t,10,11)),t.a));c.e!=c.i._b();)r=a(ci(c),35),l="",(!r.n&&(r.n=new Wt(ic,r,1,7)),r.n).i==0||(l=a(a(at((!r.n&&(r.n=new Wt(ic,r,1,7)),r.n),0),137),263).a),f=new o4t(l),Uo(f,r),Ct(f,(R1(),mx),r),f.b=i++,f.d.a=r.i+r.g/2,f.d.b=r.j+r.f/2,f.e.a=y.Math.max(r.g,1),f.e.b=y.Math.max(r.f,1),Ut(e.e,f),Au(n.d,r,f),g=a(cn(r,(Ph(),Pgt)),83),g==(Ls(),ob)}function S_e(t,e,n,i){var r,c,l,f,g,b,v;if(n.c.g!=e.g)for(r=new Jh(t),jl(r,(Ke(),Hr)),Ct(r,(Ft(),li),n),Ct(r,(qt(),Qi),(Ls(),Gc)),i.c[i.c.length]=r,l=new Eo,ds(l,r),yr(l,(Ht(),on)),f=new Eo,ds(f,r),yr(f,Qe),Ts(n,l),c=new Np,Uo(c,n),Ct(c,Ro,null),Hs(c,f),Ts(c,e),J9t(r,l,f),b=new Gs(n.b,0);b.b0&&(g=f/60|0,b=f%60,r=t.q.getDate(),n=t.q.getHours(),n+g>=24&&++r,c=new y.Date(t.q.getFullYear(),t.q.getMonth(),r,e+g,t.q.getMinutes()+b,t.q.getSeconds(),t.q.getMilliseconds()),t.q.setTime(c.getTime()))),l=t.q.getTime(),t.q.setTime(l+36e5),t.q.getHours()!=e&&t.q.setTime(l)}function T_e(t,e){var n,i,r,c,l,f,g,b,v;for(di(e,"Layer constraint edge reversal",1),l=new H(t.b);l.an){Vn(e);return}switch(a(z(t,(qt(),JJ)),319).g){case 2:c=new Fc;break;case 0:c=new Bd;break;default:c=new mf}if(i=c.sf(t,r),!c.tf())switch(a(z(t,ybt),347).g){case 2:i=Q_e(r,i);break;case 1:i=V1e(r,i)}bye(t,r,i),Vn(e)}function n7t(t,e,n){var i,r,c,l;return t.ti()?(r=null,c=t.ui(),i=t.mi(1,l=AV(t,e,n),n,e,c),t.qi()&&!(t.Bh()&&l!=null?Fi(l,n):zt(l)===zt(n))?(l!=null&&(r=t.si(l,null)),r=t.ri(n,r),t.xi()&&(r=t.Ai(l,n,r)),r?(r.Sh(i),r.Th()):t.ni(i)):(t.xi()&&(r=t.Ai(l,n,null)),r?(r.Sh(i),r.Th()):t.ni(i)),l):(l=AV(t,e,n),t.qi()&&!(t.Bh()&&l!=null?Fi(l,n):zt(l)===zt(n))&&(r=null,l!=null&&(r=t.si(l,null)),r=t.ri(n,r),r&&r.Th()),l)}function ZX(t){var e,n,i,r,c,l,f;if(!t.d){if(f=new OR,e=PA,c=e.a.Zb(t,e),c==null){for(i=new $n(Bo(t));i.e!=i.i._b();)n=a(ci(i),24),Lr(f,ZX(n));e.a.$b(t)!=null,e.a._b()==0}for(l=f.i,r=(!t.q&&(t.q=new Wt(ph,t,11,10)),new $n(t.q));r.e!=r.i._b();++l)a(ci(r),371);Lr(f,(!t.q&&(t.q=new Wt(ph,t,11,10)),t.q)),Qb(f),t.d=new zv((a(at(Et((T1(),Ae).o),9),17),f.i),f.g),t.e=a(f.g,611),t.e==null&&(t.e=tXt),pl(t).b&=-17}return t.d}function a4(t,e,n,i){var r,c,l,f,g,b;if(b=gu(t.e.mg(),e),g=0,r=a(t.g,124),Jo(),a(e,61).bj()){for(l=0;l1&&(g>$u(f)*Sh(f)/2||l.b==0)&&(M=new ON(k),v=$u(f)/Sh(f),b=uZ(M,e,new u2,n,i,r,v),sr(Gh(M.e),b),f=M,R.c[R.c.length]=M,g=0,k.c=dt(un,te,1,0,5,1)));return Or(R,k),R}function L_e(t,e){var n,i,r,c,l,f,g,b,v;for(di(e,"Hierarchical port dummy size processing",1),g=new Dt,v=new Dt,i=lt(Yt(z(t,(qt(),Ax)))),n=i*2,c=new H(t.b);c.a=W&&t.e[g.o]>O*t.b||pt>=n*W)&&(k.c[k.c.length]=f,f=new Dt,yo(l,c),c.a.Pb(),b-=v,R=y.Math.max(R,b*t.b+$),b+=pt,rt=pt,pt=0,v=0,$=0);return new zs(R,k)}function R_e(t){var e,n,i,r,c,l,f,g,b,v,M,k;for(e=Y9t(t),v=(f=new Tv(e).a.Tb().tc(),new g5(f));v.a.hc();){for(b=(r=a(v.a.ic(),38),a(r.kc(),8)),M=b.d.d,k=b.n.b+b.d.a,t.d[b.o]=0,n=b;(c=t.a[n.o])!=b;)i=Mhe(n,c),t.c==(Sf(),Xp)?g=i.d.k.b+i.d.a.b-i.c.k.b-i.c.a.b:g=i.c.k.b+i.c.a.b-i.d.k.b-i.d.a.b,l=lt(t.d[n.o])+g,t.d[c.o]=l,M=y.Math.max(M,c.d.d-l),k=y.Math.max(k,l+c.n.b+c.d.a),n=c;n=b;do t.d[n.o]=lt(t.d[n.o])+M,n=t.a[n.o];while(n!=b);t.b[b.o]=M+k}}function Nht(t,e,n){var i,r,c,l,f,g,b,v,M,k;for(T6t(this),n==(vm(),sg)?Ir(this.o,t):Ir(this.t,t),v=is,b=Ps,l=e.a.Xb().tc();l.hc();)r=a(l.ic(),48),f=a(r.a,417),i=a(r.b,14),g=i.c,g==t&&(g=i.d),f==sg?Ir(this.o,g):Ir(this.t,g),k=zo(Y(Z(ss,1),wt,9,0,[g.g.k,g.k,g.a])).b,v=y.Math.min(v,k),b=y.Math.max(b,k);for(M=zo(Y(Z(ss,1),wt,9,0,[t.g.k,t.k,t.a])).b,D8t(this,M,v,b),c=e.a.Xb().tc();c.hc();)r=a(c.ic(),48),F9t(this,a(r.b,14));this.k=!1}function D_e(t){var e,n,i,r;if(i=lZ((!t.c&&(t.c=KL(t.f)),t.c),0),t.e==0||t.a==0&&t.f!=-1&&t.e<0)return i;if(e=eat(t)<0?1:0,n=t.e,r=(i.length+1+J3(Tr(t.e)),new Bb),e==1&&(r.a+="-"),t.e>0)if(n-=i.length-e,n>=0){for(r.a+="0.";n>b0.length;n-=b0.length)rCt(r,b0);HSt(r,b0,Tr(n)),Ii(r,i.substr(e,i.length-e))}else n=e-n,Ii(r,$h(i,e,Tr(n))),r.a+=".",Ii(r,uL(i,Tr(n)));else{for(Ii(r,i.substr(e,i.length-e));n<-b0.length;n+=b0.length)rCt(r,b0);HSt(r,b0,Tr(-n))}return r.a}function Hc(t,e){var n,i,r,c,l,f,g;if(t==null)return null;if(c=t.length,c==0)return"";for(g=dt(nl,Pf,22,c,15,1),Oct(0,c,t.length),Oct(0,c,g.length),$Ct(t,0,c,g,0),n=null,f=e,r=0,l=0;r0?$h(n.a,0,c-1):""):t.substr(0,c-1):n?n.a:t}function N_e(t){var e,n,i,r,c,l,f,g,b,v,M,k,R;for(n=(b=new vf(t.c.b).a.Tb().tc(),new nm(b));n.a.hc();)e=(f=a(n.a.ic(),38),a(f.lc(),180)),r=e.a,r==null&&(r=""),i=lne(t.c,r),!i&&r.length==0&&(i=Ehe(t)),i&&!j2(i.c,e,!1)&&Xi(i.c,e);for(l=qn(t.a,0);l.b!=l.d.c;)c=a(Yn(l),436),v=Sct(t.c,c.a),R=Sct(t.c,c.b),v&&R&&Xi(v.c,new zs(R,c.c));for(ld(t.a),k=qn(t.b,0);k.b!=k.d.c;)M=a(Yn(k),436),e=une(t.c,M.a),g=Sct(t.c,M.b),e&&g&&ute(e,g,M.c);ld(t.b)}function O_e(t,e,n){var i,r,c,l,f,g,b,v,M;for(g=n+e.c.c.a,M=new H(e.i);M.a1,f=new Up(v.c);Qo(f.a)||Qo(f.b);)l=a(Qo(f.a)?G(f.a):G(f.b),14),b=l.c==v?l.d:l.c,y.Math.abs(zo(Y(Z(ss,1),wt,9,0,[b.g.k,b.k,b.a])).b-c.b)>1&&Wbe(t,l,c,r,v)}}function l4(t){var e,n,i,r,c,l,f,g;if(!t.f){if(g=new NR,f=new NR,e=PA,l=e.a.Zb(t,e),l==null){for(c=new $n(Bo(t));c.e!=c.i._b();)r=a(ci(c),24),Lr(g,l4(r));e.a.$b(t)!=null,e.a._b()==0}for(i=(!t.s&&(t.s=new Wt(Ra,t,21,17)),new $n(t.s));i.e!=i.i._b();)n=a(ci(i),158),ct(n,62)&&ni(f,a(n,17));Qb(f),t.r=new uCt(t,(a(at(Et((T1(),Ae).o),6),17),f.i),f.g),Lr(g,t.r),Qb(g),t.f=new zv((a(at(Et(Ae.o),5),17),g.i),g.g),pl(t).b&=-3}return t.f}function B_e(t){var e,n,i,r,c,l,f,g,b,v,M,k,R,O;for(l=t.o,i=dt(Gn,pi,22,l,15,1),r=dt(Gn,pi,22,l,15,1),n=t.p,e=dt(Gn,pi,22,n,15,1),c=dt(Gn,pi,22,n,15,1),b=0;b=0&&!g_(t,v,M);)--M;r[v]=M}for(R=0;R=0&&!g_(t,f,O);)--f;c[O]=f}for(g=0;ge[k]&&ki[g]&&G7(t,g,k,!1,!0)}function q7(){q7=P,jvt=Y(Z(nl,1),Pf,22,15,[48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70]),Pqt=new RegExp(`[ -\r\f]+`);try{AA=Y(Z(nMe,1),te,1699,0,[new r2((_rt(),c7("yyyy-MM-dd'T'HH:mm:ss'.'SSSZ",cL((Hh(),Hh(),F4))))),new r2(c7("yyyy-MM-dd'T'HH:mm:ss'.'SSS",cL(F4))),new r2(c7("yyyy-MM-dd'T'HH:mm:ss",cL(F4))),new r2(c7("yyyy-MM-dd'T'HH:mm",cL(F4))),new r2(c7("yyyy-MM-dd",cL(F4)))])}catch(t){if(t=vr(t),!ct(t,78))throw K(t)}}function i7t(t,e){var n,i,r,c,l;switch(c=new Va,t.a.g){case 1:case 3:yo(c,e.e.a),Xi(c,e.i.k),yo(c,Cm(e.j.a)),Xi(c,e.a.k),yo(c,e.f.a);break;default:yo(c,e.e.a),yo(c,Cm(e.j.a)),yo(c,e.f.a)}ld(e.f.a),yo(e.f.a,c),Hs(e.f,e.e.c),n=a(z(e.e,(qt(),Ro)),74),r=a(z(e.j,Ro),74),i=a(z(e.f,Ro),74),(n||r||i)&&(l=new Va,Cot(l,i),Cot(l,r),Cot(l,n),Ct(e.f,Ro,l)),Hs(e.j,null),Ts(e.j,null),Hs(e.e,null),Ts(e.e,null),Ks(e.a,null),Ks(e.i,null),e.g&&i7t(t,e.g)}function r7t(t){m2(t,new y_(p2(h2(d2(f2(new Z0,c0),"ELK DisCo"),"Layouter for arranging unconnected subgraphs. The subgraphs themselves are, by default, not laid out."),new Bs))),pe(t,c0,nY,Xe(Sgt)),pe(t,c0,iY,Xe(zK)),pe(t,c0,hE,Xe(ljt)),pe(t,c0,ox,Xe(Egt)),pe(t,c0,yft,Xe(pjt)),pe(t,c0,xft,Xe(djt)),pe(t,c0,_ft,Xe(gjt)),pe(t,c0,Mft,Xe(fjt)),pe(t,c0,Sft,Xe(hjt)),pe(t,c0,Tft,Xe(UK)),pe(t,c0,Cft,Xe(Mgt)),pe(t,c0,Aft,Xe(uB))}function F_e(t,e,n){var i,r,c,l,f,g,b,v,M;for(l=new QRt,b=Y(Z(Gn,1),pi,22,15,[0]),r=-1,c=0,i=0,g=0;g0){if(r<0&&v.a&&(r=g,c=b[0],i=0),r>=0){if(f=v.b,g==r&&(f-=i++,f==0))return 0;if(!sOt(e,b,v,f,l)){g=r-1,b[0]=c;continue}}else if(r=-1,!sOt(e,b,v,0,l))return 0}else{if(r=-1,v.c.charCodeAt(0)==32){if(M=b[0],DLt(e,b),b[0]>M)continue}else if(Kse(e,v.c,b[0])){b[0]+=v.c.length;continue}return 0}return lxe(l,n)?b[0]:0}function U_e(t,e,n){var i,r,c,l,f;if(i=a(z(t,(qt(),WJ)),19),n.a>e.a&&(i.pc((KM(),CB))?t.c.a+=(n.a-e.a)/2:i.pc(AB)&&(t.c.a+=n.a-e.a)),n.b>e.b&&(i.pc((KM(),LB))?t.c.b+=(n.b-e.b)/2:i.pc(kB)&&(t.c.b+=n.b-e.b)),a(z(t,(Ft(),Qc)),19).pc((So(),Al))&&(n.a>e.a||n.b>e.b))for(f=new H(t.a);f.ae.a&&(i.pc((KM(),CB))?t.c.a+=(n.a-e.a)/2:i.pc(AB)&&(t.c.a+=n.a-e.a)),n.b>e.b&&(i.pc((KM(),LB))?t.c.b+=(n.b-e.b)/2:i.pc(kB)&&(t.c.b+=n.b-e.b)),a(z(t,(Ft(),Qc)),19).pc((So(),Al))&&(n.a>e.a||n.b>e.b))for(l=new H(t.a);l.aR||i+r>b)throw K(new w9);if(!(M.i&1)&&k!=g)if(v=s_(t),c=s_(n),zt(t)===zt(n)&&ei;)Vr(c,f,v[--e]);else for(f=i+r;i0&&Fut(t,e,n,i,r,!0)}function H_e(t,e,n){var i,r,c,l,f,g,b,v,M,k;for(v=new qD(new kv(n)),f=dt(Ol,a0,22,t.f.e.c.length,16,1),Mot(f,f.length),n[e.b]=0,b=new H(t.f.e);b.a=t.b.length?(c[r++]=l.b[i++],c[r++]=l.b[i++]):i>=l.b.length?(c[r++]=t.b[n++],c[r++]=t.b[n++]):l.b[i]=f?pV(t.a,c,e.a,f):pV(e.a,f,t.a,c);else{if(r=c!=f?c>f?1:-1:Uat(t.a,e.a,c),r==0)return V1(),AE;r==1?(k=l,M=hV(t.a,c,e.a,f)):(k=g,M=hV(e.a,f,t.a,c))}return b=new Xv(k,M.length,M),hC(b),b}function c7t(t,e){var n,i,r,c,l,f;for(l=new qg(new xp(t.f.b).a);l.b;){if(c=Sm(l),r=a(c.kc(),536),e==1){if(r.Je()!=(Js(),cg)&&r.Je()!=fp)continue}else if(r.Je()!=(Js(),ah)&&r.Je()!=uh)continue;switch(i=a(a(c.lc(),48).b,80),f=a(a(c.lc(),48).a,172),n=f.c,r.Je().g){case 2:i.g.c=t.e.a,i.g.b=y.Math.max(1,i.g.b+n);break;case 1:i.g.c=i.g.c+n,i.g.b=y.Math.max(1,i.g.b-n);break;case 4:i.g.d=t.e.b,i.g.a=y.Math.max(1,i.g.a+n);break;case 3:i.g.d=i.g.d+n,i.g.a=y.Math.max(1,i.g.a-n)}}}function a7t(t,e,n,i){var r,c,l,f,g,b,v;if(c=t7(i),f=lt(de(z(i,(qt(),nbt)))),(f||lt(de(z(t,YB))))&&!Gd(a(z(t,Qi),83)))r=sP(c),g=Cht(t,n,n==(Fo(),ba)?r:iP(r));else switch(g=new Eo,ds(g,t),e?(v=g.k,v.a=e.a-t.k.a,v.b=e.b-t.k.b,H8t(v,0,0,t.n.a,t.n.b),yr(g,WNt(g,c))):(r=sP(c),yr(g,n==(Fo(),ba)?r:iP(r))),l=a(z(i,(Ft(),Qc)),19),b=g.i,c.g){case 2:case 1:(b==(Ht(),Tn)||b==fi)&&l.nc((So(),Q_));break;case 4:case 3:(b==(Ht(),Qe)||b==on)&&l.nc((So(),Q_))}return g}function V_e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$;for(f=dt(Gn,pi,22,e.b.c.length,15,1),b=dt(QK,jt,232,e.b.c.length,0,1),g=dt(Cl,Ih,8,e.b.c.length,0,1),M=t.a,k=0,R=M.length;k0&&g[i]&&(O=Gv(t.b,g[i],r)),$=y.Math.max($,r.c.c.b+O);for(c=new H(v.f);c.a"}g!=null&&(e.a+=""+g)}else t.e?(f=t.e.zb,f!=null&&(e.a+=""+f)):(e.a+="?",t.b?(e.a+=" super ",tZ(t.b,e)):t.f&&(e.a+=" extends ",tZ(t.f,e)))}function q_e(t,e){var n,i,r,c,l,f,g,b;for(t.f=e,t.d=a(z(t.f,(zL(),Dgt)),348),t.g=a(z(t.f,Fgt),21).a,t.e=lt(Yt(z(t.f,Ngt))),t.c=lt(Yt(z(t.f,gB))),k$(t.b),i=new H(t.f.c);i.a=0)return!1;if(n.e&&r==(Ke(),Jc)&&r!=n.e)return!1;if(e.o=n.b,Ut(n.f,e),n.e=r,r==(Ke(),Hr)||r==uc||r==Jc){for(l=new H(e.i);l.a0&&i<=r?(b-=i,c=f,l=f):(t.a==null&&gX(t),t.a[l]&&(b+=r,c=l)),c>0){Ut(M,Xt(c)),f=-1,v=!1;do if(n.hc())g=Xt(a(n.ic(),21).a+b);else break t;while(g.a<=l)}}else if(t.a==null&&gX(t),t.a[l]&&(f=l),l==g.a)if(t.a==null&&gX(t),t.a[l])if(M.c[M.c.length]=g,f=-1,n.hc())g=Xt(a(n.ic(),21).a+b);else break;else v=!0;++l}return M}function h7t(t){var e,n,i,r;return t.Db&64?Sq(t):(e=new ll(Tpt),i=t.k,i?Ii(Ii((e.a+=' "',e),i),'"'):(!t.n&&(t.n=new Wt(ic,t,1,7)),t.n.i>0&&(r=(!t.n&&(t.n=new Wt(ic,t,1,7)),a(a(at(t.n,0),137),263)).a,!r||Ii(Ii((e.a+=' "',e),r),'"'))),n=(!t.b&&(t.b=new pn(Si,t,4,7)),!(t.b.i<=1&&(!t.c&&(t.c=new pn(Si,t,5,8)),t.c.i<=1))),n?e.a+=" [":e.a+=" ",Ii(e,zW(new P5(Rc),new $n(t.b))),n&&(e.a+="]"),e.a+=" -> ",n&&(e.a+="["),Ii(e,zW(new P5(Rc),new $n(t.c))),n&&(e.a+="]"),e.a)}function tye(t){var e,n,i,r,c,l;for(r=new Dt,l=new H(t.c.i);l.at.n.b||(n=ac(t,Qe),f=e.d+e.a+(n._b()-1)*l,f>t.n.b)))}function rZ(t,e,n){var i,r,c,l,f,g,b,v;return i=t.a.o==(Zh(),rf)?is:Ps,f=ZNt(t,new zMt(e,n)),!f.a&&f.c?(Xi(t.c,f),i):f.a?(r=f.a.c,g=f.a.d,n?(b=t.a.c==(Sf(),Qm)?g:r,c=t.a.c==Qm?r:g,l=t.a.g[c.g.o],v=lt(t.a.p[l.o])+lt(t.a.d[c.g.o])+c.k.b+c.a.b-lt(t.a.d[b.g.o])-b.k.b-b.a.b):(b=t.a.c==(Sf(),Xp)?g:r,c=t.a.c==Xp?r:g,v=lt(t.a.p[t.a.g[c.g.o].o])+lt(t.a.d[c.g.o])+c.k.b+c.a.b-lt(t.a.d[b.g.o])-b.k.b-b.a.b),t.a.n[t.a.g[r.g.o].o]=(me(),me(),!0),t.a.n[t.a.g[g.g.o].o]=!0,v):i}function sZ(t,e,n,i,r,c,l){var f,g,b,v,M,k,R;return M=lt(de(z(e,(qt(),ibt)))),k=null,c==(Fo(),Ga)&&i.c.g==n?k=i.c:c==ba&&i.d.g==n&&(k=i.d),b=l,!l||!M||k?(v=(Ht(),Wc),k?v=k.i:Gd(a(z(n,Qi),83))&&(v=c==Ga?on:Qe),g=pye(t,e,n,c,v,i),f=dV((Mc(n),i)),c==Ga?(Hs(f,a(Ee(g.i,0),11)),Ts(f,r)):(Hs(f,r),Ts(f,a(Ee(g.i,0),11))),b=new J6t(i,f,g,a(z(g,(Ft(),li)),11),c,!k)):(Ut(l.e,i),R=y.Math.max(lt(Yt(z(l.d,up))),lt(Yt(z(i,up)))),Ct(l.d,up,R)),cr(t.a,i,new CD(b.d,e,c)),b}function d7t(t,e){var n,i,r,c,l,f,g,b,v,M;if(Ct(e,(mc(),FE),0),g=a(z(e,gF),76),e.d.b==0)g?(v=lt(Yt(z(g,Kp)))+t.a+Tct(g,e),Ct(e,Kp,v)):Ct(e,Kp,0);else{for(i=(c=qn(new Hd(e).a.d,0),new Ob(c));R9(i.a);)n=a(Yn(i.a),170).c,d7t(t,n);f=a(xD((l=qn(new Hd(e).a.d,0),new Ob(l))),76),M=a(Dne((r=qn(new Hd(e).a.d,0),new Ob(r))),76),b=(lt(Yt(z(M,Kp)))+lt(Yt(z(f,Kp))))/2,g?(v=lt(Yt(z(g,Kp)))+t.a+Tct(g,e),Ct(e,Kp,v),Ct(e,FE,lt(Yt(z(e,Kp)))-b),o2e(t,e)):Ct(e,Kp,b)}}function iye(t,e){var n,i,r,c,l,f,g,b,v;if(b=a(z(t,(Ft(),wc)),69),i=a(Ee(t.i,0),11),b==(Ht(),Tn)?yr(i,fi):b==fi&&yr(i,Tn),a(z(e,(qt(),Ew)),185).pc((Ju(),E0))){if(g=lt(Yt(z(t,iA))),l=lt(Yt(z(t,kx))),f=a(z(e,Tx),275),f==(Kh(),cb))for(n=g,v=t.n.a/2-i.k.a,c=new H(i.e);c.a0&&i>=-6?i>=0?_L(c,n-Tr(t.e),"."):(c.a=$h(c.a,0,e-1)+"0."+uL(c.a,e-1),_L(c,e+1,ml(b0,0,-Tr(i)-1))):(n-e>=1&&(_L(c,e,"."),++n),_L(c,n,"E"),i>0&&_L(c,++n,"+"),_L(c,++n,""+BD(Ka(i)))),t.g=c.a,t.g))}function g7t(t,e,n){var i,r,c,l;this.j=t,this.e=klt(t),this.o=a(z(this.j,(Ft(),tg)),8),this.i=!!this.o,this.p=this.i?a(Ee(n,Mc(this.o).o),204):null,r=a(z(t,Qc),19),this.g=r.pc((So(),Al)),this.b=new Dt,this.d=new IIt(this.e),l=a(z(this.j,NE),214),this.q=_le(e,l,this.e),this.k=new EAt(this),c=Vg(Y(Z(cHt,1),te,208,0,[this,this.d,this.k,this.q])),e==(Tm(),oF)?(i=new o6t(this.e),c.c[c.c.length]=i,this.c=new okt(i,l,a(this.q,422))):this.c=new DMt(e,this),Ut(c,this.c),f7t(c,this.e),this.s=zxe(this.k)}function sye(t,e){var n,i,r,c;return n=new vn,i=a(hd(Vh(new gi(null,new Ei(t.f,16)),n),n_(new ti,new Qn,new Kt,new kt,Y(Z(tf,1),jt,150,0,[(z1(),bw),Qh]))),19),r=i._b(),r=r==2?1:0,r==1&&zb(rP(a(hd(wo(i.uc(),new he),UPt(Qg(0),new ki)),149).a,2),0)&&(r=0),i=a(hd(Vh(new gi(null,new Ei(e.f,16)),n),n_(new ti,new Qn,new Kt,new kt,Y(Z(tf,1),jt,150,0,[bw,Qh]))),19),c=i._b(),c=c==2?1:0,c==1&&zb(rP(a(hd(wo(i.uc(),new Mn),UPt(Qg(0),new ki)),149).a,2),0)&&(c=0),r=t.b[r+1])r+=2;else if(n0)for(i=new Eh(a(rr(t.a,c),19)),we(),gc(i,new Z8(e)),r=new Gs(c.b,0);r.b=ao?mo(n,sut(i)):wM(n,i&qr),l=(++Ar,new K$(10,null,0)),tse(t.a,l,f-1)):(n=(l.ll().length+c,new yT),mo(n,l.ll())),e.e==0?(i=e.jl(),i>=ao?mo(n,sut(i)):wM(n,i&qr)):mo(n,e.ll()),a(l,474).b=n.a}}function hye(t,e){var n,i,r,c,l,f,g,b,v,M,k,R;if(di(e,"Edge splitting",1),t.b.c.length<=2){Vn(e);return}for(c=new Gs(t.b,0),l=(Hn(c.bIt)?(g=2,l=qi):g==0?(g=1,l=Zt):(g=0,l=Zt)):(R=Zt>=l||l-Zt0?(r=i+(O-1)*n,M&&(r+=i),r0){f7(t,n,0),n.a+=String.fromCharCode(i),r=Ple(e,c),f7(t,n,r),c+=r-1;continue}i==39?c+10){if(e=new Crt(t.i,t.g),n=t.i,c=n<100?null:new w1(n),t.xi())for(i=0;i0){for(f=t.g,b=t.i,mC(t),c=b<100?null:new w1(b),i=0;i0)if(e=new xat(t.Uh()),r=g<100?null:new w1(g),sL(t,g,e.g),i=g==1?t.mi(4,at(e,0),null,0,f):t.mi(6,e,null,-1,f),t.qi()){for(n=new $n(e);n.e!=n.i._b();)r=t.si(ci(n),r);r?(r.Sh(i),r.Th()):t.ni(i)}else r?(r.Sh(i),r.Th()):t.ni(i);else sL(t,t.hi(),t.ii()),t.ni(t.mi(6,(we(),fo),null,-1,f));else if(t.qi())if(g=t.hi(),g>0){for(l=t.ii(),sL(t,g,l),r=g<100?null:new w1(g),n=0;n>13|(t.m&15)<<9,r=t.m>>4&8191,c=t.m>>17|(t.h&255)<<5,l=(t.h&1048320)>>8,f=e.l&8191,g=e.l>>13|(e.m&15)<<9,b=e.m>>4&8191,v=e.m>>17|(e.h&255)<<5,M=(e.h&1048320)>>8,ce=n*f,ae=i*f,Te=r*f,Me=c*f,Bn=l*f,g!=0&&(ae+=n*g,Te+=i*g,Me+=r*g,Bn+=c*g),b!=0&&(Te+=n*b,Me+=i*b,Bn+=r*b),v!=0&&(Me+=n*v,Bn+=i*v),M!=0&&(Bn+=n*M),R=ce&eu,O=(ae&511)<<13,k=R+O,W=ce>>22,nt=ae>>9,rt=(Te&262143)<<4,pt=(Me&31)<<17,$=W+nt+rt+pt,It=Te>>18,Gt=Me>>5,Zt=(Bn&4095)<<8,_t=It+Gt+Zt,$+=k>>22,k&=eu,_t+=$>>22,$&=eu,_t&=sp,ia(k,$,_t)}function w7t(t,e){var n,i,r,c,l;n=lt(Yt(z(e,(qt(),nf)))),n<2&&Ct(e,nf,2),i=a(z(e,ch),110),i==(Js(),Ff)&&Ct(e,ch,t7(e)),r=a(z(e,QGt),21),r.a==0?Ct(e,(Ft(),NE),new kq):Ct(e,(Ft(),NE),new fN(r.a)),c=de(z(e,tA)),c==null&&Ct(e,tA,(me(),zt(z(e,ig))===zt((gd(),GE)))),l=new G8t(e),Ct(e,(Ft(),yw),l),lct(t.a),qb(t.a,(Mo(),Of),a(z(e,jmt),285)),qb(t.a,bx,a(z(e,ebt),285)),qb(t.a,aa,a(z(e,OE),285)),qb(t.a,ua,a(z(e,JB),285)),qb(t.a,Yo,Ale(a(z(e,ig),197))),zEt(t.a,$xe(e)),Ct(e,UJ,zht(t.a,e))}function v7t(t,e){var n,i,r,c,l,f,g,b,v,M;if(g=e.length-1,f=e.charCodeAt(g),f==93){if(l=Mf(e,Ca(91)),l>=0)return r=Yhe(t,e.substr(1,l-1)),v=e.substr(l+1,g-(l+1)),Pxe(t,v,r)}else{if(n=-1,/\d/.test(String.fromCharCode(f))&&(n=xst(e,Ca(46),g-1),n>=0)){i=a(Lct(t,ELt(t,e.substr(1,n-1)),!1),52);try{b=ku(e.substr(n+1,e.length-(n+1)),Vs,qi)}catch(k){throw k=vr(k),ct(k,118)?(c=k,K(new TN(c))):K(k)}if(b4)if(t.Li(e)){if(t.Dj()){if(r=a(e,42),i=r.ng(),g=i==t.e&&(t.Pj()?r.hg(r.og(),t.Lj())==t.Mj():-1-r.og()==t.pi()),t.Qj()&&!g&&!i&&r.sg()){for(c=0;c=W-1)return null;for(r=new Dt,r.c[r.c.length]=e,_t=e,l=n,O=-1,f=a(Ee(t.d.c.b,n),26),R=0;R1&&l0&&(b=t.k.a/c);break;case 2:case 4:r=t.g.n.b,r>0&&(b=t.k.b/r)}Ct(t,(Ft(),Ym),b)}if(g=t.n,l=t.a,i)l.a=i.a,l.b=i.b,t.b=!0;else if(e!=dp&&e!=ob&&f!=Wc)switch(f.g){case 1:l.a=g.a/2;break;case 2:l.a=g.a,l.b=g.b/2;break;case 3:l.a=g.a/2,l.b=g.b;break;case 4:l.b=g.b/2}else l.a=g.a/2,l.b=g.b/2}function kye(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O;for(di(n,MBt,1),t.c=e,k=t.c.a,c=0,b=new H(k);b.aO){for(R=1,r=f.n.a;r>l;)++R,r=(f.n.a-(R-1)*t.d)/R;Ut(i,new Wkt(t,f,R,r))}for(g=new H(i);g.a1&&$u(l)*Sh(l)/2>f[0]){for(c=0;c<$.c.length-1&&$u(l)*Sh(l)/2>f[c];)++c;O=new C1($,0,c+1),M=new ON(O),v=$u(l)/Sh(l),g=uZ(M,e,new u2,n,i,r,v),sr(Gh(M.e),g),RM(JM(k,M)),R=new C1($,c+1,$.c.length),Jct(k,R),$.c=dt(un,te,1,0,5,1),b=0,NCt(f,f.length,0)}else W=k.b.c.length==0?null:Ee(k.b,0),W!=null&&bat(k,0),b>0&&(f[b]=f[b-1]),f[b]+=$u(l)*Sh(l),++b,$.c[$.c.length]=l;return $}function zht(t,e){var n,i,r,c,l,f,g,b,v,M,k;if(t.e&&t.c.c.5?nt-=l*2*(O-.5):O<.5&&(nt+=c*2*(.5-O)),r=f.d.b,ntW.a-$-v&&(nt=W.a-$-v),f.k.a=e+nt}}function y7t(t,e){var n,i,r,c,l;for(l=new H(t.i);l.a0&&e9t(t,f,M);for(r=new H(M);r.a0&&(t.a=g+(R-1)*c,e.c.b+=t.a,e.e.b+=t.a)),O.a._b()!=0&&(k=new pX(1,c),R=Oht(k,e,O,$,e.e.b+g-e.c.b),R>0&&(e.e.b+=g+(R-1)*c))}function Hht(t,e,n){var i,r,c,l,f,g;if(e.l==0&&e.m==0&&e.h==0)throw K(new E9("divide by zero"));if(t.l==0&&t.m==0&&t.h==0)return n&&(Q1=ia(0,0,0)),ia(0,0,0);if(e.h==HP&&e.m==0&&e.l==0)return ufe(t,n);if(g=!1,e.h>>19&&(e=zM(e),g=!0),l=wbe(e),c=!1,r=!1,i=!1,t.h==HP&&t.m==0&&t.l==0)if(r=!0,c=!0,l==-1)t=NEt((NM(),_1t)),i=!0,g=!g;else return f=$lt(t,l),g&&rq(f),n&&(Q1=ia(0,0,0)),f;else t.h>>19&&(c=!0,t=zM(t),i=!0,g=!g);return l!=-1?$le(t,l,g,c,n):Zut(t,e)<0?(n&&(c?Q1=zM(t):Q1=ia(t.l,t.m,t.h)),ia(0,0,0)):Hve(i?t:ia(t.l,t.m,t.h),e,g,c,r,n)}function Oye(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt;for(b=e.c,r=Frt(t.e),M=hl(rL(Xc(Brt(t.e)),t.d*t.a,t.c*t.b),-.5),n=r.a-M.a,i=r.b-M.b,l=e.a,n=l.c-n,i=l.d-i,g=new H(b);g.a=0)return n;switch(wm(qo(t,n))){case 2:{if(le("",jp(t,n.Wi()).be())){if(g=bL(qo(t,n)),f=MM(qo(t,n)),v=Zlt(t,e,g,f),v)return v;for(r=xht(t,e),l=0,M=r._b();le.e||e.f>t.e)){for(n=0,i=0,l=t.t.a.Xb().tc();l.hc();)r=a(l.ic(),11),yq(zo(Y(Z(ss,1),wt,9,0,[r.g.k,r.k,r.a])).b,e.f,e.e)&&++n;for(f=t.o.a.Xb().tc();f.hc();)r=a(f.ic(),11),yq(zo(Y(Z(ss,1),wt,9,0,[r.g.k,r.k,r.a])).b,e.f,e.e)&&--n;for(g=e.t.a.Xb().tc();g.hc();)r=a(g.ic(),11),yq(zo(Y(Z(ss,1),wt,9,0,[r.g.k,r.k,r.a])).b,t.f,t.e)&&++i;for(c=e.o.a.Xb().tc();c.hc();)r=a(c.ic(),11),yq(zo(Y(Z(ss,1),wt,9,0,[r.g.k,r.k,r.a])).b,t.f,t.e)&&--i;n0&&n.charCodeAt(0)!=47))throw K(new yn("invalid opaquePart: "+n));if(t&&!(e!=null&&AT(ZF,e.toLowerCase()))&&!(n==null||!uq(n,kA,LA)))throw K(new yn(yUt+n));if(t&&e!=null&&AT(ZF,e.toLowerCase())&&!v1e(n))throw K(new yn(yUt+n));if(!Xle(i))throw K(new yn("invalid device: "+i));if(!bhe(r))throw l=r==null?"invalid segments: null":"invalid segment: "+hhe(r),K(new yn(l));if(!(c==null||Mf(c,Ca(35))==-1))throw K(new yn("invalid query: "+c))}function x7t(t,e){var n;if(e==null||le(e,tu)||e.length==0&&t.k!=(i0(),zE))return null;switch(t.k.g){case 1:return u7(e,bE)?(me(),TE):u7(e,WY)?(me(),$m):null;case 2:try{return Xt(ku(e,Vs,qi))}catch(i){if(i=vr(i),ct(i,118))return null;throw K(i)}case 4:try{return rw(e)}catch(i){if(i=vr(i),ct(i,118))return null;throw K(i)}case 3:return e;case 5:return I6t(t),x9t(t,e);case 6:return I6t(t),Kme(t,t.a,e);case 7:try{return n=mme(t),n.gf(e),n}catch(i){if(i=vr(i),ct(i,30))return null;throw K(i)}default:throw K(new yc("Invalid type set for this layout option."))}}function jye(t){var e,n,i,r,c,l,f,g,b,v,M;for(l=new H(t.d.b);l.a0&&YL(b,!0,(Js(),uh)),f.j==(Ke(),rs)&&p4t(b),wr(t.f,f,e)}}function Hye(t,e,n){var i,r,c,l,f,g,b,v;if(n._b()==0)return!1;if(f=(Jo(),a(e,61).bj()),c=f?n:new i_(n._b()),Om(t.e,e)){if(e.xh())for(b=n.tc();b.hc();)g=b.ic(),XX(t,e,g,ct(e,62)&&(a(a(e,17),62).Bb&ao)!=0)||(r=k1(e,g),c.pc(r)||c.nc(r));else if(!f)for(b=n.tc();b.hc();)g=b.ic(),r=k1(e,g),c.nc(r)}else{if(n._b()>1)throw K(new yn(dK));for(v=gu(t.e.mg(),e),i=a(t.g,124),l=0;l1&&l>1;)v=KNt(t,_t),f=a(Ee(t.d.c.b,l),26),M=a(Ee(t.d.c.b,l-1),26),Gt=a($.cd(k++),21).a,nt=cm(Gt,M.a.c.length),W1(_t,nt,M),W1(v,pt,f),pt=nt,_t&&(r.c[r.c.length]=_t),_t=v,--It,++c,--l;for(rt=(i-(r.c.length-1)*t.d.d)/r.c.length,b=new H(r);b.a0&&L7(t,e,!1,!1,r),M=oX(t,e,!0,!1)):(L7(t,e,!1,g,0),M=oX(t,e,!0,!1)):v?(f=a(a(rr(t.r,e),19),60)._b(),c=C1e(t,e),M=c*f+t.u*(f-1),c>0&&L7(t,e,!0,!1,c)):(L7(t,e,!0,!1,0),M=oX(t,e,!0,!0)),RX(t,e)==(G1(),sb)&&(M+=2*t.u),n.a.a=M}function S7t(t,e){var n,i,r,c,l,f,g,b,v,M;if(n=a(js(t.b,e),114),a(a(rr(t.r,e),19),60).Wb()){n.n.d=0,n.n.a=0;return}n.n.d=t.A.d,n.n.a=t.A.a,r=t.v.pc((Ju(),E0)),v=a(a(rr(t.r,e),19),60)._b()==2,f=t.t==(Kh(),hy),b=t.w.pc((ma(),Fx)),M=t.w.pc(FF),i=0,!r||v&&f?i=cX(t,e,!1,!1):f?M?(c=tme(t,e,b),c>0&&z7(t,e,c,!1,!1),i=cX(t,e,!0,!1)):(z7(t,e,0,!1,b),i=cX(t,e,!0,!1)):M?(g=a(a(rr(t.r,e),19),60)._b(),l=Pbe(t,e),i=l*g+t.u*(g-1),l>0&&z7(t,e,l,!0,!1)):(z7(t,e,0,!0,!1),i=cX(t,e,!0,!0)),RX(t,e)==(G1(),sb)&&(i+=2*t.u),n.a.b=i}function fr(){fr=P,m_t=(Nit(),_c).b,uXt=a(at(Et(_c.b),0),29),jw=a(at(Et(_c.b),1),29),aXt=a(at(Et(_c.b),2),29),qE=_c.bb,a(at(Et(_c.bb),0),29),a(at(Et(_c.bb),1),29),XE=_c.fb,EI=a(at(Et(_c.fb),0),29),a(at(Et(_c.fb),1),29),a(at(Et(_c.fb),2),17),wy=_c.qb,yXt=a(at(Et(_c.qb),0),29),a(at(Et(_c.qb),1),17),a(at(Et(_c.qb),2),17),eU=a(at(Et(_c.qb),3),29),nU=a(at(Et(_c.qb),4),29),TI=a(at(Et(_c.qb),6),29),SI=a(at(Et(_c.qb),5),17),lXt=_c.j,hXt=_c.k,fXt=_c.q,dXt=_c.w,pXt=_c.B,gXt=_c.A,mXt=_c.C,bXt=_c.D,wXt=_c._,vXt=_c.cb,_Xt=_c.hb}function Wye(t,e,n){var i,r,c,l,f,g,b,v,M,k,R;t.c=0,t.b=0,i=2*e.c.a.c.length+1;t:for(M=n.tc();M.hc();){if(v=a(M.ic(),11),f=v.i==(Ht(),Tn)||v.i==fi,R=0,f){if(k=a(z(v,(Ft(),Du)),8),!k)continue;R+=Kwe(t,i,v,k)}else{for(b=new H(v.f);b.a0?(t.f[v.o]=R/(v.d.c.length+v.f.c.length),t.c=y.Math.min(t.c,t.f[v.o]),t.b=y.Math.max(t.b,t.f[v.o])):f&&(t.f[v.o]=R)}}function $ye(t){t.b=null,t.bb=null,t.fb=null,t.qb=null,t.a=null,t.c=null,t.d=null,t.e=null,t.f=null,t.n=null,t.M=null,t.L=null,t.Q=null,t.R=null,t.K=null,t.db=null,t.eb=null,t.g=null,t.i=null,t.j=null,t.k=null,t.gb=null,t.o=null,t.p=null,t.q=null,t.r=null,t.$=null,t.ib=null,t.S=null,t.T=null,t.t=null,t.s=null,t.u=null,t.v=null,t.w=null,t.B=null,t.A=null,t.C=null,t.D=null,t.F=null,t.G=null,t.H=null,t.I=null,t.J=null,t.P=null,t.Z=null,t.U=null,t.V=null,t.W=null,t.X=null,t.Y=null,t._=null,t.ab=null,t.cb=null,t.hb=null,t.nb=null,t.lb=null,t.mb=null,t.ob=null,t.pb=null,t.jb=null,t.kb=null,t.N=!1,t.O=!1}function Vye(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt;if($=e.b.c.length,!($<3)){for(R=dt(Gn,pi,22,$,15,1),M=0,v=new H(e.b);v.al)&&Ir(t.c,a(W.b,14));++f}c=l}}}function Ght(t){var e;switch(t.d){case 1:{if(t.wi())return t.o!=-2;break}case 2:{if(t.wi())return t.o==-2;break}case 3:case 5:case 4:case 6:case 7:return t.o>-2;default:return!1}switch(e=t.vi(),t.p){case 0:return e!=null&<(de(e))!=CT(t.k,0);case 1:return e!=null&&a(e,192).a!=or(t.k)<<24>>24;case 2:return e!=null&&a(e,159).a!=(or(t.k)&qr);case 6:return e!=null&&CT(a(e,149).a,t.k);case 5:return e!=null&&a(e,21).a!=or(t.k);case 7:return e!=null&&a(e,168).a!=or(t.k)<<16>>16;case 3:return e!=null&<(Yt(e))!=t.j;case 4:return e!=null&&a(e,126).a!=t.j;default:return e==null?t.n!=null:!Fi(e,t.n)}}function oZ(t,e){var n,i,r,c;c=t.F,e==null?(t.F=null,mq(t,null)):(t.F=(En(e),e),i=Mf(e,Ca(60)),i!=-1?(r=e.substr(0,i),Mf(e,Ca(46))==-1&&!le(r,aE)&&!le(r,k4)&&!le(r,NO)&&!le(r,L4)&&!le(r,P4)&&!le(r,I4)&&!le(r,R4)&&!le(r,D4)&&(r=DUt),n=jW(e,Ca(62)),n!=-1&&(r+=""+e.substr(n+1,e.length-(n+1))),mq(t,r)):(r=e,Mf(e,Ca(46))==-1&&(i=Mf(e,Ca(91)),i!=-1&&(r=e.substr(0,i)),!le(r,aE)&&!le(r,k4)&&!le(r,NO)&&!le(r,L4)&&!le(r,P4)&&!le(r,I4)&&!le(r,R4)&&!le(r,D4)?(r=DUt,i!=-1&&(r+=""+e.substr(i,e.length-i))):r=e),mq(t,r),r==e&&(t.F=t.D))),t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,5,c,e))}function qye(t){vC();var e,n,i,r,c,l,f;for(f=new sm,n=new H(t);n.a=f.b.c)&&(f.b=e),(!f.c||e.c<=f.c.c)&&(f.d=f.c,f.c=e),(!f.e||e.d>=f.e.d)&&(f.e=e),(!f.f||e.d<=f.f.d)&&(f.f=e);return i=new d7((jM(),Xm)),SL(t,qjt,new ju(Y(Z(M6,1),te,341,0,[i]))),l=new d7(vw),SL(t,Vjt,new ju(Y(Z(M6,1),te,341,0,[l]))),r=new d7(ww),SL(t,$jt,new ju(Y(Z(M6,1),te,341,0,[r]))),c=new d7(Y_),SL(t,Wjt,new ju(Y(Z(M6,1),te,341,0,[c]))),PX(i.c,Xm),PX(r.c,ww),PX(c.c,Y_),PX(l.c,vw),f.a.c=dt(un,te,1,0,5,1),Or(f.a,i.c),Or(f.a,Cm(r.c)),Or(f.a,c.c),Or(f.a,Cm(l.c)),f}function OP(t,e,n){var i,r,c,l;return t.Rj()&&t.Qj()&&(l=M$(t,a(n,51)),zt(l)!==zt(n))?(t.ai(e),t.gi(e,G5t(t,e,l)),t.Dj()&&(c=(r=a(n,42),t.Pj()?t.Nj()?r.Cg(t.b,jo(a(Ve(da(t.b),t.pi()),17)).n,a(Ve(da(t.b),t.pi()).jj(),24).Qi(),null):r.Cg(t.b,xr(r.mg(),jo(a(Ve(da(t.b),t.pi()),17))),null,null):r.Cg(t.b,-1-t.pi(),null,null)),!a(l,42).yg()&&(c=(i=a(l,42),t.Pj()?t.Nj()?i.Ag(t.b,jo(a(Ve(da(t.b),t.pi()),17)).n,a(Ve(da(t.b),t.pi()).jj(),24).Qi(),c):i.Ag(t.b,xr(i.mg(),jo(a(Ve(da(t.b),t.pi()),17))),null,c):i.Ag(t.b,-1-t.pi(),null,c))),c&&c.Th()),Xl(t.b)&&t.ni(t.mi(9,n,l,e,!1)),l):n}function T7t(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t;for(v=lt(Yt(z(t,(qt(),y0)))),i=lt(Yt(z(t,pbt))),k=new Ok,Ct(k,y0,v+i),b=e,nt=e.d,$=e.c.g,rt=e.d.g,W=ql($.c),pt=ql(rt.c),r=new Dt,M=W;M<=pt;M++)f=new Jh(t),jl(f,(Ke(),Hr)),Ct(f,(Ft(),li),b),Ct(f,Qi,(Ls(),Gc)),Ct(f,tF,k),R=a(Ee(t.b,M),26),M==W?W1(f,R.a.c.length-n,R):Ks(f,R),_t=lt(Yt(z(b,up))),_t<0&&(_t=0,Ct(b,up,_t)),f.n.b=_t,O=y.Math.floor(_t/2),l=new Eo,yr(l,(Ht(),on)),ds(l,f),l.k.b=O,g=new Eo,yr(g,Qe),ds(g,f),g.k.b=O,Ts(b,l),c=new Np,Uo(c,b),Ct(c,Ro,null),Hs(c,g),Ts(c,nt),qpe(f,b,c),r.c[r.c.length]=c,b=c;return r}function Xye(t,e){var n,i,r,c,l,f,g,b,v,M;for(t.a=new s4t(vle(bA)),i=new H(e.a);i.a0;){for($=(mi(0,g.c.length),a(g.c[0],14)),r=(mi(0,R.c.length),a(R.c[0],14)),rt=r.d.d,c=nc(rt,r,0),Mce($,r.d,c),Hs(r,null),Ts(r,null),O=$.a,e&&Xi(O,new Oo(pt)),i=qn(r.a,0);i.b!=i.d.c;)n=a(Yn(i),9),Xi(O,new Oo(n));for(nt=$.b,k=new H(r.b);k.a0?RV(this,this.f/this.a):Wh(e.g,e.d[0]).a!=null&&Wh(n.g,n.d[0]).a!=null?RV(this,(lt(Wh(e.g,e.d[0]).a)+lt(Wh(n.g,n.d[0]).a))/2):Wh(e.g,e.d[0]).a!=null?RV(this,Wh(e.g,e.d[0]).a):Wh(n.g,n.d[0]).a!=null&&RV(this,Wh(n.g,n.d[0]).a)}function Wht(t){var e;this.r=Hse(new AR,new _z),this.b=(ts(),new BC(a(si(Ia),274))),this.p=new BC(a(si(Ia),274)),this.i=new BC(a(si(_qt),274)),this.e=t,this.o=new Oo(t.Re()),this.B=t.bf()||lt(de(t.xe((dr(),TF)))),this.v=a(t.xe((dr(),HE)),19),this.w=a(t.xe(kF),19),this.q=a(t.xe(iI),83),this.t=a(t.xe(jQ),275),this.j=a(t.xe(AF),19),this.n=a(fP(t,vVt),119),this.k=lt(Yt(fP(t,PF))),this.d=lt(Yt(fP(t,avt))),this.u=lt(Yt(fP(t,fvt))),this.s=lt(Yt(fP(t,uvt))),this.A=a(fP(t,lvt),135),this.c=2*this.d,e=!this.w.pc((ma(),NF)),this.f=new HC(0,e,0),this.g=new HC(1,e,0),VG(this.f,(Ch(),ta),this.g)}function A7t(t,e){var n,i,r,c,l,f,g,b,v,M,k,R;if(e==null||e.length==0)return null;if(c=a(Zc(t.f,e),27),!c){for(r=(k=new vf(t.d).a.Tb().tc(),new nm(k));r.a.hc();)if(n=(l=a(r.a.ic(),38),a(l.lc(),27)),f=n.f,R=e.length,le(f.substr(f.length-R,R),e)&&(e.length==f.length||bo(f,f.length-e.length-1)==46)){if(c)return null;c=n}if(!c){for(i=(M=new vf(t.d).a.Tb().tc(),new nm(M));i.a.hc();)if(n=(l=a(i.a.ic(),38),a(l.lc(),27)),v=n.g,v!=null){for(g=0,b=v.length;g=1&&(W-l>0&&M>=0?(g.k.a+=$,g.k.b+=c*l):W-l<0&&v>=0&&(g.k.a+=$*W,g.k.b+=c));t.n.a=e.a,t.n.b=e.b,Ct(t,(qt(),Ew),(Ju(),i=a(xu(EA),10),new ja(i,a(cu(i,i.length),10),0)))}function P7t(t,e){var n,i,r,c,l,f,g,b,v,M;for(g=!0,r=0,b=t.f[e.o],v=e.n.b+t.n,n=t.c[e.o][2],Kl(t.a,b,Xt(a(Ee(t.a,b),21).a-1+n)),Kl(t.b,b,lt(Yt(Ee(t.b,b)))-v+n*t.e),++b,b>=t.i?(++t.i,Ut(t.a,Xt(1)),Ut(t.b,v)):(i=t.c[e.o][1],Kl(t.a,b,Xt(a(Ee(t.a,b),21).a+1-i)),Kl(t.b,b,lt(Yt(Ee(t.b,b)))+v-i*t.e)),(t.q==(T_(),H6)&&(a(Ee(t.a,b),21).a>t.j||a(Ee(t.a,b-1),21).a>t.j)||t.q==G6&&(lt(Yt(Ee(t.b,b)))>t.k||lt(Yt(Ee(t.b,b-1)))>t.k))&&(g=!1),l=Rn(Rs(e));Jn(l);)c=a(In(l),14),f=c.c.g,t.f[f.o]==b&&(M=P7t(t,f),r=r+a(M.a,21).a,g=g&<(de(M.b)));return t.f[e.o]=b,r=r+t.c[e.o][0],new zs(Xt(r),(me(),!!g))}function Kye(t){var e,n,i,r,c,l,f,g,b,v;for(b=new Fr,f=new Fr,c=new H(t);c.a-1){for(r=qn(f,0);r.b!=r.d.c;)i=a(Yn(r),125),i.s=l;for(;f.b!=0;)for(i=a(But(f,0),125),n=new H(i.g);n.a-1){for(c=new H(f);c.a0)&&(g.i=cm(g.i,r.i-1),--g.f,g.f==0&&(f.c[f.c.length]=g))}}function R7t(t,e){var n,i,r,c,l,f,g,b;if(!(e.b==null||t.b==null)){for(E_(t),h4(t),E_(e),h4(e),n=dt(Gn,pi,22,t.b.length+e.b.length,15,1),b=0,i=0,l=0;i=f&&r<=g)f<=r&&c<=g?(n[b++]=r,n[b++]=c,i+=2):f<=r?(n[b++]=r,n[b++]=g,t.b[i]=g+1,l+=2):c<=g?(n[b++]=f,n[b++]=c,i+=2):(n[b++]=f,n[b++]=g,t.b[i]=g+1);else if(gt.j&&(t.q=H6,sE(t,c));break;case 4:for(t.q=(T_(),rF),sE(t,c),b=0,r=new H(t.b);r.at.k&&(t.q=G6,sE(t,c));break;case 6:k=Tr(y.Math.ceil(t.f.length*v/100)),sE(t,new Q8(k));break;case 5:M=Tr(y.Math.ceil(t.d*v/100)),sE(t,new V3(M));break;default:sE(t,c)}Ewe(t,e),Vn(n)}function n2e(t){var e,n,i,r,c,l,f;for(e=new Dt,t.g=new Dt,t.d=new Dt,l=new qg(new xp(t.f.b).a);l.b;)c=Sm(l),Ut(e,a(a(c.lc(),48).b,80)),jv(a(c.kc(),536).Je())?Ut(t.d,a(c.lc(),48)):Ut(t.g,a(c.lc(),48));for(Pq(t,t.d),Pq(t,t.g),t.c=new N9t(t.b),qQt(t.c,(Wit(),Ujt)),Cq(t,t.d),Cq(t,t.g),Or(e,t.c.a.b),t.e=new We(is,is),t.a=new We(Ps,Ps),i=new H(e);i.aY1)&&f<10);Oit(t.c,new l3),D7t(t),ise(t.c),Zye(t.f)}function D7t(t){var e,n,i,r,c,l,f;for(e=0,c=new H(t.b.a);c.a=2){for(g=qn(n,0),l=a(Yn(g),9),f=a(Yn(g),9);f.a0&&(f=y.Math.max(f,NPt(t.A.b+i.d.b,r))),M=i,k=r,R=c;t.A&&t.A.c>0&&(O=R+t.A.c,v&&(O+=M.d.c),f=y.Math.max(f,(Ef(),I1(yd),y.Math.abs(k-1)<=yd||k==1||isNaN(k)&&isNaN(1)?0:O/(1-k)))),n.n.b=0,n.a.a=f}function O7t(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$;if(n=a(js(t.b,e),114),b=a(a(rr(t.r,e),19),60),b.Wb()){n.n.d=0,n.n.a=0;return}for(l=t.v.pc((Ju(),E0)),$=t.w.pc((ma(),Fx)),v=t.t==(Kh(),cb),f=0,g=b.tc(),M=null,R=0,k=0;g.hc();)i=a(g.ic(),111),c=lt(Yt(i.b.xe((gD(),zF)))),r=i.b.Re().b,l&&z7(t,e,0,v,!v&&$),M?(O=k+M.d.a+t.u+i.d.d,f=y.Math.max(f,(Ef(),I1(yd),y.Math.abs(R-c)<=yd||R==c||isNaN(R)&&isNaN(c)?0:O/(c-R)))):t.A&&t.A.d>0&&(f=y.Math.max(f,NPt(t.A.d+i.d.d,c))),M=i,R=c,k=r;t.A&&t.A.a>0&&(O=k+t.A.a,v&&(O+=M.d.a),f=y.Math.max(f,(Ef(),I1(yd),y.Math.abs(R-1)<=yd||R==1||isNaN(R)&&isNaN(1)?0:O/(1-R)))),n.n.d=0,n.a.b=f}function c2e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt;return k=t.c[e],R=t.c[n],O=a(z(k,(Ft(),yx)),15),!!O&&O._b()!=0&&O.pc(R)||($=k.j!=(Ke(),Hr)&&R.j!=Hr,W=a(z(k,DE),8),nt=a(z(R,DE),8),rt=W!=nt,pt=!!W&&W!=k||!!nt&&nt!=R,_t=Kq(k,(Ht(),Tn)),It=Kq(R,fi),pt=pt|(Kq(k,fi)||Kq(R,Tn)),Gt=pt&&rt||_t||It,$&&Gt)||k.j==(Ke(),uc)&&R.j==gs||R.j==(Ke(),uc)&&k.j==gs?!1:(v=t.c[e],c=t.c[n],r=JRt(t.e,v,c,(Ht(),on)),g=JRt(t.i,v,c,Qe),Ube(t.f,v,c),b=D6t(t.b,v,c)+a(r.a,21).a+a(g.a,21).a+t.f.d,f=D6t(t.b,c,v)+a(r.b,21).a+a(g.b,21).a+t.f.b,t.a&&(M=a(z(v,li),11),l=a(z(c,li),11),i=jRt(t.g,M,l),b+=a(i.a,21).a,f+=a(i.b,21).a),b>f)}function B7t(t,e,n){var i,r,c,l,f,g,b,v,M;if(t.a!=e.Pi())throw K(new yn(_E+e.be()+Gm));if(i=jp((Qa(),eo),e).kk(),i)return i.Pi().dh().Zg(i,n);if(l=jp(eo,e).mk(),l){if(n==null)return null;if(f=a(n,15),f.Wb())return"";for(M=new Sp,c=f.tc();c.hc();)r=c.ic(),mo(M,l.Pi().dh().Zg(l,r)),M.a+=" ";return B9(M,M.a.length-1)}if(v=jp(eo,e).nk(),!v.Wb()){for(b=v.tc();b.hc();)if(g=a(b.ic(),140),g.Li(n))try{if(M=g.Pi().dh().Zg(g,n),M!=null)return M}catch(k){if(k=vr(k),!ct(k,104))throw K(k)}throw K(new yn("Invalid value: '"+n+"' for datatype :"+e.be()))}return a(e,737).Ui(),n==null?null:ct(n,159)?""+a(n,159).a:fu(n)==tB?oSt(AA[0],a(n,181)):Yc(n)}function a2e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W;for(di(n,MBt,1),Qjt=lt(de(z(e,(qt(),K4)))),t.c=e,O=new Dt,f=new H(e.b);f.aW){for($=1,r=b.n.a;r>g;)++$,r=(b.n.a-($-1)*t.d)/$;Ut(i,new cAt(t,b,$))}for(v=new H(i);v.ab?0:b),1),l),t.c[i.a.d])),ih($l(Wl(Vl(Gl(new cl,0>-b?0:-b),1),l),t.c[f.a.d]))):(k=1,(ct(i.g,153)&&ct(f.g,8)||ct(f.g,153)&&ct(i.g,8))&&(k=2),ih($l(Wl(Vl(Gl(new cl,Tr(c)),k),t.c[i.a.d]),t.c[f.a.d]))))}function l2e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$;for(n=a(z(t,(qt(),Qi)),83),l=t.e,c=t.d,f=l.a+c.b+c.c,g=0-c.d-t.c.b,v=l.b+c.d+c.a-t.c.b,b=new Dt,M=new Dt,r=new H(e);r.a0),a(v.a.cd(v.c=--v.b),14));c!=i&&v.b>0;)t.a[c.o]=!0,t.a[i.o]=!0,c=(Hn(v.b>0),a(v.a.cd(v.c=--v.b),14));v.b>0&&Th(v)}}function f2e(t){t.q||(t.q=!0,t.p=cc(t,0),t.a=cc(t,1),nr(t.a,0),t.f=cc(t,2),nr(t.f,1),Cr(t.f,2),t.n=cc(t,3),Cr(t.n,3),Cr(t.n,4),Cr(t.n,5),Cr(t.n,6),t.g=cc(t,4),nr(t.g,7),Cr(t.g,8),t.c=cc(t,5),nr(t.c,7),nr(t.c,8),t.i=cc(t,6),nr(t.i,9),nr(t.i,10),nr(t.i,11),nr(t.i,12),Cr(t.i,13),t.j=cc(t,7),nr(t.j,9),t.d=cc(t,8),nr(t.d,3),nr(t.d,4),nr(t.d,5),nr(t.d,6),Cr(t.d,7),Cr(t.d,8),Cr(t.d,9),Cr(t.d,10),t.b=cc(t,9),Cr(t.b,0),Cr(t.b,1),t.e=cc(t,10),Cr(t.e,1),Cr(t.e,2),Cr(t.e,3),Cr(t.e,4),nr(t.e,5),nr(t.e,6),nr(t.e,7),nr(t.e,8),nr(t.e,9),nr(t.e,10),Cr(t.e,11),t.k=cc(t,11),Cr(t.k,0),Cr(t.k,1),t.o=yi(t,12),t.s=yi(t,13))}function d2e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt;for(di(e,"Interactive crossing minimization",1),l=0,c=new H(t.b);c.a0&&(n+=g.k.a+g.n.a/2,++M),O=new H(g.i);O.a=f&&r<=g)f<=r&&c<=g?i+=2:f<=r?(t.b[i]=g+1,l+=2):c<=g?(n[b++]=r,n[b++]=f-1,i+=2):(n[b++]=r,n[b++]=f-1,t.b[i]=g+1,l+=2);else if(g0),l.a.cd(l.c=--l.b),cd(l,i),vM(b,i),I7(i,g.i),kM(b),kM(b),r.a.$b(i)!=null}}function m2e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W;for(di(e,"Spline SelfLoop pre-processing.",1),b=new qa,M=new H(t.a);M.a0?r-=864e5:r+=864e5,g=new sst(so(Ka(e.q.getTime()),r))),v=new Bb,b=t.a.length,c=0;c=97&&i<=122||i>=65&&i<=90){for(l=c+1;l=b)throw K(new yn("Missing trailing '"));l+1=14&&b<=16))?e.a.Qb(i)?(n.a?Ii(n.a,n.b):n.a=new ll(n.d),b2(n.a,"[...]")):(l=s_(i),g=new dL(e),$g(n,U7t(l,g))):ct(i,221)?$g(n,t0e(a(i,221))):ct(i,173)?$g(n,Zge(a(i,173))):ct(i,176)?$g(n,cge(a(i,176))):ct(i,1697)?$g(n,Qge(a(i,1697))):ct(i,37)?$g(n,Jge(a(i,37))):ct(i,378)?$g(n,c0e(a(i,378))):ct(i,736)?$g(n,Kge(a(i,736))):ct(i,106)&&$g(n,Yge(a(i,106))):$g(n,i==null?tu:Yc(i));return n.a?n.e.length==0?n.a.a:n.a.a+(""+n.e):n.c}function v2e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$;if(lt(de(z(n,(qt(),ny)))))for(f=new H(n.i);f.a1))););(f>0||k==(Kh(),cb)&&(!c.n&&(c.n=new Wt(ic,c,1,7)),c.n).i>0)&&(g=!0),f>1&&(b=!0)}g&&e.nc((So(),Al)),b&&e.nc((So(),q4))}function z7t(t,e,n){var i,r,c;return r=new Wht(t),Abe(r,n),mNt(r,!1),pd(r.e.We(),new Trt(r,!1)),J$(r,r.f,(Ch(),lc),(Ht(),Tn)),J$(r,r.f,hc,fi),J$(r,r.g,lc,on),J$(r,r.g,hc,Qe),mIt(r,Tn),mIt(r,fi),QCt(r,Qe),QCt(r,on),Fg(),i=r.v.pc((Ju(),ub))&&r.w.pc((ma(),SA))?but(r):null,i&&ste(r.a,i),Rwe(r),hpe(r),fpe(r),y2e(r),ave(r),Ope(r),zq(r,Tn),zq(r,fi),ove(r),$_e(r),e&&(_fe(r),Bpe(r),zq(r,Qe),zq(r,on),c=r.w.pc((ma(),TA)),p9t(r,c,Tn),p9t(r,c,fi),g9t(r,c,Qe),g9t(r,c,on),qc(new gi(null,new Ei(new vf(r.i),0)),new xz),qc(wo(new gi(null,Pot(r.r).wc()),new kR),new LR),F1e(r),r.e.Ue(r.o),qc(new gi(null,Pot(r.r).wc()),new D3)),r.o}function E2e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O;for(di(e,"Spline SelfLoop positioning",1),v=a(z(t,(qt(),$mt)),345),b=new H(t.b);b.a2?(v=new Dt,Or(v,new C1(nt,1,nt.b)),c=gOt(v,pt+t.a),rt=new CX(c),Uo(rt,e),n.c[n.c.length]=rt):i?rt=a(zi(t.b,n0(e)),247):rt=a(zi(t.b,Dm(e)),247),g=n0(e),i&&(g=Dm(e)),l=bge(W,g),b=pt+t.a,l.a?(b+=y.Math.abs(W.b-M.b),$=new We(M.a,(M.b+W.b)/2)):(b+=y.Math.abs(W.a-M.a),$=new We((M.a+W.a)/2,M.b)),i?wr(t.d,e,new Dut(rt,l,$,b)):wr(t.c,e,new Dut(rt,l,$,b)),wr(t.b,e,rt),O=(!e.n&&(e.n=new Wt(ic,e,1,7)),e.n),R=new $n(O);R.e!=R.i._b();)k=a(ci(R),137),r=AP(t,k,!0,0,0),n.c[n.c.length]=r}function T2e(){bi(gy,new Uz),bi(Ui,new qR),bi(Dl,new KR),bi(cf,new QR),bi(utt,new Vz),bi(YF,new t8),bi(Qp,new e8),bi(CA,new td),bi(bI,new Wk),bi(itt,new GR),bi(Nw,new $k),bi(ph,new Oz),bi(of,new Vk),bi(Fw,new oo),bi(Uw,new Bz),bi(Ra,new Fz),bi(Bw,new U3),bi(Dc,new WR),bi(Do,new zz),bi(wu,new yp),bi(ho,new jz),bi(Z(Da,1),new ZS),bi(px,new qk),bi(U4,new $R),bi(tB,new VR),bi(C_t,new Fd),bi(To,new Lb),bi(Hvt,new Xk),bi($vt,new YS),bi(p_t,new XR),bi(KF,new Zk),bi(CE,new ZR),bi(Io,new Yk),bi(h1t,new Kk),bi(Vm,new Pb),bi(f1t,new Hz),bi(l_t,new Ib),bi(A_t,new YR),bi(qm,new Jk),bi(At,new Gz),bi(Wvt,new Wz),bi(k_t,new $z)}function C2e(t){var e,n,i,r,c,l,f,g;for(e=null,i=new H(t);i.a0&&n.c==0&&(!e&&(e=new Dt),e.c[e.c.length]=n);if(e)for(;e.c.length!=0;){if(n=a(Em(e,0),205),n.b&&n.b.c.length>0){for(c=(!n.b&&(n.b=new Dt),new H(n.b));c.anc(t,n,0))return new zs(r,n)}else if(lt(Wh(r.g,r.d[0]).a)>lt(Wh(n.g,n.d[0]).a))return new zs(r,n)}for(f=(!n.e&&(n.e=new Dt),n.e).tc();f.hc();)l=a(f.ic(),205),g=(!l.b&&(l.b=new Dt),l.b),t_(0,g.c.length),z5(g.c,0,n),l.c==g.c.length&&(e.c[e.c.length]=l)}return null}function A2e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$;for(di(e,"Label dummy insertions",1),M=new Dt,l=lt(Yt(z(t,(qt(),F6)))),b=lt(Yt(z(t,kx))),v=a(z(t,ch),110),R=new H(t.a);R.a>16==-10?n=a(t.Cb,268).zj(e,n):t.Db>>16==-15&&(!e&&(e=(ye(),Hf)),!b&&(b=(ye(),Hf)),t.Cb.Hg()&&(g=new Qd(t.Cb,1,13,b,e,Hp(Ya(a(t.Cb,53)),t),!1),n?n.Sh(g):n=g));else if(ct(t.Cb,96))t.Db>>16==-23&&(ct(e,96)||(e=(ye(),gh)),ct(b,96)||(b=(ye(),gh)),t.Cb.Hg()&&(g=new Qd(t.Cb,1,10,b,e,Hp(kc(a(t.Cb,24)),t),!1),n?n.Sh(g):n=g));else if(ct(t.Cb,411))for(f=a(t.Cb,742),l=(!f.b&&(f.b=new dT(new zG)),f.b),c=(i=new qg(new xp(l.a).a),new pT(i));c.a.b;)r=a(Sm(c.a).kc(),84),n=cE(r,O7(r,f),n)}return n}function L2e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W;for(di(n,"Depth-first cycle removal",1),v=e.a,$=v.c.length,t.a=dt(Gn,pi,22,$,15,1),Vxt(t.a),t.b=dt(Gn,pi,22,$,15,1),Vxt(t.b),l=0,b=new H(v);b.a=0){for(g=null,f=new Gs(v.a,b+1);f.b=b.c.c.length?v=wct((Ke(),gs),Hr):v=wct((Ke(),Hr),Hr),v*=2,c=n.a.g,n.a.g=y.Math.max(c,c+(v-c)),l=n.b.g,n.b.g=y.Math.max(l,l+(v-l)),r=e}}function V7t(t,e){var n,i,r,c,l,f,g,b,v;for(l=a(a(rr(t.r,e),19),60),v=l._b()==2||l._b()>2&&t.w.pc((ma(),Fx)),c=l.tc();c.hc();)if(r=a(c.ic(),111),!(!r.c||r.c.d.c.length<=0)){switch(b=r.b.Re(),f=r.c,g=f.i,g.b=(i=f.n,f.e.a+i.b+i.c),g.a=(n=f.n,f.e.b+n.d+n.a),e.g){case 1:v?(g.c=-g.b-t.s,Cf(f,(hu(),fh))):(g.c=b.a+t.s,Cf(f,(hu(),jf))),g.d=-g.a-t.s,qd(f,(Ha(),dh));break;case 3:v?(g.c=-g.b-t.s,Cf(f,(hu(),fh))):(g.c=b.a+t.s,Cf(f,(hu(),jf))),g.d=b.b+t.s,qd(f,(Ha(),Fh));break;case 2:g.c=b.a+t.s,v?(g.d=-g.a-t.s,qd(f,(Ha(),dh))):(g.d=b.b+t.s,qd(f,(Ha(),Fh))),Cf(f,(hu(),jf));break;case 4:g.c=-g.b-t.s,v?(g.d=-g.a-t.s,qd(f,(Ha(),dh))):(g.d=b.b+t.s,qd(f,(Ha(),Fh))),Cf(f,(hu(),fh))}v=!1}}function K7(t,e){var n;if(t.e)throw K(new yc((Vd(DK),qZ+DK.k+XZ)));if(!Ate(t.a,e))throw K(new sc(ZOt+e+YOt));if(e==t.d)return t;switch(n=t.d,t.d=e,n.g){case 0:switch(e.g){case 2:Rm(t);break;case 1:F1(t),Rm(t);break;case 4:w_(t),Rm(t);break;case 3:w_(t),F1(t),Rm(t)}break;case 2:switch(e.g){case 1:F1(t),UX(t);break;case 4:w_(t),Rm(t);break;case 3:w_(t),F1(t),Rm(t)}break;case 1:switch(e.g){case 2:F1(t),UX(t);break;case 4:F1(t),w_(t),Rm(t);break;case 3:F1(t),w_(t),F1(t),Rm(t)}break;case 4:switch(e.g){case 2:w_(t),Rm(t);break;case 1:w_(t),F1(t),Rm(t);break;case 3:F1(t),UX(t)}break;case 3:switch(e.g){case 2:F1(t),w_(t),Rm(t);break;case 1:F1(t),w_(t),F1(t),Rm(t);break;case 4:F1(t),UX(t)}}return t}function L_(t,e){var n;if(t.d)throw K(new yc((Vd(JK),qZ+JK.k+XZ)));if(!Cte(t.a,e))throw K(new sc(ZOt+e+YOt));if(e==t.c)return t;switch(n=t.c,t.c=e,n.g){case 0:switch(e.g){case 2:Xg(t);break;case 1:U1(t),Xg(t);break;case 4:v_(t),Xg(t);break;case 3:v_(t),U1(t),Xg(t)}break;case 2:switch(e.g){case 1:U1(t),zX(t);break;case 4:v_(t),Xg(t);break;case 3:v_(t),U1(t),Xg(t)}break;case 1:switch(e.g){case 2:U1(t),zX(t);break;case 4:U1(t),v_(t),Xg(t);break;case 3:U1(t),v_(t),U1(t),Xg(t)}break;case 4:switch(e.g){case 2:v_(t),Xg(t);break;case 1:v_(t),U1(t),Xg(t);break;case 3:U1(t),zX(t)}break;case 3:switch(e.g){case 2:U1(t),v_(t),Xg(t);break;case 1:U1(t),v_(t),U1(t),Xg(t);break;case 4:U1(t),zX(t)}}return t}function q7t(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt;for(r=new Dt,O=new H(e.a);O.ant?g:nt,pt=new H(v.i);pt.a=b&&It>=W&&(k+=O.k.b+$.k.b+$.a.b-_t,++f));if(n)for(l=new H(rt.d);l.a=b&&It>=W&&(k+=O.k.b+$.k.b+$.a.b-_t,++f))}f>0&&(Gt+=k/f,++R)}R>0?(e.a=r*Gt/R,e.i=R):(e.a=0,e.i=0)}function j2e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt;for(t.e=e,f=_me(e),Gt=new Dt,i=new H(f);i.a0&&(M.d+=b.n.d,M.d+=b.d),M.a>0&&(M.a+=b.n.a,M.a+=b.d),M.b>0&&(M.b+=b.n.b,M.b+=b.d),M.c>0&&(M.c+=b.n.c,M.c+=b.d),M}function q2e(t,e,n){var i;if(di(n,"StretchWidth layering",1),e.a.c.length==0){Vn(n);return}for(t.c=e,t.t=0,t.u=0,t.i=is,t.g=Ps,t.d=lt(Yt(z(e,(qt(),nf)))),Ude(t),eme(t),gge(t),u1e(t),Nfe(t),t.i=y.Math.max(1,t.i),t.g=y.Math.max(1,t.g),t.d=t.d/t.i,t.f=t.g/t.i,t.s=Khe(t),i=new dl(t.c),Ut(t.c.b,i),t.r=fd(t.p),t.n=iN(t.k,t.k.length);t.r.c.length!=0;)t.o=mhe(t),!t.o||x6t(t)&&t.b.a._b()!=0?(tpe(t,i),i=new dl(t.c),Ut(t.c.b,i),yo(t.a,t.b),t.b.a.Pb(),t.t=t.u,t.u=0):x6t(t)?(t.c.b.c=dt(un,te,1,0,5,1),i=new dl(t.c),Ut(t.c.b,i),t.t=0,t.u=0,t.b.a.Pb(),t.a.a.Pb(),++t.f,t.r=fd(t.p),t.n=iN(t.k,t.k.length)):(Ks(t.o,i),Lc(t.r,t.o),Ir(t.b,t.o),t.t=t.t-t.k[t.o.o]*t.d+t.j[t.o.o],t.u+=t.e[t.o.o]*t.d);e.a.c=dt(un,te,1,0,5,1),QC(e.b),Vn(n)}function Z7t(t){var e,n,i,r,c,l,f,g,b,v,M,k,R,O,$,W;for(O=new H(t);O.a0&&(t.a[e.c.o][e.o].d+=pu(t.f,24)*VP*.07000000029802322-.03500000014901161,t.a[e.c.o][e.o].a=t.a[e.c.o][e.o].d/t.a[e.c.o][e.o].b)}}function X2e(t,e,n,i,r){var c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn;Te=zi(t.e,i),Te==null&&(Te=new _T,R=a(Te,191),rt=e+"_s",pt=rt+r,k=new S2(pt),P1(R,Df,k)),ae=a(Te,191),C2(n,ae),Bn=new _T,zg(Bn,"x",i.j),zg(Bn,"y",i.k),P1(ae,jFt,Bn),Zt=new _T,zg(Zt,"x",i.b),zg(Zt,"y",i.c),P1(ae,"endPoint",Zt),M=O9((!i.a&&(i.a=new Ss(sf,i,5)),i.a)),O=!M,O&&(Gt=new Rg,c=new dG(Gt),vo((!i.a&&(i.a=new Ss(sf,i,5)),i.a),c),P1(ae,eK,Gt)),g=Vq(i),_t=!!g,_t&&dlt(t.a,ae,Opt,bX(t,Vq(i))),nt=qq(i),It=!!nt,It&&dlt(t.a,ae,Npt,bX(t,qq(i))),b=(!i.e&&(i.e=new pn(os,i,10,9)),i.e).i==0,$=!b,$&&(ce=new Rg,l=new cEt(t,ce),vo((!i.e&&(i.e=new pn(os,i,10,9)),i.e),l),P1(ae,Fpt,ce)),v=(!i.g&&(i.g=new pn(os,i,9,10)),i.g).i==0,W=!v,W&&(Me=new Rg,f=new aEt(t,Me),vo((!i.g&&(i.g=new pn(os,i,9,10)),i.g),f),P1(ae,Bpt,Me))}function J7(t){var e,n,i,r,c,l,f,g,b,v,M;if(t==null)throw K(new yf(tu));if(b=t,c=t.length,g=!1,c>0&&(e=t.charCodeAt(0),(e==45||e==43)&&(t=t.substr(1,t.length-1),--c,g=e==45)),c==0)throw K(new yf(Um+b+'"'));for(;t.length>0&&t.charCodeAt(0)==48;)t=t.substr(1,t.length-1),--c;if(c>(HNt(),Bzt)[10])throw K(new yf(Um+b+'"'));for(r=0;r0&&(M=-XEt(t.substr(0,i),10),t=t.substr(i,t.length-i),c-=i,n=!1);c>=l;){if(i=XEt(t.substr(0,l),10),t=t.substr(l,t.length-l),c-=l,n)n=!1;else{if(Pc(M,f)<0)throw K(new yf(Um+b+'"'));M=Zg(M,v)}M=Yg(M,i)}if(Pc(M,0)>0)throw K(new yf(Um+b+'"'));if(!g&&(M=DM(M),Pc(M,0)<0))throw K(new yf(Um+b+'"'));return M}function Z2e(t,e,n,i,r){var c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te;for(pt=0,O=0,R=0,k=1,rt=new $n((!t.a&&(t.a=new Wt(zr,t,10,11)),t.a));rt.e!=rt.i._b();)W=a(ci(rt),35),k+=Dp(Af(W)),ce=W.g,O=y.Math.max(O,ce),M=W.f,R=y.Math.max(R,M),pt+=ce*M;for($=(!t.a&&(t.a=new Wt(zr,t,10,11)),t.a).i,l=pt+2*i*i*k*$,c=y.Math.sqrt(l),g=y.Math.max(c*n,O),f=y.Math.max(c/n,R),nt=new $n((!t.a&&(t.a=new Wt(zr,t,10,11)),t.a));nt.e!=nt.i._b();)W=a(ci(nt),35),ae=r.b+(pu(e,26)*d4+pu(e,27)*p4)*(g-W.g),Te=r.b+(pu(e,26)*d4+pu(e,27)*p4)*(f-W.f),th(W,ae),eh(W,Te);for(Zt=g+(r.b+r.c),Gt=f+(r.d+r.a),It=new $n((!t.a&&(t.a=new Wt(zr,t,10,11)),t.a));It.e!=It.i._b();)for(_t=a(ci(It),35),v=Rn(Af(_t));Jn(v);)b=a(In(v),105),t4(b)||h3e(b,e,Zt,Gt);Zt+=r.b+r.c,Gt+=r.d+r.a,P_(t,Zt,Gt,!1,!0)}function Y2e(t,e,n,i){var r,c,l,f,g,b,v,M,k,R,O,$,W,nt;if($=t.k,W=t.n,k=t.d,e){for(M=i/2*(e._b()-1),R=0,b=e.tc();b.hc();)f=a(b.ic(),8),M+=f.n.a,R=y.Math.max(R,f.n.b);for(nt=$.a-(M-W.a)/2,l=$.b-k.d+R,r=W.a/(e._b()+1),c=r,g=e.tc();g.hc();)f=a(g.ic(),8),f.k.a=nt,f.k.b=l-f.n.b,nt+=f.n.a+i/2,v=yDt(f),v.k.a=f.n.a/2-v.a.a,v.k.b=f.n.b,O=a(z(f,(Ft(),FB)),11),O.d.c.length+O.f.c.length==1&&(O.k.a=c-O.a.a,O.k.b=0,ds(O,t)),c+=r}if(n){for(M=i/2*(n._b()-1),R=0,b=n.tc();b.hc();)f=a(b.ic(),8),M+=f.n.a,R=y.Math.max(R,f.n.b);for(nt=$.a-(M-W.a)/2,l=$.b+W.b+k.a-R,r=W.a/(n._b()+1),c=r,g=n.tc();g.hc();)f=a(g.ic(),8),f.k.a=nt,f.k.b=l,nt+=f.n.a+i/2,v=yDt(f),v.k.a=f.n.a/2-v.a.a,v.k.b=0,O=a(z(f,(Ft(),FB)),11),O.d.c.length+O.f.c.length==1&&(O.k.a=c-O.a.a,O.k.b=W.b,ds(O,t)),c+=r}}function K2e(t,e){var n,i,r,c,l,f,g,b,v,M,k;for(r=new H(t.a.b);r.aPs||e.o==x0&&v0&&th(nt,_t*Gt),It>0&&eh(nt,It*Zt);for(YV(t.b,new Mr),e=new Dt,f=new qg(new xp(t.c).a);f.b;)l=Sm(f),i=a(l.kc(),105),n=a(l.lc(),363).a,r=C_(i,!1,!1),M=b8t(n0(i),bP(r),n),RP(M,r),pt=E8t(i),pt&&nc(e,pt,0)==-1&&(e.c[e.c.length]=pt,x4t(pt,(Hn(M.b!=0),a(M.a.a.c,9)),n));for(W=new qg(new xp(t.d).a);W.b;)$=Sm(W),i=a($.kc(),105),n=a($.lc(),363).a,r=C_(i,!1,!1),M=b8t(Dm(i),PC(bP(r)),n),M=PC(M),RP(M,r),pt=S8t(i),pt&&nc(e,pt,0)==-1&&(e.c[e.c.length]=pt,x4t(pt,(Hn(M.b!=0),a(M.c.b.c,9)),n))}function nxe(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt;for(di(e,"Inverted port preprocessing",1),b=t.b,g=new Gs(b,0),n=null,rt=new Dt;g.b0&&(a(js(t.b,e),114).a.b=n)}function ixe(t,e,n,i,r){var c,l,f,g,b,v,M,k,R,O,$,W,nt;switch(k=IC(t.i),O=IC(e.i),R=sr(Xc(t.k),t.a),$=sr(Xc(e.k),e.a),g=sr(new We(R.a,R.b),hl(new Jv(k),1.3*n)),W=sr(new We($.a,$.b),hl(new Jv(O),1.3*i)),f=y.Math.abs(g.a-W.a),fr+2&&JV(t.charCodeAt(r+1),qvt,Xvt)&&JV(t.charCodeAt(r+2),qvt,Xvt))if(n=mre(t.charCodeAt(r+1),t.charCodeAt(r+2)),r+=2,i>0?(n&192)==128?e[f++]=n<<24>>24:i=0:n>=128&&((n&224)==192?(e[f++]=n<<24>>24,i=2):(n&240)==224?(e[f++]=n<<24>>24,i=3):(n&248)==240&&(e[f++]=n<<24>>24,i=4)),i>0){if(f==i){switch(f){case 2:{S1(g,((e[0]&31)<<6|e[1]&63)&qr);break}case 3:{S1(g,((e[0]&15)<<12|(e[1]&63)<<6|e[2]&63)&qr);break}}f=0,i=0}}else{for(c=0;c0&&Ut(t.p,v),Ut(t.o,v);e-=i,R=g+e,b+=e*t.e,Kl(t.a,f,Xt(R)),Kl(t.b,f,b),t.j=Mh(t.j,R),t.k=y.Math.max(t.k,b),t.d+=e,e+=$}}function J7t(){J7t=P;var t,e,n;for(new IL(1,0),new IL(10,0),new IL(0,0),Fzt=dt(LK,wt,216,11,0,1),b0=dt(nl,Pf,22,100,15,1),D1t=Y(Z(Os,1),Xo,22,15,[1,5,25,125,625,3125,15625,78125,390625,1953125,9765625,48828125,244140625,1220703125,6103515625,30517578125,152587890625,762939453125,3814697265625,19073486328125,95367431640625,476837158203125,0x878678326eac9]),N1t=dt(Gn,pi,22,D1t.length,15,1),O1t=Y(Z(Os,1),Xo,22,15,[1,10,100,hw,$P,jZ,1e6,1e7,1e8,sO,1e10,1e11,1e12,1e13,1e14,1e15,1e16]),B1t=dt(Gn,pi,22,O1t.length,15,1),F1t=dt(LK,wt,216,11,0,1),t=0;t1)for(R=new Nht(O,pt,i),vo(pt,new JMt(t,R)),l.c[l.c.length]=R,M=pt.a.Xb().tc();M.hc();)v=a(M.ic(),48),Lc(c,v.b);if(f.a._b()>1)for(R=new Nht(O,f,i),vo(f,new QMt(t,R)),l.c[l.c.length]=R,M=f.a.Xb().tc();M.hc();)v=a(M.ic(),48),Lc(c,v.b)}}function oxe(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O;for(di(e,"Label dummy switching",1),M=a(z(t,(qt(),XB)),276),i=a(hd(wo(Yh(new gi(null,new Ei(t.b,16)),new b3),new AS),OC(new Pe,new ge,new pr,Y(Z(tf,1),jt,150,0,[(z1(),Qh)]))),15),l=M==(XC(),bJ)||M==pJ?rpe(t):null,c=i.tc();c.hc();){switch(r=a(c.ic(),8),n=Pde(r),!n&&(n=M),f=Qde(r),v=Ede(r),k=null,n.g){case 2:k=Nge(r,l,f,v);break;case 0:k=(R=f.a._b()+v.c.length+1,O=(R-1)/2|0,Of.a._b()?a(Ee(v,O-f.a._b()-1),8):null);break;case 1:k=K0e(r,l,f,v);break;case 4:xIt(r,n),k=(b=lut(r),b?f.a._b()==0?null:a(f.a.cd(oC(f,0)),8):v.c.length==0?null:a(Ee(v,v.c.length-1),8));break;case 3:xIt(r,n),k=(g=lut(r),g?v.c.length==0?null:a(Ee(v,v.c.length-1),8):f.a._b()==0?null:a(f.a.cd(oC(f,0)),8))}k&&Pye(r,k),sde(r)}Vn(e)}function Xht(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt;if(k=e.length,k>0&&(g=e.charCodeAt(0),g!=64)){if(g==37&&(M=e.lastIndexOf("%"),b=!1,M!=0&&(M==k-1||(b=e.charCodeAt(M+1)==46)))){if(l=e.substr(1,M-1),pt=le("%",l)?null:qht(l),i=0,b)try{i=ku(e.substr(M+2,e.length-(M+2)),Vs,qi)}catch(_t){throw _t=vr(_t),ct(_t,118)?(f=_t,K(new TN(f))):K(_t)}for(W=vat(t.pg());W.hc();)if(O=UN(W),ct(O,469)&&(r=a(O,609),rt=r.d,(pt==null?rt==null:le(pt,rt))&&i--==0))return r;return null}if(v=e.lastIndexOf("."),R=v==-1?e:e.substr(0,v),n=0,v!=-1)try{n=ku(e.substr(v+1,e.length-(v+1)),Vs,qi)}catch(_t){if(_t=vr(_t),ct(_t,118))R=e;else throw K(_t)}for(R=le("%",R)?null:qht(R),$=vat(t.pg());$.hc();)if(O=UN($),ct(O,174)&&(c=a(O,174),nt=c.be(),(R==null?nt==null:le(R,nt))&&n--==0))return c;return null}return v7t(t,e)}function cxe(t){Iht();var e,n,i,r,c,l,f,g,b,v,M,k,R,O,$,W;if(t==null)return null;if(M=t.length*8,M==0)return"";for(f=M%24,R=M/24|0,k=f!=0?R+1:R,c=dt(nl,Pf,22,k*4,15,1),l=0,r=0,g=0;g>24,b=(e&3)<<24>>24,O=e&-128?(e>>2^192)<<24>>24:e>>2<<24>>24,$=n&-128?(n>>4^240)<<24>>24:n>>4<<24>>24,W=i&-128?(i>>6^252)<<24>>24:i>>6<<24>>24,c[l++]=t1[O],c[l++]=t1[$|b<<4],c[l++]=t1[v<<2|W],c[l++]=t1[i&63];return f==8?(e=t[r],b=(e&3)<<24>>24,O=e&-128?(e>>2^192)<<24>>24:e>>2<<24>>24,c[l++]=t1[O],c[l++]=t1[b<<4],c[l++]=61,c[l++]=61):f==16&&(e=t[r],n=t[r+1],v=(n&15)<<24>>24,b=(e&3)<<24>>24,O=e&-128?(e>>2^192)<<24>>24:e>>2<<24>>24,$=n&-128?(n>>4^240)<<24>>24:n>>4<<24>>24,c[l++]=t1[O],c[l++]=t1[$|b<<4],c[l++]=t1[v<<2],c[l++]=61),ml(c,0,c.length)}function axe(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te;for(Gt=e.a.c,b=e.a.c+e.a.b,pt=t.c&&wme(t,e),i=pt?(Gt+b)/2:Gt+(e.s+1)*t.b,f=e.d.a.Xb().tc();f.hc();)if(l=a(f.ic(),14),g=a(zi(e.c,l),589),ae=g.f,Te=g.a,It=new We(i,ae),ce=new We(i,Te),_t=new We(Gt-10,ae),Zt=new We(b,Te),M=!1,k=!1,g.b&&(M=!0,_t.a=b),g.c&&(k=!0,Zt.a=Gt-10),R=g.d,O=g.e,!pt||!(R||O)||k||M)e.d.a._b()==1?AN(l.a,Y(Z(ss,1),wt,9,0,[_t,It,ce,Zt])):(n=new We(i,e.b),AN(l.a,Y(Z(ss,1),wt,9,0,[_t,It,n,ce,Zt])));else if(R&&O){for(v=0,$=0,rt=new H(l.d.g.i);rt.a=0&&lR&&(c&&(Bg(_t,k),Bg(Gt,Xt(b.a-1))),Me=n.b,Bn+=k+e,k=0,v=y.Math.max(v,n.b+n.c+Te)),th(f,Me),eh(f,Bn),v=y.Math.max(v,Me+Te+n.c),k=y.Math.max(k,M),Me+=Te+e;if(v=y.Math.max(v,i),ae=Bn+k+n.a,ae0&&(t.p=-(t.p-1)),t.p>Vs&&vct(e,t.p-Fm),l=e.q.getDate(),yL(e,1),t.k>=0&&Doe(e,t.k),t.c>=0?yL(e,t.c):t.k>=0?(g=new Pat(e.q.getFullYear()-Fm,e.q.getMonth(),35),i=35-g.q.getDate(),yL(e,i0&&t.f<12&&(t.f+=12),Dee(e,t.f==24&&t.g?0:t.f),t.j>=0&&Tae(e,t.j),t.n>=0&&Fae(e,t.n),t.i>=0&&dMt(e,so(Zg(dP(Ka(e.q.getTime()),hw),hw),t.i)),t.a&&(r=new z9,vct(r,r.q.getFullYear()-Fm-80),KG(Ka(e.q.getTime()),Ka(r.q.getTime()))&&vct(e,r.q.getFullYear()-Fm+100)),t.d>=0){if(t.c==-1)n=(7+t.d-e.q.getDay())%7,n>3&&(n-=7),f=e.q.getMonth(),yL(e,e.q.getDate()+n),e.q.getMonth()!=f&&yL(e,e.q.getDate()+(n>0?-7:7));else if(e.q.getDay()!=t.d)return!1}return t.o>Vs&&(c=e.q.getTimezoneOffset(),dMt(e,so(Ka(e.q.getTime()),(t.o-c)*60*hw))),!0}function Q7t(){Q7t=P,ps=new Ov,cr(ps,(Ht(),aI),Ad),cr(ps,sI,Td),cr(ps,oI,Cd),cr(ps,cI,zf),cr(ps,M0,ab),cr(ps,M0,Cd),cr(ps,M0,zf),cr(ps,ab,M0),cr(ps,ab,Ad),cr(ps,ab,Td),cr(ps,Bx,Bx),cr(ps,Bx,Cd),cr(ps,Bx,Ad),cr(ps,dy,dy),cr(ps,dy,Cd),cr(ps,dy,Td),cr(ps,py,py),cr(ps,py,zf),cr(ps,py,Ad),cr(ps,fy,fy),cr(ps,fy,zf),cr(ps,fy,Td),cr(ps,Cd,oI),cr(ps,Cd,M0),cr(ps,Cd,Bx),cr(ps,Cd,dy),cr(ps,Cd,Cd),cr(ps,Cd,Ad),cr(ps,Cd,Td),cr(ps,zf,cI),cr(ps,zf,M0),cr(ps,zf,py),cr(ps,zf,fy),cr(ps,zf,zf),cr(ps,zf,Ad),cr(ps,zf,Td),cr(ps,Ad,aI),cr(ps,Ad,ab),cr(ps,Ad,Bx),cr(ps,Ad,py),cr(ps,Ad,Cd),cr(ps,Ad,zf),cr(ps,Ad,Ad),cr(ps,Td,sI),cr(ps,Td,ab),cr(ps,Td,dy),cr(ps,Td,fy),cr(ps,Td,Cd),cr(ps,Td,zf),cr(ps,Td,Td)}function hxe(){bi(xI,new c8),bi(tU,new Q0),bi(MI,new nT),bi(g_t,new rj),bi(At,new oj),bi(Z(Da,1),new cj),bi(ho,new aj),bi(px,new em),bi(At,new n8),bi(At,new i8),bi(At,new Zz),bi(To,new r8),bi(At,new Qy),bi(Sl,new z3),bi(Sl,new Yz),bi(At,new s8),bi(CE,new o8),bi(At,new JS),bi(At,new QS),bi(At,new Qk),bi(At,new tT),bi(At,new Kz),bi(Z(Da,1),new a8),bi(At,new eT),bi(At,new u8),bi(Sl,new t5),bi(Sl,new Jz),bi(At,new l8),bi(Io,new h8),bi(At,new f8),bi(Vm,new Qz),bi(At,new d8),bi(At,new tj),bi(At,new ej),bi(At,new tm),bi(Sl,new e5),bi(Sl,new n5),bi(At,new i5),bi(At,new t2),bi(At,new cs),bi(At,new iT),bi(At,new r5),bi(At,new Ev),bi(qm,new nj),bi(At,new s5),bi(At,new p8),bi(At,new zh),bi(qm,new ij),bi(Vm,new g8),bi(At,new sj),bi(Io,new m8)}function fxe(t,e){var n,i,r,c,l,f,g,b,v,M,k,R;for(i=a(z(t,(Ft(),li)),35),th(i,t.k.a+e.a),eh(i,t.k.b+e.b),(a(cn(i,(qt(),Ew)),185)._b()!=0||z(t,xd)!=null||zt(z(Mc(t),JB))===zt((WC(),j6))&&jEt((nw(),(t.p?t.p:(we(),we(),ap)).Qb(Jm)?M=a(z(t,Jm),179):M=a(z(Mc(t),eA),179),M)))&&(c_(i,t.n.a),o_(i,t.n.b)),v=new H(t.i);v.a1;)e=y.Math.min(c,t.c),b=(M=new Jh(t.e.c),jl(M,(Ke(),Jc)),Ct(M,(qt(),Qi),a(z(b,Qi),83)),Ct(M,Oh,a(z(b,Oh),185)),M.o=t.e.b++,Ut(t.b,M),M.n.b=b.n.b,M.n.a=e,k=new Eo,yr(k,(Ht(),Qe)),ds(k,b),k.k.a=M.n.a,k.k.b=M.n.b/2,R=new Eo,yr(R,on),ds(R,M),R.k.b=M.n.b/2,R.k.a=-R.n.a,O=new Np,Hs(O,k),Ts(O,R),M),Ut(t.e.c.a,b),--v,c-=t.c+t.e.d;for(new tlt(t.d,t.b,t.c),f=new H(r);f.a=e.length)return{done:!0};var r=e[i++];return{value:[r,n.get(r)],done:!1}}}},jwe()||(t.prototype.createObject=function(){return{}},t.prototype.get=function(e){return this.obj[":"+e]},t.prototype.set=function(e,n){this.obj[":"+e]=n},t.prototype[GZ]=function(e){delete this.obj[":"+e]},t.prototype.keys=function(){var e=[];for(var n in this.obj)n.charCodeAt(0)==58&&e.push(n.substring(1));return e}),t}function gxe(t,e){var n,i,r,c,l,f,g,b,v;if(Dp(Rs(e))!=1||a(aN(Rs(e)),14).c.g.j!=(Ke(),Hr))return null;for(n=a(aN(Rs(e)),14),i=n.c.g,jl(i,(Ke(),gs)),Ct(i,(Ft(),Iu),null),Ct(i,Ru,null),Ct(i,L6,a(z(e,L6),126)),Ct(i,_w,(me(),me(),!0)),Ct(i,li,z(e,li)),i.n.b=e.n.b,c=z(n.d,li),l=null,b=Ja(i,(Ht(),on)).tc();b.hc();)if(f=a(b.ic(),11),f.d.c.length!=0){Ct(f,li,c),v=n.d,f.n.a=v.n.a,f.n.b=v.n.b,f.a.a=v.a.a,f.a.b=v.a.b,Or(f.e,v.e),v.e.c=dt(un,te,1,0,5,1),l=f;break}if(Ct(n.d,li,null),Dp(Ja(e,on))>1)for(g=qn(fl(Ja(e,on)),0);g.b!=g.d.c;)f=a(Yn(g),11),f.d.c.length==0?(r=new Eo,yr(r,on),r.n.a=f.n.a,r.n.b=f.n.b,ds(r,i),Ct(r,li,z(f,li)),ds(f,null)):ds(l,i);return Ct(e,li,null),Ct(e,_w,!1),jl(e,Jc),Ct(i,(qt(),Qi),a(z(e,Qi),83)),Ct(i,Oh,a(z(e,Oh),185)),pm(t.b,0,i),i}function mxe(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt;for(di(n,"Polyline edge routing",1),R=lt(Yt(z(e,(qt(),Aw)))),r=lt(Yt(z(e,Ax))),i=y.Math.min(1,r/R),rt=0,e.b.c.length!=0&&(pt=K9t(a(Ee(e.b,0),26)),rt=.4*i*pt),f=new Gs(e.b,0);f.b0&&(rt-=R),jht(l,rt),v=0,k=new H(l.a);k.a0),f.a.cd(f.c=--f.b)),g=.4*i*v,!c&&f.b0||v.i==on&&v.d.c.length-v.f.c.length<0)){n=!1;break}if(v.i==on){for(r=new H(v.f);r.a=f){Hn(W.b>0),W.a.cd(W.c=--W.b);break}else O.a>g&&(r?(Or(r.b,O.b),r.a=y.Math.max(r.a,O.a),Th(W)):(Ut(O.b,v),O.c=y.Math.min(O.c,g),O.a=y.Math.max(O.a,f),r=O));r||(r=new pxt,r.c=g,r.a=f,cd(W,r),Ut(r.b,v))}for(l=e.b,b=0,$=new H(i);$.a<$.c.c.length;)for(O=a(G($),511),c=new dl(e),c.o=b++,l.c[l.c.length]=c,R=new H(O.b);R.a0&&Pc(i,-6)>=0){if(Pc(i,0)>=0){for(r=n+or(i),l=17;l>=r;l--)b[l+1]=b[l];return b[++r]=46,f&&(b[--n]=45),ml(b,n,18-n+1)}for(c=2;KG(c,so(DM(i),1));c++)b[--n]=48;return b[--n]=46,b[--n]=48,f&&(b[--n]=45),ml(b,n,18-n)}return k=n+1,v=new Bb,f&&(v.a+="-"),18-k>=1?(S1(v,b[n]),v.a+=".",v.a+=ml(b,n+1,18-n-1)):v.a+=ml(b,n,18-n),v.a+="E",Pc(i,0)>0&&(v.a+="+"),v.a+=""+BD(i),v.a}function rOt(t){var e,n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi,ls;for(M=a(z(t,(R1(),mx)),35),nt=qi,rt=qi,$=Vs,W=Vs,_t=new H(t.e);_t.a<_t.c.c.length;)pt=a(G(_t),146),ae=pt.d,Te=pt.e,nt=y.Math.min(nt,ae.a-Te.a/2),rt=y.Math.min(rt,ae.b-Te.b/2),$=y.Math.max($,ae.a+Te.a/2),W=y.Math.max(W,ae.b+Te.b/2);for(ce=a(cn(M,(Ph(),Sjt)),119),Zt=new We(ce.b-nt,ce.d-rt),f=new H(t.e);f.ae.d.c){if(R=t.c[e.a.d],W=t.c[M.a.d],R==W)continue;ih($l(Wl(Vl(Gl(new cl,1),100),R),W))}}}}}function xxe(t,e,n,i,r,c){var l,f,g,b,v,M;for(b=new Eo,Uo(b,e),yr(b,a(cn(e,(qt(),nA)),69)),Ct(b,(Ft(),li),e),ds(b,n),M=b.n,M.a=e.g,M.b=e.f,v=b.k,v.a=e.i,v.b=e.j,wr(t.a,e,b),l=mN(Vh(Yh(new gi(null,(!e.e&&(e.e=new pn(Xs,e,7,4)),new Ei(e.e,16))),new _a),new $c),new pH(e)),l||(l=mN(Vh(Yh(new gi(null,(!e.d&&(e.d=new pn(Xs,e,8,5)),new Ei(e.d,16))),new ff),new ws),new gH(e))),l||(l=mN(new gi(null,(!e.e&&(e.e=new pn(Xs,e,7,4)),new Ei(e.e,16))),new Bl)),Ct(b,P6,(me(),!!l)),Aye(b,c,r,a(cn(e,Sw),9)),g=new $n((!e.n&&(e.n=new Wt(ic,e,1,7)),e.n));g.e!=g.i._b();)f=a(ci(g),137),!lt(de(cn(f,v0)))&&f.a&&Ut(b.e,_q(f));switch((!e.d&&(e.d=new pn(Xs,e,8,5)),e.d).i+(!e.e&&(e.e=new pn(Xs,e,7,4)),e.e).i>1&&i.nc((So(),q4)),r.g){case 2:case 1:(b.i==(Ht(),Tn)||b.i==fi)&&i.nc((So(),Q_));break;case 4:case 3:(b.i==(Ht(),Qe)||b.i==on)&&i.nc((So(),Q_))}return b}function Z1(t,e){Ai();var n,i,r,c,l,f,g,b,v,M,k,R,O;if(nM(YE)==0){for(M=dt(iMe,wt,112,SXt.length,0,1),l=0;lb&&(i.a+=$Et(dt(nl,Pf,22,-b,15,1))),i.a+="Is",Mf(g,Ca(32))>=0)for(r=0;r0){if(l+i>t.length)return!1;f=T7(t.substr(0,l+i),e)}else f=T7(t,e);switch(c){case 71:return f=x_(t,l,Y(Z(At,1),wt,2,6,[ROt,DOt]),e),r.e=f,!0;case 77:return Awe(t,e,r,f,l);case 76:return kwe(t,e,r,f,l);case 69:return _0e(t,e,l,r);case 99:return y0e(t,e,l,r);case 97:return f=x_(t,l,Y(Z(At,1),wt,2,6,["AM","PM"]),e),r.b=f,!0;case 121:return Owe(t,e,l,f,n,r);case 100:return f<=0?!1:(r.c=f,!0);case 83:return f<0?!1:Lfe(f,l,e[0],r);case 104:f==12&&(f=0);case 75:case 72:return f<0?!1:(r.f=f,r.g=!1,!0);case 107:return f<0?!1:(r.f=f,r.g=!0,!0);case 109:return f<0?!1:(r.j=f,!0);case 115:return f<0?!1:(r.n=f,!0);case 90:if(lce[g]&&(W=g),M=new H(t.b.b);M.a0?k=sP(f):k=iP(sP(f)),t.ze(nA,k)),k.g){case 4:Ct(v,la,(bl(),xw)),Ct(v,NJ,(l_(),$4)),v.n.b=l.b,yr(M,(Ht(),Qe)),M.k.b=b.b;break;case 2:Ct(v,la,(bl(),Km)),Ct(v,NJ,(l_(),C6)),v.n.b=l.b,yr(M,(Ht(),on)),M.k.b=b.b;break;case 1:Ct(v,w0,(tp(),ty)),v.n.a=l.a,yr(M,(Ht(),fi)),M.k.a=b.a;break;case 3:Ct(v,w0,(tp(),wx)),v.n.a=l.a,yr(M,(Ht(),Tn)),M.k.a=b.a}if(e==Nx||e==Sd||e==Gc){if(R=0,e==Nx&&t.ye(_0))switch(k.g){case 1:case 2:R=a(t.xe(_0),21).a;break;case 3:case 4:R=-a(t.xe(_0),21).a}else switch(k.g){case 4:case 2:R=c.b,e==Sd&&(R/=r.b);break;case 1:case 3:R=c.a,e==Sd&&(R/=r.a)}Ct(v,Ym,R)}return Ct(v,wc,k),v}function Axe(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt;if(k=a(a(rr(t.r,e),19),60),e==(Ht(),Qe)||e==on){Y7t(t,e);return}for(c=e==Tn?(Am(),dI):(Am(),pI),_t=e==Tn?(Ha(),Fh):(Ha(),dh),n=a(js(t.b,e),114),i=n.i,r=i.c+r_(Y(Z(Os,1),Xo,22,15,[n.n.b,t.A.b,t.k])),nt=i.c+i.b-r_(Y(Z(Os,1),Xo,22,15,[n.n.c,t.A.c,t.k])),l=jit(Xst(c),t.s),rt=e==Tn?UY:ax,M=k.tc();M.hc();)b=a(M.ic(),111),!(!b.c||b.c.d.c.length<=0)&&(W=b.b.Re(),$=b.e,R=b.c,O=R.i,O.b=(g=R.n,R.e.a+g.b+g.c),O.a=(f=R.n,R.e.b+f.d+f.a),I$(_t,Spt),R.f=_t,Cf(R,(hu(),fh)),O.c=$.a-(O.b-W.a)/2,It=y.Math.min(r,$.a),Gt=y.Math.max(nt,$.a+W.a),O.cGt&&(O.c=Gt-O.b),Ut(l.d,new v$(O,eut(l,O))),rt=e==Tn?y.Math.max(rt,$.b+b.b.Re().b):y.Math.min(rt,$.b));for(rt+=e==Tn?t.s:-t.s,pt=dut((l.e=rt,l)),pt>0&&(a(js(t.b,e),114).a.b=pt),v=k.tc();v.hc();)b=a(v.ic(),111),!(!b.c||b.c.d.c.length<=0)&&(O=b.c.i,O.c-=b.e.a,O.d-=b.e.b)}function oOt(t,e,n){var i,r,c,l,f,g,b,v,M,k;if(i=new qh(e.Qe().a,e.Qe().b,e.Re().a,e.Re().b),r=new lM,t.c)for(l=new H(e.We());l.a=2){if((!t.a&&(t.a=new Wt(os,t,6,6)),t.a).i==0)n=(am(),r=new O3,r),ni((!t.a&&(t.a=new Wt(os,t,6,6)),t.a),n);else if((!t.a&&(t.a=new Wt(os,t,6,6)),t.a).i>1)for(k=new ZT((!t.a&&(t.a=new Wt(os,t,6,6)),t.a));k.e!=k.i._b();)qC(k);RP(e,a(at((!t.a&&(t.a=new Wt(os,t,6,6)),t.a),0),270))}if(M)for(i=new $n((!t.a&&(t.a=new Wt(os,t,6,6)),t.a));i.e!=i.i._b();)for(n=a(ci(i),270),b=new $n((!n.a&&(n.a=new Ss(sf,n,5)),n.a));b.e!=b.i._b();)g=a(ci(b),531),f.a=y.Math.max(f.a,g.a),f.b=y.Math.max(f.b,g.b);for(l=new $n((!t.n&&(t.n=new Wt(ic,t,1,7)),t.n));l.e!=l.i._b();)c=a(ci(l),137),v=a(cn(c,_A),9),v&&Wd(c,v.a,v.b),M&&(f.a=y.Math.max(f.a,c.i+c.g),f.b=y.Math.max(f.b,c.j+c.f));return f}function kxe(t,e,n){var i,r,c,l,f,g,b,v,M,k,R;if(t.e.a.Pb(),t.f.a.Pb(),t.c.c=dt(un,te,1,0,5,1),t.i.c=dt(un,te,1,0,5,1),t.g.a.Pb(),e)for(l=new H(e.a);l.a>4)<<24>>24,M[k++]=((n&15)<<4|i>>2&15)<<24>>24,M[k++]=(i<<6|r)<<24>>24}return!O5(l=c[v++])||!O5(f=c[v++])?null:(e=af[l],n=af[f],g=c[v++],b=c[v++],af[g]==-1||af[b]==-1?g==61&&b==61?n&15?null:(W=dt(Da,W_,22,R*3+1,15,1),Aa(M,0,W,0,R*3),W[k]=(e<<2|n>>4)<<24>>24,W):g!=61&&b==61?(i=af[g],i&3?null:(W=dt(Da,W_,22,R*3+2,15,1),Aa(M,0,W,0,R*3),W[k++]=(e<<2|n>>4)<<24>>24,W[k]=((n&15)<<4|i>>2&15)<<24>>24,W)):null:(i=af[g],r=af[b],M[k++]=(e<<2|n>>4)<<24>>24,M[k++]=((n&15)<<4|i>>2&15)<<24>>24,M[k++]=(i<<6|r)<<24>>24,M))}function Pxe(t,e,n){var i,r,c,l,f,g,b,v,M,k;for(g=new Dt,M=e.length,l=Rat(n),b=0;bf&&(pt=0,_t+=l+nt,l=0),Nve($,n,pt,_t),e=y.Math.max(e,pt+W.a),l=y.Math.max(l,W.b),pt+=W.a+nt;return $}function Ixe(t,e,n){var i,r,c,l,f;switch(i=e.i,c=t.g.n,r=t.g.d,f=t.k,l=zo(Y(Z(ss,1),wt,9,0,[f,t.a])),t.i.g){case 1:qd(e,(Ha(),dh)),i.d=-r.d-n-i.a,a(a(EM(e.d).a.cd(0),271).xe((Ft(),xx)),265)==(Cu(),kd)?(Cf(e,(hu(),fh)),i.c=l.a-lt(Yt(z(t,ey)))-n-i.b):(Cf(e,(hu(),jf)),i.c=l.a+lt(Yt(z(t,ey)))+n);break;case 2:Cf(e,(hu(),jf)),i.c=c.a+r.c+n,a(a(EM(e.d).a.cd(0),271).xe((Ft(),xx)),265)==(Cu(),kd)?(qd(e,(Ha(),dh)),i.d=l.b-lt(Yt(z(t,ey)))-n-i.a):(qd(e,(Ha(),Fh)),i.d=l.b+lt(Yt(z(t,ey)))+n);break;case 3:qd(e,(Ha(),Fh)),i.d=c.b+r.a+n,a(a(EM(e.d).a.cd(0),271).xe((Ft(),xx)),265)==(Cu(),kd)?(Cf(e,(hu(),fh)),i.c=l.a-lt(Yt(z(t,ey)))-n-i.b):(Cf(e,(hu(),jf)),i.c=l.a+lt(Yt(z(t,ey)))+n);break;case 4:Cf(e,(hu(),fh)),i.c=-r.b-n-i.b,a(a(EM(e.d).a.cd(0),271).xe((Ft(),xx)),265)==(Cu(),kd)?(qd(e,(Ha(),dh)),i.d=l.b-lt(Yt(z(t,ey)))-n-i.a):(qd(e,(Ha(),Fh)),i.d=l.b+lt(Yt(z(t,ey)))+n)}}function uOt(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O;switch(l=new wCt(t),f=fd(Xd(e,l)),we(),gc(f,new By),r=t.b,r.c){case 2:g=new Nb(r.a),n=GT(Xd(f,g)),u_(n)?b=a(N2(n),188).b:b=15,g=new Nb(Nut(r)),n=GT(Xd(f,g)),u_(n)?c=a(N2(n),188).b:c=15,g=new Nb(r.b),n=GT(Xd(f,g)),u_(n)?v=a(N2(n),188).b:v=15,i=xbe(t,b,c,v),Ir(e,new r4(i,t.c,t.e,t.a.c.g,r.a)),Ir(e,new r4(i,t.c,t.e,t.a.c.g,Nut(r))),Ir(e,new r4(i,t.c,t.e,t.a.c.g,r.b));break;case 1:g=new Nb(r.a),n=GT(Xd(f,g)),u_(n)?b=a(N2(n),188).b:b=15,g=new Nb(r.b),n=GT(Xd(f,g)),u_(n)?v=a(N2(n),188).b:v=15,i=fbe(t,b,v),Ir(e,new r4(i,t.c,t.e,t.a.c.g,r.a)),Ir(e,new r4(i,t.c,t.e,t.a.c.g,r.b));break;case 0:g=new Nb(r.a),n=GT(Xd(f,g)),u_(n)?b=a(N2(n),188).b:b=15,i=(M=t.b,k=qve(t.a.c,t.a.d,b),yo(t.a.a,Bq(k)),R=mlt(t.a.b,k.a,M),O=new EL((!k.k&&(k.k=new xX(KV(k))),k.k)),Qot(O),R?Iot(O,R):O),Ir(e,new r4(i,t.c,t.e,t.a.c.g,r.a));break;default:throw K(new yn("The loopside must be defined."))}return i}function Rxe(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae;for(di(e,"Compound graph postprocessor",1),n=lt(de(z(t,(qt(),KJ)))),f=a(z(t,(Ft(),umt)),238),v=new $r,nt=f.Xb().tc();nt.hc();){for(W=a(nt.ic(),14),l=new Eh(f.Mc(W)),we(),gc(l,new Z8(t)),It=ule((mi(0,l.c.length),a(l.c[0],234))),Zt=LPt(a(Ee(l,l.c.length-1),234)),pt=It.g,VM(Zt.g,pt)?rt=a(z(pt,xd),31):rt=Mc(pt),M=_de(W,l),ld(W.a),k=null,c=new H(l);c.aop,ae=y.Math.abs(k.b-O.b)>op,(!n&&ce&&ae||n&&(ce||ae))&&Xi(W.a,_t)),yo(W.a,i),i.b==0?k=_t:k=(Hn(i.b!=0),a(i.c.b.c,9)),Lle(R,M,$),LPt(r)==Zt&&(Mc(Zt.g)!=r.a&&($=new go,Xlt($,Mc(Zt.g),rt)),Ct(W,HJ,$)),Rge(R,W,rt),v.a.Zb(R,v);Hs(W,It),Ts(W,Zt)}for(b=v.a.Xb().tc();b.hc();)g=a(b.ic(),14),Hs(g,null),Ts(g,null);Vn(e)}function Dxe(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi;for(rt=new Gs(t.b,0),v=e.tc(),O=0,b=a(v.ic(),21).a,It=0,n=new $r,Zt=new qa;rt.b=t.a&&(i=Zve(t,rt),v=Mh(v,i.b),_t=Mh(_t,i.d),Ut(f,new zs(rt,i)));for(ce=new Dt,b=0;b0),W.a.cd(W.c=--W.b),ae=new dl(t.b),cd(W,ae),Hn(W.b=i.n.b/2}else rt=!M;rt?(nt=a(z(i,(Ft(),Ex)),15),nt?k?c=nt:(r=a(z(i,vx),15),r?nt._b()<=r._b()?c=nt:c=r:(c=new Dt,Ct(i,vx,c))):(c=new Dt,Ct(i,Ex,c))):(r=a(z(i,(Ft(),vx)),15),r?M?c=r:(nt=a(z(i,Ex),15),nt?r._b()<=nt._b()?c=r:c=nt:(c=new Dt,Ct(i,Ex,c))):(c=new Dt,Ct(i,vx,c))),c.nc(t),Ct(t,(Ft(),FB),n),e.d==n?(Ts(e,null),n.d.c.length+n.f.c.length==0&&ds(n,null),Jle(n)):(Hs(e,null),n.d.c.length+n.f.c.length==0&&ds(n,null)),ld(e.a)}function Bxe(t){var e,n,i,r,c,l,f,g,b,v,M,k,R,O;if(zt(z(t.c,(qt(),Qi)))===zt((Ls(),Sd))||zt(z(t.c,Qi))===zt(Gc)){for(v=new H(t.c.i);v.a0&&(r=a(Ee(W.c.a,Gt-1),8),l=t.i[r.o],ce=y.Math.ceil(Gv(t.n,r,W)),c=It.a.e-W.d.d-(l.a.e+r.n.b+r.d.a)-ce),b=is,Gt0&&Zt.a.e.e-Zt.a.a-(Zt.b.e.e-Zt.b.a)<0,O=pt.a.e.e-pt.a.a-(pt.b.e.e-pt.b.a)<0&&Zt.a.e.e-Zt.a.a-(Zt.b.e.e-Zt.b.a)>0,R=pt.a.e.e+pt.b.aZt.b.e.e+Zt.a.a,_t=0,!$&&!O&&(k?c+M>0?_t=M:b-i>0&&(_t=i):R&&(c+f>0?_t=f:b-rt>0&&(_t=rt))),It.a.e+=_t,It.b&&(It.d.e+=_t),!1))}function Uxe(){var t=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F"];return t[34]='\\"',t[92]="\\\\",t[173]="\\u00ad",t[1536]="\\u0600",t[1537]="\\u0601",t[1538]="\\u0602",t[1539]="\\u0603",t[1757]="\\u06dd",t[1807]="\\u070f",t[6068]="\\u17b4",t[6069]="\\u17b5",t[8203]="\\u200b",t[8204]="\\u200c",t[8205]="\\u200d",t[8206]="\\u200e",t[8207]="\\u200f",t[8232]="\\u2028",t[8233]="\\u2029",t[8234]="\\u202a",t[8235]="\\u202b",t[8236]="\\u202c",t[8237]="\\u202d",t[8238]="\\u202e",t[8288]="\\u2060",t[8289]="\\u2061",t[8290]="\\u2062",t[8291]="\\u2063",t[8292]="\\u2064",t[8298]="\\u206a",t[8299]="\\u206b",t[8300]="\\u206c",t[8301]="\\u206d",t[8302]="\\u206e",t[8303]="\\u206f",t[65279]="\\ufeff",t[65529]="\\ufff9",t[65530]="\\ufffa",t[65531]="\\ufffb",t}function mu(){mu=P,rg=new A1("N",0,(Ht(),Tn),Tn,0),kw=new A1("EN",1,Qe,Tn,1),tb=new A1("E",2,Qe,Qe,0),eb=new A1("SE",3,fi,Qe,1),Yp=new A1("S",4,fi,fi,0),Iw=new A1("WS",5,on,fi,1),Pw=new A1("W",6,on,on,0),hp=new A1("NW",7,Tn,on,1),Zp=new A1("ENW",8,Qe,on,2),Lw=new A1("ESW",9,Qe,on,2),nb=new A1("SEN",10,fi,Tn,2),oy=new A1("SWN",11,fi,Tn,2),Lx=new A1(cx,12,Wc,Wc,3),QWt=Qfe(rg,kw,tb,eb,Yp,Iw,Y(Z(aA,1),jt,129,0,[Pw,hp,Zp,Lw,nb,oy])),e$t=($b(),M_(Y(Z(un,1),te,1,5,[rg,tb,Yp,Pw]))),t$t=M_(Y(Z(un,1),te,1,5,[kw,eb,Iw,hp])),o$t=new l2(Tn),i$t=M_(Y(Z(un,1),te,1,5,[Qe,Tn])),n$t=new l2(Qe),u$t=M_(Y(Z(un,1),te,1,5,[fi,Qe])),a$t=new l2(fi),p$t=M_(Y(Z(un,1),te,1,5,[on,fi])),d$t=new l2(on),c$t=M_(Y(Z(un,1),te,1,5,[Tn,on])),r$t=M_(Y(Z(un,1),te,1,5,[Qe,Tn,on])),s$t=M_(Y(Z(un,1),te,1,5,[Qe,fi,on])),h$t=M_(Y(Z(un,1),te,1,5,[fi,on,Tn])),l$t=M_(Y(Z(un,1),te,1,5,[fi,Qe,Tn])),f$t=(yM(),B4)}function zxe(t){var e,n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce;if(n=lt(Yt(z(t.a.j,(qt(),zmt)))),n<-1||!t.a.i||QT(a(z(t.a.o,Qi),83))||ac(t.a.o,(Ht(),Qe))._b()<2&&ac(t.a.o,on)._b()<2)return!0;if(t.a.c.pf())return!1;for(_t=0,pt=0,rt=new Dt,g=t.a.e,b=0,v=g.length;b=n}function jxe(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t;for(di(e,CBt,1),R=a(z(t,(qt(),ig)),197),r=new H(t.b);r.a=2){for(O=!0,M=new H(c.i),n=a(G(M),11);M.a0){for(k=v<100?null:new w1(v),b=new xat(e),O=b.g,nt=dt(Gn,pi,22,v,15,1),i=0,_t=new i_(v),r=0;r=0;)if(f!=null?Fi(f,O[g]):O[g]==null){nt.length<=i&&(W=nt,nt=dt(Gn,pi,22,2*nt.length,15,1),Aa(W,0,nt,0,i)),nt[i++]=r,ni(_t,O[g]);break t}if(zt(f)===zt(f))break}}if(O=_t.g,i>nt.length&&(W=nt,nt=dt(Gn,pi,22,i,15,1),Aa(W,0,nt,0,i)),i>0){for(pt=!0,c=0;c=0;)W2(t,nt[l]);if(i!=i){for(r=i;--r>=i;)W2(_t,r);W=nt,nt=dt(Gn,pi,22,i,15,1),Aa(W,0,nt,0,i)}e=_t}}}else for(e=mpe(t,e),r=t.i;--r>=0;)e.pc(t.g[r])&&(W2(t,r),pt=!0);if(pt){if(nt!=null){for(n=e._b(),M=n==1?uC(t,4,e.tc().ic(),null,nt[0],$):uC(t,6,e,nt,nt[0],$),k=n<100?null:new w1(n),r=e.tc();r.hc();)R=r.ic(),k=Ust(t,a(R,75),k);k?(k.Sh(M),k.Th()):Bi(t.e,M)}else{for(k=Ene(e._b()),r=e.tc();r.hc();)R=r.ic(),k=Ust(t,a(R,75),k);k&&k.Th()}return!0}else return!1}function Gxe(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi,ls;for(di(n,"MinWidth layering",1),R=e.b,Zt=e.a,ls=a(z(e,(qt(),Jmt)),21).a,f=a(z(e,Qmt),21).a,t.b=lt(Yt(z(e,nf))),t.d=is,_t=new H(Zt);_t.a<_t.c.c.length;)rt=a(G(_t),8),rt.j==(Ke(),gs)&&(Te=rt.n.b,t.d=y.Math.min(t.d,Te));for(t.d=y.Math.max(1,t.d),ce=Zt.c.length,t.c=dt(Gn,pi,22,ce,15,1),t.f=dt(Gn,pi,22,ce,15,1),t.e=dt(Os,Xo,22,ce,15,1),b=0,t.a=0,It=new H(Zt);It.a0||n.o==rf&&r0?(M=a(Ee(k.c.a,l-1),8),ce=Gv(t.b,k,M),W=k.k.b-k.d.d-(M.k.b+M.n.b+M.d.a+ce)):W=k.k.b-k.d.d,b=y.Math.min(W,b),l=1&&(ce-b>0&&O>=0?(th(M,M.i+Zt),eh(M,M.j+g*b)):ce-b<0&&R>=0&&(th(M,M.i+Zt*ce),eh(M,M.j+g)));return ga(t,HE,(c=a(xu(EA),10),new ja(c,a(cu(c,c.length),10),0))),new We(ae,v)}function qxe(t){var e,n,i,r,c,l,f,g,b,v,M,k,R,O,$,W;for($=new Dt,k=new H(t.d.b);k.ar.d.d+r.d.a?v.f.d=!0:(v.f.d=!0,v.f.a=!0))),i.b!=i.d.c&&(e=n);v&&(c=a(zi(t.f,l.d.g),57),e.bc.d.d+c.d.a?v.f.d=!0:(v.f.d=!0,v.f.a=!0))}for(f=Rn(Rs(R));Jn(f);)l=a(In(f),14),l.a.b!=0&&(e=a(mD(l.a),9),l.d.i==(Ht(),Tn)&&(W=new u4(e,new We(e.a,r.d.d),r,l),W.f.a=!0,W.a=l.d,$.c[$.c.length]=W),l.d.i==fi&&(W=new u4(e,new We(e.a,r.d.d+r.d.a),r,l),W.f.d=!0,W.a=l.d,$.c[$.c.length]=W))}return $}function Xxe(){Dit();function t(i){var r=this;this.dispatch=function(c){var l=c.data;switch(l.cmd){case"algorithms":var f=fut((we(),new Db(new vf(Ow.b))));i.postMessage({id:l.id,data:f});break;case"categories":var g=fut((we(),new Db(new vf(Ow.c))));i.postMessage({id:l.id,data:g});break;case"options":var b=fut((we(),new Db(new vf(Ow.d))));i.postMessage({id:l.id,data:b});break;case"register":uye(l.algorithms),i.postMessage({id:l.id});break;case"layout":Mbe(l.graph,l.options||{}),i.postMessage({id:l.id,data:l.graph});break}},this.saveDispatch=function(c){try{r.dispatch(c)}catch(l){delete l[vZ],i.postMessage({id:c.data.id,error:l.message})}}}function e(i){var r=this;this.dispatcher=new t({postMessage:function(c){r.onmessage({data:c})}}),this.postMessage=function(c){setTimeout(function(){r.dispatcher.saveDispatch({data:c})},0)}}if(typeof document===Hpt&&typeof self!==Hpt){var n=new t(self);self.onmessage=n.saveDispatch}else typeof m!==Hpt&&m.exports&&(Object.defineProperty(_,"__esModule",{value:!0}),m.exports={default:e,Worker:e})}function fOt(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t;if(rt=0,e.e.a==0)for(W=new H(t);W.a50?nt.c[nt.c.length]=r:r.k>0?rt.c[rt.c.length]=r:pt.c[pt.c.length]=r;if(rt.c.length==1&&nt.c.length==0&&(Or(nt,rt),rt.c=dt(un,te,1,0,5,1)),nt.c.length!=0&&Pp(BW(t.a),(mu(),rg))&&Pp(BW(t.a),(mu(),Yp))?lfe(t,nt):Or(rt,nt),rt.c.length==0||hfe(t,rt),pt.c.length!=0){if(n=OW(t.a),n.c!=0)for(v=new H(pt),g=(si(n),rst(new FEt(n).a));v.a1&&($=a(mat(g),129),jC(r,$,!0),rC(v),J4t(t.a,$))}for(k=pt.c.length,i=pve(t),R=new Dt,l=k/Urt(t.a).c|0,f=0;f3&&(Or(R,(mu(),mu(),t$t)),O-=4),O){case 3:Ut(R,TP(i));case 2:W=N7(TP(i));do W=N7(W);while(!Pp(BW(t.a),W));R.c[R.c.length]=W,W=eht(TP(i));do W=eht(W);while(!Pp(BW(t.a),W));R.c[R.c.length]=W;break;case 1:Ut(R,TP(i))}for(M=new H(R),b=new H(pt);M.a$&&(c&&(Bg(Gt,R),Bg(ce,Xt(v.b-1)),Ut(t.d,O),f.c=dt(un,te,1,0,5,1)),Pi=n.b,ls+=R+e,R=0,M=y.Math.max(M,n.b+n.c+Bn)),f.c[f.c.length]=g,lRt(g,Pi,ls),M=y.Math.max(M,Pi+Bn+n.c),R=y.Math.max(R,k),Pi+=Bn+e,O=g;if(Or(t.a,f),Ut(t.d,a(Ee(f,f.c.length-1),145)),M=y.Math.max(M,i),Me=ls+R+n.a,Me1&&(l=y.Math.min(l,y.Math.abs(a(H1(f.a,1),9).b-v.b)))));else for($=new H(e.i);$.a<$.c.c.length;)for(O=a(G($),11),g=new H(O.d);g.ar&&(c=k.a-r,l=qi,i.c=dt(un,te,1,0,5,1),r=k.a),k.a>=r&&(i.c[i.c.length]=f,f.a.b>1&&(l=y.Math.min(l,y.Math.abs(a(H1(f.a,f.a.b-2),9).b-k.b)))));if(i.c.length!=0&&c>e.n.a/2&&l>e.n.b/2){for(R=new Eo,ds(R,e),yr(R,(Ht(),Tn)),R.k.a=e.n.a/2,nt=new Eo,ds(nt,e),yr(nt,fi),nt.k.a=e.n.a/2,nt.k.b=e.n.b,g=new H(i);g.a=b.b?Hs(f,nt):Hs(f,R)):(b=a(lre(f.a),9),W=f.a.b==0?Yl(f.c):a(mD(f.a),9),W.b>=b.b?Ts(f,nt):Ts(f,R)),M=a(z(f,(qt(),Ro)),74),M&&j2(M,b,!0);e.k.a=r-e.n.a/2}}function t3e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It;for(f=new H(t.a.b);f.a0)if(i=M._b(),b=Tr(y.Math.floor((i+1)/2))-1,r=Tr(y.Math.ceil((i+1)/2))-1,e.o==rf)for(v=r;v>=b;v--)e.a[_t.o]==_t&&($=a(M.cd(v),48),O=a($.a,8),!kT(n,$.b)&&R>t.b.e[O.o]&&(e.a[O.o]=_t,e.g[_t.o]=e.g[O.o],e.a[_t.o]=e.g[_t.o],e.f[e.g[_t.o].o]=(me(),!!(lt(e.f[e.g[_t.o].o])&_t.j==(Ke(),Hr))),R=t.b.e[O.o]));else for(v=b;v<=r;v++)e.a[_t.o]==_t&&(nt=a(M.cd(v),48),W=a(nt.a,8),!kT(n,nt.b)&&R=48&&e<=57){for(i=e-48;r=48&&e<=57;)if(i=i*10+e-48,i<0)throw K(new ri(ai((Kn(),Xpt))))}else throw K(new ri(ai((Kn(),fUt))));if(n=i,e==44){if(r>=t.j)throw K(new ri(ai((Kn(),pUt))));if((e=bo(t.i,r++))>=48&&e<=57){for(n=e-48;r=48&&e<=57;)if(n=n*10+e-48,n<0)throw K(new ri(ai((Kn(),Xpt))));if(i>n)throw K(new ri(ai((Kn(),gUt))))}else n=-1}if(e!=125)throw K(new ri(ai((Kn(),dUt))));t.Ck(r)?(c=(Ai(),Ai(),++Ar,new Yb(9,c)),t.d=r+1):(c=(Ai(),Ai(),++Ar,new Yb(3,c)),t.d=r),c.nl(i),c.ml(n),Ci(t)}}return c}function e3e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te;return M=g_e(fa(t,(Ht(),kvt)),e),O=m_(fa(t,oI),e),_t=m_(fa(t,cI),e),ce=w7(fa(t,aI),e),k=w7(fa(t,sI),e),rt=m_(fa(t,Bx),e),$=m_(fa(t,dy),e),Gt=m_(fa(t,py),e),It=m_(fa(t,fy),e),ae=w7(fa(t,ab),e),nt=m_(fa(t,M0),e),pt=m_(fa(t,Cd),e),Zt=m_(fa(t,zf),e),Te=w7(fa(t,Ad),e),R=w7(fa(t,Td),e),W=m_(fa(t,YQ),e),n=r_(Y(Z(Os,1),Xo,22,15,[rt.a,ce.a,Gt.a,Te.a])),i=r_(Y(Z(Os,1),Xo,22,15,[O.a,M.a,_t.a,W.a])),r=nt.a,c=r_(Y(Z(Os,1),Xo,22,15,[$.a,k.a,It.a,R.a])),b=r_(Y(Z(Os,1),Xo,22,15,[rt.b,O.b,$.b,pt.b])),g=r_(Y(Z(Os,1),Xo,22,15,[ce.b,M.b,k.b,W.b])),v=ae.b,f=r_(Y(Z(Os,1),Xo,22,15,[Gt.b,_t.b,It.b,Zt.b])),L1(fa(t,kvt),n+r,b+v),L1(fa(t,YQ),n+r,b+v),L1(fa(t,oI),n+r,0),L1(fa(t,cI),n+r,b+v+g),L1(fa(t,aI),0,b+v),L1(fa(t,sI),n+r+i,b+v),L1(fa(t,dy),n+r+i,0),L1(fa(t,py),0,b+v+g),L1(fa(t,fy),n+r+i,b+v+g),L1(fa(t,ab),0,b),L1(fa(t,M0),n,0),L1(fa(t,zf),0,b+v+g),L1(fa(t,Td),n+r+i,0),l=new go,l.a=r_(Y(Z(Os,1),Xo,22,15,[n+i+r+c,ae.a,pt.a,Zt.a])),l.b=r_(Y(Z(Os,1),Xo,22,15,[b+g+v+f,nt.b,Te.b,R.b])),l}function Ic(){Ic=P,n3t(),kqt=ms.a,a(at(Et(ms.a),0),17),Cqt=ms.f,a(at(Et(ms.f),0),17),a(at(Et(ms.f),1),29),Aqt=ms.n,a(at(Et(ms.n),0),29),a(at(Et(ms.n),1),29),a(at(Et(ms.n),2),29),a(at(Et(ms.n),3),29),Fvt=ms.g,a(at(Et(ms.g),0),17),a(at(Et(ms.g),1),29),Tqt=ms.c,a(at(Et(ms.c),0),17),a(at(Et(ms.c),1),17),Uvt=ms.i,a(at(Et(ms.i),0),17),a(at(Et(ms.i),1),17),a(at(Et(ms.i),2),17),a(at(Et(ms.i),3),17),a(at(Et(ms.i),4),29),zvt=ms.j,a(at(Et(ms.j),0),17),Bvt=ms.d,a(at(Et(ms.d),0),17),a(at(Et(ms.d),1),17),a(at(Et(ms.d),2),17),a(at(Et(ms.d),3),17),a(at(Et(ms.d),4),29),a(at(Et(ms.d),5),29),a(at(Et(ms.d),6),29),a(at(Et(ms.d),7),29),Sqt=ms.b,a(at(Et(ms.b),0),29),a(at(Et(ms.b),1),29),jF=ms.e,a(at(Et(ms.e),0),29),a(at(Et(ms.e),1),29),a(at(Et(ms.e),2),29),a(at(Et(ms.e),3),29),a(at(Et(ms.e),4),17),a(at(Et(ms.e),5),17),a(at(Et(ms.e),6),17),a(at(Et(ms.e),7),17),a(at(Et(ms.e),8),17),a(at(Et(ms.e),9),17),a(at(Et(ms.e),10),29),pp=ms.k,a(at(Et(ms.k),0),29),a(at(Et(ms.k),1),29)}function n3e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me;for(ae=new Fr,Gt=new Fr,W=-1,g=new H(t);g.a=O&&(rt>O&&(R.c=dt(un,te,1,0,5,1),O=rt),R.c[R.c.length]=l);R.c.length!=0&&(k=a(Ee(R,$q(e,R.c.length)),125),Me.a.$b(k)!=null,k.p=$++,Jlt(k,ae,Gt),R.c=dt(un,te,1,0,5,1))}for(_t=t.c.length+1,f=new H(t);f.aTe.p&&(Th(n),Lc(Te.g,i),i.c>0&&(i.a=Te,Ut(Te.q,i),i.b=Zt,Ut(Zt.g,i)))}function i3e(t,e,n){var i,r,c,l,f,g,b,v,M;if(di(n,"Network simplex node placement",1),t.e=e,t.n=a(z(e,(Ft(),yw)),266),oye(t),L1e(t),qc(Yh(new gi(null,new Ei(t.e.b,16)),new Pk),new zH(t)),qc(wo(Yh(wo(Yh(new gi(null,new Ei(t.e.b,16)),new _v),new Yy),new w),new S),new UH(t)),lt(de(z(t.e,(qt(),tA))))&&(l=Ta(n,1),di(l,"Straight Edges Pre-Processing",1),U2e(t),Vn(l)),Nde(t.f),c=a(z(e,U6),21).a*t.f.a.c.length,HX(Bit(Fit(l$(t.f),c),!1),Ta(n,1)),t.d.a._b()!=0){for(l=Ta(n,1),di(l,"Flexible Where Space Processing",1),f=a(GW(nP(Vh(new gi(null,new Ei(t.f.a,16)),new f1),(En(new Tg),new wn))),21).a,g=a(GW(VCt(Vh(new gi(null,new Ei(t.f.a,16)),new FS),new pc)),21).a,b=g-f,v=hm(new Ng,t.f),M=hm(new Ng,t.f),ih($l(Wl(Gl(Vl(new cl,2e4),b),v),M)),qc(wo(wo(Sot(t.i),new k3),new L3),new M4t(f,v,b,M)),r=t.d.a.Xb().tc();r.hc();)i=a(r.ic(),189),i.g=1;HX(Bit(Fit(l$(t.f),c),!1),Ta(l,1)),Vn(l)}lt(de(z(e,tA)))&&(l=Ta(n,1),di(l,"Straight Edges Post-Processing",1),o0e(t),Vn(l)),_2e(t),t.e=null,t.f=null,t.i=null,t.c=null,uu(t.k),t.j=null,t.a=null,t.o=null,t.d.a.Pb(),Vn(n)}function dOt(t,e,n,i,r){var c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me;for($=new qu(e.b),_t=new qu(e.b),k=new qu(e.b),ce=new qu(e.b),W=new qu(e.b),Zt=qn(e,0);Zt.b!=Zt.d.c;)for(It=a(Yn(Zt),11),f=new H(It.f);f.a0,nt=It.f.c.length>0,b&&nt?k.c[k.c.length]=It:b?$.c[$.c.length]=It:nt&&(_t.c[_t.c.length]=It);for(O=new H($);O.a=0&&le(t.substr(f,2),"//")?(f+=2,g=Aq(t,f,kA,LA),i=t.substr(f,g-f),f=g):M!=null&&(f==t.length||t.charCodeAt(f)!=47)&&(l=!1,g=Grt(t,Ca(35),f),g==-1&&(g=t.length),i=t.substr(f,g-f),f=g);if(!n&&f0&&bo(v,v.length-1)==58&&(r=v,f=g)),f=k&&(_t>k&&(M.c=dt(un,te,1,0,5,1),k=_t),M.c[M.c.length]=W);M.c.length!=0&&(v=a(Ee(M,$q(e,M.c.length)),165),cC(Pi.a,v)!=null,v.d=R++,Klt(v,Me,ce),M.c=dt(un,te,1,0,5,1))}for(Gt=t.c.length+1,nt=new H(t);nt.aBn.d&&(Th(n),Lc(Bn.b,i),i.c>0&&(i.a=Bn,Ut(Bn.e,i),i.b=ae,Ut(ae.b,i)))}function c3e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me;for(rt=new Ov,pt=new Ov,v=_m(e,Dpt),i=new k4t(t,n,rt,pt),Gge(i.a,i.b,i.c,i.d,v),g=(Gt=rt.i,Gt||(rt.i=ct(rt.c,122)?new Nv(rt,a(rt.c,122)):ct(rt.c,115)?new g2(rt,a(rt.c,115)):new pM(rt,rt.c))),ce=g.tc();ce.hc();)for(Zt=a(ce.ic(),270),r=a(rr(rt,Zt),19),$=r.tc();$.hc();)if(O=$.ic(),_t=a(kp(t.d,O),270),_t)f=(!Zt.e&&(Zt.e=new pn(os,Zt,10,9)),Zt.e),ni(f,_t);else throw l=Jd(e,Df),k=GFt+O+WFt+l,R=k+xE,K(new xf(R));for(b=(It=pt.i,It||(pt.i=ct(pt.c,122)?new Nv(pt,a(pt.c,122)):ct(pt.c,115)?new g2(pt,a(pt.c,115)):new pM(pt,pt.c))),Te=b.tc();Te.hc();)for(ae=a(Te.ic(),270),c=a(rr(pt,ae),19),nt=c.tc();nt.hc();)if(W=nt.ic(),_t=a(kp(t.d,W),270),_t)M=(!ae.g&&(ae.g=new pn(os,ae,9,10)),ae.g),ni(M,_t);else throw l=Jd(e,Df),k=GFt+W+WFt+l,R=k+xE,K(new xf(R));!n.b&&(n.b=new pn(Si,n,4,7)),n.b.i!=0&&(!n.c&&(n.c=new pn(Si,n,5,8)),n.c.i!=0)&&(!n.b&&(n.b=new pn(Si,n,4,7)),n.b.i<=1&&(!n.c&&(n.c=new pn(Si,n,5,8)),n.c.i<=1))&&(!n.a&&(n.a=new Wt(os,n,6,6)),n.a).i==1&&(Me=a(at((!n.a&&(n.a=new Wt(os,n,6,6)),n.a),0),270),!Vq(Me)&&!qq(Me)&&(dat(Me,a(at((!n.b&&(n.b=new pn(Si,n,4,7)),n.b),0),97)),pat(Me,a(at((!n.c&&(n.c=new pn(Si,n,5,8)),n.c),0),97))))}function pOt(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce;for(t.d=new We(is,is),t.c=new We(Ps,Ps),k=e.tc();k.hc();)for(v=a(k.ic(),31),pt=new H(v.a);pt.a=It||!fhe(nt,i))&&(i=xAt(e,v)),Ks(nt,i),c=Rn(Rs(nt));Jn(c);)r=a(In(c),14),!t.a[r.o]&&($=r.c.g,--t.e[$.o],t.e[$.o]==0&&RM(JM(R,$)));for(b=v.c.length-1;b>=0;--b)Ut(e.b,(mi(b,v.c.length),a(v.c[b],26)));e.a.c=dt(un,te,1,0,5,1),Vn(n)}function l3e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi,ls,iu,wa,e1,Ou,fg,L0,uf,mh;if(Me=ckt(t,gkt(n),e),GL(Me,Jd(e,Df)),Bn=a(kp(t.g,q2(Gg(e,ZY))),35),k=Gg(e,"sourcePort"),i=null,k&&(i=q2(k)),Pi=a(kp(t.j,i),121),!Bn)throw f=FC(e),O="An edge must have a source node (edge id: '"+f,$=O+xE,K(new xf($));if(Pi&&!Rp(Tf(Pi),Bn))throw g=Jd(e,Df),W="The source port of an edge must be a port of the edge's source node (edge id: '"+g,nt=W+xE,K(new xf(nt));if(ce=(!Me.b&&(Me.b=new pn(Si,Me,4,7)),Me.b),Pi?c=Pi:c=Bn,ni(ce,c),ls=a(kp(t.g,q2(Gg(e,jpt))),35),R=Gg(e,"targetPort"),r=null,R&&(r=q2(R)),iu=a(kp(t.j,r),121),!ls)throw M=FC(e),rt="An edge must have a target node (edge id: '"+M,pt=rt+xE,K(new xf(pt));if(iu&&!Rp(Tf(iu),ls))throw b=Jd(e,Df),_t="The target port of an edge must be a port of the edge's target node (edge id: '"+b,It=_t+xE,K(new xf(It));if(ae=(!Me.c&&(Me.c=new pn(Si,Me,5,8)),Me.c),iu?l=iu:l=ls,ni(ae,l),(!Me.b&&(Me.b=new pn(Si,Me,4,7)),Me.b).i==0||(!Me.c&&(Me.c=new pn(Si,Me,5,8)),Me.c).i==0)throw v=Jd(e,Df),Gt=HFt+v,Zt=Gt+xE,K(new xf(Zt));return _7(e,Me),wa=C_(Me,!0,!0),e1=xL(e,"sourcePoint"),Ou=new uG(wa),Tfe(Ou.a,e1),fg=xL(e,"targetPoint"),L0=new pG(wa),Cfe(L0.a,fg),uf=_m(e,eK),mh=new gG(wa),k1e(mh.a,uf),Te=qV(t,e,Me),Te}function lZ(t,e){KX();var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn;if(Zt=t.e,R=t.d,r=t.a,Zt==0)switch(e){case 0:return"0";case 1:return lE;case 2:return"0.00";case 3:return"0.000";case 4:return"0.0000";case 5:return"0.00000";case 6:return"0.000000";default:return It=new om,e<0?It.a+="0E+":It.a+="0E",It.a+=-e,It.a}if(rt=R*10+1+7,pt=dt(nl,Pf,22,rt+1,15,1),n=rt,R==1)if(l=r[0],l<0){Bn=ns(l,uo);do O=Bn,Bn=dP(Bn,10),pt[--n]=48+or(Yg(O,Zg(Bn,10)))&qr;while(Pc(Bn,0)!=0)}else{Bn=l;do O=Bn,Bn=Bn/10|0,pt[--n]=48+(O-Bn*10)&qr;while(Bn!=0)}else{ae=dt(Gn,pi,22,R,15,1),Me=R,Aa(r,0,ae,0,R);t:for(;;){for(Gt=0,g=Me-1;g>=0;g--)Te=so(Yd(Gt,32),ns(ae[g],uo)),W=Jpe(Te),ae[g]=or(W),Gt=or(E1(W,32));nt=or(Gt),$=n;do pt[--n]=48+nt%10&qr;while((nt=nt/10|0)!=0&&n!=0);for(i=9-$+n,f=0;f0;f++)pt[--n]=48;for(v=Me-1;ae[v]==0;v--)if(v==0)break t;Me=v+1}for(;pt[n]==48;)++n}if(k=Zt<0,c=rt-n-e-1,e==0)return k&&(pt[--n]=45),ml(pt,n,rt-n);if(e>0&&c>=-6){if(c>=0){for(b=n+c,M=rt-1;M>=b;M--)pt[M+1]=pt[M];return pt[++b]=46,k&&(pt[--n]=45),ml(pt,n,rt-n+1)}for(v=2;v<-c+1;v++)pt[--n]=48;return pt[--n]=46,pt[--n]=48,k&&(pt[--n]=45),ml(pt,n,rt-n)}return ce=n+1,_t=new Bb,k&&(_t.a+="-"),rt-ce>=1?(S1(_t,pt[n]),_t.a+=".",_t.a+=ml(pt,n+1,rt-n-1)):_t.a+=ml(pt,n,rt-n),_t.a+="E",c>0&&(_t.a+="+"),_t.a+=""+c,_t.a}function h3e(t,e,n,i){var r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi,ls,iu,wa,e1,Ou,fg,L0,uf;if(pt=a(at((!t.b&&(t.b=new pn(Si,t,4,7)),t.b),0),97),It=pt.Yf(),Gt=pt.Zf(),_t=pt.Xf()/2,$=pt.Wf()/2,ct(pt,187)&&(rt=a(pt,121),It+=Tf(rt).i,It+=Tf(rt).i),It+=_t,Gt+=$,Me=a(at((!t.b&&(t.b=new pn(Si,t,4,7)),t.b),0),97),Pi=Me.Yf(),ls=Me.Zf(),Bn=Me.Xf()/2,Zt=Me.Wf()/2,ct(Me,187)&&(Te=a(Me,121),Pi+=Tf(Te).i,Pi+=Tf(Te).i),Pi+=Bn,ls+=Zt,(!t.a&&(t.a=new Wt(os,t,6,6)),t.a).i==0)f=(am(),b=new O3,b),ni((!t.a&&(t.a=new Wt(os,t,6,6)),t.a),f);else if((!t.a&&(t.a=new Wt(os,t,6,6)),t.a).i>1)for(O=new ZT((!t.a&&(t.a=new Wt(os,t,6,6)),t.a));O.e!=O.i._b();)qC(O);for(l=a(at((!t.a&&(t.a=new Wt(os,t,6,6)),t.a),0),270),W=Pi,Pi>It+_t?W=It+_t:PiGt+$?nt=Gt+$:lsIt-_t&&WGt-$&&ntPi+Bn?ce=Pi+Bn:Itls+Zt?ae=ls+Zt:GtPi-Bn&&cels-Zt&&aen&&(k=n-1),R=fg+pu(e,24)*VP*M-M/2,R<0?R=1:R>i&&(R=i-1),r=(am(),g=new N3,g),OV(r,k),BV(r,R),ni((!l.a&&(l.a=new Ss(sf,l,5)),l.a),r)}function gOt(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt;for(i=new Dt,f=new Dt,W=e/2,R=t._b(),r=a(t.cd(0),9),nt=a(t.cd(1),9),O=AX(r.a,r.b,nt.a,nt.b,W),Ut(i,(mi(0,O.c.length),a(O.c[0],9))),Ut(f,(mi(1,O.c.length),a(O.c[1],9))),b=2;b=0;g--)Xi(n,(mi(g,l.c.length),a(l.c[g],9)));return n}function f3e(t){var e,n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn;if(Zt=a(z(t,(qt(),Qi)),83),Zt!=(Ls(),dp)&&Zt!=ob){for(O=t.b,R=O.c.length,v=new qu((Ah(R+2,bZ),FL(so(so(5,R+2),(R+2)/10|0)))),$=new qu((Ah(R+2,bZ),FL(so(so(5,R+2),(R+2)/10|0)))),Ut(v,new vi),Ut(v,new vi),Ut($,new Dt),Ut($,new Dt),Gt=new Dt,e=0;eMe?M:Me;for(i=new H(ae.f);i.aMe?ce:Me}Ct(_t,aF,Xt(M)),Ct(_t,uF,Xt(ce))}for(nt=0,R=new H(e.b);R.a=t.j){t.a=-1,t.c=1;return}if(e=bo(t.i,t.d++),t.a=e,t.b==1){switch(e){case 92:if(i=10,t.d>=t.j)throw K(new ri(ai((Kn(),IO))));t.a=bo(t.i,t.d++);break;case 45:(t.e&512)==512&&t.d=t.j||bo(t.i,t.d)!=63)break;if(++t.d>=t.j)throw K(new ri(ai((Kn(),sK))));switch(e=bo(t.i,t.d++),e){case 58:i=13;break;case 61:i=14;break;case 33:i=15;break;case 91:i=19;break;case 62:i=18;break;case 60:if(t.d>=t.j)throw K(new ri(ai((Kn(),sK))));if(e=bo(t.i,t.d++),e==61)i=16;else if(e==33)i=17;else throw K(new ri(ai((Kn(),XFt))));break;case 35:for(;t.d=t.j)throw K(new ri(ai((Kn(),IO))));t.a=bo(t.i,t.d++);break;default:i=0}t.c=i}function mOt(t){var e,n,i,r,c,l,f,g,b;for(t.b=1,Ci(t),e=null,t.c==0&&t.a==94?(Ci(t),e=(Ai(),Ai(),++Ar,new Su(4)),jc(e,0,EE),f=(++Ar,new Su(4))):f=(Ai(),Ai(),++Ar,new Su(4)),r=!0;(b=t.c)!=1;){if(b==0&&t.a==93&&!r){e&&(f4(e,f),f=e);break}if(n=t.a,i=!1,b==10)switch(n){case 100:case 68:case 119:case 87:case 115:case 83:uw(f,rE(n)),i=!0;break;case 105:case 73:case 99:case 67:n=(uw(f,rE(n)),-1),i=!0;break;case 112:case 80:if(g=Plt(t,n),!g)throw K(new ri(ai((Kn(),oK))));uw(f,g),i=!0;break;default:n=hht(t)}else if(b==24&&!r){if(e&&(f4(e,f),f=e),c=mOt(t),f4(f,c),t.c!=0||t.a!=93)throw K(new ri(ai((Kn(),rUt))));break}if(Ci(t),!i){if(b==0){if(n==91)throw K(new ri(ai((Kn(),Vpt))));if(n==93)throw K(new ri(ai((Kn(),qpt))));if(n==45&&!r&&t.a!=93)throw K(new ri(ai((Kn(),cK))))}if(t.c!=0||t.a!=45||n==45&&r)jc(f,n,n);else{if(Ci(t),(b=t.c)==1)throw K(new ri(ai((Kn(),RO))));if(b==0&&t.a==93)jc(f,n,n),jc(f,45,45);else{if(b==0&&t.a==93||b==24)throw K(new ri(ai((Kn(),cK))));if(l=t.a,b==0){if(l==91)throw K(new ri(ai((Kn(),Vpt))));if(l==93)throw K(new ri(ai((Kn(),qpt))));if(l==45)throw K(new ri(ai((Kn(),cK))))}else b==10&&(l=hht(t));if(Ci(t),n>l)throw K(new ri(ai((Kn(),cUt))));jc(f,n,l)}}}r=!1}if(t.c==1)throw K(new ri(ai((Kn(),RO))));return E_(f),h4(f),t.b=0,Ci(t),f}function p3e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi,ls,iu,wa;for(di(n,"Greedy cycle removal",1),rt=e.a,wa=rt.c.length,t.a=dt(Gn,pi,22,wa,15,1),t.c=dt(Gn,pi,22,wa,15,1),t.b=dt(Gn,pi,22,wa,15,1),g=0,W=new H(rt);W.a0?Te+1:1);for(c=new H(It.f);c.a0?Te+1:1)}t.c[g]==0?Xi(t.d,O):t.a[g]==0&&Xi(t.e,O),++g}for(R=-1,k=1,v=new Dt,Me=a(z(e,(Ft(),NE)),214);wa>0;){for(;t.d.b!=0;)Pi=a(g$(t.d),8),t.b[Pi.o]=R--,Sht(t,Pi),--wa;for(;t.e.b!=0;)ls=a(g$(t.e),8),t.b[ls.o]=k++,Sht(t,ls),--wa;if(wa>0){for(M=Vs,nt=new H(rt);nt.a=M&&(pt>M&&(v.c=dt(un,te,1,0,5,1),M=pt),v.c[v.c.length]=O));b=a(Ee(v,$q(Me,v.c.length)),8),t.b[b.o]=k++,Sht(t,b),--wa}}for(Bn=rt.c.length+1,g=0;gt.b[iu]&&(X1(i,!0),Ct(e,zB,(me(),me(),!0)));t.a=null,t.c=null,t.b=null,ld(t.e),ld(t.d),Vn(n)}function g3e(t){Xn(t.c,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#decimal"])),Xn(t.d,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#integer"])),Xn(t.e,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#boolean"])),Xn(t.f,ui,Y(Z(At,1),wt,2,6,[Ns,"EBoolean",Ti,"EBoolean:Object"])),Xn(t.i,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#byte"])),Xn(t.g,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#hexBinary"])),Xn(t.j,ui,Y(Z(At,1),wt,2,6,[Ns,"EByte",Ti,"EByte:Object"])),Xn(t.n,ui,Y(Z(At,1),wt,2,6,[Ns,"EChar",Ti,"EChar:Object"])),Xn(t.t,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#double"])),Xn(t.u,ui,Y(Z(At,1),wt,2,6,[Ns,"EDouble",Ti,"EDouble:Object"])),Xn(t.F,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#float"])),Xn(t.G,ui,Y(Z(At,1),wt,2,6,[Ns,"EFloat",Ti,"EFloat:Object"])),Xn(t.I,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#int"])),Xn(t.J,ui,Y(Z(At,1),wt,2,6,[Ns,"EInt",Ti,"EInt:Object"])),Xn(t.N,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#long"])),Xn(t.O,ui,Y(Z(At,1),wt,2,6,[Ns,"ELong",Ti,"ELong:Object"])),Xn(t.Z,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#short"])),Xn(t.$,ui,Y(Z(At,1),wt,2,6,[Ns,"EShort",Ti,"EShort:Object"])),Xn(t._,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#string"]))}function Jht(t,e,n,i){var r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi;if(xNt(e),g=a(at((!e.b&&(e.b=new pn(Si,e,4,7)),e.b),0),97),v=a(at((!e.c&&(e.c=new pn(Si,e,5,8)),e.c),0),97),f=zc(g),b=zc(v),l=(!e.a&&(e.a=new Wt(os,e,6,6)),e.a).i==0?null:a(at((!e.a&&(e.a=new Wt(os,e,6,6)),e.a),0),270),Zt=a(zi(t.a,f),8),Me=a(zi(t.a,b),8),ce=null,Bn=null,ct(g,187)&&(Gt=a(zi(t.a,g),279),ct(Gt,11)?ce=a(Gt,11):ct(Gt,8)&&(Zt=a(Gt,8),ce=a(Ee(Zt.i,0),11))),ct(v,187)&&(Te=a(zi(t.a,v),279),ct(Te,11)?Bn=a(Te,11):ct(Te,8)&&(Me=a(Te,8),Bn=a(Ee(Me.i,0),11))),!Zt||!Me)return null;for($=new Np,Uo($,e),Ct($,(Ft(),li),e),Ct($,(qt(),Ro),null),R=a(z(i,Qc),19),Zt==Me&&R.nc((So(),A6)),ce||(It=(Fo(),ba),ae=null,l&&Gd(a(z(Zt,Qi),83))&&(ae=new We(l.j,l.k),vkt(ae,rN(e)),jkt(ae,n),_C(b,f)&&(It=Ga,sr(ae,Zt.k))),ce=a7t(Zt,ae,It,i)),Bn||(It=(Fo(),Ga),Pi=null,l&&Gd(a(z(Me,Qi),83))&&(Pi=new We(l.b,l.c),vkt(Pi,rN(e)),jkt(Pi,n)),Bn=a7t(Me,Pi,It,Mc(Me))),Hs($,ce),Ts($,Bn),k=new $n((!e.n&&(e.n=new Wt(ic,e,1,7)),e.n));k.e!=k.i._b();)if(M=a(ci(k),137),!lt(de(cn(M,v0)))&&M.a)switch(W=_q(M),Ut($.b,W),a(z(W,ng),226).g){case 2:case 3:R.nc((So(),RE));break;case 1:case 0:R.nc((So(),IE)),Ct(W,ng,(ip(),wA))}if(c=a(z(i,OE),317),nt=a(z(i,JB),292),r=c==(I2(),S6)||nt==(WC(),iQ),l&&(!l.a&&(l.a=new Ss(sf,l,5)),l.a).i!=0&&r){for(rt=bP(l),O=new Va,_t=qn(rt,0);_t.b!=_t.d.c;)pt=a(Yn(_t),9),Xi(O,new Oo(pt));Ct($,hmt,O)}return $}function Qht(t,e,n,i,r,c){var l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi;for(f=a(Ee(t.d.c.b,i),26),Me=new $r,R=new $r,k=0;kn&&(ce=R.a.Zb(nt,R),ce==null);for(Bn=new $r,O=new $r,pt=Me.a.Xb().tc();pt.hc();)for(nt=a(pt.ic(),8),l=e==1?br(nt):Rs(nt),b=(Ao(),new $d(id(Zd(l.a,new X))));Jn(b);)g=a(In(b),14),ql(nt.c)!=ql(g.d.g.c)&&Ir(Bn,g.d.g);for(_t=R.a.Xb().tc();_t.hc();)for(nt=a(_t.ic(),8),l=e==1?br(nt):Rs(nt),b=(Ao(),new $d(id(Zd(l.a,new X))));Jn(b);)g=a(In(b),14),ql(nt.c)!=ql(g.d.g.c)&&Ir(O,g.d.g);for(Qjt&&rd(),Zt=a(Ee(t.d.c.b,i+(e==1?1:-1)),26),$=Vs,W=qi,M=0;MM?$:M:O.a.Qb(nt)&&(W=WM&&(Me=0,Bn+=v+Zt,v=0),Bbe(It,l,Me,Bn),e=y.Math.max(e,Me+Gt.a),v=y.Math.max(v,Gt.b),Me+=Gt.a+Zt;for(_t=new vi,n=new vi,ae=new H(t);ae.a=2){for(k=!0,rt=(mi(1,M.c.length),a(M.c[1],26)),$=new H(l.a);$.a<$.c.c.length;){if(R=a(G($),8),zt(z(R,(qt(),la)))===zt((bl(),Sx))){k=!1;break}for(r=Rn(br(R));Jn(r);)if(i=a(In(r),14),i.d.g.c==rt){k=!1;break}if(!k)break}if(k){for(nt=a(xo(l.a,dt(Cl,Ih,8,l.a.c.length,0,1)),123),O=0,W=nt.length;O=2){for(k=!0,pt=a(Ee(M,M.c.length-2),26),$=new H(g.a);$.a<$.c.c.length;){if(R=a(G($),8),zt(z(R,(qt(),la)))===zt((bl(),Sx))){k=!1;break}for(r=Rn(Rs(R));Jn(r);)if(i=a(In(r),14),i.c.g.c==pt){k=!1;break}if(!k)break}if(k){for(nt=a(xo(g.a,dt(Cl,Ih,8,g.a.c.length,0,1)),123),O=0,W=nt.length;OkX(c))&&(M=c);for(!M&&(M=(mi(0,W.c.length),a(W.c[0],164))),$=new H(e.b);$.a<$.c.c.length;)for(O=a(G($),26),_t=new H(O.a);_t.a<_t.c.c.length;)pt=a(G(_t),8),pt.k.b=lt(M.p[pt.o])+lt(M.d[pt.o]);for(t.a&&(rd(),""+Y9t(M),""+n0e(M)),l=new H(W);l.a0?(O=(It+1)*t.d,O=0&&(bh+=(It+2)*t.d)}pt=Te,f=g}while(Te);for(r=new H(t.j);r.a=-1900?1:0,n>=4?Ii(t,Y(Z(At,1),wt,2,6,[ROt,DOt])[f]):Ii(t,Y(Z(At,1),wt,2,6,["BC","AD"])[f]);break;case 121:lde(t,n,i);break;case 77:Ave(t,n,i);break;case 107:g=r.q.getHours(),g==0?dd(t,24,n):dd(t,g,n);break;case 83:bbe(t,n,r);break;case 69:v=i.q.getDay(),n==5?Ii(t,Y(Z(At,1),wt,2,6,["S","M","T","W","T","F","S"])[v]):n==4?Ii(t,Y(Z(At,1),wt,2,6,[IZ,RZ,DZ,NZ,OZ,BZ,FZ])[v]):Ii(t,Y(Z(At,1),wt,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[v]);break;case 97:r.q.getHours()>=12&&r.q.getHours()<24?Ii(t,Y(Z(At,1),wt,2,6,["AM","PM"])[1]):Ii(t,Y(Z(At,1),wt,2,6,["AM","PM"])[0]);break;case 104:M=r.q.getHours()%12,M==0?dd(t,12,n):dd(t,M,n);break;case 75:k=r.q.getHours()%12,dd(t,k,n);break;case 72:R=r.q.getHours(),dd(t,R,n);break;case 99:O=i.q.getDay(),n==5?Ii(t,Y(Z(At,1),wt,2,6,["S","M","T","W","T","F","S"])[O]):n==4?Ii(t,Y(Z(At,1),wt,2,6,[IZ,RZ,DZ,NZ,OZ,BZ,FZ])[O]):n==3?Ii(t,Y(Z(At,1),wt,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[O]):dd(t,O,1);break;case 76:$=i.q.getMonth(),n==5?Ii(t,Y(Z(At,1),wt,2,6,["J","F","M","A","M","J","J","A","S","O","N","D"])[$]):n==4?Ii(t,Y(Z(At,1),wt,2,6,[yZ,xZ,MZ,EZ,nx,SZ,TZ,CZ,AZ,kZ,LZ,PZ])[$]):n==3?Ii(t,Y(Z(At,1),wt,2,6,["Jan","Feb","Mar","Apr",nx,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"])[$]):dd(t,$+1,n);break;case 81:W=i.q.getMonth()/3|0,n<4?Ii(t,Y(Z(At,1),wt,2,6,["Q1","Q2","Q3","Q4"])[W]):Ii(t,Y(Z(At,1),wt,2,6,["1st quarter","2nd quarter","3rd quarter","4th quarter"])[W]);break;case 100:nt=i.q.getDate(),dd(t,nt,n);break;case 109:b=r.q.getMinutes(),dd(t,b,n);break;case 115:l=r.q.getSeconds(),dd(t,l,n);break;case 122:n<4?Ii(t,c.c[0]):Ii(t,c.c[1]);break;case 118:Ii(t,c.b);break;case 90:n<3?Ii(t,P0e(c)):n==3?Ii(t,N0e(c)):Ii(t,O0e(c.a));break;default:return!1}return!0}function eft(){eft=P;var t;wmt=(t=a(xu(vJ),10),new ja(t,a(cu(t,t.length),10),0)),LHt=new bn(qft,wmt),$Ht=new bn(Xft,(me(),me(),!1)),Smt=(dN(),RJ),ZHt=new bn(mO,Smt),uGt=new bn(Zft,!1),lGt=new bn(Yft,!0),Xt(1),LGt=new bn(Kft,Xt(7)),PGt=new bn(Jft,!1),MGt=new bn(Qft,!1),ymt=(BN(),yJ),OHt=new bn(fY,ymt),Amt=(E7(),tQ),cGt=new bn(n6,Amt),Tmt=(bl(),Sx),tGt=new bn(tdt,Tmt),kmt=(U2(),V6),aGt=new bn(edt,kmt),Xt(-1),eGt=new bn(dY,Xt(4)),Xt(-1),iGt=new bn(pY,Xt(2)),Cmt=(T_(),iF),oGt=new bn(gY,Cmt),Xt(0),sGt=new bn(mY,Xt(0)),JHt=new bn(bY,Xt(qi)),_mt=(I2(),T6),NHt=new bn(wY,_mt),RHt=new bn(ndt,.1),DHt=new bn(idt,!1),Xt(0),PHt=new bn(rdt,Xt(40)),vmt=(BM(),IJ),IHt=new bn(sdt,vmt),Rmt=(WC(),z6),xGt=new bn(mE,Rmt),gGt=new kr(vY),Lmt=(RL(),lF),hGt=new bn(_Y,Lmt),Pmt=(mP(),RB),dGt=new bn(yY,Pmt),new q3,bGt=new bn(xY,.3),vGt=new kr(MY),Imt=(nw(),nF),_Gt=new bn(odt,Imt),Emt=(s7(),sQ),UHt=new bn(EY,Emt),GHt=new bn(bO,!0),jHt=new bn(wO,.4),AGt=new bn(cdt,10),CGt=new bn(adt,10),kGt=new bn(udt,20),Xt(0),EGt=new bn(ldt,Xt(0)),Xt(0),SGt=new bn(hdt,Xt(0)),Xt(0),TGt=new bn(fdt,Xt(0)),CHt=new bn(SY,!1),bmt=(QM(),V4),kHt=new bn(ddt,bmt),mmt=(vN(),wJ),AHt=new bn(pdt,mmt),qHt=new bn(vO,!1),Xt(0),VHt=new bn(TY,Xt(16)),Xt(0),XHt=new bn(CY,Xt(5)),Bmt=(WN(),cQ),qGt=new bn(x4,Bmt),IGt=new bn(gdt,10),RGt=new bn(mdt,1),Nmt=(IN(),PB),FGt=new bn(_O,Nmt),DGt=new kr(AY),Dmt=Xt(1),Xt(0),OGt=new bn(kY,Dmt),Omt=(NN(),oQ),$Gt=new bn(LY,Omt),jGt=new bn(yO,!0),UGt=new bn(xO,2),GGt=new bn(PY,!0),Mmt=(C7(),IB),FHt=new bn(bdt,Mmt),xmt=(XC(),mJ),BHt=new bn(wdt,xmt),KHt=xJ,YHt=S6,nGt=eF,rGt=eF,QHt=QJ,mGt=j6,fGt=z6,pGt=z6,wGt=rQ,yGt=j6,zHt=(gd(),rb),WHt=rb,HHt=rb,NGt=_J,BGt=PB,VGt=aQ,HGt=q6,zGt=q6,WGt=q6}function dr(){dr=P;var t,e;Nwt=new kr(rFt),Owt=(md(),LQ),fVt=new bn(Odt,Owt),new q3,jE=new bn(hE,null),dVt=new kr(xpt),RQ=new bn(RY,(me(),me(),!1)),Fwt=(Js(),Ff),gA=new bn(NY,Fwt),jwt=(gd(),VQ),zwt=new bn(i6,jwt),bVt=new bn(_pt,!1),Wwt=(Kg(),RF),ay=new bn(Bdt,Wwt),Jwt=new x2(12),uy=new bn(ox,Jwt),NQ=new bn(dO,!1),ivt=(Ls(),ob),iI=new bn(aY,ivt),Ix=new kr(SO),LF=new kr(YP),HQ=new kr(fO),GQ=new kr(KP),$wt=new Va,Px=new bn(Xdt,$wt),gVt=new bn(Jdt,!1),wVt=new bn(Qdt,!1),new kr(sFt),Vwt=new a2,CF=new bn(ipt,Vwt),OQ=new bn(Ddt,!1),new q3,MVt=new bn(oFt,1),new bn(cFt,!0),Xt(0),new bn(aFt,Xt(100)),new bn(uFt,!1),Xt(0),new bn(lFt,Xt(4e3)),Xt(0),new bn(hFt,Xt(400)),new bn(fFt,!1),new bn(dFt,!0),new bn(pFt,!1),Bwt=(a7(),JQ),pVt=new bn(ypt,Bwt),ovt=new bn(nY,12),EVt=new bn(Tdt,10),cvt=new bn(cY,2),SVt=new bn(Cdt,10),avt=new bn(Adt,0),PF=new bn(Ldt,5),uvt=new bn(kdt,1),ly=new bn(dE,20),fvt=new bn(Pdt,10),WQ=new kr(Idt),hvt=new GEt,lvt=new bn(rpt,hvt),yVt=new kr(npt),Qwt=!1,_Vt=new bn(ept,Qwt),qwt=new x2(5),vVt=new bn(gFt,qwt),Xwt=(r0(),e=a(xu(to),10),new ja(e,a(cu(e,e.length),10),0)),AF=new bn(zdt,Xwt),evt=(G1(),sb),tvt=new bn(Gdt,evt),FQ=new kr(Wdt),UQ=new kr($dt),zQ=new kr(Vdt),BQ=new kr(qdt),Zwt=(t=a(xu(EA),10),new ja(t,a(cu(t,t.length),10),0)),HE=new bn(MO,Zwt),Kwt=qe((ma(),WE)),kF=new bn(DY,Kwt),Ywt=new We(0,0),nI=new bn(EO,Ywt),Uwt=(ip(),IF),eI=new bn(Zdt,Uwt),mVt=new bn(Ydt,!1),new kr(mFt),Xt(1),new bn(bFt,null),nvt=new kr(tpt),xVt=new kr(Kdt),svt=(Ht(),Wc),mA=new bn(Ndt,svt),nu=new kr(Rdt),rvt=(Kh(),hy),jQ=new bn(jdt,rvt),rI=new bn(Hdt,!1),TF=new bn(Fdt,!1),DQ=new bn(Udt,!1),Hwt=new bn(iY,1),Gwt=(S7(),XQ),new bn(wFt,Gwt)}function y3e(t){t.gb||(t.gb=!0,t.b=cc(t,0),Cr(t.b,18),nr(t.b,19),t.a=cc(t,1),Cr(t.a,1),nr(t.a,2),nr(t.a,3),nr(t.a,4),nr(t.a,5),t.o=cc(t,2),Cr(t.o,8),Cr(t.o,9),nr(t.o,10),nr(t.o,11),nr(t.o,12),nr(t.o,13),nr(t.o,14),nr(t.o,15),nr(t.o,16),nr(t.o,17),nr(t.o,18),nr(t.o,19),nr(t.o,20),nr(t.o,21),nr(t.o,22),nr(t.o,23),ko(t.o),ko(t.o),ko(t.o),ko(t.o),ko(t.o),ko(t.o),ko(t.o),ko(t.o),ko(t.o),ko(t.o),t.p=cc(t,3),Cr(t.p,2),Cr(t.p,3),Cr(t.p,4),Cr(t.p,5),nr(t.p,6),nr(t.p,7),ko(t.p),ko(t.p),t.q=cc(t,4),Cr(t.q,8),t.v=cc(t,5),nr(t.v,9),ko(t.v),ko(t.v),ko(t.v),t.w=cc(t,6),Cr(t.w,2),Cr(t.w,3),Cr(t.w,4),nr(t.w,5),t.B=cc(t,7),nr(t.B,1),ko(t.B),ko(t.B),ko(t.B),t.Q=cc(t,8),nr(t.Q,0),ko(t.Q),t.R=cc(t,9),Cr(t.R,1),t.S=cc(t,10),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),t.T=cc(t,11),nr(t.T,10),nr(t.T,11),nr(t.T,12),nr(t.T,13),nr(t.T,14),ko(t.T),ko(t.T),t.U=cc(t,12),Cr(t.U,2),Cr(t.U,3),nr(t.U,4),nr(t.U,5),nr(t.U,6),nr(t.U,7),ko(t.U),t.V=cc(t,13),nr(t.V,10),t.W=cc(t,14),Cr(t.W,18),Cr(t.W,19),Cr(t.W,20),nr(t.W,21),nr(t.W,22),nr(t.W,23),t.bb=cc(t,15),Cr(t.bb,10),Cr(t.bb,11),Cr(t.bb,12),Cr(t.bb,13),Cr(t.bb,14),Cr(t.bb,15),Cr(t.bb,16),nr(t.bb,17),ko(t.bb),ko(t.bb),t.eb=cc(t,16),Cr(t.eb,2),Cr(t.eb,3),Cr(t.eb,4),Cr(t.eb,5),Cr(t.eb,6),Cr(t.eb,7),nr(t.eb,8),nr(t.eb,9),t.ab=cc(t,17),Cr(t.ab,0),Cr(t.ab,1),t.H=cc(t,18),nr(t.H,0),nr(t.H,1),nr(t.H,2),nr(t.H,3),nr(t.H,4),nr(t.H,5),ko(t.H),t.db=cc(t,19),nr(t.db,2),t.c=yi(t,20),t.d=yi(t,21),t.e=yi(t,22),t.f=yi(t,23),t.i=yi(t,24),t.g=yi(t,25),t.j=yi(t,26),t.k=yi(t,27),t.n=yi(t,28),t.r=yi(t,29),t.s=yi(t,30),t.t=yi(t,31),t.u=yi(t,32),t.fb=yi(t,33),t.A=yi(t,34),t.C=yi(t,35),t.D=yi(t,36),t.F=yi(t,37),t.G=yi(t,38),t.I=yi(t,39),t.J=yi(t,40),t.L=yi(t,41),t.M=yi(t,42),t.N=yi(t,43),t.O=yi(t,44),t.P=yi(t,45),t.X=yi(t,46),t.Y=yi(t,47),t.Z=yi(t,48),t.$=yi(t,49),t._=yi(t,50),t.cb=yi(t,51),t.K=yi(t,52))}function Ft(){Ft=P;var t,e;li=new kr(Nft),amt=new kr("coordinateOrigin"),UJ=new kr("processors"),cmt=new es("compoundNode",(me(),me(),!1)),P6=new es("insideConnections",!1),xd=new kr("nestedLGraph"),tg=new kr("parentLNode"),hmt=new kr("originalBendpoints"),fmt=new kr("originalDummyNodePosition"),dmt=new kr("originalLabelEdge"),WB=new kr("representedLabels"),jB=new kr("endLabels"),xx=new es("labelSide",(Cu(),fI)),ey=new es("maxEdgeThickness",0),eg=new es("reversed",!1),NE=new kr(Oft),Iu=new es("longEdgeSource",null),Ru=new es("longEdgeTarget",null),Mx=new es("longEdgeHasLabelDummies",!1),I6=new es("longEdgeBeforeLabelDummy",!1),NJ=new es("edgeConstraint",(l_(),MJ)),DE=new kr("inLayerLayoutUnit"),w0=new es("inLayerConstraint",(tp(),k6)),yx=new es("inLayerSuccessorConstraint",new Dt),Du=new kr("portDummy"),UB=new es("crossingHint",Xt(0)),Qc=new es("graphProperties",(e=a(xu(LJ),10),new ja(e,a(cu(e,e.length),10),0))),wc=new es("externalPortSide",(Ht(),Wc)),lmt=new es("externalPortSize",new go),OJ=new kr("externalPortReplacedDummies"),HB=new kr("externalPortReplacedDummy"),_x=new es("externalPortConnections",(t=a(xu(Ia),10),new ja(t,a(cu(t,t.length),10),0))),Ym=new es(LBt,0),smt=new kr("barycenterAssociates"),Ex=new kr("TopSideComments"),vx=new kr("BottomSideComments"),FB=new kr("CommentConnectionPort"),BJ=new es("inputCollect",!1),FJ=new es("outputCollect",!1),zB=new es("cyclic",!1),L6=new es("bigNodeOriginalSize",new Rb(0)),_w=new es("bigNodeInitial",!1),omt=new es("org.eclipse.elk.alg.layered.bigNodeLabels",new Dt),DJ=new es("org.eclipse.elk.alg.layered.postProcess",null),umt=new kr("crossHierarchyMap"),HJ=new kr("targetOffset"),SHt=new es("splineLabelSize",new go),R6=new es("splineLoopSide",(mu(),Lx)),jJ=new es("splineSelfLoopComponents",new Dt),pmt=new es("splineSelfLoopMargins",new a2),yw=new kr("spacings"),GB=new es("partitionConstraint",!1),Zm=new kr("breakingPoint.info"),X4=new kr("splines.route.start"),zJ=new kr("splines.edgeChain")}function Po(){Po=P,m0t=new Ur("LEFT_DIR_PREPROCESSOR",0),n0t=new Ur("DOWN_DIR_PREPROCESSOR",1),L0t=new Ur("UP_DIR_PREPROCESSOR",2),t0t=new Ur("COMMENT_PREPROCESSOR",3),G4=new Ur("EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER",4),T0t=new Ur("SPLINE_SELF_LOOP_PREPROCESSOR",5),aJ=new Ur("INTERACTIVE_EXTERNAL_PORT_POSITIONER",6),y0t=new Ur("PARTITION_PREPROCESSOR",7),oJ=new Ur("BIG_NODES_PREPROCESSOR",8),yB=new Ur("LABEL_DUMMY_INSERTER",9),u0t=new Ur("HIGH_DEGREE_NODE_LAYER_PROCESSOR",10),_0t=new Ur("PARTITION_POSTPROCESSOR",11),w0t=new Ur("NODE_PROMOTION",12),PE=new Ur("LAYER_CONSTRAINT_PROCESSOR",13),o0t=new Ur("HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR",14),sJ=new Ur("BIG_NODES_INTERMEDIATEPROCESSOR",15),M0t=new Ur("SEMI_INTERACTIVE_CROSSMIN_PROCESSOR",16),Zgt=new Ur("BREAKING_POINT_INSERTER",17),hJ=new Ur("LONG_EDGE_SPLITTER",18),dJ=new Ur("PORT_SIDE_PROCESSOR",19),_B=new Ur("INVERTED_PORT_PROCESSOR",20),x0t=new Ur("SELF_LOOP_PROCESSOR",21),fJ=new Ur("PORT_LIST_SORTER",22),SB=new Ur("NORTH_SOUTH_PORT_PREPROCESSOR",23),Ygt=new Ur("BREAKING_POINT_PROCESSOR",24),v0t=new Ur(EBt,25),A0t=new Ur(SBt,26),S0t=new Ur("SPLINE_SELF_LOOP_POSITIONER",27),E0t=new Ur("SINGLE_EDGE_GRAPH_WRAPPER",28),uJ=new Ur("IN_LAYER_CONSTRAINT_PROCESSOR",29),cJ=new Ur("BIG_NODES_SPLITTER",30),i0t=new Ur("END_NODE_PORT_LABEL_MANAGEMENT_PROCESSOR",31),d0t=new Ur("LABEL_AND_NODE_SIZE_PROCESSOR",32),C0t=new Ur("SPLINE_SELF_LOOP_ROUTER",33),b0t=new Ur("NODE_MARGIN_CALCULATOR",34),vB=new Ur("END_LABEL_PREPROCESSOR",35),MB=new Ur("LABEL_DUMMY_SWITCHER",36),Jgt=new Ur("CENTER_LABEL_MANAGEMENT_PROCESSOR",37),LE=new Ur("LABEL_SIDE_SELECTOR",38),h0t=new Ur("HYPEREDGE_DUMMY_MERGER",39),c0t=new Ur("HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR",40),p0t=new Ur("LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR",41),W4=new Ur("HIERARCHICAL_PORT_POSITION_PROCESSOR",42),E6=new Ur("BIG_NODES_POSTPROCESSOR",43),Qgt=new Ur("COMMENT_POSTPROCESSOR",44),f0t=new Ur("HYPERNODE_PROCESSOR",45),a0t=new Ur("HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER",46),lJ=new Ur("LONG_EDGE_JOINER",47),Kgt=new Ur("BREAKING_POINT_REMOVER",48),EB=new Ur("NORTH_SOUTH_PORT_POSTPROCESSOR",49),l0t=new Ur("HORIZONTAL_COMPACTOR",50),xB=new Ur("LABEL_DUMMY_REMOVER",51),r0t=new Ur("FINAL_SPLINE_BENDPOINTS_CALCULATOR",52),TB=new Ur("REVERSED_EDGE_RESTORER",53),wB=new Ur("END_LABEL_POSTPROCESSOR",54),s0t=new Ur("HIERARCHICAL_NODE_RESIZER",55),g0t=new Ur("LEFT_DIR_POSTPROCESSOR",56),e0t=new Ur("DOWN_DIR_POSTPROCESSOR",57),k0t=new Ur("UP_DIR_POSTPROCESSOR",58)}function x3e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi,ls,iu,wa,e1,Ou,fg,L0,uf,mh,bh,JE,CI,AI,Wx,wtt,NA,OXt,L_t,gb,OA,vtt,$x,BA,Ww,FA,_tt,BXt;for(L_t=0,Bn=0,iu=e.length;Bn0&&(t.a[mh.o]=L_t++)}for(BA=0,Pi=0,wa=n.length;Pi0;){for(mh=(Hn(AI.b>0),a(AI.a.cd(AI.c=--AI.b),11)),CI=0,f=new H(mh.d);f.a0&&(mh.i==(Ht(),Tn)?(t.a[mh.o]=BA,++BA):(t.a[mh.o]=BA+e1+fg,++fg))}BA+=fg}for(JE=(ts(),new vi),R=new qa,Me=0,ls=e.length;Meb.b&&(b.b=Wx)):mh.g.c==OXt&&(Wxb.c&&(b.c=Wx));for(NL(O,0,O.length,null),$x=dt(Gn,pi,22,O.length,15,1),i=dt(Gn,pi,22,BA+1,15,1),W=0;W0;)Gt%2>0&&(r+=_tt[Gt+1]),Gt=(Gt-1)/2|0,++_tt[Gt];for(ce=dt(AWt,te,336,O.length*2,0,1),pt=0;pt'?":le(XFt,t)?"'(?<' or '(? toIndex: ",vft=", toIndex: ",$Ot="org.eclipse.elk.alg.common.compaction",VOt="Scanline/EventHandler",vd="org.eclipse.elk.alg.common.compaction.oned",qOt="CNode belongs to another CGroup.",XOt="ISpacingsHandler/1",qZ="The ",XZ=" instance has been finished already.",ZOt="The direction ",YOt=" is not supported by the CGraph instance.",KOt="OneDimensionalCompactor",JOt="OneDimensionalCompactor/lambda$0$Type",QOt="Quadruplet",tBt="ScanlineConstraintCalculator",eBt="ScanlineConstraintCalculator/ConstraintsScanlineHandler",nBt="ScanlineConstraintCalculator/ConstraintsScanlineHandler/lambda$0$Type",iBt="ScanlineConstraintCalculator/Timestamp",rBt="ScanlineConstraintCalculator/lambda$0$Type",sh={138:1,56:1},ZZ="org.eclipse.elk.alg.common.compaction.options",sa="org.eclipse.elk.core.data",_ft="org.eclipse.elk.polyomino.traversalStrategy",yft="org.eclipse.elk.polyomino.lowLevelSort",xft="org.eclipse.elk.polyomino.highLevelSort",Mft="org.eclipse.elk.polyomino.fill",_d={154:1},YZ="polyomino",If="org.eclipse.elk.alg.common.compaction.polyomino",aO="org.eclipse.elk.alg.common.compaction.polyomino.structures",Eft="Direction",KZ="Grid is only of size ",JZ=". Requested point (",QZ=") is out of bounds.",uO=" Given center based coordinates were (",XP="org.eclipse.elk.graph.properties",sBt="IPropertyHolder",tY={3:1,93:1,131:1},O_={244:1},g4="org.eclipse.elk.core",oBt="Connected Components Compaction",cBt="org.eclipse.elk.alg.disco",lO="org.eclipse.elk.alg.disco.graph",eY="org.eclipse.elk.alg.disco.options",aBt="CompactionStrategy",Sft="org.eclipse.elk.disco.componentCompaction.strategy",Tft="org.eclipse.elk.disco.componentCompaction.componentLayoutAlgorithm",Cft="org.eclipse.elk.disco.debug.discoGraph",Aft="org.eclipse.elk.disco.debug.discoPolys",uBt="componentCompaction",c0="org.eclipse.elk.disco",nY="org.eclipse.elk.spacing.componentComponent",iY="org.eclipse.elk.edge.thickness",hE="org.eclipse.elk.aspectRatio",ox="org.eclipse.elk.padding",B_="org.eclipse.elk.alg.disco.transform",rY=1.5707963267948966,fw={3:1,4:1,5:1,175:1},a0={221:1,3:1,4:1},kft={3:1,6:1,4:1,5:1,63:1,73:1},Lft="org.eclipse.elk.alg.force",Pft="ComponentsProcessor",lBt="ComponentsProcessor/1",ZP="org.eclipse.elk.alg.force.graph",hBt="Component Layout",Ift="org.eclipse.elk.alg.force.model",yd=.01,hO="org.eclipse.elk.force.model",Rft="org.eclipse.elk.force.iterations",Dft="org.eclipse.elk.force.repulsivePower",sY="org.eclipse.elk.force.temperature",op=.001,oY="org.eclipse.elk.force.repulsion",m4="org.eclipse.elk.alg.force.options",fE=1.600000023841858,Rf="org.eclipse.elk.force",YP="org.eclipse.elk.priority",dE="org.eclipse.elk.spacing.nodeNode",cY="org.eclipse.elk.spacing.edgeLabel",fO="org.eclipse.elk.randomSeed",KP="org.eclipse.elk.separateConnectedComponents",dO="org.eclipse.elk.interactive",aY="org.eclipse.elk.portConstraints",Nft="origin",Oft="random",fBt="boundingBox.upLeft",dBt="boundingBox.lowRight",Bft="org.eclipse.elk.stress.fixed",Fft="org.eclipse.elk.stress.desiredEdgeLength",Uft="org.eclipse.elk.stress.dimension",zft="org.eclipse.elk.stress.epsilon",jft="org.eclipse.elk.stress.iterationLimit",b4="org.eclipse.elk.stress",pBt="ELK Stress",uY="org.eclipse.elk.alg.force.stress",gBt="Layered layout",JP="org.eclipse.elk.alg.layered",QP="org.eclipse.elk.alg.layered.compaction.components",w4="org.eclipse.elk.alg.layered.compaction.oned",pO="org.eclipse.elk.alg.layered.compaction.oned.algs",u0="org.eclipse.elk.alg.layered.compaction.recthull",K1="org.eclipse.elk.alg.layered.components",mBt={3:1,6:1,4:1,5:1,85:1,63:1,73:1},gO="org.eclipse.elk.alg.layered.compound",_l={3:1,6:1,4:1,5:1,99:1,85:1,63:1,73:1},Br={50:1},oa="org.eclipse.elk.alg.layered.graph",Ih={3:1,6:1,4:1,5:1,85:1,123:1,148:1,63:1,73:1},bBt="Not supported by LGraph",wBt=`([{"' \r -`,vBt=`)]}"' \r -`,_Bt="The given string contains parts that cannot be parsed as numbers.",t6="org.eclipse.elk.core.math",yBt={3:1,4:1,135:1,211:1,428:1},xBt={3:1,4:1,119:1,211:1,428:1},l0="org.eclipse.elk.alg.layered.graph.transform",Dn="org.eclipse.elk.alg.layered.intermediate",MBt="Big nodes pre-processing",Hft={3:1,6:1,4:1,5:1,85:1,619:1,148:1,63:1,73:1},Gft={3:1,4:1,5:1,537:1},EBt="ONE_SIDED_GREEDY_SWITCH",SBt="TWO_SIDED_GREEDY_SWITCH",lY="No implementation is available for the layout processor ",Wft="IntermediateProcessorStrategy",$ft="Node '",TBt="NodeMarginCalculator",CBt="Odd port side processing",dw=1e-8,Kr="org.eclipse.elk.alg.layered.intermediate.compaction",v4="org.eclipse.elk.alg.layered.intermediate.greedyswitch",h0="org.eclipse.elk.alg.layered.p3order.counting",e6={208:1},cp="org.eclipse.elk.alg.layered.intermediate.wrapping",_4="org.eclipse.elk.alg.layered.networksimplex",ka="org.eclipse.elk.alg.layered.options",hY="INTERACTIVE",jm="NONE",pE="LEFT",gE="RIGHT",ABt="EDGE_LENGTH",kBt="SELF_LOOPS",Vft="BOTTOM",y4="CENTER",LBt="portRatioOrPosition",qft="org.eclipse.elk.layered.contentAlignment",Xft="org.eclipse.elk.layered.feedbackEdges",mO="org.eclipse.elk.layered.interactiveReferencePoint",Zft="org.eclipse.elk.layered.mergeEdges",Yft="org.eclipse.elk.layered.mergeHierarchyEdges",Kft="org.eclipse.elk.layered.thoroughness",Jft="org.eclipse.elk.layered.unnecessaryBendpoints",Qft="org.eclipse.elk.layered.northOrSouthPort",fY="org.eclipse.elk.layered.cycleBreaking.strategy",n6="org.eclipse.elk.layered.layering.strategy",tdt="org.eclipse.elk.layered.layering.layerConstraint",edt="org.eclipse.elk.layered.layering.wideNodesOnMultipleLayers",dY="org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth",pY="org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor",gY="org.eclipse.elk.layered.layering.nodePromotion.strategy",mY="org.eclipse.elk.layered.layering.nodePromotion.maxIterations",bY="org.eclipse.elk.layered.layering.coffmanGraham.layerBound",wY="org.eclipse.elk.layered.crossingMinimization.strategy",ndt="org.eclipse.elk.layered.crossingMinimization.hierarchicalSweepiness",idt="org.eclipse.elk.layered.crossingMinimization.semiInteractive",rdt="org.eclipse.elk.layered.crossingMinimization.greedySwitch.activationThreshold",sdt="org.eclipse.elk.layered.crossingMinimization.greedySwitch.type",mE="org.eclipse.elk.layered.nodePlacement.strategy",vY="org.eclipse.elk.layered.nodePlacement.favorStraightEdges",_Y="org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening",yY="org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment",xY="org.eclipse.elk.layered.nodePlacement.linearSegments.deflectionDampening",MY="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility",odt="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility.default",EY="org.eclipse.elk.layered.edgeRouting.selfLoopPlacement",bO="org.eclipse.elk.layered.edgeRouting.sloppySplineRouting",wO="org.eclipse.elk.layered.edgeRouting.sloppySplineLayerSpacing",cdt="org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers",adt="org.eclipse.elk.layered.spacing.edgeEdgeBetweenLayers",udt="org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers",ldt="org.eclipse.elk.layered.priority.direction",hdt="org.eclipse.elk.layered.priority.shortness",fdt="org.eclipse.elk.layered.priority.straightness",SY="org.eclipse.elk.layered.compaction.connectedComponents",ddt="org.eclipse.elk.layered.compaction.postCompaction.strategy",pdt="org.eclipse.elk.layered.compaction.postCompaction.constraints",vO="org.eclipse.elk.layered.highDegreeNodes.treatment",TY="org.eclipse.elk.layered.highDegreeNodes.threshold",CY="org.eclipse.elk.layered.highDegreeNodes.treeHeight",x4="org.eclipse.elk.layered.wrapping.strategy",gdt="org.eclipse.elk.layered.wrapping.additionalEdgeSpacing",mdt="org.eclipse.elk.layered.wrapping.correctionFactor",_O="org.eclipse.elk.layered.wrapping.cutting.strategy",AY="org.eclipse.elk.layered.wrapping.cutting.cuts",kY="org.eclipse.elk.layered.wrapping.cutting.msd.freedom",LY="org.eclipse.elk.layered.wrapping.singleEdge.validify.strategy",yO="org.eclipse.elk.layered.wrapping.multiEdge.improveCuts",xO="org.eclipse.elk.layered.wrapping.multiEdge.distancePenalty",PY="org.eclipse.elk.layered.wrapping.multiEdge.improveWrappedEdges",bdt="org.eclipse.elk.layered.edgeLabels.sideSelection",wdt="org.eclipse.elk.layered.edgeLabels.centerLabelPlacementStrategy",vdt="layering",PBt="layering.minWidth",IBt="layering.nodePromotion",_dt="crossingMinimization",RBt="crossingMinimization.greedySwitch",DBt="nodePlacement",NBt="nodePlacement.bk",ydt="edgeRouting",i6="org.eclipse.elk.edgeRouting",J1="spacing",xdt="priority",OBt="compaction.postCompaction",BBt="Specifies whether and how post-process compaction is applied.",Mdt="highDegreeNodes",Edt="wrapping",FBt="wrapping.cutting",Sdt="wrapping.multiEdge",IY="edgeLabels",Nn="org.eclipse.elk.layered",Tdt="org.eclipse.elk.spacing.edgeEdge",Cdt="org.eclipse.elk.spacing.edgeNode",Adt="org.eclipse.elk.spacing.labelLabel",kdt="org.eclipse.elk.spacing.labelPort",Ldt="org.eclipse.elk.spacing.labelNode",Pdt="org.eclipse.elk.spacing.portPort",Idt="org.eclipse.elk.spacing.individualOverride",Rdt="org.eclipse.elk.port.borderOffset",Ddt="org.eclipse.elk.noLayout",Ndt="org.eclipse.elk.port.side",RY="org.eclipse.elk.debugMode",Odt="org.eclipse.elk.alignment",Bdt="org.eclipse.elk.hierarchyHandling",Fdt="org.eclipse.elk.insideSelfLoops.activate",Udt="org.eclipse.elk.insideSelfLoops.yo",MO="org.eclipse.elk.nodeSize.constraints",DY="org.eclipse.elk.nodeSize.options",NY="org.eclipse.elk.direction",zdt="org.eclipse.elk.nodeLabels.placement",jdt="org.eclipse.elk.portLabels.placement",Hdt="org.eclipse.elk.portLabels.nextToPortIfPossible",Gdt="org.eclipse.elk.portAlignment.default",Wdt="org.eclipse.elk.portAlignment.north",$dt="org.eclipse.elk.portAlignment.south",Vdt="org.eclipse.elk.portAlignment.west",qdt="org.eclipse.elk.portAlignment.east",EO="org.eclipse.elk.nodeSize.minimum",Xdt="org.eclipse.elk.junctionPoints",Zdt="org.eclipse.elk.edgeLabels.placement",Ydt="org.eclipse.elk.edgeLabels.inline",Kdt="org.eclipse.elk.port.index",Jdt="org.eclipse.elk.commentBox",Qdt="org.eclipse.elk.hypernode",tpt="org.eclipse.elk.port.anchor",ept="org.eclipse.elk.partitioning.activate",npt="org.eclipse.elk.partitioning.partition",SO="org.eclipse.elk.position",ipt="org.eclipse.elk.margins",rpt="org.eclipse.elk.spacing.portsSurrounding",UBt="NETWORK_SIMPLEX",cx="UNDEFINED",zBt={3:1,4:1,5:1,616:1},Pu={141:1,50:1},spt="org.eclipse.elk.alg.layered.p1cycles",pw="org.eclipse.elk.alg.layered.p2layers",opt={422:1,208:1},jBt={736:1,3:1,4:1},Qu="org.eclipse.elk.alg.layered.p3order",lo="org.eclipse.elk.alg.layered.p4nodes",HBt={3:1,4:1,5:1,745:1},OY=1e-5,BY="DOWN",$p="org.eclipse.elk.alg.layered.p4nodes.bk",ax=17976931348623157e292,F_="org.eclipse.elk.alg.layered.p5edges",f0="org.eclipse.elk.alg.layered.p5edges.splines",U_=1e-6,TO=-1e-6,GBt="The list of vectors may not be empty.",cpt=-17976931348623157e292,FY=.09999999999999998,WBt=4.71238898038469,$Bt=3.141592653589793,M4="org.eclipse.elk.alg.mrtree",E4="org.eclipse.elk.alg.mrtree.graph",ux="org.eclipse.elk.alg.mrtree.intermediate",VBt="Set neighbors in level",qBt="DESCENDANTS",apt="org.eclipse.elk.mrtree.weighting",upt="org.eclipse.elk.mrtree.searchOrder",CO="org.eclipse.elk.alg.mrtree.options",z_="org.eclipse.elk.mrtree",XBt="org.eclipse.elk.tree",lpt="org.eclipse.elk.alg.radial",lx=6.283185307179586,UY=5e-324,ZBt="org.eclipse.elk.alg.radial.intermediate",zY="org.eclipse.elk.alg.radial.intermediate.compaction",YBt={3:1,4:1,5:1,63:1},hpt="org.eclipse.elk.alg.radial.intermediate.optimization",jY="No implementation is available for the layout option ",S4="org.eclipse.elk.alg.radial.options",fpt="org.eclipse.elk.radial.orderId",dpt="org.eclipse.elk.radial.radius",HY="org.eclipse.elk.radial.compactor",GY="org.eclipse.elk.radial.compactionStepSize",ppt="org.eclipse.elk.radial.sorter",gpt="org.eclipse.elk.radial.wedgeCriteria",mpt="org.eclipse.elk.radial.optimizationCriteria",Hm="org.eclipse.elk.radial",KBt="org.eclipse.elk.alg.radial.p1position.wedge",bpt="org.eclipse.elk.alg.radial.sorting",JBt=5.497787143782138,QBt=3.9269908169872414,tFt=2.356194490192345,Rh="org.eclipse.elk.core.util",eFt="Invalid index: ",hx="org.eclipse.elk.core.alg",fx={337:1},j_={284:1},wpt="Make sure it's type is registered with the ",vpt=" utility class.",bE="true",WY="false",nFt="Couldn't clone property '",Dh="org.eclipse.elk.core.options",iFt=1.2999999523162842,gw="org.eclipse.elk.box",_pt="org.eclipse.elk.expandNodes",ypt="org.eclipse.elk.box.packingMode",rFt="org.eclipse.elk.algorithm",xpt="org.eclipse.elk.bendPoints",sFt="org.eclipse.elk.labelManager",oFt="org.eclipse.elk.scaleFactor",cFt="org.eclipse.elk.animate",aFt="org.eclipse.elk.animTimeFactor",uFt="org.eclipse.elk.layoutAncestors",lFt="org.eclipse.elk.maxAnimTime",hFt="org.eclipse.elk.minAnimTime",fFt="org.eclipse.elk.progressBar",dFt="org.eclipse.elk.validateOptions",pFt="org.eclipse.elk.zoomToFit",gFt="org.eclipse.elk.nodeLabels.padding",mFt="org.eclipse.elk.font.name",bFt="org.eclipse.elk.font.size",wFt="org.eclipse.elk.edge.type",vFt="de.cau.cs.kieler.labelSpacing",_Ft="partitioning",yFt="nodeLabels",AO="portAlignment",Mpt="nodeSize",$Y="port",xFt="portLabels",MFt="insideSelfLoops",EFt="de.cau.cs.kieler.selfLoopInside",r6="org.eclipse.elk.fixed",SFt="Fixed Layout",kO="org.eclipse.elk.random",TFt="port must have a parent node to calculate the port side",s6="org.eclipse.elk.core.util.adapters",Ept="org.eclipse.elk.core.util.nodespacing",d0="org.eclipse.elk.core.util.nodespacing.cellsystem",CFt={171:1,307:1},Spt="Vertical alignment cannot be null",LO="org.eclipse.elk.core.util.nodespacing.internal",wE="org.eclipse.elk.core.util.nodespacing.internal.algorithm",vE="org.eclipse.elk.core.util.overlaps",tl="org.eclipse.emf.ecore",H_="org.eclipse.elk.graph",AFt="EMapPropertyHolder",kFt="ElkBendPoint",LFt="ElkGraphElement",PFt="ElkConnectableShape",Tpt="ElkEdge",IFt="ElkEdgeSection",RFt="EModelElement",DFt="ENamedElement",Cpt="ElkLabel",Apt="ElkNode",kpt="ElkPort",NFt={91:1,87:1},dx="org.eclipse.emf.common.notify.impl",G_="The feature '",VY="' is not a valid changeable feature",OFt="Expecting null",Lpt="' is not a valid feature",ca=32768,BFt={95:1,91:1,87:1,51:1,42:1,92:1},Re="org.eclipse.emf.ecore.impl",p0="org.eclipse.elk.graph.impl",T4="Recursive containment not allowed for ",_E="The datatype '",Gm="' is not a valid classifier",qY="The value '",W_={173:1,3:1,4:1},XY="The class '",yE="http://www.eclipse.org/elk/ElkGraph",Ppt="property",C4="value",ZY="source",FFt="properties",UFt="identifier",YY="height",KY="width",JY="parent",QY="text",Ipt="children",zFt="hierarchical",Rpt="sources",tK="targets",Dpt="sections",eK="bendPoints",Npt="outgoingShape",Opt="incomingShape",Bpt="outgoingSections",Fpt="incomingSections",qs="org.eclipse.emf.common.util",Upt="Severe implementation error in the Json to ElkGraph importer.",Df="id",Ds="org.eclipse.elk.graph.json",zpt="Unhandled parameter types: ",jFt="startPoint",HFt="An edge must have at least one source and one target (edge id: '",xE="').",GFt="Referenced edge section does not exist: ",WFt=" (edge id: '",jpt="target",PO="group",Ti="name",$Ft="connectableShape cannot be null",nK="Passed edge is not 'simple'.",o6="The 'no duplicates' constraint is violated",Nf={3:1,4:1,20:1,25:1,41:1,13:1,15:1,49:1,59:1,55:1,52:1},iK={3:1,4:1,20:1,25:1,41:1,13:1,43:1,15:1,49:1,59:1,55:1,52:1,532:1},rK="org.eclipse.elk.graph.util",Hpt="undefined",VFt="parser.parse.1",qFt="parser.parse.2",IO="parser.next.1",sK="parser.next.2",XFt="parser.next.3",ZFt="parser.next.4",g0="parser.factor.1",Gpt="parser.factor.2",YFt="parser.factor.3",KFt="parser.factor.4",JFt="parser.factor.5",QFt="parser.factor.6",tUt="parser.atom.1",eUt="parser.atom.2",nUt="parser.atom.3",Wpt="parser.atom.4",oK="parser.atom.5",$pt="parser.cc.1",RO="parser.cc.2",iUt="parser.cc.3",rUt="parser.cc.5",Vpt="parser.cc.6",qpt="parser.cc.7",cK="parser.cc.8",sUt="parser.ope.1",oUt="parser.ope.2",cUt="parser.ope.3",Vp="parser.descape.1",aUt="parser.descape.2",uUt="parser.descape.3",lUt="parser.descape.4",hUt="parser.descape.5",el="parser.process.1",fUt="parser.quantifier.1",dUt="parser.quantifier.2",pUt="parser.quantifier.3",gUt="parser.quantifier.4",Xpt="parser.quantifier.5",mUt="org.eclipse.emf.common.notify",Zpt={380:1,610:1},bUt={3:1,4:1,20:1,25:1,41:1,13:1,15:1,59:1,52:1},c6={338:1,136:1},A4="index=",DO=", size=",aK={3:1,4:1,5:1,116:1},wUt={3:1,4:1,20:1,25:1,41:1,13:1,15:1,49:1,59:1,52:1},Ypt={3:1,6:1,4:1,5:1,175:1},vUt={3:1,4:1,5:1,339:1},_Ut=";/?:@&=+$,",yUt="invalid authority: ",xUt="EAnnotation",MUt="ETypedElement",EUt="EStructuralFeature",SUt="EAttribute",TUt="EClassifier",CUt="EEnumLiteral",AUt="EGenericType",kUt="EOperation",LUt="EParameter",PUt="EReference",IUt="ETypeParameter",hr="org.eclipse.emf.ecore.util",Kpt={3:1,20:1,13:1,15:1,52:1,533:1,81:1,64:1},RUt="org.eclipse.emf.ecore.util.FeatureMap$Entry",oh=1024,La=8192,mw=2048,k4="byte",NO="char",L4="double",P4="float",I4="int",R4="long",D4="short",DUt="java.lang.Object",$_={3:1,4:1,5:1,222:1},Jpt={3:1,4:1,5:1,611:1},NUt={3:1,4:1,20:1,25:1,41:1,13:1,15:1,49:1,59:1,55:1,52:1,64:1},Zo={3:1,4:1,20:1,25:1,41:1,13:1,15:1,49:1,59:1,55:1,52:1,81:1,64:1},a6="mixed",ui="http:///org/eclipse/emf/ecore/util/ExtendedMetaData",yl="kind",OUt={3:1,4:1,5:1,612:1},Qpt={3:1,4:1,20:1,25:1,41:1,13:1,15:1,59:1,52:1,81:1,64:1},OO={20:1,25:1,41:1,13:1,15:1,52:1,64:1},BO={43:1,120:1,260:1},FO={75:1,311:1},UO="The value of type '",zO="' must be of type '",V_=1365,xl="http://www.eclipse.org/emf/2002/Ecore",jO=-32768,Wm="constraints",Ns="baseType",BUt="getEStructuralFeature",FUt="getFeatureID",N4="feature",UUt="getOperationID",t1t="operation",zUt="defaultValue",jUt="eTypeParameters",HUt="isInstance",GUt="getEEnumLiteral",WUt="eContainingClass",wi={47:1},$Ut={3:1,4:1,5:1,124:1},VUt="org.eclipse.emf.ecore.resource",qUt={91:1,87:1,534:1,1628:1},uK="org.eclipse.emf.ecore.resource.impl",e1t="unspecified",u6="simple",HO="attribute",XUt="attributeWildcard",GO="element",lK="elementWildcard",Nh="collapse",hK="itemType",WO="namespace",l6="##targetNamespace",Ml="whiteSpace",n1t="wildcards",m0="http://www.eclipse.org/emf/2003/XMLType",fK="##any",ME="uninitialized",dK="The multiplicity constraint is violated",$O="org.eclipse.emf.ecore.xml.type",ZUt="ProcessingInstruction",YUt="SimpleAnyType",KUt="XMLTypeDocumentRoot",Xr="org.eclipse.emf.ecore.xml.type.impl",h6="INF",JUt="processing",QUt="ENTITIES_._base",i1t="minLength",r1t="ENTITY",VO="NCName",tzt="IDREFS_._base",s1t="integer",pK="token",gK="pattern",ezt="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*",o1t="\\i\\c*",nzt="[\\i-[:]][\\c-[:]]*",izt="nonPositiveInteger",f6="maxInclusive",c1t="NMTOKEN",rzt="NMTOKENS_._base",a1t="nonNegativeInteger",d6="minInclusive",szt="normalizedString",ozt="unsignedByte",czt="unsignedInt",azt="18446744073709551615",uzt="unsignedShort",lzt="processingInstruction",qp="org.eclipse.emf.ecore.xml.type.internal",EE=1114111,hzt="Internal Error: shorthands: \\u",O4="xml:isDigit",mK="xml:isWord",bK="xml:isSpace",wK="xml:isNameChar",vK="xml:isInitialNameChar",fzt="09\u0660\u0669\u06F0\u06F9\u0966\u096F\u09E6\u09EF\u0A66\u0A6F\u0AE6\u0AEF\u0B66\u0B6F\u0BE7\u0BEF\u0C66\u0C6F\u0CE6\u0CEF\u0D66\u0D6F\u0E50\u0E59\u0ED0\u0ED9\u0F20\u0F29",dzt="AZaz\xC0\xD6\xD8\xF6\xF8\u0131\u0134\u013E\u0141\u0148\u014A\u017E\u0180\u01C3\u01CD\u01F0\u01F4\u01F5\u01FA\u0217\u0250\u02A8\u02BB\u02C1\u0386\u0386\u0388\u038A\u038C\u038C\u038E\u03A1\u03A3\u03CE\u03D0\u03D6\u03DA\u03DA\u03DC\u03DC\u03DE\u03DE\u03E0\u03E0\u03E2\u03F3\u0401\u040C\u040E\u044F\u0451\u045C\u045E\u0481\u0490\u04C4\u04C7\u04C8\u04CB\u04CC\u04D0\u04EB\u04EE\u04F5\u04F8\u04F9\u0531\u0556\u0559\u0559\u0561\u0586\u05D0\u05EA\u05F0\u05F2\u0621\u063A\u0641\u064A\u0671\u06B7\u06BA\u06BE\u06C0\u06CE\u06D0\u06D3\u06D5\u06D5\u06E5\u06E6\u0905\u0939\u093D\u093D\u0958\u0961\u0985\u098C\u098F\u0990\u0993\u09A8\u09AA\u09B0\u09B2\u09B2\u09B6\u09B9\u09DC\u09DD\u09DF\u09E1\u09F0\u09F1\u0A05\u0A0A\u0A0F\u0A10\u0A13\u0A28\u0A2A\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59\u0A5C\u0A5E\u0A5E\u0A72\u0A74\u0A85\u0A8B\u0A8D\u0A8D\u0A8F\u0A91\u0A93\u0AA8\u0AAA\u0AB0\u0AB2\u0AB3\u0AB5\u0AB9\u0ABD\u0ABD\u0AE0\u0AE0\u0B05\u0B0C\u0B0F\u0B10\u0B13\u0B28\u0B2A\u0B30\u0B32\u0B33\u0B36\u0B39\u0B3D\u0B3D\u0B5C\u0B5D\u0B5F\u0B61\u0B85\u0B8A\u0B8E\u0B90\u0B92\u0B95\u0B99\u0B9A\u0B9C\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8\u0BAA\u0BAE\u0BB5\u0BB7\u0BB9\u0C05\u0C0C\u0C0E\u0C10\u0C12\u0C28\u0C2A\u0C33\u0C35\u0C39\u0C60\u0C61\u0C85\u0C8C\u0C8E\u0C90\u0C92\u0CA8\u0CAA\u0CB3\u0CB5\u0CB9\u0CDE\u0CDE\u0CE0\u0CE1\u0D05\u0D0C\u0D0E\u0D10\u0D12\u0D28\u0D2A\u0D39\u0D60\u0D61\u0E01\u0E2E\u0E30\u0E30\u0E32\u0E33\u0E40\u0E45\u0E81\u0E82\u0E84\u0E84\u0E87\u0E88\u0E8A\u0E8A\u0E8D\u0E8D\u0E94\u0E97\u0E99\u0E9F\u0EA1\u0EA3\u0EA5\u0EA5\u0EA7\u0EA7\u0EAA\u0EAB\u0EAD\u0EAE\u0EB0\u0EB0\u0EB2\u0EB3\u0EBD\u0EBD\u0EC0\u0EC4\u0F40\u0F47\u0F49\u0F69\u10A0\u10C5\u10D0\u10F6\u1100\u1100\u1102\u1103\u1105\u1107\u1109\u1109\u110B\u110C\u110E\u1112\u113C\u113C\u113E\u113E\u1140\u1140\u114C\u114C\u114E\u114E\u1150\u1150\u1154\u1155\u1159\u1159\u115F\u1161\u1163\u1163\u1165\u1165\u1167\u1167\u1169\u1169\u116D\u116E\u1172\u1173\u1175\u1175\u119E\u119E\u11A8\u11A8\u11AB\u11AB\u11AE\u11AF\u11B7\u11B8\u11BA\u11BA\u11BC\u11C2\u11EB\u11EB\u11F0\u11F0\u11F9\u11F9\u1E00\u1E9B\u1EA0\u1EF9\u1F00\u1F15\u1F18\u1F1D\u1F20\u1F45\u1F48\u1F4D\u1F50\u1F57\u1F59\u1F59\u1F5B\u1F5B\u1F5D\u1F5D\u1F5F\u1F7D\u1F80\u1FB4\u1FB6\u1FBC\u1FBE\u1FBE\u1FC2\u1FC4\u1FC6\u1FCC\u1FD0\u1FD3\u1FD6\u1FDB\u1FE0\u1FEC\u1FF2\u1FF4\u1FF6\u1FFC\u2126\u2126\u212A\u212B\u212E\u212E\u2180\u2182\u3007\u3007\u3021\u3029\u3041\u3094\u30A1\u30FA\u3105\u312C\u4E00\u9FA5\uAC00\uD7A3",pzt="Private Use",_K="ASSIGNED",gzt="\0\x7F\x80\xFF\u0100\u017F\u0180\u024F\u0250\u02AF\u02B0\u02FF\u0300\u036F\u0370\u03FF\u0400\u04FF\u0530\u058F\u0590\u05FF\u0600\u06FF\u0700\u074F\u0780\u07BF\u0900\u097F\u0980\u09FF\u0A00\u0A7F\u0A80\u0AFF\u0B00\u0B7F\u0B80\u0BFF\u0C00\u0C7F\u0C80\u0CFF\u0D00\u0D7F\u0D80\u0DFF\u0E00\u0E7F\u0E80\u0EFF\u0F00\u0FFF\u1000\u109F\u10A0\u10FF\u1100\u11FF\u1200\u137F\u13A0\u13FF\u1400\u167F\u1680\u169F\u16A0\u16FF\u1780\u17FF\u1800\u18AF\u1E00\u1EFF\u1F00\u1FFF\u2000\u206F\u2070\u209F\u20A0\u20CF\u20D0\u20FF\u2100\u214F\u2150\u218F\u2190\u21FF\u2200\u22FF\u2300\u23FF\u2400\u243F\u2440\u245F\u2460\u24FF\u2500\u257F\u2580\u259F\u25A0\u25FF\u2600\u26FF\u2700\u27BF\u2800\u28FF\u2E80\u2EFF\u2F00\u2FDF\u2FF0\u2FFF\u3000\u303F\u3040\u309F\u30A0\u30FF\u3100\u312F\u3130\u318F\u3190\u319F\u31A0\u31BF\u3200\u32FF\u3300\u33FF\u3400\u4DB5\u4E00\u9FFF\uA000\uA48F\uA490\uA4CF\uAC00\uD7A3\uE000\uF8FF\uF900\uFAFF\uFB00\uFB4F\uFB50\uFDFF\uFE20\uFE2F\uFE30\uFE4F\uFE50\uFE6F\uFE70\uFEFE\uFEFF\uFEFF\uFF00\uFFEF",u1t="UNASSIGNED",SE={3:1,112:1},mzt="org.eclipse.emf.ecore.xml.type.util",qO={3:1,4:1,5:1,342:1},l1t="org.eclipse.xtext.xbase.lib",bzt="Cannot add elements to a Range",wzt="Cannot set elements in a Range",vzt="Cannot remove elements from a Range",XO="locale",ZO="default",YO="user.agent",u,KO,yK,C3e=-1;yfe(),T(1,null,{},U),u.Fb=function(e){return this===e},u.Gb=function(){return this.ql},u.Hb=function(){return lm(this)},u.Ib=function(){return Og(fu(this))+"@"+(Yr(this)>>>0).toString(16)},u.equals=function(t){return this.Fb(t)},u.hashCode=function(){return this.Hb()},u.toString=function(){return this.Ib()};var _zt,yzt,xzt;T(274,1,{274:1,1712:1},Iat),u._d=function(e){var n;return n=new Iat,n.i=4,e>1?n.c=aAt(this,e-1):n.c=this,n},u.ae=function(){return Vd(this),this.b},u.be=function(){return Og(this)},u.ce=function(){return Vd(this),this.k},u.de=function(){return(this.i&4)!=0},u.ee=function(){return(this.i&1)!=0},u.Ib=function(){return Kct(this)},u.i=0;var A3e=1,un=A(bc,"Object",1),h1t=A(bc,"Class",274);T(1692,1,{3:1});var mLe=A(R_,"Optional",1692);T(1060,1692,{3:1},j),u.Fb=function(e){return e===this},u.Hb=function(){return 2040732332},u.Ib=function(){return"Optional.absent()"},u.Jb=function(e){return si(e),Wr(),xK};var xK,bLe=A(R_,"Absent",1060),k3e=Sr(R_,"Function");T(393,1,{},P5),u.Lb=function(e){return YCt(e)};var wLe=A(R_,"Joiner",393);T(875,393,{},eCt),u.Lb=function(e){return e==null?this.b:YCt(e)};var vLe=A(R_,"Joiner/1",875);T(874,1,{},Yj);var _Le=A(R_,"Joiner/MapJoiner",874),L3e=Sr(R_,"Predicate"),Mzt;T(494,1,{138:1,494:1,3:1,56:1},Aj),u.Nb=function(e){return this.Mb(e)},u.Mb=function(e){var n;for(n=0;n0},u.ic=function(){if(this.b>=this.c)throw K(new J);return v3t(this,this.b++)},u.Dc=function(){return this.b},u.Ec=function(){if(this.b<=0)throw K(new J);return v3t(this,--this.b)},u.Fc=function(){return this.b-1},u.b=0,u.c=0;var FLe=A(Le,"AbstractIndexedListIterator",847);T(949,257,iO),u.hc=function(){return u_(this)},u.ic=function(){return N2(this)},u.d=1;var ULe=A(Le,"AbstractIterator",949);T(1677,1,{238:1}),u.Hc=function(){var e;return e=this.f,e||(this.f=this.Ic())},u.Jc=function(){return new nW(this.Hc())},u.Lc=function(){return new L5t(this.Kc(),this._b(),ct(this,475)?1:0)},u.Fb=function(e){return aq(this,e)},u.Hb=function(){return Yr(this.Hc())},u.Wb=function(){return this._b()==0},u.Xb=function(){return bot(this)},u.Ib=function(){return Yc(this.Hc())};var zLe=A(Le,"AbstractMultimap",1677);T(654,1677,dZ),u.Pb=function(){hat(this)},u.Qb=function(e){return this.c.Qb(e)},u.Ic=function(){return ct(this.c,122)?new JT(this,a(this.c,122)):ct(this.c,115)?new gM(this,a(this.c,115)):new rM(this,this.c)},u.Pc=function(e){return this.Oc()},u.Jc=function(){return ct(this.c,122)?new Nv(this,a(this.c,122)):ct(this.c,115)?new g2(this,a(this.c,115)):new pM(this,this.c)},u.Qc=function(){return wpe(this.Oc())},u.Kc=function(){return new Dxt(this)},u.Lc=function(){return hlt(this.c.Tb().wc(),new gt,64,this.d)},u.Mc=function(e){return rr(this,e)},u.Nc=function(e){return i4(this,e)},u._b=function(){return this.d},u.Rc=function(){return new Rxt(this)},u.Sc=function(){return hlt(this.c.ac().wc(),new V,64,this.d)},u.d=0;var jLe=A(Le,"AbstractMapBasedMultimap",654);T(1483,654,dZ),u.Oc=function(){return new qu(this.a)},u.Qc=function(){return sC(),sC(),p1t},u.Mc=function(e){return a(rr(this,e),15)},u.Nc=function(e){return a(i4(this,e),15)},u.Hc=function(){var e;return e=this.f,e||(this.f=ct(this.c,122)?new JT(this,a(this.c,122)):ct(this.c,115)?new gM(this,a(this.c,115)):new rM(this,this.c))},u.Fb=function(e){return aq(this,e)},u.Tc=function(e){return a(rr(this,e),15)},u.Uc=function(e){return a(i4(this,e),15)};var HLe=A(Le,"AbstractListMultimap",1483);T(661,1,Cs),u.gc=function(e){ks(this,e)},u.hc=function(){return this.c.hc()||this.e.hc()},u.ic=function(){var e;return this.e.hc()||(e=a(this.c.ic(),38),this.b=e.kc(),this.a=a(e.lc(),13),this.e=this.a.tc()),this.Vc(this.b,this.e.ic())},u.jc=function(){this.e.jc(),this.a.Wb()&&this.c.jc(),--this.d.d};var GLe=A(Le,"AbstractMapBasedMultimap/Itr",661);T(970,661,Cs,Rxt),u.Vc=function(e,n){return n};var WLe=A(Le,"AbstractMapBasedMultimap/1",970);T(971,1,ys,V),u.Kb=function(e){return a(e,13).wc()};var $Le=A(Le,"AbstractMapBasedMultimap/1methodref$spliterator$Type",971);T(972,661,Cs,Dxt),u.Vc=function(e,n){return ts(),new N5(e,n)};var VLe=A(Le,"AbstractMapBasedMultimap/2",972);T(1666,1,uE),u.Ub=function(e){YV(this,e)},u.Yb=function(e,n,i){return rut(this,e,n,i)},u.Pb=function(){this.Tb().Pb()},u.Wc=function(e){return Qq(this,e)},u.Qb=function(e){return!!clt(this,e,!1)},u.Rb=function(e){var n,i,r;for(i=this.Tb().tc();i.hc();)if(n=a(i.ic(),38),r=n.lc(),zt(e)===zt(r)||e!=null&&Fi(e,r))return!0;return!1},u.Fb=function(e){return Z8t(this,e)},u.Vb=function(e){return Ua(clt(this,e,!1))},u.Hb=function(){return Lat(this.Tb())},u.Wb=function(){return this._b()==0},u.Xb=function(){return new Tv(this)},u.Zb=function(e,n){throw K(new Tp("Put not supported on this map"))},u.$b=function(e){return Ua(clt(this,e,!0))},u._b=function(){return this.Tb()._b()},u.Ib=function(){var e,n,i;for(i=new Mm("{","}"),n=this.Tb().tc();n.hc();)e=a(n.ic(),38),$g(i,Q4t(this,e.kc())+"="+Q4t(this,e.lc()));return i.a?i.e.length==0?i.a.a:i.a.a+(""+i.e):i.c},u.ac=function(){return new vf(this)};var qLe=A(ii,"AbstractMap",1666);T(1678,1666,uE),u.Jc=function(){return new nW(this)},u.Tb=function(){return mot(this)},u.Xb=function(){var e;return e=this.g,e||(this.g=this.Jc())},u.ac=function(){var e;return e=this.i,e||(this.i=new lMt(this))};var XLe=A(Le,"Maps/ViewCachingAbstractMap",1678);T(357,1678,uE,rM),u.Vb=function(e){return cue(this,e)},u.$b=function(e){return rhe(this,e)},u.Pb=function(){this.d==this.e.c?this.e.Pb():KD(new rot(this))},u.Qb=function(e){return cde(this.d,e)},u.Yc=function(){return new kj(this)},u.Xc=function(){return this.Yc()},u.Fb=function(e){return this===e||Fi(this.d,e)},u.Hb=function(){return Yr(this.d)},u.Xb=function(){return this.e.Xb()},u._b=function(){return this.d._b()},u.Ib=function(){return Yc(this.d)};var ZLe=A(Le,"AbstractMapBasedMultimap/AsMap",357);T(25,1,D_),u.sc=function(e){vo(this,e)},u.uc=function(){return new gi(null,this.wc())},u.wc=function(){return new Ei(this,0)},u.xc=function(){return new gi(null,this.wc())},u.nc=function(e){throw K(new Tp("Add not supported on this collection"))},u.oc=function(e){return yo(this,e)},u.Pb=function(){wL(this)},u.pc=function(e){return j2(this,e,!1)},u.qc=function(e){return O1(this,e)},u.Wb=function(){return this._b()==0},u.vc=function(e){return j2(this,e,!0)},u.yc=function(){return y$(this)},u.zc=function(e){return hP(this,e)},u.Ib=function(){return Gp(this)};var YLe=A(ii,"AbstractCollection",25);T(bd,25,vl),u.wc=function(){return new Ei(this,1)},u.Fb=function(e){return CIt(this,e)},u.Hb=function(){return Lat(this)};var KLe=A(ii,"AbstractSet",bd);T(1660,bd,vl);var JLe=A(Le,"Sets/ImprovedAbstractSet",1660);T(1679,1660,vl),u.Pb=function(){this.Zc().Pb()},u.pc=function(e){return DIt(this,e)},u.Wb=function(){return this.Zc().Wb()},u.vc=function(e){var n;return this.pc(e)?(n=a(e,38),this.Zc().Xb().vc(n.kc())):!1},u._b=function(){return this.Zc()._b()};var QLe=A(Le,"Maps/EntrySet",1679);T(968,1679,vl,kj),u.pc=function(e){return sRt(this.a.d.Tb(),e)},u.tc=function(){return new rot(this.a)},u.Zc=function(){return this.a},u.vc=function(e){var n;return sRt(this.a.d.Tb(),e)?(n=a(e,38),wae(this.a.e,n.kc()),!0):!1},u.wc=function(){return m$(this.a.d.Tb().wc(),new Lj(this.a))};var tPe=A(Le,"AbstractMapBasedMultimap/AsMap/AsMapEntries",968);T(969,1,ys,Lj),u.Kb=function(e){return z5t(this.a,a(e,38))};var ePe=A(Le,"AbstractMapBasedMultimap/AsMap/AsMapEntries/0methodref$wrapEntry$Type",969);T(659,1,Cs,rot),u.gc=function(e){ks(this,e)},u.ic=function(){var e;return e=a(this.b.ic(),38),this.a=a(e.lc(),13),z5t(this.c,e)},u.hc=function(){return this.b.hc()},u.jc=function(){this.b.jc(),this.c.e.d-=this.a._b(),this.a.Pb()};var nPe=A(Le,"AbstractMapBasedMultimap/AsMap/AsMapIterator",659);T(541,1660,vl,nW),u.Pb=function(){this.b.Pb()},u.pc=function(e){return this.b.Qb(e)},u.sc=function(e){si(e),this.b.Ub(new Nj(e))},u.Wb=function(){return this.b.Wb()},u.tc=function(){return ts(),tC(this.b.Tb().tc(),(Hv(),p6))},u.vc=function(e){return this.b.Qb(e)?(this.b.$b(e),!0):!1},u._b=function(){return this.b._b()};var iPe=A(Le,"Maps/KeySet",541);T(356,541,vl,pM),u.Pb=function(){var e;KD((e=this.b.Tb().tc(),new Jit(this,e)))},u.qc=function(e){return this.b.Xb().qc(e)},u.Fb=function(e){return this===e||Fi(this.b.Xb(),e)},u.Hb=function(){return Yr(this.b.Xb())},u.tc=function(){var e;return e=this.b.Tb().tc(),new Jit(this,e)},u.vc=function(e){var n,i;return i=0,n=a(this.b.$b(e),13),n&&(i=n._b(),n.Pb(),this.a.d-=i),i>0},u.wc=function(){return this.b.Xb().wc()};var rPe=A(Le,"AbstractMapBasedMultimap/KeySet",356);T(660,1,Cs,Jit),u.gc=function(e){ks(this,e)},u.hc=function(){return this.c.hc()},u.ic=function(){return this.a=a(this.c.ic(),38),this.a.kc()},u.jc=function(){var e;M1(!!this.a,lw),e=a(this.a.lc(),13),this.c.jc(),this.b.a.d-=e._b(),e.Pb()};var sPe=A(Le,"AbstractMapBasedMultimap/KeySet/1",660);T(358,357,{109:1,115:1},gM),u.Jc=function(){return this.$c()},u.Xb=function(){return this._c()},u.$c=function(){return new g2(this.c,this.ad())},u._c=function(){var e;return e=this.b,e||(this.b=this.$c())},u.ad=function(){return a(this.d,115)};var oPe=A(Le,"AbstractMapBasedMultimap/SortedAsMap",358);T(396,358,EOt,JT),u.$c=function(){return new Nv(this.a,a(a(this.d,115),122))},u.Xb=function(){var e;return e=this.b,a(e||(this.b=new Nv(this.a,a(a(this.d,115),122))),196)},u._c=function(){var e;return e=this.b,a(e||(this.b=new Nv(this.a,a(a(this.d,115),122))),196)},u.ad=function(){return a(a(this.d,115),122)};var cPe=A(Le,"AbstractMapBasedMultimap/NavigableAsMap",396);T(327,356,SOt,g2),u.wc=function(){return this.b.Xb().wc()};var aPe=A(Le,"AbstractMapBasedMultimap/SortedKeySet",327);T(299,327,rft,Nv);var uPe=A(Le,"AbstractMapBasedMultimap/NavigableKeySet",299);T(448,25,D_,CL),u.nc=function(e){var n,i;return du(this),i=this.d.Wb(),n=this.d.nc(e),n&&(++this.f.d,i&&_D(this)),n},u.oc=function(e){var n,i,r;return e.Wb()?!1:(r=(du(this),this.d._b()),n=this.d.oc(e),n&&(i=this.d._b(),this.f.d+=i-r,r==0&&_D(this)),n)},u.Pb=function(){var e;e=(du(this),this.d._b()),e!=0&&(this.d.Pb(),this.f.d-=e,$D(this))},u.pc=function(e){return du(this),this.d.pc(e)},u.qc=function(e){return du(this),this.d.qc(e)},u.Fb=function(e){return e===this?!0:(du(this),Fi(this.d,e))},u.Hb=function(){return du(this),Yr(this.d)},u.tc=function(){return du(this),new Vst(this)},u.vc=function(e){var n;return du(this),n=this.d.vc(e),n&&(--this.f.d,$D(this)),n},u._b=function(){return kEt(this)},u.wc=function(){return du(this),this.d.wc()},u.Ib=function(){return du(this),Yc(this.d)};var lPe=A(Le,"AbstractMapBasedMultimap/WrappedCollection",448),Sl=Sr(ii,"List");T(657,448,{20:1,25:1,13:1,15:1},got),u.jd=function(e){D1(this,e)},u.wc=function(){return du(this),this.d.wc()},u.bd=function(e,n){var i;du(this),i=this.d.Wb(),a(this.d,15).bd(e,n),++this.a.d,i&&_D(this)},u.cd=function(e){return du(this),a(this.d,15).cd(e)},u.dd=function(e){return du(this),a(this.d,15).dd(e)},u.ed=function(){return du(this),new JEt(this)},u.fd=function(e){return du(this),new N4t(this,e)},u.gd=function(e){var n;return du(this),n=a(this.d,15).gd(e),--this.a.d,$D(this),n},u.hd=function(e,n){return du(this),a(this.d,15).hd(e,n)},u.kd=function(e,n){return du(this),dct(this.a,this.e,a(this.d,15).kd(e,n),this.b?this.b:this)};var hPe=A(Le,"AbstractMapBasedMultimap/WrappedList",657);T(967,657,{20:1,25:1,13:1,15:1,49:1},DSt);var fPe=A(Le,"AbstractMapBasedMultimap/RandomAccessWrappedList",967);T(558,1,Cs,Vst),u.gc=function(e){ks(this,e)},u.hc=function(){return xM(this),this.b.hc()},u.ic=function(){return xM(this),this.b.ic()},u.jc=function(){xSt(this)};var dPe=A(Le,"AbstractMapBasedMultimap/WrappedCollection/WrappedIterator",558);T(658,558,kf,JEt,N4t),u.jc=function(){xSt(this)},u.Bc=function(e){var n;n=kEt(this.a)==0,(xM(this),a(this.b,120)).Bc(e),++this.a.a.d,n&&_D(this.a)},u.Cc=function(){return(xM(this),a(this.b,120)).Cc()},u.Dc=function(){return(xM(this),a(this.b,120)).Dc()},u.Ec=function(){return(xM(this),a(this.b,120)).Ec()},u.Fc=function(){return(xM(this),a(this.b,120)).Fc()},u.Gc=function(e){(xM(this),a(this.b,120)).Gc(e)};var pPe=A(Le,"AbstractMapBasedMultimap/WrappedList/WrappedListIterator",658);T(559,448,SOt,QW),u.wc=function(){return du(this),this.d.wc()};var gPe=A(Le,"AbstractMapBasedMultimap/WrappedSortedSet",559);T(656,559,rft,Ort);var mPe=A(Le,"AbstractMapBasedMultimap/WrappedNavigableSet",656);T(655,448,vl,dst),u.wc=function(){return du(this),this.d.wc()};var bPe=A(Le,"AbstractMapBasedMultimap/WrappedSet",655);T(974,1,ys,gt),u.Kb=function(e){var n,i;return n=e.kc(),i=a(e.lc(),13),m$(i.wc(),new Pj(n))};var wPe=A(Le,"AbstractMapBasedMultimap/lambda$0$Type",974);T(973,1,ys,Pj),u.Kb=function(e){return wee(this.a,e)};var vPe=A(Le,"AbstractMapBasedMultimap/lambda$2$Type",973);T(392,1,pZ),u.Fb=function(e){var n;return ct(e,38)?(n=a(e,38),Rp(this.kc(),n.kc())&&Rp(this.lc(),n.lc())):!1},u.Hb=function(){var e,n;return e=this.kc(),n=this.lc(),(e==null?0:Yr(e))^(n==null?0:Yr(n))},u.mc=function(e){throw K(new Oi)},u.Ib=function(){return this.kc()+"="+this.lc()};var _Pe=A(Le,TOt,392);T(1680,25,D_),u.Pb=function(){this.ld().Pb()},u.pc=function(e){var n;return ct(e,38)?(n=a(e,38),yce(this.ld(),n.kc(),n.lc())):!1},u.vc=function(e){var n;return ct(e,38)?(n=a(e,38),QAt(this.ld(),n.kc(),n.lc())):!1},u._b=function(){return this.ld()._b()};var yPe=A(Le,"Multimaps/Entries",1680);T(975,1680,D_),u.tc=function(){return this.a.Kc()},u.ld=function(){return this.a},u.wc=function(){return this.a.Lc()};var xPe=A(Le,"AbstractMultimap/Entries",975);T(662,975,vl,L8),u.wc=function(){return this.a.Lc()},u.Fb=function(e){return o9t(this,e)},u.Hb=function(){return IPt(this)};var MPe=A(Le,"AbstractMultimap/EntrySet",662);T(663,25,D_,Ud),u.Pb=function(){this.a.Pb()},u.pc=function(e){return the(this.a,e)},u.tc=function(){return this.a.Rc()},u._b=function(){return this.a.d},u.wc=function(){return this.a.Sc()};var EPe=A(Le,"AbstractMultimap/Values",663);T(1681,25,{738:1,20:1,25:1,13:1}),u.sc=function(e){si(e),Xb(this).sc(new Gj(e))},u.wc=function(){var e;return e=Xb(this).wc(),hlt(e,new se,64|e.qd()&1296,bq(this))},u.nc=function(e){return Pit(),!0},u.oc=function(e){return oge(this,e)},u.Pb=function(){KD(new Cit(mot(gm(this.a)).tc()))},u.pc=function(e){var n;return n=a(XM(gm(this.a),e),13),(n?n._b():0)>0},u.Fb=function(e){return Zme(this,e)},u.Hb=function(){return Yr(Xb(this))},u.Wb=function(){return Xb(this).Wb()},u.tc=function(){return new tMt(this,Xb(this).tc())},u.vc=function(e){return Rlt(this,e,1)>0},u._b=function(){return bq(this)},u.Ib=function(){return Yc(Xb(this))};var SPe=A(Le,"AbstractMultiset",1681);T(557,654,UP),u.Oc=function(){return this.md()},u.Qc=function(){return this.nd()},u.Mc=function(e){return this.od(e)},u.Nc=function(e){return this.pd(e)},u.Hc=function(){var e;return e=this.f,e||(this.f=ct(this.c,122)?new JT(this,a(this.c,122)):ct(this.c,115)?new gM(this,a(this.c,115)):new rM(this,this.c))},u.nd=function(){return $b(),yM(),B4},u.Fb=function(e){return aq(this,e)},u.od=function(e){return a(rr(this,e),19)},u.pd=function(e){return a(i4(this,e),19)};var TPe=A(Le,"AbstractSetMultimap",557);T(1413,557,UP),u.md=function(){return new Ub(this.b)},u.nd=function(){var e;return e=this.b,e?ooe(this.b):(we(),new J5(new Ub(this.b)))},u.Mc=function(e){return a(a(rr(this,e),19),60)},u.od=function(e){return a(a(rr(this,e),19),60)},u.Nc=function(e){return a(a(i4(this,e),19),60)},u.pd=function(e){return a(a(i4(this,e),19),60)},u.Hc=function(){var e;return e=this.f,e||(this.f=ct(this.c,122)?new JT(this,a(this.c,122)):ct(this.c,115)?new gM(this,a(this.c,115)):new rM(this,this.c))};var CPe=A(Le,"AbstractSortedSetMultimap",1413);T(1414,1413,UP),u.Hc=function(){var e;return e=this.f,a(a(e||(this.f=ct(this.c,122)?new JT(this,a(this.c,122)):ct(this.c,115)?new gM(this,a(this.c,115)):new rM(this,this.c)),115),122)},u.Xb=function(){var e;return e=this.i,a(a(e||(this.i=ct(this.c,122)?new Nv(this,a(this.c,122)):ct(this.c,115)?new g2(this,a(this.c,115)):new pM(this,this.c)),60),196)};var APe=A(Le,"AbstractSortedKeySortedSetMultimap",1414);T(521,1483,dZ,vD),u.a=0;var kPe=A(Le,"ArrayListMultimap",521);T(1156,1,Wp,H3t),u.qd=function(){return this.a.qd()&-262},u.rd=function(){return this.a.rd()},u.gc=function(e){this.a.gc(new W3t(e,this.b))},u.sd=function(e){return this.a.sd(new G3t(e,this.b))};var LPe=A(Le,"CollectSpliterators/1",1156);T(1157,1,{},G3t),u.td=function(e){this.a.td(this.b.Kb(e))};var PPe=A(Le,"CollectSpliterators/1/lambda$0$Type",1157);T(1158,1,{},W3t),u.td=function(e){this.a.td(this.b.Kb(e))};var IPe=A(Le,"CollectSpliterators/1/lambda$1$Type",1158);T(1159,1,Wp,fkt),u.qd=function(){return this.a},u.rd=function(){return this.d&&(this.b=DEt(this.b,this.d.rd())),DEt(this.b,0)},u.gc=function(e){this.d&&(this.d.gc(e),this.d=null),this.c.gc(new V3t(this.e,e)),this.b=0},u.sd=function(e){for(;;){if(this.d&&this.d.sd(e))return CT(this.b,rO)&&(this.b=Yg(this.b,1)),!0;if(this.d=null,!this.c.sd(new $3t(this,this.e)))return!1}},u.a=0,u.b=0;var RPe=A(Le,"CollectSpliterators/1FlatMapSpliterator",1159);T(1160,1,{},$3t),u.td=function(e){Cne(this.a,this.b,e)};var DPe=A(Le,"CollectSpliterators/1FlatMapSpliterator/lambda$0$Type",1160);T(1161,1,{},V3t),u.td=function(e){xee(this.b,this.a,e)};var NPe=A(Le,"CollectSpliterators/1FlatMapSpliterator/lambda$1$Type",1161),d1t;T(844,1,rh,Rj),u.Fb=function(e){return this===e},u.Kb=function(e){return zt(e)===zt(this.a)?MOt:e};var OPe=A(Le,"Collections2/1",844);T(220,1,gZ),u.vd=function(e){return this.ud(a(e,220))},u.ud=function(e){var n;return e==(co(),EK)?1:e==(Zr(),MK)?-1:(n=(LD(),TC(this.a,e.a)),n!=0?n:ct(this,467)==ct(e,467)?0:ct(this,467)?1:-1)},u.yd=function(){return this.a},u.Fb=function(e){return wut(this,e)};var BPe=A(Le,"Cut",220);T(1508,220,gZ,s3t),u.ud=function(e){return e==this?0:1},u.wd=function(e){throw K(new v9)},u.xd=function(e){e.a+="+\u221E)"},u.yd=function(){throw K(new yc(COt))},u.zd=function(e){return!1},u.Ib=function(){return"+\u221E"};var MK,FPe=A(Le,"Cut/AboveAll",1508);T(467,220,{220:1,467:1,3:1,34:1},SSt),u.wd=function(e){Fa((e.a+="(",e),this.a)},u.xd=function(e){S1(Fa(e,this.a),93)},u.Hb=function(){return~Yr(this.a)},u.zd=function(e){return LD(),TC(this.a,e)<0},u.Ib=function(){return"/"+this.a+"\\"};var UPe=A(Le,"Cut/AboveValue",467);T(1507,220,gZ,o3t),u.ud=function(e){return e==this?0:-1},u.wd=function(e){e.a+="(-\u221E"},u.xd=function(e){throw K(new v9)},u.yd=function(){throw K(new yc(COt))},u.zd=function(e){return!0},u.Ib=function(){return"-\u221E"};var EK,zPe=A(Le,"Cut/BelowAll",1507);T(1509,220,gZ,TSt),u.wd=function(e){Fa((e.a+="[",e),this.a)},u.xd=function(e){S1(Fa(e,this.a),41)},u.Hb=function(){return Yr(this.a)},u.zd=function(e){return LD(),TC(this.a,e)<=0},u.Ib=function(){return"\\"+this.a+"/"};var jPe=A(Le,"Cut/BelowValue",1509);T(482,1,wd),u.sc=function(e){vo(this,e)},u.Ib=function(){return dce(a(Hot(this,"use Optional.orNull() instead of Optional.or(null)"),20).tc())};var HPe=A(Le,"FluentIterable",482);T(325,482,wd,y2),u.tc=function(){return Rn(this)};var GPe=A(Le,"FluentIterable/2",325);T(1670,25,AOt),u.tc=function(){return this.Ad()},u.nc=function(e){throw K(new Oi)},u.oc=function(e){throw K(new Oi)},u.Pb=function(){throw K(new Oi)},u.pc=function(e){return e!=null&&j2(this,e,!1)},u.vc=function(e){throw K(new Oi)};var WPe=A(Le,"ImmutableCollection",1670);T(912,1670,AOt,Dj),u.tc=function(){return F2((we(),Dv(),Z_))},u.pc=function(e){return!1},u.qc=function(e){return O1(this.a,e)},u.Wb=function(){return!0},u.Ad=function(){return F2((we(),Dv(),Z_))},u._b=function(){return 0},u.yc=function(){return y$(this.a)},u.zc=function(e){return hP(this.a,e)},u.Ib=function(){return Gp(this.a)};var $Pe=A(Le,"ForwardingImmutableCollection",912);T(193,1670,mZ),u.tc=function(){return this.Ad()},u.ed=function(){return new P$(this,this._b(),0)},u.fd=function(e){return new P$(this,this._b(),e)},u.jd=function(e){D1(this,e)},u.wc=function(){return new Ei(this,16)},u.kd=function(e,n){return this.Bd(e,n)},u.bd=function(e,n){throw K(new Oi)},u.Fb=function(e){return Nme(this,e)},u.Hb=function(){return Tle(this)},u.dd=function(e){return e==null?-1:Kde(this,e)},u.Ad=function(){return new P$(this,this._b(),0)},u.gd=function(e){throw K(new Oi)},u.hd=function(e,n){throw K(new Oi)},u.Bd=function(e,n){var i;return cq((i=new eMt(this),new C1(i,e,n)))};var p1t,VPe=A(Le,"ImmutableList",193);T(1675,193,mZ),u.tc=function(){return F2(this.Cd().tc())},u.kd=function(e,n){return cq(this.Cd().kd(e,n))},u.pc=function(e){return e!=null&&this.Cd().pc(e)},u.qc=function(e){return this.Cd().qc(e)},u.Fb=function(e){return Fi(this.Cd(),e)},u.cd=function(e){return this.Cd().cd(e)},u.Hb=function(){return Yr(this.Cd())},u.dd=function(e){return this.Cd().dd(e)},u.Wb=function(){return this.Cd().Wb()},u.Ad=function(){return F2(this.Cd().tc())},u._b=function(){return this.Cd()._b()},u.Bd=function(e,n){return cq(this.Cd().kd(e,n))},u.yc=function(){return this.Cd().zc(dt(un,te,1,this.Cd()._b(),5,1))},u.zc=function(e){return this.Cd().zc(e)},u.Ib=function(){return Yc(this.Cd())};var qPe=A(Le,"ForwardingImmutableList",1675);T(1671,1670,zP),u.tc=function(){return this.Ad()},u.wc=function(){return new Ei(this,1)},u.Fb=function(e){return o9t(this,e)},u.Hb=function(){return IPt(this)};var XPe=A(Le,"ImmutableSet",1671);T(550,1671,zP),u.tc=function(){return this.Ad()},u.pc=function(e){return e!=null&&AT(this.b,e)},u.qc=function(e){return trt(this.b,e)},u.Hb=function(){return Yr(this.b.b)},u.Wb=function(){return this.b.b.Wb()},u.Ad=function(){return F2(new Dg(this.b.b.tc()))},u._b=function(){return this.b.b._b()},u.yc=function(){return this.b.b.yc()},u.zc=function(e){return nMt(this.b,e)},u.Ib=function(){return Yc(this.b.b)};var ZPe=A(Le,"ForwardingImmutableSet",550);T(1664,1663,kOt),u.Ac=function(){return we(),new J5(this.a)},u.wc=function(){return new F5(this)};var YPe=A(Le,"ForwardingSortedSet",1664);T(481,632,tO,bD),u.ec=function(e){return new STt(this,e,this)},u.Zb=function(e,n){return YC(this,e,n,!1)};var KPe=A(Le,"HashBiMap",481);T(892,633,tO,STt),u.dc=function(){return new _St(this,this.a.b.Tb().tc())};var JPe=A(Le,"HashBiMap/1",892);T(479,1,Cs),u.gc=function(e){ks(this,e)},u.hc=function(){return this.b.hc()},u.ic=function(){return yEt(this)},u.jc=function(){this.b.jc()};var QPe=A(Le,"TransformedIterator",479);T(893,479,Cs,_St),u.Ed=function(e){return new ZCt(this,a(e,38))},u.Dd=function(t){return this.Ed(t)};var t6e=A(Le,"HashBiMap/1/1",893);T(894,392,pZ,ZCt),u.kc=function(){return this.c},u.lc=function(){return this.a.a.b.Vb(this.c)},u.mc=function(e){var n;return M1(Hit(YD(this.a.a),this),ift),n=this.a.a.b.Vb(this.c),zt(e)===zt(n)||e!=null&&Fi(e,n)?e:(YC(this.a.a,this.c,e,!0),n)};var e6e=A(Le,"HashBiMap/1/1/1",894);T(298,557,UP,Ov),u.md=function(){return new L9(tq(this.a))},u.a=2;var n6e=A(Le,"HashMultimap",298);T(372,392,{392:1,372:1,3:1,38:1},N5),u.kc=function(){return this.g},u.lc=function(){return this.i},u.mc=function(e){throw K(new Oi)};var i6e=A(Le,"ImmutableEntry",372);T(903,550,zP,Nxt);var r6e=A(Le,"ImmutableEnumSet",903);T(544,847,fZ,P$);var s6e=A(Le,"ImmutableList/1",544);T(1561,550,LOt),u.tc=function(){return F2(new Dg(this.b.b.tc()))},u.wc=function(){return new F5(this)},u.pc=function(e){try{return e!=null&&AT(this.a,e)}catch(n){if(n=vr(n),ct(n,177))return!1;throw K(n)}},u.qc=function(e){var n,i;for(i=e.tc();i.hc();)if(n=i.ic(),n==null)return!1;try{return trt(this.a,e)}catch(r){if(r=vr(r),ct(r,177))return!1;throw K(r)}},u.Ad=function(){return F2(new Dg(this.b.b.tc()))},u.yc=function(){return cLt(this,dt(un,te,1,this.b.b._b(),5,1))},u.zc=function(e){return i7(this,e)};var Ezt,g1t,o6e=A(Le,"ImmutableSortedSet",1561);T(904,482,wd,FEt),u.tc=function(){return rst(this.a)},u.Ib=function(){return Gp(this.a)+" (cycled)"};var c6e=A(Le,"Iterables/1",904);T(200,1,rh,X),u.Kb=function(e){return a(e,20).tc()},u.Fb=function(e){return this===e};var a6e=A(Le,"Iterables/12",200);T(905,482,wd,dCt),u.sc=function(e){si(e),this.b.sc(new q3t(this.a,e))},u.tc=function(){return GT(this)};var u6e=A(Le,"Iterables/4",905);T(906,1,{},q3t),u.td=function(e){_te(this.b,this.a,e)};var l6e=A(Le,"Iterables/4/lambda$0$Type",906);T(907,482,wd,pCt),u.sc=function(e){si(e),this.a.sc(new X3t(e,this.b))},u.tc=function(){return id(this)};var h6e=A(Le,"Iterables/5",907);T(908,1,{},X3t),u.td=function(e){this.a.td(this.b.Kb(e))};var f6e=A(Le,"Iterables/5/lambda$0$Type",908),Szt,m1t;T(945,1665,fZ,xt),u.hc=function(){return!1},u.Cc=function(){return!1},u.ic=function(){throw K(new J)},u.Dc=function(){return 0},u.Ec=function(){throw K(new J)},u.Fc=function(){return-1};var d6e=A(Le,"Iterators/1",945);T(555,257,iO,d5),u.hc=function(){return!this.a},u.ic=function(){if(this.a)throw K(new J);return this.a=!0,this.b},u.a=!1;var p6e=A(Le,"Iterators/11",555);T(946,1,Cs,Bt),u.gc=function(e){ks(this,e)},u.hc=function(){return!1},u.ic=function(){throw K(new J)},u.jc=function(){M1(!1,lw)};var g6e=A(Le,"Iterators/2",946);T(947,257,iO,f5),u.hc=function(){return this.a.hc()},u.ic=function(){return this.a.ic()};var m6e=A(Le,"Iterators/3",947);T(948,1,Cs,RTt),u.gc=function(e){ks(this,e)},u.hc=function(){return this.a.hc()||this.b.tc().hc()},u.ic=function(){return mat(this)},u.jc=function(){this.a.jc()};var b6e=A(Le,"Iterators/4",948);T(950,949,iO,Z3t);var w6e=A(Le,"Iterators/6",950);T(951,479,Cs,ySt),u.Dd=function(e){return this.a.Kb(e)};var v6e=A(Le,"Iterators/7",951);T(647,1,Cs),u.gc=function(e){ks(this,e)},u.hc=function(){return Jn(this)},u.ic=function(){return In(this)},u.jc=function(){M1(!!this.c,lw),this.c.jc(),this.c=null};var _6e=A(Le,"MultitransformedIterator",647);T(182,647,{182:1,43:1},$d),u.Fd=function(e){return a(e,43)};var y6e=A(Le,"Iterators/ConcatenatedIterator",182);T(648,647,Cs,Ait),u.Fd=function(e){return ale(a(e,43))};var x6e=A(Le,"Iterators/ConcatenatedIterator/1",648);T(1540,557,UP,PIt),u.Pb=function(){hat(this),K3(this.a,this.a)},u.md=function(){return new Jrt(this.b)},u.Pc=function(e){return new L6t(this,e,this.b)},u.Kc=function(){return new Zrt(this)},u.Lc=function(){var e;return new Ei((e=this.g,a(e||(this.g=new L8(this)),19)),17)},u.Xb=function(){var e;return e=this.i,e||(this.i=ct(this.c,122)?new Nv(this,a(this.c,122)):ct(this.c,115)?new g2(this,a(this.c,115)):new pM(this,this.c))},u.Rc=function(){return ts(),tC(new Zrt(this),(Hv(),g6))},u.Sc=function(){var e;return m$(new Ei((e=this.g,a(e||(this.g=new L8(this)),19)),17),new Ot)},u.b=2;var M6e=A(Le,"LinkedHashMultimap",1540);T(1543,1,ys,Ot),u.Kb=function(e){return a(e,38).lc()};var E6e=A(Le,"LinkedHashMultimap/0methodref$getValue$Type",1543);T(728,1,Cs,Zrt),u.gc=function(e){ks(this,e)},u.ic=function(){return Tue(this)},u.hc=function(){return this.a!=this.b.a},u.jc=function(){M1(!!this.c,lw),QAt(this.b,this.c.g,this.c.i),this.c=null};var S6e=A(Le,"LinkedHashMultimap/1",728);T(310,372,{392:1,372:1,310:1,1706:1,3:1,38:1},Fot),u.Gd=function(){return this.f},u.Hd=function(e){this.c=e},u.Id=function(e){this.f=e},u.d=0;var Tzt=A(Le,"LinkedHashMultimap/ValueEntry",310);T(1541,1660,{1706:1,20:1,25:1,13:1,19:1},L6t),u.nc=function(e){var n,i,r,c,l;for(l=sft*Oot((e==null?0:Yr(e))*oft,15),n=l&this.b.length-1,c=this.b[n],i=c;i;i=i.a)if(i.d==l&&Rp(i.i,e))return!1;return r=new Fot(this.c,e,l,c),h3t(this.d,r),r.f=this,this.d=r,K3(this.g.a.b,r),K3(r,this.g.a),this.b[n]=r,++this.f,++this.e,o1e(this),!0},u.Pb=function(){var e,n;for(rW(this.b,null),this.f=0,e=this.a;e!=this;e=e.Gd())n=a(e,310),K3(n.b,n.e);this.a=this,this.d=this,++this.e},u.pc=function(e){var n,i;for(i=sft*Oot((e==null?0:Yr(e))*oft,15),n=this.b[i&this.b.length-1];n;n=n.a)if(n.d==i&&Rp(n.i,e))return!0;return!1},u.sc=function(e){var n;for(si(e),n=this.a;n!=this;n=n.Gd())e.td(a(n,310).i)},u.Gd=function(){return this.a},u.tc=function(){return new u4t(this)},u.vc=function(e){return k9t(this,e)},u.Hd=function(e){this.d=e},u.Id=function(e){this.a=e},u._b=function(){return this.f},u.e=0,u.f=0;var T6e=A(Le,"LinkedHashMultimap/ValueSet",1541);T(1542,1,Cs,u4t),u.gc=function(e){ks(this,e)},u.hc=function(){return eot(this),this.b!=this.c},u.ic=function(){var e,n;if(eot(this),this.b==this.c)throw K(new J);return e=a(this.b,310),n=e.i,this.d=e,this.b=e.f,n},u.jc=function(){eot(this),M1(!!this.d,lw),k9t(this.c,this.d.i),this.a=this.c.e,this.d=null},u.a=0;var C6e=A(Le,"LinkedHashMultimap/ValueSet/1",1542);T(689,1677,dZ,irt),u.Hc=function(){return gm(this)},u.Fb=function(e){return aq(this,e)},u.Mc=function(e){return new QG(this,e)},u.Nc=function(e){return oV(this,e)},u.Pb=function(){k$(this)},u.Qb=function(e){return Git(this,e)},u.Ic=function(){return new nrt(this)},u.Jc=function(){return new Ij(this)},u.Kc=function(){throw K(new sV("should never be called"))},u.Tc=function(e){return new QG(this,e)},u.Wb=function(){return!this.a},u.Uc=function(e){return oV(this,e)},u._b=function(){return this.d},u.c=0,u.d=0;var A6e=A(Le,"LinkedListMultimap",689);T(41,25,tx),u.jd=function(e){D1(this,e)},u.wc=function(){return new Ei(this,16)},u.bd=function(e,n){throw K(new Tp("Add not supported on this list"))},u.nc=function(e){return this.bd(this._b(),e),!0},u.Pb=function(){this.Jd(0,this._b())},u.Fb=function(e){return jlt(this,e)},u.Hb=function(){return Nat(this)},u.dd=function(e){return KLt(this,e)},u.tc=function(){return new $3(this)},u.ed=function(){return this.fd(0)},u.fd=function(e){return new Gs(this,e)},u.gd=function(e){throw K(new Tp("Remove not supported on this list"))},u.Jd=function(e,n){var i,r;for(r=this.fd(e),i=e;i0||this.c.hc()},u.ic=function(){if(!(this.d>0||this.c.hc()))throw K(new J);return this.d==0&&(this.b=a(this.c.ic(),312),this.f=this.d=a(this.b.a.lc(),13)._b()),--this.d,this.a=!0,this.b.a.kc()},u.jc=function(){M1(this.a,lw),this.f==1?this.c.jc():Rlt(this.e,this.b.a.kc(),1)>0,--this.f,this.a=!1},u.a=!1,u.d=0,u.f=0;var lIe=A(Le,"Multisets/MultisetIteratorImpl",981);T(667,1,ys,se),u.Kb=function(e){return new Ei(lle(a(a(e,300).a.lc(),13)._b(),a(e,300).a.kc()),16)};var hIe=A(Le,"Multisets/lambda$0$Type",667);T(1684,1,jr),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var fIe=A(Le,"Ordering",1684);T(1565,1684,wZ,ot),u.Ld=function(e,n){return one(a(e,34),a(n,34))},u.Ib=function(){return"Ordering.natural()"};var Azt,dIe=A(Le,"NaturalOrdering",1565);T(464,1,{138:1,464:1,3:1,56:1},Cut),u.Mb=function(e){return Hre(this,a(e,34))},u.Nb=function(e){return this.Mb(e)},u.Fb=function(e){var n;return ct(e,464)?(n=a(e,464),wut(this.a,n.a)&&wut(this.b,n.b)):!1},u.Hb=function(){return Yr(this.a)*31+Yr(this.b)},u.Ib=function(){return akt(this.a,this.b)};var pIe=A(Le,"Range",464);T(485,1675,mZ,hN),u.Cd=function(){return this.a};var gIe=A(Le,"RegularImmutableList",485);T(554,550,zP,iW);var B4,mIe=A(Le,"RegularImmutableSet",554);T(729,1561,LOt,Uot);var bIe=A(Le,"RegularImmutableSortedSet",729);T(543,1664,{543:1,3:1,20:1,13:1,196:1,19:1,60:1},hMt);var wIe=A(Le,"Sets/UnmodifiableNavigableSet",543);T(1165,1675,mZ,aTt),u.Cd=function(){return this.a};var vIe=A(Le,"SingletonImmutableList",1165);T(326,1671,zP,l2),u.tc=function(){return Ao(),new d5(this.a)},u.pc=function(e){return Fi(this.a,e)},u.Ad=function(){return Ao(),new d5(this.a)},u._b=function(){return 1};var _Ie=A(Le,"SingletonImmutableSet",326);T(1415,1414,UP,G4t),u.Hc=function(){var e;return e=this.f,a(a(e||(this.f=ct(this.c,122)?new JT(this,a(this.c,122)):ct(this.c,115)?new gM(this,a(this.c,115)):new rM(this,this.c)),115),122)},u.Xb=function(){var e;return e=this.i,a(a(e||(this.i=ct(this.c,122)?new Nv(this,a(this.c,122)):ct(this.c,115)?new g2(this,a(this.c,115)):new pM(this,this.c)),60),196)},u.Pc=function(e){return e==null&&this.a.Ld(null,null),new Ub(this.b)};var yIe=A(Le,"TreeMultimap",1415);T(78,1,{3:1,78:1}),u.Nd=function(e){return new y.Error(e)},u.Od=function(){return this.g},u.Pd=function(){var e,n,i;i=this.g==null?null:this.g.replace(new y.RegExp(` -`,"g")," "),n=(e=Og(this.ql),i==null?e:e+": "+i),bne(this,mce(this.Nd(n))),Ki(this)},u.Ib=function(){return W4t(this,this.Od())},u.e=IOt,u.i=!1,u.n=!0;var kzt=A(bc,"Throwable",78);T(104,78,{3:1,104:1,78:1});var xIe=A(bc,"Exception",104);T(54,104,rp,Ep,sc);var MIe=A(bc,"RuntimeException",54);T(539,54,rp);var EIe=A(bc,"JsException",539);T(760,539,rp);var SIe=A(jP,"JavaScriptExceptionBase",760);T(435,760,{435:1,3:1,104:1,54:1,78:1},vIt),u.Od=function(){return E1e(this),this.c},u.Qd=function(){return zt(this.b)===zt(b1t)?null:this.b};var b1t,TIe=A(uft,"JavaScriptException",435),Lzt=A(uft,"JavaScriptObject$",0),TK;T(1640,1,{});var CIe=A(uft,"Scheduler",1640),JO=0,Pzt=0,QO=-1;T(787,1640,{},tt);var w1t,AIe=A(jP,"SchedulerImpl",787),CK;T(1653,1,{});var kIe=A(jP,"StackTraceCreator/Collector",1653);T(761,1653,{},Q),u.Rd=function(e){var n={},i,r=[];e[lft]=r;for(var c=arguments.callee.caller;c;){var l=(TM(),c.name||(c.name=Zue(c.toString())));r.push(l);var f=":"+l,g=n[f];if(g){var b,v;for(b=0,v=g.length;b=0?"+":"")+(i/60|0),n=(i<0?-i:i)%60<10?"0"+(i<0?-i:i)%60:""+(i<0?-i:i)%60,(C8t(),Hzt)[this.q.getDay()]+" "+Gzt[this.q.getMonth()]+" "+PW(this.q.getDate())+" "+PW(this.q.getHours())+":"+PW(this.q.getMinutes())+":"+PW(this.q.getSeconds())+" GMT"+e+n+" "+this.q.getFullYear()};var tB=A(ii,"Date",181);T(1622,181,BOt,QRt),u.a=!1,u.b=0,u.c=0,u.d=0,u.e=0,u.f=0,u.g=!1,u.i=0,u.j=0,u.k=0,u.n=0,u.o=0,u.p=0;var jIe=A("com.google.gwt.i18n.shared.impl","DateRecord",1622);T(1659,1,{}),u.Vd=function(){return null},u.Wd=function(){return null},u.Xd=function(){return null},u.Yd=function(){return null},u.Zd=function(){return null};var HIe=A(ix,"JSONValue",1659);T(209,1659,{209:1},Rg,I8),u.Fb=function(e){return ct(e,209)?oct(this.a,a(e,209).a):!1},u.Ud=function(){return ait},u.Hb=function(){return Zot(this.a)},u.Vd=function(){return this},u.Ib=function(){var e,n,i;for(i=new ll("["),n=0,e=this.a.length;n0&&(i.a+=","),Fa(i,B2(this,n));return i.a+="]",i.a};var GIe=A(ix,"JSONArray",209);T(443,1659,{443:1},R8),u.Ud=function(){return uit},u.Wd=function(){return this},u.Ib=function(){return me(),""+this.a},u.a=!1;var Izt,Rzt,WIe=A(ix,"JSONBoolean",443);T(877,54,rp,Oxt);var $Ie=A(ix,"JSONException",877);T(913,1659,{},Fn),u.Ud=function(){return m9},u.Ib=function(){return tu};var Dzt,VIe=A(ix,"JSONNull",913);T(259,1659,{259:1},p5),u.Fb=function(e){return ct(e,259)?this.a==a(e,259).a:!1},u.Ud=function(){return LG},u.Hb=function(){return Tr(lt(this.a))},u.Xd=function(){return this},u.Ib=function(){return this.a+""},u.a=0;var qIe=A(ix,"JSONNumber",259);T(191,1659,{191:1},_T,sT),u.Fb=function(e){return ct(e,191)?oct(this.a,a(e,191).a):!1},u.Ud=function(){return lit},u.Hb=function(){return Zot(this.a)},u.Yd=function(){return this},u.Ib=function(){var e,n,i,r,c,l;for(l=new ll("{"),e=!0,c=wat(this,dt(At,wt,2,0,6,1)),i=0,r=c.length;i=0?":"+this.c:"")+")"},u.c=0;var P1t=A(bc,"StackTraceElement",287);xzt={3:1,476:1,34:1,2:1};var At=A(bc,aft,2);T(100,381,{476:1},Sp,yT,ul);var pRe=A(bc,"StringBuffer",100);T(98,381,{476:1},om,Bb,ll);var gRe=A(bc,"StringBuilder",98);T(763,79,zZ,Uxt);var mRe=A(bc,"StringIndexOutOfBoundsException",763);T(1722,1,{});var I1t,R1t;T(46,54,{3:1,104:1,54:1,78:1,46:1},Oi,Tp);var bRe=A(bc,"UnsupportedOperationException",46);T(216,210,{3:1,34:1,210:1,216:1},IL,Lit),u.vd=function(e){return GNt(this,a(e,216))},u.$d=function(){return rw(p7t(this))},u.Fb=function(e){var n;return this===e?!0:ct(e,216)?(n=a(e,216),this.e==n.e&&GNt(this,n)==0):!1},u.Hb=function(){var e;return this.b!=0?this.b:this.a<54?(e=Ka(this.f),this.b=or(ns(e,-1)),this.b=33*this.b+or(ns(E1(e,32),-1)),this.b=17*this.b+Tr(this.e),this.b):(this.b=17*z6t(this.c)+Tr(this.e),this.b)},u.Ib=function(){return p7t(this)},u.a=0,u.b=0,u.d=0,u.e=0,u.f=0;var Fzt,b0,D1t,N1t,O1t,B1t,F1t,U1t,LK=A("java.math","BigDecimal",216);T(89,210,{3:1,34:1,210:1,89:1},Tut,Fp,Xv,Yut,tRt,y1),u.vd=function(e){return UIt(this,a(e,89))},u.$d=function(){return rw(lZ(this,0))},u.Fb=function(e){return Yat(this,e)},u.Hb=function(){return z6t(this)},u.Ib=function(){return lZ(this,0)},u.b=-2,u.c=0,u.d=0,u.e=0;var PK,eB,z1t,IK,nB,AE,X_=A("java.math","BigInteger",89),Uzt,zzt,gx,z4;T(441,1666,uE),u.Pb=function(){uu(this)},u.Qb=function(e){return dm(this,e)},u.Rb=function(e){return A6t(this,e,this.e)||A6t(this,e,this.d)},u.Tb=function(){return new xp(this)},u.Vb=function(e){return zi(this,e)},u.Zb=function(e,n){return wr(this,e,n)},u.$b=function(e){return IM(this,e)},u._b=function(){return nM(this)};var wRe=A(ii,"AbstractHashMap",441);T(242,bd,vl,xp),u.Pb=function(){this.a.Pb()},u.pc=function(e){return YAt(this,e)},u.tc=function(){return new qg(this.a)},u.vc=function(e){var n;return YAt(this,e)?(n=a(e,38).kc(),this.a.$b(n),!0):!1},u._b=function(){return this.a._b()};var vRe=A(ii,"AbstractHashMap/EntrySet",242);T(243,1,Cs,qg),u.gc=function(e){ks(this,e)},u.ic=function(){return Sm(this)},u.hc=function(){return this.b},u.jc=function(){R5t(this)},u.b=!1;var _Re=A(ii,"AbstractHashMap/EntrySetIterator",243);T(433,1,Cs,$3),u.gc=function(e){ks(this,e)},u.hc=function(){return N9(this)},u.ic=function(){return y4t(this)},u.jc=function(){Th(this)},u.b=0,u.c=-1;var yRe=A(ii,"AbstractList/IteratorImpl",433);T(94,433,kf,Gs),u.jc=function(){Th(this)},u.Bc=function(e){cd(this,e)},u.Cc=function(){return this.b>0},u.Dc=function(){return this.b},u.Ec=function(){return Hn(this.b>0),this.a.cd(this.c=--this.b)},u.Fc=function(){return this.b-1},u.Gc=function(e){Wv(this.c!=-1),this.a.hd(this.c,e)};var xRe=A(ii,"AbstractList/ListIteratorImpl",94);T(227,41,tx,C1),u.bd=function(e,n){t_(e,this.b),this.c.bd(this.a+e,n),++this.b},u.cd=function(e){return mi(e,this.b),this.c.cd(this.a+e)},u.gd=function(e){var n;return mi(e,this.b),n=this.c.gd(this.a+e),--this.b,n},u.hd=function(e,n){return mi(e,this.b),this.c.hd(this.a+e,n)},u._b=function(){return this.b},u.a=0,u.b=0;var MRe=A(ii,"AbstractList/SubList",227);T(352,bd,vl,Tv),u.Pb=function(){this.a.Pb()},u.pc=function(e){return this.a.Qb(e)},u.tc=function(){var e;return e=this.a.Tb().tc(),new g5(e)},u.vc=function(e){return this.a.Qb(e)?(this.a.$b(e),!0):!1},u._b=function(){return this.a._b()};var ERe=A(ii,"AbstractMap/1",352);T(542,1,Cs,g5),u.gc=function(e){ks(this,e)},u.hc=function(){return this.a.hc()},u.ic=function(){var e;return e=a(this.a.ic(),38),e.kc()},u.jc=function(){this.a.jc()};var SRe=A(ii,"AbstractMap/1/1",542);T(223,25,D_,vf),u.Pb=function(){this.a.Pb()},u.pc=function(e){return this.a.Rb(e)},u.tc=function(){var e;return e=this.a.Tb().tc(),new nm(e)},u._b=function(){return this.a._b()};var TRe=A(ii,"AbstractMap/2",223);T(321,1,Cs,nm),u.gc=function(e){ks(this,e)},u.hc=function(){return this.a.hc()},u.ic=function(){var e;return e=a(this.a.ic(),38),e.lc()},u.jc=function(){this.a.jc()};var CRe=A(ii,"AbstractMap/2/1",321);T(440,1,{440:1,38:1}),u.Fb=function(e){var n;return ct(e,38)?(n=a(e,38),au(this.d,n.kc())&&au(this.e,n.lc())):!1},u.kc=function(){return this.d},u.lc=function(){return this.e},u.Hb=function(){return oD(this.d)^oD(this.e)},u.mc=function(e){return pst(this,e)},u.Ib=function(){return this.d+"="+this.e};var ARe=A(ii,"AbstractMap/AbstractEntry",440);T(351,440,{440:1,351:1,38:1},F9);var kRe=A(ii,"AbstractMap/SimpleEntry",351);T(1672,1,eO),u.Fb=function(e){var n;return ct(e,38)?(n=a(e,38),au(this.kc(),n.kc())&&au(this.lc(),n.lc())):!1},u.Hb=function(){return oD(this.kc())^oD(this.lc())},u.Ib=function(){return this.kc()+"="+this.lc()};var LRe=A(ii,TOt,1672);T(1685,1666,EOt),u.Wc=function(e){return Zkt(this,e)},u.Qb=function(e){return sW(this,e)},u.Tb=function(){return new H8(this)},u.Vb=function(e){return Ua(Fat(this,e))},u.Xb=function(){return new Cv(this)};var PRe=A(ii,"AbstractNavigableMap",1685);T(668,bd,vl,H8),u.pc=function(e){return ct(e,38)&&Zkt(this.b,a(e,38))},u.tc=function(){return new aL(this.b)},u.vc=function(e){var n;return ct(e,38)?(n=a(e,38),D5t(this.b,n)):!1},u._b=function(){return this.b.c};var IRe=A(ii,"AbstractNavigableMap/EntrySet",668);T(488,bd,rft,Cv),u.wc=function(){return new F5(this)},u.Pb=function(){L5(this.a)},u.pc=function(e){return sW(this.a,e)},u.tc=function(){var e;return e=new aL(new Q5(this.a).b),new oT(e)},u.vc=function(e){return sW(this.a,e)?(cC(this.a,e),!0):!1},u._b=function(){return this.a.c};var RRe=A(ii,"AbstractNavigableMap/NavigableKeySet",488);T(489,1,Cs,oT),u.gc=function(e){ks(this,e)},u.hc=function(){return N9(this.a.a)},u.ic=function(){var e;return e=WW(this.a),e.kc()},u.jc=function(){GTt(this.a)};var DRe=A(ii,"AbstractNavigableMap/NavigableKeySet/1",489);T(1693,25,D_),u.nc=function(e){return RM(JM(this,e)),!0},u.oc=function(e){return En(e),ED(e!=this,"Can't add a queue to itself"),yo(this,e)},u.Pb=function(){for(;PV(this)!=null;);};var NRe=A(ii,"AbstractQueue",1693);T(407,25,{4:1,20:1,25:1,13:1},X3,XCt),u.nc=function(e){return fct(this,e),!0},u.Pb=function(){yct(this)},u.pc=function(e){return i6t(new aC(this),e)},u.Wb=function(){return Iit(this)},u.tc=function(){return new aC(this)},u.vc=function(e){return Loe(new aC(this),e)},u._b=function(){return this.c-this.b&this.a.length-1},u.wc=function(){return new Ei(this,272)},u.zc=function(e){var n,i;return i=this.c-this.b&this.a.length-1,e.lengthi&&Vr(e,i,null),e},u.b=0,u.c=0;var ORe=A(ii,"ArrayDeque",407);T(408,1,Cs,aC),u.gc=function(e){ks(this,e)},u.hc=function(){return this.a!=this.b},u.ic=function(){return XN(this)},u.jc=function(){ePt(this)},u.a=0,u.b=0,u.c=-1;var BRe=A(ii,"ArrayDeque/IteratorImpl",408);T(12,41,zOt,Dt,qu,Eh),u.bd=function(e,n){pm(this,e,n)},u.nc=function(e){return Ut(this,e)},u.oc=function(e){return Or(this,e)},u.Pb=function(){this.c=dt(un,te,1,0,5,1)},u.pc=function(e){return nc(this,e,0)!=-1},u.sc=function(e){pd(this,e)},u.cd=function(e){return Ee(this,e)},u.dd=function(e){return nc(this,e,0)},u.Wb=function(){return this.c.length==0},u.tc=function(){return new H(this)},u.gd=function(e){return Em(this,e)},u.vc=function(e){return Lc(this,e)},u.Jd=function(e,n){SAt(this,e,n)},u.hd=function(e,n){return Kl(this,e,n)},u._b=function(){return this.c.length},u.jd=function(e){gc(this,e)},u.yc=function(){return qW(this)},u.zc=function(e){return xo(this,e)};var P3e=A(ii,"ArrayList",12);T(7,1,Cs,H),u.gc=function(e){ks(this,e)},u.hc=function(){return Qo(this)},u.ic=function(){return G(this)},u.jc=function(){rC(this)},u.a=0,u.b=-1;var FRe=A(ii,"ArrayList/1",7);T(155,41,jOt,ju),u.pc=function(e){return KLt(this,e)!=-1},u.sc=function(e){var n,i,r,c;for(En(e),i=this.a,r=0,c=i.length;r=0},u.qc=function(e){return O1(this.b,e)},u.tc=function(){return new Dg(EM(this.b).b.tc())},u.vc=function(e){return gPt(this,e)},u._b=function(){return this.b.c.length},u.wc=function(){return new Ei(this,256)},u.yc=function(){return qW(this.b)},u.zc=function(e){return xo(this.b,e)};var k8e=A(ii,"PriorityQueue",453);T(214,1,{214:1},kq,fN),u.a=0,u.b=0;var V1t,q1t,N3e=0,L8e=A(ii,"Random",214);T(39,1,Wp,Ei,T2,L5t),u.qd=function(){return this.a},u.rd=function(){return wot(this),this.c},u.gc=function(e){wot(this),this.d.gc(e)},u.sd=function(e){return Qct(this,e)},u.a=0,u.c=0;var P8e=A(ii,"Spliterators/IteratorSpliterator",39);T(382,39,Wp,F5);var I8e=A(ii,"SortedSet/1",382);T(625,1,{},G8),u.ie=function(e){this.a.td(e)};var R8e=A(ii,"Spliterator/OfDouble/0methodref$accept$Type",625);T(626,1,{},W8),u.ie=function(e){this.a.td(e)};var D8e=A(ii,"Spliterator/OfDouble/1methodref$accept$Type",626);T(642,1,Wp),u.gc=function(e){D3t(this,e)},u.qd=function(){return this.d},u.rd=function(){return this.e},u.d=0,u.e=0;var N8e=A(ii,"Spliterators/BaseSpliterator",642);T(929,642,Wp),u.gc=function(e){ct(e,273)?jst(this,a(e,273)):jst(this,new W8(e))},u.sd=function(e){return ct(e,273)?Vv(this,a(e,273)):Vv(this,new G8(e))};var O8e=A(ii,"Spliterators/AbstractDoubleSpliterator",929);T(446,642,Wp);var B8e=A(ii,"Spliterators/AbstractSpliterator",446);T(790,1,Wp),u.gc=function(e){D3t(this,e)},u.qd=function(){return this.b},u.rd=function(){return this.d-this.c},u.b=0,u.c=0,u.d=0;var F8e=A(ii,"Spliterators/BaseArraySpliterator",790);T(791,790,Wp,S4t),u.gc=function(e){kse(this,e)},u.sd=function(e){return Uae(this,e)};var U8e=A(ii,"Spliterators/ArraySpliterator",791);T(789,1,Cs,M3t),u.gc=function(e){ct(e,273)?Hkt(this,a(e,273)):Hkt(this,new aT(e))},u.ic=function(){return pN(this)},u.jc=function(){Gxt()},u.ie=function(e){this.b=e},u.hc=function(){return this.a||(this.a=Vv(this.c,this)),this.a},u.a=!1,u.b=0;var z8e=A(ii,"Spliterators/DoubleConsumerIterator",789);T(523,41,GOt,nd),u.bd=function(e,n){nC(e,this.a.c.length+1),pm(this.a,e,n)},u.nc=function(e){return Ut(this.a,e)},u.oc=function(e){return Or(this.a,e)},u.Pb=function(){this.a.c=dt(un,te,1,0,5,1)},u.pc=function(e){return nc(this.a,e,0)!=-1},u.qc=function(e){return O1(this.a,e)},u.sc=function(e){pd(this.a,e)},u.cd=function(e){return nC(e,this.a.c.length),Ee(this.a,e)},u.dd=function(e){return nc(this.a,e,0)},u.Wb=function(){return this.a.c.length==0},u.tc=function(){return new H(this.a)},u.gd=function(e){return nC(e,this.a.c.length),Em(this.a,e)},u.Jd=function(e,n){SAt(this.a,e,n)},u.hd=function(e,n){return nC(e,this.a.c.length),Kl(this.a,e,n)},u._b=function(){return this.a.c.length},u.jd=function(e){gc(this.a,e)},u.kd=function(e,n){return new C1(this.a,e,n)},u.yc=function(){return qW(this.a)},u.zc=function(e){return xo(this.a,e)},u.Ib=function(){return Gp(this.a)};var j8e=A(ii,"Vector",523);T(596,523,GOt,OG);var H8e=A(ii,"Stack",596);T(254,1,{},Mm),u.Ib=function(){return this.a?this.e.length==0?this.a.a:this.a.a+(""+this.e):this.c};var G8e=A(ii,"StringJoiner",254);T(487,1685,{3:1,109:1,122:1,115:1},rMt,x$),u.Pb=function(){L5(this)},u.Tb=function(){return new Q5(this)},u.Zb=function(e,n){return $N(this,e,n)},u.$b=function(e){return cC(this,e)},u._b=function(){return this.c},u.c=0;var W8e=A(ii,"TreeMap",487);T(397,1,Cs,aL),u.gc=function(e){ks(this,e)},u.ic=function(){return WW(this)},u.hc=function(){return N9(this.a)},u.jc=function(){GTt(this)};var $8e=A(ii,"TreeMap/EntryIterator",397);T(449,668,vl,Q5),u.Pb=function(){L5(this.a)};var V8e=A(ii,"TreeMap/EntrySet",449);T(398,351,{440:1,351:1,38:1,398:1},vV),u.b=!1;var O3e=A(ii,"TreeMap/Node",398);T(560,1,{},it),u.Ib=function(){return"State: mv="+this.c+" value="+this.d+" done="+this.a+" found="+this.b},u.a=!1,u.b=!1,u.c=!1;var q8e=A(ii,"TreeMap/State",560);T(278,23,$Z,U9),u.je=function(){return!1},u.ke=function(){return!1};var RK,X1t,Z1t,Y1t,rB=Ri(ii,"TreeMap/SubMapType",278,ji,Lce,Fne);T(982,278,$Z,VEt),u.ke=function(){return!0};var X8e=Ri(ii,"TreeMap/SubMapType/1",982,rB,null,null);T(983,278,$Z,iSt),u.je=function(){return!0},u.ke=function(){return!0};var Z8e=Ri(ii,"TreeMap/SubMapType/2",983,rB,null,null);T(984,278,$Z,qEt),u.je=function(){return!0};var Y8e=Ri(ii,"TreeMap/SubMapType/3",984,rB,null,null),qzt;T(212,bd,{3:1,20:1,25:1,13:1,196:1,19:1,60:1,212:1},dit,Ub),u.wc=function(){return new F5(this)},u.nc=function(e){return VD(this,e)},u.Pb=function(){L5(this.a)},u.pc=function(e){return sW(this.a,e)},u.tc=function(){var e;return e=new aL(new Q5(new Cv(this.a).a).b),new oT(e)},u.vc=function(e){return Qrt(this,e)},u._b=function(){return this.a.c};var B3e=A(ii,"TreeSet",212);T(845,1,{},Kj),u.le=function(e,n){return ane(this.a,e,n)};var K8e=A(VZ,"BinaryOperator/lambda$0$Type",845);T(846,1,{},wn),u.le=function(e,n){return Lp(a(e,21).a,a(n,21).a)<=0?e:n};var J8e=A(VZ,"BinaryOperator/lambda$1$Type",846);T(843,1,ys,ut),u.Kb=function(e){return e};var Q8e=A(VZ,"Function/lambda$0$Type",843);T(627,1,us,V8),u.Nb=function(e){return!this.a.Nb(e)};var t9e=A(VZ,"Predicate/lambda$0$Type",627);T(150,23,{3:1,34:1,23:1,150:1},oW);var K1t,Qh,bw,tf=Ri(Qs,"Collector/Characteristics",150,ji,joe,Une),Xzt;T(684,1,{},VTt,f8t);var e9e=A(Qs,"Collector/CollectorImpl",684);T(1053,1,ys,Jj),u.Kb=function(e){return me(),!!bct(e)};var n9e=A(Qs,"Collectors/12methodref$test$Type",1053);T(365,1,{},ge),u.Kd=function(e,n){a(e,13).nc(n)};var i9e=A(Qs,"Collectors/20methodref$add$Type",365);T(367,1,{},Pe),u.ne=function(){return new Dt};var r9e=A(Qs,"Collectors/21methodref$ctor$Type",367);T(331,1,{},ti),u.ne=function(){return new $r};var s9e=A(Qs,"Collectors/23methodref$ctor$Type",331);T(332,1,{},Qn),u.Kd=function(e,n){Ir(a(e,67),n)};var o9e=A(Qs,"Collectors/24methodref$add$Type",332);T(1050,1,{},Yi),u.le=function(e,n){return sMt(a(e,15),a(n,13))};var c9e=A(Qs,"Collectors/4methodref$addAll$Type",1050);T(683,1,{},ki),u.le=function(e,n){return ict(e,n)};var a9e=A(Qs,"Collectors/lambda$1$Type",683);T(1055,1,{},Qj),u.ne=function(){return Y(Z(un,1),te,1,5,[this.a])};var u9e=A(Qs,"Collectors/lambda$10$Type",1055);T(1056,1,{},w5),u.Kd=function(e,n){yre(this.a,e)};var l9e=A(Qs,"Collectors/lambda$11$Type",1056);T(1057,1,{},X8),u.le=function(e,n){return qre(this.a,e,n)};var h9e=A(Qs,"Collectors/lambda$12$Type",1057);T(1058,1,ys,lr),u.Kb=function(e){return s_(e)[0]};var f9e=A(Qs,"Collectors/lambda$13$Type",1058);T(366,1,{},pr),u.le=function(e,n){return a(e,13).oc(a(n,13)),a(e,13)};var d9e=A(Qs,"Collectors/lambda$21$Type",366);T(333,1,{},Kt),u.le=function(e,n){return yo(a(e,67),a(n,67)),a(e,67)};var p9e=A(Qs,"Collectors/lambda$25$Type",333);T(334,1,ys,kt),u.Kb=function(e){return a(e,67)};var g9e=A(Qs,"Collectors/lambda$26$Type",334);T(1049,1,{},tH),u.Kd=function(e,n){qle(this.a,e,n)};var m9e=A(Qs,"Collectors/lambda$3$Type",1049);T(1051,1,{},Nt),u.le=function(e,n){return Rle(a(e,109),a(n,109),new Yi)};var b9e=A(Qs,"Collectors/lambda$4$Type",1051);T(1052,1,ys,eH),u.Kb=function(e){return tfe(this.a,e)};var w9e=A(Qs,"Collectors/lambda$5$Type",1052);T(1054,1,{},ie),u.ne=function(){var e;return e=new xm,Pm(e,(me(),me(),!1),new Dt),Pm(e,!0,new Dt),e};var v9e=A(Qs,"Collectors/lambda$8$Type",1054);T(645,1,{}),u.d=!1;var _9e=A(Qs,"TerminatableStream",645);T(1416,645,{607:1,1701:1},QSt);var y9e=A(Qs,"DoubleStream/DoubleStreamSource",1416);T(1417,1,{},nH),u.ie=function(e){FIt(this.a,e)};var x9e=A(Qs,"DoubleStream/DoubleStreamSource/lambda$2$Type",1417),F3e=Sr(Qs,"Stream");T(940,446,Wp,DTt),u.sd=function(e){for(;iue(this);){if(this.a.sd(e))return!0;this.a=null}return!1};var M9e=A(Qs,"Stream/2",940);T(941,1,{},iH),u.td=function(e){Fee(this.a,e)};var E9e=A(Qs,"Stream/2/lambda$0$Type",941);T(942,1,qP,rH),u.fe=function(){B$(this.a)};var S9e=A(Qs,"Stream/3methodref$close$Type",942);T(943,1,qP,sH),u.fe=function(){B$(this.a)};var T9e=A(Qs,"Stream/4methodref$close$Type",943);T(644,446,Wp,Fct),u.sd=function(e){for(this.b=!1;!this.b&&this.c.sd(new bMt(this,e)););return this.b},u.b=!1;var C9e=A(Qs,"Stream/FilterSpliterator",644);T(932,1,{},bMt),u.td=function(e){Xre(this.a,this.b,e)};var A9e=A(Qs,"Stream/FilterSpliterator/lambda$0$Type",932);T(930,929,Wp,n5t);var k9e=A(Qs,"Stream/MapToDoubleSpliterator",930);T(646,1,{},ort),u.td=function(e){Ste(this.a,this.b,e)};var L9e=A(Qs,"Stream/MapToDoubleSpliterator/lambda$0$Type",646);T(643,446,Wp,Rct),u.sd=function(e){return BTt(this,e)};var P9e=A(Qs,"Stream/MapToObjSpliterator",643);T(931,1,{},wMt),u.td=function(e){Tte(this.a,this.b,e)};var I9e=A(Qs,"Stream/MapToObjSpliterator/lambda$0$Type",931);T(45,645,{607:1,1701:1,1700:1},gi);var R9e=A(Qs,"Stream/StreamSource",45);T(936,446,Wp,NTt),u.sd=function(e){for(;rue(this);){if(this.a.sd(e))return!0;B$(this.b),this.b=null,this.a=null}return!1};var D9e=A(Qs,"Stream/StreamSource/1",936);T(937,1,{},oH),u.td=function(e){hre(this.a,e)};var N9e=A(Qs,"Stream/StreamSource/1/lambda$0$Type",937);T(938,446,Wp,D4t),u.sd=function(e){var n;return this.a||(n=new Dt,this.b.a.gc(new cH(n)),we(),gc(n,this.c),this.a=new Ei(n,16)),Qct(this.a,e)},u.a=null;var O9e=A(Qs,"Stream/StreamSource/5",938);T(939,1,{},cH),u.td=function(e){Ut(this.a,e)};var B9e=A(Qs,"Stream/StreamSource/5/2methodref$add$Type",939);T(933,1,{},yt),u.td=function(e){};var F9e=A(Qs,"Stream/StreamSource/lambda$0$Type",933);T(934,1,{},aH),u.le=function(e,n){return yee(this.a,e,n)};var U9e=A(Qs,"Stream/StreamSource/lambda$3$Type",934);T(935,1,{},vMt),u.td=function(e){tee(this.b,this.a,e)};var z9e=A(Qs,"Stream/StreamSource/lambda$4$Type",935);T(553,1,{},ue),u.td=function(e){F8(this,e)};var j9e=A(Qs,"Stream/ValueConsumer",553);T(944,1,{},uH),u.td=function(e){Ule(this.a,e)};var H9e=A(Qs,"TerminatableStream/lambda$0$Type",944),U3e=0,J1t,Q1t=0,sB;T(1480,1,{},ykt);var G9e=A($Ot,"Scanline",1480),z3e=Sr($Ot,VOt);T(1450,1,{},yLt);var W9e=A(vd,"CGraph",1450);T(309,1,{309:1},MAt),u.b=0,u.c=0,u.d=0,u.g=0,u.i=0,u.k=Ps;var $9e=A(vd,"CGroup",309);T(723,1,{},pit);var V9e=A(vd,"CGroup/CGroupBuilder",723);T(57,1,{57:1},hTt),u.Ib=function(){return this.j?hi(this.j.Kb(this)):(Vd(oB),oB.o+"@"+(lm(this)>>>0).toString(16))},u.f=0,u.i=Ps;var oB=A(vd,"CNode",57);T(722,1,{},git);var q9e=A(vd,"CNode/CNodeBuilder",722),Zzt;T(1236,1,{},fn),u.se=function(e,n){return 0},u.te=function(e,n){return 0};var X9e=A(vd,XOt,1236);T(1505,1,{},An),u.pe=function(e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W;for(v=is,r=new H(e.a.b);r.ar.d.c||r.d.c==l.d.c&&r.d.b=0?"b"+e+"["+uV(this.a)+"]":"b["+uV(this.a)+"]"):"b_"+lm(this)};var eNe=A(ZP,"FBendpoint",497);T(262,131,{3:1,262:1,93:1,131:1},mTt),u.Ib=function(){return uV(this)};var nNe=A(ZP,"FEdge",262);T(202,131,{3:1,202:1,93:1,131:1},bN);var H3e=A(ZP,"FGraph",202);T(454,329,{3:1,454:1,329:1,93:1,131:1},_kt),u.Ib=function(){return this.b==null||this.b.length==0?"l["+uV(this.a)+"]":"l_"+this.b};var iNe=A(ZP,"FLabel",454);T(146,329,{3:1,146:1,329:1,93:1,131:1},o4t),u.Ib=function(){return act(this)},u.b=0;var rNe=A(ZP,"FNode",146);T(1691,1,{}),u.Ee=function(e){Pht(this,e)},u.Fe=function(){ORt(this)},u.d=0;var sNe=A(Ift,"AbstractForceModel",1691);T(568,1691,{568:1},qPt),u.De=function(e,n){var i,r,c,l,f;return _9t(this.f,e,n),c=za(Xc(n.d),e.d),f=y.Math.sqrt(c.a*c.a+c.b*c.b),r=y.Math.max(0,f-O$(e.e)/2-O$(n.e)/2),i=e6t(this.e,e,n),i>0?l=-ese(r,this.c)*i:l=Jee(r,this.b)*a(z(e,(Ph(),kE)),21).a,hl(c,l/f),c},u.Ee=function(e){Pht(this,e),this.a=a(z(e,(Ph(),fB)),21).a,this.c=lt(Yt(z(e,dB))),this.b=lt(Yt(z(e,WK)))},u.Ge=function(e){return e0&&(l-=LQt(r,this.a)*i),hl(c,l*this.b/f),c},u.Ee=function(e){var n,i,r,c,l,f,g;for(Pht(this,e),this.b=lt(Yt(z(e,(Ph(),$K)))),this.c=this.b/a(z(e,fB),21).a,r=e.e.c.length,l=0,c=0,g=new H(e.e);g.a0},u.a=0,u.b=0,u.c=0;var cNe=A(Ift,"FruchtermanReingoldModel",569);T(748,1,_d,fj),u.ue=function(e){He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,hO),""),"Force Model"),"Determines the model for force calculation."),Tgt),(i0(),xs)),Cgt),qe((t0(),On))))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Rft),""),"Iterations"),"The number of iterations on the force model."),Xt(300)),Pa),Io),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Dft),""),"Repulsive Power"),"Determines how many bend points are added to the edge; such bend points are regarded as repelling particles in the force model"),Xt(0)),Pa),Io),qe(Md)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,sY),""),"FR Temperature"),"The temperature is used as a scaling factor for particle displacements."),op),ha),To),qe(On)))),Sa(e,sY,hO,xjt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,oY),""),"Eades Repulsion"),"Factor for repulsive forces in Eades' model."),5),ha),To),qe(On)))),Sa(e,oY,hO,vjt),W7t((new pj,e))};var mjt,bjt,Tgt,wjt,vjt,_jt,yjt,xjt,aNe=A(m4,"ForceMetaDataProvider",748);T(387,23,{3:1,34:1,23:1,387:1},hrt);var GK,hB,Cgt=Ri(m4,"ForceModelStrategy",387,ji,loe,Wne),Mjt;T(880,1,_d,pj),u.ue=function(e){W7t(e)};var Ejt,Agt,fB,kgt,Sjt,Lgt,Pgt,kE,Tjt,WK,Igt,Cjt,Ajt,dB,$K,uNe=A(m4,"ForceOptions",880);T(881,1,{},sv),u.Be=function(){var e;return e=new mit,e},u.Ce=function(e){};var lNe=A(m4,"ForceOptions/ForceFactory",881),x6,H4,mx,pB;T(749,1,_d,v8),u.ue=function(e){He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Bft),""),"Fixed Position"),"Prevent that the node is moved by the layout algorithm."),(me(),me(),!1)),(i0(),Ec)),ho),qe((t0(),vc))))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Fft),""),"Desired Edge Length"),"Either specified for parent nodes or for individual edges, where the latter takes higher precedence."),100),ha),To),ur(On,Y(Z(Jp,1),jt,163,0,[Md]))))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Uft),""),"Layout Dimension"),"Dimensions that are permitted to be altered during layout."),Rgt),xs),Ugt),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,zft),""),"Stress Epsilon"),"Termination criterion for the iterative process."),op),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,jft),""),"Iteration Limit"),"Maximum number of performed iterations. Takes higher precedence than 'epsilon'."),Xt(qi)),Pa),Io),qe(On)))),u7t((new dj,e))};var kjt,Ljt,Rgt,Pjt,Ijt,Rjt,hNe=A(m4,"StressMetaDataProvider",749);T(884,1,_d,dj),u.ue=function(e){u7t(e)};var gB,Dgt,Ngt,Ogt,Bgt,Fgt,fNe=A(m4,"StressOptions",884);T(885,1,{},z0),u.Be=function(){var e;return e=new bTt,e},u.Ce=function(e){};var dNe=A(m4,"StressOptions/StressFactory",885);T(959,244,O_,bTt),u.Ae=function(e,n){var i,r,c,l;for(di(n,pBt,1),lt(de(cn(e,(zL(),Bgt))))||t9t(new mit,e,Ta(n,1)),r=w6t(e),i=YNt(this.a,r),l=i.tc();l.hc();)c=a(l.ic(),202),q_e(this.b,c),U0e(this.b);r=aOt(i),rOt(r),Vn(n)};var pNe=A(uY,"StressLayoutProvider",959);T(882,1,{},DG),u.c=0,u.e=0,u.g=0;var gNe=A(uY,"StressMajorization",882);T(348,23,{3:1,34:1,23:1,348:1},cW);var VK,qK,XK,Ugt=Ri(uY,"StressMajorization/Dimension",348,ji,Joe,$ne),Djt;T(883,1,jr,kv),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return wne(this.a,e,n)};var mNe=A(uY,"StressMajorization/lambda$0$Type",883);T(985,1,{},NAt);var bNe=A(JP,"ElkLayered",985);T(986,1,{},Us),u.td=function(e){mue(this.a,e)};var wNe=A(JP,"ElkLayered/lambda$0$Type",986);T(987,1,{},j0),u.td=function(e){Ct(a(e,31),(qt(),qB),(BM(),BB))};var vNe=A(JP,"ElkLayered/lambda$1$Type",987);T(1033,1,{},sSt);var Njt,Ojt,Bjt,_Ne=A(JP,"GraphConfigurator",1033);T(958,244,O_,yu),u.Ae=function(e,n){var i;i=Swe(new SEt,e),zt(cn(e,(qt(),Q4)))===zt((Kg(),Dx))?Hhe(this.a,i,n):Y0e(this.a,i,n),iOt(new _8,i)};var yNe=A(JP,"LayeredLayoutProvider",958);T(328,23,{3:1,34:1,23:1,328:1},U5);var Of,bx,aa,ua,Yo,zgt=Ri(JP,"LayeredPhases",328,ji,cae,Vne),Fjt;T(1407,1,{},zPt),u.i=0;var Ujt,xNe=A(QP,"ComponentsToCGraphTransformer",1407),zjt;T(1408,1,{},ov),u.He=function(e,n){return y.Math.min(e.a!=null?lt(e.a):e.c.i,n.a!=null?lt(n.a):n.c.i)},u.Ie=function(e,n){return y.Math.min(e.a!=null?lt(e.a):e.c.i,n.a!=null?lt(n.a):n.c.i)};var MNe=A(QP,"ComponentsToCGraphTransformer/1",1408);T(80,1,{80:1}),u.i=0,u.k=!0,u.o=Ps;var ZK=A(w4,"CNode",80);T(282,80,{282:1,80:1},nst,Eut),u.Ib=function(){return""};var ENe=A(QP,"ComponentsToCGraphTransformer/CRectNode",282);T(1391,1,{},vg);var YK,KK,SNe=A(QP,"OneDimensionalComponentsCompaction",1391);T(1392,1,rh,cv),u.Fb=function(e){return this===e},u.Kb=function(e){return vq(),me(),a(a(e,48).a,80).d.e!=0};var TNe=A(QP,"OneDimensionalComponentsCompaction/lambda$0$Type",1392);T(1393,1,rh,l3),u.Fb=function(e){return this===e},u.Kb=function(e){return vq(),me(),!!(bIt(a(a(e,48).a,80).j,a(a(e,48).b,110))||a(a(e,48).a,80).d.e!=0&&bIt(a(a(e,48).a,80).j,a(a(e,48).b,110)))};var CNe=A(QP,"OneDimensionalComponentsCompaction/lambda$1$Type",1393);T(1410,1,{},s4t);var ANe=A(w4,"CGraph",1410);T(172,1,{172:1},Dq),u.b=0,u.c=0,u.e=0,u.g=!0,u.i=Ps;var kNe=A(w4,"CGroup",172);T(1409,1,{},Rt),u.He=function(e,n){return y.Math.max(e.a!=null?lt(e.a):e.c.i,n.a!=null?lt(n.a):n.c.i)},u.Ie=function(e,n){return y.Math.max(e.a!=null?lt(e.a):e.c.i,n.a!=null?lt(n.a):n.c.i)};var LNe=A(w4,XOt,1409);T(1411,1,{},N9t),u.d=!1;var jjt,JK=A(w4,KOt,1411);T(1412,1,rh,ve),u.Fb=function(e){return this===e},u.Kb=function(e){return $it(),me(),a(a(e,48).a,80).d.e!=0};var PNe=A(w4,JOt,1412);T(726,1,{},oot),u.a=!1,u.b=!1,u.c=!1,u.d=!1;var INe=A(w4,QOt,726);T(1521,1,{},RCt);var RNe=A(pO,tBt,1521),M6=Sr(u0,VOt);T(1522,1,{341:1},$4t),u.Ne=function(e){dwe(this,a(e,524))};var DNe=A(pO,eBt,1522);T(1523,1,jr,Je),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return ro(a(e,282).g.c+a(e,282).g.b/2,a(n,282).g.c+a(n,282).g.b/2)};var NNe=A(pO,nBt,1523);T(524,1,{524:1},frt),u.a=!1;var ONe=A(pO,iBt,524);T(1524,1,jr,tn),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return $pe(e,n)};var BNe=A(pO,rBt,1524);T(102,1,{102:1},aM,Yst),u.Fb=function(e){var n;return e==null||G3e!=fu(e)?!1:(n=a(e,102),au(this.c,n.c)&&au(this.d,n.d))},u.Hb=function(){return sq(Y(Z(un,1),te,1,5,[this.c,this.d]))},u.Ib=function(){return"("+this.c+Rc+this.d+(this.a?"cx":"")+this.b+")"},u.a=!0,u.c=0,u.d=0;var G3e=A(u0,"Point",102);T(373,23,{3:1,34:1,23:1,373:1},G9);var Xm,ww,Y_,vw,Hjt=Ri(u0,"Point/Quadrant",373,ji,Pce,qne),Gjt;T(1398,1,{},sm),u.b=null,u.c=null,u.d=null,u.e=null,u.f=null;var Wjt,$jt,Vjt,qjt,Xjt,FNe=A(u0,"RectilinearConvexHull",1398);T(516,1,{341:1},d7),u.Ne=function(e){sue(this,a(e,102))},u.b=0;var jgt,UNe=A(u0,"RectilinearConvexHull/MaximalElementsEventHandler",516);T(1400,1,jr,Hi),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Vit(),ro(lt(Yt(e)),lt(Yt(n)))};var zNe=A(u0,"RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type",1400);T(1399,1,{341:1},xLt),u.Ne=function(e){jbe(this,a(e,102))},u.a=0,u.b=null,u.c=null,u.d=null,u.e=null;var jNe=A(u0,"RectilinearConvexHull/RectangleEventHandler",1399);T(1401,1,jr,Pr),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return vC(),a(e,102).c==a(n,102).c?ro(a(n,102).d,a(e,102).d):ro(a(e,102).c,a(n,102).c)};var HNe=A(u0,"RectilinearConvexHull/lambda$0$Type",1401);T(1402,1,jr,Gr),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return vC(),a(e,102).c==a(n,102).c?ro(a(e,102).d,a(n,102).d):ro(a(e,102).c,a(n,102).c)};var GNe=A(u0,"RectilinearConvexHull/lambda$1$Type",1402);T(1403,1,jr,Ze),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return vC(),a(e,102).c==a(n,102).c?ro(a(n,102).d,a(e,102).d):ro(a(n,102).c,a(e,102).c)};var WNe=A(u0,"RectilinearConvexHull/lambda$2$Type",1403);T(1404,1,jr,hs),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return vC(),a(e,102).c==a(n,102).c?ro(a(e,102).d,a(n,102).d):ro(a(n,102).c,a(e,102).c)};var $Ne=A(u0,"RectilinearConvexHull/lambda$3$Type",1404);T(1405,1,jr,Fs),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return uge(e,n)};var VNe=A(u0,"RectilinearConvexHull/lambda$4$Type",1405);T(1406,1,{},xkt);var qNe=A(u0,"Scanline",1406);T(1694,1,{});var XNe=A(K1,"AbstractGraphPlacer",1694);T(458,1,{458:1},fCt);var ps,ZNe=A(K1,"ComponentGroup",458);T(1076,1694,{},M9),u.Oe=function(e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$;if(this.a.c=dt(un,te,1,0,5,1),n.a.c=dt(un,te,1,0,5,1),e.Wb()){n.e.a=0,n.e.b=0;return}for(f=a(e.cd(0),31),Uo(n,f),c=e.tc();c.hc();)r=a(c.ic(),31),Vhe(this,r);for($=new go,l=lt(Yt(z(f,(qt(),ZJ)))),v=new H(this.a);v.aO&&(Gt=0,Zt+=R+c,R=0),nt=f.c,kP(f,Gt+nt.a,Zt+nt.b),Gh(nt),i=y.Math.max(i,Gt+pt.a),R=y.Math.max(R,pt.b),Gt+=pt.a+c;if(n.e.a=i,n.e.b=Zt+R,lt(de(z(l,GJ)))){for(r=new Ms,pOt(r,e,c),k=e.tc();k.hc();)M=a(k.ic(),31),sr(Gh(M.c),r.e);sr(Gh(n.e),r.a)}H5t(n,e)};var o7e=A(K1,"SimpleRowGraphPlacer",1074);T(1075,1,jr,Tc),u.Ld=function(e,n){return xle(a(e,31),a(n,31))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var c7e=A(K1,"SimpleRowGraphPlacer/1",1075),Zjt;T(1032,1,sh,rl),u.Mb=function(e){var n;return n=a(z(a(e,234).b,(qt(),Ro)),74),!!n&&n.b!=0},u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)};var a7e=A(gO,"CompoundGraphPostprocessor/1",1032);T(1031,1,Br,EEt),u.Pe=function(e,n){ERt(this,a(e,31),n)};var u7e=A(gO,"CompoundGraphPreprocessor",1031);T(400,1,{400:1},J6t),u.c=!1;var l7e=A(gO,"CompoundGraphPreprocessor/ExternalPort",400);T(234,1,{234:1},CD),u.Ib=function(){return nL(this.c)+":"+BLt(this.b)};var h7e=A(gO,"CrossHierarchyEdge",234);T(687,1,jr,Z8),u.Ld=function(e,n){return Ape(this,a(e,234),a(n,234))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var f7e=A(gO,"CrossHierarchyEdgeComparator",687);T(279,131,{3:1,279:1,93:1,131:1}),u.o=0;var d7e=A(oa,"LGraphElement",279);T(14,279,{3:1,14:1,279:1,93:1,131:1},Np),u.Ib=function(){return BLt(this)};var Tl=A(oa,"LEdge",14);T(31,279,{3:1,20:1,31:1,279:1,93:1,131:1},fat),u.sc=function(e){vo(this,e)},u.tc=function(){return new H(this.b)},u.Ib=function(){return this.b.c.length==0?"G-unlayered"+Gp(this.a):this.a.c.length==0?"G-layered"+Gp(this.b):"G[layerless"+Gp(this.a)+", layers"+Gp(this.b)+"]"};var Yjt=A(oa,"LGraph",31);T(591,1,{}),u.Qe=function(){return this.e.k},u.xe=function(e){return z(this.e,e)},u.Re=function(){return this.e.n},u.Se=function(){return this.e.o},u.ye=function(e){return Wb(this.e,e)},u.Te=function(e){this.e.k.a=e.a,this.e.k.b=e.b},u.Ue=function(e){this.e.n.a=e.a,this.e.n.b=e.b},u.Ve=function(e){this.e.o=e};var p7e=A(oa,"LGraphAdapters/AbstractLShapeAdapter",591);T(520,1,{741:1},xh),u.We=function(){var e,n;if(!this.b)for(this.b=od(this.a.b.c.length),n=new H(this.a.b);n.a0&&WPt(e.charCodeAt(n-1),vBt);)--n;if(l "+this.a+" "+nL(this.c)},u.a=0,u.b=0,u.d=0;var VBe=A(Dn,"SplineSelfLoopRouter/LoopPadding",188);T(1294,1,sh,wCt),u.Mb=function(e){return pde(this,a(e,188))},u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)},u.a=0,u.c=0;var qBe=A(Dn,"SplineSelfLoopRouter/LoopPadding/EnclosingPredicate",1294);T(1293,1,jr,By),u.Ld=function(e,n){return Ote(a(e,188),a(n,188))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var XBe=A(Dn,"SplineSelfLoopRouter/LoopPadding/MarginComparator",1293);T(415,1,sh,Nb),u.Mb=function(e){return a(e,188).c==this.a},u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)};var ZBe=A(Dn,"SplineSelfLoopRouter/LoopPadding/PortSidePredicate",415);T(414,1,{414:1},dkt),u.c=0,u.d=0,u.e=0;var YBe=A(Dn,"SplineSelfLoopRouter/SelfLoopEdge",414);T(1292,1,jr,Ek),u.Ld=function(e,n){return YQt(a(e,414),a(n,414))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var KBe=A(Dn,"SplineSelfLoopRouter/SelfLoopEdge/StepSizeComparator",1292);T(1451,715,{},CPt),u.qe=function(e){var n,i,r,c;switch(this.c=e,this.a.g){case 2:n=new Dt,qc(wo(new gi(null,new Ei(this.c.a.b,16)),new Uy),new PMt(this,n)),vP(this,new Ck),pd(n,new Sk),n.c=dt(un,te,1,0,5,1),qc(wo(new gi(null,new Ei(this.c.a.b,16)),new Yf),new t9(n)),vP(this,new Uu),pd(n,new T3),n.c=dt(un,te,1,0,5,1),i=tSt(TPt(vL(new gi(null,new Ei(this.c.a.b,16)),new hT(this))),new pf),qc(new gi(null,new Ei(this.c.a.a,16)),new SMt(i,n)),vP(this,new NS),pd(n,new V0),n.c=dt(un,te,1,0,5,1);break;case 3:r=new Dt,vP(this,new Fy),c=tSt(TPt(vL(new gi(null,new Ei(this.c.a.b,16)),new xH(this))),new Tk),qc(wo(new gi(null,new Ei(this.c.a.b,16)),new S3),new LMt(c,r)),vP(this,new pv),pd(r,new OS),r.c=dt(un,te,1,0,5,1);break;default:throw K(new mt)}},u.b=0;var JBe=A(Kr,"EdgeAwareScanlineConstraintCalculation",1451);T(1452,1,sh,Fy),u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)},u.Mb=function(e){return ct(a(e,57).g,153)};var QBe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$0$Type",1452);T(1453,1,{},xH),u.oe=function(e){return T0e(this.a,e)};var tFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$1$Type",1453);T(1464,1,{},Sk),u.td=function(e){a(e,340).fe()};var eFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$10$Type",1464);T(1465,1,us,Yf),u.Nb=function(e){return ct(a(e,57).g,8)};var nFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$11$Type",1465);T(1467,1,{},t9),u.td=function(e){cfe(this.a,e)};var iFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$12$Type",1467);T(1468,1,sh,Uu),u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)},u.Mb=function(e){return ct(a(e,57).g,8)};var rFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$13$Type",1468);T(1469,1,{},T3),u.td=function(e){a(e,340).fe()};var sFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$14$Type",1469);T(1470,1,{},hT),u.oe=function(e){return C0e(this.a,e)};var oFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$15$Type",1470);T(1471,1,{},pf),u.me=function(){return 0};var cFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$16$Type",1471);T(1473,1,{},SMt),u.td=function(e){Ure(this.a,this.b,e)},u.a=0;var aFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$17$Type",1473);T(1474,1,sh,NS),u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)},u.Mb=function(e){return!0};var uFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$18$Type",1474);T(1475,1,{},V0),u.td=function(e){a(e,340).fe()};var lFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$19$Type",1475);T(1454,1,{},Tk),u.me=function(){return 0};var hFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$2$Type",1454);T(1456,1,qP,TMt),u.fe=function(){VC(this.b,this.a,-1)},u.a=0;var fFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$20$Type",1456);T(1461,1,qP,CMt),u.fe=function(){VC(this.a,this.b,-1)},u.b=0;var dFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$21$Type",1461);T(1466,1,qP,AMt),u.fe=function(){VC(this.b,this.a,-1)},u.a=0;var pFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$22$Type",1466);T(1472,1,qP,kMt),u.fe=function(){oDt(this.a,this.b,-1)},u.b=0;var gFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$23$Type",1472);T(1455,1,us,S3),u.Nb=function(e){return ct(a(e,57).g,8)};var mFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$3$Type",1455);T(1457,1,{},LMt),u.td=function(e){zre(this.a,this.b,e)},u.a=0;var bFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$4$Type",1457);T(1458,1,sh,pv),u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)},u.Mb=function(e){return!0};var wFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$5$Type",1458);T(1459,1,{},OS),u.td=function(e){a(e,340).fe()};var vFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$6$Type",1459);T(1460,1,us,Uy),u.Nb=function(e){return ct(a(e,57).g,153)};var _Fe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$7$Type",1460);T(1462,1,{},PMt),u.td=function(e){kue(this.a,this.b,e)};var yFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$8$Type",1462);T(1463,1,sh,Ck),u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)},u.Mb=function(e){return ct(a(e,57).g,153)};var xFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$9$Type",1463);T(1232,1,Br,ISt),u.Pe=function(e,n){wye(this,a(e,31),n)};var rHt,MFe=A(Kr,"HorizontalGraphCompactor",1232);T(1233,1,{},n2),u.se=function(e,n){var i,r,c;return zt(z(this.a.a,(qt(),ig)))===zt((gd(),rb))&&(ct(e.g,153)&&ct(n.g,8)||ct(n.g,153)&&ct(e.g,8))?lt(de(z(this.a.a,ZB)))?0:10:Vct(e,n)||(i=Qv(e),r=Qv(n),i&&i.j==(Ke(),rs)||r&&r.j==(Ke(),rs))?0:(c=a(z(this.a.a,(Ft(),yw)),266),jee(c,i?i.j:(Ke(),Hr),r?r.j:(Ke(),Hr)))},u.te=function(e,n){var i,r,c;return Vct(e,n)?1:(i=Qv(e),r=Qv(n),c=a(z(this.a.a,(Ft(),yw)),266),est(c,i?i.j:(Ke(),Hr),r?r.j:(Ke(),Hr)))};var EFe=A(Kr,"HorizontalGraphCompactor/1",1233);T(1234,1,{},gf),u.re=function(e,n){return ST(),e.a.i==0};var SFe=A(Kr,"HorizontalGraphCompactor/lambda$0$Type",1234);T(1235,1,{},jd),u.re=function(e,n){return $se(this.a,e,n)};var TFe=A(Kr,"HorizontalGraphCompactor/lambda$1$Type",1235);T(1422,1,{},qLt);var sHt,oHt,CFe=A(Kr,"LGraphToCGraphTransformer",1422);T(1430,1,us,zy),u.Nb=function(e){return e!=null};var AFe=A(Kr,"LGraphToCGraphTransformer/0methodref$nonNull$Type",1430);T(1423,1,ys,Ak),u.Kb=function(e){return Zl(),Yc(z(a(a(e,57).g,8),(Ft(),li)))};var kFe=A(Kr,"LGraphToCGraphTransformer/lambda$0$Type",1423);T(1424,1,ys,gv),u.Kb=function(e){return Zl(),oIt(a(a(e,57).g,153))};var LFe=A(Kr,"LGraphToCGraphTransformer/lambda$1$Type",1424);T(1435,1,us,BS),u.Nb=function(e){return Zl(),ct(a(e,57).g,153)};var PFe=A(Kr,"LGraphToCGraphTransformer/lambda$10$Type",1435);T(1439,1,{},Fl),u.td=function(e){var n,i;Zl(),n=e.d.c-e.e.c,i=a(e.g,153),pd(i.b,new TH(n)),pd(i.c,new CH(n)),vo(i.i,new e9(n))};var IFe=A(Kr,"LGraphToCGraphTransformer/lambda$11$Type",1439);T(1440,1,ys,jy),u.Kb=function(e){return Zl(),new gi(null,new T2(Rn(br(a(e,8)))))};var RFe=A(Kr,"LGraphToCGraphTransformer/lambda$12$Type",1440);T(1441,1,us,_b),u.Nb=function(e){return Zl(),ec(a(e,14))};var DFe=A(Kr,"LGraphToCGraphTransformer/lambda$13$Type",1441);T(1442,1,{},MH),u.td=function(e){bue(this.a,e)};var NFe=A(Kr,"LGraphToCGraphTransformer/lambda$14$Type",1442);T(1443,1,ys,kk),u.Kb=function(e){return Zl(),new gi(null,new Ei(a(e,26).a,16))};var OFe=A(Kr,"LGraphToCGraphTransformer/lambda$15$Type",1443);T(1444,1,ys,l1),u.Kb=function(e){return Zl(),new gi(null,new T2(Rn(br(a(e,8)))))};var BFe=A(Kr,"LGraphToCGraphTransformer/lambda$16$Type",1444);T(1445,1,ys,h1),u.Kb=function(e){return Zl(),a(z(a(e,14),(Ft(),X4)),15)};var FFe=A(Kr,"LGraphToCGraphTransformer/lambda$17$Type",1445);T(1446,1,us,Kf),u.Nb=function(e){return Zl(),!!a(e,15)&&!a(e,15).Wb()};var UFe=A(Kr,"LGraphToCGraphTransformer/lambda$18$Type",1446);T(1447,1,{},EH),u.td=function(e){A0e(this.a,a(e,15))};var zFe=A(Kr,"LGraphToCGraphTransformer/lambda$19$Type",1447);T(1426,1,{},SH),u.td=function(e){Uoe(this.a,e)};var jFe=A(Kr,"LGraphToCGraphTransformer/lambda$2$Type",1426);T(1425,1,{},IMt),u.td=function(e){Oce(this.a,this.b,e)};var HFe=A(Kr,"LGraphToCGraphTransformer/lambda$20$Type",1425);T(1436,1,{},TH),u.td=function(e){Yte(this.a,e)},u.a=0;var GFe=A(Kr,"LGraphToCGraphTransformer/lambda$21$Type",1436);T(1437,1,{},CH),u.td=function(e){Kte(this.a,e)},u.a=0;var WFe=A(Kr,"LGraphToCGraphTransformer/lambda$22$Type",1437);T(1438,1,{},e9),u.td=function(e){Jte(this.a,e)},u.a=0;var $Fe=A(Kr,"LGraphToCGraphTransformer/lambda$23$Type",1438);T(1427,1,ys,Hy),u.Kb=function(e){return Zl(),new gi(null,new Ei(a(e,26).a,16))};var VFe=A(Kr,"LGraphToCGraphTransformer/lambda$3$Type",1427);T(1428,1,ys,Gy),u.Kb=function(e){return Zl(),new gi(null,new T2(Rn(br(a(e,8)))))};var qFe=A(Kr,"LGraphToCGraphTransformer/lambda$4$Type",1428);T(1429,1,ys,C3),u.Kb=function(e){return Zl(),a(z(a(e,14),(Ft(),X4)),15)};var XFe=A(Kr,"LGraphToCGraphTransformer/lambda$5$Type",1429);T(1431,1,{},rm),u.td=function(e){J0e(this.a,e)};var ZFe=A(Kr,"LGraphToCGraphTransformer/lambda$6$Type",1431);T(1432,1,{},RMt),u.td=function(e){iee(this.a,this.b,e)};var YFe=A(Kr,"LGraphToCGraphTransformer/lambda$7$Type",1432);T(1433,1,us,Wy),u.Nb=function(e){return Zl(),ct(a(e,57).g,8)};var KFe=A(Kr,"LGraphToCGraphTransformer/lambda$8$Type",1433);T(1434,1,{},yb),u.td=function(e){var n;Zl(),n=a(e.g,8),n.k.a=e.d.c+n.d.b};var JFe=A(Kr,"LGraphToCGraphTransformer/lambda$9$Type",1434);T(1421,1,{},$y),u.pe=function(e){var n,i,r,c,l;for(this.a=e,this.d=new NG,this.c=dt(I0t,te,113,this.a.a.a.c.length,0,1),this.b=0,i=new H(this.a.a.a);i.ac-f?0:c-f;R<=cm(n.f-1,c+f);R++){if(W=rt/(R+1),nt=0,M=1,l=new Dt,pt=Ps,k=0,g=0,$=b[0],R==0)pt=rt,g=(n.g==null&&(n.g=MPt(n,new Wa)),lt(n.g));else{for(;M=W&&(Ut(l,Xt(M)),pt=y.Math.max(pt,_t[M-1]-k),g+=$,nt+=_t[M-1]-nt,k=_t[M-1],$=b[M]),$=y.Math.max($,b[M]),++M;g+=$}O=y.Math.min(1/pt,1/n.b/g),O>r&&(r=O,i=l)}return i},u.tf=function(){return!1};var xUe=A(cp,"MSDCutIndexHeuristic",714);T(1279,1,Br,Vy),u.Pe=function(e,n){C_e(a(e,31),n)};var MUe=A(cp,"SingleEdgeGraphWrapper",1279);T(189,1,{189:1},Jf),u.Ib=function(){return"NEdge[id="+this.b+" w="+this.g+" d="+this.a+"]"},u.a=1,u.b=0,u.c=0,u.f=!1,u.g=0;var aHt=A(_4,"NEdge",189);T(162,1,{},cl);var EUe=A(_4,"NEdge/NEdgeBuilder",162);T(592,1,{},NG);var SUe=A(_4,"NGraph",592);T(113,1,{113:1},c5t),u.c=-1,u.d=0,u.e=0,u.i=-1,u.j=!1;var I0t=A(_4,"NNode",113);T(717,1,HOt,bit),u.sc=function(e){vo(this,e)},u.uc=function(){return this.xc()},u.jd=function(e){D1(this,e)},u.wc=function(){return new Ei(this,16)},u.xc=function(){return new gi(null,this.wc())},u.bd=function(e,n){++this.b,pm(this.a,e,n)},u.nc=function(e){return fD(this,e)},u.oc=function(e){return++this.b,Or(this.a,e)},u.Pb=function(){++this.b,this.a.c=dt(un,te,1,0,5,1)},u.pc=function(e){return nc(this.a,e,0)!=-1},u.qc=function(e){return O1(this.a,e)},u.cd=function(e){return Ee(this.a,e)},u.dd=function(e){return nc(this.a,e,0)},u.Wb=function(){return this.a.c.length==0},u.tc=function(){return F2(new H(this.a))},u.ed=function(){throw K(new Oi)},u.fd=function(e){throw K(new Oi)},u.gd=function(e){return++this.b,Em(this.a,e)},u.vc=function(e){return tst(this,e)},u.hd=function(e,n){return++this.b,Kl(this.a,e,n)},u._b=function(){return this.a.c.length},u.kd=function(e,n){return new C1(this.a,e,n)},u.yc=function(){return qW(this.a)},u.zc=function(e){return xo(this.a,e)},u.b=0;var TUe=A(_4,"NNode/ChangeAwareArrayList",717);T(251,1,{},Ng);var CUe=A(_4,"NNode/NNodeBuilder",251);T(1482,1,{},q0),u.a=!1,u.f=qi,u.j=0;var AUe=A(_4,"NetworkSimplex",1482);T(276,23,{3:1,34:1,23:1,276:1},j5);var pJ,gJ,mJ,R0t,bJ,D0t=Ri(ka,"CenterEdgeLabelPlacementStrategy",276,ji,aae,Kne),uHt;T(386,23,{3:1,34:1,23:1,386:1},drt);var N0t,wJ,O0t=Ri(ka,"ConstraintCalculationStrategy",386,ji,hoe,Jne),lHt;T(290,23,{3:1,34:1,23:1,290:1},DT);var CB,B0t,AB,kB,LB,F0t,vJ=Ri(ka,"ContentAlignment",290,ji,Gae,Qne),hHt;T(317,23,{3:1,34:1,23:1,317:1,285:1,286:1},prt),u.hf=function(){return j8t(this)},u.uf=function(){return j8t(this)};var S6,T6,U0t=Ri(ka,"CrossingMinimizationStrategy",317,ji,foe,tie),fHt;T(319,23,{3:1,34:1,23:1,319:1},uW);var z0t,_J,PB,j0t=Ri(ka,"CuttingStrategy",319,ji,Woe,eie),dHt;T(384,23,{3:1,34:1,23:1,384:1,285:1,286:1},lW),u.hf=function(){return q8t(this)},u.uf=function(){return q8t(this)};var H0t,yJ,xJ,G0t=Ri(ka,"CycleBreakingStrategy",384,ji,$oe,nie),pHt;T(406,23,{3:1,34:1,23:1,406:1},hW);var C6,MJ,$4,gHt=Ri(ka,"EdgeConstraint",406,ji,Voe,iie),mHt;T(241,23,{3:1,34:1,23:1,241:1},NT);var EJ,SJ,TJ,CJ,IB,AJ,W0t=Ri(ka,"EdgeLabelSideSelection",241,ji,Wae,rie),bHt;T(255,23,{3:1,34:1,23:1,255:1},OT);var kJ,$0t,V0t,RB,q0t,X0t,Z0t=Ri(ka,"FixedAlignment",255,ji,$ae,sie),wHt;T(256,23,{3:1,34:1,23:1,256:1},BT);var Y0t,K0t,J0t,Q0t,V4,tmt,emt=Ri(ka,"GraphCompactionStrategy",256,ji,Vae,oie),vHt;T(233,23,{3:1,34:1,23:1,233:1},jb);var IE,DB,RE,Al,q4,NB,J_,Q_,OB,A6,LJ=Ri(ka,"GraphProperties",233,ji,sle,cie),_Ht;T(318,23,{3:1,34:1,23:1,318:1},fW);var BB,PJ,IJ,nmt=Ri(ka,"GreedySwitchType",318,ji,Goe,aie),yHt;T(280,23,{3:1,34:1,23:1,280:1},dW);var wx,k6,ty,xHt=Ri(ka,"InLayerConstraint",280,ji,Hoe,uie),MHt;T(383,23,{3:1,34:1,23:1,383:1},grt);var RJ,imt,rmt=Ri(ka,"InteractiveReferencePoint",383,ji,doe,lie),EHt,smt,omt,DJ,_w,L6,vx,Zm,FB,cmt,amt,UB,umt,zB,NJ,jB,_x,OJ,HB,wc,lmt,Qc,BJ,P6,w0,DE,yx,xx,I6,Mx,Iu,Ru,ey,xd,li,hmt,fmt,dmt,FJ,tg,GB,Du,Ym,UJ,NE,WB,eg,yw,zJ,SHt,R6,X4,jJ,pmt,HJ,Ex;T(178,23,{3:1,34:1,23:1,178:1},H5);var D6,xw,Z4,Km,Sx,gmt=Ri(ka,"LayerConstraint",178,ji,uae,hie),THt;T(747,1,_d,hj),u.ue=function(e){He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,qft),""),"Content Alignment"),"Specifies how the content of compound nodes is to be aligned, e.g. top-left."),wmt),(i0(),zE)),vJ),qe((t0(),On))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.contentAlignment"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Xft),""),"Feedback Edges"),"Whether feedback edges should be highlighted by routing around the nodes."),(me(),me(),!1)),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.feedBackEdges"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,mO),""),"Interactive Reference Point"),"Determines which point of a node is considered by interactive layout phases."),Smt),xs),rmt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.interactiveReferencePoint"])))),Sa(e,mO,fY,KHt),Sa(e,mO,wY,YHt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Zft),""),"Merge Edges"),"Edges that have no ports are merged so they touch the connected nodes at the same points. When this option is disabled, one port is created for each edge directly connected to a node. When it is enabled, all such incoming edges share an input port, and all outgoing edges share an output port."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.mergeEdges"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Yft),""),"Merge Hierarchy-Crossing Edges"),"If hierarchical layout is active, hierarchy-crossing edges use as few hierarchical ports as possible. They are broken by the algorithm, with hierarchical ports inserted as required. Usually, one such port is created for each edge at each hierarchy crossing point. With this option set to true, we try to create as few hierarchical ports as possible in the process. In particular, all edges that form a hyperedge can share a port."),!0),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.mergeHierarchyEdges"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Kft),""),"Thoroughness"),"How much effort should be spent to produce a nice layout."),Xt(7)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.thoroughness"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Jft),""),"Add Unnecessary Bendpoints"),"Adds bend points even if an edge does not change direction. If true, each long edge dummy will contribute a bend point to its edges and hierarchy-crossing edges will always get a bend point where they cross hierarchy boundaries. By default, bend points are only added where an edge changes direction."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.unnecessaryBendpoints"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Qft),""),"North or South Port"),"Specifies that this port can either be placed on the north side of a node or on the south side (if port constraints permit)"),!1),Ec),ho),qe(ib)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.northOrSouthPort"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,fY),"cycleBreaking"),"Cycle Breaking Strategy"),"Strategy for cycle breaking. Cycle breaking looks for cycles in the graph and determines which edges to reverse to break the cycles. Reversed edges will end up pointing to the opposite direction of regular edges (that is, reversed edges will point left if edges usually point right)."),ymt),xs),G0t),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.cycleBreaking"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,n6),vdt),"Node Layering Strategy"),"Strategy for node layering."),Amt),xs),Tbt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.nodeLayering"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,tdt),vdt),"Layer Constraint"),"Determines a constraint on the placement of the node regarding the layering."),Tmt),xs),gmt),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.layerConstraint"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,edt),vdt),"Wide Nodes on Multiple Layers"),"Strategy to distribute wide nodes over multiple layers."),kmt),xs),zbt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.wideNodesOnMultipleLayers"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,dY),PBt),"Upper Bound On Width [MinWidth Layerer]"),"Defines a loose upper bound on the width of the MinWidth layerer. If set to '-1' multiple values are tested and the best result is selected."),Xt(4)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.minWidthUpperBoundOnWidth"])))),Sa(e,dY,n6,nGt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,pY),PBt),"Upper Layer Estimation Scaling Factor [MinWidth Layerer]"),"Multiplied with Upper Bound On Width for defining an upper bound on the width of layers which haven't been determined yet, but whose maximum width had been (roughly) estimated by the MinWidth algorithm. Compensates for too high estimations. If set to '-1' multiple values are tested and the best result is selected."),Xt(2)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.minWidthUpperLayerEstimationScalingFactor"])))),Sa(e,pY,n6,rGt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,gY),IBt),"Node Promotion Strategy"),"Reduces number of dummy nodes after layering phase (if possible)."),Cmt),xs),Rbt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.nodePromotion"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,mY),IBt),"Max Node Promotion Iterations"),"Limits the number of iterations for node promotion."),Xt(0)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.nodePromotionBoundary"])))),Sa(e,mY,gY,null),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,bY),"layering.coffmanGraham"),"Layer Bound"),"The maximum number of nodes allowed per layer."),Xt(qi)),Pa),Io),qe(On)))),Sa(e,bY,n6,QHt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,wY),_dt),"Crossing Minimization Strategy"),"Strategy for crossing minimization."),_mt),xs),U0t),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.crossMin"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,ndt),_dt),"Hierarchical Sweepiness"),"How likely it is to use cross-hierarchy (1) vs bottom-up (-1)."),.1),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,idt),_dt),"Semi-Interactive Crossing Minimization"),"Preserves the order of nodes within a layer but still minimizes crossings between edges connecting long edge dummies. Derives the desired order from positions specified by the 'org.eclipse.elk.position' layout option. Requires a crossing minimization strategy that is able to process 'in-layer' constraints."),!1),Ec),ho),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,rdt),RBt),"Greedy Switch Activation Threshold"),"By default it is decided automatically if the greedy switch is activated or not. The decision is based on whether the size of the input graph (without dummy nodes) is smaller than the value of this option. A '0' enforces the activation."),Xt(40)),Pa),Io),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,sdt),RBt),"Greedy Switch Crossing Minimization"),"Greedy Switch strategy for crossing minimization. The greedy switch heuristic is executed after the regular layer sweep as a post-processor."),vmt),xs),nmt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.greedySwitch"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,mE),DBt),"Node Placement Strategy"),"Strategy for node placement."),Rmt),xs),Abt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.nodePlace"])))),He(e,new De(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,vY),DBt),"Favor Straight Edges Over Balancing"),"Favor straight edges over a balanced node placement. The default behavior is determined automatically based on the used 'edgeRouting'. For an orthogonal style it is set to true, for all other styles to false."),Ec),ho),qe(On)))),Sa(e,vY,mE,mGt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,_Y),NBt),"BK Edge Straightening"),"Specifies whether the Brandes Koepf node placer tries to increase the number of straight edges at the expense of diagram size. There is a subtle difference to the 'favorStraightEdges' option, which decides whether a balanced placement of the nodes is desired, or not. In bk terms this means combining the four alignments into a single balanced one, or not. This option on the other hand tries to straighten additional edges during the creation of each of the four alignments."),Lmt),xs),$bt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.nodeplace.compactionStrategy"])))),Sa(e,_Y,mE,fGt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,yY),NBt),"BK Fixed Alignment"),"Tells the BK node placer to use a certain alignment (out of its four) instead of the one producing the smallest height, or the combination of all four."),Pmt),xs),Z0t),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.fixedAlignment"])))),Sa(e,yY,mE,pGt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,xY),"nodePlacement.linearSegments"),"Linear Segments Deflection Dampening"),"Dampens the movement of nodes to keep the diagram from getting too large."),.3),ha),To),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.linearSegmentsDeflectionDampening"])))),Sa(e,xY,mE,wGt),He(e,new De(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,MY),"nodePlacement.networkSimplex"),"Node Flexibility"),"Aims at shorter and straighter edges. Two configurations are possible: (a) allow ports to move freely on the side they are assigned to (the order is always defined beforehand), (b) additionally allow to enlarge a node wherever it helps. If this option is not configured for a node, the 'nodeFlexibility.default' value is used, which is specified for the node's parent."),xs),nQ),qe(vc)))),Sa(e,MY,mE,yGt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,odt),"nodePlacement.networkSimplex.nodeFlexibility"),"Node Flexibility Default"),"Default value of the 'nodeFlexibility' option for the children of a hierarchical node."),Imt),xs),nQ),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,EY),ydt),"Spline Self-Loop Placement"),null),Emt),xs),Obt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.splines.selfLoopPlacement"])))),Sa(e,EY,i6,zHt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,bO),ydt),"Sloppy Spline Routing"),"Use less spline control points at the start and end of an edge. Might lead to crossings edge/node overlap."),!0),Ec),ho),qe(On)))),Sa(e,bO,i6,WHt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,wO),ydt),"Sloppy Spline Layer Spacing Factor"),"Spacing factor for routing area between layers when using sloppy spline routing."),.4),ha),To),qe(On)))),Sa(e,wO,i6,HHt),Sa(e,wO,bO,!0),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,cdt),J1),"Edge Node Between Layers Spacing"),"The spacing to be preserved between nodes and edges that are routed next to the node's layer. For the spacing between nodes and edges that cross the node's layer 'spacing.edgeNode' is used."),10),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,adt),J1),"Edge Edge Between Layer Spacing"),"Spacing to be preserved between pairs of edges that are routed between the same pair of layers. Note that 'spacing.edgeEdge' is used for the spacing between pairs of edges crossing the same layer."),10),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,udt),J1),"Node Node Between Layers Spacing"),"The spacing to be preserved between any pair of nodes of two adjacent layers. Note that 'spacing.nodeNode' is used for the spacing between nodes within the layer itself."),20),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,ldt),xdt),"Direction Priority"),"Defines how important it is to have a certain edge point into the direction of the overall layout. This option is evaluated during the cycle breaking phase."),Xt(0)),Pa),Io),qe(Md)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,hdt),xdt),"Shortness Priority"),"Defines how important it is to keep an edge as short as possible. This option is evaluated during the layering phase."),Xt(0)),Pa),Io),qe(Md)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,fdt),xdt),"Straightness Priority"),"Defines how important it is to keep an edge straight, i.e. aligned with one of the two axes. This option is evaluated during node placement."),Xt(0)),Pa),Io),qe(Md)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,SY),"compaction"),oBt),"Tries to further compact components (disconnected sub-graphs)."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.components.compact"])))),Sa(e,SY,KP,!0),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,ddt),OBt),"Post Compaction Strategy"),BBt),bmt),xs),emt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.postCompaction"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,pdt),OBt),"Post Compaction Constraint Calculation"),BBt),mmt),xs),O0t),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.postCompaction.constraints"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,vO),Mdt),"High Degree Node Treatment"),"Makes room around high degree nodes to place leafs and trees."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.highDegreeNode.treatment"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,TY),Mdt),"High Degree Node Threshold"),"Whether a node is considered to have a high degree."),Xt(16)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.highDegreeNode.threshold"])))),Sa(e,TY,vO,!0),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,CY),Mdt),"High Degree Node Maximum Tree Height"),"Maximum height of a subtree connected to a high degree node to be moved to separate layers."),Xt(5)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.highDegreeNode.treeHeight"])))),Sa(e,CY,vO,!0),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,x4),Edt),"Graph Wrapping Strategy"),"For certain graphs and certain prescribed drawing areas it may be desirable to split the laid out graph into chunks that are placed side by side. The edges that connect different chunks are 'wrapped' around from the end of one chunk to the start of the other chunk. The points between the chunks are referred to as 'cuts'."),Bmt),xs),jbt),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,gdt),Edt),"Additional Wrapped Edges Spacing"),"To visually separate edges that are wrapped from regularly routed edges an additional spacing value can be specified in form of this layout option. The spacing is added to the regular edgeNode spacing."),10),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,mdt),Edt),"Correction factor for the wrapping"),"At times and for certain types of graphs the executed wrapping may produce results that are consistently biased in the same fashion: either wrapping to often or to rarely. This factor can be used to correct the bias. Internally, it is simplay multiplied with the 'aspect ratio' layout option."),1),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,_O),FBt),"Cutting Strategy"),"The strategy by which the layer indexes are determined at which the layering crumbles into chunks."),Nmt),xs),j0t),qe(On)))),He(e,new De(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,AY),FBt),"Manually Specified Cuts"),"Allows the user to specify her own cuts for a certain graph."),Ed),Sl),qe(On)))),Sa(e,AY,_O,NGt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,kY),"wrapping.cutting.msd"),"MSD Freedom"),"The MSD cutting strategy starts with an initial guess on the number of chunks the graph should be split into. The freedom specifies how much the strategy may deviate from this guess. E.g. if an initial number of 3 is computed, a freedom of 1 allows 2, 3, and 4 cuts."),Dmt),Pa),Io),qe(On)))),Sa(e,kY,_O,BGt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,LY),"wrapping.singleEdge.validify"),"Path-Like Validify Strategy"),"When wrapping path-like graphs, the graph must not be split between any pair of layers. The validify strategy makes sure every computed split point is allowed."),Omt),xs),Ubt),qe(On)))),Sa(e,LY,x4,VGt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,yO),Sdt),"Improve Cuts"),"For general graphs it is important that not too many edges wrap backwards. Thus a compromise between evenly-distributed cuts and the total number of cut edges is sought."),!0),Ec),ho),qe(On)))),Sa(e,yO,x4,HGt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,xO),Sdt),"Distance Penalty When Improving Cuts"),null),2),ha),To),qe(On)))),Sa(e,xO,x4,zGt),Sa(e,xO,yO,!0),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,PY),Sdt),"Improve Wrapped Edges"),"The initial wrapping is performed in a very simple way. As a consequence, edges that wrap from one chunk to another may be unnecessarily long. Activating this option tries to shorten such edges."),!0),Ec),ho),qe(On)))),Sa(e,PY,x4,WGt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,bdt),IY),"Edge Label Side Selection"),"Method to decide on edge label sides."),Mmt),xs),W0t),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.edgeLabelSideSelection"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,wdt),IY),"Edge Center Label Placement Strategy"),"Determines in which layer center labels of long edges should be placed."),xmt),xs),D0t),ur(On,Y(Z(Jp,1),jt,163,0,[og]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.edgeLabelPlacementStrategy"])))),bOt((new x8,e))};var CHt,AHt,mmt,kHt,bmt,LHt,wmt,PHt,IHt,vmt,RHt,DHt,NHt,_mt,OHt,ymt,BHt,xmt,FHt,Mmt,UHt,Emt,zHt,jHt,HHt,GHt,WHt,$Ht,VHt,qHt,XHt,ZHt,Smt,YHt,KHt,JHt,QHt,tGt,Tmt,eGt,nGt,iGt,rGt,sGt,oGt,Cmt,cGt,Amt,aGt,kmt,uGt,lGt,hGt,Lmt,fGt,dGt,Pmt,pGt,gGt,mGt,bGt,wGt,vGt,_Gt,Imt,yGt,xGt,Rmt,MGt,EGt,SGt,TGt,CGt,AGt,kGt,LGt,PGt,IGt,RGt,DGt,NGt,OGt,Dmt,BGt,FGt,Nmt,UGt,zGt,jGt,HGt,GGt,WGt,$Gt,Omt,VGt,qGt,Bmt,kUe=A(ka,"LayeredMetaDataProvider",747);T(878,1,_d,x8),u.ue=function(e){bOt(e)};var Bf,$B,Y4,GJ,Fmt,VB,WJ,Umt,qB,zmt,$J,OE,jmt,K4,ch,Hmt,XB,Gmt,ng,J4,ig,Wmt,$mt,Vmt,ZB,up,N6,Q4,qmt,Xmt,Zmt,YB,ny,Mw,Ymt,Ro,Kmt,la,Jmt,Qmt,tbt,VJ,ebt,O6,KB,nbt,ibt,Oh,rbt,qJ,tA,sbt,Jm,eA,JB,Ew,BE,QB,XJ,v0,obt,cbt,abt,ubt,lbt,XGt,ZGt,YGt,KGt,Sw,Tw,Qi,_0,hbt,Tx,nA,Cw,JGt,B6,fbt,Cx,QGt,tWt,ZJ,nf,Ax,F6,y0,iy,tF,kx,dbt,iA,lp,Aw,YJ,rA,U6,KJ,pbt,gbt,mbt,bbt,JJ,wbt,vbt,_bt,ybt,xbt,LUe=A(ka,"LayeredOptions",878);T(879,1,{},Lk),u.Be=function(){var e;return e=new yu,e},u.Ce=function(e){};var PUe=A(ka,"LayeredOptions/LayeredFactory",879);T(291,23,{3:1,34:1,23:1,291:1,285:1,286:1},FT),u.hf=function(){return mDt(this)},u.uf=function(){return mDt(this)};var QJ,Mbt,Ebt,eF,tQ,Sbt,Tbt=Ri(ka,"LayeringStrategy",291,ji,qae,fie),eWt;T(179,23,{3:1,34:1,23:1,179:1},W9);var ry,sy,nF,eQ,nQ=Ri(ka,"NodeFlexibility",179,ji,$ce,die),nWt;T(292,23,{3:1,34:1,23:1,292:1,285:1,286:1},G5),u.hf=function(){return Q9t(this)},u.uf=function(){return Q9t(this)};var z6,iQ,rQ,j6,Cbt,Abt=Ri(ka,"NodePlacementStrategy",292,ji,lae,pie),iWt;T(240,23,{3:1,34:1,23:1,240:1},w2);var kbt,H6,Lbt,Pbt,G6,Ibt,iF,rF,Rbt=Ri(ka,"NodePromotionStrategy",240,ji,Iue,gie),rWt;T(410,23,{3:1,34:1,23:1,410:1},pW);var Ga,ba,sF,sWt=Ri(ka,"PortType",410,ji,qoe,mie),oWt;T(345,23,{3:1,34:1,23:1,345:1},gW);var Dbt,Nbt,sQ,Obt=Ri(ka,"SelfLoopPlacement",345,ji,Xoe,bie),cWt;T(266,1,{266:1},G8t);var IUe=A(ka,"Spacings",266);T(347,23,{3:1,34:1,23:1,347:1},mW);var oQ,Bbt,Fbt,Ubt=Ri(ka,"ValidifyStrategy",347,ji,Zoe,wie),aWt;T(385,23,{3:1,34:1,23:1,385:1},bW);var W6,$6,V6,zbt=Ri(ka,"WideNodesStrategy",385,ji,Koe,vie),uWt;T(346,23,{3:1,34:1,23:1,346:1},wW);var q6,cQ,aQ,jbt=Ri(ka,"WrappingStrategy",346,ji,Yoe,_ie),lWt;T(1296,1,Pu,jMt),u.vf=function(e){return a(e,31),hWt},u.Pe=function(e,n){L2e(this,a(e,31),n)};var hWt,RUe=A(spt,"DepthFirstCycleBreaker",1296);T(1295,1,Pu,DCt),u.vf=function(e){return a(e,31),fWt},u.Pe=function(e,n){p3e(this,a(e,31),n)};var fWt,DUe=A(spt,"GreedyCycleBreaker",1295);T(1297,1,Pu,a5),u.vf=function(e){return a(e,31),dWt},u.Pe=function(e,n){Dye(this,a(e,31),n)};var dWt,NUe=A(spt,"InteractiveCycleBreaker",1297);T(1300,1,Pu,HMt),u.vf=function(e){return a(e,31),pWt},u.Pe=function(e,n){u3e(this,a(e,31),n)};var pWt,OUe=A(pw,"CoffmanGrahamLayerer",1300);T(1301,1,jr,Mp),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Q0e(this.a,a(e,8),a(n,8))};var BUe=A(pw,"CoffmanGrahamLayerer/lambda$0$Type",1301);T(1302,1,jr,i9),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Nre(this.a,e,n)};var FUe=A(pw,"CoffmanGrahamLayerer/lambda$1$Type",1302);T(1303,1,Pu,X0),u.vf=function(e){return a(e,31),Ni(Ni(new as,(Mo(),Of),(Po(),aJ)),aa,PE)},u.Pe=function(e,n){vxe(this,a(e,31),n)};var UUe=A(pw,"InteractiveLayerer",1303);T(511,1,{511:1},pxt),u.a=0,u.c=0;var zUe=A(pw,"InteractiveLayerer/LayerSpan",511);T(1299,1,Pu,y8),u.vf=function(e){return Dfe(a(e,31))},u.Pe=function(e,n){uwe(this,a(e,31),n)};var gWt,mWt,bWt,jUe=A(pw,"LongestPathLayerer",1299);T(1306,1,Pu,M8),u.vf=function(e){return a(e,31),Ni(Ni(new as,(Mo(),Of),(Po(),G4)),aa,PE)},u.Pe=function(e,n){Gxe(this,a(e,31),n)},u.a=0,u.b=0,u.d=0;var Hbt,Gbt,HUe=A(pw,"MinWidthLayerer",1306);T(1307,1,jr,Ac),u.Ld=function(e,n){return Mle(this,a(e,8),a(n,8))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var GUe=A(pw,"MinWidthLayerer/MinOutgoingEdgesComparator",1307);T(1298,1,Pu,rSt),u.vf=function(e){return Rpe(this,a(e,31))},u.Pe=function(e,n){eye(this,a(e,31),n)};var wWt,vWt,_Wt,WUe=A(pw,"NetworkSimplexLayerer",1298);T(1304,1,Pu,pTt),u.vf=function(e){return a(e,31),Ni(Ni(new as,(Mo(),Of),(Po(),G4)),aa,PE)},u.Pe=function(e,n){q2e(this,a(e,31),n)},u.d=0,u.f=0,u.g=0,u.i=0,u.s=0,u.t=0,u.u=0;var $Ue=A(pw,"StretchWidthLayerer",1304);T(1305,1,jr,bv),u.Ld=function(e,n){return Sae(a(e,8),a(n,8))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var VUe=A(pw,"StretchWidthLayerer/1",1305);T(422,1,opt),u.lf=function(e,n,i,r,c,l){},u.xf=function(e,n,i){return UNt(this,e,n,i)},u.kf=function(){this.g=dt(Gw,jBt,22,this.d,15,1),this.f=dt(Gw,jBt,22,this.d,15,1)},u.mf=function(e,n){this.e[e]=dt(Gn,pi,22,n[e].length,15,1)},u.nf=function(e,n,i){var r;r=i[e][n],r.o=n,this.e[e][n]=n},u.of=function(e,n,i,r){a(Ee(r[e][n].i,i),11).o=this.d++},u.b=0,u.c=0,u.d=0;var qUe=A(Qu,"AbstractBarycenterPortDistributor",422);T(1484,1,jr,kH),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return ode(this.a,e,n)};var XUe=A(Qu,"AbstractBarycenterPortDistributor/lambda$0$Type",1484);T(1532,1,e6,okt),u.lf=function(e,n,i,r,c,l){},u.nf=function(e,n,i){},u.of=function(e,n,i,r){},u.jf=function(){return!1},u.kf=function(){this.a=this.c.a,this.e=this.d.g},u.mf=function(e,n){n[e][0].c.o=e},u.pf=function(){return!1},u.qf=function(e,n,i,r){var c,l,f,g,b,v,M;for(n!=gSt(i,e.length)&&(l=e[n-(i?1:-1)],Nct(this.d,l,i?(Fo(),ba):(Fo(),Ga))),c=e[n][0],M=!r||c.j==(Ke(),rs),v=Vg(e[n]),U6t(this,v,M,!1,i),f=0,b=new H(v);b.a"),e0?Q$(this.a,e[n-1],e[n]):!i&&n1&&(c.i==(Ht(),Qe)?this.b[e]=!0:c.i==on&&e>0&&(this.b[e-1]=!0))},u.f=0;var fze=A(h0,"AllCrossingsCounter",1528);T(602,1,{},WV),u.b=0,u.d=0;var dze=A(h0,"BinaryIndexedTree",602);T(473,1,{},K5);var pze=A(h0,"CrossingsCounter",473);T(1557,1,jr,RH),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Mre(this.a,e,n)};var gze=A(h0,"CrossingsCounter/lambda$0$Type",1557);T(1558,1,jr,DH),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Ere(this.a,e,n)};var mze=A(h0,"CrossingsCounter/lambda$1$Type",1558);T(1559,1,jr,NH),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Sre(this.a,e,n)};var bze=A(h0,"CrossingsCounter/lambda$2$Type",1559);T(1560,1,jr,OH),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Tre(this.a,e,n)};var wze=A(h0,"CrossingsCounter/lambda$3$Type",1560);T(1555,1,{},BH);var vze=A(h0,"HyperedgeCrossingsCounter",1555);T(426,1,{34:1,426:1},gTt),u.vd=function(e){return Kfe(this,a(e,426))},u.b=0,u.c=0,u.e=0,u.f=0;var V3e=A(h0,"HyperedgeCrossingsCounter/Hyperedge",426);T(336,1,{34:1,336:1},QD),u.vd=function(e){return Yme(this,a(e,336))},u.b=0,u.c=0;var AWt=A(h0,"HyperedgeCrossingsCounter/HyperedgeCorner",336);T(472,23,{3:1,34:1,23:1,472:1},mrt);var oA,cA,kWt=Ri(h0,"HyperedgeCrossingsCounter/HyperedgeCorner/Type",472,ji,yoe,xie),LWt;T(1556,1,{},ZH),u.e=!0,u.f=0,u.g=0;var _ze=A(h0,"NorthSouthEdgeAllCrossingsCounter",1556);T(1311,1,Pu,E8),u.vf=function(e){return a(z(a(e,31),(Ft(),Qc)),19).pc((So(),Al))?PWt:null},u.Pe=function(e,n){Qpe(this,a(e,31),n)};var PWt,yze=A(lo,"InteractiveNodePlacer",1311);T(1312,1,Pu,g1),u.vf=function(e){return a(z(a(e,31),(Ft(),Qc)),19).pc((So(),Al))?IWt:null},u.Pe=function(e,n){Yde(this,a(e,31),n)};var IWt,aF,uF,xze=A(lo,"LinearSegmentsNodePlacer",1312);T(235,1,{34:1,235:1},wit),u.vd=function(e){return QQt(this,a(e,235))},u.Fb=function(e){var n;return ct(e,235)?(n=a(e,235),this.b==n.b):!1},u.Hb=function(){return this.b},u.Ib=function(){return"ls"+Gp(this.f)},u.a=0,u.b=0,u.c=-1,u.d=-1,u.i=0;var RWt=A(lo,"LinearSegmentsNodePlacer/LinearSegment",235);T(1314,1,Pu,C4t),u.vf=function(e){return a(z(a(e,31),(Ft(),Qc)),19).pc((So(),Al))?DWt:null},u.Pe=function(e,n){i3e(this,a(e,31),n)},u.b=0,u.g=0;var DWt,Mze=A(lo,"NetworkSimplexPlacer",1314);T(1333,1,jr,Tg),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Lp(a(e,21).a,a(n,21).a)};var Eze=A(lo,"NetworkSimplexPlacer/0methodref$compare$Type",1333);T(1335,1,jr,pc),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Lp(a(e,21).a,a(n,21).a)};var Sze=A(lo,"NetworkSimplexPlacer/1methodref$compare$Type",1335);T(584,1,{584:1},NMt);var q3e=A(lo,"NetworkSimplexPlacer/EdgeRep",584);T(416,1,{416:1},Wot),u.b=!1;var X3e=A(lo,"NetworkSimplexPlacer/NodeRep",416);T(460,12,{3:1,4:1,20:1,25:1,41:1,12:1,13:1,15:1,49:1,460:1},wxt);var Tze=A(lo,"NetworkSimplexPlacer/Path",460);T(1315,1,ys,xb),u.Kb=function(e){return a(e,14).d.g.j};var Cze=A(lo,"NetworkSimplexPlacer/Path/lambda$0$Type",1315);T(1316,1,us,qy),u.Nb=function(e){return a(e,232)==(Ke(),Hr)};var Aze=A(lo,"NetworkSimplexPlacer/Path/lambda$1$Type",1316);T(1317,1,ys,A3),u.Kb=function(e){return a(e,14).d.g};var kze=A(lo,"NetworkSimplexPlacer/Path/lambda$2$Type",1317);T(1318,1,us,FH),u.Nb=function(e){return eTt(NIt(a(e,8)))};var Lze=A(lo,"NetworkSimplexPlacer/Path/lambda$3$Type",1318);T(1319,1,us,mv),u.Nb=function(e){return Eu(),(Ht(),ab).pc(a(e,11).i)};var Pze=A(lo,"NetworkSimplexPlacer/lambda$0$Type",1319);T(1320,1,{},OMt),u.td=function(e){ree(this.a,this.b,e)};var Ize=A(lo,"NetworkSimplexPlacer/lambda$1$Type",1320);T(1329,1,{},UH),u.td=function(e){L0e(this.a,e)};var Rze=A(lo,"NetworkSimplexPlacer/lambda$10$Type",1329);T(1330,1,ys,Pk),u.Kb=function(e){return Eu(),new gi(null,new Ei(a(e,26).a,16))};var Dze=A(lo,"NetworkSimplexPlacer/lambda$11$Type",1330);T(1331,1,{},zH),u.td=function(e){zwe(this.a,e)};var Nze=A(lo,"NetworkSimplexPlacer/lambda$12$Type",1331);T(1332,1,ys,f1),u.Kb=function(e){return Eu(),Xt(a(e,113).e)};var Oze=A(lo,"NetworkSimplexPlacer/lambda$13$Type",1332);T(1334,1,ys,FS),u.Kb=function(e){return Eu(),Xt(a(e,113).e)};var Bze=A(lo,"NetworkSimplexPlacer/lambda$14$Type",1334);T(1336,1,us,k3),u.Nb=function(e){return Eu(),a(e,416).c.j==(Ke(),gs)};var Fze=A(lo,"NetworkSimplexPlacer/lambda$15$Type",1336);T(1337,1,us,L3),u.Nb=function(e){return Eu(),a(e,416).c.i.c.length>1};var Uze=A(lo,"NetworkSimplexPlacer/lambda$16$Type",1337);T(1338,1,{},M4t),u.td=function(e){Afe(this.c,this.b,this.d,this.a,e)},u.c=0,u.d=0;var zze=A(lo,"NetworkSimplexPlacer/lambda$17$Type",1338);T(1339,1,{},jH),u.td=function(e){bee(this.a,e)},u.a=0;var jze=A(lo,"NetworkSimplexPlacer/lambda$18$Type",1339);T(1340,1,ys,Zy),u.Kb=function(e){return Eu(),new gi(null,new Ei(a(e,26).a,16))};var Hze=A(lo,"NetworkSimplexPlacer/lambda$19$Type",1340);T(1321,1,ys,P3),u.Kb=function(e){return Eu(),new gi(null,new Ei(a(e,26).a,16))};var Gze=A(lo,"NetworkSimplexPlacer/lambda$2$Type",1321);T(1341,1,{},x5),u.td=function(e){kee(this.a,e)};var Wze=A(lo,"NetworkSimplexPlacer/lambda$20$Type",1341);T(1342,1,us,Mb),u.Nb=function(e){return eTt(e)};var $ze=A(lo,"NetworkSimplexPlacer/lambda$21$Type",1342);T(1343,1,ys,Ag),u.Kb=function(e){return Eu(),new gi(null,new Ei(a(e,26).a,16))};var Vze=A(lo,"NetworkSimplexPlacer/lambda$22$Type",1343);T(1344,1,us,HH),u.Nb=function(e){return zte(this.a,e)};var qze=A(lo,"NetworkSimplexPlacer/lambda$23$Type",1344);T(1345,1,{},BMt),u.td=function(e){ege(this.a,this.b,e)};var Xze=A(lo,"NetworkSimplexPlacer/lambda$24$Type",1345);T(1346,1,us,vv),u.Nb=function(e){return Eu(),!ec(a(e,14))};var Zze=A(lo,"NetworkSimplexPlacer/lambda$25$Type",1346);T(1347,1,us,US),u.Nb=function(e){return Eu(),!ec(a(e,14))};var Yze=A(lo,"NetworkSimplexPlacer/lambda$26$Type",1347);T(1348,1,{},M5),u.le=function(e,n){return mee(this.a,e,n)};var Kze=A(lo,"NetworkSimplexPlacer/lambda$27$Type",1348);T(1322,1,ys,Ik),u.Kb=function(e){return Eu(),new gi(null,new T2(Rn(br(a(e,8)))))};var Jze=A(lo,"NetworkSimplexPlacer/lambda$3$Type",1322);T(1323,1,us,zS),u.Nb=function(e){return Eu(),Sce(a(e,14))};var Qze=A(lo,"NetworkSimplexPlacer/lambda$4$Type",1323);T(1324,1,{},GH),u.td=function(e){v_e(this.a,a(e,14))};var tje=A(lo,"NetworkSimplexPlacer/lambda$5$Type",1324);T(1325,1,ys,_v),u.Kb=function(e){return Eu(),new gi(null,new Ei(a(e,26).a,16))};var eje=A(lo,"NetworkSimplexPlacer/lambda$6$Type",1325);T(1326,1,us,Yy),u.Nb=function(e){return Eu(),a(e,8).j==(Ke(),gs)};var nje=A(lo,"NetworkSimplexPlacer/lambda$7$Type",1326);T(1327,1,ys,w),u.Kb=function(e){return Eu(),new gi(null,new T2(Rn(Jg(a(e,8)))))};var ije=A(lo,"NetworkSimplexPlacer/lambda$8$Type",1327);T(1328,1,us,S),u.Nb=function(e){return Eu(),_re(a(e,14))};var rje=A(lo,"NetworkSimplexPlacer/lambda$9$Type",1328);T(1310,1,Pu,Sv),u.vf=function(e){return a(z(a(e,31),(Ft(),Qc)),19).pc((So(),Al))?NWt:null},u.Pe=function(e,n){Y_e(a(e,31),n)};var NWt,sje=A(lo,"SimpleNodePlacer",1310);T(164,1,{164:1},A_),u.Ib=function(){var e;return e="",this.c==(Sf(),Qm)?e+=gE:this.c==Xp&&(e+=pE),this.o==(Zh(),x0)?e+=BY:this.o==rf?e+="UP":e+="BALANCED",e};var oje=A($p,"BKAlignedLayout",164);T(466,23,{3:1,34:1,23:1,466:1},brt);var Xp,Qm,OWt=Ri($p,"BKAlignedLayout/HDirection",466,ji,woe,Tie),BWt;T(465,23,{3:1,34:1,23:1,465:1},wrt);var x0,rf,FWt=Ri($p,"BKAlignedLayout/VDirection",465,ji,voe,Cie),UWt;T(1485,1,{},FMt);var cje=A($p,"BKAligner",1485);T(1488,1,{},n8t);var aje=A($p,"BKCompactor",1488);T(593,1,{593:1},q),u.a=0;var uje=A($p,"BKCompactor/ClassEdge",593);T(423,1,{423:1},gxt),u.a=null,u.b=0;var lje=A($p,"BKCompactor/ClassNode",423);T(1313,1,Pu,GMt),u.vf=function(e){return a(z(a(e,31),(Ft(),Qc)),19).pc((So(),Al))?zWt:null},u.Pe=function(e,n){w3e(this,a(e,31),n)},u.a=!1,u.e=!1;var zWt,hje=A($p,"BKNodePlacer",1313);T(437,23,{3:1,34:1,23:1,437:1},vrt);var lF,Wbt,$bt=Ri($p,"EdgeStraighteningStrategy",437,ji,boe,Aie),jWt;T(1486,1,{},st),u.d=0;var fje=A($p,"NeighborhoodInformation",1486);T(1487,1,jr,WH),u.Ld=function(e,n){return Mue(this,a(e,48),a(n,48))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var dje=A($p,"NeighborhoodInformation/NeighborComparator",1487);T(724,1,{});var pje=A($p,"ThresholdStrategy",724);T(1510,724,{},xxt),u.yf=function(e,n,i){return this.a.o==(Zh(),rf)?is:Ps},u.zf=function(){};var gje=A($p,"ThresholdStrategy/NullThresholdStrategy",1510);T(522,1,{522:1},zMt),u.c=!1,u.d=!1;var mje=A($p,"ThresholdStrategy/Postprocessable",522);T(1511,724,{},Mxt),u.yf=function(e,n,i){var r,c,l;return c=n==i,r=this.a.a[i.o]==n,c||r?(l=e,this.a.c==(Sf(),Qm)?(c&&(l=rZ(this,n,!0)),!isNaN(l)&&!isFinite(l)&&r&&(l=rZ(this,i,!1))):(c&&(l=rZ(this,n,!0)),!isNaN(l)&&!isFinite(l)&&r&&(l=rZ(this,i,!1))),l):e},u.zf=function(){for(var e,n,i,r,c;this.c.b!=0;)c=a(Toe(this.c),522),r=ZNt(this,c),r.a&&(e=r.a,i=lt(this.a.f[this.a.g[c.b.o].o]),!(!i&&!ec(e)&&e.c.g.c==e.d.g.c)&&(n=nDt(this,c),n||UEt(this.d,c)));for(;this.d.a.c.length!=0;)nDt(this,a(Hat(this.d),522))};var bje=A($p,"ThresholdStrategy/SimpleThresholdStrategy",1511);T(573,1,{573:1,285:1,286:1},vt),u.hf=function(){return JPt(this)},u.uf=function(){return JPt(this)};var uQ,wje=A(F_,"EdgeRouterFactory",573);T(1356,1,Pu,_j),u.vf=function(e){return gwe(a(e,31))},u.Pe=function(e,n){gye(a(e,31),n)};var HWt,GWt,WWt,$Wt,VWt,Vbt,qWt,XWt,vje=A(F_,"OrthogonalEdgeRouter",1356);T(594,1,{},pX),u.a=0,u.c=0;var _je=A(F_,"OrthogonalRoutingGenerator",594);T(252,1,{252:1},LN),u.Ib=function(){return this.a+"->"+this.b},u.c=0;var yje=A(F_,"OrthogonalRoutingGenerator/Dependency",252);T(165,1,{34:1,165:1},s6t),u.vd=function(e){return tte(this,a(e,165))},u.Fb=function(e){var n;return ct(e,165)?(n=a(e,165),this.d==n.d):!1},u.Hb=function(){return this.d},u.Ib=function(){var e,n,i,r;for(e=new ll("{"),r=new H(this.g);r.aop&&(c=new We(b,k),Xi(i.a,c),LP(this.a,i,e,c,!1),l=new We(M,k),Xi(i.a,l),LP(this.a,i,e,l,!1))},u.Bf=function(e){return e.g.k.a+e.k.a+e.a.a},u.Cf=function(){return Ht(),fi},u.Df=function(){return Ht(),Tn};var Mje=A(F_,"OrthogonalRoutingGenerator/NorthToSouthRoutingStrategy",1490);T(1491,1,{},Hl),u.Af=function(e,n){var i,r,c,l,f,g,b,v,M,k;for(k=n-e.i*this.a.c,g=new H(e.g);g.aop&&(c=new We(b,k),Xi(i.a,c),LP(this.a,i,e,c,!1),l=new We(M,k),Xi(i.a,l),LP(this.a,i,e,l,!1))},u.Bf=function(e){return e.g.k.a+e.k.a+e.a.a},u.Cf=function(){return Ht(),Tn},u.Df=function(){return Ht(),fi};var Eje=A(F_,"OrthogonalRoutingGenerator/SouthToNorthRoutingStrategy",1491);T(1489,1,{},ed),u.Af=function(e,n){var i,r,c,l,f,g,b,v,M,k;for(k=n+e.i*this.a.c,g=new H(e.g);g.aop&&(c=new We(k,b),Xi(i.a,c),LP(this.a,i,e,c,!0),l=new We(k,M),Xi(i.a,l),LP(this.a,i,e,l,!0))},u.Bf=function(e){return e.g.k.b+e.k.b+e.a.b},u.Cf=function(){return Ht(),Qe},u.Df=function(){return Ht(),on};var Sje=A(F_,"OrthogonalRoutingGenerator/WestToEastRoutingStrategy",1489);T(1351,1,Pu,WMt),u.vf=function(e){return Hge(a(e,31))},u.Pe=function(e,n){mxe(this,a(e,31),n)};var ZWt,YWt,KWt,JWt,hF,Tje=A(F_,"PolylineEdgeRouter",1351);T(1352,1,sh,D),u.Mb=function(e){return Cle(a(e,8))},u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)};var Cje=A(F_,"PolylineEdgeRouter/1",1352);T(151,1,{151:1},Z6t),u.Ib=function(){var e,n,i,r;for(i=new om,this.e&&Ii(Ii(i,nL(this.e)),": "),n=qn(Z$(this),0);n.b!=n.d.c;)e=a(Yn(n),11),Ii(Ii(S1(Ii(i,(r=s5t(e),r==null?"p_"+e.o:"p_"+r)),32),nL(e.i))," / ");return B9(i,i.a.length-2-1)},u.j=0,u.k=0;var Aje=A(f0,"ConnectedSelfLoopComponent",151);T(129,23,{3:1,34:1,23:1,129:1},A1),u.c=0;var QWt,t$t,e$t,tb,kw,Zp,Lw,rg,hp,Yp,eb,nb,n$t,i$t,r$t,s$t,o$t,c$t,a$t,u$t,l$t,h$t,f$t,d$t,p$t,oy,Lx,Pw,Iw,aA=Ri(f0,"LoopSide",129,ji,iq,kie),g$t;T(424,1,{},BIt,Dht,Sut),u.Ib=function(){return this.b.Ib()},u.c=0,u.d=!1,u.e=!1,u.f=!1,u.i=0,u.j=0;var kje=A(f0,"NubSpline",424);T(190,1,{190:1},HDt,Y$);var Lje=A(f0,"NubSpline/PolarCP",190);T(599,424,{},H$);var Pje=A(f0,"NubsSelfLoop",599);T(236,1,{},n9t,xX,k8t,EL,TX),u.a=cpt,u.b=ax,u.c=cpt,u.d=ax;var Ije=A(f0,"Rectangle",236);T(1353,1,Pu,qRt),u.vf=function(e){return fme(a(e,31))},u.Pe=function(e,n){v3e(this,a(e,31),n)},u.d=3;var m$t,b$t,w$t,v$t,_$t,y$t,Rje=A(f0,"SplineEdgeRouter",1353);T(250,1,{250:1},_N),u.Ib=function(){return this.a+" ->("+this.c+") "+this.b},u.c=0;var Dje=A(f0,"SplineEdgeRouter/Dependency",250);T(417,23,{3:1,34:1,23:1,417:1},xrt);var sg,cy,x$t=Ri(f0,"SplineEdgeRouter/SideToProcess",417,ji,_oe,Iie),M$t;T(1354,1,{},JMt),u.td=function(e){pre(this.a,this.b,e)};var Nje=A(f0,"SplineEdgeRouter/lambda$0$Type",1354);T(1355,1,{},QMt),u.td=function(e){gre(this.a,this.b,e)};var Oje=A(f0,"SplineEdgeRouter/lambda$1$Type",1355);T(125,1,{34:1,125:1},d9t,Nht),u.vd=function(e){return ete(this,a(e,125))},u.b=0,u.e=0,u.f=0,u.i=!1,u.j=0,u.k=!1,u.n=!1,u.p=0,u.r=0,u.s=0;var Bje=A(f0,"SplineSegment",125);T(589,1,{589:1},$t),u.a=0,u.b=!1,u.c=!1,u.d=!1,u.e=!1,u.f=0;var Fje=A(f0,"SplineSegment/EdgeInformation",589);T(990,1,{},_e);var Uje=A(M4,Pft,990);T(991,1,jr,Ye),u.Ld=function(e,n){return G0e(a(e,128),a(n,128))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var zje=A(M4,lBt,991);T(989,1,{},k3t);var jje=A(M4,"MrTree",989);T(360,23,{3:1,34:1,23:1,360:1,285:1,286:1},$9),u.hf=function(){return C9t(this)},u.uf=function(){return C9t(this)};var fF,uA,X6,lA,qbt=Ri(M4,"TreeLayoutPhases",360,ji,Bce,Eie),E$t;T(960,244,O_,fTt),u.Ae=function(e,n){var i,r,c,l,f,g;for(l=(f=new yN,Uo(f,e),Ct(f,(mc(),dA),e),g=new vi,Qve(e,f,g),jve(e,f,g),f),c=n_e(this.a,l),r=new H(c);r.a"+lN(this.c):"e_"+Yr(this)};var Vje=A(E4,"TEdge",170);T(128,131,{3:1,128:1,93:1,131:1},yN),u.Ib=function(){var e,n,i,r,c;for(c=null,r=qn(this.b,0);r.b!=r.d.c;)i=a(Yn(r),76),c+=(i.c==null||i.c.length==0?"n_"+i.g:"n_"+i.c)+` -`;for(n=qn(this.a,0);n.b!=n.d.c;)e=a(Yn(n),170),c+=(e.b&&e.c?lN(e.b)+"->"+lN(e.c):"e_"+Yr(e))+` -`;return c};var Z3e=A(E4,"TGraph",128);T(570,452,{3:1,452:1,570:1,93:1,131:1});var qje=A(E4,"TShape",570);T(76,570,{3:1,452:1,76:1,570:1,93:1,131:1},oq),u.Ib=function(){return lN(this)};var Y3e=A(E4,"TNode",76);T(231,1,wd,Hd),u.sc=function(e){vo(this,e)},u.tc=function(){var e;return e=qn(this.a.d,0),new Ob(e)};var Xje=A(E4,"TNode/2",231);T(330,1,Cs,Ob),u.gc=function(e){ks(this,e)},u.ic=function(){return a(Yn(this.a),170).c},u.hc=function(){return R9(this.a)},u.jc=function(){tat(this.a)};var Zje=A(E4,"TNode/2/1",330);T(1545,1,Br,dTt),u.Pe=function(e,n){f_e(this,a(e,128),n)};var Yje=A(ux,"FanProcessor",1545);T(308,23,{3:1,34:1,23:1,308:1,286:1},UT),u.hf=function(){switch(this.g){case 0:return new mxt;case 1:return new dTt;case 2:return new xa;case 3:return new Is;case 4:return new Qr;case 5:return new zu;default:throw K(new yn(lY+(this.f!=null?this.f:""+this.g)))}};var lQ,hQ,fQ,dQ,pQ,dF,S$t=Ri(ux,Wft,308,ji,Zae,Sie),T$t;T(1548,1,Br,Is),u.Pe=function(e,n){Xme(this,a(e,128),n)},u.a=0;var Kje=A(ux,"LevelHeightProcessor",1548);T(1549,1,wd,ol),u.sc=function(e){vo(this,e)},u.tc=function(){return we(),Dv(),Z_};var Jje=A(ux,"LevelHeightProcessor/1",1549);T(1546,1,Br,xa),u.Pe=function(e,n){g0e(this,a(e,128),n)},u.a=0;var Qje=A(ux,"NeighborsProcessor",1546);T(1547,1,wd,Ul),u.sc=function(e){vo(this,e)},u.tc=function(){return we(),Dv(),Z_};var tHe=A(ux,"NeighborsProcessor/1",1547);T(1550,1,Br,Qr),u.Pe=function(e,n){qme(this,a(e,128),n)},u.a=0;var eHe=A(ux,"NodePositionProcessor",1550);T(1544,1,Br,mxt),u.Pe=function(e,n){Iye(this,a(e,128))};var nHe=A(ux,"RootProcessor",1544);T(1551,1,Br,zu),u.Pe=function(e,n){Ohe(a(e,128))};var iHe=A(ux,"Untreeifyer",1551),Z6,hA,C$t,gQ,pF,fA,mQ,gF,mF,FE,dA,bF,Kp,Xbt,A$t,bQ,Rw,wQ,Zbt;T(750,1,_d,mj),u.ue=function(e){He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,apt),""),"Weighting of Nodes"),"Which weighting to use when computing a node order."),Kbt),(i0(),xs)),rwt),qe((t0(),On))))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,upt),""),"Search Order"),"Which search order to use when computing a spanning tree."),Ybt),xs),owt),qe(On)))),m7t((new bj,e))};var k$t,Ybt,L$t,Kbt,rHe=A(CO,"MrTreeMetaDataProvider",750);T(886,1,_d,bj),u.ue=function(e){m7t(e)};var P$t,Jbt,Qbt,I$t,twt,wF,ewt,R$t,nwt,D$t,sHe=A(CO,"MrTreeOptions",886);T(887,1,{},HS),u.Be=function(){var e;return e=new fTt,e},u.Ce=function(e){};var oHe=A(CO,"MrTreeOptions/MrtreeFactory",887);T(438,23,{3:1,34:1,23:1,438:1},Mrt);var vQ,iwt,rwt=Ri(CO,"OrderWeighting",438,ji,goe,Rie),N$t;T(388,23,{3:1,34:1,23:1,388:1},Ert);var swt,_Q,owt=Ri(CO,"TreeifyingOrder",388,ji,poe,Die),O$t;T(1357,1,Pu,wj),u.vf=function(e){return a(e,128),B$t},u.Pe=function(e,n){fle(this,a(e,128),n)};var B$t,cHe=A("org.eclipse.elk.alg.mrtree.p1treeify","DFSTreeifyer",1357);T(1358,1,Pu,vj),u.vf=function(e){return a(e,128),F$t},u.Pe=function(e,n){m0e(this,a(e,128),n)};var F$t,aHe=A("org.eclipse.elk.alg.mrtree.p2order","NodeOrderer",1358);T(1359,1,Pu,S8),u.vf=function(e){return a(e,128),U$t},u.Pe=function(e,n){Jwe(this,a(e,128),n)},u.a=0;var U$t,uHe=A("org.eclipse.elk.alg.mrtree.p3place","NodePlacer",1359);T(1360,1,Pu,yj),u.vf=function(e){return a(e,128),z$t},u.Pe=function(e,n){Fpe(a(e,128),n)};var z$t,lHe=A("org.eclipse.elk.alg.mrtree.p4route","EdgeRouter",1360),pA;T(447,23,{3:1,34:1,23:1,447:1,285:1,286:1},Srt),u.hf=function(){return MIt(this)},u.uf=function(){return MIt(this)};var vF,UE,cwt=Ri(lpt,"RadialLayoutPhases",447,ji,moe,Nie),j$t;T(961,244,O_,L3t),u.Ae=function(e,n){var i,r,c,l,f,g,b;if(r=l9t(this,e),di(n,"Radial layout",r.c.length),b=nge(e),ga(e,(YT(),pA),b),!b)throw K(new yn("The given graph is not a tree!"));for(l=lt(Yt(cn(e,(tw(),xF)))),l==0&&(l=T9t(e)),ga(e,xF,l),i=new WG(e),pd(BRt(i),new R3),c=new E5(i),SIt(c),g=new H(l9t(this,e));g.a0&&$Pt(e.charCodeAt(n-1),vBt);)--n;if(r>=n)throw K(new yn("The given string does not contain any numbers."));if(c=K2(e.substr(r,n-r),`,|;|\r| -`),c.length!=2)throw K(new yn("Exactly two numbers are expected, "+c.length+" were found."));try{this.a=rw(iw(c[0])),this.b=rw(iw(c[1]))}catch(l){throw l=vr(l),ct(l,118)?(i=l,K(new yn(_Bt+i))):K(l)}},u.Ib=function(){return"("+this.a+","+this.b+")"},u.a=0,u.b=0;var ss=A(t6,"KVector",9);T(74,66,{3:1,4:1,20:1,25:1,41:1,13:1,66:1,15:1,74:1,428:1},Va,A9),u.gf=function(e){var n,i,r,c,l,f;r=K2(e,`,|;|\\(|\\)|\\[|\\]|\\{|\\}| | | -`),ld(this);try{for(i=0,l=0,c=0,f=0;i0&&(l%2==0?c=rw(r[i]):f=rw(r[i]),l>0&&l%2!=0&&Xi(this,new We(c,f)),++l),++i}catch(g){throw g=vr(g),ct(g,118)?(n=g,K(new yn("The given string does not match the expected format for vectors."+n))):K(g)}},u.Ib=function(){var e,n,i;for(e=new ll("("),n=qn(this,0);n.b!=n.d.c;)i=a(Yn(n),9),Ii(e,i.a+","+i.b),n.b!=n.d.c&&(e.a+="; ");return(e.a+=")",e).a};var Awt=A(t6,"KVectorChain",74);T(224,23,{3:1,34:1,23:1,224:1},zT);var LQ,MF,EF,Q6,tI,SF,kwt=Ri(Dh,"Alignment",224,ji,Yae,jie),cVt;T(855,1,_d,Ej),u.ue=function(e){RNt(e)};var Lwt,PQ,Pwt,Iwt,aVt,IQ,uVt,lVt,Rwt,Dwt,hVt,yGe=A(Dh,"BoxLayouterOptions",855);T(856,1,{},TR),u.Be=function(){var e;return e=new vz,e},u.Ce=function(e){};var xGe=A(Dh,"BoxLayouterOptions/BoxFactory",856);T(785,1,_d,Sj),u.ue=function(e){He(e,new De(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,rFt),""),"Layout Algorithm"),"Select a specific layout algorithm."),(i0(),K6)),At),qe((t0(),On))))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Odt),""),"Alignment"),"Alignment of the selected node relative to other nodes, the exact meaning depends on the used algorithm."),Owt),xs),kwt),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.alignment"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,hE),""),"Aspect Ratio"),"The desired aspect ratio of the drawing, that is the quotient of width by height."),ha),To),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.aspectRatio"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,xpt),""),"Bend Points"),"A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points."),Ed),Awt),qe(Md)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.bendPoints"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,RY),""),"Debug Mode"),"Whether additional debug information shall be generated."),(me(),me(),!1)),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.debugMode"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,NY),""),Eft),"Overall direction of edges: horizontal (right / left) or vertical (down / up)."),Fwt),xs),bA),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.direction"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,i6),""),"Edge Routing"),"What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline."),jwt),xs),qQ),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.edgeRouting"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,_pt),""),"Expand Nodes"),"If active, nodes are expanded to fill the area of their parent."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.expandNodes"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Bdt),""),"Hierarchy Handling"),"If this option is set to SEPARATE_CHILDREN, each hierarchy level of the graph is processed independently, possibly by different layout algorithms, beginning with the lowest level. If it is set to INCLUDE_CHILDREN, the algorithm is responsible to process all hierarchy levels that are contained in the associated parent node. If the root node is set to inherit (or not set at all), the default behavior is SEPARATE_CHILDREN."),Wwt),xs),Evt),ur(On,Y(Z(Jp,1),jt,163,0,[vc]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.hierarchyHandling"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,ox),""),"Padding"),"The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately."),Jwt),Ed),Ggt),ur(On,Y(Z(Jp,1),jt,163,0,[vc]))))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,dO),""),"Interactive"),"Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible."),!1),Ec),ho),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,aY),""),"Port Constraints"),"Defines constraints of the position of the ports of a node."),ivt),xs),Cvt),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portConstraints"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,SO),""),"Position"),"The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position."),Ed),ss),ur(vc,Y(Z(Jp,1),jt,163,0,[ib,og]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.position"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,YP),""),"Priority"),"Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used."),Pa),Io),ur(vc,Y(Z(Jp,1),jt,163,0,[Md]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.priority"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,fO),""),"Randomization Seed"),"Seed used for pseudo-random number generators to control the layout algorithm. If the value is 0, the seed shall be determined pseudo-randomly (e.g. from the system time)."),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.randomSeed"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,KP),""),"Separate Connected Components"),"Whether each connected component should be processed separately."),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.separateConnComp"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Xdt),""),"Junction Points"),"This option is not used as option, but as output of the layout algorithms. It is attached to edges and determines the points where junction symbols should be drawn in order to represent hyperedges with orthogonal routing. Whether such points are computed depends on the chosen layout algorithm and edge routing style. The points are put into the vector chain with no specific order."),$wt),Ed),Awt),qe(Md)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.junctionPoints"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Jdt),""),"Comment Box"),"Whether the node should be regarded as a comment box instead of a regular node. In that case its placement should be similar to how labels are handled. Any edges incident to a comment box specify to which graph elements the comment is related."),!1),Ec),ho),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.commentBox"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Qdt),""),"Hypernode"),"Whether the node should be handled as a hypernode."),!1),Ec),ho),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.hypernode"])))),He(e,new De(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,sFt),""),"Label Manager"),"Label managers can shorten labels upon a layout algorithm's request."),Ed),rMe),ur(On,Y(Z(Jp,1),jt,163,0,[og]))))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,ipt),""),"Margins"),"Margins define additional space around the actual bounds of a graph element. For instance, ports or labels being placed on the outside of a node's border might introduce such a margin. The margin is used to guarantee non-overlap of other graph elements with those ports or labels."),Vwt),Ed),Hgt),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.margins"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Ddt),""),"No Layout"),"No layout is done for the associated element. This is used to mark parts of a diagram to avoid their inclusion in the layout graph, or to mark parts of the layout graph to prevent layout engines from processing them. If you wish to exclude the contents of a compound node from automatic layout, while the node itself is still considered on its own layer, use the 'Fixed Layout' algorithm for that node."),!1),Ec),ho),ur(vc,Y(Z(Jp,1),jt,163,0,[Md,ib,og]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.noLayout"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,oFt),""),"Scale Factor"),"The scaling factor to be applied to the corresponding node in recursive layout. It causes the corresponding node's size to be adjusted, and its ports and labels to be sized and placed accordingly after the layout of that node has been determined (and before the node itself and its siblings are arranged). The scaling is not reverted afterwards, so the resulting layout graph contains the adjusted size and position data. This option is currently not supported if 'Layout Hierarchy' is set."),1),ha),To),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.scaleFactor"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,cFt),""),"Animate"),"Whether the shift from the old layout to the new computed layout shall be animated."),!0),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.animate"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,aFt),""),"Animation Time Factor"),"Factor for computation of animation time. The higher the value, the longer the animation time. If the value is 0, the resulting time is always equal to the minimum defined by 'Minimal Animation Time'."),Xt(100)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.animTimeFactor"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,uFt),""),"Layout Ancestors"),"Whether the hierarchy levels on the path from the selected element to the root of the diagram shall be included in the layout process."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.layoutAncestors"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,lFt),""),"Maximal Animation Time"),"The maximal time for animations, in milliseconds."),Xt(4e3)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.maxAnimTime"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,hFt),""),"Minimal Animation Time"),"The minimal time for animations, in milliseconds."),Xt(400)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.minAnimTime"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,fFt),""),"Progress Bar"),"Whether a progress bar shall be displayed during layout computations."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.progressBar"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,dFt),""),"Validate Options"),"Whether layout options shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."),!0),Ec),ho),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,pFt),""),"Zoom to Fit"),"Whether the zoom level shall be set to view the whole diagram after layout."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.zoomToFit"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,ypt),"box"),"Box Layout Mode"),"Configures the packing mode used by the {@link BoxLayoutProvider}. If SIMPLE is not required (neither priorities are used nor the interactive mode), GROUP_DEC can improve the packing and decrease the area. GROUP_MIXED and GROUP_INC may, in very specific scenarios, work better."),Bwt),xs),Nvt),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,nY),J1),"Components Spacing"),"Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated."),12),ha),To),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.borderSpacing"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Tdt),J1),"Edge Spacing"),"Spacing to be preserved between any two edges. Note that while this can somewhat easily be satisfied for the segments of orthogonally drawn edges, it is harder for general polylines or splines."),10),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,cY),J1),"Edge Label Spacing"),"The minimal distance to be preserved between a label and the edge it is associated with. Note that the placement of a label is influenced by the 'edgelabels.placement' option."),2),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Cdt),J1),"Edge Node Spacing"),"Spacing to be preserved between nodes and edges."),10),ha),To),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Adt),J1),"Label Spacing"),"Determines the amount of space to be left between two labels of the same graph element."),0),ha),To),qe(On)),Y(Z(At,1),wt,2,6,[vFt])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Ldt),J1),"Label Node Spacing"),"Spacing to be preserved between labels and the border of node they are associated with. Note that the placement of a label is influenced by the 'nodelabels.placement' option."),5),ha),To),qe(On)),Y(Z(At,1),wt,2,6,[vFt])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,kdt),J1),"Label Port Spacing"),"Spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),ha),To),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,dE),J1),"Node Spacing"),"The minimal distance to be preserved between each two nodes."),20),ha),To),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.spacing"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Pdt),J1),"Port Spacing"),"Spacing between pairs of ports of the same node."),10),ha),To),ur(On,Y(Z(Jp,1),jt,163,0,[vc]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portSpacing"])))),He(e,new De(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,Idt),J1),"Individual Spacing Override"),"In general spacing values apply to the children of the hierarchical node (possibly the root node) for which the values are actually specified. Hereby, the children include ports, edges, and labels."),Ed),J3e),ur(vc,Y(Z(Jp,1),jt,163,0,[Md,ib,og]))))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,rpt),J1),"Additional Port Space"),"Additional space around the sets of ports on each node side. For each side of a node, this option can reserve additional space before and after the ports on each side. For example, a top spacing of 20 makes sure that the first port on the western and eastern side is 20 units away from the northern border."),hvt),Ed),Hgt),qe(On)))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,npt),_Ft),"Layout Partition"),"Partition to which the node belongs to. If 'layoutPartitions' is true, all nodes are expected to have a partition."),Pa),Io),ur(On,Y(Z(Jp,1),jt,163,0,[vc]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.partition"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,ept),_Ft),"Layout Partitioning"),"Whether to activate partitioned layout."),Qwt),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.layoutPartitions"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,gFt),yFt),"Node Label Padding"),"Define padding for node labels that are placed inside of a node."),qwt),Ed),Ggt),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.nodeLabelInset"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,zdt),yFt),"Node Label Placement"),"Hints for where node labels are to be placed; if empty, the node label's position is not modified."),Xwt),zE),to),ur(vc,Y(Z(Jp,1),jt,163,0,[og]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.nodeLabelPlacement"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Gdt),AO),"Port Alignment"),"Defines the default port distribution for a node. May be overridden for each side individually."),evt),xs),MA),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portAlignment"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,Wdt),AO),"Port Alignment (North)"),"Defines how ports on the northern side are placed, overriding the node's general port alignment."),xs),MA),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portAlignment.north"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,$dt),AO),"Port Alignment (South)"),"Defines how ports on the southern side are placed, overriding the node's general port alignment."),xs),MA),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portAlignment.south"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,Vdt),AO),"Port Alignment (West)"),"Defines how ports on the western side are placed, overriding the node's general port alignment."),xs),MA),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portAlignment.west"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,qdt),AO),"Port Alignment (East)"),"Defines how ports on the eastern side are placed, overriding the node's general port alignment."),xs),MA),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portAlignment.east"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,MO),Mpt),"Node Size Constraints"),"Constraints for determining node sizes. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to node sizes being fixed."),Zwt),zE),EA),qe(vc)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,DY),Mpt),"Node Size Options"),"Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications."),Kwt),zE),Pvt),qe(vc)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,EO),Mpt),"Node Size Minimum"),"The minimal size to which a node can be reduced."),Ywt),Ed),ss),qe(vc)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Zdt),IY),"Edge Label Placement"),"Gives a hint on where to put edge labels."),Uwt),xs),dvt),qe(og)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.edgeLabelPlacement"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Ydt),IY),"Inline Edge Labels"),"If true, an edge label is placed directly on its edge. May only apply to center edge labels. This kind of label placement is only advisable if the label's rendering is such that it is not crossed by its edge and thus stays legible."),!1),Ec),ho),qe(og)))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,mFt),"font"),"Font Name"),"Font name used for a label."),K6),At),qe(og)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.fontName"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,bFt),"font"),"Font Size"),"Font size used for a label."),Pa),Io),qe(og)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.fontSize"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,tpt),$Y),"Port Anchor Offset"),"The offset to the port position where connections shall be attached."),Ed),ss),qe(ib)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portAnchor"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,Kdt),$Y),"Port Index"),"The index of a port in the fixed order around a node. The order is assumed as clockwise, starting with the leftmost port on the top side. This option must be set if 'Port Constraints' is set to FIXED_ORDER and no specific positions are given for the ports. Additionally, the option 'Port Side' must be defined in this case."),Pa),Io),qe(ib)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portIndex"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Ndt),$Y),"Port Side"),"The side of a node on which a port is situated. This option must be set if 'Port Constraints' is set to FIXED_SIDE or FIXED_ORDER and no specific positions are given for the ports."),svt),xs),Ia),qe(ib)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portSide"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,Rdt),$Y),"Port Border Offset"),"The offset of ports on the node border. With a positive offset the port is moved outside of the node, while with a negative offset the port is moved towards the inside. An offset of 0 means that the port is placed directly on the node border, i.e. if the port side is north, the port's south border touches the nodes's north border; if the port side is east, the port's west border touches the nodes's east border; if the port side is south, the port's north border touches the node's south border; if the port side is west, the port's east border touches the node's west border."),ha),To),qe(ib)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.offset"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,jdt),xFt),"Port Label Placement"),"Decides on a placement method for port labels."),rvt),xs),Avt),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portLabelPlacement"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Hdt),xFt),"Port Labels Next to Port"),"Usually, inside port labels of hierarchical nodes are placed not next to their port, but with an offset to avoid edge-label crossings. The offset is not necessary if the port has no connections that would cross the label, but is usually applied anyway to keep things uniform. Setting this option to true places labels next to their ports if they won't be crossed by edges."),!1),Ec),ho),qe(vc)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Fdt),MFt),"Activate Inside Self Loops"),"Whether this node allows to route self loops inside of it instead of around it. If set to true, this will make the node a compound node if it isn't already, and will require the layout algorithm to support compound nodes with hierarchical ports."),!1),Ec),ho),qe(vc)),Y(Z(At,1),wt,2,6,[EFt])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Udt),MFt),"Inside Self Loop"),"Whether a self loop should be routed inside a node instead of around that node."),!1),Ec),ho),qe(Md)),Y(Z(At,1),wt,2,6,[EFt])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,iY),"edge"),"Edge Thickness"),"The thickness of an edge. This is a hint on the line width used to draw an edge, possibly requiring more space to be reserved for it."),1),ha),To),qe(Md)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.thickness"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,wFt),"edge"),"Edge Type"),"The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations."),Gwt),xs),vvt),qe(Md)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.edgeType"])))),PT(e,new k2(ET(eM(tM(new Cb,Nn),"Layered"),'The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called "hierarchies", and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.'))),PT(e,new k2(ET(eM(tM(new Cb,"org.eclipse.elk.orthogonal"),"Orthogonal"),`Orthogonal methods that follow the "topology-shape-metrics" approach by Batini, Nardelli and Tamassia '86. The first phase determines the topology of the drawing by applying a planarization technique, which results in a planar representation of the graph. The orthogonal shape is computed in the second phase, which aims at minimizing the number of edge bends, and is called orthogonalization. The third phase leads to concrete coordinates for nodes and edge bend points by applying a compaction method, thus defining the metrics.`))),PT(e,new k2(ET(eM(tM(new Cb,Rf),"Force"),"Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. The first successful method of this kind was proposed by Eades in 1984."))),PT(e,new k2(ET(eM(tM(new Cb,"org.eclipse.elk.circle"),"Circle"),"Circular layout algorithms emphasize cycles or biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent OPTIONS of the graph."))),PT(e,new k2(ET(eM(tM(new Cb,XBt),"Tree"),"Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type."))),PT(e,new k2(ET(eM(tM(new Cb,"org.eclipse.elk.planar"),"Planar"),"Algorithms that require a planar or upward planar graph. Most of these algorithms are theoretically interesting, but not practically usable."))),PT(e,new k2(ET(eM(tM(new Cb,Hm),"Radial"),"Radial layout algorithms usually position the nodes of the graph on concentric circles."))),pNt((new C8,e)),RNt((new Ej,e)),nNt((new A8,e))};var Nwt,fVt,Owt,jE,dVt,pVt,Bwt,gVt,RQ,gA,Fwt,mVt,eI,Uwt,zwt,jwt,Hwt,Gwt,bVt,ay,Wwt,wVt,TF,DQ,NQ,Px,$wt,CF,Vwt,vVt,qwt,AF,Xwt,HE,Zwt,nI,Ywt,kF,Kwt,OQ,uy,Jwt,_Vt,Qwt,yVt,tvt,evt,BQ,FQ,UQ,zQ,nvt,nu,iI,ivt,xVt,rI,jQ,rvt,mA,svt,Ix,LF,HQ,MVt,GQ,ovt,EVt,cvt,SVt,WQ,avt,PF,uvt,ly,lvt,hvt,fvt,MGe=A(Dh,"CoreOptions",785);T(110,23,{3:1,34:1,23:1,110:1},$5);var fp,ah,uh,Ff,cg,bA=Ri(Dh,Eft,110,ji,dae,Xie),TVt;T(226,23,{3:1,34:1,23:1,226:1},q9);var wA,Rx,vA,IF,dvt=Ri(Dh,"EdgeLabelPlacement",226,ji,Uce,Zie),CVt;T(197,23,{3:1,34:1,23:1,197:1},X9);var GE,$Q,rb,VQ,qQ=Ri(Dh,"EdgeRouting",197,ji,zce,Yie),AVt;T(289,23,{3:1,34:1,23:1,289:1},jT);var pvt,gvt,mvt,bvt,XQ,wvt,vvt=Ri(Dh,"EdgeType",289,ji,Kae,Kie),kVt;T(853,1,_d,C8),u.ue=function(e){pNt(e)};var _vt,yvt,xvt,LVt,Mvt,_A,EGe=A(Dh,"FixedLayouterOptions",853);T(854,1,{},CR),u.Be=function(){var e;return e=new p1,e},u.Ce=function(e){};var SGe=A(Dh,"FixedLayouterOptions/FixedFactory",854);T(316,23,{3:1,34:1,23:1,316:1},EW);var Dx,RF,yA,Evt=Ri(Dh,"HierarchyHandling",316,ji,cce,$ie),PVt;T(86,23,{3:1,34:1,23:1,86:1},Fv);var Uf,kl,Ll,Pl,Nu,Il,lh,hh,Bh,to=Ri(Dh,"NodeLabelPlacement",86,ji,jue,Vie),IVt;T(225,23,{3:1,34:1,23:1,225:1},V5);var Svt,xA,sb,Tvt,ZQ,MA=Ri(Dh,"PortAlignment",225,ji,hae,qie),RVt;T(83,23,{3:1,34:1,23:1,83:1},HT);var Nx,Gc,Sd,Ox,dp,ob,Cvt=Ri(Dh,"PortConstraints",83,ji,Xae,Wie),DVt;T(275,23,{3:1,34:1,23:1,275:1},SW);var DF,cb,hy,Avt=Ri(Dh,"PortLabelPlacement",275,ji,rce,Hie),NVt;T(69,23,{3:1,34:1,23:1,69:1},q5);var Qe,Tn,sI,fy,zf,ab,kvt,oI,dy,Td,YQ,Cd,M0,Ad,Bx,cI,py,aI,fi,Wc,on,Ia=Ri(Dh,"PortSide",69,ji,iae,Gie),OVt;T(857,1,_d,A8),u.ue=function(e){nNt(e)};var BVt,FVt,Lvt,UVt,zVt,TGe=A(Dh,"RandomLayouterOptions",857);T(858,1,{},wz),u.Be=function(){var e;return e=new I3,e},u.Ce=function(e){};var CGe=A(Dh,"RandomLayouterOptions/RandomFactory",858);T(344,23,{3:1,34:1,23:1,344:1},Z9);var ub,uI,lI,E0,EA=Ri(Dh,"SizeConstraint",344,ji,jce,Jie),jVt;T(239,23,{3:1,34:1,23:1,239:1},Uv);var NF,OF,WE,KQ,SA,TA,BF,Fx,FF,Pvt=Ri(Dh,"SizeOptions",239,ji,Hue,Qie),HVt;T(313,1,{},kD,Bst,Ost),u.b=!1,u.c=0,u.d=-1,u.e=0,u.f=!1,u.j=0;var AGe=A(Rh,"BasicProgressMonitor",313);T(848,244,O_,vz),u.Ae=function(e,n){var i,r,c,l,f,g,b,v,M,k;switch(di(n,"Box layout",2),l=lt(Yt(cn(e,(M7(),hVt)))),f=a(cn(e,lVt),119),i=lt(de(cn(e,Pwt))),r=lt(de(cn(e,Iwt))),c=a(cn(e,PQ),288),c.g){case 0:g=(b=new TD((!e.a&&(e.a=new Wt(zr,e,10,11)),e.a)),we(),D1(b,new qH(r)),b),v=a(cn(e,IQ),9),v.a=y.Math.max(v.a-f.b-f.c,0),v.b=y.Math.max(v.b-f.d-f.a,0),M=Yt(cn(e,Lwt)),(M==null||(En(M),M<=0))&&(M=1.3),k=uxe(g,l,f,v.a,v.b,i,(En(M),M)),P_(e,k.a,k.b,!1,!0);break;default:_ye(e,l,f,i)}Vn(n)};var kGe=A(Rh,"BoxLayoutProvider",848);T(849,1,jr,qH),u.Ld=function(e,n){return Tbe(this,a(e,35),a(n,35))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.a=!1;var LGe=A(Rh,"BoxLayoutProvider/1",849);T(145,1,{145:1},ON,YSt),u.Ib=function(){return this.c?vht(this.c):Gp(this.b)};var PGe=A(Rh,"BoxLayoutProvider/Group",145);T(288,23,{3:1,34:1,23:1,288:1},Y9);var Ivt,Rvt,Dvt,JQ,Nvt=Ri(Rh,"BoxLayoutProvider/PackingMode",288,ji,Gce,tre),GVt;T(850,1,jr,pz),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return-ro(Z5(a(e,145)),Z5(a(n,145)))};var IGe=A(Rh,"BoxLayoutProvider/lambda$0$Type",850);T(851,1,jr,gz),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return ro(Z5(a(e,145)),Z5(a(n,145)))};var RGe=A(Rh,"BoxLayoutProvider/lambda$1$Type",851);T(852,1,jr,mz),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return ro(Z5(a(e,145)),Z5(a(n,145)))};var DGe=A(Rh,"BoxLayoutProvider/lambda$2$Type",852);T(833,1,{},ZMt),u.td=function(e){ome(this.a,this.b,e)},u.a=0,u.b=0;var NGe=A(Rh,"ElkUtil/lambda$0$Type",833);T(834,1,{},YMt),u.td=function(e){PQt(this.a,this.b,e)},u.a=0,u.b=0;var OGe=A(Rh,"ElkUtil/lambda$1$Type",834);T(835,1,{},KMt),u.td=function(e){see(this.a,this.b,e)},u.a=0,u.b=0;var BGe=A(Rh,"ElkUtil/lambda$2$Type",835);T(322,1,{34:1,322:1},q3),u.vd=function(e){return fee(this,a(e,210))},u.Fb=function(e){var n;return ct(e,322)?(n=a(e,322),this.a==n.a):!1},u.Hb=function(){return Tr(this.a)},u.Ib=function(){return this.a+" (exclusive)"},u.a=0;var FGe=A(Rh,"ExclusiveBounds/ExclusiveLowerBound",322);T(963,244,O_,p1),u.Ae=function(e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te;for(di(n,SFt,1),l=a(cn(e,(dr(),zwt)),197),R=0,O=0,_t=new $n((!e.a&&(e.a=new Wt(zr,e,10,11)),e.a));_t.e!=_t.i._b();){for(rt=a(ci(_t),35),Te=a(cn(rt,(jN(),_A)),9),Te&&(Wd(rt,Te.a,Te.b),a(cn(rt,yvt),185).pc((Ju(),ub))&&($=a(cn(rt,xvt),9),$.a>0&&$.b>0&&P_(rt,$.a,$.b,!0,!0))),R=y.Math.max(R,rt.i+rt.g),O=y.Math.max(O,rt.j+rt.f),M=new $n((!rt.n&&(rt.n=new Wt(ic,rt,1,7)),rt.n));M.e!=M.i._b();)b=a(ci(M),137),Te=a(cn(b,_A),9),Te&&Wd(b,Te.a,Te.b),R=y.Math.max(R,rt.i+b.i+b.g),O=y.Math.max(O,rt.j+b.j+b.f);for(Zt=new $n((!rt.c&&(rt.c=new Wt(Rl,rt,9,9)),rt.c));Zt.e!=Zt.i._b();)for(Gt=a(ci(Zt),121),Te=a(cn(Gt,_A),9),Te&&Wd(Gt,Te.a,Te.b),ce=rt.i+Gt.i,ae=rt.j+Gt.j,R=y.Math.max(R,ce+Gt.g),O=y.Math.max(O,ae+Gt.f),v=new $n((!Gt.n&&(Gt.n=new Wt(ic,Gt,1,7)),Gt.n));v.e!=v.i._b();)b=a(ci(v),137),Te=a(cn(b,_A),9),Te&&Wd(b,Te.a,Te.b),R=y.Math.max(R,ce+b.i+b.g),O=y.Math.max(O,ae+b.j+b.f);for(c=Rn(Af(rt));Jn(c);)i=a(In(c),105),k=cOt(i),R=y.Math.max(R,k.a),O=y.Math.max(O,k.b);for(r=Rn(SP(rt));Jn(r);)i=a(In(r),105),zc(a(at((!i.b&&(i.b=new pn(Si,i,4,7)),i.b),0),97))!=e&&(k=cOt(i),R=y.Math.max(R,k.a),O=y.Math.max(O,k.b))}if(l==(gd(),GE))for(pt=new $n((!e.a&&(e.a=new Wt(zr,e,10,11)),e.a));pt.e!=pt.i._b();)for(rt=a(ci(pt),35),r=Rn(Af(rt));Jn(r);)i=a(In(r),105),g=(f=new Va,f),g.b==0?ga(i,Px,null):ga(i,Px,g);It=a(cn(e,(jN(),LVt)),119),nt=R+It.b+It.c,W=O+It.d+It.a,P_(e,nt,W,!0,!0),Vn(n)};var UGe=A(Rh,"FixedLayoutProvider",963);T(786,131,tY,Ok);var J3e=A(Rh,"IndividualSpacings",786);T(635,1,{},CCt),u.c=0;var zGe=A(Rh,"InstancePool",635);T(48,1,{20:1,48:1},zs),u.sc=function(e){vo(this,e)},u.Fb=function(e){var n,i,r;return ct(e,48)?(i=a(e,48),n=this.a==null?i.a==null:Fi(this.a,i.a),r=this.b==null?i.b==null:Fi(this.b,i.b),n&&r):!1},u.Hb=function(){var e,n,i,r,c,l;return i=this.a==null?0:Yr(this.a),e=i&qr,n=i&-65536,l=this.b==null?0:Yr(this.b),r=l&qr,c=l&-65536,e^c>>16&qr|n^r<<16},u.tc=function(){return new XH(this)},u.Ib=function(){return this.a==null&&this.b==null?"pair(null,null)":this.a==null?"pair(null,"+Yc(this.b)+")":this.b==null?"pair("+Yc(this.a)+",null)":"pair("+Yc(this.a)+","+Yc(this.b)+")"};var jGe=A(Rh,"Pair",48);T(859,1,Cs,XH),u.gc=function(e){ks(this,e)},u.hc=function(){return!this.c&&(!this.b&&this.a.a!=null||this.a.b!=null)},u.ic=function(){if(!this.c&&!this.b&&this.a.a!=null)return this.b=!0,this.a.a;if(!this.c&&this.a.b!=null)return this.c=!0,this.a.b;throw K(new J)},u.jc=function(){throw this.c&&this.a.b!=null?this.a.b=null:this.b&&this.a.a!=null&&(this.a.a=null),K(new na)},u.b=!1,u.c=!1;var HGe=A(Rh,"Pair/1",859);T(404,1,{404:1},E4t),u.Fb=function(e){return au(this.a,a(e,404).a)&&au(this.c,a(e,404).c)&&au(this.d,a(e,404).d)&&au(this.b,a(e,404).b)},u.Hb=function(){return sq(Y(Z(un,1),te,1,5,[this.a,this.c,this.d,this.b]))},u.Ib=function(){return"("+this.a+Rc+this.c+Rc+this.d+Rc+this.b+")"};var GGe=A(Rh,"Quadruple",404);T(957,244,O_,I3),u.Ae=function(e,n){var i,r,c,l,f;if(di(n,"Random Layout",1),(!e.a&&(e.a=new Wt(zr,e,10,11)),e.a).i==0){Vn(n);return}l=a(cn(e,(gut(),UVt)),21),l&&l.a!=0?c=new fN(l.a):c=new kq,i=lt(Yt(cn(e,BVt))),f=lt(Yt(cn(e,zVt))),r=a(cn(e,FVt),119),Z2e(e,c,i,f,r),Vn(n)};var WGe=A(Rh,"RandomLayoutProvider",957);T(490,1,{}),u.Qe=function(){return new We(this.f.i,this.f.j)},u.xe=function(e){return j4t(e,(dr(),nu))?cn(this.f,WVt):cn(this.f,e)},u.Re=function(){return new We(this.f.g,this.f.f)},u.Se=function(){return this.g},u.ye=function(e){return mV(this.f,e)},u.Te=function(e){th(this.f,e.a),eh(this.f,e.b)},u.Ue=function(e){c_(this.f,e.a),o_(this.f,e.b)},u.Ve=function(e){this.g=e},u.g=0;var WVt,$Ge=A(s6,"ElkGraphAdapters/AbstractElkGraphElementAdapter",490);T(491,1,{741:1},fT),u.We=function(){var e,n;if(!this.b)for(this.b=uN(j$(this.a).i),n=new $n(j$(this.a));n.e!=n.i._b();)e=a(ci(n),137),Ut(this.b,new $G(e));return this.b},u.b=null;var VGe=A(s6,"ElkGraphAdapters/ElkEdgeAdapter",491);T(562,490,{},WG),u.Xe=function(){return BRt(this)},u.a=null;var qGe=A(s6,"ElkGraphAdapters/ElkGraphAdapter",562);T(564,490,{271:1},$G);var XGe=A(s6,"ElkGraphAdapters/ElkLabelAdapter",564);T(563,490,{739:1},VW),u.We=function(){return ope(this)},u.$e=function(){var e;return e=a(cn(this.f,(dr(),CF)),135),!e&&(e=new a2),e},u.af=function(){return cpe(this)},u.cf=function(e){var n;n=new u$(e),ga(this.f,(dr(),CF),n)},u.df=function(e){ga(this.f,(dr(),uy),new zst(e))},u.Ye=function(){return this.d},u.Ze=function(){var e,n;if(!this.a)for(this.a=new Dt,n=Rn(SP(a(this.f,35)));Jn(n);)e=a(In(n),105),Ut(this.a,new fT(e));return this.a},u._e=function(){var e,n;if(!this.c)for(this.c=new Dt,n=Rn(Af(a(this.f,35)));Jn(n);)e=a(In(n),105),Ut(this.c,new fT(e));return this.c},u.bf=function(){return Kot(a(this.f,35)).i!=0||lt(de(a(this.f,35).xe((dr(),TF))))},u.a=null,u.b=null,u.c=null,u.d=null,u.e=null;var ZGe=A(s6,"ElkGraphAdapters/ElkNodeAdapter",563);T(997,490,{740:1},c9),u.We=function(){return gpe(this)},u.Ze=function(){var e,n;if(!this.a)for(this.a=od(a(this.f,121).Tf().i),n=new $n(a(this.f,121).Tf());n.e!=n.i._b();)e=a(ci(n),105),Ut(this.a,new fT(e));return this.a},u._e=function(){var e,n;if(!this.c)for(this.c=od(a(this.f,121).Uf().i),n=new $n(a(this.f,121).Uf());n.e!=n.i._b();)e=a(ci(n),105),Ut(this.c,new fT(e));return this.c},u.ef=function(){return a(a(this.f,121).xe((dr(),mA)),69)},u.ff=function(){var e,n,i,r,c,l,f,g;for(r=Tf(a(this.f,121)),i=new $n(a(this.f,121).Uf());i.e!=i.i._b();)for(e=a(ci(i),105),g=new $n((!e.c&&(e.c=new pn(Si,e,5,8)),e.c));g.e!=g.i._b();){if(f=a(ci(g),97),_C(zc(f),r))return!0;if(zc(f)==r&<(de(cn(e,(dr(),DQ)))))return!0}for(n=new $n(a(this.f,121).Tf());n.e!=n.i._b();)for(e=a(ci(n),105),l=new $n((!e.b&&(e.b=new pn(Si,e,4,7)),e.b));l.e!=l.i._b();)if(c=a(ci(l),97),_C(zc(c),r))return!0;return!1},u.a=null,u.b=null,u.c=null;var YGe=A(s6,"ElkGraphAdapters/ElkPortAdapter",997);T(265,23,{3:1,34:1,23:1,265:1},K9);var kd,ag,hI,fI,$Vt=Ri(Ept,"LabelSide",265,ji,Wce,ere),VVt;T(676,1,{},R3),u.td=function(e){z7t(a(e,739),!0,!1)};var KGe=A(Ept,"NodeLabelAndSizeCalculator/lambda$0$Type",676);T(571,1,{},E5),u.b=!0,u.c=!0,u.d=!0,u.e=!0;var JGe=A(Ept,TBt,571);T(171,1,{171:1}),u.j=!1,u.k=!1;var qVt=A(d0,"Cell",171);T(114,171,{114:1,171:1},vTt),u.Pf=function(){return RD(this)},u.Qf=function(){var e;return e=this.n,this.a.a+e.b+e.c};var QGe=A(d0,"AtomicCell",114);T(203,23,{3:1,34:1,23:1,203:1},TW);var lc,ta,hc,Dw=Ri(d0,"ContainerArea",203,ji,oce,nre),XVt;T(307,171,CFt);var tWe=A(d0,"ContainerCell",307);T(1179,307,CFt,RIt),u.Pf=function(){var e;return e=0,this.e?this.b?e=this.b.b:this.a[1][1]&&(e=this.a[1][1].Pf()):e=nut(this,FRt(this,!0)),e>0?e+this.n.d+this.n.a:0},u.Qf=function(){var e,n,i,r,c;if(c=0,this.e)this.b?c=this.b.a:this.a[1][1]&&(c=this.a[1][1].Qf());else if(this.g)c=nut(this,rX(this,null,!0));else for(n=(Ch(),Y(Z(Dw,1),jt,203,0,[lc,ta,hc])),i=0,r=n.length;i0?c+this.n.b+this.n.c:0},u.Rf=function(){var e,n,i,r,c;if(this.g)for(e=rX(this,null,!1),i=(Ch(),Y(Z(Dw,1),jt,203,0,[lc,ta,hc])),r=0,c=i.length;r0&&(r[0]+=this.d,i-=r[0]),r[2]>0&&(r[2]+=this.d,i-=r[2]),this.c.a=y.Math.max(0,i),this.c.d=n.d+e.d+(this.c.a-i)/2,r[1]=y.Math.max(r[1],i),Ict(this,ta,n.d+e.d+r[0]-(r[1]-i)/2,r)},u.b=null,u.d=0,u.e=!1,u.f=!1,u.g=!1;var QQ=0,UF=0,eWe=A(d0,"GridContainerCell",1179);T(419,23,{3:1,34:1,23:1,419:1},CW);var lb,jf,fh,ZVt=Ri(d0,"HorizontalLabelAlignment",419,ji,nce,ire),YVt;T(267,171,{171:1,267:1},oAt,NLt,eAt),u.Pf=function(){return b$(this)},u.Qf=function(){return ID(this)},u.a=0,u.c=!1;var Q3e=A(d0,"LabelCell",267);T(219,307,{171:1,307:1,219:1},HC),u.Pf=function(){return yP(this)},u.Qf=function(){return xP(this)},u.Rf=function(){VX(this)},u.Sf=function(){qX(this)},u.b=0,u.c=0,u.d=!1;var nWe=A(d0,"StripContainerCell",219);T(1394,1,us,yz),u.Nb=function(e){return!!a(e,171)&&a(e,171).k};var iWe=A(d0,"StripContainerCell/lambda$0$Type",1394);T(1395,1,{},Lg),u.oe=function(e){return a(e,171).Qf()};var rWe=A(d0,"StripContainerCell/lambda$1$Type",1395);T(1396,1,us,Bk),u.Nb=function(e){return!!a(e,171)&&a(e,171).j};var sWe=A(d0,"StripContainerCell/lambda$2$Type",1396);T(1397,1,{},Mv),u.oe=function(e){return a(e,171).Pf()};var oWe=A(d0,"StripContainerCell/lambda$3$Type",1397);T(420,23,{3:1,34:1,23:1,420:1},AW);var dh,hb,Fh,KVt=Ri(d0,"VerticalLabelAlignment",420,ji,ice,rre),JVt;T(697,1,{},Wht),u.c=0,u.d=0,u.k=0,u.s=0,u.u=0,u.B=!1;var cWe=A(LO,"NodeContext",697);T(1177,1,jr,AR),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return CEt(a(e,69),a(n,69))};var aWe=A(LO,"NodeContext/0methodref$comparePortSides$Type",1177);T(1178,1,jr,_z),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Z1e(a(e,111),a(n,111))};var uWe=A(LO,"NodeContext/1methodref$comparePortContexts$Type",1178);T(147,23,{3:1,34:1,23:1,147:1},Yu);var QVt,tqt,eqt,nqt,iqt,rqt,sqt,oqt,cqt,aqt,uqt,lqt,hqt,fqt,dqt,pqt,gqt,mqt,bqt,wqt,vqt,ttt,_qt=Ri(LO,"NodeLabelLocation",147,ji,Uq,sre),yqt;T(111,1,{111:1},Qkt);var lWe=A(LO,"PortContext",111);T(1182,1,{},_p),u.oe=function(e){return a(e,111).c?ID(a(e,111).c):0};var hWe=A(wE,"HorizontalPortPlacementSizeCalculator/lambda$0$Type",1182);T(1184,1,{},xz),u.td=function(e){N3t(a(e,267))};var fWe=A(wE,"LabelPlacer/lambda$0$Type",1184);T(1185,1,us,kR),u.Nb=function(e){return!!a(e,111).c};var dWe=A(wE,"LabelPlacer/lambda$1$Type",1185);T(1186,1,{},LR),u.td=function(e){N3t(a(e,111).c)};var pWe=A(wE,"LabelPlacer/lambda$2$Type",1186),Ovt;T(1181,1,{},D3),u.td=function(e){Fg(),hit(a(e,111))};var gWe=A(wE,"NodeLabelAndSizeUtilities/lambda$0$Type",1181);T(698,1,{},Trt),u.td=function(e){RQt(this.a,this.b,e)},u.b=!1;var mWe=A(wE,"NodeLabelCellCreator/lambda$0$Type",698);T(1180,1,{},YH),u.td=function(e){Vt(this.a,e)};var bWe=A(wE,"PortContextCreator/lambda$0$Type",1180),zF;T(1183,1,{},Ab),u.oe=function(e){return a(e,111).c?b$(a(e,111).c):0};var wWe=A(wE,"VerticalPortPlacementSizeCalculator/lambda$0$Type",1183);T(1525,1,{},PR);var vWe=A(vE,"GreedyRectangleStripOverlapRemover",1525);T(1526,1,jr,Mz),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Lee(a(e,194),a(n,194))};var _We=A(vE,"GreedyRectangleStripOverlapRemover/0methodref$compareByYCoordinate$Type",1526);T(1497,1,{},zxt),u.a=5,u.e=0;var yWe=A(vE,"RectangleStripOverlapRemover",1497);T(1498,1,jr,WS),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Pee(a(e,194),a(n,194))};var xWe=A(vE,"RectangleStripOverlapRemover/0methodref$compareLeftRectangleBorders$Type",1498);T(1500,1,jr,Ez),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return nse(a(e,194),a(n,194))};var MWe=A(vE,"RectangleStripOverlapRemover/1methodref$compareRightRectangleBorders$Type",1500);T(374,23,{3:1,34:1,23:1,374:1},J9);var dI,ett,ntt,pI,xqt=Ri(vE,"RectangleStripOverlapRemover/OverlapRemovalDirection",374,ji,Hce,ore),Mqt;T(194,1,{194:1},v$);var EWe=A(vE,"RectangleStripOverlapRemover/RectangleNode",194);T(1499,1,{},a9),u.td=function(e){npe(this.a,a(e,194))};var SWe=A(vE,"RectangleStripOverlapRemover/lambda$0$Type",1499),Nw=Sr(tl,"EObject"),$E=Sr(H_,AFt),sf=Sr(H_,kFt),gI=Sr(H_,LFt),mI=Sr(H_,"ElkShape"),Si=Sr(H_,PFt),Xs=Sr(H_,Tpt),os=Sr(H_,IFt),bI=Sr(tl,RFt),CA=Sr(tl,"EFactory"),Eqt,itt=Sr(tl,DFt),of=Sr(tl,"EPackage"),ms,Sqt,Tqt,Bvt,jF,Cqt,Fvt,Uvt,zvt,pp,Aqt,kqt,ic=Sr(H_,Cpt),zr=Sr(H_,Apt),Rl=Sr(H_,kpt);T(87,1,NFt),u.cg=function(){return this.dg(),null},u.dg=function(){return null},u.eg=function(){return this.dg(),!1},u.fg=function(){return!1},u.gg=function(e){Bi(this,e)};var TWe=A(dx,"BasicNotifierImpl",87);T(92,87,BFt),u.Hg=function(){return Xl(this)},u.hg=function(e,n){return e},u.ig=function(){throw K(new Oi)},u.jg=function(e){var n;return n=jo(a(Ve(this.mg(),this.og()),17)),this.yg().Cg(this,n.n,n.f,e)},u.kg=function(e,n){throw K(new Oi)},u.lg=function(e,n,i){return Lu(this,e,n,i)},u.mg=function(){var e;return this.ig()&&(e=this.ig().pj(),e)?e:this.Rg()},u.ng=function(){return SX(this)},u.og=function(){throw K(new Oi)},u.pg=function(){var e,n;return n=this.Jg().qj(),!n&&this.ig().vj(n=(TT(),e=tct(q1(this.mg())),e==null?htt:new eL(this,e))),n},u.qg=function(e,n){return e},u.rg=function(e){var n;return n=e.Vi(),n?e.pi():xr(this.mg(),e)},u.sg=function(){var e;return e=this.ig(),e?e.sj():null},u.tg=function(){return this.ig()?this.ig().pj():null},u.ug=function(e,n,i){return g7(this,e,n,i)},u.vg=function(e){return kL(this,e)},u.wg=function(e,n){return Lct(this,e,n)},u.xg=function(){var e;return e=this.ig(),!!e&&e.tj()},u.yg=function(){throw K(new Oi)},u.zg=function(){return l7(this)},u.Ag=function(e,n,i,r){return H2(this,e,n,r)},u.Bg=function(e,n,i){var r;return r=a(Ve(this.mg(),n),61),r.aj().dj(this,this.Qg(),n-this.Sg(),e,i)},u.Cg=function(e,n,i,r){return nN(this,e,n,r)},u.Dg=function(e,n,i){var r;return r=a(Ve(this.mg(),n),61),r.aj().ej(this,this.Qg(),n-this.Sg(),e,i)},u.Eg=function(){return!!this.ig()&&(this.ig().rj(),!1)},u.Fg=function(e){return Hq(this,e)},u.Gg=function(e){var n;return n=this.rg(e),n>=0?this.Fg(n):yX(this,e)},u.Ig=function(e){return v7t(this,e)},u.Jg=function(){throw K(new Oi)},u.Kg=function(){return this.ig()?this.ig().rj():null},u.Lg=function(){return l7(this)},u.Mg=function(e,n){P7(this,e,n)},u.Ng=function(e){this.Jg().uj(e)},u.Og=function(e){this.Jg().wj(e)},u.Pg=function(e,n){var i,r,c,l;return l=this.sg(),l&&e&&(n=$s(l.fk(),this,n),l.jk(this)),r=this.yg(),r&&(FX(this,this.yg(),this.og()).Bb&ao?(c=r.zg(),c&&(e?!l&&c.jk(this):c.ik(this))):(n=(i=this.og(),i>=0?this.jg(n):this.yg().Cg(this,-1-i,null,n)),n=this.lg(null,-1,n))),this.Og(e),n},u.Qg=function(){return Zct(this)},u.Rg=function(){return(T1(),Ae).S},u.Sg=function(){return ei(this.Rg())},u.Ib=function(){return nh(this)};var CWe=A(Re,"BasicEObjectImpl",92),Lqt;T(107,92,{95:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1}),u.Tg=function(e){var n;return n=Xct(this),n[e]},u.Ug=function(e,n){var i;i=Xct(this),Vr(i,e,n)},u.Vg=function(e){var n;n=Xct(this),Vr(n,e,null)},u.cg=function(){return a(an(this,4),116)},u.dg=function(){throw K(new Oi)},u.eg=function(){return(this.Db&4)!=0},u.ig=function(){throw K(new Oi)},u.Wg=function(e){zC(this,2,e)},u.kg=function(e,n){this.Db=n<<16|this.Db&255,this.Wg(e)},u.mg=function(){return da(this)},u.og=function(){return this.Db>>16},u.pg=function(){var e,n;return TT(),n=tct(q1((e=a(an(this,16),24),e||this.Rg()))),n==null?htt:new eL(this,n)},u.fg=function(){return(this.Db&1)==0},u.sg=function(){return a(an(this,128),1628)},u.tg=function(){return a(an(this,16),24)},u.xg=function(){return(this.Db&32)!=0},u.yg=function(){return a(an(this,2),42)},u.Eg=function(){return(this.Db&64)!=0},u.Jg=function(){throw K(new Oi)},u.Kg=function(){return a(an(this,64),261)},u.Ng=function(e){zC(this,16,e)},u.Og=function(e){zC(this,128,e)},u.Qg=function(){return ra(this)},u.Db=0;var AWe=A(Re,"MinimalEObjectImpl",107);T(108,107,{95:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1}),u.Wg=function(e){this.Cb=e},u.yg=function(){return this.Cb};var kWe=A(Re,"MinimalEObjectImpl/Container",108);T(1676,108,{95:1,379:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1}),u.ve=function(e){return!this.o&&(this.o=new lu((Ic(),pp),ug,this,0)),lPt(this.o,e.p?e.p:(we(),we(),ap)),this},u.ug=function(e,n,i){return Uut(this,e,n,i)},u.Dg=function(e,n,i){return vlt(this,e,n,i)},u.Fg=function(e){return cct(this,e)},u.Mg=function(e,n){Oat(this,e,n)},u.Rg=function(){return Ic(),kqt},u.we=function(){return uRt(this)},u.xe=function(e){return cn(this,e)},u.ye=function(e){return mV(this,e)},u.ze=function(e,n){return ga(this,e,n)};var LWe=A(p0,"EMapPropertyHolderImpl",1676);T(502,108,{95:1,531:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1},N3),u.ug=function(e,n,i){switch(e){case 0:return this.a;case 1:return this.b}return g7(this,e,n,i)},u.Fg=function(e){switch(e){case 0:return this.a!=0;case 1:return this.b!=0}return Hq(this,e)},u.Mg=function(e,n){switch(e){case 0:OV(this,lt(Yt(n)));return;case 1:BV(this,lt(Yt(n)));return}P7(this,e,n)},u.Rg=function(){return Ic(),Sqt},u.Ib=function(){var e;return this.Db&64?nh(this):(e=new ul(nh(this)),e.a+=" (x: ",Rv(e,this.a),e.a+=", y: ",Rv(e,this.b),e.a+=")",e.a)},u.a=0,u.b=0;var PWe=A(p0,"ElkBendPointImpl",502);T(651,1676,{95:1,379:1,253:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1}),u.ug=function(e,n,i){return Kat(this,e,n,i)},u.Bg=function(e,n,i){return hX(this,e,n,i)},u.Dg=function(e,n,i){return nq(this,e,n,i)},u.Fg=function(e){return Sat(this,e)},u.Mg=function(e,n){nlt(this,e,n)},u.Rg=function(){return Ic(),Cqt},u.Vf=function(){return j$(this)},u.Ib=function(){return Sq(this)},u.k=null;var IWe=A(p0,"ElkGraphElementImpl",651);T(652,651,{95:1,379:1,253:1,429:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1}),u.ug=function(e,n,i){return out(this,e,n,i)},u.Fg=function(e){return hut(this,e)},u.Mg=function(e,n){ilt(this,e,n)},u.Rg=function(){return Ic(),Aqt},u.Wf=function(){return this.f},u.Xf=function(){return this.g},u.Yf=function(){return this.i},u.Zf=function(){return this.j},u.$f=function(e,n){sD(this,e,n)},u._f=function(e,n){Wd(this,e,n)},u.ag=function(e){th(this,e)},u.bg=function(e){eh(this,e)},u.Ib=function(){return dX(this)},u.f=0,u.g=0,u.i=0,u.j=0;var RWe=A(p0,"ElkShapeImpl",652);T(653,652,{95:1,379:1,97:1,253:1,429:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1}),u.ug=function(e,n,i){return Put(this,e,n,i)},u.Bg=function(e,n,i){return Kut(this,e,n,i)},u.Dg=function(e,n,i){return Jut(this,e,n,i)},u.Fg=function(e){return Dat(this,e)},u.Mg=function(e,n){qlt(this,e,n)},u.Rg=function(){return Ic(),Tqt},u.Tf=function(){return!this.d&&(this.d=new pn(Xs,this,8,5)),this.d},u.Uf=function(){return!this.e&&(this.e=new pn(Xs,this,7,4)),this.e};var DWe=A(p0,"ElkConnectableShapeImpl",653);T(183,651,{95:1,379:1,105:1,253:1,183:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1},$S),u.jg=function(e){return $ut(this,e)},u.ug=function(e,n,i){switch(e){case 3:return rN(this);case 4:return!this.b&&(this.b=new pn(Si,this,4,7)),this.b;case 5:return!this.c&&(this.c=new pn(Si,this,5,8)),this.c;case 6:return!this.a&&(this.a=new Wt(os,this,6,6)),this.a;case 7:return me(),!this.b&&(this.b=new pn(Si,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new pn(Si,this,5,8)),this.c.i<=1));case 8:return me(),!!t4(this);case 9:return me(),!!Nm(this);case 10:return me(),!this.b&&(this.b=new pn(Si,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new pn(Si,this,5,8)),this.c.i!=0)}return Kat(this,e,n,i)},u.Bg=function(e,n,i){var r;switch(n){case 3:return this.Cb&&(i=(r=this.Db>>16,r>=0?$ut(this,i):this.Cb.Cg(this,-1-r,null,i))),mst(this,a(e,35),i);case 4:return!this.b&&(this.b=new pn(Si,this,4,7)),Kc(this.b,e,i);case 5:return!this.c&&(this.c=new pn(Si,this,5,8)),Kc(this.c,e,i);case 6:return!this.a&&(this.a=new Wt(os,this,6,6)),Kc(this.a,e,i)}return hX(this,e,n,i)},u.Dg=function(e,n,i){switch(n){case 3:return mst(this,null,i);case 4:return!this.b&&(this.b=new pn(Si,this,4,7)),$s(this.b,e,i);case 5:return!this.c&&(this.c=new pn(Si,this,5,8)),$s(this.c,e,i);case 6:return!this.a&&(this.a=new Wt(os,this,6,6)),$s(this.a,e,i)}return nq(this,e,n,i)},u.Fg=function(e){switch(e){case 3:return!!rN(this);case 4:return!!this.b&&this.b.i!=0;case 5:return!!this.c&&this.c.i!=0;case 6:return!!this.a&&this.a.i!=0;case 7:return!this.b&&(this.b=new pn(Si,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new pn(Si,this,5,8)),this.c.i<=1));case 8:return t4(this);case 9:return Nm(this);case 10:return!this.b&&(this.b=new pn(Si,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new pn(Si,this,5,8)),this.c.i!=0)}return Sat(this,e)},u.Mg=function(e,n){switch(e){case 3:SDt(this,a(n,35));return;case 4:!this.b&&(this.b=new pn(Si,this,4,7)),Dr(this.b),!this.b&&(this.b=new pn(Si,this,4,7)),Lr(this.b,a(n,13));return;case 5:!this.c&&(this.c=new pn(Si,this,5,8)),Dr(this.c),!this.c&&(this.c=new pn(Si,this,5,8)),Lr(this.c,a(n,13));return;case 6:!this.a&&(this.a=new Wt(os,this,6,6)),Dr(this.a),!this.a&&(this.a=new Wt(os,this,6,6)),Lr(this.a,a(n,13));return}nlt(this,e,n)},u.Rg=function(){return Ic(),Bvt},u.Ib=function(){return h7t(this)};var NWe=A(p0,"ElkEdgeImpl",183);T(405,1676,{95:1,379:1,270:1,405:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1},O3),u.jg=function(e){return Hut(this,e)},u.ug=function(e,n,i){switch(e){case 1:return this.j;case 2:return this.k;case 3:return this.b;case 4:return this.c;case 5:return!this.a&&(this.a=new Ss(sf,this,5)),this.a;case 6:return mAt(this);case 7:return n?qq(this):this.i;case 8:return n?Vq(this):this.f;case 9:return!this.g&&(this.g=new pn(os,this,9,10)),this.g;case 10:return!this.e&&(this.e=new pn(os,this,10,9)),this.e;case 11:return this.d}return Uut(this,e,n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 6:return this.Cb&&(i=(c=this.Db>>16,c>=0?Hut(this,i):this.Cb.Cg(this,-1-c,null,i))),bst(this,a(e,105),i);case 9:return!this.g&&(this.g=new pn(os,this,9,10)),Kc(this.g,e,i);case 10:return!this.e&&(this.e=new pn(os,this,10,9)),Kc(this.e,e,i)}return l=a(Ve((r=a(an(this,16),24),r||(Ic(),jF)),n),61),l.aj().dj(this,ra(this),n-ei((Ic(),jF)),e,i)},u.Dg=function(e,n,i){switch(n){case 5:return!this.a&&(this.a=new Ss(sf,this,5)),$s(this.a,e,i);case 6:return bst(this,null,i);case 9:return!this.g&&(this.g=new pn(os,this,9,10)),$s(this.g,e,i);case 10:return!this.e&&(this.e=new pn(os,this,10,9)),$s(this.e,e,i)}return vlt(this,e,n,i)},u.Fg=function(e){switch(e){case 1:return this.j!=0;case 2:return this.k!=0;case 3:return this.b!=0;case 4:return this.c!=0;case 5:return!!this.a&&this.a.i!=0;case 6:return!!mAt(this);case 7:return!!this.i;case 8:return!!this.f;case 9:return!!this.g&&this.g.i!=0;case 10:return!!this.e&&this.e.i!=0;case 11:return this.d!=null}return cct(this,e)},u.Mg=function(e,n){switch(e){case 1:EC(this,lt(Yt(n)));return;case 2:SC(this,lt(Yt(n)));return;case 3:MC(this,lt(Yt(n)));return;case 4:xC(this,lt(Yt(n)));return;case 5:!this.a&&(this.a=new Ss(sf,this,5)),Dr(this.a),!this.a&&(this.a=new Ss(sf,this,5)),Lr(this.a,a(n,13));return;case 6:Rbe(this,a(n,105));return;case 7:pat(this,a(n,97));return;case 8:dat(this,a(n,97));return;case 9:!this.g&&(this.g=new pn(os,this,9,10)),Dr(this.g),!this.g&&(this.g=new pn(os,this,9,10)),Lr(this.g,a(n,13));return;case 10:!this.e&&(this.e=new pn(os,this,10,9)),Dr(this.e),!this.e&&(this.e=new pn(os,this,10,9)),Lr(this.e,a(n,13));return;case 11:hPt(this,hi(n));return}Oat(this,e,n)},u.Rg=function(){return Ic(),jF},u.Ib=function(){return I9t(this)},u.b=0,u.c=0,u.d=null,u.j=0,u.k=0;var OWe=A(p0,"ElkEdgeSectionImpl",405);T(142,108,{95:1,91:1,87:1,139:1,51:1,103:1,42:1,92:1,142:1,107:1,108:1}),u.ug=function(e,n,i){var r;return e==0?(!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab):Xu(this,e-ei(this.Rg()),Ve((r=a(an(this,16),24),r||this.Rg()),e),n,i)},u.Bg=function(e,n,i){var r,c;return n==0?(!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i)):(c=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),c.aj().dj(this,ra(this),n-ei(this.Rg()),e,i))},u.Dg=function(e,n,i){var r,c;return n==0?(!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i)):(c=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),c.aj().ej(this,ra(this),n-ei(this.Rg()),e,i))},u.Fg=function(e){var n;return e==0?!!this.Ab&&this.Ab.i!=0:Vu(this,e-ei(this.Rg()),Ve((n=a(an(this,16),24),n||this.Rg()),e))},u.Ig=function(e){return Xht(this,e)},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return}Ku(this,e-ei(this.Rg()),Ve((i=a(an(this,16),24),i||this.Rg()),e),n)},u.Og=function(e){zC(this,128,e)},u.Rg=function(){return ye(),Xqt},u.Xg=function(){this.Bb|=1},u.Yg=function(e){return o4(this,e)},u.Bb=0;var BWe=A(Re,"EModelElementImpl",142);T(638,142,{95:1,91:1,87:1,430:1,139:1,51:1,103:1,42:1,92:1,142:1,107:1,108:1},T8),u.Zg=function(e,n){return B7t(this,e,n)},u.$g=function(e){var n,i,r,c,l;if(this.a!=Zu(e)||e.Bb&256)throw K(new yn(XY+e.zb+Gm));for(r=Bo(e);kc(r.a).i!=0;){if(i=a(OP(r,0,(n=a(at(kc(r.a),0),84),l=n.c,ct(l,96)?a(l,24):(ye(),gh))),24),Im(i))return c=Zu(i).dh().$g(i),a(c,42).Ng(e),c;r=Bo(i)}return(e.D!=null?e.D:e.B)=="java.util.Map$Entry"?new vCt(e):new Jst(e)},u._g=function(e,n){return Bm(this,e,n)},u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.a}return Xu(this,e-ei((ye(),pb)),Ve((r=a(an(this,16),24),r||pb),e),n,i)},u.Bg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 1:return this.a&&(i=a(this.a,42).Cg(this,4,of,i)),Vat(this,a(e,207),i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),pb)),n),61),c.aj().dj(this,ra(this),n-ei((ye(),pb)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 1:return Vat(this,null,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),pb)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),pb)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return!!this.a}return Vu(this,e-ei((ye(),pb)),Ve((n=a(an(this,16),24),n||pb),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:Tge(this,a(n,207));return}Ku(this,e-ei((ye(),pb)),Ve((i=a(an(this,16),24),i||pb),e),n)},u.Rg=function(){return ye(),pb};var AA,jvt,Pqt,FWe=A(Re,"EFactoryImpl",638);T(914,638,{95:1,1698:1,91:1,87:1,430:1,139:1,51:1,103:1,42:1,92:1,142:1,107:1,108:1},Pg),u.Zg=function(e,n){switch(e.Ni()){case 12:return a(n,166).Lf();case 13:return Yc(n);default:throw K(new yn(_E+e.be()+Gm))}},u.$g=function(e){var n,i,r,c,l,f,g,b;switch(e.G==-1&&(e.G=(n=Zu(e),n?Hp(n.bh(),e):-1)),e.G){case 4:return l=new VS,l;case 6:return f=new xit,f;case 7:return g=new Mit,g;case 8:return r=new $S,r;case 9:return i=new N3,i;case 10:return c=new O3,c;case 11:return b=new Fk,b;default:throw K(new yn(XY+e.zb+Gm))}},u._g=function(e,n){switch(e.Ni()){case 13:case 12:return null;default:throw K(new yn(_E+e.be()+Gm))}};var UWe=A(p0,"ElkGraphFactoryImpl",914);T(399,142,{95:1,91:1,87:1,139:1,174:1,51:1,103:1,42:1,92:1,142:1,107:1,108:1}),u.pg=function(){var e,n;return n=(e=a(an(this,16),24),tct(q1(e||this.Rg()))),n==null?(TT(),TT(),htt):new GSt(this,n)},u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.be()}return Xu(this,e-ei(this.Rg()),Ve((r=a(an(this,16),24),r||this.Rg()),e),n,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null}return Vu(this,e-ei(this.Rg()),Ve((n=a(an(this,16),24),n||this.Rg()),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:this.ah(hi(n));return}Ku(this,e-ei(this.Rg()),Ve((i=a(an(this,16),24),i||this.Rg()),e),n)},u.Rg=function(){return ye(),Zqt},u.be=function(){return this.zb},u.ah=function(e){kh(this,e)},u.Ib=function(){return DC(this)},u.zb=null;var zWe=A(Re,"ENamedElementImpl",399);T(248,399,{95:1,91:1,87:1,139:1,174:1,51:1,207:1,103:1,42:1,92:1,142:1,248:1,107:1,108:1,613:1},z4t),u.jg=function(e){return $Rt(this,e)},u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.yb;case 3:return this.xb;case 4:return this.sb;case 5:return!this.rb&&(this.rb=new Zv(this,cf,this)),this.rb;case 6:return!this.vb&&(this.vb=new mM(of,this,6,7)),this.vb;case 7:return n?this.Db>>16==7?a(this.Cb,207):null:bAt(this)}return Xu(this,e-ei((ye(),A0)),Ve((r=a(an(this,16),24),r||A0),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 4:return this.sb&&(i=a(this.sb,42).Cg(this,1,CA,i)),Xat(this,a(e,430),i);case 5:return!this.rb&&(this.rb=new Zv(this,cf,this)),Kc(this.rb,e,i);case 6:return!this.vb&&(this.vb=new mM(of,this,6,7)),Kc(this.vb,e,i);case 7:return this.Cb&&(i=(c=this.Db>>16,c>=0?$Rt(this,i):this.Cb.Cg(this,-1-c,null,i))),Lu(this,e,7,i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),A0)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),A0)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 4:return Xat(this,null,i);case 5:return!this.rb&&(this.rb=new Zv(this,cf,this)),$s(this.rb,e,i);case 6:return!this.vb&&(this.vb=new mM(of,this,6,7)),$s(this.vb,e,i);case 7:return Lu(this,null,7,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),A0)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),A0)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.yb!=null;case 3:return this.xb!=null;case 4:return!!this.sb;case 5:return!!this.rb&&this.rb.i!=0;case 6:return!!this.vb&&this.vb.i!=0;case 7:return!!bAt(this)}return Vu(this,e-ei((ye(),A0)),Ve((n=a(an(this,16),24),n||A0),e))},u.Ig=function(e){var n;return n=Hbe(this,e),n||Xht(this,e)},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:kh(this,hi(n));return;case 2:VV(this,hi(n));return;case 3:$V(this,hi(n));return;case 4:_lt(this,a(n,430));return;case 5:!this.rb&&(this.rb=new Zv(this,cf,this)),Dr(this.rb),!this.rb&&(this.rb=new Zv(this,cf,this)),Lr(this.rb,a(n,13));return;case 6:!this.vb&&(this.vb=new mM(of,this,6,7)),Dr(this.vb),!this.vb&&(this.vb=new mM(of,this,6,7)),Lr(this.vb,a(n,13));return}Ku(this,e-ei((ye(),A0)),Ve((i=a(an(this,16),24),i||A0),e),n)},u.Rg=function(){return ye(),A0},u.Xg=function(){iX(this)},u.bh=function(){return!this.rb&&(this.rb=new Zv(this,cf,this)),this.rb},u.dh=function(){return this.sb},u.eh=function(){return this.ub},u.fh=function(){return this.xb},u.gh=function(){return this.yb},u.hh=function(e){this.ub=e},u.Ib=function(){var e;return this.Db&64?DC(this):(e=new ul(DC(this)),e.a+=" (nsURI: ",mo(e,this.yb),e.a+=", nsPrefix: ",mo(e,this.xb),e.a+=")",e.a)},u.xb=null,u.yb=null;var Iqt,jWe=A(Re,"EPackageImpl",248);T(506,248,{95:1,1702:1,506:1,91:1,87:1,139:1,174:1,51:1,207:1,103:1,42:1,92:1,142:1,248:1,107:1,108:1,613:1},q9t),u.q=!1,u.r=!1;var Rqt=!1,HWe=A(p0,"ElkGraphPackageImpl",506);T(263,652,{95:1,379:1,253:1,137:1,429:1,263:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1},VS),u.jg=function(e){return Gut(this,e)},u.ug=function(e,n,i){switch(e){case 7:return wAt(this);case 8:return this.a}return out(this,e,n,i)},u.Bg=function(e,n,i){var r;switch(n){case 7:return this.Cb&&(i=(r=this.Db>>16,r>=0?Gut(this,i):this.Cb.Cg(this,-1-r,null,i))),dot(this,a(e,253),i)}return hX(this,e,n,i)},u.Dg=function(e,n,i){return n==7?dot(this,null,i):nq(this,e,n,i)},u.Fg=function(e){switch(e){case 7:return!!wAt(this);case 8:return!le("",this.a)}return hut(this,e)},u.Mg=function(e,n){switch(e){case 7:IDt(this,a(n,253));return;case 8:rPt(this,hi(n));return}ilt(this,e,n)},u.Rg=function(){return Ic(),Fvt},u.Ib=function(){return B8t(this)},u.a="";var GWe=A(p0,"ElkLabelImpl",263);T(246,653,{95:1,379:1,97:1,253:1,35:1,429:1,246:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1},xit),u.jg=function(e){return Xut(this,e)},u.ug=function(e,n,i){switch(e){case 9:return!this.c&&(this.c=new Wt(Rl,this,9,9)),this.c;case 10:return!this.a&&(this.a=new Wt(zr,this,10,11)),this.a;case 11:return io(this);case 12:return!this.b&&(this.b=new Wt(Xs,this,12,3)),this.b;case 13:return me(),!this.a&&(this.a=new Wt(zr,this,10,11)),this.a.i>0}return Put(this,e,n,i)},u.Bg=function(e,n,i){var r;switch(n){case 9:return!this.c&&(this.c=new Wt(Rl,this,9,9)),Kc(this.c,e,i);case 10:return!this.a&&(this.a=new Wt(zr,this,10,11)),Kc(this.a,e,i);case 11:return this.Cb&&(i=(r=this.Db>>16,r>=0?Xut(this,i):this.Cb.Cg(this,-1-r,null,i))),Tst(this,a(e,35),i);case 12:return!this.b&&(this.b=new Wt(Xs,this,12,3)),Kc(this.b,e,i)}return Kut(this,e,n,i)},u.Dg=function(e,n,i){switch(n){case 9:return!this.c&&(this.c=new Wt(Rl,this,9,9)),$s(this.c,e,i);case 10:return!this.a&&(this.a=new Wt(zr,this,10,11)),$s(this.a,e,i);case 11:return Tst(this,null,i);case 12:return!this.b&&(this.b=new Wt(Xs,this,12,3)),$s(this.b,e,i)}return Jut(this,e,n,i)},u.Fg=function(e){switch(e){case 9:return!!this.c&&this.c.i!=0;case 10:return!!this.a&&this.a.i!=0;case 11:return!!io(this);case 12:return!!this.b&&this.b.i!=0;case 13:return!this.a&&(this.a=new Wt(zr,this,10,11)),this.a.i>0}return Dat(this,e)},u.Mg=function(e,n){switch(e){case 9:!this.c&&(this.c=new Wt(Rl,this,9,9)),Dr(this.c),!this.c&&(this.c=new Wt(Rl,this,9,9)),Lr(this.c,a(n,13));return;case 10:!this.a&&(this.a=new Wt(zr,this,10,11)),Dr(this.a),!this.a&&(this.a=new Wt(zr,this,10,11)),Lr(this.a,a(n,13));return;case 11:CDt(this,a(n,35));return;case 12:!this.b&&(this.b=new Wt(Xs,this,12,3)),Dr(this.b),!this.b&&(this.b=new Wt(Xs,this,12,3)),Lr(this.b,a(n,13));return}qlt(this,e,n)},u.Rg=function(){return Ic(),Uvt},u.Ib=function(){return vht(this)};var WWe=A(p0,"ElkNodeImpl",246);T(187,653,{95:1,379:1,97:1,253:1,121:1,429:1,187:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1},Mit),u.jg=function(e){return Wut(this,e)},u.ug=function(e,n,i){return e==9?Tf(this):Put(this,e,n,i)},u.Bg=function(e,n,i){var r;switch(n){case 9:return this.Cb&&(i=(r=this.Db>>16,r>=0?Wut(this,i):this.Cb.Cg(this,-1-r,null,i))),wst(this,a(e,35),i)}return Kut(this,e,n,i)},u.Dg=function(e,n,i){return n==9?wst(this,null,i):Jut(this,e,n,i)},u.Fg=function(e){return e==9?!!Tf(this):Dat(this,e)},u.Mg=function(e,n){switch(e){case 9:TDt(this,a(n,35));return}qlt(this,e,n)},u.Rg=function(){return Ic(),zvt},u.Ib=function(){return _Nt(this)};var $We=A(p0,"ElkPortImpl",187),Dqt=Sr(qs,"BasicEMap/Entry");T(966,108,{95:1,38:1,91:1,87:1,134:1,51:1,103:1,42:1,92:1,107:1,108:1},Fk),u.Fb=function(e){return this===e},u.kc=function(){return this.b},u.Hb=function(){return lm(this)},u.kh=function(e){iPt(this,a(e,166))},u.ug=function(e,n,i){switch(e){case 0:return this.b;case 1:return this.c}return g7(this,e,n,i)},u.Fg=function(e){switch(e){case 0:return!!this.b;case 1:return this.c!=null}return Hq(this,e)},u.Mg=function(e,n){switch(e){case 0:iPt(this,a(n,166));return;case 1:nPt(this,n);return}P7(this,e,n)},u.Rg=function(){return Ic(),pp},u.ih=function(){var e;return this.a==-1&&(e=this.b,this.a=e?Yr(e):0),this.a},u.lc=function(){return this.c},u.jh=function(e){this.a=e},u.mc=function(e){var n;return n=this.c,nPt(this,e),n},u.Ib=function(){var e;return this.Db&64?nh(this):(e=new om,Ii(Ii(Ii(e,this.b?this.b.Lf():tu)," -> "),$T(this.c)),e.a)},u.a=-1,u.c=null;var ug=A(p0,"ElkPropertyToValueMapEntryImpl",966);T(876,1,{},Sz);var VWe=A(Ds,"JsonAdapter",876);T(186,54,rp,xf);var qWe=A(Ds,"JsonImportException",186);T(754,1,{},r8t);var XWe=A(Ds,"JsonImporter",754);T(792,1,{},nEt);var ZWe=A(Ds,"JsonImporter/lambda$0$Type",792);T(793,1,{},iEt);var YWe=A(Ds,"JsonImporter/lambda$1$Type",793);T(816,1,{},u9);var KWe=A(Ds,"JsonImporter/lambda$10$Type",816);T(818,1,{},KH);var JWe=A(Ds,"JsonImporter/lambda$11$Type",818);T(819,1,{},rEt),u.td=function(e){Qce(this.b,this.a,e)};var QWe=A(Ds,"JsonImporter/lambda$12$Type",819);T(820,1,{},sEt);var t$e=A(Ds,"JsonImporter/lambda$13$Type",820);T(821,1,{},oEt);var e$e=A(Ds,"JsonImporter/lambda$14$Type",821);T(822,1,{},JH);var n$e=A(Ds,"JsonImporter/lambda$15$Type",822);T(823,1,{},QH);var i$e=A(Ds,"JsonImporter/lambda$16$Type",823);T(824,1,{},tG);var r$e=A(Ds,"JsonImporter/lambda$17$Type",824);T(825,1,{},i2);var s$e=A(Ds,"JsonImporter/lambda$18$Type",825);T(756,1,{},eG);var o$e=A(Ds,"JsonImporter/lambda$19$Type",756);T(794,1,{},nG);var c$e=A(Ds,"JsonImporter/lambda$2$Type",794);T(829,1,{},XTt);var a$e=A(Ds,"JsonImporter/lambda$20$Type",829);T(830,1,{},iG),u.td=function(e){tae(this.a,e)};var u$e=A(Ds,"JsonImporter/lambda$21$Type",830);T(795,1,{},rG);var l$e=A(Ds,"JsonImporter/lambda$22$Type",795);T(796,1,{},sG);var h$e=A(Ds,"JsonImporter/lambda$23$Type",796);T(798,1,{},l9);var f$e=A(Ds,"JsonImporter/lambda$24$Type",798);T(799,1,{},h9);var d$e=A(Ds,"JsonImporter/lambda$25$Type",799);T(801,1,{},oG);var p$e=A(Ds,"JsonImporter/lambda$26$Type",801);T(809,1,{},A4t);var g$e=A(Ds,"JsonImporter/lambda$27$Type",809);T(811,1,{},cG);var m$e=A(Ds,"JsonImporter/lambda$28$Type",811);T(812,1,{},aG);var b$e=A(Ds,"JsonImporter/lambda$29$Type",812);T(797,1,{},uG);var w$e=A(Ds,"JsonImporter/lambda$3$Type",797);T(814,1,{},lG);var v$e=A(Ds,"JsonImporter/lambda$30$Type",814);T(815,1,{},hG);var _$e=A(Ds,"JsonImporter/lambda$31$Type",815);T(817,1,{},fG);var y$e=A(Ds,"JsonImporter/lambda$32$Type",817);T(826,1,{},dG),u.td=function(e){eae(this.a,e)};var x$e=A(Ds,"JsonImporter/lambda$33$Type",826);T(827,1,{},cEt),u.td=function(e){Pte(this.a,this.b,e)};var M$e=A(Ds,"JsonImporter/lambda$34$Type",827);T(828,1,{},aEt),u.td=function(e){Ite(this.a,this.b,e)};var E$e=A(Ds,"JsonImporter/lambda$35$Type",828);T(805,1,{},uEt);var S$e=A(Ds,"JsonImporter/lambda$36$Type",805);T(806,1,{},lEt);var T$e=A(Ds,"JsonImporter/lambda$37$Type",806);T(807,1,{},dEt);var C$e=A(Ds,"JsonImporter/lambda$38$Type",807);T(808,1,{},pEt);var A$e=A(Ds,"JsonImporter/lambda$39$Type",808);T(800,1,{},pG);var k$e=A(Ds,"JsonImporter/lambda$4$Type",800);T(802,1,{},gG);var L$e=A(Ds,"JsonImporter/lambda$5$Type",802);T(803,1,{},hEt);var P$e=A(Ds,"JsonImporter/lambda$6$Type",803);T(804,1,{},fEt);var I$e=A(Ds,"JsonImporter/lambda$7$Type",804);T(810,1,{},k4t);var R$e=A(Ds,"JsonImporter/lambda$8$Type",810);T(813,1,{},mG);var D$e=A(Ds,"JsonImporter/lambda$9$Type",813);T(864,1,{},bG),u.td=function(e){C2(this.a,new S2(hi(e)))};var N$e=A(Ds,"JsonMetaDataConverter/lambda$0$Type",864);T(865,1,{},wG),u.td=function(e){Ese(this.a,e)};var O$e=A(Ds,"JsonMetaDataConverter/lambda$1$Type",865);T(866,1,{},vG),u.td=function(e){Noe(this.a,e)};var B$e=A(Ds,"JsonMetaDataConverter/lambda$2$Type",866);T(867,1,{},_G),u.td=function(e){Mse(this.a,e)};var F$e=A(Ds,"JsonMetaDataConverter/lambda$3$Type",867);T(229,23,{3:1,34:1,23:1,229:1},_2);var HF,GF,rtt,WF,$F,VF,stt,ott,qF=Ri(XP,"GraphFeature",229,ji,Due,cre),Nqt;T(16,1,{34:1,166:1},kr,es,bn,xc),u.vd=function(e){return hee(this,a(e,166))},u.Fb=function(e){return j4t(this,e)},u.Of=function(){return Xe(this)},u.Lf=function(){return this.b},u.Hb=function(){return j1(this.b)},u.Ib=function(){return this.b};var U$e=A(XP,"Property",16);T(727,1,jr,f9),u.Ld=function(e,n){return jhe(this,a(e,93),a(n,93))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var z$e=A(XP,"PropertyHolderComparator",727),Hvt=Sr(qs,"EList");T(59,41,{20:1,25:1,41:1,13:1,15:1,59:1,52:1}),u.bd=function(e,n){QL(this,e,n)},u.nc=function(e){return ni(this,e)},u.oc=function(e){return Lr(this,e)},u.oh=function(){return new M2(this)},u.ph=function(){return new tL(this)},u.qh=function(e){return HL(this,e)},u.rh=function(){return!0},u.sh=function(e,n){},u.th=function(){},u.uh=function(e,n){wV(this,e,n)},u.vh=function(e,n){},u.wh=function(e,n,i){},u.Fb=function(e){return rNt(this,e)},u.Hb=function(){return Aat(this)},u.xh=function(){return!1},u.tc=function(){return new $n(this)},u.ed=function(){return new ZT(this)},u.fd=function(e){var n;if(n=this._b(),e<0||e>n)throw K(new $v(e,n));return new A$(this,e)},u.vc=function(e){return kV(this,e)},u.zh=function(e,n){return n},u.hd=function(e,n){return G2(this,e,n)},u.Ib=function(){return aut(this)},u.Bh=function(){return!0},u.Ch=function(e,n){return LC(this,n)};var j$e=A(qs,"AbstractEList",59);T(55,59,Nf,J0,i_,xat),u.lh=function(e){return IRt(this,e)},u.mh=function(e,n){eP(this,e,n)},u.nh=function(e){TL(this,e)},u.Dh=function(e){return Gct(this,e)},u.Pb=function(){mC(this)},u.pc=function(e){return ZC(this,e)},u.cd=function(e){return at(this,e)},u.Eh=function(e){eRt(this,e)},u.dd=function(e){return WRt(this,e)},u.Wb=function(){return this.i==0},u.Fh=function(e){return dt(un,te,1,e,5,1)},u.yh=function(e){return this.g[e]},u.gd=function(e){return W2(this,e)},u.Ah=function(e,n){return AV(this,e,n)},u._b=function(){return this.i},u.yc=function(){return hct(this)},u.zc=function(e){return put(this,e)},u.i=0;var Gvt=A(qs,"BasicEList",55),Wvt=Sr(qs,"TreeIterator");T(629,55,iK),u.gc=function(e){ks(this,e)},u.hc=function(){return this.g==null&&!this.c?Got(this):this.g==null||this.i!=0&&a(this.g[this.i-1],43).hc()},u.ic=function(){return D7(this)},u.jc=function(){if(!this.e)throw K(new yc("There is no valid object to remove."));this.e.jc()},u.c=!1;var H$e=A(qs,"AbstractTreeIterator",629);T(621,629,iK,Drt),u.Gh=function(e){var n;return n=a(e,51).pg().tc(),ct(n,260)&&a(n,260).Zj(new IR),n};var G$e=A(rK,"ElkGraphUtil/PropertiesSkippingTreeIterator",621);T(868,1,{},IR);var W$e=A(rK,"ElkGraphUtil/PropertiesSkippingTreeIterator/1",868),wI,ctt,vI=A(rK,"ElkReflect",null);T(784,1,j_,qS),u.Nf=function(e){return gN(),Bae(a(e,185))};var $$e=A(rK,"ElkReflect/lambda$0$Type",784),Ow,V$e=Sr(qs,"ResourceLocator");T(953,1,{});var q$e=A(qs,"DelegatingResourceLocator",953);T(954,953,{});var X$e=A("org.eclipse.emf.common","EMFPlugin",954),att=Sr(mUt,"Adapter"),tMe=Sr(mUt,"Notification");T(1016,1,Zpt),u.Hh=function(){return this.d},u.Ih=function(e){},u.Jh=function(e){this.d=e},u.Kh=function(e){this.d==e&&(this.d=null)},u.d=null;var Z$e=A(dx,"AdapterImpl",1016);T(1688,59,bUt),u.lh=function(e){var n,i,r;if(++this.j,e.Wb())return!1;for(n=this.hi(),r=e.tc();r.hc();)i=r.ic(),this.Wh(this.Ch(n,i)),++n;return!0},u.mh=function(e,n){nTt(this,e,n)},u.nh=function(e){r4t(this,e)},u.Uh=function(){return this.Xh()},u.Pb=function(){sL(this,this.hi(),this.ii())},u.pc=function(e){return this.Zh(e)},u.qc=function(e){return this.$h(e)},u.Vh=function(e,n){this.ei().tl()},u.Wh=function(e){this.ei().tl()},u.Xh=function(){return this.ei()},u.Yh=function(){this.ei().tl()},u.Zh=function(e){return this.ei().tl()},u.$h=function(e){return this.ei().tl()},u._h=function(e){return this.ei().tl()},u.ai=function(e){return this.ei().tl()},u.bi=function(){return this.ei().tl()},u.ci=function(e){return this.ei().tl()},u.di=function(){return this.ei().tl()},u.fi=function(e){return this.ei().tl()},u.gi=function(e,n){return this.ei().tl()},u.hi=function(){return this.ei().tl()},u.ii=function(){return this.ei().tl()},u.ji=function(e){return this.ei().tl()},u.ki=function(){return this.ei().tl()},u.Fb=function(e){return this._h(e)},u.cd=function(e){return this.zh(e,this.ai(e))},u.Hb=function(){return this.bi()},u.dd=function(e){return this.ci(e)},u.Wb=function(){return this.di()},u.yh=function(e){return this.ai(e)},u.gd=function(e){return OD(this,e)},u.vc=function(e){var n;return n=this.dd(e),n>=0?(this.gd(n),!0):!1},u.Ah=function(e,n){return this.gi(e,this.Ch(e,n))},u._b=function(){return this.hi()},u.yc=function(){return this.ii()},u.zc=function(e){return this.ji(e)},u.Ib=function(){return this.ki()};var Y$e=A(qs,"DelegatingEList",1688);T(1689,1688,bUt),u.li=function(e,n){return Lht(this,e,n)},u.lh=function(e){return this.li(this.hi(),e)},u.mh=function(e,n){X9t(this,e,n)},u.nh=function(e){z9t(this,e)},u.rh=function(){return!this.qi()},u.Pb=function(){Y7(this)},u.mi=function(e,n,i,r,c){return new Y4t(this,e,n,i,r,c)},u.ni=function(e){Bi(this.Oh(),e)},u.oi=function(){return null},u.pi=function(){return-1},u.Oh=function(){return null},u.qi=function(){return!1},u.ri=function(e,n){return n},u.si=function(e,n){return n},u.ti=function(){return!1},u.ui=function(){return!this.di()},u.gd=function(e){var n,i,r,c;return this.ti()?(r=this.ui(),n=this.mi(4,c=OD(this,e),null,e,r),this.qi()&&c?(i=this.si(c,null),i?(i.Sh(n),i.Th()):this.ni(n)):this.ni(n),c):(c=OD(this,e),this.qi()&&c&&(i=this.si(c,null),i&&i.Th()),c)},u.Ah=function(e,n){return zNt(this,e,n)};var K$e=A(dx,"DelegatingNotifyingListImpl",1689);T(136,1,c6),u.Sh=function(e){return olt(this,e)},u.Th=function(){SV(this)},u.Lh=function(){return this.d},u.oi=function(){return null},u.vi=function(){return null},u.Mh=function(e){return-1},u.Nh=function(){return ODt(this)},u.Oh=function(){return null},u.Ph=function(){return sht(this)},u.Qh=function(){return this.o<0?this.o<-2?-2-this.o-1:-1:this.o},u.wi=function(){return!1},u.Rh=function(e){var n,i,r,c,l,f,g,b,v,M,k;switch(this.d){case 1:case 2:switch(c=e.Lh(),c){case 1:case 2:if(l=e.Oh(),zt(l)===zt(this.Oh())&&this.Mh(null)==e.Mh(null))return this.g=e.Nh(),e.Lh()==1&&(this.d=1),!0}case 4:{switch(c=e.Lh(),c){case 4:{if(l=e.Oh(),zt(l)===zt(this.Oh())&&this.Mh(null)==e.Mh(null))return v=Ght(this),b=this.o<0?this.o<-2?-2-this.o-1:-1:this.o,f=e.Qh(),this.d=6,k=new i_(2),b<=f?(ni(k,this.n),ni(k,e.Ph()),this.g=Y(Z(Gn,1),pi,22,15,[this.o=b,f+1])):(ni(k,e.Ph()),ni(k,this.n),this.g=Y(Z(Gn,1),pi,22,15,[this.o=f,b])),this.n=k,v||(this.o=-2-this.o-1),!0;break}}break}case 6:{switch(c=e.Lh(),c){case 4:{if(l=e.Oh(),zt(l)===zt(this.Oh())&&this.Mh(null)==e.Mh(null)){for(v=Ght(this),f=e.Qh(),M=a(this.g,37),r=dt(Gn,pi,22,M.length+1,15,1),n=0;n>>0).toString(16)),i.a+=" (eventType: ",this.d){case 1:{i.a+="SET";break}case 2:{i.a+="UNSET";break}case 3:{i.a+="ADD";break}case 5:{i.a+="ADD_MANY";break}case 4:{i.a+="REMOVE";break}case 6:{i.a+="REMOVE_MANY";break}case 7:{i.a+="MOVE";break}case 8:{i.a+="REMOVING_ADAPTER";break}case 9:{i.a+="RESOLVE";break}default:{ZG(i,this.d);break}}if(TNt(this)&&(i.a+=", touch: true"),i.a+=", position: ",ZG(i,this.o<0?this.o<-2?-2-this.o-1:-1:this.o),i.a+=", notifier: ",IT(i,this.Oh()),i.a+=", feature: ",IT(i,this.oi()),i.a+=", oldValue: ",IT(i,sht(this)),i.a+=", newValue: ",this.d==6&&ct(this.g,37)){for(n=a(this.g,37),i.a+="[",e=0;e10?((!this.b||this.c.j!=this.a)&&(this.b=new dL(this),this.a=this.j),kT(this.b,e)):ZC(this,e)},u.Bh=function(){return!0},u.a=0;var rVe=A(qs,"AbstractEList/1",869);T(295,79,zZ,$v);var sVe=A(qs,"AbstractEList/BasicIndexOutOfBoundsException",295);T(36,1,Cs,$n),u.gc=function(e){ks(this,e)},u.Bi=function(){if(this.i.j!=this.f)throw K(new C)},u.Ci=function(){return ci(this)},u.hc=function(){return this.e!=this.i._b()},u.ic=function(){return this.Ci()},u.jc=function(){qC(this)},u.e=0,u.f=0,u.g=-1;var oVe=A(qs,"AbstractEList/EIterator",36);T(296,36,kf,ZT,A$),u.jc=function(){qC(this)},u.Bc=function(e){TIt(this,e)},u.Di=function(){var e;try{return e=this.d.cd(--this.e),this.Bi(),this.g=this.e,e}catch(n){throw n=vr(n),ct(n,79)?(this.Bi(),K(new J)):K(n)}},u.Ei=function(e){MRt(this,e)},u.Cc=function(){return this.e!=0},u.Dc=function(){return this.e},u.Ec=function(){return this.Di()},u.Fc=function(){return this.e-1},u.Gc=function(e){this.Ei(e)};var cVe=A(qs,"AbstractEList/EListIterator",296);T(324,36,Cs,M2),u.Ci=function(){return Fq(this)},u.jc=function(){throw K(new Oi)};var aVe=A(qs,"AbstractEList/NonResolvingEIterator",324);T(355,296,kf,tL,Fst),u.Bc=function(e){throw K(new Oi)},u.Ci=function(){var e;try{return e=this.c.yh(this.e),this.Bi(),this.g=this.e++,e}catch(n){throw n=vr(n),ct(n,79)?(this.Bi(),K(new J)):K(n)}},u.Di=function(){var e;try{return e=this.c.yh(--this.e),this.Bi(),this.g=this.e,e}catch(n){throw n=vr(n),ct(n,79)?(this.Bi(),K(new J)):K(n)}},u.jc=function(){throw K(new Oi)},u.Gc=function(e){throw K(new Oi)};var uVe=A(qs,"AbstractEList/NonResolvingEListIterator",355);T(1673,59,wUt),u.lh=function(e){var n,i,r,c,l,f,g,b,v;if(r=e._b(),r!=0){for(b=(i=a(an(this.a,4),116),i==null?0:i.length),v=b+r,n=zat(this,v),g=e.tc(),l=b;li)throw K(new $v(e,i));return new m4t(this,e)},u.Pb=function(){var e,n;++this.j,e=a(an(this.a,4),116),n=e==null?0:e.length,lP(this,null),wV(this,n,e)},u.pc=function(e){var n,i,r,c;if(n=a(an(this.a,4),116),n!=null){if(e!=null){for(r=0,c=n.length;r=i)throw K(new $v(e,i));return n[e]},u.dd=function(e){var n,i,r;if(n=a(an(this.a,4),116),n!=null){if(e!=null){for(i=0,r=n.length;ii)throw K(new $v(e,i));return new g4t(this,e)},u.yh=function(e){return a(an(this.a,4),116)[e]},u.gd=function(e){return ame(this,e)},u.Ah=function(e,n){var i,r;return i=qfe(this),r=i[e],zrt(i,e,LC(this,n)),lP(this,i),r},u._b=function(){var e;return e=a(an(this.a,4),116),e==null?0:e.length},u.yc=function(){var e,n,i;return e=a(an(this.a,4),116),i=e==null?0:e.length,n=dt(att,aK,380,i,0,1),i>0&&Aa(e,0,n,0,i),n},u.zc=function(e){var n,i,r;return n=a(an(this.a,4),116),r=n==null?0:n.length,r>0&&(e.lengthr&&Vr(e,r,null),e};var Oqt,lVe=A(qs,"ArrayDelegatingEList",1673);T(927,36,Cs,Kkt),u.Bi=function(){if(this.b.j!=this.f||zt(a(an(this.b.a,4),116))!==zt(this.a))throw K(new C)},u.jc=function(){qC(this),this.a=a(an(this.b.a,4),116)};var hVe=A(qs,"ArrayDelegatingEList/EIterator",927);T(640,296,kf,jCt,g4t),u.Bi=function(){if(this.b.j!=this.f||zt(a(an(this.b.a,4),116))!==zt(this.a))throw K(new C)},u.Ei=function(e){MRt(this,e),this.a=a(an(this.b.a,4),116)},u.jc=function(){qC(this),this.a=a(an(this.b.a,4),116)};var fVe=A(qs,"ArrayDelegatingEList/EListIterator",640);T(928,324,Cs,Jkt),u.Bi=function(){if(this.b.j!=this.f||zt(a(an(this.b.a,4),116))!==zt(this.a))throw K(new C)};var dVe=A(qs,"ArrayDelegatingEList/NonResolvingEIterator",928);T(641,355,kf,HCt,m4t),u.Bi=function(){if(this.b.j!=this.f||zt(a(an(this.b.a,4),116))!==zt(this.a))throw K(new C)};var pVe=A(qs,"ArrayDelegatingEList/NonResolvingEListIterator",641);T(549,295,zZ,kW);var gVe=A(qs,"BasicEList/BasicIndexOutOfBoundsException",549);T(630,55,Nf,Crt),u.bd=function(e,n){throw K(new Oi)},u.nc=function(e){throw K(new Oi)},u.oc=function(e){throw K(new Oi)},u.Pb=function(){throw K(new Oi)},u.Eh=function(e){throw K(new Oi)},u.tc=function(){return this.oh()},u.ed=function(){return this.ph()},u.fd=function(e){return this.qh(e)},u.gd=function(e){throw K(new Oi)},u.vc=function(e){throw K(new Oi)},u.hd=function(e,n){throw K(new Oi)};var mVe=A(qs,"BasicEList/UnmodifiableEList",630);T(639,1,{3:1,20:1,13:1,15:1,52:1,533:1}),u.bd=function(e,n){gee(this,e,a(n,38))},u.nc=function(e){return Zee(this,a(e,38))},u.sc=function(e){vo(this,e)},u.cd=function(e){return a(at(this.c,e),134)},u.uc=function(){return this.xc()},u.gd=function(e){return a(this.c.gd(e),38)},u.hd=function(e,n){return bse(this,e,a(n,38))},u.jd=function(e){D1(this,e)},u.wc=function(){return new Ei(this,16)},u.xc=function(){return new gi(null,this.wc())},u.oc=function(e){return this.c.oc(e)},u.Pb=function(){this.c.Pb()},u.pc=function(e){return this.c.pc(e)},u.qc=function(e){return O1(this.c,e)},u.Fi=function(){var e,n,i;if(this.d==null){for(this.d=dt(Gvt,Ypt,55,2*this.f+1,0,1),i=this.e,this.f=0,n=this.c.tc();n.e!=n.i._b();)e=a(n.Ci(),134),m7(this,e);this.e=i}},u.Fb=function(e){return FTt(this,e)},u.Hb=function(){return Aat(this.c)},u.dd=function(e){return this.c.dd(e)},u.Gi=function(){this.c=new yG(this)},u.Wb=function(){return this.f==0},u.tc=function(){return this.c.tc()},u.ed=function(){return this.c.ed()},u.fd=function(e){return this.c.fd(e)},u.Hi=function(){return AL(this)},u.Ii=function(e,n,i){return new ZTt(e,n,i)},u.Ji=function(){return new Cz},u.vc=function(e){return YLt(this,e)},u._b=function(){return this.f},u.kd=function(e,n){return new C1(this.c,e,n)},u.yc=function(){return this.c.yc()},u.zc=function(e){return this.c.zc(e)},u.Ib=function(){return aut(this.c)},u.e=0,u.f=0;var bVe=A(qs,"BasicEMap",639);T(922,55,Nf,yG),u.sh=function(e,n){ee(this,a(n,134))},u.vh=function(e,n){fe(this,a(n,134))},u.wh=function(e,n,i){Hee(this,a(n,134),a(i,134))},u.uh=function(e,n){VPt(this.a)};var wVe=A(qs,"BasicEMap/1",922);T(923,55,Nf,Cz),u.Fh=function(e){return dt(eMe,vUt,551,e,0,1)};var vVe=A(qs,"BasicEMap/2",923);T(924,bd,vl,xG),u.Pb=function(){this.a.c.Pb()},u.pc=function(e){return Rq(this.a,e)},u.tc=function(){return this.a.f==0?(KT(),_I.a):new y3t(this.a)},u.vc=function(e){var n;return n=this.a.f,aP(this.a,e),this.a.f!=n},u._b=function(){return this.a.f};var _Ve=A(qs,"BasicEMap/3",924);T(925,25,D_,MG),u.Pb=function(){this.a.c.Pb()},u.pc=function(e){return cNt(this.a,e)},u.tc=function(){return this.a.f==0?(KT(),_I.a):new x3t(this.a)},u._b=function(){return this.a.f};var yVe=A(qs,"BasicEMap/4",925);T(926,bd,vl,EG),u.Pb=function(){this.a.c.Pb()},u.pc=function(e){var n,i,r,c,l,f,g,b,v;if(this.a.f>0&&ct(e,38)&&(this.a.Fi(),b=a(e,38),g=b.kc(),c=g==null?0:Yr(g),l=vst(this.a,c),n=this.a.d[l],n)){for(i=a(n.g,339),v=n.i,f=0;f"+this.c},u.a=0;var eMe=A(qs,"BasicEMap/EntryImpl",551);T(484,1,{},Ky);var CVe=A(qs,"BasicEMap/View",484),_I;T(695,1,{}),u.Fb=function(e){return jlt((we(),fo),e)},u.Hb=function(){return Nat((we(),fo))},u.Ib=function(){return Gp((we(),fo))};var AVe=A(qs,"ECollections/BasicEmptyUnmodifiableEList",695);T(1164,1,kf,Az),u.gc=function(e){ks(this,e)},u.Bc=function(e){throw K(new Oi)},u.hc=function(){return!1},u.Cc=function(){return!1},u.ic=function(){throw K(new J)},u.Dc=function(){return 0},u.Ec=function(){throw K(new J)},u.Fc=function(){return-1},u.jc=function(){throw K(new Oi)},u.Gc=function(e){throw K(new Oi)};var kVe=A(qs,"ECollections/BasicEmptyUnmodifiableEList/1",1164);T(1162,695,{20:1,13:1,15:1,52:1},Txt),u.bd=function(e,n){Xxt()},u.nc=function(e){return Zxt()},u.oc=function(e){return Yxt()},u.Pb=function(){Kxt()},u.pc=function(e){return!1},u.qc=function(e){return!1},u.sc=function(e){vo(this,e)},u.cd=function(e){return Irt((we(),e)),null},u.dd=function(e){return-1},u.Wb=function(){return!0},u.tc=function(){return this.a},u.ed=function(){return this.a},u.fd=function(e){return this.a},u.uc=function(){return this.xc()},u.gd=function(e){return Jxt()},u.vc=function(e){return Qxt()},u.hd=function(e,n){return t3t()},u._b=function(){return 0},u.jd=function(e){D1(this,e)},u.wc=function(){return new Ei(this,16)},u.xc=function(){return new gi(null,this.wc())},u.kd=function(e,n){return we(),new C1(fo,e,n)},u.yc=function(){return y$((we(),fo))},u.zc=function(e){return we(),hP(fo,e)};var LVe=A(qs,"ECollections/EmptyUnmodifiableEList",1162);T(1163,695,{20:1,13:1,15:1,52:1,533:1},Sxt),u.bd=function(e,n){Xxt()},u.nc=function(e){return Zxt()},u.oc=function(e){return Yxt()},u.Pb=function(){Kxt()},u.pc=function(e){return!1},u.qc=function(e){return!1},u.sc=function(e){vo(this,e)},u.cd=function(e){return Irt((we(),e)),null},u.dd=function(e){return-1},u.Wb=function(){return!0},u.tc=function(){return this.a},u.ed=function(){return this.a},u.fd=function(e){return this.a},u.uc=function(){return this.xc()},u.gd=function(e){return Jxt()},u.vc=function(e){return Qxt()},u.hd=function(e,n){return t3t()},u._b=function(){return 0},u.jd=function(e){D1(this,e)},u.wc=function(){return new Ei(this,16)},u.xc=function(){return new gi(null,this.wc())},u.kd=function(e,n){return we(),new C1(fo,e,n)},u.yc=function(){return y$((we(),fo))},u.zc=function(e){return we(),hP(fo,e)},u.Hi=function(){return we(),we(),ap};var PVe=A(qs,"ECollections/EmptyUnmodifiableEMap",1163),$vt=Sr(qs,"Enumerator"),XF;T(261,1,{261:1},OX),u.Fb=function(e){var n;return this===e?!0:ct(e,261)?(n=a(e,261),this.f==n.f&&Are(this.i,n.i)&&w$(this.a,this.f&256?n.f&256?n.a:null:n.f&256?null:n.a)&&w$(this.d,n.d)&&w$(this.g,n.g)&&w$(this.e,n.e)&&mde(this,n)):!1},u.Hb=function(){return this.f},u.Ib=function(){return FNt(this)},u.f=0;var Bqt=0,Fqt=0,Uqt=0,zqt=0,Vvt=0,qvt=0,Xvt=0,Zvt=0,Yvt=0,jqt,kA=0,LA=0,Hqt=0,Gqt=0,ZF,Kvt,IVe=A(qs,"URI",261);T(965,44,sx,vxt),u.Zb=function(e,n){return a(tc(this,hi(e),a(n,261)),261)};var RVe=A(qs,"URI/URICache",965);T(451,55,Nf,B3,FD),u.xh=function(){return!0};var DVe=A(qs,"UniqueEList",451);T(526,54,rp,TN);var NVe=A(qs,"WrappedException",526),Ui=Sr(tl,xUt),Bw=Sr(tl,MUt),Ra=Sr(tl,EUt),gy=Sr(tl,SUt),cf=Sr(tl,TUt),Dl=Sr(tl,"EClass"),utt=Sr(tl,"EDataType"),Wqt;T(1096,44,sx,_xt),u.Vb=function(e){return Es(e)?Zc(this,e):Ua(Ea(this.d,e))};var OVe=A(tl,"EDataType/Internal/ConversionDelegate/Factory/Registry/Impl",1096),YF=Sr(tl,"EEnum"),Qp=Sr(tl,CUt),Do=Sr(tl,AUt),ph=Sr(tl,kUt),Nl,Fw=Sr(tl,LUt),Uw=Sr(tl,PUt);T(918,1,{},RR),u.Ib=function(){return"NIL"};var BVe=A(tl,"EStructuralFeature/Internal/DynamicValueHolder/1",918),$qt;T(917,44,sx,yxt),u.Vb=function(e){return Es(e)?Zc(this,e):Ua(Ea(this.d,e))};var FVe=A(tl,"EStructuralFeature/Internal/SettingDelegate/Factory/Registry/Impl",917),wu=Sr(tl,IUt),Ux=Sr(tl,"EValidator/PatternMatcher"),Jvt,Qvt,Ae,S0,zx,fb,Vqt,qqt,db,T0,pb,my,Hf,Xqt,Zqt,gh,C0,A0,zw,VE,Ho,Yqt,Kqt,by,KF=Sr(hr,"FeatureMap/Entry");T(483,1,{75:1},Q9),u.nj=function(){return this.a},u.lc=function(){return this.b};var UVe=A(Re,"BasicEObjectImpl/1",483);T(1674,1,{103:1}),u.oj=function(e){this.e=e==0?Jqt:dt(un,te,1,e,5,1)},u.Tg=function(e){return this.e[e]},u.Ug=function(e,n){this.e[e]=n},u.Vg=function(e){this.e[e]=null},u.pj=function(){return this.c},u.qj=function(){throw K(new Oi)},u.rj=function(){throw K(new Oi)},u.sj=function(){return this.d},u.tj=function(){return this.e!=null},u.uj=function(e){this.c=e},u.vj=function(e){throw K(new Oi)},u.wj=function(e){this.d=e};var Jqt,zVe=A(Re,"BasicEObjectImpl/EPropertiesHolderBaseImpl",1674);T(201,1674,{103:1},wf),u.qj=function(){return this.a},u.rj=function(){return this.b},u.vj=function(e){this.a=e};var jVe=A(Re,"BasicEObjectImpl/EPropertiesHolderImpl",201);T(463,92,BFt,zl),u.dg=function(){return this.f},u.ig=function(){return this.k},u.kg=function(e,n){this.g=e,this.i=n},u.mg=function(){return this.j&2?this.Jg().pj():this.Rg()},u.og=function(){return this.i},u.fg=function(){return(this.j&1)!=0},u.yg=function(){return this.g},u.Eg=function(){return(this.j&4)!=0},u.Jg=function(){return!this.k&&(this.k=new wf),this.k},u.Ng=function(e){this.Jg().uj(e),e?this.j|=2:this.j&=-3},u.Rg=function(){return(T1(),Ae).S},u.i=0,u.j=1;var HVe=A(Re,"EObjectImpl",463);T(710,463,{95:1,91:1,87:1,51:1,103:1,42:1,92:1},Jst),u.Tg=function(e){return this.e[e]},u.Ug=function(e,n){this.e[e]=n},u.Vg=function(e){this.e[e]=null},u.mg=function(){return this.d},u.rg=function(e){return xr(this.d,e)},u.tg=function(){return this.d},u.xg=function(){return this.e!=null},u.Jg=function(){return!this.k&&(this.k=new kz),this.k},u.Ng=function(e){this.d=e},u.Qg=function(){var e;return this.e==null&&(e=ei(this.d),this.e=e==0?Qqt:dt(un,te,1,e,5,1)),this},u.Sg=function(){return 0};var Qqt,GVe=A(Re,"DynamicEObjectImpl",710);T(1389,710,{95:1,38:1,91:1,87:1,134:1,51:1,103:1,42:1,92:1},vCt),u.Fb=function(e){return this===e},u.Hb=function(){return lm(this)},u.Ng=function(e){this.d=e,this.b=CP(e,"key"),this.c=CP(e,C4)},u.ih=function(){var e;return this.a==-1&&(e=LV(this,this.b),this.a=e==null?0:Yr(e)),this.a},u.kc=function(){return LV(this,this.b)},u.lc=function(){return LV(this,this.c)},u.jh=function(e){this.a=e},u.kh=function(e){RAt(this,this.b,e)},u.mc=function(e){var n;return n=LV(this,this.c),RAt(this,this.c,e),n},u.a=0;var WVe=A(Re,"DynamicEObjectImpl/BasicEMapEntry",1389);T(1390,1,{103:1},kz),u.oj=function(e){throw K(new Oi)},u.Tg=function(e){throw K(new Oi)},u.Ug=function(e,n){throw K(new Oi)},u.Vg=function(e){throw K(new Oi)},u.pj=function(){throw K(new Oi)},u.qj=function(){return this.a},u.rj=function(){return this.b},u.sj=function(){return this.c},u.tj=function(){throw K(new Oi)},u.uj=function(e){throw K(new Oi)},u.vj=function(e){this.a=e},u.wj=function(e){this.c=e};var $Ve=A(Re,"DynamicEObjectImpl/DynamicEPropertiesHolderImpl",1390);T(469,142,{95:1,91:1,87:1,609:1,139:1,51:1,103:1,42:1,92:1,469:1,142:1,107:1,108:1},DR),u.jg=function(e){return Vut(this,e)},u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.d;case 2:return i?(!this.b&&(this.b=new Mu((ye(),Ho),Dc,this)),this.b):(!this.b&&(this.b=new Mu((ye(),Ho),Dc,this)),AL(this.b));case 3:return vAt(this);case 4:return!this.a&&(this.a=new Ss(Nw,this,4)),this.a;case 5:return!this.c&&(this.c=new dM(Nw,this,5)),this.c}return Xu(this,e-ei((ye(),S0)),Ve((r=a(an(this,16),24),r||S0),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 3:return this.Cb&&(i=(c=this.Db>>16,c>=0?Vut(this,i):this.Cb.Cg(this,-1-c,null,i))),pot(this,a(e,139),i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),S0)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),S0)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 2:return!this.b&&(this.b=new Mu((ye(),Ho),Dc,this)),SD(this.b,e,i);case 3:return pot(this,null,i);case 4:return!this.a&&(this.a=new Ss(Nw,this,4)),$s(this.a,e,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),S0)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),S0)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.d!=null;case 2:return!!this.b&&this.b.f!=0;case 3:return!!vAt(this);case 4:return!!this.a&&this.a.i!=0;case 5:return!!this.c&&this.c.i!=0}return Vu(this,e-ei((ye(),S0)),Ve((n=a(an(this,16),24),n||S0),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:kre(this,hi(n));return;case 2:!this.b&&(this.b=new Mu((ye(),Ho),Dc,this)),zN(this.b,n);return;case 3:Vbe(this,a(n,139));return;case 4:!this.a&&(this.a=new Ss(Nw,this,4)),Dr(this.a),!this.a&&(this.a=new Ss(Nw,this,4)),Lr(this.a,a(n,13));return;case 5:!this.c&&(this.c=new dM(Nw,this,5)),Dr(this.c),!this.c&&(this.c=new dM(Nw,this,5)),Lr(this.c,a(n,13));return}Ku(this,e-ei((ye(),S0)),Ve((i=a(an(this,16),24),i||S0),e),n)},u.Rg=function(){return ye(),S0},u.Ib=function(){return X6t(this)},u.d=null;var VVe=A(Re,"EAnnotationImpl",469);T(143,639,Kpt,lu),u.xj=function(e,n){return kne(this,a(e,38),n)},u.Dh=function(e){return a(a(this.c,64).Dh(e),134)},u.oh=function(){return a(this.c,64).oh()},u.ph=function(){return a(this.c,64).ph()},u.qh=function(e){return a(this.c,64).qh(e)},u.yj=function(e,n){return SD(this,e,n)},u.hj=function(e){return a(this.c,81).hj(e)},u.Gi=function(){},u.ui=function(){return a(this.c,81).ui()},u.Ii=function(e,n,i){var r;return r=a(Zu(this.b).dh().$g(this.b),134),r.jh(e),r.kh(n),r.mc(i),r},u.Ji=function(){return new mT(this)},u.Gc=function(e){zN(this,e)},u.ij=function(){a(this.c,81).ij()};var qVe=A(hr,"EcoreEMap",143);T(152,143,Kpt,Mu),u.Fi=function(){var e,n,i,r,c,l;if(this.d==null){for(l=dt(Gvt,Ypt,55,2*this.f+1,0,1),i=this.c.tc();i.e!=i.i._b();)n=a(i.Ci(),134),r=n.ih(),c=(r&qi)%l.length,e=l[c],!e&&(e=l[c]=new mT(this)),e.nc(n);this.d=l}};var XVe=A(Re,"EAnnotationImpl/1",152);T(268,399,{95:1,91:1,87:1,139:1,174:1,51:1,103:1,431:1,42:1,92:1,142:1,268:1,107:1,108:1}),u.ug=function(e,n,i){var r,c;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return me(),!!(this.Bb&256);case 3:return me(),!!(this.Bb&512);case 4:return Xt(this.s);case 5:return Xt(this.t);case 6:return me(),!!this.lj();case 7:return me(),c=this.s,c>=1;case 8:return n?wl(this):this.r;case 9:return this.q}return Xu(this,e-ei(this.Rg()),Ve((r=a(an(this,16),24),r||this.Rg()),e),n,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 9:return R$(this,i)}return c=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),c.aj().ej(this,ra(this),n-ei(this.Rg()),e,i)},u.Fg=function(e){var n,i;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.lj();case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&mm(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&mm(this.q).i==0)}return Vu(this,e-ei(this.Rg()),Ve((n=a(an(this,16),24),n||this.Rg()),e))},u.Mg=function(e,n){var i,r;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:this.ah(hi(n));return;case 2:f_(this,lt(de(n)));return;case 3:d_(this,lt(de(n)));return;case 4:a_(this,a(n,21).a);return;case 5:this.Aj(a(n,21).a);return;case 8:GM(this,a(n,133));return;case 9:r=$1(this,a(n,84),null),r&&r.Th();return}Ku(this,e-ei(this.Rg()),Ve((i=a(an(this,16),24),i||this.Rg()),e),n)},u.Rg=function(){return ye(),Kqt},u.Xg=function(){wl(this),this.Bb|=1},u.jj=function(){return wl(this)},u.kj=function(){return this.t},u.lj=function(){var e;return e=this.t,e>1||e==-1},u.xh=function(){return(this.Bb&512)!=0},u.zj=function(e,n){return Zat(this,e,n)},u.Aj=function(e){OM(this,e)},u.Ib=function(){return Blt(this)},u.s=0,u.t=1;var ZVe=A(Re,"ETypedElementImpl",268);T(418,268,{95:1,91:1,87:1,139:1,174:1,51:1,158:1,61:1,103:1,431:1,42:1,92:1,142:1,418:1,268:1,107:1,108:1,615:1}),u.jg=function(e){return GRt(this,e)},u.ug=function(e,n,i){var r,c;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return me(),!!(this.Bb&256);case 3:return me(),!!(this.Bb&512);case 4:return Xt(this.s);case 5:return Xt(this.t);case 6:return me(),!!this.lj();case 7:return me(),c=this.s,c>=1;case 8:return n?wl(this):this.r;case 9:return this.q;case 10:return me(),!!(this.Bb&oh);case 11:return me(),!!(this.Bb&mw);case 12:return me(),!!(this.Bb&zm);case 13:return this.j;case 14:return iE(this);case 15:return me(),!!(this.Bb&La);case 16:return me(),!!(this.Bb&Lf);case 17:return Zb(this)}return Xu(this,e-ei(this.Rg()),Ve((r=a(an(this,16),24),r||this.Rg()),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 17:return this.Cb&&(i=(c=this.Db>>16,c>=0?GRt(this,i):this.Cb.Cg(this,-1-c,null,i))),Lu(this,e,17,i)}return l=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),l.aj().dj(this,ra(this),n-ei(this.Rg()),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 9:return R$(this,i);case 17:return Lu(this,null,17,i)}return c=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),c.aj().ej(this,ra(this),n-ei(this.Rg()),e,i)},u.Fg=function(e){var n,i;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.lj();case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&mm(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&mm(this.q).i==0);case 10:return(this.Bb&oh)==0;case 11:return(this.Bb&mw)!=0;case 12:return(this.Bb&zm)!=0;case 13:return this.j!=null;case 14:return iE(this)!=null;case 15:return(this.Bb&La)!=0;case 16:return(this.Bb&Lf)!=0;case 17:return!!Zb(this)}return Vu(this,e-ei(this.Rg()),Ve((n=a(an(this,16),24),n||this.Rg()),e))},u.Mg=function(e,n){var i,r;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:eV(this,hi(n));return;case 2:f_(this,lt(de(n)));return;case 3:d_(this,lt(de(n)));return;case 4:a_(this,a(n,21).a);return;case 5:this.Aj(a(n,21).a);return;case 8:GM(this,a(n,133));return;case 9:r=$1(this,a(n,84),null),r&&r.Th();return;case 10:YN(this,lt(de(n)));return;case 11:ZN(this,lt(de(n)));return;case 12:JN(this,lt(de(n)));return;case 13:Lrt(this,hi(n));return;case 15:KN(this,lt(de(n)));return;case 16:QN(this,lt(de(n)));return}Ku(this,e-ei(this.Rg()),Ve((i=a(an(this,16),24),i||this.Rg()),e),n)},u.Rg=function(){return ye(),Yqt},u.Xg=function(){MM(qo((Qa(),eo),this)),wl(this),this.Bb|=1},u.Vi=function(){return this.f},u.Oi=function(){return iE(this)},u.Wi=function(){return Zb(this)},u.$i=function(){return null},u.Bj=function(){return this.k},u.pi=function(){return this.n},u._i=function(){return x7(this)},u.aj=function(){var e,n,i,r,c,l,f,g,b;return this.p||(i=Zb(this),(i.i==null&&q1(i),i.i).length,r=this.$i(),r&&ei(Zb(r)),c=wl(this),f=c.Qi(),e=f?f.i&1?f==Ol?ho:f==Gn?Io:f==Gw?CE:f==Os?To:f==k0?Vm:f==_y?qm:f==Da?px:U4:f:null,n=iE(this),g=c.Oi(),ife(this),this.Bb&Lf&&((l=Qut((Qa(),eo),i))&&l!=this||(l=lC(qo(eo,this))))?this.p=new bEt(this,l):this.lj()?this.Dj()?r?this.Bb&La?e?this.Ej()?this.p=new jg(47,e,this,r):this.p=new jg(5,e,this,r):this.Ej()?this.p=new Wg(46,this,r):this.p=new Wg(4,this,r):e?this.Ej()?this.p=new jg(49,e,this,r):this.p=new jg(7,e,this,r):this.Ej()?this.p=new Wg(48,this,r):this.p=new Wg(6,this,r):this.Bb&La?e?e==q_?this.p=new Ip(50,Dqt,this):this.Ej()?this.p=new Ip(43,e,this):this.p=new Ip(1,e,this):this.Ej()?this.p=new Op(42,this):this.p=new Op(0,this):e?e==q_?this.p=new Ip(41,Dqt,this):this.Ej()?this.p=new Ip(45,e,this):this.p=new Ip(3,e,this):this.Ej()?this.p=new Op(44,this):this.p=new Op(2,this):ct(c,140)?e==KF?this.p=new Op(40,this):this.Bb&512?this.Bb&La?e?this.p=new Ip(9,e,this):this.p=new Op(8,this):e?this.p=new Ip(11,e,this):this.p=new Op(10,this):this.Bb&La?e?this.p=new Ip(13,e,this):this.p=new Op(12,this):e?this.p=new Ip(15,e,this):this.p=new Op(14,this):r?(b=r.t,b>1||b==-1?this.Ej()?this.Bb&La?e?this.p=new jg(25,e,this,r):this.p=new Wg(24,this,r):e?this.p=new jg(27,e,this,r):this.p=new Wg(26,this,r):this.Bb&La?e?this.p=new jg(29,e,this,r):this.p=new Wg(28,this,r):e?this.p=new jg(31,e,this,r):this.p=new Wg(30,this,r):this.Ej()?this.Bb&La?e?this.p=new jg(33,e,this,r):this.p=new Wg(32,this,r):e?this.p=new jg(35,e,this,r):this.p=new Wg(34,this,r):this.Bb&La?e?this.p=new jg(37,e,this,r):this.p=new Wg(36,this,r):e?this.p=new jg(39,e,this,r):this.p=new Wg(38,this,r)):this.Ej()?this.Bb&La?e?this.p=new Ip(17,e,this):this.p=new Op(16,this):e?this.p=new Ip(19,e,this):this.p=new Op(18,this):this.Bb&La?e?this.p=new Ip(21,e,this):this.p=new Op(20,this):e?this.p=new Ip(23,e,this):this.p=new Op(22,this):this.Cj()?this.Ej()?this.p=new YTt(a(c,24),this,r):this.p=new nct(a(c,24),this,r):ct(c,140)?e==KF?this.p=new Op(40,this):this.Bb&La?e?this.p=new BCt(n,g,this,(Iq(),f==Gn?o_t:f==Ol?e_t:f==k0?c_t:f==Gw?s_t:f==Os?r_t:f==_y?a_t:f==Da?n_t:f==nl?i_t:ftt)):this.p=new R4t(a(c,140),n,g,this):e?this.p=new OCt(n,g,this,(Iq(),f==Gn?o_t:f==Ol?e_t:f==k0?c_t:f==Gw?s_t:f==Os?r_t:f==_y?a_t:f==Da?n_t:f==nl?i_t:ftt)):this.p=new I4t(a(c,140),n,g,this):this.Dj()?r?this.Bb&La?this.Ej()?this.p=new JTt(a(c,24),this,r):this.p=new Wst(a(c,24),this,r):this.Ej()?this.p=new KTt(a(c,24),this,r):this.p=new d$(a(c,24),this,r):this.Bb&La?this.Ej()?this.p=new qSt(a(c,24),this):this.p=new ust(a(c,24),this):this.Ej()?this.p=new VSt(a(c,24),this):this.p=new KW(a(c,24),this):this.Ej()?r?this.Bb&La?this.p=new QTt(a(c,24),this,r):this.p=new Gst(a(c,24),this,r):this.Bb&La?this.p=new XSt(a(c,24),this):this.p=new ast(a(c,24),this):r?this.Bb&La?this.p=new tCt(a(c,24),this,r):this.p=new $st(a(c,24),this,r):this.Bb&La?this.p=new ZSt(a(c,24),this):this.p=new UD(a(c,24),this)),this.p},u.Xi=function(){return(this.Bb&oh)!=0},u.Cj=function(){return!1},u.Dj=function(){return!1},u.Yi=function(){return(this.Bb&Lf)!=0},u.bj=function(){return Yct(this)},u.Ej=function(){return!1},u.Zi=function(){return(this.Bb&La)!=0},u.Fj=function(e){this.k=e},u.ah=function(e){eV(this,e)},u.Ib=function(){return W7(this)},u.e=!1,u.n=0;var YVe=A(Re,"EStructuralFeatureImpl",418);T(335,418,{95:1,91:1,87:1,29:1,139:1,174:1,51:1,158:1,61:1,103:1,431:1,42:1,92:1,335:1,142:1,418:1,268:1,107:1,108:1,615:1},UG),u.ug=function(e,n,i){var r,c;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return me(),!!(this.Bb&256);case 3:return me(),!!(this.Bb&512);case 4:return Xt(this.s);case 5:return Xt(this.t);case 6:return me(),!!Nlt(this);case 7:return me(),c=this.s,c>=1;case 8:return n?wl(this):this.r;case 9:return this.q;case 10:return me(),!!(this.Bb&oh);case 11:return me(),!!(this.Bb&mw);case 12:return me(),!!(this.Bb&zm);case 13:return this.j;case 14:return iE(this);case 15:return me(),!!(this.Bb&La);case 16:return me(),!!(this.Bb&Lf);case 17:return Zb(this);case 18:return me(),!!(this.Bb&ca);case 19:return n?eq(this):k5t(this)}return Xu(this,e-ei((ye(),zx)),Ve((r=a(an(this,16),24),r||zx),e),n,i)},u.Fg=function(e){var n,i;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return Nlt(this);case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&mm(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&mm(this.q).i==0);case 10:return(this.Bb&oh)==0;case 11:return(this.Bb&mw)!=0;case 12:return(this.Bb&zm)!=0;case 13:return this.j!=null;case 14:return iE(this)!=null;case 15:return(this.Bb&La)!=0;case 16:return(this.Bb&Lf)!=0;case 17:return!!Zb(this);case 18:return(this.Bb&ca)!=0;case 19:return!!k5t(this)}return Vu(this,e-ei((ye(),zx)),Ve((n=a(an(this,16),24),n||zx),e))},u.Mg=function(e,n){var i,r;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:eV(this,hi(n));return;case 2:f_(this,lt(de(n)));return;case 3:d_(this,lt(de(n)));return;case 4:a_(this,a(n,21).a);return;case 5:b3t(this,a(n,21).a);return;case 8:GM(this,a(n,133));return;case 9:r=$1(this,a(n,84),null),r&&r.Th();return;case 10:YN(this,lt(de(n)));return;case 11:ZN(this,lt(de(n)));return;case 12:JN(this,lt(de(n)));return;case 13:Lrt(this,hi(n));return;case 15:KN(this,lt(de(n)));return;case 16:QN(this,lt(de(n)));return;case 18:iut(this,lt(de(n)));return}Ku(this,e-ei((ye(),zx)),Ve((i=a(an(this,16),24),i||zx),e),n)},u.Rg=function(){return ye(),zx},u.Xg=function(){eq(this),MM(qo((Qa(),eo),this)),wl(this),this.Bb|=1},u.lj=function(){return Nlt(this)},u.zj=function(e,n){return this.b=0,this.a=null,Zat(this,e,n)},u.Aj=function(e){b3t(this,e)},u.Ib=function(){var e;return this.Db&64?W7(this):(e=new ul(W7(this)),e.a+=" (iD: ",Cp(e,(this.Bb&ca)!=0),e.a+=")",e.a)},u.b=0;var KVe=A(Re,"EAttributeImpl",335);T(672,399,{95:1,91:1,87:1,133:1,139:1,174:1,51:1,103:1,42:1,92:1,142:1,107:1,108:1,614:1}),u.Gj=function(e){return e.mg()==this},u.jg=function(e){return nX(this,e)},u.kg=function(e,n){this.w=null,this.Db=n<<16|this.Db&255,this.Cb=e},u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return Im(this);case 4:return this.Oi();case 5:return this.F;case 6:return n?Zu(this):CM(this);case 7:return!this.A&&(this.A=new Gu(wu,this,7)),this.A}return Xu(this,e-ei(this.Rg()),Ve((r=a(an(this,16),24),r||this.Rg()),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 6:return this.Cb&&(i=(c=this.Db>>16,c>=0?nX(this,i):this.Cb.Cg(this,-1-c,null,i))),Lu(this,e,6,i)}return l=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),l.aj().dj(this,ra(this),n-ei(this.Rg()),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 6:return Lu(this,null,6,i);case 7:return!this.A&&(this.A=new Gu(wu,this,7)),$s(this.A,e,i)}return c=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),c.aj().ej(this,ra(this),n-ei(this.Rg()),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!Im(this);case 4:return this.Oi()!=null;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!CM(this);case 7:return!!this.A&&this.A.i!=0}return Vu(this,e-ei(this.Rg()),Ve((n=a(an(this,16),24),n||this.Rg()),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:oN(this,hi(n));return;case 2:DW(this,hi(n));return;case 5:oZ(this,hi(n));return;case 7:!this.A&&(this.A=new Gu(wu,this,7)),Dr(this.A),!this.A&&(this.A=new Gu(wu,this,7)),Lr(this.A,a(n,13));return}Ku(this,e-ei(this.Rg()),Ve((i=a(an(this,16),24),i||this.Rg()),e),n)},u.Rg=function(){return ye(),Vqt},u.Ni=function(){var e;return this.G==-1&&(this.G=(e=Zu(this),e?Hp(e.bh(),this):-1)),this.G},u.Oi=function(){return null},u.Pi=function(){return Zu(this)},u.Hj=function(){return this.v},u.Qi=function(){return Im(this)},u.Ri=function(){return this.D!=null?this.D:this.B},u.Si=function(){return this.F},u.Li=function(e){return GX(this,e)},u.Ij=function(e){this.v=e},u.Jj=function(e){EPt(this,e)},u.Kj=function(e){this.C=e},u.ah=function(e){oN(this,e)},u.Ib=function(){return o7(this)},u.C=null,u.D=null,u.G=-1;var JVe=A(Re,"EClassifierImpl",672);T(96,672,{95:1,91:1,87:1,24:1,133:1,139:1,174:1,51:1,103:1,42:1,92:1,96:1,142:1,432:1,107:1,108:1,614:1},l5),u.Gj=function(e){return Mne(this,e.mg())},u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return Im(this);case 4:return null;case 5:return this.F;case 6:return n?Zu(this):CM(this);case 7:return!this.A&&(this.A=new Gu(wu,this,7)),this.A;case 8:return me(),!!(this.Bb&256);case 9:return me(),!!(this.Bb&512);case 10:return Bo(this);case 11:return!this.q&&(this.q=new Wt(ph,this,11,10)),this.q;case 12:return k_(this);case 13:return l4(this);case 14:return l4(this),this.r;case 15:return k_(this),this.k;case 16:return Tlt(this);case 17:return ZX(this);case 18:return q1(this);case 19:return B7(this);case 20:return k_(this),this.o;case 21:return!this.s&&(this.s=new Wt(Ra,this,21,17)),this.s;case 22:return kc(this);case 23:return NX(this)}return Xu(this,e-ei((ye(),fb)),Ve((r=a(an(this,16),24),r||fb),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 6:return this.Cb&&(i=(c=this.Db>>16,c>=0?nX(this,i):this.Cb.Cg(this,-1-c,null,i))),Lu(this,e,6,i);case 11:return!this.q&&(this.q=new Wt(ph,this,11,10)),Kc(this.q,e,i);case 21:return!this.s&&(this.s=new Wt(Ra,this,21,17)),Kc(this.s,e,i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),fb)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),fb)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 6:return Lu(this,null,6,i);case 7:return!this.A&&(this.A=new Gu(wu,this,7)),$s(this.A,e,i);case 11:return!this.q&&(this.q=new Wt(ph,this,11,10)),$s(this.q,e,i);case 21:return!this.s&&(this.s=new Wt(Ra,this,21,17)),$s(this.s,e,i);case 22:return $s(kc(this),e,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),fb)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),fb)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!Im(this);case 4:return!1;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!CM(this);case 7:return!!this.A&&this.A.i!=0;case 8:return(this.Bb&256)!=0;case 9:return(this.Bb&512)!=0;case 10:return!!this.u&&kc(this.u.a).i!=0&&!(this.n&&Xq(this.n));case 11:return!!this.q&&this.q.i!=0;case 12:return k_(this).i!=0;case 13:return l4(this).i!=0;case 14:return l4(this),this.r.i!=0;case 15:return k_(this),this.k.i!=0;case 16:return Tlt(this).i!=0;case 17:return ZX(this).i!=0;case 18:return q1(this).i!=0;case 19:return B7(this).i!=0;case 20:return k_(this),!!this.o;case 21:return!!this.s&&this.s.i!=0;case 22:return!!this.n&&Xq(this.n);case 23:return NX(this).i!=0}return Vu(this,e-ei((ye(),fb)),Ve((n=a(an(this,16),24),n||fb),e))},u.Ig=function(e){var n;return n=this.i==null||this.q&&this.q.i!=0?null:CP(this,e),n||Xht(this,e)},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:oN(this,hi(n));return;case 2:DW(this,hi(n));return;case 5:oZ(this,hi(n));return;case 7:!this.A&&(this.A=new Gu(wu,this,7)),Dr(this.A),!this.A&&(this.A=new Gu(wu,this,7)),Lr(this.A,a(n,13));return;case 8:eIt(this,lt(de(n)));return;case 9:nIt(this,lt(de(n)));return;case 10:Y7(Bo(this)),Lr(Bo(this),a(n,13));return;case 11:!this.q&&(this.q=new Wt(ph,this,11,10)),Dr(this.q),!this.q&&(this.q=new Wt(ph,this,11,10)),Lr(this.q,a(n,13));return;case 21:!this.s&&(this.s=new Wt(Ra,this,21,17)),Dr(this.s),!this.s&&(this.s=new Wt(Ra,this,21,17)),Lr(this.s,a(n,13));return;case 22:Dr(kc(this)),Lr(kc(this),a(n,13));return}Ku(this,e-ei((ye(),fb)),Ve((i=a(an(this,16),24),i||fb),e),n)},u.Rg=function(){return ye(),fb},u.Xg=function(){var e,n;if(k_(this),l4(this),Tlt(this),ZX(this),q1(this),B7(this),NX(this),mC(ure(pl(this))),this.s)for(e=0,n=this.s.i;e=0;--e)at(this,e);return hct(this)},u.zc=function(e){var n;if(this.Qj())for(n=this.i-1;n>=0;--n)at(this,n);return put(this,e)},u.ij=function(){Dr(this)},u.Ch=function(e,n){return RLt(this,e,n)};var eqe=A(hr,"EcoreEList",565);T(450,565,Zo,hL),u.rh=function(){return!1},u.pi=function(){return this.c},u.qi=function(){return!1},u.Rj=function(){return!0},u.xh=function(){return!0},u.zh=function(e,n){return n},u.Bh=function(){return!1},u.c=0;var nqe=A(hr,"EObjectEList",450);T(88,450,Zo,Ss),u.qi=function(){return!0},u.Pj=function(){return!1},u.Dj=function(){return!0};var iqe=A(hr,"EObjectContainmentEList",88);T(493,88,Zo,lD),u.th=function(){this.a=!0},u.ui=function(){return this.a},u.ij=function(){var e;Dr(this),Xl(this.e)?(e=this.a,this.a=!1,Bi(this.e,new Jl(this.e,2,this.c,e,!1))):this.a=!1},u.a=!1;var rqe=A(hr,"EObjectContainmentEList/Unsettable",493);T(1003,493,Zo,uSt),u.yi=function(e,n){return Rfe(this,a(e,84),n)},u.zi=function(e,n){return Ife(this,a(e,84),n)},u.Ai=function(e,n,i){return m1e(this,a(e,84),a(n,84),i)},u.mi=function(e,n,i,r,c){switch(e){case 3:return uC(this,3,n,i,r,this.i>1);case 5:return uC(this,5,n,i,r,this.i-a(i,15)._b()>0);default:return new Qd(this.e,e,this.c,n,i,r,!0)}},u.xi=function(){return!0},u.ui=function(){return Xq(this)},u.ij=function(){Dr(this)};var sqe=A(Re,"EClassImpl/1",1003);T(1017,1016,Zpt),u.Ih=function(e){var n,i,r,c,l,f,g;if(i=e.Lh(),i!=8){if(r=hde(e),r==0)switch(i){case 1:case 9:{g=e.Ph(),g!=null&&(n=pl(a(g,432)),!n.c&&(n.c=new kb),kV(n.c,e.Oh())),f=e.Nh(),f!=null&&(c=a(f,432),c.Bb&1||(n=pl(c),!n.c&&(n.c=new kb),ni(n.c,a(e.Oh(),24))));break}case 3:{f=e.Nh(),f!=null&&(c=a(f,432),c.Bb&1||(n=pl(c),!n.c&&(n.c=new kb),ni(n.c,a(e.Oh(),24))));break}case 5:{if(f=e.Nh(),f!=null)for(l=a(f,13).tc();l.hc();)c=a(l.ic(),432),c.Bb&1||(n=pl(c),!n.c&&(n.c=new kb),ni(n.c,a(e.Oh(),24)));break}case 4:{g=e.Ph(),g!=null&&(c=a(g,432),c.Bb&1||(n=pl(c),!n.c&&(n.c=new kb),kV(n.c,e.Oh())));break}case 6:{if(g=e.Ph(),g!=null)for(l=a(g,13).tc();l.hc();)c=a(l.ic(),432),c.Bb&1||(n=pl(c),!n.c&&(n.c=new kb),kV(n.c,e.Oh()));break}}this.Tj(r)}},u.Tj=function(e){bNt(this,e)},u.b=63;var oqe=A(Re,"ESuperAdapter",1017);T(1018,1017,Zpt,TG),u.Tj=function(e){e4(this,e)};var cqe=A(Re,"EClassImpl/10",1018);T(1007,630,Zo),u.lh=function(e){return IRt(this,e)},u.mh=function(e,n){eP(this,e,n)},u.nh=function(e){TL(this,e)},u.Dh=function(e){return Gct(this,e)},u.Ah=function(e,n){return AV(this,e,n)},u.xj=function(e,n){throw K(new Oi)},u.oh=function(){return new M2(this)},u.ph=function(){return new tL(this)},u.qh=function(e){return HL(this,e)},u.yj=function(e,n){throw K(new Oi)},u.hj=function(e){return this},u.ui=function(){return this.i!=0},u.Gc=function(e){throw K(new Oi)},u.ij=function(){throw K(new Oi)};var aqe=A(hr,"EcoreEList/UnmodifiableEList",1007);T(301,1007,Zo,zv),u.Bh=function(){return!1};var uqe=A(hr,"EcoreEList/UnmodifiableEList/FastCompare",301);T(1010,301,Zo,y6t),u.dd=function(e){var n,i,r;if(ct(e,158)&&(n=a(e,158),i=n.pi(),i!=-1)){for(r=this.i;i4)if(this.Li(e)){if(this.Dj()){if(r=a(e,42),i=r.ng(),g=i==this.b&&(this.Pj()?r.hg(r.og(),a(Ve(da(this.b),this.pi()).jj(),24).Qi())==jo(a(Ve(da(this.b),this.pi()),17)).n:-1-r.og()==this.pi()),this.Qj()&&!g&&!i&&r.sg()){for(c=0;c1||r==-1)):!1},u.Pj=function(){var e,n,i;return n=Ve(da(this.b),this.pi()),ct(n,62)?(e=a(n,17),i=jo(e),!!i):!1},u.Qj=function(){var e,n;return n=Ve(da(this.b),this.pi()),ct(n,62)?(e=a(n,17),(e.Bb&ao)!=0):!1},u.dd=function(e){var n,i,r,c;if(r=this.ci(e),r>=0)return r;if(this.Rj()){for(i=0,c=this.hi();i=0;--e)OP(this,e,this.ai(e));return this.ii()},u.zc=function(e){var n;if(this.Qj())for(n=this.hi()-1;n>=0;--n)OP(this,n,this.ai(n));return this.ji(e)},u.ij=function(){Y7(this)},u.Ch=function(e,n){return G5t(this,e,n)};var yqe=A(hr,"DelegatingEcoreEList",674);T(1013,674,Qpt,sTt),u.Vh=function(e,n){Qee(this,e,a(n,24))},u.Wh=function(e){cee(this,a(e,24))},u.ai=function(e){var n,i;return n=a(at(kc(this.a),e),84),i=n.c,ct(i,96)?a(i,24):(ye(),gh)},u.fi=function(e){var n,i;return n=a(cw(kc(this.a),e),84),i=n.c,ct(i,96)?a(i,24):(ye(),gh)},u.gi=function(e,n){return $de(this,e,a(n,24))},u.rh=function(){return!1},u.mi=function(e,n,i,r,c){return null},u.Xh=function(){return new S5(this)},u.Yh=function(){Dr(kc(this.a))},u.Zh=function(e){return rIt(this,e)},u.$h=function(e){var n,i;for(i=e.tc();i.hc();)if(n=i.ic(),!rIt(this,n))return!1;return!0},u._h=function(e){var n,i,r;if(ct(e,15)&&(r=a(e,15),r._b()==kc(this.a).i)){for(n=r.tc(),i=new $n(this);n.hc();)if(zt(n.ic())!==zt(ci(i)))return!1;return!0}return!1},u.bi=function(){var e,n,i,r,c;for(i=1,n=new $n(kc(this.a));n.e!=n.i._b();)e=a(ci(n),84),r=(c=e.c,ct(c,96)?a(c,24):(ye(),gh)),i=31*i+(r?lm(r):0);return i},u.ci=function(e){var n,i,r,c;for(r=0,i=new $n(kc(this.a));i.e!=i.i._b();){if(n=a(ci(i),84),zt(e)===zt((c=n.c,ct(c,96)?a(c,24):(ye(),gh))))return r;++r}return-1},u.di=function(){return kc(this.a).i==0},u.ei=function(){return null},u.hi=function(){return kc(this.a).i},u.ii=function(){var e,n,i,r,c,l;for(l=kc(this.a).i,c=dt(un,te,1,l,5,1),i=0,n=new $n(kc(this.a));n.e!=n.i._b();)e=a(ci(n),84),c[i++]=(r=e.c,ct(r,96)?a(r,24):(ye(),gh));return c},u.ji=function(e){var n,i,r,c,l,f,g;for(g=kc(this.a).i,e.lengthg&&Vr(e,g,null),r=0,i=new $n(kc(this.a));i.e!=i.i._b();)n=a(ci(i),84),l=(f=n.c,ct(f,96)?a(f,24):(ye(),gh)),Vr(e,r++,l);return e},u.ki=function(){var e,n,i,r,c;for(c=new Sp,c.a+="[",e=kc(this.a),n=0,r=kc(this.a).i;n>16,c>=0?nX(this,i):this.Cb.Cg(this,-1-c,null,i))),Lu(this,e,6,i);case 9:return!this.a&&(this.a=new Wt(Qp,this,9,5)),Kc(this.a,e,i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),db)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),db)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 6:return Lu(this,null,6,i);case 7:return!this.A&&(this.A=new Gu(wu,this,7)),$s(this.A,e,i);case 9:return!this.a&&(this.a=new Wt(Qp,this,9,5)),$s(this.a,e,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),db)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),db)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!Im(this);case 4:return!!Wat(this);case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!CM(this);case 7:return!!this.A&&this.A.i!=0;case 8:return(this.Bb&256)==0;case 9:return!!this.a&&this.a.i!=0}return Vu(this,e-ei((ye(),db)),Ve((n=a(an(this,16),24),n||db),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:oN(this,hi(n));return;case 2:DW(this,hi(n));return;case 5:oZ(this,hi(n));return;case 7:!this.A&&(this.A=new Gu(wu,this,7)),Dr(this.A),!this.A&&(this.A=new Gu(wu,this,7)),Lr(this.A,a(n,13));return;case 8:Jat(this,lt(de(n)));return;case 9:!this.a&&(this.a=new Wt(Qp,this,9,5)),Dr(this.a),!this.a&&(this.a=new Wt(Qp,this,9,5)),Lr(this.a,a(n,13));return}Ku(this,e-ei((ye(),db)),Ve((i=a(an(this,16),24),i||db),e),n)},u.Rg=function(){return ye(),db},u.Xg=function(){var e,n;if(this.a)for(e=0,n=this.a.i;e>16==5?a(this.Cb,608):null}return Xu(this,e-ei((ye(),T0)),Ve((r=a(an(this,16),24),r||T0),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 5:return this.Cb&&(i=(c=this.Db>>16,c>=0?VRt(this,i):this.Cb.Cg(this,-1-c,null,i))),Lu(this,e,5,i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),T0)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),T0)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 5:return Lu(this,null,5,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),T0)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),T0)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.d!=0;case 3:return!!this.b;case 4:return this.c!=null;case 5:return!!(this.Db>>16==5&&a(this.Cb,608))}return Vu(this,e-ei((ye(),T0)),Ve((n=a(an(this,16),24),n||T0),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:kh(this,hi(n));return;case 2:iat(this,a(n,21).a);return;case 3:hme(this,a(n,1634));return;case 4:gat(this,hi(n));return}Ku(this,e-ei((ye(),T0)),Ve((i=a(an(this,16),24),i||T0),e),n)},u.Rg=function(){return ye(),T0},u.Ib=function(){var e;return e=this.c,e??this.zb},u.b=null,u.c=null,u.d=0;var Aqe=A(Re,"EEnumLiteralImpl",525),nMe=Sr(Re,"EFactoryImpl/InternalEDateTimeFormat");T(445,1,{1699:1},r2);var kqe=A(Re,"EFactoryImpl/1ClientInternalEDateTimeFormat",445);T(217,108,{95:1,91:1,87:1,84:1,51:1,103:1,42:1,92:1,217:1,107:1,108:1},b1),u.lg=function(e,n,i){var r;return i=Lu(this,e,n,i),this.e&&ct(e,158)&&(r=O7(this,this.e),r!=this.c&&(i=cE(this,r,i))),i},u.ug=function(e,n,i){var r;switch(e){case 0:return this.f;case 1:return!this.d&&(this.d=new Ss(Do,this,1)),this.d;case 2:return n?V7(this):this.c;case 3:return this.b;case 4:return this.e;case 5:return n?Yq(this):this.a}return Xu(this,e-ei((ye(),my)),Ve((r=a(an(this,16),24),r||my),e),n,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return V6t(this,null,i);case 1:return!this.d&&(this.d=new Ss(Do,this,1)),$s(this.d,e,i);case 3:return $6t(this,null,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),my)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),my)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.f;case 1:return!!this.d&&this.d.i!=0;case 2:return!!this.c;case 3:return!!this.b;case 4:return!!this.e;case 5:return!!this.a}return Vu(this,e-ei((ye(),my)),Ve((n=a(an(this,16),24),n||my),e))},u.Mg=function(e,n){var i;switch(e){case 0:U1e(this,a(n,84));return;case 1:!this.d&&(this.d=new Ss(Do,this,1)),Dr(this.d),!this.d&&(this.d=new Ss(Do,this,1)),Lr(this.d,a(n,13));return;case 3:p8t(this,a(n,84));return;case 4:I8t(this,a(n,742));return;case 5:yC(this,a(n,133));return}Ku(this,e-ei((ye(),my)),Ve((i=a(an(this,16),24),i||my),e),n)},u.Rg=function(){return ye(),my},u.Ib=function(){var e;return e=new ll(nh(this)),e.a+=" (expression: ",tZ(this,e),e.a+=")",e.a};var t_t,Lqe=A(Re,"EGenericTypeImpl",217);T(1667,1657,OO),u.xj=function(e,n){return fne(this,this._b(),e),n},u.Dh=function(e){return H1(this.Uh(),e)},u.oh=function(){return this.ph()},u.Uh=function(){return new C5(this)},u.ph=function(){return this.qh(0)},u.qh=function(e){return this.Uh().fd(e)},u.yj=function(e,n){return j2(this,e,!0),n};var Pqe=A(hr,"AbstractSequentialInternalEList",1667);T(444,1667,OO,eL),u.Dh=function(e){return H1(this.Uh(),e)},u.oh=function(){return this.b==null?(Ap(),Ap(),yI):this.Vj()},u.Uh=function(){return new LEt(this.a,this.b)},u.ph=function(){return this.b==null?(Ap(),Ap(),yI):this.Vj()},u.qh=function(e){var n,i;if(this.b==null){if(e<0||e>1)throw K(new Uc(A4+e+", size=0"));return Ap(),Ap(),yI}for(i=this.Vj(),n=0;n0;)if(n=this.c[--this.d],(!this.e||n.Vi()!=$E||n.pi()!=0)&&(!this.Yj()||this.b.Gg(n))){if(l=this.b.wg(n,this.Xj()),this.f=(Jo(),a(n,61).bj()),this.f||n.lj()){if(this.Xj()?(r=a(l,15),this.k=r):(r=a(l,64),this.k=this.j=r),ct(this.k,49)?(this.o=this.k._b(),this.n=this.o):this.p=this.j?this.j.qh(this.k._b()):this.k.fd(this.k._b()),this.p?u9t(this,this.p):M9t(this))return c=this.p?this.p.Ec():this.j?this.j.Dh(--this.n):this.k.cd(--this.n),this.f?(e=a(c,75),e.nj(),i=e.lc(),this.i=i):this.i=c,this.g=-3,!0}else if(l!=null)return this.k=null,this.p=null,this.i=l,this.g=-2,!0}return this.k=null,this.p=null,this.g=-1,!1}else return c=this.p?this.p.Ec():this.j?this.j.Dh(--this.n):this.k.cd(--this.n),this.f?(e=a(c,75),e.nj(),i=e.lc(),this.i=i):this.i=c,this.g=-3,!0}},u.ic=function(){return UN(this)},u.Dc=function(){return this.a},u.Ec=function(){var e;if(this.g<-1||this.Cc())return--this.a,this.g=0,e=this.i,this.Cc(),e;throw K(new J)},u.Fc=function(){return this.a-1},u.jc=function(){throw K(new Oi)},u.Xj=function(){return!1},u.Gc=function(e){throw K(new Oi)},u.Yj=function(){return!0},u.a=0,u.d=0,u.f=!1,u.g=0,u.n=0,u.o=0;var yI,Dqe=A(hr,"EContentsEList/FeatureIteratorImpl",260);T(631,260,BO,cst),u.Xj=function(){return!0};var Nqe=A(hr,"EContentsEList/ResolvingFeatureIteratorImpl",631);T(1020,631,BO,$St),u.Yj=function(){return!1};var Oqe=A(Re,"ENamedElementImpl/1/1",1020);T(1021,260,BO,WSt),u.Yj=function(){return!1};var Bqe=A(Re,"ENamedElementImpl/1/2",1021);T(32,136,c6,Kb,cV,fs,yV,Qd,Jl,rat,FAt,sat,UAt,Cct,zAt,aat,jAt,Act,HAt,oat,GAt,gL,qot,cat,WAt,kct,$At),u.oi=function(){return jct(this)},u.vi=function(){var e;return e=jct(this),e?e.Oi():null},u.Mh=function(e){return this.b==-1&&this.a&&(this.b=this.c.qg(this.a.pi(),this.a.Vi())),this.c.hg(this.b,e)},u.Oh=function(){return this.c},u.wi=function(){var e;return e=jct(this),e?e.Zi():!1},u.b=-1;var Fqe=A(Re,"ENotificationImpl",32);T(371,268,{95:1,91:1,87:1,139:1,174:1,51:1,53:1,103:1,431:1,42:1,92:1,142:1,371:1,268:1,107:1,108:1},BG),u.jg=function(e){return XRt(this,e)},u.ug=function(e,n,i){var r,c,l;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return me(),!!(this.Bb&256);case 3:return me(),!!(this.Bb&512);case 4:return Xt(this.s);case 5:return Xt(this.t);case 6:return me(),l=this.t,l>1||l==-1;case 7:return me(),c=this.s,c>=1;case 8:return n?wl(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?a(this.Cb,24):null;case 11:return!this.d&&(this.d=new Gu(wu,this,11)),this.d;case 12:return!this.c&&(this.c=new Wt(Fw,this,12,10)),this.c;case 13:return!this.a&&(this.a=new oL(this,this)),this.a;case 14:return Ya(this)}return Xu(this,e-ei((ye(),C0)),Ve((r=a(an(this,16),24),r||C0),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 10:return this.Cb&&(i=(c=this.Db>>16,c>=0?XRt(this,i):this.Cb.Cg(this,-1-c,null,i))),Lu(this,e,10,i);case 12:return!this.c&&(this.c=new Wt(Fw,this,12,10)),Kc(this.c,e,i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),C0)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),C0)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 9:return R$(this,i);case 10:return Lu(this,null,10,i);case 11:return!this.d&&(this.d=new Gu(wu,this,11)),$s(this.d,e,i);case 12:return!this.c&&(this.c=new Wt(Fw,this,12,10)),$s(this.c,e,i);case 14:return $s(Ya(this),e,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),C0)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),C0)),e,i)},u.Fg=function(e){var n,i,r;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return r=this.t,r>1||r==-1;case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&mm(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&mm(this.q).i==0);case 10:return!!(this.Db>>16==10&&a(this.Cb,24));case 11:return!!this.d&&this.d.i!=0;case 12:return!!this.c&&this.c.i!=0;case 13:return!!this.a&&Ya(this.a.a).i!=0&&!(this.b&&Zq(this.b));case 14:return!!this.b&&Zq(this.b)}return Vu(this,e-ei((ye(),C0)),Ve((n=a(an(this,16),24),n||C0),e))},u.Mg=function(e,n){var i,r;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:kh(this,hi(n));return;case 2:f_(this,lt(de(n)));return;case 3:d_(this,lt(de(n)));return;case 4:a_(this,a(n,21).a);return;case 5:OM(this,a(n,21).a);return;case 8:GM(this,a(n,133));return;case 9:r=$1(this,a(n,84),null),r&&r.Th();return;case 11:!this.d&&(this.d=new Gu(wu,this,11)),Dr(this.d),!this.d&&(this.d=new Gu(wu,this,11)),Lr(this.d,a(n,13));return;case 12:!this.c&&(this.c=new Wt(Fw,this,12,10)),Dr(this.c),!this.c&&(this.c=new Wt(Fw,this,12,10)),Lr(this.c,a(n,13));return;case 13:!this.a&&(this.a=new oL(this,this)),Y7(this.a),!this.a&&(this.a=new oL(this,this)),Lr(this.a,a(n,13));return;case 14:Dr(Ya(this)),Lr(Ya(this),a(n,13));return}Ku(this,e-ei((ye(),C0)),Ve((i=a(an(this,16),24),i||C0),e),n)},u.Rg=function(){return ye(),C0},u.Xg=function(){var e,n;if(this.c)for(e=0,n=this.c.i;eg&&Vr(e,g,null),r=0,i=new $n(Ya(this.a));i.e!=i.i._b();)n=a(ci(i),84),l=(f=n.c,f||(ye(),Hf)),Vr(e,r++,l);return e},u.ki=function(){var e,n,i,r,c;for(c=new Sp,c.a+="[",e=Ya(this.a),n=0,r=Ya(this.a).i;n1);case 5:return uC(this,5,n,i,r,this.i-a(i,15)._b()>0);default:return new Qd(this.e,e,this.c,n,i,r,!0)}},u.xi=function(){return!0},u.ui=function(){return Zq(this)},u.ij=function(){Dr(this)};var Hqe=A(Re,"EOperationImpl/2",1388);T(456,1,{1631:1,456:1},mEt);var Gqe=A(Re,"EPackageImpl/1",456);T(18,88,Zo,Wt),u.Lj=function(){return this.d},u.Mj=function(){return this.b},u.Pj=function(){return!0},u.b=0;var Wqe=A(hr,"EObjectContainmentWithInverseEList",18);T(364,18,Zo,mM),u.Qj=function(){return!0},u.zh=function(e,n){return X2(this,e,a(n,51))};var $qe=A(hr,"EObjectContainmentWithInverseEList/Resolving",364);T(303,364,Zo,Zv),u.th=function(){this.a.tb=null};var Vqe=A(Re,"EPackageImpl/2",303);T(1155,1,{},Iz);var qqe=A(Re,"EPackageImpl/3",1155);T(650,44,sx,Sit),u.Qb=function(e){return Es(e)?V$(this,e):!!Ea(this.d,e)};var Xqe=A(Re,"EPackageRegistryImpl",650);T(468,268,{95:1,91:1,87:1,139:1,174:1,51:1,1703:1,103:1,431:1,42:1,92:1,142:1,468:1,268:1,107:1,108:1},FG),u.jg=function(e){return ZRt(this,e)},u.ug=function(e,n,i){var r,c,l;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return me(),!!(this.Bb&256);case 3:return me(),!!(this.Bb&512);case 4:return Xt(this.s);case 5:return Xt(this.t);case 6:return me(),l=this.t,l>1||l==-1;case 7:return me(),c=this.s,c>=1;case 8:return n?wl(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?a(this.Cb,53):null}return Xu(this,e-ei((ye(),zw)),Ve((r=a(an(this,16),24),r||zw),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 10:return this.Cb&&(i=(c=this.Db>>16,c>=0?ZRt(this,i):this.Cb.Cg(this,-1-c,null,i))),Lu(this,e,10,i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),zw)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),zw)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 9:return R$(this,i);case 10:return Lu(this,null,10,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),zw)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),zw)),e,i)},u.Fg=function(e){var n,i,r;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return r=this.t,r>1||r==-1;case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&mm(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&mm(this.q).i==0);case 10:return!!(this.Db>>16==10&&a(this.Cb,53))}return Vu(this,e-ei((ye(),zw)),Ve((n=a(an(this,16),24),n||zw),e))},u.Rg=function(){return ye(),zw};var Zqe=A(Re,"EParameterImpl",468);T(62,418,{95:1,91:1,87:1,139:1,174:1,51:1,17:1,158:1,61:1,103:1,431:1,42:1,92:1,142:1,62:1,418:1,268:1,107:1,108:1,615:1},fst),u.ug=function(e,n,i){var r,c,l,f;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return me(),!!(this.Bb&256);case 3:return me(),!!(this.Bb&512);case 4:return Xt(this.s);case 5:return Xt(this.t);case 6:return me(),f=this.t,f>1||f==-1;case 7:return me(),c=this.s,c>=1;case 8:return n?wl(this):this.r;case 9:return this.q;case 10:return me(),!!(this.Bb&oh);case 11:return me(),!!(this.Bb&mw);case 12:return me(),!!(this.Bb&zm);case 13:return this.j;case 14:return iE(this);case 15:return me(),!!(this.Bb&La);case 16:return me(),!!(this.Bb&Lf);case 17:return Zb(this);case 18:return me(),!!(this.Bb&ca);case 19:return me(),l=jo(this),!!(l&&l.Bb&ca);case 20:return me(),!!(this.Bb&ao);case 21:return n?jo(this):this.b;case 22:return n?Rat(this):qkt(this);case 23:return!this.a&&(this.a=new dM(gy,this,23)),this.a}return Xu(this,e-ei((ye(),VE)),Ve((r=a(an(this,16),24),r||VE),e),n,i)},u.Fg=function(e){var n,i,r,c;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return c=this.t,c>1||c==-1;case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&mm(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&mm(this.q).i==0);case 10:return(this.Bb&oh)==0;case 11:return(this.Bb&mw)!=0;case 12:return(this.Bb&zm)!=0;case 13:return this.j!=null;case 14:return iE(this)!=null;case 15:return(this.Bb&La)!=0;case 16:return(this.Bb&Lf)!=0;case 17:return!!Zb(this);case 18:return(this.Bb&ca)!=0;case 19:return r=jo(this),!!r&&(r.Bb&ca)!=0;case 20:return(this.Bb&ao)==0;case 21:return!!this.b;case 22:return!!qkt(this);case 23:return!!this.a&&this.a.i!=0}return Vu(this,e-ei((ye(),VE)),Ve((n=a(an(this,16),24),n||VE),e))},u.Mg=function(e,n){var i,r;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:eV(this,hi(n));return;case 2:f_(this,lt(de(n)));return;case 3:d_(this,lt(de(n)));return;case 4:a_(this,a(n,21).a);return;case 5:OM(this,a(n,21).a);return;case 8:GM(this,a(n,133));return;case 9:r=$1(this,a(n,84),null),r&&r.Th();return;case 10:YN(this,lt(de(n)));return;case 11:ZN(this,lt(de(n)));return;case 12:JN(this,lt(de(n)));return;case 13:Lrt(this,hi(n));return;case 15:KN(this,lt(de(n)));return;case 16:QN(this,lt(de(n)));return;case 18:Boe(this,lt(de(n)));return;case 20:fIt(this,lt(de(n)));return;case 21:dPt(this,a(n,17));return;case 23:!this.a&&(this.a=new dM(gy,this,23)),Dr(this.a),!this.a&&(this.a=new dM(gy,this,23)),Lr(this.a,a(n,13));return}Ku(this,e-ei((ye(),VE)),Ve((i=a(an(this,16),24),i||VE),e),n)},u.Rg=function(){return ye(),VE},u.Xg=function(){Rat(this),MM(qo((Qa(),eo),this)),wl(this),this.Bb|=1},u.$i=function(){return jo(this)},u.Cj=function(){var e;return e=jo(this),!!e&&(e.Bb&ca)!=0},u.Dj=function(){return(this.Bb&ca)!=0},u.Ej=function(){return(this.Bb&ao)!=0},u.zj=function(e,n){return this.c=null,Zat(this,e,n)},u.Ib=function(){var e;return this.Db&64?W7(this):(e=new ul(W7(this)),e.a+=" (containment: ",Cp(e,(this.Bb&ca)!=0),e.a+=", resolveProxies: ",Cp(e,(this.Bb&ao)!=0),e.a+=")",e.a)};var Yqe=A(Re,"EReferenceImpl",62);T(505,108,{95:1,38:1,91:1,87:1,134:1,51:1,103:1,42:1,92:1,505:1,107:1,108:1},BR),u.Fb=function(e){return this===e},u.kc=function(){return this.b},u.lc=function(){return this.c},u.Hb=function(){return lm(this)},u.kh=function(e){Lre(this,hi(e))},u.mc=function(e){return vre(this,hi(e))},u.ug=function(e,n,i){var r;switch(e){case 0:return this.b;case 1:return this.c}return Xu(this,e-ei((ye(),Ho)),Ve((r=a(an(this,16),24),r||Ho),e),n,i)},u.Fg=function(e){var n;switch(e){case 0:return this.b!=null;case 1:return this.c!=null}return Vu(this,e-ei((ye(),Ho)),Ve((n=a(an(this,16),24),n||Ho),e))},u.Mg=function(e,n){var i;switch(e){case 0:Pre(this,hi(n));return;case 1:oPt(this,hi(n));return}Ku(this,e-ei((ye(),Ho)),Ve((i=a(an(this,16),24),i||Ho),e),n)},u.Rg=function(){return ye(),Ho},u.ih=function(){var e;return this.a==-1&&(e=this.b,this.a=e==null?0:j1(e)),this.a},u.jh=function(e){this.a=e},u.Ib=function(){var e;return this.Db&64?nh(this):(e=new ul(nh(this)),e.a+=" (key: ",mo(e,this.b),e.a+=", value: ",mo(e,this.c),e.a+=")",e.a)},u.a=-1,u.b=null,u.c=null;var Dc=A(Re,"EStringToStringMapEntryImpl",505),eXt=Sr(hr,"FeatureMap/Entry/Internal");T(514,1,FO),u.$j=function(e){return this._j(a(e,42))},u._j=function(e){return this.$j(e)},u.Fb=function(e){var n,i;return this===e?!0:ct(e,75)?(n=a(e,75),n.nj()==this.c?(i=this.lc(),i==null?n.lc()==null:Fi(i,n.lc())):!1):!1},u.nj=function(){return this.c},u.Hb=function(){var e;return e=this.lc(),Yr(this.c)^(e==null?0:Yr(e))},u.Ib=function(){var e,n;return e=this.c,n=Zu(e.Wi()).fh(),e.be(),(n!=null&&n.length!=0?n+":"+e.be():e.be())+"="+this.lc()};var Kqe=A(Re,"EStructuralFeatureImpl/BasicFeatureMapEntry",514);T(709,514,FO,_st),u._j=function(e){return new _st(this.c,e)},u.lc=function(){return this.a},u.ak=function(e,n,i){return gle(this,e,this.a,n,i)},u.bk=function(e,n,i){return mle(this,e,this.a,n,i)};var Jqe=A(Re,"EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry",709);T(1363,1,{},bEt),u.cj=function(e,n,i,r,c){var l;return l=a(kL(e,this.b),237),l.yk(this.a).hj(r)},u.dj=function(e,n,i,r,c){var l;return l=a(kL(e,this.b),237),l.pk(this.a,r,c)},u.ej=function(e,n,i,r,c){var l;return l=a(kL(e,this.b),237),l.qk(this.a,r,c)},u.fj=function(e,n,i){var r;return r=a(kL(e,this.b),237),r.yk(this.a).ui()},u.gj=function(e,n,i,r){var c;c=a(kL(e,this.b),237),c.yk(this.a).Gc(r)};var Qqe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator",1363);T(82,1,{},Ip,jg,Op,Wg),u.cj=function(e,n,i,r,c){var l;if(l=n.Tg(i),l==null&&n.Ug(i,l=tft(this,e)),!c)switch(this.e){case 50:case 41:return a(l,533).Hi();case 40:return a(l,237).vk()}return l},u.dj=function(e,n,i,r,c){var l,f;return f=n.Tg(i),f==null&&n.Ug(i,f=tft(this,e)),l=a(f,64).xj(r,c),l},u.ej=function(e,n,i,r,c){var l;return l=n.Tg(i),l!=null&&(c=a(l,64).yj(r,c)),c},u.fj=function(e,n,i){var r;return r=n.Tg(i),r!=null&&a(r,81).ui()},u.gj=function(e,n,i,r){var c;c=a(n.Tg(i),81),!c&&n.Ug(i,c=tft(this,e)),c.Gc(r)},u.b=0,u.e=0;var tXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateMany",82);T(461,1,{}),u.dj=function(e,n,i,r,c){throw K(new Oi)},u.ej=function(e,n,i,r,c){throw K(new Oi)};var lg,eXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingle",461);T(702,461,{},nct),u.cj=function(e,n,i,r,c){return FX(e,e.yg(),e.og())==this.b?this.Ej()&&r?SX(e):e.yg():null},u.dj=function(e,n,i,r,c){var l,f;return e.yg()&&(c=(l=e.og(),l>=0?e.jg(c):e.yg().Cg(e,-1-l,null,c))),f=xr(e.mg(),this.e),e.lg(r,f,c)},u.ej=function(e,n,i,r,c){var l;return l=xr(e.mg(),this.e),e.lg(null,l,c)},u.fj=function(e,n,i){var r;return r=xr(e.mg(),this.e),!!e.yg()&&e.og()==r},u.gj=function(e,n,i,r){var c,l,f,g,b;if(r!=null&&!GX(this.a,r))throw K(new wT(UO+(ct(r,51)?rlt(a(r,51).mg()):Kct(fu(r)))+zO+this.a+"'"));if(c=e.yg(),f=xr(e.mg(),this.e),zt(r)!==zt(c)||e.og()!=f&&r!=null){if(YM(e,a(r,51)))throw K(new yn(T4+e.Ib()));b=null,c&&(b=(l=e.og(),l>=0?e.jg(null):e.yg().Cg(e,-1-l,null,null))),g=a(r,42),g&&(b=g.Ag(e,xr(g.mg(),this.b),null,b)),b=e.lg(g,f,b),b&&b.Th()}else e.eg()&&e.fg()&&Bi(e,new fs(e,1,f,r,r))},u.Ej=function(){return!1};var nXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainer",702);T(1364,702,{},YTt),u.Ej=function(){return!0};var iXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving",1364);T(512,461,{}),u.cj=function(e,n,i,r,c){var l;return l=n.Tg(i),l==null?this.b:zt(l)===zt(lg)?null:l},u.fj=function(e,n,i){var r;return r=n.Tg(i),r!=null&&(zt(r)===zt(lg)||!Fi(r,this.b))},u.gj=function(e,n,i,r){var c,l;e.eg()&&e.fg()?(c=(l=n.Tg(i),l==null?this.b:zt(l)===zt(lg)?null:l),r==null?this.c!=null?(n.Ug(i,null),r=this.b):this.b!=null?n.Ug(i,lg):n.Ug(i,null):(this.ck(r),n.Ug(i,r)),Bi(e,this.d.dk(e,1,this.e,c,r))):r==null?this.c!=null?n.Ug(i,null):this.b!=null?n.Ug(i,lg):n.Ug(i,null):(this.ck(r),n.Ug(i,r))},u.ck=function(e){throw K(new b9)};var rXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData",512);T(V_,1,{},jk),u.dk=function(e,n,i,r,c){return new gL(e,n,i,r,c)},u.ek=function(e,n,i,r,c,l){return new qot(e,n,i,r,c,l)};var e_t,n_t,i_t,r_t,s_t,o_t,c_t,ftt,a_t,sXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator",V_);T(1379,V_,{},Rz),u.dk=function(e,n,i,r,c){return new kct(e,n,i,lt(de(r)),lt(de(c)))},u.ek=function(e,n,i,r,c,l){return new $At(e,n,i,lt(de(r)),lt(de(c)),l)};var oXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1",1379);T(1380,V_,{},Hk),u.dk=function(e,n,i,r,c){return new rat(e,n,i,a(r,192).a,a(c,192).a)},u.ek=function(e,n,i,r,c,l){return new FAt(e,n,i,a(r,192).a,a(c,192).a,l)};var cXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2",1380);T(1381,V_,{},FR),u.dk=function(e,n,i,r,c){return new sat(e,n,i,a(r,159).a,a(c,159).a)},u.ek=function(e,n,i,r,c,l){return new UAt(e,n,i,a(r,159).a,a(c,159).a,l)};var aXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3",1381);T(1382,V_,{},UR),u.dk=function(e,n,i,r,c){return new Cct(e,n,i,lt(Yt(r)),lt(Yt(c)))},u.ek=function(e,n,i,r,c,l){return new zAt(e,n,i,lt(Yt(r)),lt(Yt(c)),l)};var uXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4",1382);T(1383,V_,{},zR),u.dk=function(e,n,i,r,c){return new aat(e,n,i,a(r,126).a,a(c,126).a)},u.ek=function(e,n,i,r,c,l){return new jAt(e,n,i,a(r,126).a,a(c,126).a,l)};var lXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5",1383);T(1384,V_,{},XS),u.dk=function(e,n,i,r,c){return new Act(e,n,i,a(r,21).a,a(c,21).a)},u.ek=function(e,n,i,r,c,l){return new HAt(e,n,i,a(r,21).a,a(c,21).a,l)};var hXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6",1384);T(1385,V_,{},Dz),u.dk=function(e,n,i,r,c){return new oat(e,n,i,a(r,149).a,a(c,149).a)},u.ek=function(e,n,i,r,c,l){return new GAt(e,n,i,a(r,149).a,a(c,149).a,l)};var fXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7",1385);T(1386,V_,{},jR),u.dk=function(e,n,i,r,c){return new cat(e,n,i,a(r,168).a,a(c,168).a)},u.ek=function(e,n,i,r,c,l){return new WAt(e,n,i,a(r,168).a,a(c,168).a,l)};var dXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8",1386);T(1366,512,{},I4t),u.ck=function(e){if(!this.a.Li(e))throw K(new wT(UO+fu(e)+zO+this.a+"'"))};var pXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic",1366);T(1367,512,{},OCt),u.ck=function(e){};var gXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic",1367);T(703,512,{}),u.fj=function(e,n,i){var r;return r=n.Tg(i),r!=null},u.gj=function(e,n,i,r){var c,l;e.eg()&&e.fg()?(c=!0,l=n.Tg(i),l==null?(c=!1,l=this.b):zt(l)===zt(lg)&&(l=null),r==null?this.c!=null?(n.Ug(i,null),r=this.b):n.Ug(i,lg):(this.ck(r),n.Ug(i,r)),Bi(e,this.d.ek(e,1,this.e,l,r,!c))):r==null?this.c!=null?n.Ug(i,null):n.Ug(i,lg):(this.ck(r),n.Ug(i,r))};var mXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable",703);T(1368,703,{},R4t),u.ck=function(e){if(!this.a.Li(e))throw K(new wT(UO+fu(e)+zO+this.a+"'"))};var bXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic",1368);T(1369,703,{},BCt),u.ck=function(e){};var wXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic",1369);T(370,461,{},UD),u.cj=function(e,n,i,r,c){var l,f,g,b,v;if(v=n.Tg(i),this.Zi()&&zt(v)===zt(lg))return null;if(this.Ej()&&r&&v!=null){if(g=a(v,42),g.Eg()&&(b=B1(e,g),g!=b)){if(!GX(this.a,b))throw K(new wT(UO+fu(b)+zO+this.a+"'"));n.Ug(i,v=b),this.Dj()&&(l=a(b,42),f=g.Cg(e,this.b?xr(g.mg(),this.b):-1-xr(e.mg(),this.e),null,null),!l.yg()&&(f=l.Ag(e,this.b?xr(l.mg(),this.b):-1-xr(e.mg(),this.e),null,f)),f&&f.Th()),e.eg()&&e.fg()&&Bi(e,new gL(e,9,this.e,g,b))}return v}else return v},u.dj=function(e,n,i,r,c){var l,f;return f=n.Tg(i),zt(f)===zt(lg)&&(f=null),n.Ug(i,r),this.qi()?zt(f)!==zt(r)&&f!=null&&(l=a(f,42),c=l.Cg(e,xr(l.mg(),this.b),null,c)):this.Dj()&&f!=null&&(c=a(f,42).Cg(e,-1-xr(e.mg(),this.e),null,c)),e.eg()&&e.fg()&&(!c&&(c=new w1(4)),c.Sh(new gL(e,1,this.e,f,r))),c},u.ej=function(e,n,i,r,c){var l;return l=n.Tg(i),zt(l)===zt(lg)&&(l=null),n.Vg(i),e.eg()&&e.fg()&&(!c&&(c=new w1(4)),this.Zi()?c.Sh(new gL(e,2,this.e,l,null)):c.Sh(new gL(e,1,this.e,l,null))),c},u.fj=function(e,n,i){var r;return r=n.Tg(i),r!=null},u.gj=function(e,n,i,r){var c,l,f,g,b;if(r!=null&&!GX(this.a,r))throw K(new wT(UO+(ct(r,51)?rlt(a(r,51).mg()):Kct(fu(r)))+zO+this.a+"'"));b=n.Tg(i),g=b!=null,this.Zi()&&zt(b)===zt(lg)&&(b=null),f=null,this.qi()?zt(b)!==zt(r)&&(b!=null&&(c=a(b,42),f=c.Cg(e,xr(c.mg(),this.b),null,null)),r!=null&&(c=a(r,42),f=c.Ag(e,xr(c.mg(),this.b),null,f))):this.Dj()&&zt(b)!==zt(r)&&(b!=null&&(f=a(b,42).Cg(e,-1-xr(e.mg(),this.e),null,null)),r!=null&&(f=a(r,42).Ag(e,-1-xr(e.mg(),this.e),null,f))),r==null&&this.Zi()?n.Ug(i,lg):n.Ug(i,r),e.eg()&&e.fg()?(l=new qot(e,1,this.e,b,r,this.Zi()&&!g),f?(f.Sh(l),f.Th()):Bi(e,l)):f&&f.Th()},u.qi=function(){return!1},u.Dj=function(){return!1},u.Ej=function(){return!1},u.Zi=function(){return!1};var vXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObject",370);T(513,370,{},KW),u.Dj=function(){return!0};var _Xe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment",513);T(1372,513,{},VSt),u.Ej=function(){return!0};var yXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving",1372);T(705,513,{},ust),u.Zi=function(){return!0};var xXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable",705);T(1374,705,{},qSt),u.Ej=function(){return!0};var MXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving",1374);T(585,513,{},d$),u.qi=function(){return!0};var EXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse",585);T(1373,585,{},KTt),u.Ej=function(){return!0};var SXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving",1373);T(706,585,{},Wst),u.Zi=function(){return!0};var TXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable",706);T(1375,706,{},JTt),u.Ej=function(){return!0};var CXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving",1375);T(586,370,{},ast),u.Ej=function(){return!0};var AXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving",586);T(1376,586,{},XSt),u.Zi=function(){return!0};var kXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable",1376);T(707,586,{},Gst),u.qi=function(){return!0};var LXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse",707);T(1377,707,{},QTt),u.Zi=function(){return!0};var PXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable",1377);T(1370,370,{},ZSt),u.Zi=function(){return!0};var IXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable",1370);T(704,370,{},$st),u.qi=function(){return!0};var RXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse",704);T(1371,704,{},tCt),u.Zi=function(){return!0};var DXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable",1371);T(708,514,FO,Not),u._j=function(e){return new Not(this.a,this.c,e)},u.lc=function(){return this.b},u.ak=function(e,n,i){return Pae(this,e,this.b,i)},u.bk=function(e,n,i){return Iae(this,e,this.b,i)};var NXe=A(Re,"EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry",708);T(1378,514,FO,Ukt),u.$j=function(e){return new n$((fr(),TI),this.b.Zg(this.a,e))},u.lc=function(){return null},u.ak=function(e,n,i){return i},u.bk=function(e,n,i){return i};var OXe=A(Re,"EStructuralFeatureImpl/SimpleContentFeatureMapEntry",1378);T(587,514,FO,n$),u.$j=function(e){return new n$(this.c,e)},u.lc=function(){return this.a},u.ak=function(e,n,i){return i},u.bk=function(e,n,i){return i};var BXe=A(Re,"EStructuralFeatureImpl/SimpleFeatureMapEntry",587);T(361,451,Nf,kb),u.Fh=function(e){return dt(Dl,te,24,e,0,1)},u.Bh=function(){return!1};var FXe=A(Re,"ESuperAdapter/1",361);T(411,399,{95:1,91:1,87:1,139:1,174:1,51:1,103:1,742:1,42:1,92:1,142:1,411:1,107:1,108:1},Gk),u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return!this.a&&(this.a=new pL(this,Do,this)),this.a}return Xu(this,e-ei((ye(),by)),Ve((r=a(an(this,16),24),r||by),e),n,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 2:return!this.a&&(this.a=new pL(this,Do,this)),$s(this.a,e,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),by)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),by)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return!!this.a&&this.a.i!=0}return Vu(this,e-ei((ye(),by)),Ve((n=a(an(this,16),24),n||by),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:kh(this,hi(n));return;case 2:!this.a&&(this.a=new pL(this,Do,this)),Dr(this.a),!this.a&&(this.a=new pL(this,Do,this)),Lr(this.a,a(n,13));return}Ku(this,e-ei((ye(),by)),Ve((i=a(an(this,16),24),i||by),e),n)},u.Rg=function(){return ye(),by};var UXe=A(Re,"ETypeParameterImpl",411);T(457,88,Zo,pL),u.ri=function(e,n){return _1e(this,a(e,84),n)},u.si=function(e,n){return y1e(this,a(e,84),n)};var zXe=A(Re,"ETypeParameterImpl/1",457);T(579,44,sx,zG),u.Xb=function(){return new dT(this)};var jXe=A(Re,"ETypeParameterImpl/2",579);T(508,bd,vl,dT),u.nc=function(e){return iTt(this,a(e,84))},u.oc=function(e){var n,i,r;for(r=!1,i=e.tc();i.hc();)n=a(i.ic(),84),wr(this.a,n,"")==null&&(r=!0);return r},u.Pb=function(){uu(this.a)},u.pc=function(e){return dm(this.a,e)},u.tc=function(){var e;return e=new qg(new xp(this.a).a),new pT(e)},u.vc=function(e){return Xkt(this,e)},u._b=function(){return nM(this.a)};var HXe=A(Re,"ETypeParameterImpl/2/1",508);T(509,1,Cs,pT),u.gc=function(e){ks(this,e)},u.ic=function(){return a(Sm(this.a).kc(),84)},u.hc=function(){return this.a.b},u.jc=function(){R5t(this.a)};var GXe=A(Re,"ETypeParameterImpl/2/1/1",509);T(1169,44,sx,Pxt),u.Qb=function(e){return Es(e)?V$(this,e):!!Ea(this.d,e)},u.Vb=function(e){var n,i;return n=Es(e)?Zc(this,e):Ua(Ea(this.d,e)),ct(n,743)?(i=a(n,743),n=i.mj(),wr(this,a(e,207),n),n):n??(e==null?(JG(),iXt):null)};var WXe=A(Re,"EValidatorRegistryImpl",1169);T(1362,638,{95:1,91:1,87:1,430:1,139:1,51:1,103:1,1635:1,42:1,92:1,142:1,107:1,108:1},HR),u.Zg=function(e,n){switch(e.Ni()){case 21:case 22:case 23:case 24:case 26:case 31:case 32:case 37:case 38:case 39:case 40:case 43:case 44:case 48:case 49:case 20:return n==null?null:Yc(n);case 25:return Fue(n);case 27:return tue(n);case 28:return eue(n);case 29:return n==null?null:oSt(AA[0],a(n,181));case 41:return n==null?"":Og(a(n,274));case 42:return Yc(n);case 50:return hi(n);default:throw K(new yn(_E+e.be()+Gm))}},u.$g=function(e){var n,i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt;switch(e.G==-1&&(e.G=(R=Zu(e),R?Hp(R.bh(),e):-1)),e.G){case 0:return i=new UG,i;case 1:return n=new DR,n;case 2:return r=new l5,r;case 4:return c=new x,c;case 5:return l=new kxt,l;case 6:return f=new A5,f;case 7:return g=new T8,g;case 10:return v=new zl,v;case 11:return M=new BG,M;case 12:return k=new z4t,k;case 13:return O=new FG,O;case 14:return $=new fst,$;case 17:return W=new BR,W;case 18:return b=new b1,b;case 19:return nt=new Gk,nt;default:throw K(new yn(XY+e.zb+Gm))}},u._g=function(e,n){switch(e.Ni()){case 20:return n==null?null:new Lit(n);case 21:return n==null?null:new y1(n);case 23:case 22:return n==null?null:kfe(n);case 26:case 24:return n==null?null:PL(ku(n,-128,127)<<24>>24);case 25:return cme(n);case 27:return Rde(n);case 28:return Dde(n);case 29:return ige(n);case 32:case 31:return n==null?null:rw(n);case 38:case 37:return n==null?null:new bT(n);case 40:case 39:return n==null?null:Xt(ku(n,Vs,qi));case 41:return null;case 42:return n==null,null;case 44:case 43:return n==null?null:Qg(J7(n));case 49:case 48:return n==null?null:HM(ku(n,jO,32767)<<16>>16);case 50:return n;default:throw K(new yn(_E+e.be()+Gm))}};var $Xe=A(Re,"EcoreFactoryImpl",1362);T(504,248,{95:1,91:1,87:1,139:1,174:1,51:1,207:1,103:1,1633:1,42:1,92:1,142:1,248:1,504:1,107:1,108:1,613:1},w4t),u.gb=!1,u.hb=!1;var u_t,nXt=!1,VXe=A(Re,"EcorePackageImpl",504);T(1111,1,{743:1},Nz),u.mj=function(){return dSt(),rXt};var qXe=A(Re,"EcorePackageImpl/1",1111);T(1120,1,wi,Wk),u.Li=function(e){return ct(e,139)},u.Mi=function(e){return dt(bI,te,139,e,0,1)};var XXe=A(Re,"EcorePackageImpl/10",1120);T(1121,1,wi,GR),u.Li=function(e){return ct(e,174)},u.Mi=function(e){return dt(itt,te,174,e,0,1)};var ZXe=A(Re,"EcorePackageImpl/11",1121);T(1122,1,wi,$k),u.Li=function(e){return ct(e,51)},u.Mi=function(e){return dt(Nw,te,51,e,0,1)};var YXe=A(Re,"EcorePackageImpl/12",1122);T(1123,1,wi,Oz),u.Li=function(e){return ct(e,371)},u.Mi=function(e){return dt(ph,Jpt,53,e,0,1)};var KXe=A(Re,"EcorePackageImpl/13",1123);T(1124,1,wi,Vk),u.Li=function(e){return ct(e,207)},u.Mi=function(e){return dt(of,te,207,e,0,1)};var JXe=A(Re,"EcorePackageImpl/14",1124);T(1125,1,wi,oo),u.Li=function(e){return ct(e,468)},u.Mi=function(e){return dt(Fw,te,1703,e,0,1)};var QXe=A(Re,"EcorePackageImpl/15",1125);T(1126,1,wi,Bz),u.Li=function(e){return ct(e,62)},u.Mi=function(e){return dt(Uw,$_,17,e,0,1)};var tZe=A(Re,"EcorePackageImpl/16",1126);T(1127,1,wi,Fz),u.Li=function(e){return ct(e,158)},u.Mi=function(e){return dt(Ra,$_,158,e,0,1)};var eZe=A(Re,"EcorePackageImpl/17",1127);T(1128,1,wi,U3),u.Li=function(e){return ct(e,431)},u.Mi=function(e){return dt(Bw,te,431,e,0,1)};var nZe=A(Re,"EcorePackageImpl/18",1128);T(1129,1,wi,WR),u.Li=function(e){return ct(e,505)},u.Mi=function(e){return dt(Dc,vUt,505,e,0,1)};var iZe=A(Re,"EcorePackageImpl/19",1129);T(1112,1,wi,Uz),u.Li=function(e){return ct(e,335)},u.Mi=function(e){return dt(gy,$_,29,e,0,1)};var rZe=A(Re,"EcorePackageImpl/2",1112);T(1130,1,wi,zz),u.Li=function(e){return ct(e,217)},u.Mi=function(e){return dt(Do,OUt,84,e,0,1)};var sZe=A(Re,"EcorePackageImpl/20",1130);T(1131,1,wi,yp),u.Li=function(e){return ct(e,411)},u.Mi=function(e){return dt(wu,te,742,e,0,1)};var oZe=A(Re,"EcorePackageImpl/21",1131);T(1132,1,wi,jz),u.Li=function(e){return Hb(e)},u.Mi=function(e){return dt(ho,wt,434,e,8,1)};var cZe=A(Re,"EcorePackageImpl/22",1132);T(1133,1,wi,ZS),u.Li=function(e){return ct(e,173)},u.Mi=function(e){return dt(Da,wt,173,e,0,2)};var aZe=A(Re,"EcorePackageImpl/23",1133);T(1134,1,wi,qk),u.Li=function(e){return ct(e,192)},u.Mi=function(e){return dt(px,wt,192,e,0,1)};var uZe=A(Re,"EcorePackageImpl/24",1134);T(1135,1,wi,$R),u.Li=function(e){return ct(e,159)},u.Mi=function(e){return dt(U4,wt,159,e,0,1)};var lZe=A(Re,"EcorePackageImpl/25",1135);T(1136,1,wi,VR),u.Li=function(e){return ct(e,181)},u.Mi=function(e){return dt(tB,wt,181,e,0,1)};var hZe=A(Re,"EcorePackageImpl/26",1136);T(1137,1,wi,Fd),u.Li=function(e){return!1},u.Mi=function(e){return dt(C_t,te,1787,e,0,1)};var fZe=A(Re,"EcorePackageImpl/27",1137);T(1138,1,wi,Lb),u.Li=function(e){return Gb(e)},u.Mi=function(e){return dt(To,wt,315,e,7,1)};var dZe=A(Re,"EcorePackageImpl/28",1138);T(1139,1,wi,Xk),u.Li=function(e){return ct(e,52)},u.Mi=function(e){return dt(Hvt,fw,52,e,0,1)};var pZe=A(Re,"EcorePackageImpl/29",1139);T(1113,1,wi,qR),u.Li=function(e){return ct(e,469)},u.Mi=function(e){return dt(Ui,{3:1,4:1,5:1,1627:1},609,e,0,1)};var gZe=A(Re,"EcorePackageImpl/3",1113);T(1140,1,wi,YS),u.Li=function(e){return ct(e,525)},u.Mi=function(e){return dt($vt,te,1634,e,0,1)};var mZe=A(Re,"EcorePackageImpl/30",1140);T(1141,1,wi,XR),u.Li=function(e){return ct(e,184)},u.Mi=function(e){return dt(p_t,fw,184,e,0,1)};var bZe=A(Re,"EcorePackageImpl/31",1141);T(1142,1,wi,Zk),u.Li=function(e){return ct(e,75)},u.Mi=function(e){return dt(KF,$Ut,75,e,0,1)};var wZe=A(Re,"EcorePackageImpl/32",1142);T(1143,1,wi,ZR),u.Li=function(e){return ct(e,126)},u.Mi=function(e){return dt(CE,wt,126,e,0,1)};var vZe=A(Re,"EcorePackageImpl/33",1143);T(1144,1,wi,Yk),u.Li=function(e){return ct(e,21)},u.Mi=function(e){return dt(Io,wt,21,e,0,1)};var _Ze=A(Re,"EcorePackageImpl/34",1144);T(1145,1,wi,Kk),u.Li=function(e){return ct(e,274)},u.Mi=function(e){return dt(h1t,te,274,e,0,1)};var yZe=A(Re,"EcorePackageImpl/35",1145);T(1146,1,wi,Pb),u.Li=function(e){return ct(e,149)},u.Mi=function(e){return dt(Vm,wt,149,e,0,1)};var xZe=A(Re,"EcorePackageImpl/36",1146);T(1147,1,wi,Hz),u.Li=function(e){return ct(e,109)},u.Mi=function(e){return dt(f1t,te,109,e,0,1)};var MZe=A(Re,"EcorePackageImpl/37",1147);T(1148,1,wi,Ib),u.Li=function(e){return ct(e,534)},u.Mi=function(e){return dt(l_t,te,534,e,0,1)};var EZe=A(Re,"EcorePackageImpl/38",1148);T(1149,1,wi,YR),u.Li=function(e){return!1},u.Mi=function(e){return dt(A_t,te,1788,e,0,1)};var SZe=A(Re,"EcorePackageImpl/39",1149);T(1114,1,wi,KR),u.Li=function(e){return ct(e,96)},u.Mi=function(e){return dt(Dl,te,24,e,0,1)};var TZe=A(Re,"EcorePackageImpl/4",1114);T(1150,1,wi,Jk),u.Li=function(e){return ct(e,168)},u.Mi=function(e){return dt(qm,wt,168,e,0,1)};var CZe=A(Re,"EcorePackageImpl/40",1150);T(1151,1,wi,Gz),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var AZe=A(Re,"EcorePackageImpl/41",1151);T(1152,1,wi,Wz),u.Li=function(e){return ct(e,532)},u.Mi=function(e){return dt(Wvt,te,532,e,0,1)};var kZe=A(Re,"EcorePackageImpl/42",1152);T(1153,1,wi,$z),u.Li=function(e){return!1},u.Mi=function(e){return dt(k_t,wt,1789,e,0,1)};var LZe=A(Re,"EcorePackageImpl/43",1153);T(1154,1,wi,JR),u.Li=function(e){return ct(e,38)},u.Mi=function(e){return dt(q_,te,38,e,0,1)};var PZe=A(Re,"EcorePackageImpl/44",1154);T(1115,1,wi,QR),u.Li=function(e){return ct(e,133)},u.Mi=function(e){return dt(cf,te,133,e,0,1)};var IZe=A(Re,"EcorePackageImpl/5",1115);T(1116,1,wi,Vz),u.Li=function(e){return ct(e,140)},u.Mi=function(e){return dt(utt,te,140,e,0,1)};var RZe=A(Re,"EcorePackageImpl/6",1116);T(1117,1,wi,t8),u.Li=function(e){return ct(e,425)},u.Mi=function(e){return dt(YF,te,608,e,0,1)};var DZe=A(Re,"EcorePackageImpl/7",1117);T(1118,1,wi,e8),u.Li=function(e){return ct(e,525)},u.Mi=function(e){return dt(Qp,te,617,e,0,1)};var NZe=A(Re,"EcorePackageImpl/8",1118);T(1119,1,wi,td),u.Li=function(e){return ct(e,430)},u.Mi=function(e){return dt(CA,te,430,e,0,1)};var OZe=A(Re,"EcorePackageImpl/9",1119);T(915,1673,wUt,$xt),u.sh=function(e,n){she(this,a(n,380))},u.vh=function(e,n){$8t(this,e,a(n,380))};var BZe=A(Re,"MinimalEObjectImpl/1ArrayDelegatingAdapterList",915);T(916,136,c6,c4t),u.Oh=function(){return this.a.a};var FZe=A(Re,"MinimalEObjectImpl/1ArrayDelegatingAdapterList/1",916);T(955,954,{},KEt);var UZe=A("org.eclipse.emf.ecore.plugin","EcorePlugin",955),l_t=Sr(VUt,"Resource");T(719,1492,qUt),u.ik=function(e){},u.jk=function(e){},u.fk=function(){return!this.a&&(this.a=new T5(this)),this.a},u.gk=function(e){var n,i,r,c,l;if(r=e.length,r>0)if(e.charCodeAt(0)==47){for(l=new qu(4),c=1,n=1;n0&&(e=e.substr(0,i)));return B0e(this,e)},u.hk=function(){return this.c},u.Ib=function(){return Og(this.ql)+"@"+(Yr(this)>>>0).toString(16)+" uri='"+this.d+"'"},u.b=!1;var zZe=A(uK,"ResourceImpl",719);T(1493,719,qUt,kG);var jZe=A(uK,"BinaryResourceImpl",1493);T(1048,629,iK),u.Gh=function(e){return ct(e,51)?coe(this,a(e,51)):ct(e,534)?new $n(a(e,534).fk()):zt(e)===zt(this.f)?a(e,13).tc():(KT(),_I.a)},u.hc=function(){return Flt(this)},u.a=!1;var HZe=A(hr,"EcoreUtil/ContentTreeIterator",1048);T(1494,1048,iK,GCt),u.Gh=function(e){return zt(e)===zt(this.f)?a(e,15).tc():new lkt(a(e,51))};var GZe=A(uK,"ResourceImpl/5",1494);T(595,1687,NUt,T5),u.pc=function(e){return this.i<=4?ZC(this,e):ct(e,42)&&a(e,42).sg()==this.a},u.sh=function(e,n){e==this.i-1&&(this.a.b||(this.a.b=!0))},u.uh=function(e,n){e==0?this.a.b||(this.a.b=!0):wV(this,e,n)},u.vh=function(e,n){},u.wh=function(e,n,i){},u.pi=function(){return 2},u.Oh=function(){return this.a},u.qi=function(){return!0},u.ri=function(e,n){var i;return i=a(e,42),n=i.Pg(this.a,n),n},u.si=function(e,n){var i;return i=a(e,42),i.Pg(null,n)},u.ti=function(){return!1},u.xh=function(){return!0},u.Fh=function(e){return dt(Nw,te,51,e,0,1)},u.Bh=function(){return!1};var WZe=A(uK,"ResourceImpl/ContentsEList",595);T(873,1657,tx,C5),u.fd=function(e){return this.a.qh(e)},u._b=function(){return this.a._b()};var $Ze=A(hr,"AbstractSequentialInternalEList/1",873),h_t,f_t,eo,d_t;T(567,1,{},lCt);var JF,QF,VZe=A(hr,"BasicExtendedMetaData",567);T(1023,1,{},wEt),u.kk=function(){return null},u.lk=function(){return this.a==-2&&Vnt(this,rge(this.d,this.b)),this.a},u.mk=function(){return null},u.nk=function(){return we(),we(),fo},u.be=function(){return this.c==ME&&Vj(this,nRt(this.d,this.b)),this.c},u.ok=function(){return 0},u.a=-2,u.c=ME;var qZe=A(hr,"BasicExtendedMetaData/EClassExtendedMetaDataImpl",1023);T(oh,1,{},qAt),u.kk=function(){return this.a==(PM(),JF)&&qnt(this,vwe(this.f,this.b)),this.a},u.lk=function(){return 0},u.mk=function(){return this.c==(PM(),JF)&&qj(this,_we(this.f,this.b)),this.c},u.nk=function(){return!this.d&&Xnt(this,Jve(this.f,this.b)),this.d},u.be=function(){return this.e==ME&&Znt(this,nRt(this.f,this.b)),this.e},u.ok=function(){return this.g==-2&&Ynt(this,R1e(this.f,this.b)),this.g},u.e=ME,u.g=-2;var XZe=A(hr,"BasicExtendedMetaData/EDataTypeExtendedMetaDataImpl",oh);T(1022,1,{},vEt),u.b=!1,u.c=!1;var ZZe=A(hr,"BasicExtendedMetaData/EPackageExtendedMetaDataImpl",1022);T(1025,1,{},XAt),u.c=-2,u.e=ME,u.f=ME;var YZe=A(hr,"BasicExtendedMetaData/EStructuralFeatureExtendedMetaDataImpl",1025);T(529,565,Zo,PD),u.pi=function(){return this.c},u.Rj=function(){return!1},u.zh=function(e,n){return n},u.c=0;var KZe=A(hr,"EDataTypeEList",529),p_t=Sr(hr,"FeatureMap");T(90,529,{3:1,4:1,20:1,25:1,41:1,13:1,15:1,49:1,59:1,55:1,52:1,81:1,184:1,237:1,1630:1,64:1},_s),u.bd=function(e,n){ybe(this,e,a(n,75))},u.nc=function(e){return nbe(this,a(e,75))},u.nh=function(e){wse(this,a(e,75))},u.ri=function(e,n){return Lne(this,a(e,75),n)},u.si=function(e,n){return Ust(this,a(e,75),n)},u.zh=function(e,n){return Yye(this,e,a(n,75))},u.hd=function(e,n){return Kbe(this,e,a(n,75))},u.yi=function(e,n){return Pne(this,a(e,75),n)},u.zi=function(e,n){return UTt(this,a(e,75),n)},u.Ai=function(e,n,i){return G1e(this,a(e,75),a(n,75),i)},u.Ch=function(e,n){return lX(this,e,a(n,75))},u.oc=function(e){var n,i,r,c,l,f,g,b,v;for(b=new i_(e._b()),r=e.tc();r.hc();)if(i=a(r.ic(),75),c=i.nj(),Om(this.e,c))(!c.xh()||!_V(this,c,i.lc())&&!ZC(b,i))&&ni(b,i);else{for(v=gu(this.e.mg(),c),n=a(this.g,124),l=!0,f=0;f=0;)if(n=e[this.c],this.k.Bk(n.nj()))return this.j=this.f?n:n.lc(),this.i=-2,!0;return this.i=-1,this.g=-1,!1};var tYe=A(hr,"BasicFeatureMap/FeatureEIterator",377);T(601,377,kf,LW),u.Xj=function(){return!0};var eYe=A(hr,"BasicFeatureMap/ResolvingFeatureEIterator",601);T(871,444,OO,cSt),u.Uh=function(){return this};var nYe=A(hr,"EContentsEList/1",871);T(872,444,OO,LEt),u.Xj=function(){return!1};var iYe=A(hr,"EContentsEList/2",872);T(870,260,BO,aSt),u.Zj=function(e){},u.hc=function(){return!1},u.Cc=function(){return!1};var rYe=A(hr,"EContentsEList/FeatureIteratorImpl/1",870);T(734,529,Zo,Vrt),u.th=function(){this.a=!0},u.ui=function(){return this.a},u.ij=function(){var e;Dr(this),Xl(this.e)?(e=this.a,this.a=!1,Bi(this.e,new Jl(this.e,2,this.c,e,!1))):this.a=!1},u.a=!1;var sYe=A(hr,"EDataTypeEList/Unsettable",734);T(1566,529,Zo,bSt),u.xh=function(){return!0};var oYe=A(hr,"EDataTypeUniqueEList",1566);T(1567,734,Zo,wSt),u.xh=function(){return!0};var cYe=A(hr,"EDataTypeUniqueEList/Unsettable",1567);T(156,88,Zo,Gu),u.Qj=function(){return!0},u.zh=function(e,n){return X2(this,e,a(n,51))};var aYe=A(hr,"EObjectContainmentEList/Resolving",156);T(1026,493,Zo,mSt),u.Qj=function(){return!0},u.zh=function(e,n){return X2(this,e,a(n,51))};var uYe=A(hr,"EObjectContainmentEList/Unsettable/Resolving",1026);T(679,18,Zo,Ast),u.th=function(){this.a=!0},u.ui=function(){return this.a},u.ij=function(){var e;Dr(this),Xl(this.e)?(e=this.a,this.a=!1,Bi(this.e,new Jl(this.e,2,this.c,e,!1))):this.a=!1},u.a=!1;var lYe=A(hr,"EObjectContainmentWithInverseEList/Unsettable",679);T(1044,679,Zo,_Tt),u.Qj=function(){return!0},u.zh=function(e,n){return X2(this,e,a(n,51))};var hYe=A(hr,"EObjectContainmentWithInverseEList/Unsettable/Resolving",1044);T(675,450,Zo,qrt),u.th=function(){this.a=!0},u.ui=function(){return this.a},u.ij=function(){var e;Dr(this),Xl(this.e)?(e=this.a,this.a=!1,Bi(this.e,new Jl(this.e,2,this.c,e,!1))):this.a=!1},u.a=!1;var fYe=A(hr,"EObjectEList/Unsettable",675);T(376,450,Zo,dM),u.Qj=function(){return!0},u.zh=function(e,n){return X2(this,e,a(n,51))};var dYe=A(hr,"EObjectResolvingEList",376);T(1554,675,Zo,vSt),u.Qj=function(){return!0},u.zh=function(e,n){return X2(this,e,a(n,51))};var pYe=A(hr,"EObjectResolvingEList/Unsettable",1554);T(1495,1,{},Ig);var iXt,gYe=A(hr,"EObjectValidator",1495);T(496,450,Zo,XD),u.Lj=function(){return this.d},u.Mj=function(){return this.b},u.qi=function(){return!0},u.Pj=function(){return!0},u.b=0;var mYe=A(hr,"EObjectWithInverseEList",496);T(1047,496,Zo,yTt),u.Oj=function(){return!0};var bYe=A(hr,"EObjectWithInverseEList/ManyInverse",1047);T(572,496,Zo,s$),u.th=function(){this.a=!0},u.ui=function(){return this.a},u.ij=function(){var e;Dr(this),Xl(this.e)?(e=this.a,this.a=!1,Bi(this.e,new Jl(this.e,2,this.c,e,!1))):this.a=!1},u.a=!1;var wYe=A(hr,"EObjectWithInverseEList/Unsettable",572);T(1046,572,Zo,xTt),u.Oj=function(){return!0};var vYe=A(hr,"EObjectWithInverseEList/Unsettable/ManyInverse",1046);T(680,496,Zo,kst),u.Qj=function(){return!0},u.zh=function(e,n){return X2(this,e,a(n,51))};var _Ye=A(hr,"EObjectWithInverseResolvingEList",680);T(33,680,Zo,pn),u.Oj=function(){return!0};var yYe=A(hr,"EObjectWithInverseResolvingEList/ManyInverse",33);T(681,572,Zo,Lst),u.Qj=function(){return!0},u.zh=function(e,n){return X2(this,e,a(n,51))};var xYe=A(hr,"EObjectWithInverseResolvingEList/Unsettable",681);T(1045,681,Zo,MTt),u.Oj=function(){return!0};var MYe=A(hr,"EObjectWithInverseResolvingEList/Unsettable/ManyInverse",1045);T(1027,565,Zo),u.rh=function(){return(this.b&1792)==0},u.th=function(){this.b|=1},u.Nj=function(){return(this.b&4)!=0},u.qi=function(){return(this.b&40)!=0},u.Oj=function(){return(this.b&16)!=0},u.Pj=function(){return(this.b&8)!=0},u.Qj=function(){return(this.b&mw)!=0},u.Dj=function(){return(this.b&32)!=0},u.Rj=function(){return(this.b&oh)!=0},u.Li=function(e){return this.d?ukt(this.d,e):this.nj().jj().Li(e)},u.ui=function(){return this.b&2?(this.b&1)!=0:this.i!=0},u.xh=function(){return(this.b&128)!=0},u.ij=function(){var e;Dr(this),this.b&2&&(Xl(this.e)?(e=(this.b&1)!=0,this.b&=-2,Wn(this,new Jl(this.e,2,xr(this.e.mg(),this.nj()),e,!1))):this.b&=-2)},u.Bh=function(){return(this.b&1536)==0},u.b=0;var EYe=A(hr,"EcoreEList/Generic",1027);T(1028,1027,Zo,H4t),u.nj=function(){return this.a};var SYe=A(hr,"EcoreEList/Dynamic",1028);T(678,55,Nf,mT),u.Fh=function(e){return jL(this.a.a,e)};var TYe=A(hr,"EcoreEMap/1",678);T(677,88,Zo,_ot),u.sh=function(e,n){m7(this.b,a(n,134))},u.uh=function(e,n){VPt(this.b)},u.vh=function(e,n){Tq(this.b,a(n,134))},u.wh=function(e,n,i){Tq(this.b,a(i,134)),zt(i)===zt(n)&&a(i,134).jh(oee(a(n,134).kc())),m7(this.b,a(n,134))};var CYe=A(hr,"EcoreEMap/DelegateEObjectContainmentEList",677);T(1042,143,Kpt,QLt);var AYe=A(hr,"EcoreEMap/Unsettable",1042);T(1043,677,Zo,ETt),u.th=function(){this.a=!0},u.ui=function(){return this.a},u.ij=function(){var e;Dr(this),Xl(this.e)?(e=this.a,this.a=!1,Bi(this.e,new Jl(this.e,2,this.c,e,!1))):this.a=!1},u.a=!1;var kYe=A(hr,"EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList",1043);T(682,1,Cs,lkt),u.gc=function(e){ks(this,e)},u.hc=function(){return zIt(this)},u.ic=function(){var e;return zIt(this),e=this.b,this.b=null,e},u.jc=function(){this.a.jc()};var LYe=A(hr,"EcoreUtil/ProperContentIterator",682);T(1496,1495,{},Tj);var rXt,PYe=A(hr,"EcoreValidator",1496),sXt,IYe=Sr(hr,"FeatureMapUtil/Validator");T(1095,1,{1632:1},qz),u.Bk=function(e){return!0};var RYe=A(hr,"FeatureMapUtil/1",1095);T(692,1,{1632:1},Zht),u.Bk=function(e){var n;return this.c==e?!0:(n=de(zi(this.a,e)),n==null?uve(this,e)?(t5t(this.a,e,(me(),TE)),!0):(t5t(this.a,e,(me(),$m)),!1):n==(me(),TE))},u.e=!1;var dtt,DYe=A(hr,"FeatureMapUtil/BasicValidator",692);T(693,44,sx,Hrt);var NYe=A(hr,"FeatureMapUtil/BasicValidator/Cache",693);T(455,41,{20:1,25:1,41:1,13:1,15:1,52:1,81:1,64:1},X5),u.bd=function(e,n){XDt(this.c,this.b,e,n)},u.nc=function(e){return Ove(this.c,this.b,e)},u.oc=function(e){return VT(this,e)},u.xj=function(e,n){return yht(this.c,this.b,e,n)},u.Dh=function(e){return X7(this.c,this.b,e,!1)},u.oh=function(){return WEt(this.c,this.b)},u.ph=function(){return Qte(this.c,this.b)},u.qh=function(e){return Lae(this.c,this.b,e)},u.yj=function(e,n){return rTt(this,e,n)},u.Pb=function(){St(this)},u.pc=function(e){return _V(this.c,this.b,e)},u.qc=function(e){return dle(this.c,this.b,e)},u.cd=function(e){return X7(this.c,this.b,e,!0)},u.hj=function(e){return this},u.dd=function(e){return zae(this.c,this.b,e)},u.Wb=function(){return tD(this)},u.ui=function(){return!cP(this.c,this.b)},u.tc=function(){return Vue(this.c,this.b)},u.ed=function(){return que(this.c,this.b)},u.fd=function(e){return vfe(this.c,this.b,e)},u.gd=function(e){return X8t(this.c,this.b,e)},u.vc=function(e){return Tve(this.c,this.b,e)},u.hd=function(e,n){return t7t(this.c,this.b,e,n)},u.Gc=function(e){k7(this.c,this.b),VT(this,a(e,15))},u._b=function(){return Ghe(this.c,this.b)},u.yc=function(){return nae(this.c,this.b)},u.zc=function(e){return jae(this.c,this.b,e)},u.Ib=function(){var e,n;for(n=new Sp,n.a+="[",e=WEt(this.c,this.b);dq(e);)mo(n,$T(p7(e))),dq(e)&&(n.a+=Rc);return n.a+="]",n.a},u.ij=function(){k7(this.c,this.b)};var OYe=A(hr,"FeatureMapUtil/FeatureEList",455);T(575,32,c6,aV),u.Mh=function(e){return NC(this,e)},u.Rh=function(e){var n,i,r,c,l,f,g;switch(this.d){case 1:case 2:{if(l=e.Oh(),zt(l)===zt(this.c)&&NC(this,null)==e.Mh(null))return this.g=e.Nh(),e.Lh()==1&&(this.d=1),!0;break}case 3:{switch(c=e.Lh(),c){case 3:{if(l=e.Oh(),zt(l)===zt(this.c)&&NC(this,null)==e.Mh(null))return this.d=5,n=new i_(2),ni(n,this.g),ni(n,e.Nh()),this.g=n,!0;break}}break}case 5:{switch(c=e.Lh(),c){case 3:{if(l=e.Oh(),zt(l)===zt(this.c)&&NC(this,null)==e.Mh(null))return i=a(this.g,13),i.nc(e.Nh()),!0;break}}break}case 4:{switch(c=e.Lh(),c){case 3:{if(l=e.Oh(),zt(l)===zt(this.c)&&NC(this,null)==e.Mh(null))return this.d=1,this.g=e.Nh(),!0;break}case 4:{if(l=e.Oh(),zt(l)===zt(this.c)&&NC(this,null)==e.Mh(null))return this.d=6,g=new i_(2),ni(g,this.n),ni(g,e.Ph()),this.n=g,f=Y(Z(Gn,1),pi,22,15,[this.o,e.Qh()]),this.g=f,!0;break}}break}case 6:{switch(c=e.Lh(),c){case 4:{if(l=e.Oh(),zt(l)===zt(this.c)&&NC(this,null)==e.Mh(null))return i=a(this.n,13),i.nc(e.Ph()),f=a(this.g,37),r=dt(Gn,pi,22,f.length+1,15,1),Aa(f,0,r,0,f.length),r[f.length]=e.Qh(),this.g=r,!0;break}}break}}return!1};var BYe=A(hr,"FeatureMapUtil/FeatureENotificationImpl",575);T(501,455,{20:1,25:1,41:1,13:1,15:1,52:1,81:1,184:1,237:1,1630:1,64:1},ND),u.pk=function(e,n,i){return yht(this.c,e,n,i)},u.qk=function(e,n,i){return Bht(this.c,e,n,i)},u.rk=function(){return this},u.sk=function(e,n){return NP(this.c,e,n)},u.tk=function(e){return a(X7(this.c,this.b,e,!1),75).nj()},u.uk=function(e){return a(X7(this.c,this.b,e,!1),75).lc()},u.vk=function(){return this.a},u.wk=function(e){return!cP(this.c,e)},u.xk=function(e,n){eZ(this.c,e,n)},u.yk=function(e){return aPt(this.c,e)};var FYe=A(hr,"FeatureMapUtil/FeatureFeatureMap",501);T(1094,1,{81:1},xEt),u.hj=function(e){return X7(this.b,this.a,-1,e)},u.ui=function(){return!cP(this.b,this.a)},u.Gc=function(e){eZ(this.b,this.a,e)},u.ij=function(){k7(this.b,this.a)};var UYe=A(hr,"FeatureMapUtil/FeatureValue",1094),jx,ptt,gtt,Hx,oXt,xI=Sr($O,"AnyType");T(603,54,rp,qG);var zYe=A($O,"InvalidDatatypeValueException",603),tU=Sr($O,ZUt),MI=Sr($O,YUt),g_t=Sr($O,KUt),cXt,_c,m_t,jw,aXt,uXt,lXt,hXt,fXt,dXt,pXt,gXt,mXt,bXt,wXt,qE,vXt,XE,EI,_Xt,wy,eU,nU,yXt,SI,TI;T(735,463,{95:1,91:1,87:1,51:1,42:1,92:1,746:1},Eit),u.ug=function(e,n,i){switch(e){case 0:return i?(!this.c&&(this.c=new _s(this,0)),this.c):(!this.c&&(this.c=new _s(this,0)),this.c.b);case 1:return i?(!this.c&&(this.c=new _s(this,0)),a(Za(this.c,(fr(),jw)),184)):(!this.c&&(this.c=new _s(this,0)),a(a(Za(this.c,(fr(),jw)),184),237)).vk();case 2:return i?(!this.b&&(this.b=new _s(this,2)),this.b):(!this.b&&(this.b=new _s(this,2)),this.b.b)}return Xu(this,e-ei(this.Rg()),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():this.Rg(),e),n,i)},u.Dg=function(e,n,i){var r;switch(n){case 0:return!this.c&&(this.c=new _s(this,0)),IP(this.c,e,i);case 1:return(!this.c&&(this.c=new _s(this,0)),a(a(Za(this.c,(fr(),jw)),184),64)).yj(e,i);case 2:return!this.b&&(this.b=new _s(this,2)),IP(this.b,e,i)}return r=a(Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():this.Rg(),n),61),r.aj().ej(this,Zct(this),n-ei(this.Rg()),e,i)},u.Fg=function(e){switch(e){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new _s(this,0)),a(Za(this.c,(fr(),jw)),184)).Wb();case 2:return!!this.b&&this.b.i!=0}return Vu(this,e-ei(this.Rg()),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():this.Rg(),e))},u.Mg=function(e,n){switch(e){case 0:!this.c&&(this.c=new _s(this,0)),mL(this.c,n);return;case 1:(!this.c&&(this.c=new _s(this,0)),a(a(Za(this.c,(fr(),jw)),184),237)).Gc(n);return;case 2:!this.b&&(this.b=new _s(this,2)),mL(this.b,n);return}Ku(this,e-ei(this.Rg()),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():this.Rg(),e),n)},u.Rg=function(){return fr(),m_t},u.Ib=function(){var e;return this.j&4?nh(this):(e=new ul(nh(this)),e.a+=" (mixed: ",IT(e,this.c),e.a+=", anyAttribute: ",IT(e,this.b),e.a+=")",e.a)};var jYe=A(Xr,"AnyTypeImpl",735);T(604,463,{95:1,91:1,87:1,51:1,42:1,92:1,1707:1,604:1},Xz),u.ug=function(e,n,i){switch(e){case 0:return this.a;case 1:return this.b}return Xu(this,e-ei((fr(),qE)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():qE,e),n,i)},u.Fg=function(e){switch(e){case 0:return this.a!=null;case 1:return this.b!=null}return Vu(this,e-ei((fr(),qE)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():qE,e))},u.Mg=function(e,n){switch(e){case 0:nit(this,hi(n));return;case 1:rit(this,hi(n));return}Ku(this,e-ei((fr(),qE)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():qE,e),n)},u.Rg=function(){return fr(),qE},u.Ib=function(){var e;return this.j&4?nh(this):(e=new ul(nh(this)),e.a+=" (data: ",mo(e,this.a),e.a+=", target: ",mo(e,this.b),e.a+=")",e.a)},u.a=null,u.b=null;var HYe=A(Xr,"ProcessingInstructionImpl",604);T(605,735,{95:1,91:1,87:1,51:1,42:1,92:1,746:1,1708:1,605:1},Axt),u.ug=function(e,n,i){switch(e){case 0:return i?(!this.c&&(this.c=new _s(this,0)),this.c):(!this.c&&(this.c=new _s(this,0)),this.c.b);case 1:return i?(!this.c&&(this.c=new _s(this,0)),a(Za(this.c,(fr(),jw)),184)):(!this.c&&(this.c=new _s(this,0)),a(a(Za(this.c,(fr(),jw)),184),237)).vk();case 2:return i?(!this.b&&(this.b=new _s(this,2)),this.b):(!this.b&&(this.b=new _s(this,2)),this.b.b);case 3:return!this.c&&(this.c=new _s(this,0)),hi(NP(this.c,(fr(),EI),!0));case 4:return Pst(this.a,(!this.c&&(this.c=new _s(this,0)),hi(NP(this.c,(fr(),EI),!0))));case 5:return this.a}return Xu(this,e-ei((fr(),XE)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():XE,e),n,i)},u.Fg=function(e){switch(e){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new _s(this,0)),a(Za(this.c,(fr(),jw)),184)).Wb();case 2:return!!this.b&&this.b.i!=0;case 3:return!this.c&&(this.c=new _s(this,0)),hi(NP(this.c,(fr(),EI),!0))!=null;case 4:return Pst(this.a,(!this.c&&(this.c=new _s(this,0)),hi(NP(this.c,(fr(),EI),!0))))!=null;case 5:return!!this.a}return Vu(this,e-ei((fr(),XE)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():XE,e))},u.Mg=function(e,n){switch(e){case 0:!this.c&&(this.c=new _s(this,0)),mL(this.c,n);return;case 1:(!this.c&&(this.c=new _s(this,0)),a(a(Za(this.c,(fr(),jw)),184),237)).Gc(n);return;case 2:!this.b&&(this.b=new _s(this,2)),mL(this.b,n);return;case 3:ZAt(this,hi(n));return;case 4:ZAt(this,TTt(this.a,n));return;case 5:iit(this,a(n,140));return}Ku(this,e-ei((fr(),XE)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():XE,e),n)},u.Rg=function(){return fr(),XE};var GYe=A(Xr,"SimpleAnyTypeImpl",605);T(606,463,{95:1,91:1,87:1,51:1,42:1,92:1,1709:1,606:1},Cxt),u.ug=function(e,n,i){switch(e){case 0:return i?(!this.a&&(this.a=new _s(this,0)),this.a):(!this.a&&(this.a=new _s(this,0)),this.a.b);case 1:return i?(!this.b&&(this.b=new lu((ye(),Ho),Dc,this,1)),this.b):(!this.b&&(this.b=new lu((ye(),Ho),Dc,this,1)),AL(this.b));case 2:return i?(!this.c&&(this.c=new lu((ye(),Ho),Dc,this,2)),this.c):(!this.c&&(this.c=new lu((ye(),Ho),Dc,this,2)),AL(this.c));case 3:return!this.a&&(this.a=new _s(this,0)),Za(this.a,(fr(),eU));case 4:return!this.a&&(this.a=new _s(this,0)),Za(this.a,(fr(),nU));case 5:return!this.a&&(this.a=new _s(this,0)),Za(this.a,(fr(),SI));case 6:return!this.a&&(this.a=new _s(this,0)),Za(this.a,(fr(),TI))}return Xu(this,e-ei((fr(),wy)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():wy,e),n,i)},u.Dg=function(e,n,i){var r;switch(n){case 0:return!this.a&&(this.a=new _s(this,0)),IP(this.a,e,i);case 1:return!this.b&&(this.b=new lu((ye(),Ho),Dc,this,1)),SD(this.b,e,i);case 2:return!this.c&&(this.c=new lu((ye(),Ho),Dc,this,2)),SD(this.c,e,i);case 5:return!this.a&&(this.a=new _s(this,0)),rTt(Za(this.a,(fr(),SI)),e,i)}return r=a(Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():(fr(),wy),n),61),r.aj().ej(this,Zct(this),n-ei((fr(),wy)),e,i)},u.Fg=function(e){switch(e){case 0:return!!this.a&&this.a.i!=0;case 1:return!!this.b&&this.b.f!=0;case 2:return!!this.c&&this.c.f!=0;case 3:return!this.a&&(this.a=new _s(this,0)),!tD(Za(this.a,(fr(),eU)));case 4:return!this.a&&(this.a=new _s(this,0)),!tD(Za(this.a,(fr(),nU)));case 5:return!this.a&&(this.a=new _s(this,0)),!tD(Za(this.a,(fr(),SI)));case 6:return!this.a&&(this.a=new _s(this,0)),!tD(Za(this.a,(fr(),TI)))}return Vu(this,e-ei((fr(),wy)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():wy,e))},u.Mg=function(e,n){switch(e){case 0:!this.a&&(this.a=new _s(this,0)),mL(this.a,n);return;case 1:!this.b&&(this.b=new lu((ye(),Ho),Dc,this,1)),zN(this.b,n);return;case 2:!this.c&&(this.c=new lu((ye(),Ho),Dc,this,2)),zN(this.c,n);return;case 3:!this.a&&(this.a=new _s(this,0)),St(Za(this.a,(fr(),eU))),!this.a&&(this.a=new _s(this,0)),VT(Za(this.a,eU),a(n,13));return;case 4:!this.a&&(this.a=new _s(this,0)),St(Za(this.a,(fr(),nU))),!this.a&&(this.a=new _s(this,0)),VT(Za(this.a,nU),a(n,13));return;case 5:!this.a&&(this.a=new _s(this,0)),St(Za(this.a,(fr(),SI))),!this.a&&(this.a=new _s(this,0)),VT(Za(this.a,SI),a(n,13));return;case 6:!this.a&&(this.a=new _s(this,0)),St(Za(this.a,(fr(),TI))),!this.a&&(this.a=new _s(this,0)),VT(Za(this.a,TI),a(n,13));return}Ku(this,e-ei((fr(),wy)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():wy,e),n)},u.Rg=function(){return fr(),wy},u.Ib=function(){var e;return this.j&4?nh(this):(e=new ul(nh(this)),e.a+=" (mixed: ",IT(e,this.a),e.a+=")",e.a)};var WYe=A(Xr,"XMLTypeDocumentRootImpl",606);T(1626,638,{95:1,91:1,87:1,430:1,139:1,51:1,103:1,42:1,92:1,142:1,107:1,108:1,1710:1},KS),u.Zg=function(e,n){switch(e.Ni()){case 7:case 8:case 9:case 10:case 16:case 22:case 23:case 24:case 25:case 26:case 32:case 33:case 34:case 36:case 37:case 44:case 45:case 50:case 51:case 53:case 55:case 56:case 57:case 58:case 60:case 61:case 4:return n==null?null:Yc(n);case 19:case 28:case 29:case 35:case 38:case 39:case 41:case 46:case 52:case 54:case 5:return hi(n);case 6:return ine(a(n,173));case 12:case 47:case 49:case 11:return B7t(this,e,n);case 13:return n==null?null:D_e(a(n,216));case 15:case 14:return n==null?null:use(lt(Yt(n)));case 17:return l8t((fr(),n));case 18:return l8t(n);case 21:case 20:return n==null?null:lse(a(n,126).a);case 27:return rne(a(n,173));case 30:return RRt((fr(),a(n,15)));case 31:return RRt(a(n,15));case 40:return qee((fr(),n));case 42:return h8t((fr(),n));case 43:return h8t(n);case 59:case 48:return Vee((fr(),n));default:throw K(new yn(_E+e.be()+Gm))}},u.$g=function(e){var n,i,r,c,l;switch(e.G==-1&&(e.G=(i=Zu(e),i?Hp(i.bh(),e):-1)),e.G){case 0:return n=new Eit,n;case 1:return r=new Xz,r;case 2:return c=new Axt,c;case 3:return l=new Cxt,l;default:throw K(new yn(XY+e.zb+Gm))}},u._g=function(e,n){var i,r,c,l,f,g,b,v,M,k,R,O,$,W,nt,rt;switch(e.Ni()){case 5:case 52:case 4:return n;case 6:return vde(n);case 8:case 7:return n==null?null:r1e(n);case 9:return n==null?null:PL(ku((r=Hc(n,!0),r.length>0&&r.charCodeAt(0)==43?r.substr(1,r.length-1):r),-128,127)<<24>>24);case 10:return n==null?null:PL(ku((c=Hc(n,!0),c.length>0&&c.charCodeAt(0)==43?c.substr(1,c.length-1):c),-128,127)<<24>>24);case 11:return hi(Bm(this,(fr(),lXt),n));case 12:return hi(Bm(this,(fr(),hXt),n));case 13:return n==null?null:new Lit(Hc(n,!0));case 15:case 14:return Lme(n);case 16:return hi(Bm(this,(fr(),fXt),n));case 17:return qIt((fr(),n));case 18:return qIt(n);case 28:case 29:case 35:case 38:case 39:case 41:case 54:case 19:return Hc(n,!0);case 21:case 20:return jme(n);case 22:return hi(Bm(this,(fr(),dXt),n));case 23:return hi(Bm(this,(fr(),pXt),n));case 24:return hi(Bm(this,(fr(),gXt),n));case 25:return hi(Bm(this,(fr(),mXt),n));case 26:return hi(Bm(this,(fr(),bXt),n));case 27:return ide(n);case 30:return XIt((fr(),n));case 31:return XIt(n);case 32:return n==null?null:Xt(ku((M=Hc(n,!0),M.length>0&&M.charCodeAt(0)==43?M.substr(1,M.length-1):M),Vs,qi));case 33:return n==null?null:new y1((k=Hc(n,!0),k.length>0&&k.charCodeAt(0)==43?k.substr(1,k.length-1):k));case 34:return n==null?null:Xt(ku((R=Hc(n,!0),R.length>0&&R.charCodeAt(0)==43?R.substr(1,R.length-1):R),Vs,qi));case 36:return n==null?null:Qg(J7((O=Hc(n,!0),O.length>0&&O.charCodeAt(0)==43?O.substr(1,O.length-1):O)));case 37:return n==null?null:Qg(J7(($=Hc(n,!0),$.length>0&&$.charCodeAt(0)==43?$.substr(1,$.length-1):$)));case 40:return nfe((fr(),n));case 42:return ZIt((fr(),n));case 43:return ZIt(n);case 44:return n==null?null:new y1((W=Hc(n,!0),W.length>0&&W.charCodeAt(0)==43?W.substr(1,W.length-1):W));case 45:return n==null?null:new y1((nt=Hc(n,!0),nt.length>0&&nt.charCodeAt(0)==43?nt.substr(1,nt.length-1):nt));case 46:return Hc(n,!1);case 47:return hi(Bm(this,(fr(),wXt),n));case 59:case 48:return efe((fr(),n));case 49:return hi(Bm(this,(fr(),vXt),n));case 50:return n==null?null:HM(ku((rt=Hc(n,!0),rt.length>0&&rt.charCodeAt(0)==43?rt.substr(1,rt.length-1):rt),jO,32767)<<16>>16);case 51:return n==null?null:HM(ku((l=Hc(n,!0),l.length>0&&l.charCodeAt(0)==43?l.substr(1,l.length-1):l),jO,32767)<<16>>16);case 53:return hi(Bm(this,(fr(),_Xt),n));case 55:return n==null?null:HM(ku((f=Hc(n,!0),f.length>0&&f.charCodeAt(0)==43?f.substr(1,f.length-1):f),jO,32767)<<16>>16);case 56:return n==null?null:HM(ku((g=Hc(n,!0),g.length>0&&g.charCodeAt(0)==43?g.substr(1,g.length-1):g),jO,32767)<<16>>16);case 57:return n==null?null:Qg(J7((b=Hc(n,!0),b.length>0&&b.charCodeAt(0)==43?b.substr(1,b.length-1):b)));case 58:return n==null?null:Qg(J7((v=Hc(n,!0),v.length>0&&v.charCodeAt(0)==43?v.substr(1,v.length-1):v)));case 60:return n==null?null:Xt(ku((i=Hc(n,!0),i.length>0&&i.charCodeAt(0)==43?i.substr(1,i.length-1):i),Vs,qi));case 61:return n==null?null:Xt(ku(Hc(n,!0),Vs,qi));default:throw K(new yn(_E+e.be()+Gm))}};var xXt,b_t,MXt,w_t,$Ye=A(Xr,"XMLTypeFactoryImpl",1626);T(530,248,{95:1,91:1,87:1,139:1,174:1,51:1,207:1,103:1,42:1,92:1,142:1,248:1,107:1,108:1,613:1,1639:1,530:1},b4t),u.N=!1,u.O=!1;var EXt=!1,VYe=A(Xr,"XMLTypePackageImpl",530);T(1569,1,{743:1},Jy),u.mj=function(){return Aht(),RXt};var qYe=A(Xr,"XMLTypePackageImpl/1",1569);T(1578,1,wi,n8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var XYe=A(Xr,"XMLTypePackageImpl/10",1578);T(1579,1,wi,i8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var ZYe=A(Xr,"XMLTypePackageImpl/11",1579);T(1580,1,wi,Zz),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var YYe=A(Xr,"XMLTypePackageImpl/12",1580);T(1581,1,wi,r8),u.Li=function(e){return Gb(e)},u.Mi=function(e){return dt(To,wt,315,e,7,1)};var KYe=A(Xr,"XMLTypePackageImpl/13",1581);T(1582,1,wi,Qy),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var JYe=A(Xr,"XMLTypePackageImpl/14",1582);T(1583,1,wi,z3),u.Li=function(e){return ct(e,15)},u.Mi=function(e){return dt(Sl,fw,15,e,0,1)};var QYe=A(Xr,"XMLTypePackageImpl/15",1583);T(1584,1,wi,Yz),u.Li=function(e){return ct(e,15)},u.Mi=function(e){return dt(Sl,fw,15,e,0,1)};var tKe=A(Xr,"XMLTypePackageImpl/16",1584);T(1585,1,wi,s8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var eKe=A(Xr,"XMLTypePackageImpl/17",1585);T(1586,1,wi,o8),u.Li=function(e){return ct(e,126)},u.Mi=function(e){return dt(CE,wt,126,e,0,1)};var nKe=A(Xr,"XMLTypePackageImpl/18",1586);T(1587,1,wi,JS),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var iKe=A(Xr,"XMLTypePackageImpl/19",1587);T(1570,1,wi,c8),u.Li=function(e){return ct(e,746)},u.Mi=function(e){return dt(xI,te,746,e,0,1)};var rKe=A(Xr,"XMLTypePackageImpl/2",1570);T(1588,1,wi,QS),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var sKe=A(Xr,"XMLTypePackageImpl/20",1588);T(1589,1,wi,Qk),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var oKe=A(Xr,"XMLTypePackageImpl/21",1589);T(1590,1,wi,tT),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var cKe=A(Xr,"XMLTypePackageImpl/22",1590);T(1591,1,wi,Kz),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var aKe=A(Xr,"XMLTypePackageImpl/23",1591);T(1592,1,wi,a8),u.Li=function(e){return ct(e,173)},u.Mi=function(e){return dt(Da,wt,173,e,0,2)};var uKe=A(Xr,"XMLTypePackageImpl/24",1592);T(1593,1,wi,eT),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var lKe=A(Xr,"XMLTypePackageImpl/25",1593);T(1594,1,wi,u8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var hKe=A(Xr,"XMLTypePackageImpl/26",1594);T(1595,1,wi,t5),u.Li=function(e){return ct(e,15)},u.Mi=function(e){return dt(Sl,fw,15,e,0,1)};var fKe=A(Xr,"XMLTypePackageImpl/27",1595);T(1596,1,wi,Jz),u.Li=function(e){return ct(e,15)},u.Mi=function(e){return dt(Sl,fw,15,e,0,1)};var dKe=A(Xr,"XMLTypePackageImpl/28",1596);T(1597,1,wi,l8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var pKe=A(Xr,"XMLTypePackageImpl/29",1597);T(1571,1,wi,Q0),u.Li=function(e){return ct(e,604)},u.Mi=function(e){return dt(tU,te,1707,e,0,1)};var gKe=A(Xr,"XMLTypePackageImpl/3",1571);T(1598,1,wi,h8),u.Li=function(e){return ct(e,21)},u.Mi=function(e){return dt(Io,wt,21,e,0,1)};var mKe=A(Xr,"XMLTypePackageImpl/30",1598);T(1599,1,wi,f8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var bKe=A(Xr,"XMLTypePackageImpl/31",1599);T(1600,1,wi,Qz),u.Li=function(e){return ct(e,149)},u.Mi=function(e){return dt(Vm,wt,149,e,0,1)};var wKe=A(Xr,"XMLTypePackageImpl/32",1600);T(1601,1,wi,d8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var vKe=A(Xr,"XMLTypePackageImpl/33",1601);T(1602,1,wi,tj),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var _Ke=A(Xr,"XMLTypePackageImpl/34",1602);T(1603,1,wi,ej),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var yKe=A(Xr,"XMLTypePackageImpl/35",1603);T(1604,1,wi,tm),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var xKe=A(Xr,"XMLTypePackageImpl/36",1604);T(1605,1,wi,e5),u.Li=function(e){return ct(e,15)},u.Mi=function(e){return dt(Sl,fw,15,e,0,1)};var MKe=A(Xr,"XMLTypePackageImpl/37",1605);T(1606,1,wi,n5),u.Li=function(e){return ct(e,15)},u.Mi=function(e){return dt(Sl,fw,15,e,0,1)};var EKe=A(Xr,"XMLTypePackageImpl/38",1606);T(1607,1,wi,i5),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var SKe=A(Xr,"XMLTypePackageImpl/39",1607);T(1572,1,wi,nT),u.Li=function(e){return ct(e,605)},u.Mi=function(e){return dt(MI,te,1708,e,0,1)};var TKe=A(Xr,"XMLTypePackageImpl/4",1572);T(1608,1,wi,t2),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var CKe=A(Xr,"XMLTypePackageImpl/40",1608);T(1609,1,wi,cs),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var AKe=A(Xr,"XMLTypePackageImpl/41",1609);T(1610,1,wi,iT),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var kKe=A(Xr,"XMLTypePackageImpl/42",1610);T(1611,1,wi,r5),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var LKe=A(Xr,"XMLTypePackageImpl/43",1611);T(1612,1,wi,Ev),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var PKe=A(Xr,"XMLTypePackageImpl/44",1612);T(1613,1,wi,nj),u.Li=function(e){return ct(e,168)},u.Mi=function(e){return dt(qm,wt,168,e,0,1)};var IKe=A(Xr,"XMLTypePackageImpl/45",1613);T(1614,1,wi,s5),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var RKe=A(Xr,"XMLTypePackageImpl/46",1614);T(1615,1,wi,p8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var DKe=A(Xr,"XMLTypePackageImpl/47",1615);T(1616,1,wi,zh),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var NKe=A(Xr,"XMLTypePackageImpl/48",1616);T(1617,1,wi,ij),u.Li=function(e){return ct(e,168)},u.Mi=function(e){return dt(qm,wt,168,e,0,1)};var OKe=A(Xr,"XMLTypePackageImpl/49",1617);T(1573,1,wi,rj),u.Li=function(e){return ct(e,606)},u.Mi=function(e){return dt(g_t,te,1709,e,0,1)};var BKe=A(Xr,"XMLTypePackageImpl/5",1573);T(1618,1,wi,g8),u.Li=function(e){return ct(e,149)},u.Mi=function(e){return dt(Vm,wt,149,e,0,1)};var FKe=A(Xr,"XMLTypePackageImpl/50",1618);T(1619,1,wi,sj),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var UKe=A(Xr,"XMLTypePackageImpl/51",1619);T(1620,1,wi,m8),u.Li=function(e){return ct(e,21)},u.Mi=function(e){return dt(Io,wt,21,e,0,1)};var zKe=A(Xr,"XMLTypePackageImpl/52",1620);T(1574,1,wi,oj),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var jKe=A(Xr,"XMLTypePackageImpl/6",1574);T(1575,1,wi,cj),u.Li=function(e){return ct(e,173)},u.Mi=function(e){return dt(Da,wt,173,e,0,2)};var HKe=A(Xr,"XMLTypePackageImpl/7",1575);T(1576,1,wi,aj),u.Li=function(e){return Hb(e)},u.Mi=function(e){return dt(ho,wt,434,e,8,1)};var GKe=A(Xr,"XMLTypePackageImpl/8",1576);T(1577,1,wi,em),u.Li=function(e){return ct(e,192)},u.Mi=function(e){return dt(px,wt,192,e,0,1)};var WKe=A(Xr,"XMLTypePackageImpl/9",1577),af,t1,IA,iU,et;T(40,54,rp,ri);var $Ke=A(qp,"RegEx/ParseException",40);T(730,1,{},jh),u.Ck=function(e){return ei*16)throw K(new ri(ai((Kn(),aUt))));i=i*16+c}while(!0);if(this.a!=125)throw K(new ri(ai((Kn(),uUt))));if(i>EE)throw K(new ri(ai((Kn(),lUt))));e=i}else{if(c=0,this.c!=0||(c=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(i=c,Ci(this),this.c!=0||(c=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));i=i*16+c,e=i}break;case 117:if(r=0,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));n=n*16+r,e=n;break;case 118:if(Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,n>EE)throw K(new ri(ai((Kn(),"parser.descappe.4"))));e=n;break;case 65:case 90:case 122:throw K(new ri(ai((Kn(),hUt))))}return e},u.Ek=function(e){var n;switch(e){case 100:n=(this.e&32)==32?Z1("Nd",!0):(Ai(),rU);break;case 68:n=(this.e&32)==32?Z1("Nd",!1):(Ai(),E_t);break;case 119:n=(this.e&32)==32?Z1("IsWord",!0):(Ai(),KE);break;case 87:n=(this.e&32)==32?Z1("IsWord",!1):(Ai(),T_t);break;case 115:n=(this.e&32)==32?Z1("IsSpace",!0):(Ai(),Gx);break;case 83:n=(this.e&32)==32?Z1("IsSpace",!1):(Ai(),S_t);break;default:throw K(new sc(hzt+e.toString(16)))}return n},u.Fk=function(e){var n,i,r,c,l,f,g,b,v,M,k,R;for(this.b=1,Ci(this),n=null,this.c==0&&this.a==94?(Ci(this),e?M=(Ai(),Ai(),++Ar,new Su(5)):(n=(Ai(),Ai(),++Ar,new Su(4)),jc(n,0,EE),M=(++Ar,new Su(4)))):M=(Ai(),Ai(),++Ar,new Su(4)),c=!0;(R=this.c)!=1&&!(R==0&&this.a==93&&!c);){if(c=!1,i=this.a,r=!1,R==10)switch(i){case 100:case 68:case 119:case 87:case 115:case 83:uw(M,this.Ek(i)),r=!0;break;case 105:case 73:case 99:case 67:i=this.Vk(M,i),i<0&&(r=!0);break;case 112:case 80:if(k=Plt(this,i),!k)throw K(new ri(ai((Kn(),oK))));uw(M,k),r=!0;break;default:i=this.Dk()}else if(R==20){if(f=hM(this.i,58,this.d),f<0)throw K(new ri(ai((Kn(),$pt))));if(g=!0,bo(this.i,this.d)==94&&(++this.d,g=!1),l=$h(this.i,this.d,f),b=U5t(l,g,(this.e&512)==512),!b)throw K(new ri(ai((Kn(),iUt))));if(uw(M,b),r=!0,f+1>=this.j||bo(this.i,f+1)!=93)throw K(new ri(ai((Kn(),$pt))));this.d=f+2}if(Ci(this),!r)if(this.c!=0||this.a!=45)jc(M,i,i);else{if(Ci(this),(R=this.c)==1)throw K(new ri(ai((Kn(),RO))));R==0&&this.a==93?(jc(M,i,i),jc(M,45,45)):(v=this.a,R==10&&(v=this.Dk()),Ci(this),jc(M,i,v))}(this.e&oh)==oh&&this.c==0&&this.a==44&&Ci(this)}if(this.c==1)throw K(new ri(ai((Kn(),RO))));return n&&(f4(n,M),M=n),E_(M),h4(M),this.b=0,Ci(this),M},u.Gk=function(){var e,n,i,r;for(i=this.Fk(!1);(r=this.c)!=7;)if(e=this.a,r==0&&(e==45||e==38)||r==4){if(Ci(this),this.c!=9)throw K(new ri(ai((Kn(),sUt))));if(n=this.Fk(!1),r==4)uw(i,n);else if(e==45)f4(i,n);else if(e==38)R7t(i,n);else throw K(new sc("ASSERT"))}else throw K(new ri(ai((Kn(),oUt))));return Ci(this),i},u.Hk=function(){var e,n;return e=this.a-48,n=(Ai(),Ai(),++Ar,new K$(12,null,e)),!this.g&&(this.g=new nd),Cn(this.g,new g9(e)),Ci(this),n},u.Ik=function(){return Ci(this),Ai(),CXt},u.Jk=function(){return Ci(this),Ai(),TXt},u.Kk=function(){throw K(new ri(ai((Kn(),el))))},u.Lk=function(){throw K(new ri(ai((Kn(),el))))},u.Mk=function(){return Ci(this),Kle()},u.Nk=function(){return Ci(this),Ai(),kXt},u.Ok=function(){return Ci(this),Ai(),PXt},u.Pk=function(){var e;if(this.d>=this.j||((e=bo(this.i,this.d++))&65504)!=64)throw K(new ri(ai((Kn(),tUt))));return Ci(this),Ai(),Ai(),++Ar,new ud(0,e-64)},u.Qk=function(){return Ci(this),w_e()},u.Rk=function(){return Ci(this),Ai(),IXt},u.Sk=function(){var e;return e=(Ai(),Ai(),++Ar,new ud(0,105)),Ci(this),e},u.Tk=function(){return Ci(this),Ai(),LXt},u.Uk=function(){return Ci(this),Ai(),AXt},u.Vk=function(e,n){return this.Dk()},u.Wk=function(){return Ci(this),Ai(),x_t},u.Xk=function(){var e,n,i,r,c;if(this.d+1>=this.j)throw K(new ri(ai((Kn(),KFt))));if(r=-1,n=null,e=bo(this.i,this.d),49<=e&&e<=57){if(r=e-48,!this.g&&(this.g=new nd),Cn(this.g,new g9(r)),++this.d,bo(this.i,this.d)!=41)throw K(new ri(ai((Kn(),g0))));++this.d}else switch(e==63&&--this.d,Ci(this),n=Kht(this),n.e){case 20:case 21:case 22:case 23:break;case 8:if(this.c!=7)throw K(new ri(ai((Kn(),g0))));break;default:throw K(new ri(ai((Kn(),JFt))))}if(Ci(this),c=Lm(this),i=null,c.e==2){if(c.ol()!=2)throw K(new ri(ai((Kn(),QFt))));i=c.kl(1),c=c.kl(0)}if(this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),Ai(),Ai(),++Ar,new fLt(r,n,c,i)},u.Yk=function(){return Ci(this),Ai(),M_t},u.Zk=function(){var e;if(Ci(this),e=ZD(24,Lm(this)),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u.$k=function(){var e;if(Ci(this),e=ZD(20,Lm(this)),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u._k=function(){var e;if(Ci(this),e=ZD(22,Lm(this)),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u.al=function(){var e,n,i,r,c;for(e=0,i=0,n=-1;this.d=this.j)throw K(new ri(ai((Kn(),Gpt))));if(n==45){for(++this.d;this.d=this.j)throw K(new ri(ai((Kn(),Gpt))))}if(n==58){if(++this.d,Ci(this),r=t4t(Lm(this),e,i),this.c!=7)throw K(new ri(ai((Kn(),g0))));Ci(this)}else if(n==41)++this.d,Ci(this),r=t4t(Lm(this),e,i);else throw K(new ri(ai((Kn(),YFt))));return r},u.bl=function(){var e;if(Ci(this),e=ZD(21,Lm(this)),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u.cl=function(){var e;if(Ci(this),e=ZD(23,Lm(this)),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u.dl=function(){var e,n;if(Ci(this),e=this.f++,n=E$(Lm(this),e),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),n},u.el=function(){var e;if(Ci(this),e=E$(Lm(this),0),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u.fl=function(e){return Ci(this),this.c==5?(Ci(this),jD(e,(Ai(),Ai(),++Ar,new Yb(9,e)))):jD(e,(Ai(),Ai(),++Ar,new Yb(3,e)))},u.gl=function(e){var n;return Ci(this),n=(Ai(),Ai(),++Ar,new WT(2)),this.c==5?(Ci(this),s0(n,DA),s0(n,e)):(s0(n,e),s0(n,DA)),n},u.hl=function(e){return Ci(this),this.c==5?(Ci(this),Ai(),Ai(),++Ar,new Yb(9,e)):(Ai(),Ai(),++Ar,new Yb(3,e))},u.a=0,u.b=0,u.c=0,u.d=0,u.e=0,u.f=1,u.g=null,u.j=0;var VKe=A(qp,"RegEx/RegexParser",730);T(1564,730,{},Ixt),u.Ck=function(e){return!1},u.Dk=function(){return hht(this)},u.Ek=function(e){return rE(e)},u.Fk=function(e){return mOt(this)},u.Gk=function(){throw K(new ri(ai((Kn(),el))))},u.Hk=function(){throw K(new ri(ai((Kn(),el))))},u.Ik=function(){throw K(new ri(ai((Kn(),el))))},u.Jk=function(){throw K(new ri(ai((Kn(),el))))},u.Kk=function(){return Ci(this),rE(67)},u.Lk=function(){return Ci(this),rE(73)},u.Mk=function(){throw K(new ri(ai((Kn(),el))))},u.Nk=function(){throw K(new ri(ai((Kn(),el))))},u.Ok=function(){throw K(new ri(ai((Kn(),el))))},u.Pk=function(){return Ci(this),rE(99)},u.Qk=function(){throw K(new ri(ai((Kn(),el))))},u.Rk=function(){throw K(new ri(ai((Kn(),el))))},u.Sk=function(){return Ci(this),rE(105)},u.Tk=function(){throw K(new ri(ai((Kn(),el))))},u.Uk=function(){throw K(new ri(ai((Kn(),el))))},u.Vk=function(e,n){return uw(e,rE(n)),-1},u.Wk=function(){return Ci(this),Ai(),Ai(),++Ar,new ud(0,94)},u.Xk=function(){throw K(new ri(ai((Kn(),el))))},u.Yk=function(){return Ci(this),Ai(),Ai(),++Ar,new ud(0,36)},u.Zk=function(){throw K(new ri(ai((Kn(),el))))},u.$k=function(){throw K(new ri(ai((Kn(),el))))},u._k=function(){throw K(new ri(ai((Kn(),el))))},u.al=function(){throw K(new ri(ai((Kn(),el))))},u.bl=function(){throw K(new ri(ai((Kn(),el))))},u.cl=function(){throw K(new ri(ai((Kn(),el))))},u.dl=function(){var e;if(Ci(this),e=E$(Lm(this),0),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u.el=function(){throw K(new ri(ai((Kn(),el))))},u.fl=function(e){return Ci(this),jD(e,(Ai(),Ai(),++Ar,new Yb(3,e)))},u.gl=function(e){var n;return Ci(this),n=(Ai(),Ai(),++Ar,new WT(2)),s0(n,e),s0(n,DA),n},u.hl=function(e){return Ci(this),Ai(),Ai(),++Ar,new Yb(3,e)};var vy=null,ZE=null,qKe=A(qp,"RegEx/ParserForXMLSchema",1564);T(112,1,SE,Ba),u.il=function(e){throw K(new sc("Not supported."))},u.jl=function(){return-1},u.kl=function(e){return null},u.ll=function(){return null},u.ml=function(e){},u.nl=function(e){},u.ol=function(){return 0},u.Ib=function(){return this.pl(0)},u.pl=function(e){return this.e==11?".":""},u.e=0;var v_t,YE,RA,SXt,__t,Hw=null,rU,mtt=null,y_t,DA,btt=null,x_t,M_t,E_t,S_t,T_t,TXt,Gx,CXt,AXt,kXt,LXt,KE,PXt,IXt,Ar=0,iMe=A(qp,"RegEx/Token",112);T(130,112,{3:1,130:1,112:1},Su),u.pl=function(e){var n,i,r;if(this.e==4)if(this==y_t)i=".";else if(this==rU)i="\\d";else if(this==KE)i="\\w";else if(this==Gx)i="\\s";else{for(r=new Sp,r.a+="[",n=0;n0&&(r.a+=","),this.b[n]===this.b[n+1]?mo(r,DP(this.b[n])):(mo(r,DP(this.b[n])),r.a+="-",mo(r,DP(this.b[n+1])));r.a+="]",i=r.a}else if(this==E_t)i="\\D";else if(this==T_t)i="\\W";else if(this==S_t)i="\\S";else{for(r=new Sp,r.a+="[^",n=0;n0&&(r.a+=","),this.b[n]===this.b[n+1]?mo(r,DP(this.b[n])):(mo(r,DP(this.b[n])),r.a+="-",mo(r,DP(this.b[n+1])));r.a+="]",i=r.a}return i},u.a=!1,u.c=!1;var XKe=A(qp,"RegEx/RangeToken",130);T(528,1,{528:1},g9),u.a=0;var ZKe=A(qp,"RegEx/RegexParser/ReferencePosition",528);T(527,1,{3:1,527:1},iMt),u.Fb=function(e){var n;return e==null||!ct(e,527)?!1:(n=a(e,527),le(this.b,n.b)&&this.a==n.a)},u.Hb=function(){return j1(this.b+"/"+oht(this.a))},u.Ib=function(){return this.c.pl(this.a)},u.a=0;var YKe=A(qp,"RegEx/RegularExpression",527);T(195,112,SE,ud),u.jl=function(){return this.a},u.pl=function(e){var n,i;switch(this.e){case 0:switch(this.a){case 124:case 42:case 43:case 63:case 40:case 41:case 46:case 91:case 123:case 92:i="\\"+r$(this.a&qr);break;case 12:i="\\f";break;case 10:i="\\n";break;case 13:i="\\r";break;case 9:i="\\t";break;case 27:i="\\e";break;default:this.a>=ao?(n="0"+(this.a>>>0).toString(16),i="\\v"+$h(n,n.length-6,n.length)):i=""+r$(this.a&qr)}break;case 8:this==x_t||this==M_t?i=""+r$(this.a&qr):i="\\"+r$(this.a&qr);break;default:i=null}return i},u.a=0;var KKe=A(qp,"RegEx/Token/CharToken",195);T(283,112,SE,Yb),u.kl=function(e){return this.a},u.ml=function(e){this.b=e},u.nl=function(e){this.c=e},u.ol=function(){return 1},u.pl=function(e){var n;if(this.e==3)if(this.c<0&&this.b<0)n=this.a.pl(e)+"*";else if(this.c==this.b)n=this.a.pl(e)+"{"+this.c+"}";else if(this.c>=0&&this.b>=0)n=this.a.pl(e)+"{"+this.c+","+this.b+"}";else if(this.c>=0&&this.b<0)n=this.a.pl(e)+"{"+this.c+",}";else throw K(new sc("Token#toString(): CLOSURE "+this.c+Rc+this.b));else if(this.c<0&&this.b<0)n=this.a.pl(e)+"*?";else if(this.c==this.b)n=this.a.pl(e)+"{"+this.c+"}?";else if(this.c>=0&&this.b>=0)n=this.a.pl(e)+"{"+this.c+","+this.b+"}?";else if(this.c>=0&&this.b<0)n=this.a.pl(e)+"{"+this.c+",}?";else throw K(new sc("Token#toString(): NONGREEDYCLOSURE "+this.c+Rc+this.b));return n},u.b=0,u.c=0;var JKe=A(qp,"RegEx/Token/ClosureToken",283);T(731,112,SE,Tot),u.kl=function(e){return e==0?this.a:this.b},u.ol=function(){return 2},u.pl=function(e){var n;return this.b.e==3&&this.b.kl(0)==this.a?n=this.a.pl(e)+"+":this.b.e==9&&this.b.kl(0)==this.a?n=this.a.pl(e)+"+?":n=this.a.pl(e)+(""+this.b.pl(e)),n};var QKe=A(qp,"RegEx/Token/ConcatToken",731);T(1562,112,SE,fLt),u.kl=function(e){if(e==0)return this.d;if(e==1)return this.b;throw K(new sc("Internal Error: "+e))},u.ol=function(){return this.b?2:1},u.pl=function(e){var n;return this.c>0?n="(?("+this.c+")":this.a.e==8?n="(?("+this.a+")":n="(?"+this.a,this.b?n+=this.d+"|"+this.b+")":n+=this.d+")",n},u.c=0;var tJe=A(qp,"RegEx/Token/ConditionToken",1562);T(1563,112,SE,PAt),u.kl=function(e){return this.b},u.ol=function(){return 1},u.pl=function(e){return"(?"+(this.a==0?"":oht(this.a))+(this.c==0?"":oht(this.c))+":"+this.b.pl(e)+")"},u.a=0,u.c=0;var eJe=A(qp,"RegEx/Token/ModifierToken",1563);T(732,112,SE,Dot),u.kl=function(e){return this.a},u.ol=function(){return 1},u.pl=function(e){var n;switch(n=null,this.e){case 6:this.b==0?n="(?:"+this.a.pl(e)+")":n="("+this.a.pl(e)+")";break;case 20:n="(?="+this.a.pl(e)+")";break;case 21:n="(?!"+this.a.pl(e)+")";break;case 22:n="(?<="+this.a.pl(e)+")";break;case 23:n="(?"+this.a.pl(e)+")"}return n},u.b=0;var nJe=A(qp,"RegEx/Token/ParenToken",732);T(474,112,{3:1,112:1,474:1},K$),u.ll=function(){return this.b},u.pl=function(e){return this.e==12?"\\"+this.a:E0e(this.b)},u.a=0;var iJe=A(qp,"RegEx/Token/StringToken",474);T(427,112,SE,WT),u.il=function(e){s0(this,e)},u.kl=function(e){return a(bm(this.a,e),112)},u.ol=function(){return this.a?this.a.a.c.length:0},u.pl=function(e){var n,i,r,c,l;if(this.e==1){if(this.a.a.c.length==2)n=a(bm(this.a,0),112),i=a(bm(this.a,1),112),i.e==3&&i.kl(0)==n?c=n.pl(e)+"+":i.e==9&&i.kl(0)==n?c=n.pl(e)+"+?":c=n.pl(e)+(""+i.pl(e));else{for(l=new Sp,r=0;r=this.c.b:this.a<=this.c.b},u.Cc=function(){return this.b>0},u.Dc=function(){return this.b},u.Fc=function(){return this.b-1},u.jc=function(){throw K(new Tp(vzt))},u.a=0,u.b=0;var uJe=A(l1t,"ExclusiveRange/RangeIterator",230),nl=_M(NO,"C"),Gn=_M(I4,"I"),Ol=_M(aE,"Z"),k0=_M(R4,"J"),Da=_M(k4,"B"),Os=_M(L4,"D"),Gw=_M(P4,"F"),_y=_M(D4,"S"),rMe=Sr("org.eclipse.elk.core.labels","ILabelManager"),C_t=Sr(qs,"DiagnosticChain"),A_t=Sr(VUt,"ResourceSet"),k_t=A(qs,"InvocationTargetException",null),DXt=(T9(),rae),NXt=NXt=d1e;Pue(sit),tle("permProps",[[[XO,ZO],[YO,"gecko1_8"]],[[XO,ZO],[YO,"ie10"]],[[XO,ZO],[YO,"ie8"]],[[XO,ZO],[YO,"ie9"]],[[XO,ZO],[YO,"safari"]]]),NXt(null,"elk",null)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],3:[function(p,m,_){"use strict";function E(P,U){if(!(P instanceof U))throw new TypeError("Cannot call a class as a function")}function y(P,U){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:P}function I(P,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);P.prototype=Object.create(U&&U.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(P,U):P.__proto__=U)}var N=p("./elk-api.js").default,B=function(P){I(U,P);function U(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};E(this,U);var V=Object.assign({},j),tt=!1;try{p.resolve("webworker-threads"),tt=!0}catch{}if(j.workerUrl)if(tt){var Q=p("webworker-threads"),X=Q.Worker;V.workerFactory=function(xt){return new X(xt)}}else console.warn(`Web worker requested but 'webworker-threads' package not installed. +(()=>{var sMe=Object.create;var I_t=Object.defineProperty;var oMe=Object.getOwnPropertyDescriptor;var cMe=Object.getOwnPropertyNames;var aMe=Object.getPrototypeOf,uMe=Object.prototype.hasOwnProperty;var AI=(d=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(d,{get:(s,h)=>(typeof require<"u"?require:s)[h]}):d)(function(d){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+d+'" is not supported')});var Ld=(d,s)=>()=>(s||d((s={exports:{}}).exports,s),s.exports),lMe=(d,s)=>{for(var h in s)I_t(d,h,{get:s[h],enumerable:!0})},hMe=(d,s,h,p)=>{if(s&&typeof s=="object"||typeof s=="function")for(let m of cMe(s))!uMe.call(d,m)&&m!==h&&I_t(d,m,{get:()=>s[m],enumerable:!(p=oMe(s,m))||p.enumerable});return d};var jXt=(d,s,h)=>(h=d!=null?sMe(aMe(d)):{},hMe(s||!d||!d.__esModule?I_t(h,"default",{value:d,enumerable:!0}):h,d));var GXt=Ld((ytt,HXt)=>{(function(d,s){typeof ytt=="object"&&typeof HXt<"u"?s(ytt):typeof define=="function"&&define.amd?define(["exports"],s):(d=typeof globalThis<"u"?globalThis:d||self,s(d.leaflet={}))})(ytt,function(d){"use strict";var s="1.9.4";function h(w){var S,D,V,st;for(D=1,V=arguments.length;D"u"||!L||!L.Mixin)){w=X(w)?w:[w];for(var S=0;S0?Math.floor(w):Math.ceil(w)};re.prototype={clone:function(){return new re(this.x,this.y)},add:function(w){return this.clone()._add(Se(w))},_add:function(w){return this.x+=w.x,this.y+=w.y,this},subtract:function(w){return this.clone()._subtract(Se(w))},_subtract:function(w){return this.x-=w.x,this.y-=w.y,this},divideBy:function(w){return this.clone()._divideBy(w)},_divideBy:function(w){return this.x/=w,this.y/=w,this},multiplyBy:function(w){return this.clone()._multiplyBy(w)},_multiplyBy:function(w){return this.x*=w,this.y*=w,this},scaleBy:function(w){return new re(this.x*w.x,this.y*w.y)},unscaleBy:function(w){return new re(this.x/w.x,this.y/w.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=hn(this.x),this.y=hn(this.y),this},distanceTo:function(w){w=Se(w);var S=w.x-this.x,D=w.y-this.y;return Math.sqrt(S*S+D*D)},equals:function(w){return w=Se(w),w.x===this.x&&w.y===this.y},contains:function(w){return w=Se(w),Math.abs(w.x)<=Math.abs(this.x)&&Math.abs(w.y)<=Math.abs(this.y)},toString:function(){return"Point("+B(this.x)+", "+B(this.y)+")"}};function Se(w,S,D){return w instanceof re?w:X(w)?new re(w[0],w[1]):w==null?w:typeof w=="object"&&"x"in w&&"y"in w?new re(w.x,w.y):new re(w,S,D)}function ke(w,S){if(w)for(var D=S?[w,S]:w,V=0,st=D.length;V=this.min.x&&D.x<=this.max.x&&S.y>=this.min.y&&D.y<=this.max.y},intersects:function(w){w=mn(w);var S=this.min,D=this.max,V=w.min,st=w.max,vt=st.x>=S.x&&V.x<=D.x,$t=st.y>=S.y&&V.y<=D.y;return vt&&$t},overlaps:function(w){w=mn(w);var S=this.min,D=this.max,V=w.min,st=w.max,vt=st.x>S.x&&V.xS.y&&V.y=S.lat&&st.lat<=D.lat&&V.lng>=S.lng&&st.lng<=D.lng},intersects:function(w){w=Qn(w);var S=this._southWest,D=this._northEast,V=w.getSouthWest(),st=w.getNorthEast(),vt=st.lat>=S.lat&&V.lat<=D.lat,$t=st.lng>=S.lng&&V.lng<=D.lng;return vt&&$t},overlaps:function(w){w=Qn(w);var S=this._southWest,D=this._northEast,V=w.getSouthWest(),st=w.getNorthEast(),vt=st.lat>S.lat&&V.latS.lng&&V.lng1,oi=function(){var w=!1;try{var S=Object.defineProperty({},"passive",{get:function(){w=!0}});window.addEventListener("testPassiveEventSupport",O,S),window.removeEventListener("testPassiveEventSupport",O,S)}catch{}return w}(),Jr=function(){return!!document.createElement("canvas").getContext}(),Bs=!!(document.createElementNS&&ut("svg").createSVGRect),Oc=!!Bs&&function(){var w=document.createElement("div");return w.innerHTML="",(w.firstChild&&w.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),su=!Bs&&function(){try{var w=document.createElement("div");w.innerHTML='';var S=w.firstChild;return S.style.behavior="url(#default#VML)",S&&typeof S.adj=="object"}catch{return!1}}(),fc=navigator.platform.indexOf("Mac")===0,il=navigator.platform.indexOf("Linux")===0;function va(w){return navigator.userAgent.toLowerCase().indexOf(w)>=0}var Mr={ie,ielt9:rn,edge:Pn,webkit:Tt,android:yt,android23:ue,androidStock:An,opera:zn,chrome:Li,gecko:xi,safari:Jt,phantom:nn,opera12:vn,win:he,ie3d:Mn,webkit3d:Sn,gecko3d:gn,any3d:Ce,mobile:dn,mobileWebkit:jn,mobileWebkit3d:ar,msPointer:gr,pointer:tr,touch:Qt,touchNative:Ln,mobileOpera:Mi,mobileGecko:sn,retina:Zn,passiveEvents:oi,canvas:Jr,svg:Bs,vml:su,inlineSvg:Oc,mac:fc,linux:il},iv=Mr.msPointer?"MSPointerDown":"pointerdown",U0=Mr.msPointer?"MSPointerMove":"pointermove",rv=Mr.msPointer?"MSPointerUp":"pointerup",z0=Mr.msPointer?"MSPointerCancel":"pointercancel",j0={touchstart:iv,touchmove:U0,touchend:rv,touchcancel:z0},sv={touchstart:Pr,touchmove:Hi,touchend:Hi,touchcancel:Hi},vg={},ov=!1;function l3(w,S,D){return S==="touchstart"&&Ze(),sv[S]?(D=sv[S].bind(this,D),w.addEventListener(j0[S],D,!1),D):(console.warn("wrong event specified:",S),O)}function Rt(w,S,D){if(!j0[S]){console.warn("wrong event specified:",S);return}w.removeEventListener(j0[S],D,!1)}function ve(w){vg[w.pointerId]=w}function Je(w){vg[w.pointerId]&&(vg[w.pointerId]=w)}function tn(w){delete vg[w.pointerId]}function Ze(){ov||(document.addEventListener(iv,ve,!0),document.addEventListener(U0,Je,!0),document.addEventListener(rv,tn,!0),document.addEventListener(z0,tn,!0),ov=!0)}function Hi(w,S){if(S.pointerType!==(S.MSPOINTER_TYPE_MOUSE||"mouse")){S.touches=[];for(var D in vg)S.touches.push(vg[D]);S.changedTouches=[S],w(S)}}function Pr(w,S){S.MSPOINTER_TYPE_TOUCH&&S.pointerType===S.MSPOINTER_TYPE_TOUCH&&sl(S),Hi(w,S)}function Gr(w){var S={},D,V;for(V in w)D=w[V],S[V]=D&&D.bind?D.bind(w):D;return w=S,S.type="dblclick",S.detail=2,S.isTrusted=!1,S._simulated=!0,S}var hs=200;function Fs(w,S){w.addEventListener("dblclick",S);var D=0,V;function st(vt){if(vt.detail!==1){V=vt.detail;return}if(!(vt.pointerType==="mouse"||vt.sourceCapabilities&&!vt.sourceCapabilities.firesTouchEvents)){var $t=Bc(vt);if(!($t.some(function(Ye){return Ye instanceof HTMLLabelElement&&Ye.attributes.for})&&!$t.some(function(Ye){return Ye instanceof HTMLInputElement||Ye instanceof HTMLSelectElement}))){var _e=Date.now();_e-D<=hs?(V++,V===2&&S(Gr(vt))):V=1,D=_e}}}return w.addEventListener("click",st),{dblclick:S,simDblclick:st}}function Ms(w,S){w.removeEventListener("dblclick",S.dblclick),w.removeEventListener("click",S.simDblclick)}var bs=u1(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Tc=u1(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),rl=Tc==="webkitTransition"||Tc==="OTransition"?Tc+"End":"transitionend";function Ba(w){return typeof w=="string"?document.getElementById(w):w}function wh(w,S){var D=w.style[S]||w.currentStyle&&w.currentStyle[S];if((!D||D==="auto")&&document.defaultView){var V=document.defaultView.getComputedStyle(w,null);D=V?V[S]:null}return D==="auto"?null:D}function Nr(w,S,D){var V=document.createElement(w);return V.className=S||"",D&&D.appendChild(V),V}function mr(w){var S=w.parentNode;S&&S.removeChild(w)}function a1(w){for(;w.firstChild;)w.removeChild(w.firstChild)}function dc(w){var S=w.parentNode;S&&S.lastChild!==w&&S.appendChild(w)}function vh(w){var S=w.parentNode;S&&S.firstChild!==w&&S.insertBefore(w,S.firstChild)}function _g(w,S){if(w.classList!==void 0)return w.classList.contains(S);var D=ff(w);return D.length>0&&new RegExp("(^|\\s)"+S+"(\\s|$)").test(D)}function ws(w,S){if(w.classList!==void 0)for(var D=U(S),V=0,st=D.length;V0?2*window.devicePixelRatio:1;function ES(w){return Mr.edge?w.wheelDeltaY/2:w.deltaY&&w.deltaMode===0?-w.deltaY/_k:w.deltaY&&w.deltaMode===1?-w.deltaY*20:w.deltaY&&w.deltaMode===2?-w.deltaY*60:w.deltaX||w.deltaZ?0:w.wheelDelta?(w.wheelDeltaY||w.wheelDelta)/2:w.detail&&Math.abs(w.detail)<32765?-w.detail*20:w.detail?w.detail/-32765*60:0}function m3(w,S){var D=S.relatedTarget;if(!D)return!0;try{for(;D&&D!==w;)D=D.parentNode}catch{return!1}return D!==w}var yk={__proto__:null,on:As,off:Vc,stopPropagation:W0,disableScrollPropagation:g3,disableClickPropagation:lv,preventDefault:sl,stop:rc,getPropagationPath:Bc,getMousePosition:MS,getWheelDelta:ES,isExternalTarget:m3,addListener:As,removeListener:Vc},SS=xe.extend({run:function(w,S,D,V){this.stop(),this._el=w,this._inProgress=!0,this._duration=D||.25,this._easeOutPower=1/Math.max(V||.5,.2),this._startPos=yg(w),this._offset=S.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=ot(this._animate,this),this._step()},_step:function(w){var S=+new Date-this._startTime,D=this._duration*1e3;Sthis.options.maxZoom)?this.setZoom(w):this},panInsideBounds:function(w,S){this._enforcingBounds=!0;var D=this.getCenter(),V=this._limitCenter(D,this._zoom,Qn(w));return D.equals(V)||this.panTo(V,S),this._enforcingBounds=!1,this},panInside:function(w,S){S=S||{};var D=Se(S.paddingTopLeft||S.padding||[0,0]),V=Se(S.paddingBottomRight||S.padding||[0,0]),st=this.project(this.getCenter()),vt=this.project(w),$t=this.getPixelBounds(),_e=mn([$t.min.add(D),$t.max.subtract(V)]),Ye=_e.getSize();if(!_e.contains(vt)){this._enforcingBounds=!0;var Un=vt.subtract(_e.getCenter()),Ji=_e.extend(vt).getSize().subtract(Ye);st.x+=Un.x<0?-Ji.x:Ji.x,st.y+=Un.y<0?-Ji.y:Ji.y,this.panTo(this.unproject(st),S),this._enforcingBounds=!1}return this},invalidateSize:function(w){if(!this._loaded)return this;w=h({animate:!1,pan:!0},w===!0?{animate:!0}:w);var S=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var D=this.getSize(),V=S.divideBy(2).round(),st=D.divideBy(2).round(),vt=V.subtract(st);return!vt.x&&!vt.y?this:(w.animate&&w.pan?this.panBy(vt):(w.pan&&this._rawPanBy(vt),this.fire("move"),w.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(m(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:S,newSize:D}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(w){if(w=this._locateOptions=h({timeout:1e4,watch:!1},w),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var S=m(this._handleGeolocationResponse,this),D=m(this._handleGeolocationError,this);return w.watch?this._locationWatchId=navigator.geolocation.watchPosition(S,D,w):navigator.geolocation.getCurrentPosition(S,D,w),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(w){if(this._container._leaflet_id){var S=w.code,D=w.message||(S===1?"permission denied":S===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:S,message:"Geolocation error: "+D+"."})}},_handleGeolocationResponse:function(w){if(this._container._leaflet_id){var S=w.coords.latitude,D=w.coords.longitude,V=new ge(S,D),st=V.toBounds(w.coords.accuracy*2),vt=this._locateOptions;if(vt.setView){var $t=this.getBoundsZoom(st);this.setView(V,vt.maxZoom?Math.min($t,vt.maxZoom):$t)}var _e={latlng:V,bounds:st,timestamp:w.timestamp};for(var Ye in w.coords)typeof w.coords[Ye]=="number"&&(_e[Ye]=w.coords[Ye]);this.fire("locationfound",_e)}},addHandler:function(w,S){if(!S)return this;var D=this[w]=new S(this);return this._handlers.push(D),this.options[w]&&D.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),mr(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(Lt(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var w;for(w in this._layers)this._layers[w].remove();for(w in this._panes)mr(this._panes[w]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(w,S){var D="leaflet-pane"+(w?" leaflet-"+w.replace("Pane","")+"-pane":""),V=Nr("div",D,S||this._mapPane);return w&&(this._panes[w]=V),V},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var w=this.getPixelBounds(),S=this.unproject(w.getBottomLeft()),D=this.unproject(w.getTopRight());return new en(S,D)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(w,S,D){w=Qn(w),D=Se(D||[0,0]);var V=this.getZoom()||0,st=this.getMinZoom(),vt=this.getMaxZoom(),$t=w.getNorthWest(),_e=w.getSouthEast(),Ye=this.getSize().subtract(D),Un=mn(this.project(_e,V),this.project($t,V)).getSize(),Ji=Mr.any3d?this.options.zoomSnap:1,Qr=Ye.x/Un.x,Is=Ye.y/Un.y,ol=S?Math.max(Qr,Is):Math.min(Qr,Is);return V=this.getScaleZoom(ol,V),Ji&&(V=Math.round(V/(Ji/100))*(Ji/100),V=S?Math.ceil(V/Ji)*Ji:Math.floor(V/Ji)*Ji),Math.max(st,Math.min(vt,V))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new re(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(w,S){var D=this._getTopLeftPoint(w,S);return new ke(D,D.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(w){return this.options.crs.getProjectedBounds(w===void 0?this.getZoom():w)},getPane:function(w){return typeof w=="string"?this._panes[w]:w},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(w,S){var D=this.options.crs;return S=S===void 0?this._zoom:S,D.scale(w)/D.scale(S)},getScaleZoom:function(w,S){var D=this.options.crs;S=S===void 0?this._zoom:S;var V=D.zoom(w*D.scale(S));return isNaN(V)?1/0:V},project:function(w,S){return S=S===void 0?this._zoom:S,this.options.crs.latLngToPoint(Pe(w),S)},unproject:function(w,S){return S=S===void 0?this._zoom:S,this.options.crs.pointToLatLng(Se(w),S)},layerPointToLatLng:function(w){var S=Se(w).add(this.getPixelOrigin());return this.unproject(S)},latLngToLayerPoint:function(w){var S=this.project(Pe(w))._round();return S._subtract(this.getPixelOrigin())},wrapLatLng:function(w){return this.options.crs.wrapLatLng(Pe(w))},wrapLatLngBounds:function(w){return this.options.crs.wrapLatLngBounds(Qn(w))},distance:function(w,S){return this.options.crs.distance(Pe(w),Pe(S))},containerPointToLayerPoint:function(w){return Se(w).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(w){return Se(w).add(this._getMapPanePos())},containerPointToLatLng:function(w){var S=this.containerPointToLayerPoint(Se(w));return this.layerPointToLatLng(S)},latLngToContainerPoint:function(w){return this.layerPointToContainerPoint(this.latLngToLayerPoint(Pe(w)))},mouseEventToContainerPoint:function(w){return MS(w,this._container)},mouseEventToLayerPoint:function(w){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(w))},mouseEventToLatLng:function(w){return this.layerPointToLatLng(this.mouseEventToLayerPoint(w))},_initContainer:function(w){var S=this._container=Ba(w);if(S){if(S._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");As(S,"scroll",this._onScroll,this),this._containerId=E(S)},_initLayout:function(){var w=this._container;this._fadeAnimated=this.options.fadeAnimation&&Mr.any3d,ws(w,"leaflet-container"+(Mr.touch?" leaflet-touch":"")+(Mr.retina?" leaflet-retina":"")+(Mr.ielt9?" leaflet-oldie":"")+(Mr.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var S=wh(w,"position");S!=="absolute"&&S!=="relative"&&S!=="fixed"&&S!=="sticky"&&(w.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var w=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ya(this._mapPane,new re(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ws(w.markerPane,"leaflet-zoom-hide"),ws(w.shadowPane,"leaflet-zoom-hide"))},_resetView:function(w,S,D){ya(this._mapPane,new re(0,0));var V=!this._loaded;this._loaded=!0,S=this._limitZoom(S),this.fire("viewprereset");var st=this._zoom!==S;this._moveStart(st,D)._move(w,S)._moveEnd(st),this.fire("viewreset"),V&&this.fire("load")},_moveStart:function(w,S){return w&&this.fire("zoomstart"),S||this.fire("movestart"),this},_move:function(w,S,D,V){S===void 0&&(S=this._zoom);var st=this._zoom!==S;return this._zoom=S,this._lastCenter=w,this._pixelOrigin=this._getNewPixelOrigin(w),V?D&&D.pinch&&this.fire("zoom",D):((st||D&&D.pinch)&&this.fire("zoom",D),this.fire("move",D)),this},_moveEnd:function(w){return w&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return Lt(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(w){ya(this._mapPane,this._getMapPanePos().subtract(w))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(w){this._targets={},this._targets[E(this._container)]=this;var S=w?Vc:As;S(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&S(window,"resize",this._onResize,this),Mr.any3d&&this.options.transform3DLimit&&(w?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){Lt(this._resizeRequest),this._resizeRequest=ot(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var w=this._getMapPanePos();Math.max(Math.abs(w.x),Math.abs(w.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(w,S){for(var D=[],V,st=S==="mouseout"||S==="mouseover",vt=w.target||w.srcElement,$t=!1;vt;){if(V=this._targets[E(vt)],V&&(S==="click"||S==="preclick")&&this._draggableMoved(V)){$t=!0;break}if(V&&V.listens(S,!0)&&(st&&!m3(vt,w)||(D.push(V),st))||vt===this._container)break;vt=vt.parentNode}return!D.length&&!$t&&!st&&this.listens(S,!0)&&(D=[this]),D},_isClickDisabled:function(w){for(;w&&w!==this._container;){if(w._leaflet_disable_click)return!0;w=w.parentNode}},_handleDOMEvent:function(w){var S=w.target||w.srcElement;if(!(!this._loaded||S._leaflet_disable_events||w.type==="click"&&this._isClickDisabled(S))){var D=w.type;D==="mousedown"&&Ly(S),this._fireDOMEvent(w,D)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(w,S,D){if(w.type==="click"){var V=h({},w);V.type="preclick",this._fireDOMEvent(V,V.type,D)}var st=this._findEventTargets(w,S);if(D){for(var vt=[],$t=0;$t0?Math.round(w-S)/2:Math.max(0,Math.ceil(w))-Math.max(0,Math.floor(S))},_limitZoom:function(w){var S=this.getMinZoom(),D=this.getMaxZoom(),V=Mr.any3d?this.options.zoomSnap:1;return V&&(w=Math.round(w/V)*V),Math.max(S,Math.min(D,w))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){$c(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(w,S){var D=this._getCenterOffset(w)._trunc();return(S&&S.animate)!==!0&&!this.getSize().contains(D)?!1:(this.panBy(D,S),!0)},_createAnimProxy:function(){var w=this._proxy=Nr("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(w),this.on("zoomanim",function(S){var D=bs,V=this._proxy.style[D];Nd(this._proxy,this.project(S.center,S.zoom),this.getZoomScale(S.zoom,1)),V===this._proxy.style[D]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){mr(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var w=this.getCenter(),S=this.getZoom();Nd(this._proxy,this.project(w,S),this.getZoomScale(S,1))},_catchTransitionEnd:function(w){this._animatingZoom&&w.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(w,S,D){if(this._animatingZoom)return!0;if(D=D||{},!this._zoomAnimated||D.animate===!1||this._nothingToAnimate()||Math.abs(S-this._zoom)>this.options.zoomAnimationThreshold)return!1;var V=this.getZoomScale(S),st=this._getCenterOffset(w)._divideBy(1-1/V);return D.animate!==!0&&!this.getSize().contains(st)?!1:(ot(function(){this._moveStart(!0,D.noMoveStart||!1)._animateZoom(w,S,!0)},this),!0)},_animateZoom:function(w,S,D,V){this._mapPane&&(D&&(this._animatingZoom=!0,this._animateToCenter=w,this._animateToZoom=S,ws(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:w,zoom:S,noUpdate:V}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(m(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&$c(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function xk(w,S){return new Co(w,S)}var Cc=ln.extend({options:{position:"topright"},initialize:function(w){W(this,w)},getPosition:function(){return this.options.position},setPosition:function(w){var S=this._map;return S&&S.removeControl(this),this.options.position=w,S&&S.addControl(this),this},getContainer:function(){return this._container},addTo:function(w){this.remove(),this._map=w;var S=this._container=this.onAdd(w),D=this.getPosition(),V=w._controlCorners[D];return ws(S,"leaflet-control"),D.indexOf("bottom")!==-1?V.insertBefore(S,V.firstChild):V.appendChild(S),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(mr(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(w){this._map&&w&&w.screenX>0&&w.screenY>0&&this._map.getContainer().focus()}}),$0=function(w){return new Cc(w)};Co.include({addControl:function(w){return w.addTo(this),this},removeControl:function(w){return w.remove(),this},_initControlPos:function(){var w=this._controlCorners={},S="leaflet-",D=this._controlContainer=Nr("div",S+"control-container",this._container);function V(st,vt){var $t=S+st+" "+S+vt;w[st+vt]=Nr("div",$t,D)}V("top","left"),V("top","right"),V("bottom","left"),V("bottom","right")},_clearControlPos:function(){for(var w in this._controlCorners)mr(this._controlCorners[w]);mr(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Mg=Cc.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(w,S,D,V){return D1,this._baseLayersList.style.display=w?"":"none"),this._separator.style.display=S&&w?"":"none",this},_onLayerChange:function(w){this._handlingClick||this._update();var S=this._getLayer(E(w.target)),D=S.overlay?w.type==="add"?"overlayadd":"overlayremove":w.type==="add"?"baselayerchange":null;D&&this._map.fire(D,S)},_createRadioElement:function(w,S){var D='",V=document.createElement("div");return V.innerHTML=D,V.firstChild},_addItem:function(w){var S=document.createElement("label"),D=this._map.hasLayer(w.layer),V;w.overlay?(V=document.createElement("input"),V.type="checkbox",V.className="leaflet-control-layers-selector",V.defaultChecked=D):V=this._createRadioElement("leaflet-base-layers_"+E(this),D),this._layerControlInputs.push(V),V.layerId=E(w.layer),As(V,"click",this._onInputClick,this);var st=document.createElement("span");st.innerHTML=" "+w.name;var vt=document.createElement("span");S.appendChild(vt),vt.appendChild(V),vt.appendChild(st);var $t=w.overlay?this._overlaysList:this._baseLayersList;return $t.appendChild(S),this._checkDisabledLayers(),S},_onInputClick:function(){if(!this._preventClick){var w=this._layerControlInputs,S,D,V=[],st=[];this._handlingClick=!0;for(var vt=w.length-1;vt>=0;vt--)S=w[vt],D=this._getLayer(S.layerId).layer,S.checked?V.push(D):S.checked||st.push(D);for(vt=0;vt=0;st--)S=w[st],D=this._getLayer(S.layerId).layer,S.disabled=D.options.minZoom!==void 0&&VD.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var w=this._section;this._preventClick=!0,As(w,"click",sl),this.expand();var S=this;setTimeout(function(){Vc(w,"click",sl),S._preventClick=!1})}}),TS=function(w,S,D){return new Mg(w,S,D)},hv=Cc.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(w){var S="leaflet-control-zoom",D=Nr("div",S+" leaflet-bar"),V=this.options;return this._zoomInButton=this._createButton(V.zoomInText,V.zoomInTitle,S+"-in",D,this._zoomIn),this._zoomOutButton=this._createButton(V.zoomOutText,V.zoomOutTitle,S+"-out",D,this._zoomOut),this._updateDisabled(),w.on("zoomend zoomlevelschange",this._updateDisabled,this),D},onRemove:function(w){w.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(w){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(w.shiftKey?3:1))},_createButton:function(w,S,D,V,st){var vt=Nr("a",D,V);return vt.innerHTML=w,vt.href="#",vt.title=S,vt.setAttribute("role","button"),vt.setAttribute("aria-label",S),lv(vt),As(vt,"click",rc),As(vt,"click",st,this),As(vt,"click",this._refocusOnMap,this),vt},_updateDisabled:function(){var w=this._map,S="leaflet-disabled";$c(this._zoomInButton,S),$c(this._zoomOutButton,S),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||w._zoom===w.getMinZoom())&&(ws(this._zoomOutButton,S),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||w._zoom===w.getMaxZoom())&&(ws(this._zoomInButton,S),this._zoomInButton.setAttribute("aria-disabled","true"))}});Co.mergeOptions({zoomControl:!0}),Co.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new hv,this.addControl(this.zoomControl))});var Xf=function(w){return new hv(w)},b3=Cc.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(w){var S="leaflet-control-scale",D=Nr("div",S),V=this.options;return this._addScales(V,S+"-line",D),w.on(V.updateWhenIdle?"moveend":"move",this._update,this),w.whenReady(this._update,this),D},onRemove:function(w){w.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(w,S,D){w.metric&&(this._mScale=Nr("div",S,D)),w.imperial&&(this._iScale=Nr("div",S,D))},_update:function(){var w=this._map,S=w.getSize().y/2,D=w.distance(w.containerPointToLatLng([0,S]),w.containerPointToLatLng([this.options.maxWidth,S]));this._updateScales(D)},_updateScales:function(w){this.options.metric&&w&&this._updateMetric(w),this.options.imperial&&w&&this._updateImperial(w)},_updateMetric:function(w){var S=this._getRoundNum(w),D=S<1e3?S+" m":S/1e3+" km";this._updateScale(this._mScale,D,S/w)},_updateImperial:function(w){var S=w*3.2808399,D,V,st;S>5280?(D=S/5280,V=this._getRoundNum(D),this._updateScale(this._iScale,V+" mi",V/D)):(st=this._getRoundNum(S),this._updateScale(this._iScale,st+" ft",st/S))},_updateScale:function(w,S,D){w.style.width=Math.round(this.options.maxWidth*D)+"px",w.innerHTML=S},_getRoundNum:function(w){var S=Math.pow(10,(Math.floor(w)+"").length-1),D=w/S;return D=D>=10?10:D>=5?5:D>=3?3:D>=2?2:1,S*D}}),CS=function(w){return new b3(w)},AS='',Py=Cc.extend({options:{position:"bottomright",prefix:''+(Mr.inlineSvg?AS+" ":"")+"Leaflet"},initialize:function(w){W(this,w),this._attributions={}},onAdd:function(w){w.attributionControl=this,this._container=Nr("div","leaflet-control-attribution"),lv(this._container);for(var S in w._layers)w._layers[S].getAttribution&&this.addAttribution(w._layers[S].getAttribution());return this._update(),w.on("layeradd",this._addAttribution,this),this._container},onRemove:function(w){w.off("layeradd",this._addAttribution,this)},_addAttribution:function(w){w.layer.getAttribution&&(this.addAttribution(w.layer.getAttribution()),w.layer.once("remove",function(){this.removeAttribution(w.layer.getAttribution())},this))},setPrefix:function(w){return this.options.prefix=w,this._update(),this},addAttribution:function(w){return w?(this._attributions[w]||(this._attributions[w]=0),this._attributions[w]++,this._update(),this):this},removeAttribution:function(w){return w?(this._attributions[w]&&(this._attributions[w]--,this._update()),this):this},_update:function(){if(this._map){var w=[];for(var S in this._attributions)this._attributions[S]&&w.push(S);var D=[];this.options.prefix&&D.push(this.options.prefix),w.length&&D.push(w.join(", ")),this._container.innerHTML=D.join(' ')}}});Co.mergeOptions({attributionControl:!0}),Co.addInitHook(function(){this.options.attributionControl&&new Py().addTo(this)});var kS=function(w){return new Py(w)};Cc.Layers=Mg,Cc.Zoom=hv,Cc.Scale=b3,Cc.Attribution=Py,$0.layers=TS,$0.zoom=Xf,$0.scale=CS,$0.attribution=kS;var Od=ln.extend({initialize:function(w){this._map=w},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Od.addTo=function(w,S){return w.addHandler(S,this),this};var df={Events:ne},LS=Mr.touch?"touchstart mousedown":"mousedown",ou=xe.extend({options:{clickTolerance:3},initialize:function(w,S,D,V){W(this,V),this._element=w,this._dragStartTarget=S||w,this._preventOutline=D},enable:function(){this._enabled||(As(this._dragStartTarget,LS,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ou._dragging===this&&this.finishDrag(!0),Vc(this._dragStartTarget,LS,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(w){if(this._enabled&&(this._moved=!1,!_g(this._element,"leaflet-zoom-anim"))){if(w.touches&&w.touches.length!==1){ou._dragging===this&&this.finishDrag();return}if(!(ou._dragging||w.shiftKey||w.which!==1&&w.button!==1&&!w.touches)&&(ou._dragging=this,this._preventOutline&&Ly(this._element),Ay(),H0(),!this._moving)){this.fire("down");var S=w.touches?w.touches[0]:w,D=yS(this._element);this._startPoint=new re(S.clientX,S.clientY),this._startPos=yg(this._element),this._parentScale=f3(D);var V=w.type==="mousedown";As(document,V?"mousemove":"touchmove",this._onMove,this),As(document,V?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(w){if(this._enabled){if(w.touches&&w.touches.length>1){this._moved=!0;return}var S=w.touches&&w.touches.length===1?w.touches[0]:w,D=new re(S.clientX,S.clientY)._subtract(this._startPoint);!D.x&&!D.y||Math.abs(D.x)+Math.abs(D.y)vt&&($t=_e,vt=Ye);vt>D&&(S[$t]=1,_3(w,S,D,V,$t),_3(w,S,D,$t,st))}function y3(w,S){for(var D=[w[0]],V=1,st=0,vt=w.length;VS&&(D.push(w[V]),st=V);return stS.max.x&&(D|=2),w.yS.max.y&&(D|=8),D}function Ny(w,S){var D=S.x-w.x,V=S.y-w.y;return D*D+V*V}function vp(w,S,D,V){var st=S.x,vt=S.y,$t=D.x-st,_e=D.y-vt,Ye=$t*$t+_e*_e,Un;return Ye>0&&(Un=((w.x-st)*$t+(w.y-vt)*_e)/Ye,Un>1?(st=D.x,vt=D.y):Un>0&&(st+=$t*Un,vt+=_e*Un)),$t=w.x-st,_e=w.y-vt,V?$t*$t+_e*_e:new re(st,vt)}function Zf(w){return!X(w[0])||typeof w[0][0]!="object"&&typeof w[0][0]<"u"}function x3(w){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Zf(w)}function M3(w,S){var D,V,st,vt,$t,_e,Ye,Un;if(!w||w.length===0)throw new Error("latlngs not passed");Zf(w)||(console.warn("latlngs are not flat! Only the first ring will be used"),w=w[0]);var Ji=Pe([0,0]),Qr=Qn(w),Is=Qr.getNorthWest().distanceTo(Qr.getSouthWest())*Qr.getNorthEast().distanceTo(Qr.getNorthWest());Is<1700&&(Ji=wp(w));var ol=w.length,xa=[];for(D=0;DV){Ye=(vt-V)/st,Un=[_e.x-Ye*(_e.x-$t.x),_e.y-Ye*(_e.y-$t.y)];break}var zu=S.unproject(Se(Un));return Pe([zu.lat+Ji.lat,zu.lng+Ji.lng])}var E3={__proto__:null,simplify:Ry,pointToSegmentDistance:ea,closestPointOnSegment:Eg,clipSegment:RS,_getEdgeIntersection:Dy,_getBitCode:Sg,_sqClosestPointOnSegment:vp,isFlat:Zf,_flat:x3,polylineCenter:M3},fv={project:function(w){return new re(w.lng,w.lat)},unproject:function(w){return new ge(w.y,w.x)},bounds:new ke([-180,-90],[180,90])},Oy={R:6378137,R_MINOR:6356752314245179e-9,bounds:new ke([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(w){var S=Math.PI/180,D=this.R,V=w.lat*S,st=this.R_MINOR/D,vt=Math.sqrt(1-st*st),$t=vt*Math.sin(V),_e=Math.tan(Math.PI/4-V/2)/Math.pow((1-$t)/(1+$t),vt/2);return V=-D*Math.log(Math.max(_e,1e-10)),new re(w.lng*S*D,V)},unproject:function(w){for(var S=180/Math.PI,D=this.R,V=this.R_MINOR/D,st=Math.sqrt(1-V*V),vt=Math.exp(-w.y/D),$t=Math.PI/2-2*Math.atan(vt),_e=0,Ye=.1,Un;_e<15&&Math.abs(Ye)>1e-7;_e++)Un=st*Math.sin($t),Un=Math.pow((1-Un)/(1+Un),st/2),Ye=Math.PI/2-2*Math.atan(vt*Un)-$t,$t+=Ye;return new ge($t*S,w.x*S/D)}},Mk={__proto__:null,LonLat:fv,Mercator:Oy,SphericalMercator:lr},S3=h({},Yi,{code:"EPSG:3395",projection:Oy,transformation:function(){var w=.5/(Math.PI*Oy.R);return Kt(w,.5,-w,.5)}()}),By=h({},Yi,{code:"EPSG:4326",projection:fv,transformation:Kt(1/180,1,-1/180,.5)}),Ek=h({},ti,{projection:fv,transformation:Kt(1,0,-1,0),scale:function(w){return Math.pow(2,w)},zoom:function(w){return Math.log(w)/Math.LN2},distance:function(w,S){var D=S.lng-w.lng,V=S.lat-w.lat;return Math.sqrt(D*D+V*V)},infinite:!0});ti.Earth=Yi,ti.EPSG3395=S3,ti.EPSG3857=wn,ti.EPSG900913=it,ti.EPSG4326=By,ti.Simple=Ek;var Yf=xe.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(w){return w.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(w){return w&&w.removeLayer(this),this},getPane:function(w){return this._map.getPane(w?this.options[w]||w:this.options.pane)},addInteractiveTarget:function(w){return this._map._targets[E(w)]=this,this},removeInteractiveTarget:function(w){return delete this._map._targets[E(w)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(w){var S=w.target;if(S.hasLayer(this)){if(this._map=S,this._zoomAnimated=S._zoomAnimated,this.getEvents){var D=this.getEvents();S.on(D,this),this.once("remove",function(){S.off(D,this)},this)}this.onAdd(S),this.fire("add"),S.fire("layeradd",{layer:this})}}});Co.include({addLayer:function(w){if(!w._layerAdd)throw new Error("The provided object is not a Layer.");var S=E(w);return this._layers[S]?this:(this._layers[S]=w,w._mapToAdd=this,w.beforeAdd&&w.beforeAdd(this),this.whenReady(w._layerAdd,w),this)},removeLayer:function(w){var S=E(w);return this._layers[S]?(this._loaded&&w.onRemove(this),delete this._layers[S],this._loaded&&(this.fire("layerremove",{layer:w}),w.fire("remove")),w._map=w._mapToAdd=null,this):this},hasLayer:function(w){return E(w)in this._layers},eachLayer:function(w,S){for(var D in this._layers)w.call(S,this._layers[D]);return this},_addLayers:function(w){w=w?X(w)?w:[w]:[];for(var S=0,D=w.length;Sthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&S[0]instanceof ge&&S[0].equals(S[D-1])&&S.pop(),S},_setLatLngs:function(w){Fl.prototype._setLatLngs.call(this,w),Zf(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Zf(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var w=this._renderer._bounds,S=this.options.weight,D=new re(S,S);if(w=new ke(w.min.subtract(D),w.max.add(D)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(w))){if(this.options.noClip){this._parts=this._rings;return}for(var V=0,st=this._rings.length,vt;Vw.y!=st.y>w.y&&w.x<(st.x-V.x)*(w.y-V.y)/(st.y-V.y)+V.x&&(S=!S);return S||Fl.prototype._containsPoint.call(this,w,!0)}});function Ak(w,S){return new _b(w,S)}var l1=pf.extend({initialize:function(w,S){W(this,S),this._layers={},w&&this.addData(w)},addData:function(w){var S=X(w)?w:w.features,D,V,st;if(S){for(D=0,V=S.length;D0&&st.push(st[0].slice()),st}function yb(w,S){return w.feature?h({},w.feature,{geometry:S}):Wy(S)}function Wy(w){return w.type==="Feature"||w.type==="FeatureCollection"?w:{type:"Feature",properties:{},geometry:w}}var Bd={toGeoJSON:function(w){return yb(this,{type:"Point",coordinates:C3(this.getLatLng(),w)})}};Fy.include(Bd),pv.include(Bd),Uy.include(Bd),Fl.include({toGeoJSON:function(w){var S=!Zf(this._latlngs),D=Gy(this._latlngs,S?1:0,!1,w);return yb(this,{type:(S?"Multi":"")+"LineString",coordinates:D})}}),_b.include({toGeoJSON:function(w){var S=!Zf(this._latlngs),D=S&&!Zf(this._latlngs[0]),V=Gy(this._latlngs,D?2:S?1:0,!0,w);return S||(V=[V]),yb(this,{type:(D?"Multi":"")+"Polygon",coordinates:V})}}),Uu.include({toMultiPoint:function(w){var S=[];return this.eachLayer(function(D){S.push(D.toGeoJSON(w).geometry.coordinates)}),yb(this,{type:"MultiPoint",coordinates:S})},toGeoJSON:function(w){var S=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(S==="MultiPoint")return this.toMultiPoint(w);var D=S==="GeometryCollection",V=[];return this.eachLayer(function(st){if(st.toGeoJSON){var vt=st.toGeoJSON(w);if(D)V.push(vt.geometry);else{var $t=Wy(vt);$t.type==="FeatureCollection"?V.push.apply(V,$t.features):V.push($t)}}}),D?yb(this,{geometries:V,type:"GeometryCollection"}):{type:"FeatureCollection",features:V}}});function oe(w,S){return new l1(w,S)}var _n=oe,$e=Yf.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(w,S,D){this._url=w,this._bounds=Qn(S),W(this,D)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ws(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){mr(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(w){return this.options.opacity=w,this._image&&this._updateOpacity(),this},setStyle:function(w){return w.opacity&&this.setOpacity(w.opacity),this},bringToFront:function(){return this._map&&dc(this._image),this},bringToBack:function(){return this._map&&vh(this._image),this},setUrl:function(w){return this._url=w,this._image&&(this._image.src=w),this},setBounds:function(w){return this._bounds=Qn(w),this._map&&this._reset(),this},getEvents:function(){var w={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(w.zoomanim=this._animateZoom),w},setZIndex:function(w){return this.options.zIndex=w,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var w=this._url.tagName==="IMG",S=this._image=w?this._url:Nr("img");if(ws(S,"leaflet-image-layer"),this._zoomAnimated&&ws(S,"leaflet-zoom-animated"),this.options.className&&ws(S,this.options.className),S.onselectstart=O,S.onmousemove=O,S.onload=m(this.fire,this,"load"),S.onerror=m(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(S.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),w){this._url=S.src;return}S.src=this._url,S.alt=this.options.alt},_animateZoom:function(w){var S=this._map.getZoomScale(w.zoom),D=this._map._latLngBoundsToNewLayerBounds(this._bounds,w.zoom,w.center).min;Nd(this._image,D,S)},_reset:function(){var w=this._image,S=new ke(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),D=S.getSize();ya(w,S.min),w.style.width=D.x+"px",w.style.height=D.y+"px"},_updateOpacity:function(){Bl(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var w=this.options.errorOverlayUrl;w&&this._url!==w&&(this._url=w,this._image.src=w)},getCenter:function(){return this._bounds.getCenter()}}),er=function(w,S,D){return new $e(w,S,D)},vs=$e.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var w=this._url.tagName==="VIDEO",S=this._image=w?this._url:Nr("video");if(ws(S,"leaflet-image-layer"),this._zoomAnimated&&ws(S,"leaflet-zoom-animated"),this.options.className&&ws(S,this.options.className),S.onselectstart=O,S.onmousemove=O,S.onloadeddata=m(this.fire,this,"load"),w){for(var D=S.getElementsByTagName("source"),V=[],st=0;st0?V:[S.src];return}X(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(S.style,"objectFit")&&(S.style.objectFit="fill"),S.autoplay=!!this.options.autoplay,S.loop=!!this.options.loop,S.muted=!!this.options.muted,S.playsInline=!!this.options.playsInline;for(var vt=0;vtst?(S.height=st+"px",ws(w,vt)):$c(w,vt),this._containerWidth=this._container.offsetWidth},_animateZoom:function(w){var S=this._map._latLngToNewLayerPoint(this._latlng,w.zoom,w.center),D=this._getAnchor();ya(this._container,S.add(D))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var w=this._map,S=parseInt(wh(this._container,"marginBottom"),10)||0,D=this._container.offsetHeight+S,V=this._containerWidth,st=new re(this._containerLeft,-D-this._containerBottom);st._add(yg(this._container));var vt=w.layerPointToContainerPoint(st),$t=Se(this.options.autoPanPadding),_e=Se(this.options.autoPanPaddingTopLeft||$t),Ye=Se(this.options.autoPanPaddingBottomRight||$t),Un=w.getSize(),Ji=0,Qr=0;vt.x+V+Ye.x>Un.x&&(Ji=vt.x+V-Un.x+Ye.x),vt.x-Ji-_e.x<0&&(Ji=vt.x-_e.x),vt.y+D+Ye.y>Un.y&&(Qr=vt.y+D-Un.y+Ye.y),vt.y-Qr-_e.y<0&&(Qr=vt.y-_e.y),(Ji||Qr)&&(this.options.keepInView&&(this._autopanning=!0),w.fire("autopanstart").panBy([Ji,Qr]))}},_getAnchor:function(){return Se(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Jf=function(w,S){return new $y(w,S)};Co.mergeOptions({closePopupOnClick:!0}),Co.include({openPopup:function(w,S,D){return this._initOverlay($y,w,S,D).openOn(this),this},closePopup:function(w){return w=arguments.length?w:this._popup,w&&w.close(),this}}),Yf.include({bindPopup:function(w,S){return this._popup=this._initOverlay($y,this._popup,w,S),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(w){return this._popup&&(this instanceof pf||(this._popup._source=this),this._popup._prepareOpen(w||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(w){return this._popup&&this._popup.setContent(w),this},getPopup:function(){return this._popup},_openPopup:function(w){if(!(!this._popup||!this._map)){rc(w);var S=w.layer||w.target;if(this._popup._source===S&&!(S instanceof gf)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(w.latlng);return}this._popup._source=S,this.openPopup(w.latlng)}},_movePopup:function(w){this._popup.setLatLng(w.latlng)},_onKeyPress:function(w){w.originalEvent.keyCode===13&&this._openPopup(w)}});var q0=mf.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(w){mf.prototype.onAdd.call(this,w),this.setOpacity(this.options.opacity),w.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(w){mf.prototype.onRemove.call(this,w),w.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var w=mf.prototype.getEvents.call(this);return this.options.permanent||(w.preclick=this.close),w},_initLayout:function(){var w="leaflet-tooltip",S=w+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Nr("div",S),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+E(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(w){var S,D,V=this._map,st=this._container,vt=V.latLngToContainerPoint(V.getCenter()),$t=V.layerPointToContainerPoint(w),_e=this.options.direction,Ye=st.offsetWidth,Un=st.offsetHeight,Ji=Se(this.options.offset),Qr=this._getAnchor();_e==="top"?(S=Ye/2,D=Un):_e==="bottom"?(S=Ye/2,D=0):_e==="center"?(S=Ye/2,D=Un/2):_e==="right"?(S=0,D=Un/2):_e==="left"?(S=Ye,D=Un/2):$t.xthis.options.maxZoom||DV?this._retainParent(st,vt,$t,V):!1)},_retainChildren:function(w,S,D,V){for(var st=2*w;st<2*w+2;st++)for(var vt=2*S;vt<2*S+2;vt++){var $t=new re(st,vt);$t.z=D+1;var _e=this._tileCoordsToKey($t),Ye=this._tiles[_e];if(Ye&&Ye.active){Ye.retain=!0;continue}else Ye&&Ye.loaded&&(Ye.retain=!0);D+1this.options.maxZoom||this.options.minZoom!==void 0&&st1){this._setView(w,D);return}for(var Qr=st.min.y;Qr<=st.max.y;Qr++)for(var Is=st.min.x;Is<=st.max.x;Is++){var ol=new re(Is,Qr);if(ol.z=this._tileZoom,!!this._isValidTile(ol)){var xa=this._tiles[this._tileCoordsToKey(ol)];xa?xa.current=!0:$t.push(ol)}}if($t.sort(function(zu,d1){return zu.distanceTo(vt)-d1.distanceTo(vt)}),$t.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Ul=document.createDocumentFragment();for(Is=0;Is<$t.length;Is++)this._addTile($t[Is],Ul);this._level.el.appendChild(Ul)}}}},_isValidTile:function(w){var S=this._map.options.crs;if(!S.infinite){var D=this._globalTileRange;if(!S.wrapLng&&(w.xD.max.x)||!S.wrapLat&&(w.yD.max.y))return!1}if(!this.options.bounds)return!0;var V=this._tileCoordsToBounds(w);return Qn(this.options.bounds).overlaps(V)},_keyToBounds:function(w){return this._tileCoordsToBounds(this._keyToTileCoords(w))},_tileCoordsToNwSe:function(w){var S=this._map,D=this.getTileSize(),V=w.scaleBy(D),st=V.add(D),vt=S.unproject(V,w.z),$t=S.unproject(st,w.z);return[vt,$t]},_tileCoordsToBounds:function(w){var S=this._tileCoordsToNwSe(w),D=new en(S[0],S[1]);return this.options.noWrap||(D=this._map.wrapLatLngBounds(D)),D},_tileCoordsToKey:function(w){return w.x+":"+w.y+":"+w.z},_keyToTileCoords:function(w){var S=w.split(":"),D=new re(+S[0],+S[1]);return D.z=+S[2],D},_removeTile:function(w){var S=this._tiles[w];S&&(mr(S.el),delete this._tiles[w],this.fire("tileunload",{tile:S.el,coords:this._keyToTileCoords(w)}))},_initTile:function(w){ws(w,"leaflet-tile");var S=this.getTileSize();w.style.width=S.x+"px",w.style.height=S.y+"px",w.onselectstart=O,w.onmousemove=O,Mr.ielt9&&this.options.opacity<1&&Bl(w,this.options.opacity)},_addTile:function(w,S){var D=this._getTilePos(w),V=this._tileCoordsToKey(w),st=this.createTile(this._wrapCoords(w),m(this._tileReady,this,w));this._initTile(st),this.createTile.length<2&&ot(m(this._tileReady,this,w,null,st)),ya(st,D),this._tiles[V]={el:st,coords:w,current:!0},S.appendChild(st),this.fire("tileloadstart",{tile:st,coords:w})},_tileReady:function(w,S,D){S&&this.fire("tileerror",{error:S,tile:D,coords:w});var V=this._tileCoordsToKey(w);D=this._tiles[V],D&&(D.loaded=+new Date,this._map._fadeAnimated?(Bl(D.el,0),Lt(this._fadeFrame),this._fadeFrame=ot(this._updateOpacity,this)):(D.active=!0,this._pruneTiles()),S||(ws(D.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:D.el,coords:w})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Mr.ielt9||!this._map._fadeAnimated?ot(this._pruneTiles,this):setTimeout(m(this._pruneTiles,this),250)))},_getTilePos:function(w){return w.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(w){var S=new re(this._wrapX?I(w.x,this._wrapX):w.x,this._wrapY?I(w.y,this._wrapY):w.y);return S.z=w.z,S},_pxBoundsToTileRange:function(w){var S=this.getTileSize();return new ke(w.min.unscaleBy(S).floor(),w.max.unscaleBy(S).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var w in this._tiles)if(!this._tiles[w].loaded)return!1;return!0}});function pc(w){return new Tg(w)}var xb=Tg.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(w,S){this._url=w,S=W(this,S),S.detectRetina&&Mr.retina&&S.maxZoom>0?(S.tileSize=Math.floor(S.tileSize/2),S.zoomReverse?(S.zoomOffset--,S.minZoom=Math.min(S.maxZoom,S.minZoom+1)):(S.zoomOffset++,S.maxZoom=Math.max(S.minZoom,S.maxZoom-1)),S.minZoom=Math.max(0,S.minZoom)):S.zoomReverse?S.minZoom=Math.min(S.maxZoom,S.minZoom):S.maxZoom=Math.max(S.minZoom,S.maxZoom),typeof S.subdomains=="string"&&(S.subdomains=S.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(w,S){return this._url===w&&S===void 0&&(S=!0),this._url=w,S||this.redraw(),this},createTile:function(w,S){var D=document.createElement("img");return As(D,"load",m(this._tileOnLoad,this,S,D)),As(D,"error",m(this._tileOnError,this,S,D)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(D.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(D.referrerPolicy=this.options.referrerPolicy),D.alt="",D.src=this.getTileUrl(w),D},getTileUrl:function(w){var S={r:Mr.retina?"@2x":"",s:this._getSubdomain(w),x:w.x,y:w.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var D=this._globalTileRange.max.y-w.y;this.options.tms&&(S.y=D),S["-y"]=D}return Q(this._url,h(S,this.options))},_tileOnLoad:function(w,S){Mr.ielt9?setTimeout(m(w,this,null,S),0):w(null,S)},_tileOnError:function(w,S,D){var V=this.options.errorTileUrl;V&&S.getAttribute("src")!==V&&(S.src=V),w(D,S)},_onTileRemove:function(w){w.tile.onload=null},_getZoomForUrl:function(){var w=this._tileZoom,S=this.options.maxZoom,D=this.options.zoomReverse,V=this.options.zoomOffset;return D&&(w=S-w),w+V},_getSubdomain:function(w){var S=Math.abs(w.x+w.y)%this.options.subdomains.length;return this.options.subdomains[S]},_abortLoading:function(){var w,S;for(w in this._tiles)if(this._tiles[w].coords.z!==this._tileZoom&&(S=this._tiles[w].el,S.onload=O,S.onerror=O,!S.complete)){S.src=ft;var D=this._tiles[w].coords;mr(S),delete this._tiles[w],this.fire("tileabort",{tile:S,coords:D})}},_removeTile:function(w){var S=this._tiles[w];if(S)return S.el.setAttribute("src",ft),Tg.prototype._removeTile.call(this,w)},_tileReady:function(w,S,D){if(!(!this._map||D&&D.getAttribute("src")===ft))return Tg.prototype._tileReady.call(this,w,S,D)}});function A3(w,S){return new xb(w,S)}var gv=xb.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(w,S){this._url=w;var D=h({},this.defaultWmsParams);for(var V in S)V in this.options||(D[V]=S[V]);S=W(this,S);var st=S.detectRetina&&Mr.retina?2:1,vt=this.getTileSize();D.width=vt.x*st,D.height=vt.y*st,this.wmsParams=D},onAdd:function(w){this._crs=this.options.crs||w.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var S=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[S]=this._crs.code,xb.prototype.onAdd.call(this,w)},getTileUrl:function(w){var S=this._tileCoordsToNwSe(w),D=this._crs,V=mn(D.project(S[0]),D.project(S[1])),st=V.min,vt=V.max,$t=(this._wmsVersion>=1.3&&this._crs===By?[st.y,st.x,vt.y,vt.x]:[st.x,st.y,vt.x,vt.y]).join(","),_e=xb.prototype.getTileUrl.call(this,w);return _e+q(this.wmsParams,_e,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+$t},setParams:function(w,S){return h(this.wmsParams,w),S||this.redraw(),this}});function Lk(w,S){return new gv(w,S)}xb.WMS=gv,A3.wms=Lk;var f1=Yf.extend({options:{padding:.1},initialize:function(w){W(this,w),E(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),ws(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var w={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(w.zoomanim=this._onAnimZoom),w},_onAnimZoom:function(w){this._updateTransform(w.center,w.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(w,S){var D=this._map.getZoomScale(S,this._zoom),V=this._map.getSize().multiplyBy(.5+this.options.padding),st=this._map.project(this._center,S),vt=V.multiplyBy(-D).add(st).subtract(this._map._getNewPixelOrigin(w,S));Mr.any3d?Nd(this._container,vt,D):ya(this._container,vt)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var w in this._layers)this._layers[w]._reset()},_onZoomEnd:function(){for(var w in this._layers)this._layers[w]._project()},_updatePaths:function(){for(var w in this._layers)this._layers[w]._update()},_update:function(){var w=this.options.padding,S=this._map.getSize(),D=this._map.containerPointToLayerPoint(S.multiplyBy(-w)).round();this._bounds=new ke(D,D.add(S.multiplyBy(1+w*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),BS=f1.extend({options:{tolerance:0},getEvents:function(){var w=f1.prototype.getEvents.call(this);return w.viewprereset=this._onViewPreReset,w},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){f1.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var w=this._container=document.createElement("canvas");As(w,"mousemove",this._onMouseMove,this),As(w,"click dblclick mousedown mouseup contextmenu",this._onClick,this),As(w,"mouseout",this._handleMouseOut,this),w._leaflet_disable_events=!0,this._ctx=w.getContext("2d")},_destroyContainer:function(){Lt(this._redrawRequest),delete this._ctx,mr(this._container),Vc(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var w;this._redrawBounds=null;for(var S in this._layers)w=this._layers[S],w._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){f1.prototype._update.call(this);var w=this._bounds,S=this._container,D=w.getSize(),V=Mr.retina?2:1;ya(S,w.min),S.width=V*D.x,S.height=V*D.y,S.style.width=D.x+"px",S.style.height=D.y+"px",Mr.retina&&this._ctx.scale(2,2),this._ctx.translate(-w.min.x,-w.min.y),this.fire("update")}},_reset:function(){f1.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(w){this._updateDashArray(w),this._layers[E(w)]=w;var S=w._order={layer:w,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=S),this._drawLast=S,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(w){this._requestRedraw(w)},_removePath:function(w){var S=w._order,D=S.next,V=S.prev;D?D.prev=V:this._drawLast=V,V?V.next=D:this._drawFirst=D,delete w._order,delete this._layers[E(w)],this._requestRedraw(w)},_updatePath:function(w){this._extendRedrawBounds(w),w._project(),w._update(),this._requestRedraw(w)},_updateStyle:function(w){this._updateDashArray(w),this._requestRedraw(w)},_updateDashArray:function(w){if(typeof w.options.dashArray=="string"){var S=w.options.dashArray.split(/[, ]+/),D=[],V,st;for(st=0;st')}}catch{}return function(w){return document.createElement("<"+w+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),qy={_initContainer:function(){this._container=Nr("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(f1.prototype._update.call(this),this.fire("update"))},_initPath:function(w){var S=w._container=Qf("shape");ws(S,"leaflet-vml-shape "+(this.options.className||"")),S.coordsize="1 1",w._path=Qf("path"),S.appendChild(w._path),this._updateStyle(w),this._layers[E(w)]=w},_addPath:function(w){var S=w._container;this._container.appendChild(S),w.options.interactive&&w.addInteractiveTarget(S)},_removePath:function(w){var S=w._container;mr(S),w.removeInteractiveTarget(S),delete this._layers[E(w)]},_updateStyle:function(w){var S=w._stroke,D=w._fill,V=w.options,st=w._container;st.stroked=!!V.stroke,st.filled=!!V.fill,V.stroke?(S||(S=w._stroke=Qf("stroke")),st.appendChild(S),S.weight=V.weight+"px",S.color=V.color,S.opacity=V.opacity,V.dashArray?S.dashStyle=X(V.dashArray)?V.dashArray.join(" "):V.dashArray.replace(/( *, *)/g," "):S.dashStyle="",S.endcap=V.lineCap.replace("butt","flat"),S.joinstyle=V.lineJoin):S&&(st.removeChild(S),w._stroke=null),V.fill?(D||(D=w._fill=Qf("fill")),st.appendChild(D),D.color=V.fillColor||V.color,D.opacity=V.fillOpacity):D&&(st.removeChild(D),w._fill=null)},_updateCircle:function(w){var S=w._point.round(),D=Math.round(w._radius),V=Math.round(w._radiusY||D);this._setPath(w,w._empty()?"M0 0":"AL "+S.x+","+S.y+" "+D+","+V+" 0,"+65535*360)},_setPath:function(w,S){w._path.v=S},_bringToFront:function(w){dc(w._container)},_bringToBack:function(w){vh(w._container)}},bv=Mr.vml?Qf:ut,Cg=f1.extend({_initContainer:function(){this._container=bv("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=bv("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){mr(this._container),Vc(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){f1.prototype._update.call(this);var w=this._bounds,S=w.getSize(),D=this._container;(!this._svgSize||!this._svgSize.equals(S))&&(this._svgSize=S,D.setAttribute("width",S.x),D.setAttribute("height",S.y)),ya(D,w.min),D.setAttribute("viewBox",[w.min.x,w.min.y,S.x,S.y].join(" ")),this.fire("update")}},_initPath:function(w){var S=w._path=bv("path");w.options.className&&ws(S,w.options.className),w.options.interactive&&ws(S,"leaflet-interactive"),this._updateStyle(w),this._layers[E(w)]=w},_addPath:function(w){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(w._path),w.addInteractiveTarget(w._path)},_removePath:function(w){mr(w._path),w.removeInteractiveTarget(w._path),delete this._layers[E(w)]},_updatePath:function(w){w._project(),w._update()},_updateStyle:function(w){var S=w._path,D=w.options;S&&(D.stroke?(S.setAttribute("stroke",D.color),S.setAttribute("stroke-opacity",D.opacity),S.setAttribute("stroke-width",D.weight),S.setAttribute("stroke-linecap",D.lineCap),S.setAttribute("stroke-linejoin",D.lineJoin),D.dashArray?S.setAttribute("stroke-dasharray",D.dashArray):S.removeAttribute("stroke-dasharray"),D.dashOffset?S.setAttribute("stroke-dashoffset",D.dashOffset):S.removeAttribute("stroke-dashoffset")):S.setAttribute("stroke","none"),D.fill?(S.setAttribute("fill",D.fillColor||D.color),S.setAttribute("fill-opacity",D.fillOpacity),S.setAttribute("fill-rule",D.fillRule||"evenodd")):S.setAttribute("fill","none"))},_updatePoly:function(w,S){this._setPath(w,kt(w._parts,S))},_updateCircle:function(w){var S=w._point,D=Math.max(Math.round(w._radius),1),V=Math.max(Math.round(w._radiusY),1)||D,st="a"+D+","+V+" 0 1,0 ",vt=w._empty()?"M0 0":"M"+(S.x-D)+","+S.y+st+D*2+",0 "+st+-D*2+",0 ";this._setPath(w,vt)},_setPath:function(w,S){w._path.setAttribute("d",S)},_bringToFront:function(w){dc(w._path)},_bringToBack:function(w){vh(w._path)}});Mr.vml&&Cg.include(qy);function k3(w){return Mr.svg||Mr.vml?new Cg(w):null}Co.include({getRenderer:function(w){var S=w.options.renderer||this._getPaneRenderer(w.options.pane)||this.options.renderer||this._renderer;return S||(S=this._renderer=this._createRenderer()),this.hasLayer(S)||this.addLayer(S),S},_getPaneRenderer:function(w){if(w==="overlayPane"||w===void 0)return!1;var S=this._paneRenderers[w];return S===void 0&&(S=this._createRenderer({pane:w}),this._paneRenderers[w]=S),S},_createRenderer:function(w){return this.options.preferCanvas&&mv(w)||k3(w)}});var L3=_b.extend({initialize:function(w,S){_b.prototype.initialize.call(this,this._boundsToLatLngs(w),S)},setBounds:function(w){return this.setLatLngs(this._boundsToLatLngs(w))},_boundsToLatLngs:function(w){return w=Qn(w),[w.getSouthWest(),w.getNorthWest(),w.getNorthEast(),w.getSouthEast()]}});function Xy(w,S){return new L3(w,S)}Cg.create=bv,Cg.pointsToPath=kt,l1.geometryToLayer=h1,l1.coordsToLatLng=jy,l1.coordsToLatLngs=Hy,l1.latLngToCoords=C3,l1.latLngsToCoords=Gy,l1.getFeature=yb,l1.asFeature=Wy,Co.mergeOptions({boxZoom:!0});var P3=Od.extend({initialize:function(w){this._map=w,this._container=w._container,this._pane=w._panes.overlayPane,this._resetStateTimeout=0,w.on("unload",this._destroy,this)},addHooks:function(){As(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Vc(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){mr(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(w){if(!w.shiftKey||w.which!==1&&w.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),H0(),Ay(),this._startPoint=this._map.mouseEventToContainerPoint(w),As(document,{contextmenu:rc,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(w){this._moved||(this._moved=!0,this._box=Nr("div","leaflet-zoom-box",this._container),ws(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(w);var S=new ke(this._point,this._startPoint),D=S.getSize();ya(this._box,S.min),this._box.style.width=D.x+"px",this._box.style.height=D.y+"px"},_finish:function(){this._moved&&(mr(this._box),$c(this._container,"leaflet-crosshair")),G0(),h3(),Vc(document,{contextmenu:rc,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(w){if(!(w.which!==1&&w.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(m(this._resetState,this),0);var S=new en(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(S).fire("boxzoomend",{boxZoomBounds:S})}},_onKeyDown:function(w){w.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Co.addInitHook("addHandler","boxZoom",P3),Co.mergeOptions({doubleClickZoom:!0});var Mb=Od.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(w){var S=this._map,D=S.getZoom(),V=S.options.zoomDelta,st=w.originalEvent.shiftKey?D-V:D+V;S.options.doubleClickZoom==="center"?S.setZoom(st):S.setZoomAround(w.containerPoint,st)}});Co.addInitHook("addHandler","doubleClickZoom",Mb),Co.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Ag=Od.extend({addHooks:function(){if(!this._draggable){var w=this._map;this._draggable=new ou(w._mapPane,w._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),w.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),w.on("zoomend",this._onZoomEnd,this),w.whenReady(this._onZoomEnd,this))}ws(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){$c(this._map._container,"leaflet-grab"),$c(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var w=this._map;if(w._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var S=Qn(this._map.options.maxBounds);this._offsetLimit=mn(this._map.latLngToContainerPoint(S.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(S.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;w.fire("movestart").fire("dragstart"),w.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(w){if(this._map.options.inertia){var S=this._lastTime=+new Date,D=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(D),this._times.push(S),this._prunePositions(S)}this._map.fire("move",w).fire("drag",w)},_prunePositions:function(w){for(;this._positions.length>1&&w-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var w=this._map.getSize().divideBy(2),S=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=S.subtract(w).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(w,S){return w-(w-S)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var w=this._draggable._newPos.subtract(this._draggable._startPos),S=this._offsetLimit;w.xS.max.x&&(w.x=this._viscousLimit(w.x,S.max.x)),w.y>S.max.y&&(w.y=this._viscousLimit(w.y,S.max.y)),this._draggable._newPos=this._draggable._startPos.add(w)}},_onPreDragWrap:function(){var w=this._worldWidth,S=Math.round(w/2),D=this._initialWorldOffset,V=this._draggable._newPos.x,st=(V-S+D)%w+S-D,vt=(V+S+D)%w-S-D,$t=Math.abs(st+D)0?vt:-vt))-S;this._delta=0,this._startTime=null,$t&&(w.options.scrollWheelZoom==="center"?w.setZoom(S+$t):w.setZoomAround(this._lastMousePos,S+$t))}});Co.addInitHook("addHandler","scrollWheelZoom",FS);var Pk=600;Co.mergeOptions({tapHold:Mr.touchNative&&Mr.safari&&Mr.mobile,tapTolerance:15});var US=Od.extend({addHooks:function(){As(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Vc(this._map._container,"touchstart",this._onDown,this)},_onDown:function(w){if(clearTimeout(this._holdTimeout),w.touches.length===1){var S=w.touches[0];this._startPos=this._newPos=new re(S.clientX,S.clientY),this._holdTimeout=setTimeout(m(function(){this._cancel(),this._isTapValid()&&(As(document,"touchend",sl),As(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",S))},this),Pk),As(document,"touchend touchcancel contextmenu",this._cancel,this),As(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function w(){Vc(document,"touchend",sl),Vc(document,"touchend touchcancel",w)},_cancel:function(){clearTimeout(this._holdTimeout),Vc(document,"touchend touchcancel contextmenu",this._cancel,this),Vc(document,"touchmove",this._onMove,this)},_onMove:function(w){var S=w.touches[0];this._newPos=new re(S.clientX,S.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(w,S){var D=new MouseEvent(w,{bubbles:!0,cancelable:!0,view:window,screenX:S.screenX,screenY:S.screenY,clientX:S.clientX,clientY:S.clientY});D._simulated=!0,S.target.dispatchEvent(D)}});Co.addInitHook("addHandler","tapHold",US),Co.mergeOptions({touchZoom:Mr.touch,bounceAtZoomLimits:!0});var vv=Od.extend({addHooks:function(){ws(this._map._container,"leaflet-touch-zoom"),As(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){$c(this._map._container,"leaflet-touch-zoom"),Vc(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(w){var S=this._map;if(!(!w.touches||w.touches.length!==2||S._animatingZoom||this._zooming)){var D=S.mouseEventToContainerPoint(w.touches[0]),V=S.mouseEventToContainerPoint(w.touches[1]);this._centerPoint=S.getSize()._divideBy(2),this._startLatLng=S.containerPointToLatLng(this._centerPoint),S.options.touchZoom!=="center"&&(this._pinchStartLatLng=S.containerPointToLatLng(D.add(V)._divideBy(2))),this._startDist=D.distanceTo(V),this._startZoom=S.getZoom(),this._moved=!1,this._zooming=!0,S._stop(),As(document,"touchmove",this._onTouchMove,this),As(document,"touchend touchcancel",this._onTouchEnd,this),sl(w)}},_onTouchMove:function(w){if(!(!w.touches||w.touches.length!==2||!this._zooming)){var S=this._map,D=S.mouseEventToContainerPoint(w.touches[0]),V=S.mouseEventToContainerPoint(w.touches[1]),st=D.distanceTo(V)/this._startDist;if(this._zoom=S.getScaleZoom(st,this._startZoom),!S.options.bounceAtZoomLimits&&(this._zoomS.getMaxZoom()&&st>1)&&(this._zoom=S._limitZoom(this._zoom)),S.options.touchZoom==="center"){if(this._center=this._startLatLng,st===1)return}else{var vt=D._add(V)._divideBy(2)._subtract(this._centerPoint);if(st===1&&vt.x===0&&vt.y===0)return;this._center=S.unproject(S.project(this._pinchStartLatLng,this._zoom).subtract(vt),this._zoom)}this._moved||(S._moveStart(!0,!1),this._moved=!0),Lt(this._animRequest);var $t=m(S._move,S,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=ot($t,this,!0),sl(w)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,Lt(this._animRequest),Vc(document,"touchmove",this._onTouchMove,this),Vc(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});Co.addInitHook("addHandler","touchZoom",vv),Co.BoxZoom=P3,Co.DoubleClickZoom=Mb,Co.Drag=Ag,Co.Keyboard=wv,Co.ScrollWheelZoom=FS,Co.TapHold=US,Co.TouchZoom=vv,d.Bounds=ke,d.Browser=Mr,d.CRS=ti,d.Canvas=BS,d.Circle=pv,d.CircleMarker=Uy,d.Class=ln,d.Control=Cc,d.DivIcon=X0,d.DivOverlay=mf,d.DomEvent=yk,d.DomUtil=vk,d.Draggable=ou,d.Evented=xe,d.FeatureGroup=pf,d.GeoJSON=l1,d.GridLayer=Tg,d.Handler=Od,d.Icon=V0,d.ImageOverlay=$e,d.LatLng=ge,d.LatLngBounds=en,d.Layer=Yf,d.LayerGroup=Uu,d.LineUtil=E3,d.Map=Co,d.Marker=Fy,d.Mixin=df,d.Path=gf,d.Point=re,d.PolyUtil=Iy,d.Polygon=_b,d.Polyline=Fl,d.Popup=$y,d.PosAnimation=SS,d.Projection=Mk,d.Rectangle=L3,d.Renderer=f1,d.SVG=Cg,d.SVGOverlay=$a,d.TileLayer=xb,d.Tooltip=q0,d.Transformation=pr,d.Util=be,d.VideoOverlay=vs,d.bind=m,d.bounds=mn,d.canvas=mv,d.circle=OS,d.circleMarker=Ck,d.control=$0,d.divIcon=Vy,d.extend=h,d.featureGroup=DS,d.geoJSON=oe,d.geoJson=_n,d.gridLayer=pc,d.icon=Sk,d.imageOverlay=er,d.latLng=Pe,d.latLngBounds=Qn,d.layerGroup=T3,d.map=xk,d.marker=Tk,d.point=Se,d.polygon=Ak,d.polyline=zy,d.popup=Jf,d.rectangle=Xy,d.setOptions=W,d.stamp=E,d.svg=k3,d.svgOverlay=Fc,d.tileLayer=A3,d.tooltip=kk,d.transformation=Kt,d.version=s,d.videoOverlay=Wo;var Zy=window.L;d.noConflict=function(){return window.L=Zy,this},window.L=d})});var $Xt=Ld((WXt,R_t)=>{(function(d){if(typeof WXt=="object"&&typeof R_t<"u")R_t.exports=d();else if(typeof define=="function"&&define.amd)define([],d);else{var s;typeof window<"u"?s=window:typeof global<"u"?s=global:typeof self<"u"?s=self:s=this,s.ELK=d()}})(function(){var d,s,h;return function p(m,_,E){function y(B,P){if(!_[B]){if(!m[B]){var U=typeof AI=="function"&&AI;if(!P&&U)return U(B,!0);if(I)return I(B,!0);var W=new Error("Cannot find module '"+B+"'");throw W.code="MODULE_NOT_FOUND",W}var q=_[B]={exports:{}};m[B][0].call(q.exports,function(et){var Q=m[B][1][et];return y(Q||et)},q,q.exports,p,m,_,E)}return _[B].exports}for(var I=typeof AI=="function"&&AI,O=0;O0&&arguments[0]!==void 0?arguments[0]:{},W=U.defaultLayoutOptions,q=W===void 0?{}:W,et=U.algorithms,Q=et===void 0?["layered","stress","mrtree","radial","force","disco"]:et,X=U.workerFactory,gt=U.workerUrl;if(y(this,B),this.defaultLayoutOptions=q,this.initialized=!1,typeof gt>"u"&&typeof X>"u")throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.");var ft=X;typeof gt<"u"&&typeof X>"u"&&(ft=function(Ot){return new Worker(Ot)});var xt=ft(gt);if(typeof xt.postMessage!="function")throw new TypeError("Created worker does not provide the required 'postMessage' function.");this.worker=new O(xt),this.worker.postMessage({cmd:"register",algorithms:Q}).then(function(Bt){return P.initialized=!0}).catch(console.err)}return E(B,[{key:"layout",value:function(U){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=W.layoutOptions,et=q===void 0?this.defaultLayoutOptions:q;return U?this.worker.postMessage({cmd:"layout",graph:U,options:et}):Promise.reject(new Error("Missing mandatory parameter 'graph'."))}},{key:"knownLayoutAlgorithms",value:function(){return this.worker.postMessage({cmd:"algorithms"})}},{key:"knownLayoutOptions",value:function(){return this.worker.postMessage({cmd:"options"})}},{key:"knownLayoutCategories",value:function(){return this.worker.postMessage({cmd:"categories"})}},{key:"terminateWorker",value:function(){this.worker.terminate()}}]),B}();_.default=I;var O=function(){function B(P){var U=this;if(y(this,B),P===void 0)throw new Error("Missing mandatory parameter 'worker'.");this.resolvers={},this.worker=P,this.worker.onmessage=function(W){setTimeout(function(){U.receive(U,W)},0)}}return E(B,[{key:"postMessage",value:function(U){var W=this.id||0;this.id=W+1,U.id=W;var q=this;return new Promise(function(et,Q){q.resolvers[W]=function(X,gt){X?Q(X):et(gt)},q.worker.postMessage(U)})}},{key:"receive",value:function(U,W){var q=W.data,et=U.resolvers[q.id];et&&(delete U.resolvers[q.id],q.error?et(q.error):et(null,q.data))}},{key:"terminate",value:function(){this.worker.terminate&&this.worker.terminate()}}]),B}()},{}],2:[function(p,m,_){(function(E){var y;typeof window<"u"?y=window:typeof E<"u"?y=E:typeof self<"u"&&(y=self);var I,O;function B(){}function P(){}function U(){}function W(){}function q(){}function et(){}function Q(){}function X(){}function gt(){}function ft(){}function xt(){}function Bt(){}function Ot(){}function Pt(){}function se(){}function ot(){}function Lt(){}function be(){}function ln(){}function Fn(){}function ne(){}function xe(){}function re(){}function hn(){}function Se(){}function ke(){}function mn(){}function en(){}function Qn(){}function ge(){}function Pe(){}function ti(){}function Yi(){}function ki(){}function lr(){}function pr(){}function Kt(){}function wn(){}function it(){}function ut(){}function kt(){}function Nt(){}function ie(){}function rn(){}function Pn(){}function Tt(){}function yt(){}function ue(){}function fn(){}function An(){}function zn(){}function Li(){}function xi(){}function Jt(){}function nn(){}function vn(){}function he(){}function Mn(){}function Sn(){}function gn(){}function Ce(){}function dn(){}function jn(){}function ar(){}function gr(){}function tr(){}function Ln(){}function Qt(){}function Mi(){}function sn(){}function Zn(){}function oi(){}function Jr(){}function Bs(){}function Oc(){}function su(){}function fc(){}function il(){}function va(){}function Mr(){}function iv(){}function U0(){}function rv(){}function z0(){}function j0(){}function sv(){}function vg(){}function ov(){}function l3(){}function Rt(){}function ve(){}function Je(){}function tn(){}function Ze(){}function Hi(){}function Pr(){}function Gr(){}function hs(){}function Fs(){}function Ms(){}function bs(){}function Tc(){}function rl(){}function Ba(){}function wh(){}function Nr(){}function mr(){}function a1(){}function dc(){}function vh(){}function _g(){}function ws(){}function $c(){}function _a(){}function ff(){}function Bl(){}function _h(){}function u1(){}function Nd(){}function ya(){}function yg(){}function H0(){}function G0(){}function xg(){}function vb(){}function Ay(){}function h3(){}function cv(){}function ky(){}function Ly(){}function av(){}function yS(){}function f3(){}function vk(){}function As(){}function bp(){}function Vc(){}function xS(){}function d3(){}function uv(){}function p3(){}function W0(){}function g3(){}function lv(){}function sl(){}function rc(){}function Bc(){}function MS(){}function _k(){}function ES(){}function m3(){}function yk(){}function SS(){}function Co(){}function xk(){}function Cc(){}function $0(){}function Mg(){}function TS(){}function hv(){}function Xf(){}function b3(){}function CS(){}function AS(){}function Py(){}function kS(){}function Od(){}function df(){}function LS(){}function ou(){}function PS(){}function w3(){}function wp(){}function Iy(){}function Ry(){}function ea(){}function Eg(){}function v3(){}function _3(){}function y3(){}function IS(){}function RS(){}function Dy(){}function Sg(){}function Ny(){}function vp(){}function Zf(){}function x3(){}function M3(){}function E3(){}function fv(){}function Oy(){}function Mk(){}function S3(){}function By(){}function Ek(){}function Yf(){}function Uu(){}function T3(){}function pf(){}function DS(){}function V0(){}function Sk(){}function dv(){}function NS(){}function Fy(){}function Tk(){}function gf(){}function Uy(){}function Ck(){}function pv(){}function OS(){}function Fl(){}function zy(){}function _b(){}function Ak(){}function l1(){}function h1(){}function Kf(){}function jy(){}function Hy(){}function C3(){}function Gy(){}function yb(){}function Wy(){}function Bd(){}function oe(){}function _n(){}function $e(){}function er(){}function vs(){}function Wo(){}function $a(){}function Fc(){}function mf(){}function $y(){}function Jf(){}function q0(){}function kk(){}function X0(){}function Vy(){}function Tg(){}function pc(){}function xb(){}function A3(){}function gv(){}function Lk(){}function f1(){}function BS(){}function mv(){}function Qf(){}function qy(){}function bv(){}function Cg(){}function k3(){}function L3(){}function Xy(){}function P3(){}function Mb(){}function Ag(){}function wv(){}function FS(){}function Pk(){}function US(){}function vv(){}function Zy(){}function w(){}function S(){}function D(){}function V(){}function st(){}function vt(){}function $t(){}function _e(){}function Ye(){}function Un(){}function Ji(){}function Qr(){}function Is(){}function ol(){}function xa(){}function Ul(){}function zu(){}function d1(){}function Eb(){}function Ik(){}function Rk(){}function zS(){}function Dk(){}function jS(){}function Ma(){}function kg(){}function HS(){}function Mt(){}function Sb(){}function Tb(){}function bf(){}function po(){}function KU(){}function JU(){}function QU(){}function _v(){}function Z0(){}function Cb(){}function MR(){}function tz(){}function ez(){}function Y0(){}function nz(){}function iz(){}function rz(){}function sz(){}function oz(){}function K0(){}function cz(){}function az(){}function uz(){}function lz(){}function hz(){}function yv(){}function fz(){}function dz(){}function p1(){}function pz(){}function gz(){}function mz(){}function bz(){}function Ie(){}function ER(){}function SR(){}function wz(){}function vz(){}function Nk(){}function I3(){}function R3(){}function _z(){}function TR(){}function yz(){}function Lg(){}function Ok(){}function xv(){}function _p(){}function xz(){}function CR(){}function AR(){}function D3(){}function Ab(){}function kR(){}function Mz(){}function GS(){}function Ez(){}function N3(){}function yh(){}function WS(){}function O3(){}function Pg(){}function $S(){}function VS(){}function J0(){}function LR(){}function zl(){}function Bk(){}function Sz(){}function Tz(){}function Cz(){}function Yy(){}function Az(){}function B3(){}function PR(){}function kz(){}function IR(){}function F3(){}function Fk(){}function RR(){}function Uk(){}function DR(){}function Lz(){}function Pz(){}function Iz(){}function NR(){}function zk(){}function Rz(){}function jk(){}function OR(){}function BR(){}function FR(){}function qS(){}function Dz(){}function UR(){}function kb(){}function Hk(){}function zR(){}function Nz(){}function Gk(){}function jR(){}function Wk(){}function Oz(){}function $k(){}function oo(){}function Bz(){}function Fz(){}function U3(){}function HR(){}function Uz(){}function zz(){}function yp(){}function jz(){}function XS(){}function Vk(){}function GR(){}function WR(){}function Fd(){}function Lb(){}function qk(){}function $R(){}function ZS(){}function VR(){}function Xk(){}function qR(){}function Zk(){}function Yk(){}function Pb(){}function Hz(){}function Ib(){}function XR(){}function ZR(){}function Kk(){}function Gz(){}function Wz(){}function $z(){}function YR(){}function KR(){}function Vz(){}function JR(){}function QR(){}function td(){}function Ig(){}function qz(){}function Xz(){}function YS(){}function Ky(){}function t8(){}function e8(){}function Zz(){}function n8(){}function Jy(){}function z3(){}function Yz(){}function i8(){}function r8(){}function KS(){}function s8(){}function JS(){}function Jk(){}function QS(){}function Kz(){}function o8(){}function tT(){}function c8(){}function Qk(){}function Jz(){}function a8(){}function Q0(){}function u8(){}function l8(){}function Qz(){}function h8(){}function tj(){}function ej(){}function tm(){}function t5(){}function e5(){}function n5(){}function eT(){}function Qy(){}function cs(){}function nT(){}function i5(){}function Mv(){}function nj(){}function r5(){}function f8(){}function zh(){}function ij(){}function rj(){}function d8(){}function sj(){}function p8(){}function oj(){}function cj(){}function aj(){}function em(){}function jh(){}function s5(){}function uj(){}function lj(t){}function dxt(t){}function o5(){Wr()}function j3(){b7()}function g8(){hq()}function m8(){HC()}function hj(){nft()}function fj(){vlt()}function dj(){UL()}function pj(){Ph()}function b8(){jut()}function w8(){I5()}function gj(){uL()}function c5(){D5t()}function v8(){QRt()}function H3(){L3t()}function a5(){Xit()}function _8(){qt()}function y8(){dAt()}function iT(){JLt()}function x8(){mAt()}function g1(){HRt()}function Ev(){bAt()}function mj(){Sat()}function M8(){M6t()}function bj(){sw()}function wj(){wAt()}function vj(){z5t()}function _j(){yNt()}function yj(){P3t()}function xj(){Wlt()}function Mj(){tw()}function wf(){LTt()}function Ej(){y7()}function Sj(){dr()}function E8(){$7()}function S8(){UN()}function T8(){mut()}function u5(){XV()}function Tj(){kht()}function Cj(t){this.a=t}function Aj(t){this.a=t}function G3(t){this.a=t}function kj(t){this.a=t}function Lj(t){this.a=t}function Pj(t){this.a=t}function C8(t){this.a=t}function Ij(t){this.a=t}function A8(t){this.a=t}function Ud(t){this.a=t}function Rj(t){this.a=t}function l5(t){this.a=t}function Dj(t){this.a=t}function k8(t){this.a=t}function Nj(t){this.a=t}function Oj(t){this.a=t}function Bj(t){this.a=t}function Fj(t){this.a=t}function h5(t){this.a=t}function f5(t){this.b=t}function Uj(t){this.a=t}function zj(t){this.a=t}function jj(t){this.a=t}function Hj(t){this.a=t}function Gj(t){this.a=t}function L8(t){this.a=t}function P8(t){this.a=t}function d5(t){this.a=t}function rT(t){this.a=t}function W3(t){this.a=t}function Wj(t){this.a=t}function I8(t){this.a=t}function Rb(t){this.a=t}function R8(t){this.a=t}function D8(t){this.a=t}function N8(t){this.a=t}function xp(t){this.a=t}function Sv(t){this.a=t}function p5(t){this.a=t}function vf(t){this.a=t}function nm(t){this.a=t}function $3(t){this.d=t}function Rg(){this.a=[]}function vi(){lu(this)}function Int(t,e){t.i=e}function Rnt(t,e){t.g=e}function Dnt(t,e){t.b=e}function Nnt(t,e){t.b=e}function Ont(t,e){t.a=e}function O8(t,e){t.a=e}function Bnt(t,e){t.c=e}function g5(t,e){t.c=e}function Fnt(t,e){t.b=e}function Unt(t,e){t.d=e}function znt(t,e){t.d=e}function jl(t,e){t.j=e}function jnt(t,e){t.a=e}function Hnt(t,e){t.f=e}function Gnt(t,e){t.f=e}function $j(t,e){t.e=e}function B8(t,e){t.k=e}function Wnt(t,e){t.a=e}function $nt(t,e){t.b=e}function F8(t,e){t.g=e}function U8(t,e){t.j=e}function Vnt(t,e){t.n=e}function qnt(t,e){t.a=e}function Xnt(t,e){t.a=e}function Vj(t,e){t.c=e}function qj(t,e){t.c=e}function Znt(t,e){t.d=e}function Ynt(t,e){t.e=e}function Knt(t,e){t.g=e}function Jnt(t,e){t.a=e}function m5(t,e){t.c=e}function Qnt(t,e){t.d=e}function tit(t,e){t.e=e}function eit(t,e){t.f=e}function nit(t,e){t.j=e}function iit(t,e){t.a=e}function rit(t,e){t.a=e}function sit(t,e){t.b=e}function Xj(t){t.b=t.a}function Zj(t){t.c=t.d.d}function Yj(t){hi(si(t))}function z8(t){this.b=t}function Tv(t){this.a=t}function sT(t){this.a=t}function oT(t){this.a=t}function Db(t){this.b=t}function Dg(t){this.b=t}function j8(t){this.a=t}function H8(t){this.a=t}function _r(t){this.a=t}function G8(t){this.a=t}function W8(t){this.a=t}function Kj(t){this.a=t}function $8(t){this.a=t}function t2(t){this.a=t}function cT(t){this.a=t}function Jj(t){this.a=t}function Qj(t){this.a=t}function b5(t){this.a=t}function V8(t){this.a=t}function tH(t){this.a=t}function eH(t){this.a=t}function nH(t){this.a=t}function iH(t){this.a=t}function rH(t){this.a=t}function sH(t){this.a=t}function oH(t){this.a=t}function cH(t){this.a=t}function aH(t){this.a=t}function uH(t){this.a=t}function lH(t){this.a=t}function Cv(t){this.a=t}function m1(t){this.a=t}function hH(t){this.a=t}function fH(t){this.a=t}function Av(t){this.a=t}function Us(t){this.a=t}function q8(t){this.a=t}function xh(t){this.a=t}function j(t){this.c=t}function aT(t){this.e=t}function zd(t){this.a=t}function dH(t){this.a=t}function kv(t){this.a=t}function X8(t){this.a=t}function pH(t){this.a=t}function gH(t){this.a=t}function w5(t){this.a=t}function mH(t){this.a=t}function im(t){this.a=t}function Z8(t){this.a=t}function uT(t){this.a=t}function Va(t){this.a=t}function cu(t){this.a=t}function Y8(t){this.a=t}function v5(t){this.a=t}function bH(t){this.a=t}function wH(t){this.a=t}function vH(t){this.a=t}function _H(t){this.a=t}function yH(t){this.a=t}function K8(t){this.a=t}function V3(t){this.a=t}function Nb(t){this.a=t}function xH(t){this.a=t}function J8(t){this.a=t}function lT(t){this.a=t}function jd(t){this.a=t}function e2(t){this.a=t}function MH(t){this.a=t}function EH(t){this.a=t}function SH(t){this.a=t}function TH(t){this.a=t}function CH(t){this.a=t}function Q8(t){this.a=t}function rm(t){this.a=t}function Ys(t){this.a=t}function t9(t){this.a=t}function Mp(t){this.a=t}function e9(t){this.a=t}function AH(t){this.b=t}function Ac(t){this.a=t}function kH(t){this.a=t}function n9(t){this.a=t}function i9(t){this.c=t}function _5(t){this.a=t}function LH(t){this.a=t}function PH(t){this.a=t}function IH(t){this.a=t}function RH(t){this.a=t}function DH(t){this.a=t}function NH(t){this.a=t}function OH(t){this.a=t}function BH(t){this.a=t}function FH(t){this.a=t}function UH(t){this.a=t}function zH(t){this.a=t}function jH(t){this.a=t}function y5(t){this.a=t}function HH(t){this.a=t}function x5(t){this.a=t}function GH(t){this.a=t}function WH(t){this.a=t}function $H(t){this.a=t}function Hl(t){this.a=t}function ed(t){this.a=t}function Hd(t){this.a=t}function Ob(t){this.a=t}function VH(t){this.a=t}function r9(t){this.a=t}function qH(t){this.a=t}function XH(t){this.a=t}function hT(t){this.a=t}function s9(t){this.f=t}function ZH(t){this.i=t}function M5(t){this.a=t}function YH(t){this.a=t}function o9(t){this.a=t}function c9(t){this.a=t}function KH(t){this.a=t}function JH(t){this.a=t}function QH(t){this.a=t}function tG(t){this.a=t}function n2(t){this.a=t}function eG(t){this.a=t}function nG(t){this.a=t}function iG(t){this.a=t}function rG(t){this.a=t}function sG(t){this.a=t}function a9(t){this.a=t}function u9(t){this.a=t}function oG(t){this.a=t}function cG(t){this.a=t}function aG(t){this.a=t}function uG(t){this.a=t}function lG(t){this.a=t}function hG(t){this.a=t}function fG(t){this.a=t}function dG(t){this.a=t}function pG(t){this.a=t}function gG(t){this.a=t}function mG(t){this.a=t}function bG(t){this.a=t}function wG(t){this.a=t}function vG(t){this.a=t}function _G(t){this.a=t}function l9(t){this.a=t}function kr(t){this.b=t}function yG(t){this.a=t}function xG(t){this.a=t}function MG(t){this.a=t}function EG(t){this.a=t}function SG(t){this.a=t}function TG(t){this.a=t}function CG(t){this.a=t}function AG(t){this.b=t}function E5(t){this.a=t}function i2(t){this.a=t}function h9(t){this.a=t}function fT(t){this.a=t}function dT(t){this.a=t}function S5(t){this.a=t}function T5(t){this.a=t}function kG(t){this.d=t}function f9(t){this.c=t}function pT(t){this.e=t}function Fa(t){this.e=t}function gT(t){this.a=t}function d9(t){this.a=t}function q3(){this.a=0}function X3(){JEt(this)}function Dt(){NW(this)}function Z3(){b4t(this)}function oit(){Nit(),Xxe()}function p9(){return null}function cit(){return null}function ait(t){return t.a}function uit(t){return t.a}function lit(t){return t.a}function LG(t){return t.a}function hit(t){return t.a}function K(t){return t.e}function b1(){this.c=e_t}function C5(){this.a=this}function mT(t){this.a=Ole(t)}function g9(){Ep.call(this)}function Y3(){Ep.call(this)}function na(){Ep.call(this)}function m9(){Ep.call(this)}function A5(){Ep.call(this)}function b9(){OSt.call(this)}function Ep(){OSt.call(this)}function r2(){Ep.call(this)}function Oi(){Ep.call(this)}function w9(){m9.call(this)}function fit(t){t.b.Te(t.e)}function PG(t,e){e.jd(t.a)}function s2(t,e){t.a=e-t.a}function o2(t,e){t.b=e-t.b}function IG(t,e){t.b+=e}function dit(t,e){t.d.b.$b(e)}function K3(t,e){t.e=e,e.b=t}function RG(t,e){t.length=e}function v9(t){t.a=new Fr}function _9(){_9=P,new vi}function DG(){this.b=new rrt}function x(){this.Bb|=256}function C(){Ep.call(this)}function F(){Ep.call(this)}function J(){Ep.call(this)}function mt(){Ep.call(this)}function St(t){C7(t.c,t.b)}function Vt(t,e){Mlt(t.c,e)}function ee(t,e){p7(t.a,e)}function fe(t,e){Tq(t.a,e)}function Cn(t,e){Ut(t.a,e)}function kn(t,e){Ir(t.b,e)}function Wn(t,e){Bi(t.e,e)}function Ki(t){TM(),CK.Rd(t)}function Er(){Er=P,v1t=new et}function Wr(){Wr=P,xK=new W}function no(){no=P,w1t=new U}function Zr(){Zr=P,MK=new a3t}function co(){co=P,EK=new u3t}function $o(){$o=P,Pzt=new ot}function Hh(){Hh=P,B4=new Lt}function _f(){_f=P,Bzt=new Fn}function $r(){this.a=new vi}function yu(){this.a=new FAt}function nd(){this.a=new Dt}function sm(){this.a=new Dt}function y9(){this.a=new Dt}function pxt(){this.a=new Dt}function gxt(){this.a=new Dt}function mxt(){this.a=new $r}function pit(){this.a=new cMt}function git(){this.a=new TAt}function mit(){this.a=new pTt}function bit(){this.a=new iv}function cl(){this.a=new Jf}function NG(){this.a=new Dt}function wit(){this.a=new Dt}function bxt(){this.b=new Dt}function vit(){this.f=new Dt}function wxt(){this.d=new Dt}function vxt(){this.a=new Dt}function Ng(){this.a=new l5t}function _it(){this.a=new Mt}function _xt(){this.j=new Dt}function qa(){Fr.call(this)}function yxt(){Dt.call(this)}function OG(){nd.call(this)}function yit(){c2.call(this)}function c2(){wh.call(this)}function a2(){wh.call(this)}function xit(){a2.call(this)}function xxt(){vi.call(this)}function Mxt(){vi.call(this)}function Ext(){vi.call(this)}function Sxt(){K4t.call(this)}function Txt(){K4t.call(this)}function Cxt(){vD.call(this)}function Axt(){Wxt.call(this)}function kxt(){Wxt.call(this)}function Mit(){yh.call(this)}function Eit(){yh.call(this)}function BG(){Zrt.call(this)}function FG(){Zrt.call(this)}function UG(){iPt.call(this)}function Sit(){zl.call(this)}function Lxt(){zl.call(this)}function Pxt(){Sit.call(this)}function Ixt(){x.call(this)}function Rxt(){$r.call(this)}function Tit(){vi.call(this)}function zG(){vi.call(this)}function Dxt(){vi.call(this)}function Nxt(){jh.call(this)}function CQt(t){tMt.call(this,t)}function Cit(t){tMt.call(this,t)}function AQt(t){Cit.call(this,t)}function Oxt(t){xPt.call(this,t)}function Bxt(t){xPt.call(this,t)}function Fxt(t){Dst.call(this,t)}function Ait(t){tW.call(this,t)}function kit(t){aAt.call(this,t)}function Lv(t){sM.call(this,t)}function sc(t){qCt.call(this,t)}function Uxt(t){sc.call(this,t)}function x9(t){sc.call(this,t)}function Uc(t){sc.call(this,t)}function zxt(t){sc.call(this,t)}function jG(t){qCt.call(this,t)}function Lit(t){Uc.call(this,t)}function bT(t){sc.call(this,t)}function yn(t){sc.call(this,t)}function yc(t){sc.call(this,t)}function jxt(t){sc.call(this,t)}function wT(t){sc.call(this,t)}function yf(t){yn.call(this,t)}function vT(){rT.call(this,{})}function Sp(){W3.call(this,"")}function _T(){W3.call(this,"")}function om(){W3.call(this,"")}function Bb(){W3.call(this,"")}function Hxt(t){Uc.call(this,t)}function Tp(t){sc.call(this,t)}function Pit(t){eOt(),Cxe(this,t)}function HG(t){fM(),this.a=t}function k5(t){t.b=null,t.c=0}function kQt(t,e){t.a=e,x0e(t)}function LQt(t,e){return t*t/e}function J3(t){return t<0?-t:t}function GG(t){IPt(),this.a=t}function WG(t){_$(),this.f=t}function $G(t){_$(),this.f=t}function VG(t,e,n){t.a[e.g]=n}function PQt(t,e,n){e1e(n,t,e)}function IQt(t,e,n){b2e(n,t,e)}function RQt(t,e,n){bde(t,n,e)}function Gxt(){this.d=new Dt}function Wxt(){this.a=new Az}function $xt(){throw K(new Oi)}function Iit(){throw K(new Oi)}function DQt(){throw K(new Oi)}function NQt(){throw K(new Oi)}function OQt(){throw K(new Oi)}function Vxt(){throw K(new Oi)}function L5(t){this.c=hi(si(t))}function BQt(t){return new d5(t)}function FQt(t){return new E2(t)}function Z(t,e){return hAt(t,e)}function UQt(t,e){return t.a-e.a}function zQt(t,e){return t.a-e.a}function jQt(t,e){return t.a-e.a}function qxt(t,e){return t.g-e.g}function Mh(t,e){return t>e?t:e}function cm(t,e){return t0}function KG(t,e){return Pc(t,e)<0}function nM(t){return t.d.c+t.e.c}function go(){this.a=0,this.b=0}function T9(t){ED.call(this,t)}function w1(t){n_.call(this,t)}function E3t(t){$$.call(this,t)}function S3t(t){$$.call(this,t)}function C9(t){d6t.call(this,t,0)}function T3t(t){this.c=(En(t),t)}function A9(t){this.a=new C9(t)}function Ub(t){this.a=new x$(t)}function cte(){throw K(new J)}function ate(){throw K(new J)}function iM(){iM=P,V1t=new TEt}function Rv(){Rv=P,X_=new re}function C3t(){C3t=P,Jzt=new fn}function k9(){k9=P,FK=new WSt}function $it(){$it=P,Hjt=new sv}function A3t(){A3t=P,Gjt=new Rt}function Vit(){Vit=P,Wjt=new OCt}function qit(){qit=P,Hgt=new Hi}function k3t(){k3t=P,Jjt=new rl}function ET(){ET=P,cHt=new Wy}function L3t(){L3t=P,oHt=new TS}function Xit(){Xit=P,I0t=new _3}function I5(){I5=P,eHt=new go}function P3t(){P3t=P,G$t=new as}function I3t(){this.b=new IX(Xbt)}function R3t(){this.a=new IX(awt)}function D3t(){this.a=(Js(),Ff)}function N3t(){this.a=(Js(),Ff)}function L9(t){this.a=0,this.b=t}function P9(t){return t.b!=t.d.c}function O3t(t,e){return t.d[e.o]}function B3t(t,e){for(;t.sd(e););}function Zit(t,e,n){t.splice(e,n)}function ute(t,e,n){tc(t.d,e.f,n)}function lte(t,e){EX(Et(t.a),e)}function hte(t,e){EX(Et(t.a),e)}function F3t(t){t.c?aNt(t):uNt(t)}function U3t(){U3t=P,Rqt=new PR}function z3t(){z3t=P,qqt=new Mxt}function j3t(){j3t=P,Xqt=new Ext}function v1(){v1=P,Nl=new Tit}function Yit(){Yit=P,Qvt=new Dxt}function I9(){I9=P,VF=new vi}function Kit(){Kit=P,l_t=new Dt}function _1(){_1=P,hg=new uj}function ST(){ST=P,htt=new lSt}function Ap(){Ap=P,_I=new hSt}function JG(){JG=P,oXt=new Ig}function Jo(){Jo=P,aXt=new qz}function R5(t){this.a=new oMt(t)}function H3t(t){this.a=a(si(t),13)}function G3t(t,e){this.b=t,this.c=e}function W3t(t,e){this.b=t,this.a=e}function Jit(t,e){this.b=t,this.d=e}function rM(t,e){this.e=t,this.d=e}function Qit(t,e){this.b=t,this.c=e}function $3t(t,e){this.a=t,this.b=e}function V3t(t,e){this.a=t,this.b=e}function q3t(t,e){this.a=t,this.b=e}function X3t(t,e){this.a=t,this.b=e}function Z3t(t,e){this.b=t,this.a=e}function p2(t,e){pM.call(this,t,e)}function Dv(t,e){p2.call(this,t,e)}function Y3t(t,e){this.b=t,this.a=e}function K3t(t,e){this.a=t,this.b=e}function D5(t,e){this.g=t,this.i=e}function J3t(t,e){this.b=t,this.a=e}function QG(t,e){this.a=t,this.b=e}function Q3t(t,e){this.a=t,this.f=e}function tMt(t){UW(t.Wb()),this.c=t}function eMt(t,e){this.b=t,this.c=e}function Gi(t,e){this.f=t,this.g=e}function nMt(t,e){Gi.call(this,t,e)}function iMt(t,e){this.e=t,this.c=e}function tW(t){this.b=a(si(t),43)}function rMt(t){this.a=a(si(t),15)}function sM(t){this.a=a(si(t),15)}function trt(t,e){this.a=t,this.b=e}function fte(t,e){return t>e&&e0?t:e}function FEt(t){return ia(t.l,t.m,t.h)}function PW(t){return t<10?"0"+t:""+t}function qte(t){return t==Xm||t==vw}function Xte(t){return t==Xm||t==ww}function ql(t){return nc(t.b.b,t,0)}function UEt(t){this.a=XMt(),this.b=t}function zEt(t){this.a=XMt(),this.b=t}function _2(t){this.a=t,o5.call(this)}function jEt(t){this.a=t,o5.call(this)}function Drt(t,e){DL(t,0,t.length,e)}function HEt(t,e){return Ut(t.a,e),e}function Zte(t,e){return Ut(t.c,e),t}function GEt(t,e){return pa(t.a,e),t}function Yte(t,e){return Zl(),e.a+=t}function Kte(t,e){return Zl(),e.c+=t}function Jte(t,e){return Zl(),e.a+=t}function WEt(t){return t==ry||t==iy}function zv(t){return t==ah||t==uh}function Z5(t){return t==cg||t==fp}function Gd(t){return t!=dp&&t!=ob}function Xl(t){return t.eg()&&t.fg()}function nD(t){return pa(new as,t)}function $Et(){$Et=P,uQ=new OC(qQ)}function Xa(){$8.call(this,new xm)}function VEt(){YD.call(this,0,0,0,0)}function lM(){qh.call(this,0,0,0,0)}function Nrt(t){wEt.call(this,t,!0)}function Oo(t){this.a=t.a,this.b=t.b}function Wd(t,e,n){th(t,e),eh(t,n)}function iD(t,e,n){o_(t,e),s_(t,n)}function Ort(t,e,n){OV(t,e),BV(t,n)}function IW(t,e,n){xC(t,e),yC(t,n)}function RW(t,e,n){MC(t,e),EC(t,n)}function DW(t,e){mq(t,e),FV(t,t.D)}function qEt(t,e){return new FM(e,t)}function Qte(t,e){return new FM(e,t)}function Lp(t,e){return te?1:0}function HT(t){return xot(t.b.tc(),t.a)}function id(t){return QT(t.a.tc(),t.b)}function XEt(t){return ml(t,0,t.length)}function rD(t){return t!=null?Yr(t):0}function $d(t){aAt.call(this,new kit(t))}function ZEt(){B9.call(this,"Head",1)}function YEt(){B9.call(this,"Tail",3)}function Brt(t,e,n){QW.call(this,t,e,n)}function tee(t,e,n){O8(t,e.le(t.a,n))}function KEt(t,e){return parseInt(t,e)}function eee(t,e){return vC(e,Tf(t))}function nee(t,e){return vC(e,Tf(t))}function y2(t){YD.call(this,t,t,t,t)}function NW(t){t.c=dt(un,te,1,0,5,1)}function JEt(t){t.a=dt(un,te,1,8,5,1)}function Frt(t){return t.b&&YX(t),t.a}function Urt(t){return t.b&&YX(t),t.c}function OW(t){return t.d&&wX(t),t.c}function BW(t){return t.d&&wX(t),t.b}function zrt(t){return t.d&&wX(t),t.a}function jrt(t,e,n){return Vr(t,e,n),n}function QEt(t,e,n){Vr(t.c[e.g],e.g,n)}function iee(t,e,n){return wr(t.g,n,e)}function ree(t,e,n){return wr(t.k,n,e)}function see(t,e,n){Wd(n,n.i+t,n.j+e)}function xc(t,e){es.call(this,t.b,e)}function GT(t){Ai(),Fa.call(this,t)}function Hu(){Hu=P,lg=(U3t(),Rqt)}function Kn(){Kn=P,new tSt,new Dt}function tSt(){new vi,new vi,new vi}function Ao(){Ao=P,Azt=new xt,b1t=new Bt}function jv(){jv=P,d6=new gMt,p6=new DEt}function al(){al=P,p1t=Nee(new L5(Rc))}function ts(){ts=P,new Yj((al(),"="))}function sD(t){t.j=dt(I1t,wt,287,0,0,1)}function eSt(t){this.a=t,qst.call(this,t)}function oee(t){return t==null?0:Yr(t)}function WT(t){return t==null?eu:Yc(t)}function bo(t,e){return t.charCodeAt(e)}function hM(t,e,n){return Wrt(t,Ca(e),n)}function ia(t,e,n){return{l:t,m:e,h:n}}function Qo(t){return t.ae-1?0:e-1}function Tee(t,e,n){return n?e!=0:e!=t-1}function HW(t,e,n){return t.a[e.g][n.g]}function Cee(t,e){return t.e[e.c.o][e.o]}function Aee(t,e){return t.a[e.c.o][e.o]}function Wh(t,e){return t.a[e.c.o][e.o]}function kee(t,e){return t.j[e.o]=sbe(e)}function Lee(t,e){return ro(t.c.d,e.c.d)}function Pee(t,e){return ro(t.c.c,e.c.c)}function Iee(t,e,n){X2e(t.a,t.b,t.c,e,n)}function Ree(t,e,n,i){Vr(t.a[e.g],n.g,i)}function qT(t,e,n){return Vr(t.g,e,n),n}function hl(t,e){return t.a*=e,t.b*=e,t}function Dee(t,e){t.q.setHours(e),o4(t,e)}function Ss(t,e,n){lL.call(this,t,e,n)}function aD(t,e,n){Ss.call(this,t,e,n)}function Gu(t,e,n){Ss.call(this,t,e,n)}function vSt(t,e,n){aD.call(this,t,e,n)}function qrt(t,e,n){kD.call(this,t,e,n)}function _St(t,e,n){kD.call(this,t,e,n)}function ySt(t,e,n){qrt.call(this,t,e,n)}function xSt(t,e,n){Xrt.call(this,t,e,n)}function Xrt(t,e,n){lL.call(this,t,e,n)}function dM(t,e,n){lL.call(this,t,e,n)}function pM(t,e){this.a=t,nW.call(this,e)}function $n(t){this.i=t,this.f=this.i.j}function x1(t){this.c=t,this.a=this.c.a}function Zrt(){this.Bb|=256,this.Bb|=512}function MSt(t,e){this.a=t,tW.call(this,e)}function ESt(t,e){this.a=e,tW.call(this,t)}function Yrt(t){this.b=t,this.a=this.b.a.e}function SSt(t){t.b.jc(),--t.d.f.d,GD(t.d)}function TSt(t){t.a=a(an(t.b.a,4),116)}function CSt(t){t.a=a(an(t.b.a,4),116)}function ASt(t){l5.call(this,a(si(t),34))}function kSt(t){l5.call(this,a(si(t),34))}function Nee(t){return si(eu),new rCt(t,t)}function LSt(t,e){return new c9t(t.a,t.b,e)}function $h(t,e,n){return t.substr(e,n-e)}function Oee(t){return t==null?null:t.name}function Bee(t){return t.l+t.m*ix+t.h*o0}function Gb(t){return typeof t=="number"}function Vo(t){return typeof t=="number"}function Pp(t,e){return!!e&&t.b[e.g]==e}function Krt(t,e){var n;n=t[D_],e[D_]=n}function uD(t){Db.call(this,t),this.a=t}function Jrt(t){Dg.call(this,t),this.a=t}function K5(t){Pv.call(this,t),this.a=t}function Qrt(t){$8.call(this,new Fct(t))}function PSt(t){if(!t)throw K(new C)}function Hn(t){if(!t)throw K(new J)}function Vd(t){t.o==null&&Ome(t)}function GW(t){return Hn(t.a!=null),t.a}function ISt(t,e){return Ut(e.a,t.a),t.a}function RSt(t,e){return Ut(e.b,t.a),t.a}function Fee(t,e){e&&(t.a=(Zv(e),e.a))}function tst(t,e){return oC(t.a,e)!=null}function fa(t,e){return a(rr(t.a,e),15)}function WW(t){return t.b=a(E4t(t.a),38)}function lm(t){return t.$H||(t.$H=++U3e)}function $W(t){return Qo(t.a)||Qo(t.b)}function Wb(t,e){return!!t.p&&dm(t.p,e)}function Uee(t,e){return t.k.b=(En(e),e)}function zee(t,e){return t.k.b=(En(e),e)}function lD(t,e){return++t.b,Ut(t.a,e)}function est(t,e){return++t.b,Lc(t.a,e)}function jee(t,e,n){return pkt(t,e,n,t.b)}function nst(t,e,n){return pkt(t,e,n,t.c)}function ist(t,e){Sut.call(this,t,e,null)}function DSt(t,e){this.a=e,tW.call(this,t)}function J5(t){this.a=t,z8.call(this,t)}function NSt(){ET(),this.b=new e2(this)}function VW(t,e){_$(),this.f=e,this.d=t}function OSt(){sD(this),JD(this),this.Pd()}function XT(t){this.d=t,$n.call(this,t)}function x2(t){this.c=t,$n.call(this,t)}function Q5(t){this.c=t,XT.call(this,t)}function Hee(t,e,n){Tq(t.a,n),p7(t.a,e)}function rst(t,e,n){a(RL(t,e),19).nc(n)}function hm(t,e){return Ut(e.a,t.a),t.a}function sd(t){var e;e=t.a,t.a=t.b,t.b=e}function tL(t,e){ST(),this.a=t,this.b=e}function hD(t,e){Ap(),this.b=t,this.c=e}function BSt(t,e,n,i){mot.call(this,t,e,n,i)}function fD(t,e,n){var i;i=t.fd(e),i.Bc(n)}function FSt(t,e,n){try{t[e]=n}catch{}}function dD(){dD=P,FF=new es(RBt,0)}function ZT(){ZT=P,dA=new kr("root")}function YT(){YT=P,vI=new kxt,new Axt}function Gee(t){return++Ar,new Yb(3,t)}function od(t){return Ah(t,tx),new qu(t)}function sst(t){return Ao(),si(t),new OTt(t)}function Wee(t){return jv(),$i((IAt(),Lzt),t)}function USt(t){return TM(),parseInt(t)||-1}function $ee(t,e){return me(),t==e?0:t?1:-1}function Vee(t){return t==null?null:Yc(t)}function qee(t){return t==null?null:Yc(t)}function eL(t){return t.f!=null?t.f:""+t.g}function qW(t){return Lot(t.c,t.c.length)}function zSt(t){t.b=new GSt(t),t.c=new vi}function ost(t){this.q=new y.Date(AM(t))}function jSt(t){this.c=t,this.a=1,this.b=1}function cst(t){iM(),this.b=t,this.a=!0}function HSt(){this.a=new Nv,this.b=new Nv}function GSt(t){Yst.call(this,t,null,null)}function WSt(){Gi.call(this,"POLYOMINO",0)}function nL(t){ct(t,142)&&a(t,142).Xg()}function XW(t){return Hn(t.b!=0),t.a.a.c}function pD(t){return Hn(t.b!=0),t.c.b.c}function Wu(t,e,n){return t.a+=e,t.b+=n,t}function Xee(t,e,n){return t.a*=e,t.b*=n,t}function iL(t,e,n){return t.a-=e,t.b-=n,t}function $St(t,e,n){return t.a+=ml(e,0,n),t}function ZW(t){return t.a=-t.a,t.b=-t.b,t}function YW(t){return J3(t.d.e-t.e.e)-t.a}function Zee(t,e){return t.c.nc(a(e,134))}function Yee(t,e,n){return Ut(e,yIt(t,n))}function Kee(t,e){return t>0?e*e/t:e*e*100}function Jee(t,e){return t>0?e/(t*t):e*100}function Qee(t,e,n){JL(kc(t.a),e,LAt(n))}function tne(t,e,n){JL(Ka(t.a),e,PAt(n))}function Mu(t,e,n){hu.call(this,t,e,n,2)}function VSt(t,e){ST(),tL.call(this,t,e)}function ast(t,e){Ap(),hD.call(this,t,e)}function qSt(t,e){Ap(),hD.call(this,t,e)}function XSt(t,e){Ap(),ast.call(this,t,e)}function KW(t,e){Hu(),BD.call(this,t,e)}function ust(t,e){Hu(),BD.call(this,t,e)}function ZSt(t,e){Hu(),KW.call(this,t,e)}function lst(t,e){Hu(),KW.call(this,t,e)}function YSt(t,e){Hu(),lst.call(this,t,e)}function KSt(t,e){Hu(),ust.call(this,t,e)}function JSt(t,e){Hu(),BD.call(this,t,e)}function ene(t,e,n){return e.ak(t.e,t.c,n)}function nne(t,e,n){return e.bk(t.e,t.c,n)}function hst(t,e,n){return q7(OL(t,e),n)}function JW(t,e){return B1(t.e,a(e,42))}function ine(t){return t==null?null:cxe(t)}function rne(t){return t==null?null:Bge(t)}function QSt(t){this.c=t,th(t,0),eh(t,0)}function gM(t,e){this.c=t,rM.call(this,t,e)}function KT(t,e){this.a=t,gM.call(this,t,e)}function fst(t){this.a=t,this.b=r4t(this.a.d)}function sne(t,e){this.d=t,Zj(this),this.b=e}function dst(){iPt.call(this),this.Bb|=ao}function gD(){uhe.call(this,new xm,new vi)}function QW(t,e,n){TL.call(this,t,e,n,null)}function pst(t,e,n){TL.call(this,t,e,n,null)}function cd(t,e){t.a.bd(t.b,e),++t.b,t.c=-1}function gst(t,e){var n;return n=t.e,t.e=e,n}function de(t){return VT(t==null||Hb(t)),t}function Yt(t){return VT(t==null||Gb(t)),t}function hi(t){return VT(t==null||Es(t)),t}function one(t,e){return si(t),si(e),SC(t,e)}function tTt(t){return t>8?0:t+1}function eTt(t){lu(t.c),t.b.b=t.b,t.b.a=t.b}function nTt(t,e){U5t.call(this,t),this.a=e}function gi(t,e){U5t.call(this,t),this.a=e}function cne(t){but.call(this,0,0),this.f=t}function t$(t){var e;e=t[D_]|0,t[D_]=e+1}function ane(t,e,n){return t.Ld(e,n)<=0?n:e}function une(t,e){return a(N2(t.b,e),180)}function lne(t,e){return a(N2(t.c,e),199)}function e$(t){return a(Ee(t.a,t.b),269)}function iTt(t){return new We(t.c,t.d+t.a)}function mst(t){return N1(Jre(Vo(t)?gl(t):t))}function rTt(t){return Eu(),WEt(a(t,179))}function Fg(){Fg=P,Bvt=qe((Ju(),E0))}function mD(){mD=P,y.Math.pow(2,-65)}function rL(t,e,n){++t.j,t.Yh(),wV(t,e,n)}function sTt(t,e,n){++t.j,t.Vh(e,t.Ch(e,n))}function bst(t,e,n){return n=Lu(t,e,3,n),n}function wst(t,e,n){return n=Lu(t,e,6,n),n}function vst(t,e,n){return n=Lu(t,e,9,n),n}function qd(t,e){return I$(e,Tpt),t.f=e,t}function _st(t,e){return(e&qi)%t.d.length}function hne(t,e){return I5(),VM(e.d.g,t)}function oTt(t,e){return wr(t.a,e,"")==null}function cTt(t,e,n){return Fht(t.c,t.b,e,n)}function fne(t,e,n){var i;i=t.fd(e),i.Bc(n)}function aTt(t,e){this.a=t,AG.call(this,e)}function sL(t,e){this.a=t,AG.call(this,e)}function uTt(t,e){this.c=t,n_.call(this,e)}function lTt(t){this.b=t,this.a=this.b.b.Tb()}function yst(t,e){f9.call(this,t),this.a=e}function n$(t,e){f9.call(this,t),this.a=e}function es(t,e){kr.call(this,t),this.a=e}function Wv(t,e){Uc.call(this,C4+t+IO+e)}function bD(){CQt.call(this,new vi),this.a=3}function oL(t){return!t.a&&(t.a=new ln),t.a}function wD(t){t.b?wD(t.b):t.f.c.Zb(t.e,t.d)}function hTt(t){this.a=(we(),new oT(si(t)))}function M1(t,e){if(!t)throw K(new yc(e))}function xst(t,e){if(!t)throw K(new yn(e))}function Mst(t,e,n){return t.lastIndexOf(e,n)}function dne(t,e,n){return t.apply(e,n);var i}function i$(t,e,n){return M2(t,a(e,23),n)}function pne(t,e){return YG(qIt(t.a,e,!0))}function gne(t,e){return YG(XIt(t.a,e,!0))}function fTt(t){return new T3t((Zv(t),t.a))}function r$(t){return String.fromCharCode(t)}function mne(t){return t==null?null:t.message}function bne(t,e){t.e=e,e!=null&&FSt(e,vZ,t)}function wne(t,e,n){return ro(t[e.b],t[n.b])}function Est(t,e,n,i){YD.call(this,t,e,n,i)}function cL(t){Sle.call(this,t,(xN(),RK))}function vne(t,e){return t.k.a=(En(e),e+10)}function _ne(t,e){return t.k.a=(En(e),e+10)}function yne(t,e){return I5(),!VM(e.d.g,t)}function dTt(){dTt=P,C1t=dt(Io,wt,21,256,0,1)}function me(){me=P,$m=(me(),!1),TE=!0}function pTt(){this.b=new go,this.c=new Dt}function Sst(){this.d=new go,this.e=new go}function Tst(){this.k=new go,this.n=new go}function gTt(){this.b=new I3t,this.a=new _e}function mTt(){this.b=new vi,this.a=new vi}function bTt(){this.b=new $r,this.a=new $r}function wTt(){this.a=new Dt,this.d=new Dt}function vTt(){this.a=new Dt,this.b=new Dt}function _Tt(){this.a=new iv,this.b=new DG}function yTt(){this.a=new y9,this.c=new bs}function vD(){this.n=new a2,this.i=new lM}function xTt(){vD.call(this),this.a=new go}function Cst(t,e,n){return n=Lu(t,e,11,n),n}function sr(t,e){return t.a+=e.a,t.b+=e.b,t}function ja(t,e){return t.a-=e.a,t.b-=e.b,t}function xne(t,e){var n;return n=e.Yg(t.a),n}function Ast(t,e){return a(t.b.cd(e),190).a}function Mne(t,e){return e==t||XC(N7(e),t)}function Ene(t){return t<100?null:new w1(t)}function Sne(t,e,n){n!=null&&pat(e,Jq(t,n))}function Tne(t,e,n){n!=null&&gat(e,Jq(t,n))}function mM(t,e,n,i){Wt.call(this,t,e,n,i)}function kst(t,e,n,i){Wt.call(this,t,e,n,i)}function MTt(t,e,n,i){kst.call(this,t,e,n,i)}function ETt(t,e,n,i){VD.call(this,t,e,n,i)}function s$(t,e,n,i){VD.call(this,t,e,n,i)}function Lst(t,e,n,i){VD.call(this,t,e,n,i)}function STt(t,e,n,i){s$.call(this,t,e,n,i)}function Pst(t,e,n,i){s$.call(this,t,e,n,i)}function pn(t,e,n,i){Lst.call(this,t,e,n,i)}function TTt(t,e,n,i){Pst.call(this,t,e,n,i)}function CTt(t,e,n,i){yot.call(this,t,e,n,i)}function ATt(t,e,n){this.a=t,Jit.call(this,e,n)}function Cne(t,e,n){return t.d=a(e.Kb(n),206)}function kTt(t,e){return t.Pi().dh().Zg(t,e)}function Ist(t,e){return t.Pi().dh()._g(t,e)}function o$(t,e){return Ao(),Zle(t.tc(),e)!=-1}function Ane(t,e){return ts(),new DSt(t.tc(),e)}function _D(t){return Ao(),t.hc()?t.ic():null}function Rst(t){return Gb(t)?(En(t),t):t.$d()}function yD(t){return!isNaN(t)&&!isFinite(t)}function Dst(t){$b(),this.b=(we(),new Pv(t))}function $b(){$b=P,new Dj((we(),we(),fo))}function LTt(){LTt=P,eXt=dt(un,te,1,0,5,1)}function Nst(){Nst=P,nXt=dt(un,te,1,0,5,1)}function PTt(){PTt=P,Uqt=dt(un,te,1,0,5,1)}function ITt(){ITt=P,S1t=dt(dx,wt,192,256,0,1)}function RTt(){RTt=P,A1t=dt(Vm,wt,149,256,0,1)}function DTt(){DTt=P,P1t=dt(qm,wt,168,256,0,1)}function NTt(){NTt=P,T1t=dt(F4,wt,159,128,0,1)}function OTt(t){this.b=t,this.a=(Ao(),Ao(),b1t)}function BTt(t){this.b=t,tD.call(this,nO,0)}function FTt(t){this.c=t,tD.call(this,nO,0)}function UTt(t){return t.c?nc(t.c.a,t,0):-1}function c$(t,e){return YG(XIt(t.a,e,!1))}function a$(t,e){return YG(qIt(t.a,e,!1))}function $v(t,e){return t.b.sd(new crt(t,e))}function zTt(t,e){return t.b.sd(new yMt(t,e))}function xD(t,e){if(!t)throw K(new yn(e))}function Ost(t,e){if(!t)throw K(new zxt(e))}function Bst(t,e){v9(this),this.e=t,this.f=e}function Fst(){v9(this),this.e=0,this.f=!0}function Ust(t,e){this.c=t,A$.call(this,t,e)}function jTt(t,e){return ct(e,15)&&cNt(t.c,e)}function MD(t,e,n){return a(t.c,64).yj(e,n)}function kne(t,e,n){return a(t.c,64).xj(e,n)}function Lne(t,e,n){return ene(t,a(e,311),n)}function zst(t,e,n){return nne(t,a(e,311),n)}function Pne(t,e,n){return y8t(t,a(e,311),n)}function HTt(t,e,n){return mge(t,a(e,311),n)}function Ine(t,e){return rd(),ni(Et(t.a),e)}function Rne(t,e){return rd(),ni(Et(t.a),e)}function Dne(t){return Ao(),P9(t.a)?vkt(t):null}function GTt(t,e){return t.b.Qb(e)?d4t(t,e):null}function aL(t,e){return t.substr(e,t.length-e)}function WTt(t){return a(t,11).f.c.length!=0}function $Tt(t){return a(t,11).d.c.length!=0}function JT(t){return t==Dx||t==Sd||t==Gc}function VTt(t){Th(t.a),B5t(t.c,t.b),t.b=null}function Eh(t){NW(this),Jst(this.c,0,t.yc())}function ED(t){rSt(this),ld(this),yo(this,t)}function qTt(t,e,n){this.d=t,this.b=n,this.a=e}function Ha(t,e,n){this.a=t,this.b=e,this.c=n}function XTt(t,e,n){this.a=t,this.b=e,this.c=n}function ZTt(t,e,n){this.c=t,this.a=e,this.b=n}function Nne(t,e,n,i){t.d.b.$b(n),t.d.b.Zb(i,e)}function QT(t,e){return Ao(),si(e),new ESt(t,e)}function One(t){return u7(),$i((Tkt(),njt),t)}function Bne(t){return SN(),$i((Ckt(),ijt),t)}function Fne(t){return xN(),$i((Z5t(),Yzt),t)}function Une(t){return z1(),$i((r5t(),Kzt),t)}function zne(t){return z7(),$i((KPt(),rjt),t)}function jne(t){return W2(),$i((J5t(),ojt),t)}function Hne(t){return WC(),$i((Q5t(),ajt),t)}function Gne(t){return k9(),$i((tkt(),ujt),t)}function Wne(t){return CN(),$i((Akt(),Tjt),t)}function $ne(t){return bC(),$i((y5t(),Bjt),t)}function Vne(t){return Mo(),$i((_Lt(),jjt),t)}function qne(t){return jM(),$i((K5t(),Vjt),t)}function Xne(t){return Ke(),$i((SPt(),tHt),t)}function u$(t){YD.call(this,t.d,t.c,t.a,t.b)}function jst(t){YD.call(this,t.d,t.c,t.a,t.b)}function Zne(t){return IC(),$i((x5t(),rHt),t)}function Yne(t){return Po(),$i((YMt(),sHt),t)}function Kne(t){return qC(),$i((wLt(),fHt),t)}function Jne(t){return bN(),$i((kkt(),dHt),t)}function Qne(t){return KM(),$i((XLt(),pHt),t)}function tie(t){return P2(),$i((Lkt(),gHt),t)}function eie(t){return LN(),$i((f5t(),mHt),t)}function nie(t){return NN(),$i((h5t(),bHt),t)}function iie(t){return u_(),$i((d5t(),vHt),t)}function rie(t){return S7(),$i(($Lt(),_Ht),t)}function sie(t){return gP(),$i((VLt(),yHt),t)}function oie(t){return QM(),$i((qLt(),xHt),t)}function cie(t){return So(),$i((x6t(),MHt),t)}function aie(t){return BM(),$i((v5t(),EHt),t)}function uie(t){return tp(),$i((_5t(),THt),t)}function lie(t){return hN(),$i((Pkt(),CHt),t)}function hie(t){return bl(),$i((vLt(),kHt),t)}function fie(t){return x7(),$i((ZLt(),rWt),t)}function die(t){return nw(),$i((Y5t(),sWt),t)}function pie(t){return GC(),$i((bLt(),oWt),t)}function gie(t){return S_(),$i((UPt(),cWt),t)}function mie(t){return Fo(),$i((p5t(),uWt),t)}function bie(t){return i7(),$i((g5t(),lWt),t)}function wie(t){return RN(),$i((m5t(),hWt),t)}function vie(t){return F2(),$i((w5t(),fWt),t)}function _ie(t){return HN(),$i((b5t(),dWt),t)}function Hst(t,e){for(;t.b.sd(new crt(t,e)););}function SD(t,e,n){this.b=t,this.a=e,this.c=n}function Gst(t,e,n){this.a=t,this.b=e,this.c=n}function YTt(t,e,n){this.a=t,this.b=e,this.c=n}function TD(t,e,n){this.e=e,this.b=t,this.d=n}function l$(t){var e;return e=new q0,e.e=t,e}function yie(t){return!t.e&&(t.e=new Dt),t.e}function Zl(){Zl=P,aHt=new Ck,uHt=new pv}function h$(){h$=P,W1t=new Pn,Zzt=new Tt}function uL(){uL=P,pB=new Bc,gB=new MS}function xie(t){return dC(),$i((zkt(),RWt),t)}function Mie(t){return Tm(),$i((M5t(),kWt),t)}function Eie(t){return ZM(),$i((tLt(),C$t),t)}function Sie(t){return KC(),$i((HLt(),k$t),t)}function Tie(t){return Sf(),$i((Rkt(),zWt),t)}function Cie(t){return Zh(),$i((Ikt(),HWt),t)}function Aie(t){return IL(),$i((Dkt(),WWt),t)}function kie(t){return bu(),$i((KMt(),w$t),t)}function Lie(t){return KL(),$i((S5t(),X$t),t)}function Pie(t){return yN(),$i((Ukt(),q$t),t)}function Iie(t){return vm(),$i((Nkt(),T$t),t)}function Rie(t){return iN(),$i((Bkt(),F$t),t)}function Die(t){return sN(),$i((Fkt(),U$t),t)}function Nie(t){return PN(),$i((Okt(),W$t),t)}function Oie(t){return n7(),$i((E5t(),V$t),t)}function Bie(t){return g7(),$i((eLt(),rVt),t)}function Fie(t){return ON(),$i((T5t(),sVt),t)}function Uie(t){return t0(),$i((xLt(),cVt),t)}function zie(t){return i0(),$i((zPt(),uVt),t)}function jie(t){return md(),$i((GLt(),lVt),t)}function Hie(t){return Kh(),$i((C5t(),FVt),t)}function Gie(t){return Ht(),$i((uLt(),UVt),t)}function Wie(t){return Ls(),$i((DLt(),BVt),t)}function $ie(t){return Kg(),$i((k5t(),DVt),t)}function Vie(t){return r0(),$i((QPt(),NVt),t)}function qie(t){return G1(),$i((yLt(),OVt),t)}function Xie(t){return Js(),$i((MLt(),kVt),t)}function Zie(t){return ip(),$i((nLt(),LVt),t)}function Yie(t){return gd(),$i((iLt(),PVt),t)}function Kie(t){return M7(),$i((WLt(),IVt),t)}function Jie(t){return Ju(),$i((rLt(),WVt),t)}function Qie(t){return ma(),$i((JPt(),$Vt),t)}function tre(t){return o7(),$i((oLt(),VVt),t)}function ere(t){return Cu(),$i((cLt(),ZVt),t)}function nre(t){return Ch(),$i((A5t(),KVt),t)}function ire(t){return fu(),$i((L5t(),QVt),t)}function rre(t){return Ga(),$i((P5t(),eqt),t)}function sre(t){return K7(),$i((PEt(),Eqt),t)}function ore(t){return Am(),$i((sLt(),Tqt),t)}function cre(t){return eE(),$i((jPt(),Fqt),t)}function f$(t,e,n){return t=e)throw K(new w9)}function Dre(t,e){var n;for(n=0;n0?1:0}function uot(t){return!Array.isArray(t)&&t.sl===B}function RCt(t){return t!=null&&S$(t)&&t.sl!==B}function lot(t,e){return ct(e,23)&&Pp(t,a(e,23))}function DCt(t,e){return ct(e,23)&&Nue(t,a(e,23))}function Fre(t,e){return t.a.get(e)!==void 0}function hot(t){return gu(t,26)*f4+gu(t,27)*d4}function NCt(t,e){return $ue(new ie,new Jj(t),e)}function fot(t,e){if(t==null)throw K(new wT(e))}function M2(t,e,n){return Tu(t.a,e),Mot(t,e.g,n)}function zD(t,e,n){O6t(0,e,t.length),DL(t,0,e,n)}function pm(t,e,n){Qv(e,t.c.length),U5(t.c,e,n)}function Ure(t,e,n){uDt(n,t,1),Ut(e,new IMt(n,t))}function zre(t,e,n){$C(n,t,1),Ut(e,new kMt(n,t))}function dot(){this.d=new xi,this.e=new Z4t(this)}function OCt(){this.b=new tn,this.c=new X4t(this)}function BCt(){pAt(),this.e=new Fr,this.d=new Fr}function v$(t,e){this.b=new Fr,this.a=t,this.c=e}function qv(t,e,n){V1(),this.e=t,this.d=e,this.a=n}function jD(t,e,n){var i;t&&(i=t.i,i.d=e,i.a=n)}function HD(t,e,n){var i;t&&(i=t.i,i.c=e,i.b=n)}function FCt(t,e,n){var i;for(i=0;i0?y.Math.log(t/e):-100}function nse(t,e){return ro(t.c.c+t.c.b,e.c.c+e.c.b)}function A$(t,e){this.d=t,$n.call(this,t),this.e=e}function qb(t,e,n){return Qle(t,e.g,n),Tu(t.c,e),t}function ise(t){return k_(t,(Js(),ah)),t.d=!0,t}function si(t){if(t==null)throw K(new r2);return t}function E2(t){if(t==null)throw K(new r2);this.a=t}function k$(t){t.a=null,t.e=null,lu(t.b),t.d=0,++t.c}function L$(t){return!t.j&&nit(t,Sve(t.g,t.b)),t.j}function rse(t){return t.b.k.a+=t.a.f*(t.a.a-1),null}function iC(t){Gv(t.b!=-1),Em(t.c,t.a=t.b),t.b=-1}function KCt(t){JEt(this),RG(this.a,Lat(8>t?8:t)<<1)}function Cot(t,e){Fa.call(this,1),this.a=t,this.b=e}function P$(t,e,n){this.a=t,lV(n,e),this.c=e,this.b=n}function JCt(t,e){this.a=t,this.b=e,this.c=this.b.lc()}function gL(t,e){pSt(t,ct(e,184)?e:a(e,1630).rk())}function QCt(t){return si(t),ct(t,476)?a(t,476):Yc(t)}function Aot(t,e){return e?yo(t,e):!1}function wM(t,e){return t.a+=String.fromCharCode(e),t}function S1(t,e){return t.a+=String.fromCharCode(e),t}function sse(t,e,n,i){return t.a+=""+e.substr(n,i-n),t}function ose(t,e,n){var i;return i=O2(t,e),jkt(t,e,n),i}function cse(t,e,n){var i;for(i=0;i=t.g}function xse(t,e){return k2(),t==n0(e)?Dm(e):n0(e)}function wr(t,e,n){return Es(e)?tc(t,e,n):Au(t.d,e,n)}function N$(t,e,n){var i;return i=GV(t,e,n),vht(t,i)}function sC(t,e){var n;return n=t.a._b(),fce(e,n),n-1-e}function Rot(t,e){var n;return n=new ML(t),aut(n,e),n}function Vr(t,e,n){return vee(n==null||o_e(t,n)),t[e]=n}function T2(t,e){var n;n=t.a.length,O2(t,n),jkt(t,n,e)}function c4t(t,e){var n;++t.j,n=t.hi(),t.Wh(t.Ch(n,e))}function Mse(t,e){T2(t,new E2(e.f!=null?e.f:""+e.g))}function Ese(t,e){T2(t,new E2(e.f!=null?e.f:""+e.g))}function a4t(t){this.b=new Dt,this.a=new Dt,this.c=t}function dl(t){this.c=new go,this.a=new Dt,this.b=t}function u4t(t){Sst.call(this),this.a=new go,this.c=t}function Dot(t,e,n){pT.call(this,e),this.a=t,this.b=n}function Not(t,e,n){Fa.call(this,t),this.a=e,this.b=n}function Oot(t,e,n){this.a=t,f9.call(this,e),this.b=n}function l4t(t,e,n){this.a=t,gct.call(this,8,e,null,n)}function h4t(t){this.c=t,this.a=new Fr,this.b=new Fr}function f4t(t){this.c=t,this.b=this.c.a,this.a=this.c.e}function Sse(t){this.a=(En(ui),ui),this.b=t,new Tit}function mm(t){return!t.d&&(t.d=new Ss(Do,t,1)),t.d}function d4t(t,e){var n;return n=t.b.$b(e),t.d.b.$b(n),n}function Bot(t,e){for(;e-- >0;)t=t<<1|(t<0?1:0);return t}function Rp(t,e){return zt(t)===zt(e)||t!=null&&Fi(t,e)}function bm(t,e){return eC(e,t.a.c.length),Ee(t.a,e)}function O$(t){return y.Math.sqrt(t.a*t.a+t.b*t.b)}function Tse(t){return String.fromCharCode.apply(null,t)}function Dp(t){return ct(t,13)?a(t,13)._b():pC(t.tc())}function p4t(t){return ct(t,543)?t:new pMt(t)}function Mc(t){return!t.a&&t.c?t.c.b:t.a}function B$(t){t.c?B$(t.c):(t.d=!0,Zbe(t))}function Zv(t){t.c?Zv(t.c):($M(t),t.d=!0)}function g4t(t){bL(t.a),t.b=dt(un,te,1,t.b.length,5,1)}function F$(t){this.c=t,this.b=t.a.b.a,Krt(t.a.c,this)}function Cse(t,e){t.c<0||t.b.b0?new Bst(t-1,e):new Bst(t,e)}function x4t(t,e){return AD(),new Aut(new kSt(t),new ASt(e))}function xM(t){if(pu(t.d),t.d.d!=t.c)throw K(new C)}function Ose(t,e){var n;return n=t.a.get(e),n??[]}function Bse(t,e){var n;return n=zi(t.f,e),Eat(e,n),null}function _i(t,e,n,i){return i6t(t,e,n,!1),Qat(t,i),t}function Fse(t,e){return t.a=$h(t.a,0,e)+""+aL(t.a,e+1),t}function Use(t){return t.j.c=dt(un,te,1,0,5,1),t.a=-1,t}function zse(t){return!t.c&&(t.c=new pn(Si,t,5,8)),t.c}function jse(t){return!t.b&&(t.b=new pn(Si,t,4,7)),t.b}function j$(t){return!t.n&&(t.n=new Wt(ic,t,1,7)),t.n}function Hot(t){return!t.c&&(t.c=new Wt(Rl,t,9,9)),t.c}function MM(t){return t.e==ME&&tit(t,nde(t.g,t.b)),t.e}function mL(t){return t.f==ME&&eit(t,Lpe(t.g,t.b)),t.f}function M4t(t){return VT(t==null||S$(t)&&t.sl!==B),t}function Got(t,e){if(t==null)throw K(new wT(e));return t}function Xb(t){var e;return e=t.b,!e&&(t.b=e=new jj(t)),e}function Wot(t){var e;return e=t.Gh(t.f),ni(t,e),e.hc()}function bL(t){var e;for(e=t.tc();e.hc();)e.ic(),e.jc()}function E4t(t){return Hn(t.bi&&++i,i}function Kd(t){var e,n;return n=(e=new b1,e),_C(n,t),n}function W$(t){var e,n;return n=(e=new b1,e),N8t(n,t),n}function Vse(t){if(t.p!=5)throw K(new na);return or(t.f)}function qse(t){if(t.p!=5)throw K(new na);return or(t.k)}function D4t(t){return t?t.Wb():!null.tc().hc()}function JD(t){return t.n&&(t.e!==NOt&&t.Pd(),t.j=null),t}function Xse(t){return t!=null&&CT(qF,t.toLowerCase())}function $$(t){this.f=t,this.c=this.f.e,t.f>0&&r8t(this)}function jg(t,e,n,i){this.e=t,this.a=e,this.c=n,this.d=i}function N4t(t,e,n,i){Hu(),o5t.call(this,e,n,i),this.a=t}function O4t(t,e,n,i){Hu(),o5t.call(this,e,n,i),this.a=t}function B4t(t,e,n,i){this.b=t,this.c=i,tD.call(this,e,n)}function F4t(t,e){this.a=t,sne.call(this,t,a(t.d,15).fd(e))}function ld(t){t.a.a=t.c,t.c.b=t.a,t.a.b=t.c.a=null,t.b=0}function Vot(t,e){return t.b=e.b,t.c=e.c,t.d=e.d,t.a=e.a,t}function Zse(t,e,n){t.i=0,t.e=0,e!=n&&C6t(t,e,n)}function Yse(t,e,n){t.i=0,t.e=0,e!=n&&A6t(t,e,n)}function U4t(t,e){var n;return n=EV(e),a(zi(t.c,n),21).a}function Kse(t,e,n){return n>=0&&le(t.substr(n,e.length),e)}function V$(t,e){return e==null?!!Ea(t.d,null):Fre(t.e,e)}function z4t(t,e){t.d&&!t.d.a&&(IG(t.d,e),z4t(t.d,e))}function j4t(t,e){t.e&&!t.e.a&&(IG(t.e,e),j4t(t.e,e))}function H4t(t,e){this.g=t,this.d=Y(Z(Cl,1),Ih,8,0,[e])}function qot(t,e){new Fr,this.a=new qa,this.b=t,this.c=e}function G4t(){ylt(this,new E8),this.wb=(T1(),Ae),Q3()}function W4t(t,e){return ct(e,166)&&le(t.b,a(e,166).Lf())}function Jse(t,e){return du(t),du(e),qxt(a(t,23),a(e,23))}function Xot(t,e,n,i,r,c){X5t.call(this,t,e,n,i,r,c?-2:-1)}function $4t(t,e,n,i){krt.call(this,e,n),this.b=t,this.a=i}function V4t(t,e){AQt.call(this,new x$(t)),this.a=t,this.b=e}function Zot(t){this.b=t,this.c=t,t.e=null,t.c=null,this.a=1}function q4t(t,e){var n;return n=Og(t.ql),e==null?n:n+": "+e}function ns(t,e){return N1(Wre(Vo(t)?gl(t):t,Vo(e)?gl(e):e))}function Xh(t,e){return N1($re(Vo(t)?gl(t):t,Vo(e)?gl(e):e))}function Qse(t,e){return N1(Vre(Vo(t)?gl(t):t,Vo(e)?gl(e):e))}function Yot(t){return t&&t.hashCode?t.hashCode():lm(t)}function EM(t){return we(),ct(t,49)?new XG(t):new uD(t)}function we(){we=P,fo=new xe,ap=new hn,eB=new Se}function SM(){SM=P,H1t=new ke,Wzt=new ke,G1t=new mn}function Kot(){Kot=P,Qzt=new An,ejt=new dot,tjt=new zn}function TM(){TM=P;var t,e;e=!Ufe(),t=new ft,CK=e?new Q:t}function X4t(t){this.c=t,this.b=new Ub(a(si(new Je),65))}function Z4t(t){this.c=t,this.b=new Ub(a(si(new Li),65))}function Np(){this.a=new qa,this.b=(Ah(3,tx),new qu(3))}function q$(t,e,n){this.a=t,this.e=!1,this.d=e,this.c=n}function Y4t(t,e,n){return t.f?t.f.re(e,n):!1}function Et(t){return!t.s&&(t.s=new Wt(Ra,t,21,17)),t.s}function Wi(t){return!t.q&&(t.q=new Wt(ph,t,11,10)),t.q}function Jot(t){return!t.a&&(t.a=new Wt(zr,t,10,11)),t.a}function toe(t,e){var n;return n=$rt(t.a,e),n&&(e.d=null),n}function Yv(t,e,n,i){Vr(t.c[e.g],n.g,i),Vr(t.c[n.g],e.g,i)}function QD(t,e,n,i){Vr(t.c[e.g],e.g,n),Vr(t.b[e.g],e.g,i)}function C2(t,e,n){dN(),t&&wr(ctt,t,e),t&&wr(bI,t,n)}function eoe(t,e){bSt(t,or(ns(E1(e,24),rO)),or(ns(e,rO)))}function da(t){var e;return e=a(an(t,16),24),e||t.Rg()}function noe(t){if(t.p!=0)throw K(new na);return TT(t.f,0)}function ioe(t){if(t.p!=0)throw K(new na);return TT(t.k,0)}function Bo(t){return t.u||(pl(t),t.u=new aTt(t,t)),t.u}function roe(t){return t==hp||t==Zp}function soe(t){E9(),y.setTimeout(function(){throw t},0)}function X$(t){this.c=t.c,this.d=t.d,this.b=t.b,this.a=t.a}function Op(t,e){this.e=t,this.a=un,this.b=ENt(e),this.c=e}function K4t(){this.b=new $r,this.c=new Fr,this.d=new OG}function Sf(){Sf=P,Qm=new wrt(gE,0),Xp=new wrt(pE,1)}function vm(){vm=P,sg=new Mrt(pE,0),oy=new Mrt(gE,1)}function J4t(){J4t=P,$b(),m1t=($o(),Pzt),Czt=new zot(new Ub(m1t))}function ooe(t){return J4t(),si(t),m1t==t?Czt:new zot(new Ub(t))}function Hg(t,e,n,i,r,c,l){return new aV(t.e,e,n,i,r,c,l)}function Q4t(t,e,n,i,r,c){this.a=t,zV.call(this,e,n,i,r,c)}function tAt(t,e,n,i,r,c){this.a=t,zV.call(this,e,n,i,r,c)}function Qot(t){this.e=t,this.b=this.e.a.entries(),this.a=[]}function tct(t){t.d=t.d-15,t.b=t.b-15,t.c=t.c+15,t.a=t.a+15}function eAt(t,e){var n;n=a($ct(t.e,e),249),n&&(t.d=!0)}function Zc(t,e){return e==null?za(Ea(t.d,null)):IT(t.e,e)}function Ea(t,e){return L6t(t,e,Ose(t,e==null?0:t.b.he(e)))}function nAt(t,e){return e===t?"(this Map)":e==null?eu:Yc(e)}function coe(t,e){return t.a?e.pg().tc():a(e.pg(),64).oh()}function vL(t,e,n){return t.a=$h(t.a,0,e)+(""+n)+aL(t.a,e),t}function Gg(t,e){if(e==null)throw K(new r2);return Xfe(t,e)}function aoe(){return u7(),Y(Z(ngt,1),jt,391,0,[NK,egt])}function uoe(){return SN(),Y(Z(rgt,1),jt,390,0,[igt,OK])}function loe(){return CN(),Y(Z(Agt,1),jt,387,0,[GK,uB])}function hoe(){return bN(),Y(Z(B0t,1),jt,386,0,[O0t,wJ])}function foe(){return P2(),Y(Z(z0t,1),jt,317,0,[S6,E6])}function doe(){return hN(),Y(Z(smt,1),jt,383,0,[RJ,rmt])}function poe(){return sN(),Y(Z(cwt,1),jt,388,0,[_Q,owt])}function goe(){return iN(),Y(Z(swt,1),jt,438,0,[vQ,rwt])}function moe(){return PN(),Y(Z(awt,1),jt,447,0,[bF,UE])}function boe(){return IL(),Y(Z(Vbt,1),jt,437,0,[$bt,aF])}function woe(){return Sf(),Y(Z(UWt,1),jt,466,0,[Qm,Xp])}function voe(){return Zh(),Y(Z(jWt,1),jt,465,0,[x0,rf])}function _oe(){return vm(),Y(Z(S$t,1),jt,417,0,[sg,oy])}function yoe(){return dC(),Y(Z(IWt,1),jt,472,0,[oA,sA])}function xoe(){return yN(),Y(Z(lwt,1),jt,389,0,[uwt,EQ])}function tN(t,e,n,i){return n>=0?t.Dg(e,n,i):t.lg(null,n,i)}function Moe(t,e){var n;n=a(cn(e,(ZT(),dA)),35),u7t(t,n)}function Z$(t){var e;return e=fl(t.b),yo(e,t.c),yo(e,t.i),e}function ect(t){return zt(t.a)===zt((XV(),ltt))&&Uye(t),t.a}function iAt(t){return t.b.b==0?t.a.Be():g$(t.b)}function nct(t){var e;return e=t.g,a(e||(t.g=new C8(t)),15)}function Zh(){Zh=P,x0=new vrt(BY,0),rf=new vrt("UP",1)}function Y$(t,e){Wnt(this,new We(t.a,t.b)),$nt(this,fl(e))}function rAt(t,e){vD.call(this),iat(this),this.a=t,this.c=e}function ict(t,e,n){Hu(),pT.call(this,e),this.a=t,this.b=n}function K$(t,e,n){Ai(),Fa.call(this,t),this.b=e,this.a=n}function Eoe(t,e){var n=TK[t.charCodeAt(0)];return n??t}function Soe(t,e){var n;return n=Cue(t.f,e),sr(ZW(n),t.f.d)}function sAt(t){var e;e=t.c.b.b,t.b=e,t.a=t.c.b,e.a=t.c.b.b=t}function Toe(t){return t.b==0?null:(Hn(t.b!=0),Ql(t,t.a.a))}function Coe(t){return so(Yd(Ja(gu(t,32)),32),Ja(gu(t,32)))}function oAt(t){return ct(t,62)&&(a(a(t,17),62).Bb&ca)!=0}function Tr(t){return Math.max(Math.min(t,qi),-2147483648)|0}function eN(t,e){return bct(e),Qae(t,dt(Gn,pi,22,e,15,1),e)}function Aoe(t,e){return k2(),t==io(n0(e))||t==io(Dm(e))}function cAt(t){var e;return e=mN(t),"n_"+(e??""+t.o)}function aAt(t){this.b=(Ao(),Ao(),Ao(),Azt),this.a=a(si(t),43)}function uAt(t){vD.call(this),iat(this),this.a=t,this.c=!0}function lAt(t,e,n){this.d=t,this.b=new Dt,this.c=e,this.a=n}function J$(t,e,n,i){var r;r=new xTt,e.a[n.g]=r,M2(t.b,i,r)}function hAt(t,e){var n=t.a=t.a||[];return n[e]||(n[e]=t._d(e))}function _L(t,e){var n;n=t.q.getHours(),t.q.setDate(e),o4(t,n)}function fAt(t){var e;return e=new A9(tq(t.length)),qL(e,t),e}function koe(t){function e(){}return e.prototype=t||{},new e}function Loe(t,e){return o6t(t,e)?(rPt(t),!0):!1}function nN(t){return t.Db>>16!=3?null:a(t.Cb,35)}function Tf(t){return t.Db>>16!=9?null:a(t.Cb,35)}function Poe(t){if(t.p!=2)throw K(new na);return or(t.f)&qr}function Ioe(t){if(t.p!=2)throw K(new na);return or(t.k)&qr}function iN(){iN=P,vQ=new Ert(YBt,0),rwt=new Ert("FAN",1)}function Q$(t,e,n){var i;i=T6t(t,e,n),t.b=new WV(i.c.length)}function tc(t,e,n){return e==null?Au(t.d,null,n):km(t.e,e,n)}function rct(t,e){return Qg(so(Qg(a(t,149).a).a,a(e,149).a))}function dAt(){dAt=P,Wbt=x4t(Xt(1),Xt(4)),Gbt=x4t(Xt(1),Xt(2))}function pAt(){pAt=P,gWt=Za(new as,(Mo(),Yo),(Po(),EB))}function gAt(){gAt=P,pWt=Za(new as,(Mo(),Yo),(Po(),EB))}function mAt(){mAt=P,DWt=Ni(new as,(Mo(),Yo),(Po(),G4))}function Eu(){Eu=P,BWt=Ni(new as,(Mo(),Yo),(Po(),G4))}function bAt(){bAt=P,FWt=Ni(new as,(Mo(),Yo),(Po(),G4))}function tV(){tV=P,GWt=Ni(new as,(Mo(),Yo),(Po(),G4))}function wAt(){wAt=P,z$t=Za(new as,(ZM(),uA),(KC(),lQ))}function vAt(t){return t.Db>>16!=6?null:a(t.Cb,105)}function _At(t){return t.Db>>16!=7?null:a(t.Cb,207)}function yAt(t){return t.Db>>16!=7?null:a(t.Cb,253)}function io(t){return t.Db>>16!=11?null:a(t.Cb,35)}function Zb(t){return t.Db>>16!=17?null:a(t.Cb,24)}function xAt(t){return t.Db>>16!=3?null:a(t.Cb,139)}function CM(t){return t.Db>>16!=6?null:a(t.Cb,207)}function aC(t,e,n,i,r,c){return new Qd(t.e,e,t.pi(),n,i,r,c)}function sct(t,e){return DCt(t.a,e)?Mot(t,a(e,23).g,null):null}function Roe(t,e){return ICt(Ja(t.q.getTime()),Ja(e.q.getTime()))}function Doe(t,e){var n;n=t.q.getHours(),t.q.setMonth(e),o4(t,n)}function Hs(t,e){t.c&&Lc(t.c.f,t),t.c=e,t.c&&Ut(t.c.f,t)}function Ks(t,e){t.c&&Lc(t.c.a,t),t.c=e,t.c&&Ut(t.c.a,t)}function Ts(t,e){t.d&&Lc(t.d.d,t),t.d=e,t.d&&Ut(t.d.d,t)}function ds(t,e){t.g&&Lc(t.g.i,t),t.g=e,t.g&&Ut(t.g.i,t)}function MAt(t,e){return t.b+=e.b,t.c+=e.c,t.d+=e.d,t.a+=e.a,t}function oct(t){return cD(t.c),t.e=t.a=t.c,t.c=t.c.c,++t.d,t.a.f}function EAt(t){return cD(t.e),t.c=t.a=t.e,t.e=t.e.e,--t.d,t.a.f}function SAt(t,e){var n;return n=new dl(t),e.c[e.c.length]=n,n}function Noe(t,e){var n,i;n=e.c,i=n!=null,i&&T2(t,new E2(e.c))}function Ooe(t){var e;e=Mfe(a(cn(t,(tw(),TQ)),349)),e.Ef(t)}function eV(t,e){ct(t.Cb,96)&&t4(pl(a(t.Cb,96)),4),kh(t,e)}function rN(t,e){ct(t.Cb,248)&&(a(t.Cb,248).tb=null),kh(t,e)}function Boe(t,e){pIt(t,e),ct(t.Cb,96)&&t4(pl(a(t.Cb,96)),2)}function Foe(t,e){sD(this),this.f=e,this.g=t,JD(this),this.Pd()}function A2(t){this.c=new Fr,this.b=t.b,this.d=t.c,this.a=t.a}function TAt(){this.a=new Xa,this.e=new $r,this.g=0,this.i=0}function C1(t,e,n){Y6t(e,n,t._b()),this.c=t,this.a=e,this.b=n-e}function Gs(t,e){this.a=t,$3.call(this,t),Qv(e,t._b()),this.b=e}function CAt(t){this.a=t,this.b=dt(LWt,wt,1637,t.e.length,0,2)}function Kv(t){this.a=y.Math.cos(t),this.b=y.Math.sin(t)}function Ei(t,e){this.b=(En(t),t),this.a=e&zm?e:e|64|Lf}function AAt(t,e,n){var i;Y6t(e,n,t.c.length),i=n-e,Zit(t.c,e,i)}function kAt(t,e){var n;return n=a(XM(gm(t.a),e),13),n?n._b():0}function LAt(t){var e,n;return n=(Q3(),e=new b1,e),_C(n,t),n}function PAt(t){var e,n;return n=(Q3(),e=new b1,e),_C(n,t),n}function Jv(t){return ET(),ct(t.g,8)?a(t.g,8):null}function Uoe(t,e){var n;n=a(zi(t.g,e),57),pd(e.d,new NMt(t,n))}function Ya(t,e){return Jo(),Kct(e)?new RD(e,t):new q5(e,t)}function Yl(t){return zo(Y(Z(ss,1),wt,9,0,[t.g.k,t.k,t.a]))}function zoe(){return IC(),Y(Z(iHt,1),jt,412,0,[iJ,rJ,nJ])}function joe(){return z1(),Y(Z(tf,1),jt,150,0,[J1t,Qh,bw])}function Hoe(){return tp(),Y(Z(SHt,1),jt,280,0,[A6,Q_,bx])}function Goe(){return BM(),Y(Z(imt,1),jt,318,0,[PJ,IJ,NB])}function Woe(){return LN(),Y(Z(H0t,1),jt,319,0,[j0t,kB,_J])}function $oe(){return NN(),Y(Z(W0t,1),jt,384,0,[yJ,G0t,xJ])}function Voe(){return u_(),Y(Z(wHt,1),jt,406,0,[MJ,T6,W4])}function qoe(){return Fo(),Y(Z(aWt,1),jt,410,0,[iF,Wa,ba])}function Xoe(){return i7(),Y(Z(Bbt,1),jt,345,0,[Nbt,sQ,Obt])}function Zoe(){return RN(),Y(Z(zbt,1),jt,347,0,[Ubt,oQ,Fbt])}function Yoe(){return HN(),Y(Z(Hbt,1),jt,346,0,[cQ,aQ,V6])}function Koe(){return F2(),Y(Z(jbt,1),jt,385,0,[$6,G6,W6])}function Joe(){return bC(),Y(Z(zgt,1),jt,348,0,[qK,VK,XK])}function Qoe(){return KL(),Y(Z(dwt,1),jt,349,0,[wF,hwt,fwt])}function tce(){return n7(),Y(Z($$t,1),jt,401,0,[MQ,yQ,xQ])}function ece(){return Tm(),Y(Z(AWt,1),jt,413,0,[rF,rA,sF])}function nce(){return fu(),Y(Z(JVt,1),jt,419,0,[jf,lb,fh])}function ice(){return Ga(),Y(Z(tqt,1),jt,420,0,[Fh,hb,dh])}function rce(){return Kh(),Y(Z(kvt,1),jt,275,0,[ly,cb,IF])}function sce(){return ON(),Y(Z(Twt,1),jt,277,0,[AQ,Swt,Ewt])}function oce(){return Ch(),Y(Z(Dw,1),jt,203,0,[lc,ta,hc])}function cce(){return Kg(),Y(Z(Svt,1),jt,316,0,[PF,Rx,_A])}function IAt(){IAt=P,Lzt=Vi((jv(),Y(Z(SK,1),jt,350,0,[d6,p6])))}function sN(){sN=P,_Q=new Srt("DFS",0),owt=new Srt("BFS",1)}function k2(){k2=P,aB=new Dt,HK=(ts(),new vi),jK=new Dt}function RAt(t,e,n){var i;i=new V,i.b=e,i.a=n,++e.b,Ut(t.d,i)}function DAt(t,e,n){Fa.call(this,25),this.b=t,this.a=e,this.c=n}function Su(t){Ai(),Fa.call(this,t),this.c=!1,this.a=!1}function ace(t){return t.a==(PM(),KF)&&Jnt(t,Xbe(t.g,t.b)),t.a}function uC(t){return t.d==(PM(),KF)&&Qnt(t,t_e(t.g,t.b)),t.d}function uce(t,e){var n;return n=(En(t),t).g,Vrt(!!n),En(e),n(e)}function nV(t,e){var n,i;return i=bM(t,e),n=t.a.fd(i),new eMt(t,n)}function AM(t){var e;return Vo(t)?(e=t,e==-0?0:e):yue(t)}function lce(t){return t.Db>>16!=6?null:a(SX(t),207)}function H(t){return Hn(t.a=e)throw K(new Uc(b0e(t,e)));return t}function NAt(t,e,n){if(t<0||en)throw K(new Uc(Xge(t,e,n)))}function dce(t){return Ao(),S1(eut((al(),p1t),S1(new om,91),t),93).a}function oN(t){return si(t),tX((Ao(),new $d(id(Zd(t.a,new X)))))}function cN(t){return new qu((Ah(t,bZ),BL(so(so(5,t),t/10|0))))}function cct(t,e){return t&&t.equals?t.equals(e):zt(t)===zt(e)}function act(t,e){return e==0?!!t.o&&t.o.f!=0:Hq(t,e)}function pce(t,e){var n;n=lt(Yt(t.a.xe((dr(),kF)))),uOt(t,e,n)}function OAt(t,e,n){var i;i=xr(t.d,e),i>=0?k7(t,i,n):tht(t,e,n)}function rV(t,e,n){var i;i=t.d[e.o],t.d[e.o]=t.d[n.o],t.d[n.o]=i}function BAt(t,e){var n;for(n=t+"";n.length0&&t.a[--t.d]==0;);t.a[t.d++]==0&&(t.e=0)}function gce(t){return!!t.u&&kc(t.u.a).i!=0&&!(t.n&&Xq(t.n))}function uN(t){rC(),this.a=(we(),ct(t,49)?new XG(t):new uD(t))}function FAt(){this.c=new aSt,this.a=new yTt,this.b=new CEt,k3t()}function UAt(t,e,n){this.d=t,this.j=e,this.e=n,this.o=-1,this.p=3}function zAt(t,e,n){this.d=t,this.k=e,this.f=n,this.o=-1,this.p=5}function jAt(t,e,n,i,r,c){sat.call(this,t,e,n,i,r),c&&(this.o=-2)}function HAt(t,e,n,i,r,c){oat.call(this,t,e,n,i,r),c&&(this.o=-2)}function GAt(t,e,n,i,r,c){Act.call(this,t,e,n,i,r),c&&(this.o=-2)}function WAt(t,e,n,i,r,c){uat.call(this,t,e,n,i,r),c&&(this.o=-2)}function $At(t,e,n,i,r,c){kct.call(this,t,e,n,i,r),c&&(this.o=-2)}function VAt(t,e,n,i,r,c){cat.call(this,t,e,n,i,r),c&&(this.o=-2)}function qAt(t,e,n,i,r,c){aat.call(this,t,e,n,i,r),c&&(this.o=-2)}function XAt(t,e,n,i,r,c){Lct.call(this,t,e,n,i,r),c&&(this.o=-2)}function ZAt(t,e,n,i){pT.call(this,n),this.b=t,this.c=e,this.d=i}function YAt(t,e){this.f=t,this.a=(PM(),YF),this.c=YF,this.b=e}function KAt(t,e){this.g=t,this.d=(PM(),KF),this.a=KF,this.b=e}function JAt(t,e){!t.c&&(t.c=new _s(t,0)),eZ(t.c,(fr(),MI),e)}function oc(t,e,n,i,r,c){return i6t(t,e,n,c),rIt(t,i),sIt(t,r),t}function QAt(t,e){return ct(e,38)?Qq(t.a,a(e,38)):!1}function mce(t){if(!("stack"in t))try{throw t}catch{}return t}function bce(t){if(t.p!=1)throw K(new na);return or(t.f)<<24>>24}function wce(t){if(t.p!=1)throw K(new na);return or(t.k)<<24>>24}function vce(t){if(t.p!=7)throw K(new na);return or(t.k)<<16>>16}function _ce(t){if(t.p!=7)throw K(new na);return or(t.f)<<16>>16}function lN(t){llt(),bSt(this,or(ns(E1(t,24),rO)),or(ns(t,rO)))}function tkt(){tkt=P,ujt=Vi((k9(),Y(Z(ygt,1),jt,439,0,[FK])))}function hN(){hN=P,RJ=new mrt(_4,0),rmt=new mrt("TOP_LEFT",1)}function ekt(t,e){var n;t.e=new _it,n=ow(e),gc(n,t.c),rNt(t,n,0)}function pe(t,e,n,i){var r;r=new MR,r.a=e,r.b=n,r.c=i,Xi(t.b,r)}function Sa(t,e,n,i){var r;r=new MR,r.a=e,r.b=n,r.c=i,Xi(t.a,r)}function yce(t,e,n){var i;return i=a(t.Hc().Vb(e),13),!!i&&i.pc(n)}function nkt(t,e,n){var i;return i=a(t.Hc().Vb(e),13),!!i&&i.vc(n)}function ikt(t,e){var n;return n=1-e,t.a[n]=IN(t.a[n],n),IN(t,e)}function kM(t){return Hn(t.b.b!=t.d.a),t.c=t.b=t.b.b,--t.a,t.c.c}function rkt(t){return ID(t),cD(t.c),t.e=t.a=t.c,t.c=t.c.b,++t.d,t.a}function skt(t){return ID(t),cD(t.e),t.c=t.a=t.e,t.e=t.e.d,--t.d,t.a}function In(t){if(!Jn(t))throw K(new J);return t.c=t.b,t.b.ic()}function okt(t,e){return ct(e,38)?Qq(t.a,a(e,38)):!1}function ckt(t,e){return ct(e,38)?Qq(t.a,a(e,38)):!1}function akt(t){var e;return Zv(t),e=new en,Hst(t.a,new nH(e)),e}function lct(){var t,e,n;return e=(n=(t=new b1,t),n),Ut(l_t,e),e}function xce(t){var e;return e=(bu(),bu(),r$t),t.d&&wX(t),DQt(),e}function hct(t){return t.j.c=dt(un,te,1,0,5,1),bL(t.c),Use(t.a),t}function as(){_xt.call(this),this.j.c=dt(un,te,1,0,5,1),this.a=-1}function ukt(t,e,n){this.b=new n9(this),this.c=t,this.f=e,this.d=n}function Mce(t,e,n){t.d&&Lc(t.d.d,t),t.d=e,t.d&&pm(t.d.d,n,t)}function Ece(t){return!!t.a&&Ka(t.a.a).i!=0&&!(t.b&&Zq(t.b))}function Sce(t){return Eu(),!ec(t)&&!(!ec(t)&&t.c.g.c==t.d.g.c)}function Tce(t){return dN(),dm(ctt,t)?a(zi(ctt,t),337).Mf():null}function hC(t){return ct(t,13)?new fL((al(),a(t,13))):are(t.tc())}function Cce(t,e,n){return n.f.c.length>0?Sot(t.a,e,n):Sot(t.b,e,n)}function lkt(t,e,n){var i;return i=BC(n),wr(t.b,i,e),wr(t.c,e,n),e}function _m(t,e){var n,i;return n=Gg(t,e),i=null,n&&(i=n.Vd()),i}function yL(t,e){var n,i;return n=Gg(t,e),i=null,n&&(i=n.Yd()),i}function LM(t,e){var n,i;return n=O2(t,e),i=null,n&&(i=n.Yd()),i}function Jd(t,e){var n,i;return n=Gg(t,e),i=null,n&&(i=e9t(n)),i}function fct(t){var e;return e=t.Fh(t.i),t.i>0&&Aa(t.g,0,e,0,t.i),e}function xL(t){var e;return e=(si(t),new Eh((al(),t))),JC(e),cq(e)}function kc(t){return t.n||(pl(t),t.n=new fSt(Do,t),Bo(t)),t.n}function hkt(t,e){var n;return n=new Bb,t.wd(n),n.a+="..",e.xd(n),n.a}function fkt(t,e){I9();var n;return n=a(zi(VF,t),47),!n||n.Li(e)}function ym(t){return ct(t,13)?a(t,13).Wb():!t.tc().hc()}function Ace(t){if(t.ee())return null;var e=t.n,n=ZO[e];return n}function Yn(t){return Hn(t.b!=t.d.c),t.c=t.b,t.b=t.b.a,++t.a,t.c.c}function dct(t,e){En(e),Vr(t.a,t.c,e),t.c=t.c+1&t.a.length-1,bRt(t)}function fC(t,e){En(e),t.b=t.b-1&t.a.length-1,Vr(t.a,t.b,e),bRt(t)}function dkt(t){var e;e=t.pg(),this.a=ct(e,64)?a(e,64).oh():e.tc()}function kce(t,e,n){var i;i=Ffe();try{return dne(t,e,n)}finally{bae(i)}}function pct(t,e,n,i){return ct(n,49)?new BSt(t,e,n,i):new mot(t,e,n,i)}function Lce(){return xN(),Y(Z(nB,1),jt,278,0,[RK,Z1t,Y1t,K1t])}function Pce(){return jM(),Y(Z($jt,1),jt,373,0,[Xm,vw,ww,Z_])}function Ice(){return W2(),Y(Z(sjt,1),jt,304,0,[m6,g6,b6,w6])}function Rce(){return WC(),Y(Z(cjt,1),jt,362,0,[v6,sB,oB,_6])}function Dce(t){return lt(de(z(t,(Ft(),_w))))&&z(t,li)!=null}function Nce(t){return lt(de(z(t,(Ft(),_w))))&&z(t,li)!=null}function L2(t){return ET(),ct(t.g,153)?a(t.g,153):null}function Oce(t,e,n){var i;i=a(zi(t.g,n),57),Ut(t.a.c,new zs(e,i))}function pkt(t,e,n,i){var r;return r=i[e.g][n.g],lt(Yt(z(t.a,r)))}function gkt(t,e,n,i){this.e=i,this.d=null,this.c=t,this.a=e,this.b=n}function gct(t,e,n,i){this.d=t,this.n=e,this.g=n,this.o=i,this.p=-1}function mkt(t,e,n,i,r){this.c=t,this.e=e,this.d=n,this.b=i,this.a=r}function mct(t,e,n,i,r){this.i=t,this.a=e,this.e=n,this.j=i,this.f=r}function A1(t,e,n,i,r){Gi.call(this,t,e),this.a=n,this.b=i,this.c=r}function dC(){dC=P,oA=new brt("UPPER",0),sA=new brt("LOWER",1)}function Bce(){return ZM(),Y(Z(Xbt,1),jt,360,0,[lF,aA,q6,uA])}function Fce(){return g7(),Y(Z(Mwt,1),jt,320,0,[CQ,ywt,xwt,_wt])}function Uce(){return ip(),Y(Z(pvt,1),jt,226,0,[LF,bA,Ix,wA])}function zce(){return gd(),Y(Z(qQ,1),jt,197,0,[VQ,$Q,GE,rb])}function jce(){return Ju(),Y(Z(MA,1),jt,344,0,[uI,E0,aI,ub])}function Hce(){return Am(),Y(Z(Sqt,1),jt,374,0,[dI,fI,ett,ntt])}function Gce(){return o7(),Y(Z(Ovt,1),jt,288,0,[JQ,Rvt,Nvt,Dvt])}function Wce(){return Cu(),Y(Z(XVt,1),jt,265,0,[hI,kd,ag,lI])}function $ce(){return nw(),Y(Z(nQ,1),jt,179,0,[tF,eQ,ry,iy])}function Vu(t,e,n){return e<0?yX(t,n):a(n,61).aj().fj(t,t.Qg(),e)}function bkt(t,e){var n;for(n=t.j.c.length;n=0&&t.a[n]===e[n];n--);return n<0}function _ct(t,e){var n;n=t.q.getHours(),t.q.setFullYear(e+Fm),o4(t,n)}function I2(t,e){return e==0||t.e==0?t:e>0?RIt(t,e):zDt(t,-e)}function yct(t,e){return e==0||t.e==0?t:e>0?zDt(t,e):RIt(t,-e)}function xct(t){t.b!=t.c&&(t.a=dt(un,te,1,8,5,1),t.b=0,t.c=0)}function R2(t){return Hn(t.a0;)i+=t.a[n],n-=n&-n;return i}function Wkt(t,e){var n;for(n=e;n;)Wu(t,-n.i,-n.j),n=io(n);return t}function $g(t,e){return t.a?Ii(t.a,t.b):t.a=new ll(t.d),m2(t.a,e),t}function $kt(t,e){for(En(e);t.a||(t.a=$v(t.c,t)),t.a;)e.ie(fN(t))}function uV(t){return t.c&&t.d?uct(t.c)+"->"+uct(t.d):"e_"+lm(t)}function Jce(t,e,n){return a(e==null?Au(t.d,null,n):km(t.e,e,n),261)}function Qce(t,e,n){var i,r;i=Gg(t,n),r=null,i&&(r=e9t(i)),q0e(e,n,r)}function tae(t,e){var n;n=new vT,zg(n,"x",e.a),zg(n,"y",e.b),T2(t,n)}function eae(t,e){var n;n=new vT,zg(n,"x",e.a),zg(n,"y",e.b),T2(t,n)}function nae(t,e){return Qme(t,e,ct(e,62)&&(a(a(e,17),62).Bb&ao)!=0)}function fd(t){return si(t),ct(t,13)?new Eh((al(),a(t,13))):p$(t.tc())}function iae(){return Ht(),Y(Z(Ia,1),jt,69,0,[Wc,Tn,Qe,fi,on])}function rae(t){return E9(),function(){return kce(t,this,arguments);var e}}function sae(){return Date.now?Date.now():new Date().getTime()}function Ect(t){if(!t.c.Cc())throw K(new J);return t.a=!0,t.c.Ec()}function lV(t,e){if(t<0||t>e)throw K(new Uc(Slt(t,e,"index")));return t}function Sct(t,e){return ct(e,180)?le(t.c,a(e,180).c):!1}function oae(t){return t.d=3,t.c=Wue(t),t.d!=2?(t.d=0,!0):!1}function Vkt(t,e){var n,i;return n=(i=t.slice(0,e),mC(i,t)),n.length=e,n}function Kl(t,e,n){var i;return i=(mi(e,t.c.length),t.c[e]),t.c[e]=n,i}function hV(t,e,n,i){var r;return r=dt(Gn,pi,22,e,15,1),b1e(r,t,e,n,i),r}function qkt(t,e,n,i){this.e=t,this.b=new Dt,this.d=e,this.a=n,this.c=i}function Mm(t,e){this.b=Rc,this.d=t,this.e=e,this.c=this.d+(""+this.e)}function Xkt(){NW(this),this.b=new We(is,is),this.a=new We(Ps,Ps)}function PM(){PM=P;var t,e;YF=(Q3(),e=new x,e),KF=(t=new UG,t)}function Zkt(){_N(),this.b=(ts(),new vi),this.a=new vi,this.c=new Dt}function lu(t){var e;t.d=new UEt(t),t.e=new zEt(t),e=t[D_]|0,t[D_]=e+1}function pN(t,e){return($M(t),Fat(new gi(t,new Uct(e,t.a)))).a!=null}function cae(){return Mo(),Y(Z(jgt,1),jt,328,0,[Of,mx,aa,ua,Yo])}function aae(){return qC(),Y(Z(N0t,1),jt,276,0,[mJ,bJ,pJ,D0t,gJ])}function uae(){return bl(),Y(Z(mmt,1),jt,178,0,[Ex,R6,xw,X4,Km])}function lae(){return GC(),Y(Z(kbt,1),jt,292,0,[Abt,iQ,rQ,U6,z6])}function hae(){return G1(),Y(Z(xA,1),jt,225,0,[sb,ZQ,Tvt,yA,Cvt])}function fae(){return t0(),Y(Z(Jp,1),jt,163,0,[On,vc,Md,ib,og])}function dae(){return Js(),Y(Z(mA,1),jt,110,0,[Ff,uh,ah,fp,cg])}function pae(t,e){var n;return n=e!=null?Zc(t,e):za(Ea(t.d,null)),uM(n)}function gae(t,e){var n;return n=e!=null?Zc(t,e):za(Ea(t.d,null)),uM(n)}function Tct(t,e){var n;return n=a(N2(t.d,e),27),n||a(N2(t.e,e),27)}function Cct(t,e){var n;return n=0,t&&(n+=t.f.a/2),e&&(n+=e.f.a/2),n}function pl(t){return t.t||(t.t=new TG(t),JL(new Xxt(t),0,t.t)),t.t}function Ykt(t){var e;return t.c||(e=t.r,ct(e,96)&&(t.c=a(e,24))),t.c}function Kkt(t,e){return dm(t.a,e)?(IM(t.a,e),!0):!1}function ec(t){return!t.c||!t.d?!1:!!t.c.g&&t.c.g==t.d.g}function mae(t){return Ah(t,"size"),or(KG(Zg(t,8),J2)?Zg(t,8):J2),new Bb}function Bp(t,e){return NEt((rC(),new uN(fIt(Y(Z(un,1),te,1,5,[t,e])))))}function bae(t){t&&Eue((Er(),v1t)),--YO,t&&KO!=-1&&(vte(KO),KO=-1)}function wae(t,e){var n,i;n=a(Jfe(t.c,e),13),n&&(i=n._b(),n.Pb(),t.d-=i)}function pC(t){Ao();var e;for(e=0;t.hc();)t.ic(),e=so(e,1);return BL(e)}function fV(t){var e,n,i;return e=t&nu,n=t>>22&nu,i=t<0?sp:0,ia(e,n,i)}function Jkt(t,e){var n,i;return n=e.kc(),i=Uat(t,n),!!i&&uu(i.e,e.lc())}function Qkt(t){var e;return e=t.e+t.f,isNaN(e)&&yD(t.d)?t.d:e}function t5t(t){this.b=t,$n.call(this,t),this.a=a(an(this.b.a,4),116)}function e5t(t){this.b=t,x2.call(this,t),this.a=a(an(this.b.a,4),116)}function Jl(t,e,n,i,r){c5t.call(this,e,i,r),this.c=t,this.b=n}function Act(t,e,n,i,r){UAt.call(this,e,i,r),this.c=t,this.a=n}function kct(t,e,n,i,r){zAt.call(this,e,i,r),this.c=t,this.a=n}function Lct(t,e,n,i,r){c5t.call(this,e,i,r),this.c=t,this.a=n}function n5t(t,e){this.d=new c2,this.a=t,this.b=e,this.e=new Oo(e.Qe())}function Fp(t,e){V1(),this.e=t,this.d=1,this.a=Y(Z(Gn,1),pi,22,15,[e])}function IM(t,e){return Es(e)?e==null?jlt(t.d,null):c6t(t.e,e):jlt(t.d,e)}function Pct(t,e,n){var i;return i=t.rg(e),i>=0?t.ug(i,n,!0):X2(t,e,n)}function vae(t,e,n){var i;i=(si(t),new Eh((al(),t))),h1e(new Ekt(i,e,n))}function EL(t,e,n){var i;i=(si(t),new Eh((al(),t))),xpe(new Skt(i,e,n))}function _ae(t,e,n){var i;return i=BC(n),ZC(t.d,i,e,!1),wr(t.e,e,n),e}function yae(t,e,n){var i;return i=BC(n),ZC(t.j,i,e,!1),wr(t.k,e,n),e}function i5t(t,e,n){var i;i=new Grt(t.a),ZV(i,t.a.a),Au(i.d,e,n),t.a.a=i}function dV(t){var e;return e=new Np,Uo(e,t),Ct(e,(qt(),Ro),null),e}function Vg(t){var e,n;return si(t),e=_se(t.length),n=new qu(e),qL(n,t),n}function gC(t){var e,n;++t.j,e=t.g,n=t.i,t.g=null,t.i=0,t.uh(n,e),t.th()}function SL(t,e){t.Eh(t.i+1),qT(t,t.i,t.Ch(t.i,e)),t.sh(t.i++,e),t.th()}function Em(t,e){var n;return n=(mi(e,t.c.length),t.c[e]),Zit(t.c,e,1),n}function pV(t,e,n,i){var r;return r=dt(Gn,pi,22,e+1,15,1),Kve(r,t,e,n,i),r}function Ict(t,e,n,i){var r;for(r=0;re.o?-1:0}function Qv(t,e){if(t<0||t>e)throw K(new Uc("Index: "+t+", Size: "+e))}function Bct(t,e,n){if(t<0||e>n||e=e)throw K(new Uc("Index: "+t+", Size: "+e))}function Tae(t,e){var n;n=t.q.getHours()+(e/60|0),t.q.setMinutes(e),o4(t,n)}function wN(t,e,n){this.a=t,this.b=e,this.c=n,Ut(t.q,this),Ut(e.g,this)}function TL(t,e,n,i){this.f=t,this.e=e,this.d=n,this.b=i,this.c=i?i.d:null}function Fct(t){d6t.call(this,t,0),zSt(this),this.b.b=this.b,this.b.a=this.b}function Uct(t,e){tD.call(this,e.rd(),e.qd()&-65),En(t),this.a=t,this.c=e}function R5t(t,e,n){this.d=(En(t),t),this.a=n&zm?n:n|64|Lf,this.c=e}function vN(){this.b=new Fr,this.a=new Fr,this.b=new Fr,this.a=new Fr}function D5t(){D5t=P,mWt=Za(Ni(new as,(Mo(),Of),(Po(),aJ)),Yo,EB)}function N5t(){N5t=P,bWt=Ni(Ni(new as,(Mo(),Of),(Po(),H4)),aa,PE)}function mV(t,e){return!t.o&&(t.o=new hu((Ic(),pp),ug,t,0)),Rq(t.o,e)}function Cae(t,e){di(e,"Label management",1),uM(z(t,(gV(),K6))),Vn(e)}function Aae(t,e){var n;return n=t.c,e>0?a(Ee(n.a,e-1),8):null}function bV(t){var e;return e=t.b,e.b==0?null:a(H1(e,0),170).b}function zct(t){var e,n,i,r;r=t.d,e=t.a,n=t.b,i=t.c,t.d=n,t.a=i,t.b=r,t.c=e}function kae(t,e){var n;t.A&&(n=a(js(t.b,e),114).n,n.d=t.A.d,n.a=t.A.a)}function wV(t,e,n){var i,r;if(n!=null)for(i=0;i=0,"Initial capacity must not be negative")}function F5t(t){this.b=(ts(),new vi),this.c=new vi,this.d=new vi,this.a=t}function U5t(t){t?(this.c=t,this.b=null):(this.c=null,this.b=new Dt)}function vV(t,e){O9.call(this,t,e),this.a=dt(O3e,te,398,2,0,1),this.b=!0}function _V(t,e,n){return XX(t,e,n,ct(e,62)&&(a(a(e,17),62).Bb&ao)!=0)}function zae(t,e,n){return c4(t,e,n,ct(e,62)&&(a(a(e,17),62).Bb&ao)!=0)}function jae(t,e,n){return tbe(t,e,n,ct(e,62)&&(a(a(e,17),62).Bb&ao)!=0)}function Hae(t,e){return ro(lt(Yt(z(t,(Ft(),Ym)))),lt(Yt(z(e,Ym))))}function Gae(){return KM(),Y(Z(vJ,1),jt,290,0,[U0t,AB,CB,F0t,SB,TB])}function Wae(){return S7(),Y(Z($0t,1),jt,241,0,[SJ,EJ,CJ,TJ,AJ,LB])}function $ae(){return gP(),Y(Z(Y0t,1),jt,255,0,[PB,q0t,Z0t,V0t,X0t,kJ])}function Vae(){return QM(),Y(Z(nmt,1),jt,256,0,[$4,J0t,emt,tmt,Q0t,K0t])}function qae(){return x7(),Y(Z(Cbt,1),jt,291,0,[tQ,Sbt,QJ,Ebt,Tbt,QB])}function Xae(){return Ls(),Y(Z(Avt,1),jt,83,0,[ob,dp,Nx,Dx,Sd,Gc])}function Zae(){return KC(),Y(Z(A$t,1),jt,308,0,[hF,hQ,dQ,fQ,pQ,lQ])}function Yae(){return md(),Y(Z(Lwt,1),jt,224,0,[LQ,J6,Q6,MF,yF,xF])}function Kae(){return M7(),Y(Z(_vt,1),jt,289,0,[XQ,bvt,vvt,gvt,wvt,mvt])}function z5t(){z5t=P,j$t=FC(FC(nrt(new as,(ZM(),aA)),(KC(),hF)),hQ)}function _N(){_N=P,new kr("org.eclipse.elk.addLayoutConfig"),oVt=new Sb}function j5t(){j5t=P,$7(),w_t=is,SXt=Ps,v_t=new Rb(is),TXt=new Rb(Ps)}function H5t(t,e,n){Ai();var i;return i=Z1(t,e),n&&i&&vse(t)&&(i=null),i}function dt(t,e,n,i,r,c){var l;return l=BRt(r,i),r!=10&&Y(Z(t,c),e,n,r,l),l}function Jae(t,e,n){return NEt((rC(),new uN(fIt(Y(Z(un,1),te,1,5,[t,e,n])))))}function G5t(t,e){var n;return n=e.kc(),ts(),new D5(n,o8t(t.e,n,a(e.lc(),13)))}function W5t(t,e){var n,i;return n=t.a-e.a,i=t.b-e.b,y.Math.sqrt(n*n+i*i)}function jct(t,e,n){var i;i=t.b[n.c.o][n.o],i.b+=e.b,i.c+=e.c,i.a+=e.a,++i.a}function Qae(t,e,n){var i,r;return r=t.length,i=n=t.i)throw K(new kW(e,t.i));return t.g[e]}function V5t(t,e,n){if(kC(t,n),n!=null&&!t.Li(n))throw K(new A5);return n}function Cf(t,e){return I$(e,"Horizontal alignment cannot be null"),t.b=e,t}function AL(t,e){var n;return n=t.rg(e),n>=0?t.ug(n,!0,!0):X2(t,e,!0)}function kL(t,e,n){var i,r;return r=(i=nE(t.b,e),i),r?q7(OL(t,r),n):null}function tue(t){return ct(t,159)?""+a(t,159).a:t==null?null:Yc(t)}function eue(t){return ct(t,159)?""+a(t,159).a:t==null?null:Yc(t)}function DM(t){var e;return Vo(t)&&(e=0-t,!isNaN(e))?e:N1(zM(t))}function nue(t){var e;return t=t>2?t:2,e=Lat(t),t>e?(e<<=1,e>0?e:J2):e}function LL(t){var e,n;return e=t+128,n=(ITt(),S1t)[e],!n&&(n=S1t[e]=new Wj(t)),n}function mC(t,e){return FL(e)!=10&&Y(du(e),e.rl,e.__elementTypeId$,FL(e),t),t}function t_(t,e){return e.e==0||t.e==0?AE:(tE(),LX(t,e))}function iue(t){for(;!t.a;)if(!tat(t.b,new iH(t)))return!1;return!0}function rue(t){for(;!t.a;)if(!zTt(t.c,new oH(t)))return!1;return!0}function q5t(t,e){if(e.a)throw K(new sc(YOt));Ir(t.a,e),e.a=t,!t.j&&(t.j=e)}function yV(t,e,n,i,r,c){gct.call(this,e,i,r,c),this.c=t,this.b=n}function X5t(t,e,n,i,r,c){gct.call(this,e,i,r,c),this.c=t,this.a=n}function hu(t,e,n,i){this.Gi(),this.a=e,this.b=t,this.c=new yot(this,e,n,i)}function PL(t,e){this.e=e,this.a=_Pt(t),this.a<54?this.f=AM(t):this.c=sP(t)}function sue(t,e){t.a.Ld(e.d,t.b)>0&&(Ut(t.c,new Kst(e.c,e.d,t.d)),t.b=e.d)}function xV(t){t.a=dt(Gn,pi,22,t.b+1,15,1),t.c=dt(Gn,pi,22,t.b,15,1),t.d=0}function Z5t(){Z5t=P,Yzt=Vi((xN(),Y(Z(nB,1),jt,278,0,[RK,Z1t,Y1t,K1t])))}function Y5t(){Y5t=P,sWt=Vi((nw(),Y(Z(nQ,1),jt,179,0,[tF,eQ,ry,iy])))}function K5t(){K5t=P,Vjt=Vi((jM(),Y(Z($jt,1),jt,373,0,[Xm,vw,ww,Z_])))}function J5t(){J5t=P,ojt=Vi((W2(),Y(Z(sjt,1),jt,304,0,[m6,g6,b6,w6])))}function Q5t(){Q5t=P,ajt=Vi((WC(),Y(Z(cjt,1),jt,362,0,[v6,sB,oB,_6])))}function tLt(){tLt=P,C$t=Vi((ZM(),Y(Z(Xbt,1),jt,360,0,[lF,aA,q6,uA])))}function eLt(){eLt=P,rVt=Vi((g7(),Y(Z(Mwt,1),jt,320,0,[CQ,ywt,xwt,_wt])))}function nLt(){nLt=P,LVt=Vi((ip(),Y(Z(pvt,1),jt,226,0,[LF,bA,Ix,wA])))}function iLt(){iLt=P,PVt=Vi((gd(),Y(Z(qQ,1),jt,197,0,[VQ,$Q,GE,rb])))}function rLt(){rLt=P,WVt=Vi((Ju(),Y(Z(MA,1),jt,344,0,[uI,E0,aI,ub])))}function sLt(){sLt=P,Tqt=Vi((Am(),Y(Z(Sqt,1),jt,374,0,[dI,fI,ett,ntt])))}function oLt(){oLt=P,VVt=Vi((o7(),Y(Z(Ovt,1),jt,288,0,[JQ,Rvt,Nvt,Dvt])))}function cLt(){cLt=P,ZVt=Vi((Cu(),Y(Z(XVt,1),jt,265,0,[hI,kd,ag,lI])))}function fu(){fu=P,jf=new CW(pE,0),lb=new CW(_4,1),fh=new CW(gE,2)}function IL(){IL=P,$bt=new _rt(jm,0),aF=new _rt("IMPROVE_STRAIGHTNESS",1)}function yN(){yN=P,uwt=new xrt("LEAF_NUMBER",0),EQ=new xrt("NODE_SIZE",1)}function xN(){xN=P,RK=new B9("All",0),Z1t=new ZEt,Y1t=new oSt,K1t=new YEt}function Ka(t){return t.b||(t.b=new dSt(Do,t),!t.a&&(t.a=new sL(t,t))),t.b}function RL(t,e){if(e<0)throw K(new Uc(rFt+e));return bkt(t,e+1),Ee(t.j,e)}function D2(t){var e;if(!a_(t))throw K(new J);return t.d=1,e=t.c,t.c=null,e}function MN(t){var e,n;return n=t.length,e=dt(nl,Pf,22,n,15,1),XCt(t,0,n,e,0),e}function MV(t,e){var n;this.f=t,this.b=e,n=a(zi(t.b,e),264),this.c=n?n.b:null}function oue(t,e,n){var i;return i=T6t(t,e,n),t.b=new WV(i.c.length),lht(t,i)}function cue(t,e){var n;return n=a(XM(t.d,e),13),n?o8t(t.e,e,n):null}function $ct(t,e){var n;return n=a(IM(t.c,e),353),n?(eot(n),n.e):null}function aue(t){var e,n;if(!t.b)return null;for(n=t.b;e=n.a[0];)n=e;return n}function uue(t,e,n){var i;return i=BC(n),ZC(t.g,i,e,!1),ZC(t.i,e,n,!1),e}function DL(t,e,n,i){var r;i=(SM(),i||H1t),r=t.slice(e,n),klt(r,t,e,n,-e,i)}function Xu(t,e,n,i,r){return e<0?X2(t,n,i):a(n,61).aj().cj(t,t.Qg(),e,i,r)}function lue(t,e){return e0?qi:Pc(t,Vs)<0?Vs:or(t)}function gue(t,e){if(!t)throw K(new yn(Cbe("Enum constant undefined: %s",e)))}function EN(t){sD(this),this.g=t?q4t(t,t.Od()):null,this.f=t,JD(this),this.Pd()}function Qd(t,e,n,i,r,c,l){zV.call(this,e,i,r,c,l),this.c=t,this.b=n}function dd(t,e,n){var i,r;for(i=10,r=0;r=0?(t.gd(n),!0):!1}function LV(t,e){var n;return n=xr(t.d,e),n>=0?d7(t,n,!0,!0):X2(t,e,!0)}function vue(t,e){var n;for(n=0;t.e!=t.i._b();)Iee(e,ci(t),Xt(n)),n!=qi&&++n}function lLt(t,e){var n,i,r;for(r=0,i=t.tc();i.hc();)n=i.ic(),Vr(e,r++,n);return e}function P1(t,e,n){var i;if(e==null)throw K(new r2);return i=Gg(t,e),Vce(t,e,n),i}function I1(t){if(t<0)throw K(new yn("tolerance ("+t+") must be >= 0"));return t}function PV(t){var e;return e=t.b.c.length==0?null:Ee(t.b,0),e!=null&&wat(t,0),e}function hLt(t,e){var n,i,r;for(i=0,r=e.length;i=t.a.c.length;)Ut(t.a,new Fr);return a(Ee(t.a,e),15)}function yue(t){return Yut(t,(NM(),M1t))<0?-Bee(zM(t)):t.l+t.m*ix+t.h*o0}function fLt(t){var e,n;return e=t/60|0,n=t%60,n==0?""+e:""+e+":"+(""+n)}function xue(t,e){var n;return n=ffe(t.e.c,e.e.c),n==0?ro(t.e.d,e.e.d):n}function O2(t,e){var n=t.a[e],i=(fq(),AK)[typeof n];return i?i(n):Xat(typeof n)}function dLt(t,e){return e==(h$(),h$(),Zzt)?t.toLocaleLowerCase():t.toLowerCase()}function FL(t){return t.__elementTypeCategory$==null?10:t.__elementTypeCategory$}function Jct(t){return(t.i&2?"interface ":t.i&1?"":"class ")+(Vd(t),t.o)}function Mue(t,e,n){var i;return i=t.a.e[a(e.a,8).o]-t.a.e[a(n.a,8).o],Tr(uCt(i))}function pLt(t,e){var n;for(++t.d,++t.c[e],n=e+1;n=0&&et||t>e)throw K(new Lit("fromIndex: 0, toIndex: "+t+vft+e))}function kN(t,e){var n,i;for(i=t.tc();i.hc();)n=a(i.ic(),68),Ct(n,(Ft(),yx),e)}function kue(t,e,n){var i;i=y.Math.max(0,t.b/2-.5),$C(n,i,1),Ut(e,new LMt(n,i))}function Lue(t){var e;return e=lt(Yt(z(t,(qt(),up)))),e<0&&(e=0,Ct(t,up,e)),e}function i_(t){mD();var e,n;for(n=apt,e=0;en&&(n=t[e]);return n}function Pue(){c3t();for(var t=yK,e=0;e=t.i)throw K(new kW(e,t.i));return t.zh(e,t.g[e])}function OLt(t,e,n){if(kC(t,n),!t.Nj()&&n!=null&&!t.Li(n))throw K(new A5);return n}function vC(t,e){var n;for(n=t;io(n);)if(n=io(n),n==e)return!0;return!1}function Nue(t,e){return e&&t.b[e.g]==e?(Vr(t.b,e.g,null),--t.c,!0):!1}function Ql(t,e){var n;return n=e.c,e.a.b=e.b,e.b.a=e.a,e.a=e.b=null,e.c=null,--t.b,n}function pd(t,e){var n,i,r,c;for(En(e),i=t.c,r=0,c=i.length;r>5,r=e&31,i=ns(Vv(t.n[n][c],or(Yd(r,1))),3),i}function BLt(t,e){for(;e[0]=0;)++e[0]}function FLt(t,e){vD.call(this),iat(this),this.a=t,this.c=!0,this.b=e.d,this.f=e.e}function ULt(t,e){return Ef(),I1(Y1),y.Math.abs(t-e)<=Y1||t==e||isNaN(t)&&isNaN(e)}function nat(t){return t.a<54?t.f<0?-1:t.f>0?1:0:(!t.c&&(t.c=YL(t.f)),t.c).e}function zLt(t){return t.c&&t.d?t.c.g+"("+t.c+")->"+t.d.g+"("+t.d+")":"e_"+lm(t)}function jLt(t,e,n){var i,r;i=e;do r=lt(t.p[i.o])+n,t.p[i.o]=r,i=t.a[i.o];while(i!=e)}function Bue(t,e,n){var i,r,c;for(r=e[n],i=0;i=14&&e<=16))),t}function DV(t,e){Ao();var n;for(si(t),si(e),n=!1;e.hc();)n=n|t.nc(e.ic());return n}function Ah(t,e){if(t<0)throw K(new yn(e+" cannot be negative but was: "+t));return t}function NV(t,e){var n,i;for(i=new j(t);i.an)throw K(new Wv(e,n));return new Ust(t,e)}function c_(t,e){var n;n=t.s,t.s=e,t.Db&4&&!(t.Db&1)&&Bi(t,new cV(t,4,n,t.s))}function OM(t,e){var n;n=t.t,t.t=e,t.Db&4&&!(t.Db&1)&&Bi(t,new cV(t,5,n,t.t))}function rat(t,e){var n;n=t.d,t.d=e,t.Db&4&&!(t.Db&1)&&Bi(t,new cV(t,2,n,t.d))}function FV(t,e){var n;n=t.F,t.F=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,5,n,e))}function Uue(t,e){var n,i,r;return n=(i=(am(),r=new $S,r),e&&NDt(i,e),i),cPt(n,t),n}function Tm(){Tm=P,rF=new vW("BARYCENTER",0),rA=new vW(CBt,1),sF=new vW(ABt,2)}function LN(){LN=P,j0t=new uW("ARD",0),kB=new uW("MSD",1),_J=new uW("MANUAL",2)}function Fo(){Fo=P,iF=new pW(ox,0),Wa=new pW("INPUT",1),ba=new pW("OUTPUT",2)}function YLt(){Zl(),this.b=(ts(),new vi),this.f=new vi,this.g=new vi,this.e=new vi}function sat(t,e,n,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=1,this.c=t,this.a=n}function oat(t,e,n,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=2,this.c=t,this.a=n}function cat(t,e,n,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=6,this.c=t,this.a=n}function aat(t,e,n,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=7,this.c=t,this.a=n}function uat(t,e,n,i,r){this.d=e,this.j=i,this.e=r,this.o=-1,this.p=4,this.c=t,this.a=n}function lat(t,e){return Ef(),I1(Y1),y.Math.abs(t-e)<=Y1||t==e||isNaN(t)&&isNaN(e)}function zue(){return z7(),Y(Z(_gt,1),jt,228,0,[vgt,ggt,mgt,pgt,BK,wgt,bgt,dgt,fgt])}function jue(){return r0(),Y(Z(to,1),jt,86,0,[kl,Uf,Pl,Bh,hh,lh,Nu,Il,Ll])}function Hue(){return ma(),Y(Z(Ivt,1),jt,239,0,[WE,EA,DF,SA,NF,OF,Bx,KQ,RF])}function KLt(){KLt=P,Uzt=Y(Z(Gn,1),pi,22,15,[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15])}function JLt(){JLt=P,TWt=Za(Ni(Ni(new as,(Mo(),aa),(Po(),hJ)),ua,uJ),Yo,lJ)}function UV(){return kQ||(kQ=new gNt,TC(kQ,Y(Z(z4,1),te,154,0,[new Sj]))),kQ}function _o(t,e,n){return GM(t,e),kh(t,n),c_(t,0),OM(t,1),f_(t,!0),h_(t,!0),t}function QLt(t,e){var n;return ct(e,38)?t.c.vc(e):(n=Rq(t,e),cP(t,e),n)}function vr(t){var e;return ct(t,78)?t:(e=t&&t[vZ],e||(e=new xIt(t),Ki(e)),e)}function hat(t){var e,n;if(t==0)return 32;for(n=0,e=1;!(e&t);e<<=1)++n;return n}function Gue(t,e){var n;return n=t.c,e=0),ede(t.d,t.c)<0&&(t.a=t.a-1&t.d.a.length-1,t.b=t.d.c),t.c=-1}function jV(t,e){t.j>0&&t.c0&&t.e!=0&&jV(t.g,e/t.j*t.g.d))}function sPt(t,e){var n;n=t.c,t.c=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,1,n,t.c))}function oPt(t,e){var n;n=t.b,t.b=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,0,n,t.b))}function HL(t,e){var n;n=t.k,t.k=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,2,n,t.k))}function pat(t,e){var n;n=t.f,t.f=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,8,n,t.f))}function gat(t,e){var n;n=t.i,t.i=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,7,n,t.i))}function cPt(t,e){var n;n=t.a,t.a=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,8,n,t.a))}function aPt(t,e){var n;n=t.d,t.d=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,1,n,t.d))}function uPt(t,e){var n;n=t.c,t.c=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,1,n,t.c))}function mat(t,e){var n;n=t.c,t.c=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,4,n,t.c))}function HV(t,e){var n;n=t.D,t.D=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,2,n,t.D))}function lPt(t,e){var n;n=t.b,t.b=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,0,n,t.b))}function Xue(t,e,n){var i;t.b=e,t.a=n,i=(t.a&512)==512?new Nxt:new jh,t.c=Lwe(i,t.b,t.a)}function hPt(t,e){return Om(t.e,e)?(Jo(),Kct(e)?new RD(e,t):new q5(e,t)):new SEt(e,t)}function SC(t,e){return me(),Es(t)?aot(t,hi(e)):Gb(t)?MCt(t,Yt(e)):Hb(t)?Ire(t,de(e)):t.vd(e)}function Zue(t){var e=/function(?:\s+([\w$]+))?\s*\(/,n=e.exec(t);return n&&n[1]||_Z}function Yue(t,e){var n,i;return n=t.o+t.p,i=e.o+e.p,n>>31;i!=0&&(t[n]=i)}function _Pt(t){var e;return Pc(t,0)<0&&(t=mst(t)),e=or(E1(t,32)),64-(e!=0?xP(e):xP(or(t))+32)}function nle(t){var e,n;for(n=t.c.a.Xb().tc();n.hc();)e=a(n.ic(),204),jnt(e,new GCt(e.f))}function yPt(t){var e,n;for(n=t.c.a.Xb().tc();n.hc();)e=a(n.ic(),204),Hnt(e,new w8t(e.e))}function xPt(t){this.d=t,this.c=t.c.Tb().tc(),this.b=null,this.a=null,this.e=(Ao(),Ao(),b1t)}function MPt(t){this.e=t,this.d=new A9(tq(wot(this.e)._b())),this.c=this.e.a,this.b=this.e.c}function WV(t){this.b=t,this.a=dt(Gn,pi,22,t+1,15,1),this.c=dt(Gn,pi,22,t,15,1),this.d=0}function ile(t){t.a=null,t.e=null,t.b.c=dt(un,te,1,0,5,1),t.f.c=dt(un,te,1,0,5,1),t.c=null}function nr(t,e){var n,i;i=(n=new dst,n),i.n=e,ni((!t.s&&(t.s=new Wt(Ra,t,21,17)),t.s),i)}function Cr(t,e){var n,i;n=(i=new UG,i),n.n=e,ni((!t.s&&(t.s=new Wt(Ra,t,21,17)),t.s),n)}function kh(t,e){var n;n=t.zb,t.zb=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,1,n,t.zb))}function $V(t,e){var n;n=t.xb,t.xb=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,3,n,t.xb))}function VV(t,e){var n;n=t.yb,t.yb=e,t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,2,n,t.yb))}function qV(t,e,n){var i,r,c;return r=_m(e,"labels"),i=new aEt(t,n),c=(Nwe(i.a,i.b,r),r),c}function Rr(t,e,n,i,r,c,l,f,g,b,v,M,k){return l9t(t,e,n,i,r,c,l,f,g,b,v,M,k),rut(t,!1),t}function yo(t,e){var n,i,r;for(En(e),n=!1,r=e.tc();r.hc();)i=r.ic(),n=n|t.nc(i);return n}function EPt(t){if(t){if(t.Wb())throw K(new J);return t.cd(t._b()-1)}return vkt(null.tc())}function rle(t){if(En(t),t.length==0)throw K(new yf("Zero length BigInteger"));$we(this,t)}function RN(){RN=P,Ubt=new mW("NO",0),oQ=new mW("GREEDY",1),Fbt=new mW("LOOK_BACK",2)}function XV(){XV=P,LA=new Rxt,ltt=Y(Z(Ra,1),W_,158,0,[]),iXt=Y(Z(ph,1),Qpt,53,0,[])}function SPt(){SPt=P,tHt=Vi((Ke(),Y(Z(QK,1),jt,232,0,[gs,Hr,rs,uc,wu,Jc,ef])))}function sle(){return So(),Y(Z(LJ,1),jt,233,0,[IB,Al,V4,RB,K_,J_,C6,IE,RE,DB])}function ole(t,e){return jM(),t==Xm&&e==vw||t==vw&&e==Xm||t==Z_&&e==ww||t==ww&&e==Z_}function cle(t,e){return jM(),t==Xm&&e==ww||t==Xm&&e==Z_||t==vw&&e==Z_||t==vw&&e==ww}function TPt(t,e){return lt(Yt(GW(eP(Vh(new gi(null,new Ei(t.c.b,16)),new t9(t)),e))))}function yat(t,e){return lt(Yt(GW(eP(Vh(new gi(null,new Ei(t.c.b,16)),new Ys(t)),e))))}function CPt(t,e){e?t.B==null&&(t.B=t.D,t.D=null):t.B!=null&&(t.D=t.B,t.B=null)}function ale(t){var e;return ct(t,182)?(e=a(t,182),new kit(e.a)):(Ao(),new f5(t))}function APt(t){var e;return e=akt(t),zb(e.a,0)?(iM(),iM(),V1t):(iM(),new cst(e.b))}function kPt(t){var e;return e=akt(t),zb(e.a,0)?(iM(),iM(),V1t):(iM(),new cst(e.c))}function LPt(t){dot.call(this),this.b=lt(Yt(z(t,(qt(),nf)))),this.a=a(z(t,ig),197)}function PPt(){this.c=new L9(0),this.b=new L9(XBt),this.d=new L9(qBt),this.a=new L9(rY)}function DN(t){this.b=(si(t),new Eh((al(),t))),this.a=new Dt,this.d=new Dt,this.e=new go}function ep(){ep=P,eJ=new Nr,tJ=new mr,Vgt=new a1,$gt=new dc,qgt=new vh,Xgt=new _g}function NN(){NN=P,yJ=new lW("GREEDY",0),G0t=new lW("DEPTH_FIRST",1),xJ=new lW(hY,2)}function Kh(){Kh=P,ly=new SW("OUTSIDE",0),cb=new SW("INSIDE",1),IF=new SW("FIXED",2)}function IPt(){IPt=P,CWt=FC(jte(Ni(Ni(new as,(Mo(),aa),(Po(),hJ)),ua,uJ),Yo),lJ)}function ule(t){return t.b.c.g.j==(Ke(),rs)?a(z(t.b.c.g,(Ft(),li)),11):t.b.c}function RPt(t){return t.b.d.g.j==(Ke(),rs)?a(z(t.b.d.g,(Ft(),li)),11):t.b.d}function DPt(t){var e;if(t.b==-2){if(t.e==0)e=-1;else for(e=0;t.a[e]==0;e++);t.b=e}return t.b}function NPt(t){var e,n,i;for(e=0,i=t.tc();i.hc();)n=i.ic(),e+=n!=null?Yr(n):0,e=~~e;return e}function xat(t,e,n){var i,r;for(r=qn(t,0);r.b!=r.d.c;)i=a(Yn(r),9),i.a+=e,i.b+=n;return t}function GL(t){var e,n,i;for(e=0,i=t.tc();i.hc();)n=Yt(i.ic()),e+=(En(n),n);return e/t._b()}function OPt(t){var e;return t==0?"UTC":(t<0?(t=-t,e="UTC+"):e="UTC-",e+fLt(t))}function lle(t,e){we();var n,i;for(i=new Dt,n=0;n0&&(this.g=this.Fh(this.i+(this.i/8|0)+1),t.zc(this.g))}function FPt(t,e){return Ef(),I1(yd),y.Math.abs(0-e)<=yd||e==0||isNaN(0)&&isNaN(e)?0:t/e}function _s(t,e){kD.call(this,rXt,t,e),this.b=this,this.a=mu(t.mg(),Ve(this.e.mg(),this.c))}function WL(t,e){var n,i;for(i=e.length,n=0;nr&&e.ac&&e.b1||t.hc())return++t.a,t.g=0,e=t.i,t.hc(),e;throw K(new J)}function ZPt(t){var e;t.d==null?(++t.e,t.f=0,q6t(null)):(++t.e,e=t.d,t.d=null,t.f=0,q6t(e))}function FN(t,e){var n;ct(e,109)?(a(t.c,81).ij(),n=a(e,109),dPt(t,n)):a(t.c,81).Gc(e)}function Cm(t){return ct(t,193)?xL(a(t,193)):ct(t,160)?a(t,160).a:ct(t,49)?new Lv(t):new sM(t)}function _le(t,e,n){return t==(Tm(),sF)?new Qf:gu(e,1)!=0?new zit(n.length):new b3t(n.length)}function Bi(t,e){var n,i,r;if(n=t.cg(),n!=null&&t.fg())for(i=0,r=n.length;i=128?!1:t<64?TT(ns(Yd(1,t),n),0):TT(ns(Yd(1,t-64),e),0)}function Cle(t){var e;return e=a(z(t,(Ft(),wc)),69),t.j==(Ke(),rs)&&(e==(Ht(),on)||e==Qe)}function QV(t,e){var n;return ct(e,13)?(n=(al(),a(e,13)),t.oc(n)):DV(t,a(si(e),20).tc())}function Ale(t){$Et();var e;return vMt(uQ,t)||(e=new vt,e.a=t,i$(uQ,t,e)),a(js(uQ,t),573)}function tq(t){return ts(),t<3?(Ah(t,"expectedSize"),t+1):t>22),r=t.h+e.h+(i>>22),ia(n&nu,i&nu,r&sp)}function s6t(t,e){var n,i,r;return n=t.l-e.l,i=t.m-e.m+(n>>22),r=t.h-e.h+(i>>22),ia(n&nu,i&nu,r&sp)}function nq(t,e,n,i){return n==1?(!t.n&&(t.n=new Wt(ic,t,1,7)),$s(t.n,e,i)):_lt(t,e,n,i)}function o6t(t,e){if(e==null)return!1;for(;t.a!=t.b;)if(Fi(e,VN(t)))return!0;return!1}function Cat(t){return t.a.hc()?!0:t.a!=t.d?!1:(t.a=new Qot(t.e.d),t.a.hc())}function Or(t,e){var n,i;return n=e.yc(),i=n.length,i==0?!1:(Jst(t.c,t.c.length,n),!0)}function Rle(t,e,n){var i,r;for(r=e.Tb().tc();r.hc();)i=a(r.ic(),38),t.Yb(i.kc(),i.lc(),n);return t}function c6t(t,e){var n;return n=t.a.get(e),n===void 0?++t.d:(t.a[GZ](e),--t.c,t$(t.b)),n}function FM(t,e){this.b=t,this.e=e,this.d=e.j,this.f=(Jo(),a(t,61).bj()),this.k=mu(e.e.mg(),t)}function a6t(t){this.o=t,this.g=new Dt,this.j=new Fr,this.n=new Fr,this.e=new Dt,this.b=new Dt}function u6t(t){this.a=dt(EWt,wt,1704,t.length,0,2),this.b=dt(SWt,wt,1705,t.length,0,2),this.c=new DIt}function Dle(t,e){t.d==(Js(),ah)||t.d==cg?a(e.a,57).c.nc(a(e.b,57)):a(e.b,57).c.nc(a(e.a,57))}function l6t(t,e){var n,i;for(i=new j(t.b);i.ae?1:t==e?0:isNaN(t)?isNaN(e)?0:1:-1}function f6t(t,e){return!t||!e||t==e?!1:ZIt(t.d.c,e.d.c+e.d.b)&&ZIt(e.d.c,t.d.c+t.d.b)}function d6t(t,e){xD(t>=0,"Negative initial capacity"),xD(e>=0,"Non-positive load factor"),lu(this)}function p6t(t){var e,n;return n=(e=new Hk,e),kh(n,"T"),ni((!t.d&&(t.d=new Gu(vu,t,11)),t.d),n),n}function g6t(t,e){var n;return n=od(e.a._b()),qc(PLt(new gi(null,new Ei(e,1)),t.i),new rEt(t,n)),n}function Aat(t){var e,n,i;for(e=new Fr,i=qn(t.d,0);i.b!=i.d.c;)n=a(Yn(i),170),Xi(e,n.c);return e}function kat(t){var e,n,i,r;for(e=1,n=0,r=t._b();n>=1);return e}function Ole(t){var e;return e=rw(t),e>gft?is:e<-34028234663852886e22?Ps:e}function Y(t,e,n,i,r){return r.ql=t,r.rl=e,r.sl=B,r.__elementTypeId$=n,r.__elementTypeCategory$=i,r}function UM(t,e,n,i,r){var c,l;for(l=n;l<=r;l++)for(c=e;c<=i;c++)p_(t,c,l)||j7(t,c,l,!0,!1)}function Ble(t){var e,n,i,r;for(n=t.a,i=0,r=n.length;it.f,n=t.u+t.e[t.o.o]*t.d>t.f*t.s*t.d,e||n}function GN(t,e,n){var i,r;return i=new vV(e,n),r=new it,t.b=ZDt(t,t.b,i,r),r.b||++t.c,t.b.b=!1,r.d}function Dat(t){var e;return(!t.c||!(t.Bb&1)&&t.c.Db&64)&&(e=wl(t),ct(e,96)&&(t.c=a(e,24))),t.c}function F1(t){var e,n;for(n=new j(t.a.b);n.a=0&&t[i]===e[i];i--);return i<0?0:KG(ns(t[i],uo),ns(e[i],uo))?-1:1}function Xle(t){var e;return t==null?!0:(e=t.length,e>0&&t.charCodeAt(e-1)==58&&!uq(t,AA,kA))}function PC(t){switch(t.g){case 1:return qBt;default:case 2:return 0;case 3:return rY;case 4:return XBt}}function cq(t){switch(t._b()){case 0:return g1t;case 1:return new hTt(t.tc().ic());default:return new uN(t)}}function Zle(t,e){Ao();var n,i;for(Got(e,"predicate"),i=0;t.hc();i++)if(n=t.ic(),e.Mb(n))return i;return-1}function Yle(t,e,n){if(si(e),n.hc())for(srt(e,t.Lb(n.ic()));n.hc();)srt(e,t.c),srt(e,t.Lb(n.ic()));return e}function aq(t,e){var n;return e===t?!0:ct(e,238)?(n=a(e,238),Fi(t.Hc(),n.Hc())):!1}function Pc(t,e){var n;return Vo(t)&&Vo(e)&&(n=t-e,!isNaN(n))?n:Yut(Vo(t)?gl(t):t,Vo(e)?gl(e):e)}function YL(t){return V1(),t<0?t!=-1?new Cut(-1,-t):PK:t<=10?j1t[Tr(t)]:new Cut(1,t)}function Kle(){Ai();var t;return mtt||(t=Gee(Z1("M",!0)),t=UD(Z1("M",!1),t),mtt=t,mtt)}function l_(t,e,n){var i,r;return r=(i=new BG,i),_o(r,e,n),ni((!t.q&&(t.q=new Wt(ph,t,11,10)),t.q),r),r}function uq(t,e,n){var i,r;for(i=0,r=t.length;i=t.b.c.length||(Hat(t,2*e+1),n=2*e+2,ne)throw K(new yn(sO+t+qOt+e));if(t<0||e>n)throw K(new Lit(sO+t+_ft+e+vft+n))}function Qle(t,e,n){if(e<0)throw K(new Uc(rFt+e));e0)return eC(e-1,t.a.c.length),Em(t.a,e-1);throw K(new F)}function F6t(t,e){var n;if(e.c.length!=0){for(;wlt(t,e);)P7(t,e,!1);n=jN(e),t.a&&(t.a.If(n),F6t(t,n))}}function ihe(t,e){var n,i;for(i=qn(t,0);i.b!=i.d.c;)n=a(Yn(i),204),n.e.length>0&&(e.td(n),n.i&&Nhe(n))}function gq(t,e,n){var i,r,c;for(i=new Fr,c=qn(n,0);c.b!=c.d.c;)r=a(Yn(c),9),Xi(i,new Oo(r));khe(t,e,i)}function U6t(t,e){var n;return n=new OX((t.f&256)!=0,t.i,t.a,t.d,(t.f&16)!=0,t.j,t.g,e),t.e!=null||(n.c=t),n}function rhe(t,e){var n,i;return n=a(t.d.$b(e),13),n?(i=t.e.Oc(),i.oc(n),t.e.d-=n._b(),n.Pb(),i):null}function WN(t){var e,n,i,r;for(r=0,n=0,i=t.length;n1||e>=0&&t.b<3)}function Qb(t){var e;++t.j,t.i==0?t.g=null:t.i>>0).toString(16):t.toString()}function mq(t,e){t.D==null&&t.B!=null&&(t.D=t.B,t.B=null),HV(t,e==null?null:(En(e),e)),t.C&&t.Kj(null)}function che(t,e){var n,i;for(n=t.a.length-1,t.c=t.c-1&n;e!=t.c;)i=e+1&n,Vr(t.a,e,t.a[i]),e=i;Vr(t.a,t.c,null)}function ahe(t,e){var n,i;for(n=t.a.length-1;e!=t.b;)i=e-1&n,Vr(t.a,e,t.a[i]),e=i;Vr(t.a,t.b,null),t.b=t.b+1&n}function uhe(t,e){oD(!this.b),oD(!this.d),UW(nM(t.c)==0),UW(e.d.c+e.e.c==0),UW(!0),this.b=t,this.d=this.ec(e)}function H6t(t,e,n,i,r){i?Zpe(t,e):(l1e(t,e,r),x2e(t,e,n)),e.c.length>1&&(we(),gc(e,t.b),_ve(t.c,e))}function lhe(t,e,n,i,r){e==0||i==0||(e==1?r[i]=Eut(r,n,i,t[0]):i==1?r[e]=Eut(r,t,e,n[0]):Z0e(t,n,r,e,i))}function hhe(t){var e,n;if(t==null)return null;for(e=0,n=t.length;e=t.c.b:t.a<=t.c.b))throw K(new J);return e=t.a,t.a+=t.c.c,++t.b,Xt(e)}function HM(t){var e,n;return t>-129&&t<128?(e=t+128,n=(DTt(),P1t)[e],!n&&(n=P1t[e]=new N8(t)),n):new N8(t)}function Xt(t){var e,n;return t>-129&&t<128?(e=t+128,n=(dTt(),C1t)[e],!n&&(n=C1t[e]=new R8(t)),n):new R8(t)}function wq(t,e){return!t||e&&!t.j||ct(t,114)&&a(t,114).a.b==0?0:t.Pf()}function $N(t,e){return!t||e&&!t.k||ct(t,114)&&a(t,114).a.a==0?0:t.Qf()}function Fi(t,e){return Es(t)?le(t,e):Gb(t)||Hb(t)?(En(t),t===e):uot(t)?t.Fb(e):rot(t)?t===e:cct(t,e)}function Yr(t){return Es(t)?j1(t):Gb(t)?Tr((En(t),t)):Hb(t)?(En(t),t?1231:1237):uot(t)?t.Hb():rot(t)?lm(t):Yot(t)}function du(t){return Es(t)?At:Gb(t)?To:Hb(t)?ho:uot(t)||rot(t)?t.ql:t.ql||Array.isArray(t)&&Z(Rzt,1)||Rzt}function phe(t){return t?t.i&1?t==Ol?ho:t==Gn?Io:t==Gw?CE:t==Os?To:t==k0?Vm:t==vy?qm:t==Da?dx:F4:t:null}function tw(){tw=P,nVt=(dr(),Px),iVt=uy,SQ=(Wlt(),Z$t),TQ=Y$t,wwt=K$t,vF=J$t,_F=Q$t,Z6=tVt,vwt=eVt}function vq(){vq=P,YK=fAt(Y(Z(mA,1),jt,110,0,[(Js(),ah),uh])),KK=fAt(Y(Z(mA,1),jt,110,0,[cg,fp]))}function IC(){IC=P,iJ=new aW("MIRROR_X",0),rJ=new aW("TRANSPOSE",1),nJ=new aW("MIRROR_AND_TRANSPOSE",2)}function ghe(t){var e;return e=new SLt(t),EL(t.a,Kjt,new ju(Y(Z(x6,1),te,341,0,[e]))),e.d&&Ut(e.f,e.d),e.f}function mhe(t){var e,n;for(n=new j(t.r);n.a=48&&t<58?t-48:t>=97&&t<97?t-97+10:t>=65&&t<65?t-65+10:-1}function bhe(t){var e,n;if(t==null)return!1;for(e=0,n=t.length;edw?t-n>dw:n-t>dw}function so(t,e){var n;return Vo(t)&&Vo(e)&&(n=t+e,HPi)throw K(new Wv(e,i));if(t.xh()&&t.pc(n))throw K(new yn(s6));t.mh(e,n)}function Y6t(t,e,n){if(t<0||e>n)throw K(new Uc(sO+t+_ft+e+", size: "+n));if(t>e)throw K(new yn(sO+t+qOt+e))}function Xat(t){throw fq(),K(new Uxt("Unexpected typeof result '"+t+"'; please report this bug to the GWT team"))}function zp(t){switch($b(),t.c){case 0:return yM(),O4;case 1:return new u2(Bme(new oM(t)));default:return new Fxt(t)}}function K6t(t){var e;return t.Db&64?nh(t):(e=new ul(nh(t)),e.a+=" (source: ",mo(e,t.d),e.a+=")",e.a)}function Ct(t,e,n){return n==null?(!t.p&&(t.p=(ts(),new vi)),IM(t.p,e)):(!t.p&&(t.p=(ts(),new vi)),wr(t.p,e,n)),t}function QL(t,e,n){return n==null?(!t.p&&(t.p=(ts(),new vi)),IM(t.p,e)):(!t.p&&(t.p=(ts(),new vi)),wr(t.p,e,n)),t}function tP(t,e,n){var i;t.Eh(t.i+1),i=t.Ch(e,n),e!=t.i&&Aa(t.g,e,t.g,e+1,t.i-e),Vr(t.g,e,i),++t.i,t.sh(e,n),t.th()}function xq(t,e,n){var i,r,c;for(i=0,c=qn(t,0);c.b!=c.d.c&&(r=lt(Yt(Yn(c))),!(r>n));)r>=e&&++i;return i}function Mq(t,e){var n,i,r;for(n=0,r=ac(t,e).tc();r.hc();)i=a(r.ic(),11),n+=z(i,(Ft(),Du))!=null?1:0;return n}function Ehe(t){var e;return e=a(N2(t.c.c,""),199),e||(e=new A2(eM(tM(new Cb,""),"Other")),Pm(t.c.c,"",e)),e}function J6t(t){this.a=new Xa,this.d=new Xa,this.b=new Xa,this.c=new Xa,this.g=new Xa,this.i=new Xa,this.f=t}function Js(){Js=P,Ff=new W5(ox,0),uh=new W5(gE,1),ah=new W5(pE,2),fp=new W5(BY,3),cg=new W5("UP",4)}function Kg(){Kg=P,PF=new EW("INHERIT",0),Rx=new EW("INCLUDE_CHILDREN",1),_A=new EW("SEPARATE_CHILDREN",2)}function She(t,e,n){var i,r;return i=new Qd(t.e,3,13,null,(r=e.c,r||(ye(),Hf)),Hp(t,e),!1),n?n.Sh(i):n=i,n}function The(t,e,n){var i,r;return i=new Qd(t.e,4,13,(r=e.c,r||(ye(),Hf)),null,Hp(t,e),!1),n?n.Sh(i):n=i,n}function Zat(t,e,n){var i,r;return r=t.sb,t.sb=e,t.Db&4&&!(t.Db&1)&&(i=new fs(t,1,4,r,e),n?n.Sh(i):n=i),n}function Yat(t,e,n){var i,r;return r=t.r,t.r=e,t.Db&4&&!(t.Db&1)&&(i=new fs(t,1,8,r,t.r),n?n.Sh(i):n=i),n}function jp(t,e){var n,i;return n=a(e,614),i=n.Hj(),!i&&n.Ij(i=ct(e,96)?new yEt(t,a(e,24)):new YAt(t,a(e,140))),i}function Kat(t,e){var n;return t===e?!0:ct(e,89)?(n=a(e,89),t.e==n.e&&t.d==n.d&&Xce(t,n.a)):!1}function Che(t,e){var n;if(n=TP(t,e),ct(n,335))return a(n,29);throw K(new yn(H_+e+"' is not a valid attribute"))}function eP(t,e){var n;return n=new ue,t.a.sd(n)?(fM(),new HG(En(aLt(t,n.a,e)))):(Zv(t),fM(),fM(),$1t)}function Q6t(t,e){var n;t.c.length!=0&&(n=a(xo(t,dt(Cl,Ih,8,t.c.length,0,1)),123),Drt(n,new g3),B9t(n,e))}function tIt(t,e){var n;t.c.length!=0&&(n=a(xo(t,dt(Cl,Ih,8,t.c.length,0,1)),123),Drt(n,new lv),B9t(n,e))}function WM(t,e){switch(e.g){case 2:case 1:return ac(t,e);case 3:case 4:return Cm(ac(t,e))}return we(),we(),fo}function Jat(t,e,n,i){switch(e){case 1:return!t.n&&(t.n=new Wt(ic,t,1,7)),t.n;case 2:return t.k}return zut(t,e,n,i)}function Ahe(t,e,n,i,r,c,l,f){var g;for(g=n;c=i||e=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:t>=48&&t<=57?t-48:0}function iIt(t){return t-=t>>1&1431655765,t=(t>>2&858993459)+(t&858993459),t=(t>>4)+t&252645135,t+=t>>8,t+=t>>16,t&63}function h_(t,e){var n;n=(t.Bb&256)!=0,e?t.Bb|=256:t.Bb&=-257,t.Db&4&&!(t.Db&1)&&Bi(t,new Jl(t,1,2,n,e))}function rIt(t,e){var n;n=(t.Bb&256)!=0,e?t.Bb|=256:t.Bb&=-257,t.Db&4&&!(t.Db&1)&&Bi(t,new Jl(t,1,8,n,e))}function Qat(t,e){var n;n=(t.Bb&256)!=0,e?t.Bb|=256:t.Bb&=-257,t.Db&4&&!(t.Db&1)&&Bi(t,new Jl(t,1,8,n,e))}function sIt(t,e){var n;n=(t.Bb&512)!=0,e?t.Bb|=512:t.Bb&=-513,t.Db&4&&!(t.Db&1)&&Bi(t,new Jl(t,1,9,n,e))}function f_(t,e){var n;n=(t.Bb&512)!=0,e?t.Bb|=512:t.Bb&=-513,t.Db&4&&!(t.Db&1)&&Bi(t,new Jl(t,1,3,n,e))}function DC(t,e){var n;return t.b==-1&&t.a&&(n=t.a.Vi(),t.b=n?t.c.qg(t.a.pi(),n):xr(t.c.mg(),t.a)),t.c.hg(t.b,e)}function Phe(t,e,n){var i,r;return r=t.a,t.a=e,t.Db&4&&!(t.Db&1)&&(i=new fs(t,1,5,r,t.a),n?clt(n,i):n=i),n}function Ihe(t,e){var n;if(n=kp(t.i,e),n==null)throw K(new xf("Node did not exist in input."));return Eat(e,n),null}function Rhe(t,e){var n;if(n=zi(t.k,e),n==null)throw K(new xf("Port did not exist in input."));return Eat(e,n),null}function $M(t){if(t.c)$M(t.c);else if(t.d)throw K(new yc("Stream already terminated, can't be modified or used"))}function Dhe(t){var e;if(!t.a)throw K(new yc("Cannot offset an unassigned cut."));e=t.c-t.b,t.b+=e,z4t(t,e),j4t(t,e)}function Nhe(t){var e;t.g&&(e=t.c.pf()?t.f:t.a,uht(e.a,t.o,!0),uht(e.a,t.o,!1),Ct(t.o,(qt(),Qi),(Ls(),Dx)))}function Ohe(t){var e,n,i;for(e=a(z(t,(mc(),Zbt)),15),i=e.tc();i.hc();)n=a(i.ic(),170),Xi(n.b.d,n),Xi(n.c.b,n)}function oIt(t){var e,n,i;for(i=0,n=(Ao(),new $d(id(Zd(t.a,new X))));Jn(n);)e=a(In(n),14),e.c.g==e.d.g||++i;return i}function cIt(t,e){var n,i;for(i=new $n(t);i.e!=i.i._b();)if(n=a(ci(i),24),zt(e)===zt(n))return!0;return!1}function aIt(t,e){var n,i;for(i=new $n(t);i.e!=i.i._b();)if(n=a(ci(i),133),zt(e)===zt(n))return!0;return!1}function Bhe(t,e,n){var i,r,c;return c=(r=nE(t.b,e),r),c&&(i=a(q7(OL(t,c),""),24),i)?Ylt(t,i,e,n):null}function Eq(t,e,n){var i,r,c;return c=(r=nE(t.b,e),r),c&&(i=a(q7(OL(t,c),""),24),i)?Klt(t,i,e,n):null}function tut(t){var e,n;return e=t.j,e==(Ke(),rs)?(n=a(z(t,(Ft(),wc)),69),n==(Ht(),Tn)||n==fi):!1}function uIt(t){var e;return e=new om,e.a+="VerticalSegment ",Ua(e,t.e),e.a+=" ",Ii(e,zW(new L5(Rc),new j(t.k))),e.a}function Fhe(t){var e,n,i;for(e=new Dt,i=new j(t.b);i.a0&&(i+=r,++n);return n>1&&(i+=t.d*(n-1)),i}function Zhe(t,e,n){var i,r;for(r=t.a.Xb().tc();r.hc();)if(i=a(r.ic(),8),O1(n,a(Ee(e,i.o),13)))return i;return null}function Aq(t,e,n,i){var r;if(r=t.length,e>=r)return r;for(e=e>0?e:0;e=1?uh:fp):n}function Khe(t){var e,n,i;for(e=0,i=new j(t.c.a);i.a=64&&e<128&&(r=Xh(r,Yd(1,e-64)));return r}function mIt(t,e,n){var i,r,c;for(r=Rn(e?Rs(t):br(t));Jn(r);)i=a(In(r),14),c=e?i.c.g:i.d.g,c.j==(Ke(),wu)&&Ks(c,n)}function Jhe(t,e,n){var i;i=new n5t(t,e),cr(t.r,e.ef(),i),n&&t.t!=(Kh(),IF)&&(i.c=new uAt(t.d),pd(e.We(),new YH(i)))}function bIt(t,e,n){var i,r;return i=(am(),r=new N3,r),OV(i,e),BV(i,n),t&&ni((!t.a&&(t.a=new Ss(sf,t,5)),t.a),i),i}function Vn(t){if(t.i==null)throw K(new yc("The task has not begun yet."));t.b||(t.c0&&e.charCodeAt(0)==43?e.substr(1,e.length-1):e))}function nfe(t){var e;return t==null?null:new y1((e=Hc(t,!0),e.length>0&&e.charCodeAt(0)==43?e.substr(1,e.length-1):e))}function out(t){var e;return e=dt(nl,Pf,22,2,15,1),t-=ao,e[0]=(t>>10)+GP&qr,e[1]=(t&1023)+56320&qr,ml(e,0,e.length)}function ife(t){var e,n;for(n=zme(Zu(Zb(t))).tc();n.hc();)if(e=hi(n.ic()),s4(t,e))return gae((j3t(),Xqt),e);return null}function ml(t,e,n){var i,r,c,l;for(c=e+n,Bct(e,c,t.length),l="",r=e;re&&i.Ld(t[c-1],t[c])>0;--c)l=t[c],Vr(t,c,t[c-1]),Vr(t,c-1,l)}function sfe(t,e){var n;t.c=e,t.a=dfe(e),t.a<54&&(t.f=(n=e.d>1?Xh(Yd(e.a[1],32),ns(e.a[0],uo)):ns(e.a[0],uo),AM(Zg(e.e,n))))}function kq(){llt();var t,e,n;n=N3e+++xae(),t=Tr(y.Math.floor(n*$P))&rO,e=Tr(n-t*wft),this.a=t^1502,this.b=e^WZ}function ofe(t,e,n){t.n=Vb(k0,[wt,mft],[378,22],14,[n,Tr(y.Math.ceil(e/32))],2),t.o=e,t.p=n,t.j=e-1>>1,t.k=n-1>>1}function cfe(t,e){var n,i,r;i=Jv(e),r=lt(Yt(qM(i,(qt(),nf)))),n=y.Math.max(0,r/2-.5),$C(e,n,1),Ut(t,new PMt(e,n))}function wIt(t,e){var n,i;for(n=qn(t,0);n.b!=n.d.c;){if(i=lt(Yt(Yn(n))),i==e)return;if(i>e){kM(n);break}}vM(n,e)}function He(t,e){var n,i,r,c,l;if(n=e.f,Pm(t.c.d,n,e),e.g!=null)for(r=e.g,c=0,l=r.length;ce?1:eD(isNaN(t),isNaN(e))}function xIt(t){no(),sD(this),JD(this),this.e=t,t!=null&&FSt(t,vZ,this),this.g=t==null?eu:Yc(t),this.a="",this.b=t,this.a=""}function OC(t){var e;this.a=(e=a(t.e&&t.e(),10),new Ha(e,a(au(e,e.length),10),0)),this.b=dt(un,te,1,this.a.a.length,5,1)}function e7(t,e){var n,i;return n=t._b(),e.lengthn&&Vr(e,n,null),e}function uut(t){var e,n,i;for(i=new Sp,i.a+="[",e=0,n=t._b();e>5,e=t&31,i=dt(Gn,pi,22,n+1,15,1),i[n]=1<c?e:c;return Xt(e)}function bfe(t,e){var n,i;for(i=t.e.a.Xb().tc();i.hc();)if(n=a(i.ic(),247),Sge(e,n.d)||k0e(e,n.d))return!0;return!1}function MIt(t,e){var n,i,r,c;for(c=t.g.ed(),n=0;c.hc();){if(i=lt(Yt(c.ic())),r=i-e,r>F_)return n;r>EO&&++n}return n}function EIt(t,e){var n,i,r;r=e.d.g,i=r.j,!(i==(Ke(),gs)||i==Jc||i==ef)&&(n=Rn(br(r)),Jn(n)&&wr(t.k,e,a(In(n),14)))}function SIt(t,e){var n,i;n=e==(qC(),gJ),i=hut(t),n&&!i||!n&&i?Ct(t,(qt(),Bf),(md(),Q6)):Ct(t,(qt(),Bf),(md(),J6))}function gd(){gd=P,VQ=new V9(ox,0),$Q=new V9("POLYLINE",1),GE=new V9("ORTHOGONAL",2),rb=new V9("SPLINES",3)}function n7(){n7=P,MQ=new xW("OVERLAP_REMOVAL",0),yQ=new xW("COMPACTION",1),xQ=new xW("GRAPH_SIZE_CALCULATION",2)}function i7(){i7=P,Nbt=new gW("EQUALLY_DISTRIBUTED",0),sQ=new gW("NORTH_STACKED",1),Obt=new gW("NORTH_SEQUENCE",2)}function wfe(t){var e,n,i,r,c;return c=hlt(t),n=D9(t.c),i=!n,i&&(r=new Rg,P1(c,"knownLayouters",r),e=new vG(r),vo(t.c,e)),c}function vfe(t,e,n){var i,r;for(r=ct(e,62)&&a(a(e,17),62).Bb&ao?new LW(e,t):new FM(e,t),i=0;i3;)r*=10,--c;t=(t+(r>>1))/r|0}return i.i=t,!0}function z2(t,e,n){var i,r;for(r=t.tc();r.hc();)if(i=r.ic(),zt(e)===zt(i)||e!=null&&Fi(e,i))return n&&r.jc(),!0;return!1}function IIt(t,e){var n,i;if(e){for(n=0;n0&&(e.lengtht.i&&Vr(e,t.i,null),e}function RIt(t,e){var n,i,r,c;return n=e>>5,e&=31,r=t.d+n+(e==0?0:1),i=dt(Gn,pi,22,r,15,1),$1e(i,t.a,n,e),c=new qv(t.e,r,i),lC(c),c}function s7(t,e){yrt();var n,i;return n=oL((Hh(),Hh(),B4)),i=null,e==n&&(i=a(Zc(_1t,t),556)),i||(i=new s4t(t),e==n&&tc(_1t,t,i)),i}function xr(t,e){var n,i,r;if(n=(t.i==null&&q1(t),t.i),i=e.pi(),i!=-1){for(r=n.length;i=0;--i)for(e=n[i],r=0;r0&&Pc(t,128)<0?(e=or(t)+128,n=(RTt(),A1t)[e],!n&&(n=A1t[e]=new D8(t)),n):new D8(t)}function sP(t){return V1(),Pc(t,0)<0?Pc(t,-1)!=0?new Kut(-1,DM(t)):PK:Pc(t,10)<=0?j1t[or(t)]:new Kut(1,t)}function DIt(){Cit.call(this,new Fct(16)),Ah(2,"expectedValuesPerKey"),this.b=2,this.a=new Uot(null,null,0,null),K3(this.a,this.a)}function o7(){o7=P,JQ=new X9("SIMPLE",0),Rvt=new X9("GROUP_DEC",1),Nvt=new X9("GROUP_MIXED",2),Dvt=new X9("GROUP_INC",3)}function mut(){mut=P,Pvt=new y2(15),jVt=new xc((dr(),ay),Pvt),GVt=new xc(uy,15),HVt=new xc(HQ,Xt(0)),zVt=new xc(jE,fE)}function Iq(){Iq=P,ftt=new zk,n_t=new Rz,i_t=new jk,r_t=new OR,s_t=new BR,o_t=new FR,c_t=new qS,a_t=new Dz,u_t=new UR}function NIt(t){this.e=dt(Gn,pi,22,t.length,15,1),this.c=dt(Ol,a0,22,t.length,16,1),this.b=dt(Ol,a0,22,t.length,16,1),this.f=0}function but(t,e){this.n=Vb(k0,[wt,mft],[378,22],14,[e,Tr(y.Math.ceil(t/32))],2),this.o=t,this.p=e,this.j=t-1>>1,this.k=e-1>>1}function OIt(t,e,n){NLt(),Cxt.call(this),this.a=Vb(YVt,[wt,Wft],[537,171],0,[BF,QQ],2),this.c=new lM,this.g=t,this.f=e,this.d=n}function Kc(t,e,n){var i,r,c;return t.ti()?(i=t.i,c=t.ui(),tP(t,i,e),r=t.mi(3,null,e,i,c),n?n.Sh(r):n=r):tP(t,t.i,e),n}function Lh(t,e){var n,i,r;return t.f>0&&(t.Fi(),i=e==null?0:Yr(e),r=(i&qi)%t.d.length,n=Nlt(t,r,i,e),n)?n.lc():null}function Rq(t,e){var n,i,r;return t.f>0?(t.Fi(),i=e==null?0:Yr(e),r=(i&qi)%t.d.length,n=dDt(t,r,i,e),n!=-1):!1}function oP(t,e){var n,i,r,c;for(c=mu(t.e.mg(),e),n=a(t.g,124),r=0;r2e3&&(Dzt=t,KO=y.setTimeout(kte,10))),YO++==0?(Sue((Er(),v1t)),!0):!1}function Ufe(){return Error.stackTraceLimit>0?(y.Error.stackTraceLimit=Error.stackTraceLimit=64,!0):"stack"in new Error}function HIt(t,e){return t.e>e.e?1:t.ee.d?t.e:t.d=0?c=c.a[1]:(r=c,c=c.a[0])}return r}function XIt(t,e,n){var i,r,c;for(r=null,c=t.b;c;){if(i=t.a.Ld(e,c.d),n&&i==0)return c;i<=0?c=c.a[0]:(r=c,c=c.a[1])}return r}function Hfe(t,e,n,i){var r,c,l;return r=!1,c2e(t.f,n,i)&&(rde(t.f,t.a[e][n],t.a[e][i]),c=t.a[e],l=c[i],c[i]=c[n],c[n]=l,r=!0),r}function _ut(t,e){var n,i,r;for(r=t.g.ed();r.hc();)if(n=lt(Yt(r.ic())),i=y.Math.abs(n-e),ie?1:eD(isNaN(t),isNaN(e)))>0}function xut(t,e){return Ef(),Ef(),I1(Y1),(y.Math.abs(t-e)<=Y1||t==e||isNaN(t)&&isNaN(e)?0:te?1:eD(isNaN(t),isNaN(e)))<0}function ZIt(t,e){return Ef(),Ef(),I1(Y1),(y.Math.abs(t-e)<=Y1||t==e||isNaN(t)&&isNaN(e)?0:te?1:eD(isNaN(t),isNaN(e)))<=0}function $fe(t,e){if(e.c==t)return e.d;if(e.d==t)return e.c;throw K(new yn("Input edge is not connected to the input port."))}function c7(t,e){return En(t),e==null?!1:le(t,e)?!0:t.length==e.length&&le(t.toLowerCase(),e.toLowerCase())}function YIt(t){var e,n,i,r,c;if(t==null)return null;for(c=new Dt,n=lq(t),i=0,r=n.length;ie.e?1:t.fe.f?1:Yr(t)-Yr(e)}function XM(t,e){ts(),si(t);try{return t.Vb(e)}catch(n){if(n=vr(n),ct(n,177))return null;if(ct(n,169))return null;throw K(n)}}function Jfe(t,e){ts(),si(t);try{return t.$b(e)}catch(n){if(n=vr(n),ct(n,177))return null;if(ct(n,169))return null;throw K(n)}}function iRt(t){V1(),t.length==0?(this.e=0,this.d=1,this.a=Y(Z(Gn,1),pi,22,15,[0])):(this.e=1,this.d=t.length,this.a=t,lC(this))}function Eut(t,e,n,i){tE();var r,c;for(r=0,c=0;c=c?(che(t,e),-1):(ahe(t,e),1)}function rRt(t,e){var n,i,r;++t.j,i=t.g==null?0:t.g.length,e>i&&(r=t.g,n=i+(i/2|0)+4,njZ)return n.zg();if(i=n.sg(),i||n==t)break}return i}function sRt(t,e){var n,i;return n=e.Yg(t.a),n&&(i=hi(Lh((!n.b&&(n.b=new Mu((ye(),Ho),Dc,n)),n.b),Ti)),i!=null)?i:e.be()}function nde(t,e){var n,i;return n=e.Yg(t.a),n&&(i=hi(Lh((!n.b&&(n.b=new Mu((ye(),Ho),Dc,n)),n.b),Ti)),i!=null)?i:e.be()}function Xe(t){var e;if(ct(t.a,4)){if(e=WIt(t.a),e==null)throw K(new yc(sFt+t.b+"'. "+vpt+(Vd(wI),wI.k)+_pt));return e}else return t.a}function ide(t){var e;if(t==null)return null;if(e=ebe(Hc(t,!0)),e==null)throw K(new qG("Invalid hexBinary value: '"+t+"'"));return e}function oRt(t,e){var n,i,r;if(Ut(aB,t),e.nc(t),n=a(zi(HK,t),19),n)for(r=n.tc();r.hc();)i=a(r.ic(),35),nc(aB,i,0)!=-1||oRt(i,e)}function rde(t,e,n){var i,r;fX(t.e,e,n,(Ht(),on)),fX(t.i,e,n,Qe),t.a&&(r=a(z(e,(Ft(),li)),11),i=a(z(n,li),11),rV(t.g,r,i))}function cRt(t){var e;zt(cn(t,(dr(),cy)))===zt((Kg(),PF))&&(io(t)?(e=a(cn(io(t),cy),316),ga(t,cy,e)):ga(t,cy,_A))}function Sut(t,e,n){this.c=t,this.f=new Dt,this.e=new go,this.j=new cot,this.n=new cot,this.b=e,this.g=new qh(e.c,e.d,e.b,e.a),this.a=n}function Tut(t,e,n,i,r,c){Hrt(this),this.e=t,this.f=e,this.d=n,this.c=i,this.g=r,this.b=c,this.j=lt(Yt(r.tc().ic())),this.i=lt(Yt(EPt(r)))}function sde(t){var e;for(e=a(In(Rn(Rs(t))),14).c.g;e.j==(Ke(),Hr);)Ct(e,(Ft(),P6),(me(),me(),!0)),e=a(In(Rn(Rs(e))),14).c.g}function ode(t,e,n){var i,r,c,l;return c=e.i,l=n.i,c!=l?c.g-l.g:(i=t.f[e.o],r=t.f[n.o],i==0&&r==0?0:i==0?-1:r==0?1:ro(i,r))}function ci(t){var e;try{return e=t.i.cd(t.e),t.Bi(),t.g=t.e++,e}catch(n){throw n=vr(n),ct(n,79)?(t.Bi(),K(new J)):K(n)}}function Fq(t){var e;try{return e=t.c.yh(t.e),t.Bi(),t.g=t.e++,e}catch(n){throw n=vr(n),ct(n,79)?(t.Bi(),K(new J)):K(n)}}function H1(t,e){var n;n=t.fd(e);try{return n.ic()}catch(i){throw i=vr(i),ct(i,101)?K(new Uc("Can't get element "+e)):K(i)}}function aRt(t,e){al(),si(t);try{return t.pc(e)}catch(n){if(n=vr(n),ct(n,177))return!1;if(ct(n,169))return!1;throw K(n)}}function cde(t,e){ts(),si(t);try{return t.Qb(e)}catch(n){if(n=vr(n),ct(n,177))return!1;if(ct(n,169))return!1;throw K(n)}}function uRt(t,e,n){return new qh(y.Math.min(t.a,e.a)-n/2,y.Math.min(t.b,e.b)-n/2,y.Math.abs(t.a-e.a)+n,y.Math.abs(t.b-e.b)+n)}function lRt(t,e){var n,i,r,c;for(n=0,r=new j(e.a);r.a0),e.a.cd(e.c=--e.b))}function t0(){t0=P,On=new G5("PARENTS",0),vc=new G5("NODES",1),Md=new G5("EDGES",2),ib=new G5("PORTS",3),og=new G5("LABELS",4)}function G1(){G1=P,sb=new $5("DISTRIBUTED",0),ZQ=new $5("JUSTIFIED",1),Tvt=new $5("BEGIN",2),yA=new $5(_4,3),Cvt=new $5("END",4)}function jC(t,e,n){Cxt.call(this),this.a=dt(YVt,Wft,171,(Ch(),Y(Z(Dw,1),jt,203,0,[lc,ta,hc])).length,0,1),this.b=t,this.d=e,this.c=n}function uP(t,e){var n,i;if(++t.j,e!=null&&(n=(i=t.a.Cb,ct(i,92)?a(i,92).cg():null),ume(e,n))){UC(t.a,4,n);return}UC(t.a,4,a(e,116))}function ade(t,e){var n,i;return e!=null&&iw(e).length!=0&&(n=yht(t,e),n)?n:Nn.length!=0&&(i=yht(t,Nn),i)?i:null}function ude(t){var e,n;if(t.j==(Ke(),Hr)){for(n=Rn(Jg(t));Jn(n);)if(e=a(In(n),14),!ec(e)&&t.c==sX(e,t).c)return!0}return!1}function u7(){u7=P,NK=new urt("NUM_OF_EXTERNAL_SIDES_THAN_NUM_OF_EXTENSIONS_LAST",0),egt=new urt("CORNER_CASES_THAN_SINGLE_SIDE_LAST",1)}function Uq(){return K7(),Y(Z(Mqt,1),jt,147,0,[yqt,_qt,xqt,fqt,hqt,dqt,mqt,gqt,pqt,vqt,wqt,bqt,uqt,aqt,lqt,oqt,sqt,cqt,iqt,nqt,rqt,ttt])}function zq(t,e){var n;switch(n=!t.v.pc((Ju(),E0))||t.q==(Ls(),Gc),t.t.g){case 1:n?Axe(t,e):Q7t(t,e);break;case 0:n?$2e(t,e):Z7t(t,e)}}function lde(t,e,n){var i;switch(i=n.q.getFullYear()-Fm+Fm,i<0&&(i=-i),e){case 1:t.a+=i;break;case 2:dd(t,i%100,2);break;default:dd(t,i,e)}}function hde(t){var e;switch(e=t.Mh(null),e){case 10:return 0;case 15:return 1;case 14:return 2;case 11:return 3;case 21:return 4}return-1}function jq(t){switch(t.g){case 1:return Js(),cg;case 4:return Js(),ah;case 2:return Js(),uh;case 3:return Js(),fp}return Js(),Ff}function fde(t,e,n,i){var r,c,l;return r=new Qd(t.e,1,13,(l=e.c,l||(ye(),Hf)),(c=n.c,c||(ye(),Hf)),Hp(t,e),!1),i?i.Sh(r):i=r,i}function qn(t,e){var n,i;if(Qv(e,t.b),e>=t.b>>1)for(i=t.c,n=t.b;n>e;--n)i=i.b;else for(i=t.a.a,n=0;n=0?t.Fg(r):yX(t,i)):n<0?yX(t,i):a(i,61).aj().fj(t,t.Qg(),n)}function fRt(t){var e,n,i;for(i=(!t.o&&(t.o=new hu((Ic(),pp),ug,t,0)),t.o),n=i.c.tc();n.e!=n.i._b();)e=a(n.Ci(),38),e.lc();return CL(i)}function wde(t){var e,n,i,r;for(i=dt(k3e,te,144,t.c.length,0,1),r=0,n=new j(t);n.a0&&(Ut(t.b,new aCt(e.a,n)),i=e.a.length,0i&&(e.a+=XEt(dt(nl,Pf,22,-i,15,1))))}function h7(t){switch(qit(),this.c=new Dt,this.d=t,t.g){case 0:case 2:this.a=jot(Hgt),this.b=is;break;case 3:case 1:this.a=Hgt,this.b=Ps}}function Cut(t,e){this.e=t,e.5&&c<50;)r=CDt(i),n=$2(i,r,!0),e=y.Math.abs(n.b),++c;return $2(t,r,!1)}function gRt(t){var e,n,i,r,c;for(i=JX(t),e=is,c=0,r=0;e>.5&&c<50;)r=TDt(i),n=$2(i,r,!0),e=y.Math.abs(n.a),++c;return $2(t,r,!1)}function xde(t,e){var n,i,r,c;for(c=0,i=qn(t,0);i.b!=i.d.c;)n=a(Yn(i),35),c+=y.Math.pow(n.g*n.f-e,2);return r=y.Math.sqrt(c/(t.b-1)),r}function mRt(t,e){var n,i,r;for(n=t.o,r=a(a(rr(t.r,e),19),60).tc();r.hc();)i=a(r.ic(),111),i.e.a=bpe(i,n.a),i.e.b=n.b*lt(Yt(i.b.xe(FF)))}function j2(t,e,n,i){var r;return n>=0?t.Bg(e,n,i):(t.yg()&&(i=(r=t.og(),r>=0?t.jg(i):t.yg().Cg(t,-1-r,null,i))),t.lg(e,n,i))}function H2(t,e,n){var i,r;if(r=t._b(),e>=r)throw K(new Wv(e,r));if(t.xh()&&(i=t.dd(n),i>=0&&i!=e))throw K(new yn(s6));return t.Ah(e,n)}function Mde(t,e,n){var i,r,c,l;return i=t.dd(e),i!=-1&&(t.ti()?(c=t.ui(),l=DD(t,i),r=t.mi(4,l,null,i,c),n?n.Sh(r):n=r):DD(t,i)),n}function $s(t,e,n){var i,r,c,l;return i=t.dd(e),i!=-1&&(t.ti()?(c=t.ui(),l=G2(t,i),r=t.mi(4,l,null,i,c),n?n.Sh(r):n=r):G2(t,i)),n}function bRt(t){var e,n,i;t.b==t.c&&(i=t.a.length,n=Lat(8>i?8:i)<<1,t.b!=0?(e=au(t.a,n),vPt(t,e,i),t.a=e,t.b=0):RG(t.a,n),t.c=i)}function Ede(t){var e,n;e=new Dt,n=t;do n=a(In(Rn(br(n))),14).d.g,n.j==(Ke(),Hr)&&(e.c[e.c.length]=n);while(n.j==(Ke(),Hr));return e}function wRt(t){var e,n;for(this.b=new Dt,this.c=t,this.a=!1,n=new j(t.a);n.a0||t==(Zr(),MK)||e==(co(),EK))throw K(new yn("Invalid range: "+hkt(t,e)))}function Sde(t){switch(t.g){case 1:return Am(),dI;case 3:return Am(),fI;case 2:return Am(),ntt;case 4:return Am(),ett;default:return null}}function Wq(t){switch(t.g){case 0:return null;case 1:return new PPt;case 2:return new _it;default:throw K(new yn(jY+(t.f!=null?t.f:""+t.g)))}}function Tde(t,e,n){if(t.e)switch(t.b){case 1:Zse(t.c,e,n);break;case 0:Yse(t.c,e,n)}else _kt(t.c,e,n);t.a[e.o][n.o]=t.c.i,t.a[n.o][e.o]=t.c.e}function nw(){nw=P,tF=new H9(jm,0),eQ=new H9("PORT_POSITION",1),ry=new H9("NODE_SIZE_WHERE_SPACE_PERMITS",2),iy=new H9("NODE_SIZE",3)}function yRt(t){var e,n,i;for(n=new j(t.a);n.a=0?t.ug(l,n,!0):X2(t,c,n)):a(c,61).aj().cj(t,t.Qg(),r,n,i)}function Cde(t,e){var n,i,r,c;return c=t.o,n=t.p,c=0)return r;if(t.Rj()){for(i=0;ir&&Vr(e,r,null),e}function xRt(t,e){var n,i,r;for(r=t.a.length,e.lengthr&&Vr(e,r,null),e}function p_(t,e,n){try{return zb(IV(t,e,n),1)}catch(i){throw i=vr(i),ct(i,305)?K(new Uc(KZ+t.o+"*"+t.p+JZ+e+Rc+n+QZ)):K(i)}}function MRt(t,e,n){try{return zb(IV(t,e,n),0)}catch(i){throw i=vr(i),ct(i,305)?K(new Uc(KZ+t.o+"*"+t.p+JZ+e+Rc+n+QZ)):K(i)}}function ERt(t,e,n){try{return zb(IV(t,e,n),2)}catch(i){throw i=vr(i),ct(i,305)?K(new Uc(KZ+t.o+"*"+t.p+JZ+e+Rc+n+QZ)):K(i)}}function SRt(t,e,n){var i;try{return p_(t,e+t.j,n+t.k)}catch(r){throw r=vr(r),ct(r,79)?(i=r,K(new Uc(i.g+cO+e+Rc+n+")."))):K(r)}}function Ade(t,e,n){var i;try{return MRt(t,e+t.j,n+t.k)}catch(r){throw r=vr(r),ct(r,79)?(i=r,K(new Uc(i.g+cO+e+Rc+n+")."))):K(r)}}function kde(t,e,n){var i;try{return ERt(t,e+t.j,n+t.k)}catch(r){throw r=vr(r),ct(r,79)?(i=r,K(new Uc(i.g+cO+e+Rc+n+")."))):K(r)}}function TRt(t,e){if(t.g==-1)throw K(new na);t.Bi();try{t.d.hd(t.g,e),t.f=t.d.j}catch(n){throw n=vr(n),ct(n,79)?K(new C):K(n)}}function CRt(t,e,n){di(n,"Compound graph preprocessor",1),t.a=new Nv,Y7t(t,e,null),cye(t,e),Ibe(t),Ct(e,(Ft(),lmt),t.a),t.a=null,lu(t.b),Vn(n)}function $q(t,e){var n,i;if(Vrt(e>0),(e&-e)==e)return Tr(e*gu(t,31)*4656612873077393e-25);do n=gu(t,31),i=n%e;while(n-i+(e-1)<0);return Tr(i)}function Lde(t,e,n){switch(n.g){case 1:t.a=e.a/2,t.b=0;break;case 2:t.a=e.a,t.b=e.b/2;break;case 3:t.a=e.a/2,t.b=e.b;break;case 4:t.a=0,t.b=e.b/2}}function Pde(t){var e,n;for(n=a(z(t,(Ft(),HB)),15).tc();n.hc();)if(e=a(n.ic(),68),Wb(e,(qt(),VB)))return a(z(e,VB),276);return null}function Ide(t,e){var n,i,r;for(n=hm(new Ng,t),r=new j(e);r.a1&&(c=Ide(t,e)),c}function Ode(t,e){var n,i,r,c;for(c=new j(e.a);c.a102?-1:t<=57?t-48:t<65?-1:t<=70?t-65+10:t<97?-1:t-97+10}function IRt(t,e){var n,i,r;for(t.b[e.g]=1,i=qn(e.d,0);i.b!=i.d.c;)n=a(Yn(i),170),r=n.c,t.b[r.g]==1?Xi(t.a,n):t.b[r.g]==2?t.b[r.g]=1:IRt(t,r)}function RRt(t,e){var n;return n=Y(Z(Os,1),Xo,22,15,[wq(t.a[0],e),wq(t.a[1],e),wq(t.a[2],e)]),t.d&&(n[0]=y.Math.max(n[0],n[2]),n[2]=n[0]),n}function DRt(t,e){var n;return n=Y(Z(Os,1),Xo,22,15,[$N(t.a[0],e),$N(t.a[1],e),$N(t.a[2],e)]),t.d&&(n[0]=y.Math.max(n[0],n[2]),n[2]=n[0]),n}function Bde(t){var e,n,i;for(k5(t.b.a),t.a=dt(rB,te,57,t.c.c.a.b.c.length,0,1),e=0,i=new j(t.c.c.a.b);i.ai&&t.charCodeAt(e-1)<=32;)--e;return i>0||ec&&Vr(e,c,null),e}function tX(t){Ao();var e;if(e=ohe(t),!Jn(t))throw K(new Uc("position (0) must be less than the number of elements that remained ("+e+")"));return In(t)}function ipe(t){var e;return e=(KLt(),Uzt),e[t>>>28]|e[t>>24&15]<<4|e[t>>20&15]<<8|e[t>>16&15]<<12|e[t>>12&15]<<16|e[t>>8&15]<<20|e[t>>4&15]<<24|e[t&15]<<28}function FRt(t){var e,n,i;for(i=t.f,t.k=dt(Os,Xo,22,i,15,1),t.d=dt(Os,Xo,22,i,15,1),e=0;e0&&(r.b+=e),r}function m7(t,e){var n,i,r;for(r=new go,i=t.tc();i.hc();)n=a(i.ic(),31),AP(n,0,r.b),r.b+=n.e.b+e,r.a=y.Math.max(r.a,n.e.a);return r.a>0&&(r.a+=e),r}function ape(t,e){var n,i;if(e<0||e>=t._b())return null;for(n=e;n=t.i)throw K(new kW(e,t.i));return++t.j,n=t.g[e],i=t.i-e-1,i>0&&Aa(t.g,e+1,t.g,e,i),Vr(t.g,--t.i,null),t.vh(e,n),t.th(),n}function nX(t,e){var n,i;return t.Db>>16==6?t.Cb.Cg(t,5,of,e):(i=jo(a(Ve((n=a(an(t,16),24),n||t.Rg()),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function Fut(t,e){var n,i;n=t.fd(e);try{return i=n.ic(),n.jc(),i}catch(r){throw r=vr(r),ct(r,101)?K(new Uc("Can't remove element "+e)):K(r)}}function dpe(t,e){var n,i,r;return r=new Ei(new ju(Y(Z(F3e,1),te,1700,0,[t,e])),16),i=new BTt(r),n=new gi(null,i),kot(n,new rH(t)),kot(n,new sH(e)),n}function Uut(t,e,n,i,r,c){var l,f,g;for(zt(t)===zt(n)&&(t=t.slice(e,e+r),e=0),f=e,g=e+r;f>22),r+=i>>22,r<0)?!1:(t.l=n&nu,t.m=i&nu,t.h=r&sp,!0)}function _pe(t,e,n,i,r,c,l){var f,g;return!(e.je()&&(g=t.a.Ld(n,i),g<0||!r&&g==0)||e.ke()&&(f=t.a.Ld(n,c),f>0||!l&&f==0))}function W2(){W2=P,m6=new U9("NORTH",0),g6=new U9("EAST",1),b6=new U9("SOUTH",2),w6=new U9("WEST",3),m6.a=!1,g6.a=!0,b6.a=!1,w6.a=!0}function WC(){WC=P,v6=new z9("NORTH",0),sB=new z9("EAST",1),oB=new z9("SOUTH",2),_6=new z9("WEST",3),v6.a=!1,sB.a=!0,oB.a=!1,_6.a=!0}function Cu(){Cu=P,hI=new Z9("UNKNOWN",0),kd=new Z9("ABOVE",1),ag=new Z9("BELOW",2),lI=new Z9("INLINE",3),new es("org.eclipse.elk.labelSide",hI)}function W1(t,e,n){if(n&&(e<0||e>n.a.c.length))throw K(new yn("index must be >= 0 and <= layer node count"));t.c&&Lc(t.c.a,t),t.c=n,n&&pm(n.a,e,t)}function $Rt(t){switch(t.g){case 0:return EJ;case 1:return SJ;case 2:return TJ;case 3:return CJ;case 4:return LB;case 5:return AJ;default:return null}}function ZM(){ZM=P,lF=new G9("P1_TREEIFICATION",0),aA=new G9("P2_NODE_ORDERING",1),q6=new G9("P3_NODE_PLACEMENT",2),uA=new G9("P4_EDGE_ROUTING",3)}function Lo(t,e,n){var i,r;return i=(r=new FG,GM(r,e),kh(r,n),ni((!t.c&&(t.c=new Wt(Fw,t,12,10)),t.c),r),r),c_(i,0),OM(i,1),f_(i,!0),h_(i,!0),i}function VRt(t,e){var n,i;return t.Db>>16==17?t.Cb.Cg(t,21,Dl,e):(i=jo(a(Ve((n=a(an(t,16),24),n||t.Rg()),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function ype(t,e){var n,i,r;if(i=new F9,r=new Iat(i.q.getFullYear()-Fm,i.q.getMonth(),i.q.getDate()),n=F_e(t,e,r),n==0||n>16==6?t.Cb.Cg(t,6,Xs,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(Ic(),UF)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function Wut(t,e){var n,i;return t.Db>>16==7?t.Cb.Cg(t,1,pI,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(Ic(),Uvt)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function $ut(t,e){var n,i;return t.Db>>16==9?t.Cb.Cg(t,9,zr,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(Ic(),jvt)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function Vut(t,e){var n,i;return t.Db>>16==3?t.Cb.Cg(t,12,zr,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(Ic(),Fvt)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function qut(t,e){var n,i;return t.Db>>16==3?t.Cb.Cg(t,0,mI,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(ye(),S0)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function XRt(t,e){var n,i;return t.Db>>16==7?t.Cb.Cg(t,6,of,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(ye(),A0)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function ZRt(t,e){var n,i;return t.Db>>16==5?t.Cb.Cg(t,9,XF,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(ye(),T0)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function YM(t,e){var n,i;if(e){if(e==t)return!0;for(n=0,i=a(e,42).yg();i&&i!=e;i=i.yg()){if(++n>jZ)return YM(t,i);if(i==t)return!0}}return!1}function Dpe(t){var e,n;e=a(z(t,(Ph(),kjt)),21),e?(n=e.a,n==0?Ct(t,(R1(),fB),new kq):Ct(t,(R1(),fB),new lN(n))):Ct(t,(R1(),fB),new lN(1))}function Npe(t,e){var n;switch(n=t.g,e.g){case 1:return-(t.k.b+t.n.b);case 2:return t.k.a-n.n.a;case 3:return t.k.b-n.n.b;case 4:return-(t.k.a+t.n.a)}return 0}function Xut(t,e,n,i){var r,c,l;if(t.a[e.o]==-1)for(t.a[e.o]=n,t.b[e.o]=i,c=Rn(br(e));Jn(c);)r=a(In(c),14),!ec(r)&&(l=r.d.g,Xut(t,l,n+1,i))}function Ope(t){switch(dD(),t.q.g){case 5:P9t(t,(Ht(),Tn)),P9t(t,fi);break;case 4:_Dt(t,(Ht(),Tn)),_Dt(t,fi);break;default:iOt(t,(Ht(),Tn)),iOt(t,fi)}}function Bpe(t){switch(dD(),t.q.g){case 5:H9t(t,(Ht(),Qe)),H9t(t,on);break;case 4:mRt(t,(Ht(),Qe)),mRt(t,on);break;default:rOt(t,(Ht(),Qe)),rOt(t,on)}}function wl(t){var e;return!(t.Bb&1)&&t.r&&t.r.Eg()&&(e=a(t.r,42),t.r=a(B1(t,e),133),t.r!=e&&t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,9,8,e,t.r))),t.r}function $C(t,e,n){var i,r;i=e*n,ct(t.g,153)?(r=L2(t),r.f.d?r.f.a||(t.d.a+=i+yd):(t.d.d-=i+yd,t.d.a+=i+yd)):ct(t.g,8)&&(t.d.d-=i,t.d.a+=2*i)}function YRt(){B7(),this.c=new Dt,this.i=new Dt,this.e=new Xa,this.f=new Xa,this.g=new Xa,this.j=new Dt,this.a=new Dt,this.b=(ts(),new vi),this.k=new vi}function Fpe(t,e){var n,i,r,c;for(di(e,"Dull edge routing",1),c=qn(t.b,0);c.b!=c.d.c;)for(r=a(Yn(c),76),i=qn(r.d,0);i.b!=i.d.c;)n=a(Yn(i),170),ld(n.a)}function rX(t,e,n){var i;return i=Y(Z(Os,1),Xo,22,15,[mlt(t,(Ch(),lc),e,n),mlt(t,ta,e,n),mlt(t,hc,e,n)]),t.f&&(i[0]=y.Math.max(i[0],i[2]),i[2]=i[0]),i}function Upe(){$7();var t,e;try{if(e=a(olt((v1(),Nl),yE),1698),e)return e}catch(n){if(n=vr(n),ct(n,104))t=n,Xst((Kn(),t));else throw K(n)}return new Pg}function zpe(){$7();var t,e;try{if(e=a(olt((v1(),Nl),xl),1635),e)return e}catch(n){if(n=vr(n),ct(n,104))t=n,Xst((Kn(),t));else throw K(n)}return new zR}function jpe(){j5t();var t,e;try{if(e=a(olt((v1(),Nl),m0),1710),e)return e}catch(n){if(n=vr(n),ct(n,104))t=n,Xst((Kn(),t));else throw K(n)}return new YS}function Zut(t,e){var n,i;return t.Db>>16==11?t.Cb.Cg(t,10,zr,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(Ic(),zvt)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function KRt(t,e){var n,i;return t.Db>>16==10?t.Cb.Cg(t,11,Dl,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(ye(),C0)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function JRt(t,e){var n,i;return t.Db>>16==10?t.Cb.Cg(t,12,ph,e):(i=jo(a(Ve((n=a(an(t,16),24),n||(ye(),zw)),t.Db>>16),17)),t.Cb.Cg(t,i.n,i.f,e))}function Hpe(t,e){var n,i,r,c,l;if(e)for(r=e.a.length,n=new Ug(r),l=(n.b-n.a)*n.c<0?(_1(),hg):new x1(n);l.hc();)c=a(l.ic(),21),i=LM(e,c.a),i&&aDt(t,i)}function Gpe(){Kit();var t,e;for(g3e((T1(),Ae)),a3e(Ae),iX(Ae),e_t=(ye(),Hf),e=new j(l_t);e.a>19,b=e.h>>19,g!=b?b-g:(r=t.h,f=e.h,r!=f?r-f:(i=t.m,l=e.m,i!=l?i-l:(n=t.l,c=e.l,n-c)))}function Wpe(t,e){var n,i,r;if(i=t.b.d.d,t.a||(i+=t.b.d.a),r=e.b.d.d,e.a||(r+=e.b.d.a),n=ro(i,r),n==0){if(!t.a&&e.a)return-1;if(!e.a&&t.a)return 1}return n}function $pe(t,e){var n,i,r;if(i=t.b.g.d,t.a||(i+=t.b.g.a),r=e.b.g.d,e.a||(r+=e.b.g.a),n=ro(i,r),n==0){if(!t.a&&e.a)return-1;if(!e.a&&t.a)return 1}return n}function Vpe(t,e,n,i){var r,c,l,f;for(r=0;rl&&(f=l/i),r>c&&(g=c/r),hl(t,y.Math.min(f,g)),t}function Xpe(t,e,n){var i,r;return r=t.e,t.e=e,t.Db&4&&!(t.Db&1)&&(i=new fs(t,1,4,r,e),n?n.Sh(i):n=i),r!=e&&(e?n=cE(t,D7(t,e),n):n=cE(t,t.a,n)),n}function n8t(){F9.call(this),this.e=-1,this.a=!1,this.p=Vs,this.k=-1,this.c=-1,this.b=-1,this.g=!1,this.f=-1,this.j=-1,this.n=-1,this.i=-1,this.d=-1,this.o=Vs}function Zpe(t,e){var n,i;for(i=new j(e);i.a=0?(n=fP(t,iO),i=iP(t,iO)):(e=Vv(t,1),n=fP(e,5e8),i=iP(e,5e8),i=so(Yd(i,1),ns(t,1))),Xh(Yd(i,32),ns(n,uo))}function b7(){b7=P,hgt=(z7(),BK),lgt=new bn(yft,hgt),ugt=(SN(),OK),agt=new bn(xft,ugt),cgt=(u7(),NK),ogt=new bn(Mft,cgt),sgt=new bn(Eft,(me(),me(),!0))}function sX(t,e){if(e==t.c.g)return t.d.g;if(e==t.d.g)return t.c.g;throw K(new yn("'node' must either be the source node or target node of the edge."))}function Qpe(t,e,n){var i,r;for(di(n,"Interactive node placement",1),t.a=a(z(e,(Ft(),yw)),266),r=new j(e.b);r.a0&&(l=(c&qi)%t.d.length,r=Nlt(t,l,c,e),r)?(f=r.mc(n),f):(i=t.Ii(c,e,n),t.c.nc(i),null)}function tlt(t,e){var n,i,r,c;switch(jp(t,e).lk()){case 3:case 2:{for(n=A_(e),r=0,c=n.i;r=0;i--)if(le(t[i].d,e)||le(t[i].d,n)){t.length>=i+1&&t.splice(0,i+1);break}return t}function elt(t,e,n){this.b=new bD,this.i=new Dt,this.d=new Va(this),this.g=t,this.a=e.c.length,this.c=e,this.e=a(Ee(this.c,this.c.c.length-1),8),this.f=n,j_e(this)}function c8t(){this.a=new Sz,this.g=new gD,this.j=new gD,this.b=(ts(),new vi),this.d=new gD,this.i=new gD,this.k=new vi,this.c=new vi,this.e=new vi,this.f=new vi}function a1e(t){var e,n,i,r,c;for(i=new qg(new xp(t.b).a);i.b;)n=Sm(i),e=a(n.kc(),8),c=a(a(n.lc(),48).a,8),r=a(a(n.lc(),48).b,9),sr(Gh(e.k),sr(Xc(c.k),r))}function qC(){qC=P,mJ=new z5("MEDIAN_LAYER",0),bJ=new z5("WIDEST_LAYER",1),pJ=new z5("CENTER_LAYER",2),D0t=new z5("TAIL_LAYER",3),gJ=new z5("HEAD_LAYER",4)}function u1e(t){var e,n,i;for(n=new j(t.p);n.an);return r}function ilt(t,e,n){switch(e){case 1:!t.n&&(t.n=new Wt(ic,t,1,7)),Dr(t.n),!t.n&&(t.n=new Wt(ic,t,1,7)),Lr(t.n,a(n,13));return;case 2:HL(t,hi(n));return}Bat(t,e,n)}function rlt(t,e,n){switch(e){case 3:s_(t,lt(Yt(n)));return;case 4:o_(t,lt(Yt(n)));return;case 5:th(t,lt(Yt(n)));return;case 6:eh(t,lt(Yt(n)));return}ilt(t,e,n)}function v7(t,e,n){var i,r,c;c=(i=new FG,i),r=$1(c,e,null),r&&r.Th(),kh(c,n),ni((!t.c&&(t.c=new Wt(Fw,t,12,10)),t.c),c),c_(c,0),OM(c,1),f_(c,!0),h_(c,!0)}function slt(t){var e;return t.Db&64?r7(t):(e=new ul(r7(t)),e.a+=" (abstract: ",Cp(e,(t.Bb&256)!=0),e.a+=", interface: ",Cp(e,(t.Bb&512)!=0),e.a+=")",e.a)}function olt(t,e){var n,i,r;return n=IT(t.e,e),ct(n,207)?(r=a(n,207),r.gh()==null,r.dh()):ct(n,456)?(i=a(n,1631),r=i.b,r):null}function h8t(t,e){var n;if(this.f=t,this.b=this.f.c,n=t.d,lV(e,n),e>=(n/2|0))for(this.e=t.e,this.d=n;e++0;)rkt(this);this.a=null}function f8t(t,e,n,i,r,c,l){var f,g,b,v,M;if(v=r[c],b=c==l-1,f=b?i:0,M=BRt(f,v),i!=10&&Y(Z(t,l-c),e[c],n[c],f,M),!b)for(++c,g=0;g0&&bo(t,t.length-1)==33)try{return e=R9t($h(t,0,t.length-1)),e.e==null}catch(n){if(n=vr(n),!ct(n,30))throw K(n)}return!1}function _1e(t,e,n){var i,r,c,l;for(n=j2(e,t.e,-1-t.c,n),l=Fot(t.a),c=(i=new qg(new xp(l.a).a),new dT(i));c.a.b;)r=a(Sm(c.a).kc(),84),n=cE(r,D7(r,t.a),n);return n}function y1e(t,e,n){var i,r,c,l;for(n=tN(e,t.e,-1-t.c,n),l=Fot(t.a),c=(i=new qg(new xp(l.a).a),new dT(i));c.a.b;)r=a(Sm(c.a).kc(),84),n=cE(r,D7(r,t.a),n);return n}function d8t(t){var e,n,i;if(t==null)return null;if(n=a(t,15),n.Wb())return"";for(i=new Sp,e=n.tc();e.hc();)mo(i,(fr(),hi(e.ic()))),i.a+=" ";return N9(i,i.a.length-1)}function p8t(t){var e,n,i;if(t==null)return null;if(n=a(t,15),n.Wb())return"";for(i=new Sp,e=n.tc();e.hc();)mo(i,(fr(),hi(e.ic()))),i.a+=" ";return N9(i,i.a.length-1)}function x1e(t,e){tE();var n,i;for(i=(V1(),QO),n=t;e>1;e>>=1)e&1&&(i=t_(i,n)),n.d==1?n=t_(n,n):n=new iRt(LNt(n.a,n.d,dt(Gn,pi,22,n.d<<1,15,1)));return i=t_(i,n),i}function YC(t,e){return t.b.a=y.Math.min(t.b.a,e.c),t.b.b=y.Math.min(t.b.b,e.d),t.a.a=y.Math.max(t.a.a,e.c),t.a.b=y.Math.max(t.a.b,e.d),t.c[t.c.length]=e,!0}function M1e(t){var e,n,i,r;for(r=-1,i=0,n=new j(t);n.a=0&&le(t.substr(e,3),"GMT")||e>=0&&le(t.substr(e,3),"UTC"))&&(n[0]=e+3),Cht(t,n,i)}function llt(){llt=P;var t,e,n,i;for(q1t=dt(Os,Xo,22,25,15,1),X1t=dt(Os,Xo,22,33,15,1),i=152587890625e-16,e=32;e>=0;e--)X1t[e]=i,i*=.5;for(n=1,t=24;t>=0;t--)q1t[t]=n,n*=.5}function _8t(t,e,n){var i,r;switch(i=(Hn(e.b!=0),a(Ql(e,e.a.a),9)),n.g){case 0:i.b=0;break;case 2:i.b=t.f;break;case 3:i.a=0;break;default:i.a=t.g}return r=qn(e,0),vM(r,i),e}function x7(){x7=P,tQ=new BT(HBt,0),Sbt=new BT("LONGEST_PATH",1),QJ=new BT("COFFMAN_GRAHAM",2),Ebt=new BT(hY,3),Tbt=new BT("STRETCH_WIDTH",4),QB=new BT("MIN_WIDTH",5)}function H1e(t,e){var n,i,r,c;for(n=0,i=0,c=new j(e.b);c.an;c--)t[c]|=e[c-n-1]>>>l,t[c-1]=e[c-n-1]<=t.f)break;c.c[c.c.length]=n}return c}function q1e(t,e,n){var i,r,c;return c=0,i=n[e],e>4&15,c=t[i]&15,l[r++]=Hvt[n],l[r++]=Hvt[c];return ml(l,0,l.length)}function M8t(t,e,n){var i,r,c,l,f;for(i=n._b(),rRt(t,t.i+i),f=t.i-e,f>0&&Aa(t.g,e,t.g,e+i,f),l=n.tc(),t.i+=i,r=0;r=ao?(e=GP+(t-ao>>10&1023)&qr,n=56320+(t-ao&1023)&qr,String.fromCharCode(e)+(""+String.fromCharCode(n))):String.fromCharCode(t&qr)}function tge(t){var e,n,i;for(i=t.e.c.length,t.a=Vb(Gn,[wt,pi],[37,22],15,[i,i],2),n=new j(t.c);n.a0&&GRt(this,this.c-1,(Ht(),Qe)),this.c1&&(e.c[e.c.length]=c))}function nge(t){var e,n,i;for(n=new $n((!t.a&&(t.a=new Wt(zr,t,10,11)),t.a));n.e!=n.i._b();)if(e=a(ci(n),35),i=EP(e),!Jn((Ao(),new $d(id(Zd(i.a,new X))))))return e;return null}function E8t(t,e,n){var i,r;for(r=new $n((!t.a&&(t.a=new Wt(zr,t,10,11)),t.a));r.e!=r.i._b();)i=a(ci(r),35),Wd(i,i.i+e,i.j+n);vo((!t.b&&(t.b=new Wt(Xs,t,12,3)),t.b),new JMt(e,n))}function S8t(t,e,n,i,r){var c,l,f;for(c=tNt(t,e,n,i,r),f=!1;!c;)P7(t,r,!0),f=!0,c=tNt(t,e,n,i,r);f&&P7(t,r,!1),l=jN(r),l.c.length!=0&&(t.d&&t.d.If(l),S8t(t,r,n,i,l))}function glt(t,e){var n;n=Zc((v1(),Nl),t),ct(n,456)?tc(Nl,t,new vEt(this,e)):tc(Nl,t,this),ylt(this,e),e==(Q3(),t_t)?(this.wb=a(this,1633),a(e,1635)):this.wb=(T1(),Ae)}function ige(t){var e,n,i;if(t==null)return null;for(e=null,n=0;n0;){if(n=i,i=(i-1)/2|0,t.a.Ld(Ee(t.b,i),e)<=0)return Kl(t.b,n,e),!0;Kl(t.b,n,Ee(t.b,i))}return Kl(t.b,i,e),!0}function age(t){for(var e,n,i,r;t.o.a.c.length!=0;)n=a(Gat(t.o),48),i=a(n.a,113),e=a(n.b,189),r=t7(e,i),e.e==i?(lD(r.g,e),i.e=r.e+e.a):(lD(r.b,e),i.e=r.e-e.a),Ut(t.e.a,i)}function mlt(t,e,n,i){var r,c;if(r=0,n)r=$N(t.a[n.g][e.g],i);else for(c=0;cjZ)return k8t(n);if(i=n,n==t)throw K(new yc("There is a cycle in the containment hierarchy of "+t))}return i}function L8t(){L8t=P,$zt=Y(Z(At,1),wt,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),Vzt=Y(Z(At,1),wt,2,6,["Jan","Feb","Mar","Apr",ex,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"])}function lge(t,e,n,i){var r,c;for(c=e,r=c.d==null||t.a.Ld(n.d,c.d)>0?1:0;c.a[r]!=n;)c=c.a[r],r=t.a.Ld(n.d,c.d)>0?1:0;c.a[r]=i,i.b=n.b,i.a[0]=n.a[0],i.a[1]=n.a[1],n.a[0]=null,n.a[1]=null}function Mo(){Mo=P,Of=new F5("P1_CYCLE_BREAKING",0),mx=new F5("P2_LAYERING",1),aa=new F5("P3_NODE_ORDERING",2),ua=new F5("P4_NODE_PLACEMENT",3),Yo=new F5("P5_EDGE_ROUTING",4)}function P8t(t){var e,n;return n=y.Math.sqrt(t.f*(t.i==null&&(t.i=yat(t,new Wo)),lt(t.i))/(t.b*(t.g==null&&(t.g=TPt(t,new $a)),lt(t.g)))),e=or(Ja(y.Math.round(n))),e=cm(e,t.f),e}function I8t(t){var e,n;n=t.k,e=sr(new We(n.a,n.b),t.n),this.d=y.Math.min(n.b,e.b),this.a=y.Math.max(n.b,e.b),this.b=y.Math.min(n.a,e.a),this.c=y.Math.max(n.a,e.a)}function hge(t){var e,n;if(t.a>=t.c.c.length)return yM(),O4;if(n=H(t),t.a>=t.c.c.length)return new u2(n);e=new Xa,Ir(e,si(n));do Ir(e,si(H(t)));while(t.a0&&BNt((mi(0,n.c.length),a(n.c[0],26)),t),n.c.length>1&&BNt(a(Ee(n,n.c.length-1),26),t),Vn(e)}function pge(t,e,n,i){var r,c,l,f,g;return l=WRt(t.a,e,n),f=a(l.a,21).a,c=a(l.b,21).a,i&&(g=a(z(e,(Ft(),Du)),8),r=a(z(n,Du),8),g&&r&&(_kt(t.b,g,r),f+=t.b.i,c+=t.b.e)),f>c}function D8t(t,e){var n,i,r;if(wlt(t,e))return!0;for(i=new j(e);i.ac&&Bre(b,dLt(n[f],W1t))&&(r=f,c=g);return r>=0&&(i[0]=e+c),r}function E7(t,e){var n,i,r;if(r=0,i=e[0],i>=t.length)return-1;for(n=t.charCodeAt(i);n>=48&&n<=57&&(r=r*10+(n-48),++i,!(i>=t.length));)n=t.charCodeAt(i);return i>e[0]?e[0]=i:r=-1,r}function bge(t,e){var n,i,r;return i=(WC(),v6),r=y.Math.abs(t.b),n=y.Math.abs(e.f-t.b),ne$(t.d).c?(t.i+=t.g.c,Nq(t.d)):e$(t.d).c>e$(t.g).c?(t.e+=t.d.c,Nq(t.g)):(t.i+=TCt(t.g),t.e+=TCt(t.d),Nq(t.g),Nq(t.d))}function QM(){QM=P,$4=new OT(jm,0),J0t=new OT(pE,1),emt=new OT(gE,2),tmt=new OT("LEFT_RIGHT_CONSTRAINT_LOCKING",3),Q0t=new OT("LEFT_RIGHT_CONNECTION_LOCKING",4),K0t=new OT(PBt,5)}function _ge(t){var e,n,i,r,c,l;for(i=NNt(JX(t)),e=is,c=0,r=0;e>.5&&c<50;)r=CDt(i),n=$2(i,r,!0),e=y.Math.abs(n.b),++c;return l=Yt(H1(fl(t.g),fl(t.g).b-1)),$2(t,(En(l),l-r),!1)}function yge(t){var e,n,i,r,c,l;for(i=NNt(JX(t)),e=is,c=0,r=0;e>.5&&c<50;)r=TDt(i),n=$2(i,r,!0),e=y.Math.abs(n.a),++c;return l=Yt(H1(fl(t.g),fl(t.g).b-1)),$2(t,(En(l),l-r),!1)}function B8t(t,e,n,i){t.a.d=y.Math.min(e,n),t.a.a=y.Math.max(e,i)-t.a.d,ef&&(g=f/i),r>c&&(b=c/r),l=y.Math.min(g,b),t.a+=l*(e.a-t.a),t.b+=l*(e.b-t.b)}function Sge(t,e){mD();var n,i,r,c;if(e.b<2)return!1;for(c=qn(e,0),n=a(Yn(c),9),i=n;c.b!=c.d.c;){if(r=a(Yn(c),9),MDt(t,i,r))return!0;i=r}return!!MDt(t,i,n)}function _lt(t,e,n,i){var r,c;return n==0?(!t.o&&(t.o=new hu((Ic(),pp),ug,t,0)),MD(t.o,e,i)):(c=a(Ve((r=a(an(t,16),24),r||t.Rg()),n),61),c.aj().ej(t,ra(t),n-ei(t.Rg()),e,i))}function Tge(t,e){var n;e!=t.a?(n=null,t.a&&(n=a(t.a,42).Cg(t,4,of,null)),e&&(n=a(e,42).Ag(t,4,of,n)),n=qat(t,e,n),n&&n.Th()):t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,1,e,e))}function z8t(t){var e;return t.Db&64?dX(t):(e=new ll(Apt),!t.a||Ii(Ii((e.a+=' "',e),t.a),'"'),Ii(um(Ii(um(Ii(um(Ii(um((e.a+=" (",e),t.i),","),t.j)," | "),t.g),","),t.f),")"),e.a)}function Cge(t){var e,n,i,r,c,l,f,g,b;return b=hlt(t),n=t.e,c=n!=null,c&&tC(b,kO,t.e),f=t.k,l=!!f,l&&tC(b,"type",eL(t.k)),i=D9(t.j),r=!i,r&&(g=new Rg,P1(b,tK,g),e=new _G(g),vo(t.j,e)),b}function Age(t,e){var n;if(e!=null&&!t.c.jj().Li(e))throw n=ct(e,51)?a(e,51).mg().zb:Og(du(e)),K(new bT(H_+t.c.be()+"'s type '"+t.c.jj().be()+"' does not permit a value of type '"+n+"'"))}function kge(t,e){var n,i,r,c;if(En(e),c=t.a._b(),c>22-e,r=t.h<>22-e):e<44?(n=0,i=t.l<>44-e):(n=0,i=0,r=t.l<>>r|n[l+i+1]<>>r,++l}return c}function H8t(t){Dut();var e,n,i,r;return i=a(z(t,(qt(),$B)),318),r=lt(de(z(t,$J)))||zt(z(t,OE))===zt((P2(),E6)),e=a(z(t,zmt),21).a,n=t.a.c.length,!r&&i!=(BM(),NB)&&(e==0||e>n)}function Rge(t,e,n){var i,r;for(r=new Gs(t.b,0);r.b=l)return rn.a._b()?a(Ee(i,r-n.a._b()-1),8):null;return null}function ylt(t,e){var n;e!=t.sb?(n=null,t.sb&&(n=a(t.sb,42).Cg(t,1,TA,null)),e&&(n=a(e,42).Ag(t,1,TA,n)),n=Zat(t,e,n),n&&n.Th()):t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,4,e,e))}function Oge(t,e,n){var i,r,c,l,f;if(n)for(r=n.a.length,i=new Ug(r),f=(i.b-i.a)*i.c<0?(_1(),hg):new x1(i);f.hc();)l=a(f.ic(),21),c=LM(n,l.a),Dpt in c.a||tK in c.a?sve(t,c,e):l3e(t,c,e)}function W8t(t){switch(t.g){case 0:return new GG((Tm(),rF));case 1:return new iT;default:throw K(new yn("No implementation is available for the crossing minimizer "+(t.f!=null?t.f:""+t.g)))}}function Bge(t){hht();var e,n,i,r,c;if(t==null)return null;for(i=t.length,r=i*2,e=dt(nl,Pf,22,r,15,1),n=0;n>4],e[n*2+1]=eU[c&15];return ml(e,0,e.length)}function Eo(){ep(),Tst.call(this),this.i=(Ht(),Wc),this.a=new go,new yit,this.e=(Ah(2,tx),new qu(2)),this.d=(Ah(4,tx),new qu(4)),this.f=(Ah(4,tx),new qu(4)),this.c=new EMt(this.d,this.f)}function Fge(t,e){var n,i;return!(lt(de(z(e,(Ft(),eg))))||t==(bl(),R6)&&(i=e.c.g,i.j==(Ke(),wu)||(n=a(z(i,(qt(),la)),178),n==xw)))}function Uge(t,e){var n,i;return!(lt(de(z(e,(Ft(),eg))))||t==(bl(),X4)&&(i=e.d.g,i.j==(Ke(),wu)||(n=a(z(i,(qt(),la)),178),n==Km)))}function zge(t,e){var n,i,r;n=fre(e,t.e),i=a(zi(t.g.f,n),21).a,r=t.a.c.length-1,t.a.c.length!=0&&a(Ee(t.a,r),269).c==i?(++a(Ee(t.a,r),269).a,++a(Ee(t.a,r),269).b):Ut(t.a,new jSt(i))}function $8t(t,e,n,i,r){if(ii&&(t.a=i),t.br&&(t.b=r),t}function jge(t){if(ct(t,180))return Nbe(a(t,180));if(ct(t,199))return wfe(a(t,199));if(ct(t,27))return Cge(a(t,27));throw K(new yn(jpt+Gp(new ju(Y(Z(un,1),te,1,5,[t])))))}function Qa(t,e){switch(e.g){case 1:return Xd(t.i,(ep(),Vgt));case 2:return Xd(t.i,(ep(),$gt));case 3:return Xd(t.i,(ep(),qgt));case 4:return Xd(t.i,(ep(),Xgt));default:return we(),we(),fo}}function V8t(t){var e;this.a=t,e=(Ke(),Y(Z(QK,1),jt,232,0,[gs,Hr,rs,uc,wu,Jc,ef])).length,this.b=Vb(Cwt,[wt,GBt],[616,166],0,[e,e],2),this.c=Vb(Cwt,[wt,GBt],[616,166],0,[e,e],2),X_e(this)}function Hge(t){var e,n;return n=a(z(t,(Ft(),Qc)),19),e=new as,(n.pc((So(),K_))||lt(de(z(t,(qt(),D6)))))&&(pa(e,t$t),n.pc(J_)&&pa(e,e$t)),n.pc(IE)&&pa(e,JWt),n.pc(RE)&&pa(e,QWt),e}function q8t(t,e,n){var i,r,c,l;if(e.b!=0){for(i=new Fr,l=qn(e,0);l.b!=l.d.c;)c=a(Yn(l),76),yo(i,Aat(c)),r=c.e,r.a=a(z(c,(mc(),wQ)),21).a,r.b=a(z(c,Ybt),21).a;q8t(t,i,Ta(n,i.b/t.a|0))}}function mP(t){var e,n,i;for(i=new qa,Xi(i,new We(t.j,t.k)),n=new $n((!t.a&&(t.a=new Ss(sf,t,5)),t.a));n.e!=n.i._b();)e=a(ci(n),531),Xi(i,new We(e.a,e.b));return Xi(i,new We(t.b,t.c)),i}function Gge(t,e,n,i,r){var c,l,f,g,b,v;if(r)for(g=r.a.length,c=new Ug(g),v=(c.b-c.a)*c.c<0?(_1(),hg):new x1(c);v.hc();)b=a(v.ic(),21),f=LM(r,b.a),l=new P4t(t,e,n,i),Gve(l.a,l.b,l.c,l.d,f)}function x_(t){$b();var e,n,i;for(i=new Xa,qL(i,t),n=i.a.Xb().tc();n.hc();)e=n.ic(),si(e);switch(i.a._b()){case 0:return yM(),O4;case 1:return new u2(i.a.Xb().tc().ic());default:return new iW(i)}}function xlt(t,e){var n,i,r;for(r=qi,i=new j(d_(e));i.a1&&(t.e.b+=t.a)):(t.e.a+=n.a,t.e.b=y.Math.max(t.e.b,n.b),t.d.c.length>1&&(t.e.a+=t.a))}function X8t(t,e,n){var i,r,c,l;if(c=a(an(t.a,8),1629),c!=null)for(i=0,r=c.length;i1)throw K(new yn("In straight spline segments there may be only one edge."));i=t.a.c,n=t.a.c+t.a.b,Xi(a(e.a.Xb().tc().ic(),14).a,new We(i+(n-i)/2,t.b))}function Z8t(t,e,n,i){var r;this.b=i,this.e=t==(Tm(),rA),r=e[n],this.d=Vb(Ol,[wt,a0],[221,22],16,[r.length,r.length],2),this.a=Vb(Gn,[wt,pi],[37,22],15,[r.length,r.length],2),this.c=new dlt(e,n)}function gX(t){var e,n,i;if(t.a==null)for(t.a=dt(Ol,a0,22,t.c.b.c.length,16,1),t.a[0]=!1,i=new j(t.c.b),i.a>>e,r=t.m>>e|n<<22-e,i=t.l>>e|t.m<<22-e):e<44?(c=0,r=n>>>e-22,i=t.m>>e-22|t.h<<44-e):(c=0,r=0,i=n>>>e-44),ia(i&nu,r&nu,c&sp)}function K8t(t,e,n){var i,r,c,l,f;for(f=mu(t.e.mg(),e),r=a(t.g,124),i=0,l=0;ln?Slt(t,n,"start index"):e<0||e>n?Slt(e,n,"end index"):MP("end index (%s) must not be less than start index (%s)",Y(Z(un,1),te,1,5,[Xt(e),Xt(t)]))}function J8t(t,e){var n,i,r;if(e===t)return!0;if(!ct(e,109)||(r=a(e,109),t._b()!=r._b()))return!1;for(i=r.Tb().tc();i.hc();)if(n=a(i.ic(),38),!t.Wc(n))return!1;return!0}function Q8t(t,e){var n,i,r,c;for(i=0,r=t.length;i0?f[l-1]:dt(Cl,Ih,8,0,0,1),r=f[l],b=l0&&r9t(t,c,n));e.o=0}function r0e(t,e){var n,i,r;for(r=new j(e.f);r.ae)throw K(new yn("Top must be smaller or equal to bottom."));if(0>t)throw K(new yn("Left must be smaller or equal to right."));this.d=0,this.c=t,this.a=e,this.b=0}function o9t(t,e){var n,i,r;if(e.c.length!=0){for(n=D8t(t,e),r=!1;!n;)P7(t,e,!0),r=!0,n=D8t(t,e);r&&P7(t,e,!1),i=jN(e),t.b&&t.b.If(i),t.a=V6t(t,(mi(0,e.c.length),a(e.c[0],35))),o9t(t,i)}}function De(t){var e;this.c=new Fr,this.f=t.e,this.e=t.d,this.i=t.g,this.d=t.c,this.b=t.b,this.k=t.j,this.a=t.a,t.i?this.j=t.i:this.j=(e=a(xu(Jp),10),new Ha(e,a(au(e,e.length),10),0)),this.g=t.f}function i0(){i0=P,Awt=new w2(ox,0),Ec=new w2("BOOLEAN",1),Pa=new w2("INT",2),Y6=new w2("STRING",3),ha=new w2("DOUBLE",4),xs=new w2("ENUM",5),zE=new w2("ENUMSET",6),Ed=new w2("OBJECT",7)}function tu(){tu=P,d_t=Y(Z(At,1),wt,2,6,[n1t,a6,zO,KUt,jO,lK,kO]),f_t=Y(Z(At,1),wt,2,6,[n1t,"empty",a6,c6,"elementOnly"]),p_t=Y(Z(At,1),wt,2,6,[n1t,"preserve","replace",Nh]),eo=new dCt}function rr(t,e){var n;return n=a(t.c.Vb(e),13),!n&&(n=t.Pc(e)),ct(n,196)?new Brt(t,e,a(n,196)):ct(n,60)?new QW(t,e,a(n,60)):ct(n,19)?new pst(t,e,a(n,19)):ct(n,15)?pct(t,e,a(n,15),null):new TL(t,e,n,null)}function z(t,e){var n,i;return i=(!t.p&&(t.p=(ts(),new vi)),zi(t.p,e)),i??(n=e.Of(),ct(n,4)&&(n==null?(!t.p&&(t.p=(ts(),new vi)),IM(t.p,e)):(!t.p&&(t.p=(ts(),new vi)),wr(t.p,e,n))),n)}function s0e(t,e){var n,i,r,c;if(t.e.c.length==0)return null;for(c=new lM,i=new j(t.e);i.a=(r/2|0))for(this.e=i?i.c:null,this.d=r;n++0;)oct(this);this.b=e,this.a=null}function u0e(t){var e,n,i,r,c;return r=a(t.a,21).a,c=a(t.b,21).a,e=(r<0?-r:r)>(c<0?-c:c)?r<0?-r:r:c<0?-c:c,r<=0&&r==c?(n=0,i=c-1):r==-e&&c!=e?(n=c,i=r,c>=0&&++n):(n=-c,i=r),new zs(Xt(n),Xt(i))}function l0e(t,e){var n;return t.c.length==0?!1:(n=FIt((mi(0,t.c.length),a(t.c[0],14)).c.g),Eu(),n==(nw(),ry)||n==iy?!0:pN(Vh(new gi(null,new Ei(t,16)),new A3),new FH(e)))}function Tlt(t,e,n){var i,r,c;if(!t.b[e.g]){for(t.b[e.g]=!0,i=n,!n&&(i=new vN),Xi(i.b,e),c=t.a[e.g].tc();c.hc();)r=a(c.ic(),170),r.b!=e&&Tlt(t,r.b,i),r.c!=e&&Tlt(t,r.c,i),Xi(i.a,r);return i}return null}function h0e(t){switch(t.g){case 0:case 1:case 2:return Ht(),Tn;case 3:case 4:case 5:return Ht(),fi;case 6:case 7:case 8:return Ht(),on;case 9:case 10:case 11:return Ht(),Qe;default:return Ht(),Wc}}function f0e(t){var e,n,i,r;for(e=0,i=t.length,r=i-4,n=0;n0)try{r=ku(e,Vs,qi)}catch(c){throw c=vr(c),ct(c,118)?(i=c,K(new EN(i))):K(c)}return n=(!t.a&&(t.a=new S5(t)),t.a),r=0?a(at(n,r),51):null}function _0e(t,e,n,i){var r;return r=y_(t,n,Y(Z(At,1),wt,2,6,[IZ,RZ,DZ,NZ,OZ,BZ,FZ]),e),r<0&&(r=y_(t,n,Y(Z(At,1),wt,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),e)),r<0?!1:(i.d=r,!0)}function y0e(t,e,n,i){var r;return r=y_(t,n,Y(Z(At,1),wt,2,6,[IZ,RZ,DZ,NZ,OZ,BZ,FZ]),e),r<0&&(r=y_(t,n,Y(Z(At,1),wt,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),e)),r<0?!1:(i.d=r,!0)}function x0e(t){var e,n,i;for(ibe(t),i=new Dt,n=new j(t.a.a.b);n.a>1),klt(e,t,g,b,-r,c),klt(e,t,b,f,-r,c),c.Ld(t[b-1],t[b])<=0){for(;n=0?(e||(e=new _T,i>0&&mo(e,t.substr(0,i))),e.a+="\\",wM(e,n&qr)):e&&wM(e,n&qr);return e?e.a:t}function S0e(t,e,n){var i,r,c,l;c=t.c,l=t.d,r=(zo(Y(Z(ss,1),wt,9,0,[c.g.k,c.k,c.a])).b+zo(Y(Z(ss,1),wt,9,0,[l.g.k,l.k,l.a])).b)/2,c.i==(Ht(),Qe)?i=new We(e+c.g.c.c.a+n,r):i=new We(e-n,r),fD(t.a,0,i)}function d9t(t,e){var n,i;return hct(t.a),qb(t.a,(PN(),bF),bF),qb(t.a,UE,UE),i=new as,Ni(i,UE,(n7(),MQ)),zt(cn(e,(tw(),TQ)))!==zt((KL(),wF))&&Ni(i,UE,yQ),Ni(i,UE,xQ),GEt(t.a,i),n=jht(t.a,e),n}function p9t(t){if(!t)return _f(),Bzt;var e=t.valueOf?t.valueOf():t;if(e!==t){var n=AK[typeof e];return n?n(e):Xat(typeof e)}else return t instanceof Array||t instanceof y.Array?new L8(t):new rT(t)}function vP(t,e){var n;if(e<0)throw K(new x9("Negative exponent"));if(e==0)return QO;if(e==1||Kat(t,QO)||Kat(t,AE))return t;if(!X9t(t,0)){for(n=1;!X9t(t,n);)++n;return t_(pfe(n*e),vP(yct(t,n),e))}return x1e(t,e)}function T0e(t,e){var n,i,r;return ct(e.g,8)&&a(e.g,8).j==(Ke(),rs)?is:(r=L2(e),r?y.Math.max(0,t.b/2-.5):(n=Jv(e),n?(i=lt(Yt(qM(n,(qt(),lp)))),y.Math.max(0,i/2-.5)):is))}function C0e(t,e){var n,i,r;return ct(e.g,8)&&a(e.g,8).j==(Ke(),rs)?is:(r=L2(e),r?y.Math.max(0,t.b/2-.5):(n=Jv(e),n?(i=lt(Yt(qM(n,(qt(),lp)))),y.Math.max(0,i/2-.5)):is))}function A0e(t,e){var n,i,r,c,l;if(!e.Wb()){if(r=a(e.cd(0),125),e._b()==1){RDt(t,r,r,1,0,e);return}for(n=1;nc.a&&!e&&(r.b=c.a),r.c=-(r.b-c.a)/2,n.g){case 1:r.d=-r.a;break;case 3:r.d=c.b}VX(i),qX(i)}function w9t(t,e,n){var i,r,c;switch(c=t.o,i=a(js(t.p,n),219),r=i.i,r.b=yP(i),r.a=_P(i),r.a=y.Math.max(r.a,c.b),r.a>c.b&&!e&&(r.a=c.b),r.d=-(r.a-c.b)/2,n.g){case 4:r.c=-r.b;break;case 2:r.c=c.a}VX(i),qX(i)}function t4(t,e){_Nt(t,e),t.b&1&&(t.a.a=null),t.b&2&&(t.a.f=null),t.b&4&&(t.a.g=null,t.a.i=null),t.b&16&&(t.a.d=null,t.a.e=null),t.b&8&&(t.a.b=null),t.b&32&&(t.a.j=null,t.a.c=null)}function v9t(t){var e,n,i,r;if(n=a(t,42).Kg(),n)try{if(i=null,e=nE((v1(),Nl),jNt(xfe(n))),e&&(r=e.Lg(),r&&(i=r.gk(hi(lt(n.e))))),i&&i!=t)return v9t(i)}catch(c){if(c=vr(c),!ct(c,54))throw K(c)}return t}function _9t(t,e){var n;e.d?e.d.b=e.b:t.a=e.b,e.b?e.b.d=e.d:t.e=e.d,!e.e&&!e.c?(n=a(IM(t.b,e.a),264),n.a=0,++t.c):(n=a(zi(t.b,e.a),264),--n.a,e.e?e.e.c=e.c:n.b=e.c,e.c?e.c.e=e.e:n.c=e.e),--t.d}function Plt(t){var e,n;return t>-0x800000000000&&t<0x800000000000?t==0?0:(e=t<0,e&&(t=-t),n=Tr(y.Math.floor(y.Math.log(t)/.6931471805599453)),(!e||t!=y.Math.pow(2,n))&&++n,n):_Pt(Ja(t))}function y9t(t,e){var n,i,r,c,l,f;for(n=t.b.c.length,r=Ee(t.b,e);e*2+10)for(l=t.c.d,f=t.d.d,r=hl(ja(new We(f.a,f.b),l),1/(i+1)),c=new We(l.a,l.b),n=new j(t.a);n.a0&&(l+=n,++e);e>1&&(l+=t.c*(e-1))}else l=l3t(APt(wL(wo(Tot(t.a),new Ok),new xv)));return l>0?l+t.n.d+t.n.a:0}function yP(t){var e,n,i,r,c,l;if(l=0,t.b==0)l=l3t(APt(wL(wo(Tot(t.a),new yz),new Lg)));else{for(c=DRt(t,!0),e=0,i=0,r=c.length;i0&&(l+=n,++e);e>1&&(l+=t.c*(e-1))}return l>0?l+t.n.b+t.n.c:0}function P0e(t){var e,n;return n=-t.a,e=Y(Z(nl,1),Pf,22,15,[43,48,48,48,48]),n<0&&(e[0]=45,n=-n),e[1]=e[1]+((n/60|0)/10|0)&qr,e[2]=e[2]+(n/60|0)%10&qr,e[3]=e[3]+(n%60/10|0)&qr,e[4]=e[4]+n%10&qr,ml(e,0,e.length)}function I0e(t){var e,n,i,r,c,l;for(l=WM(t.d,t.e),c=l.tc();c.hc();)for(r=a(c.ic(),11),i=t.e==(Ht(),on)?r.d:r.f,n=new j(i);n.a=0;c+=n?1:-1)l=l|e.c.qf(g,c,n,i),l=l|e.q.xf(g,c,n),l=l|UNt(t,g[c],n,i);return Ir(t.c,e),l}function E9t(t,e){var n,i,r,c,l,f;for(c=new j(t.b);c.a=0&&i0;){if(e=a(t.k.cd(t.n-1),75),n=e.nj(),ct(n,62)&&a(a(n,17),62).Bb&ca&&(!t.e||n.Vi()!=$E||n.pi()!=0)&&e.lc()!=null)return!0;--t.n}return!1}else return t.n>0}function Ilt(t,e){var n,i,r,c;if(Ci(t),t.c!=0||t.a!=123)throw K(new ri(ai((Kn(),rUt))));if(c=e==112,i=t.d,n=hM(t.i,125,i),n<0)throw K(new ri(ai((Kn(),sUt))));return r=$h(t.i,i,n),t.d=n+1,H5t(r,c,(t.e&512)==512)}function N0e(t){var e,n;return n=-t.a,e=Y(Z(nl,1),Pf,22,15,[43,48,48,58,48,48]),n<0&&(e[0]=45,n=-n),e[1]=e[1]+((n/60|0)/10|0)&qr,e[2]=e[2]+(n/60|0)%10&qr,e[4]=e[4]+(n%60/10|0)&qr,e[5]=e[5]+n%10&qr,ml(e,0,e.length)}function O0e(t){var e;return e=Y(Z(nl,1),Pf,22,15,[71,77,84,45,48,48,58,48,48]),t<=0&&(e[3]=43,t=-t),e[4]=e[4]+((t/60|0)/10|0)&qr,e[5]=e[5]+(t/60|0)%10&qr,e[7]=e[7]+(t%60/10|0)&qr,e[8]=e[8]+t%10&qr,ml(e,0,e.length)}function C9t(t,e){var n,i,r;return i=new Jh(t),Uo(i,e),Ct(i,(Ft(),zB),e),Ct(i,(qt(),Qi),(Ls(),Gc)),Ct(i,Bf,(md(),xF)),jl(i,(Ke(),rs)),n=new Eo,ds(n,i),yr(n,(Ht(),on)),r=new Eo,ds(r,i),yr(r,Qe),i}function A9t(t,e){var n,i,r,c,l;for(t.c[e.o]=!0,Ut(t.a,e),l=new j(e.i);l.a0&&(r=n),l=new j(t.f.e);l.a=c)l.Pb();else for(r=l.tc(),i=0;i0?Iit():l<0&&Dlt(t,e,-l),!0):!1}function j0e(t){var e,n,i,r,c,l,f,g,b,v;for(n=t.o,e=t.p,l=qi,r=Vs,f=qi,c=Vs,b=0;bb?r:b,f=fv?c:v);return g=r-l+1,i=c-f+1,new C4t(Xt(l),Xt(f),Xt(g),Xt(i))}function H0e(t,e){var n,i,r;return n=a(z(e,(Ph(),kE)),21).a-a(z(t,kE),21).a,n==0?(i=ja(Xc(a(z(t,(R1(),y6)),9)),a(z(t,j4),9)),r=ja(Xc(a(z(e,y6),9)),a(z(e,j4),9)),ro(i.a*i.b,r.a*r.b)):n}function G0e(t,e){var n,i,r;return n=a(z(e,(sw(),mF)),21).a-a(z(t,mF),21).a,n==0?(i=ja(Xc(a(z(t,(mc(),X6)),9)),a(z(t,lA),9)),r=ja(Xc(a(z(e,X6),9)),a(z(e,lA),9)),ro(i.a*i.b,r.a*r.b)):n}function W0e(t,e,n){var i,r,c,l,f,g;if(!t||t.c.length==0)return null;for(c=new rAt(e,!n),r=new j(t);r.a0)switch(e.g){case 2:c.n.c=t.s;break;case 4:c.n.b=t.s}}function yX(t,e){var n,i,r;if(r=oE((tu(),eo),t.mg(),e),r)return Jo(),a(r,61).bj()||(r=uC(qo(eo,r))),i=(n=t.rg(r),a(n>=0?t.ug(n,!0,!0):X2(t,r,!0),184)),a(i,237).wk(e);throw K(new yn(H_+e.be()+Ppt))}function q0e(t,e,n){var i,r,c,l;return c=P7t(UV(),e),i=null,c&&(l=S7t(c,n),r=null,l!=null&&(r=(l==null?(!t.o&&(t.o=new hu((Ic(),pp),ug,t,0)),cP(t.o,c)):(!t.o&&(t.o=new hu((Ic(),pp),ug,t,0)),pP(t.o,c,l)),t)),i=r),i}function Nlt(t,e,n,i){var r,c,l,f,g;if(r=t.d[e],r){if(c=r.g,g=r.i,i!=null){for(f=0;f1||n==-1?(t.b=-1,!0):(e=wl(t),e&&(Jo(),e.Ri()==OUt)?(t.b=-1,!0):(t.b=1,!1));default:case 1:return!1}}function X0e(t,e){var n,i,r,c,l;for(i=(!e.s&&(e.s=new Wt(Ra,e,21,17)),e.s),c=null,r=0,l=i.i;rr)?(Hn(c.a!=null),a(c.a,8)):null}function J0e(t,e){Zl();var n,i,r,c,l,f;for(n=null,l=e.tc();l.hc();)c=a(l.ic(),125),!c.k&&(i=pee(c.a),r=dre(c.a),f=new a4(i,r,null,a(c.d.a.Xb().tc().ic(),14)),Ut(f.c,c.a),t.c[t.c.length]=f,n&&Ut(n.d,f),n=f)}function Q0e(t,e,n){var i,r,c,l,f,g;for(i=a(rr(t.c,e),15),r=a(rr(t.c,n),15),c=i.fd(i._b()),l=r.fd(r._b());c.Cc()&&l.Cc();)if(f=a(c.Ec(),21),g=a(l.Ec(),21),f!=g)return Lp(f.a,g.a);return!c.hc()&&!l.hc()?0:c.hc()?1:-1}function e4(t,e,n,i,r){var c,l,f,g;return g=JW(t,a(r,51)),zt(g)!==zt(r)?(f=a(t.g[n],75),c=k1(e,g),qT(t,n,lX(t,n,c)),Xl(t.e)&&(l=Hg(t,9,c.nj(),r,g,i,!1),clt(l,new Qd(t.e,9,t.c,f,c,i,!1)),SV(l)),g):r}function tme(t,e,n){var i,r,c,l;for(r=n,c=fTt(wL(a(a(rr(t.r,e),19),60).xc(),new Ab)),l=0;c.a||(c.a=$v(c.c,c)),c.a;)if(r){fN(c),r=!1;continue}else i=fN(c),c.a||(c.a=$v(c.c,c)),c.a&&(l=y.Math.max(l,i));return l}function cr(t,e,n){var i;if(i=a(t.c.Vb(e),13),i)return i.nc(n)?(++t.d,!0):!1;if(i=t.Pc(e),i.nc(n))return++t.d,t.c.Zb(e,i),!0;throw K(new sV("New Collection violated the Collection spec"))}function eme(t){var e,n,i,r,c,l;for(r=0,t.q=new Dt,e=new $r,l=new j(t.p);l.a>16),e=i>>16&16,n=16-e,t=t>>e,i=t-256,e=i>>16&8,n+=e,t<<=e,i=t-zm,e=i>>16&4,n+=e,t<<=e,i=t-Lf,e=i>>16&2,n+=e,t<<=e,i=t>>14,e=i&~(i>>1),n+2-e)}function ime(t,e,n,i){var r,c,l,f,g,b;for(r=0;r=0&&b>=0&&g=0?t.ug(i,!0,!0):X2(t,c,!0),184)),a(r,237).sk(e,n);throw K(new yn(H_+e.be()+Ppt))}function D9t(t){var e,n;if(Gd(a(z(t,(qt(),Qi)),83)))for(n=new j(t.i);n.a>24;return l}function ame(t,e){var n,i,r,c,l;if(n=a(an(t.a,4),116),l=n==null?0:n.length,e>=l)throw K(new Wv(e,l));return r=n[e],l==1?i=null:(i=dt(att,aK,380,l-1,0,1),Aa(n,0,i,0,e),c=l-e-1,c>0&&Aa(n,e+1,i,e,c)),uP(t,i),X8t(t,e,r),r}function ume(t,e){var n,i,r;if(zt(t)===zt(e))return!0;if(t==null||e==null||t.length!=e.length)return!1;for(n=0;n=null.tl()?(I7(t),Ult(t)):e.hc()}function xX(t){var e,n;if(ym(t))throw K(new yn(VBt));for(n=qn(t,0);n.b!=n.d.c;)e=a(Yn(n),9),this.d=y.Math.min(this.d,e.b),this.c=y.Math.max(this.c,e.a),this.a=y.Math.max(this.a,e.b),this.b=y.Math.min(this.b,e.a)}function fme(t){var e,n;return e=new as,pa(e,v$t),n=a(z(t,(Ft(),Qc)),19),n.pc((So(),C6))&&pa(e,E$t),n.pc(IE)&&pa(e,_$t),(n.pc(K_)||lt(de(z(t,(qt(),D6)))))&&(pa(e,x$t),n.pc(J_)&&pa(e,M$t)),n.pc(RE)&&pa(e,y$t),e}function MX(t){var e,n;if(e=hi(cn(t,(dr(),Owt))),n=ade(UV(),e),!n)throw e==null||e.length==0?K(new P5("No layout algorithm has been specified ("+t+").")):K(new P5("Layout algorithm not found: "+e));return n}function Z2(){Z2=P,jx=a(at(Et((Oit(),_c).qb),6),29),zx=a(at(Et(_c.qb),3),29),ptt=a(at(Et(_c.qb),4),29),gtt=a(at(Et(_c.qb),5),17),_7(jx),_7(zx),_7(ptt),_7(gtt),uXt=new ju(Y(Z(Ra,1),W_,158,0,[jx,zx]))}function z9t(t){var e=(!TK&&(TK=Uxe()),TK),n=t.replace(/[\x00-\x1f\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200b-\u200f\u2028-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb"\\]/g,function(i){return Eoe(i,e)});return'"'+n+'"'}function dme(t){var e,n,i,r,c,l;for(r=t.e.c.length,i=dt(Sl,fw,15,r,0,1),l=new j(t.e);l.a=0;)i=n[c],l.Bk(i.nj())&&ni(r,i);!Hxe(t,r)&&Xl(t.e)&&Wn(t,e.lj()?Hg(t,6,e,(we(),fo),null,-1,!1):Hg(t,e.Zi()?2:1,e,null,null,-1,!1))}function wme(t,e){var n,i,r,c,l;return t.a==(QM(),$4)?!0:(c=e.a.c,n=e.a.c+e.a.b,!(e.i&&(i=e.u,l=i.c.c.a-i.n.a/2,r=c-(i.k.a+i.n.a),r>l)||e.n&&(i=e.v,l=i.c.c.a-i.n.a/2,r=i.k.a-n,r>l)))}function W9t(t,e,n){var i,r,c,l,f,g;for(i=0,g=n,e||(i=n*(t.c.length-1),g*=-1),c=new j(t);c.a1?t.e*=lt(t.a):t.f/=lt(t.a),whe(t),Yfe(t),rve(t),Ct(t.b,(HC(),cB),t.g)}function _me(t){k2();var e,n,i,r;for(aB=new Dt,HK=(ts(),new vi),jK=new Dt,e=(!t.a&&(t.a=new Wt(zr,t,10,11)),t.a),Txe(e),r=new $n(e);r.e!=r.i._b();)i=a(ci(r),35),nc(aB,i,0)==-1&&(n=new Dt,Ut(jK,n),oRt(i,n));return jK}function yme(t,e){var n,i,r,c,l,f,g;if(i=iIt(t.Db&254),i==1)t.Eb=null;else if(c=r_(t.Eb),i==2)r=eX(t,e),t.Eb=c[r==0?1:0];else{for(l=dt(un,te,1,i-1,5,1),n=2,f=0,g=0;n<=128;n<<=1)n==e?++f:t.Db&n&&(l[g++]=c[f++]);t.Eb=l}t.Db&=~e}function q9t(t,e,n){var i,r,c;t.ti()?(c=t.ui(),tP(t,e,n),i=t.mi(3,null,n,e,c),t.qi()?(r=t.ri(n,null),t.xi()&&(r=t.yi(n,r)),r?(r.Sh(i),r.Th()):t.ni(i)):t.ni(i)):(tP(t,e,n),t.qi()&&(r=t.ri(n,null),r&&r.Th()))}function EX(t,e){var n,i,r,c;t.ti()?(n=t.i,c=t.ui(),SL(t,e),i=t.mi(3,null,e,n,c),t.qi()?(r=t.ri(e,null),t.xi()&&(r=t.yi(e,r)),r?(r.Sh(i),r.Th()):t.ni(i)):t.ni(i)):(SL(t,e),t.qi()&&(r=t.ri(e,null),r&&r.Th()))}function Hlt(t,e){var n,i,r,c,l;if(e===t)return!0;if(!ct(e,15)||(l=a(e,15),t._b()!=l._b()))return!1;for(c=l.tc(),i=t.tc();i.hc();)if(n=i.ic(),r=c.ic(),!(zt(n)===zt(r)||n!=null&&Fi(n,r)))return!1;return!0}function X9t(t,e){var n,i,r;if(e==0)return(t.a[0]&1)!=0;if(e<0)throw K(new x9("Negative bit address"));if(r=e>>5,r>=t.d)return t.e<0;if(n=t.a[r],e=1<<(e&31),t.e<0){if(i=DPt(t),r=0?t.jg(null):t.yg().Cg(t,-1-e,null,null)),t.kg(a(r,42),n),i&&i.Th(),t.eg()&&t.fg()&&n>-1&&Bi(t,new fs(t,9,n,c,r)),r):c}function eE(){eE=P,ott=new v2(IBt,0),GF=new v2("INSIDE_SELF_LOOPS",1),WF=new v2("MULTI_EDGES",2),HF=new v2("EDGE_LABELS",3),stt=new v2("PORTS",4),jF=new v2("COMPOUND",5),zF=new v2("CLUSTERS",6),rtt=new v2("DISCONNECTED",7)}function Z9t(t){var e,n;if(t.f){for(;t.n>16)),15).dd(c),f0&&(!(zv(t.a.c)&&e.n.d)&&!(Z5(t.a.c)&&e.n.b)&&(e.g.d+=y.Math.max(0,i/2-.5)),!(zv(t.a.c)&&e.n.a)&&!(Z5(t.a.c)&&e.n.c)&&(e.g.a-=i-1))}function eDt(t,e,n){var i,r,c,l,f,g;c=a(Ee(e.d,0),14).c,i=c.g,r=i.j,g=a(Ee(n.f,0),14).d,l=g.g,f=l.j,r==(Ke(),Hr)?Ct(t,(Ft(),Iu),a(z(i,Iu),11)):Ct(t,(Ft(),Iu),c),f==Hr?Ct(t,(Ft(),Ru),a(z(l,Ru),11)):Ct(t,(Ft(),Ru),g)}function TX(t){var e,n,i;if(t.length==0)throw K(new yn(VBt));for(n=0,i=t.length;n>e,c=t.m>>e|n<<22-e,r=t.l>>e|t.m<<22-e):e<44?(l=i?sp:0,c=n>>e-22,r=t.m>>e-22|n<<44-e):(l=i?sp:0,c=i?nu:0,r=n>>e-44),ia(r&nu,c&nu,l&sp)}function CX(t){var e,n,i,r,c,l;for(this.c=new Dt,this.d=t,i=is,r=is,e=Ps,n=Ps,l=qn(t,0);l.b!=l.d.c;)c=a(Yn(l),9),i=y.Math.min(i,c.a),r=y.Math.min(r,c.b),e=y.Math.max(e,c.a),n=y.Math.max(n,c.b);this.a=new qh(i,r,e-i,n-r)}function qlt(t){var e,n,i;this.c=t,i=a(z(t,(qt(),ch)),110),e=lt(Yt(z(t,GB))),n=lt(Yt(z(t,mbt))),i==(Js(),ah)||i==uh||i==Ff?this.b=e*n:this.b=1/(e*n),this.j=lt(Yt(z(t,Aw))),this.e=lt(Yt(z(t,lp))),this.f=t.b.c.length}function nDt(t){switch(t.g){case 0:return new Ev;case 1:return new x8;case 2:return new g1;case 3:return new VMt;case 4:return new L4t;default:throw K(new yn("No implementation is available for the node placer "+(t.f!=null?t.f:""+t.g)))}}function nh(t){var e;return e=new ll(Og(t.ql)),e.a+="@",Ii(e,(Yr(t)>>>0).toString(16)),t.Eg()?(e.a+=" (eProxyURI: ",Ua(e,t.Kg()),t.tg()&&(e.a+=" eClass: ",Ua(e,t.tg())),e.a+=")"):t.tg()&&(e.a+=" (eClass: ",Ua(e,t.tg()),e.a+=")"),e.a}function iDt(t,e){var n,i,r,c,l,f,g,b,v;if(t.a.f>0&&ct(e,38)&&(t.a.Fi(),b=a(e,38),g=b.kc(),c=g==null?0:Yr(g),l=_st(t.a,c),n=t.a.d[l],n)){for(i=a(n.g,339),v=n.i,f=0;f0&&r0):r<0&&-r0):!1}function A7(t,e,n,i,r){var c,l,f,g,b,v;for(c=i,b=a(a(rr(t.r,e),19),60).tc();b.hc();){if(g=a(b.ic(),111),c){c=!1;continue}l=0,r>0?l=r:g.c&&(l=LD(g.c)),l>0&&(n?(v=g.b.Re().a,l>v&&(f=(l-v)/2,g.d.b=f,g.d.c=f)):g.d.c=t.s+l)}}function Xlt(t,e,n){switch(e){case 7:!t.e&&(t.e=new pn(Xs,t,7,4)),Dr(t.e),!t.e&&(t.e=new pn(Xs,t,7,4)),Lr(t.e,a(n,13));return;case 8:!t.d&&(t.d=new pn(Xs,t,8,5)),Dr(t.d),!t.d&&(t.d=new pn(Xs,t,8,5)),Lr(t.d,a(n,13));return}rlt(t,e,n)}function kme(t){var e,n;if(t.c.length!=2)throw K(new yc("Order only allowed for two paths."));e=(mi(0,t.c.length),a(t.c[0],14)),n=(mi(1,t.c.length),a(t.c[1],14)),e.d.g!=n.c.g&&(t.c=dt(un,te,1,0,5,1),t.c[t.c.length]=n,t.c[t.c.length]=e)}function Lme(t){var e,n,i,r;if(t==null)return null;if(i=Hc(t,!0),r=l6.length,le(i.substr(i.length-r,r),l6)){if(n=i.length,n==4){if(e=i.charCodeAt(0),e==43)return w_t;if(e==45)return SXt}else if(n==3)return w_t}return rw(i)}function Pme(t,e,n){var i;i=null,e&&(i=e.d),YC(t,new aM(e.k.a-i.b+n.a,e.k.b-i.d+n.b)),YC(t,new aM(e.k.a-i.b+n.a,e.k.b+e.n.b+i.a+n.b)),YC(t,new aM(e.k.a+e.n.a+i.c+n.a,e.k.b-i.d+n.b)),YC(t,new aM(e.k.a+e.n.a+i.c+n.a,e.k.b+e.n.b+i.a+n.b))}function Ime(t,e){var n,i,r,c,l;for(di(e,"Port side processing",1),l=new j(t.a);l.ag-n&&f=t.c.a.length)return e;for(i=Ua(Ii(new om,"expected one element but was: <"),e),n=0;n<4&&t.a=0?t.Mg(c,n):tht(t,r,n);else throw K(new yn(H_+r.be()+VY));else throw K(new yn("The feature ID"+e+" is not a valid feature ID"));else Ku(t,i,r,n)}function AX(t,e,n,i,r){var c,l,f,g,b,v,M,k,R;return l=n-t,f=i-e,c=y.Math.atan2(l,f),g=c+rY,b=c-rY,v=r*y.Math.sin(g)+t,k=r*y.Math.cos(g)+e,M=r*y.Math.sin(b)+t,R=r*y.Math.cos(b)+e,Vg(Y(Z(ss,1),wt,9,0,[new We(v,k),new We(M,R)]))}function lDt(t){var e,n,i,r,c,l,f;for(c=0,r=t.f.e,n=0;n=0)return r;for(c=1,f=new j(e.i);f.ag+1?c:g+1);return Sfe(t,e,c),c}function r0(){r0=P,kl=new Bv("H_LEFT",0),Uf=new Bv("H_CENTER",1),Pl=new Bv("H_RIGHT",2),Bh=new Bv("V_TOP",3),hh=new Bv("V_CENTER",4),lh=new Bv("V_BOTTOM",5),Nu=new Bv("INSIDE",6),Il=new Bv("OUTSIDE",7),Ll=new Bv("H_PRIORITY",8)}function cn(t,e){var n,i;return i=(!t.o&&(t.o=new hu((Ic(),pp),ug,t,0)),Lh(t.o,e)),i??(n=e.Of(),ct(n,4)&&(n==null?(!t.o&&(t.o=new hu((Ic(),pp),ug,t,0)),cP(t.o,e)):(!t.o&&(t.o=new hu((Ic(),pp),ug,t,0)),pP(t.o,e,n))),n)}function zme(t){var e,n,i,r,c,l,f;if(e=t.Yg(xl),e&&(f=hi(Lh((!e.b&&(e.b=new Mu((ye(),Ho),Dc,e)),e.b),"settingDelegates")),f!=null)){for(n=new Dt,r=Y2(f,"\\w+"),c=0,l=r.length;c0?(e-=1,n-=1):i>=0&&r<0?(e+=1,n+=1):i>0&&r>=0?(e-=1,n+=1):(e+=1,n-=1),new zs(Xt(e),Xt(n))}function Zlt(t,e,n){var i,r,c;if(e!=n){i=e;do sr(t,i.c),r=a(z(i,(Ft(),tg)),8),r&&(c=i.d,Wu(t,c.b,c.d),sr(t,r.k),i=Mc(r));while(r);i=n;do ja(t,i.c),r=a(z(i,(Ft(),tg)),8),r&&(c=i.d,iL(t,c.b,c.d),ja(t,r.k),i=Mc(r));while(r)}}function Gme(t,e,n){var i,r,c,l,f,g;i=new Dt,i.c[i.c.length]=e,g=e,f=0;do g=gxe(t,g),g&&(i.c[i.c.length]=g),++f;while(g);for(l=(n-(i.c.length-1)*t.d.d)/i.c.length,c=new j(i);c.ae.c?1:t.be.b?1:t.a!=e.a?Yr(t.a)-Yr(e.a):t.d==(dC(),oA)&&e.d==sA?-1:t.d==sA&&e.d==oA?1:0}function kX(t){var e,n,i,r,c,l,f,g;for(r=is,i=Ps,n=new j(t.e.b);n.a=0;e-=2)for(n=0;n<=e;n+=2)(t.b[n]>t.b[n+2]||t.b[n]===t.b[n+2]&&t.b[n+1]>t.b[n+3])&&(i=t.b[n+2],t.b[n+2]=t.b[n],t.b[n]=i,i=t.b[n+3],t.b[n+3]=t.b[n+1],t.b[n+1]=i);t.c=!0}}function gDt(t,e){var n,i,r,c,l,f,g,b;for(l=e==1?KK:YK,c=l.a.Xb().tc();c.hc();)for(r=a(c.ic(),110),g=a(rr(t.f.c,r),19).tc();g.hc();)switch(f=a(g.ic(),48),i=a(f.b,80),b=a(f.a,172),n=b.c,r.g){case 2:case 1:i.g.d+=n;break;case 4:case 3:i.g.c+=n}}function ebe(t){hht();var e,n,i,r,c,l,f;if(t==null||(r=t.length,r%2!=0))return null;for(e=MN(t),c=r/2|0,n=dt(Da,G_,22,c,15,1),i=0;i>24}return n}function nE(t,e){var n,i,r;return n=e==null?za(Ea(t.d,null)):IT(t.e,e),ct(n,207)?(r=a(n,207),r.gh()==null,r):ct(n,456)?(i=a(n,1631),r=i.a,r&&(r.yb==null||(e==null?Au(t.d,null,r):km(t.e,e,r))),r):null}function nbe(t,e){var n,i,r,c,l;if(i=e.nj(),Om(t.e,i)){if(i.xh()&&_V(t,i,e.lc()))return!1}else for(l=mu(t.e.mg(),i),n=a(t.g,124),r=0;r0&&(!(zv(t.a.c)&&e.n.d)&&!(Z5(t.a.c)&&e.n.b)&&(e.g.d-=y.Math.max(0,i/2-.5)),!(zv(t.a.c)&&e.n.a)&&!(Z5(t.a.c)&&e.n.c)&&(e.g.a+=y.Math.max(0,i-1)))}function mDt(t,e,n){var i,r;if((t.c-t.b&t.a.length-1)==2)e==(Ht(),Tn)||e==Qe?(kN(a(AC(t),15),(Cu(),kd)),kN(a(AC(t),15),ag)):(kN(a(AC(t),15),(Cu(),ag)),kN(a(AC(t),15),kd));else for(r=new cC(t);r.a!=r.b;)i=a(VN(r),15),kN(i,n)}function bDt(t){var e,n,i,r,c,l,f;if(t&&(e=t.Yg(xl),e&&(l=hi(Lh((!e.b&&(e.b=new Mu((ye(),Ho),Dc,e)),e.b),"conversionDelegates")),l!=null))){for(f=new Dt,i=Y2(l,"\\w+"),r=0,c=i.length;r=2147483648&&(i-=HZ),i)}function wDt(t,e,n){var i,r,c,l;U4t(t,e)>U4t(t,n)?(i=ac(n,(Ht(),Qe)),t.d=i.Wb()?0:hL(a(i.cd(0),11)),l=ac(e,on),t.b=l.Wb()?0:hL(a(l.cd(0),11))):(r=ac(n,(Ht(),on)),t.d=r.Wb()?0:hL(a(r.cd(0),11)),c=ac(e,Qe),t.b=c.Wb()?0:hL(a(c.cd(0),11)))}function rbe(t){var e,n,i,r,c,l;if(r=a(Ee(t.i,0),11),r.d.c.length+r.f.c.length==0)t.k.a=0;else{for(l=0,i=Rn(Bp(new zd(r),new kv(r)));Jn(i);)n=a(In(i),11),l+=n.g.k.a+n.k.a+n.a.a;e=a(z(t,(qt(),Sw)),9),c=e?e.a:0,t.k.a=l/(r.d.c.length+r.f.c.length)-c}}function vDt(t){switch(t.g){case 0:return new cSt;case 1:return new v8;case 2:return new $Mt;case 3:return new X0;case 4:return new bTt;case 5:return new y8;default:throw K(new yn("No implementation is available for the layerer "+(t.f!=null?t.f:""+t.g)))}}function _Dt(t,e){var n,i,r,c;for(n=t.o.a,c=a(a(rr(t.r,e),19),60).tc();c.hc();)r=a(c.ic(),111),r.e.a=n*lt(Yt(r.b.xe(FF))),r.e.b=(i=r.b,i.ye((dr(),iu))?i.ef()==(Ht(),Tn)?-i.Re().b-lt(Yt(i.xe(iu))):lt(Yt(i.xe(iu))):i.ef()==(Ht(),Tn)?-i.Re().b:0)}function LX(t,e){tE();var n,i,r,c,l,f,g,b,v;return e.d>t.d&&(f=t,t=e,e=f),e.d<63?twe(t,e):(l=(t.d&-2)<<4,b=yct(t,l),v=yct(e,l),i=$X(t,I2(b,l)),r=$X(e,I2(v,l)),g=LX(b,v),n=LX(i,r),c=LX($X(b,i),$X(r,v)),c=QX(QX(c,g),n),c=I2(c,l),g=I2(g,l<<1),QX(QX(g,c),n))}function yDt(t,e,n){var i,r,c;for(cne.call(this,new Dt),this.a=e,this.b=n,this.e=t,i=(t.b&&YX(t),t.a),this.d=R4t(i.a,this.a),this.c=R4t(i.b,this.b),ofe(this,this.d,this.c),F0e(this),c=this.e.e.a.Xb().tc();c.hc();)r=a(c.ic(),247),r.c.c.length>0&&Oye(this,r)}function sbe(t){var e,n,i,r;for(e=0,n=0,r=new j(t.i);r.a1||n>1)return 2;return e+n==1?2:0}function obe(t,e,n){var i,r,c,l,f,g,b;i=n,r=e;do r=t.a[r.o],l=(b=t.g[r.o],lt(t.p[b.o])+lt(t.d[r.o])-r.d.d),f=Aae(r,r.c?nc(r.c.a,r,0):-1),f&&(c=(g=t.g[f.o],lt(t.p[g.o])+lt(t.d[f.o])+f.n.b+f.d.a),i=y.Math.min(i,l-(c+Hv(t.k,r,f))));while(e!=r);return i}function cbe(t,e,n){var i,r,c,l,f,g,b;i=n,r=e;do r=t.a[r.o],c=(b=t.g[r.o],lt(t.p[b.o])+lt(t.d[r.o])+r.n.b+r.d.a),f=Gue(r,r.c?nc(r.c.a,r,0):-1),f&&(l=(g=t.g[f.o],lt(t.p[g.o])+lt(t.d[f.o])-f.d.d),i=y.Math.min(i,l-(c+Hv(t.k,r,f))));while(e!=r);return i}function abe(t,e,n){var i,r,c,l;for(r=n,c=fTt(wL(a(a(rr(t.r,e),19),60).xc(),new _p)),l=0;c.a||(c.a=$v(c.c,c)),c.a;)if(r){Hn((c.a||(c.a=$v(c.c,c)),c.a)),c.a=!1,r=!1;continue}else i=fN(c),c.a||(c.a=$v(c.c,c)),c.a&&(l=y.Math.max(l,i));return l}function ube(t,e,n){var i,r,c,l,f,g,b,v;if(n)for(c=n.a.length,i=new Ug(c),f=(i.b-i.a)*i.c<0?(_1(),hg):new x1(i);f.hc();)l=a(f.ic(),21),r=LM(n,l.a),r&&(g=yae(t,(b=(am(),v=new Eit,v),e&&kDt(b,e),b),r),HL(g,Jd(r,Df)),w7(r,g),Elt(r,g),qV(t,r,g))}function lbe(t){var e,n,i;return n=a(t.a,21).a,i=a(t.b,21).a,e=(n<0?-n:n)>(i<0?-i:i)?n<0?-n:n:i<0?-i:i,n=-e&&i==e?new zs(Xt(n-1),Xt(i)):new zs(Xt(n),Xt(i-1))}function xDt(t){var e,n,i,r,c,l;for(l=a(xo(t.a,dt(Cl,Ih,8,t.a.c.length,0,1)),123),Drt(l,new p3),n=null,r=0,c=l.length;ri.o?yr(r,fi):r.i==fi&&i.o>t.o&&yr(r,Tn);break}return i}function Jlt(t,e,n){var i,r,c;for(c=new j(t.e);c.a0&&(i.b.c-=i.c,i.b.c<=0&&i.b.f>0&&Xi(e,i.b));for(r=new j(t.b);r.a0&&(i.a.f-=i.c,i.a.f<=0&&i.a.c>0&&Xi(n,i.a))}function Qlt(t,e,n){var i,r,c;for(c=new j(t.q);c.a0&&(i.b.j-=i.c,i.b.j<=0&&i.b.r>0&&Xi(e,i.b));for(r=new j(t.g);r.a0&&(i.a.r-=i.c,i.a.r<=0&&i.a.j>0&&Xi(n,i.a))}function I7(t){var e,n,i,r,c;if(t.g==null&&(t.d=t.Gh(t.f),ni(t,t.d),t.c))return c=t.f,c;if(e=a(t.g[t.i-1],43),r=e.ic(),t.e=e,n=t.Gh(r),n.hc())t.d=n,ni(t,n);else for(t.d=null;!e.hc()&&(Vr(t.g,--t.i,null),t.i!=0);)i=a(t.g[t.i-1],43),e=i;return r}function MP(t,e){var n,i,r,c;for(t=t,n=new Bb,c=0,i=0;i=0?t.ug(i,!0,!0):X2(t,c,!0),184)),a(r,237).xk(e,n)}else throw K(new yn(H_+e.be()+VY))}function eht(t,e,n){switch(n.g){case 1:return new We(e.a,y.Math.min(t.d.b,e.b));case 2:return new We(y.Math.max(t.c.a,e.a),e.b);case 3:return new We(e.a,y.Math.max(t.c.b,e.b));case 4:return new We(y.Math.min(e.a,t.d.a),e.b)}return new We(e.a,e.b)}function EP(t){var e,n,i;for(e=od(1+(!t.c&&(t.c=new Wt(Rl,t,9,9)),t.c).i),Ut(e,(!t.d&&(t.d=new pn(Xs,t,8,5)),t.d)),i=new $n((!t.c&&(t.c=new Wt(Rl,t,9,9)),t.c));i.e!=i.i._b();)n=a(ci(i),121),Ut(e,(!n.d&&(n.d=new pn(Xs,n,8,5)),n.d));return si(e),new _2(e)}function Af(t){var e,n,i;for(e=od(1+(!t.c&&(t.c=new Wt(Rl,t,9,9)),t.c).i),Ut(e,(!t.e&&(t.e=new pn(Xs,t,7,4)),t.e)),i=new $n((!t.c&&(t.c=new Wt(Rl,t,9,9)),t.c));i.e!=i.i._b();)n=a(ci(i),121),Ut(e,(!n.e&&(n.e=new pn(Xs,n,7,4)),n.e));return si(e),new _2(e)}function gbe(t,e){var n,i,r,c,l;if(di(e,"Breaking Point Processor",1),H2e(t),lt(de(z(t,(qt(),ybt))))){for(r=new j(t.b);r.a3&&dd(t,0,e-3))}function wbe(t){var e,n,i;return n=t.l,n&n-1||(i=t.m,i&i-1)||(e=t.h,e&e-1)||e==0&&i==0&&n==0?-1:e==0&&i==0&&n!=0?hat(n):e==0&&i!=0&&n==0?hat(i)+22:e!=0&&i==0&&n==0?hat(e)+44:-1}function vbe(t,e){var n,i,r,c,l;for(di(e,"Edge joining",1),n=lt(de(z(t,(qt(),KJ)))),r=new j(t.b);r.a0),c.a.cd(c.c=--c.b),cd(c,r),Hn(c.bF_,g=vF_,g=vF_,g=vF_,g=v=0){if(e==n)return new zs(Xt(-e-1),Xt(-e-1));if(e==-n)return new zs(Xt(-e),Xt(n+1))}return(e<0?-e:e)>(n<0?-n:n)?e<0?new zs(Xt(-e),Xt(n)):new zs(Xt(-e),Xt(n+1)):new zs(Xt(e+1),Xt(n))}function Tbe(t,e,n){var i,r,c,l,f;return r=a(cn(e,(y7(),Nwt)),21),!r&&(r=Xt(0)),c=a(cn(n,Nwt),21),!c&&(c=Xt(0)),r.a>c.a?-1:r.a1)for(e=hm((n=new Ng,++t.b,n),t.d),f=qn(c,0);f.b!=f.d.c;)l=a(Yn(f),113),ih($l(Wl(Vl(Gl(new cl,1),0),e),l))}function Lbe(t,e,n){var i,r,c,l,f;for(di(n,"Breaking Point Removing",1),t.a=a(z(e,(qt(),ig)),197),c=new j(e.b);c.a>16!=6&&e){if(YM(t,e))throw K(new yn(S4+N9t(t)));i=null,t.Cb&&(i=(n=t.Db>>16,n>=0?Gut(t,null):t.Cb.Cg(t,-1-n,null,null))),e&&(i=j2(e,t,6,i)),i=wst(t,e,i),i&&i.Th()}else t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,6,e,e))}function ADt(t,e){var n,i;if(e!=t.Cb||t.Db>>16!=3&&e){if(YM(t,e))throw K(new yn(S4+p7t(t)));i=null,t.Cb&&(i=(n=t.Db>>16,n>=0?Vut(t,null):t.Cb.Cg(t,-1-n,null,null))),e&&(i=j2(e,t,12,i)),i=bst(t,e,i),i&&i.Th()}else t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,3,e,e))}function kDt(t,e){var n,i;if(e!=t.Cb||t.Db>>16!=9&&e){if(YM(t,e))throw K(new yn(S4+MNt(t)));i=null,t.Cb&&(i=(n=t.Db>>16,n>=0?$ut(t,null):t.Cb.Cg(t,-1-n,null,null))),e&&(i=j2(e,t,9,i)),i=vst(t,e,i),i&&i.Th()}else t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,9,e,e))}function LDt(t,e){var n,i;if(e!=t.Cb||t.Db>>16!=11&&e){if(YM(t,e))throw K(new yn(S4+_ht(t)));i=null,t.Cb&&(i=(n=t.Db>>16,n>=0?Zut(t,null):t.Cb.Cg(t,-1-n,null,null))),e&&(i=j2(e,t,10,i)),i=Cst(t,e,i),i&&i.Th()}else t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,11,e,e))}function Dbe(t,e){if(ct(e,246))return Ihe(t,a(e,35));if(ct(e,187))return Rhe(t,a(e,121));if(ct(e,263))return Bse(t,a(e,137));if(ct(e,183))return Xwe(t,a(e,105));if(e)return null;throw K(new yn(jpt+Gp(new ju(Y(Z(un,1),te,1,5,[null])))))}function Nbe(t){var e,n,i,r,c,l,f,g,b,v,M;return M=hlt(t),e=t.a,g=e!=null,g&&tC(M,"category",t.a),r=D9(new Sv(t.d)),l=!r,l&&(b=new Rg,P1(M,"knownOptions",b),n=new bG(b),vo(new Sv(t.d),n)),c=D9(t.g),f=!c,f&&(v=new Rg,P1(M,"supportedFeatures",v),i=new wG(v),vo(t.g,i)),M}function Obe(t,e,n){var i,r,c;for(r=new j(t.a.b);r.ag){for(v=t.d,t.d=dt(Wvt,Kpt,55,2*g+4,0,1),c=0;c=9223372036854776e3?(NM(),y1t):(r=!1,t<0&&(r=!0,t=-t),i=0,t>=o0&&(i=Tr(t/o0),t-=i*o0),n=0,t>=ix&&(n=Tr(t/ix),t-=n*ix),e=Tr(t),c=ia(e,n,i),r&&rq(c),c)}function PDt(t,e,n){var i,r,c,l,f,g;if(!ym(e)){for(g=Ta(n,(ct(e,13)?a(e,13)._b():pC(e.tc()))/t.a|0),di(g,ZBt,1),f=new ol,l=0,c=e.tc();c.hc();)i=a(c.ic(),76),f=Bp(f,new Hd(i)),ldw,c=i-ldw,(r||c)&&(g=a(e.e,249).b,l=a(e.e,249).a,f=a(e.d,129),g==0&&l==0)))return f;return f}function IDt(t,e,n,i){var r,c,l,f;return l=new Jh(t),jl(l,(Ke(),Hr)),Ct(l,(Ft(),li),e),Ct(l,(qt(),Qi),(Ls(),Gc)),Ct(l,Iu,n),Ct(l,Ru,i),c=new Eo,yr(c,(Ht(),on)),ds(c,l),f=new Eo,yr(f,Qe),ds(f,l),Ts(e,c),r=new Np,Uo(r,e),Ct(r,Ro,null),Hs(r,f),Ts(r,i),l}function Wbe(t,e,n,i,r){var c,l;(!ec(e)&&e.c.g.c==e.d.g.c||!bPt(zo(Y(Z(ss,1),wt,9,0,[r.g.k,r.k,r.a])),n))&&(e.c==r?fD(e.a,0,new Oo(n)):Xi(e.a,new Oo(n)),i&&!AT(t.a,n)&&(l=a(z(e,(qt(),Ro)),74),l||(l=new qa,Ct(e,Ro,l)),c=new Oo(n),Ws(l,c,l.c.b,l.c),Ir(t.a,c)))}function $be(t,e){var n,i;if(i=WD(t.b,e.b),!i)throw K(new yc("Invalid hitboxes for scanline constraint calculation."));(f6t(e.b,a(gne(t.b,e.b),57))||f6t(e.b,a(pne(t.b,e.b),57)))&&(rd(),e.b+""),t.a[e.b.f]=a(c$(t.b,e.b),57),n=a(a$(t.b,e.b),57),n&&(t.a[n.f]=e.b)}function RDt(t,e,n,i,r,c){var l,f,g,b,v,M,k,R,N,$,G,nt;for(v=i,e.i&&e.k?(R=a(zi(t.f,e.u),57),$=R.d.c+R.d.b,--v):$=e.a.c+e.a.b,M=r,n.n&&n.k?(R=a(zi(t.f,n.v),57),b=R.d.c,++M):b=n.a.c,G=b-$,g=2>M-v?2:M-v,f=G/g,N=$+f,k=v;k>16!=7&&e){if(YM(t,e))throw K(new yn(S4+z8t(t)));i=null,t.Cb&&(i=(n=t.Db>>16,n>=0?Wut(t,null):t.Cb.Cg(t,-1-n,null,null))),e&&(i=a(e,42).Ag(t,1,pI,i)),i=pot(t,e,i),i&&i.Th()}else t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,7,e,e))}function Vbe(t,e){var n,i;if(e!=t.Cb||t.Db>>16!=3&&e){if(YM(t,e))throw K(new yn(S4+K6t(t)));i=null,t.Cb&&(i=(n=t.Db>>16,n>=0?qut(t,null):t.Cb.Cg(t,-1-n,null,null))),e&&(i=a(e,42).Ag(t,0,mI,i)),i=got(t,e,i),i&&i.Th()}else t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,3,e,e))}function ODt(t){var e,n,i,r,c,l,f;for(c=new j(t.a.a);c.a0&&c>0?l.o=e++:i>0?l.o=n++:c>0?l.o=r++:l.o=n++}we(),gc(t.i,new Eg)}function BDt(t,e){var n,i,r;for(r=(!e.a&&(e.a=new Wt(zr,e,10,11)),e.a).i,i=new $n((!e.a&&(e.a=new Wt(zr,e,10,11)),e.a));i.e!=i.i._b();)n=a(ci(i),35),zt(cn(n,(dr(),cy)))!==zt((Kg(),_A))&&Sct(MX(e),MX(n))&&((!n.a&&(n.a=new Wt(zr,n,10,11)),n.a).i==0||(r+=BDt(t,n)));return r}function Xbe(t,e){var n,i,r;return n=e.Yg(t.a),n&&(r=hi(Lh((!n.b&&(n.b=new Mu((ye(),Ho),Dc,n)),n.b),"affiliation")),r!=null)?(i=jW(r,Ca(35)),i==-1?Eq(t,nC(t,Zu(e.Wi())),r):i==0?Eq(t,null,r.substr(1,r.length-1)):Eq(t,r.substr(0,i),r.substr(i+1,r.length-(i+1)))):null}function Zbe(t){var e,n,i,r,c;if(c=new Dt,pd(t.b,new uH(c)),t.b.c=dt(un,te,1,0,5,1),c.c.length!=0){for(e=(mi(0,c.c.length),a(c.c[0],78)),n=1,i=c.c.length;n=t.a||!ult(e,n))return-1;if(ym(a(i.Kb(e),20)))return 1;for(r=0,l=a(i.Kb(e),20).tc();l.hc();)if(c=a(l.ic(),14),g=c.c.g==e?c.d.g:c.c.g,f=sht(t,g,n,i),f==-1||(r=r>f?r:f,r>t.c-1))return-1;return r+1}function Ybe(t,e,n,i){var r,c,l,f,g,b,v,M,k;for(M=i?(Ht(),on):(Ht(),Qe),r=!1,g=e[n],b=0,v=g.length;b>5,e&=31,i>=t.d)return t.e<0?(V1(),PK):(V1(),AE);if(c=t.d-i,r=dt(Gn,pi,22,c+1,15,1),Ige(r,c,t.a,i,e),t.e<0){for(n=0;n0&&t.a[n]<<32-e){for(n=0;n0&&(c=a(Ee(this.b,0),157),r+=c.o,i+=c.p),r*=2,i*=2,e>1?r=Tr(y.Math.ceil(r*e)):i=Tr(y.Math.ceil(i/e)),this.a=new but(r,i)}function aht(t,e,n,i,r,c){var l,f,g,b,v,M;for(b=n.c.length,c&&(t.c=dt(Gn,pi,22,e.length,15,1)),l=r?0:e.length-1;r?l=0;l+=r?1:-1){for(f=e[l],g=i==(Ht(),Qe)?r?ac(f,i):Cm(ac(f,i)):r?Cm(ac(f,i)):ac(f,i),c&&(t.c[f.o]=g._b()),M=g.tc();M.hc();)v=a(M.ic(),11),t.d[v.o]=b++;Or(n,g)}}function $Dt(t,e,n){var i,r,c,l,f,g,b,v;for(c=lt(Yt(t.b.tc().ic())),b=lt(Yt(EPt(e.b))),i=hl(Xc(t.a),b-n),r=hl(Xc(e.a),n-c),v=sr(i,r),hl(v,1/(b-c)),this.a=v,this.b=new Dt,f=!0,l=t.b.tc(),l.ic();l.hc();)g=lt(Yt(l.ic())),f&&g-n>F_&&(this.b.nc(n),f=!1),this.b.nc(g);f&&this.b.nc(n)}function awe(t){var e,n,i,r;if(fve(t,t.n),t.d.c.length>0){for(yT(t.c);zlt(t,a(H(new j(t.e.a)),113))=r&&(t.c=!1,t.a=!1),t.b[i++]=r,t.b[i]=c,t.c||M_(t)}}function VDt(t){var e,n,i,r;return r=Tf(t),n=new m1(r),i=new hH(r),e=new Dt,Or(e,(!t.d&&(t.d=new pn(Xs,t,8,5)),t.d)),Or(e,(!t.e&&(t.e=new pn(Xs,t,7,4)),t.e)),a(hd(Vh(wo(new gi(null,new Ei(e,16)),n),i),e_(new ti,new Qn,new Kt,new kt,Y(Z(tf,1),jt,150,0,[(z1(),bw),Qh]))),19)}function qDt(t){var e,n,i;if(n=a(z(t,(Ft(),Du)),8),n?yr(t,a(z(n,wc),69)):t.d.c.length-t.f.c.length<0?yr(t,(Ht(),Qe)):yr(t,(Ht(),on)),!t.b)switch(i=t.n,e=t.a,t.i.g){case 1:e.a=i.a/2,e.b=0;break;case 2:e.a=i.a,e.b=i.b/2;break;case 3:e.a=i.a/2,e.b=i.b;break;case 4:e.a=0,e.b=i.b/2}}function uwe(t,e,n){var i,r,c,l,f;for(di(n,"Longest path layering",1),t.a=e,f=t.a.a,t.b=dt(Gn,pi,22,f.c.length,15,1),i=0,l=new j(f);l.a=0?!1:(n=oE((tu(),eo),r,e),n?(i=n.kj(),(i>1||i==-1)&&wm(qo(eo,n))!=3):!0)):!1}function lwe(t,e){var n;switch(n=a(z(t,(qt(),K4)),241),di(e,"Label side selection ("+n+")",1),n.g){case 0:E9t(t,(Cu(),kd));break;case 1:E9t(t,(Cu(),ag));break;case 2:FNt(t,(Cu(),kd));break;case 3:FNt(t,(Cu(),ag));break;case 4:eNt(t,(Cu(),kd));break;case 5:eNt(t,(Cu(),ag))}Vn(e)}function uht(t,e,n){var i,r,c,l,f,g;if(i=JQt(n,t.length),l=t[i],l[0].j==(Ke(),rs))for(c=d3t(n,l.length),g=e.i,r=0;r0&&(n[0]+=t.d,l-=n[0]),n[2]>0&&(n[2]+=t.d,l-=n[2]),c=y.Math.max(0,l),n[1]=y.Math.max(n[1],l),Ict(t,ta,r.c+i.b+n[0]-(n[1]-l)/2,n),e==ta&&(t.c.b=c,t.c.c=r.c+i.b+(c-l)/2)}function mwe(t,e){var n,i,r,c,l,f,g;for(n=Ps,f=(Ke(),gs),r=new j(e.a);r.a0?l=n:g.c&&(l=b$(g.c)),l>0&&(i&&(Fg(),g.a.B&&(!lt(de(g.a.e.xe((dr(),iI))))||g.b.ff()))?g.d.a=t.s+l:(v=g.b.Re().b,l>v&&(f=(l-v)/2,g.d.d=f,g.d.a=f)))}}function vwe(t,e){var n,i,r,c,l;return r=e.Yg(t.a),r&&(i=(!r.b&&(r.b=new Mu((ye(),Ho),Dc,r)),r.b),n=hi(Lh(i,Ns)),n!=null&&(c=n.lastIndexOf("#"),l=c==-1?hst(t,e.Pi(),n):c==0?kL(t,null,n.substr(1,n.length-1)):kL(t,n.substr(0,c),n.substr(c+1,n.length-(c+1))),ct(l,140)))?a(l,140):null}function _we(t,e){var n,i,r,c,l;return i=e.Yg(t.a),i&&(n=(!i.b&&(i.b=new Mu((ye(),Ho),Dc,i)),i.b),c=hi(Lh(n,hK)),c!=null&&(r=c.lastIndexOf("#"),l=r==-1?hst(t,e.Pi(),c):r==0?kL(t,null,c.substr(1,c.length-1)):kL(t,c.substr(0,r),c.substr(r+1,c.length-(r+1))),ct(l,140)))?a(l,140):null}function tNt(t,e,n,i,r){var c,l,f,g,b,v;if(t.d&&t.d.If(r),c=a(r.cd(0),35),LRt(t,n,c,!1)||(l=a(r.cd(r._b()-1),35),LRt(t,i,l,!0))||wlt(t,r))return!0;for(v=r.tc();v.hc();)for(b=a(v.ic(),35),g=e.tc();g.hc();)if(f=a(g.ic(),35),U7(t,b,f))return!0;return!1}function ywe(t,e,n){var i,r,c,l,f,g,b,v,M,k;k=e.c.length,M=(b=t.rg(n),a(b>=0?t.ug(b,!1,!0):X2(t,n,!1),52));t:for(c=M.tc();c.hc();){for(r=a(c.ic(),51),v=0;vt.d[l.o]&&(n+=Gkt(t.b,c),fC(t.a,Xt(c)));for(;!Rit(t.a);)pLt(t.b,a(C$(t.a),21).a)}return n}function T_(t,e,n){var i,r;if((!t.a&&(t.a=new Wt(os,t,6,6)),t.a).i==0)return w6t(t);if(i=a(at((!t.a&&(t.a=new Wt(os,t,6,6)),t.a),0),270),e&&(Dr((!i.a&&(i.a=new Ss(sf,i,5)),i.a)),MC(i,0),EC(i,0),xC(i,0),yC(i,0)),n)for(r=(!t.a&&(t.a=new Wt(os,t,6,6)),t.a);r.i>1;)cw(r,r.i-1);return i}function Swe(t,e){var n,i,r,c;if(c=DNt(e),r=a(z(c,(Ft(),Qc)),19),M2e(e,r),r.pc((So(),Al)))for(i=new $n((!e.c&&(e.c=new Wt(Rl,e,9,9)),e.c));i.e!=i.i._b();)n=a(ci(i),121),I2e(t,e,c,n);return nwe(e,c),lt(de(z(c,(qt(),ubt))))&&r.nc(DB),zt(cn(e,J4))===zt((Kg(),Rx))?Fxe(t,e,c):P2e(t,e,c),c}function So(){So=P,IB=new jb("COMMENTS",0),Al=new jb("EXTERNAL_PORTS",1),V4=new jb("HYPEREDGES",2),RB=new jb("HYPERNODES",3),K_=new jb("NON_FREE_PORTS",4),J_=new jb("NORTH_SOUTH_PORTS",5),C6=new jb(IBt,6),IE=new jb("CENTER_LABELS",7),RE=new jb("END_LABELS",8),DB=new jb("PARTITIONS",9)}function nNt(t,e,n){var i,r,c,l;for(c=(!e.a&&(e.a=new Wt(zr,e,10,11)),e.a).i,r=new $n((!e.a&&(e.a=new Wt(zr,e,10,11)),e.a));r.e!=r.i._b();)i=a(ci(r),35),(!i.a&&(i.a=new Wt(zr,i,10,11)),i.a).i==0||(c+=nNt(t,i,!1));if(n)for(l=io(e);l;)c+=(!l.a&&(l.a=new Wt(zr,l,10,11)),l.a).i,l=io(l);return c}function cw(t,e){var n,i,r,c;return t.ti()?(i=null,r=t.ui(),t.xi()&&(i=t.zi(t.Dh(e),null)),n=t.mi(4,c=G2(t,e),null,e,r),t.qi()&&c!=null&&(i=t.si(c,i)),i?(i.Sh(n),i.Th()):t.ni(n),c):(c=G2(t,e),t.qi()&&c!=null&&(i=t.si(c,null),i&&i.Th()),c)}function Twe(t){var e,n,i,r,c,l,f,g,b;for(l=is,g=is,f=null,n=new F$(new t2(t.e));n.b!=n.c.a.b;)if(e=Gct(n),(zt(e.d)===zt((bu(),Zp))||zt(e.d)===zt(Lw))&&(i=a(e.e,249).a,b=a(e.e,249).b,r=l-i>dw,c=i-ldw,(r||c)&&(g=a(e.e,249).b,l=a(e.e,249).a,f=a(e.d,129),g==0&&l==0)))return f;return f}function Cwe(t){var e,n,i,r,c,l,f,g,b,v;for(c=t.a,e=new $r,b=0,i=new j(t.d);i.ag.d&&(v=g.d+g.a+c));n.c.d=v,e.a.Zb(n,e),b=y.Math.max(b,n.c.d+n.c.a)}return b}function Awe(t,e,n,i,r){return i<0?(i=y_(t,r,Y(Z(At,1),wt,2,6,[yZ,xZ,MZ,EZ,ex,SZ,TZ,CZ,AZ,kZ,LZ,PZ]),e),i<0&&(i=y_(t,r,Y(Z(At,1),wt,2,6,["Jan","Feb","Mar","Apr",ex,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),e)),i<0?!1:(n.k=i,!0)):i>0?(n.k=i-1,!0):!1}function kwe(t,e,n,i,r){return i<0?(i=y_(t,r,Y(Z(At,1),wt,2,6,[yZ,xZ,MZ,EZ,ex,SZ,TZ,CZ,AZ,kZ,LZ,PZ]),e),i<0&&(i=y_(t,r,Y(Z(At,1),wt,2,6,["Jan","Feb","Mar","Apr",ex,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),e)),i<0?!1:(n.k=i,!0)):i>0?(n.k=i-1,!0):!1}function Lwe(t,e,n){var i,r,c;if(t.e=n,t.d=0,t.b=0,t.f=1,t.i=e,(t.e&16)==16&&(t.i=eve(t.i)),t.j=t.i.length,Ci(t),c=Lm(t),t.d!=t.j)throw K(new ri(ai((Kn(),ZFt))));if(t.g){for(i=0;ieFt?gc(g,t.b):i<=eFt&&i>nFt?gc(g,t.d):i<=nFt&&i>iFt?gc(g,t.c):i<=iFt&&gc(g,t.a),c=rNt(t,g,c);return r}function sNt(t){g2(t,new __(d2(l2(f2(h2(new Z0,CO),"Randomizer"),'Distributes the nodes randomly on the plane, leading to very obfuscating layouts. Can be useful to demonstrate the power of "real" layout algorithms.'),new wz))),pe(t,CO,sx,Pvt),pe(t,CO,dE,15),pe(t,CO,lO,Xt(0)),pe(t,CO,hE,fE)}function Iwe(t,e){var n,i,r,c,l,f,g,b,v,M;for(g=e.a.length,f=Tr(y.Math.ceil(g/t.a)),M=e.a,l=0,b=f,c=0;cl?0:l)l?0:l:g,(0>(bl?0:l)l?0:l:g)),l=b,b+=f,i=a(Ee(t.c,c),8),n=new FW(v),n.n.b=e.n.b,cr(t.b,e,n),Ut(i.b,n);Lc(t.g.b,e),Ut(t.i,(r=new TMt(t,e),r))}function oNt(t,e,n){var i,r,c,l,f,g,b,v,M;for(e.o=1,c=e.c,M=ew(e,(Fo(),ba)).tc();M.hc();)for(v=a(M.ic(),11),r=new j(v.f);r.a=t.length||(f=t.charCodeAt(e[0]),f!=43&&f!=45)||(++e[0],i=E7(t,e),i<0))return!1;f==45&&(i=-i)}return f==32&&e[0]-n==2&&r.b==2&&(g=new F9,b=g.q.getFullYear()-Fm+Fm-80,l=b%100,c.a=i==l,i+=(b/100|0)*100+(i0){if(t.Fi(),e!=null){for(c=0;c=48;n--)PA[n]=n-48<<24>>24;for(i=70;i>=65;i--)PA[i]=i-65+10<<24>>24;for(r=102;r>=97;r--)PA[r]=r-97+10<<24>>24;for(c=0;c<10;c++)eU[c]=48+c&qr;for(t=10;t<=15;t++)eU[t]=65+t-10&qr}function hNt(t){var e,n,i,r;n=lt(Yt(z(t.a,(Ph(),Pjt)))),i=t.a.c.d,r=t.a.d.d,e=t.d,i.a>=r.a?i.b>=r.b?(e.a=r.a+(i.a-r.a)/2+n,e.b=r.b+(i.b-r.b)/2-n):(e.a=r.a+(i.a-r.a)/2+n,e.b=i.b+(r.b-i.b)/2+n):i.b>=r.b?(e.a=i.a+(r.a-i.a)/2+n,e.b=r.b+(i.b-r.b)/2+n):(e.a=i.a+(r.a-i.a)/2+n,e.b=i.b+(r.b-i.b)/2-n)}function Fwe(t,e,n,i){var r,c,l,f,g;return f=zc(a(at((!e.b&&(e.b=new pn(Si,e,4,7)),e.b),0),97)),g=zc(a(at((!e.c&&(e.c=new pn(Si,e,5,8)),e.c),0),97)),io(f)==io(g)||vC(g,f)?null:(l=nN(e),l==n?i:(c=a(zi(t.a,l),8),c&&(r=a(z(c,(Ft(),xd)),31),r)?r:null))}function Uwe(t,e,n,i){var r,c,l,f,g;for(c=t.i.c.length,g=dt(Q3e,Wft,267,c,0,1),l=0;lk+g&&i.jc();for(l=new j(R);l.a>19)return"-"+dNt(zM(t));for(n=t,i="";!(n.l==0&&n.m==0&&n.h==0);){if(r=fV(iO),n=Ght(n,r,!0),e=""+M3t(Q1),!(n.l==0&&n.m==0&&n.h==0))for(c=9-e.length;c>0;c--)e="0"+e;i=e+i}return i}function ku(t,e,n){var i,r,c,l,f;if(t==null)throw K(new yf(eu));for(c=t.length,l=c>0&&(t.charCodeAt(0)==45||t.charCodeAt(0)==43)?1:0,i=l;in)throw K(new yf(Um+t+'"'));return f}function jwe(){if(!Object.create||!Object.getOwnPropertyNames)return!1;var t="__proto__",e=Object.create(null);if(e[t]!==void 0)return!1;var n=Object.getOwnPropertyNames(e);return!(n.length!=0||(e[t]=42,e[t]!==42)||Object.getOwnPropertyNames(e).length==0)}function Hwe(t,e){var n,i,r,c;for(di(e,"Resize child graph to fit parent.",1),i=new j(t.b);i.a>24;case 97:case 98:case 99:case 100:case 101:case 102:return t-97+10<<24>>24;case 65:case 66:case 67:case 68:case 69:case 70:return t-65+10<<24>>24;default:throw K(new yf("Invalid hexadecimal"))}}function Xwe(t,e){var n,i,r,c,l,f,g,b,v;if(b=a(zi(t.c,e),191),!b)throw K(new xf("Edge did not exist in input."));return l=BC(b),v=new Rg,n=new KTt(t,l,v),Lte((!e.a&&(e.a=new Wt(os,e,6,6)),e.a),n),P1(b,Npt,v),f=a(cn(e,(dr(),Lx)),74),r=!f||D4t(f),c=!r,c&&(g=new Rg,i=new iG(g),vo(f,i),P1(b,"junctionPoints",g)),null}function Zwe(t,e,n){var i,r,c,l;di(n,"Orthogonally routing hierarchical port edges",1),t.a=0,i=lye(e),l2e(e,i),Nye(t,e,i),wxe(e),r=a(z(e,(qt(),Qi)),83),c=e.b,K7t((mi(0,c.c.length),a(c.c[0],26)),r,e),K7t(a(Ee(c,c.c.length-1),26),r,e),l=e.b,r7t((mi(0,l.c.length),a(l.c[0],26))),r7t(a(Ee(l,l.c.length-1),26)),Vn(n)}function Ywe(t){var e,n,i;switch(e=a(z(t.d,(qt(),ig)),197),e.g){case 2:n=qxe(t);break;case 3:n=(i=new Dt,qc(wo(Vh(Yh(Yh(new gi(null,new Ei(t.d.b,16)),new jy),new Hy),new C3),new Uy),new rm(i)),i);break;default:throw K(new yc("Compaction not supported for "+e+" edges."))}Tye(t,n),vo(new Sv(t.g),new SH(t))}function Kwe(t,e,n,i){var r,c,l,f,g;for(r=!1,c=!1,f=new j(i.i);f.a1&&(n?l=ql(e.c)+1:l=ql(b.c)-1,f=a(Ee(t.a.b,l),26),Ks(b,f)),pht(t,b,n));return e}function pNt(t,e,n,i,r,c){if(this.b=n,this.d=r,t>=e.length)throw K(new Uc("Greedy SwitchDecider: Free layer not in graph."));this.c=e[t],this.e=new Y5(i),GV(this.e,this.c,(Ht(),on)),this.i=new Y5(i),GV(this.i,this.c,Qe),this.f=new kCt(this.c),this.a=!c&&r.i&&!r.s&&this.c[0].j==(Ke(),rs),this.a&&e0e(this,t,e.length)}function Jwe(t,e,n){var i,r,c,l;for(di(n,"Processor order nodes",2),t.a=lt(Yt(z(e,(sw(),iwt)))),r=new Fr,l=qn(e.b,0);l.b!=l.d.c;)c=a(Yn(l),76),lt(de(z(c,(mc(),Rw))))&&Ws(r,c,r.c.b,r.c);i=(Hn(r.b!=0),a(r.a.a.c,76)),m7t(t,i),!n.b&&jV(n,1),wht(t,i,0-lt(Yt(z(i,(mc(),pF))))/2,0),!n.b&&jV(n,1),Vn(n)}function gNt(){this.b=(ts(),new xm),this.d=new xm,this.e=new xm,this.c=new xm,this.a=new vi,this.f=new vi,C2(ss,new tz,new ez),C2(kwt,new az,new uz),C2(Ggt,new lz,new hz),C2(Wgt,new yv,new fz),C2(P3e,new dz,new bz),C2(D3e,new Y0,new nz),C2(I3e,new iz,new rz),C2(R3e,new sz,new oz),C2(B3e,new K0,new cz)}function mNt(t,e,n,i){var r,c,l,f,g,b;for(g=aX(t,n),b=aX(e,n),r=!1;g&&b&&(i||upe(g,b,n));)l=aX(g,n),f=aX(b,n),NL(e),NL(t),c=g.c,cZ(g,!1),cZ(b,!1),n?(W1(e,b.o,c),e.o=b.o,W1(t,g.o+1,c),t.o=g.o):(W1(t,g.o,c),t.o=g.o,W1(e,b.o+1,c),e.o=b.o),Ks(g,null),Ks(b,null),g=l,b=f,r=!0;return r}function OX(t,e,n,i,r,c,l,f){var g,b,v;for(g=0,e!=null&&(g^=j1(e.toLowerCase())),n!=null&&(g^=j1(n)),i!=null&&(g^=j1(i)),l!=null&&(g^=j1(l)),f!=null&&(g^=j1(f)),b=0,v=c.length;bg?new AN(e,t,f-g):f>0&&g>0&&(new AN(t,e,0),new AN(e,t,0)))}function bNt(t){g2(t,new __(d2(l2(f2(h2(new Z0,i6),AFt),"Keeps the current layout as it is, without any automatic modification. Optional coordinates can be given for nodes and edge bend points."),new SR))),pe(t,i6,sx,Evt),pe(t,i6,MO,Xe(vA)),pe(t,i6,Mpt,Xe(yvt)),pe(t,i6,yO,Xe(xvt)),pe(t,i6,xO,Xe(Mvt))}function wNt(t){var e,n,i;i=a(z(t,(qt(),Oh)),19),!i.Wb()&&(n=(e=a(xu(to),10),new Ha(e,a(au(e,e.length),10),0)),i.pc((r0(),Nu))?Tu(n,Nu):Tu(n,Il),i.pc(Ll)||Tu(n,Ll),i.pc(kl)?Tu(n,Bh):i.pc(Uf)?Tu(n,hh):i.pc(Pl)&&Tu(n,lh),i.pc(Bh)?Tu(n,kl):i.pc(hh)?Tu(n,Uf):i.pc(lh)&&Tu(n,Pl),Ct(t,Oh,n))}function ght(t,e){var n,i,r,c;if(0<(ct(t,13)?a(t,13)._b():pC(t.tc()))){if(r=e,1=t.o)throw K(new w9);f=e>>5,l=e&31,c=Yd(1,or(Yd(l,1))),r?t.n[n][f]=Xh(t.n[n][f],c):t.n[n][f]=ns(t.n[n][f],mst(c)),c=Yd(c,1),i?t.n[n][f]=Xh(t.n[n][f],c):t.n[n][f]=ns(t.n[n][f],mst(c))}catch(g){throw g=vr(g),ct(g,305)?K(new Uc(KZ+t.o+"*"+t.p+JZ+e+Rc+n+QZ)):K(g)}}function BX(t,e){var n,i,r,c,l,f,g;for(r=new Dt,g=new Dt,n=a(js(Y_,t),15).tc();n.hc();)i=a(n.ic(),151),eRt(r,i.b),eRt(r,UIt(i)),n.hc()&&(i=a(n.ic(),151),Or(g,UIt(i)),Or(g,i.b));for(NV(r,t.b),NV(g,t.a),f=new j(r);f.at.d[f.o]&&(n+=Gkt(t.b,c),fC(t.a,Xt(c)))):++l;for(n+=t.b.d*l;!Rit(t.a);)pLt(t.b,a(C$(t.a),21).a)}return n}function cve(t){var e,n,i,r,c,l;if(r=t.g.ed(),i=t.b.ed(),t.e)for(n=0;nF_;){for(c=e,l=0;y.Math.abs(e-c)0&&(i=(!t.n&&(t.n=new Wt(ic,t,1,7)),a(a(at(t.n,0),137),263)).a,!i||Ii(Ii((e.a+=' "',e),i),'"'))),Ii(um(Ii(um(Ii(um(Ii(um((e.a+=" (",e),t.i),","),t.j)," | "),t.g),","),t.f),")"),e.a)}function MNt(t){var e,n,i;return t.Db&64?dX(t):(e=new ll(Lpt),n=t.k,n?Ii(Ii((e.a+=' "',e),n),'"'):(!t.n&&(t.n=new Wt(ic,t,1,7)),t.n.i>0&&(i=(!t.n&&(t.n=new Wt(ic,t,1,7)),a(a(at(t.n,0),137),263)).a,!i||Ii(Ii((e.a+=' "',e),i),'"'))),Ii(um(Ii(um(Ii(um(Ii(um((e.a+=" (",e),t.i),","),t.j)," | "),t.g),","),t.f),")"),e.a)}function ENt(t){var e,n,i,r,c,l;return c=0,e=wl(t),e.Qi()&&(c|=4),t.Bb&La&&(c|=2),ct(t,62)?(n=a(t,17),r=jo(n),n.Bb&ca&&(c|=32),r&&(ei(Zb(r)),c|=8,l=r.t,(l>1||l==-1)&&(c|=16),r.Bb&ca&&(c|=64)),n.Bb&ao&&(c|=mw),c|=oh):ct(e,425)?c|=512:(i=e.Qi(),i&&i.i&1&&(c|=256)),t.Bb&512&&(c|=128),c}function yht(t,e){var n,i,r,c,l,f,g;if(e==null||e.length==0)return null;if(r=a(Zc(t.a,e),180),!r){for(i=(f=new vf(t.b).a.Tb().tc(),new nm(f));i.a.hc();)if(n=(c=a(i.a.ic(),38),a(c.lc(),180)),l=n.c,g=e.length,le(l.substr(l.length-g,g),e)&&(e.length==l.length||bo(l,l.length-e.length-1)==46)){if(r)return null;r=n}r&&tc(t.a,e,r)}return r}function uve(t,e){var n;return t.f==dtt?(n=wm(qo((tu(),eo),e)),t.e?n==4&&e!=(Z2(),jx)&&e!=(Z2(),zx)&&e!=(Z2(),ptt)&&e!=(Z2(),gtt):n==2):t.d&&(t.d.pc(e)||t.d.pc(uC(qo((tu(),eo),e)))||t.d.pc(oE((tu(),eo),t.b,e)))?!0:t.f&&iht((tu(),t.f),mL(qo(eo,e)))?(n=wm(qo(eo,e)),t.e?n==4:n==2):!1}function lve(t,e,n,i){var r,c,l,f,g,b,v,M;return l=a(cn(n,(dr(),Px)),9),g=l.a,v=l.b+t,r=y.Math.atan2(v,g),r<0&&(r+=ux),r+=e,r>ux&&(r-=ux),f=a(cn(i,Px),9),b=f.a,M=f.b+t,c=y.Math.atan2(M,b),c<0&&(c+=ux),c+=e,c>ux&&(c-=ux),Ef(),I1(1e-10),y.Math.abs(r-c)<=1e-10||r==c||isNaN(r)&&isNaN(c)?0:rc?1:eD(isNaN(r),isNaN(c))}function hve(t,e,n,i){var r,c;for(Vpe(t,e,n,i),Rnt(e,t.j-e.j+n),Int(e,t.k-e.k+i),c=new j(e.f);c.an.k&&fb&&i>b)b=lt(n.p[f.o])+lt(n.d[f.o])+f.n.b+f.d.a;else{r=!1,t.a&&rd();break}if(!r)break}return t.a&&rd(),r}function Mve(t,e){var n,i,r,c,l;for(t.c==null||t.c.lengthc*2?(v=new DN(M),b=$u(l)/Sh(l),g=uZ(v,e,new a2,n,i,r,b),sr(Gh(v.e),g),M.c=dt(un,te,1,0,5,1),M.c[M.c.length]=v,M.c[M.c.length]=l,c=$u(v)*Sh(v)+$u(l)*Sh(l)):(M.c[M.c.length]=l,c+=$u(l)*Sh(l));return M}function rE(t){switch(t){case 100:return P_(N4,!0);case 68:return P_(N4,!1);case 119:return P_(mK,!0);case 87:return P_(mK,!1);case 115:return P_(bK,!0);case 83:return P_(bK,!1);case 99:return P_(wK,!0);case 67:return P_(wK,!1);case 105:return P_(vK,!0);case 73:return P_(vK,!1);default:throw K(new sc(pzt+t.toString(16)))}}function RNt(t,e,n){var i,r,c,l,f,g,b,v;if(e.o==0){for(e.o=1,l=n,n||(r=new Dt,c=(i=a(xu(Ia),10),new Ha(i,a(au(i,i.length),10),0)),l=new zs(r,c)),a(l.a,15).nc(e),e.j==(Ke(),rs)&&a(l.b,19).nc(a(z(e,(Ft(),wc)),69)),g=new j(e.i);g.af&&(f=r,v.c=dt(un,te,1,0,5,1)),r==f&&Ut(v,new zs(n.c.g,n)));we(),gc(v,t.c),pm(t.b,g.o,v)}}function Dve(t,e){var n,i,r,c,l,f,g,b,v;for(l=new j(e.b);l.af&&(f=r,v.c=dt(un,te,1,0,5,1)),r==f&&Ut(v,new zs(n.d.g,n)));we(),gc(v,t.c),pm(t.f,g.o,v)}}function Nve(t,e,n,i){var r,c,l,f,g,b,v,M,k;for(g=new We(n,i),ja(g,a(z(e,(R1(),j4)),9)),k=new j(e.e);k.a=40,l&&p_e(t),rye(t),awe(t),n=lIt(t),i=0;n&&i0&&Xi(t.e,c)):(t.c[l]-=b+1,t.c[l]<=0&&t.a[l]>0&&Xi(t.d,c))))}function NNt(t){var e,n,i,r,c,l,f,g,b,v,M;for(f=new Dt,c=lt(Yt(t.g.cd(t.g._b()-1))),M=t.g.tc();M.hc();)v=Yt(M.ic()),pm(f,0,c-(En(v),v));for(l=LC(KV(t)),b=new Dt,r=new j(f),g=new Dt,e=0;e1)&&e==1&&a(t.a[t.b],8).j==(Ke(),wu)?K2(a(t.a[t.b],8),(Cu(),kd)):i&&(!n||(t.c-t.b&t.a.length-1)>1)&&e==1&&a(t.a[t.c-1&t.a.length-1],8).j==(Ke(),wu)?K2(a(t.a[t.c-1&t.a.length-1],8),(Cu(),ag)):(t.c-t.b&t.a.length-1)==2?(K2(a(AC(t),8),(Cu(),kd)),K2(a(AC(t),8),ag)):hbe(t,r),xct(t)}function Fve(t){var e,n;if(!t.Wb()){for(n=a(t.cd(0),151).f,new Lht(t),e=new Gs(n.i,0),v_((bu(),hp),e),m_(sy,e),aP((Ht(),Tn),e),BX(rg,e),m_(nb,e),E_(kw,e),v_(Zp,e),aP(Qe,e),BX(tb,e),v_(Lw,e),E_(eb,e),v_(nb,e),aP(fi,e),BX(Yp,e),v_(sy,e),E_(Iw,e),m_(Lw,e);e.b=0&&(f=vpe(t,l),!(f&&(b<22?g.l|=1<>>1,l.m=v>>>1|(M&1)<<21,l.l=k>>>1|(v&1)<<21,--b;return n&&rq(g),c&&(i?(Q1=zM(t),r&&(Q1=s6t(Q1,(NM(),x1t)))):Q1=ia(t.l,t.m,t.h)),g}function HNt(t,e,n,i){var r,c,l,f,g,b,v,M;if(Bue(t,e,n),c=e[n],M=i?(Ht(),on):(Ht(),Qe),Tee(e.length,n,i)){for(r=e[i?n-1:n+1],Oct(t,r,i?(Fo(),ba):(Fo(),Wa)),g=0,v=c.length;g0){for(r=f.length;r>0&&f[r-1]=="";)--r;r=0&&f!=n&&(c=new fs(t,1,f,l,null),i?i.Sh(c):i=c),n>=0&&(c=new fs(t,1,n,f==n?l:null,e),i?i.Sh(c):i=c)),i}function Yve(t,e,n,i){var r,c,l,f,g,b,v;if(ime(t,e,n,i))return!0;for(l=new j(e.f);l.a=r){for(l=1;l0){if(r=a(t.Ab.g,1627),e==null){for(c=0;c1)for(i=new j(r);i.ae.f?1:0:(i=t.e-e.e,n=(t.d>0?t.d:y.Math.floor((t.a-1)*HOt)+1)-(e.d>0?e.d:y.Math.floor((e.a-1)*HOt)+1),n>i+1?r:n0&&(l=t_(l,n7t(i))),HIt(c,l))):rg+N&&($=M.i+k.i,k.a=(k.i*k.a+M.i*M.a)/$,k.i=$,M.g=k,n=!0)),c=f,M=k;return n}function qNt(t,e){var n,i,r,c,l,f,g,b,v;if(r=t.g,l=r.n.a,c=r.n.b,l<=0&&c<=0)return Ht(),Wc;switch(b=t.k.a,v=t.k.b,f=t.n.a,n=t.n.b,e.g){case 2:case 1:if(b<0)return Ht(),on;if(b+f>l)return Ht(),Qe;break;case 4:case 3:if(v<0)return Ht(),Tn;if(v+n>c)return Ht(),fi}return g=(b+f/2)/l,i=(v+n/2)/c,g+i<=1&&g-i<=0?(Ht(),on):g+i>=1&&g-i>=0?(Ht(),Qe):i<.5?(Ht(),Tn):(Ht(),fi)}function Cht(t,e,n){var i,r,c,l;if(e[0]>=t.length)return n.o=0,!0;switch(t.charCodeAt(e[0])){case 43:r=1;break;case 45:r=-1;break;default:return n.o=0,!0}if(++e[0],c=e[0],l=E7(t,e),l==0&&e[0]==c)return!1;if(e[0]=14&&n<=16));case 11:return e!=null&&typeof e===hZ;case 12:return e!=null&&(typeof e===BP||typeof e==hZ);case 0:return Gq(e,t.__elementTypeId$);case 2:return S$(e)&&e.sl!==B;case 1:return S$(e)&&e.sl!==B||Gq(e,t.__elementTypeId$);default:return!0}}function K2(t,e){var n,i,r,c,l,f;if(t.j==(Ke(),wu)&&(n=Fat(wo(a(z(t,(Ft(),HB)),15).xc(),new W8(new kS))).a==null?(Cu(),lI):e,Ct(t,yx,n),n!=(Cu(),ag)))for(i=a(z(t,li),14),f=lt(Yt(z(i,(qt(),up)))),l=0,n==kd?l=t.n.b-y.Math.ceil(f/2):n==lI&&(t.n.b-=lt(Yt(z(Mc(t),B6))),l=(t.n.b-y.Math.ceil(f))/2),c=new j(t.i);c.a0&&(ZL(g,!1,(Js(),ah)),ZL(g,!0,uh)),pd(e.g,new OMt(t,n)),wr(t.g,e,n)}function a_e(t,e){var n,i,r,c,l,f,g;for(c=0,f=0,g=0,r=new j(t.f.e);r.a0&&t.d!=(bC(),XK)&&(f+=l*(i.d.a+t.a[e.b][i.b]*(e.d.a-i.d.a)/n)),n>0&&t.d!=(bC(),VK)&&(g+=l*(i.d.b+t.a[e.b][i.b]*(e.d.b-i.d.b)/n)));switch(t.d.g){case 1:return new We(f/c,e.d.b);case 2:return new We(e.d.a,g/c);default:return new We(f/c,g/c)}}function Lht(t){D6t();var e,n,i,r,c,l,f,g,b,v;for(this.b=new M3,this.c=new Dt,this.a=new Dt,g=iq(),b=0,v=g.length;b0){for(l=0;l>16==-15&&t.Cb.Hg()&&SV(new yV(t.Cb,9,13,n,t.c,Hp(Ka(a(t.Cb,53)),t))):ct(t.Cb,96)&&t.Db>>16==-23&&t.Cb.Hg()&&(e=t.c,ct(e,96)||(e=(ye(),gh)),ct(n,96)||(n=(ye(),gh)),SV(new yV(t.Cb,9,10,n,e,Hp(kc(a(t.Cb,24)),t)))))),t.c}function aw(t){Ai();var e,n,i,r,c;if(t.e!=4&&t.e!=5)throw K(new yn("Token#complementRanges(): must be RANGE: "+t.e));for(M_(t),l4(t),i=t.b.length+2,t.b[0]==0&&(i-=2),n=t.b[t.b.length-1],n==EE&&(i-=2),r=(++Ar,new Su(4)),r.b=dt(Gn,pi,22,i,15,1),c=0,t.b[0]>0&&(r.b[c++]=0,r.b[c++]=t.b[0]-1),e=1;e=65;n--)af[n]=n-65<<24>>24;for(i=122;i>=97;i--)af[i]=i-97+26<<24>>24;for(r=57;r>=48;r--)af[r]=r-48+52<<24>>24;for(af[43]=62,af[47]=63,c=0;c<=25;c++)t1[c]=65+c&qr;for(l=26,g=0;l<=51;++l,g++)t1[l]=97+g&qr;for(t=52,f=0;t<=61;++t,f++)t1[t]=48+f&qr;t1[62]=43,t1[63]=47}function d_e(t,e){var n,i,r,c,l,f,g,b,v,M;if(l=t.d,v=a(z(t,(Ft(),Mx)),15),M=0,v){for(g=0,c=v.tc();c.hc();)r=a(c.ic(),8),g=y.Math.max(g,r.n.b),M+=r.n.a;M+=e/2*(v._b()-1),l.d+=g+e}if(n=a(z(t,wx),15),i=0,n){for(g=0,c=n.tc();c.hc();)r=a(c.ic(),8),g=y.Math.max(g,r.n.b),i+=r.n.a;i+=e/2*(n._b()-1),l.a+=g+e}f=y.Math.max(M,i),f>t.n.a&&(b=(f-t.n.a)/2,l.b=y.Math.max(l.b,b),l.c=y.Math.max(l.c,b))}function p_e(t){var e,n,i,r,c,l,f;for(t.o=new OG,i=new Fr,l=new j(t.e.a);l.a0,f=t7(e,c),est(n?f.b:f.g,e),d_(f).c.length==1&&Ws(i,f,i.c.b,i.c),r=new zs(c,e),HEt(t.o,r),Lc(t.e.a,c))}function JNt(t,e){var n,i,r,c,l;for(e.d?r=t.a.c==(Sf(),Qm)?Rs(e.b):br(e.b):r=t.a.c==(Sf(),Xp)?Rs(e.b):br(e.b),c=!1,i=(Ao(),new $d(id(Zd(r.a,new X))));Jn(i);)if(n=a(In(i),14),l=lt(t.a.f[t.a.g[e.b.o].o]),!(!l&&!ec(n)&&n.c.g.c==n.d.g.c)&&!(lt(t.a.n[t.a.g[e.b.o].o])||lt(t.a.n[t.a.g[e.b.o].o]))&&(c=!0,AT(t.b,t.a.g[qde(n,e.b).o])))return e.c=!0,e.a=n,e;return e.c=c,e.a=null,e}function Dht(t,e){var n,i,r,c,l,f,g;if(!Tf(t))throw K(new yc(kFt));if(i=Tf(t),c=i.g,r=i.f,c<=0&&r<=0)return Ht(),Wc;switch(f=t.i,g=t.j,e.g){case 2:case 1:if(f<0)return Ht(),on;if(f+t.g>c)return Ht(),Qe;break;case 4:case 3:if(g<0)return Ht(),Tn;if(g+t.f>r)return Ht(),fi}return l=(f+t.g/2)/c,n=(g+t.f/2)/r,l+n<=1&&l-n<=0?(Ht(),on):l+n>=1&&l-n>=0?(Ht(),Qe):n<.5?(Ht(),Tn):(Ht(),fi)}function g_e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R;if(t.Wb())return new go;for(b=0,M=0,r=t.tc();r.hc();)i=a(r.ic(),31),c=i.e,b=y.Math.max(b,c.a),M+=c.a*c.b;for(b=y.Math.max(b,y.Math.sqrt(M)*lt(Yt(z(a(t.tc().ic(),31),(qt(),GB))))),k=0,R=0,g=0,n=e,f=t.tc();f.hc();)l=a(f.ic(),31),v=l.e,k+v.a>b&&(k=0,R+=g+e,g=0),AP(l,k,R),n=y.Math.max(n,k+v.a),g=y.Math.max(g,v.b),k+=v.a+e;return new We(n+e,R+g+e)}function WX(t,e,n){var i,r,c,l,f,g,b,v;if(i=n._b(),i==0)return!1;if(t.ti())if(b=t.ui(),M8t(t,e,n),l=i==1?t.mi(3,null,n.tc().ic(),e,b):t.mi(5,null,n,e,b),t.qi()){for(f=i<100?null:new w1(i),c=e+i,r=e;r1)for(i=qn(r,0);i.b!=i.d.c;)for(n=a(Yn(i),202),c=0,g=new j(n.e);g.af?1:-1:zat(t.a,e.a,c),r==-1)M=-g,v=l==g?hV(e.a,f,t.a,c):pV(e.a,f,t.a,c);else if(M=l,l==g){if(r==0)return V1(),AE;v=hV(t.a,c,e.a,f)}else v=pV(t.a,c,e.a,f);return b=new qv(M,v.length,v),lC(b),b}function n7t(t){tE();var e,n,i,r;if(e=Tr(t),t1e6)throw K(new x9("power of ten too big"));if(t<=qi)return I2(vP(px[1],e),e);for(i=vP(px[1],qi),r=i,n=Ja(t-qi),e=Tr(t%qi);Pc(n,qi)>0;)r=t_(r,i),n=Yg(n,qi);for(r=t_(r,vP(px[1],e)),r=I2(r,qi),n=Ja(t-qi);Pc(n,qi)>0;)r=I2(r,qi),n=Yg(n,qi);return r=I2(r,e),r}function v_e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,N,$,G;n=hm(new Ng,t.f),b=t.i[e.c.g.o],R=t.i[e.d.g.o],g=e.c,k=e.d,f=g.a.b,M=k.a.b,b.b||(f+=g.k.b),R.b||(M+=k.k.b),v=Tr(y.Math.max(0,f-M)),l=Tr(y.Math.max(0,M-f)),N=($=Mh(1,a(z(e,(qt(),Tx)),21).a),G=vct(e.c.g.j,e.d.g.j),$*G),r=ih($l(Wl(Gl(Vl(new cl,N),l),n),a(zi(t.k,e.c),113))),c=ih($l(Wl(Gl(Vl(new cl,N),v),n),a(zi(t.k,e.d),113))),i=new FMt(r,c),t.c[e.o]=i}function VX(t){var e,n,i,r,c,l,f,g,b,v,M,k,R;if(n=t.i,e=t.n,t.b==0)for(R=n.c+e.b,k=n.b-e.b-e.c,l=t.a,g=0,v=l.length;g0&&(M-=i[0]+t.c,i[0]+=t.c),i[2]>0&&(M-=i[2]+t.c),i[1]=y.Math.max(i[1],M),HD(t.a[1],n.c+e.b+i[0]-(i[1]-M)/2,i[1]);for(c=t.a,f=0,b=c.length;f0&&(e[0]+=t.c,M-=e[0]),e[2]>0&&(M-=e[2]+t.c),e[1]=y.Math.max(e[1],M),jD(t.a[1],i.d+n.d+e[0]-(e[1]-M)/2,e[1]);else for(N=i.d+n.d,R=i.a-n.d-n.a,l=t.a,g=0,v=l.length;g>>0).toString(16),n="\\x"+$h(e,e.length-2,e.length)):t>=ao?(e="0"+(t>>>0).toString(16),n="\\v"+$h(e,e.length-6,e.length)):n=""+String.fromCharCode(t&qr)}return n}function Nht(t){var e,n,i,r,c,l;for(Hrt(this),n=t._b()-1;n<3;n++)t.bd(0,a(t.cd(0),9));if(t._b()<4)throw K(new yn("At (least dimension + 1) control points are necessary!"));for(this.c=3,this.e=!0,this.f=!0,this.d=!1,Vme(this,t._b()+this.c-1),l=new Dt,c=this.g.tc(),e=0;e=0&&c!=n))throw K(new yn(s6));for(r=0,g=0;glt(Wh(l.g,l.d[0]).a)?(Hn(g.b>0),g.a.cd(g.c=--g.b),cd(g,l),r=!0):f.e&&f.e._b()>0&&(c=(!f.e&&(f.e=new Dt),f.e).vc(e),b=(!f.e&&(f.e=new Dt),f.e).vc(n),(c||b)&&((!f.e&&(f.e=new Dt),f.e).nc(l),++l.c));r||(i.c[i.c.length]=l)}function E_e(t,e,n){var i,r,c,l,f,g;for(i=0,c=new $n((!t.a&&(t.a=new Wt(zr,t,10,11)),t.a));c.e!=c.i._b();)r=a(ci(c),35),l="",(!r.n&&(r.n=new Wt(ic,r,1,7)),r.n).i==0||(l=a(a(at((!r.n&&(r.n=new Wt(ic,r,1,7)),r.n),0),137),263).a),f=new u4t(l),Uo(f,r),Ct(f,(R1(),gx),r),f.b=i++,f.d.a=r.i+r.g/2,f.d.b=r.j+r.f/2,f.e.a=y.Math.max(r.g,1),f.e.b=y.Math.max(r.f,1),Ut(e.e,f),Au(n.d,r,f),g=a(cn(r,(Ph(),Igt)),83),g==(Ls(),ob)}function S_e(t,e,n,i){var r,c,l,f,g,b,v;if(n.c.g!=e.g)for(r=new Jh(t),jl(r,(Ke(),Hr)),Ct(r,(Ft(),li),n),Ct(r,(qt(),Qi),(Ls(),Gc)),i.c[i.c.length]=r,l=new Eo,ds(l,r),yr(l,(Ht(),on)),f=new Eo,ds(f,r),yr(f,Qe),Ts(n,l),c=new Np,Uo(c,n),Ct(c,Ro,null),Hs(c,f),Ts(c,e),eDt(r,l,f),b=new Gs(n.b,0);b.b0&&(g=f/60|0,b=f%60,r=t.q.getDate(),n=t.q.getHours(),n+g>=24&&++r,c=new y.Date(t.q.getFullYear(),t.q.getMonth(),r,e+g,t.q.getMinutes()+b,t.q.getSeconds(),t.q.getMilliseconds()),t.q.setTime(c.getTime()))),l=t.q.getTime(),t.q.setTime(l+36e5),t.q.getHours()!=e&&t.q.setTime(l)}function T_e(t,e){var n,i,r,c,l,f,g,b,v;for(di(e,"Layer constraint edge reversal",1),l=new j(t.b);l.an){Vn(e);return}switch(a(z(t,(qt(),JJ)),319).g){case 2:c=new Fc;break;case 0:c=new Bd;break;default:c=new mf}if(i=c.sf(t,r),!c.tf())switch(a(z(t,xbt),347).g){case 2:i=Q_e(r,i);break;case 1:i=V1e(r,i)}bye(t,r,i),Vn(e)}function s7t(t,e,n){var i,r,c,l;return t.ti()?(r=null,c=t.ui(),i=t.mi(1,l=AV(t,e,n),n,e,c),t.qi()&&!(t.Bh()&&l!=null?Fi(l,n):zt(l)===zt(n))?(l!=null&&(r=t.si(l,null)),r=t.ri(n,r),t.xi()&&(r=t.Ai(l,n,r)),r?(r.Sh(i),r.Th()):t.ni(i)):(t.xi()&&(r=t.Ai(l,n,null)),r?(r.Sh(i),r.Th()):t.ni(i)),l):(l=AV(t,e,n),t.qi()&&!(t.Bh()&&l!=null?Fi(l,n):zt(l)===zt(n))&&(r=null,l!=null&&(r=t.si(l,null)),r=t.ri(n,r),r&&r.Th()),l)}function ZX(t){var e,n,i,r,c,l,f;if(!t.d){if(f=new DR,e=LA,c=e.a.Zb(t,e),c==null){for(i=new $n(Bo(t));i.e!=i.i._b();)n=a(ci(i),24),Lr(f,ZX(n));e.a.$b(t)!=null,e.a._b()==0}for(l=f.i,r=(!t.q&&(t.q=new Wt(ph,t,11,10)),new $n(t.q));r.e!=r.i._b();++l)a(ci(r),371);Lr(f,(!t.q&&(t.q=new Wt(ph,t,11,10)),t.q)),Qb(f),t.d=new Uv((a(at(Et((T1(),Ae).o),9),17),f.i),f.g),t.e=a(f.g,611),t.e==null&&(t.e=iXt),pl(t).b&=-17}return t.d}function c4(t,e,n,i){var r,c,l,f,g,b;if(b=mu(t.e.mg(),e),g=0,r=a(t.g,124),Jo(),a(e,61).bj()){for(l=0;l1&&(g>$u(f)*Sh(f)/2||l.b==0)&&(M=new DN(k),v=$u(f)/Sh(f),b=uZ(M,e,new a2,n,i,r,v),sr(Gh(M.e),b),f=M,R.c[R.c.length]=M,g=0,k.c=dt(un,te,1,0,5,1)));return Or(R,k),R}function L_e(t,e){var n,i,r,c,l,f,g,b,v;for(di(e,"Hierarchical port dummy size processing",1),g=new Dt,v=new Dt,i=lt(Yt(z(t,(qt(),Cx)))),n=i*2,c=new j(t.b);c.a=G&&t.e[g.o]>N*t.b||pt>=n*G)&&(k.c[k.c.length]=f,f=new Dt,yo(l,c),c.a.Pb(),b-=v,R=y.Math.max(R,b*t.b+$),b+=pt,rt=pt,pt=0,v=0,$=0);return new zs(R,k)}function R_e(t){var e,n,i,r,c,l,f,g,b,v,M,k;for(e=Q9t(t),v=(f=new Sv(e).a.Tb().tc(),new p5(f));v.a.hc();){for(b=(r=a(v.a.ic(),38),a(r.kc(),8)),M=b.d.d,k=b.n.b+b.d.a,t.d[b.o]=0,n=b;(c=t.a[n.o])!=b;)i=Mhe(n,c),t.c==(Sf(),Xp)?g=i.d.k.b+i.d.a.b-i.c.k.b-i.c.a.b:g=i.c.k.b+i.c.a.b-i.d.k.b-i.d.a.b,l=lt(t.d[n.o])+g,t.d[c.o]=l,M=y.Math.max(M,c.d.d-l),k=y.Math.max(k,l+c.n.b+c.d.a),n=c;n=b;do t.d[n.o]=lt(t.d[n.o])+M,n=t.a[n.o];while(n!=b);t.b[b.o]=M+k}}function Oht(t,e,n){var i,r,c,l,f,g,b,v,M,k;for(k6t(this),n==(vm(),sg)?Ir(this.o,t):Ir(this.t,t),v=is,b=Ps,l=e.a.Xb().tc();l.hc();)r=a(l.ic(),48),f=a(r.a,417),i=a(r.b,14),g=i.c,g==t&&(g=i.d),f==sg?Ir(this.o,g):Ir(this.t,g),k=zo(Y(Z(ss,1),wt,9,0,[g.g.k,g.k,g.a])).b,v=y.Math.min(v,k),b=y.Math.max(b,k);for(M=zo(Y(Z(ss,1),wt,9,0,[t.g.k,t.k,t.a])).b,B8t(this,M,v,b),c=e.a.Xb().tc();c.hc();)r=a(c.ic(),48),j9t(this,a(r.b,14));this.k=!1}function D_e(t){var e,n,i,r;if(i=lZ((!t.c&&(t.c=YL(t.f)),t.c),0),t.e==0||t.a==0&&t.f!=-1&&t.e<0)return i;if(e=nat(t)<0?1:0,n=t.e,r=(i.length+1+J3(Tr(t.e)),new Bb),e==1&&(r.a+="-"),t.e>0)if(n-=i.length-e,n>=0){for(r.a+="0.";n>b0.length;n-=b0.length)cCt(r,b0);$St(r,b0,Tr(n)),Ii(r,i.substr(e,i.length-e))}else n=e-n,Ii(r,$h(i,e,Tr(n))),r.a+=".",Ii(r,aL(i,Tr(n)));else{for(Ii(r,i.substr(e,i.length-e));n<-b0.length;n+=b0.length)cCt(r,b0);$St(r,b0,Tr(-n))}return r.a}function Hc(t,e){var n,i,r,c,l,f,g;if(t==null)return null;if(c=t.length,c==0)return"";for(g=dt(nl,Pf,22,c,15,1),Bct(0,c,t.length),Bct(0,c,g.length),XCt(t,0,c,g,0),n=null,f=e,r=0,l=0;r0?$h(n.a,0,c-1):""):t.substr(0,c-1):n?n.a:t}function N_e(t){var e,n,i,r,c,l,f,g,b,v,M,k,R;for(n=(b=new vf(t.c.b).a.Tb().tc(),new nm(b));n.a.hc();)e=(f=a(n.a.ic(),38),a(f.lc(),180)),r=e.a,r==null&&(r=""),i=lne(t.c,r),!i&&r.length==0&&(i=Ehe(t)),i&&!z2(i.c,e,!1)&&Xi(i.c,e);for(l=qn(t.a,0);l.b!=l.d.c;)c=a(Yn(l),436),v=Tct(t.c,c.a),R=Tct(t.c,c.b),v&&R&&Xi(v.c,new zs(R,c.c));for(ld(t.a),k=qn(t.b,0);k.b!=k.d.c;)M=a(Yn(k),436),e=une(t.c,M.a),g=Tct(t.c,M.b),e&&g&&ute(e,g,M.c);ld(t.b)}function O_e(t,e,n){var i,r,c,l,f,g,b,v,M;for(g=n+e.c.c.a,M=new j(e.i);M.a1,f=new Up(v.c);Qo(f.a)||Qo(f.b);)l=a(Qo(f.a)?H(f.a):H(f.b),14),b=l.c==v?l.d:l.c,y.Math.abs(zo(Y(Z(ss,1),wt,9,0,[b.g.k,b.k,b.a])).b-c.b)>1&&Wbe(t,l,c,r,v)}}function u4(t){var e,n,i,r,c,l,f,g;if(!t.f){if(g=new RR,f=new RR,e=LA,l=e.a.Zb(t,e),l==null){for(c=new $n(Bo(t));c.e!=c.i._b();)r=a(ci(c),24),Lr(g,u4(r));e.a.$b(t)!=null,e.a._b()==0}for(i=(!t.s&&(t.s=new Wt(Ra,t,21,17)),new $n(t.s));i.e!=i.i._b();)n=a(ci(i),158),ct(n,62)&&ni(f,a(n,17));Qb(f),t.r=new fCt(t,(a(at(Et((T1(),Ae).o),6),17),f.i),f.g),Lr(g,t.r),Qb(g),t.f=new Uv((a(at(Et(Ae.o),5),17),g.i),g.g),pl(t).b&=-3}return t.f}function B_e(t){var e,n,i,r,c,l,f,g,b,v,M,k,R,N;for(l=t.o,i=dt(Gn,pi,22,l,15,1),r=dt(Gn,pi,22,l,15,1),n=t.p,e=dt(Gn,pi,22,n,15,1),c=dt(Gn,pi,22,n,15,1),b=0;b=0&&!p_(t,v,M);)--M;r[v]=M}for(R=0;R=0&&!p_(t,f,N);)--f;c[N]=f}for(g=0;ge[k]&&ki[g]&&j7(t,g,k,!1,!0)}function $7(){$7=P,Hvt=Y(Z(nl,1),Pf,22,15,[48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70]),Dqt=new RegExp(`[ +\r\f]+`);try{CA=Y(Z(nMe,1),te,1699,0,[new i2((yrt(),s7("yyyy-MM-dd'T'HH:mm:ss'.'SSSZ",oL((Hh(),Hh(),B4))))),new i2(s7("yyyy-MM-dd'T'HH:mm:ss'.'SSS",oL(B4))),new i2(s7("yyyy-MM-dd'T'HH:mm:ss",oL(B4))),new i2(s7("yyyy-MM-dd'T'HH:mm",oL(B4))),new i2(s7("yyyy-MM-dd",oL(B4)))])}catch(t){if(t=vr(t),!ct(t,78))throw K(t)}}function o7t(t,e){var n,i,r,c,l;switch(c=new qa,t.a.g){case 1:case 3:yo(c,e.e.a),Xi(c,e.i.k),yo(c,Cm(e.j.a)),Xi(c,e.a.k),yo(c,e.f.a);break;default:yo(c,e.e.a),yo(c,Cm(e.j.a)),yo(c,e.f.a)}ld(e.f.a),yo(e.f.a,c),Hs(e.f,e.e.c),n=a(z(e.e,(qt(),Ro)),74),r=a(z(e.j,Ro),74),i=a(z(e.f,Ro),74),(n||r||i)&&(l=new qa,Aot(l,i),Aot(l,r),Aot(l,n),Ct(e.f,Ro,l)),Hs(e.j,null),Ts(e.j,null),Hs(e.e,null),Ts(e.e,null),Ks(e.a,null),Ks(e.i,null),e.g&&o7t(t,e.g)}function c7t(t){g2(t,new __(d2(l2(f2(h2(new Z0,c0),"ELK DisCo"),"Layouter for arranging unconnected subgraphs. The subgraphs themselves are, by default, not laid out."),new Bs))),pe(t,c0,nY,Xe(Tgt)),pe(t,c0,iY,Xe(zK)),pe(t,c0,hE,Xe(djt)),pe(t,c0,sx,Xe(Sgt)),pe(t,c0,xft,Xe(bjt)),pe(t,c0,Mft,Xe(mjt)),pe(t,c0,yft,Xe(wjt)),pe(t,c0,Eft,Xe(gjt)),pe(t,c0,Tft,Xe(pjt)),pe(t,c0,Cft,Xe(UK)),pe(t,c0,Aft,Xe(Egt)),pe(t,c0,kft,Xe(cB))}function F_e(t,e,n){var i,r,c,l,f,g,b,v,M;for(l=new n8t,b=Y(Z(Gn,1),pi,22,15,[0]),r=-1,c=0,i=0,g=0;g0){if(r<0&&v.a&&(r=g,c=b[0],i=0),r>=0){if(f=v.b,g==r&&(f-=i++,f==0))return 0;if(!aOt(e,b,v,f,l)){g=r-1,b[0]=c;continue}}else if(r=-1,!aOt(e,b,v,0,l))return 0}else{if(r=-1,v.c.charCodeAt(0)==32){if(M=b[0],BLt(e,b),b[0]>M)continue}else if(Kse(e,v.c,b[0])){b[0]+=v.c.length;continue}return 0}return lxe(l,n)?b[0]:0}function U_e(t,e,n){var i,r,c,l,f;if(i=a(z(t,(qt(),WJ)),19),n.a>e.a&&(i.pc((KM(),SB))?t.c.a+=(n.a-e.a)/2:i.pc(TB)&&(t.c.a+=n.a-e.a)),n.b>e.b&&(i.pc((KM(),AB))?t.c.b+=(n.b-e.b)/2:i.pc(CB)&&(t.c.b+=n.b-e.b)),a(z(t,(Ft(),Qc)),19).pc((So(),Al))&&(n.a>e.a||n.b>e.b))for(f=new j(t.a);f.ae.a&&(i.pc((KM(),SB))?t.c.a+=(n.a-e.a)/2:i.pc(TB)&&(t.c.a+=n.a-e.a)),n.b>e.b&&(i.pc((KM(),AB))?t.c.b+=(n.b-e.b)/2:i.pc(CB)&&(t.c.b+=n.b-e.b)),a(z(t,(Ft(),Qc)),19).pc((So(),Al))&&(n.a>e.a||n.b>e.b))for(l=new j(t.a);l.aR||i+r>b)throw K(new m9);if(!(M.i&1)&&k!=g)if(v=r_(t),c=r_(n),zt(t)===zt(n)&&ei;)Vr(c,f,v[--e]);else for(f=i+r;i0&&Uut(t,e,n,i,r,!0)}function H_e(t,e,n){var i,r,c,l,f,g,b,v,M,k;for(v=new $D(new Av(n)),f=dt(Ol,a0,22,t.f.e.c.length,16,1),Eot(f,f.length),n[e.b]=0,b=new j(t.f.e);b.a=t.b.length?(c[r++]=l.b[i++],c[r++]=l.b[i++]):i>=l.b.length?(c[r++]=t.b[n++],c[r++]=t.b[n++]):l.b[i]=f?pV(t.a,c,e.a,f):pV(e.a,f,t.a,c);else{if(r=c!=f?c>f?1:-1:zat(t.a,e.a,c),r==0)return V1(),AE;r==1?(k=l,M=hV(t.a,c,e.a,f)):(k=g,M=hV(e.a,f,t.a,c))}return b=new qv(k,M.length,M),lC(b),b}function l7t(t,e){var n,i,r,c,l,f;for(l=new qg(new xp(t.f.b).a);l.b;){if(c=Sm(l),r=a(c.kc(),536),e==1){if(r.Je()!=(Js(),cg)&&r.Je()!=fp)continue}else if(r.Je()!=(Js(),ah)&&r.Je()!=uh)continue;switch(i=a(a(c.lc(),48).b,80),f=a(a(c.lc(),48).a,172),n=f.c,r.Je().g){case 2:i.g.c=t.e.a,i.g.b=y.Math.max(1,i.g.b+n);break;case 1:i.g.c=i.g.c+n,i.g.b=y.Math.max(1,i.g.b-n);break;case 4:i.g.d=t.e.b,i.g.a=y.Math.max(1,i.g.a+n);break;case 3:i.g.d=i.g.d+n,i.g.a=y.Math.max(1,i.g.a-n)}}}function h7t(t,e,n,i){var r,c,l,f,g,b,v;if(c=JN(i),f=lt(de(z(i,(qt(),ibt)))),(f||lt(de(z(t,XB))))&&!Gd(a(z(t,Qi),83)))r=rP(c),g=Aht(t,n,n==(Fo(),ba)?r:nP(r));else switch(g=new Eo,ds(g,t),e?(v=g.k,v.a=e.a-t.k.a,v.b=e.b-t.k.b,$8t(v,0,0,t.n.a,t.n.b),yr(g,qNt(g,c))):(r=rP(c),yr(g,n==(Fo(),ba)?r:nP(r))),l=a(z(i,(Ft(),Qc)),19),b=g.i,c.g){case 2:case 1:(b==(Ht(),Tn)||b==fi)&&l.nc((So(),J_));break;case 4:case 3:(b==(Ht(),Qe)||b==on)&&l.nc((So(),J_))}return g}function V_e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,N,$;for(f=dt(Gn,pi,22,e.b.c.length,15,1),b=dt(QK,jt,232,e.b.c.length,0,1),g=dt(Cl,Ih,8,e.b.c.length,0,1),M=t.a,k=0,R=M.length;k0&&g[i]&&(N=Hv(t.b,g[i],r)),$=y.Math.max($,r.c.c.b+N);for(c=new j(v.f);c.a"}g!=null&&(e.a+=""+g)}else t.e?(f=t.e.zb,f!=null&&(e.a+=""+f)):(e.a+="?",t.b?(e.a+=" super ",tZ(t.b,e)):t.f&&(e.a+=" extends ",tZ(t.f,e)))}function q_e(t,e){var n,i,r,c,l,f,g,b;for(t.f=e,t.d=a(z(t.f,(UL(),Ngt)),348),t.g=a(z(t.f,Ugt),21).a,t.e=lt(Yt(z(t.f,Ogt))),t.c=lt(Yt(z(t.f,dB))),k$(t.b),i=new j(t.f.c);i.a=0)return!1;if(n.e&&r==(Ke(),Jc)&&r!=n.e)return!1;if(e.o=n.b,Ut(n.f,e),n.e=r,r==(Ke(),Hr)||r==uc||r==Jc){for(l=new j(e.i);l.a0&&i<=r?(b-=i,c=f,l=f):(t.a==null&&gX(t),t.a[l]&&(b+=r,c=l)),c>0){Ut(M,Xt(c)),f=-1,v=!1;do if(n.hc())g=Xt(a(n.ic(),21).a+b);else break t;while(g.a<=l)}}else if(t.a==null&&gX(t),t.a[l]&&(f=l),l==g.a)if(t.a==null&&gX(t),t.a[l])if(M.c[M.c.length]=g,f=-1,n.hc())g=Xt(a(n.ic(),21).a+b);else break;else v=!0;++l}return M}function p7t(t){var e,n,i,r;return t.Db&64?Sq(t):(e=new ll(Cpt),i=t.k,i?Ii(Ii((e.a+=' "',e),i),'"'):(!t.n&&(t.n=new Wt(ic,t,1,7)),t.n.i>0&&(r=(!t.n&&(t.n=new Wt(ic,t,1,7)),a(a(at(t.n,0),137),263)).a,!r||Ii(Ii((e.a+=' "',e),r),'"'))),n=(!t.b&&(t.b=new pn(Si,t,4,7)),!(t.b.i<=1&&(!t.c&&(t.c=new pn(Si,t,5,8)),t.c.i<=1))),n?e.a+=" [":e.a+=" ",Ii(e,zW(new L5(Rc),new $n(t.b))),n&&(e.a+="]"),e.a+=" -> ",n&&(e.a+="["),Ii(e,zW(new L5(Rc),new $n(t.c))),n&&(e.a+="]"),e.a)}function tye(t){var e,n,i,r,c,l;for(r=new Dt,l=new j(t.c.i);l.at.n.b||(n=ac(t,Qe),f=e.d+e.a+(n._b()-1)*l,f>t.n.b)))}function rZ(t,e,n){var i,r,c,l,f,g,b,v;return i=t.a.o==(Zh(),rf)?is:Ps,f=JNt(t,new GMt(e,n)),!f.a&&f.c?(Xi(t.c,f),i):f.a?(r=f.a.c,g=f.a.d,n?(b=t.a.c==(Sf(),Qm)?g:r,c=t.a.c==Qm?r:g,l=t.a.g[c.g.o],v=lt(t.a.p[l.o])+lt(t.a.d[c.g.o])+c.k.b+c.a.b-lt(t.a.d[b.g.o])-b.k.b-b.a.b):(b=t.a.c==(Sf(),Xp)?g:r,c=t.a.c==Xp?r:g,v=lt(t.a.p[t.a.g[c.g.o].o])+lt(t.a.d[c.g.o])+c.k.b+c.a.b-lt(t.a.d[b.g.o])-b.k.b-b.a.b),t.a.n[t.a.g[r.g.o].o]=(me(),me(),!0),t.a.n[t.a.g[g.g.o].o]=!0,v):i}function sZ(t,e,n,i,r,c,l){var f,g,b,v,M,k,R;return M=lt(de(z(e,(qt(),rbt)))),k=null,c==(Fo(),Wa)&&i.c.g==n?k=i.c:c==ba&&i.d.g==n&&(k=i.d),b=l,!l||!M||k?(v=(Ht(),Wc),k?v=k.i:Gd(a(z(n,Qi),83))&&(v=c==Wa?on:Qe),g=pye(t,e,n,c,v,i),f=dV((Mc(n),i)),c==Wa?(Hs(f,a(Ee(g.i,0),11)),Ts(f,r)):(Hs(f,r),Ts(f,a(Ee(g.i,0),11))),b=new eIt(i,f,g,a(z(g,(Ft(),li)),11),c,!k)):(Ut(l.e,i),R=y.Math.max(lt(Yt(z(l.d,up))),lt(Yt(z(i,up)))),Ct(l.d,up,R)),cr(t.a,i,new SD(b.d,e,c)),b}function m7t(t,e){var n,i,r,c,l,f,g,b,v,M;if(Ct(e,(mc(),FE),0),g=a(z(e,dF),76),e.d.b==0)g?(v=lt(Yt(z(g,Kp)))+t.a+Cct(g,e),Ct(e,Kp,v)):Ct(e,Kp,0);else{for(i=(c=qn(new Hd(e).a.d,0),new Ob(c));P9(i.a);)n=a(Yn(i.a),170).c,m7t(t,n);f=a(_D((l=qn(new Hd(e).a.d,0),new Ob(l))),76),M=a(Dne((r=qn(new Hd(e).a.d,0),new Ob(r))),76),b=(lt(Yt(z(M,Kp)))+lt(Yt(z(f,Kp))))/2,g?(v=lt(Yt(z(g,Kp)))+t.a+Cct(g,e),Ct(e,Kp,v),Ct(e,FE,lt(Yt(z(e,Kp)))-b),o2e(t,e)):Ct(e,Kp,b)}}function iye(t,e){var n,i,r,c,l,f,g,b,v;if(b=a(z(t,(Ft(),wc)),69),i=a(Ee(t.i,0),11),b==(Ht(),Tn)?yr(i,fi):b==fi&&yr(i,Tn),a(z(e,(qt(),Ew)),185).pc((Ju(),E0))){if(g=lt(Yt(z(t,nA))),l=lt(Yt(z(t,Ax))),f=a(z(e,Sx),275),f==(Kh(),cb))for(n=g,v=t.n.a/2-i.k.a,c=new j(i.e);c.a0&&i>=-6?i>=0?vL(c,n-Tr(t.e),"."):(c.a=$h(c.a,0,e-1)+"0."+aL(c.a,e-1),vL(c,e+1,ml(b0,0,-Tr(i)-1))):(n-e>=1&&(vL(c,e,"."),++n),vL(c,n,"E"),i>0&&vL(c,++n,"+"),vL(c,++n,""+ND(Ja(i)))),t.g=c.a,t.g))}function w7t(t,e,n){var i,r,c,l;this.j=t,this.e=Llt(t),this.o=a(z(this.j,(Ft(),tg)),8),this.i=!!this.o,this.p=this.i?a(Ee(n,Mc(this.o).o),204):null,r=a(z(t,Qc),19),this.g=r.pc((So(),Al)),this.b=new Dt,this.d=new NIt(this.e),l=a(z(this.j,NE),214),this.q=_le(e,l,this.e),this.k=new CAt(this),c=Vg(Y(Z(lHt,1),te,208,0,[this,this.d,this.k,this.q])),e==(Tm(),rF)?(i=new u6t(this.e),c.c[c.c.length]=i,this.c=new ukt(i,l,a(this.q,422))):this.c=new BMt(e,this),Ut(c,this.c),g7t(c,this.e),this.s=zxe(this.k)}function sye(t,e){var n,i,r,c;return n=new vn,i=a(hd(Vh(new gi(null,new Ei(t.f,16)),n),e_(new ti,new Qn,new Kt,new kt,Y(Z(tf,1),jt,150,0,[(z1(),bw),Qh]))),19),r=i._b(),r=r==2?1:0,r==1&&zb(iP(a(hd(wo(i.uc(),new he),HPt(Qg(0),new ki)),149).a,2),0)&&(r=0),i=a(hd(Vh(new gi(null,new Ei(e.f,16)),n),e_(new ti,new Qn,new Kt,new kt,Y(Z(tf,1),jt,150,0,[bw,Qh]))),19),c=i._b(),c=c==2?1:0,c==1&&zb(iP(a(hd(wo(i.uc(),new Mn),HPt(Qg(0),new ki)),149).a,2),0)&&(c=0),r=t.b[r+1])r+=2;else if(n0)for(i=new Eh(a(rr(t.a,c),19)),we(),gc(i,new q8(e)),r=new Gs(c.b,0);r.b=ao?mo(n,out(i)):wM(n,i&qr),l=(++Ar,new K$(10,null,0)),tse(t.a,l,f-1)):(n=(l.ll().length+c,new _T),mo(n,l.ll())),e.e==0?(i=e.jl(),i>=ao?mo(n,out(i)):wM(n,i&qr)):mo(n,e.ll()),a(l,474).b=n.a}}function hye(t,e){var n,i,r,c,l,f,g,b,v,M,k,R;if(di(e,"Edge splitting",1),t.b.c.length<=2){Vn(e);return}for(c=new Gs(t.b,0),l=(Hn(c.bIt)?(g=2,l=qi):g==0?(g=1,l=Zt):(g=0,l=Zt)):(R=Zt>=l||l-Zt0?(r=i+(N-1)*n,M&&(r+=i),r0){l7(t,n,0),n.a+=String.fromCharCode(i),r=Ple(e,c),l7(t,n,r),c+=r-1;continue}i==39?c+10){if(e=new Art(t.i,t.g),n=t.i,c=n<100?null:new w1(n),t.xi())for(i=0;i0){for(f=t.g,b=t.i,gC(t),c=b<100?null:new w1(b),i=0;i0)if(e=new Mat(t.Uh()),r=g<100?null:new w1(g),rL(t,g,e.g),i=g==1?t.mi(4,at(e,0),null,0,f):t.mi(6,e,null,-1,f),t.qi()){for(n=new $n(e);n.e!=n.i._b();)r=t.si(ci(n),r);r?(r.Sh(i),r.Th()):t.ni(i)}else r?(r.Sh(i),r.Th()):t.ni(i);else rL(t,t.hi(),t.ii()),t.ni(t.mi(6,(we(),fo),null,-1,f));else if(t.qi())if(g=t.hi(),g>0){for(l=t.ii(),rL(t,g,l),r=g<100?null:new w1(g),n=0;n>13|(t.m&15)<<9,r=t.m>>4&8191,c=t.m>>17|(t.h&255)<<5,l=(t.h&1048320)>>8,f=e.l&8191,g=e.l>>13|(e.m&15)<<9,b=e.m>>4&8191,v=e.m>>17|(e.h&255)<<5,M=(e.h&1048320)>>8,ce=n*f,ae=i*f,Te=r*f,Me=c*f,Bn=l*f,g!=0&&(ae+=n*g,Te+=i*g,Me+=r*g,Bn+=c*g),b!=0&&(Te+=n*b,Me+=i*b,Bn+=r*b),v!=0&&(Me+=n*v,Bn+=i*v),M!=0&&(Bn+=n*M),R=ce&nu,N=(ae&511)<<13,k=R+N,G=ce>>22,nt=ae>>9,rt=(Te&262143)<<4,pt=(Me&31)<<17,$=G+nt+rt+pt,It=Te>>18,Gt=Me>>5,Zt=(Bn&4095)<<8,_t=It+Gt+Zt,$+=k>>22,k&=nu,_t+=$>>22,$&=nu,_t&=sp,ia(k,$,_t)}function y7t(t,e){var n,i,r,c,l;n=lt(Yt(z(e,(qt(),nf)))),n<2&&Ct(e,nf,2),i=a(z(e,ch),110),i==(Js(),Ff)&&Ct(e,ch,JN(e)),r=a(z(e,nWt),21),r.a==0?Ct(e,(Ft(),NE),new kq):Ct(e,(Ft(),NE),new lN(r.a)),c=de(z(e,Q4)),c==null&&Ct(e,Q4,(me(),zt(z(e,ig))===zt((gd(),GE)))),l=new V8t(e),Ct(e,(Ft(),yw),l),hct(t.a),qb(t.a,(Mo(),Of),a(z(e,Hmt),285)),qb(t.a,mx,a(z(e,nbt),285)),qb(t.a,aa,a(z(e,OE),285)),qb(t.a,ua,a(z(e,YB),285)),qb(t.a,Yo,Ale(a(z(e,ig),197))),GEt(t.a,$xe(e)),Ct(e,UJ,jht(t.a,e))}function x7t(t,e){var n,i,r,c,l,f,g,b,v,M;if(g=e.length-1,f=e.charCodeAt(g),f==93){if(l=Mf(e,Ca(91)),l>=0)return r=Yhe(t,e.substr(1,l-1)),v=e.substr(l+1,g-(l+1)),Pxe(t,v,r)}else{if(n=-1,/\d/.test(String.fromCharCode(f))&&(n=Mst(e,Ca(46),g-1),n>=0)){i=a(Pct(t,CLt(t,e.substr(1,n-1)),!1),52);try{b=ku(e.substr(n+1,e.length-(n+1)),Vs,qi)}catch(k){throw k=vr(k),ct(k,118)?(c=k,K(new EN(c))):K(k)}if(b4)if(t.Li(e)){if(t.Dj()){if(r=a(e,42),i=r.ng(),g=i==t.e&&(t.Pj()?r.hg(r.og(),t.Lj())==t.Mj():-1-r.og()==t.pi()),t.Qj()&&!g&&!i&&r.sg()){for(c=0;c=G-1)return null;for(r=new Dt,r.c[r.c.length]=e,_t=e,l=n,N=-1,f=a(Ee(t.d.c.b,n),26),R=0;R1&&l0&&(b=t.k.a/c);break;case 2:case 4:r=t.g.n.b,r>0&&(b=t.k.b/r)}Ct(t,(Ft(),Ym),b)}if(g=t.n,l=t.a,i)l.a=i.a,l.b=i.b,t.b=!0;else if(e!=dp&&e!=ob&&f!=Wc)switch(f.g){case 1:l.a=g.a/2;break;case 2:l.a=g.a,l.b=g.b/2;break;case 3:l.a=g.a/2,l.b=g.b;break;case 4:l.b=g.b/2}else l.a=g.a/2,l.b=g.b/2}function kye(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,N;for(di(n,TBt,1),t.c=e,k=t.c.a,c=0,b=new j(k);b.aN){for(R=1,r=f.n.a;r>l;)++R,r=(f.n.a-(R-1)*t.d)/R;Ut(i,new qkt(t,f,R,r))}for(g=new j(i);g.a1&&$u(l)*Sh(l)/2>f[0]){for(c=0;c<$.c.length-1&&$u(l)*Sh(l)/2>f[c];)++c;N=new C1($,0,c+1),M=new DN(N),v=$u(l)/Sh(l),g=uZ(M,e,new a2,n,i,r,v),sr(Gh(M.e),g),RM(JM(k,M)),R=new C1($,c+1,$.c.length),Qct(k,R),$.c=dt(un,te,1,0,5,1),b=0,FCt(f,f.length,0)}else G=k.b.c.length==0?null:Ee(k.b,0),G!=null&&wat(k,0),b>0&&(f[b]=f[b-1]),f[b]+=$u(l)*Sh(l),++b,$.c[$.c.length]=l;return $}function jht(t,e){var n,i,r,c,l,f,g,b,v,M,k;if(t.e&&t.c.c.5?nt-=l*2*(N-.5):N<.5&&(nt+=c*2*(.5-N)),r=f.d.b,ntG.a-$-v&&(nt=G.a-$-v),f.k.a=e+nt}}function E7t(t,e){var n,i,r,c,l;for(l=new j(t.i);l.a0&&r9t(t,f,M);for(r=new j(M);r.a0&&(t.a=g+(R-1)*c,e.c.b+=t.a,e.e.b+=t.a)),N.a._b()!=0&&(k=new pX(1,c),R=Bht(k,e,N,$,e.e.b+g-e.c.b),R>0&&(e.e.b+=g+(R-1)*c))}function Ght(t,e,n){var i,r,c,l,f,g;if(e.l==0&&e.m==0&&e.h==0)throw K(new x9("divide by zero"));if(t.l==0&&t.m==0&&t.h==0)return n&&(Q1=ia(0,0,0)),ia(0,0,0);if(e.h==jP&&e.m==0&&e.l==0)return ufe(t,n);if(g=!1,e.h>>19&&(e=zM(e),g=!0),l=wbe(e),c=!1,r=!1,i=!1,t.h==jP&&t.m==0&&t.l==0)if(r=!0,c=!0,l==-1)t=FEt((NM(),y1t)),i=!0,g=!g;else return f=Vlt(t,l),g&&rq(f),n&&(Q1=ia(0,0,0)),f;else t.h>>19&&(c=!0,t=zM(t),i=!0,g=!g);return l!=-1?$le(t,l,g,c,n):Yut(t,e)<0?(n&&(c?Q1=zM(t):Q1=ia(t.l,t.m,t.h)),ia(0,0,0)):Hve(i?t:ia(t.l,t.m,t.h),e,g,c,r,n)}function Oye(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt;for(b=e.c,r=Urt(t.e),M=hl(iL(Xc(Frt(t.e)),t.d*t.a,t.c*t.b),-.5),n=r.a-M.a,i=r.b-M.b,l=e.a,n=l.c-n,i=l.d-i,g=new j(b);g.a=0)return n;switch(wm(qo(t,n))){case 2:{if(le("",jp(t,n.Wi()).be())){if(g=mL(qo(t,n)),f=MM(qo(t,n)),v=Ylt(t,e,g,f),v)return v;for(r=Mht(t,e),l=0,M=r._b();le.e||e.f>t.e)){for(n=0,i=0,l=t.t.a.Xb().tc();l.hc();)r=a(l.ic(),11),yq(zo(Y(Z(ss,1),wt,9,0,[r.g.k,r.k,r.a])).b,e.f,e.e)&&++n;for(f=t.o.a.Xb().tc();f.hc();)r=a(f.ic(),11),yq(zo(Y(Z(ss,1),wt,9,0,[r.g.k,r.k,r.a])).b,e.f,e.e)&&--n;for(g=e.t.a.Xb().tc();g.hc();)r=a(g.ic(),11),yq(zo(Y(Z(ss,1),wt,9,0,[r.g.k,r.k,r.a])).b,t.f,t.e)&&++i;for(c=e.o.a.Xb().tc();c.hc();)r=a(c.ic(),11),yq(zo(Y(Z(ss,1),wt,9,0,[r.g.k,r.k,r.a])).b,t.f,t.e)&&--i;n0&&n.charCodeAt(0)!=47))throw K(new yn("invalid opaquePart: "+n));if(t&&!(e!=null&&CT(qF,e.toLowerCase()))&&!(n==null||!uq(n,AA,kA)))throw K(new yn(EUt+n));if(t&&e!=null&&CT(qF,e.toLowerCase())&&!v1e(n))throw K(new yn(EUt+n));if(!Xle(i))throw K(new yn("invalid device: "+i));if(!bhe(r))throw l=r==null?"invalid segments: null":"invalid segment: "+hhe(r),K(new yn(l));if(!(c==null||Mf(c,Ca(35))==-1))throw K(new yn("invalid query: "+c))}function S7t(t,e){var n;if(e==null||le(e,eu)||e.length==0&&t.k!=(i0(),zE))return null;switch(t.k.g){case 1:return c7(e,bE)?(me(),TE):c7(e,WY)?(me(),$m):null;case 2:try{return Xt(ku(e,Vs,qi))}catch(i){if(i=vr(i),ct(i,118))return null;throw K(i)}case 4:try{return rw(e)}catch(i){if(i=vr(i),ct(i,118))return null;throw K(i)}case 3:return e;case 5:return N6t(t),S9t(t,e);case 6:return N6t(t),Kme(t,t.a,e);case 7:try{return n=mme(t),n.gf(e),n}catch(i){if(i=vr(i),ct(i,30))return null;throw K(i)}default:throw K(new yc("Invalid type set for this layout option."))}}function jye(t){var e,n,i,r,c,l,f,g,b,v,M;for(l=new j(t.d.b);l.a0&&ZL(b,!0,(Js(),uh)),f.j==(Ke(),rs)&&b4t(b),wr(t.f,f,e)}}function Hye(t,e,n){var i,r,c,l,f,g,b,v;if(n._b()==0)return!1;if(f=(Jo(),a(e,61).bj()),c=f?n:new n_(n._b()),Om(t.e,e)){if(e.xh())for(b=n.tc();b.hc();)g=b.ic(),XX(t,e,g,ct(e,62)&&(a(a(e,17),62).Bb&ao)!=0)||(r=k1(e,g),c.pc(r)||c.nc(r));else if(!f)for(b=n.tc();b.hc();)g=b.ic(),r=k1(e,g),c.nc(r)}else{if(n._b()>1)throw K(new yn(dK));for(v=mu(t.e.mg(),e),i=a(t.g,124),l=0;l1&&l>1;)v=t7t(t,_t),f=a(Ee(t.d.c.b,l),26),M=a(Ee(t.d.c.b,l-1),26),Gt=a($.cd(k++),21).a,nt=cm(Gt,M.a.c.length),W1(_t,nt,M),W1(v,pt,f),pt=nt,_t&&(r.c[r.c.length]=_t),_t=v,--It,++c,--l;for(rt=(i-(r.c.length-1)*t.d.d)/r.c.length,b=new j(r);b.a0&&A7(t,e,!1,!1,r),M=oX(t,e,!0,!1)):(A7(t,e,!1,g,0),M=oX(t,e,!0,!1)):v?(f=a(a(rr(t.r,e),19),60)._b(),c=C1e(t,e),M=c*f+t.u*(f-1),c>0&&A7(t,e,!0,!1,c)):(A7(t,e,!0,!1,0),M=oX(t,e,!0,!0)),RX(t,e)==(G1(),sb)&&(M+=2*t.u),n.a.a=M}function A7t(t,e){var n,i,r,c,l,f,g,b,v,M;if(n=a(js(t.b,e),114),a(a(rr(t.r,e),19),60).Wb()){n.n.d=0,n.n.a=0;return}n.n.d=t.A.d,n.n.a=t.A.a,r=t.v.pc((Ju(),E0)),v=a(a(rr(t.r,e),19),60)._b()==2,f=t.t==(Kh(),ly),b=t.w.pc((ma(),Bx)),M=t.w.pc(OF),i=0,!r||v&&f?i=cX(t,e,!1,!1):f?M?(c=tme(t,e,b),c>0&&F7(t,e,c,!1,!1),i=cX(t,e,!0,!1)):(F7(t,e,0,!1,b),i=cX(t,e,!0,!1)):M?(g=a(a(rr(t.r,e),19),60)._b(),l=Pbe(t,e),i=l*g+t.u*(g-1),l>0&&F7(t,e,l,!0,!1)):(F7(t,e,0,!0,!1),i=cX(t,e,!0,!0)),RX(t,e)==(G1(),sb)&&(i+=2*t.u),n.a.b=i}function fr(){fr=P,b_t=(Oit(),_c).b,fXt=a(at(Et(_c.b),0),29),jw=a(at(Et(_c.b),1),29),hXt=a(at(Et(_c.b),2),29),qE=_c.bb,a(at(Et(_c.bb),0),29),a(at(Et(_c.bb),1),29),XE=_c.fb,MI=a(at(Et(_c.fb),0),29),a(at(Et(_c.fb),1),29),a(at(Et(_c.fb),2),17),by=_c.qb,EXt=a(at(Et(_c.qb),0),29),a(at(Et(_c.qb),1),17),a(at(Et(_c.qb),2),17),QF=a(at(Et(_c.qb),3),29),tU=a(at(Et(_c.qb),4),29),SI=a(at(Et(_c.qb),6),29),EI=a(at(Et(_c.qb),5),17),dXt=_c.j,pXt=_c.k,gXt=_c.q,mXt=_c.w,bXt=_c.B,wXt=_c.A,vXt=_c.C,_Xt=_c.D,yXt=_c._,xXt=_c.cb,MXt=_c.hb}function Wye(t,e,n){var i,r,c,l,f,g,b,v,M,k,R;t.c=0,t.b=0,i=2*e.c.a.c.length+1;t:for(M=n.tc();M.hc();){if(v=a(M.ic(),11),f=v.i==(Ht(),Tn)||v.i==fi,R=0,f){if(k=a(z(v,(Ft(),Du)),8),!k)continue;R+=Kwe(t,i,v,k)}else{for(b=new j(v.f);b.a0?(t.f[v.o]=R/(v.d.c.length+v.f.c.length),t.c=y.Math.min(t.c,t.f[v.o]),t.b=y.Math.max(t.b,t.f[v.o])):f&&(t.f[v.o]=R)}}function $ye(t){t.b=null,t.bb=null,t.fb=null,t.qb=null,t.a=null,t.c=null,t.d=null,t.e=null,t.f=null,t.n=null,t.M=null,t.L=null,t.Q=null,t.R=null,t.K=null,t.db=null,t.eb=null,t.g=null,t.i=null,t.j=null,t.k=null,t.gb=null,t.o=null,t.p=null,t.q=null,t.r=null,t.$=null,t.ib=null,t.S=null,t.T=null,t.t=null,t.s=null,t.u=null,t.v=null,t.w=null,t.B=null,t.A=null,t.C=null,t.D=null,t.F=null,t.G=null,t.H=null,t.I=null,t.J=null,t.P=null,t.Z=null,t.U=null,t.V=null,t.W=null,t.X=null,t.Y=null,t._=null,t.ab=null,t.cb=null,t.hb=null,t.nb=null,t.lb=null,t.mb=null,t.ob=null,t.pb=null,t.jb=null,t.kb=null,t.N=!1,t.O=!1}function Vye(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt;if($=e.b.c.length,!($<3)){for(R=dt(Gn,pi,22,$,15,1),M=0,v=new j(e.b);v.al)&&Ir(t.c,a(G.b,14));++f}c=l}}}function Wht(t){var e;switch(t.d){case 1:{if(t.wi())return t.o!=-2;break}case 2:{if(t.wi())return t.o==-2;break}case 3:case 5:case 4:case 6:case 7:return t.o>-2;default:return!1}switch(e=t.vi(),t.p){case 0:return e!=null&<(de(e))!=TT(t.k,0);case 1:return e!=null&&a(e,192).a!=or(t.k)<<24>>24;case 2:return e!=null&&a(e,159).a!=(or(t.k)&qr);case 6:return e!=null&&TT(a(e,149).a,t.k);case 5:return e!=null&&a(e,21).a!=or(t.k);case 7:return e!=null&&a(e,168).a!=or(t.k)<<16>>16;case 3:return e!=null&<(Yt(e))!=t.j;case 4:return e!=null&&a(e,126).a!=t.j;default:return e==null?t.n!=null:!Fi(e,t.n)}}function oZ(t,e){var n,i,r,c;c=t.F,e==null?(t.F=null,mq(t,null)):(t.F=(En(e),e),i=Mf(e,Ca(60)),i!=-1?(r=e.substr(0,i),Mf(e,Ca(46))==-1&&!le(r,aE)&&!le(r,A4)&&!le(r,RO)&&!le(r,k4)&&!le(r,L4)&&!le(r,P4)&&!le(r,I4)&&!le(r,R4)&&(r=BUt),n=jW(e,Ca(62)),n!=-1&&(r+=""+e.substr(n+1,e.length-(n+1))),mq(t,r)):(r=e,Mf(e,Ca(46))==-1&&(i=Mf(e,Ca(91)),i!=-1&&(r=e.substr(0,i)),!le(r,aE)&&!le(r,A4)&&!le(r,RO)&&!le(r,k4)&&!le(r,L4)&&!le(r,P4)&&!le(r,I4)&&!le(r,R4)?(r=BUt,i!=-1&&(r+=""+e.substr(i,e.length-i))):r=e),mq(t,r),r==e&&(t.F=t.D))),t.Db&4&&!(t.Db&1)&&Bi(t,new fs(t,1,5,c,e))}function qye(t){wC();var e,n,i,r,c,l,f;for(f=new sm,n=new j(t);n.a=f.b.c)&&(f.b=e),(!f.c||e.c<=f.c.c)&&(f.d=f.c,f.c=e),(!f.e||e.d>=f.e.d)&&(f.e=e),(!f.f||e.d<=f.f.d)&&(f.f=e);return i=new h7((jM(),Xm)),EL(t,Yjt,new ju(Y(Z(x6,1),te,341,0,[i]))),l=new h7(vw),EL(t,Zjt,new ju(Y(Z(x6,1),te,341,0,[l]))),r=new h7(ww),EL(t,Xjt,new ju(Y(Z(x6,1),te,341,0,[r]))),c=new h7(Z_),EL(t,qjt,new ju(Y(Z(x6,1),te,341,0,[c]))),PX(i.c,Xm),PX(r.c,ww),PX(c.c,Z_),PX(l.c,vw),f.a.c=dt(un,te,1,0,5,1),Or(f.a,i.c),Or(f.a,Cm(r.c)),Or(f.a,c.c),Or(f.a,Cm(l.c)),f}function NP(t,e,n){var i,r,c,l;return t.Rj()&&t.Qj()&&(l=M$(t,a(n,51)),zt(l)!==zt(n))?(t.ai(e),t.gi(e,V5t(t,e,l)),t.Dj()&&(c=(r=a(n,42),t.Pj()?t.Nj()?r.Cg(t.b,jo(a(Ve(da(t.b),t.pi()),17)).n,a(Ve(da(t.b),t.pi()).jj(),24).Qi(),null):r.Cg(t.b,xr(r.mg(),jo(a(Ve(da(t.b),t.pi()),17))),null,null):r.Cg(t.b,-1-t.pi(),null,null)),!a(l,42).yg()&&(c=(i=a(l,42),t.Pj()?t.Nj()?i.Ag(t.b,jo(a(Ve(da(t.b),t.pi()),17)).n,a(Ve(da(t.b),t.pi()).jj(),24).Qi(),c):i.Ag(t.b,xr(i.mg(),jo(a(Ve(da(t.b),t.pi()),17))),null,c):i.Ag(t.b,-1-t.pi(),null,c))),c&&c.Th()),Xl(t.b)&&t.ni(t.mi(9,n,l,e,!1)),l):n}function k7t(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t;for(v=lt(Yt(z(t,(qt(),y0)))),i=lt(Yt(z(t,gbt))),k=new Nk,Ct(k,y0,v+i),b=e,nt=e.d,$=e.c.g,rt=e.d.g,G=ql($.c),pt=ql(rt.c),r=new Dt,M=G;M<=pt;M++)f=new Jh(t),jl(f,(Ke(),Hr)),Ct(f,(Ft(),li),b),Ct(f,Qi,(Ls(),Gc)),Ct(f,JB,k),R=a(Ee(t.b,M),26),M==G?W1(f,R.a.c.length-n,R):Ks(f,R),_t=lt(Yt(z(b,up))),_t<0&&(_t=0,Ct(b,up,_t)),f.n.b=_t,N=y.Math.floor(_t/2),l=new Eo,yr(l,(Ht(),on)),ds(l,f),l.k.b=N,g=new Eo,yr(g,Qe),ds(g,f),g.k.b=N,Ts(b,l),c=new Np,Uo(c,b),Ct(c,Ro,null),Hs(c,g),Ts(c,nt),qpe(f,b,c),r.c[r.c.length]=c,b=c;return r}function Xye(t,e){var n,i,r,c,l,f,g,b,v,M;for(t.a=new a4t(vle(mA)),i=new j(e.a);i.a0;){for($=(mi(0,g.c.length),a(g.c[0],14)),r=(mi(0,R.c.length),a(R.c[0],14)),rt=r.d.d,c=nc(rt,r,0),Mce($,r.d,c),Hs(r,null),Ts(r,null),N=$.a,e&&Xi(N,new Oo(pt)),i=qn(r.a,0);i.b!=i.d.c;)n=a(Yn(i),9),Xi(N,new Oo(n));for(nt=$.b,k=new j(r.b);k.a0?RV(this,this.f/this.a):Wh(e.g,e.d[0]).a!=null&&Wh(n.g,n.d[0]).a!=null?RV(this,(lt(Wh(e.g,e.d[0]).a)+lt(Wh(n.g,n.d[0]).a))/2):Wh(e.g,e.d[0]).a!=null?RV(this,Wh(e.g,e.d[0]).a):Wh(n.g,n.d[0]).a!=null&&RV(this,Wh(n.g,n.d[0]).a)}function $ht(t){var e;this.r=Hse(new TR,new _z),this.b=(ts(),new OC(a(si(Ia),274))),this.p=new OC(a(si(Ia),274)),this.i=new OC(a(si(Mqt),274)),this.e=t,this.o=new Oo(t.Re()),this.B=t.bf()||lt(de(t.xe((dr(),EF)))),this.v=a(t.xe((dr(),HE)),19),this.w=a(t.xe(CF),19),this.q=a(t.xe(nI),83),this.t=a(t.xe(jQ),275),this.j=a(t.xe(TF),19),this.n=a(hP(t,xVt),119),this.k=lt(Yt(hP(t,kF))),this.d=lt(Yt(hP(t,uvt))),this.u=lt(Yt(hP(t,dvt))),this.s=lt(Yt(hP(t,lvt))),this.A=a(hP(t,hvt),135),this.c=2*this.d,e=!this.w.pc((ma(),RF)),this.f=new jC(0,e,0),this.g=new jC(1,e,0),VG(this.f,(Ch(),ta),this.g)}function P7t(t,e){var n,i,r,c,l,f,g,b,v,M,k,R;if(e==null||e.length==0)return null;if(c=a(Zc(t.f,e),27),!c){for(r=(k=new vf(t.d).a.Tb().tc(),new nm(k));r.a.hc();)if(n=(l=a(r.a.ic(),38),a(l.lc(),27)),f=n.f,R=e.length,le(f.substr(f.length-R,R),e)&&(e.length==f.length||bo(f,f.length-e.length-1)==46)){if(c)return null;c=n}if(!c){for(i=(M=new vf(t.d).a.Tb().tc(),new nm(M));i.a.hc();)if(n=(l=a(i.a.ic(),38),a(l.lc(),27)),v=n.g,v!=null){for(g=0,b=v.length;g=1&&(G-l>0&&M>=0?(g.k.a+=$,g.k.b+=c*l):G-l<0&&v>=0&&(g.k.a+=$*G,g.k.b+=c));t.n.a=e.a,t.n.b=e.b,Ct(t,(qt(),Ew),(Ju(),i=a(xu(MA),10),new Ha(i,a(au(i,i.length),10),0)))}function D7t(t,e){var n,i,r,c,l,f,g,b,v,M;for(g=!0,r=0,b=t.f[e.o],v=e.n.b+t.n,n=t.c[e.o][2],Kl(t.a,b,Xt(a(Ee(t.a,b),21).a-1+n)),Kl(t.b,b,lt(Yt(Ee(t.b,b)))-v+n*t.e),++b,b>=t.i?(++t.i,Ut(t.a,Xt(1)),Ut(t.b,v)):(i=t.c[e.o][1],Kl(t.a,b,Xt(a(Ee(t.a,b),21).a+1-i)),Kl(t.b,b,lt(Yt(Ee(t.b,b)))+v-i*t.e)),(t.q==(S_(),j6)&&(a(Ee(t.a,b),21).a>t.j||a(Ee(t.a,b-1),21).a>t.j)||t.q==H6&&(lt(Yt(Ee(t.b,b)))>t.k||lt(Yt(Ee(t.b,b-1)))>t.k))&&(g=!1),l=Rn(Rs(e));Jn(l);)c=a(In(l),14),f=c.c.g,t.f[f.o]==b&&(M=D7t(t,f),r=r+a(M.a,21).a,g=g&<(de(M.b)));return t.f[e.o]=b,r=r+t.c[e.o][0],new zs(Xt(r),(me(),!!g))}function Kye(t){var e,n,i,r,c,l,f,g,b,v;for(b=new Fr,f=new Fr,c=new j(t);c.a-1){for(r=qn(f,0);r.b!=r.d.c;)i=a(Yn(r),125),i.s=l;for(;f.b!=0;)for(i=a(Fut(f,0),125),n=new j(i.g);n.a-1){for(c=new j(f);c.a0)&&(g.i=cm(g.i,r.i-1),--g.f,g.f==0&&(f.c[f.c.length]=g))}}function O7t(t,e){var n,i,r,c,l,f,g,b;if(!(e.b==null||t.b==null)){for(M_(t),l4(t),M_(e),l4(e),n=dt(Gn,pi,22,t.b.length+e.b.length,15,1),b=0,i=0,l=0;i=f&&r<=g)f<=r&&c<=g?(n[b++]=r,n[b++]=c,i+=2):f<=r?(n[b++]=r,n[b++]=g,t.b[i]=g+1,l+=2):c<=g?(n[b++]=f,n[b++]=c,i+=2):(n[b++]=f,n[b++]=g,t.b[i]=g+1);else if(gt.j&&(t.q=j6,sE(t,c));break;case 4:for(t.q=(S_(),nF),sE(t,c),b=0,r=new j(t.b);r.at.k&&(t.q=H6,sE(t,c));break;case 6:k=Tr(y.Math.ceil(t.f.length*v/100)),sE(t,new K8(k));break;case 5:M=Tr(y.Math.ceil(t.d*v/100)),sE(t,new V3(M));break;default:sE(t,c)}Ewe(t,e),Vn(n)}function n2e(t){var e,n,i,r,c,l,f;for(e=new Dt,t.g=new Dt,t.d=new Dt,l=new qg(new xp(t.f.b).a);l.b;)c=Sm(l),Ut(e,a(a(c.lc(),48).b,80)),zv(a(c.kc(),536).Je())?Ut(t.d,a(c.lc(),48)):Ut(t.g,a(c.lc(),48));for(Pq(t,t.d),Pq(t,t.g),t.c=new F9t(t.b),qQt(t.c,($it(),Hjt)),Cq(t,t.d),Cq(t,t.g),Or(e,t.c.a.b),t.e=new We(is,is),t.a=new We(Ps,Ps),i=new j(e);i.aY1)&&f<10);Bit(t.c,new l3),B7t(t),ise(t.c),Zye(t.f)}function B7t(t){var e,n,i,r,c,l,f;for(e=0,c=new j(t.b.a);c.a=2){for(g=qn(n,0),l=a(Yn(g),9),f=a(Yn(g),9);f.a0&&(f=y.Math.max(f,FPt(t.A.b+i.d.b,r))),M=i,k=r,R=c;t.A&&t.A.c>0&&(N=R+t.A.c,v&&(N+=M.d.c),f=y.Math.max(f,(Ef(),I1(yd),y.Math.abs(k-1)<=yd||k==1||isNaN(k)&&isNaN(1)?0:N/(1-k)))),n.n.b=0,n.a.a=f}function U7t(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,N,$;if(n=a(js(t.b,e),114),b=a(a(rr(t.r,e),19),60),b.Wb()){n.n.d=0,n.n.a=0;return}for(l=t.v.pc((Ju(),E0)),$=t.w.pc((ma(),Bx)),v=t.t==(Kh(),cb),f=0,g=b.tc(),M=null,R=0,k=0;g.hc();)i=a(g.ic(),111),c=lt(Yt(i.b.xe((dD(),FF)))),r=i.b.Re().b,l&&F7(t,e,0,v,!v&&$),M?(N=k+M.d.a+t.u+i.d.d,f=y.Math.max(f,(Ef(),I1(yd),y.Math.abs(R-c)<=yd||R==c||isNaN(R)&&isNaN(c)?0:N/(c-R)))):t.A&&t.A.d>0&&(f=y.Math.max(f,FPt(t.A.d+i.d.d,c))),M=i,R=c,k=r;t.A&&t.A.a>0&&(N=k+t.A.a,v&&(N+=M.d.a),f=y.Math.max(f,(Ef(),I1(yd),y.Math.abs(R-1)<=yd||R==1||isNaN(R)&&isNaN(1)?0:N/(1-R)))),n.n.d=0,n.a.b=f}function c2e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It,Gt;return k=t.c[e],R=t.c[n],N=a(z(k,(Ft(),_x)),15),!!N&&N._b()!=0&&N.pc(R)||($=k.j!=(Ke(),Hr)&&R.j!=Hr,G=a(z(k,DE),8),nt=a(z(R,DE),8),rt=G!=nt,pt=!!G&&G!=k||!!nt&&nt!=R,_t=Kq(k,(Ht(),Tn)),It=Kq(R,fi),pt=pt|(Kq(k,fi)||Kq(R,Tn)),Gt=pt&&rt||_t||It,$&&Gt)||k.j==(Ke(),uc)&&R.j==gs||R.j==(Ke(),uc)&&k.j==gs?!1:(v=t.c[e],c=t.c[n],r=e8t(t.e,v,c,(Ht(),on)),g=e8t(t.i,v,c,Qe),Ube(t.f,v,c),b=B6t(t.b,v,c)+a(r.a,21).a+a(g.a,21).a+t.f.d,f=B6t(t.b,c,v)+a(r.b,21).a+a(g.b,21).a+t.f.b,t.a&&(M=a(z(v,li),11),l=a(z(c,li),11),i=WRt(t.g,M,l),b+=a(i.a,21).a,f+=a(i.b,21).a),b>f)}function z7t(t,e,n){var i,r,c,l,f,g,b,v,M;if(t.a!=e.Pi())throw K(new yn(_E+e.be()+Gm));if(i=jp((tu(),eo),e).kk(),i)return i.Pi().dh().Zg(i,n);if(l=jp(eo,e).mk(),l){if(n==null)return null;if(f=a(n,15),f.Wb())return"";for(M=new Sp,c=f.tc();c.hc();)r=c.ic(),mo(M,l.Pi().dh().Zg(l,r)),M.a+=" ";return N9(M,M.a.length-1)}if(v=jp(eo,e).nk(),!v.Wb()){for(b=v.tc();b.hc();)if(g=a(b.ic(),140),g.Li(n))try{if(M=g.Pi().dh().Zg(g,n),M!=null)return M}catch(k){if(k=vr(k),!ct(k,104))throw K(k)}throw K(new yn("Invalid value: '"+n+"' for datatype :"+e.be()))}return a(e,737).Ui(),n==null?null:ct(n,159)?""+a(n,159).a:du(n)==JO?uSt(CA[0],a(n,181)):Yc(n)}function a2e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,N,$,G;for(di(n,TBt,1),nHt=lt(de(z(e,(qt(),Y4)))),t.c=e,N=new Dt,f=new j(e.b);f.aG){for($=1,r=b.n.a;r>g;)++$,r=(b.n.a-($-1)*t.d)/$;Ut(i,new lAt(t,b,$))}for(v=new j(i);v.ab?0:b),1),l),t.c[i.a.d])),ih($l(Wl(Vl(Gl(new cl,0>-b?0:-b),1),l),t.c[f.a.d]))):(k=1,(ct(i.g,153)&&ct(f.g,8)||ct(f.g,153)&&ct(i.g,8))&&(k=2),ih($l(Wl(Vl(Gl(new cl,Tr(c)),k),t.c[i.a.d]),t.c[f.a.d]))))}function l2e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,N,$;for(n=a(z(t,(qt(),Qi)),83),l=t.e,c=t.d,f=l.a+c.b+c.c,g=0-c.d-t.c.b,v=l.b+c.d+c.a-t.c.b,b=new Dt,M=new Dt,r=new j(e);r.a0),a(v.a.cd(v.c=--v.b),14));c!=i&&v.b>0;)t.a[c.o]=!0,t.a[i.o]=!0,c=(Hn(v.b>0),a(v.a.cd(v.c=--v.b),14));v.b>0&&Th(v)}}function f2e(t){t.q||(t.q=!0,t.p=cc(t,0),t.a=cc(t,1),nr(t.a,0),t.f=cc(t,2),nr(t.f,1),Cr(t.f,2),t.n=cc(t,3),Cr(t.n,3),Cr(t.n,4),Cr(t.n,5),Cr(t.n,6),t.g=cc(t,4),nr(t.g,7),Cr(t.g,8),t.c=cc(t,5),nr(t.c,7),nr(t.c,8),t.i=cc(t,6),nr(t.i,9),nr(t.i,10),nr(t.i,11),nr(t.i,12),Cr(t.i,13),t.j=cc(t,7),nr(t.j,9),t.d=cc(t,8),nr(t.d,3),nr(t.d,4),nr(t.d,5),nr(t.d,6),Cr(t.d,7),Cr(t.d,8),Cr(t.d,9),Cr(t.d,10),t.b=cc(t,9),Cr(t.b,0),Cr(t.b,1),t.e=cc(t,10),Cr(t.e,1),Cr(t.e,2),Cr(t.e,3),Cr(t.e,4),nr(t.e,5),nr(t.e,6),nr(t.e,7),nr(t.e,8),nr(t.e,9),nr(t.e,10),Cr(t.e,11),t.k=cc(t,11),Cr(t.k,0),Cr(t.k,1),t.o=yi(t,12),t.s=yi(t,13))}function d2e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt;for(di(e,"Interactive crossing minimization",1),l=0,c=new j(t.b);c.a0&&(n+=g.k.a+g.n.a/2,++M),N=new j(g.i);N.a=f&&r<=g)f<=r&&c<=g?i+=2:f<=r?(t.b[i]=g+1,l+=2):c<=g?(n[b++]=r,n[b++]=f-1,i+=2):(n[b++]=r,n[b++]=f-1,t.b[i]=g+1,l+=2);else if(g0),l.a.cd(l.c=--l.b),cd(l,i),vM(b,i),L7(i,g.i),kM(b),kM(b),r.a.$b(i)!=null}}function m2e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,N,$,G;for(di(e,"Spline SelfLoop pre-processing.",1),b=new Xa,M=new j(t.a);M.a0?r-=864e5:r+=864e5,g=new ost(so(Ja(e.q.getTime()),r))),v=new Bb,b=t.a.length,c=0;c=97&&i<=122||i>=65&&i<=90){for(l=c+1;l=b)throw K(new yn("Missing trailing '"));l+1=14&&b<=16))?e.a.Qb(i)?(n.a?Ii(n.a,n.b):n.a=new ll(n.d),m2(n.a,"[...]")):(l=r_(i),g=new fL(e),$g(n,H7t(l,g))):ct(i,221)?$g(n,t0e(a(i,221))):ct(i,173)?$g(n,Zge(a(i,173))):ct(i,176)?$g(n,cge(a(i,176))):ct(i,1697)?$g(n,Qge(a(i,1697))):ct(i,37)?$g(n,Jge(a(i,37))):ct(i,378)?$g(n,c0e(a(i,378))):ct(i,736)?$g(n,Kge(a(i,736))):ct(i,106)&&$g(n,Yge(a(i,106))):$g(n,i==null?eu:Yc(i));return n.a?n.e.length==0?n.a.a:n.a.a+(""+n.e):n.c}function v2e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,N,$;if(lt(de(z(n,(qt(),ey)))))for(f=new j(n.i);f.a1))););(f>0||k==(Kh(),cb)&&(!c.n&&(c.n=new Wt(ic,c,1,7)),c.n).i>0)&&(g=!0),f>1&&(b=!0)}g&&e.nc((So(),Al)),b&&e.nc((So(),V4))}function G7t(t,e,n){var i,r,c;return r=new $ht(t),Abe(r,n),vNt(r,!1),pd(r.e.We(),new Crt(r,!1)),J$(r,r.f,(Ch(),lc),(Ht(),Tn)),J$(r,r.f,hc,fi),J$(r,r.g,lc,on),J$(r,r.g,hc,Qe),vIt(r,Tn),vIt(r,fi),n4t(r,Qe),n4t(r,on),Fg(),i=r.v.pc((Ju(),ub))&&r.w.pc((ma(),EA))?wut(r):null,i&&ste(r.a,i),Rwe(r),hpe(r),fpe(r),y2e(r),ave(r),Ope(r),zq(r,Tn),zq(r,fi),ove(r),$_e(r),e&&(_fe(r),Bpe(r),zq(r,Qe),zq(r,on),c=r.w.pc((ma(),SA)),b9t(r,c,Tn),b9t(r,c,fi),w9t(r,c,Qe),w9t(r,c,on),qc(new gi(null,new Ei(new vf(r.i),0)),new xz),qc(wo(new gi(null,Iot(r.r).wc()),new CR),new AR),F1e(r),r.e.Ue(r.o),qc(new gi(null,Iot(r.r).wc()),new D3)),r.o}function E2e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,N;for(di(e,"Spline SelfLoop positioning",1),v=a(z(t,(qt(),Vmt)),345),b=new j(t.b);b.a2?(v=new Dt,Or(v,new C1(nt,1,nt.b)),c=wOt(v,pt+t.a),rt=new CX(c),Uo(rt,e),n.c[n.c.length]=rt):i?rt=a(zi(t.b,n0(e)),247):rt=a(zi(t.b,Dm(e)),247),g=n0(e),i&&(g=Dm(e)),l=bge(G,g),b=pt+t.a,l.a?(b+=y.Math.abs(G.b-M.b),$=new We(M.a,(M.b+G.b)/2)):(b+=y.Math.abs(G.a-M.a),$=new We((M.a+G.a)/2,M.b)),i?wr(t.d,e,new Nut(rt,l,$,b)):wr(t.c,e,new Nut(rt,l,$,b)),wr(t.b,e,rt),N=(!e.n&&(e.n=new Wt(ic,e,1,7)),e.n),R=new $n(N);R.e!=R.i._b();)k=a(ci(R),137),r=CP(t,k,!0,0,0),n.c[n.c.length]=r}function T2e(){bi(py,new Uz),bi(Ui,new $R),bi(Dl,new ZR),bi(cf,new KR),bi(utt,new Vz),bi(XF,new JR),bi(Qp,new QR),bi(TA,new td),bi(mI,new Gk),bi(itt,new jR),bi(Nw,new Wk),bi(ph,new Oz),bi(of,new $k),bi(Fw,new oo),bi(Uw,new Bz),bi(Ra,new Fz),bi(Bw,new U3),bi(Dc,new HR),bi(Do,new zz),bi(vu,new yp),bi(ho,new jz),bi(Z(Da,1),new XS),bi(dx,new Vk),bi(F4,new GR),bi(JO,new WR),bi(A_t,new Fd),bi(To,new Lb),bi(Gvt,new qk),bi(Vvt,new ZS),bi(g_t,new VR),bi(ZF,new Xk),bi(CE,new qR),bi(Io,new Zk),bi(f1t,new Yk),bi(Vm,new Pb),bi(d1t,new Hz),bi(h_t,new Ib),bi(k_t,new XR),bi(qm,new Kk),bi(At,new Gz),bi($vt,new Wz),bi(L_t,new $z)}function C2e(t){var e,n,i,r,c,l,f,g;for(e=null,i=new j(t);i.a0&&n.c==0&&(!e&&(e=new Dt),e.c[e.c.length]=n);if(e)for(;e.c.length!=0;){if(n=a(Em(e,0),205),n.b&&n.b.c.length>0){for(c=(!n.b&&(n.b=new Dt),new j(n.b));c.anc(t,n,0))return new zs(r,n)}else if(lt(Wh(r.g,r.d[0]).a)>lt(Wh(n.g,n.d[0]).a))return new zs(r,n)}for(f=(!n.e&&(n.e=new Dt),n.e).tc();f.hc();)l=a(f.ic(),205),g=(!l.b&&(l.b=new Dt),l.b),Qv(0,g.c.length),U5(g.c,0,n),l.c==g.c.length&&(e.c[e.c.length]=l)}return null}function A2e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,N,$;for(di(e,"Label dummy insertions",1),M=new Dt,l=lt(Yt(z(t,(qt(),B6)))),b=lt(Yt(z(t,Ax))),v=a(z(t,ch),110),R=new j(t.a);R.a>16==-10?n=a(t.Cb,268).zj(e,n):t.Db>>16==-15&&(!e&&(e=(ye(),Hf)),!b&&(b=(ye(),Hf)),t.Cb.Hg()&&(g=new Qd(t.Cb,1,13,b,e,Hp(Ka(a(t.Cb,53)),t),!1),n?n.Sh(g):n=g));else if(ct(t.Cb,96))t.Db>>16==-23&&(ct(e,96)||(e=(ye(),gh)),ct(b,96)||(b=(ye(),gh)),t.Cb.Hg()&&(g=new Qd(t.Cb,1,10,b,e,Hp(kc(a(t.Cb,24)),t),!1),n?n.Sh(g):n=g));else if(ct(t.Cb,411))for(f=a(t.Cb,742),l=(!f.b&&(f.b=new fT(new zG)),f.b),c=(i=new qg(new xp(l.a).a),new dT(i));c.a.b;)r=a(Sm(c.a).kc(),84),n=cE(r,D7(r,f),n)}return n}function L2e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,N,$,G;for(di(n,"Depth-first cycle removal",1),v=e.a,$=v.c.length,t.a=dt(Gn,pi,22,$,15,1),Zxt(t.a),t.b=dt(Gn,pi,22,$,15,1),Zxt(t.b),l=0,b=new j(v);b.a=0){for(g=null,f=new Gs(v.a,b+1);f.b=b.c.c.length?v=vct((Ke(),gs),Hr):v=vct((Ke(),Hr),Hr),v*=2,c=n.a.g,n.a.g=y.Math.max(c,c+(v-c)),l=n.b.g,n.b.g=y.Math.max(l,l+(v-l)),r=e}}function Z7t(t,e){var n,i,r,c,l,f,g,b,v;for(l=a(a(rr(t.r,e),19),60),v=l._b()==2||l._b()>2&&t.w.pc((ma(),Bx)),c=l.tc();c.hc();)if(r=a(c.ic(),111),!(!r.c||r.c.d.c.length<=0)){switch(b=r.b.Re(),f=r.c,g=f.i,g.b=(i=f.n,f.e.a+i.b+i.c),g.a=(n=f.n,f.e.b+n.d+n.a),e.g){case 1:v?(g.c=-g.b-t.s,Cf(f,(fu(),fh))):(g.c=b.a+t.s,Cf(f,(fu(),jf))),g.d=-g.a-t.s,qd(f,(Ga(),dh));break;case 3:v?(g.c=-g.b-t.s,Cf(f,(fu(),fh))):(g.c=b.a+t.s,Cf(f,(fu(),jf))),g.d=b.b+t.s,qd(f,(Ga(),Fh));break;case 2:g.c=b.a+t.s,v?(g.d=-g.a-t.s,qd(f,(Ga(),dh))):(g.d=b.b+t.s,qd(f,(Ga(),Fh))),Cf(f,(fu(),jf));break;case 4:g.c=-g.b-t.s,v?(g.d=-g.a-t.s,qd(f,(Ga(),dh))):(g.d=b.b+t.s,qd(f,(Ga(),Fh))),Cf(f,(fu(),fh))}v=!1}}function Z7(t,e){var n;if(t.e)throw K(new yc((Vd(DK),qZ+DK.k+XZ)));if(!Ate(t.a,e))throw K(new sc(JOt+e+QOt));if(e==t.d)return t;switch(n=t.d,t.d=e,n.g){case 0:switch(e.g){case 2:Rm(t);break;case 1:F1(t),Rm(t);break;case 4:b_(t),Rm(t);break;case 3:b_(t),F1(t),Rm(t)}break;case 2:switch(e.g){case 1:F1(t),UX(t);break;case 4:b_(t),Rm(t);break;case 3:b_(t),F1(t),Rm(t)}break;case 1:switch(e.g){case 2:F1(t),UX(t);break;case 4:F1(t),b_(t),Rm(t);break;case 3:F1(t),b_(t),F1(t),Rm(t)}break;case 4:switch(e.g){case 2:b_(t),Rm(t);break;case 1:b_(t),F1(t),Rm(t);break;case 3:F1(t),UX(t)}break;case 3:switch(e.g){case 2:F1(t),b_(t),Rm(t);break;case 1:F1(t),b_(t),F1(t),Rm(t);break;case 4:F1(t),UX(t)}}return t}function k_(t,e){var n;if(t.d)throw K(new yc((Vd(JK),qZ+JK.k+XZ)));if(!Cte(t.a,e))throw K(new sc(JOt+e+QOt));if(e==t.c)return t;switch(n=t.c,t.c=e,n.g){case 0:switch(e.g){case 2:Xg(t);break;case 1:U1(t),Xg(t);break;case 4:w_(t),Xg(t);break;case 3:w_(t),U1(t),Xg(t)}break;case 2:switch(e.g){case 1:U1(t),zX(t);break;case 4:w_(t),Xg(t);break;case 3:w_(t),U1(t),Xg(t)}break;case 1:switch(e.g){case 2:U1(t),zX(t);break;case 4:U1(t),w_(t),Xg(t);break;case 3:U1(t),w_(t),U1(t),Xg(t)}break;case 4:switch(e.g){case 2:w_(t),Xg(t);break;case 1:w_(t),U1(t),Xg(t);break;case 3:U1(t),zX(t)}break;case 3:switch(e.g){case 2:U1(t),w_(t),Xg(t);break;case 1:U1(t),w_(t),U1(t),Xg(t);break;case 4:U1(t),zX(t)}}return t}function Y7t(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt;for(r=new Dt,N=new j(e.a);N.ant?g:nt,pt=new j(v.i);pt.a=b&&It>=G&&(k+=N.k.b+$.k.b+$.a.b-_t,++f));if(n)for(l=new j(rt.d);l.a=b&&It>=G&&(k+=N.k.b+$.k.b+$.a.b-_t,++f))}f>0&&(Gt+=k/f,++R)}R>0?(e.a=r*Gt/R,e.i=R):(e.a=0,e.i=0)}function j2e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It,Gt,Zt;for(t.e=e,f=_me(e),Gt=new Dt,i=new j(f);i.a0&&(M.d+=b.n.d,M.d+=b.d),M.a>0&&(M.a+=b.n.a,M.a+=b.d),M.b>0&&(M.b+=b.n.b,M.b+=b.d),M.c>0&&(M.c+=b.n.c,M.c+=b.d),M}function q2e(t,e,n){var i;if(di(n,"StretchWidth layering",1),e.a.c.length==0){Vn(n);return}for(t.c=e,t.t=0,t.u=0,t.i=is,t.g=Ps,t.d=lt(Yt(z(e,(qt(),nf)))),Ude(t),eme(t),gge(t),u1e(t),Nfe(t),t.i=y.Math.max(1,t.i),t.g=y.Math.max(1,t.g),t.d=t.d/t.i,t.f=t.g/t.i,t.s=Khe(t),i=new dl(t.c),Ut(t.c.b,i),t.r=fd(t.p),t.n=eN(t.k,t.k.length);t.r.c.length!=0;)t.o=mhe(t),!t.o||S6t(t)&&t.b.a._b()!=0?(tpe(t,i),i=new dl(t.c),Ut(t.c.b,i),yo(t.a,t.b),t.b.a.Pb(),t.t=t.u,t.u=0):S6t(t)?(t.c.b.c=dt(un,te,1,0,5,1),i=new dl(t.c),Ut(t.c.b,i),t.t=0,t.u=0,t.b.a.Pb(),t.a.a.Pb(),++t.f,t.r=fd(t.p),t.n=eN(t.k,t.k.length)):(Ks(t.o,i),Lc(t.r,t.o),Ir(t.b,t.o),t.t=t.t-t.k[t.o.o]*t.d+t.j[t.o.o],t.u+=t.e[t.o.o]*t.d);e.a.c=dt(un,te,1,0,5,1),JC(e.b),Vn(n)}function J7t(t){var e,n,i,r,c,l,f,g,b,v,M,k,R,N,$,G;for(N=new j(t);N.a0&&(t.a[e.c.o][e.o].d+=gu(t.f,24)*$P*.07000000029802322-.03500000014901161,t.a[e.c.o][e.o].a=t.a[e.c.o][e.o].d/t.a[e.c.o][e.o].b)}}function X2e(t,e,n,i,r){var c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn;Te=zi(t.e,i),Te==null&&(Te=new vT,R=a(Te,191),rt=e+"_s",pt=rt+r,k=new E2(pt),P1(R,Df,k)),ae=a(Te,191),T2(n,ae),Bn=new vT,zg(Bn,"x",i.j),zg(Bn,"y",i.k),P1(ae,WFt,Bn),Zt=new vT,zg(Zt,"x",i.b),zg(Zt,"y",i.c),P1(ae,"endPoint",Zt),M=D9((!i.a&&(i.a=new Ss(sf,i,5)),i.a)),N=!M,N&&(Gt=new Rg,c=new dG(Gt),vo((!i.a&&(i.a=new Ss(sf,i,5)),i.a),c),P1(ae,eK,Gt)),g=Vq(i),_t=!!g,_t&&plt(t.a,ae,Bpt,bX(t,Vq(i))),nt=qq(i),It=!!nt,It&&plt(t.a,ae,Opt,bX(t,qq(i))),b=(!i.e&&(i.e=new pn(os,i,10,9)),i.e).i==0,$=!b,$&&(ce=new Rg,l=new lEt(t,ce),vo((!i.e&&(i.e=new pn(os,i,10,9)),i.e),l),P1(ae,Upt,ce)),v=(!i.g&&(i.g=new pn(os,i,9,10)),i.g).i==0,G=!v,G&&(Me=new Rg,f=new hEt(t,Me),vo((!i.g&&(i.g=new pn(os,i,9,10)),i.g),f),P1(ae,Fpt,Me))}function Y7(t){var e,n,i,r,c,l,f,g,b,v,M;if(t==null)throw K(new yf(eu));if(b=t,c=t.length,g=!1,c>0&&(e=t.charCodeAt(0),(e==45||e==43)&&(t=t.substr(1,t.length-1),--c,g=e==45)),c==0)throw K(new yf(Um+b+'"'));for(;t.length>0&&t.charCodeAt(0)==48;)t=t.substr(1,t.length-1),--c;if(c>($Nt(),zzt)[10])throw K(new yf(Um+b+'"'));for(r=0;r0&&(M=-KEt(t.substr(0,i),10),t=t.substr(i,t.length-i),c-=i,n=!1);c>=l;){if(i=KEt(t.substr(0,l),10),t=t.substr(l,t.length-l),c-=l,n)n=!1;else{if(Pc(M,f)<0)throw K(new yf(Um+b+'"'));M=Zg(M,v)}M=Yg(M,i)}if(Pc(M,0)>0)throw K(new yf(Um+b+'"'));if(!g&&(M=DM(M),Pc(M,0)<0))throw K(new yf(Um+b+'"'));return M}function Z2e(t,e,n,i,r){var c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te;for(pt=0,N=0,R=0,k=1,rt=new $n((!t.a&&(t.a=new Wt(zr,t,10,11)),t.a));rt.e!=rt.i._b();)G=a(ci(rt),35),k+=Dp(Af(G)),ce=G.g,N=y.Math.max(N,ce),M=G.f,R=y.Math.max(R,M),pt+=ce*M;for($=(!t.a&&(t.a=new Wt(zr,t,10,11)),t.a).i,l=pt+2*i*i*k*$,c=y.Math.sqrt(l),g=y.Math.max(c*n,N),f=y.Math.max(c/n,R),nt=new $n((!t.a&&(t.a=new Wt(zr,t,10,11)),t.a));nt.e!=nt.i._b();)G=a(ci(nt),35),ae=r.b+(gu(e,26)*f4+gu(e,27)*d4)*(g-G.g),Te=r.b+(gu(e,26)*f4+gu(e,27)*d4)*(f-G.f),th(G,ae),eh(G,Te);for(Zt=g+(r.b+r.c),Gt=f+(r.d+r.a),It=new $n((!t.a&&(t.a=new Wt(zr,t,10,11)),t.a));It.e!=It.i._b();)for(_t=a(ci(It),35),v=Rn(Af(_t));Jn(v);)b=a(In(v),105),QC(b)||h3e(b,e,Zt,Gt);Zt+=r.b+r.c,Gt+=r.d+r.a,L_(t,Zt,Gt,!1,!0)}function Y2e(t,e,n,i){var r,c,l,f,g,b,v,M,k,R,N,$,G,nt;if($=t.k,G=t.n,k=t.d,e){for(M=i/2*(e._b()-1),R=0,b=e.tc();b.hc();)f=a(b.ic(),8),M+=f.n.a,R=y.Math.max(R,f.n.b);for(nt=$.a-(M-G.a)/2,l=$.b-k.d+R,r=G.a/(e._b()+1),c=r,g=e.tc();g.hc();)f=a(g.ic(),8),f.k.a=nt,f.k.b=l-f.n.b,nt+=f.n.a+i/2,v=EDt(f),v.k.a=f.n.a/2-v.a.a,v.k.b=f.n.b,N=a(z(f,(Ft(),OB)),11),N.d.c.length+N.f.c.length==1&&(N.k.a=c-N.a.a,N.k.b=0,ds(N,t)),c+=r}if(n){for(M=i/2*(n._b()-1),R=0,b=n.tc();b.hc();)f=a(b.ic(),8),M+=f.n.a,R=y.Math.max(R,f.n.b);for(nt=$.a-(M-G.a)/2,l=$.b+G.b+k.a-R,r=G.a/(n._b()+1),c=r,g=n.tc();g.hc();)f=a(g.ic(),8),f.k.a=nt,f.k.b=l,nt+=f.n.a+i/2,v=EDt(f),v.k.a=f.n.a/2-v.a.a,v.k.b=0,N=a(z(f,(Ft(),OB)),11),N.d.c.length+N.f.c.length==1&&(N.k.a=c-N.a.a,N.k.b=G.b,ds(N,t)),c+=r}}function K2e(t,e){var n,i,r,c,l,f,g,b,v,M,k;for(r=new j(t.a.b);r.aPs||e.o==x0&&v0&&th(nt,_t*Gt),It>0&&eh(nt,It*Zt);for(YV(t.b,new Mr),e=new Dt,f=new qg(new xp(t.c).a);f.b;)l=Sm(f),i=a(l.kc(),105),n=a(l.lc(),363).a,r=T_(i,!1,!1),M=_8t(n0(i),mP(r),n),IP(M,r),pt=C8t(i),pt&&nc(e,pt,0)==-1&&(e.c[e.c.length]=pt,S4t(pt,(Hn(M.b!=0),a(M.a.a.c,9)),n));for(G=new qg(new xp(t.d).a);G.b;)$=Sm(G),i=a($.kc(),105),n=a($.lc(),363).a,r=T_(i,!1,!1),M=_8t(Dm(i),LC(mP(r)),n),M=LC(M),IP(M,r),pt=A8t(i),pt&&nc(e,pt,0)==-1&&(e.c[e.c.length]=pt,S4t(pt,(Hn(M.b!=0),a(M.c.b.c,9)),n))}function nxe(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt;for(di(e,"Inverted port preprocessing",1),b=t.b,g=new Gs(b,0),n=null,rt=new Dt;g.b0&&(a(js(t.b,e),114).a.b=n)}function ixe(t,e,n,i,r){var c,l,f,g,b,v,M,k,R,N,$,G,nt;switch(k=PC(t.i),N=PC(e.i),R=sr(Xc(t.k),t.a),$=sr(Xc(e.k),e.a),g=sr(new We(R.a,R.b),hl(new Kv(k),1.3*n)),G=sr(new We($.a,$.b),hl(new Kv(N),1.3*i)),f=y.Math.abs(g.a-G.a),fr+2&&JV(t.charCodeAt(r+1),Xvt,Zvt)&&JV(t.charCodeAt(r+2),Xvt,Zvt))if(n=mre(t.charCodeAt(r+1),t.charCodeAt(r+2)),r+=2,i>0?(n&192)==128?e[f++]=n<<24>>24:i=0:n>=128&&((n&224)==192?(e[f++]=n<<24>>24,i=2):(n&240)==224?(e[f++]=n<<24>>24,i=3):(n&248)==240&&(e[f++]=n<<24>>24,i=4)),i>0){if(f==i){switch(f){case 2:{S1(g,((e[0]&31)<<6|e[1]&63)&qr);break}case 3:{S1(g,((e[0]&15)<<12|(e[1]&63)<<6|e[2]&63)&qr);break}}f=0,i=0}}else{for(c=0;c0&&Ut(t.p,v),Ut(t.o,v);e-=i,R=g+e,b+=e*t.e,Kl(t.a,f,Xt(R)),Kl(t.b,f,b),t.j=Mh(t.j,R),t.k=y.Math.max(t.k,b),t.d+=e,e+=$}}function eOt(){eOt=P;var t,e,n;for(new PL(1,0),new PL(10,0),new PL(0,0),jzt=dt(LK,wt,216,11,0,1),b0=dt(nl,Pf,22,100,15,1),N1t=Y(Z(Os,1),Xo,22,15,[1,5,25,125,625,3125,15625,78125,390625,1953125,9765625,48828125,244140625,1220703125,6103515625,30517578125,152587890625,762939453125,3814697265625,19073486328125,95367431640625,476837158203125,0x878678326eac9]),O1t=dt(Gn,pi,22,N1t.length,15,1),B1t=Y(Z(Os,1),Xo,22,15,[1,10,100,hw,WP,jZ,1e6,1e7,1e8,iO,1e10,1e11,1e12,1e13,1e14,1e15,1e16]),F1t=dt(Gn,pi,22,B1t.length,15,1),U1t=dt(LK,wt,216,11,0,1),t=0;t1)for(R=new Oht(N,pt,i),vo(pt,new eEt(t,R)),l.c[l.c.length]=R,M=pt.a.Xb().tc();M.hc();)v=a(M.ic(),48),Lc(c,v.b);if(f.a._b()>1)for(R=new Oht(N,f,i),vo(f,new nEt(t,R)),l.c[l.c.length]=R,M=f.a.Xb().tc();M.hc();)v=a(M.ic(),48),Lc(c,v.b)}}function oxe(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,N;for(di(e,"Label dummy switching",1),M=a(z(t,(qt(),VB)),276),i=a(hd(wo(Yh(new gi(null,new Ei(t.b,16)),new b3),new CS),NC(new Pe,new ge,new pr,Y(Z(tf,1),jt,150,0,[(z1(),Qh)]))),15),l=M==(qC(),bJ)||M==pJ?rpe(t):null,c=i.tc();c.hc();){switch(r=a(c.ic(),8),n=Pde(r),!n&&(n=M),f=Qde(r),v=Ede(r),k=null,n.g){case 2:k=Nge(r,l,f,v);break;case 0:k=(R=f.a._b()+v.c.length+1,N=(R-1)/2|0,Nf.a._b()?a(Ee(v,N-f.a._b()-1),8):null);break;case 1:k=K0e(r,l,f,v);break;case 4:SIt(r,n),k=(b=hut(r),b?f.a._b()==0?null:a(f.a.cd(sC(f,0)),8):v.c.length==0?null:a(Ee(v,v.c.length-1),8));break;case 3:SIt(r,n),k=(g=hut(r),g?v.c.length==0?null:a(Ee(v,v.c.length-1),8):f.a._b()==0?null:a(f.a.cd(sC(f,0)),8))}k&&Pye(r,k),sde(r)}Vn(e)}function Zht(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt;if(k=e.length,k>0&&(g=e.charCodeAt(0),g!=64)){if(g==37&&(M=e.lastIndexOf("%"),b=!1,M!=0&&(M==k-1||(b=e.charCodeAt(M+1)==46)))){if(l=e.substr(1,M-1),pt=le("%",l)?null:Xht(l),i=0,b)try{i=ku(e.substr(M+2,e.length-(M+2)),Vs,qi)}catch(_t){throw _t=vr(_t),ct(_t,118)?(f=_t,K(new EN(f))):K(_t)}for(G=_at(t.pg());G.hc();)if(N=BN(G),ct(N,469)&&(r=a(N,609),rt=r.d,(pt==null?rt==null:le(pt,rt))&&i--==0))return r;return null}if(v=e.lastIndexOf("."),R=v==-1?e:e.substr(0,v),n=0,v!=-1)try{n=ku(e.substr(v+1,e.length-(v+1)),Vs,qi)}catch(_t){if(_t=vr(_t),ct(_t,118))R=e;else throw K(_t)}for(R=le("%",R)?null:Xht(R),$=_at(t.pg());$.hc();)if(N=BN($),ct(N,174)&&(c=a(N,174),nt=c.be(),(R==null?nt==null:le(R,nt))&&n--==0))return c;return null}return x7t(t,e)}function cxe(t){Rht();var e,n,i,r,c,l,f,g,b,v,M,k,R,N,$,G;if(t==null)return null;if(M=t.length*8,M==0)return"";for(f=M%24,R=M/24|0,k=f!=0?R+1:R,c=dt(nl,Pf,22,k*4,15,1),l=0,r=0,g=0;g>24,b=(e&3)<<24>>24,N=e&-128?(e>>2^192)<<24>>24:e>>2<<24>>24,$=n&-128?(n>>4^240)<<24>>24:n>>4<<24>>24,G=i&-128?(i>>6^252)<<24>>24:i>>6<<24>>24,c[l++]=t1[N],c[l++]=t1[$|b<<4],c[l++]=t1[v<<2|G],c[l++]=t1[i&63];return f==8?(e=t[r],b=(e&3)<<24>>24,N=e&-128?(e>>2^192)<<24>>24:e>>2<<24>>24,c[l++]=t1[N],c[l++]=t1[b<<4],c[l++]=61,c[l++]=61):f==16&&(e=t[r],n=t[r+1],v=(n&15)<<24>>24,b=(e&3)<<24>>24,N=e&-128?(e>>2^192)<<24>>24:e>>2<<24>>24,$=n&-128?(n>>4^240)<<24>>24:n>>4<<24>>24,c[l++]=t1[N],c[l++]=t1[$|b<<4],c[l++]=t1[v<<2],c[l++]=61),ml(c,0,c.length)}function axe(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te;for(Gt=e.a.c,b=e.a.c+e.a.b,pt=t.c&&wme(t,e),i=pt?(Gt+b)/2:Gt+(e.s+1)*t.b,f=e.d.a.Xb().tc();f.hc();)if(l=a(f.ic(),14),g=a(zi(e.c,l),589),ae=g.f,Te=g.a,It=new We(i,ae),ce=new We(i,Te),_t=new We(Gt-10,ae),Zt=new We(b,Te),M=!1,k=!1,g.b&&(M=!0,_t.a=b),g.c&&(k=!0,Zt.a=Gt-10),R=g.d,N=g.e,!pt||!(R||N)||k||M)e.d.a._b()==1?TN(l.a,Y(Z(ss,1),wt,9,0,[_t,It,ce,Zt])):(n=new We(i,e.b),TN(l.a,Y(Z(ss,1),wt,9,0,[_t,It,n,ce,Zt])));else if(R&&N){for(v=0,$=0,rt=new j(l.d.g.i);rt.a=0&&lR&&(c&&(Bg(_t,k),Bg(Gt,Xt(b.a-1))),Me=n.b,Bn+=k+e,k=0,v=y.Math.max(v,n.b+n.c+Te)),th(f,Me),eh(f,Bn),v=y.Math.max(v,Me+Te+n.c),k=y.Math.max(k,M),Me+=Te+e;if(v=y.Math.max(v,i),ae=Bn+k+n.a,ae0&&(t.p=-(t.p-1)),t.p>Vs&&_ct(e,t.p-Fm),l=e.q.getDate(),_L(e,1),t.k>=0&&Doe(e,t.k),t.c>=0?_L(e,t.c):t.k>=0?(g=new Iat(e.q.getFullYear()-Fm,e.q.getMonth(),35),i=35-g.q.getDate(),_L(e,i0&&t.f<12&&(t.f+=12),Dee(e,t.f==24&&t.g?0:t.f),t.j>=0&&Tae(e,t.j),t.n>=0&&Fae(e,t.n),t.i>=0&&mMt(e,so(Zg(fP(Ja(e.q.getTime()),hw),hw),t.i)),t.a&&(r=new F9,_ct(r,r.q.getFullYear()-Fm-80),KG(Ja(e.q.getTime()),Ja(r.q.getTime()))&&_ct(e,r.q.getFullYear()-Fm+100)),t.d>=0){if(t.c==-1)n=(7+t.d-e.q.getDay())%7,n>3&&(n-=7),f=e.q.getMonth(),_L(e,e.q.getDate()+n),e.q.getMonth()!=f&&_L(e,e.q.getDate()+(n>0?-7:7));else if(e.q.getDay()!=t.d)return!1}return t.o>Vs&&(c=e.q.getTimezoneOffset(),mMt(e,so(Ja(e.q.getTime()),(t.o-c)*60*hw))),!0}function nOt(){nOt=P,ps=new Nv,cr(ps,(Ht(),cI),Ad),cr(ps,rI,Td),cr(ps,sI,Cd),cr(ps,oI,zf),cr(ps,M0,ab),cr(ps,M0,Cd),cr(ps,M0,zf),cr(ps,ab,M0),cr(ps,ab,Ad),cr(ps,ab,Td),cr(ps,Ox,Ox),cr(ps,Ox,Cd),cr(ps,Ox,Ad),cr(ps,fy,fy),cr(ps,fy,Cd),cr(ps,fy,Td),cr(ps,dy,dy),cr(ps,dy,zf),cr(ps,dy,Ad),cr(ps,hy,hy),cr(ps,hy,zf),cr(ps,hy,Td),cr(ps,Cd,sI),cr(ps,Cd,M0),cr(ps,Cd,Ox),cr(ps,Cd,fy),cr(ps,Cd,Cd),cr(ps,Cd,Ad),cr(ps,Cd,Td),cr(ps,zf,oI),cr(ps,zf,M0),cr(ps,zf,dy),cr(ps,zf,hy),cr(ps,zf,zf),cr(ps,zf,Ad),cr(ps,zf,Td),cr(ps,Ad,cI),cr(ps,Ad,ab),cr(ps,Ad,Ox),cr(ps,Ad,dy),cr(ps,Ad,Cd),cr(ps,Ad,zf),cr(ps,Ad,Ad),cr(ps,Td,rI),cr(ps,Td,ab),cr(ps,Td,fy),cr(ps,Td,hy),cr(ps,Td,Cd),cr(ps,Td,zf),cr(ps,Td,Td)}function hxe(){bi(yI,new s8),bi(JF,new Q0),bi(xI,new eT),bi(m_t,new rj),bi(At,new oj),bi(Z(Da,1),new cj),bi(ho,new aj),bi(dx,new em),bi(At,new t8),bi(At,new e8),bi(At,new Zz),bi(To,new n8),bi(At,new Jy),bi(Sl,new z3),bi(Sl,new Yz),bi(At,new i8),bi(CE,new r8),bi(At,new KS),bi(At,new JS),bi(At,new Jk),bi(At,new QS),bi(At,new Kz),bi(Z(Da,1),new o8),bi(At,new tT),bi(At,new c8),bi(Sl,new Qk),bi(Sl,new Jz),bi(At,new a8),bi(Io,new u8),bi(At,new l8),bi(Vm,new Qz),bi(At,new h8),bi(At,new tj),bi(At,new ej),bi(At,new tm),bi(Sl,new t5),bi(Sl,new e5),bi(At,new n5),bi(At,new Qy),bi(At,new cs),bi(At,new nT),bi(At,new i5),bi(At,new Mv),bi(qm,new nj),bi(At,new r5),bi(At,new f8),bi(At,new zh),bi(qm,new ij),bi(Vm,new d8),bi(At,new sj),bi(Io,new p8)}function fxe(t,e){var n,i,r,c,l,f,g,b,v,M,k,R;for(i=a(z(t,(Ft(),li)),35),th(i,t.k.a+e.a),eh(i,t.k.b+e.b),(a(cn(i,(qt(),Ew)),185)._b()!=0||z(t,xd)!=null||zt(z(Mc(t),YB))===zt((GC(),z6))&&WEt((nw(),(t.p?t.p:(we(),we(),ap)).Qb(Jm)?M=a(z(t,Jm),179):M=a(z(Mc(t),tA),179),M)))&&(o_(i,t.n.a),s_(i,t.n.b)),v=new j(t.i);v.a1;)e=y.Math.min(c,t.c),b=(M=new Jh(t.e.c),jl(M,(Ke(),Jc)),Ct(M,(qt(),Qi),a(z(b,Qi),83)),Ct(M,Oh,a(z(b,Oh),185)),M.o=t.e.b++,Ut(t.b,M),M.n.b=b.n.b,M.n.a=e,k=new Eo,yr(k,(Ht(),Qe)),ds(k,b),k.k.a=M.n.a,k.k.b=M.n.b/2,R=new Eo,yr(R,on),ds(R,M),R.k.b=M.n.b/2,R.k.a=-R.n.a,N=new Np,Hs(N,k),Ts(N,R),M),Ut(t.e.c.a,b),--v,c-=t.c+t.e.d;for(new elt(t.d,t.b,t.c),f=new j(r);f.a=e.length)return{done:!0};var r=e[i++];return{value:[r,n.get(r)],done:!1}}}},jwe()||(t.prototype.createObject=function(){return{}},t.prototype.get=function(e){return this.obj[":"+e]},t.prototype.set=function(e,n){this.obj[":"+e]=n},t.prototype[GZ]=function(e){delete this.obj[":"+e]},t.prototype.keys=function(){var e=[];for(var n in this.obj)n.charCodeAt(0)==58&&e.push(n.substring(1));return e}),t}function gxe(t,e){var n,i,r,c,l,f,g,b,v;if(Dp(Rs(e))!=1||a(oN(Rs(e)),14).c.g.j!=(Ke(),Hr))return null;for(n=a(oN(Rs(e)),14),i=n.c.g,jl(i,(Ke(),gs)),Ct(i,(Ft(),Iu),null),Ct(i,Ru,null),Ct(i,k6,a(z(e,k6),126)),Ct(i,_w,(me(),me(),!0)),Ct(i,li,z(e,li)),i.n.b=e.n.b,c=z(n.d,li),l=null,b=Qa(i,(Ht(),on)).tc();b.hc();)if(f=a(b.ic(),11),f.d.c.length!=0){Ct(f,li,c),v=n.d,f.n.a=v.n.a,f.n.b=v.n.b,f.a.a=v.a.a,f.a.b=v.a.b,Or(f.e,v.e),v.e.c=dt(un,te,1,0,5,1),l=f;break}if(Ct(n.d,li,null),Dp(Qa(e,on))>1)for(g=qn(fl(Qa(e,on)),0);g.b!=g.d.c;)f=a(Yn(g),11),f.d.c.length==0?(r=new Eo,yr(r,on),r.n.a=f.n.a,r.n.b=f.n.b,ds(r,i),Ct(r,li,z(f,li)),ds(f,null)):ds(l,i);return Ct(e,li,null),Ct(e,_w,!1),jl(e,Jc),Ct(i,(qt(),Qi),a(z(e,Qi),83)),Ct(i,Oh,a(z(e,Oh),185)),pm(t.b,0,i),i}function mxe(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt;for(di(n,"Polyline edge routing",1),R=lt(Yt(z(e,(qt(),Aw)))),r=lt(Yt(z(e,Cx))),i=y.Math.min(1,r/R),rt=0,e.b.c.length!=0&&(pt=tDt(a(Ee(e.b,0),26)),rt=.4*i*pt),f=new Gs(e.b,0);f.b0&&(rt-=R),Hht(l,rt),v=0,k=new j(l.a);k.a0),f.a.cd(f.c=--f.b)),g=.4*i*v,!c&&f.b0||v.i==on&&v.d.c.length-v.f.c.length<0)){n=!1;break}if(v.i==on){for(r=new j(v.f);r.a=f){Hn(G.b>0),G.a.cd(G.c=--G.b);break}else N.a>g&&(r?(Or(r.b,N.b),r.a=y.Math.max(r.a,N.a),Th(G)):(Ut(N.b,v),N.c=y.Math.min(N.c,g),N.a=y.Math.max(N.a,f),r=N));r||(r=new bxt,r.c=g,r.a=f,cd(G,r),Ut(r.b,v))}for(l=e.b,b=0,$=new j(i);$.a<$.c.c.length;)for(N=a(H($),511),c=new dl(e),c.o=b++,l.c[l.c.length]=c,R=new j(N.b);R.a0&&Pc(i,-6)>=0){if(Pc(i,0)>=0){for(r=n+or(i),l=17;l>=r;l--)b[l+1]=b[l];return b[++r]=46,f&&(b[--n]=45),ml(b,n,18-n+1)}for(c=2;KG(c,so(DM(i),1));c++)b[--n]=48;return b[--n]=46,b[--n]=48,f&&(b[--n]=45),ml(b,n,18-n)}return k=n+1,v=new Bb,f&&(v.a+="-"),18-k>=1?(S1(v,b[n]),v.a+=".",v.a+=ml(b,n+1,18-n-1)):v.a+=ml(b,n,18-n),v.a+="E",Pc(i,0)>0&&(v.a+="+"),v.a+=""+ND(i),v.a}function cOt(t){var e,n,i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi,ls;for(M=a(z(t,(R1(),gx)),35),nt=qi,rt=qi,$=Vs,G=Vs,_t=new j(t.e);_t.a<_t.c.c.length;)pt=a(H(_t),146),ae=pt.d,Te=pt.e,nt=y.Math.min(nt,ae.a-Te.a/2),rt=y.Math.min(rt,ae.b-Te.b/2),$=y.Math.max($,ae.a+Te.a/2),G=y.Math.max(G,ae.b+Te.b/2);for(ce=a(cn(M,(Ph(),Ajt)),119),Zt=new We(ce.b-nt,ce.d-rt),f=new j(t.e);f.ae.d.c){if(R=t.c[e.a.d],G=t.c[M.a.d],R==G)continue;ih($l(Wl(Vl(Gl(new cl,1),100),R),G))}}}}}function xxe(t,e,n,i,r,c){var l,f,g,b,v,M;for(b=new Eo,Uo(b,e),yr(b,a(cn(e,(qt(),eA)),69)),Ct(b,(Ft(),li),e),ds(b,n),M=b.n,M.a=e.g,M.b=e.f,v=b.k,v.a=e.i,v.b=e.j,wr(t.a,e,b),l=pN(Vh(Yh(new gi(null,(!e.e&&(e.e=new pn(Xs,e,7,4)),new Ei(e.e,16))),new _a),new $c),new pH(e)),l||(l=pN(Vh(Yh(new gi(null,(!e.d&&(e.d=new pn(Xs,e,8,5)),new Ei(e.d,16))),new ff),new ws),new gH(e))),l||(l=pN(new gi(null,(!e.e&&(e.e=new pn(Xs,e,7,4)),new Ei(e.e,16))),new Bl)),Ct(b,L6,(me(),!!l)),Aye(b,c,r,a(cn(e,Sw),9)),g=new $n((!e.n&&(e.n=new Wt(ic,e,1,7)),e.n));g.e!=g.i._b();)f=a(ci(g),137),!lt(de(cn(f,v0)))&&f.a&&Ut(b.e,_q(f));switch((!e.d&&(e.d=new pn(Xs,e,8,5)),e.d).i+(!e.e&&(e.e=new pn(Xs,e,7,4)),e.e).i>1&&i.nc((So(),V4)),r.g){case 2:case 1:(b.i==(Ht(),Tn)||b.i==fi)&&i.nc((So(),J_));break;case 4:case 3:(b.i==(Ht(),Qe)||b.i==on)&&i.nc((So(),J_))}return b}function Z1(t,e){Ai();var n,i,r,c,l,f,g,b,v,M,k,R,N;if(nM(YE)==0){for(M=dt(iMe,wt,112,AXt.length,0,1),l=0;lb&&(i.a+=XEt(dt(nl,Pf,22,-b,15,1))),i.a+="Is",Mf(g,Ca(32))>=0)for(r=0;r0){if(l+i>t.length)return!1;f=E7(t.substr(0,l+i),e)}else f=E7(t,e);switch(c){case 71:return f=y_(t,l,Y(Z(At,1),wt,2,6,[OOt,BOt]),e),r.e=f,!0;case 77:return Awe(t,e,r,f,l);case 76:return kwe(t,e,r,f,l);case 69:return _0e(t,e,l,r);case 99:return y0e(t,e,l,r);case 97:return f=y_(t,l,Y(Z(At,1),wt,2,6,["AM","PM"]),e),r.b=f,!0;case 121:return Owe(t,e,l,f,n,r);case 100:return f<=0?!1:(r.c=f,!0);case 83:return f<0?!1:Lfe(f,l,e[0],r);case 104:f==12&&(f=0);case 75:case 72:return f<0?!1:(r.f=f,r.g=!1,!0);case 107:return f<0?!1:(r.f=f,r.g=!0,!0);case 109:return f<0?!1:(r.j=f,!0);case 115:return f<0?!1:(r.n=f,!0);case 90:if(lce[g]&&(G=g),M=new j(t.b.b);M.a0?k=rP(f):k=nP(rP(f)),t.ze(eA,k)),k.g){case 4:Ct(v,la,(bl(),xw)),Ct(v,NJ,(u_(),W4)),v.n.b=l.b,yr(M,(Ht(),Qe)),M.k.b=b.b;break;case 2:Ct(v,la,(bl(),Km)),Ct(v,NJ,(u_(),T6)),v.n.b=l.b,yr(M,(Ht(),on)),M.k.b=b.b;break;case 1:Ct(v,w0,(tp(),Q_)),v.n.a=l.a,yr(M,(Ht(),fi)),M.k.a=b.a;break;case 3:Ct(v,w0,(tp(),bx)),v.n.a=l.a,yr(M,(Ht(),Tn)),M.k.a=b.a}if(e==Dx||e==Sd||e==Gc){if(R=0,e==Dx&&t.ye(_0))switch(k.g){case 1:case 2:R=a(t.xe(_0),21).a;break;case 3:case 4:R=-a(t.xe(_0),21).a}else switch(k.g){case 4:case 2:R=c.b,e==Sd&&(R/=r.b);break;case 1:case 3:R=c.a,e==Sd&&(R/=r.a)}Ct(v,Ym,R)}return Ct(v,wc,k),v}function Axe(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It,Gt;if(k=a(a(rr(t.r,e),19),60),e==(Ht(),Qe)||e==on){Q7t(t,e);return}for(c=e==Tn?(Am(),fI):(Am(),dI),_t=e==Tn?(Ga(),Fh):(Ga(),dh),n=a(js(t.b,e),114),i=n.i,r=i.c+i_(Y(Z(Os,1),Xo,22,15,[n.n.b,t.A.b,t.k])),nt=i.c+i.b-i_(Y(Z(Os,1),Xo,22,15,[n.n.c,t.A.c,t.k])),l=Hit(Zst(c),t.s),rt=e==Tn?UY:cx,M=k.tc();M.hc();)b=a(M.ic(),111),!(!b.c||b.c.d.c.length<=0)&&(G=b.b.Re(),$=b.e,R=b.c,N=R.i,N.b=(g=R.n,R.e.a+g.b+g.c),N.a=(f=R.n,R.e.b+f.d+f.a),I$(_t,Tpt),R.f=_t,Cf(R,(fu(),fh)),N.c=$.a-(N.b-G.a)/2,It=y.Math.min(r,$.a),Gt=y.Math.max(nt,$.a+G.a),N.cGt&&(N.c=Gt-N.b),Ut(l.d,new v$(N,nut(l,N))),rt=e==Tn?y.Math.max(rt,$.b+b.b.Re().b):y.Math.min(rt,$.b));for(rt+=e==Tn?t.s:-t.s,pt=put((l.e=rt,l)),pt>0&&(a(js(t.b,e),114).a.b=pt),v=k.tc();v.hc();)b=a(v.ic(),111),!(!b.c||b.c.d.c.length<=0)&&(N=b.c.i,N.c-=b.e.a,N.d-=b.e.b)}function uOt(t,e,n){var i,r,c,l,f,g,b,v,M,k;if(i=new qh(e.Qe().a,e.Qe().b,e.Re().a,e.Re().b),r=new lM,t.c)for(l=new j(e.We());l.a=2){if((!t.a&&(t.a=new Wt(os,t,6,6)),t.a).i==0)n=(am(),r=new O3,r),ni((!t.a&&(t.a=new Wt(os,t,6,6)),t.a),n);else if((!t.a&&(t.a=new Wt(os,t,6,6)),t.a).i>1)for(k=new XT((!t.a&&(t.a=new Wt(os,t,6,6)),t.a));k.e!=k.i._b();)VC(k);IP(e,a(at((!t.a&&(t.a=new Wt(os,t,6,6)),t.a),0),270))}if(M)for(i=new $n((!t.a&&(t.a=new Wt(os,t,6,6)),t.a));i.e!=i.i._b();)for(n=a(ci(i),270),b=new $n((!n.a&&(n.a=new Ss(sf,n,5)),n.a));b.e!=b.i._b();)g=a(ci(b),531),f.a=y.Math.max(f.a,g.a),f.b=y.Math.max(f.b,g.b);for(l=new $n((!t.n&&(t.n=new Wt(ic,t,1,7)),t.n));l.e!=l.i._b();)c=a(ci(l),137),v=a(cn(c,vA),9),v&&Wd(c,v.a,v.b),M&&(f.a=y.Math.max(f.a,c.i+c.g),f.b=y.Math.max(f.b,c.j+c.f));return f}function kxe(t,e,n){var i,r,c,l,f,g,b,v,M,k,R;if(t.e.a.Pb(),t.f.a.Pb(),t.c.c=dt(un,te,1,0,5,1),t.i.c=dt(un,te,1,0,5,1),t.g.a.Pb(),e)for(l=new j(e.a);l.a>4)<<24>>24,M[k++]=((n&15)<<4|i>>2&15)<<24>>24,M[k++]=(i<<6|r)<<24>>24}return!N5(l=c[v++])||!N5(f=c[v++])?null:(e=af[l],n=af[f],g=c[v++],b=c[v++],af[g]==-1||af[b]==-1?g==61&&b==61?n&15?null:(G=dt(Da,G_,22,R*3+1,15,1),Aa(M,0,G,0,R*3),G[k]=(e<<2|n>>4)<<24>>24,G):g!=61&&b==61?(i=af[g],i&3?null:(G=dt(Da,G_,22,R*3+2,15,1),Aa(M,0,G,0,R*3),G[k++]=(e<<2|n>>4)<<24>>24,G[k]=((n&15)<<4|i>>2&15)<<24>>24,G)):null:(i=af[g],r=af[b],M[k++]=(e<<2|n>>4)<<24>>24,M[k++]=((n&15)<<4|i>>2&15)<<24>>24,M[k++]=(i<<6|r)<<24>>24,M))}function Pxe(t,e,n){var i,r,c,l,f,g,b,v,M,k;for(g=new Dt,M=e.length,l=Dat(n),b=0;bf&&(pt=0,_t+=l+nt,l=0),Nve($,n,pt,_t),e=y.Math.max(e,pt+G.a),l=y.Math.max(l,G.b),pt+=G.a+nt;return $}function Ixe(t,e,n){var i,r,c,l,f;switch(i=e.i,c=t.g.n,r=t.g.d,f=t.k,l=zo(Y(Z(ss,1),wt,9,0,[f,t.a])),t.i.g){case 1:qd(e,(Ga(),dh)),i.d=-r.d-n-i.a,a(a(EM(e.d).a.cd(0),271).xe((Ft(),yx)),265)==(Cu(),kd)?(Cf(e,(fu(),fh)),i.c=l.a-lt(Yt(z(t,ty)))-n-i.b):(Cf(e,(fu(),jf)),i.c=l.a+lt(Yt(z(t,ty)))+n);break;case 2:Cf(e,(fu(),jf)),i.c=c.a+r.c+n,a(a(EM(e.d).a.cd(0),271).xe((Ft(),yx)),265)==(Cu(),kd)?(qd(e,(Ga(),dh)),i.d=l.b-lt(Yt(z(t,ty)))-n-i.a):(qd(e,(Ga(),Fh)),i.d=l.b+lt(Yt(z(t,ty)))+n);break;case 3:qd(e,(Ga(),Fh)),i.d=c.b+r.a+n,a(a(EM(e.d).a.cd(0),271).xe((Ft(),yx)),265)==(Cu(),kd)?(Cf(e,(fu(),fh)),i.c=l.a-lt(Yt(z(t,ty)))-n-i.b):(Cf(e,(fu(),jf)),i.c=l.a+lt(Yt(z(t,ty)))+n);break;case 4:Cf(e,(fu(),fh)),i.c=-r.b-n-i.b,a(a(EM(e.d).a.cd(0),271).xe((Ft(),yx)),265)==(Cu(),kd)?(qd(e,(Ga(),dh)),i.d=l.b-lt(Yt(z(t,ty)))-n-i.a):(qd(e,(Ga(),Fh)),i.d=l.b+lt(Yt(z(t,ty)))+n)}}function fOt(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,N;switch(l=new yCt(t),f=fd(Xd(e,l)),we(),gc(f,new Oy),r=t.b,r.c){case 2:g=new Nb(r.a),n=HT(Xd(f,g)),a_(n)?b=a(D2(n),188).b:b=15,g=new Nb(Out(r)),n=HT(Xd(f,g)),a_(n)?c=a(D2(n),188).b:c=15,g=new Nb(r.b),n=HT(Xd(f,g)),a_(n)?v=a(D2(n),188).b:v=15,i=xbe(t,b,c,v),Ir(e,new i4(i,t.c,t.e,t.a.c.g,r.a)),Ir(e,new i4(i,t.c,t.e,t.a.c.g,Out(r))),Ir(e,new i4(i,t.c,t.e,t.a.c.g,r.b));break;case 1:g=new Nb(r.a),n=HT(Xd(f,g)),a_(n)?b=a(D2(n),188).b:b=15,g=new Nb(r.b),n=HT(Xd(f,g)),a_(n)?v=a(D2(n),188).b:v=15,i=fbe(t,b,v),Ir(e,new i4(i,t.c,t.e,t.a.c.g,r.a)),Ir(e,new i4(i,t.c,t.e,t.a.c.g,r.b));break;case 0:g=new Nb(r.a),n=HT(Xd(f,g)),a_(n)?b=a(D2(n),188).b:b=15,i=(M=t.b,k=qve(t.a.c,t.a.d,b),yo(t.a.a,Bq(k)),R=blt(t.a.b,k.a,M),N=new ML((!k.k&&(k.k=new xX(KV(k))),k.k)),tct(N),R?Rot(N,R):N),Ir(e,new i4(i,t.c,t.e,t.a.c.g,r.a));break;default:throw K(new yn("The loopside must be defined."))}return i}function Rxe(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It,Gt,Zt,ce,ae;for(di(e,"Compound graph postprocessor",1),n=lt(de(z(t,(qt(),KJ)))),f=a(z(t,(Ft(),lmt)),238),v=new $r,nt=f.Xb().tc();nt.hc();){for(G=a(nt.ic(),14),l=new Eh(f.Mc(G)),we(),gc(l,new q8(t)),It=ule((mi(0,l.c.length),a(l.c[0],234))),Zt=RPt(a(Ee(l,l.c.length-1),234)),pt=It.g,VM(Zt.g,pt)?rt=a(z(pt,xd),31):rt=Mc(pt),M=_de(G,l),ld(G.a),k=null,c=new j(l);c.aop,ae=y.Math.abs(k.b-N.b)>op,(!n&&ce&&ae||n&&(ce||ae))&&Xi(G.a,_t)),yo(G.a,i),i.b==0?k=_t:k=(Hn(i.b!=0),a(i.c.b.c,9)),Lle(R,M,$),RPt(r)==Zt&&(Mc(Zt.g)!=r.a&&($=new go,Zlt($,Mc(Zt.g),rt)),Ct(G,HJ,$)),Rge(R,G,rt),v.a.Zb(R,v);Hs(G,It),Ts(G,Zt)}for(b=v.a.Xb().tc();b.hc();)g=a(b.ic(),14),Hs(g,null),Ts(g,null);Vn(e)}function Dxe(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi;for(rt=new Gs(t.b,0),v=e.tc(),N=0,b=a(v.ic(),21).a,It=0,n=new $r,Zt=new Xa;rt.b=t.a&&(i=Zve(t,rt),v=Mh(v,i.b),_t=Mh(_t,i.d),Ut(f,new zs(rt,i)));for(ce=new Dt,b=0;b0),G.a.cd(G.c=--G.b),ae=new dl(t.b),cd(G,ae),Hn(G.b=i.n.b/2}else rt=!M;rt?(nt=a(z(i,(Ft(),Mx)),15),nt?k?c=nt:(r=a(z(i,wx),15),r?nt._b()<=r._b()?c=nt:c=r:(c=new Dt,Ct(i,wx,c))):(c=new Dt,Ct(i,Mx,c))):(r=a(z(i,(Ft(),wx)),15),r?M?c=r:(nt=a(z(i,Mx),15),nt?r._b()<=nt._b()?c=r:c=nt:(c=new Dt,Ct(i,Mx,c))):(c=new Dt,Ct(i,wx,c))),c.nc(t),Ct(t,(Ft(),OB),n),e.d==n?(Ts(e,null),n.d.c.length+n.f.c.length==0&&ds(n,null),Jle(n)):(Hs(e,null),n.d.c.length+n.f.c.length==0&&ds(n,null)),ld(e.a)}function Bxe(t){var e,n,i,r,c,l,f,g,b,v,M,k,R,N;if(zt(z(t.c,(qt(),Qi)))===zt((Ls(),Sd))||zt(z(t.c,Qi))===zt(Gc)){for(v=new j(t.c.i);v.a0&&(r=a(Ee(G.c.a,Gt-1),8),l=t.i[r.o],ce=y.Math.ceil(Hv(t.n,r,G)),c=It.a.e-G.d.d-(l.a.e+r.n.b+r.d.a)-ce),b=is,Gt0&&Zt.a.e.e-Zt.a.a-(Zt.b.e.e-Zt.b.a)<0,N=pt.a.e.e-pt.a.a-(pt.b.e.e-pt.b.a)<0&&Zt.a.e.e-Zt.a.a-(Zt.b.e.e-Zt.b.a)>0,R=pt.a.e.e+pt.b.aZt.b.e.e+Zt.a.a,_t=0,!$&&!N&&(k?c+M>0?_t=M:b-i>0&&(_t=i):R&&(c+f>0?_t=f:b-rt>0&&(_t=rt))),It.a.e+=_t,It.b&&(It.d.e+=_t),!1))}function Uxe(){var t=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F"];return t[34]='\\"',t[92]="\\\\",t[173]="\\u00ad",t[1536]="\\u0600",t[1537]="\\u0601",t[1538]="\\u0602",t[1539]="\\u0603",t[1757]="\\u06dd",t[1807]="\\u070f",t[6068]="\\u17b4",t[6069]="\\u17b5",t[8203]="\\u200b",t[8204]="\\u200c",t[8205]="\\u200d",t[8206]="\\u200e",t[8207]="\\u200f",t[8232]="\\u2028",t[8233]="\\u2029",t[8234]="\\u202a",t[8235]="\\u202b",t[8236]="\\u202c",t[8237]="\\u202d",t[8238]="\\u202e",t[8288]="\\u2060",t[8289]="\\u2061",t[8290]="\\u2062",t[8291]="\\u2063",t[8292]="\\u2064",t[8298]="\\u206a",t[8299]="\\u206b",t[8300]="\\u206c",t[8301]="\\u206d",t[8302]="\\u206e",t[8303]="\\u206f",t[65279]="\\ufeff",t[65529]="\\ufff9",t[65530]="\\ufffa",t[65531]="\\ufffb",t}function bu(){bu=P,rg=new A1("N",0,(Ht(),Tn),Tn,0),kw=new A1("EN",1,Qe,Tn,1),tb=new A1("E",2,Qe,Qe,0),eb=new A1("SE",3,fi,Qe,1),Yp=new A1("S",4,fi,fi,0),Iw=new A1("WS",5,on,fi,1),Pw=new A1("W",6,on,on,0),hp=new A1("NW",7,Tn,on,1),Zp=new A1("ENW",8,Qe,on,2),Lw=new A1("ESW",9,Qe,on,2),nb=new A1("SEN",10,fi,Tn,2),sy=new A1("SWN",11,fi,Tn,2),kx=new A1(ox,12,Wc,Wc,3),n$t=Qfe(rg,kw,tb,eb,Yp,Iw,Y(Z(cA,1),jt,129,0,[Pw,hp,Zp,Lw,nb,sy])),r$t=($b(),x_(Y(Z(un,1),te,1,5,[rg,tb,Yp,Pw]))),i$t=x_(Y(Z(un,1),te,1,5,[kw,eb,Iw,hp])),u$t=new u2(Tn),o$t=x_(Y(Z(un,1),te,1,5,[Qe,Tn])),s$t=new u2(Qe),f$t=x_(Y(Z(un,1),te,1,5,[fi,Qe])),h$t=new u2(fi),b$t=x_(Y(Z(un,1),te,1,5,[on,fi])),m$t=new u2(on),l$t=x_(Y(Z(un,1),te,1,5,[Tn,on])),c$t=x_(Y(Z(un,1),te,1,5,[Qe,Tn,on])),a$t=x_(Y(Z(un,1),te,1,5,[Qe,fi,on])),p$t=x_(Y(Z(un,1),te,1,5,[fi,on,Tn])),d$t=x_(Y(Z(un,1),te,1,5,[fi,Qe,Tn])),g$t=(yM(),O4)}function zxe(t){var e,n,i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It,Gt,Zt,ce;if(n=lt(Yt(z(t.a.j,(qt(),jmt)))),n<-1||!t.a.i||JT(a(z(t.a.o,Qi),83))||ac(t.a.o,(Ht(),Qe))._b()<2&&ac(t.a.o,on)._b()<2)return!0;if(t.a.c.pf())return!1;for(_t=0,pt=0,rt=new Dt,g=t.a.e,b=0,v=g.length;b=n}function jxe(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t;for(di(e,LBt,1),R=a(z(t,(qt(),ig)),197),r=new j(t.b);r.a=2){for(N=!0,M=new j(c.i),n=a(H(M),11);M.a0){for(k=v<100?null:new w1(v),b=new Mat(e),N=b.g,nt=dt(Gn,pi,22,v,15,1),i=0,_t=new n_(v),r=0;r=0;)if(f!=null?Fi(f,N[g]):N[g]==null){nt.length<=i&&(G=nt,nt=dt(Gn,pi,22,2*nt.length,15,1),Aa(G,0,nt,0,i)),nt[i++]=r,ni(_t,N[g]);break t}if(zt(f)===zt(f))break}}if(N=_t.g,i>nt.length&&(G=nt,nt=dt(Gn,pi,22,i,15,1),Aa(G,0,nt,0,i)),i>0){for(pt=!0,c=0;c=0;)G2(t,nt[l]);if(i!=i){for(r=i;--r>=i;)G2(_t,r);G=nt,nt=dt(Gn,pi,22,i,15,1),Aa(G,0,nt,0,i)}e=_t}}}else for(e=mpe(t,e),r=t.i;--r>=0;)e.pc(t.g[r])&&(G2(t,r),pt=!0);if(pt){if(nt!=null){for(n=e._b(),M=n==1?aC(t,4,e.tc().ic(),null,nt[0],$):aC(t,6,e,nt,nt[0],$),k=n<100?null:new w1(n),r=e.tc();r.hc();)R=r.ic(),k=zst(t,a(R,75),k);k?(k.Sh(M),k.Th()):Bi(t.e,M)}else{for(k=Ene(e._b()),r=e.tc();r.hc();)R=r.ic(),k=zst(t,a(R,75),k);k&&k.Th()}return!0}else return!1}function Gxe(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi,ls;for(di(n,"MinWidth layering",1),R=e.b,Zt=e.a,ls=a(z(e,(qt(),Qmt)),21).a,f=a(z(e,tbt),21).a,t.b=lt(Yt(z(e,nf))),t.d=is,_t=new j(Zt);_t.a<_t.c.c.length;)rt=a(H(_t),8),rt.j==(Ke(),gs)&&(Te=rt.n.b,t.d=y.Math.min(t.d,Te));for(t.d=y.Math.max(1,t.d),ce=Zt.c.length,t.c=dt(Gn,pi,22,ce,15,1),t.f=dt(Gn,pi,22,ce,15,1),t.e=dt(Os,Xo,22,ce,15,1),b=0,t.a=0,It=new j(Zt);It.a0||n.o==rf&&r0?(M=a(Ee(k.c.a,l-1),8),ce=Hv(t.b,k,M),G=k.k.b-k.d.d-(M.k.b+M.n.b+M.d.a+ce)):G=k.k.b-k.d.d,b=y.Math.min(G,b),l=1&&(ce-b>0&&N>=0?(th(M,M.i+Zt),eh(M,M.j+g*b)):ce-b<0&&R>=0&&(th(M,M.i+Zt*ce),eh(M,M.j+g)));return ga(t,HE,(c=a(xu(MA),10),new Ha(c,a(au(c,c.length),10),0))),new We(ae,v)}function qxe(t){var e,n,i,r,c,l,f,g,b,v,M,k,R,N,$,G;for($=new Dt,k=new j(t.d.b);k.ar.d.d+r.d.a?v.f.d=!0:(v.f.d=!0,v.f.a=!0))),i.b!=i.d.c&&(e=n);v&&(c=a(zi(t.f,l.d.g),57),e.bc.d.d+c.d.a?v.f.d=!0:(v.f.d=!0,v.f.a=!0))}for(f=Rn(Rs(R));Jn(f);)l=a(In(f),14),l.a.b!=0&&(e=a(pD(l.a),9),l.d.i==(Ht(),Tn)&&(G=new a4(e,new We(e.a,r.d.d),r,l),G.f.a=!0,G.a=l.d,$.c[$.c.length]=G),l.d.i==fi&&(G=new a4(e,new We(e.a,r.d.d+r.d.a),r,l),G.f.d=!0,G.a=l.d,$.c[$.c.length]=G))}return $}function Xxe(){Nit();function t(i){var r=this;this.dispatch=function(c){var l=c.data;switch(l.cmd){case"algorithms":var f=dut((we(),new Db(new vf(Ow.b))));i.postMessage({id:l.id,data:f});break;case"categories":var g=dut((we(),new Db(new vf(Ow.c))));i.postMessage({id:l.id,data:g});break;case"options":var b=dut((we(),new Db(new vf(Ow.d))));i.postMessage({id:l.id,data:b});break;case"register":uye(l.algorithms),i.postMessage({id:l.id});break;case"layout":Mbe(l.graph,l.options||{}),i.postMessage({id:l.id,data:l.graph});break}},this.saveDispatch=function(c){try{r.dispatch(c)}catch(l){delete l[vZ],i.postMessage({id:c.data.id,error:l.message})}}}function e(i){var r=this;this.dispatcher=new t({postMessage:function(c){r.onmessage({data:c})}}),this.postMessage=function(c){setTimeout(function(){r.dispatcher.saveDispatch({data:c})},0)}}if(typeof document===Gpt&&typeof self!==Gpt){var n=new t(self);self.onmessage=n.saveDispatch}else typeof m!==Gpt&&m.exports&&(Object.defineProperty(_,"__esModule",{value:!0}),m.exports={default:e,Worker:e})}function gOt(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t;if(rt=0,e.e.a==0)for(G=new j(t);G.a50?nt.c[nt.c.length]=r:r.k>0?rt.c[rt.c.length]=r:pt.c[pt.c.length]=r;if(rt.c.length==1&&nt.c.length==0&&(Or(nt,rt),rt.c=dt(un,te,1,0,5,1)),nt.c.length!=0&&Pp(BW(t.a),(bu(),rg))&&Pp(BW(t.a),(bu(),Yp))?lfe(t,nt):Or(rt,nt),rt.c.length==0||hfe(t,rt),pt.c.length!=0){if(n=OW(t.a),n.c!=0)for(v=new j(pt),g=(si(n),sst(new jEt(n).a));v.a1&&($=a(bat(g),129),zC(r,$,!0),iC(v),eAt(t.a,$))}for(k=pt.c.length,i=pve(t),R=new Dt,l=k/zrt(t.a).c|0,f=0;f3&&(Or(R,(bu(),bu(),i$t)),N-=4),N){case 3:Ut(R,SP(i));case 2:G=R7(SP(i));do G=R7(G);while(!Pp(BW(t.a),G));R.c[R.c.length]=G,G=nht(SP(i));do G=nht(G);while(!Pp(BW(t.a),G));R.c[R.c.length]=G;break;case 1:Ut(R,SP(i))}for(M=new j(R),b=new j(pt);M.a$&&(c&&(Bg(Gt,R),Bg(ce,Xt(v.b-1)),Ut(t.d,N),f.c=dt(un,te,1,0,5,1)),Pi=n.b,ls+=R+e,R=0,M=y.Math.max(M,n.b+n.c+Bn)),f.c[f.c.length]=g,dRt(g,Pi,ls),M=y.Math.max(M,Pi+Bn+n.c),R=y.Math.max(R,k),Pi+=Bn+e,N=g;if(Or(t.a,f),Ut(t.d,a(Ee(f,f.c.length-1),145)),M=y.Math.max(M,i),Me=ls+R+n.a,Me1&&(l=y.Math.min(l,y.Math.abs(a(H1(f.a,1),9).b-v.b)))));else for($=new j(e.i);$.a<$.c.c.length;)for(N=a(H($),11),g=new j(N.d);g.ar&&(c=k.a-r,l=qi,i.c=dt(un,te,1,0,5,1),r=k.a),k.a>=r&&(i.c[i.c.length]=f,f.a.b>1&&(l=y.Math.min(l,y.Math.abs(a(H1(f.a,f.a.b-2),9).b-k.b)))));if(i.c.length!=0&&c>e.n.a/2&&l>e.n.b/2){for(R=new Eo,ds(R,e),yr(R,(Ht(),Tn)),R.k.a=e.n.a/2,nt=new Eo,ds(nt,e),yr(nt,fi),nt.k.a=e.n.a/2,nt.k.b=e.n.b,g=new j(i);g.a=b.b?Hs(f,nt):Hs(f,R)):(b=a(lre(f.a),9),G=f.a.b==0?Yl(f.c):a(pD(f.a),9),G.b>=b.b?Ts(f,nt):Ts(f,R)),M=a(z(f,(qt(),Ro)),74),M&&z2(M,b,!0);e.k.a=r-e.n.a/2}}function t3e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It;for(f=new j(t.a.b);f.a0)if(i=M._b(),b=Tr(y.Math.floor((i+1)/2))-1,r=Tr(y.Math.ceil((i+1)/2))-1,e.o==rf)for(v=r;v>=b;v--)e.a[_t.o]==_t&&($=a(M.cd(v),48),N=a($.a,8),!AT(n,$.b)&&R>t.b.e[N.o]&&(e.a[N.o]=_t,e.g[_t.o]=e.g[N.o],e.a[_t.o]=e.g[_t.o],e.f[e.g[_t.o].o]=(me(),!!(lt(e.f[e.g[_t.o].o])&_t.j==(Ke(),Hr))),R=t.b.e[N.o]));else for(v=b;v<=r;v++)e.a[_t.o]==_t&&(nt=a(M.cd(v),48),G=a(nt.a,8),!AT(n,nt.b)&&R=48&&e<=57){for(i=e-48;r=48&&e<=57;)if(i=i*10+e-48,i<0)throw K(new ri(ai((Kn(),Zpt))))}else throw K(new ri(ai((Kn(),gUt))));if(n=i,e==44){if(r>=t.j)throw K(new ri(ai((Kn(),bUt))));if((e=bo(t.i,r++))>=48&&e<=57){for(n=e-48;r=48&&e<=57;)if(n=n*10+e-48,n<0)throw K(new ri(ai((Kn(),Zpt))));if(i>n)throw K(new ri(ai((Kn(),wUt))))}else n=-1}if(e!=125)throw K(new ri(ai((Kn(),mUt))));t.Ck(r)?(c=(Ai(),Ai(),++Ar,new Yb(9,c)),t.d=r+1):(c=(Ai(),Ai(),++Ar,new Yb(3,c)),t.d=r),c.nl(i),c.ml(n),Ci(t)}}return c}function e3e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te;return M=g_e(fa(t,(Ht(),Lvt)),e),N=g_(fa(t,sI),e),_t=g_(fa(t,oI),e),ce=m7(fa(t,cI),e),k=m7(fa(t,rI),e),rt=g_(fa(t,Ox),e),$=g_(fa(t,fy),e),Gt=g_(fa(t,dy),e),It=g_(fa(t,hy),e),ae=m7(fa(t,ab),e),nt=g_(fa(t,M0),e),pt=g_(fa(t,Cd),e),Zt=g_(fa(t,zf),e),Te=m7(fa(t,Ad),e),R=m7(fa(t,Td),e),G=g_(fa(t,YQ),e),n=i_(Y(Z(Os,1),Xo,22,15,[rt.a,ce.a,Gt.a,Te.a])),i=i_(Y(Z(Os,1),Xo,22,15,[N.a,M.a,_t.a,G.a])),r=nt.a,c=i_(Y(Z(Os,1),Xo,22,15,[$.a,k.a,It.a,R.a])),b=i_(Y(Z(Os,1),Xo,22,15,[rt.b,N.b,$.b,pt.b])),g=i_(Y(Z(Os,1),Xo,22,15,[ce.b,M.b,k.b,G.b])),v=ae.b,f=i_(Y(Z(Os,1),Xo,22,15,[Gt.b,_t.b,It.b,Zt.b])),L1(fa(t,Lvt),n+r,b+v),L1(fa(t,YQ),n+r,b+v),L1(fa(t,sI),n+r,0),L1(fa(t,oI),n+r,b+v+g),L1(fa(t,cI),0,b+v),L1(fa(t,rI),n+r+i,b+v),L1(fa(t,fy),n+r+i,0),L1(fa(t,dy),0,b+v+g),L1(fa(t,hy),n+r+i,b+v+g),L1(fa(t,ab),0,b),L1(fa(t,M0),n,0),L1(fa(t,zf),0,b+v+g),L1(fa(t,Td),n+r+i,0),l=new go,l.a=i_(Y(Z(Os,1),Xo,22,15,[n+i+r+c,ae.a,pt.a,Zt.a])),l.b=i_(Y(Z(Os,1),Xo,22,15,[b+g+v+f,nt.b,Te.b,R.b])),l}function Ic(){Ic=P,s3t(),Iqt=ms.a,a(at(Et(ms.a),0),17),Lqt=ms.f,a(at(Et(ms.f),0),17),a(at(Et(ms.f),1),29),Pqt=ms.n,a(at(Et(ms.n),0),29),a(at(Et(ms.n),1),29),a(at(Et(ms.n),2),29),a(at(Et(ms.n),3),29),Uvt=ms.g,a(at(Et(ms.g),0),17),a(at(Et(ms.g),1),29),kqt=ms.c,a(at(Et(ms.c),0),17),a(at(Et(ms.c),1),17),zvt=ms.i,a(at(Et(ms.i),0),17),a(at(Et(ms.i),1),17),a(at(Et(ms.i),2),17),a(at(Et(ms.i),3),17),a(at(Et(ms.i),4),29),jvt=ms.j,a(at(Et(ms.j),0),17),Fvt=ms.d,a(at(Et(ms.d),0),17),a(at(Et(ms.d),1),17),a(at(Et(ms.d),2),17),a(at(Et(ms.d),3),17),a(at(Et(ms.d),4),29),a(at(Et(ms.d),5),29),a(at(Et(ms.d),6),29),a(at(Et(ms.d),7),29),Aqt=ms.b,a(at(Et(ms.b),0),29),a(at(Et(ms.b),1),29),UF=ms.e,a(at(Et(ms.e),0),29),a(at(Et(ms.e),1),29),a(at(Et(ms.e),2),29),a(at(Et(ms.e),3),29),a(at(Et(ms.e),4),17),a(at(Et(ms.e),5),17),a(at(Et(ms.e),6),17),a(at(Et(ms.e),7),17),a(at(Et(ms.e),8),17),a(at(Et(ms.e),9),17),a(at(Et(ms.e),10),29),pp=ms.k,a(at(Et(ms.k),0),29),a(at(Et(ms.k),1),29)}function n3e(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me;for(ae=new Fr,Gt=new Fr,G=-1,g=new j(t);g.a=N&&(rt>N&&(R.c=dt(un,te,1,0,5,1),N=rt),R.c[R.c.length]=l);R.c.length!=0&&(k=a(Ee(R,$q(e,R.c.length)),125),Me.a.$b(k)!=null,k.p=$++,Qlt(k,ae,Gt),R.c=dt(un,te,1,0,5,1))}for(_t=t.c.length+1,f=new j(t);f.aTe.p&&(Th(n),Lc(Te.g,i),i.c>0&&(i.a=Te,Ut(Te.q,i),i.b=Zt,Ut(Zt.g,i)))}function i3e(t,e,n){var i,r,c,l,f,g,b,v,M;if(di(n,"Network simplex node placement",1),t.e=e,t.n=a(z(e,(Ft(),yw)),266),oye(t),L1e(t),qc(Yh(new gi(null,new Ei(t.e.b,16)),new Lk),new zH(t)),qc(wo(Yh(wo(Yh(new gi(null,new Ei(t.e.b,16)),new vv),new Zy),new w),new S),new UH(t)),lt(de(z(t.e,(qt(),Q4))))&&(l=Ta(n,1),di(l,"Straight Edges Pre-Processing",1),U2e(t),Vn(l)),Nde(t.f),c=a(z(e,F6),21).a*t.f.a.c.length,HX(Fit(Uit(l$(t.f),c),!1),Ta(n,1)),t.d.a._b()!=0){for(l=Ta(n,1),di(l,"Flexible Where Space Processing",1),f=a(GW(eP(Vh(new gi(null,new Ei(t.f.a,16)),new f1),(En(new Tg),new wn))),21).a,g=a(GW(ZCt(Vh(new gi(null,new Ei(t.f.a,16)),new BS),new pc)),21).a,b=g-f,v=hm(new Ng,t.f),M=hm(new Ng,t.f),ih($l(Wl(Gl(Vl(new cl,2e4),b),v),M)),qc(wo(wo(Tot(t.i),new k3),new L3),new T4t(f,v,b,M)),r=t.d.a.Xb().tc();r.hc();)i=a(r.ic(),189),i.g=1;HX(Fit(Uit(l$(t.f),c),!1),Ta(l,1)),Vn(l)}lt(de(z(e,Q4)))&&(l=Ta(n,1),di(l,"Straight Edges Post-Processing",1),o0e(t),Vn(l)),_2e(t),t.e=null,t.f=null,t.i=null,t.c=null,lu(t.k),t.j=null,t.a=null,t.o=null,t.d.a.Pb(),Vn(n)}function mOt(t,e,n,i,r){var c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me;for($=new qu(e.b),_t=new qu(e.b),k=new qu(e.b),ce=new qu(e.b),G=new qu(e.b),Zt=qn(e,0);Zt.b!=Zt.d.c;)for(It=a(Yn(Zt),11),f=new j(It.f);f.a0,nt=It.f.c.length>0,b&&nt?k.c[k.c.length]=It:b?$.c[$.c.length]=It:nt&&(_t.c[_t.c.length]=It);for(N=new j($);N.a=0&&le(t.substr(f,2),"//")?(f+=2,g=Aq(t,f,AA,kA),i=t.substr(f,g-f),f=g):M!=null&&(f==t.length||t.charCodeAt(f)!=47)&&(l=!1,g=Wrt(t,Ca(35),f),g==-1&&(g=t.length),i=t.substr(f,g-f),f=g);if(!n&&f0&&bo(v,v.length-1)==58&&(r=v,f=g)),f=k&&(_t>k&&(M.c=dt(un,te,1,0,5,1),k=_t),M.c[M.c.length]=G);M.c.length!=0&&(v=a(Ee(M,$q(e,M.c.length)),165),oC(Pi.a,v)!=null,v.d=R++,Jlt(v,Me,ce),M.c=dt(un,te,1,0,5,1))}for(Gt=t.c.length+1,nt=new j(t);nt.aBn.d&&(Th(n),Lc(Bn.b,i),i.c>0&&(i.a=Bn,Ut(Bn.e,i),i.b=ae,Ut(ae.b,i)))}function c3e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me;for(rt=new Nv,pt=new Nv,v=_m(e,Npt),i=new I4t(t,n,rt,pt),Gge(i.a,i.b,i.c,i.d,v),g=(Gt=rt.i,Gt||(rt.i=ct(rt.c,122)?new Dv(rt,a(rt.c,122)):ct(rt.c,115)?new p2(rt,a(rt.c,115)):new pM(rt,rt.c))),ce=g.tc();ce.hc();)for(Zt=a(ce.ic(),270),r=a(rr(rt,Zt),19),$=r.tc();$.hc();)if(N=$.ic(),_t=a(kp(t.d,N),270),_t)f=(!Zt.e&&(Zt.e=new pn(os,Zt,10,9)),Zt.e),ni(f,_t);else throw l=Jd(e,Df),k=VFt+N+qFt+l,R=k+xE,K(new xf(R));for(b=(It=pt.i,It||(pt.i=ct(pt.c,122)?new Dv(pt,a(pt.c,122)):ct(pt.c,115)?new p2(pt,a(pt.c,115)):new pM(pt,pt.c))),Te=b.tc();Te.hc();)for(ae=a(Te.ic(),270),c=a(rr(pt,ae),19),nt=c.tc();nt.hc();)if(G=nt.ic(),_t=a(kp(t.d,G),270),_t)M=(!ae.g&&(ae.g=new pn(os,ae,9,10)),ae.g),ni(M,_t);else throw l=Jd(e,Df),k=VFt+G+qFt+l,R=k+xE,K(new xf(R));!n.b&&(n.b=new pn(Si,n,4,7)),n.b.i!=0&&(!n.c&&(n.c=new pn(Si,n,5,8)),n.c.i!=0)&&(!n.b&&(n.b=new pn(Si,n,4,7)),n.b.i<=1&&(!n.c&&(n.c=new pn(Si,n,5,8)),n.c.i<=1))&&(!n.a&&(n.a=new Wt(os,n,6,6)),n.a).i==1&&(Me=a(at((!n.a&&(n.a=new Wt(os,n,6,6)),n.a),0),270),!Vq(Me)&&!qq(Me)&&(pat(Me,a(at((!n.b&&(n.b=new pn(Si,n,4,7)),n.b),0),97)),gat(Me,a(at((!n.c&&(n.c=new pn(Si,n,5,8)),n.c),0),97))))}function bOt(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It,Gt,Zt,ce;for(t.d=new We(is,is),t.c=new We(Ps,Ps),k=e.tc();k.hc();)for(v=a(k.ic(),31),pt=new j(v.a);pt.a=It||!fhe(nt,i))&&(i=SAt(e,v)),Ks(nt,i),c=Rn(Rs(nt));Jn(c);)r=a(In(c),14),!t.a[r.o]&&($=r.c.g,--t.e[$.o],t.e[$.o]==0&&RM(JM(R,$)));for(b=v.c.length-1;b>=0;--b)Ut(e.b,(mi(b,v.c.length),a(v.c[b],26)));e.a.c=dt(un,te,1,0,5,1),Vn(n)}function l3e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi,ls,ru,wa,e1,Ou,fg,L0,uf,mh;if(Me=lkt(t,wkt(n),e),HL(Me,Jd(e,Df)),Bn=a(kp(t.g,V2(Gg(e,ZY))),35),k=Gg(e,"sourcePort"),i=null,k&&(i=V2(k)),Pi=a(kp(t.j,i),121),!Bn)throw f=BC(e),N="An edge must have a source node (edge id: '"+f,$=N+xE,K(new xf($));if(Pi&&!Rp(Tf(Pi),Bn))throw g=Jd(e,Df),G="The source port of an edge must be a port of the edge's source node (edge id: '"+g,nt=G+xE,K(new xf(nt));if(ce=(!Me.b&&(Me.b=new pn(Si,Me,4,7)),Me.b),Pi?c=Pi:c=Bn,ni(ce,c),ls=a(kp(t.g,V2(Gg(e,Hpt))),35),R=Gg(e,"targetPort"),r=null,R&&(r=V2(R)),ru=a(kp(t.j,r),121),!ls)throw M=BC(e),rt="An edge must have a target node (edge id: '"+M,pt=rt+xE,K(new xf(pt));if(ru&&!Rp(Tf(ru),ls))throw b=Jd(e,Df),_t="The target port of an edge must be a port of the edge's target node (edge id: '"+b,It=_t+xE,K(new xf(It));if(ae=(!Me.c&&(Me.c=new pn(Si,Me,5,8)),Me.c),ru?l=ru:l=ls,ni(ae,l),(!Me.b&&(Me.b=new pn(Si,Me,4,7)),Me.b).i==0||(!Me.c&&(Me.c=new pn(Si,Me,5,8)),Me.c).i==0)throw v=Jd(e,Df),Gt=$Ft+v,Zt=Gt+xE,K(new xf(Zt));return w7(e,Me),wa=T_(Me,!0,!0),e1=yL(e,"sourcePoint"),Ou=new uG(wa),Tfe(Ou.a,e1),fg=yL(e,"targetPoint"),L0=new pG(wa),Cfe(L0.a,fg),uf=_m(e,eK),mh=new gG(wa),k1e(mh.a,uf),Te=qV(t,e,Me),Te}function lZ(t,e){KX();var n,i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn;if(Zt=t.e,R=t.d,r=t.a,Zt==0)switch(e){case 0:return"0";case 1:return lE;case 2:return"0.00";case 3:return"0.000";case 4:return"0.0000";case 5:return"0.00000";case 6:return"0.000000";default:return It=new om,e<0?It.a+="0E+":It.a+="0E",It.a+=-e,It.a}if(rt=R*10+1+7,pt=dt(nl,Pf,22,rt+1,15,1),n=rt,R==1)if(l=r[0],l<0){Bn=ns(l,uo);do N=Bn,Bn=fP(Bn,10),pt[--n]=48+or(Yg(N,Zg(Bn,10)))&qr;while(Pc(Bn,0)!=0)}else{Bn=l;do N=Bn,Bn=Bn/10|0,pt[--n]=48+(N-Bn*10)&qr;while(Bn!=0)}else{ae=dt(Gn,pi,22,R,15,1),Me=R,Aa(r,0,ae,0,R);t:for(;;){for(Gt=0,g=Me-1;g>=0;g--)Te=so(Yd(Gt,32),ns(ae[g],uo)),G=Jpe(Te),ae[g]=or(G),Gt=or(E1(G,32));nt=or(Gt),$=n;do pt[--n]=48+nt%10&qr;while((nt=nt/10|0)!=0&&n!=0);for(i=9-$+n,f=0;f0;f++)pt[--n]=48;for(v=Me-1;ae[v]==0;v--)if(v==0)break t;Me=v+1}for(;pt[n]==48;)++n}if(k=Zt<0,c=rt-n-e-1,e==0)return k&&(pt[--n]=45),ml(pt,n,rt-n);if(e>0&&c>=-6){if(c>=0){for(b=n+c,M=rt-1;M>=b;M--)pt[M+1]=pt[M];return pt[++b]=46,k&&(pt[--n]=45),ml(pt,n,rt-n+1)}for(v=2;v<-c+1;v++)pt[--n]=48;return pt[--n]=46,pt[--n]=48,k&&(pt[--n]=45),ml(pt,n,rt-n)}return ce=n+1,_t=new Bb,k&&(_t.a+="-"),rt-ce>=1?(S1(_t,pt[n]),_t.a+=".",_t.a+=ml(pt,n+1,rt-n-1)):_t.a+=ml(pt,n,rt-n),_t.a+="E",c>0&&(_t.a+="+"),_t.a+=""+c,_t.a}function h3e(t,e,n,i){var r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi,ls,ru,wa,e1,Ou,fg,L0,uf;if(pt=a(at((!t.b&&(t.b=new pn(Si,t,4,7)),t.b),0),97),It=pt.Yf(),Gt=pt.Zf(),_t=pt.Xf()/2,$=pt.Wf()/2,ct(pt,187)&&(rt=a(pt,121),It+=Tf(rt).i,It+=Tf(rt).i),It+=_t,Gt+=$,Me=a(at((!t.b&&(t.b=new pn(Si,t,4,7)),t.b),0),97),Pi=Me.Yf(),ls=Me.Zf(),Bn=Me.Xf()/2,Zt=Me.Wf()/2,ct(Me,187)&&(Te=a(Me,121),Pi+=Tf(Te).i,Pi+=Tf(Te).i),Pi+=Bn,ls+=Zt,(!t.a&&(t.a=new Wt(os,t,6,6)),t.a).i==0)f=(am(),b=new O3,b),ni((!t.a&&(t.a=new Wt(os,t,6,6)),t.a),f);else if((!t.a&&(t.a=new Wt(os,t,6,6)),t.a).i>1)for(N=new XT((!t.a&&(t.a=new Wt(os,t,6,6)),t.a));N.e!=N.i._b();)VC(N);for(l=a(at((!t.a&&(t.a=new Wt(os,t,6,6)),t.a),0),270),G=Pi,Pi>It+_t?G=It+_t:PiGt+$?nt=Gt+$:lsIt-_t&&GGt-$&&ntPi+Bn?ce=Pi+Bn:Itls+Zt?ae=ls+Zt:GtPi-Bn&&cels-Zt&&aen&&(k=n-1),R=fg+gu(e,24)*$P*M-M/2,R<0?R=1:R>i&&(R=i-1),r=(am(),g=new N3,g),OV(r,k),BV(r,R),ni((!l.a&&(l.a=new Ss(sf,l,5)),l.a),r)}function wOt(t,e){var n,i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt;for(i=new Dt,f=new Dt,G=e/2,R=t._b(),r=a(t.cd(0),9),nt=a(t.cd(1),9),N=AX(r.a,r.b,nt.a,nt.b,G),Ut(i,(mi(0,N.c.length),a(N.c[0],9))),Ut(f,(mi(1,N.c.length),a(N.c[1],9))),b=2;b=0;g--)Xi(n,(mi(g,l.c.length),a(l.c[g],9)));return n}function f3e(t){var e,n,i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn;if(Zt=a(z(t,(qt(),Qi)),83),Zt!=(Ls(),dp)&&Zt!=ob){for(N=t.b,R=N.c.length,v=new qu((Ah(R+2,bZ),BL(so(so(5,R+2),(R+2)/10|0)))),$=new qu((Ah(R+2,bZ),BL(so(so(5,R+2),(R+2)/10|0)))),Ut(v,new vi),Ut(v,new vi),Ut($,new Dt),Ut($,new Dt),Gt=new Dt,e=0;eMe?M:Me;for(i=new j(ae.f);i.aMe?ce:Me}Ct(_t,oF,Xt(M)),Ct(_t,cF,Xt(ce))}for(nt=0,R=new j(e.b);R.a=t.j){t.a=-1,t.c=1;return}if(e=bo(t.i,t.d++),t.a=e,t.b==1){switch(e){case 92:if(i=10,t.d>=t.j)throw K(new ri(ai((Kn(),LO))));t.a=bo(t.i,t.d++);break;case 45:(t.e&512)==512&&t.d=t.j||bo(t.i,t.d)!=63)break;if(++t.d>=t.j)throw K(new ri(ai((Kn(),sK))));switch(e=bo(t.i,t.d++),e){case 58:i=13;break;case 61:i=14;break;case 33:i=15;break;case 91:i=19;break;case 62:i=18;break;case 60:if(t.d>=t.j)throw K(new ri(ai((Kn(),sK))));if(e=bo(t.i,t.d++),e==61)i=16;else if(e==33)i=17;else throw K(new ri(ai((Kn(),KFt))));break;case 35:for(;t.d=t.j)throw K(new ri(ai((Kn(),LO))));t.a=bo(t.i,t.d++);break;default:i=0}t.c=i}function vOt(t){var e,n,i,r,c,l,f,g,b;for(t.b=1,Ci(t),e=null,t.c==0&&t.a==94?(Ci(t),e=(Ai(),Ai(),++Ar,new Su(4)),jc(e,0,EE),f=(++Ar,new Su(4))):f=(Ai(),Ai(),++Ar,new Su(4)),r=!0;(b=t.c)!=1;){if(b==0&&t.a==93&&!r){e&&(h4(e,f),f=e);break}if(n=t.a,i=!1,b==10)switch(n){case 100:case 68:case 119:case 87:case 115:case 83:uw(f,rE(n)),i=!0;break;case 105:case 73:case 99:case 67:n=(uw(f,rE(n)),-1),i=!0;break;case 112:case 80:if(g=Ilt(t,n),!g)throw K(new ri(ai((Kn(),oK))));uw(f,g),i=!0;break;default:n=fht(t)}else if(b==24&&!r){if(e&&(h4(e,f),f=e),c=vOt(t),h4(f,c),t.c!=0||t.a!=93)throw K(new ri(ai((Kn(),cUt))));break}if(Ci(t),!i){if(b==0){if(n==91)throw K(new ri(ai((Kn(),qpt))));if(n==93)throw K(new ri(ai((Kn(),Xpt))));if(n==45&&!r&&t.a!=93)throw K(new ri(ai((Kn(),cK))))}if(t.c!=0||t.a!=45||n==45&&r)jc(f,n,n);else{if(Ci(t),(b=t.c)==1)throw K(new ri(ai((Kn(),PO))));if(b==0&&t.a==93)jc(f,n,n),jc(f,45,45);else{if(b==0&&t.a==93||b==24)throw K(new ri(ai((Kn(),cK))));if(l=t.a,b==0){if(l==91)throw K(new ri(ai((Kn(),qpt))));if(l==93)throw K(new ri(ai((Kn(),Xpt))));if(l==45)throw K(new ri(ai((Kn(),cK))))}else b==10&&(l=fht(t));if(Ci(t),n>l)throw K(new ri(ai((Kn(),lUt))));jc(f,n,l)}}}r=!1}if(t.c==1)throw K(new ri(ai((Kn(),PO))));return M_(f),l4(f),t.b=0,Ci(t),f}function p3e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi,ls,ru,wa;for(di(n,"Greedy cycle removal",1),rt=e.a,wa=rt.c.length,t.a=dt(Gn,pi,22,wa,15,1),t.c=dt(Gn,pi,22,wa,15,1),t.b=dt(Gn,pi,22,wa,15,1),g=0,G=new j(rt);G.a0?Te+1:1);for(c=new j(It.f);c.a0?Te+1:1)}t.c[g]==0?Xi(t.d,N):t.a[g]==0&&Xi(t.e,N),++g}for(R=-1,k=1,v=new Dt,Me=a(z(e,(Ft(),NE)),214);wa>0;){for(;t.d.b!=0;)Pi=a(g$(t.d),8),t.b[Pi.o]=R--,Tht(t,Pi),--wa;for(;t.e.b!=0;)ls=a(g$(t.e),8),t.b[ls.o]=k++,Tht(t,ls),--wa;if(wa>0){for(M=Vs,nt=new j(rt);nt.a=M&&(pt>M&&(v.c=dt(un,te,1,0,5,1),M=pt),v.c[v.c.length]=N));b=a(Ee(v,$q(Me,v.c.length)),8),t.b[b.o]=k++,Tht(t,b),--wa}}for(Bn=rt.c.length+1,g=0;gt.b[ru]&&(X1(i,!0),Ct(e,FB,(me(),me(),!0)));t.a=null,t.c=null,t.b=null,ld(t.e),ld(t.d),Vn(n)}function g3e(t){Xn(t.c,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#decimal"])),Xn(t.d,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#integer"])),Xn(t.e,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#boolean"])),Xn(t.f,ui,Y(Z(At,1),wt,2,6,[Ns,"EBoolean",Ti,"EBoolean:Object"])),Xn(t.i,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#byte"])),Xn(t.g,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#hexBinary"])),Xn(t.j,ui,Y(Z(At,1),wt,2,6,[Ns,"EByte",Ti,"EByte:Object"])),Xn(t.n,ui,Y(Z(At,1),wt,2,6,[Ns,"EChar",Ti,"EChar:Object"])),Xn(t.t,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#double"])),Xn(t.u,ui,Y(Z(At,1),wt,2,6,[Ns,"EDouble",Ti,"EDouble:Object"])),Xn(t.F,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#float"])),Xn(t.G,ui,Y(Z(At,1),wt,2,6,[Ns,"EFloat",Ti,"EFloat:Object"])),Xn(t.I,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#int"])),Xn(t.J,ui,Y(Z(At,1),wt,2,6,[Ns,"EInt",Ti,"EInt:Object"])),Xn(t.N,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#long"])),Xn(t.O,ui,Y(Z(At,1),wt,2,6,[Ns,"ELong",Ti,"ELong:Object"])),Xn(t.Z,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#short"])),Xn(t.$,ui,Y(Z(At,1),wt,2,6,[Ns,"EShort",Ti,"EShort:Object"])),Xn(t._,ui,Y(Z(At,1),wt,2,6,[Ns,"http://www.w3.org/2001/XMLSchema#string"]))}function Qht(t,e,n,i){var r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi;if(SNt(e),g=a(at((!e.b&&(e.b=new pn(Si,e,4,7)),e.b),0),97),v=a(at((!e.c&&(e.c=new pn(Si,e,5,8)),e.c),0),97),f=zc(g),b=zc(v),l=(!e.a&&(e.a=new Wt(os,e,6,6)),e.a).i==0?null:a(at((!e.a&&(e.a=new Wt(os,e,6,6)),e.a),0),270),Zt=a(zi(t.a,f),8),Me=a(zi(t.a,b),8),ce=null,Bn=null,ct(g,187)&&(Gt=a(zi(t.a,g),279),ct(Gt,11)?ce=a(Gt,11):ct(Gt,8)&&(Zt=a(Gt,8),ce=a(Ee(Zt.i,0),11))),ct(v,187)&&(Te=a(zi(t.a,v),279),ct(Te,11)?Bn=a(Te,11):ct(Te,8)&&(Me=a(Te,8),Bn=a(Ee(Me.i,0),11))),!Zt||!Me)return null;for($=new Np,Uo($,e),Ct($,(Ft(),li),e),Ct($,(qt(),Ro),null),R=a(z(i,Qc),19),Zt==Me&&R.nc((So(),C6)),ce||(It=(Fo(),ba),ae=null,l&&Gd(a(z(Zt,Qi),83))&&(ae=new We(l.j,l.k),xkt(ae,nN(e)),Wkt(ae,n),vC(b,f)&&(It=Wa,sr(ae,Zt.k))),ce=h7t(Zt,ae,It,i)),Bn||(It=(Fo(),Wa),Pi=null,l&&Gd(a(z(Me,Qi),83))&&(Pi=new We(l.b,l.c),xkt(Pi,nN(e)),Wkt(Pi,n)),Bn=h7t(Me,Pi,It,Mc(Me))),Hs($,ce),Ts($,Bn),k=new $n((!e.n&&(e.n=new Wt(ic,e,1,7)),e.n));k.e!=k.i._b();)if(M=a(ci(k),137),!lt(de(cn(M,v0)))&&M.a)switch(G=_q(M),Ut($.b,G),a(z(G,ng),226).g){case 2:case 3:R.nc((So(),RE));break;case 1:case 0:R.nc((So(),IE)),Ct(G,ng,(ip(),bA))}if(c=a(z(i,OE),317),nt=a(z(i,YB),292),r=c==(P2(),E6)||nt==(GC(),iQ),l&&(!l.a&&(l.a=new Ss(sf,l,5)),l.a).i!=0&&r){for(rt=mP(l),N=new qa,_t=qn(rt,0);_t.b!=_t.d.c;)pt=a(Yn(_t),9),Xi(N,new Oo(pt));Ct($,fmt,N)}return $}function tft(t,e,n,i,r,c){var l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi;for(f=a(Ee(t.d.c.b,i),26),Me=new $r,R=new $r,k=0;kn&&(ce=R.a.Zb(nt,R),ce==null);for(Bn=new $r,N=new $r,pt=Me.a.Xb().tc();pt.hc();)for(nt=a(pt.ic(),8),l=e==1?br(nt):Rs(nt),b=(Ao(),new $d(id(Zd(l.a,new X))));Jn(b);)g=a(In(b),14),ql(nt.c)!=ql(g.d.g.c)&&Ir(Bn,g.d.g);for(_t=R.a.Xb().tc();_t.hc();)for(nt=a(_t.ic(),8),l=e==1?br(nt):Rs(nt),b=(Ao(),new $d(id(Zd(l.a,new X))));Jn(b);)g=a(In(b),14),ql(nt.c)!=ql(g.d.g.c)&&Ir(N,g.d.g);for(nHt&&rd(),Zt=a(Ee(t.d.c.b,i+(e==1?1:-1)),26),$=Vs,G=qi,M=0;MM?$:M:N.a.Qb(nt)&&(G=GM&&(Me=0,Bn+=v+Zt,v=0),Bbe(It,l,Me,Bn),e=y.Math.max(e,Me+Gt.a),v=y.Math.max(v,Gt.b),Me+=Gt.a+Zt;for(_t=new vi,n=new vi,ae=new j(t);ae.a=2){for(k=!0,rt=(mi(1,M.c.length),a(M.c[1],26)),$=new j(l.a);$.a<$.c.c.length;){if(R=a(H($),8),zt(z(R,(qt(),la)))===zt((bl(),Ex))){k=!1;break}for(r=Rn(br(R));Jn(r);)if(i=a(In(r),14),i.d.g.c==rt){k=!1;break}if(!k)break}if(k){for(nt=a(xo(l.a,dt(Cl,Ih,8,l.a.c.length,0,1)),123),N=0,G=nt.length;N=2){for(k=!0,pt=a(Ee(M,M.c.length-2),26),$=new j(g.a);$.a<$.c.c.length;){if(R=a(H($),8),zt(z(R,(qt(),la)))===zt((bl(),Ex))){k=!1;break}for(r=Rn(Rs(R));Jn(r);)if(i=a(In(r),14),i.c.g.c==pt){k=!1;break}if(!k)break}if(k){for(nt=a(xo(g.a,dt(Cl,Ih,8,g.a.c.length,0,1)),123),N=0,G=nt.length;NkX(c))&&(M=c);for(!M&&(M=(mi(0,G.c.length),a(G.c[0],164))),$=new j(e.b);$.a<$.c.c.length;)for(N=a(H($),26),_t=new j(N.a);_t.a<_t.c.c.length;)pt=a(H(_t),8),pt.k.b=lt(M.p[pt.o])+lt(M.d[pt.o]);for(t.a&&(rd(),""+Q9t(M),""+n0e(M)),l=new j(G);l.a0?(N=(It+1)*t.d,N=0&&(bh+=(It+2)*t.d)}pt=Te,f=g}while(Te);for(r=new j(t.j);r.a=-1900?1:0,n>=4?Ii(t,Y(Z(At,1),wt,2,6,[OOt,BOt])[f]):Ii(t,Y(Z(At,1),wt,2,6,["BC","AD"])[f]);break;case 121:lde(t,n,i);break;case 77:Ave(t,n,i);break;case 107:g=r.q.getHours(),g==0?dd(t,24,n):dd(t,g,n);break;case 83:bbe(t,n,r);break;case 69:v=i.q.getDay(),n==5?Ii(t,Y(Z(At,1),wt,2,6,["S","M","T","W","T","F","S"])[v]):n==4?Ii(t,Y(Z(At,1),wt,2,6,[IZ,RZ,DZ,NZ,OZ,BZ,FZ])[v]):Ii(t,Y(Z(At,1),wt,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[v]);break;case 97:r.q.getHours()>=12&&r.q.getHours()<24?Ii(t,Y(Z(At,1),wt,2,6,["AM","PM"])[1]):Ii(t,Y(Z(At,1),wt,2,6,["AM","PM"])[0]);break;case 104:M=r.q.getHours()%12,M==0?dd(t,12,n):dd(t,M,n);break;case 75:k=r.q.getHours()%12,dd(t,k,n);break;case 72:R=r.q.getHours(),dd(t,R,n);break;case 99:N=i.q.getDay(),n==5?Ii(t,Y(Z(At,1),wt,2,6,["S","M","T","W","T","F","S"])[N]):n==4?Ii(t,Y(Z(At,1),wt,2,6,[IZ,RZ,DZ,NZ,OZ,BZ,FZ])[N]):n==3?Ii(t,Y(Z(At,1),wt,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[N]):dd(t,N,1);break;case 76:$=i.q.getMonth(),n==5?Ii(t,Y(Z(At,1),wt,2,6,["J","F","M","A","M","J","J","A","S","O","N","D"])[$]):n==4?Ii(t,Y(Z(At,1),wt,2,6,[yZ,xZ,MZ,EZ,ex,SZ,TZ,CZ,AZ,kZ,LZ,PZ])[$]):n==3?Ii(t,Y(Z(At,1),wt,2,6,["Jan","Feb","Mar","Apr",ex,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"])[$]):dd(t,$+1,n);break;case 81:G=i.q.getMonth()/3|0,n<4?Ii(t,Y(Z(At,1),wt,2,6,["Q1","Q2","Q3","Q4"])[G]):Ii(t,Y(Z(At,1),wt,2,6,["1st quarter","2nd quarter","3rd quarter","4th quarter"])[G]);break;case 100:nt=i.q.getDate(),dd(t,nt,n);break;case 109:b=r.q.getMinutes(),dd(t,b,n);break;case 115:l=r.q.getSeconds(),dd(t,l,n);break;case 122:n<4?Ii(t,c.c[0]):Ii(t,c.c[1]);break;case 118:Ii(t,c.b);break;case 90:n<3?Ii(t,P0e(c)):n==3?Ii(t,N0e(c)):Ii(t,O0e(c.a));break;default:return!1}return!0}function nft(){nft=P;var t;vmt=(t=a(xu(vJ),10),new Ha(t,a(au(t,t.length),10),0)),RHt=new bn(Xft,vmt),XHt=new bn(Zft,(me(),me(),!1)),Tmt=(hN(),RJ),JHt=new bn(pO,Tmt),fGt=new bn(Yft,!1),dGt=new bn(Kft,!0),Xt(1),RGt=new bn(Jft,Xt(7)),DGt=new bn(Qft,!1),TGt=new bn(tdt,!1),xmt=(NN(),yJ),UHt=new bn(fY,xmt),kmt=(x7(),tQ),lGt=new bn(e6,kmt),Cmt=(bl(),Ex),iGt=new bn(edt,Cmt),Lmt=(F2(),$6),hGt=new bn(ndt,Lmt),Xt(-1),rGt=new bn(dY,Xt(4)),Xt(-1),oGt=new bn(pY,Xt(2)),Amt=(S_(),eF),uGt=new bn(gY,Amt),Xt(0),aGt=new bn(mY,Xt(0)),eGt=new bn(bY,Xt(qi)),ymt=(P2(),S6),FHt=new bn(wY,ymt),OHt=new bn(idt,.1),BHt=new bn(rdt,!1),Xt(0),DHt=new bn(sdt,Xt(40)),_mt=(BM(),IJ),NHt=new bn(odt,_mt),Dmt=(GC(),U6),SGt=new bn(mE,Dmt),wGt=new kr(vY),Pmt=(IL(),aF),pGt=new bn(_Y,Pmt),Imt=(gP(),PB),mGt=new bn(yY,Imt),new q3,_Gt=new bn(xY,.3),xGt=new kr(MY),Rmt=(nw(),tF),MGt=new bn(cdt,Rmt),Smt=(i7(),sQ),HHt=new bn(EY,Smt),VHt=new bn(gO,!0),WHt=new bn(mO,.4),PGt=new bn(adt,10),LGt=new bn(udt,10),IGt=new bn(ldt,20),Xt(0),CGt=new bn(hdt,Xt(0)),Xt(0),AGt=new bn(fdt,Xt(0)),Xt(0),kGt=new bn(ddt,Xt(0)),LHt=new bn(SY,!1),wmt=(QM(),$4),IHt=new bn(pdt,wmt),bmt=(bN(),wJ),PHt=new bn(gdt,bmt),YHt=new bn(bO,!1),Xt(0),ZHt=new bn(TY,Xt(16)),Xt(0),KHt=new bn(CY,Xt(5)),Fmt=(HN(),cQ),YGt=new bn(y4,Fmt),NGt=new bn(mdt,10),OGt=new bn(bdt,1),Omt=(LN(),kB),jGt=new bn(wO,Omt),BGt=new kr(AY),Nmt=Xt(1),Xt(0),UGt=new bn(kY,Nmt),Bmt=(RN(),oQ),XGt=new bn(LY,Bmt),WGt=new bn(vO,!0),HGt=new bn(_O,2),VGt=new bn(PY,!0),Emt=(S7(),LB),jHt=new bn(wdt,Emt),Mmt=(qC(),mJ),zHt=new bn(vdt,Mmt),tGt=xJ,QHt=E6,sGt=QB,cGt=QB,nGt=QJ,vGt=z6,gGt=U6,bGt=U6,yGt=rQ,EGt=z6,GHt=(gd(),rb),qHt=rb,$Ht=rb,FGt=_J,zGt=kB,ZGt=aQ,$Gt=V6,GGt=V6,qGt=V6}function dr(){dr=P;var t,e;Owt=new kr(cFt),Bwt=(md(),LQ),gVt=new bn(Bdt,Bwt),new q3,jE=new bn(hE,null),mVt=new kr(Mpt),RQ=new bn(RY,(me(),me(),!1)),Uwt=(Js(),Ff),pA=new bn(NY,Uwt),Hwt=(gd(),VQ),jwt=new bn(n6,Hwt),_Vt=new bn(ypt,!1),$wt=(Kg(),PF),cy=new bn(Fdt,$wt),Qwt=new y2(12),ay=new bn(sx,Qwt),NQ=new bn(hO,!1),rvt=(Ls(),ob),nI=new bn(aY,rvt),Px=new kr(MO),AF=new kr(ZP),HQ=new kr(lO),GQ=new kr(YP),Vwt=new qa,Lx=new bn(Zdt,Vwt),wVt=new bn(Qdt,!1),yVt=new bn(tpt,!1),new kr(aFt),qwt=new c2,SF=new bn(rpt,qwt),OQ=new bn(Ndt,!1),new q3,TVt=new bn(uFt,1),new bn(lFt,!0),Xt(0),new bn(hFt,Xt(100)),new bn(fFt,!1),Xt(0),new bn(dFt,Xt(4e3)),Xt(0),new bn(pFt,Xt(400)),new bn(gFt,!1),new bn(mFt,!0),new bn(bFt,!1),Fwt=(o7(),JQ),bVt=new bn(xpt,Fwt),cvt=new bn(nY,12),CVt=new bn(Cdt,10),avt=new bn(cY,2),AVt=new bn(Adt,10),uvt=new bn(kdt,0),kF=new bn(Pdt,5),lvt=new bn(Ldt,1),uy=new bn(dE,20),dvt=new bn(Idt,10),WQ=new kr(Rdt),fvt=new VEt,hvt=new bn(spt,fvt),EVt=new kr(ipt),tvt=!1,MVt=new bn(npt,tvt),Xwt=new y2(5),xVt=new bn(wFt,Xwt),Zwt=(r0(),e=a(xu(to),10),new Ha(e,a(au(e,e.length),10),0)),TF=new bn(jdt,Zwt),nvt=(G1(),sb),evt=new bn(Wdt,nvt),FQ=new kr($dt),UQ=new kr(Vdt),zQ=new kr(qdt),BQ=new kr(Xdt),Ywt=(t=a(xu(MA),10),new Ha(t,a(au(t,t.length),10),0)),HE=new bn(yO,Ywt),Jwt=qe((ma(),WE)),CF=new bn(DY,Jwt),Kwt=new We(0,0),eI=new bn(xO,Kwt),zwt=(ip(),LF),tI=new bn(Ydt,zwt),vVt=new bn(Kdt,!1),new kr(vFt),Xt(1),new bn(_Ft,null),ivt=new kr(ept),SVt=new kr(Jdt),ovt=(Ht(),Wc),gA=new bn(Odt,ovt),iu=new kr(Ddt),svt=(Kh(),ly),jQ=new bn(Hdt,svt),iI=new bn(Gdt,!1),EF=new bn(Udt,!1),DQ=new bn(zdt,!1),Gwt=new bn(iY,1),Wwt=(M7(),XQ),new bn(yFt,Wwt)}function y3e(t){t.gb||(t.gb=!0,t.b=cc(t,0),Cr(t.b,18),nr(t.b,19),t.a=cc(t,1),Cr(t.a,1),nr(t.a,2),nr(t.a,3),nr(t.a,4),nr(t.a,5),t.o=cc(t,2),Cr(t.o,8),Cr(t.o,9),nr(t.o,10),nr(t.o,11),nr(t.o,12),nr(t.o,13),nr(t.o,14),nr(t.o,15),nr(t.o,16),nr(t.o,17),nr(t.o,18),nr(t.o,19),nr(t.o,20),nr(t.o,21),nr(t.o,22),nr(t.o,23),ko(t.o),ko(t.o),ko(t.o),ko(t.o),ko(t.o),ko(t.o),ko(t.o),ko(t.o),ko(t.o),ko(t.o),t.p=cc(t,3),Cr(t.p,2),Cr(t.p,3),Cr(t.p,4),Cr(t.p,5),nr(t.p,6),nr(t.p,7),ko(t.p),ko(t.p),t.q=cc(t,4),Cr(t.q,8),t.v=cc(t,5),nr(t.v,9),ko(t.v),ko(t.v),ko(t.v),t.w=cc(t,6),Cr(t.w,2),Cr(t.w,3),Cr(t.w,4),nr(t.w,5),t.B=cc(t,7),nr(t.B,1),ko(t.B),ko(t.B),ko(t.B),t.Q=cc(t,8),nr(t.Q,0),ko(t.Q),t.R=cc(t,9),Cr(t.R,1),t.S=cc(t,10),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),ko(t.S),t.T=cc(t,11),nr(t.T,10),nr(t.T,11),nr(t.T,12),nr(t.T,13),nr(t.T,14),ko(t.T),ko(t.T),t.U=cc(t,12),Cr(t.U,2),Cr(t.U,3),nr(t.U,4),nr(t.U,5),nr(t.U,6),nr(t.U,7),ko(t.U),t.V=cc(t,13),nr(t.V,10),t.W=cc(t,14),Cr(t.W,18),Cr(t.W,19),Cr(t.W,20),nr(t.W,21),nr(t.W,22),nr(t.W,23),t.bb=cc(t,15),Cr(t.bb,10),Cr(t.bb,11),Cr(t.bb,12),Cr(t.bb,13),Cr(t.bb,14),Cr(t.bb,15),Cr(t.bb,16),nr(t.bb,17),ko(t.bb),ko(t.bb),t.eb=cc(t,16),Cr(t.eb,2),Cr(t.eb,3),Cr(t.eb,4),Cr(t.eb,5),Cr(t.eb,6),Cr(t.eb,7),nr(t.eb,8),nr(t.eb,9),t.ab=cc(t,17),Cr(t.ab,0),Cr(t.ab,1),t.H=cc(t,18),nr(t.H,0),nr(t.H,1),nr(t.H,2),nr(t.H,3),nr(t.H,4),nr(t.H,5),ko(t.H),t.db=cc(t,19),nr(t.db,2),t.c=yi(t,20),t.d=yi(t,21),t.e=yi(t,22),t.f=yi(t,23),t.i=yi(t,24),t.g=yi(t,25),t.j=yi(t,26),t.k=yi(t,27),t.n=yi(t,28),t.r=yi(t,29),t.s=yi(t,30),t.t=yi(t,31),t.u=yi(t,32),t.fb=yi(t,33),t.A=yi(t,34),t.C=yi(t,35),t.D=yi(t,36),t.F=yi(t,37),t.G=yi(t,38),t.I=yi(t,39),t.J=yi(t,40),t.L=yi(t,41),t.M=yi(t,42),t.N=yi(t,43),t.O=yi(t,44),t.P=yi(t,45),t.X=yi(t,46),t.Y=yi(t,47),t.Z=yi(t,48),t.$=yi(t,49),t._=yi(t,50),t.cb=yi(t,51),t.K=yi(t,52))}function Ft(){Ft=P;var t,e;li=new kr(Oft),umt=new kr("coordinateOrigin"),UJ=new kr("processors"),amt=new es("compoundNode",(me(),me(),!1)),L6=new es("insideConnections",!1),xd=new kr("nestedLGraph"),tg=new kr("parentLNode"),fmt=new kr("originalBendpoints"),dmt=new kr("originalDummyNodePosition"),pmt=new kr("originalLabelEdge"),HB=new kr("representedLabels"),UB=new kr("endLabels"),yx=new es("labelSide",(Cu(),hI)),ty=new es("maxEdgeThickness",0),eg=new es("reversed",!1),NE=new kr(Bft),Iu=new es("longEdgeSource",null),Ru=new es("longEdgeTarget",null),xx=new es("longEdgeHasLabelDummies",!1),P6=new es("longEdgeBeforeLabelDummy",!1),NJ=new es("edgeConstraint",(u_(),MJ)),DE=new kr("inLayerLayoutUnit"),w0=new es("inLayerConstraint",(tp(),A6)),_x=new es("inLayerSuccessorConstraint",new Dt),Du=new kr("portDummy"),BB=new es("crossingHint",Xt(0)),Qc=new es("graphProperties",(e=a(xu(LJ),10),new Ha(e,a(au(e,e.length),10),0))),wc=new es("externalPortSide",(Ht(),Wc)),hmt=new es("externalPortSize",new go),OJ=new kr("externalPortReplacedDummies"),zB=new kr("externalPortReplacedDummy"),vx=new es("externalPortConnections",(t=a(xu(Ia),10),new Ha(t,a(au(t,t.length),10),0))),Ym=new es(RBt,0),omt=new kr("barycenterAssociates"),Mx=new kr("TopSideComments"),wx=new kr("BottomSideComments"),OB=new kr("CommentConnectionPort"),BJ=new es("inputCollect",!1),FJ=new es("outputCollect",!1),FB=new es("cyclic",!1),k6=new es("bigNodeOriginalSize",new Rb(0)),_w=new es("bigNodeInitial",!1),cmt=new es("org.eclipse.elk.alg.layered.bigNodeLabels",new Dt),DJ=new es("org.eclipse.elk.alg.layered.postProcess",null),lmt=new kr("crossHierarchyMap"),HJ=new kr("targetOffset"),AHt=new es("splineLabelSize",new go),I6=new es("splineLoopSide",(bu(),kx)),jJ=new es("splineSelfLoopComponents",new Dt),gmt=new es("splineSelfLoopMargins",new c2),yw=new kr("spacings"),jB=new es("partitionConstraint",!1),Zm=new kr("breakingPoint.info"),q4=new kr("splines.route.start"),zJ=new kr("splines.edgeChain")}function Po(){Po=P,b0t=new Ur("LEFT_DIR_PREPROCESSOR",0),i0t=new Ur("DOWN_DIR_PREPROCESSOR",1),P0t=new Ur("UP_DIR_PREPROCESSOR",2),e0t=new Ur("COMMENT_PREPROCESSOR",3),H4=new Ur("EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER",4),C0t=new Ur("SPLINE_SELF_LOOP_PREPROCESSOR",5),aJ=new Ur("INTERACTIVE_EXTERNAL_PORT_POSITIONER",6),x0t=new Ur("PARTITION_PREPROCESSOR",7),oJ=new Ur("BIG_NODES_PREPROCESSOR",8),vB=new Ur("LABEL_DUMMY_INSERTER",9),l0t=new Ur("HIGH_DEGREE_NODE_LAYER_PROCESSOR",10),y0t=new Ur("PARTITION_POSTPROCESSOR",11),v0t=new Ur("NODE_PROMOTION",12),PE=new Ur("LAYER_CONSTRAINT_PROCESSOR",13),c0t=new Ur("HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR",14),sJ=new Ur("BIG_NODES_INTERMEDIATEPROCESSOR",15),E0t=new Ur("SEMI_INTERACTIVE_CROSSMIN_PROCESSOR",16),Ygt=new Ur("BREAKING_POINT_INSERTER",17),hJ=new Ur("LONG_EDGE_SPLITTER",18),dJ=new Ur("PORT_SIDE_PROCESSOR",19),wB=new Ur("INVERTED_PORT_PROCESSOR",20),M0t=new Ur("SELF_LOOP_PROCESSOR",21),fJ=new Ur("PORT_LIST_SORTER",22),MB=new Ur("NORTH_SOUTH_PORT_PREPROCESSOR",23),Kgt=new Ur("BREAKING_POINT_PROCESSOR",24),_0t=new Ur(CBt,25),k0t=new Ur(ABt,26),T0t=new Ur("SPLINE_SELF_LOOP_POSITIONER",27),S0t=new Ur("SINGLE_EDGE_GRAPH_WRAPPER",28),uJ=new Ur("IN_LAYER_CONSTRAINT_PROCESSOR",29),cJ=new Ur("BIG_NODES_SPLITTER",30),r0t=new Ur("END_NODE_PORT_LABEL_MANAGEMENT_PROCESSOR",31),p0t=new Ur("LABEL_AND_NODE_SIZE_PROCESSOR",32),A0t=new Ur("SPLINE_SELF_LOOP_ROUTER",33),w0t=new Ur("NODE_MARGIN_CALCULATOR",34),bB=new Ur("END_LABEL_PREPROCESSOR",35),yB=new Ur("LABEL_DUMMY_SWITCHER",36),Qgt=new Ur("CENTER_LABEL_MANAGEMENT_PROCESSOR",37),LE=new Ur("LABEL_SIDE_SELECTOR",38),f0t=new Ur("HYPEREDGE_DUMMY_MERGER",39),a0t=new Ur("HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR",40),g0t=new Ur("LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR",41),G4=new Ur("HIERARCHICAL_PORT_POSITION_PROCESSOR",42),M6=new Ur("BIG_NODES_POSTPROCESSOR",43),t0t=new Ur("COMMENT_POSTPROCESSOR",44),d0t=new Ur("HYPERNODE_PROCESSOR",45),u0t=new Ur("HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER",46),lJ=new Ur("LONG_EDGE_JOINER",47),Jgt=new Ur("BREAKING_POINT_REMOVER",48),xB=new Ur("NORTH_SOUTH_PORT_POSTPROCESSOR",49),h0t=new Ur("HORIZONTAL_COMPACTOR",50),_B=new Ur("LABEL_DUMMY_REMOVER",51),s0t=new Ur("FINAL_SPLINE_BENDPOINTS_CALCULATOR",52),EB=new Ur("REVERSED_EDGE_RESTORER",53),mB=new Ur("END_LABEL_POSTPROCESSOR",54),o0t=new Ur("HIERARCHICAL_NODE_RESIZER",55),m0t=new Ur("LEFT_DIR_POSTPROCESSOR",56),n0t=new Ur("DOWN_DIR_POSTPROCESSOR",57),L0t=new Ur("UP_DIR_POSTPROCESSOR",58)}function x3e(t,e,n){var i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te,Me,Bn,Pi,ls,ru,wa,e1,Ou,fg,L0,uf,mh,bh,JE,TI,CI,Gx,wtt,DA,UXt,P_t,gb,NA,vtt,Wx,OA,Ww,BA,_tt,zXt;for(P_t=0,Bn=0,ru=e.length;Bn0&&(t.a[mh.o]=P_t++)}for(OA=0,Pi=0,wa=n.length;Pi0;){for(mh=(Hn(CI.b>0),a(CI.a.cd(CI.c=--CI.b),11)),TI=0,f=new j(mh.d);f.a0&&(mh.i==(Ht(),Tn)?(t.a[mh.o]=OA,++OA):(t.a[mh.o]=OA+e1+fg,++fg))}OA+=fg}for(JE=(ts(),new vi),R=new Xa,Me=0,ls=e.length;Meb.b&&(b.b=Gx)):mh.g.c==UXt&&(Gxb.c&&(b.c=Gx));for(DL(N,0,N.length,null),Wx=dt(Gn,pi,22,N.length,15,1),i=dt(Gn,pi,22,OA+1,15,1),G=0;G0;)Gt%2>0&&(r+=_tt[Gt+1]),Gt=(Gt-1)/2|0,++_tt[Gt];for(ce=dt(PWt,te,336,N.length*2,0,1),pt=0;pt'?":le(KFt,t)?"'(?<' or '(? toIndex: ",_ft=", toIndex: ",XOt="org.eclipse.elk.alg.common.compaction",ZOt="Scanline/EventHandler",vd="org.eclipse.elk.alg.common.compaction.oned",YOt="CNode belongs to another CGroup.",KOt="ISpacingsHandler/1",qZ="The ",XZ=" instance has been finished already.",JOt="The direction ",QOt=" is not supported by the CGraph instance.",tBt="OneDimensionalCompactor",eBt="OneDimensionalCompactor/lambda$0$Type",nBt="Quadruplet",iBt="ScanlineConstraintCalculator",rBt="ScanlineConstraintCalculator/ConstraintsScanlineHandler",sBt="ScanlineConstraintCalculator/ConstraintsScanlineHandler/lambda$0$Type",oBt="ScanlineConstraintCalculator/Timestamp",cBt="ScanlineConstraintCalculator/lambda$0$Type",sh={138:1,56:1},ZZ="org.eclipse.elk.alg.common.compaction.options",sa="org.eclipse.elk.core.data",yft="org.eclipse.elk.polyomino.traversalStrategy",xft="org.eclipse.elk.polyomino.lowLevelSort",Mft="org.eclipse.elk.polyomino.highLevelSort",Eft="org.eclipse.elk.polyomino.fill",_d={154:1},YZ="polyomino",If="org.eclipse.elk.alg.common.compaction.polyomino",oO="org.eclipse.elk.alg.common.compaction.polyomino.structures",Sft="Direction",KZ="Grid is only of size ",JZ=". Requested point (",QZ=") is out of bounds.",cO=" Given center based coordinates were (",qP="org.eclipse.elk.graph.properties",aBt="IPropertyHolder",tY={3:1,93:1,131:1},N_={244:1},p4="org.eclipse.elk.core",uBt="Connected Components Compaction",lBt="org.eclipse.elk.alg.disco",aO="org.eclipse.elk.alg.disco.graph",eY="org.eclipse.elk.alg.disco.options",hBt="CompactionStrategy",Tft="org.eclipse.elk.disco.componentCompaction.strategy",Cft="org.eclipse.elk.disco.componentCompaction.componentLayoutAlgorithm",Aft="org.eclipse.elk.disco.debug.discoGraph",kft="org.eclipse.elk.disco.debug.discoPolys",fBt="componentCompaction",c0="org.eclipse.elk.disco",nY="org.eclipse.elk.spacing.componentComponent",iY="org.eclipse.elk.edge.thickness",hE="org.eclipse.elk.aspectRatio",sx="org.eclipse.elk.padding",O_="org.eclipse.elk.alg.disco.transform",rY=1.5707963267948966,fw={3:1,4:1,5:1,175:1},a0={221:1,3:1,4:1},Lft={3:1,6:1,4:1,5:1,63:1,73:1},Pft="org.eclipse.elk.alg.force",Ift="ComponentsProcessor",dBt="ComponentsProcessor/1",XP="org.eclipse.elk.alg.force.graph",pBt="Component Layout",Rft="org.eclipse.elk.alg.force.model",yd=.01,uO="org.eclipse.elk.force.model",Dft="org.eclipse.elk.force.iterations",Nft="org.eclipse.elk.force.repulsivePower",sY="org.eclipse.elk.force.temperature",op=.001,oY="org.eclipse.elk.force.repulsion",g4="org.eclipse.elk.alg.force.options",fE=1.600000023841858,Rf="org.eclipse.elk.force",ZP="org.eclipse.elk.priority",dE="org.eclipse.elk.spacing.nodeNode",cY="org.eclipse.elk.spacing.edgeLabel",lO="org.eclipse.elk.randomSeed",YP="org.eclipse.elk.separateConnectedComponents",hO="org.eclipse.elk.interactive",aY="org.eclipse.elk.portConstraints",Oft="origin",Bft="random",gBt="boundingBox.upLeft",mBt="boundingBox.lowRight",Fft="org.eclipse.elk.stress.fixed",Uft="org.eclipse.elk.stress.desiredEdgeLength",zft="org.eclipse.elk.stress.dimension",jft="org.eclipse.elk.stress.epsilon",Hft="org.eclipse.elk.stress.iterationLimit",m4="org.eclipse.elk.stress",bBt="ELK Stress",uY="org.eclipse.elk.alg.force.stress",wBt="Layered layout",KP="org.eclipse.elk.alg.layered",JP="org.eclipse.elk.alg.layered.compaction.components",b4="org.eclipse.elk.alg.layered.compaction.oned",fO="org.eclipse.elk.alg.layered.compaction.oned.algs",u0="org.eclipse.elk.alg.layered.compaction.recthull",K1="org.eclipse.elk.alg.layered.components",vBt={3:1,6:1,4:1,5:1,85:1,63:1,73:1},dO="org.eclipse.elk.alg.layered.compound",_l={3:1,6:1,4:1,5:1,99:1,85:1,63:1,73:1},Br={50:1},oa="org.eclipse.elk.alg.layered.graph",Ih={3:1,6:1,4:1,5:1,85:1,123:1,148:1,63:1,73:1},_Bt="Not supported by LGraph",yBt=`([{"' \r +`,xBt=`)]}"' \r +`,MBt="The given string contains parts that cannot be parsed as numbers.",QP="org.eclipse.elk.core.math",EBt={3:1,4:1,135:1,211:1,428:1},SBt={3:1,4:1,119:1,211:1,428:1},l0="org.eclipse.elk.alg.layered.graph.transform",Dn="org.eclipse.elk.alg.layered.intermediate",TBt="Big nodes pre-processing",Gft={3:1,6:1,4:1,5:1,85:1,619:1,148:1,63:1,73:1},Wft={3:1,4:1,5:1,537:1},CBt="ONE_SIDED_GREEDY_SWITCH",ABt="TWO_SIDED_GREEDY_SWITCH",lY="No implementation is available for the layout processor ",$ft="IntermediateProcessorStrategy",Vft="Node '",kBt="NodeMarginCalculator",LBt="Odd port side processing",dw=1e-8,Kr="org.eclipse.elk.alg.layered.intermediate.compaction",w4="org.eclipse.elk.alg.layered.intermediate.greedyswitch",h0="org.eclipse.elk.alg.layered.p3order.counting",t6={208:1},cp="org.eclipse.elk.alg.layered.intermediate.wrapping",v4="org.eclipse.elk.alg.layered.networksimplex",ka="org.eclipse.elk.alg.layered.options",hY="INTERACTIVE",jm="NONE",pE="LEFT",gE="RIGHT",PBt="EDGE_LENGTH",IBt="SELF_LOOPS",qft="BOTTOM",_4="CENTER",RBt="portRatioOrPosition",Xft="org.eclipse.elk.layered.contentAlignment",Zft="org.eclipse.elk.layered.feedbackEdges",pO="org.eclipse.elk.layered.interactiveReferencePoint",Yft="org.eclipse.elk.layered.mergeEdges",Kft="org.eclipse.elk.layered.mergeHierarchyEdges",Jft="org.eclipse.elk.layered.thoroughness",Qft="org.eclipse.elk.layered.unnecessaryBendpoints",tdt="org.eclipse.elk.layered.northOrSouthPort",fY="org.eclipse.elk.layered.cycleBreaking.strategy",e6="org.eclipse.elk.layered.layering.strategy",edt="org.eclipse.elk.layered.layering.layerConstraint",ndt="org.eclipse.elk.layered.layering.wideNodesOnMultipleLayers",dY="org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth",pY="org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor",gY="org.eclipse.elk.layered.layering.nodePromotion.strategy",mY="org.eclipse.elk.layered.layering.nodePromotion.maxIterations",bY="org.eclipse.elk.layered.layering.coffmanGraham.layerBound",wY="org.eclipse.elk.layered.crossingMinimization.strategy",idt="org.eclipse.elk.layered.crossingMinimization.hierarchicalSweepiness",rdt="org.eclipse.elk.layered.crossingMinimization.semiInteractive",sdt="org.eclipse.elk.layered.crossingMinimization.greedySwitch.activationThreshold",odt="org.eclipse.elk.layered.crossingMinimization.greedySwitch.type",mE="org.eclipse.elk.layered.nodePlacement.strategy",vY="org.eclipse.elk.layered.nodePlacement.favorStraightEdges",_Y="org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening",yY="org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment",xY="org.eclipse.elk.layered.nodePlacement.linearSegments.deflectionDampening",MY="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility",cdt="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility.default",EY="org.eclipse.elk.layered.edgeRouting.selfLoopPlacement",gO="org.eclipse.elk.layered.edgeRouting.sloppySplineRouting",mO="org.eclipse.elk.layered.edgeRouting.sloppySplineLayerSpacing",adt="org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers",udt="org.eclipse.elk.layered.spacing.edgeEdgeBetweenLayers",ldt="org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers",hdt="org.eclipse.elk.layered.priority.direction",fdt="org.eclipse.elk.layered.priority.shortness",ddt="org.eclipse.elk.layered.priority.straightness",SY="org.eclipse.elk.layered.compaction.connectedComponents",pdt="org.eclipse.elk.layered.compaction.postCompaction.strategy",gdt="org.eclipse.elk.layered.compaction.postCompaction.constraints",bO="org.eclipse.elk.layered.highDegreeNodes.treatment",TY="org.eclipse.elk.layered.highDegreeNodes.threshold",CY="org.eclipse.elk.layered.highDegreeNodes.treeHeight",y4="org.eclipse.elk.layered.wrapping.strategy",mdt="org.eclipse.elk.layered.wrapping.additionalEdgeSpacing",bdt="org.eclipse.elk.layered.wrapping.correctionFactor",wO="org.eclipse.elk.layered.wrapping.cutting.strategy",AY="org.eclipse.elk.layered.wrapping.cutting.cuts",kY="org.eclipse.elk.layered.wrapping.cutting.msd.freedom",LY="org.eclipse.elk.layered.wrapping.singleEdge.validify.strategy",vO="org.eclipse.elk.layered.wrapping.multiEdge.improveCuts",_O="org.eclipse.elk.layered.wrapping.multiEdge.distancePenalty",PY="org.eclipse.elk.layered.wrapping.multiEdge.improveWrappedEdges",wdt="org.eclipse.elk.layered.edgeLabels.sideSelection",vdt="org.eclipse.elk.layered.edgeLabels.centerLabelPlacementStrategy",_dt="layering",DBt="layering.minWidth",NBt="layering.nodePromotion",ydt="crossingMinimization",OBt="crossingMinimization.greedySwitch",BBt="nodePlacement",FBt="nodePlacement.bk",xdt="edgeRouting",n6="org.eclipse.elk.edgeRouting",J1="spacing",Mdt="priority",UBt="compaction.postCompaction",zBt="Specifies whether and how post-process compaction is applied.",Edt="highDegreeNodes",Sdt="wrapping",jBt="wrapping.cutting",Tdt="wrapping.multiEdge",IY="edgeLabels",Nn="org.eclipse.elk.layered",Cdt="org.eclipse.elk.spacing.edgeEdge",Adt="org.eclipse.elk.spacing.edgeNode",kdt="org.eclipse.elk.spacing.labelLabel",Ldt="org.eclipse.elk.spacing.labelPort",Pdt="org.eclipse.elk.spacing.labelNode",Idt="org.eclipse.elk.spacing.portPort",Rdt="org.eclipse.elk.spacing.individualOverride",Ddt="org.eclipse.elk.port.borderOffset",Ndt="org.eclipse.elk.noLayout",Odt="org.eclipse.elk.port.side",RY="org.eclipse.elk.debugMode",Bdt="org.eclipse.elk.alignment",Fdt="org.eclipse.elk.hierarchyHandling",Udt="org.eclipse.elk.insideSelfLoops.activate",zdt="org.eclipse.elk.insideSelfLoops.yo",yO="org.eclipse.elk.nodeSize.constraints",DY="org.eclipse.elk.nodeSize.options",NY="org.eclipse.elk.direction",jdt="org.eclipse.elk.nodeLabels.placement",Hdt="org.eclipse.elk.portLabels.placement",Gdt="org.eclipse.elk.portLabels.nextToPortIfPossible",Wdt="org.eclipse.elk.portAlignment.default",$dt="org.eclipse.elk.portAlignment.north",Vdt="org.eclipse.elk.portAlignment.south",qdt="org.eclipse.elk.portAlignment.west",Xdt="org.eclipse.elk.portAlignment.east",xO="org.eclipse.elk.nodeSize.minimum",Zdt="org.eclipse.elk.junctionPoints",Ydt="org.eclipse.elk.edgeLabels.placement",Kdt="org.eclipse.elk.edgeLabels.inline",Jdt="org.eclipse.elk.port.index",Qdt="org.eclipse.elk.commentBox",tpt="org.eclipse.elk.hypernode",ept="org.eclipse.elk.port.anchor",npt="org.eclipse.elk.partitioning.activate",ipt="org.eclipse.elk.partitioning.partition",MO="org.eclipse.elk.position",rpt="org.eclipse.elk.margins",spt="org.eclipse.elk.spacing.portsSurrounding",HBt="NETWORK_SIMPLEX",ox="UNDEFINED",GBt={3:1,4:1,5:1,616:1},Pu={141:1,50:1},opt="org.eclipse.elk.alg.layered.p1cycles",pw="org.eclipse.elk.alg.layered.p2layers",cpt={422:1,208:1},WBt={736:1,3:1,4:1},Qu="org.eclipse.elk.alg.layered.p3order",lo="org.eclipse.elk.alg.layered.p4nodes",$Bt={3:1,4:1,5:1,745:1},OY=1e-5,BY="DOWN",$p="org.eclipse.elk.alg.layered.p4nodes.bk",cx=17976931348623157e292,B_="org.eclipse.elk.alg.layered.p5edges",f0="org.eclipse.elk.alg.layered.p5edges.splines",F_=1e-6,EO=-1e-6,VBt="The list of vectors may not be empty.",apt=-17976931348623157e292,FY=.09999999999999998,qBt=4.71238898038469,XBt=3.141592653589793,x4="org.eclipse.elk.alg.mrtree",M4="org.eclipse.elk.alg.mrtree.graph",ax="org.eclipse.elk.alg.mrtree.intermediate",ZBt="Set neighbors in level",YBt="DESCENDANTS",upt="org.eclipse.elk.mrtree.weighting",lpt="org.eclipse.elk.mrtree.searchOrder",SO="org.eclipse.elk.alg.mrtree.options",U_="org.eclipse.elk.mrtree",KBt="org.eclipse.elk.tree",hpt="org.eclipse.elk.alg.radial",ux=6.283185307179586,UY=5e-324,JBt="org.eclipse.elk.alg.radial.intermediate",zY="org.eclipse.elk.alg.radial.intermediate.compaction",QBt={3:1,4:1,5:1,63:1},fpt="org.eclipse.elk.alg.radial.intermediate.optimization",jY="No implementation is available for the layout option ",E4="org.eclipse.elk.alg.radial.options",dpt="org.eclipse.elk.radial.orderId",ppt="org.eclipse.elk.radial.radius",HY="org.eclipse.elk.radial.compactor",GY="org.eclipse.elk.radial.compactionStepSize",gpt="org.eclipse.elk.radial.sorter",mpt="org.eclipse.elk.radial.wedgeCriteria",bpt="org.eclipse.elk.radial.optimizationCriteria",Hm="org.eclipse.elk.radial",tFt="org.eclipse.elk.alg.radial.p1position.wedge",wpt="org.eclipse.elk.alg.radial.sorting",eFt=5.497787143782138,nFt=3.9269908169872414,iFt=2.356194490192345,Rh="org.eclipse.elk.core.util",rFt="Invalid index: ",lx="org.eclipse.elk.core.alg",hx={337:1},z_={284:1},vpt="Make sure it's type is registered with the ",_pt=" utility class.",bE="true",WY="false",sFt="Couldn't clone property '",Dh="org.eclipse.elk.core.options",oFt=1.2999999523162842,gw="org.eclipse.elk.box",ypt="org.eclipse.elk.expandNodes",xpt="org.eclipse.elk.box.packingMode",cFt="org.eclipse.elk.algorithm",Mpt="org.eclipse.elk.bendPoints",aFt="org.eclipse.elk.labelManager",uFt="org.eclipse.elk.scaleFactor",lFt="org.eclipse.elk.animate",hFt="org.eclipse.elk.animTimeFactor",fFt="org.eclipse.elk.layoutAncestors",dFt="org.eclipse.elk.maxAnimTime",pFt="org.eclipse.elk.minAnimTime",gFt="org.eclipse.elk.progressBar",mFt="org.eclipse.elk.validateOptions",bFt="org.eclipse.elk.zoomToFit",wFt="org.eclipse.elk.nodeLabels.padding",vFt="org.eclipse.elk.font.name",_Ft="org.eclipse.elk.font.size",yFt="org.eclipse.elk.edge.type",xFt="de.cau.cs.kieler.labelSpacing",MFt="partitioning",EFt="nodeLabels",TO="portAlignment",Ept="nodeSize",$Y="port",SFt="portLabels",TFt="insideSelfLoops",CFt="de.cau.cs.kieler.selfLoopInside",i6="org.eclipse.elk.fixed",AFt="Fixed Layout",CO="org.eclipse.elk.random",kFt="port must have a parent node to calculate the port side",r6="org.eclipse.elk.core.util.adapters",Spt="org.eclipse.elk.core.util.nodespacing",d0="org.eclipse.elk.core.util.nodespacing.cellsystem",LFt={171:1,307:1},Tpt="Vertical alignment cannot be null",AO="org.eclipse.elk.core.util.nodespacing.internal",wE="org.eclipse.elk.core.util.nodespacing.internal.algorithm",vE="org.eclipse.elk.core.util.overlaps",tl="org.eclipse.emf.ecore",j_="org.eclipse.elk.graph",PFt="EMapPropertyHolder",IFt="ElkBendPoint",RFt="ElkGraphElement",DFt="ElkConnectableShape",Cpt="ElkEdge",NFt="ElkEdgeSection",OFt="EModelElement",BFt="ENamedElement",Apt="ElkLabel",kpt="ElkNode",Lpt="ElkPort",FFt={91:1,87:1},fx="org.eclipse.emf.common.notify.impl",H_="The feature '",VY="' is not a valid changeable feature",UFt="Expecting null",Ppt="' is not a valid feature",ca=32768,zFt={95:1,91:1,87:1,51:1,42:1,92:1},Re="org.eclipse.emf.ecore.impl",p0="org.eclipse.elk.graph.impl",S4="Recursive containment not allowed for ",_E="The datatype '",Gm="' is not a valid classifier",qY="The value '",G_={173:1,3:1,4:1},XY="The class '",yE="http://www.eclipse.org/elk/ElkGraph",Ipt="property",T4="value",ZY="source",jFt="properties",HFt="identifier",YY="height",KY="width",JY="parent",QY="text",Rpt="children",GFt="hierarchical",Dpt="sources",tK="targets",Npt="sections",eK="bendPoints",Opt="outgoingShape",Bpt="incomingShape",Fpt="outgoingSections",Upt="incomingSections",qs="org.eclipse.emf.common.util",zpt="Severe implementation error in the Json to ElkGraph importer.",Df="id",Ds="org.eclipse.elk.graph.json",jpt="Unhandled parameter types: ",WFt="startPoint",$Ft="An edge must have at least one source and one target (edge id: '",xE="').",VFt="Referenced edge section does not exist: ",qFt=" (edge id: '",Hpt="target",kO="group",Ti="name",XFt="connectableShape cannot be null",nK="Passed edge is not 'simple'.",s6="The 'no duplicates' constraint is violated",Nf={3:1,4:1,20:1,25:1,41:1,13:1,15:1,49:1,59:1,55:1,52:1},iK={3:1,4:1,20:1,25:1,41:1,13:1,43:1,15:1,49:1,59:1,55:1,52:1,532:1},rK="org.eclipse.elk.graph.util",Gpt="undefined",ZFt="parser.parse.1",YFt="parser.parse.2",LO="parser.next.1",sK="parser.next.2",KFt="parser.next.3",JFt="parser.next.4",g0="parser.factor.1",Wpt="parser.factor.2",QFt="parser.factor.3",tUt="parser.factor.4",eUt="parser.factor.5",nUt="parser.factor.6",iUt="parser.atom.1",rUt="parser.atom.2",sUt="parser.atom.3",$pt="parser.atom.4",oK="parser.atom.5",Vpt="parser.cc.1",PO="parser.cc.2",oUt="parser.cc.3",cUt="parser.cc.5",qpt="parser.cc.6",Xpt="parser.cc.7",cK="parser.cc.8",aUt="parser.ope.1",uUt="parser.ope.2",lUt="parser.ope.3",Vp="parser.descape.1",hUt="parser.descape.2",fUt="parser.descape.3",dUt="parser.descape.4",pUt="parser.descape.5",el="parser.process.1",gUt="parser.quantifier.1",mUt="parser.quantifier.2",bUt="parser.quantifier.3",wUt="parser.quantifier.4",Zpt="parser.quantifier.5",vUt="org.eclipse.emf.common.notify",Ypt={380:1,610:1},_Ut={3:1,4:1,20:1,25:1,41:1,13:1,15:1,59:1,52:1},o6={338:1,136:1},C4="index=",IO=", size=",aK={3:1,4:1,5:1,116:1},yUt={3:1,4:1,20:1,25:1,41:1,13:1,15:1,49:1,59:1,52:1},Kpt={3:1,6:1,4:1,5:1,175:1},xUt={3:1,4:1,5:1,339:1},MUt=";/?:@&=+$,",EUt="invalid authority: ",SUt="EAnnotation",TUt="ETypedElement",CUt="EStructuralFeature",AUt="EAttribute",kUt="EClassifier",LUt="EEnumLiteral",PUt="EGenericType",IUt="EOperation",RUt="EParameter",DUt="EReference",NUt="ETypeParameter",hr="org.eclipse.emf.ecore.util",Jpt={3:1,20:1,13:1,15:1,52:1,533:1,81:1,64:1},OUt="org.eclipse.emf.ecore.util.FeatureMap$Entry",oh=1024,La=8192,mw=2048,A4="byte",RO="char",k4="double",L4="float",P4="int",I4="long",R4="short",BUt="java.lang.Object",W_={3:1,4:1,5:1,222:1},Qpt={3:1,4:1,5:1,611:1},FUt={3:1,4:1,20:1,25:1,41:1,13:1,15:1,49:1,59:1,55:1,52:1,64:1},Zo={3:1,4:1,20:1,25:1,41:1,13:1,15:1,49:1,59:1,55:1,52:1,81:1,64:1},c6="mixed",ui="http:///org/eclipse/emf/ecore/util/ExtendedMetaData",yl="kind",UUt={3:1,4:1,5:1,612:1},t1t={3:1,4:1,20:1,25:1,41:1,13:1,15:1,59:1,52:1,81:1,64:1},DO={20:1,25:1,41:1,13:1,15:1,52:1,64:1},NO={43:1,120:1,260:1},OO={75:1,311:1},BO="The value of type '",FO="' must be of type '",$_=1365,xl="http://www.eclipse.org/emf/2002/Ecore",UO=-32768,Wm="constraints",Ns="baseType",zUt="getEStructuralFeature",jUt="getFeatureID",D4="feature",HUt="getOperationID",e1t="operation",GUt="defaultValue",WUt="eTypeParameters",$Ut="isInstance",VUt="getEEnumLiteral",qUt="eContainingClass",wi={47:1},XUt={3:1,4:1,5:1,124:1},ZUt="org.eclipse.emf.ecore.resource",YUt={91:1,87:1,534:1,1628:1},uK="org.eclipse.emf.ecore.resource.impl",n1t="unspecified",a6="simple",zO="attribute",KUt="attributeWildcard",jO="element",lK="elementWildcard",Nh="collapse",hK="itemType",HO="namespace",u6="##targetNamespace",Ml="whiteSpace",i1t="wildcards",m0="http://www.eclipse.org/emf/2003/XMLType",fK="##any",ME="uninitialized",dK="The multiplicity constraint is violated",GO="org.eclipse.emf.ecore.xml.type",JUt="ProcessingInstruction",QUt="SimpleAnyType",tzt="XMLTypeDocumentRoot",Xr="org.eclipse.emf.ecore.xml.type.impl",l6="INF",ezt="processing",nzt="ENTITIES_._base",r1t="minLength",s1t="ENTITY",WO="NCName",izt="IDREFS_._base",o1t="integer",pK="token",gK="pattern",rzt="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*",c1t="\\i\\c*",szt="[\\i-[:]][\\c-[:]]*",ozt="nonPositiveInteger",h6="maxInclusive",a1t="NMTOKEN",czt="NMTOKENS_._base",u1t="nonNegativeInteger",f6="minInclusive",azt="normalizedString",uzt="unsignedByte",lzt="unsignedInt",hzt="18446744073709551615",fzt="unsignedShort",dzt="processingInstruction",qp="org.eclipse.emf.ecore.xml.type.internal",EE=1114111,pzt="Internal Error: shorthands: \\u",N4="xml:isDigit",mK="xml:isWord",bK="xml:isSpace",wK="xml:isNameChar",vK="xml:isInitialNameChar",gzt="09\u0660\u0669\u06F0\u06F9\u0966\u096F\u09E6\u09EF\u0A66\u0A6F\u0AE6\u0AEF\u0B66\u0B6F\u0BE7\u0BEF\u0C66\u0C6F\u0CE6\u0CEF\u0D66\u0D6F\u0E50\u0E59\u0ED0\u0ED9\u0F20\u0F29",mzt="AZaz\xC0\xD6\xD8\xF6\xF8\u0131\u0134\u013E\u0141\u0148\u014A\u017E\u0180\u01C3\u01CD\u01F0\u01F4\u01F5\u01FA\u0217\u0250\u02A8\u02BB\u02C1\u0386\u0386\u0388\u038A\u038C\u038C\u038E\u03A1\u03A3\u03CE\u03D0\u03D6\u03DA\u03DA\u03DC\u03DC\u03DE\u03DE\u03E0\u03E0\u03E2\u03F3\u0401\u040C\u040E\u044F\u0451\u045C\u045E\u0481\u0490\u04C4\u04C7\u04C8\u04CB\u04CC\u04D0\u04EB\u04EE\u04F5\u04F8\u04F9\u0531\u0556\u0559\u0559\u0561\u0586\u05D0\u05EA\u05F0\u05F2\u0621\u063A\u0641\u064A\u0671\u06B7\u06BA\u06BE\u06C0\u06CE\u06D0\u06D3\u06D5\u06D5\u06E5\u06E6\u0905\u0939\u093D\u093D\u0958\u0961\u0985\u098C\u098F\u0990\u0993\u09A8\u09AA\u09B0\u09B2\u09B2\u09B6\u09B9\u09DC\u09DD\u09DF\u09E1\u09F0\u09F1\u0A05\u0A0A\u0A0F\u0A10\u0A13\u0A28\u0A2A\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59\u0A5C\u0A5E\u0A5E\u0A72\u0A74\u0A85\u0A8B\u0A8D\u0A8D\u0A8F\u0A91\u0A93\u0AA8\u0AAA\u0AB0\u0AB2\u0AB3\u0AB5\u0AB9\u0ABD\u0ABD\u0AE0\u0AE0\u0B05\u0B0C\u0B0F\u0B10\u0B13\u0B28\u0B2A\u0B30\u0B32\u0B33\u0B36\u0B39\u0B3D\u0B3D\u0B5C\u0B5D\u0B5F\u0B61\u0B85\u0B8A\u0B8E\u0B90\u0B92\u0B95\u0B99\u0B9A\u0B9C\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8\u0BAA\u0BAE\u0BB5\u0BB7\u0BB9\u0C05\u0C0C\u0C0E\u0C10\u0C12\u0C28\u0C2A\u0C33\u0C35\u0C39\u0C60\u0C61\u0C85\u0C8C\u0C8E\u0C90\u0C92\u0CA8\u0CAA\u0CB3\u0CB5\u0CB9\u0CDE\u0CDE\u0CE0\u0CE1\u0D05\u0D0C\u0D0E\u0D10\u0D12\u0D28\u0D2A\u0D39\u0D60\u0D61\u0E01\u0E2E\u0E30\u0E30\u0E32\u0E33\u0E40\u0E45\u0E81\u0E82\u0E84\u0E84\u0E87\u0E88\u0E8A\u0E8A\u0E8D\u0E8D\u0E94\u0E97\u0E99\u0E9F\u0EA1\u0EA3\u0EA5\u0EA5\u0EA7\u0EA7\u0EAA\u0EAB\u0EAD\u0EAE\u0EB0\u0EB0\u0EB2\u0EB3\u0EBD\u0EBD\u0EC0\u0EC4\u0F40\u0F47\u0F49\u0F69\u10A0\u10C5\u10D0\u10F6\u1100\u1100\u1102\u1103\u1105\u1107\u1109\u1109\u110B\u110C\u110E\u1112\u113C\u113C\u113E\u113E\u1140\u1140\u114C\u114C\u114E\u114E\u1150\u1150\u1154\u1155\u1159\u1159\u115F\u1161\u1163\u1163\u1165\u1165\u1167\u1167\u1169\u1169\u116D\u116E\u1172\u1173\u1175\u1175\u119E\u119E\u11A8\u11A8\u11AB\u11AB\u11AE\u11AF\u11B7\u11B8\u11BA\u11BA\u11BC\u11C2\u11EB\u11EB\u11F0\u11F0\u11F9\u11F9\u1E00\u1E9B\u1EA0\u1EF9\u1F00\u1F15\u1F18\u1F1D\u1F20\u1F45\u1F48\u1F4D\u1F50\u1F57\u1F59\u1F59\u1F5B\u1F5B\u1F5D\u1F5D\u1F5F\u1F7D\u1F80\u1FB4\u1FB6\u1FBC\u1FBE\u1FBE\u1FC2\u1FC4\u1FC6\u1FCC\u1FD0\u1FD3\u1FD6\u1FDB\u1FE0\u1FEC\u1FF2\u1FF4\u1FF6\u1FFC\u2126\u2126\u212A\u212B\u212E\u212E\u2180\u2182\u3007\u3007\u3021\u3029\u3041\u3094\u30A1\u30FA\u3105\u312C\u4E00\u9FA5\uAC00\uD7A3",bzt="Private Use",_K="ASSIGNED",wzt="\0\x7F\x80\xFF\u0100\u017F\u0180\u024F\u0250\u02AF\u02B0\u02FF\u0300\u036F\u0370\u03FF\u0400\u04FF\u0530\u058F\u0590\u05FF\u0600\u06FF\u0700\u074F\u0780\u07BF\u0900\u097F\u0980\u09FF\u0A00\u0A7F\u0A80\u0AFF\u0B00\u0B7F\u0B80\u0BFF\u0C00\u0C7F\u0C80\u0CFF\u0D00\u0D7F\u0D80\u0DFF\u0E00\u0E7F\u0E80\u0EFF\u0F00\u0FFF\u1000\u109F\u10A0\u10FF\u1100\u11FF\u1200\u137F\u13A0\u13FF\u1400\u167F\u1680\u169F\u16A0\u16FF\u1780\u17FF\u1800\u18AF\u1E00\u1EFF\u1F00\u1FFF\u2000\u206F\u2070\u209F\u20A0\u20CF\u20D0\u20FF\u2100\u214F\u2150\u218F\u2190\u21FF\u2200\u22FF\u2300\u23FF\u2400\u243F\u2440\u245F\u2460\u24FF\u2500\u257F\u2580\u259F\u25A0\u25FF\u2600\u26FF\u2700\u27BF\u2800\u28FF\u2E80\u2EFF\u2F00\u2FDF\u2FF0\u2FFF\u3000\u303F\u3040\u309F\u30A0\u30FF\u3100\u312F\u3130\u318F\u3190\u319F\u31A0\u31BF\u3200\u32FF\u3300\u33FF\u3400\u4DB5\u4E00\u9FFF\uA000\uA48F\uA490\uA4CF\uAC00\uD7A3\uE000\uF8FF\uF900\uFAFF\uFB00\uFB4F\uFB50\uFDFF\uFE20\uFE2F\uFE30\uFE4F\uFE50\uFE6F\uFE70\uFEFE\uFEFF\uFEFF\uFF00\uFFEF",l1t="UNASSIGNED",SE={3:1,112:1},vzt="org.eclipse.emf.ecore.xml.type.util",$O={3:1,4:1,5:1,342:1},h1t="org.eclipse.xtext.xbase.lib",_zt="Cannot add elements to a Range",yzt="Cannot set elements in a Range",xzt="Cannot remove elements from a Range",VO="locale",qO="default",XO="user.agent",u,ZO,yK,C3e=-1;yfe(),T(1,null,{},U),u.Fb=function(e){return this===e},u.Gb=function(){return this.ql},u.Hb=function(){return lm(this)},u.Ib=function(){return Og(du(this))+"@"+(Yr(this)>>>0).toString(16)},u.equals=function(t){return this.Fb(t)},u.hashCode=function(){return this.Hb()},u.toString=function(){return this.Ib()};var Mzt,Ezt,Szt;T(274,1,{274:1,1712:1},Rat),u._d=function(e){var n;return n=new Rat,n.i=4,e>1?n.c=hAt(this,e-1):n.c=this,n},u.ae=function(){return Vd(this),this.b},u.be=function(){return Og(this)},u.ce=function(){return Vd(this),this.k},u.de=function(){return(this.i&4)!=0},u.ee=function(){return(this.i&1)!=0},u.Ib=function(){return Jct(this)},u.i=0;var A3e=1,un=A(bc,"Object",1),f1t=A(bc,"Class",274);T(1692,1,{3:1});var bLe=A(I_,"Optional",1692);T(1060,1692,{3:1},W),u.Fb=function(e){return e===this},u.Hb=function(){return 2040732332},u.Ib=function(){return"Optional.absent()"},u.Jb=function(e){return si(e),Wr(),xK};var xK,wLe=A(I_,"Absent",1060),k3e=Sr(I_,"Function");T(393,1,{},L5),u.Lb=function(e){return QCt(e)};var vLe=A(I_,"Joiner",393);T(875,393,{},rCt),u.Lb=function(e){return e==null?this.b:QCt(e)};var _Le=A(I_,"Joiner/1",875);T(874,1,{},Yj);var yLe=A(I_,"Joiner/MapJoiner",874),L3e=Sr(I_,"Predicate"),Tzt;T(494,1,{138:1,494:1,3:1,56:1},Aj),u.Nb=function(e){return this.Mb(e)},u.Mb=function(e){var n;for(n=0;n0},u.ic=function(){if(this.b>=this.c)throw K(new J);return x3t(this,this.b++)},u.Dc=function(){return this.b},u.Ec=function(){if(this.b<=0)throw K(new J);return x3t(this,--this.b)},u.Fc=function(){return this.b-1},u.b=0,u.c=0;var ULe=A(Le,"AbstractIndexedListIterator",847);T(949,257,eO),u.hc=function(){return a_(this)},u.ic=function(){return D2(this)},u.d=1;var zLe=A(Le,"AbstractIterator",949);T(1677,1,{238:1}),u.Hc=function(){var e;return e=this.f,e||(this.f=this.Ic())},u.Jc=function(){return new nW(this.Hc())},u.Lc=function(){return new R5t(this.Kc(),this._b(),ct(this,475)?1:0)},u.Fb=function(e){return aq(this,e)},u.Hb=function(){return Yr(this.Hc())},u.Wb=function(){return this._b()==0},u.Xb=function(){return wot(this)},u.Ib=function(){return Yc(this.Hc())};var jLe=A(Le,"AbstractMultimap",1677);T(654,1677,dZ),u.Pb=function(){fat(this)},u.Qb=function(e){return this.c.Qb(e)},u.Ic=function(){return ct(this.c,122)?new KT(this,a(this.c,122)):ct(this.c,115)?new gM(this,a(this.c,115)):new rM(this,this.c)},u.Pc=function(e){return this.Oc()},u.Jc=function(){return ct(this.c,122)?new Dv(this,a(this.c,122)):ct(this.c,115)?new p2(this,a(this.c,115)):new pM(this,this.c)},u.Qc=function(){return wpe(this.Oc())},u.Kc=function(){return new Bxt(this)},u.Lc=function(){return flt(this.c.Tb().wc(),new gt,64,this.d)},u.Mc=function(e){return rr(this,e)},u.Nc=function(e){return n4(this,e)},u._b=function(){return this.d},u.Rc=function(){return new Oxt(this)},u.Sc=function(){return flt(this.c.ac().wc(),new q,64,this.d)},u.d=0;var HLe=A(Le,"AbstractMapBasedMultimap",654);T(1483,654,dZ),u.Oc=function(){return new qu(this.a)},u.Qc=function(){return rC(),rC(),g1t},u.Mc=function(e){return a(rr(this,e),15)},u.Nc=function(e){return a(n4(this,e),15)},u.Hc=function(){var e;return e=this.f,e||(this.f=ct(this.c,122)?new KT(this,a(this.c,122)):ct(this.c,115)?new gM(this,a(this.c,115)):new rM(this,this.c))},u.Fb=function(e){return aq(this,e)},u.Tc=function(e){return a(rr(this,e),15)},u.Uc=function(e){return a(n4(this,e),15)};var GLe=A(Le,"AbstractListMultimap",1483);T(661,1,Cs),u.gc=function(e){ks(this,e)},u.hc=function(){return this.c.hc()||this.e.hc()},u.ic=function(){var e;return this.e.hc()||(e=a(this.c.ic(),38),this.b=e.kc(),this.a=a(e.lc(),13),this.e=this.a.tc()),this.Vc(this.b,this.e.ic())},u.jc=function(){this.e.jc(),this.a.Wb()&&this.c.jc(),--this.d.d};var WLe=A(Le,"AbstractMapBasedMultimap/Itr",661);T(970,661,Cs,Oxt),u.Vc=function(e,n){return n};var $Le=A(Le,"AbstractMapBasedMultimap/1",970);T(971,1,ys,q),u.Kb=function(e){return a(e,13).wc()};var VLe=A(Le,"AbstractMapBasedMultimap/1methodref$spliterator$Type",971);T(972,661,Cs,Bxt),u.Vc=function(e,n){return ts(),new D5(e,n)};var qLe=A(Le,"AbstractMapBasedMultimap/2",972);T(1666,1,uE),u.Ub=function(e){YV(this,e)},u.Yb=function(e,n,i){return sut(this,e,n,i)},u.Pb=function(){this.Tb().Pb()},u.Wc=function(e){return Qq(this,e)},u.Qb=function(e){return!!alt(this,e,!1)},u.Rb=function(e){var n,i,r;for(i=this.Tb().tc();i.hc();)if(n=a(i.ic(),38),r=n.lc(),zt(e)===zt(r)||e!=null&&Fi(e,r))return!0;return!1},u.Fb=function(e){return J8t(this,e)},u.Vb=function(e){return za(alt(this,e,!1))},u.Hb=function(){return Pat(this.Tb())},u.Wb=function(){return this._b()==0},u.Xb=function(){return new Sv(this)},u.Zb=function(e,n){throw K(new Tp("Put not supported on this map"))},u.$b=function(e){return za(alt(this,e,!0))},u._b=function(){return this.Tb()._b()},u.Ib=function(){var e,n,i;for(i=new Mm("{","}"),n=this.Tb().tc();n.hc();)e=a(n.ic(),38),$g(i,nAt(this,e.kc())+"="+nAt(this,e.lc()));return i.a?i.e.length==0?i.a.a:i.a.a+(""+i.e):i.c},u.ac=function(){return new vf(this)};var XLe=A(ii,"AbstractMap",1666);T(1678,1666,uE),u.Jc=function(){return new nW(this)},u.Tb=function(){return bot(this)},u.Xb=function(){var e;return e=this.g,e||(this.g=this.Jc())},u.ac=function(){var e;return e=this.i,e||(this.i=new dMt(this))};var ZLe=A(Le,"Maps/ViewCachingAbstractMap",1678);T(357,1678,uE,rM),u.Vb=function(e){return cue(this,e)},u.$b=function(e){return rhe(this,e)},u.Pb=function(){this.d==this.e.c?this.e.Pb():ZD(new sot(this))},u.Qb=function(e){return cde(this.d,e)},u.Yc=function(){return new kj(this)},u.Xc=function(){return this.Yc()},u.Fb=function(e){return this===e||Fi(this.d,e)},u.Hb=function(){return Yr(this.d)},u.Xb=function(){return this.e.Xb()},u._b=function(){return this.d._b()},u.Ib=function(){return Yc(this.d)};var YLe=A(Le,"AbstractMapBasedMultimap/AsMap",357);T(25,1,R_),u.sc=function(e){vo(this,e)},u.uc=function(){return new gi(null,this.wc())},u.wc=function(){return new Ei(this,0)},u.xc=function(){return new gi(null,this.wc())},u.nc=function(e){throw K(new Tp("Add not supported on this collection"))},u.oc=function(e){return yo(this,e)},u.Pb=function(){bL(this)},u.pc=function(e){return z2(this,e,!1)},u.qc=function(e){return O1(this,e)},u.Wb=function(){return this._b()==0},u.vc=function(e){return z2(this,e,!0)},u.yc=function(){return y$(this)},u.zc=function(e){return lP(this,e)},u.Ib=function(){return Gp(this)};var KLe=A(ii,"AbstractCollection",25);T(bd,25,vl),u.wc=function(){return new Ei(this,1)},u.Fb=function(e){return LIt(this,e)},u.Hb=function(){return Pat(this)};var JLe=A(ii,"AbstractSet",bd);T(1660,bd,vl);var QLe=A(Le,"Sets/ImprovedAbstractSet",1660);T(1679,1660,vl),u.Pb=function(){this.Zc().Pb()},u.pc=function(e){return BIt(this,e)},u.Wb=function(){return this.Zc().Wb()},u.vc=function(e){var n;return this.pc(e)?(n=a(e,38),this.Zc().Xb().vc(n.kc())):!1},u._b=function(){return this.Zc()._b()};var tPe=A(Le,"Maps/EntrySet",1679);T(968,1679,vl,kj),u.pc=function(e){return aRt(this.a.d.Tb(),e)},u.tc=function(){return new sot(this.a)},u.Zc=function(){return this.a},u.vc=function(e){var n;return aRt(this.a.d.Tb(),e)?(n=a(e,38),wae(this.a.e,n.kc()),!0):!1},u.wc=function(){return m$(this.a.d.Tb().wc(),new Lj(this.a))};var ePe=A(Le,"AbstractMapBasedMultimap/AsMap/AsMapEntries",968);T(969,1,ys,Lj),u.Kb=function(e){return G5t(this.a,a(e,38))};var nPe=A(Le,"AbstractMapBasedMultimap/AsMap/AsMapEntries/0methodref$wrapEntry$Type",969);T(659,1,Cs,sot),u.gc=function(e){ks(this,e)},u.ic=function(){var e;return e=a(this.b.ic(),38),this.a=a(e.lc(),13),G5t(this.c,e)},u.hc=function(){return this.b.hc()},u.jc=function(){this.b.jc(),this.c.e.d-=this.a._b(),this.a.Pb()};var iPe=A(Le,"AbstractMapBasedMultimap/AsMap/AsMapIterator",659);T(541,1660,vl,nW),u.Pb=function(){this.b.Pb()},u.pc=function(e){return this.b.Qb(e)},u.sc=function(e){si(e),this.b.Ub(new Nj(e))},u.Wb=function(){return this.b.Wb()},u.tc=function(){return ts(),QT(this.b.Tb().tc(),(jv(),d6))},u.vc=function(e){return this.b.Qb(e)?(this.b.$b(e),!0):!1},u._b=function(){return this.b._b()};var rPe=A(Le,"Maps/KeySet",541);T(356,541,vl,pM),u.Pb=function(){var e;ZD((e=this.b.Tb().tc(),new Qit(this,e)))},u.qc=function(e){return this.b.Xb().qc(e)},u.Fb=function(e){return this===e||Fi(this.b.Xb(),e)},u.Hb=function(){return Yr(this.b.Xb())},u.tc=function(){var e;return e=this.b.Tb().tc(),new Qit(this,e)},u.vc=function(e){var n,i;return i=0,n=a(this.b.$b(e),13),n&&(i=n._b(),n.Pb(),this.a.d-=i),i>0},u.wc=function(){return this.b.Xb().wc()};var sPe=A(Le,"AbstractMapBasedMultimap/KeySet",356);T(660,1,Cs,Qit),u.gc=function(e){ks(this,e)},u.hc=function(){return this.c.hc()},u.ic=function(){return this.a=a(this.c.ic(),38),this.a.kc()},u.jc=function(){var e;M1(!!this.a,lw),e=a(this.a.lc(),13),this.c.jc(),this.b.a.d-=e._b(),e.Pb()};var oPe=A(Le,"AbstractMapBasedMultimap/KeySet/1",660);T(358,357,{109:1,115:1},gM),u.Jc=function(){return this.$c()},u.Xb=function(){return this._c()},u.$c=function(){return new p2(this.c,this.ad())},u._c=function(){var e;return e=this.b,e||(this.b=this.$c())},u.ad=function(){return a(this.d,115)};var cPe=A(Le,"AbstractMapBasedMultimap/SortedAsMap",358);T(396,358,COt,KT),u.$c=function(){return new Dv(this.a,a(a(this.d,115),122))},u.Xb=function(){var e;return e=this.b,a(e||(this.b=new Dv(this.a,a(a(this.d,115),122))),196)},u._c=function(){var e;return e=this.b,a(e||(this.b=new Dv(this.a,a(a(this.d,115),122))),196)},u.ad=function(){return a(a(this.d,115),122)};var aPe=A(Le,"AbstractMapBasedMultimap/NavigableAsMap",396);T(327,356,AOt,p2),u.wc=function(){return this.b.Xb().wc()};var uPe=A(Le,"AbstractMapBasedMultimap/SortedKeySet",327);T(299,327,sft,Dv);var lPe=A(Le,"AbstractMapBasedMultimap/NavigableKeySet",299);T(448,25,R_,TL),u.nc=function(e){var n,i;return pu(this),i=this.d.Wb(),n=this.d.nc(e),n&&(++this.f.d,i&&wD(this)),n},u.oc=function(e){var n,i,r;return e.Wb()?!1:(r=(pu(this),this.d._b()),n=this.d.oc(e),n&&(i=this.d._b(),this.f.d+=i-r,r==0&&wD(this)),n)},u.Pb=function(){var e;e=(pu(this),this.d._b()),e!=0&&(this.d.Pb(),this.f.d-=e,GD(this))},u.pc=function(e){return pu(this),this.d.pc(e)},u.qc=function(e){return pu(this),this.d.qc(e)},u.Fb=function(e){return e===this?!0:(pu(this),Fi(this.d,e))},u.Hb=function(){return pu(this),Yr(this.d)},u.tc=function(){return pu(this),new qst(this)},u.vc=function(e){var n;return pu(this),n=this.d.vc(e),n&&(--this.f.d,GD(this)),n},u._b=function(){return IEt(this)},u.wc=function(){return pu(this),this.d.wc()},u.Ib=function(){return pu(this),Yc(this.d)};var hPe=A(Le,"AbstractMapBasedMultimap/WrappedCollection",448),Sl=Sr(ii,"List");T(657,448,{20:1,25:1,13:1,15:1},mot),u.jd=function(e){D1(this,e)},u.wc=function(){return pu(this),this.d.wc()},u.bd=function(e,n){var i;pu(this),i=this.d.Wb(),a(this.d,15).bd(e,n),++this.a.d,i&&wD(this)},u.cd=function(e){return pu(this),a(this.d,15).cd(e)},u.dd=function(e){return pu(this),a(this.d,15).dd(e)},u.ed=function(){return pu(this),new eSt(this)},u.fd=function(e){return pu(this),new F4t(this,e)},u.gd=function(e){var n;return pu(this),n=a(this.d,15).gd(e),--this.a.d,GD(this),n},u.hd=function(e,n){return pu(this),a(this.d,15).hd(e,n)},u.kd=function(e,n){return pu(this),pct(this.a,this.e,a(this.d,15).kd(e,n),this.b?this.b:this)};var fPe=A(Le,"AbstractMapBasedMultimap/WrappedList",657);T(967,657,{20:1,25:1,13:1,15:1,49:1},BSt);var dPe=A(Le,"AbstractMapBasedMultimap/RandomAccessWrappedList",967);T(558,1,Cs,qst),u.gc=function(e){ks(this,e)},u.hc=function(){return xM(this),this.b.hc()},u.ic=function(){return xM(this),this.b.ic()},u.jc=function(){SSt(this)};var pPe=A(Le,"AbstractMapBasedMultimap/WrappedCollection/WrappedIterator",558);T(658,558,kf,eSt,F4t),u.jc=function(){SSt(this)},u.Bc=function(e){var n;n=IEt(this.a)==0,(xM(this),a(this.b,120)).Bc(e),++this.a.a.d,n&&wD(this.a)},u.Cc=function(){return(xM(this),a(this.b,120)).Cc()},u.Dc=function(){return(xM(this),a(this.b,120)).Dc()},u.Ec=function(){return(xM(this),a(this.b,120)).Ec()},u.Fc=function(){return(xM(this),a(this.b,120)).Fc()},u.Gc=function(e){(xM(this),a(this.b,120)).Gc(e)};var gPe=A(Le,"AbstractMapBasedMultimap/WrappedList/WrappedListIterator",658);T(559,448,AOt,QW),u.wc=function(){return pu(this),this.d.wc()};var mPe=A(Le,"AbstractMapBasedMultimap/WrappedSortedSet",559);T(656,559,sft,Brt);var bPe=A(Le,"AbstractMapBasedMultimap/WrappedNavigableSet",656);T(655,448,vl,pst),u.wc=function(){return pu(this),this.d.wc()};var wPe=A(Le,"AbstractMapBasedMultimap/WrappedSet",655);T(974,1,ys,gt),u.Kb=function(e){var n,i;return n=e.kc(),i=a(e.lc(),13),m$(i.wc(),new Pj(n))};var vPe=A(Le,"AbstractMapBasedMultimap/lambda$0$Type",974);T(973,1,ys,Pj),u.Kb=function(e){return wee(this.a,e)};var _Pe=A(Le,"AbstractMapBasedMultimap/lambda$2$Type",973);T(392,1,pZ),u.Fb=function(e){var n;return ct(e,38)?(n=a(e,38),Rp(this.kc(),n.kc())&&Rp(this.lc(),n.lc())):!1},u.Hb=function(){var e,n;return e=this.kc(),n=this.lc(),(e==null?0:Yr(e))^(n==null?0:Yr(n))},u.mc=function(e){throw K(new Oi)},u.Ib=function(){return this.kc()+"="+this.lc()};var yPe=A(Le,kOt,392);T(1680,25,R_),u.Pb=function(){this.ld().Pb()},u.pc=function(e){var n;return ct(e,38)?(n=a(e,38),yce(this.ld(),n.kc(),n.lc())):!1},u.vc=function(e){var n;return ct(e,38)?(n=a(e,38),nkt(this.ld(),n.kc(),n.lc())):!1},u._b=function(){return this.ld()._b()};var xPe=A(Le,"Multimaps/Entries",1680);T(975,1680,R_),u.tc=function(){return this.a.Kc()},u.ld=function(){return this.a},u.wc=function(){return this.a.Lc()};var MPe=A(Le,"AbstractMultimap/Entries",975);T(662,975,vl,A8),u.wc=function(){return this.a.Lc()},u.Fb=function(e){return u9t(this,e)},u.Hb=function(){return NPt(this)};var EPe=A(Le,"AbstractMultimap/EntrySet",662);T(663,25,R_,Ud),u.Pb=function(){this.a.Pb()},u.pc=function(e){return the(this.a,e)},u.tc=function(){return this.a.Rc()},u._b=function(){return this.a.d},u.wc=function(){return this.a.Sc()};var SPe=A(Le,"AbstractMultimap/Values",663);T(1681,25,{738:1,20:1,25:1,13:1}),u.sc=function(e){si(e),Xb(this).sc(new Gj(e))},u.wc=function(){var e;return e=Xb(this).wc(),flt(e,new se,64|e.qd()&1296,bq(this))},u.nc=function(e){return Iit(),!0},u.oc=function(e){return oge(this,e)},u.Pb=function(){ZD(new Ait(bot(gm(this.a)).tc()))},u.pc=function(e){var n;return n=a(XM(gm(this.a),e),13),(n?n._b():0)>0},u.Fb=function(e){return Zme(this,e)},u.Hb=function(){return Yr(Xb(this))},u.Wb=function(){return Xb(this).Wb()},u.tc=function(){return new iMt(this,Xb(this).tc())},u.vc=function(e){return Dlt(this,e,1)>0},u._b=function(){return bq(this)},u.Ib=function(){return Yc(Xb(this))};var TPe=A(Le,"AbstractMultiset",1681);T(557,654,FP),u.Oc=function(){return this.md()},u.Qc=function(){return this.nd()},u.Mc=function(e){return this.od(e)},u.Nc=function(e){return this.pd(e)},u.Hc=function(){var e;return e=this.f,e||(this.f=ct(this.c,122)?new KT(this,a(this.c,122)):ct(this.c,115)?new gM(this,a(this.c,115)):new rM(this,this.c))},u.nd=function(){return $b(),yM(),O4},u.Fb=function(e){return aq(this,e)},u.od=function(e){return a(rr(this,e),19)},u.pd=function(e){return a(n4(this,e),19)};var CPe=A(Le,"AbstractSetMultimap",557);T(1413,557,FP),u.md=function(){return new Ub(this.b)},u.nd=function(){var e;return e=this.b,e?ooe(this.b):(we(),new K5(new Ub(this.b)))},u.Mc=function(e){return a(a(rr(this,e),19),60)},u.od=function(e){return a(a(rr(this,e),19),60)},u.Nc=function(e){return a(a(n4(this,e),19),60)},u.pd=function(e){return a(a(n4(this,e),19),60)},u.Hc=function(){var e;return e=this.f,e||(this.f=ct(this.c,122)?new KT(this,a(this.c,122)):ct(this.c,115)?new gM(this,a(this.c,115)):new rM(this,this.c))};var APe=A(Le,"AbstractSortedSetMultimap",1413);T(1414,1413,FP),u.Hc=function(){var e;return e=this.f,a(a(e||(this.f=ct(this.c,122)?new KT(this,a(this.c,122)):ct(this.c,115)?new gM(this,a(this.c,115)):new rM(this,this.c)),115),122)},u.Xb=function(){var e;return e=this.i,a(a(e||(this.i=ct(this.c,122)?new Dv(this,a(this.c,122)):ct(this.c,115)?new p2(this,a(this.c,115)):new pM(this,this.c)),60),196)};var kPe=A(Le,"AbstractSortedKeySortedSetMultimap",1414);T(521,1483,dZ,bD),u.a=0;var LPe=A(Le,"ArrayListMultimap",521);T(1156,1,Wp,$3t),u.qd=function(){return this.a.qd()&-262},u.rd=function(){return this.a.rd()},u.gc=function(e){this.a.gc(new q3t(e,this.b))},u.sd=function(e){return this.a.sd(new V3t(e,this.b))};var PPe=A(Le,"CollectSpliterators/1",1156);T(1157,1,{},V3t),u.td=function(e){this.a.td(this.b.Kb(e))};var IPe=A(Le,"CollectSpliterators/1/lambda$0$Type",1157);T(1158,1,{},q3t),u.td=function(e){this.a.td(this.b.Kb(e))};var RPe=A(Le,"CollectSpliterators/1/lambda$1$Type",1158);T(1159,1,Wp,gkt),u.qd=function(){return this.a},u.rd=function(){return this.d&&(this.b=BEt(this.b,this.d.rd())),BEt(this.b,0)},u.gc=function(e){this.d&&(this.d.gc(e),this.d=null),this.c.gc(new Z3t(this.e,e)),this.b=0},u.sd=function(e){for(;;){if(this.d&&this.d.sd(e))return TT(this.b,nO)&&(this.b=Yg(this.b,1)),!0;if(this.d=null,!this.c.sd(new X3t(this,this.e)))return!1}},u.a=0,u.b=0;var DPe=A(Le,"CollectSpliterators/1FlatMapSpliterator",1159);T(1160,1,{},X3t),u.td=function(e){Cne(this.a,this.b,e)};var NPe=A(Le,"CollectSpliterators/1FlatMapSpliterator/lambda$0$Type",1160);T(1161,1,{},Z3t),u.td=function(e){xee(this.b,this.a,e)};var OPe=A(Le,"CollectSpliterators/1FlatMapSpliterator/lambda$1$Type",1161),p1t;T(844,1,rh,Rj),u.Fb=function(e){return this===e},u.Kb=function(e){return zt(e)===zt(this.a)?TOt:e};var BPe=A(Le,"Collections2/1",844);T(220,1,gZ),u.vd=function(e){return this.ud(a(e,220))},u.ud=function(e){var n;return e==(co(),EK)?1:e==(Zr(),MK)?-1:(n=(AD(),SC(this.a,e.a)),n!=0?n:ct(this,467)==ct(e,467)?0:ct(this,467)?1:-1)},u.yd=function(){return this.a},u.Fb=function(e){return vut(this,e)};var FPe=A(Le,"Cut",220);T(1508,220,gZ,a3t),u.ud=function(e){return e==this?0:1},u.wd=function(e){throw K(new b9)},u.xd=function(e){e.a+="+\u221E)"},u.yd=function(){throw K(new yc(LOt))},u.zd=function(e){return!1},u.Ib=function(){return"+\u221E"};var MK,UPe=A(Le,"Cut/AboveAll",1508);T(467,220,{220:1,467:1,3:1,34:1},ASt),u.wd=function(e){Ua((e.a+="(",e),this.a)},u.xd=function(e){S1(Ua(e,this.a),93)},u.Hb=function(){return~Yr(this.a)},u.zd=function(e){return AD(),SC(this.a,e)<0},u.Ib=function(){return"/"+this.a+"\\"};var zPe=A(Le,"Cut/AboveValue",467);T(1507,220,gZ,u3t),u.ud=function(e){return e==this?0:-1},u.wd=function(e){e.a+="(-\u221E"},u.xd=function(e){throw K(new b9)},u.yd=function(){throw K(new yc(LOt))},u.zd=function(e){return!0},u.Ib=function(){return"-\u221E"};var EK,jPe=A(Le,"Cut/BelowAll",1507);T(1509,220,gZ,kSt),u.wd=function(e){Ua((e.a+="[",e),this.a)},u.xd=function(e){S1(Ua(e,this.a),41)},u.Hb=function(){return Yr(this.a)},u.zd=function(e){return AD(),SC(this.a,e)<=0},u.Ib=function(){return"\\"+this.a+"/"};var HPe=A(Le,"Cut/BelowValue",1509);T(482,1,wd),u.sc=function(e){vo(this,e)},u.Ib=function(){return dce(a(Got(this,"use Optional.orNull() instead of Optional.or(null)"),20).tc())};var GPe=A(Le,"FluentIterable",482);T(325,482,wd,_2),u.tc=function(){return Rn(this)};var WPe=A(Le,"FluentIterable/2",325);T(1670,25,POt),u.tc=function(){return this.Ad()},u.nc=function(e){throw K(new Oi)},u.oc=function(e){throw K(new Oi)},u.Pb=function(){throw K(new Oi)},u.pc=function(e){return e!=null&&z2(this,e,!1)},u.vc=function(e){throw K(new Oi)};var $Pe=A(Le,"ImmutableCollection",1670);T(912,1670,POt,Dj),u.tc=function(){return B2((we(),Rv(),X_))},u.pc=function(e){return!1},u.qc=function(e){return O1(this.a,e)},u.Wb=function(){return!0},u.Ad=function(){return B2((we(),Rv(),X_))},u._b=function(){return 0},u.yc=function(){return y$(this.a)},u.zc=function(e){return lP(this.a,e)},u.Ib=function(){return Gp(this.a)};var VPe=A(Le,"ForwardingImmutableCollection",912);T(193,1670,mZ),u.tc=function(){return this.Ad()},u.ed=function(){return new P$(this,this._b(),0)},u.fd=function(e){return new P$(this,this._b(),e)},u.jd=function(e){D1(this,e)},u.wc=function(){return new Ei(this,16)},u.kd=function(e,n){return this.Bd(e,n)},u.bd=function(e,n){throw K(new Oi)},u.Fb=function(e){return Nme(this,e)},u.Hb=function(){return Tle(this)},u.dd=function(e){return e==null?-1:Kde(this,e)},u.Ad=function(){return new P$(this,this._b(),0)},u.gd=function(e){throw K(new Oi)},u.hd=function(e,n){throw K(new Oi)},u.Bd=function(e,n){var i;return cq((i=new rMt(this),new C1(i,e,n)))};var g1t,qPe=A(Le,"ImmutableList",193);T(1675,193,mZ),u.tc=function(){return B2(this.Cd().tc())},u.kd=function(e,n){return cq(this.Cd().kd(e,n))},u.pc=function(e){return e!=null&&this.Cd().pc(e)},u.qc=function(e){return this.Cd().qc(e)},u.Fb=function(e){return Fi(this.Cd(),e)},u.cd=function(e){return this.Cd().cd(e)},u.Hb=function(){return Yr(this.Cd())},u.dd=function(e){return this.Cd().dd(e)},u.Wb=function(){return this.Cd().Wb()},u.Ad=function(){return B2(this.Cd().tc())},u._b=function(){return this.Cd()._b()},u.Bd=function(e,n){return cq(this.Cd().kd(e,n))},u.yc=function(){return this.Cd().zc(dt(un,te,1,this.Cd()._b(),5,1))},u.zc=function(e){return this.Cd().zc(e)},u.Ib=function(){return Yc(this.Cd())};var XPe=A(Le,"ForwardingImmutableList",1675);T(1671,1670,UP),u.tc=function(){return this.Ad()},u.wc=function(){return new Ei(this,1)},u.Fb=function(e){return u9t(this,e)},u.Hb=function(){return NPt(this)};var ZPe=A(Le,"ImmutableSet",1671);T(550,1671,UP),u.tc=function(){return this.Ad()},u.pc=function(e){return e!=null&&CT(this.b,e)},u.qc=function(e){return ert(this.b,e)},u.Hb=function(){return Yr(this.b.b)},u.Wb=function(){return this.b.b.Wb()},u.Ad=function(){return B2(new Dg(this.b.b.tc()))},u._b=function(){return this.b.b._b()},u.yc=function(){return this.b.b.yc()},u.zc=function(e){return sMt(this.b,e)},u.Ib=function(){return Yc(this.b.b)};var YPe=A(Le,"ForwardingImmutableSet",550);T(1664,1663,IOt),u.Ac=function(){return we(),new K5(this.a)},u.wc=function(){return new B5(this)};var KPe=A(Le,"ForwardingSortedSet",1664);T(481,632,J7,gD),u.ec=function(e){return new ATt(this,e,this)},u.Zb=function(e,n){return ZC(this,e,n,!1)};var JPe=A(Le,"HashBiMap",481);T(892,633,J7,ATt),u.dc=function(){return new MSt(this,this.a.b.Tb().tc())};var QPe=A(Le,"HashBiMap/1",892);T(479,1,Cs),u.gc=function(e){ks(this,e)},u.hc=function(){return this.b.hc()},u.ic=function(){return EEt(this)},u.jc=function(){this.b.jc()};var t6e=A(Le,"TransformedIterator",479);T(893,479,Cs,MSt),u.Ed=function(e){return new JCt(this,a(e,38))},u.Dd=function(t){return this.Ed(t)};var e6e=A(Le,"HashBiMap/1/1",893);T(894,392,pZ,JCt),u.kc=function(){return this.c},u.lc=function(){return this.a.a.b.Vb(this.c)},u.mc=function(e){var n;return M1(Git(XD(this.a.a),this),rft),n=this.a.a.b.Vb(this.c),zt(e)===zt(n)||e!=null&&Fi(e,n)?e:(ZC(this.a.a,this.c,e,!0),n)};var n6e=A(Le,"HashBiMap/1/1/1",894);T(298,557,FP,Nv),u.md=function(){return new A9(tq(this.a))},u.a=2;var i6e=A(Le,"HashMultimap",298);T(372,392,{392:1,372:1,3:1,38:1},D5),u.kc=function(){return this.g},u.lc=function(){return this.i},u.mc=function(e){throw K(new Oi)};var r6e=A(Le,"ImmutableEntry",372);T(903,550,UP,Fxt);var s6e=A(Le,"ImmutableEnumSet",903);T(544,847,fZ,P$);var o6e=A(Le,"ImmutableList/1",544);T(1561,550,ROt),u.tc=function(){return B2(new Dg(this.b.b.tc()))},u.wc=function(){return new B5(this)},u.pc=function(e){try{return e!=null&&CT(this.a,e)}catch(n){if(n=vr(n),ct(n,177))return!1;throw K(n)}},u.qc=function(e){var n,i;for(i=e.tc();i.hc();)if(n=i.ic(),n==null)return!1;try{return ert(this.a,e)}catch(r){if(r=vr(r),ct(r,177))return!1;throw K(r)}},u.Ad=function(){return B2(new Dg(this.b.b.tc()))},u.yc=function(){return lLt(this,dt(un,te,1,this.b.b._b(),5,1))},u.zc=function(e){return e7(this,e)};var Czt,m1t,c6e=A(Le,"ImmutableSortedSet",1561);T(904,482,wd,jEt),u.tc=function(){return sst(this.a)},u.Ib=function(){return Gp(this.a)+" (cycled)"};var a6e=A(Le,"Iterables/1",904);T(200,1,rh,X),u.Kb=function(e){return a(e,20).tc()},u.Fb=function(e){return this===e};var u6e=A(Le,"Iterables/12",200);T(905,482,wd,mCt),u.sc=function(e){si(e),this.b.sc(new Y3t(this.a,e))},u.tc=function(){return HT(this)};var l6e=A(Le,"Iterables/4",905);T(906,1,{},Y3t),u.td=function(e){_te(this.b,this.a,e)};var h6e=A(Le,"Iterables/4/lambda$0$Type",906);T(907,482,wd,bCt),u.sc=function(e){si(e),this.a.sc(new K3t(e,this.b))},u.tc=function(){return id(this)};var f6e=A(Le,"Iterables/5",907);T(908,1,{},K3t),u.td=function(e){this.a.td(this.b.Kb(e))};var d6e=A(Le,"Iterables/5/lambda$0$Type",908),Azt,b1t;T(945,1665,fZ,xt),u.hc=function(){return!1},u.Cc=function(){return!1},u.ic=function(){throw K(new J)},u.Dc=function(){return 0},u.Ec=function(){throw K(new J)},u.Fc=function(){return-1};var p6e=A(Le,"Iterators/1",945);T(555,257,eO,f5),u.hc=function(){return!this.a},u.ic=function(){if(this.a)throw K(new J);return this.a=!0,this.b},u.a=!1;var g6e=A(Le,"Iterators/11",555);T(946,1,Cs,Bt),u.gc=function(e){ks(this,e)},u.hc=function(){return!1},u.ic=function(){throw K(new J)},u.jc=function(){M1(!1,lw)};var m6e=A(Le,"Iterators/2",946);T(947,257,eO,h5),u.hc=function(){return this.a.hc()},u.ic=function(){return this.a.ic()};var b6e=A(Le,"Iterators/3",947);T(948,1,Cs,OTt),u.gc=function(e){ks(this,e)},u.hc=function(){return this.a.hc()||this.b.tc().hc()},u.ic=function(){return bat(this)},u.jc=function(){this.a.jc()};var w6e=A(Le,"Iterators/4",948);T(950,949,eO,J3t);var v6e=A(Le,"Iterators/6",950);T(951,479,Cs,ESt),u.Dd=function(e){return this.a.Kb(e)};var _6e=A(Le,"Iterators/7",951);T(647,1,Cs),u.gc=function(e){ks(this,e)},u.hc=function(){return Jn(this)},u.ic=function(){return In(this)},u.jc=function(){M1(!!this.c,lw),this.c.jc(),this.c=null};var y6e=A(Le,"MultitransformedIterator",647);T(182,647,{182:1,43:1},$d),u.Fd=function(e){return a(e,43)};var x6e=A(Le,"Iterators/ConcatenatedIterator",182);T(648,647,Cs,kit),u.Fd=function(e){return ale(a(e,43))};var M6e=A(Le,"Iterators/ConcatenatedIterator/1",648);T(1540,557,FP,DIt),u.Pb=function(){fat(this),K3(this.a,this.a)},u.md=function(){return new Qrt(this.b)},u.Pc=function(e){return new R6t(this,e,this.b)},u.Kc=function(){return new Yrt(this)},u.Lc=function(){var e;return new Ei((e=this.g,a(e||(this.g=new A8(this)),19)),17)},u.Xb=function(){var e;return e=this.i,e||(this.i=ct(this.c,122)?new Dv(this,a(this.c,122)):ct(this.c,115)?new p2(this,a(this.c,115)):new pM(this,this.c))},u.Rc=function(){return ts(),QT(new Yrt(this),(jv(),p6))},u.Sc=function(){var e;return m$(new Ei((e=this.g,a(e||(this.g=new A8(this)),19)),17),new Ot)},u.b=2;var E6e=A(Le,"LinkedHashMultimap",1540);T(1543,1,ys,Ot),u.Kb=function(e){return a(e,38).lc()};var S6e=A(Le,"LinkedHashMultimap/0methodref$getValue$Type",1543);T(728,1,Cs,Yrt),u.gc=function(e){ks(this,e)},u.ic=function(){return Tue(this)},u.hc=function(){return this.a!=this.b.a},u.jc=function(){M1(!!this.c,lw),nkt(this.b,this.c.g,this.c.i),this.c=null};var T6e=A(Le,"LinkedHashMultimap/1",728);T(310,372,{392:1,372:1,310:1,1706:1,3:1,38:1},Uot),u.Gd=function(){return this.f},u.Hd=function(e){this.c=e},u.Id=function(e){this.f=e},u.d=0;var kzt=A(Le,"LinkedHashMultimap/ValueEntry",310);T(1541,1660,{1706:1,20:1,25:1,13:1,19:1},R6t),u.nc=function(e){var n,i,r,c,l;for(l=oft*Bot((e==null?0:Yr(e))*cft,15),n=l&this.b.length-1,c=this.b[n],i=c;i;i=i.a)if(i.d==l&&Rp(i.i,e))return!1;return r=new Uot(this.c,e,l,c),p3t(this.d,r),r.f=this,this.d=r,K3(this.g.a.b,r),K3(r,this.g.a),this.b[n]=r,++this.f,++this.e,o1e(this),!0},u.Pb=function(){var e,n;for(rW(this.b,null),this.f=0,e=this.a;e!=this;e=e.Gd())n=a(e,310),K3(n.b,n.e);this.a=this,this.d=this,++this.e},u.pc=function(e){var n,i;for(i=oft*Bot((e==null?0:Yr(e))*cft,15),n=this.b[i&this.b.length-1];n;n=n.a)if(n.d==i&&Rp(n.i,e))return!0;return!1},u.sc=function(e){var n;for(si(e),n=this.a;n!=this;n=n.Gd())e.td(a(n,310).i)},u.Gd=function(){return this.a},u.tc=function(){return new f4t(this)},u.vc=function(e){return I9t(this,e)},u.Hd=function(e){this.d=e},u.Id=function(e){this.a=e},u._b=function(){return this.f},u.e=0,u.f=0;var C6e=A(Le,"LinkedHashMultimap/ValueSet",1541);T(1542,1,Cs,f4t),u.gc=function(e){ks(this,e)},u.hc=function(){return not(this),this.b!=this.c},u.ic=function(){var e,n;if(not(this),this.b==this.c)throw K(new J);return e=a(this.b,310),n=e.i,this.d=e,this.b=e.f,n},u.jc=function(){not(this),M1(!!this.d,lw),I9t(this.c,this.d.i),this.a=this.c.e,this.d=null},u.a=0;var A6e=A(Le,"LinkedHashMultimap/ValueSet/1",1542);T(689,1677,dZ,rrt),u.Hc=function(){return gm(this)},u.Fb=function(e){return aq(this,e)},u.Mc=function(e){return new QG(this,e)},u.Nc=function(e){return oV(this,e)},u.Pb=function(){k$(this)},u.Qb=function(e){return Wit(this,e)},u.Ic=function(){return new irt(this)},u.Jc=function(){return new Ij(this)},u.Kc=function(){throw K(new sV("should never be called"))},u.Tc=function(e){return new QG(this,e)},u.Wb=function(){return!this.a},u.Uc=function(e){return oV(this,e)},u._b=function(){return this.d},u.c=0,u.d=0;var k6e=A(Le,"LinkedListMultimap",689);T(41,25,Q2),u.jd=function(e){D1(this,e)},u.wc=function(){return new Ei(this,16)},u.bd=function(e,n){throw K(new Tp("Add not supported on this list"))},u.nc=function(e){return this.bd(this._b(),e),!0},u.Pb=function(){this.Jd(0,this._b())},u.Fb=function(e){return Hlt(this,e)},u.Hb=function(){return Oat(this)},u.dd=function(e){return tPt(this,e)},u.tc=function(){return new $3(this)},u.ed=function(){return this.fd(0)},u.fd=function(e){return new Gs(this,e)},u.gd=function(e){throw K(new Tp("Remove not supported on this list"))},u.Jd=function(e,n){var i,r;for(r=this.fd(e),i=e;i0||this.c.hc()},u.ic=function(){if(!(this.d>0||this.c.hc()))throw K(new J);return this.d==0&&(this.b=a(this.c.ic(),312),this.f=this.d=a(this.b.a.lc(),13)._b()),--this.d,this.a=!0,this.b.a.kc()},u.jc=function(){M1(this.a,lw),this.f==1?this.c.jc():Dlt(this.e,this.b.a.kc(),1)>0,--this.f,this.a=!1},u.a=!1,u.d=0,u.f=0;var hIe=A(Le,"Multisets/MultisetIteratorImpl",981);T(667,1,ys,se),u.Kb=function(e){return new Ei(lle(a(a(e,300).a.lc(),13)._b(),a(e,300).a.kc()),16)};var fIe=A(Le,"Multisets/lambda$0$Type",667);T(1684,1,jr),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var dIe=A(Le,"Ordering",1684);T(1565,1684,wZ,ot),u.Ld=function(e,n){return one(a(e,34),a(n,34))},u.Ib=function(){return"Ordering.natural()"};var Pzt,pIe=A(Le,"NaturalOrdering",1565);T(464,1,{138:1,464:1,3:1,56:1},Aut),u.Mb=function(e){return Hre(this,a(e,34))},u.Nb=function(e){return this.Mb(e)},u.Fb=function(e){var n;return ct(e,464)?(n=a(e,464),vut(this.a,n.a)&&vut(this.b,n.b)):!1},u.Hb=function(){return Yr(this.a)*31+Yr(this.b)},u.Ib=function(){return hkt(this.a,this.b)};var gIe=A(Le,"Range",464);T(485,1675,mZ,uN),u.Cd=function(){return this.a};var mIe=A(Le,"RegularImmutableList",485);T(554,550,UP,iW);var O4,bIe=A(Le,"RegularImmutableSet",554);T(729,1561,ROt,zot);var wIe=A(Le,"RegularImmutableSortedSet",729);T(543,1664,{543:1,3:1,20:1,13:1,196:1,19:1,60:1},pMt);var vIe=A(Le,"Sets/UnmodifiableNavigableSet",543);T(1165,1675,mZ,hTt),u.Cd=function(){return this.a};var _Ie=A(Le,"SingletonImmutableList",1165);T(326,1671,UP,u2),u.tc=function(){return Ao(),new f5(this.a)},u.pc=function(e){return Fi(this.a,e)},u.Ad=function(){return Ao(),new f5(this.a)},u._b=function(){return 1};var yIe=A(Le,"SingletonImmutableSet",326);T(1415,1414,FP,V4t),u.Hc=function(){var e;return e=this.f,a(a(e||(this.f=ct(this.c,122)?new KT(this,a(this.c,122)):ct(this.c,115)?new gM(this,a(this.c,115)):new rM(this,this.c)),115),122)},u.Xb=function(){var e;return e=this.i,a(a(e||(this.i=ct(this.c,122)?new Dv(this,a(this.c,122)):ct(this.c,115)?new p2(this,a(this.c,115)):new pM(this,this.c)),60),196)},u.Pc=function(e){return e==null&&this.a.Ld(null,null),new Ub(this.b)};var xIe=A(Le,"TreeMultimap",1415);T(78,1,{3:1,78:1}),u.Nd=function(e){return new y.Error(e)},u.Od=function(){return this.g},u.Pd=function(){var e,n,i;i=this.g==null?null:this.g.replace(new y.RegExp(` +`,"g")," "),n=(e=Og(this.ql),i==null?e:e+": "+i),bne(this,mce(this.Nd(n))),Ki(this)},u.Ib=function(){return q4t(this,this.Od())},u.e=NOt,u.i=!1,u.n=!0;var Izt=A(bc,"Throwable",78);T(104,78,{3:1,104:1,78:1});var MIe=A(bc,"Exception",104);T(54,104,rp,Ep,sc);var EIe=A(bc,"RuntimeException",54);T(539,54,rp);var SIe=A(bc,"JsException",539);T(760,539,rp);var TIe=A(zP,"JavaScriptExceptionBase",760);T(435,760,{435:1,3:1,104:1,54:1,78:1},xIt),u.Od=function(){return E1e(this),this.c},u.Qd=function(){return zt(this.b)===zt(w1t)?null:this.b};var w1t,CIe=A(lft,"JavaScriptException",435),Rzt=A(lft,"JavaScriptObject$",0),TK;T(1640,1,{});var AIe=A(lft,"Scheduler",1640),YO=0,Dzt=0,KO=-1;T(787,1640,{},et);var v1t,kIe=A(zP,"SchedulerImpl",787),CK;T(1653,1,{});var LIe=A(zP,"StackTraceCreator/Collector",1653);T(761,1653,{},Q),u.Rd=function(e){var n={},i,r=[];e[hft]=r;for(var c=arguments.callee.caller;c;){var l=(TM(),c.name||(c.name=Zue(c.toString())));r.push(l);var f=":"+l,g=n[f];if(g){var b,v;for(b=0,v=g.length;b=0?"+":"")+(i/60|0),n=(i<0?-i:i)%60<10?"0"+(i<0?-i:i)%60:""+(i<0?-i:i)%60,(L8t(),$zt)[this.q.getDay()]+" "+Vzt[this.q.getMonth()]+" "+PW(this.q.getDate())+" "+PW(this.q.getHours())+":"+PW(this.q.getMinutes())+":"+PW(this.q.getSeconds())+" GMT"+e+n+" "+this.q.getFullYear()};var JO=A(ii,"Date",181);T(1622,181,zOt,n8t),u.a=!1,u.b=0,u.c=0,u.d=0,u.e=0,u.f=0,u.g=!1,u.i=0,u.j=0,u.k=0,u.n=0,u.o=0,u.p=0;var HIe=A("com.google.gwt.i18n.shared.impl","DateRecord",1622);T(1659,1,{}),u.Vd=function(){return null},u.Wd=function(){return null},u.Xd=function(){return null},u.Yd=function(){return null},u.Zd=function(){return null};var GIe=A(nx,"JSONValue",1659);T(209,1659,{209:1},Rg,L8),u.Fb=function(e){return ct(e,209)?cct(this.a,a(e,209).a):!1},u.Ud=function(){return uit},u.Hb=function(){return Yot(this.a)},u.Vd=function(){return this},u.Ib=function(){var e,n,i;for(i=new ll("["),n=0,e=this.a.length;n0&&(i.a+=","),Ua(i,O2(this,n));return i.a+="]",i.a};var WIe=A(nx,"JSONArray",209);T(443,1659,{443:1},P8),u.Ud=function(){return lit},u.Wd=function(){return this},u.Ib=function(){return me(),""+this.a},u.a=!1;var Nzt,Ozt,$Ie=A(nx,"JSONBoolean",443);T(877,54,rp,Uxt);var VIe=A(nx,"JSONException",877);T(913,1659,{},Fn),u.Ud=function(){return p9},u.Ib=function(){return eu};var Bzt,qIe=A(nx,"JSONNull",913);T(259,1659,{259:1},d5),u.Fb=function(e){return ct(e,259)?this.a==a(e,259).a:!1},u.Ud=function(){return LG},u.Hb=function(){return Tr(lt(this.a))},u.Xd=function(){return this},u.Ib=function(){return this.a+""},u.a=0;var XIe=A(nx,"JSONNumber",259);T(191,1659,{191:1},vT,rT),u.Fb=function(e){return ct(e,191)?cct(this.a,a(e,191).a):!1},u.Ud=function(){return hit},u.Hb=function(){return Yot(this.a)},u.Yd=function(){return this},u.Ib=function(){var e,n,i,r,c,l;for(l=new ll("{"),e=!0,c=vat(this,dt(At,wt,2,0,6,1)),i=0,r=c.length;i=0?":"+this.c:"")+")"},u.c=0;var I1t=A(bc,"StackTraceElement",287);Szt={3:1,476:1,34:1,2:1};var At=A(bc,uft,2);T(100,381,{476:1},Sp,_T,ul);var gRe=A(bc,"StringBuffer",100);T(98,381,{476:1},om,Bb,ll);var mRe=A(bc,"StringBuilder",98);T(763,79,zZ,Hxt);var bRe=A(bc,"StringIndexOutOfBoundsException",763);T(1722,1,{});var R1t,D1t;T(46,54,{3:1,104:1,54:1,78:1,46:1},Oi,Tp);var wRe=A(bc,"UnsupportedOperationException",46);T(216,210,{3:1,34:1,210:1,216:1},PL,Pit),u.vd=function(e){return VNt(this,a(e,216))},u.$d=function(){return rw(b7t(this))},u.Fb=function(e){var n;return this===e?!0:ct(e,216)?(n=a(e,216),this.e==n.e&&VNt(this,n)==0):!1},u.Hb=function(){var e;return this.b!=0?this.b:this.a<54?(e=Ja(this.f),this.b=or(ns(e,-1)),this.b=33*this.b+or(ns(E1(e,32),-1)),this.b=17*this.b+Tr(this.e),this.b):(this.b=17*G6t(this.c)+Tr(this.e),this.b)},u.Ib=function(){return b7t(this)},u.a=0,u.b=0,u.d=0,u.e=0,u.f=0;var jzt,b0,N1t,O1t,B1t,F1t,U1t,z1t,LK=A("java.math","BigDecimal",216);T(89,210,{3:1,34:1,210:1,89:1},Cut,Fp,qv,Kut,iRt,y1),u.vd=function(e){return HIt(this,a(e,89))},u.$d=function(){return rw(lZ(this,0))},u.Fb=function(e){return Kat(this,e)},u.Hb=function(){return G6t(this)},u.Ib=function(){return lZ(this,0)},u.b=-2,u.c=0,u.d=0,u.e=0;var PK,QO,j1t,IK,tB,AE,q_=A("java.math","BigInteger",89),Hzt,Gzt,px,U4;T(441,1666,uE),u.Pb=function(){lu(this)},u.Qb=function(e){return dm(this,e)},u.Rb=function(e){return P6t(this,e,this.e)||P6t(this,e,this.d)},u.Tb=function(){return new xp(this)},u.Vb=function(e){return zi(this,e)},u.Zb=function(e,n){return wr(this,e,n)},u.$b=function(e){return IM(this,e)},u._b=function(){return nM(this)};var vRe=A(ii,"AbstractHashMap",441);T(242,bd,vl,xp),u.Pb=function(){this.a.Pb()},u.pc=function(e){return QAt(this,e)},u.tc=function(){return new qg(this.a)},u.vc=function(e){var n;return QAt(this,e)?(n=a(e,38).kc(),this.a.$b(n),!0):!1},u._b=function(){return this.a._b()};var _Re=A(ii,"AbstractHashMap/EntrySet",242);T(243,1,Cs,qg),u.gc=function(e){ks(this,e)},u.ic=function(){return Sm(this)},u.hc=function(){return this.b},u.jc=function(){O5t(this)},u.b=!1;var yRe=A(ii,"AbstractHashMap/EntrySetIterator",243);T(433,1,Cs,$3),u.gc=function(e){ks(this,e)},u.hc=function(){return R9(this)},u.ic=function(){return E4t(this)},u.jc=function(){Th(this)},u.b=0,u.c=-1;var xRe=A(ii,"AbstractList/IteratorImpl",433);T(94,433,kf,Gs),u.jc=function(){Th(this)},u.Bc=function(e){cd(this,e)},u.Cc=function(){return this.b>0},u.Dc=function(){return this.b},u.Ec=function(){return Hn(this.b>0),this.a.cd(this.c=--this.b)},u.Fc=function(){return this.b-1},u.Gc=function(e){Gv(this.c!=-1),this.a.hd(this.c,e)};var MRe=A(ii,"AbstractList/ListIteratorImpl",94);T(227,41,Q2,C1),u.bd=function(e,n){Qv(e,this.b),this.c.bd(this.a+e,n),++this.b},u.cd=function(e){return mi(e,this.b),this.c.cd(this.a+e)},u.gd=function(e){var n;return mi(e,this.b),n=this.c.gd(this.a+e),--this.b,n},u.hd=function(e,n){return mi(e,this.b),this.c.hd(this.a+e,n)},u._b=function(){return this.b},u.a=0,u.b=0;var ERe=A(ii,"AbstractList/SubList",227);T(352,bd,vl,Sv),u.Pb=function(){this.a.Pb()},u.pc=function(e){return this.a.Qb(e)},u.tc=function(){var e;return e=this.a.Tb().tc(),new p5(e)},u.vc=function(e){return this.a.Qb(e)?(this.a.$b(e),!0):!1},u._b=function(){return this.a._b()};var SRe=A(ii,"AbstractMap/1",352);T(542,1,Cs,p5),u.gc=function(e){ks(this,e)},u.hc=function(){return this.a.hc()},u.ic=function(){var e;return e=a(this.a.ic(),38),e.kc()},u.jc=function(){this.a.jc()};var TRe=A(ii,"AbstractMap/1/1",542);T(223,25,R_,vf),u.Pb=function(){this.a.Pb()},u.pc=function(e){return this.a.Rb(e)},u.tc=function(){var e;return e=this.a.Tb().tc(),new nm(e)},u._b=function(){return this.a._b()};var CRe=A(ii,"AbstractMap/2",223);T(321,1,Cs,nm),u.gc=function(e){ks(this,e)},u.hc=function(){return this.a.hc()},u.ic=function(){var e;return e=a(this.a.ic(),38),e.lc()},u.jc=function(){this.a.jc()};var ARe=A(ii,"AbstractMap/2/1",321);T(440,1,{440:1,38:1}),u.Fb=function(e){var n;return ct(e,38)?(n=a(e,38),uu(this.d,n.kc())&&uu(this.e,n.lc())):!1},u.kc=function(){return this.d},u.lc=function(){return this.e},u.Hb=function(){return rD(this.d)^rD(this.e)},u.mc=function(e){return gst(this,e)},u.Ib=function(){return this.d+"="+this.e};var kRe=A(ii,"AbstractMap/AbstractEntry",440);T(351,440,{440:1,351:1,38:1},O9);var LRe=A(ii,"AbstractMap/SimpleEntry",351);T(1672,1,Q7),u.Fb=function(e){var n;return ct(e,38)?(n=a(e,38),uu(this.kc(),n.kc())&&uu(this.lc(),n.lc())):!1},u.Hb=function(){return rD(this.kc())^rD(this.lc())},u.Ib=function(){return this.kc()+"="+this.lc()};var PRe=A(ii,kOt,1672);T(1685,1666,COt),u.Wc=function(e){return Jkt(this,e)},u.Qb=function(e){return sW(this,e)},u.Tb=function(){return new z8(this)},u.Vb=function(e){return za(Uat(this,e))},u.Xb=function(){return new Tv(this)};var IRe=A(ii,"AbstractNavigableMap",1685);T(668,bd,vl,z8),u.pc=function(e){return ct(e,38)&&Jkt(this.b,a(e,38))},u.tc=function(){return new cL(this.b)},u.vc=function(e){var n;return ct(e,38)?(n=a(e,38),B5t(this.b,n)):!1},u._b=function(){return this.b.c};var RRe=A(ii,"AbstractNavigableMap/EntrySet",668);T(488,bd,sft,Tv),u.wc=function(){return new B5(this)},u.Pb=function(){k5(this.a)},u.pc=function(e){return sW(this.a,e)},u.tc=function(){var e;return e=new cL(new J5(this.a).b),new sT(e)},u.vc=function(e){return sW(this.a,e)?(oC(this.a,e),!0):!1},u._b=function(){return this.a.c};var DRe=A(ii,"AbstractNavigableMap/NavigableKeySet",488);T(489,1,Cs,sT),u.gc=function(e){ks(this,e)},u.hc=function(){return R9(this.a.a)},u.ic=function(){var e;return e=WW(this.a),e.kc()},u.jc=function(){VTt(this.a)};var NRe=A(ii,"AbstractNavigableMap/NavigableKeySet/1",489);T(1693,25,R_),u.nc=function(e){return RM(JM(this,e)),!0},u.oc=function(e){return En(e),xD(e!=this,"Can't add a queue to itself"),yo(this,e)},u.Pb=function(){for(;PV(this)!=null;);};var ORe=A(ii,"AbstractQueue",1693);T(407,25,{4:1,20:1,25:1,13:1},X3,KCt),u.nc=function(e){return dct(this,e),!0},u.Pb=function(){xct(this)},u.pc=function(e){return o6t(new cC(this),e)},u.Wb=function(){return Rit(this)},u.tc=function(){return new cC(this)},u.vc=function(e){return Loe(new cC(this),e)},u._b=function(){return this.c-this.b&this.a.length-1},u.wc=function(){return new Ei(this,272)},u.zc=function(e){var n,i;return i=this.c-this.b&this.a.length-1,e.lengthi&&Vr(e,i,null),e},u.b=0,u.c=0;var BRe=A(ii,"ArrayDeque",407);T(408,1,Cs,cC),u.gc=function(e){ks(this,e)},u.hc=function(){return this.a!=this.b},u.ic=function(){return VN(this)},u.jc=function(){rPt(this)},u.a=0,u.b=0,u.c=-1;var FRe=A(ii,"ArrayDeque/IteratorImpl",408);T(12,41,GOt,Dt,qu,Eh),u.bd=function(e,n){pm(this,e,n)},u.nc=function(e){return Ut(this,e)},u.oc=function(e){return Or(this,e)},u.Pb=function(){this.c=dt(un,te,1,0,5,1)},u.pc=function(e){return nc(this,e,0)!=-1},u.sc=function(e){pd(this,e)},u.cd=function(e){return Ee(this,e)},u.dd=function(e){return nc(this,e,0)},u.Wb=function(){return this.c.length==0},u.tc=function(){return new j(this)},u.gd=function(e){return Em(this,e)},u.vc=function(e){return Lc(this,e)},u.Jd=function(e,n){AAt(this,e,n)},u.hd=function(e,n){return Kl(this,e,n)},u._b=function(){return this.c.length},u.jd=function(e){gc(this,e)},u.yc=function(){return qW(this)},u.zc=function(e){return xo(this,e)};var P3e=A(ii,"ArrayList",12);T(7,1,Cs,j),u.gc=function(e){ks(this,e)},u.hc=function(){return Qo(this)},u.ic=function(){return H(this)},u.jc=function(){iC(this)},u.a=0,u.b=-1;var URe=A(ii,"ArrayList/1",7);T(155,41,WOt,ju),u.pc=function(e){return tPt(this,e)!=-1},u.sc=function(e){var n,i,r,c;for(En(e),i=this.a,r=0,c=i.length;r=0},u.qc=function(e){return O1(this.b,e)},u.tc=function(){return new Dg(EM(this.b).b.tc())},u.vc=function(e){return wPt(this,e)},u._b=function(){return this.b.c.length},u.wc=function(){return new Ei(this,256)},u.yc=function(){return qW(this.b)},u.zc=function(e){return xo(this.b,e)};var L8e=A(ii,"PriorityQueue",453);T(214,1,{214:1},kq,lN),u.a=0,u.b=0;var q1t,X1t,N3e=0,P8e=A(ii,"Random",214);T(39,1,Wp,Ei,S2,R5t),u.qd=function(){return this.a},u.rd=function(){return vot(this),this.c},u.gc=function(e){vot(this),this.d.gc(e)},u.sd=function(e){return tat(this,e)},u.a=0,u.c=0;var I8e=A(ii,"Spliterators/IteratorSpliterator",39);T(382,39,Wp,B5);var R8e=A(ii,"SortedSet/1",382);T(625,1,{},j8),u.ie=function(e){this.a.td(e)};var D8e=A(ii,"Spliterator/OfDouble/0methodref$accept$Type",625);T(626,1,{},H8),u.ie=function(e){this.a.td(e)};var N8e=A(ii,"Spliterator/OfDouble/1methodref$accept$Type",626);T(642,1,Wp),u.gc=function(e){B3t(this,e)},u.qd=function(){return this.d},u.rd=function(){return this.e},u.d=0,u.e=0;var O8e=A(ii,"Spliterators/BaseSpliterator",642);T(929,642,Wp),u.gc=function(e){ct(e,273)?Hst(this,a(e,273)):Hst(this,new H8(e))},u.sd=function(e){return ct(e,273)?$v(this,a(e,273)):$v(this,new j8(e))};var B8e=A(ii,"Spliterators/AbstractDoubleSpliterator",929);T(446,642,Wp);var F8e=A(ii,"Spliterators/AbstractSpliterator",446);T(790,1,Wp),u.gc=function(e){B3t(this,e)},u.qd=function(){return this.b},u.rd=function(){return this.d-this.c},u.b=0,u.c=0,u.d=0;var U8e=A(ii,"Spliterators/BaseArraySpliterator",790);T(791,790,Wp,A4t),u.gc=function(e){kse(this,e)},u.sd=function(e){return Uae(this,e)};var z8e=A(ii,"Spliterators/ArraySpliterator",791);T(789,1,Cs,T3t),u.gc=function(e){ct(e,273)?$kt(this,a(e,273)):$kt(this,new cT(e))},u.ic=function(){return fN(this)},u.jc=function(){Vxt()},u.ie=function(e){this.b=e},u.hc=function(){return this.a||(this.a=$v(this.c,this)),this.a},u.a=!1,u.b=0;var j8e=A(ii,"Spliterators/DoubleConsumerIterator",789);T(523,41,VOt,nd),u.bd=function(e,n){eC(e,this.a.c.length+1),pm(this.a,e,n)},u.nc=function(e){return Ut(this.a,e)},u.oc=function(e){return Or(this.a,e)},u.Pb=function(){this.a.c=dt(un,te,1,0,5,1)},u.pc=function(e){return nc(this.a,e,0)!=-1},u.qc=function(e){return O1(this.a,e)},u.sc=function(e){pd(this.a,e)},u.cd=function(e){return eC(e,this.a.c.length),Ee(this.a,e)},u.dd=function(e){return nc(this.a,e,0)},u.Wb=function(){return this.a.c.length==0},u.tc=function(){return new j(this.a)},u.gd=function(e){return eC(e,this.a.c.length),Em(this.a,e)},u.Jd=function(e,n){AAt(this.a,e,n)},u.hd=function(e,n){return eC(e,this.a.c.length),Kl(this.a,e,n)},u._b=function(){return this.a.c.length},u.jd=function(e){gc(this.a,e)},u.kd=function(e,n){return new C1(this.a,e,n)},u.yc=function(){return qW(this.a)},u.zc=function(e){return xo(this.a,e)},u.Ib=function(){return Gp(this.a)};var H8e=A(ii,"Vector",523);T(596,523,VOt,OG);var G8e=A(ii,"Stack",596);T(254,1,{},Mm),u.Ib=function(){return this.a?this.e.length==0?this.a.a:this.a.a+(""+this.e):this.c};var W8e=A(ii,"StringJoiner",254);T(487,1685,{3:1,109:1,122:1,115:1},cMt,x$),u.Pb=function(){k5(this)},u.Tb=function(){return new J5(this)},u.Zb=function(e,n){return GN(this,e,n)},u.$b=function(e){return oC(this,e)},u._b=function(){return this.c},u.c=0;var $8e=A(ii,"TreeMap",487);T(397,1,Cs,cL),u.gc=function(e){ks(this,e)},u.ic=function(){return WW(this)},u.hc=function(){return R9(this.a)},u.jc=function(){VTt(this)};var V8e=A(ii,"TreeMap/EntryIterator",397);T(449,668,vl,J5),u.Pb=function(){k5(this.a)};var q8e=A(ii,"TreeMap/EntrySet",449);T(398,351,{440:1,351:1,38:1,398:1},vV),u.b=!1;var O3e=A(ii,"TreeMap/Node",398);T(560,1,{},it),u.Ib=function(){return"State: mv="+this.c+" value="+this.d+" done="+this.a+" found="+this.b},u.a=!1,u.b=!1,u.c=!1;var X8e=A(ii,"TreeMap/State",560);T(278,23,$Z,B9),u.je=function(){return!1},u.ke=function(){return!1};var RK,Z1t,Y1t,K1t,nB=Ri(ii,"TreeMap/SubMapType",278,ji,Lce,Fne);T(982,278,$Z,ZEt),u.ke=function(){return!0};var Z8e=Ri(ii,"TreeMap/SubMapType/1",982,nB,null,null);T(983,278,$Z,oSt),u.je=function(){return!0},u.ke=function(){return!0};var Y8e=Ri(ii,"TreeMap/SubMapType/2",983,nB,null,null);T(984,278,$Z,YEt),u.je=function(){return!0};var K8e=Ri(ii,"TreeMap/SubMapType/3",984,nB,null,null),Yzt;T(212,bd,{3:1,20:1,25:1,13:1,196:1,19:1,60:1,212:1},pit,Ub),u.wc=function(){return new B5(this)},u.nc=function(e){return WD(this,e)},u.Pb=function(){k5(this.a)},u.pc=function(e){return sW(this.a,e)},u.tc=function(){var e;return e=new cL(new J5(new Tv(this.a).a).b),new sT(e)},u.vc=function(e){return tst(this,e)},u._b=function(){return this.a.c};var B3e=A(ii,"TreeSet",212);T(845,1,{},Kj),u.le=function(e,n){return ane(this.a,e,n)};var J8e=A(VZ,"BinaryOperator/lambda$0$Type",845);T(846,1,{},wn),u.le=function(e,n){return Lp(a(e,21).a,a(n,21).a)<=0?e:n};var Q8e=A(VZ,"BinaryOperator/lambda$1$Type",846);T(843,1,ys,ut),u.Kb=function(e){return e};var t9e=A(VZ,"Function/lambda$0$Type",843);T(627,1,us,W8),u.Nb=function(e){return!this.a.Nb(e)};var e9e=A(VZ,"Predicate/lambda$0$Type",627);T(150,23,{3:1,34:1,23:1,150:1},oW);var J1t,Qh,bw,tf=Ri(Qs,"Collector/Characteristics",150,ji,joe,Une),Kzt;T(684,1,{},ZTt,g8t);var n9e=A(Qs,"Collector/CollectorImpl",684);T(1053,1,ys,Jj),u.Kb=function(e){return me(),!!wct(e)};var i9e=A(Qs,"Collectors/12methodref$test$Type",1053);T(365,1,{},ge),u.Kd=function(e,n){a(e,13).nc(n)};var r9e=A(Qs,"Collectors/20methodref$add$Type",365);T(367,1,{},Pe),u.ne=function(){return new Dt};var s9e=A(Qs,"Collectors/21methodref$ctor$Type",367);T(331,1,{},ti),u.ne=function(){return new $r};var o9e=A(Qs,"Collectors/23methodref$ctor$Type",331);T(332,1,{},Qn),u.Kd=function(e,n){Ir(a(e,67),n)};var c9e=A(Qs,"Collectors/24methodref$add$Type",332);T(1050,1,{},Yi),u.le=function(e,n){return aMt(a(e,15),a(n,13))};var a9e=A(Qs,"Collectors/4methodref$addAll$Type",1050);T(683,1,{},ki),u.le=function(e,n){return rct(e,n)};var u9e=A(Qs,"Collectors/lambda$1$Type",683);T(1055,1,{},Qj),u.ne=function(){return Y(Z(un,1),te,1,5,[this.a])};var l9e=A(Qs,"Collectors/lambda$10$Type",1055);T(1056,1,{},b5),u.Kd=function(e,n){yre(this.a,e)};var h9e=A(Qs,"Collectors/lambda$11$Type",1056);T(1057,1,{},V8),u.le=function(e,n){return qre(this.a,e,n)};var f9e=A(Qs,"Collectors/lambda$12$Type",1057);T(1058,1,ys,lr),u.Kb=function(e){return r_(e)[0]};var d9e=A(Qs,"Collectors/lambda$13$Type",1058);T(366,1,{},pr),u.le=function(e,n){return a(e,13).oc(a(n,13)),a(e,13)};var p9e=A(Qs,"Collectors/lambda$21$Type",366);T(333,1,{},Kt),u.le=function(e,n){return yo(a(e,67),a(n,67)),a(e,67)};var g9e=A(Qs,"Collectors/lambda$25$Type",333);T(334,1,ys,kt),u.Kb=function(e){return a(e,67)};var m9e=A(Qs,"Collectors/lambda$26$Type",334);T(1049,1,{},tH),u.Kd=function(e,n){qle(this.a,e,n)};var b9e=A(Qs,"Collectors/lambda$3$Type",1049);T(1051,1,{},Nt),u.le=function(e,n){return Rle(a(e,109),a(n,109),new Yi)};var w9e=A(Qs,"Collectors/lambda$4$Type",1051);T(1052,1,ys,eH),u.Kb=function(e){return tfe(this.a,e)};var v9e=A(Qs,"Collectors/lambda$5$Type",1052);T(1054,1,{},ie),u.ne=function(){var e;return e=new xm,Pm(e,(me(),me(),!1),new Dt),Pm(e,!0,new Dt),e};var _9e=A(Qs,"Collectors/lambda$8$Type",1054);T(645,1,{}),u.d=!1;var y9e=A(Qs,"TerminatableStream",645);T(1416,645,{607:1,1701:1},nTt);var x9e=A(Qs,"DoubleStream/DoubleStreamSource",1416);T(1417,1,{},nH),u.ie=function(e){jIt(this.a,e)};var M9e=A(Qs,"DoubleStream/DoubleStreamSource/lambda$2$Type",1417),F3e=Sr(Qs,"Stream");T(940,446,Wp,BTt),u.sd=function(e){for(;iue(this);){if(this.a.sd(e))return!0;this.a=null}return!1};var E9e=A(Qs,"Stream/2",940);T(941,1,{},iH),u.td=function(e){Fee(this.a,e)};var S9e=A(Qs,"Stream/2/lambda$0$Type",941);T(942,1,VP,rH),u.fe=function(){B$(this.a)};var T9e=A(Qs,"Stream/3methodref$close$Type",942);T(943,1,VP,sH),u.fe=function(){B$(this.a)};var C9e=A(Qs,"Stream/4methodref$close$Type",943);T(644,446,Wp,Uct),u.sd=function(e){for(this.b=!1;!this.b&&this.c.sd(new _Mt(this,e)););return this.b},u.b=!1;var A9e=A(Qs,"Stream/FilterSpliterator",644);T(932,1,{},_Mt),u.td=function(e){Xre(this.a,this.b,e)};var k9e=A(Qs,"Stream/FilterSpliterator/lambda$0$Type",932);T(930,929,Wp,s5t);var L9e=A(Qs,"Stream/MapToDoubleSpliterator",930);T(646,1,{},crt),u.td=function(e){Ste(this.a,this.b,e)};var P9e=A(Qs,"Stream/MapToDoubleSpliterator/lambda$0$Type",646);T(643,446,Wp,Dct),u.sd=function(e){return zTt(this,e)};var I9e=A(Qs,"Stream/MapToObjSpliterator",643);T(931,1,{},yMt),u.td=function(e){Tte(this.a,this.b,e)};var R9e=A(Qs,"Stream/MapToObjSpliterator/lambda$0$Type",931);T(45,645,{607:1,1701:1,1700:1},gi);var D9e=A(Qs,"Stream/StreamSource",45);T(936,446,Wp,FTt),u.sd=function(e){for(;rue(this);){if(this.a.sd(e))return!0;B$(this.b),this.b=null,this.a=null}return!1};var N9e=A(Qs,"Stream/StreamSource/1",936);T(937,1,{},oH),u.td=function(e){hre(this.a,e)};var O9e=A(Qs,"Stream/StreamSource/1/lambda$0$Type",937);T(938,446,Wp,B4t),u.sd=function(e){var n;return this.a||(n=new Dt,this.b.a.gc(new cH(n)),we(),gc(n,this.c),this.a=new Ei(n,16)),tat(this.a,e)},u.a=null;var B9e=A(Qs,"Stream/StreamSource/5",938);T(939,1,{},cH),u.td=function(e){Ut(this.a,e)};var F9e=A(Qs,"Stream/StreamSource/5/2methodref$add$Type",939);T(933,1,{},yt),u.td=function(e){};var U9e=A(Qs,"Stream/StreamSource/lambda$0$Type",933);T(934,1,{},aH),u.le=function(e,n){return yee(this.a,e,n)};var z9e=A(Qs,"Stream/StreamSource/lambda$3$Type",934);T(935,1,{},xMt),u.td=function(e){tee(this.b,this.a,e)};var j9e=A(Qs,"Stream/StreamSource/lambda$4$Type",935);T(553,1,{},ue),u.td=function(e){O8(this,e)};var H9e=A(Qs,"Stream/ValueConsumer",553);T(944,1,{},uH),u.td=function(e){Ule(this.a,e)};var G9e=A(Qs,"TerminatableStream/lambda$0$Type",944),U3e=0,Q1t,tgt=0,iB;T(1480,1,{},Ekt);var W9e=A(XOt,"Scanline",1480),z3e=Sr(XOt,ZOt);T(1450,1,{},ELt);var $9e=A(vd,"CGraph",1450);T(309,1,{309:1},TAt),u.b=0,u.c=0,u.d=0,u.g=0,u.i=0,u.k=Ps;var V9e=A(vd,"CGroup",309);T(723,1,{},git);var q9e=A(vd,"CGroup/CGroupBuilder",723);T(57,1,{57:1},pTt),u.Ib=function(){return this.j?hi(this.j.Kb(this)):(Vd(rB),rB.o+"@"+(lm(this)>>>0).toString(16))},u.f=0,u.i=Ps;var rB=A(vd,"CNode",57);T(722,1,{},mit);var X9e=A(vd,"CNode/CNodeBuilder",722),Jzt;T(1236,1,{},fn),u.se=function(e,n){return 0},u.te=function(e,n){return 0};var Z9e=A(vd,KOt,1236);T(1505,1,{},An),u.pe=function(e){var n,i,r,c,l,f,g,b,v,M,k,R,N,$,G;for(v=is,r=new j(e.a.b);r.ar.d.c||r.d.c==l.d.c&&r.d.b=0?"b"+e+"["+uV(this.a)+"]":"b["+uV(this.a)+"]"):"b_"+lm(this)};var nNe=A(XP,"FBendpoint",497);T(262,131,{3:1,262:1,93:1,131:1},vTt),u.Ib=function(){return uV(this)};var iNe=A(XP,"FEdge",262);T(202,131,{3:1,202:1,93:1,131:1},gN);var H3e=A(XP,"FGraph",202);T(454,329,{3:1,454:1,329:1,93:1,131:1},Mkt),u.Ib=function(){return this.b==null||this.b.length==0?"l["+uV(this.a)+"]":"l_"+this.b};var rNe=A(XP,"FLabel",454);T(146,329,{3:1,146:1,329:1,93:1,131:1},u4t),u.Ib=function(){return uct(this)},u.b=0;var sNe=A(XP,"FNode",146);T(1691,1,{}),u.Ee=function(e){Iht(this,e)},u.Fe=function(){URt(this)},u.d=0;var oNe=A(Rft,"AbstractForceModel",1691);T(568,1691,{568:1},YPt),u.De=function(e,n){var i,r,c,l,f;return M9t(this.f,e,n),c=ja(Xc(n.d),e.d),f=y.Math.sqrt(c.a*c.a+c.b*c.b),r=y.Math.max(0,f-O$(e.e)/2-O$(n.e)/2),i=r6t(this.e,e,n),i>0?l=-ese(r,this.c)*i:l=Jee(r,this.b)*a(z(e,(Ph(),kE)),21).a,hl(c,l/f),c},u.Ee=function(e){Iht(this,e),this.a=a(z(e,(Ph(),lB)),21).a,this.c=lt(Yt(z(e,hB))),this.b=lt(Yt(z(e,WK)))},u.Ge=function(e){return e0&&(l-=LQt(r,this.a)*i),hl(c,l*this.b/f),c},u.Ee=function(e){var n,i,r,c,l,f,g;for(Iht(this,e),this.b=lt(Yt(z(e,(Ph(),$K)))),this.c=this.b/a(z(e,lB),21).a,r=e.e.c.length,l=0,c=0,g=new j(e.e);g.a0},u.a=0,u.b=0,u.c=0;var aNe=A(Rft,"FruchtermanReingoldModel",569);T(748,1,_d,fj),u.ue=function(e){He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,uO),""),"Force Model"),"Determines the model for force calculation."),Cgt),(i0(),xs)),Agt),qe((t0(),On))))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Dft),""),"Iterations"),"The number of iterations on the force model."),Xt(300)),Pa),Io),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Nft),""),"Repulsive Power"),"Determines how many bend points are added to the edge; such bend points are regarded as repelling particles in the force model"),Xt(0)),Pa),Io),qe(Md)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,sY),""),"FR Temperature"),"The temperature is used as a scaling factor for particle displacements."),op),ha),To),qe(On)))),Sa(e,sY,uO,Sjt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,oY),""),"Eades Repulsion"),"Factor for repulsive forces in Eades' model."),5),ha),To),qe(On)))),Sa(e,oY,uO,xjt),q7t((new pj,e))};var vjt,_jt,Cgt,yjt,xjt,Mjt,Ejt,Sjt,uNe=A(g4,"ForceMetaDataProvider",748);T(387,23,{3:1,34:1,23:1,387:1},frt);var GK,uB,Agt=Ri(g4,"ForceModelStrategy",387,ji,loe,Wne),Tjt;T(880,1,_d,pj),u.ue=function(e){q7t(e)};var Cjt,kgt,lB,Lgt,Ajt,Pgt,Igt,kE,kjt,WK,Rgt,Ljt,Pjt,hB,$K,lNe=A(g4,"ForceOptions",880);T(881,1,{},rv),u.Be=function(){var e;return e=new bit,e},u.Ce=function(e){};var hNe=A(g4,"ForceOptions/ForceFactory",881),y6,j4,gx,fB;T(749,1,_d,b8),u.ue=function(e){He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Fft),""),"Fixed Position"),"Prevent that the node is moved by the layout algorithm."),(me(),me(),!1)),(i0(),Ec)),ho),qe((t0(),vc))))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Uft),""),"Desired Edge Length"),"Either specified for parent nodes or for individual edges, where the latter takes higher precedence."),100),ha),To),ur(On,Y(Z(Jp,1),jt,163,0,[Md]))))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,zft),""),"Layout Dimension"),"Dimensions that are permitted to be altered during layout."),Dgt),xs),zgt),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,jft),""),"Stress Epsilon"),"Termination criterion for the iterative process."),op),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Hft),""),"Iteration Limit"),"Maximum number of performed iterations. Takes higher precedence than 'epsilon'."),Xt(qi)),Pa),Io),qe(On)))),f7t((new dj,e))};var Ijt,Rjt,Dgt,Djt,Njt,Ojt,fNe=A(g4,"StressMetaDataProvider",749);T(884,1,_d,dj),u.ue=function(e){f7t(e)};var dB,Ngt,Ogt,Bgt,Fgt,Ugt,dNe=A(g4,"StressOptions",884);T(885,1,{},z0),u.Be=function(){var e;return e=new _Tt,e},u.Ce=function(e){};var pNe=A(g4,"StressOptions/StressFactory",885);T(959,244,N_,_Tt),u.Ae=function(e,n){var i,r,c,l;for(di(n,bBt,1),lt(de(cn(e,(UL(),Fgt))))||i9t(new bit,e,Ta(n,1)),r=y6t(e),i=QNt(this.a,r),l=i.tc();l.hc();)c=a(l.ic(),202),q_e(this.b,c),U0e(this.b);r=hOt(i),cOt(r),Vn(n)};var gNe=A(uY,"StressLayoutProvider",959);T(882,1,{},DG),u.c=0,u.e=0,u.g=0;var mNe=A(uY,"StressMajorization",882);T(348,23,{3:1,34:1,23:1,348:1},cW);var VK,qK,XK,zgt=Ri(uY,"StressMajorization/Dimension",348,ji,Joe,$ne),Bjt;T(883,1,jr,Av),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return wne(this.a,e,n)};var bNe=A(uY,"StressMajorization/lambda$0$Type",883);T(985,1,{},FAt);var wNe=A(KP,"ElkLayered",985);T(986,1,{},Us),u.td=function(e){mue(this.a,e)};var vNe=A(KP,"ElkLayered/lambda$0$Type",986);T(987,1,{},j0),u.td=function(e){Ct(a(e,31),(qt(),$B),(BM(),NB))};var _Ne=A(KP,"ElkLayered/lambda$1$Type",987);T(1033,1,{},aSt);var Fjt,Ujt,zjt,yNe=A(KP,"GraphConfigurator",1033);T(958,244,N_,yu),u.Ae=function(e,n){var i;i=Swe(new AEt,e),zt(cn(e,(qt(),J4)))===zt((Kg(),Rx))?Hhe(this.a,i,n):Y0e(this.a,i,n),oOt(new w8,i)};var xNe=A(KP,"LayeredLayoutProvider",958);T(328,23,{3:1,34:1,23:1,328:1},F5);var Of,mx,aa,ua,Yo,jgt=Ri(KP,"LayeredPhases",328,ji,cae,Vne),jjt;T(1407,1,{},GPt),u.i=0;var Hjt,MNe=A(JP,"ComponentsToCGraphTransformer",1407),Gjt;T(1408,1,{},sv),u.He=function(e,n){return y.Math.min(e.a!=null?lt(e.a):e.c.i,n.a!=null?lt(n.a):n.c.i)},u.Ie=function(e,n){return y.Math.min(e.a!=null?lt(e.a):e.c.i,n.a!=null?lt(n.a):n.c.i)};var ENe=A(JP,"ComponentsToCGraphTransformer/1",1408);T(80,1,{80:1}),u.i=0,u.k=!0,u.o=Ps;var ZK=A(b4,"CNode",80);T(282,80,{282:1,80:1},ist,Sut),u.Ib=function(){return""};var SNe=A(JP,"ComponentsToCGraphTransformer/CRectNode",282);T(1391,1,{},vg);var YK,KK,TNe=A(JP,"OneDimensionalComponentsCompaction",1391);T(1392,1,rh,ov),u.Fb=function(e){return this===e},u.Kb=function(e){return vq(),me(),a(a(e,48).a,80).d.e!=0};var CNe=A(JP,"OneDimensionalComponentsCompaction/lambda$0$Type",1392);T(1393,1,rh,l3),u.Fb=function(e){return this===e},u.Kb=function(e){return vq(),me(),!!(_It(a(a(e,48).a,80).j,a(a(e,48).b,110))||a(a(e,48).a,80).d.e!=0&&_It(a(a(e,48).a,80).j,a(a(e,48).b,110)))};var ANe=A(JP,"OneDimensionalComponentsCompaction/lambda$1$Type",1393);T(1410,1,{},a4t);var kNe=A(b4,"CGraph",1410);T(172,1,{172:1},Dq),u.b=0,u.c=0,u.e=0,u.g=!0,u.i=Ps;var LNe=A(b4,"CGroup",172);T(1409,1,{},Rt),u.He=function(e,n){return y.Math.max(e.a!=null?lt(e.a):e.c.i,n.a!=null?lt(n.a):n.c.i)},u.Ie=function(e,n){return y.Math.max(e.a!=null?lt(e.a):e.c.i,n.a!=null?lt(n.a):n.c.i)};var PNe=A(b4,KOt,1409);T(1411,1,{},F9t),u.d=!1;var Wjt,JK=A(b4,tBt,1411);T(1412,1,rh,ve),u.Fb=function(e){return this===e},u.Kb=function(e){return Vit(),me(),a(a(e,48).a,80).d.e!=0};var INe=A(b4,eBt,1412);T(726,1,{},cot),u.a=!1,u.b=!1,u.c=!1,u.d=!1;var RNe=A(b4,nBt,726);T(1521,1,{},OCt);var DNe=A(fO,iBt,1521),x6=Sr(u0,ZOt);T(1522,1,{341:1},X4t),u.Ne=function(e){dwe(this,a(e,524))};var NNe=A(fO,rBt,1522);T(1523,1,jr,Je),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return ro(a(e,282).g.c+a(e,282).g.b/2,a(n,282).g.c+a(n,282).g.b/2)};var ONe=A(fO,sBt,1523);T(524,1,{524:1},drt),u.a=!1;var BNe=A(fO,oBt,524);T(1524,1,jr,tn),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return $pe(e,n)};var FNe=A(fO,cBt,1524);T(102,1,{102:1},aM,Kst),u.Fb=function(e){var n;return e==null||G3e!=du(e)?!1:(n=a(e,102),uu(this.c,n.c)&&uu(this.d,n.d))},u.Hb=function(){return sq(Y(Z(un,1),te,1,5,[this.c,this.d]))},u.Ib=function(){return"("+this.c+Rc+this.d+(this.a?"cx":"")+this.b+")"},u.a=!0,u.c=0,u.d=0;var G3e=A(u0,"Point",102);T(373,23,{3:1,34:1,23:1,373:1},j9);var Xm,ww,Z_,vw,$jt=Ri(u0,"Point/Quadrant",373,ji,Pce,qne),Vjt;T(1398,1,{},sm),u.b=null,u.c=null,u.d=null,u.e=null,u.f=null;var qjt,Xjt,Zjt,Yjt,Kjt,UNe=A(u0,"RectilinearConvexHull",1398);T(516,1,{341:1},h7),u.Ne=function(e){sue(this,a(e,102))},u.b=0;var Hgt,zNe=A(u0,"RectilinearConvexHull/MaximalElementsEventHandler",516);T(1400,1,jr,Hi),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return qit(),ro(lt(Yt(e)),lt(Yt(n)))};var jNe=A(u0,"RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type",1400);T(1399,1,{341:1},SLt),u.Ne=function(e){jbe(this,a(e,102))},u.a=0,u.b=null,u.c=null,u.d=null,u.e=null;var HNe=A(u0,"RectilinearConvexHull/RectangleEventHandler",1399);T(1401,1,jr,Pr),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return wC(),a(e,102).c==a(n,102).c?ro(a(n,102).d,a(e,102).d):ro(a(e,102).c,a(n,102).c)};var GNe=A(u0,"RectilinearConvexHull/lambda$0$Type",1401);T(1402,1,jr,Gr),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return wC(),a(e,102).c==a(n,102).c?ro(a(e,102).d,a(n,102).d):ro(a(e,102).c,a(n,102).c)};var WNe=A(u0,"RectilinearConvexHull/lambda$1$Type",1402);T(1403,1,jr,Ze),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return wC(),a(e,102).c==a(n,102).c?ro(a(n,102).d,a(e,102).d):ro(a(n,102).c,a(e,102).c)};var $Ne=A(u0,"RectilinearConvexHull/lambda$2$Type",1403);T(1404,1,jr,hs),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return wC(),a(e,102).c==a(n,102).c?ro(a(e,102).d,a(n,102).d):ro(a(n,102).c,a(e,102).c)};var VNe=A(u0,"RectilinearConvexHull/lambda$3$Type",1404);T(1405,1,jr,Fs),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return uge(e,n)};var qNe=A(u0,"RectilinearConvexHull/lambda$4$Type",1405);T(1406,1,{},Skt);var XNe=A(u0,"Scanline",1406);T(1694,1,{});var ZNe=A(K1,"AbstractGraphPlacer",1694);T(458,1,{458:1},gCt);var ps,YNe=A(K1,"ComponentGroup",458);T(1076,1694,{},y9),u.Oe=function(e,n){var i,r,c,l,f,g,b,v,M,k,R,N,$;if(this.a.c=dt(un,te,1,0,5,1),n.a.c=dt(un,te,1,0,5,1),e.Wb()){n.e.a=0,n.e.b=0;return}for(f=a(e.cd(0),31),Uo(n,f),c=e.tc();c.hc();)r=a(c.ic(),31),Vhe(this,r);for($=new go,l=lt(Yt(z(f,(qt(),ZJ)))),v=new j(this.a);v.aN&&(Gt=0,Zt+=R+c,R=0),nt=f.c,AP(f,Gt+nt.a,Zt+nt.b),Gh(nt),i=y.Math.max(i,Gt+pt.a),R=y.Math.max(R,pt.b),Gt+=pt.a+c;if(n.e.a=i,n.e.b=Zt+R,lt(de(z(l,GJ)))){for(r=new Ms,bOt(r,e,c),k=e.tc();k.hc();)M=a(k.ic(),31),sr(Gh(M.c),r.e);sr(Gh(n.e),r.a)}$5t(n,e)};var c7e=A(K1,"SimpleRowGraphPlacer",1074);T(1075,1,jr,Tc),u.Ld=function(e,n){return xle(a(e,31),a(n,31))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var a7e=A(K1,"SimpleRowGraphPlacer/1",1075),Jjt;T(1032,1,sh,rl),u.Mb=function(e){var n;return n=a(z(a(e,234).b,(qt(),Ro)),74),!!n&&n.b!=0},u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)};var u7e=A(dO,"CompoundGraphPostprocessor/1",1032);T(1031,1,Br,CEt),u.Pe=function(e,n){CRt(this,a(e,31),n)};var l7e=A(dO,"CompoundGraphPreprocessor",1031);T(400,1,{400:1},eIt),u.c=!1;var h7e=A(dO,"CompoundGraphPreprocessor/ExternalPort",400);T(234,1,{234:1},SD),u.Ib=function(){return eL(this.c)+":"+zLt(this.b)};var f7e=A(dO,"CrossHierarchyEdge",234);T(687,1,jr,q8),u.Ld=function(e,n){return Ape(this,a(e,234),a(n,234))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var d7e=A(dO,"CrossHierarchyEdgeComparator",687);T(279,131,{3:1,279:1,93:1,131:1}),u.o=0;var p7e=A(oa,"LGraphElement",279);T(14,279,{3:1,14:1,279:1,93:1,131:1},Np),u.Ib=function(){return zLt(this)};var Tl=A(oa,"LEdge",14);T(31,279,{3:1,20:1,31:1,279:1,93:1,131:1},dat),u.sc=function(e){vo(this,e)},u.tc=function(){return new j(this.b)},u.Ib=function(){return this.b.c.length==0?"G-unlayered"+Gp(this.a):this.a.c.length==0?"G-layered"+Gp(this.b):"G[layerless"+Gp(this.a)+", layers"+Gp(this.b)+"]"};var Qjt=A(oa,"LGraph",31);T(591,1,{}),u.Qe=function(){return this.e.k},u.xe=function(e){return z(this.e,e)},u.Re=function(){return this.e.n},u.Se=function(){return this.e.o},u.ye=function(e){return Wb(this.e,e)},u.Te=function(e){this.e.k.a=e.a,this.e.k.b=e.b},u.Ue=function(e){this.e.n.a=e.a,this.e.n.b=e.b},u.Ve=function(e){this.e.o=e};var g7e=A(oa,"LGraphAdapters/AbstractLShapeAdapter",591);T(520,1,{741:1},xh),u.We=function(){var e,n;if(!this.b)for(this.b=od(this.a.b.c.length),n=new j(this.a.b);n.a0&&qPt(e.charCodeAt(n-1),xBt);)--n;if(l "+this.a+" "+eL(this.c)},u.a=0,u.b=0,u.d=0;var qBe=A(Dn,"SplineSelfLoopRouter/LoopPadding",188);T(1294,1,sh,yCt),u.Mb=function(e){return pde(this,a(e,188))},u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)},u.a=0,u.c=0;var XBe=A(Dn,"SplineSelfLoopRouter/LoopPadding/EnclosingPredicate",1294);T(1293,1,jr,Oy),u.Ld=function(e,n){return Ote(a(e,188),a(n,188))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var ZBe=A(Dn,"SplineSelfLoopRouter/LoopPadding/MarginComparator",1293);T(415,1,sh,Nb),u.Mb=function(e){return a(e,188).c==this.a},u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)};var YBe=A(Dn,"SplineSelfLoopRouter/LoopPadding/PortSidePredicate",415);T(414,1,{414:1},mkt),u.c=0,u.d=0,u.e=0;var KBe=A(Dn,"SplineSelfLoopRouter/SelfLoopEdge",414);T(1292,1,jr,Mk),u.Ld=function(e,n){return YQt(a(e,414),a(n,414))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var JBe=A(Dn,"SplineSelfLoopRouter/SelfLoopEdge/StepSizeComparator",1292);T(1451,715,{},LPt),u.qe=function(e){var n,i,r,c;switch(this.c=e,this.a.g){case 2:n=new Dt,qc(wo(new gi(null,new Ei(this.c.a.b,16)),new Fy),new DMt(this,n)),wP(this,new Tk),pd(n,new Ek),n.c=dt(un,te,1,0,5,1),qc(wo(new gi(null,new Ei(this.c.a.b,16)),new Yf),new J8(n)),wP(this,new Uu),pd(n,new T3),n.c=dt(un,te,1,0,5,1),i=iSt(kPt(wL(new gi(null,new Ei(this.c.a.b,16)),new lT(this))),new pf),qc(new gi(null,new Ei(this.c.a.a,16)),new AMt(i,n)),wP(this,new DS),pd(n,new V0),n.c=dt(un,te,1,0,5,1);break;case 3:r=new Dt,wP(this,new By),c=iSt(kPt(wL(new gi(null,new Ei(this.c.a.b,16)),new xH(this))),new Sk),qc(wo(new gi(null,new Ei(this.c.a.b,16)),new S3),new RMt(c,r)),wP(this,new dv),pd(r,new NS),r.c=dt(un,te,1,0,5,1);break;default:throw K(new mt)}},u.b=0;var QBe=A(Kr,"EdgeAwareScanlineConstraintCalculation",1451);T(1452,1,sh,By),u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)},u.Mb=function(e){return ct(a(e,57).g,153)};var tFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$0$Type",1452);T(1453,1,{},xH),u.oe=function(e){return T0e(this.a,e)};var eFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$1$Type",1453);T(1464,1,{},Ek),u.td=function(e){a(e,340).fe()};var nFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$10$Type",1464);T(1465,1,us,Yf),u.Nb=function(e){return ct(a(e,57).g,8)};var iFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$11$Type",1465);T(1467,1,{},J8),u.td=function(e){cfe(this.a,e)};var rFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$12$Type",1467);T(1468,1,sh,Uu),u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)},u.Mb=function(e){return ct(a(e,57).g,8)};var sFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$13$Type",1468);T(1469,1,{},T3),u.td=function(e){a(e,340).fe()};var oFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$14$Type",1469);T(1470,1,{},lT),u.oe=function(e){return C0e(this.a,e)};var cFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$15$Type",1470);T(1471,1,{},pf),u.me=function(){return 0};var aFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$16$Type",1471);T(1473,1,{},AMt),u.td=function(e){Ure(this.a,this.b,e)},u.a=0;var uFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$17$Type",1473);T(1474,1,sh,DS),u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)},u.Mb=function(e){return!0};var lFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$18$Type",1474);T(1475,1,{},V0),u.td=function(e){a(e,340).fe()};var hFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$19$Type",1475);T(1454,1,{},Sk),u.me=function(){return 0};var fFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$2$Type",1454);T(1456,1,VP,kMt),u.fe=function(){$C(this.b,this.a,-1)},u.a=0;var dFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$20$Type",1456);T(1461,1,VP,LMt),u.fe=function(){$C(this.a,this.b,-1)},u.b=0;var pFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$21$Type",1461);T(1466,1,VP,PMt),u.fe=function(){$C(this.b,this.a,-1)},u.a=0;var gFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$22$Type",1466);T(1472,1,VP,IMt),u.fe=function(){uDt(this.a,this.b,-1)},u.b=0;var mFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$23$Type",1472);T(1455,1,us,S3),u.Nb=function(e){return ct(a(e,57).g,8)};var bFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$3$Type",1455);T(1457,1,{},RMt),u.td=function(e){zre(this.a,this.b,e)},u.a=0;var wFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$4$Type",1457);T(1458,1,sh,dv),u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)},u.Mb=function(e){return!0};var vFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$5$Type",1458);T(1459,1,{},NS),u.td=function(e){a(e,340).fe()};var _Fe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$6$Type",1459);T(1460,1,us,Fy),u.Nb=function(e){return ct(a(e,57).g,153)};var yFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$7$Type",1460);T(1462,1,{},DMt),u.td=function(e){kue(this.a,this.b,e)};var xFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$8$Type",1462);T(1463,1,sh,Tk),u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)},u.Mb=function(e){return ct(a(e,57).g,153)};var MFe=A(Kr,"EdgeAwareScanlineConstraintCalculation/lambda$9$Type",1463);T(1232,1,Br,NSt),u.Pe=function(e,n){wye(this,a(e,31),n)};var cHt,EFe=A(Kr,"HorizontalGraphCompactor",1232);T(1233,1,{},e2),u.se=function(e,n){var i,r,c;return zt(z(this.a.a,(qt(),ig)))===zt((gd(),rb))&&(ct(e.g,153)&&ct(n.g,8)||ct(n.g,153)&&ct(e.g,8))?lt(de(z(this.a.a,qB)))?0:10:qct(e,n)||(i=Jv(e),r=Jv(n),i&&i.j==(Ke(),rs)||r&&r.j==(Ke(),rs))?0:(c=a(z(this.a.a,(Ft(),yw)),266),jee(c,i?i.j:(Ke(),Hr),r?r.j:(Ke(),Hr)))},u.te=function(e,n){var i,r,c;return qct(e,n)?1:(i=Jv(e),r=Jv(n),c=a(z(this.a.a,(Ft(),yw)),266),nst(c,i?i.j:(Ke(),Hr),r?r.j:(Ke(),Hr)))};var SFe=A(Kr,"HorizontalGraphCompactor/1",1233);T(1234,1,{},gf),u.re=function(e,n){return ET(),e.a.i==0};var TFe=A(Kr,"HorizontalGraphCompactor/lambda$0$Type",1234);T(1235,1,{},jd),u.re=function(e,n){return $se(this.a,e,n)};var CFe=A(Kr,"HorizontalGraphCompactor/lambda$1$Type",1235);T(1422,1,{},YLt);var aHt,uHt,AFe=A(Kr,"LGraphToCGraphTransformer",1422);T(1430,1,us,Uy),u.Nb=function(e){return e!=null};var kFe=A(Kr,"LGraphToCGraphTransformer/0methodref$nonNull$Type",1430);T(1423,1,ys,Ck),u.Kb=function(e){return Zl(),Yc(z(a(a(e,57).g,8),(Ft(),li)))};var LFe=A(Kr,"LGraphToCGraphTransformer/lambda$0$Type",1423);T(1424,1,ys,pv),u.Kb=function(e){return Zl(),uIt(a(a(e,57).g,153))};var PFe=A(Kr,"LGraphToCGraphTransformer/lambda$1$Type",1424);T(1435,1,us,OS),u.Nb=function(e){return Zl(),ct(a(e,57).g,153)};var IFe=A(Kr,"LGraphToCGraphTransformer/lambda$10$Type",1435);T(1439,1,{},Fl),u.td=function(e){var n,i;Zl(),n=e.d.c-e.e.c,i=a(e.g,153),pd(i.b,new TH(n)),pd(i.c,new CH(n)),vo(i.i,new Q8(n))};var RFe=A(Kr,"LGraphToCGraphTransformer/lambda$11$Type",1439);T(1440,1,ys,zy),u.Kb=function(e){return Zl(),new gi(null,new S2(Rn(br(a(e,8)))))};var DFe=A(Kr,"LGraphToCGraphTransformer/lambda$12$Type",1440);T(1441,1,us,_b),u.Nb=function(e){return Zl(),ec(a(e,14))};var NFe=A(Kr,"LGraphToCGraphTransformer/lambda$13$Type",1441);T(1442,1,{},MH),u.td=function(e){bue(this.a,e)};var OFe=A(Kr,"LGraphToCGraphTransformer/lambda$14$Type",1442);T(1443,1,ys,Ak),u.Kb=function(e){return Zl(),new gi(null,new Ei(a(e,26).a,16))};var BFe=A(Kr,"LGraphToCGraphTransformer/lambda$15$Type",1443);T(1444,1,ys,l1),u.Kb=function(e){return Zl(),new gi(null,new S2(Rn(br(a(e,8)))))};var FFe=A(Kr,"LGraphToCGraphTransformer/lambda$16$Type",1444);T(1445,1,ys,h1),u.Kb=function(e){return Zl(),a(z(a(e,14),(Ft(),q4)),15)};var UFe=A(Kr,"LGraphToCGraphTransformer/lambda$17$Type",1445);T(1446,1,us,Kf),u.Nb=function(e){return Zl(),!!a(e,15)&&!a(e,15).Wb()};var zFe=A(Kr,"LGraphToCGraphTransformer/lambda$18$Type",1446);T(1447,1,{},EH),u.td=function(e){A0e(this.a,a(e,15))};var jFe=A(Kr,"LGraphToCGraphTransformer/lambda$19$Type",1447);T(1426,1,{},SH),u.td=function(e){Uoe(this.a,e)};var HFe=A(Kr,"LGraphToCGraphTransformer/lambda$2$Type",1426);T(1425,1,{},NMt),u.td=function(e){Oce(this.a,this.b,e)};var GFe=A(Kr,"LGraphToCGraphTransformer/lambda$20$Type",1425);T(1436,1,{},TH),u.td=function(e){Yte(this.a,e)},u.a=0;var WFe=A(Kr,"LGraphToCGraphTransformer/lambda$21$Type",1436);T(1437,1,{},CH),u.td=function(e){Kte(this.a,e)},u.a=0;var $Fe=A(Kr,"LGraphToCGraphTransformer/lambda$22$Type",1437);T(1438,1,{},Q8),u.td=function(e){Jte(this.a,e)},u.a=0;var VFe=A(Kr,"LGraphToCGraphTransformer/lambda$23$Type",1438);T(1427,1,ys,jy),u.Kb=function(e){return Zl(),new gi(null,new Ei(a(e,26).a,16))};var qFe=A(Kr,"LGraphToCGraphTransformer/lambda$3$Type",1427);T(1428,1,ys,Hy),u.Kb=function(e){return Zl(),new gi(null,new S2(Rn(br(a(e,8)))))};var XFe=A(Kr,"LGraphToCGraphTransformer/lambda$4$Type",1428);T(1429,1,ys,C3),u.Kb=function(e){return Zl(),a(z(a(e,14),(Ft(),q4)),15)};var ZFe=A(Kr,"LGraphToCGraphTransformer/lambda$5$Type",1429);T(1431,1,{},rm),u.td=function(e){J0e(this.a,e)};var YFe=A(Kr,"LGraphToCGraphTransformer/lambda$6$Type",1431);T(1432,1,{},OMt),u.td=function(e){iee(this.a,this.b,e)};var KFe=A(Kr,"LGraphToCGraphTransformer/lambda$7$Type",1432);T(1433,1,us,Gy),u.Nb=function(e){return Zl(),ct(a(e,57).g,8)};var JFe=A(Kr,"LGraphToCGraphTransformer/lambda$8$Type",1433);T(1434,1,{},yb),u.td=function(e){var n;Zl(),n=a(e.g,8),n.k.a=e.d.c+n.d.b};var QFe=A(Kr,"LGraphToCGraphTransformer/lambda$9$Type",1434);T(1421,1,{},Wy),u.pe=function(e){var n,i,r,c,l;for(this.a=e,this.d=new NG,this.c=dt(R0t,te,113,this.a.a.a.c.length,0,1),this.b=0,i=new j(this.a.a.a);i.ac-f?0:c-f;R<=cm(n.f-1,c+f);R++){if(G=rt/(R+1),nt=0,M=1,l=new Dt,pt=Ps,k=0,g=0,$=b[0],R==0)pt=rt,g=(n.g==null&&(n.g=TPt(n,new $a)),lt(n.g));else{for(;M=G&&(Ut(l,Xt(M)),pt=y.Math.max(pt,_t[M-1]-k),g+=$,nt+=_t[M-1]-nt,k=_t[M-1],$=b[M]),$=y.Math.max($,b[M]),++M;g+=$}N=y.Math.min(1/pt,1/n.b/g),N>r&&(r=N,i=l)}return i},u.tf=function(){return!1};var MUe=A(cp,"MSDCutIndexHeuristic",714);T(1279,1,Br,$y),u.Pe=function(e,n){C_e(a(e,31),n)};var EUe=A(cp,"SingleEdgeGraphWrapper",1279);T(189,1,{189:1},Jf),u.Ib=function(){return"NEdge[id="+this.b+" w="+this.g+" d="+this.a+"]"},u.a=1,u.b=0,u.c=0,u.f=!1,u.g=0;var hHt=A(v4,"NEdge",189);T(162,1,{},cl);var SUe=A(v4,"NEdge/NEdgeBuilder",162);T(592,1,{},NG);var TUe=A(v4,"NGraph",592);T(113,1,{113:1},l5t),u.c=-1,u.d=0,u.e=0,u.i=-1,u.j=!1;var R0t=A(v4,"NNode",113);T(717,1,$Ot,wit),u.sc=function(e){vo(this,e)},u.uc=function(){return this.xc()},u.jd=function(e){D1(this,e)},u.wc=function(){return new Ei(this,16)},u.xc=function(){return new gi(null,this.wc())},u.bd=function(e,n){++this.b,pm(this.a,e,n)},u.nc=function(e){return lD(this,e)},u.oc=function(e){return++this.b,Or(this.a,e)},u.Pb=function(){++this.b,this.a.c=dt(un,te,1,0,5,1)},u.pc=function(e){return nc(this.a,e,0)!=-1},u.qc=function(e){return O1(this.a,e)},u.cd=function(e){return Ee(this.a,e)},u.dd=function(e){return nc(this.a,e,0)},u.Wb=function(){return this.a.c.length==0},u.tc=function(){return B2(new j(this.a))},u.ed=function(){throw K(new Oi)},u.fd=function(e){throw K(new Oi)},u.gd=function(e){return++this.b,Em(this.a,e)},u.vc=function(e){return est(this,e)},u.hd=function(e,n){return++this.b,Kl(this.a,e,n)},u._b=function(){return this.a.c.length},u.kd=function(e,n){return new C1(this.a,e,n)},u.yc=function(){return qW(this.a)},u.zc=function(e){return xo(this.a,e)},u.b=0;var CUe=A(v4,"NNode/ChangeAwareArrayList",717);T(251,1,{},Ng);var AUe=A(v4,"NNode/NNodeBuilder",251);T(1482,1,{},q0),u.a=!1,u.f=qi,u.j=0;var kUe=A(v4,"NetworkSimplex",1482);T(276,23,{3:1,34:1,23:1,276:1},z5);var pJ,gJ,mJ,D0t,bJ,N0t=Ri(ka,"CenterEdgeLabelPlacementStrategy",276,ji,aae,Kne),fHt;T(386,23,{3:1,34:1,23:1,386:1},prt);var O0t,wJ,B0t=Ri(ka,"ConstraintCalculationStrategy",386,ji,hoe,Jne),dHt;T(290,23,{3:1,34:1,23:1,290:1},RT);var SB,F0t,TB,CB,AB,U0t,vJ=Ri(ka,"ContentAlignment",290,ji,Gae,Qne),pHt;T(317,23,{3:1,34:1,23:1,317:1,285:1,286:1},grt),u.hf=function(){return W8t(this)},u.uf=function(){return W8t(this)};var E6,S6,z0t=Ri(ka,"CrossingMinimizationStrategy",317,ji,foe,tie),gHt;T(319,23,{3:1,34:1,23:1,319:1},uW);var j0t,_J,kB,H0t=Ri(ka,"CuttingStrategy",319,ji,Woe,eie),mHt;T(384,23,{3:1,34:1,23:1,384:1,285:1,286:1},lW),u.hf=function(){return Y8t(this)},u.uf=function(){return Y8t(this)};var G0t,yJ,xJ,W0t=Ri(ka,"CycleBreakingStrategy",384,ji,$oe,nie),bHt;T(406,23,{3:1,34:1,23:1,406:1},hW);var T6,MJ,W4,wHt=Ri(ka,"EdgeConstraint",406,ji,Voe,iie),vHt;T(241,23,{3:1,34:1,23:1,241:1},DT);var EJ,SJ,TJ,CJ,LB,AJ,$0t=Ri(ka,"EdgeLabelSideSelection",241,ji,Wae,rie),_Ht;T(255,23,{3:1,34:1,23:1,255:1},NT);var kJ,V0t,q0t,PB,X0t,Z0t,Y0t=Ri(ka,"FixedAlignment",255,ji,$ae,sie),yHt;T(256,23,{3:1,34:1,23:1,256:1},OT);var K0t,J0t,Q0t,tmt,$4,emt,nmt=Ri(ka,"GraphCompactionStrategy",256,ji,Vae,oie),xHt;T(233,23,{3:1,34:1,23:1,233:1},jb);var IE,IB,RE,Al,V4,RB,K_,J_,DB,C6,LJ=Ri(ka,"GraphProperties",233,ji,sle,cie),MHt;T(318,23,{3:1,34:1,23:1,318:1},fW);var NB,PJ,IJ,imt=Ri(ka,"GreedySwitchType",318,ji,Goe,aie),EHt;T(280,23,{3:1,34:1,23:1,280:1},dW);var bx,A6,Q_,SHt=Ri(ka,"InLayerConstraint",280,ji,Hoe,uie),THt;T(383,23,{3:1,34:1,23:1,383:1},mrt);var RJ,rmt,smt=Ri(ka,"InteractiveReferencePoint",383,ji,doe,lie),CHt,omt,cmt,DJ,_w,k6,wx,Zm,OB,amt,umt,BB,lmt,FB,NJ,UB,vx,OJ,zB,wc,hmt,Qc,BJ,L6,w0,DE,_x,yx,P6,xx,Iu,Ru,ty,xd,li,fmt,dmt,pmt,FJ,tg,jB,Du,Ym,UJ,NE,HB,eg,yw,zJ,AHt,I6,q4,jJ,gmt,HJ,Mx;T(178,23,{3:1,34:1,23:1,178:1},j5);var R6,xw,X4,Km,Ex,mmt=Ri(ka,"LayerConstraint",178,ji,uae,hie),kHt;T(747,1,_d,hj),u.ue=function(e){He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Xft),""),"Content Alignment"),"Specifies how the content of compound nodes is to be aligned, e.g. top-left."),vmt),(i0(),zE)),vJ),qe((t0(),On))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.contentAlignment"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Zft),""),"Feedback Edges"),"Whether feedback edges should be highlighted by routing around the nodes."),(me(),me(),!1)),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.feedBackEdges"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,pO),""),"Interactive Reference Point"),"Determines which point of a node is considered by interactive layout phases."),Tmt),xs),smt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.interactiveReferencePoint"])))),Sa(e,pO,fY,tGt),Sa(e,pO,wY,QHt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Yft),""),"Merge Edges"),"Edges that have no ports are merged so they touch the connected nodes at the same points. When this option is disabled, one port is created for each edge directly connected to a node. When it is enabled, all such incoming edges share an input port, and all outgoing edges share an output port."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.mergeEdges"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Kft),""),"Merge Hierarchy-Crossing Edges"),"If hierarchical layout is active, hierarchy-crossing edges use as few hierarchical ports as possible. They are broken by the algorithm, with hierarchical ports inserted as required. Usually, one such port is created for each edge at each hierarchy crossing point. With this option set to true, we try to create as few hierarchical ports as possible in the process. In particular, all edges that form a hyperedge can share a port."),!0),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.mergeHierarchyEdges"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Jft),""),"Thoroughness"),"How much effort should be spent to produce a nice layout."),Xt(7)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.thoroughness"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Qft),""),"Add Unnecessary Bendpoints"),"Adds bend points even if an edge does not change direction. If true, each long edge dummy will contribute a bend point to its edges and hierarchy-crossing edges will always get a bend point where they cross hierarchy boundaries. By default, bend points are only added where an edge changes direction."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.unnecessaryBendpoints"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,tdt),""),"North or South Port"),"Specifies that this port can either be placed on the north side of a node or on the south side (if port constraints permit)"),!1),Ec),ho),qe(ib)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.northOrSouthPort"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,fY),"cycleBreaking"),"Cycle Breaking Strategy"),"Strategy for cycle breaking. Cycle breaking looks for cycles in the graph and determines which edges to reverse to break the cycles. Reversed edges will end up pointing to the opposite direction of regular edges (that is, reversed edges will point left if edges usually point right)."),xmt),xs),W0t),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.cycleBreaking"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,e6),_dt),"Node Layering Strategy"),"Strategy for node layering."),kmt),xs),Cbt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.nodeLayering"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,edt),_dt),"Layer Constraint"),"Determines a constraint on the placement of the node regarding the layering."),Cmt),xs),mmt),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.layerConstraint"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,ndt),_dt),"Wide Nodes on Multiple Layers"),"Strategy to distribute wide nodes over multiple layers."),Lmt),xs),jbt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.wideNodesOnMultipleLayers"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,dY),DBt),"Upper Bound On Width [MinWidth Layerer]"),"Defines a loose upper bound on the width of the MinWidth layerer. If set to '-1' multiple values are tested and the best result is selected."),Xt(4)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.minWidthUpperBoundOnWidth"])))),Sa(e,dY,e6,sGt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,pY),DBt),"Upper Layer Estimation Scaling Factor [MinWidth Layerer]"),"Multiplied with Upper Bound On Width for defining an upper bound on the width of layers which haven't been determined yet, but whose maximum width had been (roughly) estimated by the MinWidth algorithm. Compensates for too high estimations. If set to '-1' multiple values are tested and the best result is selected."),Xt(2)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.minWidthUpperLayerEstimationScalingFactor"])))),Sa(e,pY,e6,cGt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,gY),NBt),"Node Promotion Strategy"),"Reduces number of dummy nodes after layering phase (if possible)."),Amt),xs),Dbt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.nodePromotion"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,mY),NBt),"Max Node Promotion Iterations"),"Limits the number of iterations for node promotion."),Xt(0)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.nodePromotionBoundary"])))),Sa(e,mY,gY,null),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,bY),"layering.coffmanGraham"),"Layer Bound"),"The maximum number of nodes allowed per layer."),Xt(qi)),Pa),Io),qe(On)))),Sa(e,bY,e6,nGt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,wY),ydt),"Crossing Minimization Strategy"),"Strategy for crossing minimization."),ymt),xs),z0t),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.crossMin"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,idt),ydt),"Hierarchical Sweepiness"),"How likely it is to use cross-hierarchy (1) vs bottom-up (-1)."),.1),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,rdt),ydt),"Semi-Interactive Crossing Minimization"),"Preserves the order of nodes within a layer but still minimizes crossings between edges connecting long edge dummies. Derives the desired order from positions specified by the 'org.eclipse.elk.position' layout option. Requires a crossing minimization strategy that is able to process 'in-layer' constraints."),!1),Ec),ho),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,sdt),OBt),"Greedy Switch Activation Threshold"),"By default it is decided automatically if the greedy switch is activated or not. The decision is based on whether the size of the input graph (without dummy nodes) is smaller than the value of this option. A '0' enforces the activation."),Xt(40)),Pa),Io),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,odt),OBt),"Greedy Switch Crossing Minimization"),"Greedy Switch strategy for crossing minimization. The greedy switch heuristic is executed after the regular layer sweep as a post-processor."),_mt),xs),imt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.greedySwitch"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,mE),BBt),"Node Placement Strategy"),"Strategy for node placement."),Dmt),xs),kbt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.nodePlace"])))),He(e,new De(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,vY),BBt),"Favor Straight Edges Over Balancing"),"Favor straight edges over a balanced node placement. The default behavior is determined automatically based on the used 'edgeRouting'. For an orthogonal style it is set to true, for all other styles to false."),Ec),ho),qe(On)))),Sa(e,vY,mE,vGt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,_Y),FBt),"BK Edge Straightening"),"Specifies whether the Brandes Koepf node placer tries to increase the number of straight edges at the expense of diagram size. There is a subtle difference to the 'favorStraightEdges' option, which decides whether a balanced placement of the nodes is desired, or not. In bk terms this means combining the four alignments into a single balanced one, or not. This option on the other hand tries to straighten additional edges during the creation of each of the four alignments."),Pmt),xs),Vbt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.nodeplace.compactionStrategy"])))),Sa(e,_Y,mE,gGt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,yY),FBt),"BK Fixed Alignment"),"Tells the BK node placer to use a certain alignment (out of its four) instead of the one producing the smallest height, or the combination of all four."),Imt),xs),Y0t),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.fixedAlignment"])))),Sa(e,yY,mE,bGt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,xY),"nodePlacement.linearSegments"),"Linear Segments Deflection Dampening"),"Dampens the movement of nodes to keep the diagram from getting too large."),.3),ha),To),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.linearSegmentsDeflectionDampening"])))),Sa(e,xY,mE,yGt),He(e,new De(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,MY),"nodePlacement.networkSimplex"),"Node Flexibility"),"Aims at shorter and straighter edges. Two configurations are possible: (a) allow ports to move freely on the side they are assigned to (the order is always defined beforehand), (b) additionally allow to enlarge a node wherever it helps. If this option is not configured for a node, the 'nodeFlexibility.default' value is used, which is specified for the node's parent."),xs),nQ),qe(vc)))),Sa(e,MY,mE,EGt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,cdt),"nodePlacement.networkSimplex.nodeFlexibility"),"Node Flexibility Default"),"Default value of the 'nodeFlexibility' option for the children of a hierarchical node."),Rmt),xs),nQ),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,EY),xdt),"Spline Self-Loop Placement"),null),Smt),xs),Bbt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.splines.selfLoopPlacement"])))),Sa(e,EY,n6,GHt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,gO),xdt),"Sloppy Spline Routing"),"Use less spline control points at the start and end of an edge. Might lead to crossings edge/node overlap."),!0),Ec),ho),qe(On)))),Sa(e,gO,n6,qHt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,mO),xdt),"Sloppy Spline Layer Spacing Factor"),"Spacing factor for routing area between layers when using sloppy spline routing."),.4),ha),To),qe(On)))),Sa(e,mO,n6,$Ht),Sa(e,mO,gO,!0),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,adt),J1),"Edge Node Between Layers Spacing"),"The spacing to be preserved between nodes and edges that are routed next to the node's layer. For the spacing between nodes and edges that cross the node's layer 'spacing.edgeNode' is used."),10),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,udt),J1),"Edge Edge Between Layer Spacing"),"Spacing to be preserved between pairs of edges that are routed between the same pair of layers. Note that 'spacing.edgeEdge' is used for the spacing between pairs of edges crossing the same layer."),10),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,ldt),J1),"Node Node Between Layers Spacing"),"The spacing to be preserved between any pair of nodes of two adjacent layers. Note that 'spacing.nodeNode' is used for the spacing between nodes within the layer itself."),20),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,hdt),Mdt),"Direction Priority"),"Defines how important it is to have a certain edge point into the direction of the overall layout. This option is evaluated during the cycle breaking phase."),Xt(0)),Pa),Io),qe(Md)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,fdt),Mdt),"Shortness Priority"),"Defines how important it is to keep an edge as short as possible. This option is evaluated during the layering phase."),Xt(0)),Pa),Io),qe(Md)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,ddt),Mdt),"Straightness Priority"),"Defines how important it is to keep an edge straight, i.e. aligned with one of the two axes. This option is evaluated during node placement."),Xt(0)),Pa),Io),qe(Md)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,SY),"compaction"),uBt),"Tries to further compact components (disconnected sub-graphs)."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.components.compact"])))),Sa(e,SY,YP,!0),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,pdt),UBt),"Post Compaction Strategy"),zBt),wmt),xs),nmt),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.postCompaction"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,gdt),UBt),"Post Compaction Constraint Calculation"),zBt),bmt),xs),B0t),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.postCompaction.constraints"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,bO),Edt),"High Degree Node Treatment"),"Makes room around high degree nodes to place leafs and trees."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.highDegreeNode.treatment"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,TY),Edt),"High Degree Node Threshold"),"Whether a node is considered to have a high degree."),Xt(16)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.highDegreeNode.threshold"])))),Sa(e,TY,bO,!0),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,CY),Edt),"High Degree Node Maximum Tree Height"),"Maximum height of a subtree connected to a high degree node to be moved to separate layers."),Xt(5)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.highDegreeNode.treeHeight"])))),Sa(e,CY,bO,!0),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,y4),Sdt),"Graph Wrapping Strategy"),"For certain graphs and certain prescribed drawing areas it may be desirable to split the laid out graph into chunks that are placed side by side. The edges that connect different chunks are 'wrapped' around from the end of one chunk to the start of the other chunk. The points between the chunks are referred to as 'cuts'."),Fmt),xs),Hbt),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,mdt),Sdt),"Additional Wrapped Edges Spacing"),"To visually separate edges that are wrapped from regularly routed edges an additional spacing value can be specified in form of this layout option. The spacing is added to the regular edgeNode spacing."),10),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,bdt),Sdt),"Correction factor for the wrapping"),"At times and for certain types of graphs the executed wrapping may produce results that are consistently biased in the same fashion: either wrapping to often or to rarely. This factor can be used to correct the bias. Internally, it is simplay multiplied with the 'aspect ratio' layout option."),1),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,wO),jBt),"Cutting Strategy"),"The strategy by which the layer indexes are determined at which the layering crumbles into chunks."),Omt),xs),H0t),qe(On)))),He(e,new De(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,AY),jBt),"Manually Specified Cuts"),"Allows the user to specify her own cuts for a certain graph."),Ed),Sl),qe(On)))),Sa(e,AY,wO,FGt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,kY),"wrapping.cutting.msd"),"MSD Freedom"),"The MSD cutting strategy starts with an initial guess on the number of chunks the graph should be split into. The freedom specifies how much the strategy may deviate from this guess. E.g. if an initial number of 3 is computed, a freedom of 1 allows 2, 3, and 4 cuts."),Nmt),Pa),Io),qe(On)))),Sa(e,kY,wO,zGt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,LY),"wrapping.singleEdge.validify"),"Path-Like Validify Strategy"),"When wrapping path-like graphs, the graph must not be split between any pair of layers. The validify strategy makes sure every computed split point is allowed."),Bmt),xs),zbt),qe(On)))),Sa(e,LY,y4,ZGt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,vO),Tdt),"Improve Cuts"),"For general graphs it is important that not too many edges wrap backwards. Thus a compromise between evenly-distributed cuts and the total number of cut edges is sought."),!0),Ec),ho),qe(On)))),Sa(e,vO,y4,$Gt),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,_O),Tdt),"Distance Penalty When Improving Cuts"),null),2),ha),To),qe(On)))),Sa(e,_O,y4,GGt),Sa(e,_O,vO,!0),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,PY),Tdt),"Improve Wrapped Edges"),"The initial wrapping is performed in a very simple way. As a consequence, edges that wrap from one chunk to another may be unnecessarily long. Activating this option tries to shorten such edges."),!0),Ec),ho),qe(On)))),Sa(e,PY,y4,qGt),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,wdt),IY),"Edge Label Side Selection"),"Method to decide on edge label sides."),Emt),xs),$0t),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.klay.layered.edgeLabelSideSelection"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,vdt),IY),"Edge Center Label Placement Strategy"),"Determines in which layer center labels of long edges should be placed."),Mmt),xs),N0t),ur(On,Y(Z(Jp,1),jt,163,0,[og]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.edgeLabelPlacementStrategy"])))),_Ot((new _8,e))};var LHt,PHt,bmt,IHt,wmt,RHt,vmt,DHt,NHt,_mt,OHt,BHt,FHt,ymt,UHt,xmt,zHt,Mmt,jHt,Emt,HHt,Smt,GHt,WHt,$Ht,VHt,qHt,XHt,ZHt,YHt,KHt,JHt,Tmt,QHt,tGt,eGt,nGt,iGt,Cmt,rGt,sGt,oGt,cGt,aGt,uGt,Amt,lGt,kmt,hGt,Lmt,fGt,dGt,pGt,Pmt,gGt,mGt,Imt,bGt,wGt,vGt,_Gt,yGt,xGt,MGt,Rmt,EGt,SGt,Dmt,TGt,CGt,AGt,kGt,LGt,PGt,IGt,RGt,DGt,NGt,OGt,BGt,FGt,UGt,Nmt,zGt,jGt,Omt,HGt,GGt,WGt,$Gt,VGt,qGt,XGt,Bmt,ZGt,YGt,Fmt,LUe=A(ka,"LayeredMetaDataProvider",747);T(878,1,_d,_8),u.ue=function(e){_Ot(e)};var Bf,GB,Z4,GJ,Umt,WB,WJ,zmt,$B,jmt,$J,OE,Hmt,Y4,ch,Gmt,VB,Wmt,ng,K4,ig,$mt,Vmt,qmt,qB,up,D6,J4,Xmt,Zmt,Ymt,XB,ey,Mw,Kmt,Ro,Jmt,la,Qmt,tbt,ebt,VJ,nbt,N6,ZB,ibt,rbt,Oh,sbt,qJ,Q4,obt,Jm,tA,YB,Ew,BE,KB,XJ,v0,cbt,abt,ubt,lbt,hbt,KGt,JGt,QGt,tWt,Sw,Tw,Qi,_0,fbt,Sx,eA,Cw,eWt,O6,dbt,Tx,nWt,iWt,ZJ,nf,Cx,B6,y0,ny,JB,Ax,pbt,nA,lp,Aw,YJ,iA,F6,KJ,gbt,mbt,bbt,wbt,JJ,vbt,_bt,ybt,xbt,Mbt,PUe=A(ka,"LayeredOptions",878);T(879,1,{},kk),u.Be=function(){var e;return e=new yu,e},u.Ce=function(e){};var IUe=A(ka,"LayeredOptions/LayeredFactory",879);T(291,23,{3:1,34:1,23:1,291:1,285:1,286:1},BT),u.hf=function(){return vDt(this)},u.uf=function(){return vDt(this)};var QJ,Ebt,Sbt,QB,tQ,Tbt,Cbt=Ri(ka,"LayeringStrategy",291,ji,qae,fie),rWt;T(179,23,{3:1,34:1,23:1,179:1},H9);var iy,ry,tF,eQ,nQ=Ri(ka,"NodeFlexibility",179,ji,$ce,die),sWt;T(292,23,{3:1,34:1,23:1,292:1,285:1,286:1},H5),u.hf=function(){return nDt(this)},u.uf=function(){return nDt(this)};var U6,iQ,rQ,z6,Abt,kbt=Ri(ka,"NodePlacementStrategy",292,ji,lae,pie),oWt;T(240,23,{3:1,34:1,23:1,240:1},b2);var Lbt,j6,Pbt,Ibt,H6,Rbt,eF,nF,Dbt=Ri(ka,"NodePromotionStrategy",240,ji,Iue,gie),cWt;T(410,23,{3:1,34:1,23:1,410:1},pW);var Wa,ba,iF,aWt=Ri(ka,"PortType",410,ji,qoe,mie),uWt;T(345,23,{3:1,34:1,23:1,345:1},gW);var Nbt,Obt,sQ,Bbt=Ri(ka,"SelfLoopPlacement",345,ji,Xoe,bie),lWt;T(266,1,{266:1},V8t);var RUe=A(ka,"Spacings",266);T(347,23,{3:1,34:1,23:1,347:1},mW);var oQ,Fbt,Ubt,zbt=Ri(ka,"ValidifyStrategy",347,ji,Zoe,wie),hWt;T(385,23,{3:1,34:1,23:1,385:1},bW);var G6,W6,$6,jbt=Ri(ka,"WideNodesStrategy",385,ji,Koe,vie),fWt;T(346,23,{3:1,34:1,23:1,346:1},wW);var V6,cQ,aQ,Hbt=Ri(ka,"WrappingStrategy",346,ji,Yoe,_ie),dWt;T(1296,1,Pu,WMt),u.vf=function(e){return a(e,31),pWt},u.Pe=function(e,n){L2e(this,a(e,31),n)};var pWt,DUe=A(opt,"DepthFirstCycleBreaker",1296);T(1295,1,Pu,BCt),u.vf=function(e){return a(e,31),gWt},u.Pe=function(e,n){p3e(this,a(e,31),n)};var gWt,NUe=A(opt,"GreedyCycleBreaker",1295);T(1297,1,Pu,c5),u.vf=function(e){return a(e,31),mWt},u.Pe=function(e,n){Dye(this,a(e,31),n)};var mWt,OUe=A(opt,"InteractiveCycleBreaker",1297);T(1300,1,Pu,$Mt),u.vf=function(e){return a(e,31),bWt},u.Pe=function(e,n){u3e(this,a(e,31),n)};var bWt,BUe=A(pw,"CoffmanGrahamLayerer",1300);T(1301,1,jr,Mp),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Q0e(this.a,a(e,8),a(n,8))};var FUe=A(pw,"CoffmanGrahamLayerer/lambda$0$Type",1301);T(1302,1,jr,e9),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Nre(this.a,e,n)};var UUe=A(pw,"CoffmanGrahamLayerer/lambda$1$Type",1302);T(1303,1,Pu,X0),u.vf=function(e){return a(e,31),Ni(Ni(new as,(Mo(),Of),(Po(),aJ)),aa,PE)},u.Pe=function(e,n){vxe(this,a(e,31),n)};var zUe=A(pw,"InteractiveLayerer",1303);T(511,1,{511:1},bxt),u.a=0,u.c=0;var jUe=A(pw,"InteractiveLayerer/LayerSpan",511);T(1299,1,Pu,v8),u.vf=function(e){return Dfe(a(e,31))},u.Pe=function(e,n){uwe(this,a(e,31),n)};var wWt,vWt,_Wt,HUe=A(pw,"LongestPathLayerer",1299);T(1306,1,Pu,y8),u.vf=function(e){return a(e,31),Ni(Ni(new as,(Mo(),Of),(Po(),H4)),aa,PE)},u.Pe=function(e,n){Gxe(this,a(e,31),n)},u.a=0,u.b=0,u.d=0;var Gbt,Wbt,GUe=A(pw,"MinWidthLayerer",1306);T(1307,1,jr,Ac),u.Ld=function(e,n){return Mle(this,a(e,8),a(n,8))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var WUe=A(pw,"MinWidthLayerer/MinOutgoingEdgesComparator",1307);T(1298,1,Pu,cSt),u.vf=function(e){return Rpe(this,a(e,31))},u.Pe=function(e,n){eye(this,a(e,31),n)};var yWt,xWt,MWt,$Ue=A(pw,"NetworkSimplexLayerer",1298);T(1304,1,Pu,bTt),u.vf=function(e){return a(e,31),Ni(Ni(new as,(Mo(),Of),(Po(),H4)),aa,PE)},u.Pe=function(e,n){q2e(this,a(e,31),n)},u.d=0,u.f=0,u.g=0,u.i=0,u.s=0,u.t=0,u.u=0;var VUe=A(pw,"StretchWidthLayerer",1304);T(1305,1,jr,mv),u.Ld=function(e,n){return Sae(a(e,8),a(n,8))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var qUe=A(pw,"StretchWidthLayerer/1",1305);T(422,1,cpt),u.lf=function(e,n,i,r,c,l){},u.xf=function(e,n,i){return HNt(this,e,n,i)},u.kf=function(){this.g=dt(Gw,WBt,22,this.d,15,1),this.f=dt(Gw,WBt,22,this.d,15,1)},u.mf=function(e,n){this.e[e]=dt(Gn,pi,22,n[e].length,15,1)},u.nf=function(e,n,i){var r;r=i[e][n],r.o=n,this.e[e][n]=n},u.of=function(e,n,i,r){a(Ee(r[e][n].i,i),11).o=this.d++},u.b=0,u.c=0,u.d=0;var XUe=A(Qu,"AbstractBarycenterPortDistributor",422);T(1484,1,jr,kH),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return ode(this.a,e,n)};var ZUe=A(Qu,"AbstractBarycenterPortDistributor/lambda$0$Type",1484);T(1532,1,t6,ukt),u.lf=function(e,n,i,r,c,l){},u.nf=function(e,n,i){},u.of=function(e,n,i,r){},u.jf=function(){return!1},u.kf=function(){this.a=this.c.a,this.e=this.d.g},u.mf=function(e,n){n[e][0].c.o=e},u.pf=function(){return!1},u.qf=function(e,n,i,r){var c,l,f,g,b,v,M;for(n!=wSt(i,e.length)&&(l=e[n-(i?1:-1)],Oct(this.d,l,i?(Fo(),ba):(Fo(),Wa))),c=e[n][0],M=!r||c.j==(Ke(),rs),v=Vg(e[n]),H6t(this,v,M,!1,i),f=0,b=new j(v);b.a"),e0?Q$(this.a,e[n-1],e[n]):!i&&n1&&(c.i==(Ht(),Qe)?this.b[e]=!0:c.i==on&&e>0&&(this.b[e-1]=!0))},u.f=0;var dze=A(h0,"AllCrossingsCounter",1528);T(602,1,{},WV),u.b=0,u.d=0;var pze=A(h0,"BinaryIndexedTree",602);T(473,1,{},Y5);var gze=A(h0,"CrossingsCounter",473);T(1557,1,jr,RH),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Mre(this.a,e,n)};var mze=A(h0,"CrossingsCounter/lambda$0$Type",1557);T(1558,1,jr,DH),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Ere(this.a,e,n)};var bze=A(h0,"CrossingsCounter/lambda$1$Type",1558);T(1559,1,jr,NH),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Sre(this.a,e,n)};var wze=A(h0,"CrossingsCounter/lambda$2$Type",1559);T(1560,1,jr,OH),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Tre(this.a,e,n)};var vze=A(h0,"CrossingsCounter/lambda$3$Type",1560);T(1555,1,{},BH);var _ze=A(h0,"HyperedgeCrossingsCounter",1555);T(426,1,{34:1,426:1},wTt),u.vd=function(e){return Kfe(this,a(e,426))},u.b=0,u.c=0,u.e=0,u.f=0;var V3e=A(h0,"HyperedgeCrossingsCounter/Hyperedge",426);T(336,1,{34:1,336:1},KD),u.vd=function(e){return Yme(this,a(e,336))},u.b=0,u.c=0;var PWt=A(h0,"HyperedgeCrossingsCounter/HyperedgeCorner",336);T(472,23,{3:1,34:1,23:1,472:1},brt);var sA,oA,IWt=Ri(h0,"HyperedgeCrossingsCounter/HyperedgeCorner/Type",472,ji,yoe,xie),RWt;T(1556,1,{},ZH),u.e=!0,u.f=0,u.g=0;var yze=A(h0,"NorthSouthEdgeAllCrossingsCounter",1556);T(1311,1,Pu,x8),u.vf=function(e){return a(z(a(e,31),(Ft(),Qc)),19).pc((So(),Al))?DWt:null},u.Pe=function(e,n){Qpe(this,a(e,31),n)};var DWt,xze=A(lo,"InteractiveNodePlacer",1311);T(1312,1,Pu,g1),u.vf=function(e){return a(z(a(e,31),(Ft(),Qc)),19).pc((So(),Al))?NWt:null},u.Pe=function(e,n){Yde(this,a(e,31),n)};var NWt,oF,cF,Mze=A(lo,"LinearSegmentsNodePlacer",1312);T(235,1,{34:1,235:1},vit),u.vd=function(e){return QQt(this,a(e,235))},u.Fb=function(e){var n;return ct(e,235)?(n=a(e,235),this.b==n.b):!1},u.Hb=function(){return this.b},u.Ib=function(){return"ls"+Gp(this.f)},u.a=0,u.b=0,u.c=-1,u.d=-1,u.i=0;var OWt=A(lo,"LinearSegmentsNodePlacer/LinearSegment",235);T(1314,1,Pu,L4t),u.vf=function(e){return a(z(a(e,31),(Ft(),Qc)),19).pc((So(),Al))?BWt:null},u.Pe=function(e,n){i3e(this,a(e,31),n)},u.b=0,u.g=0;var BWt,Eze=A(lo,"NetworkSimplexPlacer",1314);T(1333,1,jr,Tg),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Lp(a(e,21).a,a(n,21).a)};var Sze=A(lo,"NetworkSimplexPlacer/0methodref$compare$Type",1333);T(1335,1,jr,pc),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Lp(a(e,21).a,a(n,21).a)};var Tze=A(lo,"NetworkSimplexPlacer/1methodref$compare$Type",1335);T(584,1,{584:1},FMt);var q3e=A(lo,"NetworkSimplexPlacer/EdgeRep",584);T(416,1,{416:1},$ot),u.b=!1;var X3e=A(lo,"NetworkSimplexPlacer/NodeRep",416);T(460,12,{3:1,4:1,20:1,25:1,41:1,12:1,13:1,15:1,49:1,460:1},yxt);var Cze=A(lo,"NetworkSimplexPlacer/Path",460);T(1315,1,ys,xb),u.Kb=function(e){return a(e,14).d.g.j};var Aze=A(lo,"NetworkSimplexPlacer/Path/lambda$0$Type",1315);T(1316,1,us,Vy),u.Nb=function(e){return a(e,232)==(Ke(),Hr)};var kze=A(lo,"NetworkSimplexPlacer/Path/lambda$1$Type",1316);T(1317,1,ys,A3),u.Kb=function(e){return a(e,14).d.g};var Lze=A(lo,"NetworkSimplexPlacer/Path/lambda$2$Type",1317);T(1318,1,us,FH),u.Nb=function(e){return rTt(FIt(a(e,8)))};var Pze=A(lo,"NetworkSimplexPlacer/Path/lambda$3$Type",1318);T(1319,1,us,gv),u.Nb=function(e){return Eu(),(Ht(),ab).pc(a(e,11).i)};var Ize=A(lo,"NetworkSimplexPlacer/lambda$0$Type",1319);T(1320,1,{},UMt),u.td=function(e){ree(this.a,this.b,e)};var Rze=A(lo,"NetworkSimplexPlacer/lambda$1$Type",1320);T(1329,1,{},UH),u.td=function(e){L0e(this.a,e)};var Dze=A(lo,"NetworkSimplexPlacer/lambda$10$Type",1329);T(1330,1,ys,Lk),u.Kb=function(e){return Eu(),new gi(null,new Ei(a(e,26).a,16))};var Nze=A(lo,"NetworkSimplexPlacer/lambda$11$Type",1330);T(1331,1,{},zH),u.td=function(e){zwe(this.a,e)};var Oze=A(lo,"NetworkSimplexPlacer/lambda$12$Type",1331);T(1332,1,ys,f1),u.Kb=function(e){return Eu(),Xt(a(e,113).e)};var Bze=A(lo,"NetworkSimplexPlacer/lambda$13$Type",1332);T(1334,1,ys,BS),u.Kb=function(e){return Eu(),Xt(a(e,113).e)};var Fze=A(lo,"NetworkSimplexPlacer/lambda$14$Type",1334);T(1336,1,us,k3),u.Nb=function(e){return Eu(),a(e,416).c.j==(Ke(),gs)};var Uze=A(lo,"NetworkSimplexPlacer/lambda$15$Type",1336);T(1337,1,us,L3),u.Nb=function(e){return Eu(),a(e,416).c.i.c.length>1};var zze=A(lo,"NetworkSimplexPlacer/lambda$16$Type",1337);T(1338,1,{},T4t),u.td=function(e){Afe(this.c,this.b,this.d,this.a,e)},u.c=0,u.d=0;var jze=A(lo,"NetworkSimplexPlacer/lambda$17$Type",1338);T(1339,1,{},jH),u.td=function(e){bee(this.a,e)},u.a=0;var Hze=A(lo,"NetworkSimplexPlacer/lambda$18$Type",1339);T(1340,1,ys,Xy),u.Kb=function(e){return Eu(),new gi(null,new Ei(a(e,26).a,16))};var Gze=A(lo,"NetworkSimplexPlacer/lambda$19$Type",1340);T(1321,1,ys,P3),u.Kb=function(e){return Eu(),new gi(null,new Ei(a(e,26).a,16))};var Wze=A(lo,"NetworkSimplexPlacer/lambda$2$Type",1321);T(1341,1,{},y5),u.td=function(e){kee(this.a,e)};var $ze=A(lo,"NetworkSimplexPlacer/lambda$20$Type",1341);T(1342,1,us,Mb),u.Nb=function(e){return rTt(e)};var Vze=A(lo,"NetworkSimplexPlacer/lambda$21$Type",1342);T(1343,1,ys,Ag),u.Kb=function(e){return Eu(),new gi(null,new Ei(a(e,26).a,16))};var qze=A(lo,"NetworkSimplexPlacer/lambda$22$Type",1343);T(1344,1,us,HH),u.Nb=function(e){return zte(this.a,e)};var Xze=A(lo,"NetworkSimplexPlacer/lambda$23$Type",1344);T(1345,1,{},zMt),u.td=function(e){ege(this.a,this.b,e)};var Zze=A(lo,"NetworkSimplexPlacer/lambda$24$Type",1345);T(1346,1,us,wv),u.Nb=function(e){return Eu(),!ec(a(e,14))};var Yze=A(lo,"NetworkSimplexPlacer/lambda$25$Type",1346);T(1347,1,us,FS),u.Nb=function(e){return Eu(),!ec(a(e,14))};var Kze=A(lo,"NetworkSimplexPlacer/lambda$26$Type",1347);T(1348,1,{},x5),u.le=function(e,n){return mee(this.a,e,n)};var Jze=A(lo,"NetworkSimplexPlacer/lambda$27$Type",1348);T(1322,1,ys,Pk),u.Kb=function(e){return Eu(),new gi(null,new S2(Rn(br(a(e,8)))))};var Qze=A(lo,"NetworkSimplexPlacer/lambda$3$Type",1322);T(1323,1,us,US),u.Nb=function(e){return Eu(),Sce(a(e,14))};var tje=A(lo,"NetworkSimplexPlacer/lambda$4$Type",1323);T(1324,1,{},GH),u.td=function(e){v_e(this.a,a(e,14))};var eje=A(lo,"NetworkSimplexPlacer/lambda$5$Type",1324);T(1325,1,ys,vv),u.Kb=function(e){return Eu(),new gi(null,new Ei(a(e,26).a,16))};var nje=A(lo,"NetworkSimplexPlacer/lambda$6$Type",1325);T(1326,1,us,Zy),u.Nb=function(e){return Eu(),a(e,8).j==(Ke(),gs)};var ije=A(lo,"NetworkSimplexPlacer/lambda$7$Type",1326);T(1327,1,ys,w),u.Kb=function(e){return Eu(),new gi(null,new S2(Rn(Jg(a(e,8)))))};var rje=A(lo,"NetworkSimplexPlacer/lambda$8$Type",1327);T(1328,1,us,S),u.Nb=function(e){return Eu(),_re(a(e,14))};var sje=A(lo,"NetworkSimplexPlacer/lambda$9$Type",1328);T(1310,1,Pu,Ev),u.vf=function(e){return a(z(a(e,31),(Ft(),Qc)),19).pc((So(),Al))?FWt:null},u.Pe=function(e,n){Y_e(a(e,31),n)};var FWt,oje=A(lo,"SimpleNodePlacer",1310);T(164,1,{164:1},C_),u.Ib=function(){var e;return e="",this.c==(Sf(),Qm)?e+=gE:this.c==Xp&&(e+=pE),this.o==(Zh(),x0)?e+=BY:this.o==rf?e+="UP":e+="BALANCED",e};var cje=A($p,"BKAlignedLayout",164);T(466,23,{3:1,34:1,23:1,466:1},wrt);var Xp,Qm,UWt=Ri($p,"BKAlignedLayout/HDirection",466,ji,woe,Tie),zWt;T(465,23,{3:1,34:1,23:1,465:1},vrt);var x0,rf,jWt=Ri($p,"BKAlignedLayout/VDirection",465,ji,voe,Cie),HWt;T(1485,1,{},jMt);var aje=A($p,"BKAligner",1485);T(1488,1,{},s8t);var uje=A($p,"BKCompactor",1488);T(593,1,{593:1},V),u.a=0;var lje=A($p,"BKCompactor/ClassEdge",593);T(423,1,{423:1},wxt),u.a=null,u.b=0;var hje=A($p,"BKCompactor/ClassNode",423);T(1313,1,Pu,VMt),u.vf=function(e){return a(z(a(e,31),(Ft(),Qc)),19).pc((So(),Al))?GWt:null},u.Pe=function(e,n){w3e(this,a(e,31),n)},u.a=!1,u.e=!1;var GWt,fje=A($p,"BKNodePlacer",1313);T(437,23,{3:1,34:1,23:1,437:1},_rt);var aF,$bt,Vbt=Ri($p,"EdgeStraighteningStrategy",437,ji,boe,Aie),WWt;T(1486,1,{},st),u.d=0;var dje=A($p,"NeighborhoodInformation",1486);T(1487,1,jr,WH),u.Ld=function(e,n){return Mue(this,a(e,48),a(n,48))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var pje=A($p,"NeighborhoodInformation/NeighborComparator",1487);T(724,1,{});var gje=A($p,"ThresholdStrategy",724);T(1510,724,{},Sxt),u.yf=function(e,n,i){return this.a.o==(Zh(),rf)?is:Ps},u.zf=function(){};var mje=A($p,"ThresholdStrategy/NullThresholdStrategy",1510);T(522,1,{522:1},GMt),u.c=!1,u.d=!1;var bje=A($p,"ThresholdStrategy/Postprocessable",522);T(1511,724,{},Txt),u.yf=function(e,n,i){var r,c,l;return c=n==i,r=this.a.a[i.o]==n,c||r?(l=e,this.a.c==(Sf(),Qm)?(c&&(l=rZ(this,n,!0)),!isNaN(l)&&!isFinite(l)&&r&&(l=rZ(this,i,!1))):(c&&(l=rZ(this,n,!0)),!isNaN(l)&&!isFinite(l)&&r&&(l=rZ(this,i,!1))),l):e},u.zf=function(){for(var e,n,i,r,c;this.c.b!=0;)c=a(Toe(this.c),522),r=JNt(this,c),r.a&&(e=r.a,i=lt(this.a.f[this.a.g[c.b.o].o]),!(!i&&!ec(e)&&e.c.g.c==e.d.g.c)&&(n=sDt(this,c),n||HEt(this.d,c)));for(;this.d.a.c.length!=0;)sDt(this,a(Gat(this.d),522))};var wje=A($p,"ThresholdStrategy/SimpleThresholdStrategy",1511);T(573,1,{573:1,285:1,286:1},vt),u.hf=function(){return e6t(this)},u.uf=function(){return e6t(this)};var uQ,vje=A(B_,"EdgeRouterFactory",573);T(1356,1,Pu,_j),u.vf=function(e){return gwe(a(e,31))},u.Pe=function(e,n){gye(a(e,31),n)};var $Wt,VWt,qWt,XWt,ZWt,qbt,YWt,KWt,_je=A(B_,"OrthogonalEdgeRouter",1356);T(594,1,{},pX),u.a=0,u.c=0;var yje=A(B_,"OrthogonalRoutingGenerator",594);T(252,1,{252:1},AN),u.Ib=function(){return this.a+"->"+this.b},u.c=0;var xje=A(B_,"OrthogonalRoutingGenerator/Dependency",252);T(165,1,{34:1,165:1},a6t),u.vd=function(e){return tte(this,a(e,165))},u.Fb=function(e){var n;return ct(e,165)?(n=a(e,165),this.d==n.d):!1},u.Hb=function(){return this.d},u.Ib=function(){var e,n,i,r;for(e=new ll("{"),r=new j(this.g);r.aop&&(c=new We(b,k),Xi(i.a,c),kP(this.a,i,e,c,!1),l=new We(M,k),Xi(i.a,l),kP(this.a,i,e,l,!1))},u.Bf=function(e){return e.g.k.a+e.k.a+e.a.a},u.Cf=function(){return Ht(),fi},u.Df=function(){return Ht(),Tn};var Eje=A(B_,"OrthogonalRoutingGenerator/NorthToSouthRoutingStrategy",1490);T(1491,1,{},Hl),u.Af=function(e,n){var i,r,c,l,f,g,b,v,M,k;for(k=n-e.i*this.a.c,g=new j(e.g);g.aop&&(c=new We(b,k),Xi(i.a,c),kP(this.a,i,e,c,!1),l=new We(M,k),Xi(i.a,l),kP(this.a,i,e,l,!1))},u.Bf=function(e){return e.g.k.a+e.k.a+e.a.a},u.Cf=function(){return Ht(),Tn},u.Df=function(){return Ht(),fi};var Sje=A(B_,"OrthogonalRoutingGenerator/SouthToNorthRoutingStrategy",1491);T(1489,1,{},ed),u.Af=function(e,n){var i,r,c,l,f,g,b,v,M,k;for(k=n+e.i*this.a.c,g=new j(e.g);g.aop&&(c=new We(k,b),Xi(i.a,c),kP(this.a,i,e,c,!0),l=new We(k,M),Xi(i.a,l),kP(this.a,i,e,l,!0))},u.Bf=function(e){return e.g.k.b+e.k.b+e.a.b},u.Cf=function(){return Ht(),Qe},u.Df=function(){return Ht(),on};var Tje=A(B_,"OrthogonalRoutingGenerator/WestToEastRoutingStrategy",1489);T(1351,1,Pu,qMt),u.vf=function(e){return Hge(a(e,31))},u.Pe=function(e,n){mxe(this,a(e,31),n)};var JWt,QWt,t$t,e$t,uF,Cje=A(B_,"PolylineEdgeRouter",1351);T(1352,1,sh,D),u.Mb=function(e){return Cle(a(e,8))},u.Fb=function(e){return this===e},u.Nb=function(e){return this.Mb(e)};var Aje=A(B_,"PolylineEdgeRouter/1",1352);T(151,1,{151:1},J6t),u.Ib=function(){var e,n,i,r;for(i=new om,this.e&&Ii(Ii(i,eL(this.e)),": "),n=qn(Z$(this),0);n.b!=n.d.c;)e=a(Yn(n),11),Ii(Ii(S1(Ii(i,(r=a5t(e),r==null?"p_"+e.o:"p_"+r)),32),eL(e.i))," / ");return N9(i,i.a.length-2-1)},u.j=0,u.k=0;var kje=A(f0,"ConnectedSelfLoopComponent",151);T(129,23,{3:1,34:1,23:1,129:1},A1),u.c=0;var n$t,i$t,r$t,tb,kw,Zp,Lw,rg,hp,Yp,eb,nb,s$t,o$t,c$t,a$t,u$t,l$t,h$t,f$t,d$t,p$t,g$t,m$t,b$t,sy,kx,Pw,Iw,cA=Ri(f0,"LoopSide",129,ji,iq,kie),w$t;T(424,1,{},zIt,Nht,Tut),u.Ib=function(){return this.b.Ib()},u.c=0,u.d=!1,u.e=!1,u.f=!1,u.i=0,u.j=0;var Lje=A(f0,"NubSpline",424);T(190,1,{190:1},$Dt,Y$);var Pje=A(f0,"NubSpline/PolarCP",190);T(599,424,{},H$);var Ije=A(f0,"NubsSelfLoop",599);T(236,1,{},s9t,xX,I8t,ML,TX),u.a=apt,u.b=cx,u.c=apt,u.d=cx;var Rje=A(f0,"Rectangle",236);T(1353,1,Pu,YRt),u.vf=function(e){return fme(a(e,31))},u.Pe=function(e,n){v3e(this,a(e,31),n)},u.d=3;var v$t,_$t,y$t,x$t,M$t,E$t,Dje=A(f0,"SplineEdgeRouter",1353);T(250,1,{250:1},wN),u.Ib=function(){return this.a+" ->("+this.c+") "+this.b},u.c=0;var Nje=A(f0,"SplineEdgeRouter/Dependency",250);T(417,23,{3:1,34:1,23:1,417:1},Mrt);var sg,oy,S$t=Ri(f0,"SplineEdgeRouter/SideToProcess",417,ji,_oe,Iie),T$t;T(1354,1,{},eEt),u.td=function(e){pre(this.a,this.b,e)};var Oje=A(f0,"SplineEdgeRouter/lambda$0$Type",1354);T(1355,1,{},nEt),u.td=function(e){gre(this.a,this.b,e)};var Bje=A(f0,"SplineEdgeRouter/lambda$1$Type",1355);T(125,1,{34:1,125:1},m9t,Oht),u.vd=function(e){return ete(this,a(e,125))},u.b=0,u.e=0,u.f=0,u.i=!1,u.j=0,u.k=!1,u.n=!1,u.p=0,u.r=0,u.s=0;var Fje=A(f0,"SplineSegment",125);T(589,1,{589:1},$t),u.a=0,u.b=!1,u.c=!1,u.d=!1,u.e=!1,u.f=0;var Uje=A(f0,"SplineSegment/EdgeInformation",589);T(990,1,{},_e);var zje=A(x4,Ift,990);T(991,1,jr,Ye),u.Ld=function(e,n){return G0e(a(e,128),a(n,128))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var jje=A(x4,dBt,991);T(989,1,{},I3t);var Hje=A(x4,"MrTree",989);T(360,23,{3:1,34:1,23:1,360:1,285:1,286:1},G9),u.hf=function(){return L9t(this)},u.uf=function(){return L9t(this)};var lF,aA,q6,uA,Xbt=Ri(x4,"TreeLayoutPhases",360,ji,Bce,Eie),C$t;T(960,244,N_,gTt),u.Ae=function(e,n){var i,r,c,l,f,g;for(l=(f=new vN,Uo(f,e),Ct(f,(mc(),fA),e),g=new vi,Qve(e,f,g),jve(e,f,g),f),c=n_e(this.a,l),r=new j(c);r.a"+aN(this.c):"e_"+Yr(this)};var qje=A(M4,"TEdge",170);T(128,131,{3:1,128:1,93:1,131:1},vN),u.Ib=function(){var e,n,i,r,c;for(c=null,r=qn(this.b,0);r.b!=r.d.c;)i=a(Yn(r),76),c+=(i.c==null||i.c.length==0?"n_"+i.g:"n_"+i.c)+` +`;for(n=qn(this.a,0);n.b!=n.d.c;)e=a(Yn(n),170),c+=(e.b&&e.c?aN(e.b)+"->"+aN(e.c):"e_"+Yr(e))+` +`;return c};var Z3e=A(M4,"TGraph",128);T(570,452,{3:1,452:1,570:1,93:1,131:1});var Xje=A(M4,"TShape",570);T(76,570,{3:1,452:1,76:1,570:1,93:1,131:1},oq),u.Ib=function(){return aN(this)};var Y3e=A(M4,"TNode",76);T(231,1,wd,Hd),u.sc=function(e){vo(this,e)},u.tc=function(){var e;return e=qn(this.a.d,0),new Ob(e)};var Zje=A(M4,"TNode/2",231);T(330,1,Cs,Ob),u.gc=function(e){ks(this,e)},u.ic=function(){return a(Yn(this.a),170).c},u.hc=function(){return P9(this.a)},u.jc=function(){eat(this.a)};var Yje=A(M4,"TNode/2/1",330);T(1545,1,Br,mTt),u.Pe=function(e,n){f_e(this,a(e,128),n)};var Kje=A(ax,"FanProcessor",1545);T(308,23,{3:1,34:1,23:1,308:1,286:1},FT),u.hf=function(){switch(this.g){case 0:return new vxt;case 1:return new mTt;case 2:return new xa;case 3:return new Is;case 4:return new Qr;case 5:return new zu;default:throw K(new yn(lY+(this.f!=null?this.f:""+this.g)))}};var lQ,hQ,fQ,dQ,pQ,hF,A$t=Ri(ax,$ft,308,ji,Zae,Sie),k$t;T(1548,1,Br,Is),u.Pe=function(e,n){Xme(this,a(e,128),n)},u.a=0;var Jje=A(ax,"LevelHeightProcessor",1548);T(1549,1,wd,ol),u.sc=function(e){vo(this,e)},u.tc=function(){return we(),Rv(),X_};var Qje=A(ax,"LevelHeightProcessor/1",1549);T(1546,1,Br,xa),u.Pe=function(e,n){g0e(this,a(e,128),n)},u.a=0;var tHe=A(ax,"NeighborsProcessor",1546);T(1547,1,wd,Ul),u.sc=function(e){vo(this,e)},u.tc=function(){return we(),Rv(),X_};var eHe=A(ax,"NeighborsProcessor/1",1547);T(1550,1,Br,Qr),u.Pe=function(e,n){qme(this,a(e,128),n)},u.a=0;var nHe=A(ax,"NodePositionProcessor",1550);T(1544,1,Br,vxt),u.Pe=function(e,n){Iye(this,a(e,128))};var iHe=A(ax,"RootProcessor",1544);T(1551,1,Br,zu),u.Pe=function(e,n){Ohe(a(e,128))};var rHe=A(ax,"Untreeifyer",1551),X6,lA,L$t,gQ,fF,hA,mQ,dF,pF,FE,fA,gF,Kp,Zbt,P$t,bQ,Rw,wQ,Ybt;T(750,1,_d,mj),u.ue=function(e){He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,upt),""),"Weighting of Nodes"),"Which weighting to use when computing a node order."),Jbt),(i0(),xs)),swt),qe((t0(),On))))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,lpt),""),"Search Order"),"Which search order to use when computing a spanning tree."),Kbt),xs),cwt),qe(On)))),v7t((new bj,e))};var I$t,Kbt,R$t,Jbt,sHe=A(SO,"MrTreeMetaDataProvider",750);T(886,1,_d,bj),u.ue=function(e){v7t(e)};var D$t,Qbt,twt,N$t,ewt,mF,nwt,O$t,iwt,B$t,oHe=A(SO,"MrTreeOptions",886);T(887,1,{},jS),u.Be=function(){var e;return e=new gTt,e},u.Ce=function(e){};var cHe=A(SO,"MrTreeOptions/MrtreeFactory",887);T(438,23,{3:1,34:1,23:1,438:1},Ert);var vQ,rwt,swt=Ri(SO,"OrderWeighting",438,ji,goe,Rie),F$t;T(388,23,{3:1,34:1,23:1,388:1},Srt);var owt,_Q,cwt=Ri(SO,"TreeifyingOrder",388,ji,poe,Die),U$t;T(1357,1,Pu,wj),u.vf=function(e){return a(e,128),z$t},u.Pe=function(e,n){fle(this,a(e,128),n)};var z$t,aHe=A("org.eclipse.elk.alg.mrtree.p1treeify","DFSTreeifyer",1357);T(1358,1,Pu,vj),u.vf=function(e){return a(e,128),j$t},u.Pe=function(e,n){m0e(this,a(e,128),n)};var j$t,uHe=A("org.eclipse.elk.alg.mrtree.p2order","NodeOrderer",1358);T(1359,1,Pu,M8),u.vf=function(e){return a(e,128),H$t},u.Pe=function(e,n){Jwe(this,a(e,128),n)},u.a=0;var H$t,lHe=A("org.eclipse.elk.alg.mrtree.p3place","NodePlacer",1359);T(1360,1,Pu,yj),u.vf=function(e){return a(e,128),G$t},u.Pe=function(e,n){Fpe(a(e,128),n)};var G$t,hHe=A("org.eclipse.elk.alg.mrtree.p4route","EdgeRouter",1360),dA;T(447,23,{3:1,34:1,23:1,447:1,285:1,286:1},Trt),u.hf=function(){return TIt(this)},u.uf=function(){return TIt(this)};var bF,UE,awt=Ri(hpt,"RadialLayoutPhases",447,ji,moe,Nie),W$t;T(961,244,N_,R3t),u.Ae=function(e,n){var i,r,c,l,f,g,b;if(r=d9t(this,e),di(n,"Radial layout",r.c.length),b=nge(e),ga(e,(ZT(),dA),b),!b)throw K(new yn("The given graph is not a tree!"));for(l=lt(Yt(cn(e,(tw(),_F)))),l==0&&(l=k9t(e)),ga(e,_F,l),i=new WG(e),pd(zRt(i),new R3),c=new M5(i),AIt(c),g=new j(d9t(this,e));g.a0&&XPt(e.charCodeAt(n-1),xBt);)--n;if(r>=n)throw K(new yn("The given string does not contain any numbers."));if(c=Y2(e.substr(r,n-r),`,|;|\r| +`),c.length!=2)throw K(new yn("Exactly two numbers are expected, "+c.length+" were found."));try{this.a=rw(iw(c[0])),this.b=rw(iw(c[1]))}catch(l){throw l=vr(l),ct(l,118)?(i=l,K(new yn(MBt+i))):K(l)}},u.Ib=function(){return"("+this.a+","+this.b+")"},u.a=0,u.b=0;var ss=A(QP,"KVector",9);T(74,66,{3:1,4:1,20:1,25:1,41:1,13:1,66:1,15:1,74:1,428:1},qa,T9),u.gf=function(e){var n,i,r,c,l,f;r=Y2(e,`,|;|\\(|\\)|\\[|\\]|\\{|\\}| | | +`),ld(this);try{for(i=0,l=0,c=0,f=0;i0&&(l%2==0?c=rw(r[i]):f=rw(r[i]),l>0&&l%2!=0&&Xi(this,new We(c,f)),++l),++i}catch(g){throw g=vr(g),ct(g,118)?(n=g,K(new yn("The given string does not match the expected format for vectors."+n))):K(g)}},u.Ib=function(){var e,n,i;for(e=new ll("("),n=qn(this,0);n.b!=n.d.c;)i=a(Yn(n),9),Ii(e,i.a+","+i.b),n.b!=n.d.c&&(e.a+="; ");return(e.a+=")",e).a};var kwt=A(QP,"KVectorChain",74);T(224,23,{3:1,34:1,23:1,224:1},UT);var LQ,yF,xF,J6,Q6,MF,Lwt=Ri(Dh,"Alignment",224,ji,Yae,jie),lVt;T(855,1,_d,Ej),u.ue=function(e){ONt(e)};var Pwt,PQ,Iwt,Rwt,hVt,IQ,fVt,dVt,Dwt,Nwt,pVt,xGe=A(Dh,"BoxLayouterOptions",855);T(856,1,{},ER),u.Be=function(){var e;return e=new vz,e},u.Ce=function(e){};var MGe=A(Dh,"BoxLayouterOptions/BoxFactory",856);T(785,1,_d,Sj),u.ue=function(e){He(e,new De(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,cFt),""),"Layout Algorithm"),"Select a specific layout algorithm."),(i0(),Y6)),At),qe((t0(),On))))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Bdt),""),"Alignment"),"Alignment of the selected node relative to other nodes, the exact meaning depends on the used algorithm."),Bwt),xs),Lwt),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.alignment"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,hE),""),"Aspect Ratio"),"The desired aspect ratio of the drawing, that is the quotient of width by height."),ha),To),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.aspectRatio"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,Mpt),""),"Bend Points"),"A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points."),Ed),kwt),qe(Md)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.bendPoints"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,RY),""),"Debug Mode"),"Whether additional debug information shall be generated."),(me(),me(),!1)),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.debugMode"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,NY),""),Sft),"Overall direction of edges: horizontal (right / left) or vertical (down / up)."),Uwt),xs),mA),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.direction"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,n6),""),"Edge Routing"),"What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline."),Hwt),xs),qQ),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.edgeRouting"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,ypt),""),"Expand Nodes"),"If active, nodes are expanded to fill the area of their parent."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.expandNodes"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Fdt),""),"Hierarchy Handling"),"If this option is set to SEPARATE_CHILDREN, each hierarchy level of the graph is processed independently, possibly by different layout algorithms, beginning with the lowest level. If it is set to INCLUDE_CHILDREN, the algorithm is responsible to process all hierarchy levels that are contained in the associated parent node. If the root node is set to inherit (or not set at all), the default behavior is SEPARATE_CHILDREN."),$wt),xs),Svt),ur(On,Y(Z(Jp,1),jt,163,0,[vc]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.hierarchyHandling"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,sx),""),"Padding"),"The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately."),Qwt),Ed),Wgt),ur(On,Y(Z(Jp,1),jt,163,0,[vc]))))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,hO),""),"Interactive"),"Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible."),!1),Ec),ho),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,aY),""),"Port Constraints"),"Defines constraints of the position of the ports of a node."),rvt),xs),Avt),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portConstraints"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,MO),""),"Position"),"The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position."),Ed),ss),ur(vc,Y(Z(Jp,1),jt,163,0,[ib,og]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.position"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,ZP),""),"Priority"),"Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used."),Pa),Io),ur(vc,Y(Z(Jp,1),jt,163,0,[Md]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.priority"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,lO),""),"Randomization Seed"),"Seed used for pseudo-random number generators to control the layout algorithm. If the value is 0, the seed shall be determined pseudo-randomly (e.g. from the system time)."),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.randomSeed"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,YP),""),"Separate Connected Components"),"Whether each connected component should be processed separately."),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.separateConnComp"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Zdt),""),"Junction Points"),"This option is not used as option, but as output of the layout algorithms. It is attached to edges and determines the points where junction symbols should be drawn in order to represent hyperedges with orthogonal routing. Whether such points are computed depends on the chosen layout algorithm and edge routing style. The points are put into the vector chain with no specific order."),Vwt),Ed),kwt),qe(Md)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.junctionPoints"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Qdt),""),"Comment Box"),"Whether the node should be regarded as a comment box instead of a regular node. In that case its placement should be similar to how labels are handled. Any edges incident to a comment box specify to which graph elements the comment is related."),!1),Ec),ho),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.commentBox"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,tpt),""),"Hypernode"),"Whether the node should be handled as a hypernode."),!1),Ec),ho),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.hypernode"])))),He(e,new De(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,aFt),""),"Label Manager"),"Label managers can shorten labels upon a layout algorithm's request."),Ed),rMe),ur(On,Y(Z(Jp,1),jt,163,0,[og]))))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,rpt),""),"Margins"),"Margins define additional space around the actual bounds of a graph element. For instance, ports or labels being placed on the outside of a node's border might introduce such a margin. The margin is used to guarantee non-overlap of other graph elements with those ports or labels."),qwt),Ed),Ggt),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.margins"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Ndt),""),"No Layout"),"No layout is done for the associated element. This is used to mark parts of a diagram to avoid their inclusion in the layout graph, or to mark parts of the layout graph to prevent layout engines from processing them. If you wish to exclude the contents of a compound node from automatic layout, while the node itself is still considered on its own layer, use the 'Fixed Layout' algorithm for that node."),!1),Ec),ho),ur(vc,Y(Z(Jp,1),jt,163,0,[Md,ib,og]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.noLayout"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,uFt),""),"Scale Factor"),"The scaling factor to be applied to the corresponding node in recursive layout. It causes the corresponding node's size to be adjusted, and its ports and labels to be sized and placed accordingly after the layout of that node has been determined (and before the node itself and its siblings are arranged). The scaling is not reverted afterwards, so the resulting layout graph contains the adjusted size and position data. This option is currently not supported if 'Layout Hierarchy' is set."),1),ha),To),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.scaleFactor"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,lFt),""),"Animate"),"Whether the shift from the old layout to the new computed layout shall be animated."),!0),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.animate"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,hFt),""),"Animation Time Factor"),"Factor for computation of animation time. The higher the value, the longer the animation time. If the value is 0, the resulting time is always equal to the minimum defined by 'Minimal Animation Time'."),Xt(100)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.animTimeFactor"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,fFt),""),"Layout Ancestors"),"Whether the hierarchy levels on the path from the selected element to the root of the diagram shall be included in the layout process."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.layoutAncestors"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,dFt),""),"Maximal Animation Time"),"The maximal time for animations, in milliseconds."),Xt(4e3)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.maxAnimTime"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,pFt),""),"Minimal Animation Time"),"The minimal time for animations, in milliseconds."),Xt(400)),Pa),Io),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.minAnimTime"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,gFt),""),"Progress Bar"),"Whether a progress bar shall be displayed during layout computations."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.progressBar"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,mFt),""),"Validate Options"),"Whether layout options shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."),!0),Ec),ho),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,bFt),""),"Zoom to Fit"),"Whether the zoom level shall be set to view the whole diagram after layout."),!1),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.zoomToFit"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,xpt),"box"),"Box Layout Mode"),"Configures the packing mode used by the {@link BoxLayoutProvider}. If SIMPLE is not required (neither priorities are used nor the interactive mode), GROUP_DEC can improve the packing and decrease the area. GROUP_MIXED and GROUP_INC may, in very specific scenarios, work better."),Fwt),xs),Ovt),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,nY),J1),"Components Spacing"),"Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated."),12),ha),To),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.borderSpacing"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Cdt),J1),"Edge Spacing"),"Spacing to be preserved between any two edges. Note that while this can somewhat easily be satisfied for the segments of orthogonally drawn edges, it is harder for general polylines or splines."),10),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,cY),J1),"Edge Label Spacing"),"The minimal distance to be preserved between a label and the edge it is associated with. Note that the placement of a label is influenced by the 'edgelabels.placement' option."),2),ha),To),qe(On)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Adt),J1),"Edge Node Spacing"),"Spacing to be preserved between nodes and edges."),10),ha),To),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,kdt),J1),"Label Spacing"),"Determines the amount of space to be left between two labels of the same graph element."),0),ha),To),qe(On)),Y(Z(At,1),wt,2,6,[xFt])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Pdt),J1),"Label Node Spacing"),"Spacing to be preserved between labels and the border of node they are associated with. Note that the placement of a label is influenced by the 'nodelabels.placement' option."),5),ha),To),qe(On)),Y(Z(At,1),wt,2,6,[xFt])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Ldt),J1),"Label Port Spacing"),"Spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),ha),To),qe(On)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,dE),J1),"Node Spacing"),"The minimal distance to be preserved between each two nodes."),20),ha),To),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.spacing"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Idt),J1),"Port Spacing"),"Spacing between pairs of ports of the same node."),10),ha),To),ur(On,Y(Z(Jp,1),jt,163,0,[vc]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portSpacing"])))),He(e,new De(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,Rdt),J1),"Individual Spacing Override"),"In general spacing values apply to the children of the hierarchical node (possibly the root node) for which the values are actually specified. Hereby, the children include ports, edges, and labels."),Ed),J3e),ur(vc,Y(Z(Jp,1),jt,163,0,[Md,ib,og]))))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,spt),J1),"Additional Port Space"),"Additional space around the sets of ports on each node side. For each side of a node, this option can reserve additional space before and after the ports on each side. For example, a top spacing of 20 makes sure that the first port on the western and eastern side is 20 units away from the northern border."),fvt),Ed),Ggt),qe(On)))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,ipt),MFt),"Layout Partition"),"Partition to which the node belongs to. If 'layoutPartitions' is true, all nodes are expected to have a partition."),Pa),Io),ur(On,Y(Z(Jp,1),jt,163,0,[vc]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.partition"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,npt),MFt),"Layout Partitioning"),"Whether to activate partitioned layout."),tvt),Ec),ho),qe(On)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.layoutPartitions"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,wFt),EFt),"Node Label Padding"),"Define padding for node labels that are placed inside of a node."),Xwt),Ed),Wgt),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.nodeLabelInset"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,jdt),EFt),"Node Label Placement"),"Hints for where node labels are to be placed; if empty, the node label's position is not modified."),Zwt),zE),to),ur(vc,Y(Z(Jp,1),jt,163,0,[og]))),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.nodeLabelPlacement"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Wdt),TO),"Port Alignment"),"Defines the default port distribution for a node. May be overridden for each side individually."),nvt),xs),xA),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portAlignment"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,$dt),TO),"Port Alignment (North)"),"Defines how ports on the northern side are placed, overriding the node's general port alignment."),xs),xA),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portAlignment.north"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,Vdt),TO),"Port Alignment (South)"),"Defines how ports on the southern side are placed, overriding the node's general port alignment."),xs),xA),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portAlignment.south"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,qdt),TO),"Port Alignment (West)"),"Defines how ports on the western side are placed, overriding the node's general port alignment."),xs),xA),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portAlignment.west"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,Xdt),TO),"Port Alignment (East)"),"Defines how ports on the eastern side are placed, overriding the node's general port alignment."),xs),xA),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portAlignment.east"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,yO),Ept),"Node Size Constraints"),"Constraints for determining node sizes. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to node sizes being fixed."),Ywt),zE),MA),qe(vc)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,DY),Ept),"Node Size Options"),"Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications."),Jwt),zE),Ivt),qe(vc)))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,xO),Ept),"Node Size Minimum"),"The minimal size to which a node can be reduced."),Kwt),Ed),ss),qe(vc)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Ydt),IY),"Edge Label Placement"),"Gives a hint on where to put edge labels."),zwt),xs),pvt),qe(og)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.edgeLabelPlacement"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Kdt),IY),"Inline Edge Labels"),"If true, an edge label is placed directly on its edge. May only apply to center edge labels. This kind of label placement is only advisable if the label's rendering is such that it is not crossed by its edge and thus stays legible."),!1),Ec),ho),qe(og)))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,vFt),"font"),"Font Name"),"Font name used for a label."),Y6),At),qe(og)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.fontName"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,_Ft),"font"),"Font Size"),"Font size used for a label."),Pa),Io),qe(og)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.fontSize"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,ept),$Y),"Port Anchor Offset"),"The offset to the port position where connections shall be attached."),Ed),ss),qe(ib)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portAnchor"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,Jdt),$Y),"Port Index"),"The index of a port in the fixed order around a node. The order is assumed as clockwise, starting with the leftmost port on the top side. This option must be set if 'Port Constraints' is set to FIXED_ORDER and no specific positions are given for the ports. Additionally, the option 'Port Side' must be defined in this case."),Pa),Io),qe(ib)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portIndex"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Odt),$Y),"Port Side"),"The side of a node on which a port is situated. This option must be set if 'Port Constraints' is set to FIXED_SIDE or FIXED_ORDER and no specific positions are given for the ports."),ovt),xs),Ia),qe(ib)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portSide"])))),He(e,new De(Di(ze(Ue(je(Ne(Fe(Oe(Be(new Ie,Ddt),$Y),"Port Border Offset"),"The offset of ports on the node border. With a positive offset the port is moved outside of the node, while with a negative offset the port is moved towards the inside. An offset of 0 means that the port is placed directly on the node border, i.e. if the port side is north, the port's south border touches the nodes's north border; if the port side is east, the port's west border touches the nodes's east border; if the port side is south, the port's north border touches the node's south border; if the port side is west, the port's east border touches the node's west border."),ha),To),qe(ib)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.offset"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Hdt),SFt),"Port Label Placement"),"Decides on a placement method for port labels."),svt),xs),kvt),qe(vc)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.portLabelPlacement"])))),He(e,new De(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Gdt),SFt),"Port Labels Next to Port"),"Usually, inside port labels of hierarchical nodes are placed not next to their port, but with an offset to avoid edge-label crossings. The offset is not necessary if the port has no connections that would cross the label, but is usually applied anyway to keep things uniform. Setting this option to true places labels next to their ports if they won't be crossed by edges."),!1),Ec),ho),qe(vc)))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,Udt),TFt),"Activate Inside Self Loops"),"Whether this node allows to route self loops inside of it instead of around it. If set to true, this will make the node a compound node if it isn't already, and will require the layout algorithm to support compound nodes with hierarchical ports."),!1),Ec),ho),qe(vc)),Y(Z(At,1),wt,2,6,[CFt])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,zdt),TFt),"Inside Self Loop"),"Whether a self loop should be routed inside a node instead of around that node."),!1),Ec),ho),qe(Md)),Y(Z(At,1),wt,2,6,[CFt])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,iY),"edge"),"Edge Thickness"),"The thickness of an edge. This is a hint on the line width used to draw an edge, possibly requiring more space to be reserved for it."),1),ha),To),qe(Md)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.thickness"])))),He(e,new De(Di(ze(Ue(je(xn(Ne(Fe(Oe(Be(new Ie,yFt),"edge"),"Edge Type"),"The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations."),Wwt),xs),_vt),qe(Md)),Y(Z(At,1),wt,2,6,["de.cau.cs.kieler.edgeType"])))),LT(e,new A2(MT(eM(tM(new Cb,Nn),"Layered"),'The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called "hierarchies", and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.'))),LT(e,new A2(MT(eM(tM(new Cb,"org.eclipse.elk.orthogonal"),"Orthogonal"),`Orthogonal methods that follow the "topology-shape-metrics" approach by Batini, Nardelli and Tamassia '86. The first phase determines the topology of the drawing by applying a planarization technique, which results in a planar representation of the graph. The orthogonal shape is computed in the second phase, which aims at minimizing the number of edge bends, and is called orthogonalization. The third phase leads to concrete coordinates for nodes and edge bend points by applying a compaction method, thus defining the metrics.`))),LT(e,new A2(MT(eM(tM(new Cb,Rf),"Force"),"Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. The first successful method of this kind was proposed by Eades in 1984."))),LT(e,new A2(MT(eM(tM(new Cb,"org.eclipse.elk.circle"),"Circle"),"Circular layout algorithms emphasize cycles or biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent OPTIONS of the graph."))),LT(e,new A2(MT(eM(tM(new Cb,KBt),"Tree"),"Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type."))),LT(e,new A2(MT(eM(tM(new Cb,"org.eclipse.elk.planar"),"Planar"),"Algorithms that require a planar or upward planar graph. Most of these algorithms are theoretically interesting, but not practically usable."))),LT(e,new A2(MT(eM(tM(new Cb,Hm),"Radial"),"Radial layout algorithms usually position the nodes of the graph on concentric circles."))),bNt((new S8,e)),ONt((new Ej,e)),sNt((new T8,e))};var Owt,gVt,Bwt,jE,mVt,bVt,Fwt,wVt,RQ,pA,Uwt,vVt,tI,zwt,jwt,Hwt,Gwt,Wwt,_Vt,cy,$wt,yVt,EF,DQ,NQ,Lx,Vwt,SF,qwt,xVt,Xwt,TF,Zwt,HE,Ywt,eI,Kwt,CF,Jwt,OQ,ay,Qwt,MVt,tvt,EVt,evt,nvt,BQ,FQ,UQ,zQ,ivt,iu,nI,rvt,SVt,iI,jQ,svt,gA,ovt,Px,AF,HQ,TVt,GQ,cvt,CVt,avt,AVt,WQ,uvt,kF,lvt,uy,hvt,fvt,dvt,EGe=A(Dh,"CoreOptions",785);T(110,23,{3:1,34:1,23:1,110:1},W5);var fp,ah,uh,Ff,cg,mA=Ri(Dh,Sft,110,ji,dae,Xie),kVt;T(226,23,{3:1,34:1,23:1,226:1},$9);var bA,Ix,wA,LF,pvt=Ri(Dh,"EdgeLabelPlacement",226,ji,Uce,Zie),LVt;T(197,23,{3:1,34:1,23:1,197:1},V9);var GE,$Q,rb,VQ,qQ=Ri(Dh,"EdgeRouting",197,ji,zce,Yie),PVt;T(289,23,{3:1,34:1,23:1,289:1},zT);var gvt,mvt,bvt,wvt,XQ,vvt,_vt=Ri(Dh,"EdgeType",289,ji,Kae,Kie),IVt;T(853,1,_d,S8),u.ue=function(e){bNt(e)};var yvt,xvt,Mvt,RVt,Evt,vA,SGe=A(Dh,"FixedLayouterOptions",853);T(854,1,{},SR),u.Be=function(){var e;return e=new p1,e},u.Ce=function(e){};var TGe=A(Dh,"FixedLayouterOptions/FixedFactory",854);T(316,23,{3:1,34:1,23:1,316:1},EW);var Rx,PF,_A,Svt=Ri(Dh,"HierarchyHandling",316,ji,cce,$ie),DVt;T(86,23,{3:1,34:1,23:1,86:1},Bv);var Uf,kl,Ll,Pl,Nu,Il,lh,hh,Bh,to=Ri(Dh,"NodeLabelPlacement",86,ji,jue,Vie),NVt;T(225,23,{3:1,34:1,23:1,225:1},$5);var Tvt,yA,sb,Cvt,ZQ,xA=Ri(Dh,"PortAlignment",225,ji,hae,qie),OVt;T(83,23,{3:1,34:1,23:1,83:1},jT);var Dx,Gc,Sd,Nx,dp,ob,Avt=Ri(Dh,"PortConstraints",83,ji,Xae,Wie),BVt;T(275,23,{3:1,34:1,23:1,275:1},SW);var IF,cb,ly,kvt=Ri(Dh,"PortLabelPlacement",275,ji,rce,Hie),FVt;T(69,23,{3:1,34:1,23:1,69:1},V5);var Qe,Tn,rI,hy,zf,ab,Lvt,sI,fy,Td,YQ,Cd,M0,Ad,Ox,oI,dy,cI,fi,Wc,on,Ia=Ri(Dh,"PortSide",69,ji,iae,Gie),UVt;T(857,1,_d,T8),u.ue=function(e){sNt(e)};var zVt,jVt,Pvt,HVt,GVt,CGe=A(Dh,"RandomLayouterOptions",857);T(858,1,{},wz),u.Be=function(){var e;return e=new I3,e},u.Ce=function(e){};var AGe=A(Dh,"RandomLayouterOptions/RandomFactory",858);T(344,23,{3:1,34:1,23:1,344:1},q9);var ub,aI,uI,E0,MA=Ri(Dh,"SizeConstraint",344,ji,jce,Jie),WVt;T(239,23,{3:1,34:1,23:1,239:1},Fv);var RF,DF,WE,KQ,EA,SA,NF,Bx,OF,Ivt=Ri(Dh,"SizeOptions",239,ji,Hue,Qie),$Vt;T(313,1,{},CD,Fst,Bst),u.b=!1,u.c=0,u.d=-1,u.e=0,u.f=!1,u.j=0;var kGe=A(Rh,"BasicProgressMonitor",313);T(848,244,N_,vz),u.Ae=function(e,n){var i,r,c,l,f,g,b,v,M,k;switch(di(n,"Box layout",2),l=lt(Yt(cn(e,(y7(),pVt)))),f=a(cn(e,dVt),119),i=lt(de(cn(e,Iwt))),r=lt(de(cn(e,Rwt))),c=a(cn(e,PQ),288),c.g){case 0:g=(b=new ED((!e.a&&(e.a=new Wt(zr,e,10,11)),e.a)),we(),D1(b,new qH(r)),b),v=a(cn(e,IQ),9),v.a=y.Math.max(v.a-f.b-f.c,0),v.b=y.Math.max(v.b-f.d-f.a,0),M=Yt(cn(e,Pwt)),(M==null||(En(M),M<=0))&&(M=1.3),k=uxe(g,l,f,v.a,v.b,i,(En(M),M)),L_(e,k.a,k.b,!1,!0);break;default:_ye(e,l,f,i)}Vn(n)};var LGe=A(Rh,"BoxLayoutProvider",848);T(849,1,jr,qH),u.Ld=function(e,n){return Tbe(this,a(e,35),a(n,35))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.a=!1;var PGe=A(Rh,"BoxLayoutProvider/1",849);T(145,1,{145:1},DN,QSt),u.Ib=function(){return this.c?_ht(this.c):Gp(this.b)};var IGe=A(Rh,"BoxLayoutProvider/Group",145);T(288,23,{3:1,34:1,23:1,288:1},X9);var Rvt,Dvt,Nvt,JQ,Ovt=Ri(Rh,"BoxLayoutProvider/PackingMode",288,ji,Gce,tre),VVt;T(850,1,jr,pz),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return-ro(X5(a(e,145)),X5(a(n,145)))};var RGe=A(Rh,"BoxLayoutProvider/lambda$0$Type",850);T(851,1,jr,gz),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return ro(X5(a(e,145)),X5(a(n,145)))};var DGe=A(Rh,"BoxLayoutProvider/lambda$1$Type",851);T(852,1,jr,mz),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return ro(X5(a(e,145)),X5(a(n,145)))};var NGe=A(Rh,"BoxLayoutProvider/lambda$2$Type",852);T(833,1,{},JMt),u.td=function(e){ome(this.a,this.b,e)},u.a=0,u.b=0;var OGe=A(Rh,"ElkUtil/lambda$0$Type",833);T(834,1,{},QMt),u.td=function(e){PQt(this.a,this.b,e)},u.a=0,u.b=0;var BGe=A(Rh,"ElkUtil/lambda$1$Type",834);T(835,1,{},tEt),u.td=function(e){see(this.a,this.b,e)},u.a=0,u.b=0;var FGe=A(Rh,"ElkUtil/lambda$2$Type",835);T(322,1,{34:1,322:1},q3),u.vd=function(e){return fee(this,a(e,210))},u.Fb=function(e){var n;return ct(e,322)?(n=a(e,322),this.a==n.a):!1},u.Hb=function(){return Tr(this.a)},u.Ib=function(){return this.a+" (exclusive)"},u.a=0;var UGe=A(Rh,"ExclusiveBounds/ExclusiveLowerBound",322);T(963,244,N_,p1),u.Ae=function(e,n){var i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt,pt,_t,It,Gt,Zt,ce,ae,Te;for(di(n,AFt,1),l=a(cn(e,(dr(),jwt)),197),R=0,N=0,_t=new $n((!e.a&&(e.a=new Wt(zr,e,10,11)),e.a));_t.e!=_t.i._b();){for(rt=a(ci(_t),35),Te=a(cn(rt,(UN(),vA)),9),Te&&(Wd(rt,Te.a,Te.b),a(cn(rt,xvt),185).pc((Ju(),ub))&&($=a(cn(rt,Mvt),9),$.a>0&&$.b>0&&L_(rt,$.a,$.b,!0,!0))),R=y.Math.max(R,rt.i+rt.g),N=y.Math.max(N,rt.j+rt.f),M=new $n((!rt.n&&(rt.n=new Wt(ic,rt,1,7)),rt.n));M.e!=M.i._b();)b=a(ci(M),137),Te=a(cn(b,vA),9),Te&&Wd(b,Te.a,Te.b),R=y.Math.max(R,rt.i+b.i+b.g),N=y.Math.max(N,rt.j+b.j+b.f);for(Zt=new $n((!rt.c&&(rt.c=new Wt(Rl,rt,9,9)),rt.c));Zt.e!=Zt.i._b();)for(Gt=a(ci(Zt),121),Te=a(cn(Gt,vA),9),Te&&Wd(Gt,Te.a,Te.b),ce=rt.i+Gt.i,ae=rt.j+Gt.j,R=y.Math.max(R,ce+Gt.g),N=y.Math.max(N,ae+Gt.f),v=new $n((!Gt.n&&(Gt.n=new Wt(ic,Gt,1,7)),Gt.n));v.e!=v.i._b();)b=a(ci(v),137),Te=a(cn(b,vA),9),Te&&Wd(b,Te.a,Te.b),R=y.Math.max(R,ce+b.i+b.g),N=y.Math.max(N,ae+b.j+b.f);for(c=Rn(Af(rt));Jn(c);)i=a(In(c),105),k=lOt(i),R=y.Math.max(R,k.a),N=y.Math.max(N,k.b);for(r=Rn(EP(rt));Jn(r);)i=a(In(r),105),zc(a(at((!i.b&&(i.b=new pn(Si,i,4,7)),i.b),0),97))!=e&&(k=lOt(i),R=y.Math.max(R,k.a),N=y.Math.max(N,k.b))}if(l==(gd(),GE))for(pt=new $n((!e.a&&(e.a=new Wt(zr,e,10,11)),e.a));pt.e!=pt.i._b();)for(rt=a(ci(pt),35),r=Rn(Af(rt));Jn(r);)i=a(In(r),105),g=(f=new qa,f),g.b==0?ga(i,Lx,null):ga(i,Lx,g);It=a(cn(e,(UN(),RVt)),119),nt=R+It.b+It.c,G=N+It.d+It.a,L_(e,nt,G,!0,!0),Vn(n)};var zGe=A(Rh,"FixedLayoutProvider",963);T(786,131,tY,Nk);var J3e=A(Rh,"IndividualSpacings",786);T(635,1,{},LCt),u.c=0;var jGe=A(Rh,"InstancePool",635);T(48,1,{20:1,48:1},zs),u.sc=function(e){vo(this,e)},u.Fb=function(e){var n,i,r;return ct(e,48)?(i=a(e,48),n=this.a==null?i.a==null:Fi(this.a,i.a),r=this.b==null?i.b==null:Fi(this.b,i.b),n&&r):!1},u.Hb=function(){var e,n,i,r,c,l;return i=this.a==null?0:Yr(this.a),e=i&qr,n=i&-65536,l=this.b==null?0:Yr(this.b),r=l&qr,c=l&-65536,e^c>>16&qr|n^r<<16},u.tc=function(){return new XH(this)},u.Ib=function(){return this.a==null&&this.b==null?"pair(null,null)":this.a==null?"pair(null,"+Yc(this.b)+")":this.b==null?"pair("+Yc(this.a)+",null)":"pair("+Yc(this.a)+","+Yc(this.b)+")"};var HGe=A(Rh,"Pair",48);T(859,1,Cs,XH),u.gc=function(e){ks(this,e)},u.hc=function(){return!this.c&&(!this.b&&this.a.a!=null||this.a.b!=null)},u.ic=function(){if(!this.c&&!this.b&&this.a.a!=null)return this.b=!0,this.a.a;if(!this.c&&this.a.b!=null)return this.c=!0,this.a.b;throw K(new J)},u.jc=function(){throw this.c&&this.a.b!=null?this.a.b=null:this.b&&this.a.a!=null&&(this.a.a=null),K(new na)},u.b=!1,u.c=!1;var GGe=A(Rh,"Pair/1",859);T(404,1,{404:1},C4t),u.Fb=function(e){return uu(this.a,a(e,404).a)&&uu(this.c,a(e,404).c)&&uu(this.d,a(e,404).d)&&uu(this.b,a(e,404).b)},u.Hb=function(){return sq(Y(Z(un,1),te,1,5,[this.a,this.c,this.d,this.b]))},u.Ib=function(){return"("+this.a+Rc+this.c+Rc+this.d+Rc+this.b+")"};var WGe=A(Rh,"Quadruple",404);T(957,244,N_,I3),u.Ae=function(e,n){var i,r,c,l,f;if(di(n,"Random Layout",1),(!e.a&&(e.a=new Wt(zr,e,10,11)),e.a).i==0){Vn(n);return}l=a(cn(e,(mut(),HVt)),21),l&&l.a!=0?c=new lN(l.a):c=new kq,i=lt(Yt(cn(e,zVt))),f=lt(Yt(cn(e,GVt))),r=a(cn(e,jVt),119),Z2e(e,c,i,f,r),Vn(n)};var $Ge=A(Rh,"RandomLayoutProvider",957);T(490,1,{}),u.Qe=function(){return new We(this.f.i,this.f.j)},u.xe=function(e){return W4t(e,(dr(),iu))?cn(this.f,qVt):cn(this.f,e)},u.Re=function(){return new We(this.f.g,this.f.f)},u.Se=function(){return this.g},u.ye=function(e){return mV(this.f,e)},u.Te=function(e){th(this.f,e.a),eh(this.f,e.b)},u.Ue=function(e){o_(this.f,e.a),s_(this.f,e.b)},u.Ve=function(e){this.g=e},u.g=0;var qVt,VGe=A(r6,"ElkGraphAdapters/AbstractElkGraphElementAdapter",490);T(491,1,{741:1},hT),u.We=function(){var e,n;if(!this.b)for(this.b=cN(j$(this.a).i),n=new $n(j$(this.a));n.e!=n.i._b();)e=a(ci(n),137),Ut(this.b,new $G(e));return this.b},u.b=null;var qGe=A(r6,"ElkGraphAdapters/ElkEdgeAdapter",491);T(562,490,{},WG),u.Xe=function(){return zRt(this)},u.a=null;var XGe=A(r6,"ElkGraphAdapters/ElkGraphAdapter",562);T(564,490,{271:1},$G);var ZGe=A(r6,"ElkGraphAdapters/ElkLabelAdapter",564);T(563,490,{739:1},VW),u.We=function(){return ope(this)},u.$e=function(){var e;return e=a(cn(this.f,(dr(),SF)),135),!e&&(e=new c2),e},u.af=function(){return cpe(this)},u.cf=function(e){var n;n=new u$(e),ga(this.f,(dr(),SF),n)},u.df=function(e){ga(this.f,(dr(),ay),new jst(e))},u.Ye=function(){return this.d},u.Ze=function(){var e,n;if(!this.a)for(this.a=new Dt,n=Rn(EP(a(this.f,35)));Jn(n);)e=a(In(n),105),Ut(this.a,new hT(e));return this.a},u._e=function(){var e,n;if(!this.c)for(this.c=new Dt,n=Rn(Af(a(this.f,35)));Jn(n);)e=a(In(n),105),Ut(this.c,new hT(e));return this.c},u.bf=function(){return Jot(a(this.f,35)).i!=0||lt(de(a(this.f,35).xe((dr(),EF))))},u.a=null,u.b=null,u.c=null,u.d=null,u.e=null;var YGe=A(r6,"ElkGraphAdapters/ElkNodeAdapter",563);T(997,490,{740:1},s9),u.We=function(){return gpe(this)},u.Ze=function(){var e,n;if(!this.a)for(this.a=od(a(this.f,121).Tf().i),n=new $n(a(this.f,121).Tf());n.e!=n.i._b();)e=a(ci(n),105),Ut(this.a,new hT(e));return this.a},u._e=function(){var e,n;if(!this.c)for(this.c=od(a(this.f,121).Uf().i),n=new $n(a(this.f,121).Uf());n.e!=n.i._b();)e=a(ci(n),105),Ut(this.c,new hT(e));return this.c},u.ef=function(){return a(a(this.f,121).xe((dr(),gA)),69)},u.ff=function(){var e,n,i,r,c,l,f,g;for(r=Tf(a(this.f,121)),i=new $n(a(this.f,121).Uf());i.e!=i.i._b();)for(e=a(ci(i),105),g=new $n((!e.c&&(e.c=new pn(Si,e,5,8)),e.c));g.e!=g.i._b();){if(f=a(ci(g),97),vC(zc(f),r))return!0;if(zc(f)==r&<(de(cn(e,(dr(),DQ)))))return!0}for(n=new $n(a(this.f,121).Tf());n.e!=n.i._b();)for(e=a(ci(n),105),l=new $n((!e.b&&(e.b=new pn(Si,e,4,7)),e.b));l.e!=l.i._b();)if(c=a(ci(l),97),vC(zc(c),r))return!0;return!1},u.a=null,u.b=null,u.c=null;var KGe=A(r6,"ElkGraphAdapters/ElkPortAdapter",997);T(265,23,{3:1,34:1,23:1,265:1},Z9);var kd,ag,lI,hI,XVt=Ri(Spt,"LabelSide",265,ji,Wce,ere),ZVt;T(676,1,{},R3),u.td=function(e){G7t(a(e,739),!0,!1)};var JGe=A(Spt,"NodeLabelAndSizeCalculator/lambda$0$Type",676);T(571,1,{},M5),u.b=!0,u.c=!0,u.d=!0,u.e=!0;var QGe=A(Spt,kBt,571);T(171,1,{171:1}),u.j=!1,u.k=!1;var YVt=A(d0,"Cell",171);T(114,171,{114:1,171:1},xTt),u.Pf=function(){return PD(this)},u.Qf=function(){var e;return e=this.n,this.a.a+e.b+e.c};var tWe=A(d0,"AtomicCell",114);T(203,23,{3:1,34:1,23:1,203:1},TW);var lc,ta,hc,Dw=Ri(d0,"ContainerArea",203,ji,oce,nre),KVt;T(307,171,LFt);var eWe=A(d0,"ContainerCell",307);T(1179,307,LFt,OIt),u.Pf=function(){var e;return e=0,this.e?this.b?e=this.b.b:this.a[1][1]&&(e=this.a[1][1].Pf()):e=iut(this,jRt(this,!0)),e>0?e+this.n.d+this.n.a:0},u.Qf=function(){var e,n,i,r,c;if(c=0,this.e)this.b?c=this.b.a:this.a[1][1]&&(c=this.a[1][1].Qf());else if(this.g)c=iut(this,rX(this,null,!0));else for(n=(Ch(),Y(Z(Dw,1),jt,203,0,[lc,ta,hc])),i=0,r=n.length;i0?c+this.n.b+this.n.c:0},u.Rf=function(){var e,n,i,r,c;if(this.g)for(e=rX(this,null,!1),i=(Ch(),Y(Z(Dw,1),jt,203,0,[lc,ta,hc])),r=0,c=i.length;r0&&(r[0]+=this.d,i-=r[0]),r[2]>0&&(r[2]+=this.d,i-=r[2]),this.c.a=y.Math.max(0,i),this.c.d=n.d+e.d+(this.c.a-i)/2,r[1]=y.Math.max(r[1],i),Rct(this,ta,n.d+e.d+r[0]-(r[1]-i)/2,r)},u.b=null,u.d=0,u.e=!1,u.f=!1,u.g=!1;var QQ=0,BF=0,nWe=A(d0,"GridContainerCell",1179);T(419,23,{3:1,34:1,23:1,419:1},CW);var lb,jf,fh,JVt=Ri(d0,"HorizontalLabelAlignment",419,ji,nce,ire),QVt;T(267,171,{171:1,267:1},uAt,FLt,rAt),u.Pf=function(){return b$(this)},u.Qf=function(){return LD(this)},u.a=0,u.c=!1;var Q3e=A(d0,"LabelCell",267);T(219,307,{171:1,307:1,219:1},jC),u.Pf=function(){return _P(this)},u.Qf=function(){return yP(this)},u.Rf=function(){VX(this)},u.Sf=function(){qX(this)},u.b=0,u.c=0,u.d=!1;var iWe=A(d0,"StripContainerCell",219);T(1394,1,us,yz),u.Nb=function(e){return!!a(e,171)&&a(e,171).k};var rWe=A(d0,"StripContainerCell/lambda$0$Type",1394);T(1395,1,{},Lg),u.oe=function(e){return a(e,171).Qf()};var sWe=A(d0,"StripContainerCell/lambda$1$Type",1395);T(1396,1,us,Ok),u.Nb=function(e){return!!a(e,171)&&a(e,171).j};var oWe=A(d0,"StripContainerCell/lambda$2$Type",1396);T(1397,1,{},xv),u.oe=function(e){return a(e,171).Pf()};var cWe=A(d0,"StripContainerCell/lambda$3$Type",1397);T(420,23,{3:1,34:1,23:1,420:1},AW);var dh,hb,Fh,tqt=Ri(d0,"VerticalLabelAlignment",420,ji,ice,rre),eqt;T(697,1,{},$ht),u.c=0,u.d=0,u.k=0,u.s=0,u.u=0,u.B=!1;var aWe=A(AO,"NodeContext",697);T(1177,1,jr,TR),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return LEt(a(e,69),a(n,69))};var uWe=A(AO,"NodeContext/0methodref$comparePortSides$Type",1177);T(1178,1,jr,_z),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Z1e(a(e,111),a(n,111))};var lWe=A(AO,"NodeContext/1methodref$comparePortContexts$Type",1178);T(147,23,{3:1,34:1,23:1,147:1},Yu);var nqt,iqt,rqt,sqt,oqt,cqt,aqt,uqt,lqt,hqt,fqt,dqt,pqt,gqt,mqt,bqt,wqt,vqt,_qt,yqt,xqt,ttt,Mqt=Ri(AO,"NodeLabelLocation",147,ji,Uq,sre),Eqt;T(111,1,{111:1},n5t);var hWe=A(AO,"PortContext",111);T(1182,1,{},_p),u.oe=function(e){return a(e,111).c?LD(a(e,111).c):0};var fWe=A(wE,"HorizontalPortPlacementSizeCalculator/lambda$0$Type",1182);T(1184,1,{},xz),u.td=function(e){F3t(a(e,267))};var dWe=A(wE,"LabelPlacer/lambda$0$Type",1184);T(1185,1,us,CR),u.Nb=function(e){return!!a(e,111).c};var pWe=A(wE,"LabelPlacer/lambda$1$Type",1185);T(1186,1,{},AR),u.td=function(e){F3t(a(e,111).c)};var gWe=A(wE,"LabelPlacer/lambda$2$Type",1186),Bvt;T(1181,1,{},D3),u.td=function(e){Fg(),fit(a(e,111))};var mWe=A(wE,"NodeLabelAndSizeUtilities/lambda$0$Type",1181);T(698,1,{},Crt),u.td=function(e){RQt(this.a,this.b,e)},u.b=!1;var bWe=A(wE,"NodeLabelCellCreator/lambda$0$Type",698);T(1180,1,{},YH),u.td=function(e){Vt(this.a,e)};var wWe=A(wE,"PortContextCreator/lambda$0$Type",1180),FF;T(1183,1,{},Ab),u.oe=function(e){return a(e,111).c?b$(a(e,111).c):0};var vWe=A(wE,"VerticalPortPlacementSizeCalculator/lambda$0$Type",1183);T(1525,1,{},kR);var _We=A(vE,"GreedyRectangleStripOverlapRemover",1525);T(1526,1,jr,Mz),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Lee(a(e,194),a(n,194))};var yWe=A(vE,"GreedyRectangleStripOverlapRemover/0methodref$compareByYCoordinate$Type",1526);T(1497,1,{},Gxt),u.a=5,u.e=0;var xWe=A(vE,"RectangleStripOverlapRemover",1497);T(1498,1,jr,GS),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return Pee(a(e,194),a(n,194))};var MWe=A(vE,"RectangleStripOverlapRemover/0methodref$compareLeftRectangleBorders$Type",1498);T(1500,1,jr,Ez),u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)},u.Ld=function(e,n){return nse(a(e,194),a(n,194))};var EWe=A(vE,"RectangleStripOverlapRemover/1methodref$compareRightRectangleBorders$Type",1500);T(374,23,{3:1,34:1,23:1,374:1},Y9);var fI,ett,ntt,dI,Sqt=Ri(vE,"RectangleStripOverlapRemover/OverlapRemovalDirection",374,ji,Hce,ore),Tqt;T(194,1,{194:1},v$);var SWe=A(vE,"RectangleStripOverlapRemover/RectangleNode",194);T(1499,1,{},o9),u.td=function(e){npe(this.a,a(e,194))};var TWe=A(vE,"RectangleStripOverlapRemover/lambda$0$Type",1499),Nw=Sr(tl,"EObject"),$E=Sr(j_,PFt),sf=Sr(j_,IFt),pI=Sr(j_,RFt),gI=Sr(j_,"ElkShape"),Si=Sr(j_,DFt),Xs=Sr(j_,Cpt),os=Sr(j_,NFt),mI=Sr(tl,OFt),TA=Sr(tl,"EFactory"),Cqt,itt=Sr(tl,BFt),of=Sr(tl,"EPackage"),ms,Aqt,kqt,Fvt,UF,Lqt,Uvt,zvt,jvt,pp,Pqt,Iqt,ic=Sr(j_,Apt),zr=Sr(j_,kpt),Rl=Sr(j_,Lpt);T(87,1,FFt),u.cg=function(){return this.dg(),null},u.dg=function(){return null},u.eg=function(){return this.dg(),!1},u.fg=function(){return!1},u.gg=function(e){Bi(this,e)};var CWe=A(fx,"BasicNotifierImpl",87);T(92,87,zFt),u.Hg=function(){return Xl(this)},u.hg=function(e,n){return e},u.ig=function(){throw K(new Oi)},u.jg=function(e){var n;return n=jo(a(Ve(this.mg(),this.og()),17)),this.yg().Cg(this,n.n,n.f,e)},u.kg=function(e,n){throw K(new Oi)},u.lg=function(e,n,i){return Lu(this,e,n,i)},u.mg=function(){var e;return this.ig()&&(e=this.ig().pj(),e)?e:this.Rg()},u.ng=function(){return SX(this)},u.og=function(){throw K(new Oi)},u.pg=function(){var e,n;return n=this.Jg().qj(),!n&&this.ig().vj(n=(ST(),e=ect(q1(this.mg())),e==null?htt:new tL(this,e))),n},u.qg=function(e,n){return e},u.rg=function(e){var n;return n=e.Vi(),n?e.pi():xr(this.mg(),e)},u.sg=function(){var e;return e=this.ig(),e?e.sj():null},u.tg=function(){return this.ig()?this.ig().pj():null},u.ug=function(e,n,i){return d7(this,e,n,i)},u.vg=function(e){return AL(this,e)},u.wg=function(e,n){return Pct(this,e,n)},u.xg=function(){var e;return e=this.ig(),!!e&&e.tj()},u.yg=function(){throw K(new Oi)},u.zg=function(){return a7(this)},u.Ag=function(e,n,i,r){return j2(this,e,n,r)},u.Bg=function(e,n,i){var r;return r=a(Ve(this.mg(),n),61),r.aj().dj(this,this.Qg(),n-this.Sg(),e,i)},u.Cg=function(e,n,i,r){return tN(this,e,n,r)},u.Dg=function(e,n,i){var r;return r=a(Ve(this.mg(),n),61),r.aj().ej(this,this.Qg(),n-this.Sg(),e,i)},u.Eg=function(){return!!this.ig()&&(this.ig().rj(),!1)},u.Fg=function(e){return Hq(this,e)},u.Gg=function(e){var n;return n=this.rg(e),n>=0?this.Fg(n):yX(this,e)},u.Ig=function(e){return x7t(this,e)},u.Jg=function(){throw K(new Oi)},u.Kg=function(){return this.ig()?this.ig().rj():null},u.Lg=function(){return a7(this)},u.Mg=function(e,n){k7(this,e,n)},u.Ng=function(e){this.Jg().uj(e)},u.Og=function(e){this.Jg().wj(e)},u.Pg=function(e,n){var i,r,c,l;return l=this.sg(),l&&e&&(n=$s(l.fk(),this,n),l.jk(this)),r=this.yg(),r&&(FX(this,this.yg(),this.og()).Bb&ao?(c=r.zg(),c&&(e?!l&&c.jk(this):c.ik(this))):(n=(i=this.og(),i>=0?this.jg(n):this.yg().Cg(this,-1-i,null,n)),n=this.lg(null,-1,n))),this.Og(e),n},u.Qg=function(){return Yct(this)},u.Rg=function(){return(T1(),Ae).S},u.Sg=function(){return ei(this.Rg())},u.Ib=function(){return nh(this)};var AWe=A(Re,"BasicEObjectImpl",92),Rqt;T(107,92,{95:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1}),u.Tg=function(e){var n;return n=Zct(this),n[e]},u.Ug=function(e,n){var i;i=Zct(this),Vr(i,e,n)},u.Vg=function(e){var n;n=Zct(this),Vr(n,e,null)},u.cg=function(){return a(an(this,4),116)},u.dg=function(){throw K(new Oi)},u.eg=function(){return(this.Db&4)!=0},u.ig=function(){throw K(new Oi)},u.Wg=function(e){UC(this,2,e)},u.kg=function(e,n){this.Db=n<<16|this.Db&255,this.Wg(e)},u.mg=function(){return da(this)},u.og=function(){return this.Db>>16},u.pg=function(){var e,n;return ST(),n=ect(q1((e=a(an(this,16),24),e||this.Rg()))),n==null?htt:new tL(this,n)},u.fg=function(){return(this.Db&1)==0},u.sg=function(){return a(an(this,128),1628)},u.tg=function(){return a(an(this,16),24)},u.xg=function(){return(this.Db&32)!=0},u.yg=function(){return a(an(this,2),42)},u.Eg=function(){return(this.Db&64)!=0},u.Jg=function(){throw K(new Oi)},u.Kg=function(){return a(an(this,64),261)},u.Ng=function(e){UC(this,16,e)},u.Og=function(e){UC(this,128,e)},u.Qg=function(){return ra(this)},u.Db=0;var kWe=A(Re,"MinimalEObjectImpl",107);T(108,107,{95:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1}),u.Wg=function(e){this.Cb=e},u.yg=function(){return this.Cb};var LWe=A(Re,"MinimalEObjectImpl/Container",108);T(1676,108,{95:1,379:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1}),u.ve=function(e){return!this.o&&(this.o=new hu((Ic(),pp),ug,this,0)),dPt(this.o,e.p?e.p:(we(),we(),ap)),this},u.ug=function(e,n,i){return zut(this,e,n,i)},u.Dg=function(e,n,i){return _lt(this,e,n,i)},u.Fg=function(e){return act(this,e)},u.Mg=function(e,n){Bat(this,e,n)},u.Rg=function(){return Ic(),Iqt},u.we=function(){return fRt(this)},u.xe=function(e){return cn(this,e)},u.ye=function(e){return mV(this,e)},u.ze=function(e,n){return ga(this,e,n)};var PWe=A(p0,"EMapPropertyHolderImpl",1676);T(502,108,{95:1,531:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1},N3),u.ug=function(e,n,i){switch(e){case 0:return this.a;case 1:return this.b}return d7(this,e,n,i)},u.Fg=function(e){switch(e){case 0:return this.a!=0;case 1:return this.b!=0}return Hq(this,e)},u.Mg=function(e,n){switch(e){case 0:OV(this,lt(Yt(n)));return;case 1:BV(this,lt(Yt(n)));return}k7(this,e,n)},u.Rg=function(){return Ic(),Aqt},u.Ib=function(){var e;return this.Db&64?nh(this):(e=new ul(nh(this)),e.a+=" (x: ",Iv(e,this.a),e.a+=", y: ",Iv(e,this.b),e.a+=")",e.a)},u.a=0,u.b=0;var IWe=A(p0,"ElkBendPointImpl",502);T(651,1676,{95:1,379:1,253:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1}),u.ug=function(e,n,i){return Jat(this,e,n,i)},u.Bg=function(e,n,i){return hX(this,e,n,i)},u.Dg=function(e,n,i){return nq(this,e,n,i)},u.Fg=function(e){return Tat(this,e)},u.Mg=function(e,n){ilt(this,e,n)},u.Rg=function(){return Ic(),Lqt},u.Vf=function(){return j$(this)},u.Ib=function(){return Sq(this)},u.k=null;var RWe=A(p0,"ElkGraphElementImpl",651);T(652,651,{95:1,379:1,253:1,429:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1}),u.ug=function(e,n,i){return cut(this,e,n,i)},u.Fg=function(e){return fut(this,e)},u.Mg=function(e,n){rlt(this,e,n)},u.Rg=function(){return Ic(),Pqt},u.Wf=function(){return this.f},u.Xf=function(){return this.g},u.Yf=function(){return this.i},u.Zf=function(){return this.j},u.$f=function(e,n){iD(this,e,n)},u._f=function(e,n){Wd(this,e,n)},u.ag=function(e){th(this,e)},u.bg=function(e){eh(this,e)},u.Ib=function(){return dX(this)},u.f=0,u.g=0,u.i=0,u.j=0;var DWe=A(p0,"ElkShapeImpl",652);T(653,652,{95:1,379:1,97:1,253:1,429:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1}),u.ug=function(e,n,i){return Iut(this,e,n,i)},u.Bg=function(e,n,i){return Jut(this,e,n,i)},u.Dg=function(e,n,i){return Qut(this,e,n,i)},u.Fg=function(e){return Nat(this,e)},u.Mg=function(e,n){Xlt(this,e,n)},u.Rg=function(){return Ic(),kqt},u.Tf=function(){return!this.d&&(this.d=new pn(Xs,this,8,5)),this.d},u.Uf=function(){return!this.e&&(this.e=new pn(Xs,this,7,4)),this.e};var NWe=A(p0,"ElkConnectableShapeImpl",653);T(183,651,{95:1,379:1,105:1,253:1,183:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1},WS),u.jg=function(e){return Vut(this,e)},u.ug=function(e,n,i){switch(e){case 3:return nN(this);case 4:return!this.b&&(this.b=new pn(Si,this,4,7)),this.b;case 5:return!this.c&&(this.c=new pn(Si,this,5,8)),this.c;case 6:return!this.a&&(this.a=new Wt(os,this,6,6)),this.a;case 7:return me(),!this.b&&(this.b=new pn(Si,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new pn(Si,this,5,8)),this.c.i<=1));case 8:return me(),!!QC(this);case 9:return me(),!!Nm(this);case 10:return me(),!this.b&&(this.b=new pn(Si,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new pn(Si,this,5,8)),this.c.i!=0)}return Jat(this,e,n,i)},u.Bg=function(e,n,i){var r;switch(n){case 3:return this.Cb&&(i=(r=this.Db>>16,r>=0?Vut(this,i):this.Cb.Cg(this,-1-r,null,i))),bst(this,a(e,35),i);case 4:return!this.b&&(this.b=new pn(Si,this,4,7)),Kc(this.b,e,i);case 5:return!this.c&&(this.c=new pn(Si,this,5,8)),Kc(this.c,e,i);case 6:return!this.a&&(this.a=new Wt(os,this,6,6)),Kc(this.a,e,i)}return hX(this,e,n,i)},u.Dg=function(e,n,i){switch(n){case 3:return bst(this,null,i);case 4:return!this.b&&(this.b=new pn(Si,this,4,7)),$s(this.b,e,i);case 5:return!this.c&&(this.c=new pn(Si,this,5,8)),$s(this.c,e,i);case 6:return!this.a&&(this.a=new Wt(os,this,6,6)),$s(this.a,e,i)}return nq(this,e,n,i)},u.Fg=function(e){switch(e){case 3:return!!nN(this);case 4:return!!this.b&&this.b.i!=0;case 5:return!!this.c&&this.c.i!=0;case 6:return!!this.a&&this.a.i!=0;case 7:return!this.b&&(this.b=new pn(Si,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new pn(Si,this,5,8)),this.c.i<=1));case 8:return QC(this);case 9:return Nm(this);case 10:return!this.b&&(this.b=new pn(Si,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new pn(Si,this,5,8)),this.c.i!=0)}return Tat(this,e)},u.Mg=function(e,n){switch(e){case 3:ADt(this,a(n,35));return;case 4:!this.b&&(this.b=new pn(Si,this,4,7)),Dr(this.b),!this.b&&(this.b=new pn(Si,this,4,7)),Lr(this.b,a(n,13));return;case 5:!this.c&&(this.c=new pn(Si,this,5,8)),Dr(this.c),!this.c&&(this.c=new pn(Si,this,5,8)),Lr(this.c,a(n,13));return;case 6:!this.a&&(this.a=new Wt(os,this,6,6)),Dr(this.a),!this.a&&(this.a=new Wt(os,this,6,6)),Lr(this.a,a(n,13));return}ilt(this,e,n)},u.Rg=function(){return Ic(),Fvt},u.Ib=function(){return p7t(this)};var OWe=A(p0,"ElkEdgeImpl",183);T(405,1676,{95:1,379:1,270:1,405:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1},O3),u.jg=function(e){return Gut(this,e)},u.ug=function(e,n,i){switch(e){case 1:return this.j;case 2:return this.k;case 3:return this.b;case 4:return this.c;case 5:return!this.a&&(this.a=new Ss(sf,this,5)),this.a;case 6:return vAt(this);case 7:return n?qq(this):this.i;case 8:return n?Vq(this):this.f;case 9:return!this.g&&(this.g=new pn(os,this,9,10)),this.g;case 10:return!this.e&&(this.e=new pn(os,this,10,9)),this.e;case 11:return this.d}return zut(this,e,n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 6:return this.Cb&&(i=(c=this.Db>>16,c>=0?Gut(this,i):this.Cb.Cg(this,-1-c,null,i))),wst(this,a(e,105),i);case 9:return!this.g&&(this.g=new pn(os,this,9,10)),Kc(this.g,e,i);case 10:return!this.e&&(this.e=new pn(os,this,10,9)),Kc(this.e,e,i)}return l=a(Ve((r=a(an(this,16),24),r||(Ic(),UF)),n),61),l.aj().dj(this,ra(this),n-ei((Ic(),UF)),e,i)},u.Dg=function(e,n,i){switch(n){case 5:return!this.a&&(this.a=new Ss(sf,this,5)),$s(this.a,e,i);case 6:return wst(this,null,i);case 9:return!this.g&&(this.g=new pn(os,this,9,10)),$s(this.g,e,i);case 10:return!this.e&&(this.e=new pn(os,this,10,9)),$s(this.e,e,i)}return _lt(this,e,n,i)},u.Fg=function(e){switch(e){case 1:return this.j!=0;case 2:return this.k!=0;case 3:return this.b!=0;case 4:return this.c!=0;case 5:return!!this.a&&this.a.i!=0;case 6:return!!vAt(this);case 7:return!!this.i;case 8:return!!this.f;case 9:return!!this.g&&this.g.i!=0;case 10:return!!this.e&&this.e.i!=0;case 11:return this.d!=null}return act(this,e)},u.Mg=function(e,n){switch(e){case 1:MC(this,lt(Yt(n)));return;case 2:EC(this,lt(Yt(n)));return;case 3:xC(this,lt(Yt(n)));return;case 4:yC(this,lt(Yt(n)));return;case 5:!this.a&&(this.a=new Ss(sf,this,5)),Dr(this.a),!this.a&&(this.a=new Ss(sf,this,5)),Lr(this.a,a(n,13));return;case 6:Rbe(this,a(n,105));return;case 7:gat(this,a(n,97));return;case 8:pat(this,a(n,97));return;case 9:!this.g&&(this.g=new pn(os,this,9,10)),Dr(this.g),!this.g&&(this.g=new pn(os,this,9,10)),Lr(this.g,a(n,13));return;case 10:!this.e&&(this.e=new pn(os,this,10,9)),Dr(this.e),!this.e&&(this.e=new pn(os,this,10,9)),Lr(this.e,a(n,13));return;case 11:pPt(this,hi(n));return}Bat(this,e,n)},u.Rg=function(){return Ic(),UF},u.Ib=function(){return N9t(this)},u.b=0,u.c=0,u.d=null,u.j=0,u.k=0;var BWe=A(p0,"ElkEdgeSectionImpl",405);T(142,108,{95:1,91:1,87:1,139:1,51:1,103:1,42:1,92:1,142:1,107:1,108:1}),u.ug=function(e,n,i){var r;return e==0?(!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab):Xu(this,e-ei(this.Rg()),Ve((r=a(an(this,16),24),r||this.Rg()),e),n,i)},u.Bg=function(e,n,i){var r,c;return n==0?(!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i)):(c=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),c.aj().dj(this,ra(this),n-ei(this.Rg()),e,i))},u.Dg=function(e,n,i){var r,c;return n==0?(!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i)):(c=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),c.aj().ej(this,ra(this),n-ei(this.Rg()),e,i))},u.Fg=function(e){var n;return e==0?!!this.Ab&&this.Ab.i!=0:Vu(this,e-ei(this.Rg()),Ve((n=a(an(this,16),24),n||this.Rg()),e))},u.Ig=function(e){return Zht(this,e)},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return}Ku(this,e-ei(this.Rg()),Ve((i=a(an(this,16),24),i||this.Rg()),e),n)},u.Og=function(e){UC(this,128,e)},u.Rg=function(){return ye(),Kqt},u.Xg=function(){this.Bb|=1},u.Yg=function(e){return s4(this,e)},u.Bb=0;var FWe=A(Re,"EModelElementImpl",142);T(638,142,{95:1,91:1,87:1,430:1,139:1,51:1,103:1,42:1,92:1,142:1,107:1,108:1},E8),u.Zg=function(e,n){return z7t(this,e,n)},u.$g=function(e){var n,i,r,c,l;if(this.a!=Zu(e)||e.Bb&256)throw K(new yn(XY+e.zb+Gm));for(r=Bo(e);kc(r.a).i!=0;){if(i=a(NP(r,0,(n=a(at(kc(r.a),0),84),l=n.c,ct(l,96)?a(l,24):(ye(),gh))),24),Im(i))return c=Zu(i).dh().$g(i),a(c,42).Ng(e),c;r=Bo(i)}return(e.D!=null?e.D:e.B)=="java.util.Map$Entry"?new xCt(e):new Qst(e)},u._g=function(e,n){return Bm(this,e,n)},u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.a}return Xu(this,e-ei((ye(),pb)),Ve((r=a(an(this,16),24),r||pb),e),n,i)},u.Bg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 1:return this.a&&(i=a(this.a,42).Cg(this,4,of,i)),qat(this,a(e,207),i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),pb)),n),61),c.aj().dj(this,ra(this),n-ei((ye(),pb)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 1:return qat(this,null,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),pb)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),pb)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return!!this.a}return Vu(this,e-ei((ye(),pb)),Ve((n=a(an(this,16),24),n||pb),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:Tge(this,a(n,207));return}Ku(this,e-ei((ye(),pb)),Ve((i=a(an(this,16),24),i||pb),e),n)},u.Rg=function(){return ye(),pb};var CA,Hvt,Dqt,UWe=A(Re,"EFactoryImpl",638);T(914,638,{95:1,1698:1,91:1,87:1,430:1,139:1,51:1,103:1,42:1,92:1,142:1,107:1,108:1},Pg),u.Zg=function(e,n){switch(e.Ni()){case 12:return a(n,166).Lf();case 13:return Yc(n);default:throw K(new yn(_E+e.be()+Gm))}},u.$g=function(e){var n,i,r,c,l,f,g,b;switch(e.G==-1&&(e.G=(n=Zu(e),n?Hp(n.bh(),e):-1)),e.G){case 4:return l=new $S,l;case 6:return f=new Mit,f;case 7:return g=new Eit,g;case 8:return r=new WS,r;case 9:return i=new N3,i;case 10:return c=new O3,c;case 11:return b=new Bk,b;default:throw K(new yn(XY+e.zb+Gm))}},u._g=function(e,n){switch(e.Ni()){case 13:case 12:return null;default:throw K(new yn(_E+e.be()+Gm))}};var zWe=A(p0,"ElkGraphFactoryImpl",914);T(399,142,{95:1,91:1,87:1,139:1,174:1,51:1,103:1,42:1,92:1,142:1,107:1,108:1}),u.pg=function(){var e,n;return n=(e=a(an(this,16),24),ect(q1(e||this.Rg()))),n==null?(ST(),ST(),htt):new VSt(this,n)},u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.be()}return Xu(this,e-ei(this.Rg()),Ve((r=a(an(this,16),24),r||this.Rg()),e),n,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null}return Vu(this,e-ei(this.Rg()),Ve((n=a(an(this,16),24),n||this.Rg()),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:this.ah(hi(n));return}Ku(this,e-ei(this.Rg()),Ve((i=a(an(this,16),24),i||this.Rg()),e),n)},u.Rg=function(){return ye(),Jqt},u.be=function(){return this.zb},u.ah=function(e){kh(this,e)},u.Ib=function(){return RC(this)},u.zb=null;var jWe=A(Re,"ENamedElementImpl",399);T(248,399,{95:1,91:1,87:1,139:1,174:1,51:1,207:1,103:1,42:1,92:1,142:1,248:1,107:1,108:1,613:1},G4t),u.jg=function(e){return XRt(this,e)},u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.yb;case 3:return this.xb;case 4:return this.sb;case 5:return!this.rb&&(this.rb=new Xv(this,cf,this)),this.rb;case 6:return!this.vb&&(this.vb=new mM(of,this,6,7)),this.vb;case 7:return n?this.Db>>16==7?a(this.Cb,207):null:_At(this)}return Xu(this,e-ei((ye(),A0)),Ve((r=a(an(this,16),24),r||A0),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 4:return this.sb&&(i=a(this.sb,42).Cg(this,1,TA,i)),Zat(this,a(e,430),i);case 5:return!this.rb&&(this.rb=new Xv(this,cf,this)),Kc(this.rb,e,i);case 6:return!this.vb&&(this.vb=new mM(of,this,6,7)),Kc(this.vb,e,i);case 7:return this.Cb&&(i=(c=this.Db>>16,c>=0?XRt(this,i):this.Cb.Cg(this,-1-c,null,i))),Lu(this,e,7,i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),A0)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),A0)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 4:return Zat(this,null,i);case 5:return!this.rb&&(this.rb=new Xv(this,cf,this)),$s(this.rb,e,i);case 6:return!this.vb&&(this.vb=new mM(of,this,6,7)),$s(this.vb,e,i);case 7:return Lu(this,null,7,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),A0)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),A0)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.yb!=null;case 3:return this.xb!=null;case 4:return!!this.sb;case 5:return!!this.rb&&this.rb.i!=0;case 6:return!!this.vb&&this.vb.i!=0;case 7:return!!_At(this)}return Vu(this,e-ei((ye(),A0)),Ve((n=a(an(this,16),24),n||A0),e))},u.Ig=function(e){var n;return n=Hbe(this,e),n||Zht(this,e)},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:kh(this,hi(n));return;case 2:VV(this,hi(n));return;case 3:$V(this,hi(n));return;case 4:ylt(this,a(n,430));return;case 5:!this.rb&&(this.rb=new Xv(this,cf,this)),Dr(this.rb),!this.rb&&(this.rb=new Xv(this,cf,this)),Lr(this.rb,a(n,13));return;case 6:!this.vb&&(this.vb=new mM(of,this,6,7)),Dr(this.vb),!this.vb&&(this.vb=new mM(of,this,6,7)),Lr(this.vb,a(n,13));return}Ku(this,e-ei((ye(),A0)),Ve((i=a(an(this,16),24),i||A0),e),n)},u.Rg=function(){return ye(),A0},u.Xg=function(){iX(this)},u.bh=function(){return!this.rb&&(this.rb=new Xv(this,cf,this)),this.rb},u.dh=function(){return this.sb},u.eh=function(){return this.ub},u.fh=function(){return this.xb},u.gh=function(){return this.yb},u.hh=function(e){this.ub=e},u.Ib=function(){var e;return this.Db&64?RC(this):(e=new ul(RC(this)),e.a+=" (nsURI: ",mo(e,this.yb),e.a+=", nsPrefix: ",mo(e,this.xb),e.a+=")",e.a)},u.xb=null,u.yb=null;var Nqt,HWe=A(Re,"EPackageImpl",248);T(506,248,{95:1,1702:1,506:1,91:1,87:1,139:1,174:1,51:1,207:1,103:1,42:1,92:1,142:1,248:1,107:1,108:1,613:1},Y9t),u.q=!1,u.r=!1;var Oqt=!1,GWe=A(p0,"ElkGraphPackageImpl",506);T(263,652,{95:1,379:1,253:1,137:1,429:1,263:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1},$S),u.jg=function(e){return Wut(this,e)},u.ug=function(e,n,i){switch(e){case 7:return yAt(this);case 8:return this.a}return cut(this,e,n,i)},u.Bg=function(e,n,i){var r;switch(n){case 7:return this.Cb&&(i=(r=this.Db>>16,r>=0?Wut(this,i):this.Cb.Cg(this,-1-r,null,i))),pot(this,a(e,253),i)}return hX(this,e,n,i)},u.Dg=function(e,n,i){return n==7?pot(this,null,i):nq(this,e,n,i)},u.Fg=function(e){switch(e){case 7:return!!yAt(this);case 8:return!le("",this.a)}return fut(this,e)},u.Mg=function(e,n){switch(e){case 7:NDt(this,a(n,253));return;case 8:cPt(this,hi(n));return}rlt(this,e,n)},u.Rg=function(){return Ic(),Uvt},u.Ib=function(){return z8t(this)},u.a="";var WWe=A(p0,"ElkLabelImpl",263);T(246,653,{95:1,379:1,97:1,253:1,35:1,429:1,246:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1},Mit),u.jg=function(e){return Zut(this,e)},u.ug=function(e,n,i){switch(e){case 9:return!this.c&&(this.c=new Wt(Rl,this,9,9)),this.c;case 10:return!this.a&&(this.a=new Wt(zr,this,10,11)),this.a;case 11:return io(this);case 12:return!this.b&&(this.b=new Wt(Xs,this,12,3)),this.b;case 13:return me(),!this.a&&(this.a=new Wt(zr,this,10,11)),this.a.i>0}return Iut(this,e,n,i)},u.Bg=function(e,n,i){var r;switch(n){case 9:return!this.c&&(this.c=new Wt(Rl,this,9,9)),Kc(this.c,e,i);case 10:return!this.a&&(this.a=new Wt(zr,this,10,11)),Kc(this.a,e,i);case 11:return this.Cb&&(i=(r=this.Db>>16,r>=0?Zut(this,i):this.Cb.Cg(this,-1-r,null,i))),Cst(this,a(e,35),i);case 12:return!this.b&&(this.b=new Wt(Xs,this,12,3)),Kc(this.b,e,i)}return Jut(this,e,n,i)},u.Dg=function(e,n,i){switch(n){case 9:return!this.c&&(this.c=new Wt(Rl,this,9,9)),$s(this.c,e,i);case 10:return!this.a&&(this.a=new Wt(zr,this,10,11)),$s(this.a,e,i);case 11:return Cst(this,null,i);case 12:return!this.b&&(this.b=new Wt(Xs,this,12,3)),$s(this.b,e,i)}return Qut(this,e,n,i)},u.Fg=function(e){switch(e){case 9:return!!this.c&&this.c.i!=0;case 10:return!!this.a&&this.a.i!=0;case 11:return!!io(this);case 12:return!!this.b&&this.b.i!=0;case 13:return!this.a&&(this.a=new Wt(zr,this,10,11)),this.a.i>0}return Nat(this,e)},u.Mg=function(e,n){switch(e){case 9:!this.c&&(this.c=new Wt(Rl,this,9,9)),Dr(this.c),!this.c&&(this.c=new Wt(Rl,this,9,9)),Lr(this.c,a(n,13));return;case 10:!this.a&&(this.a=new Wt(zr,this,10,11)),Dr(this.a),!this.a&&(this.a=new Wt(zr,this,10,11)),Lr(this.a,a(n,13));return;case 11:LDt(this,a(n,35));return;case 12:!this.b&&(this.b=new Wt(Xs,this,12,3)),Dr(this.b),!this.b&&(this.b=new Wt(Xs,this,12,3)),Lr(this.b,a(n,13));return}Xlt(this,e,n)},u.Rg=function(){return Ic(),zvt},u.Ib=function(){return _ht(this)};var $We=A(p0,"ElkNodeImpl",246);T(187,653,{95:1,379:1,97:1,253:1,121:1,429:1,187:1,93:1,91:1,87:1,51:1,103:1,42:1,92:1,107:1,108:1},Eit),u.jg=function(e){return $ut(this,e)},u.ug=function(e,n,i){return e==9?Tf(this):Iut(this,e,n,i)},u.Bg=function(e,n,i){var r;switch(n){case 9:return this.Cb&&(i=(r=this.Db>>16,r>=0?$ut(this,i):this.Cb.Cg(this,-1-r,null,i))),vst(this,a(e,35),i)}return Jut(this,e,n,i)},u.Dg=function(e,n,i){return n==9?vst(this,null,i):Qut(this,e,n,i)},u.Fg=function(e){return e==9?!!Tf(this):Nat(this,e)},u.Mg=function(e,n){switch(e){case 9:kDt(this,a(n,35));return}Xlt(this,e,n)},u.Rg=function(){return Ic(),jvt},u.Ib=function(){return MNt(this)};var VWe=A(p0,"ElkPortImpl",187),Bqt=Sr(qs,"BasicEMap/Entry");T(966,108,{95:1,38:1,91:1,87:1,134:1,51:1,103:1,42:1,92:1,107:1,108:1},Bk),u.Fb=function(e){return this===e},u.kc=function(){return this.b},u.Hb=function(){return lm(this)},u.kh=function(e){oPt(this,a(e,166))},u.ug=function(e,n,i){switch(e){case 0:return this.b;case 1:return this.c}return d7(this,e,n,i)},u.Fg=function(e){switch(e){case 0:return!!this.b;case 1:return this.c!=null}return Hq(this,e)},u.Mg=function(e,n){switch(e){case 0:oPt(this,a(n,166));return;case 1:sPt(this,n);return}k7(this,e,n)},u.Rg=function(){return Ic(),pp},u.ih=function(){var e;return this.a==-1&&(e=this.b,this.a=e?Yr(e):0),this.a},u.lc=function(){return this.c},u.jh=function(e){this.a=e},u.mc=function(e){var n;return n=this.c,sPt(this,e),n},u.Ib=function(){var e;return this.Db&64?nh(this):(e=new om,Ii(Ii(Ii(e,this.b?this.b.Lf():eu)," -> "),WT(this.c)),e.a)},u.a=-1,u.c=null;var ug=A(p0,"ElkPropertyToValueMapEntryImpl",966);T(876,1,{},Sz);var qWe=A(Ds,"JsonAdapter",876);T(186,54,rp,xf);var XWe=A(Ds,"JsonImportException",186);T(754,1,{},c8t);var ZWe=A(Ds,"JsonImporter",754);T(792,1,{},sEt);var YWe=A(Ds,"JsonImporter/lambda$0$Type",792);T(793,1,{},oEt);var KWe=A(Ds,"JsonImporter/lambda$1$Type",793);T(816,1,{},c9);var JWe=A(Ds,"JsonImporter/lambda$10$Type",816);T(818,1,{},KH);var QWe=A(Ds,"JsonImporter/lambda$11$Type",818);T(819,1,{},cEt),u.td=function(e){Qce(this.b,this.a,e)};var t$e=A(Ds,"JsonImporter/lambda$12$Type",819);T(820,1,{},aEt);var e$e=A(Ds,"JsonImporter/lambda$13$Type",820);T(821,1,{},uEt);var n$e=A(Ds,"JsonImporter/lambda$14$Type",821);T(822,1,{},JH);var i$e=A(Ds,"JsonImporter/lambda$15$Type",822);T(823,1,{},QH);var r$e=A(Ds,"JsonImporter/lambda$16$Type",823);T(824,1,{},tG);var s$e=A(Ds,"JsonImporter/lambda$17$Type",824);T(825,1,{},n2);var o$e=A(Ds,"JsonImporter/lambda$18$Type",825);T(756,1,{},eG);var c$e=A(Ds,"JsonImporter/lambda$19$Type",756);T(794,1,{},nG);var a$e=A(Ds,"JsonImporter/lambda$2$Type",794);T(829,1,{},KTt);var u$e=A(Ds,"JsonImporter/lambda$20$Type",829);T(830,1,{},iG),u.td=function(e){tae(this.a,e)};var l$e=A(Ds,"JsonImporter/lambda$21$Type",830);T(795,1,{},rG);var h$e=A(Ds,"JsonImporter/lambda$22$Type",795);T(796,1,{},sG);var f$e=A(Ds,"JsonImporter/lambda$23$Type",796);T(798,1,{},a9);var d$e=A(Ds,"JsonImporter/lambda$24$Type",798);T(799,1,{},u9);var p$e=A(Ds,"JsonImporter/lambda$25$Type",799);T(801,1,{},oG);var g$e=A(Ds,"JsonImporter/lambda$26$Type",801);T(809,1,{},P4t);var m$e=A(Ds,"JsonImporter/lambda$27$Type",809);T(811,1,{},cG);var b$e=A(Ds,"JsonImporter/lambda$28$Type",811);T(812,1,{},aG);var w$e=A(Ds,"JsonImporter/lambda$29$Type",812);T(797,1,{},uG);var v$e=A(Ds,"JsonImporter/lambda$3$Type",797);T(814,1,{},lG);var _$e=A(Ds,"JsonImporter/lambda$30$Type",814);T(815,1,{},hG);var y$e=A(Ds,"JsonImporter/lambda$31$Type",815);T(817,1,{},fG);var x$e=A(Ds,"JsonImporter/lambda$32$Type",817);T(826,1,{},dG),u.td=function(e){eae(this.a,e)};var M$e=A(Ds,"JsonImporter/lambda$33$Type",826);T(827,1,{},lEt),u.td=function(e){Pte(this.a,this.b,e)};var E$e=A(Ds,"JsonImporter/lambda$34$Type",827);T(828,1,{},hEt),u.td=function(e){Ite(this.a,this.b,e)};var S$e=A(Ds,"JsonImporter/lambda$35$Type",828);T(805,1,{},fEt);var T$e=A(Ds,"JsonImporter/lambda$36$Type",805);T(806,1,{},dEt);var C$e=A(Ds,"JsonImporter/lambda$37$Type",806);T(807,1,{},mEt);var A$e=A(Ds,"JsonImporter/lambda$38$Type",807);T(808,1,{},bEt);var k$e=A(Ds,"JsonImporter/lambda$39$Type",808);T(800,1,{},pG);var L$e=A(Ds,"JsonImporter/lambda$4$Type",800);T(802,1,{},gG);var P$e=A(Ds,"JsonImporter/lambda$5$Type",802);T(803,1,{},pEt);var I$e=A(Ds,"JsonImporter/lambda$6$Type",803);T(804,1,{},gEt);var R$e=A(Ds,"JsonImporter/lambda$7$Type",804);T(810,1,{},I4t);var D$e=A(Ds,"JsonImporter/lambda$8$Type",810);T(813,1,{},mG);var N$e=A(Ds,"JsonImporter/lambda$9$Type",813);T(864,1,{},bG),u.td=function(e){T2(this.a,new E2(hi(e)))};var O$e=A(Ds,"JsonMetaDataConverter/lambda$0$Type",864);T(865,1,{},wG),u.td=function(e){Ese(this.a,e)};var B$e=A(Ds,"JsonMetaDataConverter/lambda$1$Type",865);T(866,1,{},vG),u.td=function(e){Noe(this.a,e)};var F$e=A(Ds,"JsonMetaDataConverter/lambda$2$Type",866);T(867,1,{},_G),u.td=function(e){Mse(this.a,e)};var U$e=A(Ds,"JsonMetaDataConverter/lambda$3$Type",867);T(229,23,{3:1,34:1,23:1,229:1},v2);var zF,jF,rtt,HF,GF,WF,stt,ott,$F=Ri(qP,"GraphFeature",229,ji,Due,cre),Fqt;T(16,1,{34:1,166:1},kr,es,bn,xc),u.vd=function(e){return hee(this,a(e,166))},u.Fb=function(e){return W4t(this,e)},u.Of=function(){return Xe(this)},u.Lf=function(){return this.b},u.Hb=function(){return j1(this.b)},u.Ib=function(){return this.b};var z$e=A(qP,"Property",16);T(727,1,jr,l9),u.Ld=function(e,n){return jhe(this,a(e,93),a(n,93))},u.Fb=function(e){return this===e},u.Md=function(){return new _r(this)};var j$e=A(qP,"PropertyHolderComparator",727),Gvt=Sr(qs,"EList");T(59,41,{20:1,25:1,41:1,13:1,15:1,59:1,52:1}),u.bd=function(e,n){JL(this,e,n)},u.nc=function(e){return ni(this,e)},u.oc=function(e){return Lr(this,e)},u.oh=function(){return new x2(this)},u.ph=function(){return new Q5(this)},u.qh=function(e){return jL(this,e)},u.rh=function(){return!0},u.sh=function(e,n){},u.th=function(){},u.uh=function(e,n){wV(this,e,n)},u.vh=function(e,n){},u.wh=function(e,n,i){},u.Fb=function(e){return cNt(this,e)},u.Hb=function(){return kat(this)},u.xh=function(){return!1},u.tc=function(){return new $n(this)},u.ed=function(){return new XT(this)},u.fd=function(e){var n;if(n=this._b(),e<0||e>n)throw K(new Wv(e,n));return new A$(this,e)},u.vc=function(e){return kV(this,e)},u.zh=function(e,n){return n},u.hd=function(e,n){return H2(this,e,n)},u.Ib=function(){return uut(this)},u.Bh=function(){return!0},u.Ch=function(e,n){return kC(this,n)};var H$e=A(qs,"AbstractEList",59);T(55,59,Nf,J0,n_,Mat),u.lh=function(e){return NRt(this,e)},u.mh=function(e,n){tP(this,e,n)},u.nh=function(e){SL(this,e)},u.Dh=function(e){return Wct(this,e)},u.Pb=function(){gC(this)},u.pc=function(e){return XC(this,e)},u.cd=function(e){return at(this,e)},u.Eh=function(e){rRt(this,e)},u.dd=function(e){return qRt(this,e)},u.Wb=function(){return this.i==0},u.Fh=function(e){return dt(un,te,1,e,5,1)},u.yh=function(e){return this.g[e]},u.gd=function(e){return G2(this,e)},u.Ah=function(e,n){return AV(this,e,n)},u._b=function(){return this.i},u.yc=function(){return fct(this)},u.zc=function(e){return gut(this,e)},u.i=0;var Wvt=A(qs,"BasicEList",55),$vt=Sr(qs,"TreeIterator");T(629,55,iK),u.gc=function(e){ks(this,e)},u.hc=function(){return this.g==null&&!this.c?Wot(this):this.g==null||this.i!=0&&a(this.g[this.i-1],43).hc()},u.ic=function(){return I7(this)},u.jc=function(){if(!this.e)throw K(new yc("There is no valid object to remove."));this.e.jc()},u.c=!1;var G$e=A(qs,"AbstractTreeIterator",629);T(621,629,iK,Nrt),u.Gh=function(e){var n;return n=a(e,51).pg().tc(),ct(n,260)&&a(n,260).Zj(new LR),n};var W$e=A(rK,"ElkGraphUtil/PropertiesSkippingTreeIterator",621);T(868,1,{},LR);var $$e=A(rK,"ElkGraphUtil/PropertiesSkippingTreeIterator/1",868),bI,ctt,wI=A(rK,"ElkReflect",null);T(784,1,z_,VS),u.Nf=function(e){return dN(),Bae(a(e,185))};var V$e=A(rK,"ElkReflect/lambda$0$Type",784),Ow,q$e=Sr(qs,"ResourceLocator");T(953,1,{});var X$e=A(qs,"DelegatingResourceLocator",953);T(954,953,{});var Z$e=A("org.eclipse.emf.common","EMFPlugin",954),att=Sr(vUt,"Adapter"),tMe=Sr(vUt,"Notification");T(1016,1,Ypt),u.Hh=function(){return this.d},u.Ih=function(e){},u.Jh=function(e){this.d=e},u.Kh=function(e){this.d==e&&(this.d=null)},u.d=null;var Y$e=A(fx,"AdapterImpl",1016);T(1688,59,_Ut),u.lh=function(e){var n,i,r;if(++this.j,e.Wb())return!1;for(n=this.hi(),r=e.tc();r.hc();)i=r.ic(),this.Wh(this.Ch(n,i)),++n;return!0},u.mh=function(e,n){sTt(this,e,n)},u.nh=function(e){c4t(this,e)},u.Uh=function(){return this.Xh()},u.Pb=function(){rL(this,this.hi(),this.ii())},u.pc=function(e){return this.Zh(e)},u.qc=function(e){return this.$h(e)},u.Vh=function(e,n){this.ei().tl()},u.Wh=function(e){this.ei().tl()},u.Xh=function(){return this.ei()},u.Yh=function(){this.ei().tl()},u.Zh=function(e){return this.ei().tl()},u.$h=function(e){return this.ei().tl()},u._h=function(e){return this.ei().tl()},u.ai=function(e){return this.ei().tl()},u.bi=function(){return this.ei().tl()},u.ci=function(e){return this.ei().tl()},u.di=function(){return this.ei().tl()},u.fi=function(e){return this.ei().tl()},u.gi=function(e,n){return this.ei().tl()},u.hi=function(){return this.ei().tl()},u.ii=function(){return this.ei().tl()},u.ji=function(e){return this.ei().tl()},u.ki=function(){return this.ei().tl()},u.Fb=function(e){return this._h(e)},u.cd=function(e){return this.zh(e,this.ai(e))},u.Hb=function(){return this.bi()},u.dd=function(e){return this.ci(e)},u.Wb=function(){return this.di()},u.yh=function(e){return this.ai(e)},u.gd=function(e){return DD(this,e)},u.vc=function(e){var n;return n=this.dd(e),n>=0?(this.gd(n),!0):!1},u.Ah=function(e,n){return this.gi(e,this.Ch(e,n))},u._b=function(){return this.hi()},u.yc=function(){return this.ii()},u.zc=function(e){return this.ji(e)},u.Ib=function(){return this.ki()};var K$e=A(qs,"DelegatingEList",1688);T(1689,1688,_Ut),u.li=function(e,n){return Pht(this,e,n)},u.lh=function(e){return this.li(this.hi(),e)},u.mh=function(e,n){K9t(this,e,n)},u.nh=function(e){G9t(this,e)},u.rh=function(){return!this.qi()},u.Pb=function(){X7(this)},u.mi=function(e,n,i,r,c){return new Q4t(this,e,n,i,r,c)},u.ni=function(e){Bi(this.Oh(),e)},u.oi=function(){return null},u.pi=function(){return-1},u.Oh=function(){return null},u.qi=function(){return!1},u.ri=function(e,n){return n},u.si=function(e,n){return n},u.ti=function(){return!1},u.ui=function(){return!this.di()},u.gd=function(e){var n,i,r,c;return this.ti()?(r=this.ui(),n=this.mi(4,c=DD(this,e),null,e,r),this.qi()&&c?(i=this.si(c,null),i?(i.Sh(n),i.Th()):this.ni(n)):this.ni(n),c):(c=DD(this,e),this.qi()&&c&&(i=this.si(c,null),i&&i.Th()),c)},u.Ah=function(e,n){return GNt(this,e,n)};var J$e=A(fx,"DelegatingNotifyingListImpl",1689);T(136,1,o6),u.Sh=function(e){return clt(this,e)},u.Th=function(){SV(this)},u.Lh=function(){return this.d},u.oi=function(){return null},u.vi=function(){return null},u.Mh=function(e){return-1},u.Nh=function(){return UDt(this)},u.Oh=function(){return null},u.Ph=function(){return oht(this)},u.Qh=function(){return this.o<0?this.o<-2?-2-this.o-1:-1:this.o},u.wi=function(){return!1},u.Rh=function(e){var n,i,r,c,l,f,g,b,v,M,k;switch(this.d){case 1:case 2:switch(c=e.Lh(),c){case 1:case 2:if(l=e.Oh(),zt(l)===zt(this.Oh())&&this.Mh(null)==e.Mh(null))return this.g=e.Nh(),e.Lh()==1&&(this.d=1),!0}case 4:{switch(c=e.Lh(),c){case 4:{if(l=e.Oh(),zt(l)===zt(this.Oh())&&this.Mh(null)==e.Mh(null))return v=Wht(this),b=this.o<0?this.o<-2?-2-this.o-1:-1:this.o,f=e.Qh(),this.d=6,k=new n_(2),b<=f?(ni(k,this.n),ni(k,e.Ph()),this.g=Y(Z(Gn,1),pi,22,15,[this.o=b,f+1])):(ni(k,e.Ph()),ni(k,this.n),this.g=Y(Z(Gn,1),pi,22,15,[this.o=f,b])),this.n=k,v||(this.o=-2-this.o-1),!0;break}}break}case 6:{switch(c=e.Lh(),c){case 4:{if(l=e.Oh(),zt(l)===zt(this.Oh())&&this.Mh(null)==e.Mh(null)){for(v=Wht(this),f=e.Qh(),M=a(this.g,37),r=dt(Gn,pi,22,M.length+1,15,1),n=0;n>>0).toString(16)),i.a+=" (eventType: ",this.d){case 1:{i.a+="SET";break}case 2:{i.a+="UNSET";break}case 3:{i.a+="ADD";break}case 5:{i.a+="ADD_MANY";break}case 4:{i.a+="REMOVE";break}case 6:{i.a+="REMOVE_MANY";break}case 7:{i.a+="MOVE";break}case 8:{i.a+="REMOVING_ADAPTER";break}case 9:{i.a+="RESOLVE";break}default:{ZG(i,this.d);break}}if(kNt(this)&&(i.a+=", touch: true"),i.a+=", position: ",ZG(i,this.o<0?this.o<-2?-2-this.o-1:-1:this.o),i.a+=", notifier: ",PT(i,this.Oh()),i.a+=", feature: ",PT(i,this.oi()),i.a+=", oldValue: ",PT(i,oht(this)),i.a+=", newValue: ",this.d==6&&ct(this.g,37)){for(n=a(this.g,37),i.a+="[",e=0;e10?((!this.b||this.c.j!=this.a)&&(this.b=new fL(this),this.a=this.j),AT(this.b,e)):XC(this,e)},u.Bh=function(){return!0},u.a=0;var sVe=A(qs,"AbstractEList/1",869);T(295,79,zZ,Wv);var oVe=A(qs,"AbstractEList/BasicIndexOutOfBoundsException",295);T(36,1,Cs,$n),u.gc=function(e){ks(this,e)},u.Bi=function(){if(this.i.j!=this.f)throw K(new C)},u.Ci=function(){return ci(this)},u.hc=function(){return this.e!=this.i._b()},u.ic=function(){return this.Ci()},u.jc=function(){VC(this)},u.e=0,u.f=0,u.g=-1;var cVe=A(qs,"AbstractEList/EIterator",36);T(296,36,kf,XT,A$),u.jc=function(){VC(this)},u.Bc=function(e){kIt(this,e)},u.Di=function(){var e;try{return e=this.d.cd(--this.e),this.Bi(),this.g=this.e,e}catch(n){throw n=vr(n),ct(n,79)?(this.Bi(),K(new J)):K(n)}},u.Ei=function(e){TRt(this,e)},u.Cc=function(){return this.e!=0},u.Dc=function(){return this.e},u.Ec=function(){return this.Di()},u.Fc=function(){return this.e-1},u.Gc=function(e){this.Ei(e)};var aVe=A(qs,"AbstractEList/EListIterator",296);T(324,36,Cs,x2),u.Ci=function(){return Fq(this)},u.jc=function(){throw K(new Oi)};var uVe=A(qs,"AbstractEList/NonResolvingEIterator",324);T(355,296,kf,Q5,Ust),u.Bc=function(e){throw K(new Oi)},u.Ci=function(){var e;try{return e=this.c.yh(this.e),this.Bi(),this.g=this.e++,e}catch(n){throw n=vr(n),ct(n,79)?(this.Bi(),K(new J)):K(n)}},u.Di=function(){var e;try{return e=this.c.yh(--this.e),this.Bi(),this.g=this.e,e}catch(n){throw n=vr(n),ct(n,79)?(this.Bi(),K(new J)):K(n)}},u.jc=function(){throw K(new Oi)},u.Gc=function(e){throw K(new Oi)};var lVe=A(qs,"AbstractEList/NonResolvingEListIterator",355);T(1673,59,yUt),u.lh=function(e){var n,i,r,c,l,f,g,b,v;if(r=e._b(),r!=0){for(b=(i=a(an(this.a,4),116),i==null?0:i.length),v=b+r,n=jat(this,v),g=e.tc(),l=b;li)throw K(new Wv(e,i));return new v4t(this,e)},u.Pb=function(){var e,n;++this.j,e=a(an(this.a,4),116),n=e==null?0:e.length,uP(this,null),wV(this,n,e)},u.pc=function(e){var n,i,r,c;if(n=a(an(this.a,4),116),n!=null){if(e!=null){for(r=0,c=n.length;r=i)throw K(new Wv(e,i));return n[e]},u.dd=function(e){var n,i,r;if(n=a(an(this.a,4),116),n!=null){if(e!=null){for(i=0,r=n.length;ii)throw K(new Wv(e,i));return new w4t(this,e)},u.yh=function(e){return a(an(this.a,4),116)[e]},u.gd=function(e){return ame(this,e)},u.Ah=function(e,n){var i,r;return i=qfe(this),r=i[e],jrt(i,e,kC(this,n)),uP(this,i),r},u._b=function(){var e;return e=a(an(this.a,4),116),e==null?0:e.length},u.yc=function(){var e,n,i;return e=a(an(this.a,4),116),i=e==null?0:e.length,n=dt(att,aK,380,i,0,1),i>0&&Aa(e,0,n,0,i),n},u.zc=function(e){var n,i,r;return n=a(an(this.a,4),116),r=n==null?0:n.length,r>0&&(e.lengthr&&Vr(e,r,null),e};var Uqt,hVe=A(qs,"ArrayDelegatingEList",1673);T(927,36,Cs,t5t),u.Bi=function(){if(this.b.j!=this.f||zt(a(an(this.b.a,4),116))!==zt(this.a))throw K(new C)},u.jc=function(){VC(this),this.a=a(an(this.b.a,4),116)};var fVe=A(qs,"ArrayDelegatingEList/EIterator",927);T(640,296,kf,WCt,w4t),u.Bi=function(){if(this.b.j!=this.f||zt(a(an(this.b.a,4),116))!==zt(this.a))throw K(new C)},u.Ei=function(e){TRt(this,e),this.a=a(an(this.b.a,4),116)},u.jc=function(){VC(this),this.a=a(an(this.b.a,4),116)};var dVe=A(qs,"ArrayDelegatingEList/EListIterator",640);T(928,324,Cs,e5t),u.Bi=function(){if(this.b.j!=this.f||zt(a(an(this.b.a,4),116))!==zt(this.a))throw K(new C)};var pVe=A(qs,"ArrayDelegatingEList/NonResolvingEIterator",928);T(641,355,kf,$Ct,v4t),u.Bi=function(){if(this.b.j!=this.f||zt(a(an(this.b.a,4),116))!==zt(this.a))throw K(new C)};var gVe=A(qs,"ArrayDelegatingEList/NonResolvingEListIterator",641);T(549,295,zZ,kW);var mVe=A(qs,"BasicEList/BasicIndexOutOfBoundsException",549);T(630,55,Nf,Art),u.bd=function(e,n){throw K(new Oi)},u.nc=function(e){throw K(new Oi)},u.oc=function(e){throw K(new Oi)},u.Pb=function(){throw K(new Oi)},u.Eh=function(e){throw K(new Oi)},u.tc=function(){return this.oh()},u.ed=function(){return this.ph()},u.fd=function(e){return this.qh(e)},u.gd=function(e){throw K(new Oi)},u.vc=function(e){throw K(new Oi)},u.hd=function(e,n){throw K(new Oi)};var bVe=A(qs,"BasicEList/UnmodifiableEList",630);T(639,1,{3:1,20:1,13:1,15:1,52:1,533:1}),u.bd=function(e,n){gee(this,e,a(n,38))},u.nc=function(e){return Zee(this,a(e,38))},u.sc=function(e){vo(this,e)},u.cd=function(e){return a(at(this.c,e),134)},u.uc=function(){return this.xc()},u.gd=function(e){return a(this.c.gd(e),38)},u.hd=function(e,n){return bse(this,e,a(n,38))},u.jd=function(e){D1(this,e)},u.wc=function(){return new Ei(this,16)},u.xc=function(){return new gi(null,this.wc())},u.oc=function(e){return this.c.oc(e)},u.Pb=function(){this.c.Pb()},u.pc=function(e){return this.c.pc(e)},u.qc=function(e){return O1(this.c,e)},u.Fi=function(){var e,n,i;if(this.d==null){for(this.d=dt(Wvt,Kpt,55,2*this.f+1,0,1),i=this.e,this.f=0,n=this.c.tc();n.e!=n.i._b();)e=a(n.Ci(),134),p7(this,e);this.e=i}},u.Fb=function(e){return jTt(this,e)},u.Hb=function(){return kat(this.c)},u.dd=function(e){return this.c.dd(e)},u.Gi=function(){this.c=new yG(this)},u.Wb=function(){return this.f==0},u.tc=function(){return this.c.tc()},u.ed=function(){return this.c.ed()},u.fd=function(e){return this.c.fd(e)},u.Hi=function(){return CL(this)},u.Ii=function(e,n,i){return new JTt(e,n,i)},u.Ji=function(){return new Cz},u.vc=function(e){return QLt(this,e)},u._b=function(){return this.f},u.kd=function(e,n){return new C1(this.c,e,n)},u.yc=function(){return this.c.yc()},u.zc=function(e){return this.c.zc(e)},u.Ib=function(){return uut(this.c)},u.e=0,u.f=0;var wVe=A(qs,"BasicEMap",639);T(922,55,Nf,yG),u.sh=function(e,n){ee(this,a(n,134))},u.vh=function(e,n){fe(this,a(n,134))},u.wh=function(e,n,i){Hee(this,a(n,134),a(i,134))},u.uh=function(e,n){ZPt(this.a)};var vVe=A(qs,"BasicEMap/1",922);T(923,55,Nf,Cz),u.Fh=function(e){return dt(eMe,xUt,551,e,0,1)};var _Ve=A(qs,"BasicEMap/2",923);T(924,bd,vl,xG),u.Pb=function(){this.a.c.Pb()},u.pc=function(e){return Rq(this.a,e)},u.tc=function(){return this.a.f==0?(YT(),vI.a):new E3t(this.a)},u.vc=function(e){var n;return n=this.a.f,cP(this.a,e),this.a.f!=n},u._b=function(){return this.a.f};var yVe=A(qs,"BasicEMap/3",924);T(925,25,R_,MG),u.Pb=function(){this.a.c.Pb()},u.pc=function(e){return lNt(this.a,e)},u.tc=function(){return this.a.f==0?(YT(),vI.a):new S3t(this.a)},u._b=function(){return this.a.f};var xVe=A(qs,"BasicEMap/4",925);T(926,bd,vl,EG),u.Pb=function(){this.a.c.Pb()},u.pc=function(e){var n,i,r,c,l,f,g,b,v;if(this.a.f>0&&ct(e,38)&&(this.a.Fi(),b=a(e,38),g=b.kc(),c=g==null?0:Yr(g),l=_st(this.a,c),n=this.a.d[l],n)){for(i=a(n.g,339),v=n.i,f=0;f"+this.c},u.a=0;var eMe=A(qs,"BasicEMap/EntryImpl",551);T(484,1,{},Yy);var AVe=A(qs,"BasicEMap/View",484),vI;T(695,1,{}),u.Fb=function(e){return Hlt((we(),fo),e)},u.Hb=function(){return Oat((we(),fo))},u.Ib=function(){return Gp((we(),fo))};var kVe=A(qs,"ECollections/BasicEmptyUnmodifiableEList",695);T(1164,1,kf,Az),u.gc=function(e){ks(this,e)},u.Bc=function(e){throw K(new Oi)},u.hc=function(){return!1},u.Cc=function(){return!1},u.ic=function(){throw K(new J)},u.Dc=function(){return 0},u.Ec=function(){throw K(new J)},u.Fc=function(){return-1},u.jc=function(){throw K(new Oi)},u.Gc=function(e){throw K(new Oi)};var LVe=A(qs,"ECollections/BasicEmptyUnmodifiableEList/1",1164);T(1162,695,{20:1,13:1,15:1,52:1},kxt),u.bd=function(e,n){Kxt()},u.nc=function(e){return Jxt()},u.oc=function(e){return Qxt()},u.Pb=function(){t3t()},u.pc=function(e){return!1},u.qc=function(e){return!1},u.sc=function(e){vo(this,e)},u.cd=function(e){return Rrt((we(),e)),null},u.dd=function(e){return-1},u.Wb=function(){return!0},u.tc=function(){return this.a},u.ed=function(){return this.a},u.fd=function(e){return this.a},u.uc=function(){return this.xc()},u.gd=function(e){return e3t()},u.vc=function(e){return n3t()},u.hd=function(e,n){return i3t()},u._b=function(){return 0},u.jd=function(e){D1(this,e)},u.wc=function(){return new Ei(this,16)},u.xc=function(){return new gi(null,this.wc())},u.kd=function(e,n){return we(),new C1(fo,e,n)},u.yc=function(){return y$((we(),fo))},u.zc=function(e){return we(),lP(fo,e)};var PVe=A(qs,"ECollections/EmptyUnmodifiableEList",1162);T(1163,695,{20:1,13:1,15:1,52:1,533:1},Axt),u.bd=function(e,n){Kxt()},u.nc=function(e){return Jxt()},u.oc=function(e){return Qxt()},u.Pb=function(){t3t()},u.pc=function(e){return!1},u.qc=function(e){return!1},u.sc=function(e){vo(this,e)},u.cd=function(e){return Rrt((we(),e)),null},u.dd=function(e){return-1},u.Wb=function(){return!0},u.tc=function(){return this.a},u.ed=function(){return this.a},u.fd=function(e){return this.a},u.uc=function(){return this.xc()},u.gd=function(e){return e3t()},u.vc=function(e){return n3t()},u.hd=function(e,n){return i3t()},u._b=function(){return 0},u.jd=function(e){D1(this,e)},u.wc=function(){return new Ei(this,16)},u.xc=function(){return new gi(null,this.wc())},u.kd=function(e,n){return we(),new C1(fo,e,n)},u.yc=function(){return y$((we(),fo))},u.zc=function(e){return we(),lP(fo,e)},u.Hi=function(){return we(),we(),ap};var IVe=A(qs,"ECollections/EmptyUnmodifiableEMap",1163),Vvt=Sr(qs,"Enumerator"),VF;T(261,1,{261:1},OX),u.Fb=function(e){var n;return this===e?!0:ct(e,261)?(n=a(e,261),this.f==n.f&&Are(this.i,n.i)&&w$(this.a,this.f&256?n.f&256?n.a:null:n.f&256?null:n.a)&&w$(this.d,n.d)&&w$(this.g,n.g)&&w$(this.e,n.e)&&mde(this,n)):!1},u.Hb=function(){return this.f},u.Ib=function(){return jNt(this)},u.f=0;var zqt=0,jqt=0,Hqt=0,Gqt=0,qvt=0,Xvt=0,Zvt=0,Yvt=0,Kvt=0,Wqt,AA=0,kA=0,$qt=0,Vqt=0,qF,Jvt,RVe=A(qs,"URI",261);T(965,44,rx,xxt),u.Zb=function(e,n){return a(tc(this,hi(e),a(n,261)),261)};var DVe=A(qs,"URI/URICache",965);T(451,55,Nf,B3,OD),u.xh=function(){return!0};var NVe=A(qs,"UniqueEList",451);T(526,54,rp,EN);var OVe=A(qs,"WrappedException",526),Ui=Sr(tl,SUt),Bw=Sr(tl,TUt),Ra=Sr(tl,CUt),py=Sr(tl,AUt),cf=Sr(tl,kUt),Dl=Sr(tl,"EClass"),utt=Sr(tl,"EDataType"),qqt;T(1096,44,rx,Mxt),u.Vb=function(e){return Es(e)?Zc(this,e):za(Ea(this.d,e))};var BVe=A(tl,"EDataType/Internal/ConversionDelegate/Factory/Registry/Impl",1096),XF=Sr(tl,"EEnum"),Qp=Sr(tl,LUt),Do=Sr(tl,PUt),ph=Sr(tl,IUt),Nl,Fw=Sr(tl,RUt),Uw=Sr(tl,DUt);T(918,1,{},PR),u.Ib=function(){return"NIL"};var FVe=A(tl,"EStructuralFeature/Internal/DynamicValueHolder/1",918),Xqt;T(917,44,rx,Ext),u.Vb=function(e){return Es(e)?Zc(this,e):za(Ea(this.d,e))};var UVe=A(tl,"EStructuralFeature/Internal/SettingDelegate/Factory/Registry/Impl",917),vu=Sr(tl,NUt),Fx=Sr(tl,"EValidator/PatternMatcher"),Qvt,t_t,Ae,S0,Ux,fb,Zqt,Yqt,db,T0,pb,gy,Hf,Kqt,Jqt,gh,C0,A0,zw,VE,Ho,Qqt,tXt,my,ZF=Sr(hr,"FeatureMap/Entry");T(483,1,{75:1},K9),u.nj=function(){return this.a},u.lc=function(){return this.b};var zVe=A(Re,"BasicEObjectImpl/1",483);T(1674,1,{103:1}),u.oj=function(e){this.e=e==0?eXt:dt(un,te,1,e,5,1)},u.Tg=function(e){return this.e[e]},u.Ug=function(e,n){this.e[e]=n},u.Vg=function(e){this.e[e]=null},u.pj=function(){return this.c},u.qj=function(){throw K(new Oi)},u.rj=function(){throw K(new Oi)},u.sj=function(){return this.d},u.tj=function(){return this.e!=null},u.uj=function(e){this.c=e},u.vj=function(e){throw K(new Oi)},u.wj=function(e){this.d=e};var eXt,jVe=A(Re,"BasicEObjectImpl/EPropertiesHolderBaseImpl",1674);T(201,1674,{103:1},wf),u.qj=function(){return this.a},u.rj=function(){return this.b},u.vj=function(e){this.a=e};var HVe=A(Re,"BasicEObjectImpl/EPropertiesHolderImpl",201);T(463,92,zFt,zl),u.dg=function(){return this.f},u.ig=function(){return this.k},u.kg=function(e,n){this.g=e,this.i=n},u.mg=function(){return this.j&2?this.Jg().pj():this.Rg()},u.og=function(){return this.i},u.fg=function(){return(this.j&1)!=0},u.yg=function(){return this.g},u.Eg=function(){return(this.j&4)!=0},u.Jg=function(){return!this.k&&(this.k=new wf),this.k},u.Ng=function(e){this.Jg().uj(e),e?this.j|=2:this.j&=-3},u.Rg=function(){return(T1(),Ae).S},u.i=0,u.j=1;var GVe=A(Re,"EObjectImpl",463);T(710,463,{95:1,91:1,87:1,51:1,103:1,42:1,92:1},Qst),u.Tg=function(e){return this.e[e]},u.Ug=function(e,n){this.e[e]=n},u.Vg=function(e){this.e[e]=null},u.mg=function(){return this.d},u.rg=function(e){return xr(this.d,e)},u.tg=function(){return this.d},u.xg=function(){return this.e!=null},u.Jg=function(){return!this.k&&(this.k=new kz),this.k},u.Ng=function(e){this.d=e},u.Qg=function(){var e;return this.e==null&&(e=ei(this.d),this.e=e==0?nXt:dt(un,te,1,e,5,1)),this},u.Sg=function(){return 0};var nXt,WVe=A(Re,"DynamicEObjectImpl",710);T(1389,710,{95:1,38:1,91:1,87:1,134:1,51:1,103:1,42:1,92:1},xCt),u.Fb=function(e){return this===e},u.Hb=function(){return lm(this)},u.Ng=function(e){this.d=e,this.b=TP(e,"key"),this.c=TP(e,T4)},u.ih=function(){var e;return this.a==-1&&(e=LV(this,this.b),this.a=e==null?0:Yr(e)),this.a},u.kc=function(){return LV(this,this.b)},u.lc=function(){return LV(this,this.c)},u.jh=function(e){this.a=e},u.kh=function(e){OAt(this,this.b,e)},u.mc=function(e){var n;return n=LV(this,this.c),OAt(this,this.c,e),n},u.a=0;var $Ve=A(Re,"DynamicEObjectImpl/BasicEMapEntry",1389);T(1390,1,{103:1},kz),u.oj=function(e){throw K(new Oi)},u.Tg=function(e){throw K(new Oi)},u.Ug=function(e,n){throw K(new Oi)},u.Vg=function(e){throw K(new Oi)},u.pj=function(){throw K(new Oi)},u.qj=function(){return this.a},u.rj=function(){return this.b},u.sj=function(){return this.c},u.tj=function(){throw K(new Oi)},u.uj=function(e){throw K(new Oi)},u.vj=function(e){this.a=e},u.wj=function(e){this.c=e};var VVe=A(Re,"DynamicEObjectImpl/DynamicEPropertiesHolderImpl",1390);T(469,142,{95:1,91:1,87:1,609:1,139:1,51:1,103:1,42:1,92:1,469:1,142:1,107:1,108:1},IR),u.jg=function(e){return qut(this,e)},u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.d;case 2:return i?(!this.b&&(this.b=new Mu((ye(),Ho),Dc,this)),this.b):(!this.b&&(this.b=new Mu((ye(),Ho),Dc,this)),CL(this.b));case 3:return xAt(this);case 4:return!this.a&&(this.a=new Ss(Nw,this,4)),this.a;case 5:return!this.c&&(this.c=new dM(Nw,this,5)),this.c}return Xu(this,e-ei((ye(),S0)),Ve((r=a(an(this,16),24),r||S0),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 3:return this.Cb&&(i=(c=this.Db>>16,c>=0?qut(this,i):this.Cb.Cg(this,-1-c,null,i))),got(this,a(e,139),i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),S0)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),S0)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 2:return!this.b&&(this.b=new Mu((ye(),Ho),Dc,this)),MD(this.b,e,i);case 3:return got(this,null,i);case 4:return!this.a&&(this.a=new Ss(Nw,this,4)),$s(this.a,e,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),S0)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),S0)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.d!=null;case 2:return!!this.b&&this.b.f!=0;case 3:return!!xAt(this);case 4:return!!this.a&&this.a.i!=0;case 5:return!!this.c&&this.c.i!=0}return Vu(this,e-ei((ye(),S0)),Ve((n=a(an(this,16),24),n||S0),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:kre(this,hi(n));return;case 2:!this.b&&(this.b=new Mu((ye(),Ho),Dc,this)),FN(this.b,n);return;case 3:Vbe(this,a(n,139));return;case 4:!this.a&&(this.a=new Ss(Nw,this,4)),Dr(this.a),!this.a&&(this.a=new Ss(Nw,this,4)),Lr(this.a,a(n,13));return;case 5:!this.c&&(this.c=new dM(Nw,this,5)),Dr(this.c),!this.c&&(this.c=new dM(Nw,this,5)),Lr(this.c,a(n,13));return}Ku(this,e-ei((ye(),S0)),Ve((i=a(an(this,16),24),i||S0),e),n)},u.Rg=function(){return ye(),S0},u.Ib=function(){return K6t(this)},u.d=null;var qVe=A(Re,"EAnnotationImpl",469);T(143,639,Jpt,hu),u.xj=function(e,n){return kne(this,a(e,38),n)},u.Dh=function(e){return a(a(this.c,64).Dh(e),134)},u.oh=function(){return a(this.c,64).oh()},u.ph=function(){return a(this.c,64).ph()},u.qh=function(e){return a(this.c,64).qh(e)},u.yj=function(e,n){return MD(this,e,n)},u.hj=function(e){return a(this.c,81).hj(e)},u.Gi=function(){},u.ui=function(){return a(this.c,81).ui()},u.Ii=function(e,n,i){var r;return r=a(Zu(this.b).dh().$g(this.b),134),r.jh(e),r.kh(n),r.mc(i),r},u.Ji=function(){return new gT(this)},u.Gc=function(e){FN(this,e)},u.ij=function(){a(this.c,81).ij()};var XVe=A(hr,"EcoreEMap",143);T(152,143,Jpt,Mu),u.Fi=function(){var e,n,i,r,c,l;if(this.d==null){for(l=dt(Wvt,Kpt,55,2*this.f+1,0,1),i=this.c.tc();i.e!=i.i._b();)n=a(i.Ci(),134),r=n.ih(),c=(r&qi)%l.length,e=l[c],!e&&(e=l[c]=new gT(this)),e.nc(n);this.d=l}};var ZVe=A(Re,"EAnnotationImpl/1",152);T(268,399,{95:1,91:1,87:1,139:1,174:1,51:1,103:1,431:1,42:1,92:1,142:1,268:1,107:1,108:1}),u.ug=function(e,n,i){var r,c;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return me(),!!(this.Bb&256);case 3:return me(),!!(this.Bb&512);case 4:return Xt(this.s);case 5:return Xt(this.t);case 6:return me(),!!this.lj();case 7:return me(),c=this.s,c>=1;case 8:return n?wl(this):this.r;case 9:return this.q}return Xu(this,e-ei(this.Rg()),Ve((r=a(an(this,16),24),r||this.Rg()),e),n,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 9:return R$(this,i)}return c=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),c.aj().ej(this,ra(this),n-ei(this.Rg()),e,i)},u.Fg=function(e){var n,i;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.lj();case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&mm(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&mm(this.q).i==0)}return Vu(this,e-ei(this.Rg()),Ve((n=a(an(this,16),24),n||this.Rg()),e))},u.Mg=function(e,n){var i,r;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:this.ah(hi(n));return;case 2:h_(this,lt(de(n)));return;case 3:f_(this,lt(de(n)));return;case 4:c_(this,a(n,21).a);return;case 5:this.Aj(a(n,21).a);return;case 8:GM(this,a(n,133));return;case 9:r=$1(this,a(n,84),null),r&&r.Th();return}Ku(this,e-ei(this.Rg()),Ve((i=a(an(this,16),24),i||this.Rg()),e),n)},u.Rg=function(){return ye(),tXt},u.Xg=function(){wl(this),this.Bb|=1},u.jj=function(){return wl(this)},u.kj=function(){return this.t},u.lj=function(){var e;return e=this.t,e>1||e==-1},u.xh=function(){return(this.Bb&512)!=0},u.zj=function(e,n){return Yat(this,e,n)},u.Aj=function(e){OM(this,e)},u.Ib=function(){return Flt(this)},u.s=0,u.t=1;var YVe=A(Re,"ETypedElementImpl",268);T(418,268,{95:1,91:1,87:1,139:1,174:1,51:1,158:1,61:1,103:1,431:1,42:1,92:1,142:1,418:1,268:1,107:1,108:1,615:1}),u.jg=function(e){return VRt(this,e)},u.ug=function(e,n,i){var r,c;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return me(),!!(this.Bb&256);case 3:return me(),!!(this.Bb&512);case 4:return Xt(this.s);case 5:return Xt(this.t);case 6:return me(),!!this.lj();case 7:return me(),c=this.s,c>=1;case 8:return n?wl(this):this.r;case 9:return this.q;case 10:return me(),!!(this.Bb&oh);case 11:return me(),!!(this.Bb&mw);case 12:return me(),!!(this.Bb&zm);case 13:return this.j;case 14:return iE(this);case 15:return me(),!!(this.Bb&La);case 16:return me(),!!(this.Bb&Lf);case 17:return Zb(this)}return Xu(this,e-ei(this.Rg()),Ve((r=a(an(this,16),24),r||this.Rg()),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 17:return this.Cb&&(i=(c=this.Db>>16,c>=0?VRt(this,i):this.Cb.Cg(this,-1-c,null,i))),Lu(this,e,17,i)}return l=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),l.aj().dj(this,ra(this),n-ei(this.Rg()),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 9:return R$(this,i);case 17:return Lu(this,null,17,i)}return c=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),c.aj().ej(this,ra(this),n-ei(this.Rg()),e,i)},u.Fg=function(e){var n,i;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.lj();case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&mm(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&mm(this.q).i==0);case 10:return(this.Bb&oh)==0;case 11:return(this.Bb&mw)!=0;case 12:return(this.Bb&zm)!=0;case 13:return this.j!=null;case 14:return iE(this)!=null;case 15:return(this.Bb&La)!=0;case 16:return(this.Bb&Lf)!=0;case 17:return!!Zb(this)}return Vu(this,e-ei(this.Rg()),Ve((n=a(an(this,16),24),n||this.Rg()),e))},u.Mg=function(e,n){var i,r;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:eV(this,hi(n));return;case 2:h_(this,lt(de(n)));return;case 3:f_(this,lt(de(n)));return;case 4:c_(this,a(n,21).a);return;case 5:this.Aj(a(n,21).a);return;case 8:GM(this,a(n,133));return;case 9:r=$1(this,a(n,84),null),r&&r.Th();return;case 10:XN(this,lt(de(n)));return;case 11:qN(this,lt(de(n)));return;case 12:YN(this,lt(de(n)));return;case 13:Prt(this,hi(n));return;case 15:ZN(this,lt(de(n)));return;case 16:KN(this,lt(de(n)));return}Ku(this,e-ei(this.Rg()),Ve((i=a(an(this,16),24),i||this.Rg()),e),n)},u.Rg=function(){return ye(),Qqt},u.Xg=function(){MM(qo((tu(),eo),this)),wl(this),this.Bb|=1},u.Vi=function(){return this.f},u.Oi=function(){return iE(this)},u.Wi=function(){return Zb(this)},u.$i=function(){return null},u.Bj=function(){return this.k},u.pi=function(){return this.n},u._i=function(){return _7(this)},u.aj=function(){var e,n,i,r,c,l,f,g,b;return this.p||(i=Zb(this),(i.i==null&&q1(i),i.i).length,r=this.$i(),r&&ei(Zb(r)),c=wl(this),f=c.Qi(),e=f?f.i&1?f==Ol?ho:f==Gn?Io:f==Gw?CE:f==Os?To:f==k0?Vm:f==vy?qm:f==Da?dx:F4:f:null,n=iE(this),g=c.Oi(),ife(this),this.Bb&Lf&&((l=tlt((tu(),eo),i))&&l!=this||(l=uC(qo(eo,this))))?this.p=new _Et(this,l):this.lj()?this.Dj()?r?this.Bb&La?e?this.Ej()?this.p=new jg(47,e,this,r):this.p=new jg(5,e,this,r):this.Ej()?this.p=new Wg(46,this,r):this.p=new Wg(4,this,r):e?this.Ej()?this.p=new jg(49,e,this,r):this.p=new jg(7,e,this,r):this.Ej()?this.p=new Wg(48,this,r):this.p=new Wg(6,this,r):this.Bb&La?e?e==V_?this.p=new Ip(50,Bqt,this):this.Ej()?this.p=new Ip(43,e,this):this.p=new Ip(1,e,this):this.Ej()?this.p=new Op(42,this):this.p=new Op(0,this):e?e==V_?this.p=new Ip(41,Bqt,this):this.Ej()?this.p=new Ip(45,e,this):this.p=new Ip(3,e,this):this.Ej()?this.p=new Op(44,this):this.p=new Op(2,this):ct(c,140)?e==ZF?this.p=new Op(40,this):this.Bb&512?this.Bb&La?e?this.p=new Ip(9,e,this):this.p=new Op(8,this):e?this.p=new Ip(11,e,this):this.p=new Op(10,this):this.Bb&La?e?this.p=new Ip(13,e,this):this.p=new Op(12,this):e?this.p=new Ip(15,e,this):this.p=new Op(14,this):r?(b=r.t,b>1||b==-1?this.Ej()?this.Bb&La?e?this.p=new jg(25,e,this,r):this.p=new Wg(24,this,r):e?this.p=new jg(27,e,this,r):this.p=new Wg(26,this,r):this.Bb&La?e?this.p=new jg(29,e,this,r):this.p=new Wg(28,this,r):e?this.p=new jg(31,e,this,r):this.p=new Wg(30,this,r):this.Ej()?this.Bb&La?e?this.p=new jg(33,e,this,r):this.p=new Wg(32,this,r):e?this.p=new jg(35,e,this,r):this.p=new Wg(34,this,r):this.Bb&La?e?this.p=new jg(37,e,this,r):this.p=new Wg(36,this,r):e?this.p=new jg(39,e,this,r):this.p=new Wg(38,this,r)):this.Ej()?this.Bb&La?e?this.p=new Ip(17,e,this):this.p=new Op(16,this):e?this.p=new Ip(19,e,this):this.p=new Op(18,this):this.Bb&La?e?this.p=new Ip(21,e,this):this.p=new Op(20,this):e?this.p=new Ip(23,e,this):this.p=new Op(22,this):this.Cj()?this.Ej()?this.p=new QTt(a(c,24),this,r):this.p=new ict(a(c,24),this,r):ct(c,140)?e==ZF?this.p=new Op(40,this):this.Bb&La?e?this.p=new zCt(n,g,this,(Iq(),f==Gn?c_t:f==Ol?n_t:f==k0?a_t:f==Gw?o_t:f==Os?s_t:f==vy?u_t:f==Da?i_t:f==nl?r_t:ftt)):this.p=new O4t(a(c,140),n,g,this):e?this.p=new UCt(n,g,this,(Iq(),f==Gn?c_t:f==Ol?n_t:f==k0?a_t:f==Gw?o_t:f==Os?s_t:f==vy?u_t:f==Da?i_t:f==nl?r_t:ftt)):this.p=new N4t(a(c,140),n,g,this):this.Dj()?r?this.Bb&La?this.Ej()?this.p=new eCt(a(c,24),this,r):this.p=new $st(a(c,24),this,r):this.Ej()?this.p=new tCt(a(c,24),this,r):this.p=new d$(a(c,24),this,r):this.Bb&La?this.Ej()?this.p=new YSt(a(c,24),this):this.p=new lst(a(c,24),this):this.Ej()?this.p=new ZSt(a(c,24),this):this.p=new KW(a(c,24),this):this.Ej()?r?this.Bb&La?this.p=new nCt(a(c,24),this,r):this.p=new Wst(a(c,24),this,r):this.Bb&La?this.p=new KSt(a(c,24),this):this.p=new ust(a(c,24),this):r?this.Bb&La?this.p=new iCt(a(c,24),this,r):this.p=new Vst(a(c,24),this,r):this.Bb&La?this.p=new JSt(a(c,24),this):this.p=new BD(a(c,24),this)),this.p},u.Xi=function(){return(this.Bb&oh)!=0},u.Cj=function(){return!1},u.Dj=function(){return!1},u.Yi=function(){return(this.Bb&Lf)!=0},u.bj=function(){return Kct(this)},u.Ej=function(){return!1},u.Zi=function(){return(this.Bb&La)!=0},u.Fj=function(e){this.k=e},u.ah=function(e){eV(this,e)},u.Ib=function(){return H7(this)},u.e=!1,u.n=0;var KVe=A(Re,"EStructuralFeatureImpl",418);T(335,418,{95:1,91:1,87:1,29:1,139:1,174:1,51:1,158:1,61:1,103:1,431:1,42:1,92:1,335:1,142:1,418:1,268:1,107:1,108:1,615:1},UG),u.ug=function(e,n,i){var r,c;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return me(),!!(this.Bb&256);case 3:return me(),!!(this.Bb&512);case 4:return Xt(this.s);case 5:return Xt(this.t);case 6:return me(),!!Olt(this);case 7:return me(),c=this.s,c>=1;case 8:return n?wl(this):this.r;case 9:return this.q;case 10:return me(),!!(this.Bb&oh);case 11:return me(),!!(this.Bb&mw);case 12:return me(),!!(this.Bb&zm);case 13:return this.j;case 14:return iE(this);case 15:return me(),!!(this.Bb&La);case 16:return me(),!!(this.Bb&Lf);case 17:return Zb(this);case 18:return me(),!!(this.Bb&ca);case 19:return n?eq(this):I5t(this)}return Xu(this,e-ei((ye(),Ux)),Ve((r=a(an(this,16),24),r||Ux),e),n,i)},u.Fg=function(e){var n,i;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return Olt(this);case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&mm(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&mm(this.q).i==0);case 10:return(this.Bb&oh)==0;case 11:return(this.Bb&mw)!=0;case 12:return(this.Bb&zm)!=0;case 13:return this.j!=null;case 14:return iE(this)!=null;case 15:return(this.Bb&La)!=0;case 16:return(this.Bb&Lf)!=0;case 17:return!!Zb(this);case 18:return(this.Bb&ca)!=0;case 19:return!!I5t(this)}return Vu(this,e-ei((ye(),Ux)),Ve((n=a(an(this,16),24),n||Ux),e))},u.Mg=function(e,n){var i,r;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:eV(this,hi(n));return;case 2:h_(this,lt(de(n)));return;case 3:f_(this,lt(de(n)));return;case 4:c_(this,a(n,21).a);return;case 5:_3t(this,a(n,21).a);return;case 8:GM(this,a(n,133));return;case 9:r=$1(this,a(n,84),null),r&&r.Th();return;case 10:XN(this,lt(de(n)));return;case 11:qN(this,lt(de(n)));return;case 12:YN(this,lt(de(n)));return;case 13:Prt(this,hi(n));return;case 15:ZN(this,lt(de(n)));return;case 16:KN(this,lt(de(n)));return;case 18:rut(this,lt(de(n)));return}Ku(this,e-ei((ye(),Ux)),Ve((i=a(an(this,16),24),i||Ux),e),n)},u.Rg=function(){return ye(),Ux},u.Xg=function(){eq(this),MM(qo((tu(),eo),this)),wl(this),this.Bb|=1},u.lj=function(){return Olt(this)},u.zj=function(e,n){return this.b=0,this.a=null,Yat(this,e,n)},u.Aj=function(e){_3t(this,e)},u.Ib=function(){var e;return this.Db&64?H7(this):(e=new ul(H7(this)),e.a+=" (iD: ",Cp(e,(this.Bb&ca)!=0),e.a+=")",e.a)},u.b=0;var JVe=A(Re,"EAttributeImpl",335);T(672,399,{95:1,91:1,87:1,133:1,139:1,174:1,51:1,103:1,42:1,92:1,142:1,107:1,108:1,614:1}),u.Gj=function(e){return e.mg()==this},u.jg=function(e){return nX(this,e)},u.kg=function(e,n){this.w=null,this.Db=n<<16|this.Db&255,this.Cb=e},u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return Im(this);case 4:return this.Oi();case 5:return this.F;case 6:return n?Zu(this):CM(this);case 7:return!this.A&&(this.A=new Gu(vu,this,7)),this.A}return Xu(this,e-ei(this.Rg()),Ve((r=a(an(this,16),24),r||this.Rg()),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 6:return this.Cb&&(i=(c=this.Db>>16,c>=0?nX(this,i):this.Cb.Cg(this,-1-c,null,i))),Lu(this,e,6,i)}return l=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),l.aj().dj(this,ra(this),n-ei(this.Rg()),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 6:return Lu(this,null,6,i);case 7:return!this.A&&(this.A=new Gu(vu,this,7)),$s(this.A,e,i)}return c=a(Ve((r=a(an(this,16),24),r||this.Rg()),n),61),c.aj().ej(this,ra(this),n-ei(this.Rg()),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!Im(this);case 4:return this.Oi()!=null;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!CM(this);case 7:return!!this.A&&this.A.i!=0}return Vu(this,e-ei(this.Rg()),Ve((n=a(an(this,16),24),n||this.Rg()),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:rN(this,hi(n));return;case 2:DW(this,hi(n));return;case 5:oZ(this,hi(n));return;case 7:!this.A&&(this.A=new Gu(vu,this,7)),Dr(this.A),!this.A&&(this.A=new Gu(vu,this,7)),Lr(this.A,a(n,13));return}Ku(this,e-ei(this.Rg()),Ve((i=a(an(this,16),24),i||this.Rg()),e),n)},u.Rg=function(){return ye(),Zqt},u.Ni=function(){var e;return this.G==-1&&(this.G=(e=Zu(this),e?Hp(e.bh(),this):-1)),this.G},u.Oi=function(){return null},u.Pi=function(){return Zu(this)},u.Hj=function(){return this.v},u.Qi=function(){return Im(this)},u.Ri=function(){return this.D!=null?this.D:this.B},u.Si=function(){return this.F},u.Li=function(e){return GX(this,e)},u.Ij=function(e){this.v=e},u.Jj=function(e){CPt(this,e)},u.Kj=function(e){this.C=e},u.ah=function(e){rN(this,e)},u.Ib=function(){return r7(this)},u.C=null,u.D=null,u.G=-1;var QVe=A(Re,"EClassifierImpl",672);T(96,672,{95:1,91:1,87:1,24:1,133:1,139:1,174:1,51:1,103:1,42:1,92:1,96:1,142:1,432:1,107:1,108:1,614:1},u5),u.Gj=function(e){return Mne(this,e.mg())},u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return Im(this);case 4:return null;case 5:return this.F;case 6:return n?Zu(this):CM(this);case 7:return!this.A&&(this.A=new Gu(vu,this,7)),this.A;case 8:return me(),!!(this.Bb&256);case 9:return me(),!!(this.Bb&512);case 10:return Bo(this);case 11:return!this.q&&(this.q=new Wt(ph,this,11,10)),this.q;case 12:return A_(this);case 13:return u4(this);case 14:return u4(this),this.r;case 15:return A_(this),this.k;case 16:return Clt(this);case 17:return ZX(this);case 18:return q1(this);case 19:return N7(this);case 20:return A_(this),this.o;case 21:return!this.s&&(this.s=new Wt(Ra,this,21,17)),this.s;case 22:return kc(this);case 23:return NX(this)}return Xu(this,e-ei((ye(),fb)),Ve((r=a(an(this,16),24),r||fb),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 6:return this.Cb&&(i=(c=this.Db>>16,c>=0?nX(this,i):this.Cb.Cg(this,-1-c,null,i))),Lu(this,e,6,i);case 11:return!this.q&&(this.q=new Wt(ph,this,11,10)),Kc(this.q,e,i);case 21:return!this.s&&(this.s=new Wt(Ra,this,21,17)),Kc(this.s,e,i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),fb)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),fb)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 6:return Lu(this,null,6,i);case 7:return!this.A&&(this.A=new Gu(vu,this,7)),$s(this.A,e,i);case 11:return!this.q&&(this.q=new Wt(ph,this,11,10)),$s(this.q,e,i);case 21:return!this.s&&(this.s=new Wt(Ra,this,21,17)),$s(this.s,e,i);case 22:return $s(kc(this),e,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),fb)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),fb)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!Im(this);case 4:return!1;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!CM(this);case 7:return!!this.A&&this.A.i!=0;case 8:return(this.Bb&256)!=0;case 9:return(this.Bb&512)!=0;case 10:return!!this.u&&kc(this.u.a).i!=0&&!(this.n&&Xq(this.n));case 11:return!!this.q&&this.q.i!=0;case 12:return A_(this).i!=0;case 13:return u4(this).i!=0;case 14:return u4(this),this.r.i!=0;case 15:return A_(this),this.k.i!=0;case 16:return Clt(this).i!=0;case 17:return ZX(this).i!=0;case 18:return q1(this).i!=0;case 19:return N7(this).i!=0;case 20:return A_(this),!!this.o;case 21:return!!this.s&&this.s.i!=0;case 22:return!!this.n&&Xq(this.n);case 23:return NX(this).i!=0}return Vu(this,e-ei((ye(),fb)),Ve((n=a(an(this,16),24),n||fb),e))},u.Ig=function(e){var n;return n=this.i==null||this.q&&this.q.i!=0?null:TP(this,e),n||Zht(this,e)},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:rN(this,hi(n));return;case 2:DW(this,hi(n));return;case 5:oZ(this,hi(n));return;case 7:!this.A&&(this.A=new Gu(vu,this,7)),Dr(this.A),!this.A&&(this.A=new Gu(vu,this,7)),Lr(this.A,a(n,13));return;case 8:rIt(this,lt(de(n)));return;case 9:sIt(this,lt(de(n)));return;case 10:X7(Bo(this)),Lr(Bo(this),a(n,13));return;case 11:!this.q&&(this.q=new Wt(ph,this,11,10)),Dr(this.q),!this.q&&(this.q=new Wt(ph,this,11,10)),Lr(this.q,a(n,13));return;case 21:!this.s&&(this.s=new Wt(Ra,this,21,17)),Dr(this.s),!this.s&&(this.s=new Wt(Ra,this,21,17)),Lr(this.s,a(n,13));return;case 22:Dr(kc(this)),Lr(kc(this),a(n,13));return}Ku(this,e-ei((ye(),fb)),Ve((i=a(an(this,16),24),i||fb),e),n)},u.Rg=function(){return ye(),fb},u.Xg=function(){var e,n;if(A_(this),u4(this),Clt(this),ZX(this),q1(this),N7(this),NX(this),gC(ure(pl(this))),this.s)for(e=0,n=this.s.i;e=0;--e)at(this,e);return fct(this)},u.zc=function(e){var n;if(this.Qj())for(n=this.i-1;n>=0;--n)at(this,n);return gut(this,e)},u.ij=function(){Dr(this)},u.Ch=function(e,n){return OLt(this,e,n)};var nqe=A(hr,"EcoreEList",565);T(450,565,Zo,lL),u.rh=function(){return!1},u.pi=function(){return this.c},u.qi=function(){return!1},u.Rj=function(){return!0},u.xh=function(){return!0},u.zh=function(e,n){return n},u.Bh=function(){return!1},u.c=0;var iqe=A(hr,"EObjectEList",450);T(88,450,Zo,Ss),u.qi=function(){return!0},u.Pj=function(){return!1},u.Dj=function(){return!0};var rqe=A(hr,"EObjectContainmentEList",88);T(493,88,Zo,aD),u.th=function(){this.a=!0},u.ui=function(){return this.a},u.ij=function(){var e;Dr(this),Xl(this.e)?(e=this.a,this.a=!1,Bi(this.e,new Jl(this.e,2,this.c,e,!1))):this.a=!1},u.a=!1;var sqe=A(hr,"EObjectContainmentEList/Unsettable",493);T(1003,493,Zo,fSt),u.yi=function(e,n){return Rfe(this,a(e,84),n)},u.zi=function(e,n){return Ife(this,a(e,84),n)},u.Ai=function(e,n,i){return m1e(this,a(e,84),a(n,84),i)},u.mi=function(e,n,i,r,c){switch(e){case 3:return aC(this,3,n,i,r,this.i>1);case 5:return aC(this,5,n,i,r,this.i-a(i,15)._b()>0);default:return new Qd(this.e,e,this.c,n,i,r,!0)}},u.xi=function(){return!0},u.ui=function(){return Xq(this)},u.ij=function(){Dr(this)};var oqe=A(Re,"EClassImpl/1",1003);T(1017,1016,Ypt),u.Ih=function(e){var n,i,r,c,l,f,g;if(i=e.Lh(),i!=8){if(r=hde(e),r==0)switch(i){case 1:case 9:{g=e.Ph(),g!=null&&(n=pl(a(g,432)),!n.c&&(n.c=new kb),kV(n.c,e.Oh())),f=e.Nh(),f!=null&&(c=a(f,432),c.Bb&1||(n=pl(c),!n.c&&(n.c=new kb),ni(n.c,a(e.Oh(),24))));break}case 3:{f=e.Nh(),f!=null&&(c=a(f,432),c.Bb&1||(n=pl(c),!n.c&&(n.c=new kb),ni(n.c,a(e.Oh(),24))));break}case 5:{if(f=e.Nh(),f!=null)for(l=a(f,13).tc();l.hc();)c=a(l.ic(),432),c.Bb&1||(n=pl(c),!n.c&&(n.c=new kb),ni(n.c,a(e.Oh(),24)));break}case 4:{g=e.Ph(),g!=null&&(c=a(g,432),c.Bb&1||(n=pl(c),!n.c&&(n.c=new kb),kV(n.c,e.Oh())));break}case 6:{if(g=e.Ph(),g!=null)for(l=a(g,13).tc();l.hc();)c=a(l.ic(),432),c.Bb&1||(n=pl(c),!n.c&&(n.c=new kb),kV(n.c,e.Oh()));break}}this.Tj(r)}},u.Tj=function(e){_Nt(this,e)},u.b=63;var cqe=A(Re,"ESuperAdapter",1017);T(1018,1017,Ypt,TG),u.Tj=function(e){t4(this,e)};var aqe=A(Re,"EClassImpl/10",1018);T(1007,630,Zo),u.lh=function(e){return NRt(this,e)},u.mh=function(e,n){tP(this,e,n)},u.nh=function(e){SL(this,e)},u.Dh=function(e){return Wct(this,e)},u.Ah=function(e,n){return AV(this,e,n)},u.xj=function(e,n){throw K(new Oi)},u.oh=function(){return new x2(this)},u.ph=function(){return new Q5(this)},u.qh=function(e){return jL(this,e)},u.yj=function(e,n){throw K(new Oi)},u.hj=function(e){return this},u.ui=function(){return this.i!=0},u.Gc=function(e){throw K(new Oi)},u.ij=function(){throw K(new Oi)};var uqe=A(hr,"EcoreEList/UnmodifiableEList",1007);T(301,1007,Zo,Uv),u.Bh=function(){return!1};var lqe=A(hr,"EcoreEList/UnmodifiableEList/FastCompare",301);T(1010,301,Zo,E6t),u.dd=function(e){var n,i,r;if(ct(e,158)&&(n=a(e,158),i=n.pi(),i!=-1)){for(r=this.i;i4)if(this.Li(e)){if(this.Dj()){if(r=a(e,42),i=r.ng(),g=i==this.b&&(this.Pj()?r.hg(r.og(),a(Ve(da(this.b),this.pi()).jj(),24).Qi())==jo(a(Ve(da(this.b),this.pi()),17)).n:-1-r.og()==this.pi()),this.Qj()&&!g&&!i&&r.sg()){for(c=0;c1||r==-1)):!1},u.Pj=function(){var e,n,i;return n=Ve(da(this.b),this.pi()),ct(n,62)?(e=a(n,17),i=jo(e),!!i):!1},u.Qj=function(){var e,n;return n=Ve(da(this.b),this.pi()),ct(n,62)?(e=a(n,17),(e.Bb&ao)!=0):!1},u.dd=function(e){var n,i,r,c;if(r=this.ci(e),r>=0)return r;if(this.Rj()){for(i=0,c=this.hi();i=0;--e)NP(this,e,this.ai(e));return this.ii()},u.zc=function(e){var n;if(this.Qj())for(n=this.hi()-1;n>=0;--n)NP(this,n,this.ai(n));return this.ji(e)},u.ij=function(){X7(this)},u.Ch=function(e,n){return V5t(this,e,n)};var xqe=A(hr,"DelegatingEcoreEList",674);T(1013,674,t1t,aTt),u.Vh=function(e,n){Qee(this,e,a(n,24))},u.Wh=function(e){cee(this,a(e,24))},u.ai=function(e){var n,i;return n=a(at(kc(this.a),e),84),i=n.c,ct(i,96)?a(i,24):(ye(),gh)},u.fi=function(e){var n,i;return n=a(cw(kc(this.a),e),84),i=n.c,ct(i,96)?a(i,24):(ye(),gh)},u.gi=function(e,n){return $de(this,e,a(n,24))},u.rh=function(){return!1},u.mi=function(e,n,i,r,c){return null},u.Xh=function(){return new E5(this)},u.Yh=function(){Dr(kc(this.a))},u.Zh=function(e){return cIt(this,e)},u.$h=function(e){var n,i;for(i=e.tc();i.hc();)if(n=i.ic(),!cIt(this,n))return!1;return!0},u._h=function(e){var n,i,r;if(ct(e,15)&&(r=a(e,15),r._b()==kc(this.a).i)){for(n=r.tc(),i=new $n(this);n.hc();)if(zt(n.ic())!==zt(ci(i)))return!1;return!0}return!1},u.bi=function(){var e,n,i,r,c;for(i=1,n=new $n(kc(this.a));n.e!=n.i._b();)e=a(ci(n),84),r=(c=e.c,ct(c,96)?a(c,24):(ye(),gh)),i=31*i+(r?lm(r):0);return i},u.ci=function(e){var n,i,r,c;for(r=0,i=new $n(kc(this.a));i.e!=i.i._b();){if(n=a(ci(i),84),zt(e)===zt((c=n.c,ct(c,96)?a(c,24):(ye(),gh))))return r;++r}return-1},u.di=function(){return kc(this.a).i==0},u.ei=function(){return null},u.hi=function(){return kc(this.a).i},u.ii=function(){var e,n,i,r,c,l;for(l=kc(this.a).i,c=dt(un,te,1,l,5,1),i=0,n=new $n(kc(this.a));n.e!=n.i._b();)e=a(ci(n),84),c[i++]=(r=e.c,ct(r,96)?a(r,24):(ye(),gh));return c},u.ji=function(e){var n,i,r,c,l,f,g;for(g=kc(this.a).i,e.lengthg&&Vr(e,g,null),r=0,i=new $n(kc(this.a));i.e!=i.i._b();)n=a(ci(i),84),l=(f=n.c,ct(f,96)?a(f,24):(ye(),gh)),Vr(e,r++,l);return e},u.ki=function(){var e,n,i,r,c;for(c=new Sp,c.a+="[",e=kc(this.a),n=0,r=kc(this.a).i;n>16,c>=0?nX(this,i):this.Cb.Cg(this,-1-c,null,i))),Lu(this,e,6,i);case 9:return!this.a&&(this.a=new Wt(Qp,this,9,5)),Kc(this.a,e,i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),db)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),db)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 6:return Lu(this,null,6,i);case 7:return!this.A&&(this.A=new Gu(vu,this,7)),$s(this.A,e,i);case 9:return!this.a&&(this.a=new Wt(Qp,this,9,5)),$s(this.a,e,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),db)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),db)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!Im(this);case 4:return!!$at(this);case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!CM(this);case 7:return!!this.A&&this.A.i!=0;case 8:return(this.Bb&256)==0;case 9:return!!this.a&&this.a.i!=0}return Vu(this,e-ei((ye(),db)),Ve((n=a(an(this,16),24),n||db),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:rN(this,hi(n));return;case 2:DW(this,hi(n));return;case 5:oZ(this,hi(n));return;case 7:!this.A&&(this.A=new Gu(vu,this,7)),Dr(this.A),!this.A&&(this.A=new Gu(vu,this,7)),Lr(this.A,a(n,13));return;case 8:Qat(this,lt(de(n)));return;case 9:!this.a&&(this.a=new Wt(Qp,this,9,5)),Dr(this.a),!this.a&&(this.a=new Wt(Qp,this,9,5)),Lr(this.a,a(n,13));return}Ku(this,e-ei((ye(),db)),Ve((i=a(an(this,16),24),i||db),e),n)},u.Rg=function(){return ye(),db},u.Xg=function(){var e,n;if(this.a)for(e=0,n=this.a.i;e>16==5?a(this.Cb,608):null}return Xu(this,e-ei((ye(),T0)),Ve((r=a(an(this,16),24),r||T0),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 5:return this.Cb&&(i=(c=this.Db>>16,c>=0?ZRt(this,i):this.Cb.Cg(this,-1-c,null,i))),Lu(this,e,5,i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),T0)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),T0)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 5:return Lu(this,null,5,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),T0)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),T0)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.d!=0;case 3:return!!this.b;case 4:return this.c!=null;case 5:return!!(this.Db>>16==5&&a(this.Cb,608))}return Vu(this,e-ei((ye(),T0)),Ve((n=a(an(this,16),24),n||T0),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:kh(this,hi(n));return;case 2:rat(this,a(n,21).a);return;case 3:hme(this,a(n,1634));return;case 4:mat(this,hi(n));return}Ku(this,e-ei((ye(),T0)),Ve((i=a(an(this,16),24),i||T0),e),n)},u.Rg=function(){return ye(),T0},u.Ib=function(){var e;return e=this.c,e??this.zb},u.b=null,u.c=null,u.d=0;var kqe=A(Re,"EEnumLiteralImpl",525),nMe=Sr(Re,"EFactoryImpl/InternalEDateTimeFormat");T(445,1,{1699:1},i2);var Lqe=A(Re,"EFactoryImpl/1ClientInternalEDateTimeFormat",445);T(217,108,{95:1,91:1,87:1,84:1,51:1,103:1,42:1,92:1,217:1,107:1,108:1},b1),u.lg=function(e,n,i){var r;return i=Lu(this,e,n,i),this.e&&ct(e,158)&&(r=D7(this,this.e),r!=this.c&&(i=cE(this,r,i))),i},u.ug=function(e,n,i){var r;switch(e){case 0:return this.f;case 1:return!this.d&&(this.d=new Ss(Do,this,1)),this.d;case 2:return n?W7(this):this.c;case 3:return this.b;case 4:return this.e;case 5:return n?Yq(this):this.a}return Xu(this,e-ei((ye(),gy)),Ve((r=a(an(this,16),24),r||gy),e),n,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return Z6t(this,null,i);case 1:return!this.d&&(this.d=new Ss(Do,this,1)),$s(this.d,e,i);case 3:return X6t(this,null,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),gy)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),gy)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.f;case 1:return!!this.d&&this.d.i!=0;case 2:return!!this.c;case 3:return!!this.b;case 4:return!!this.e;case 5:return!!this.a}return Vu(this,e-ei((ye(),gy)),Ve((n=a(an(this,16),24),n||gy),e))},u.Mg=function(e,n){var i;switch(e){case 0:U1e(this,a(n,84));return;case 1:!this.d&&(this.d=new Ss(Do,this,1)),Dr(this.d),!this.d&&(this.d=new Ss(Do,this,1)),Lr(this.d,a(n,13));return;case 3:b8t(this,a(n,84));return;case 4:N8t(this,a(n,742));return;case 5:_C(this,a(n,133));return}Ku(this,e-ei((ye(),gy)),Ve((i=a(an(this,16),24),i||gy),e),n)},u.Rg=function(){return ye(),gy},u.Ib=function(){var e;return e=new ll(nh(this)),e.a+=" (expression: ",tZ(this,e),e.a+=")",e.a};var e_t,Pqe=A(Re,"EGenericTypeImpl",217);T(1667,1657,DO),u.xj=function(e,n){return fne(this,this._b(),e),n},u.Dh=function(e){return H1(this.Uh(),e)},u.oh=function(){return this.ph()},u.Uh=function(){return new T5(this)},u.ph=function(){return this.qh(0)},u.qh=function(e){return this.Uh().fd(e)},u.yj=function(e,n){return z2(this,e,!0),n};var Iqe=A(hr,"AbstractSequentialInternalEList",1667);T(444,1667,DO,tL),u.Dh=function(e){return H1(this.Uh(),e)},u.oh=function(){return this.b==null?(Ap(),Ap(),_I):this.Vj()},u.Uh=function(){return new REt(this.a,this.b)},u.ph=function(){return this.b==null?(Ap(),Ap(),_I):this.Vj()},u.qh=function(e){var n,i;if(this.b==null){if(e<0||e>1)throw K(new Uc(C4+e+", size=0"));return Ap(),Ap(),_I}for(i=this.Vj(),n=0;n0;)if(n=this.c[--this.d],(!this.e||n.Vi()!=$E||n.pi()!=0)&&(!this.Yj()||this.b.Gg(n))){if(l=this.b.wg(n,this.Xj()),this.f=(Jo(),a(n,61).bj()),this.f||n.lj()){if(this.Xj()?(r=a(l,15),this.k=r):(r=a(l,64),this.k=this.j=r),ct(this.k,49)?(this.o=this.k._b(),this.n=this.o):this.p=this.j?this.j.qh(this.k._b()):this.k.fd(this.k._b()),this.p?f9t(this,this.p):T9t(this))return c=this.p?this.p.Ec():this.j?this.j.Dh(--this.n):this.k.cd(--this.n),this.f?(e=a(c,75),e.nj(),i=e.lc(),this.i=i):this.i=c,this.g=-3,!0}else if(l!=null)return this.k=null,this.p=null,this.i=l,this.g=-2,!0}return this.k=null,this.p=null,this.g=-1,!1}else return c=this.p?this.p.Ec():this.j?this.j.Dh(--this.n):this.k.cd(--this.n),this.f?(e=a(c,75),e.nj(),i=e.lc(),this.i=i):this.i=c,this.g=-3,!0}},u.ic=function(){return BN(this)},u.Dc=function(){return this.a},u.Ec=function(){var e;if(this.g<-1||this.Cc())return--this.a,this.g=0,e=this.i,this.Cc(),e;throw K(new J)},u.Fc=function(){return this.a-1},u.jc=function(){throw K(new Oi)},u.Xj=function(){return!1},u.Gc=function(e){throw K(new Oi)},u.Yj=function(){return!0},u.a=0,u.d=0,u.f=!1,u.g=0,u.n=0,u.o=0;var _I,Nqe=A(hr,"EContentsEList/FeatureIteratorImpl",260);T(631,260,NO,ast),u.Xj=function(){return!0};var Oqe=A(hr,"EContentsEList/ResolvingFeatureIteratorImpl",631);T(1020,631,NO,XSt),u.Yj=function(){return!1};var Bqe=A(Re,"ENamedElementImpl/1/1",1020);T(1021,260,NO,qSt),u.Yj=function(){return!1};var Fqe=A(Re,"ENamedElementImpl/1/2",1021);T(32,136,o6,Kb,cV,fs,yV,Qd,Jl,sat,jAt,oat,HAt,Act,GAt,uat,WAt,kct,$At,cat,VAt,pL,Xot,aat,qAt,Lct,XAt),u.oi=function(){return Hct(this)},u.vi=function(){var e;return e=Hct(this),e?e.Oi():null},u.Mh=function(e){return this.b==-1&&this.a&&(this.b=this.c.qg(this.a.pi(),this.a.Vi())),this.c.hg(this.b,e)},u.Oh=function(){return this.c},u.wi=function(){var e;return e=Hct(this),e?e.Zi():!1},u.b=-1;var Uqe=A(Re,"ENotificationImpl",32);T(371,268,{95:1,91:1,87:1,139:1,174:1,51:1,53:1,103:1,431:1,42:1,92:1,142:1,371:1,268:1,107:1,108:1},BG),u.jg=function(e){return KRt(this,e)},u.ug=function(e,n,i){var r,c,l;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return me(),!!(this.Bb&256);case 3:return me(),!!(this.Bb&512);case 4:return Xt(this.s);case 5:return Xt(this.t);case 6:return me(),l=this.t,l>1||l==-1;case 7:return me(),c=this.s,c>=1;case 8:return n?wl(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?a(this.Cb,24):null;case 11:return!this.d&&(this.d=new Gu(vu,this,11)),this.d;case 12:return!this.c&&(this.c=new Wt(Fw,this,12,10)),this.c;case 13:return!this.a&&(this.a=new sL(this,this)),this.a;case 14:return Ka(this)}return Xu(this,e-ei((ye(),C0)),Ve((r=a(an(this,16),24),r||C0),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 10:return this.Cb&&(i=(c=this.Db>>16,c>=0?KRt(this,i):this.Cb.Cg(this,-1-c,null,i))),Lu(this,e,10,i);case 12:return!this.c&&(this.c=new Wt(Fw,this,12,10)),Kc(this.c,e,i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),C0)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),C0)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 9:return R$(this,i);case 10:return Lu(this,null,10,i);case 11:return!this.d&&(this.d=new Gu(vu,this,11)),$s(this.d,e,i);case 12:return!this.c&&(this.c=new Wt(Fw,this,12,10)),$s(this.c,e,i);case 14:return $s(Ka(this),e,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),C0)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),C0)),e,i)},u.Fg=function(e){var n,i,r;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return r=this.t,r>1||r==-1;case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&mm(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&mm(this.q).i==0);case 10:return!!(this.Db>>16==10&&a(this.Cb,24));case 11:return!!this.d&&this.d.i!=0;case 12:return!!this.c&&this.c.i!=0;case 13:return!!this.a&&Ka(this.a.a).i!=0&&!(this.b&&Zq(this.b));case 14:return!!this.b&&Zq(this.b)}return Vu(this,e-ei((ye(),C0)),Ve((n=a(an(this,16),24),n||C0),e))},u.Mg=function(e,n){var i,r;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:kh(this,hi(n));return;case 2:h_(this,lt(de(n)));return;case 3:f_(this,lt(de(n)));return;case 4:c_(this,a(n,21).a);return;case 5:OM(this,a(n,21).a);return;case 8:GM(this,a(n,133));return;case 9:r=$1(this,a(n,84),null),r&&r.Th();return;case 11:!this.d&&(this.d=new Gu(vu,this,11)),Dr(this.d),!this.d&&(this.d=new Gu(vu,this,11)),Lr(this.d,a(n,13));return;case 12:!this.c&&(this.c=new Wt(Fw,this,12,10)),Dr(this.c),!this.c&&(this.c=new Wt(Fw,this,12,10)),Lr(this.c,a(n,13));return;case 13:!this.a&&(this.a=new sL(this,this)),X7(this.a),!this.a&&(this.a=new sL(this,this)),Lr(this.a,a(n,13));return;case 14:Dr(Ka(this)),Lr(Ka(this),a(n,13));return}Ku(this,e-ei((ye(),C0)),Ve((i=a(an(this,16),24),i||C0),e),n)},u.Rg=function(){return ye(),C0},u.Xg=function(){var e,n;if(this.c)for(e=0,n=this.c.i;eg&&Vr(e,g,null),r=0,i=new $n(Ka(this.a));i.e!=i.i._b();)n=a(ci(i),84),l=(f=n.c,f||(ye(),Hf)),Vr(e,r++,l);return e},u.ki=function(){var e,n,i,r,c;for(c=new Sp,c.a+="[",e=Ka(this.a),n=0,r=Ka(this.a).i;n1);case 5:return aC(this,5,n,i,r,this.i-a(i,15)._b()>0);default:return new Qd(this.e,e,this.c,n,i,r,!0)}},u.xi=function(){return!0},u.ui=function(){return Zq(this)},u.ij=function(){Dr(this)};var Gqe=A(Re,"EOperationImpl/2",1388);T(456,1,{1631:1,456:1},vEt);var Wqe=A(Re,"EPackageImpl/1",456);T(18,88,Zo,Wt),u.Lj=function(){return this.d},u.Mj=function(){return this.b},u.Pj=function(){return!0},u.b=0;var $qe=A(hr,"EObjectContainmentWithInverseEList",18);T(364,18,Zo,mM),u.Qj=function(){return!0},u.zh=function(e,n){return q2(this,e,a(n,51))};var Vqe=A(hr,"EObjectContainmentWithInverseEList/Resolving",364);T(303,364,Zo,Xv),u.th=function(){this.a.tb=null};var qqe=A(Re,"EPackageImpl/2",303);T(1155,1,{},Iz);var Xqe=A(Re,"EPackageImpl/3",1155);T(650,44,rx,Tit),u.Qb=function(e){return Es(e)?V$(this,e):!!Ea(this.d,e)};var Zqe=A(Re,"EPackageRegistryImpl",650);T(468,268,{95:1,91:1,87:1,139:1,174:1,51:1,1703:1,103:1,431:1,42:1,92:1,142:1,468:1,268:1,107:1,108:1},FG),u.jg=function(e){return JRt(this,e)},u.ug=function(e,n,i){var r,c,l;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return me(),!!(this.Bb&256);case 3:return me(),!!(this.Bb&512);case 4:return Xt(this.s);case 5:return Xt(this.t);case 6:return me(),l=this.t,l>1||l==-1;case 7:return me(),c=this.s,c>=1;case 8:return n?wl(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?a(this.Cb,53):null}return Xu(this,e-ei((ye(),zw)),Ve((r=a(an(this,16),24),r||zw),e),n,i)},u.Bg=function(e,n,i){var r,c,l;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Kc(this.Ab,e,i);case 10:return this.Cb&&(i=(c=this.Db>>16,c>=0?JRt(this,i):this.Cb.Cg(this,-1-c,null,i))),Lu(this,e,10,i)}return l=a(Ve((r=a(an(this,16),24),r||(ye(),zw)),n),61),l.aj().dj(this,ra(this),n-ei((ye(),zw)),e,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 9:return R$(this,i);case 10:return Lu(this,null,10,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),zw)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),zw)),e,i)},u.Fg=function(e){var n,i,r;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return r=this.t,r>1||r==-1;case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&mm(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&mm(this.q).i==0);case 10:return!!(this.Db>>16==10&&a(this.Cb,53))}return Vu(this,e-ei((ye(),zw)),Ve((n=a(an(this,16),24),n||zw),e))},u.Rg=function(){return ye(),zw};var Yqe=A(Re,"EParameterImpl",468);T(62,418,{95:1,91:1,87:1,139:1,174:1,51:1,17:1,158:1,61:1,103:1,431:1,42:1,92:1,142:1,62:1,418:1,268:1,107:1,108:1,615:1},dst),u.ug=function(e,n,i){var r,c,l,f;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return me(),!!(this.Bb&256);case 3:return me(),!!(this.Bb&512);case 4:return Xt(this.s);case 5:return Xt(this.t);case 6:return me(),f=this.t,f>1||f==-1;case 7:return me(),c=this.s,c>=1;case 8:return n?wl(this):this.r;case 9:return this.q;case 10:return me(),!!(this.Bb&oh);case 11:return me(),!!(this.Bb&mw);case 12:return me(),!!(this.Bb&zm);case 13:return this.j;case 14:return iE(this);case 15:return me(),!!(this.Bb&La);case 16:return me(),!!(this.Bb&Lf);case 17:return Zb(this);case 18:return me(),!!(this.Bb&ca);case 19:return me(),l=jo(this),!!(l&&l.Bb&ca);case 20:return me(),!!(this.Bb&ao);case 21:return n?jo(this):this.b;case 22:return n?Dat(this):Ykt(this);case 23:return!this.a&&(this.a=new dM(py,this,23)),this.a}return Xu(this,e-ei((ye(),VE)),Ve((r=a(an(this,16),24),r||VE),e),n,i)},u.Fg=function(e){var n,i,r,c;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return c=this.t,c>1||c==-1;case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&mm(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&mm(this.q).i==0);case 10:return(this.Bb&oh)==0;case 11:return(this.Bb&mw)!=0;case 12:return(this.Bb&zm)!=0;case 13:return this.j!=null;case 14:return iE(this)!=null;case 15:return(this.Bb&La)!=0;case 16:return(this.Bb&Lf)!=0;case 17:return!!Zb(this);case 18:return(this.Bb&ca)!=0;case 19:return r=jo(this),!!r&&(r.Bb&ca)!=0;case 20:return(this.Bb&ao)==0;case 21:return!!this.b;case 22:return!!Ykt(this);case 23:return!!this.a&&this.a.i!=0}return Vu(this,e-ei((ye(),VE)),Ve((n=a(an(this,16),24),n||VE),e))},u.Mg=function(e,n){var i,r;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:eV(this,hi(n));return;case 2:h_(this,lt(de(n)));return;case 3:f_(this,lt(de(n)));return;case 4:c_(this,a(n,21).a);return;case 5:OM(this,a(n,21).a);return;case 8:GM(this,a(n,133));return;case 9:r=$1(this,a(n,84),null),r&&r.Th();return;case 10:XN(this,lt(de(n)));return;case 11:qN(this,lt(de(n)));return;case 12:YN(this,lt(de(n)));return;case 13:Prt(this,hi(n));return;case 15:ZN(this,lt(de(n)));return;case 16:KN(this,lt(de(n)));return;case 18:Boe(this,lt(de(n)));return;case 20:gIt(this,lt(de(n)));return;case 21:mPt(this,a(n,17));return;case 23:!this.a&&(this.a=new dM(py,this,23)),Dr(this.a),!this.a&&(this.a=new dM(py,this,23)),Lr(this.a,a(n,13));return}Ku(this,e-ei((ye(),VE)),Ve((i=a(an(this,16),24),i||VE),e),n)},u.Rg=function(){return ye(),VE},u.Xg=function(){Dat(this),MM(qo((tu(),eo),this)),wl(this),this.Bb|=1},u.$i=function(){return jo(this)},u.Cj=function(){var e;return e=jo(this),!!e&&(e.Bb&ca)!=0},u.Dj=function(){return(this.Bb&ca)!=0},u.Ej=function(){return(this.Bb&ao)!=0},u.zj=function(e,n){return this.c=null,Yat(this,e,n)},u.Ib=function(){var e;return this.Db&64?H7(this):(e=new ul(H7(this)),e.a+=" (containment: ",Cp(e,(this.Bb&ca)!=0),e.a+=", resolveProxies: ",Cp(e,(this.Bb&ao)!=0),e.a+=")",e.a)};var Kqe=A(Re,"EReferenceImpl",62);T(505,108,{95:1,38:1,91:1,87:1,134:1,51:1,103:1,42:1,92:1,505:1,107:1,108:1},NR),u.Fb=function(e){return this===e},u.kc=function(){return this.b},u.lc=function(){return this.c},u.Hb=function(){return lm(this)},u.kh=function(e){Lre(this,hi(e))},u.mc=function(e){return vre(this,hi(e))},u.ug=function(e,n,i){var r;switch(e){case 0:return this.b;case 1:return this.c}return Xu(this,e-ei((ye(),Ho)),Ve((r=a(an(this,16),24),r||Ho),e),n,i)},u.Fg=function(e){var n;switch(e){case 0:return this.b!=null;case 1:return this.c!=null}return Vu(this,e-ei((ye(),Ho)),Ve((n=a(an(this,16),24),n||Ho),e))},u.Mg=function(e,n){var i;switch(e){case 0:Pre(this,hi(n));return;case 1:uPt(this,hi(n));return}Ku(this,e-ei((ye(),Ho)),Ve((i=a(an(this,16),24),i||Ho),e),n)},u.Rg=function(){return ye(),Ho},u.ih=function(){var e;return this.a==-1&&(e=this.b,this.a=e==null?0:j1(e)),this.a},u.jh=function(e){this.a=e},u.Ib=function(){var e;return this.Db&64?nh(this):(e=new ul(nh(this)),e.a+=" (key: ",mo(e,this.b),e.a+=", value: ",mo(e,this.c),e.a+=")",e.a)},u.a=-1,u.b=null,u.c=null;var Dc=A(Re,"EStringToStringMapEntryImpl",505),rXt=Sr(hr,"FeatureMap/Entry/Internal");T(514,1,OO),u.$j=function(e){return this._j(a(e,42))},u._j=function(e){return this.$j(e)},u.Fb=function(e){var n,i;return this===e?!0:ct(e,75)?(n=a(e,75),n.nj()==this.c?(i=this.lc(),i==null?n.lc()==null:Fi(i,n.lc())):!1):!1},u.nj=function(){return this.c},u.Hb=function(){var e;return e=this.lc(),Yr(this.c)^(e==null?0:Yr(e))},u.Ib=function(){var e,n;return e=this.c,n=Zu(e.Wi()).fh(),e.be(),(n!=null&&n.length!=0?n+":"+e.be():e.be())+"="+this.lc()};var Jqe=A(Re,"EStructuralFeatureImpl/BasicFeatureMapEntry",514);T(709,514,OO,yst),u._j=function(e){return new yst(this.c,e)},u.lc=function(){return this.a},u.ak=function(e,n,i){return gle(this,e,this.a,n,i)},u.bk=function(e,n,i){return mle(this,e,this.a,n,i)};var Qqe=A(Re,"EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry",709);T(1363,1,{},_Et),u.cj=function(e,n,i,r,c){var l;return l=a(AL(e,this.b),237),l.yk(this.a).hj(r)},u.dj=function(e,n,i,r,c){var l;return l=a(AL(e,this.b),237),l.pk(this.a,r,c)},u.ej=function(e,n,i,r,c){var l;return l=a(AL(e,this.b),237),l.qk(this.a,r,c)},u.fj=function(e,n,i){var r;return r=a(AL(e,this.b),237),r.yk(this.a).ui()},u.gj=function(e,n,i,r){var c;c=a(AL(e,this.b),237),c.yk(this.a).Gc(r)};var tXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator",1363);T(82,1,{},Ip,jg,Op,Wg),u.cj=function(e,n,i,r,c){var l;if(l=n.Tg(i),l==null&&n.Ug(i,l=eft(this,e)),!c)switch(this.e){case 50:case 41:return a(l,533).Hi();case 40:return a(l,237).vk()}return l},u.dj=function(e,n,i,r,c){var l,f;return f=n.Tg(i),f==null&&n.Ug(i,f=eft(this,e)),l=a(f,64).xj(r,c),l},u.ej=function(e,n,i,r,c){var l;return l=n.Tg(i),l!=null&&(c=a(l,64).yj(r,c)),c},u.fj=function(e,n,i){var r;return r=n.Tg(i),r!=null&&a(r,81).ui()},u.gj=function(e,n,i,r){var c;c=a(n.Tg(i),81),!c&&n.Ug(i,c=eft(this,e)),c.Gc(r)},u.b=0,u.e=0;var eXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateMany",82);T(461,1,{}),u.dj=function(e,n,i,r,c){throw K(new Oi)},u.ej=function(e,n,i,r,c){throw K(new Oi)};var lg,nXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingle",461);T(702,461,{},ict),u.cj=function(e,n,i,r,c){return FX(e,e.yg(),e.og())==this.b?this.Ej()&&r?SX(e):e.yg():null},u.dj=function(e,n,i,r,c){var l,f;return e.yg()&&(c=(l=e.og(),l>=0?e.jg(c):e.yg().Cg(e,-1-l,null,c))),f=xr(e.mg(),this.e),e.lg(r,f,c)},u.ej=function(e,n,i,r,c){var l;return l=xr(e.mg(),this.e),e.lg(null,l,c)},u.fj=function(e,n,i){var r;return r=xr(e.mg(),this.e),!!e.yg()&&e.og()==r},u.gj=function(e,n,i,r){var c,l,f,g,b;if(r!=null&&!GX(this.a,r))throw K(new bT(BO+(ct(r,51)?slt(a(r,51).mg()):Jct(du(r)))+FO+this.a+"'"));if(c=e.yg(),f=xr(e.mg(),this.e),zt(r)!==zt(c)||e.og()!=f&&r!=null){if(YM(e,a(r,51)))throw K(new yn(S4+e.Ib()));b=null,c&&(b=(l=e.og(),l>=0?e.jg(null):e.yg().Cg(e,-1-l,null,null))),g=a(r,42),g&&(b=g.Ag(e,xr(g.mg(),this.b),null,b)),b=e.lg(g,f,b),b&&b.Th()}else e.eg()&&e.fg()&&Bi(e,new fs(e,1,f,r,r))},u.Ej=function(){return!1};var iXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainer",702);T(1364,702,{},QTt),u.Ej=function(){return!0};var rXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving",1364);T(512,461,{}),u.cj=function(e,n,i,r,c){var l;return l=n.Tg(i),l==null?this.b:zt(l)===zt(lg)?null:l},u.fj=function(e,n,i){var r;return r=n.Tg(i),r!=null&&(zt(r)===zt(lg)||!Fi(r,this.b))},u.gj=function(e,n,i,r){var c,l;e.eg()&&e.fg()?(c=(l=n.Tg(i),l==null?this.b:zt(l)===zt(lg)?null:l),r==null?this.c!=null?(n.Ug(i,null),r=this.b):this.b!=null?n.Ug(i,lg):n.Ug(i,null):(this.ck(r),n.Ug(i,r)),Bi(e,this.d.dk(e,1,this.e,c,r))):r==null?this.c!=null?n.Ug(i,null):this.b!=null?n.Ug(i,lg):n.Ug(i,null):(this.ck(r),n.Ug(i,r))},u.ck=function(e){throw K(new g9)};var sXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData",512);T($_,1,{},zk),u.dk=function(e,n,i,r,c){return new pL(e,n,i,r,c)},u.ek=function(e,n,i,r,c,l){return new Xot(e,n,i,r,c,l)};var n_t,i_t,r_t,s_t,o_t,c_t,a_t,ftt,u_t,oXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator",$_);T(1379,$_,{},Rz),u.dk=function(e,n,i,r,c){return new Lct(e,n,i,lt(de(r)),lt(de(c)))},u.ek=function(e,n,i,r,c,l){return new XAt(e,n,i,lt(de(r)),lt(de(c)),l)};var cXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1",1379);T(1380,$_,{},jk),u.dk=function(e,n,i,r,c){return new sat(e,n,i,a(r,192).a,a(c,192).a)},u.ek=function(e,n,i,r,c,l){return new jAt(e,n,i,a(r,192).a,a(c,192).a,l)};var aXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2",1380);T(1381,$_,{},OR),u.dk=function(e,n,i,r,c){return new oat(e,n,i,a(r,159).a,a(c,159).a)},u.ek=function(e,n,i,r,c,l){return new HAt(e,n,i,a(r,159).a,a(c,159).a,l)};var uXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3",1381);T(1382,$_,{},BR),u.dk=function(e,n,i,r,c){return new Act(e,n,i,lt(Yt(r)),lt(Yt(c)))},u.ek=function(e,n,i,r,c,l){return new GAt(e,n,i,lt(Yt(r)),lt(Yt(c)),l)};var lXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4",1382);T(1383,$_,{},FR),u.dk=function(e,n,i,r,c){return new uat(e,n,i,a(r,126).a,a(c,126).a)},u.ek=function(e,n,i,r,c,l){return new WAt(e,n,i,a(r,126).a,a(c,126).a,l)};var hXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5",1383);T(1384,$_,{},qS),u.dk=function(e,n,i,r,c){return new kct(e,n,i,a(r,21).a,a(c,21).a)},u.ek=function(e,n,i,r,c,l){return new $At(e,n,i,a(r,21).a,a(c,21).a,l)};var fXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6",1384);T(1385,$_,{},Dz),u.dk=function(e,n,i,r,c){return new cat(e,n,i,a(r,149).a,a(c,149).a)},u.ek=function(e,n,i,r,c,l){return new VAt(e,n,i,a(r,149).a,a(c,149).a,l)};var dXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7",1385);T(1386,$_,{},UR),u.dk=function(e,n,i,r,c){return new aat(e,n,i,a(r,168).a,a(c,168).a)},u.ek=function(e,n,i,r,c,l){return new qAt(e,n,i,a(r,168).a,a(c,168).a,l)};var pXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8",1386);T(1366,512,{},N4t),u.ck=function(e){if(!this.a.Li(e))throw K(new bT(BO+du(e)+FO+this.a+"'"))};var gXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic",1366);T(1367,512,{},UCt),u.ck=function(e){};var mXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic",1367);T(703,512,{}),u.fj=function(e,n,i){var r;return r=n.Tg(i),r!=null},u.gj=function(e,n,i,r){var c,l;e.eg()&&e.fg()?(c=!0,l=n.Tg(i),l==null?(c=!1,l=this.b):zt(l)===zt(lg)&&(l=null),r==null?this.c!=null?(n.Ug(i,null),r=this.b):n.Ug(i,lg):(this.ck(r),n.Ug(i,r)),Bi(e,this.d.ek(e,1,this.e,l,r,!c))):r==null?this.c!=null?n.Ug(i,null):n.Ug(i,lg):(this.ck(r),n.Ug(i,r))};var bXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable",703);T(1368,703,{},O4t),u.ck=function(e){if(!this.a.Li(e))throw K(new bT(BO+du(e)+FO+this.a+"'"))};var wXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic",1368);T(1369,703,{},zCt),u.ck=function(e){};var vXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic",1369);T(370,461,{},BD),u.cj=function(e,n,i,r,c){var l,f,g,b,v;if(v=n.Tg(i),this.Zi()&&zt(v)===zt(lg))return null;if(this.Ej()&&r&&v!=null){if(g=a(v,42),g.Eg()&&(b=B1(e,g),g!=b)){if(!GX(this.a,b))throw K(new bT(BO+du(b)+FO+this.a+"'"));n.Ug(i,v=b),this.Dj()&&(l=a(b,42),f=g.Cg(e,this.b?xr(g.mg(),this.b):-1-xr(e.mg(),this.e),null,null),!l.yg()&&(f=l.Ag(e,this.b?xr(l.mg(),this.b):-1-xr(e.mg(),this.e),null,f)),f&&f.Th()),e.eg()&&e.fg()&&Bi(e,new pL(e,9,this.e,g,b))}return v}else return v},u.dj=function(e,n,i,r,c){var l,f;return f=n.Tg(i),zt(f)===zt(lg)&&(f=null),n.Ug(i,r),this.qi()?zt(f)!==zt(r)&&f!=null&&(l=a(f,42),c=l.Cg(e,xr(l.mg(),this.b),null,c)):this.Dj()&&f!=null&&(c=a(f,42).Cg(e,-1-xr(e.mg(),this.e),null,c)),e.eg()&&e.fg()&&(!c&&(c=new w1(4)),c.Sh(new pL(e,1,this.e,f,r))),c},u.ej=function(e,n,i,r,c){var l;return l=n.Tg(i),zt(l)===zt(lg)&&(l=null),n.Vg(i),e.eg()&&e.fg()&&(!c&&(c=new w1(4)),this.Zi()?c.Sh(new pL(e,2,this.e,l,null)):c.Sh(new pL(e,1,this.e,l,null))),c},u.fj=function(e,n,i){var r;return r=n.Tg(i),r!=null},u.gj=function(e,n,i,r){var c,l,f,g,b;if(r!=null&&!GX(this.a,r))throw K(new bT(BO+(ct(r,51)?slt(a(r,51).mg()):Jct(du(r)))+FO+this.a+"'"));b=n.Tg(i),g=b!=null,this.Zi()&&zt(b)===zt(lg)&&(b=null),f=null,this.qi()?zt(b)!==zt(r)&&(b!=null&&(c=a(b,42),f=c.Cg(e,xr(c.mg(),this.b),null,null)),r!=null&&(c=a(r,42),f=c.Ag(e,xr(c.mg(),this.b),null,f))):this.Dj()&&zt(b)!==zt(r)&&(b!=null&&(f=a(b,42).Cg(e,-1-xr(e.mg(),this.e),null,null)),r!=null&&(f=a(r,42).Ag(e,-1-xr(e.mg(),this.e),null,f))),r==null&&this.Zi()?n.Ug(i,lg):n.Ug(i,r),e.eg()&&e.fg()?(l=new Xot(e,1,this.e,b,r,this.Zi()&&!g),f?(f.Sh(l),f.Th()):Bi(e,l)):f&&f.Th()},u.qi=function(){return!1},u.Dj=function(){return!1},u.Ej=function(){return!1},u.Zi=function(){return!1};var _Xe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObject",370);T(513,370,{},KW),u.Dj=function(){return!0};var yXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment",513);T(1372,513,{},ZSt),u.Ej=function(){return!0};var xXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving",1372);T(705,513,{},lst),u.Zi=function(){return!0};var MXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable",705);T(1374,705,{},YSt),u.Ej=function(){return!0};var EXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving",1374);T(585,513,{},d$),u.qi=function(){return!0};var SXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse",585);T(1373,585,{},tCt),u.Ej=function(){return!0};var TXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving",1373);T(706,585,{},$st),u.Zi=function(){return!0};var CXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable",706);T(1375,706,{},eCt),u.Ej=function(){return!0};var AXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving",1375);T(586,370,{},ust),u.Ej=function(){return!0};var kXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving",586);T(1376,586,{},KSt),u.Zi=function(){return!0};var LXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable",1376);T(707,586,{},Wst),u.qi=function(){return!0};var PXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse",707);T(1377,707,{},nCt),u.Zi=function(){return!0};var IXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable",1377);T(1370,370,{},JSt),u.Zi=function(){return!0};var RXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable",1370);T(704,370,{},Vst),u.qi=function(){return!0};var DXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse",704);T(1371,704,{},iCt),u.Zi=function(){return!0};var NXe=A(Re,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable",1371);T(708,514,OO,Oot),u._j=function(e){return new Oot(this.a,this.c,e)},u.lc=function(){return this.b},u.ak=function(e,n,i){return Pae(this,e,this.b,i)},u.bk=function(e,n,i){return Iae(this,e,this.b,i)};var OXe=A(Re,"EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry",708);T(1378,514,OO,Hkt),u.$j=function(e){return new n$((fr(),SI),this.b.Zg(this.a,e))},u.lc=function(){return null},u.ak=function(e,n,i){return i},u.bk=function(e,n,i){return i};var BXe=A(Re,"EStructuralFeatureImpl/SimpleContentFeatureMapEntry",1378);T(587,514,OO,n$),u.$j=function(e){return new n$(this.c,e)},u.lc=function(){return this.a},u.ak=function(e,n,i){return i},u.bk=function(e,n,i){return i};var FXe=A(Re,"EStructuralFeatureImpl/SimpleFeatureMapEntry",587);T(361,451,Nf,kb),u.Fh=function(e){return dt(Dl,te,24,e,0,1)},u.Bh=function(){return!1};var UXe=A(Re,"ESuperAdapter/1",361);T(411,399,{95:1,91:1,87:1,139:1,174:1,51:1,103:1,742:1,42:1,92:1,142:1,411:1,107:1,108:1},Hk),u.ug=function(e,n,i){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),this.Ab;case 1:return this.zb;case 2:return!this.a&&(this.a=new dL(this,Do,this)),this.a}return Xu(this,e-ei((ye(),my)),Ve((r=a(an(this,16),24),r||my),e),n,i)},u.Dg=function(e,n,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),$s(this.Ab,e,i);case 2:return!this.a&&(this.a=new dL(this,Do,this)),$s(this.a,e,i)}return c=a(Ve((r=a(an(this,16),24),r||(ye(),my)),n),61),c.aj().ej(this,ra(this),n-ei((ye(),my)),e,i)},u.Fg=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return!!this.a&&this.a.i!=0}return Vu(this,e-ei((ye(),my)),Ve((n=a(an(this,16),24),n||my),e))},u.Mg=function(e,n){var i;switch(e){case 0:!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Dr(this.Ab),!this.Ab&&(this.Ab=new Wt(Ui,this,0,3)),Lr(this.Ab,a(n,13));return;case 1:kh(this,hi(n));return;case 2:!this.a&&(this.a=new dL(this,Do,this)),Dr(this.a),!this.a&&(this.a=new dL(this,Do,this)),Lr(this.a,a(n,13));return}Ku(this,e-ei((ye(),my)),Ve((i=a(an(this,16),24),i||my),e),n)},u.Rg=function(){return ye(),my};var zXe=A(Re,"ETypeParameterImpl",411);T(457,88,Zo,dL),u.ri=function(e,n){return _1e(this,a(e,84),n)},u.si=function(e,n){return y1e(this,a(e,84),n)};var jXe=A(Re,"ETypeParameterImpl/1",457);T(579,44,rx,zG),u.Xb=function(){return new fT(this)};var HXe=A(Re,"ETypeParameterImpl/2",579);T(508,bd,vl,fT),u.nc=function(e){return oTt(this,a(e,84))},u.oc=function(e){var n,i,r;for(r=!1,i=e.tc();i.hc();)n=a(i.ic(),84),wr(this.a,n,"")==null&&(r=!0);return r},u.Pb=function(){lu(this.a)},u.pc=function(e){return dm(this.a,e)},u.tc=function(){var e;return e=new qg(new xp(this.a).a),new dT(e)},u.vc=function(e){return Kkt(this,e)},u._b=function(){return nM(this.a)};var GXe=A(Re,"ETypeParameterImpl/2/1",508);T(509,1,Cs,dT),u.gc=function(e){ks(this,e)},u.ic=function(){return a(Sm(this.a).kc(),84)},u.hc=function(){return this.a.b},u.jc=function(){O5t(this.a)};var WXe=A(Re,"ETypeParameterImpl/2/1/1",509);T(1169,44,rx,Dxt),u.Qb=function(e){return Es(e)?V$(this,e):!!Ea(this.d,e)},u.Vb=function(e){var n,i;return n=Es(e)?Zc(this,e):za(Ea(this.d,e)),ct(n,743)?(i=a(n,743),n=i.mj(),wr(this,a(e,207),n),n):n??(e==null?(JG(),oXt):null)};var $Xe=A(Re,"EValidatorRegistryImpl",1169);T(1362,638,{95:1,91:1,87:1,430:1,139:1,51:1,103:1,1635:1,42:1,92:1,142:1,107:1,108:1},zR),u.Zg=function(e,n){switch(e.Ni()){case 21:case 22:case 23:case 24:case 26:case 31:case 32:case 37:case 38:case 39:case 40:case 43:case 44:case 48:case 49:case 20:return n==null?null:Yc(n);case 25:return Fue(n);case 27:return tue(n);case 28:return eue(n);case 29:return n==null?null:uSt(CA[0],a(n,181));case 41:return n==null?"":Og(a(n,274));case 42:return Yc(n);case 50:return hi(n);default:throw K(new yn(_E+e.be()+Gm))}},u.$g=function(e){var n,i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt;switch(e.G==-1&&(e.G=(R=Zu(e),R?Hp(R.bh(),e):-1)),e.G){case 0:return i=new UG,i;case 1:return n=new IR,n;case 2:return r=new u5,r;case 4:return c=new x,c;case 5:return l=new Ixt,l;case 6:return f=new C5,f;case 7:return g=new E8,g;case 10:return v=new zl,v;case 11:return M=new BG,M;case 12:return k=new G4t,k;case 13:return N=new FG,N;case 14:return $=new dst,$;case 17:return G=new NR,G;case 18:return b=new b1,b;case 19:return nt=new Hk,nt;default:throw K(new yn(XY+e.zb+Gm))}},u._g=function(e,n){switch(e.Ni()){case 20:return n==null?null:new Pit(n);case 21:return n==null?null:new y1(n);case 23:case 22:return n==null?null:kfe(n);case 26:case 24:return n==null?null:LL(ku(n,-128,127)<<24>>24);case 25:return cme(n);case 27:return Rde(n);case 28:return Dde(n);case 29:return ige(n);case 32:case 31:return n==null?null:rw(n);case 38:case 37:return n==null?null:new mT(n);case 40:case 39:return n==null?null:Xt(ku(n,Vs,qi));case 41:return null;case 42:return n==null,null;case 44:case 43:return n==null?null:Qg(Y7(n));case 49:case 48:return n==null?null:HM(ku(n,UO,32767)<<16>>16);case 50:return n;default:throw K(new yn(_E+e.be()+Gm))}};var VXe=A(Re,"EcoreFactoryImpl",1362);T(504,248,{95:1,91:1,87:1,139:1,174:1,51:1,207:1,103:1,1633:1,42:1,92:1,142:1,248:1,504:1,107:1,108:1,613:1},y4t),u.gb=!1,u.hb=!1;var l_t,sXt=!1,qXe=A(Re,"EcorePackageImpl",504);T(1111,1,{743:1},Nz),u.mj=function(){return mSt(),cXt};var XXe=A(Re,"EcorePackageImpl/1",1111);T(1120,1,wi,Gk),u.Li=function(e){return ct(e,139)},u.Mi=function(e){return dt(mI,te,139,e,0,1)};var ZXe=A(Re,"EcorePackageImpl/10",1120);T(1121,1,wi,jR),u.Li=function(e){return ct(e,174)},u.Mi=function(e){return dt(itt,te,174,e,0,1)};var YXe=A(Re,"EcorePackageImpl/11",1121);T(1122,1,wi,Wk),u.Li=function(e){return ct(e,51)},u.Mi=function(e){return dt(Nw,te,51,e,0,1)};var KXe=A(Re,"EcorePackageImpl/12",1122);T(1123,1,wi,Oz),u.Li=function(e){return ct(e,371)},u.Mi=function(e){return dt(ph,Qpt,53,e,0,1)};var JXe=A(Re,"EcorePackageImpl/13",1123);T(1124,1,wi,$k),u.Li=function(e){return ct(e,207)},u.Mi=function(e){return dt(of,te,207,e,0,1)};var QXe=A(Re,"EcorePackageImpl/14",1124);T(1125,1,wi,oo),u.Li=function(e){return ct(e,468)},u.Mi=function(e){return dt(Fw,te,1703,e,0,1)};var tZe=A(Re,"EcorePackageImpl/15",1125);T(1126,1,wi,Bz),u.Li=function(e){return ct(e,62)},u.Mi=function(e){return dt(Uw,W_,17,e,0,1)};var eZe=A(Re,"EcorePackageImpl/16",1126);T(1127,1,wi,Fz),u.Li=function(e){return ct(e,158)},u.Mi=function(e){return dt(Ra,W_,158,e,0,1)};var nZe=A(Re,"EcorePackageImpl/17",1127);T(1128,1,wi,U3),u.Li=function(e){return ct(e,431)},u.Mi=function(e){return dt(Bw,te,431,e,0,1)};var iZe=A(Re,"EcorePackageImpl/18",1128);T(1129,1,wi,HR),u.Li=function(e){return ct(e,505)},u.Mi=function(e){return dt(Dc,xUt,505,e,0,1)};var rZe=A(Re,"EcorePackageImpl/19",1129);T(1112,1,wi,Uz),u.Li=function(e){return ct(e,335)},u.Mi=function(e){return dt(py,W_,29,e,0,1)};var sZe=A(Re,"EcorePackageImpl/2",1112);T(1130,1,wi,zz),u.Li=function(e){return ct(e,217)},u.Mi=function(e){return dt(Do,UUt,84,e,0,1)};var oZe=A(Re,"EcorePackageImpl/20",1130);T(1131,1,wi,yp),u.Li=function(e){return ct(e,411)},u.Mi=function(e){return dt(vu,te,742,e,0,1)};var cZe=A(Re,"EcorePackageImpl/21",1131);T(1132,1,wi,jz),u.Li=function(e){return Hb(e)},u.Mi=function(e){return dt(ho,wt,434,e,8,1)};var aZe=A(Re,"EcorePackageImpl/22",1132);T(1133,1,wi,XS),u.Li=function(e){return ct(e,173)},u.Mi=function(e){return dt(Da,wt,173,e,0,2)};var uZe=A(Re,"EcorePackageImpl/23",1133);T(1134,1,wi,Vk),u.Li=function(e){return ct(e,192)},u.Mi=function(e){return dt(dx,wt,192,e,0,1)};var lZe=A(Re,"EcorePackageImpl/24",1134);T(1135,1,wi,GR),u.Li=function(e){return ct(e,159)},u.Mi=function(e){return dt(F4,wt,159,e,0,1)};var hZe=A(Re,"EcorePackageImpl/25",1135);T(1136,1,wi,WR),u.Li=function(e){return ct(e,181)},u.Mi=function(e){return dt(JO,wt,181,e,0,1)};var fZe=A(Re,"EcorePackageImpl/26",1136);T(1137,1,wi,Fd),u.Li=function(e){return!1},u.Mi=function(e){return dt(A_t,te,1787,e,0,1)};var dZe=A(Re,"EcorePackageImpl/27",1137);T(1138,1,wi,Lb),u.Li=function(e){return Gb(e)},u.Mi=function(e){return dt(To,wt,315,e,7,1)};var pZe=A(Re,"EcorePackageImpl/28",1138);T(1139,1,wi,qk),u.Li=function(e){return ct(e,52)},u.Mi=function(e){return dt(Gvt,fw,52,e,0,1)};var gZe=A(Re,"EcorePackageImpl/29",1139);T(1113,1,wi,$R),u.Li=function(e){return ct(e,469)},u.Mi=function(e){return dt(Ui,{3:1,4:1,5:1,1627:1},609,e,0,1)};var mZe=A(Re,"EcorePackageImpl/3",1113);T(1140,1,wi,ZS),u.Li=function(e){return ct(e,525)},u.Mi=function(e){return dt(Vvt,te,1634,e,0,1)};var bZe=A(Re,"EcorePackageImpl/30",1140);T(1141,1,wi,VR),u.Li=function(e){return ct(e,184)},u.Mi=function(e){return dt(g_t,fw,184,e,0,1)};var wZe=A(Re,"EcorePackageImpl/31",1141);T(1142,1,wi,Xk),u.Li=function(e){return ct(e,75)},u.Mi=function(e){return dt(ZF,XUt,75,e,0,1)};var vZe=A(Re,"EcorePackageImpl/32",1142);T(1143,1,wi,qR),u.Li=function(e){return ct(e,126)},u.Mi=function(e){return dt(CE,wt,126,e,0,1)};var _Ze=A(Re,"EcorePackageImpl/33",1143);T(1144,1,wi,Zk),u.Li=function(e){return ct(e,21)},u.Mi=function(e){return dt(Io,wt,21,e,0,1)};var yZe=A(Re,"EcorePackageImpl/34",1144);T(1145,1,wi,Yk),u.Li=function(e){return ct(e,274)},u.Mi=function(e){return dt(f1t,te,274,e,0,1)};var xZe=A(Re,"EcorePackageImpl/35",1145);T(1146,1,wi,Pb),u.Li=function(e){return ct(e,149)},u.Mi=function(e){return dt(Vm,wt,149,e,0,1)};var MZe=A(Re,"EcorePackageImpl/36",1146);T(1147,1,wi,Hz),u.Li=function(e){return ct(e,109)},u.Mi=function(e){return dt(d1t,te,109,e,0,1)};var EZe=A(Re,"EcorePackageImpl/37",1147);T(1148,1,wi,Ib),u.Li=function(e){return ct(e,534)},u.Mi=function(e){return dt(h_t,te,534,e,0,1)};var SZe=A(Re,"EcorePackageImpl/38",1148);T(1149,1,wi,XR),u.Li=function(e){return!1},u.Mi=function(e){return dt(k_t,te,1788,e,0,1)};var TZe=A(Re,"EcorePackageImpl/39",1149);T(1114,1,wi,ZR),u.Li=function(e){return ct(e,96)},u.Mi=function(e){return dt(Dl,te,24,e,0,1)};var CZe=A(Re,"EcorePackageImpl/4",1114);T(1150,1,wi,Kk),u.Li=function(e){return ct(e,168)},u.Mi=function(e){return dt(qm,wt,168,e,0,1)};var AZe=A(Re,"EcorePackageImpl/40",1150);T(1151,1,wi,Gz),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var kZe=A(Re,"EcorePackageImpl/41",1151);T(1152,1,wi,Wz),u.Li=function(e){return ct(e,532)},u.Mi=function(e){return dt($vt,te,532,e,0,1)};var LZe=A(Re,"EcorePackageImpl/42",1152);T(1153,1,wi,$z),u.Li=function(e){return!1},u.Mi=function(e){return dt(L_t,wt,1789,e,0,1)};var PZe=A(Re,"EcorePackageImpl/43",1153);T(1154,1,wi,YR),u.Li=function(e){return ct(e,38)},u.Mi=function(e){return dt(V_,te,38,e,0,1)};var IZe=A(Re,"EcorePackageImpl/44",1154);T(1115,1,wi,KR),u.Li=function(e){return ct(e,133)},u.Mi=function(e){return dt(cf,te,133,e,0,1)};var RZe=A(Re,"EcorePackageImpl/5",1115);T(1116,1,wi,Vz),u.Li=function(e){return ct(e,140)},u.Mi=function(e){return dt(utt,te,140,e,0,1)};var DZe=A(Re,"EcorePackageImpl/6",1116);T(1117,1,wi,JR),u.Li=function(e){return ct(e,425)},u.Mi=function(e){return dt(XF,te,608,e,0,1)};var NZe=A(Re,"EcorePackageImpl/7",1117);T(1118,1,wi,QR),u.Li=function(e){return ct(e,525)},u.Mi=function(e){return dt(Qp,te,617,e,0,1)};var OZe=A(Re,"EcorePackageImpl/8",1118);T(1119,1,wi,td),u.Li=function(e){return ct(e,430)},u.Mi=function(e){return dt(TA,te,430,e,0,1)};var BZe=A(Re,"EcorePackageImpl/9",1119);T(915,1673,yUt,Xxt),u.sh=function(e,n){she(this,a(n,380))},u.vh=function(e,n){X8t(this,e,a(n,380))};var FZe=A(Re,"MinimalEObjectImpl/1ArrayDelegatingAdapterList",915);T(916,136,o6,l4t),u.Oh=function(){return this.a.a};var UZe=A(Re,"MinimalEObjectImpl/1ArrayDelegatingAdapterList/1",916);T(955,954,{},tSt);var zZe=A("org.eclipse.emf.ecore.plugin","EcorePlugin",955),h_t=Sr(ZUt,"Resource");T(719,1492,YUt),u.ik=function(e){},u.jk=function(e){},u.fk=function(){return!this.a&&(this.a=new S5(this)),this.a},u.gk=function(e){var n,i,r,c,l;if(r=e.length,r>0)if(e.charCodeAt(0)==47){for(l=new qu(4),c=1,n=1;n0&&(e=e.substr(0,i)));return B0e(this,e)},u.hk=function(){return this.c},u.Ib=function(){return Og(this.ql)+"@"+(Yr(this)>>>0).toString(16)+" uri='"+this.d+"'"},u.b=!1;var jZe=A(uK,"ResourceImpl",719);T(1493,719,YUt,kG);var HZe=A(uK,"BinaryResourceImpl",1493);T(1048,629,iK),u.Gh=function(e){return ct(e,51)?coe(this,a(e,51)):ct(e,534)?new $n(a(e,534).fk()):zt(e)===zt(this.f)?a(e,13).tc():(YT(),vI.a)},u.hc=function(){return Ult(this)},u.a=!1;var GZe=A(hr,"EcoreUtil/ContentTreeIterator",1048);T(1494,1048,iK,VCt),u.Gh=function(e){return zt(e)===zt(this.f)?a(e,15).tc():new dkt(a(e,51))};var WZe=A(uK,"ResourceImpl/5",1494);T(595,1687,FUt,S5),u.pc=function(e){return this.i<=4?XC(this,e):ct(e,42)&&a(e,42).sg()==this.a},u.sh=function(e,n){e==this.i-1&&(this.a.b||(this.a.b=!0))},u.uh=function(e,n){e==0?this.a.b||(this.a.b=!0):wV(this,e,n)},u.vh=function(e,n){},u.wh=function(e,n,i){},u.pi=function(){return 2},u.Oh=function(){return this.a},u.qi=function(){return!0},u.ri=function(e,n){var i;return i=a(e,42),n=i.Pg(this.a,n),n},u.si=function(e,n){var i;return i=a(e,42),i.Pg(null,n)},u.ti=function(){return!1},u.xh=function(){return!0},u.Fh=function(e){return dt(Nw,te,51,e,0,1)},u.Bh=function(){return!1};var $Ze=A(uK,"ResourceImpl/ContentsEList",595);T(873,1657,Q2,T5),u.fd=function(e){return this.a.qh(e)},u._b=function(){return this.a._b()};var VZe=A(hr,"AbstractSequentialInternalEList/1",873),f_t,d_t,eo,p_t;T(567,1,{},dCt);var YF,KF,qZe=A(hr,"BasicExtendedMetaData",567);T(1023,1,{},yEt),u.kk=function(){return null},u.lk=function(){return this.a==-2&&qnt(this,rge(this.d,this.b)),this.a},u.mk=function(){return null},u.nk=function(){return we(),we(),fo},u.be=function(){return this.c==ME&&Vj(this,sRt(this.d,this.b)),this.c},u.ok=function(){return 0},u.a=-2,u.c=ME;var XZe=A(hr,"BasicExtendedMetaData/EClassExtendedMetaDataImpl",1023);T(oh,1,{},YAt),u.kk=function(){return this.a==(PM(),YF)&&Xnt(this,vwe(this.f,this.b)),this.a},u.lk=function(){return 0},u.mk=function(){return this.c==(PM(),YF)&&qj(this,_we(this.f,this.b)),this.c},u.nk=function(){return!this.d&&Znt(this,Jve(this.f,this.b)),this.d},u.be=function(){return this.e==ME&&Ynt(this,sRt(this.f,this.b)),this.e},u.ok=function(){return this.g==-2&&Knt(this,R1e(this.f,this.b)),this.g},u.e=ME,u.g=-2;var ZZe=A(hr,"BasicExtendedMetaData/EDataTypeExtendedMetaDataImpl",oh);T(1022,1,{},xEt),u.b=!1,u.c=!1;var YZe=A(hr,"BasicExtendedMetaData/EPackageExtendedMetaDataImpl",1022);T(1025,1,{},KAt),u.c=-2,u.e=ME,u.f=ME;var KZe=A(hr,"BasicExtendedMetaData/EStructuralFeatureExtendedMetaDataImpl",1025);T(529,565,Zo,kD),u.pi=function(){return this.c},u.Rj=function(){return!1},u.zh=function(e,n){return n},u.c=0;var JZe=A(hr,"EDataTypeEList",529),g_t=Sr(hr,"FeatureMap");T(90,529,{3:1,4:1,20:1,25:1,41:1,13:1,15:1,49:1,59:1,55:1,52:1,81:1,184:1,237:1,1630:1,64:1},_s),u.bd=function(e,n){ybe(this,e,a(n,75))},u.nc=function(e){return nbe(this,a(e,75))},u.nh=function(e){wse(this,a(e,75))},u.ri=function(e,n){return Lne(this,a(e,75),n)},u.si=function(e,n){return zst(this,a(e,75),n)},u.zh=function(e,n){return Yye(this,e,a(n,75))},u.hd=function(e,n){return Kbe(this,e,a(n,75))},u.yi=function(e,n){return Pne(this,a(e,75),n)},u.zi=function(e,n){return HTt(this,a(e,75),n)},u.Ai=function(e,n,i){return G1e(this,a(e,75),a(n,75),i)},u.Ch=function(e,n){return lX(this,e,a(n,75))},u.oc=function(e){var n,i,r,c,l,f,g,b,v;for(b=new n_(e._b()),r=e.tc();r.hc();)if(i=a(r.ic(),75),c=i.nj(),Om(this.e,c))(!c.xh()||!_V(this,c,i.lc())&&!XC(b,i))&&ni(b,i);else{for(v=mu(this.e.mg(),c),n=a(this.g,124),l=!0,f=0;f=0;)if(n=e[this.c],this.k.Bk(n.nj()))return this.j=this.f?n:n.lc(),this.i=-2,!0;return this.i=-1,this.g=-1,!1};var eYe=A(hr,"BasicFeatureMap/FeatureEIterator",377);T(601,377,kf,LW),u.Xj=function(){return!0};var nYe=A(hr,"BasicFeatureMap/ResolvingFeatureEIterator",601);T(871,444,DO,lSt),u.Uh=function(){return this};var iYe=A(hr,"EContentsEList/1",871);T(872,444,DO,REt),u.Xj=function(){return!1};var rYe=A(hr,"EContentsEList/2",872);T(870,260,NO,hSt),u.Zj=function(e){},u.hc=function(){return!1},u.Cc=function(){return!1};var sYe=A(hr,"EContentsEList/FeatureIteratorImpl/1",870);T(734,529,Zo,qrt),u.th=function(){this.a=!0},u.ui=function(){return this.a},u.ij=function(){var e;Dr(this),Xl(this.e)?(e=this.a,this.a=!1,Bi(this.e,new Jl(this.e,2,this.c,e,!1))):this.a=!1},u.a=!1;var oYe=A(hr,"EDataTypeEList/Unsettable",734);T(1566,529,Zo,_St),u.xh=function(){return!0};var cYe=A(hr,"EDataTypeUniqueEList",1566);T(1567,734,Zo,ySt),u.xh=function(){return!0};var aYe=A(hr,"EDataTypeUniqueEList/Unsettable",1567);T(156,88,Zo,Gu),u.Qj=function(){return!0},u.zh=function(e,n){return q2(this,e,a(n,51))};var uYe=A(hr,"EObjectContainmentEList/Resolving",156);T(1026,493,Zo,vSt),u.Qj=function(){return!0},u.zh=function(e,n){return q2(this,e,a(n,51))};var lYe=A(hr,"EObjectContainmentEList/Unsettable/Resolving",1026);T(679,18,Zo,kst),u.th=function(){this.a=!0},u.ui=function(){return this.a},u.ij=function(){var e;Dr(this),Xl(this.e)?(e=this.a,this.a=!1,Bi(this.e,new Jl(this.e,2,this.c,e,!1))):this.a=!1},u.a=!1;var hYe=A(hr,"EObjectContainmentWithInverseEList/Unsettable",679);T(1044,679,Zo,MTt),u.Qj=function(){return!0},u.zh=function(e,n){return q2(this,e,a(n,51))};var fYe=A(hr,"EObjectContainmentWithInverseEList/Unsettable/Resolving",1044);T(675,450,Zo,Xrt),u.th=function(){this.a=!0},u.ui=function(){return this.a},u.ij=function(){var e;Dr(this),Xl(this.e)?(e=this.a,this.a=!1,Bi(this.e,new Jl(this.e,2,this.c,e,!1))):this.a=!1},u.a=!1;var dYe=A(hr,"EObjectEList/Unsettable",675);T(376,450,Zo,dM),u.Qj=function(){return!0},u.zh=function(e,n){return q2(this,e,a(n,51))};var pYe=A(hr,"EObjectResolvingEList",376);T(1554,675,Zo,xSt),u.Qj=function(){return!0},u.zh=function(e,n){return q2(this,e,a(n,51))};var gYe=A(hr,"EObjectResolvingEList/Unsettable",1554);T(1495,1,{},Ig);var oXt,mYe=A(hr,"EObjectValidator",1495);T(496,450,Zo,VD),u.Lj=function(){return this.d},u.Mj=function(){return this.b},u.qi=function(){return!0},u.Pj=function(){return!0},u.b=0;var bYe=A(hr,"EObjectWithInverseEList",496);T(1047,496,Zo,ETt),u.Oj=function(){return!0};var wYe=A(hr,"EObjectWithInverseEList/ManyInverse",1047);T(572,496,Zo,s$),u.th=function(){this.a=!0},u.ui=function(){return this.a},u.ij=function(){var e;Dr(this),Xl(this.e)?(e=this.a,this.a=!1,Bi(this.e,new Jl(this.e,2,this.c,e,!1))):this.a=!1},u.a=!1;var vYe=A(hr,"EObjectWithInverseEList/Unsettable",572);T(1046,572,Zo,STt),u.Oj=function(){return!0};var _Ye=A(hr,"EObjectWithInverseEList/Unsettable/ManyInverse",1046);T(680,496,Zo,Lst),u.Qj=function(){return!0},u.zh=function(e,n){return q2(this,e,a(n,51))};var yYe=A(hr,"EObjectWithInverseResolvingEList",680);T(33,680,Zo,pn),u.Oj=function(){return!0};var xYe=A(hr,"EObjectWithInverseResolvingEList/ManyInverse",33);T(681,572,Zo,Pst),u.Qj=function(){return!0},u.zh=function(e,n){return q2(this,e,a(n,51))};var MYe=A(hr,"EObjectWithInverseResolvingEList/Unsettable",681);T(1045,681,Zo,TTt),u.Oj=function(){return!0};var EYe=A(hr,"EObjectWithInverseResolvingEList/Unsettable/ManyInverse",1045);T(1027,565,Zo),u.rh=function(){return(this.b&1792)==0},u.th=function(){this.b|=1},u.Nj=function(){return(this.b&4)!=0},u.qi=function(){return(this.b&40)!=0},u.Oj=function(){return(this.b&16)!=0},u.Pj=function(){return(this.b&8)!=0},u.Qj=function(){return(this.b&mw)!=0},u.Dj=function(){return(this.b&32)!=0},u.Rj=function(){return(this.b&oh)!=0},u.Li=function(e){return this.d?fkt(this.d,e):this.nj().jj().Li(e)},u.ui=function(){return this.b&2?(this.b&1)!=0:this.i!=0},u.xh=function(){return(this.b&128)!=0},u.ij=function(){var e;Dr(this),this.b&2&&(Xl(this.e)?(e=(this.b&1)!=0,this.b&=-2,Wn(this,new Jl(this.e,2,xr(this.e.mg(),this.nj()),e,!1))):this.b&=-2)},u.Bh=function(){return(this.b&1536)==0},u.b=0;var SYe=A(hr,"EcoreEList/Generic",1027);T(1028,1027,Zo,$4t),u.nj=function(){return this.a};var TYe=A(hr,"EcoreEList/Dynamic",1028);T(678,55,Nf,gT),u.Fh=function(e){return zL(this.a.a,e)};var CYe=A(hr,"EcoreEMap/1",678);T(677,88,Zo,yot),u.sh=function(e,n){p7(this.b,a(n,134))},u.uh=function(e,n){ZPt(this.b)},u.vh=function(e,n){Tq(this.b,a(n,134))},u.wh=function(e,n,i){Tq(this.b,a(i,134)),zt(i)===zt(n)&&a(i,134).jh(oee(a(n,134).kc())),p7(this.b,a(n,134))};var AYe=A(hr,"EcoreEMap/DelegateEObjectContainmentEList",677);T(1042,143,Jpt,nPt);var kYe=A(hr,"EcoreEMap/Unsettable",1042);T(1043,677,Zo,CTt),u.th=function(){this.a=!0},u.ui=function(){return this.a},u.ij=function(){var e;Dr(this),Xl(this.e)?(e=this.a,this.a=!1,Bi(this.e,new Jl(this.e,2,this.c,e,!1))):this.a=!1},u.a=!1;var LYe=A(hr,"EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList",1043);T(682,1,Cs,dkt),u.gc=function(e){ks(this,e)},u.hc=function(){return GIt(this)},u.ic=function(){var e;return GIt(this),e=this.b,this.b=null,e},u.jc=function(){this.a.jc()};var PYe=A(hr,"EcoreUtil/ProperContentIterator",682);T(1496,1495,{},Tj);var cXt,IYe=A(hr,"EcoreValidator",1496),aXt,RYe=Sr(hr,"FeatureMapUtil/Validator");T(1095,1,{1632:1},qz),u.Bk=function(e){return!0};var DYe=A(hr,"FeatureMapUtil/1",1095);T(692,1,{1632:1},Yht),u.Bk=function(e){var n;return this.c==e?!0:(n=de(zi(this.a,e)),n==null?uve(this,e)?(i5t(this.a,e,(me(),TE)),!0):(i5t(this.a,e,(me(),$m)),!1):n==(me(),TE))},u.e=!1;var dtt,NYe=A(hr,"FeatureMapUtil/BasicValidator",692);T(693,44,rx,Grt);var OYe=A(hr,"FeatureMapUtil/BasicValidator/Cache",693);T(455,41,{20:1,25:1,41:1,13:1,15:1,52:1,81:1,64:1},q5),u.bd=function(e,n){KDt(this.c,this.b,e,n)},u.nc=function(e){return Ove(this.c,this.b,e)},u.oc=function(e){return $T(this,e)},u.xj=function(e,n){return xht(this.c,this.b,e,n)},u.Dh=function(e){return V7(this.c,this.b,e,!1)},u.oh=function(){return qEt(this.c,this.b)},u.ph=function(){return Qte(this.c,this.b)},u.qh=function(e){return Lae(this.c,this.b,e)},u.yj=function(e,n){return cTt(this,e,n)},u.Pb=function(){St(this)},u.pc=function(e){return _V(this.c,this.b,e)},u.qc=function(e){return dle(this.c,this.b,e)},u.cd=function(e){return V7(this.c,this.b,e,!0)},u.hj=function(e){return this},u.dd=function(e){return zae(this.c,this.b,e)},u.Wb=function(){return J9(this)},u.ui=function(){return!oP(this.c,this.b)},u.tc=function(){return Vue(this.c,this.b)},u.ed=function(){return que(this.c,this.b)},u.fd=function(e){return vfe(this.c,this.b,e)},u.gd=function(e){return K8t(this.c,this.b,e)},u.vc=function(e){return Tve(this.c,this.b,e)},u.hd=function(e,n){return i7t(this.c,this.b,e,n)},u.Gc=function(e){C7(this.c,this.b),$T(this,a(e,15))},u._b=function(){return Ghe(this.c,this.b)},u.yc=function(){return nae(this.c,this.b)},u.zc=function(e){return jae(this.c,this.b,e)},u.Ib=function(){var e,n;for(n=new Sp,n.a+="[",e=qEt(this.c,this.b);dq(e);)mo(n,WT(f7(e))),dq(e)&&(n.a+=Rc);return n.a+="]",n.a},u.ij=function(){C7(this.c,this.b)};var BYe=A(hr,"FeatureMapUtil/FeatureEList",455);T(575,32,o6,aV),u.Mh=function(e){return DC(this,e)},u.Rh=function(e){var n,i,r,c,l,f,g;switch(this.d){case 1:case 2:{if(l=e.Oh(),zt(l)===zt(this.c)&&DC(this,null)==e.Mh(null))return this.g=e.Nh(),e.Lh()==1&&(this.d=1),!0;break}case 3:{switch(c=e.Lh(),c){case 3:{if(l=e.Oh(),zt(l)===zt(this.c)&&DC(this,null)==e.Mh(null))return this.d=5,n=new n_(2),ni(n,this.g),ni(n,e.Nh()),this.g=n,!0;break}}break}case 5:{switch(c=e.Lh(),c){case 3:{if(l=e.Oh(),zt(l)===zt(this.c)&&DC(this,null)==e.Mh(null))return i=a(this.g,13),i.nc(e.Nh()),!0;break}}break}case 4:{switch(c=e.Lh(),c){case 3:{if(l=e.Oh(),zt(l)===zt(this.c)&&DC(this,null)==e.Mh(null))return this.d=1,this.g=e.Nh(),!0;break}case 4:{if(l=e.Oh(),zt(l)===zt(this.c)&&DC(this,null)==e.Mh(null))return this.d=6,g=new n_(2),ni(g,this.n),ni(g,e.Ph()),this.n=g,f=Y(Z(Gn,1),pi,22,15,[this.o,e.Qh()]),this.g=f,!0;break}}break}case 6:{switch(c=e.Lh(),c){case 4:{if(l=e.Oh(),zt(l)===zt(this.c)&&DC(this,null)==e.Mh(null))return i=a(this.n,13),i.nc(e.Ph()),f=a(this.g,37),r=dt(Gn,pi,22,f.length+1,15,1),Aa(f,0,r,0,f.length),r[f.length]=e.Qh(),this.g=r,!0;break}}break}}return!1};var FYe=A(hr,"FeatureMapUtil/FeatureENotificationImpl",575);T(501,455,{20:1,25:1,41:1,13:1,15:1,52:1,81:1,184:1,237:1,1630:1,64:1},RD),u.pk=function(e,n,i){return xht(this.c,e,n,i)},u.qk=function(e,n,i){return Fht(this.c,e,n,i)},u.rk=function(){return this},u.sk=function(e,n){return DP(this.c,e,n)},u.tk=function(e){return a(V7(this.c,this.b,e,!1),75).nj()},u.uk=function(e){return a(V7(this.c,this.b,e,!1),75).lc()},u.vk=function(){return this.a},u.wk=function(e){return!oP(this.c,e)},u.xk=function(e,n){eZ(this.c,e,n)},u.yk=function(e){return hPt(this.c,e)};var UYe=A(hr,"FeatureMapUtil/FeatureFeatureMap",501);T(1094,1,{81:1},SEt),u.hj=function(e){return V7(this.b,this.a,-1,e)},u.ui=function(){return!oP(this.b,this.a)},u.Gc=function(e){eZ(this.b,this.a,e)},u.ij=function(){C7(this.b,this.a)};var zYe=A(hr,"FeatureMapUtil/FeatureValue",1094),zx,ptt,gtt,jx,uXt,yI=Sr(GO,"AnyType");T(603,54,rp,qG);var jYe=A(GO,"InvalidDatatypeValueException",603),JF=Sr(GO,JUt),xI=Sr(GO,QUt),m_t=Sr(GO,tzt),lXt,_c,b_t,jw,hXt,fXt,dXt,pXt,gXt,mXt,bXt,wXt,vXt,_Xt,yXt,qE,xXt,XE,MI,MXt,by,QF,tU,EXt,EI,SI;T(735,463,{95:1,91:1,87:1,51:1,42:1,92:1,746:1},Sit),u.ug=function(e,n,i){switch(e){case 0:return i?(!this.c&&(this.c=new _s(this,0)),this.c):(!this.c&&(this.c=new _s(this,0)),this.c.b);case 1:return i?(!this.c&&(this.c=new _s(this,0)),a(Ya(this.c,(fr(),jw)),184)):(!this.c&&(this.c=new _s(this,0)),a(a(Ya(this.c,(fr(),jw)),184),237)).vk();case 2:return i?(!this.b&&(this.b=new _s(this,2)),this.b):(!this.b&&(this.b=new _s(this,2)),this.b.b)}return Xu(this,e-ei(this.Rg()),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():this.Rg(),e),n,i)},u.Dg=function(e,n,i){var r;switch(n){case 0:return!this.c&&(this.c=new _s(this,0)),PP(this.c,e,i);case 1:return(!this.c&&(this.c=new _s(this,0)),a(a(Ya(this.c,(fr(),jw)),184),64)).yj(e,i);case 2:return!this.b&&(this.b=new _s(this,2)),PP(this.b,e,i)}return r=a(Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():this.Rg(),n),61),r.aj().ej(this,Yct(this),n-ei(this.Rg()),e,i)},u.Fg=function(e){switch(e){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new _s(this,0)),a(Ya(this.c,(fr(),jw)),184)).Wb();case 2:return!!this.b&&this.b.i!=0}return Vu(this,e-ei(this.Rg()),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():this.Rg(),e))},u.Mg=function(e,n){switch(e){case 0:!this.c&&(this.c=new _s(this,0)),gL(this.c,n);return;case 1:(!this.c&&(this.c=new _s(this,0)),a(a(Ya(this.c,(fr(),jw)),184),237)).Gc(n);return;case 2:!this.b&&(this.b=new _s(this,2)),gL(this.b,n);return}Ku(this,e-ei(this.Rg()),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():this.Rg(),e),n)},u.Rg=function(){return fr(),b_t},u.Ib=function(){var e;return this.j&4?nh(this):(e=new ul(nh(this)),e.a+=" (mixed: ",PT(e,this.c),e.a+=", anyAttribute: ",PT(e,this.b),e.a+=")",e.a)};var HYe=A(Xr,"AnyTypeImpl",735);T(604,463,{95:1,91:1,87:1,51:1,42:1,92:1,1707:1,604:1},Xz),u.ug=function(e,n,i){switch(e){case 0:return this.a;case 1:return this.b}return Xu(this,e-ei((fr(),qE)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():qE,e),n,i)},u.Fg=function(e){switch(e){case 0:return this.a!=null;case 1:return this.b!=null}return Vu(this,e-ei((fr(),qE)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():qE,e))},u.Mg=function(e,n){switch(e){case 0:iit(this,hi(n));return;case 1:sit(this,hi(n));return}Ku(this,e-ei((fr(),qE)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():qE,e),n)},u.Rg=function(){return fr(),qE},u.Ib=function(){var e;return this.j&4?nh(this):(e=new ul(nh(this)),e.a+=" (data: ",mo(e,this.a),e.a+=", target: ",mo(e,this.b),e.a+=")",e.a)},u.a=null,u.b=null;var GYe=A(Xr,"ProcessingInstructionImpl",604);T(605,735,{95:1,91:1,87:1,51:1,42:1,92:1,746:1,1708:1,605:1},Pxt),u.ug=function(e,n,i){switch(e){case 0:return i?(!this.c&&(this.c=new _s(this,0)),this.c):(!this.c&&(this.c=new _s(this,0)),this.c.b);case 1:return i?(!this.c&&(this.c=new _s(this,0)),a(Ya(this.c,(fr(),jw)),184)):(!this.c&&(this.c=new _s(this,0)),a(a(Ya(this.c,(fr(),jw)),184),237)).vk();case 2:return i?(!this.b&&(this.b=new _s(this,2)),this.b):(!this.b&&(this.b=new _s(this,2)),this.b.b);case 3:return!this.c&&(this.c=new _s(this,0)),hi(DP(this.c,(fr(),MI),!0));case 4:return Ist(this.a,(!this.c&&(this.c=new _s(this,0)),hi(DP(this.c,(fr(),MI),!0))));case 5:return this.a}return Xu(this,e-ei((fr(),XE)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():XE,e),n,i)},u.Fg=function(e){switch(e){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new _s(this,0)),a(Ya(this.c,(fr(),jw)),184)).Wb();case 2:return!!this.b&&this.b.i!=0;case 3:return!this.c&&(this.c=new _s(this,0)),hi(DP(this.c,(fr(),MI),!0))!=null;case 4:return Ist(this.a,(!this.c&&(this.c=new _s(this,0)),hi(DP(this.c,(fr(),MI),!0))))!=null;case 5:return!!this.a}return Vu(this,e-ei((fr(),XE)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():XE,e))},u.Mg=function(e,n){switch(e){case 0:!this.c&&(this.c=new _s(this,0)),gL(this.c,n);return;case 1:(!this.c&&(this.c=new _s(this,0)),a(a(Ya(this.c,(fr(),jw)),184),237)).Gc(n);return;case 2:!this.b&&(this.b=new _s(this,2)),gL(this.b,n);return;case 3:JAt(this,hi(n));return;case 4:JAt(this,kTt(this.a,n));return;case 5:rit(this,a(n,140));return}Ku(this,e-ei((fr(),XE)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():XE,e),n)},u.Rg=function(){return fr(),XE};var WYe=A(Xr,"SimpleAnyTypeImpl",605);T(606,463,{95:1,91:1,87:1,51:1,42:1,92:1,1709:1,606:1},Lxt),u.ug=function(e,n,i){switch(e){case 0:return i?(!this.a&&(this.a=new _s(this,0)),this.a):(!this.a&&(this.a=new _s(this,0)),this.a.b);case 1:return i?(!this.b&&(this.b=new hu((ye(),Ho),Dc,this,1)),this.b):(!this.b&&(this.b=new hu((ye(),Ho),Dc,this,1)),CL(this.b));case 2:return i?(!this.c&&(this.c=new hu((ye(),Ho),Dc,this,2)),this.c):(!this.c&&(this.c=new hu((ye(),Ho),Dc,this,2)),CL(this.c));case 3:return!this.a&&(this.a=new _s(this,0)),Ya(this.a,(fr(),QF));case 4:return!this.a&&(this.a=new _s(this,0)),Ya(this.a,(fr(),tU));case 5:return!this.a&&(this.a=new _s(this,0)),Ya(this.a,(fr(),EI));case 6:return!this.a&&(this.a=new _s(this,0)),Ya(this.a,(fr(),SI))}return Xu(this,e-ei((fr(),by)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():by,e),n,i)},u.Dg=function(e,n,i){var r;switch(n){case 0:return!this.a&&(this.a=new _s(this,0)),PP(this.a,e,i);case 1:return!this.b&&(this.b=new hu((ye(),Ho),Dc,this,1)),MD(this.b,e,i);case 2:return!this.c&&(this.c=new hu((ye(),Ho),Dc,this,2)),MD(this.c,e,i);case 5:return!this.a&&(this.a=new _s(this,0)),cTt(Ya(this.a,(fr(),EI)),e,i)}return r=a(Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():(fr(),by),n),61),r.aj().ej(this,Yct(this),n-ei((fr(),by)),e,i)},u.Fg=function(e){switch(e){case 0:return!!this.a&&this.a.i!=0;case 1:return!!this.b&&this.b.f!=0;case 2:return!!this.c&&this.c.f!=0;case 3:return!this.a&&(this.a=new _s(this,0)),!J9(Ya(this.a,(fr(),QF)));case 4:return!this.a&&(this.a=new _s(this,0)),!J9(Ya(this.a,(fr(),tU)));case 5:return!this.a&&(this.a=new _s(this,0)),!J9(Ya(this.a,(fr(),EI)));case 6:return!this.a&&(this.a=new _s(this,0)),!J9(Ya(this.a,(fr(),SI)))}return Vu(this,e-ei((fr(),by)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():by,e))},u.Mg=function(e,n){switch(e){case 0:!this.a&&(this.a=new _s(this,0)),gL(this.a,n);return;case 1:!this.b&&(this.b=new hu((ye(),Ho),Dc,this,1)),FN(this.b,n);return;case 2:!this.c&&(this.c=new hu((ye(),Ho),Dc,this,2)),FN(this.c,n);return;case 3:!this.a&&(this.a=new _s(this,0)),St(Ya(this.a,(fr(),QF))),!this.a&&(this.a=new _s(this,0)),$T(Ya(this.a,QF),a(n,13));return;case 4:!this.a&&(this.a=new _s(this,0)),St(Ya(this.a,(fr(),tU))),!this.a&&(this.a=new _s(this,0)),$T(Ya(this.a,tU),a(n,13));return;case 5:!this.a&&(this.a=new _s(this,0)),St(Ya(this.a,(fr(),EI))),!this.a&&(this.a=new _s(this,0)),$T(Ya(this.a,EI),a(n,13));return;case 6:!this.a&&(this.a=new _s(this,0)),St(Ya(this.a,(fr(),SI))),!this.a&&(this.a=new _s(this,0)),$T(Ya(this.a,SI),a(n,13));return}Ku(this,e-ei((fr(),by)),Ve(this.j&2?(!this.k&&(this.k=new wf),this.k).pj():by,e),n)},u.Rg=function(){return fr(),by},u.Ib=function(){var e;return this.j&4?nh(this):(e=new ul(nh(this)),e.a+=" (mixed: ",PT(e,this.a),e.a+=")",e.a)};var $Ye=A(Xr,"XMLTypeDocumentRootImpl",606);T(1626,638,{95:1,91:1,87:1,430:1,139:1,51:1,103:1,42:1,92:1,142:1,107:1,108:1,1710:1},YS),u.Zg=function(e,n){switch(e.Ni()){case 7:case 8:case 9:case 10:case 16:case 22:case 23:case 24:case 25:case 26:case 32:case 33:case 34:case 36:case 37:case 44:case 45:case 50:case 51:case 53:case 55:case 56:case 57:case 58:case 60:case 61:case 4:return n==null?null:Yc(n);case 19:case 28:case 29:case 35:case 38:case 39:case 41:case 46:case 52:case 54:case 5:return hi(n);case 6:return ine(a(n,173));case 12:case 47:case 49:case 11:return z7t(this,e,n);case 13:return n==null?null:D_e(a(n,216));case 15:case 14:return n==null?null:use(lt(Yt(n)));case 17:return d8t((fr(),n));case 18:return d8t(n);case 21:case 20:return n==null?null:lse(a(n,126).a);case 27:return rne(a(n,173));case 30:return ORt((fr(),a(n,15)));case 31:return ORt(a(n,15));case 40:return qee((fr(),n));case 42:return p8t((fr(),n));case 43:return p8t(n);case 59:case 48:return Vee((fr(),n));default:throw K(new yn(_E+e.be()+Gm))}},u.$g=function(e){var n,i,r,c,l;switch(e.G==-1&&(e.G=(i=Zu(e),i?Hp(i.bh(),e):-1)),e.G){case 0:return n=new Sit,n;case 1:return r=new Xz,r;case 2:return c=new Pxt,c;case 3:return l=new Lxt,l;default:throw K(new yn(XY+e.zb+Gm))}},u._g=function(e,n){var i,r,c,l,f,g,b,v,M,k,R,N,$,G,nt,rt;switch(e.Ni()){case 5:case 52:case 4:return n;case 6:return vde(n);case 8:case 7:return n==null?null:r1e(n);case 9:return n==null?null:LL(ku((r=Hc(n,!0),r.length>0&&r.charCodeAt(0)==43?r.substr(1,r.length-1):r),-128,127)<<24>>24);case 10:return n==null?null:LL(ku((c=Hc(n,!0),c.length>0&&c.charCodeAt(0)==43?c.substr(1,c.length-1):c),-128,127)<<24>>24);case 11:return hi(Bm(this,(fr(),dXt),n));case 12:return hi(Bm(this,(fr(),pXt),n));case 13:return n==null?null:new Pit(Hc(n,!0));case 15:case 14:return Lme(n);case 16:return hi(Bm(this,(fr(),gXt),n));case 17:return YIt((fr(),n));case 18:return YIt(n);case 28:case 29:case 35:case 38:case 39:case 41:case 54:case 19:return Hc(n,!0);case 21:case 20:return jme(n);case 22:return hi(Bm(this,(fr(),mXt),n));case 23:return hi(Bm(this,(fr(),bXt),n));case 24:return hi(Bm(this,(fr(),wXt),n));case 25:return hi(Bm(this,(fr(),vXt),n));case 26:return hi(Bm(this,(fr(),_Xt),n));case 27:return ide(n);case 30:return KIt((fr(),n));case 31:return KIt(n);case 32:return n==null?null:Xt(ku((M=Hc(n,!0),M.length>0&&M.charCodeAt(0)==43?M.substr(1,M.length-1):M),Vs,qi));case 33:return n==null?null:new y1((k=Hc(n,!0),k.length>0&&k.charCodeAt(0)==43?k.substr(1,k.length-1):k));case 34:return n==null?null:Xt(ku((R=Hc(n,!0),R.length>0&&R.charCodeAt(0)==43?R.substr(1,R.length-1):R),Vs,qi));case 36:return n==null?null:Qg(Y7((N=Hc(n,!0),N.length>0&&N.charCodeAt(0)==43?N.substr(1,N.length-1):N)));case 37:return n==null?null:Qg(Y7(($=Hc(n,!0),$.length>0&&$.charCodeAt(0)==43?$.substr(1,$.length-1):$)));case 40:return nfe((fr(),n));case 42:return JIt((fr(),n));case 43:return JIt(n);case 44:return n==null?null:new y1((G=Hc(n,!0),G.length>0&&G.charCodeAt(0)==43?G.substr(1,G.length-1):G));case 45:return n==null?null:new y1((nt=Hc(n,!0),nt.length>0&&nt.charCodeAt(0)==43?nt.substr(1,nt.length-1):nt));case 46:return Hc(n,!1);case 47:return hi(Bm(this,(fr(),yXt),n));case 59:case 48:return efe((fr(),n));case 49:return hi(Bm(this,(fr(),xXt),n));case 50:return n==null?null:HM(ku((rt=Hc(n,!0),rt.length>0&&rt.charCodeAt(0)==43?rt.substr(1,rt.length-1):rt),UO,32767)<<16>>16);case 51:return n==null?null:HM(ku((l=Hc(n,!0),l.length>0&&l.charCodeAt(0)==43?l.substr(1,l.length-1):l),UO,32767)<<16>>16);case 53:return hi(Bm(this,(fr(),MXt),n));case 55:return n==null?null:HM(ku((f=Hc(n,!0),f.length>0&&f.charCodeAt(0)==43?f.substr(1,f.length-1):f),UO,32767)<<16>>16);case 56:return n==null?null:HM(ku((g=Hc(n,!0),g.length>0&&g.charCodeAt(0)==43?g.substr(1,g.length-1):g),UO,32767)<<16>>16);case 57:return n==null?null:Qg(Y7((b=Hc(n,!0),b.length>0&&b.charCodeAt(0)==43?b.substr(1,b.length-1):b)));case 58:return n==null?null:Qg(Y7((v=Hc(n,!0),v.length>0&&v.charCodeAt(0)==43?v.substr(1,v.length-1):v)));case 60:return n==null?null:Xt(ku((i=Hc(n,!0),i.length>0&&i.charCodeAt(0)==43?i.substr(1,i.length-1):i),Vs,qi));case 61:return n==null?null:Xt(ku(Hc(n,!0),Vs,qi));default:throw K(new yn(_E+e.be()+Gm))}};var SXt,w_t,TXt,v_t,VYe=A(Xr,"XMLTypeFactoryImpl",1626);T(530,248,{95:1,91:1,87:1,139:1,174:1,51:1,207:1,103:1,42:1,92:1,142:1,248:1,107:1,108:1,613:1,1639:1,530:1},_4t),u.N=!1,u.O=!1;var CXt=!1,qYe=A(Xr,"XMLTypePackageImpl",530);T(1569,1,{743:1},Ky),u.mj=function(){return kht(),OXt};var XYe=A(Xr,"XMLTypePackageImpl/1",1569);T(1578,1,wi,t8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var ZYe=A(Xr,"XMLTypePackageImpl/10",1578);T(1579,1,wi,e8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var YYe=A(Xr,"XMLTypePackageImpl/11",1579);T(1580,1,wi,Zz),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var KYe=A(Xr,"XMLTypePackageImpl/12",1580);T(1581,1,wi,n8),u.Li=function(e){return Gb(e)},u.Mi=function(e){return dt(To,wt,315,e,7,1)};var JYe=A(Xr,"XMLTypePackageImpl/13",1581);T(1582,1,wi,Jy),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var QYe=A(Xr,"XMLTypePackageImpl/14",1582);T(1583,1,wi,z3),u.Li=function(e){return ct(e,15)},u.Mi=function(e){return dt(Sl,fw,15,e,0,1)};var tKe=A(Xr,"XMLTypePackageImpl/15",1583);T(1584,1,wi,Yz),u.Li=function(e){return ct(e,15)},u.Mi=function(e){return dt(Sl,fw,15,e,0,1)};var eKe=A(Xr,"XMLTypePackageImpl/16",1584);T(1585,1,wi,i8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var nKe=A(Xr,"XMLTypePackageImpl/17",1585);T(1586,1,wi,r8),u.Li=function(e){return ct(e,126)},u.Mi=function(e){return dt(CE,wt,126,e,0,1)};var iKe=A(Xr,"XMLTypePackageImpl/18",1586);T(1587,1,wi,KS),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var rKe=A(Xr,"XMLTypePackageImpl/19",1587);T(1570,1,wi,s8),u.Li=function(e){return ct(e,746)},u.Mi=function(e){return dt(yI,te,746,e,0,1)};var sKe=A(Xr,"XMLTypePackageImpl/2",1570);T(1588,1,wi,JS),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var oKe=A(Xr,"XMLTypePackageImpl/20",1588);T(1589,1,wi,Jk),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var cKe=A(Xr,"XMLTypePackageImpl/21",1589);T(1590,1,wi,QS),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var aKe=A(Xr,"XMLTypePackageImpl/22",1590);T(1591,1,wi,Kz),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var uKe=A(Xr,"XMLTypePackageImpl/23",1591);T(1592,1,wi,o8),u.Li=function(e){return ct(e,173)},u.Mi=function(e){return dt(Da,wt,173,e,0,2)};var lKe=A(Xr,"XMLTypePackageImpl/24",1592);T(1593,1,wi,tT),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var hKe=A(Xr,"XMLTypePackageImpl/25",1593);T(1594,1,wi,c8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var fKe=A(Xr,"XMLTypePackageImpl/26",1594);T(1595,1,wi,Qk),u.Li=function(e){return ct(e,15)},u.Mi=function(e){return dt(Sl,fw,15,e,0,1)};var dKe=A(Xr,"XMLTypePackageImpl/27",1595);T(1596,1,wi,Jz),u.Li=function(e){return ct(e,15)},u.Mi=function(e){return dt(Sl,fw,15,e,0,1)};var pKe=A(Xr,"XMLTypePackageImpl/28",1596);T(1597,1,wi,a8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var gKe=A(Xr,"XMLTypePackageImpl/29",1597);T(1571,1,wi,Q0),u.Li=function(e){return ct(e,604)},u.Mi=function(e){return dt(JF,te,1707,e,0,1)};var mKe=A(Xr,"XMLTypePackageImpl/3",1571);T(1598,1,wi,u8),u.Li=function(e){return ct(e,21)},u.Mi=function(e){return dt(Io,wt,21,e,0,1)};var bKe=A(Xr,"XMLTypePackageImpl/30",1598);T(1599,1,wi,l8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var wKe=A(Xr,"XMLTypePackageImpl/31",1599);T(1600,1,wi,Qz),u.Li=function(e){return ct(e,149)},u.Mi=function(e){return dt(Vm,wt,149,e,0,1)};var vKe=A(Xr,"XMLTypePackageImpl/32",1600);T(1601,1,wi,h8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var _Ke=A(Xr,"XMLTypePackageImpl/33",1601);T(1602,1,wi,tj),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var yKe=A(Xr,"XMLTypePackageImpl/34",1602);T(1603,1,wi,ej),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var xKe=A(Xr,"XMLTypePackageImpl/35",1603);T(1604,1,wi,tm),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var MKe=A(Xr,"XMLTypePackageImpl/36",1604);T(1605,1,wi,t5),u.Li=function(e){return ct(e,15)},u.Mi=function(e){return dt(Sl,fw,15,e,0,1)};var EKe=A(Xr,"XMLTypePackageImpl/37",1605);T(1606,1,wi,e5),u.Li=function(e){return ct(e,15)},u.Mi=function(e){return dt(Sl,fw,15,e,0,1)};var SKe=A(Xr,"XMLTypePackageImpl/38",1606);T(1607,1,wi,n5),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var TKe=A(Xr,"XMLTypePackageImpl/39",1607);T(1572,1,wi,eT),u.Li=function(e){return ct(e,605)},u.Mi=function(e){return dt(xI,te,1708,e,0,1)};var CKe=A(Xr,"XMLTypePackageImpl/4",1572);T(1608,1,wi,Qy),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var AKe=A(Xr,"XMLTypePackageImpl/40",1608);T(1609,1,wi,cs),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var kKe=A(Xr,"XMLTypePackageImpl/41",1609);T(1610,1,wi,nT),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var LKe=A(Xr,"XMLTypePackageImpl/42",1610);T(1611,1,wi,i5),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var PKe=A(Xr,"XMLTypePackageImpl/43",1611);T(1612,1,wi,Mv),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var IKe=A(Xr,"XMLTypePackageImpl/44",1612);T(1613,1,wi,nj),u.Li=function(e){return ct(e,168)},u.Mi=function(e){return dt(qm,wt,168,e,0,1)};var RKe=A(Xr,"XMLTypePackageImpl/45",1613);T(1614,1,wi,r5),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var DKe=A(Xr,"XMLTypePackageImpl/46",1614);T(1615,1,wi,f8),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var NKe=A(Xr,"XMLTypePackageImpl/47",1615);T(1616,1,wi,zh),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var OKe=A(Xr,"XMLTypePackageImpl/48",1616);T(1617,1,wi,ij),u.Li=function(e){return ct(e,168)},u.Mi=function(e){return dt(qm,wt,168,e,0,1)};var BKe=A(Xr,"XMLTypePackageImpl/49",1617);T(1573,1,wi,rj),u.Li=function(e){return ct(e,606)},u.Mi=function(e){return dt(m_t,te,1709,e,0,1)};var FKe=A(Xr,"XMLTypePackageImpl/5",1573);T(1618,1,wi,d8),u.Li=function(e){return ct(e,149)},u.Mi=function(e){return dt(Vm,wt,149,e,0,1)};var UKe=A(Xr,"XMLTypePackageImpl/50",1618);T(1619,1,wi,sj),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var zKe=A(Xr,"XMLTypePackageImpl/51",1619);T(1620,1,wi,p8),u.Li=function(e){return ct(e,21)},u.Mi=function(e){return dt(Io,wt,21,e,0,1)};var jKe=A(Xr,"XMLTypePackageImpl/52",1620);T(1574,1,wi,oj),u.Li=function(e){return Es(e)},u.Mi=function(e){return dt(At,wt,2,e,6,1)};var HKe=A(Xr,"XMLTypePackageImpl/6",1574);T(1575,1,wi,cj),u.Li=function(e){return ct(e,173)},u.Mi=function(e){return dt(Da,wt,173,e,0,2)};var GKe=A(Xr,"XMLTypePackageImpl/7",1575);T(1576,1,wi,aj),u.Li=function(e){return Hb(e)},u.Mi=function(e){return dt(ho,wt,434,e,8,1)};var WKe=A(Xr,"XMLTypePackageImpl/8",1576);T(1577,1,wi,em),u.Li=function(e){return ct(e,192)},u.Mi=function(e){return dt(dx,wt,192,e,0,1)};var $Ke=A(Xr,"XMLTypePackageImpl/9",1577),af,t1,PA,eU,tt;T(40,54,rp,ri);var VKe=A(qp,"RegEx/ParseException",40);T(730,1,{},jh),u.Ck=function(e){return ei*16)throw K(new ri(ai((Kn(),hUt))));i=i*16+c}while(!0);if(this.a!=125)throw K(new ri(ai((Kn(),fUt))));if(i>EE)throw K(new ri(ai((Kn(),dUt))));e=i}else{if(c=0,this.c!=0||(c=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(i=c,Ci(this),this.c!=0||(c=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));i=i*16+c,e=i}break;case 117:if(r=0,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));n=n*16+r,e=n;break;case 118:if(Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,Ci(this),this.c!=0||(r=e0(this.a))<0)throw K(new ri(ai((Kn(),Vp))));if(n=n*16+r,n>EE)throw K(new ri(ai((Kn(),"parser.descappe.4"))));e=n;break;case 65:case 90:case 122:throw K(new ri(ai((Kn(),pUt))))}return e},u.Ek=function(e){var n;switch(e){case 100:n=(this.e&32)==32?Z1("Nd",!0):(Ai(),nU);break;case 68:n=(this.e&32)==32?Z1("Nd",!1):(Ai(),S_t);break;case 119:n=(this.e&32)==32?Z1("IsWord",!0):(Ai(),KE);break;case 87:n=(this.e&32)==32?Z1("IsWord",!1):(Ai(),C_t);break;case 115:n=(this.e&32)==32?Z1("IsSpace",!0):(Ai(),Hx);break;case 83:n=(this.e&32)==32?Z1("IsSpace",!1):(Ai(),T_t);break;default:throw K(new sc(pzt+e.toString(16)))}return n},u.Fk=function(e){var n,i,r,c,l,f,g,b,v,M,k,R;for(this.b=1,Ci(this),n=null,this.c==0&&this.a==94?(Ci(this),e?M=(Ai(),Ai(),++Ar,new Su(5)):(n=(Ai(),Ai(),++Ar,new Su(4)),jc(n,0,EE),M=(++Ar,new Su(4)))):M=(Ai(),Ai(),++Ar,new Su(4)),c=!0;(R=this.c)!=1&&!(R==0&&this.a==93&&!c);){if(c=!1,i=this.a,r=!1,R==10)switch(i){case 100:case 68:case 119:case 87:case 115:case 83:uw(M,this.Ek(i)),r=!0;break;case 105:case 73:case 99:case 67:i=this.Vk(M,i),i<0&&(r=!0);break;case 112:case 80:if(k=Ilt(this,i),!k)throw K(new ri(ai((Kn(),oK))));uw(M,k),r=!0;break;default:i=this.Dk()}else if(R==20){if(f=hM(this.i,58,this.d),f<0)throw K(new ri(ai((Kn(),Vpt))));if(g=!0,bo(this.i,this.d)==94&&(++this.d,g=!1),l=$h(this.i,this.d,f),b=H5t(l,g,(this.e&512)==512),!b)throw K(new ri(ai((Kn(),oUt))));if(uw(M,b),r=!0,f+1>=this.j||bo(this.i,f+1)!=93)throw K(new ri(ai((Kn(),Vpt))));this.d=f+2}if(Ci(this),!r)if(this.c!=0||this.a!=45)jc(M,i,i);else{if(Ci(this),(R=this.c)==1)throw K(new ri(ai((Kn(),PO))));R==0&&this.a==93?(jc(M,i,i),jc(M,45,45)):(v=this.a,R==10&&(v=this.Dk()),Ci(this),jc(M,i,v))}(this.e&oh)==oh&&this.c==0&&this.a==44&&Ci(this)}if(this.c==1)throw K(new ri(ai((Kn(),PO))));return n&&(h4(n,M),M=n),M_(M),l4(M),this.b=0,Ci(this),M},u.Gk=function(){var e,n,i,r;for(i=this.Fk(!1);(r=this.c)!=7;)if(e=this.a,r==0&&(e==45||e==38)||r==4){if(Ci(this),this.c!=9)throw K(new ri(ai((Kn(),aUt))));if(n=this.Fk(!1),r==4)uw(i,n);else if(e==45)h4(i,n);else if(e==38)O7t(i,n);else throw K(new sc("ASSERT"))}else throw K(new ri(ai((Kn(),uUt))));return Ci(this),i},u.Hk=function(){var e,n;return e=this.a-48,n=(Ai(),Ai(),++Ar,new K$(12,null,e)),!this.g&&(this.g=new nd),Cn(this.g,new d9(e)),Ci(this),n},u.Ik=function(){return Ci(this),Ai(),LXt},u.Jk=function(){return Ci(this),Ai(),kXt},u.Kk=function(){throw K(new ri(ai((Kn(),el))))},u.Lk=function(){throw K(new ri(ai((Kn(),el))))},u.Mk=function(){return Ci(this),Kle()},u.Nk=function(){return Ci(this),Ai(),IXt},u.Ok=function(){return Ci(this),Ai(),DXt},u.Pk=function(){var e;if(this.d>=this.j||((e=bo(this.i,this.d++))&65504)!=64)throw K(new ri(ai((Kn(),iUt))));return Ci(this),Ai(),Ai(),++Ar,new ud(0,e-64)},u.Qk=function(){return Ci(this),w_e()},u.Rk=function(){return Ci(this),Ai(),NXt},u.Sk=function(){var e;return e=(Ai(),Ai(),++Ar,new ud(0,105)),Ci(this),e},u.Tk=function(){return Ci(this),Ai(),RXt},u.Uk=function(){return Ci(this),Ai(),PXt},u.Vk=function(e,n){return this.Dk()},u.Wk=function(){return Ci(this),Ai(),M_t},u.Xk=function(){var e,n,i,r,c;if(this.d+1>=this.j)throw K(new ri(ai((Kn(),tUt))));if(r=-1,n=null,e=bo(this.i,this.d),49<=e&&e<=57){if(r=e-48,!this.g&&(this.g=new nd),Cn(this.g,new d9(r)),++this.d,bo(this.i,this.d)!=41)throw K(new ri(ai((Kn(),g0))));++this.d}else switch(e==63&&--this.d,Ci(this),n=Jht(this),n.e){case 20:case 21:case 22:case 23:break;case 8:if(this.c!=7)throw K(new ri(ai((Kn(),g0))));break;default:throw K(new ri(ai((Kn(),eUt))))}if(Ci(this),c=Lm(this),i=null,c.e==2){if(c.ol()!=2)throw K(new ri(ai((Kn(),nUt))));i=c.kl(1),c=c.kl(0)}if(this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),Ai(),Ai(),++Ar,new gLt(r,n,c,i)},u.Yk=function(){return Ci(this),Ai(),E_t},u.Zk=function(){var e;if(Ci(this),e=qD(24,Lm(this)),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u.$k=function(){var e;if(Ci(this),e=qD(20,Lm(this)),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u._k=function(){var e;if(Ci(this),e=qD(22,Lm(this)),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u.al=function(){var e,n,i,r,c;for(e=0,i=0,n=-1;this.d=this.j)throw K(new ri(ai((Kn(),Wpt))));if(n==45){for(++this.d;this.d=this.j)throw K(new ri(ai((Kn(),Wpt))))}if(n==58){if(++this.d,Ci(this),r=i4t(Lm(this),e,i),this.c!=7)throw K(new ri(ai((Kn(),g0))));Ci(this)}else if(n==41)++this.d,Ci(this),r=i4t(Lm(this),e,i);else throw K(new ri(ai((Kn(),QFt))));return r},u.bl=function(){var e;if(Ci(this),e=qD(21,Lm(this)),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u.cl=function(){var e;if(Ci(this),e=qD(23,Lm(this)),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u.dl=function(){var e,n;if(Ci(this),e=this.f++,n=E$(Lm(this),e),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),n},u.el=function(){var e;if(Ci(this),e=E$(Lm(this),0),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u.fl=function(e){return Ci(this),this.c==5?(Ci(this),UD(e,(Ai(),Ai(),++Ar,new Yb(9,e)))):UD(e,(Ai(),Ai(),++Ar,new Yb(3,e)))},u.gl=function(e){var n;return Ci(this),n=(Ai(),Ai(),++Ar,new GT(2)),this.c==5?(Ci(this),s0(n,RA),s0(n,e)):(s0(n,e),s0(n,RA)),n},u.hl=function(e){return Ci(this),this.c==5?(Ci(this),Ai(),Ai(),++Ar,new Yb(9,e)):(Ai(),Ai(),++Ar,new Yb(3,e))},u.a=0,u.b=0,u.c=0,u.d=0,u.e=0,u.f=1,u.g=null,u.j=0;var qKe=A(qp,"RegEx/RegexParser",730);T(1564,730,{},Nxt),u.Ck=function(e){return!1},u.Dk=function(){return fht(this)},u.Ek=function(e){return rE(e)},u.Fk=function(e){return vOt(this)},u.Gk=function(){throw K(new ri(ai((Kn(),el))))},u.Hk=function(){throw K(new ri(ai((Kn(),el))))},u.Ik=function(){throw K(new ri(ai((Kn(),el))))},u.Jk=function(){throw K(new ri(ai((Kn(),el))))},u.Kk=function(){return Ci(this),rE(67)},u.Lk=function(){return Ci(this),rE(73)},u.Mk=function(){throw K(new ri(ai((Kn(),el))))},u.Nk=function(){throw K(new ri(ai((Kn(),el))))},u.Ok=function(){throw K(new ri(ai((Kn(),el))))},u.Pk=function(){return Ci(this),rE(99)},u.Qk=function(){throw K(new ri(ai((Kn(),el))))},u.Rk=function(){throw K(new ri(ai((Kn(),el))))},u.Sk=function(){return Ci(this),rE(105)},u.Tk=function(){throw K(new ri(ai((Kn(),el))))},u.Uk=function(){throw K(new ri(ai((Kn(),el))))},u.Vk=function(e,n){return uw(e,rE(n)),-1},u.Wk=function(){return Ci(this),Ai(),Ai(),++Ar,new ud(0,94)},u.Xk=function(){throw K(new ri(ai((Kn(),el))))},u.Yk=function(){return Ci(this),Ai(),Ai(),++Ar,new ud(0,36)},u.Zk=function(){throw K(new ri(ai((Kn(),el))))},u.$k=function(){throw K(new ri(ai((Kn(),el))))},u._k=function(){throw K(new ri(ai((Kn(),el))))},u.al=function(){throw K(new ri(ai((Kn(),el))))},u.bl=function(){throw K(new ri(ai((Kn(),el))))},u.cl=function(){throw K(new ri(ai((Kn(),el))))},u.dl=function(){var e;if(Ci(this),e=E$(Lm(this),0),this.c!=7)throw K(new ri(ai((Kn(),g0))));return Ci(this),e},u.el=function(){throw K(new ri(ai((Kn(),el))))},u.fl=function(e){return Ci(this),UD(e,(Ai(),Ai(),++Ar,new Yb(3,e)))},u.gl=function(e){var n;return Ci(this),n=(Ai(),Ai(),++Ar,new GT(2)),s0(n,e),s0(n,RA),n},u.hl=function(e){return Ci(this),Ai(),Ai(),++Ar,new Yb(3,e)};var wy=null,ZE=null,XKe=A(qp,"RegEx/ParserForXMLSchema",1564);T(112,1,SE,Fa),u.il=function(e){throw K(new sc("Not supported."))},u.jl=function(){return-1},u.kl=function(e){return null},u.ll=function(){return null},u.ml=function(e){},u.nl=function(e){},u.ol=function(){return 0},u.Ib=function(){return this.pl(0)},u.pl=function(e){return this.e==11?".":""},u.e=0;var __t,YE,IA,AXt,y_t,Hw=null,nU,mtt=null,x_t,RA,btt=null,M_t,E_t,S_t,T_t,C_t,kXt,Hx,LXt,PXt,IXt,RXt,KE,DXt,NXt,Ar=0,iMe=A(qp,"RegEx/Token",112);T(130,112,{3:1,130:1,112:1},Su),u.pl=function(e){var n,i,r;if(this.e==4)if(this==x_t)i=".";else if(this==nU)i="\\d";else if(this==KE)i="\\w";else if(this==Hx)i="\\s";else{for(r=new Sp,r.a+="[",n=0;n0&&(r.a+=","),this.b[n]===this.b[n+1]?mo(r,RP(this.b[n])):(mo(r,RP(this.b[n])),r.a+="-",mo(r,RP(this.b[n+1])));r.a+="]",i=r.a}else if(this==S_t)i="\\D";else if(this==C_t)i="\\W";else if(this==T_t)i="\\S";else{for(r=new Sp,r.a+="[^",n=0;n0&&(r.a+=","),this.b[n]===this.b[n+1]?mo(r,RP(this.b[n])):(mo(r,RP(this.b[n])),r.a+="-",mo(r,RP(this.b[n+1])));r.a+="]",i=r.a}return i},u.a=!1,u.c=!1;var ZKe=A(qp,"RegEx/RangeToken",130);T(528,1,{528:1},d9),u.a=0;var YKe=A(qp,"RegEx/RegexParser/ReferencePosition",528);T(527,1,{3:1,527:1},oMt),u.Fb=function(e){var n;return e==null||!ct(e,527)?!1:(n=a(e,527),le(this.b,n.b)&&this.a==n.a)},u.Hb=function(){return j1(this.b+"/"+cht(this.a))},u.Ib=function(){return this.c.pl(this.a)},u.a=0;var KKe=A(qp,"RegEx/RegularExpression",527);T(195,112,SE,ud),u.jl=function(){return this.a},u.pl=function(e){var n,i;switch(this.e){case 0:switch(this.a){case 124:case 42:case 43:case 63:case 40:case 41:case 46:case 91:case 123:case 92:i="\\"+r$(this.a&qr);break;case 12:i="\\f";break;case 10:i="\\n";break;case 13:i="\\r";break;case 9:i="\\t";break;case 27:i="\\e";break;default:this.a>=ao?(n="0"+(this.a>>>0).toString(16),i="\\v"+$h(n,n.length-6,n.length)):i=""+r$(this.a&qr)}break;case 8:this==M_t||this==E_t?i=""+r$(this.a&qr):i="\\"+r$(this.a&qr);break;default:i=null}return i},u.a=0;var JKe=A(qp,"RegEx/Token/CharToken",195);T(283,112,SE,Yb),u.kl=function(e){return this.a},u.ml=function(e){this.b=e},u.nl=function(e){this.c=e},u.ol=function(){return 1},u.pl=function(e){var n;if(this.e==3)if(this.c<0&&this.b<0)n=this.a.pl(e)+"*";else if(this.c==this.b)n=this.a.pl(e)+"{"+this.c+"}";else if(this.c>=0&&this.b>=0)n=this.a.pl(e)+"{"+this.c+","+this.b+"}";else if(this.c>=0&&this.b<0)n=this.a.pl(e)+"{"+this.c+",}";else throw K(new sc("Token#toString(): CLOSURE "+this.c+Rc+this.b));else if(this.c<0&&this.b<0)n=this.a.pl(e)+"*?";else if(this.c==this.b)n=this.a.pl(e)+"{"+this.c+"}?";else if(this.c>=0&&this.b>=0)n=this.a.pl(e)+"{"+this.c+","+this.b+"}?";else if(this.c>=0&&this.b<0)n=this.a.pl(e)+"{"+this.c+",}?";else throw K(new sc("Token#toString(): NONGREEDYCLOSURE "+this.c+Rc+this.b));return n},u.b=0,u.c=0;var QKe=A(qp,"RegEx/Token/ClosureToken",283);T(731,112,SE,Cot),u.kl=function(e){return e==0?this.a:this.b},u.ol=function(){return 2},u.pl=function(e){var n;return this.b.e==3&&this.b.kl(0)==this.a?n=this.a.pl(e)+"+":this.b.e==9&&this.b.kl(0)==this.a?n=this.a.pl(e)+"+?":n=this.a.pl(e)+(""+this.b.pl(e)),n};var tJe=A(qp,"RegEx/Token/ConcatToken",731);T(1562,112,SE,gLt),u.kl=function(e){if(e==0)return this.d;if(e==1)return this.b;throw K(new sc("Internal Error: "+e))},u.ol=function(){return this.b?2:1},u.pl=function(e){var n;return this.c>0?n="(?("+this.c+")":this.a.e==8?n="(?("+this.a+")":n="(?"+this.a,this.b?n+=this.d+"|"+this.b+")":n+=this.d+")",n},u.c=0;var eJe=A(qp,"RegEx/Token/ConditionToken",1562);T(1563,112,SE,DAt),u.kl=function(e){return this.b},u.ol=function(){return 1},u.pl=function(e){return"(?"+(this.a==0?"":cht(this.a))+(this.c==0?"":cht(this.c))+":"+this.b.pl(e)+")"},u.a=0,u.c=0;var nJe=A(qp,"RegEx/Token/ModifierToken",1563);T(732,112,SE,Not),u.kl=function(e){return this.a},u.ol=function(){return 1},u.pl=function(e){var n;switch(n=null,this.e){case 6:this.b==0?n="(?:"+this.a.pl(e)+")":n="("+this.a.pl(e)+")";break;case 20:n="(?="+this.a.pl(e)+")";break;case 21:n="(?!"+this.a.pl(e)+")";break;case 22:n="(?<="+this.a.pl(e)+")";break;case 23:n="(?"+this.a.pl(e)+")"}return n},u.b=0;var iJe=A(qp,"RegEx/Token/ParenToken",732);T(474,112,{3:1,112:1,474:1},K$),u.ll=function(){return this.b},u.pl=function(e){return this.e==12?"\\"+this.a:E0e(this.b)},u.a=0;var rJe=A(qp,"RegEx/Token/StringToken",474);T(427,112,SE,GT),u.il=function(e){s0(this,e)},u.kl=function(e){return a(bm(this.a,e),112)},u.ol=function(){return this.a?this.a.a.c.length:0},u.pl=function(e){var n,i,r,c,l;if(this.e==1){if(this.a.a.c.length==2)n=a(bm(this.a,0),112),i=a(bm(this.a,1),112),i.e==3&&i.kl(0)==n?c=n.pl(e)+"+":i.e==9&&i.kl(0)==n?c=n.pl(e)+"+?":c=n.pl(e)+(""+i.pl(e));else{for(l=new Sp,r=0;r=this.c.b:this.a<=this.c.b},u.Cc=function(){return this.b>0},u.Dc=function(){return this.b},u.Fc=function(){return this.b-1},u.jc=function(){throw K(new Tp(xzt))},u.a=0,u.b=0;var lJe=A(h1t,"ExclusiveRange/RangeIterator",230),nl=_M(RO,"C"),Gn=_M(P4,"I"),Ol=_M(aE,"Z"),k0=_M(I4,"J"),Da=_M(A4,"B"),Os=_M(k4,"D"),Gw=_M(L4,"F"),vy=_M(R4,"S"),rMe=Sr("org.eclipse.elk.core.labels","ILabelManager"),A_t=Sr(qs,"DiagnosticChain"),k_t=Sr(ZUt,"ResourceSet"),L_t=A(qs,"InvocationTargetException",null),BXt=(E9(),rae),FXt=FXt=d1e;Pue(oit),tle("permProps",[[[VO,qO],[XO,"gecko1_8"]],[[VO,qO],[XO,"ie10"]],[[VO,qO],[XO,"ie8"]],[[VO,qO],[XO,"ie9"]],[[VO,qO],[XO,"safari"]]]),FXt(null,"elk",null)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],3:[function(p,m,_){"use strict";function E(P,U){if(!(P instanceof U))throw new TypeError("Cannot call a class as a function")}function y(P,U){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:P}function I(P,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);P.prototype=Object.create(U&&U.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(P,U):P.__proto__=U)}var O=p("./elk-api.js").default,B=function(P){I(U,P);function U(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};E(this,U);var q=Object.assign({},W),et=!1;try{p.resolve("webworker-threads"),et=!0}catch{}if(W.workerUrl)if(et){var Q=p("webworker-threads"),X=Q.Worker;q.workerFactory=function(xt){return new X(xt)}}else console.warn(`Web worker requested but 'webworker-threads' package not installed. Consider installing the package or pass your own 'workerFactory' to ELK's constructor. -... Falling back to non-web worker version. `);if(!V.workerFactory){var gt=p("./elk-worker.min.js"),ft=gt.Worker;V.workerFactory=function(xt){return new ft(xt)}}return y(this,(U.__proto__||Object.getPrototypeOf(U)).call(this,V))}return U}(N);Object.defineProperty(m.exports,"__esModule",{value:!0}),m.exports=B,B.default=B},{"./elk-api.js":1,"./elk-worker.min.js":2,"webworker-threads":8}],4:[function(p,m,_){(function(E,y){var I=p("fs"),N=p("path"),B=N.join,P=N.dirname,U=I.accessSync&&function(tt){try{I.accessSync(tt)}catch{return!1}return!0}||I.existsSync||N.existsSync,j={arrow:E.env.NODE_BINDINGS_ARROW||" \u2192 ",compiled:E.env.NODE_BINDINGS_COMPILED_DIR||"compiled",platform:E.platform,arch:E.arch,version:E.versions.node,bindings:"bindings.node",try:[["module_root","build","bindings"],["module_root","build","Debug","bindings"],["module_root","build","Release","bindings"],["module_root","out","Debug","bindings"],["module_root","Debug","bindings"],["module_root","out","Release","bindings"],["module_root","Release","bindings"],["module_root","build","default","bindings"],["module_root","compiled","version","platform","arch","bindings"]]};function V(tt){typeof tt=="string"?tt={bindings:tt}:tt||(tt={}),Object.keys(j).map(function(Ot){Ot in tt||(tt[Ot]=j[Ot])}),tt.module_root||(tt.module_root=_.getRoot(_.getFileName())),N.extname(tt.bindings)!=".node"&&(tt.bindings+=".node");for(var Q=[],X=0,gt=tt.try.length,ft,xt,Bt;X=0;tt--){var Q=U[tt];Q==="."?U.splice(tt,1):Q===".."?(U.splice(tt,1),V++):V&&(U.splice(tt,1),V--)}if(j)for(;V--;V)U.unshift("..");return U}var I=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,N=function(U){return I.exec(U).slice(1)};_.resolve=function(){for(var U="",j=!1,V=arguments.length-1;V>=-1&&!j;V--){var tt=V>=0?arguments[V]:E.cwd();if(typeof tt!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!tt)continue;U=tt+"/"+U,j=tt.charAt(0)==="/"}return U=y(B(U.split("/"),function(Q){return!!Q}),!j).join("/"),(j?"/":"")+U||"."},_.normalize=function(U){var j=_.isAbsolute(U),V=P(U,-1)==="/";return U=y(B(U.split("/"),function(tt){return!!tt}),!j).join("/"),!U&&!j&&(U="."),U&&V&&(U+="/"),(j?"/":"")+U},_.isAbsolute=function(U){return U.charAt(0)==="/"},_.join=function(){var U=Array.prototype.slice.call(arguments,0);return _.normalize(B(U,function(j,V){if(typeof j!="string")throw new TypeError("Arguments to path.join must be strings");return j}).join("/"))},_.relative=function(U,j){U=_.resolve(U).substr(1),j=_.resolve(j).substr(1);function V(Bt){for(var Ot=0;Ot=0&&Bt[Pt]==="";Pt--);return Ot>Pt?[]:Bt.slice(Ot,Pt-Ot+1)}for(var tt=V(U.split("/")),Q=V(j.split("/")),X=Math.min(tt.length,Q.length),gt=X,ft=0;ft1)for(var Pt=1;Pt{(function(d){d.parser=function(it,ut){return new h(it,ut)},d.SAXParser=h,d.SAXStream=B,d.createStream=I,d.MAX_BUFFER_LENGTH=64*1024;var s=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];d.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function h(it,ut){if(!(this instanceof h))return new h(it,ut);var kt=this;m(kt),kt.q=kt.c="",kt.bufferCheckPosition=d.MAX_BUFFER_LENGTH,kt.encoding=null,kt.opt=ut||{},kt.opt.lowercase=kt.opt.lowercase||kt.opt.lowercasetags,kt.looseCase=kt.opt.lowercase?"toLowerCase":"toUpperCase",kt.opt.maxEntityCount=kt.opt.maxEntityCount||512,kt.opt.maxEntityDepth=kt.opt.maxEntityDepth||4,kt.entityCount=kt.entityDepth=0,kt.tags=[],kt.closed=kt.closedRoot=kt.sawRoot=!1,kt.tag=kt.error=null,kt.strict=!!it,kt.noscript=!!(it||kt.opt.noscript),kt.state=ot.BEGIN,kt.strictEntities=kt.opt.strictEntities,kt.ENTITIES=kt.strictEntities?Object.create(d.XML_ENTITIES):Object.create(d.ENTITIES),kt.attribList=[],kt.opt.xmlns&&(kt.ns=Object.create(tt)),kt.opt.unquotedAttributeValues===void 0&&(kt.opt.unquotedAttributeValues=!it),kt.trackPosition=kt.opt.position!==!1,kt.trackPosition&&(kt.position=kt.line=kt.column=0),be(kt,"onready")}Object.create||(Object.create=function(it){function ut(){}ut.prototype=it;var kt=new ut;return kt}),Object.keys||(Object.keys=function(it){var ut=[];for(var kt in it)it.hasOwnProperty(kt)&&ut.push(kt);return ut});function p(it){for(var ut=Math.max(d.MAX_BUFFER_LENGTH,10),kt=0,Nt=0,ie=s.length;Ntut)switch(s[Nt]){case"textNode":hn(it);break;case"cdata":re(it,"oncdata",it.cdata),it.cdata="";break;case"script":re(it,"onscript",it.script),it.script="";break;default:ke(it,"Max buffer length exceeded: "+s[Nt])}kt=Math.max(kt,rn)}var Pn=d.MAX_BUFFER_LENGTH-kt;it.bufferCheckPosition=Pn+it.position}function m(it){for(var ut=0,kt=s.length;ut=2){if(it[0]===255&&it[1]===254)return"utf-16le";if(it[0]===254&&it[1]===255)return"utf-16be"}return it.length>=3&&it[0]===239&&it[1]===187&&it[2]===191?"utf8":it.length>=4?it[0]===60&&it[1]===0&&it[2]===63&&it[3]===0?"utf-16le":it[0]===0&&it[1]===60&&it[2]===0&&it[3]===63?"utf-16be":"utf8":ut?"utf8":null}function B(it,ut){if(!(this instanceof B))return new B(it,ut);E.apply(this),this._parser=new h(it,ut),this.writable=!0,this.readable=!0;var kt=this;this._parser.onend=function(){kt.emit("end")},this._parser.onerror=function(Nt){kt.emit("error",Nt),kt._parser.error=null},this._decoder=null,this._decoderBuffer=null,y.forEach(function(Nt){Object.defineProperty(kt,"on"+Nt,{get:function(){return kt._parser["on"+Nt]},set:function(ie){if(!ie)return kt.removeAllListeners(Nt),kt._parser["on"+Nt]=ie,ie;kt.on(Nt,ie)},enumerable:!0,configurable:!1})})}B.prototype=Object.create(E.prototype,{constructor:{value:B}}),B.prototype._decodeBuffer=function(it,ut){if(this._decoderBuffer&&(it=Buffer.concat([this._decoderBuffer,it]),this._decoderBuffer=null),!this._decoder){var kt=N(it,ut);if(!kt)return this._decoderBuffer=it,"";this._parser.encoding=kt,this._decoder=new TextDecoder(kt)}return this._decoder.decode(it,{stream:!ut})},B.prototype.write=function(it){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(it))it=this._decodeBuffer(it,!1);else if(this._decoderBuffer){var ut=this._decodeBuffer(Buffer.alloc(0),!0);ut&&(this._parser.write(ut),this.emit("data",ut))}return this._parser.write(it.toString()),this.emit("data",it),!0},B.prototype.end=function(it){if(it&&it.length&&this.write(it),this._decoderBuffer){var ut=this._decodeBuffer(Buffer.alloc(0),!0);ut&&(this._parser.write(ut),this.emit("data",ut))}else if(this._decoder){var kt=this._decoder.decode();kt&&(this._parser.write(kt),this.emit("data",kt))}return this._parser.end(),!0},B.prototype.on=function(it,ut){var kt=this;return!kt._parser["on"+it]&&y.indexOf(it)!==-1&&(kt._parser["on"+it]=function(){var Nt=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Nt.splice(0,0,it),kt.emit.apply(kt,Nt)}),E.prototype.on.call(kt,it,ut)};var P=/^\[CDATA\[$/i,U=/^DOCTYPE$/i,j="http://www.w3.org/XML/1998/namespace",V="http://www.w3.org/2000/xmlns/",tt={xml:j,xmlns:V},Q=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,X=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,gt=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,ft=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function xt(it){return it===" "||it===` +... Falling back to non-web worker version. `);if(!q.workerFactory){var gt=p("./elk-worker.min.js"),ft=gt.Worker;q.workerFactory=function(xt){return new ft(xt)}}return y(this,(U.__proto__||Object.getPrototypeOf(U)).call(this,q))}return U}(O);Object.defineProperty(m.exports,"__esModule",{value:!0}),m.exports=B,B.default=B},{"./elk-api.js":1,"./elk-worker.min.js":2,"webworker-threads":8}],4:[function(p,m,_){(function(E,y){var I=p("fs"),O=p("path"),B=O.join,P=O.dirname,U=I.accessSync&&function(et){try{I.accessSync(et)}catch{return!1}return!0}||I.existsSync||O.existsSync,W={arrow:E.env.NODE_BINDINGS_ARROW||" \u2192 ",compiled:E.env.NODE_BINDINGS_COMPILED_DIR||"compiled",platform:E.platform,arch:E.arch,version:E.versions.node,bindings:"bindings.node",try:[["module_root","build","bindings"],["module_root","build","Debug","bindings"],["module_root","build","Release","bindings"],["module_root","out","Debug","bindings"],["module_root","Debug","bindings"],["module_root","out","Release","bindings"],["module_root","Release","bindings"],["module_root","build","default","bindings"],["module_root","compiled","version","platform","arch","bindings"]]};function q(et){typeof et=="string"?et={bindings:et}:et||(et={}),Object.keys(W).map(function(Ot){Ot in et||(et[Ot]=W[Ot])}),et.module_root||(et.module_root=_.getRoot(_.getFileName())),O.extname(et.bindings)!=".node"&&(et.bindings+=".node");for(var Q=[],X=0,gt=et.try.length,ft,xt,Bt;X=0;et--){var Q=U[et];Q==="."?U.splice(et,1):Q===".."?(U.splice(et,1),q++):q&&(U.splice(et,1),q--)}if(W)for(;q--;q)U.unshift("..");return U}var I=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,O=function(U){return I.exec(U).slice(1)};_.resolve=function(){for(var U="",W=!1,q=arguments.length-1;q>=-1&&!W;q--){var et=q>=0?arguments[q]:E.cwd();if(typeof et!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!et)continue;U=et+"/"+U,W=et.charAt(0)==="/"}return U=y(B(U.split("/"),function(Q){return!!Q}),!W).join("/"),(W?"/":"")+U||"."},_.normalize=function(U){var W=_.isAbsolute(U),q=P(U,-1)==="/";return U=y(B(U.split("/"),function(et){return!!et}),!W).join("/"),!U&&!W&&(U="."),U&&q&&(U+="/"),(W?"/":"")+U},_.isAbsolute=function(U){return U.charAt(0)==="/"},_.join=function(){var U=Array.prototype.slice.call(arguments,0);return _.normalize(B(U,function(W,q){if(typeof W!="string")throw new TypeError("Arguments to path.join must be strings");return W}).join("/"))},_.relative=function(U,W){U=_.resolve(U).substr(1),W=_.resolve(W).substr(1);function q(Bt){for(var Ot=0;Ot=0&&Bt[Pt]==="";Pt--);return Ot>Pt?[]:Bt.slice(Ot,Pt-Ot+1)}for(var et=q(U.split("/")),Q=q(W.split("/")),X=Math.min(et.length,Q.length),gt=X,ft=0;ft1)for(var Pt=1;Pt{(function(d){d.parser=function(it,ut){return new h(it,ut)},d.SAXParser=h,d.SAXStream=B,d.createStream=I,d.MAX_BUFFER_LENGTH=64*1024;var s=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];d.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function h(it,ut){if(!(this instanceof h))return new h(it,ut);var kt=this;m(kt),kt.q=kt.c="",kt.bufferCheckPosition=d.MAX_BUFFER_LENGTH,kt.encoding=null,kt.opt=ut||{},kt.opt.lowercase=kt.opt.lowercase||kt.opt.lowercasetags,kt.looseCase=kt.opt.lowercase?"toLowerCase":"toUpperCase",kt.opt.maxEntityCount=kt.opt.maxEntityCount||512,kt.opt.maxEntityDepth=kt.opt.maxEntityDepth||4,kt.entityCount=kt.entityDepth=0,kt.tags=[],kt.closed=kt.closedRoot=kt.sawRoot=!1,kt.tag=kt.error=null,kt.strict=!!it,kt.noscript=!!(it||kt.opt.noscript),kt.state=ot.BEGIN,kt.strictEntities=kt.opt.strictEntities,kt.ENTITIES=kt.strictEntities?Object.create(d.XML_ENTITIES):Object.create(d.ENTITIES),kt.attribList=[],kt.opt.xmlns&&(kt.ns=Object.create(et)),kt.opt.unquotedAttributeValues===void 0&&(kt.opt.unquotedAttributeValues=!it),kt.trackPosition=kt.opt.position!==!1,kt.trackPosition&&(kt.position=kt.line=kt.column=0),be(kt,"onready")}Object.create||(Object.create=function(it){function ut(){}ut.prototype=it;var kt=new ut;return kt}),Object.keys||(Object.keys=function(it){var ut=[];for(var kt in it)it.hasOwnProperty(kt)&&ut.push(kt);return ut});function p(it){for(var ut=Math.max(d.MAX_BUFFER_LENGTH,10),kt=0,Nt=0,ie=s.length;Ntut)switch(s[Nt]){case"textNode":hn(it);break;case"cdata":re(it,"oncdata",it.cdata),it.cdata="";break;case"script":re(it,"onscript",it.script),it.script="";break;default:ke(it,"Max buffer length exceeded: "+s[Nt])}kt=Math.max(kt,rn)}var Pn=d.MAX_BUFFER_LENGTH-kt;it.bufferCheckPosition=Pn+it.position}function m(it){for(var ut=0,kt=s.length;ut=2){if(it[0]===255&&it[1]===254)return"utf-16le";if(it[0]===254&&it[1]===255)return"utf-16be"}return it.length>=3&&it[0]===239&&it[1]===187&&it[2]===191?"utf8":it.length>=4?it[0]===60&&it[1]===0&&it[2]===63&&it[3]===0?"utf-16le":it[0]===0&&it[1]===60&&it[2]===0&&it[3]===63?"utf-16be":"utf8":ut?"utf8":null}function B(it,ut){if(!(this instanceof B))return new B(it,ut);E.apply(this),this._parser=new h(it,ut),this.writable=!0,this.readable=!0;var kt=this;this._parser.onend=function(){kt.emit("end")},this._parser.onerror=function(Nt){kt.emit("error",Nt),kt._parser.error=null},this._decoder=null,this._decoderBuffer=null,y.forEach(function(Nt){Object.defineProperty(kt,"on"+Nt,{get:function(){return kt._parser["on"+Nt]},set:function(ie){if(!ie)return kt.removeAllListeners(Nt),kt._parser["on"+Nt]=ie,ie;kt.on(Nt,ie)},enumerable:!0,configurable:!1})})}B.prototype=Object.create(E.prototype,{constructor:{value:B}}),B.prototype._decodeBuffer=function(it,ut){if(this._decoderBuffer&&(it=Buffer.concat([this._decoderBuffer,it]),this._decoderBuffer=null),!this._decoder){var kt=O(it,ut);if(!kt)return this._decoderBuffer=it,"";this._parser.encoding=kt,this._decoder=new TextDecoder(kt)}return this._decoder.decode(it,{stream:!ut})},B.prototype.write=function(it){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(it))it=this._decodeBuffer(it,!1);else if(this._decoderBuffer){var ut=this._decodeBuffer(Buffer.alloc(0),!0);ut&&(this._parser.write(ut),this.emit("data",ut))}return this._parser.write(it.toString()),this.emit("data",it),!0},B.prototype.end=function(it){if(it&&it.length&&this.write(it),this._decoderBuffer){var ut=this._decodeBuffer(Buffer.alloc(0),!0);ut&&(this._parser.write(ut),this.emit("data",ut))}else if(this._decoder){var kt=this._decoder.decode();kt&&(this._parser.write(kt),this.emit("data",kt))}return this._parser.end(),!0},B.prototype.on=function(it,ut){var kt=this;return!kt._parser["on"+it]&&y.indexOf(it)!==-1&&(kt._parser["on"+it]=function(){var Nt=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Nt.splice(0,0,it),kt.emit.apply(kt,Nt)}),E.prototype.on.call(kt,it,ut)};var P=/^\[CDATA\[$/i,U=/^DOCTYPE$/i,W="http://www.w3.org/XML/1998/namespace",q="http://www.w3.org/2000/xmlns/",et={xml:W,xmlns:q},Q=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,X=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,gt=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,ft=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function xt(it){return it===" "||it===` `||it==="\r"||it===" "}function Bt(it){return it==='"'||it==="'"}function Ot(it){return it===">"||xt(it)}function Pt(it,ut){return it.test(ut)}function se(it,ut){return!Pt(it,ut)}var ot=0;d.STATE={BEGIN:ot++,BEGIN_WHITESPACE:ot++,TEXT:ot++,TEXT_ENTITY:ot++,OPEN_WAKA:ot++,SGML_DECL:ot++,SGML_DECL_QUOTED:ot++,DOCTYPE:ot++,DOCTYPE_QUOTED:ot++,DOCTYPE_DTD:ot++,DOCTYPE_DTD_QUOTED:ot++,COMMENT_STARTING:ot++,COMMENT:ot++,COMMENT_ENDING:ot++,COMMENT_ENDED:ot++,CDATA:ot++,CDATA_ENDING:ot++,CDATA_ENDING_2:ot++,PROC_INST:ot++,PROC_INST_BODY:ot++,PROC_INST_ENDING:ot++,OPEN_TAG:ot++,OPEN_TAG_SLASH:ot++,ATTRIB:ot++,ATTRIB_NAME:ot++,ATTRIB_NAME_SAW_WHITE:ot++,ATTRIB_VALUE:ot++,ATTRIB_VALUE_QUOTED:ot++,ATTRIB_VALUE_CLOSED:ot++,ATTRIB_VALUE_UNQUOTED:ot++,ATTRIB_VALUE_ENTITY_Q:ot++,ATTRIB_VALUE_ENTITY_U:ot++,CLOSE_TAG:ot++,CLOSE_TAG_SAW_WHITE:ot++,SCRIPT:ot++,SCRIPT_ENDING:ot++},d.XML_ENTITIES=Object.assign(Object.create(null),{amp:"&",gt:">",lt:"<",quot:'"',apos:"'"}),d.ENTITIES=Object.assign(Object.create(null),{amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830}),Object.keys(d.ENTITIES).forEach(function(it){var ut=d.ENTITIES[it],kt=typeof ut=="number"?String.fromCharCode(ut):ut;d.ENTITIES[it]=kt});for(var Lt in d.STATE)d.STATE[d.STATE[Lt]]=Lt;ot=d.STATE;function be(it,ut,kt){it[ut]&&it[ut](kt)}function ln(it){var ut=it&&it.match(/(?:^|\s)encoding\s*=\s*(['"])([^'"]+)\1/i);return ut?ut[2]:null}function Fn(it){return it?it.toLowerCase().replace(/[^a-z0-9]/g,""):null}function ne(it,ut){let kt=Fn(it),Nt=Fn(ut);return!kt||!Nt?!0:Nt==="utf16"?kt==="utf16le"||kt==="utf16be":kt===Nt}function xe(it,ut){if(!(!it.strict||!it.encoding||!ut||ut.name!=="xml")){var kt=ln(ut.body);kt&&!ne(it.encoding,kt)&&en(it,"XML declaration encoding "+kt+" does not match detected stream encoding "+it.encoding.toUpperCase())}}function re(it,ut,kt){it.textNode&&hn(it),be(it,ut,kt)}function hn(it){it.textNode=Se(it.opt,it.textNode),it.textNode&&be(it,"ontext",it.textNode),it.textNode=""}function Se(it,ut){return it.trim&&(ut=ut.trim()),it.normalize&&(ut=ut.replace(/\s+/g," ")),ut}function ke(it,ut){return hn(it),it.trackPosition&&(ut+=` Line: `+it.line+` Column: `+it.column+` -Char: `+it.c),ut=new Error(ut),it.error=ut,be(it,"onerror",ut),it}function mn(it){return it.sawRoot&&!it.closedRoot&&en(it,"Unclosed root tag"),it.state!==ot.BEGIN&&it.state!==ot.BEGIN_WHITESPACE&&it.state!==ot.TEXT&&ke(it,"Unexpected end"),hn(it),it.c="",it.closed=!0,be(it,"onend"),h.call(it,it.strict,it.opt),it}function en(it,ut){if(typeof it!="object"||!(it instanceof h))throw new Error("bad call to strictFail");it.strict&&ke(it,ut)}function Qn(it){it.strict||(it.tagName=it.tagName[it.looseCase]());var ut=it.tags[it.tags.length-1]||it,kt=it.tag={name:it.tagName,attributes:{}};it.opt.xmlns&&(kt.ns=ut.ns),it.attribList.length=0,re(it,"onopentagstart",kt)}function ge(it,ut){var kt=it.indexOf(":"),Nt=kt<0?["",it]:it.split(":"),ie=Nt[0],rn=Nt[1];return ut&&it==="xmlns"&&(ie="xmlns",rn=""),{prefix:ie,local:rn}}function Pe(it){if(it.strict||(it.attribName=it.attribName[it.looseCase]()),it.attribList.indexOf(it.attribName)!==-1||it.tag.attributes.hasOwnProperty(it.attribName)){it.attribName=it.attribValue="";return}if(it.opt.xmlns){var ut=ge(it.attribName,!0),kt=ut.prefix,Nt=ut.local;if(kt==="xmlns")if(Nt==="xml"&&it.attribValue!==j)en(it,"xml: prefix must be bound to "+j+` -Actual: `+it.attribValue);else if(Nt==="xmlns"&&it.attribValue!==V)en(it,"xmlns: prefix must be bound to "+V+` +Char: `+it.c),ut=new Error(ut),it.error=ut,be(it,"onerror",ut),it}function mn(it){return it.sawRoot&&!it.closedRoot&&en(it,"Unclosed root tag"),it.state!==ot.BEGIN&&it.state!==ot.BEGIN_WHITESPACE&&it.state!==ot.TEXT&&ke(it,"Unexpected end"),hn(it),it.c="",it.closed=!0,be(it,"onend"),h.call(it,it.strict,it.opt),it}function en(it,ut){if(typeof it!="object"||!(it instanceof h))throw new Error("bad call to strictFail");it.strict&&ke(it,ut)}function Qn(it){it.strict||(it.tagName=it.tagName[it.looseCase]());var ut=it.tags[it.tags.length-1]||it,kt=it.tag={name:it.tagName,attributes:{}};it.opt.xmlns&&(kt.ns=ut.ns),it.attribList.length=0,re(it,"onopentagstart",kt)}function ge(it,ut){var kt=it.indexOf(":"),Nt=kt<0?["",it]:it.split(":"),ie=Nt[0],rn=Nt[1];return ut&&it==="xmlns"&&(ie="xmlns",rn=""),{prefix:ie,local:rn}}function Pe(it){if(it.strict||(it.attribName=it.attribName[it.looseCase]()),it.attribList.indexOf(it.attribName)!==-1||it.tag.attributes.hasOwnProperty(it.attribName)){it.attribName=it.attribValue="";return}if(it.opt.xmlns){var ut=ge(it.attribName,!0),kt=ut.prefix,Nt=ut.local;if(kt==="xmlns")if(Nt==="xml"&&it.attribValue!==W)en(it,"xml: prefix must be bound to "+W+` +Actual: `+it.attribValue);else if(Nt==="xmlns"&&it.attribValue!==q)en(it,"xmlns: prefix must be bound to "+q+` Actual: `+it.attribValue);else{var ie=it.tag,rn=it.tags[it.tags.length-1]||it;ie.ns===rn.ns&&(ie.ns=Object.create(rn.ns)),ie.ns[Nt]=it.attribValue}it.attribList.push([it.attribName,it.attribValue])}else it.tag.attributes[it.attribName]=it.attribValue,re(it,"onattribute",{name:it.attribName,value:it.attribValue});it.attribName=it.attribValue=""}function ti(it,ut){if(it.opt.xmlns){var kt=it.tag,Nt=ge(it.tagName);kt.prefix=Nt.prefix,kt.local=Nt.local,kt.uri=kt.ns[Nt.prefix]||"",kt.prefix&&!kt.uri&&(en(it,"Unbound namespace prefix: "+JSON.stringify(it.tagName)),kt.uri=Nt.prefix);var ie=it.tags[it.tags.length-1]||it;kt.ns&&ie.ns!==kt.ns&&Object.keys(kt.ns).forEach(function(Jt){re(it,"onopennamespace",{prefix:Jt,uri:kt.ns[Jt]})});for(var rn=0,Pn=it.attribList.length;rn",it.tagName="",it.state=ot.SCRIPT;return}re(it,"onscript",it.script),it.script=""}var ut=it.tags.length,kt=it.tagName;it.strict||(kt=kt[it.looseCase]());for(var Nt=kt;ut--;){var ie=it.tags[ut];if(ie.name!==Nt)en(it,"Unexpected close tag");else break}if(ut<0){en(it,"Unmatched closing tag: "+it.tagName),it.textNode+="",it.state=ot.TEXT;return}it.tagName=kt;for(var rn=it.tags.length;rn-- >ut;){var Pn=it.tag=it.tags.pop();it.tagName=it.tag.name,re(it,"onclosetag",it.tagName);var Tt={};for(var yt in Pn.ns)Tt[yt]=Pn.ns[yt];var ue=it.tags[it.tags.length-1]||it;it.opt.xmlns&&Pn.ns!==ue.ns&&Object.keys(Pn.ns).forEach(function(fn){var An=Pn.ns[fn];re(it,"onclosenamespace",{prefix:fn,uri:An})})}ut===0&&(it.closedRoot=!0),it.tagName=it.attribValue=it.attribName="",it.attribList.length=0,it.state=ot.TEXT}function ki(it){var ut=it.entity,kt=ut.toLowerCase(),Nt,ie="";return it.ENTITIES[ut]?it.ENTITIES[ut]:it.ENTITIES[kt]?it.ENTITIES[kt]:(ut=kt,ut.charAt(0)==="#"&&(ut.charAt(1)==="x"?(ut=ut.slice(2),Nt=parseInt(ut,16),ie=Nt.toString(16)):(ut=ut.slice(1),Nt=parseInt(ut,10),ie=Nt.toString(10))),ut=ut.replace(/^0+/,""),isNaN(Nt)||ie.toLowerCase()!==ut||Nt<0||Nt>1114111||!lr(Nt)?(en(it,"Invalid character entity"),"&"+it.entity+";"):String.fromCodePoint(Nt))}function lr(it){return it===9||it===10||it===13||it>=32&&it<=55295||it>=57344&&it<=65533||it>=65536&&it<=1114111}function pr(it,ut){ut==="<"?(it.state=ot.OPEN_WAKA,it.startTagPosition=it.position):xt(ut)||(en(it,"Non-whitespace before first tag."),it.textNode=ut,it.state=ot.TEXT)}function Kt(it,ut){var kt="";return ut"?(re(ut,"onsgmldeclaration",ut.sgmlDecl),ut.sgmlDecl="",ut.state=ot.TEXT):(Bt(Nt)&&(ut.state=ot.SGML_DECL_QUOTED),ut.sgmlDecl+=Nt);continue;case ot.SGML_DECL_QUOTED:Nt===ut.q&&(ut.state=ot.SGML_DECL,ut.q=""),ut.sgmlDecl+=Nt;continue;case ot.DOCTYPE:Nt===">"?(ut.state=ot.TEXT,re(ut,"ondoctype",ut.doctype),ut.doctype=!0):(ut.doctype+=Nt,Nt==="["?ut.state=ot.DOCTYPE_DTD:Bt(Nt)&&(ut.state=ot.DOCTYPE_QUOTED,ut.q=Nt));continue;case ot.DOCTYPE_QUOTED:ut.doctype+=Nt,Nt===ut.q&&(ut.q="",ut.state=ot.DOCTYPE);continue;case ot.DOCTYPE_DTD:Nt==="]"?(ut.doctype+=Nt,ut.state=ot.DOCTYPE):Nt==="<"?(ut.state=ot.OPEN_WAKA,ut.startTagPosition=ut.position):Bt(Nt)?(ut.doctype+=Nt,ut.state=ot.DOCTYPE_DTD_QUOTED,ut.q=Nt):ut.doctype+=Nt;continue;case ot.DOCTYPE_DTD_QUOTED:ut.doctype+=Nt,Nt===ut.q&&(ut.state=ot.DOCTYPE_DTD,ut.q="");continue;case ot.COMMENT:Nt==="-"?ut.state=ot.COMMENT_ENDING:ut.comment+=Nt;continue;case ot.COMMENT_ENDING:Nt==="-"?(ut.state=ot.COMMENT_ENDED,ut.comment=Se(ut.opt,ut.comment),ut.comment&&re(ut,"oncomment",ut.comment),ut.comment=""):(ut.comment+="-"+Nt,ut.state=ot.COMMENT);continue;case ot.COMMENT_ENDED:Nt!==">"?(en(ut,"Malformed comment"),ut.comment+="--"+Nt,ut.state=ot.COMMENT):ut.doctype&&ut.doctype!==!0?ut.state=ot.DOCTYPE_DTD:ut.state=ot.TEXT;continue;case ot.CDATA:for(var rn=kt-1;Nt&&Nt!=="]";)Nt=Kt(it,kt++),Nt&&ut.trackPosition&&(ut.position++,Nt===` -`?(ut.line++,ut.column=0):ut.column++);ut.cdata+=it.substring(rn,kt-1),Nt==="]"&&(ut.state=ot.CDATA_ENDING);continue;case ot.CDATA_ENDING:Nt==="]"?ut.state=ot.CDATA_ENDING_2:(ut.cdata+="]"+Nt,ut.state=ot.CDATA);continue;case ot.CDATA_ENDING_2:Nt===">"?(ut.cdata&&re(ut,"oncdata",ut.cdata),re(ut,"onclosecdata"),ut.cdata="",ut.state=ot.TEXT):Nt==="]"?ut.cdata+="]":(ut.cdata+="]]"+Nt,ut.state=ot.CDATA);continue;case ot.PROC_INST:Nt==="?"?ut.state=ot.PROC_INST_ENDING:xt(Nt)?ut.state=ot.PROC_INST_BODY:ut.procInstName+=Nt;continue;case ot.PROC_INST_BODY:if(!ut.procInstBody&&xt(Nt))continue;Nt==="?"?ut.state=ot.PROC_INST_ENDING:ut.procInstBody+=Nt;continue;case ot.PROC_INST_ENDING:if(Nt===">"){let ue={name:ut.procInstName,body:ut.procInstBody};xe(ut,ue),re(ut,"onprocessinginstruction",ue),ut.procInstName=ut.procInstBody="",ut.state=ot.TEXT}else ut.procInstBody+="?"+Nt,ut.state=ot.PROC_INST_BODY;continue;case ot.OPEN_TAG:Pt(X,Nt)?ut.tagName+=Nt:(Qn(ut),Nt===">"?ti(ut):Nt==="/"?ut.state=ot.OPEN_TAG_SLASH:(xt(Nt)||en(ut,"Invalid character in tag name"),ut.state=ot.ATTRIB));continue;case ot.OPEN_TAG_SLASH:Nt===">"?(ti(ut,!0),Yi(ut)):(en(ut,"Forward-slash in opening tag not followed by >"),ut.state=ot.ATTRIB);continue;case ot.ATTRIB:if(xt(Nt))continue;Nt===">"?ti(ut):Nt==="/"?ut.state=ot.OPEN_TAG_SLASH:Pt(Q,Nt)?(ut.attribName=Nt,ut.attribValue="",ut.state=ot.ATTRIB_NAME):en(ut,"Invalid attribute name");continue;case ot.ATTRIB_NAME:Nt==="="?ut.state=ot.ATTRIB_VALUE:Nt===">"?(en(ut,"Attribute without value"),ut.attribValue=ut.attribName,Pe(ut),ti(ut)):xt(Nt)?ut.state=ot.ATTRIB_NAME_SAW_WHITE:Pt(X,Nt)?ut.attribName+=Nt:en(ut,"Invalid attribute name");continue;case ot.ATTRIB_NAME_SAW_WHITE:if(Nt==="=")ut.state=ot.ATTRIB_VALUE;else{if(xt(Nt))continue;en(ut,"Attribute without value"),ut.tag.attributes[ut.attribName]="",ut.attribValue="",re(ut,"onattribute",{name:ut.attribName,value:""}),ut.attribName="",Nt===">"?ti(ut):Pt(Q,Nt)?(ut.attribName=Nt,ut.state=ot.ATTRIB_NAME):(en(ut,"Invalid attribute name"),ut.state=ot.ATTRIB)}continue;case ot.ATTRIB_VALUE:if(xt(Nt))continue;Bt(Nt)?(ut.q=Nt,ut.state=ot.ATTRIB_VALUE_QUOTED):(ut.opt.unquotedAttributeValues||ke(ut,"Unquoted attribute value"),ut.state=ot.ATTRIB_VALUE_UNQUOTED,ut.attribValue=Nt);continue;case ot.ATTRIB_VALUE_QUOTED:if(Nt!==ut.q){Nt==="&"?ut.state=ot.ATTRIB_VALUE_ENTITY_Q:ut.attribValue+=Nt;continue}Pe(ut),ut.q="",ut.state=ot.ATTRIB_VALUE_CLOSED;continue;case ot.ATTRIB_VALUE_CLOSED:xt(Nt)?ut.state=ot.ATTRIB:Nt===">"?ti(ut):Nt==="/"?ut.state=ot.OPEN_TAG_SLASH:Pt(Q,Nt)?(en(ut,"No whitespace between attributes"),ut.attribName=Nt,ut.attribValue="",ut.state=ot.ATTRIB_NAME):en(ut,"Invalid attribute name");continue;case ot.ATTRIB_VALUE_UNQUOTED:if(!Ot(Nt)){Nt==="&"?ut.state=ot.ATTRIB_VALUE_ENTITY_U:ut.attribValue+=Nt;continue}Pe(ut),Nt===">"?ti(ut):ut.state=ot.ATTRIB;continue;case ot.CLOSE_TAG:if(ut.tagName)Nt===">"?Yi(ut):Pt(X,Nt)?ut.tagName+=Nt:ut.script?(ut.script+=""?Yi(ut):en(ut,"Invalid characters in closing tag");continue;case ot.TEXT_ENTITY:case ot.ATTRIB_VALUE_ENTITY_Q:case ot.ATTRIB_VALUE_ENTITY_U:var Pn,Tt;switch(ut.state){case ot.TEXT_ENTITY:Pn=ot.TEXT,Tt="textNode";break;case ot.ATTRIB_VALUE_ENTITY_Q:Pn=ot.ATTRIB_VALUE_QUOTED,Tt="attribValue";break;case ot.ATTRIB_VALUE_ENTITY_U:Pn=ot.ATTRIB_VALUE_UNQUOTED,Tt="attribValue";break}if(Nt===";"){var yt=ki(ut);ut.opt.unparsedEntities&&!Object.values(d.XML_ENTITIES).includes(yt)?((ut.entityCount+=1)>ut.opt.maxEntityCount&&ke(ut,"Parsed entity count exceeds max entity count"),(ut.entityDepth+=1)>ut.opt.maxEntityDepth&&ke(ut,"Parsed entity depth exceeds max entity depth"),ut.entity="",ut.state=Pn,ut.write(yt),ut.entityDepth-=1):(ut[Tt]+=yt,ut.entity="",ut.state=Pn)}else Pt(ut.entity.length?ft:gt,Nt)?ut.entity+=Nt:(en(ut,"Invalid character in entity name"),ut[Tt]+="&"+ut.entity+Nt,ut.entity="",ut.state=Pn);continue;default:throw new Error(ut,"Unknown state: "+ut.state)}return ut.position>=ut.bufferCheckPosition&&p(ut),ut}String.fromCodePoint||function(){var it=String.fromCharCode,ut=Math.floor,kt=function(){var Nt=16384,ie=[],rn,Pn,Tt=-1,yt=arguments.length;if(!yt)return"";for(var ue="";++Tt1114111||ut(fn)!==fn)throw RangeError("Invalid code point: "+fn);fn<=65535?ie.push(fn):(fn-=65536,rn=(fn>>10)+55296,Pn=fn%1024+56320,ie.push(rn,Pn)),(Tt+1===yt||ie.length>Nt)&&(ue+=it.apply(null,ie),ie.length=0)}return ue};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:kt,configurable:!0,writable:!0}):String.fromCodePoint=kt}()})(typeof xtt>"u"?xtt.sax={}:xtt)});var $Xt=Ld((pJe,WXt)=>{"use strict";var fMe=GXt().parser;function dMe(d){var s=[],h=[],p=s,m;return m=fMe(!0),m.ontext=function(_){_.trim()!==""&&p.push(_)},m.onopentag=function(_){var E;E=[_.name,_.attributes],h.push(p),p.push(E),p=E},m.onclosetag=function(){p=h.pop()},m.write(d).close(),s[0]}WXt.exports=dMe});var XXt=Ld((gJe,qXt)=>{"use strict";function pMe(d){return d&&Object.prototype.toString.call(d)==="[object Object]"}function gMe(d){var s,h=[];return typeof d!="string"?d:(s=d.split(` +`?(ut.line++,ut.column=0):ut.column++);ut.cdata+=it.substring(rn,kt-1),Nt==="]"&&(ut.state=ot.CDATA_ENDING);continue;case ot.CDATA_ENDING:Nt==="]"?ut.state=ot.CDATA_ENDING_2:(ut.cdata+="]"+Nt,ut.state=ot.CDATA);continue;case ot.CDATA_ENDING_2:Nt===">"?(ut.cdata&&re(ut,"oncdata",ut.cdata),re(ut,"onclosecdata"),ut.cdata="",ut.state=ot.TEXT):Nt==="]"?ut.cdata+="]":(ut.cdata+="]]"+Nt,ut.state=ot.CDATA);continue;case ot.PROC_INST:Nt==="?"?ut.state=ot.PROC_INST_ENDING:xt(Nt)?ut.state=ot.PROC_INST_BODY:ut.procInstName+=Nt;continue;case ot.PROC_INST_BODY:if(!ut.procInstBody&&xt(Nt))continue;Nt==="?"?ut.state=ot.PROC_INST_ENDING:ut.procInstBody+=Nt;continue;case ot.PROC_INST_ENDING:if(Nt===">"){let ue={name:ut.procInstName,body:ut.procInstBody};xe(ut,ue),re(ut,"onprocessinginstruction",ue),ut.procInstName=ut.procInstBody="",ut.state=ot.TEXT}else ut.procInstBody+="?"+Nt,ut.state=ot.PROC_INST_BODY;continue;case ot.OPEN_TAG:Pt(X,Nt)?ut.tagName+=Nt:(Qn(ut),Nt===">"?ti(ut):Nt==="/"?ut.state=ot.OPEN_TAG_SLASH:(xt(Nt)||en(ut,"Invalid character in tag name"),ut.state=ot.ATTRIB));continue;case ot.OPEN_TAG_SLASH:Nt===">"?(ti(ut,!0),Yi(ut)):(en(ut,"Forward-slash in opening tag not followed by >"),ut.state=ot.ATTRIB);continue;case ot.ATTRIB:if(xt(Nt))continue;Nt===">"?ti(ut):Nt==="/"?ut.state=ot.OPEN_TAG_SLASH:Pt(Q,Nt)?(ut.attribName=Nt,ut.attribValue="",ut.state=ot.ATTRIB_NAME):en(ut,"Invalid attribute name");continue;case ot.ATTRIB_NAME:Nt==="="?ut.state=ot.ATTRIB_VALUE:Nt===">"?(en(ut,"Attribute without value"),ut.attribValue=ut.attribName,Pe(ut),ti(ut)):xt(Nt)?ut.state=ot.ATTRIB_NAME_SAW_WHITE:Pt(X,Nt)?ut.attribName+=Nt:en(ut,"Invalid attribute name");continue;case ot.ATTRIB_NAME_SAW_WHITE:if(Nt==="=")ut.state=ot.ATTRIB_VALUE;else{if(xt(Nt))continue;en(ut,"Attribute without value"),ut.tag.attributes[ut.attribName]="",ut.attribValue="",re(ut,"onattribute",{name:ut.attribName,value:""}),ut.attribName="",Nt===">"?ti(ut):Pt(Q,Nt)?(ut.attribName=Nt,ut.state=ot.ATTRIB_NAME):(en(ut,"Invalid attribute name"),ut.state=ot.ATTRIB)}continue;case ot.ATTRIB_VALUE:if(xt(Nt))continue;Bt(Nt)?(ut.q=Nt,ut.state=ot.ATTRIB_VALUE_QUOTED):(ut.opt.unquotedAttributeValues||ke(ut,"Unquoted attribute value"),ut.state=ot.ATTRIB_VALUE_UNQUOTED,ut.attribValue=Nt);continue;case ot.ATTRIB_VALUE_QUOTED:if(Nt!==ut.q){Nt==="&"?ut.state=ot.ATTRIB_VALUE_ENTITY_Q:ut.attribValue+=Nt;continue}Pe(ut),ut.q="",ut.state=ot.ATTRIB_VALUE_CLOSED;continue;case ot.ATTRIB_VALUE_CLOSED:xt(Nt)?ut.state=ot.ATTRIB:Nt===">"?ti(ut):Nt==="/"?ut.state=ot.OPEN_TAG_SLASH:Pt(Q,Nt)?(en(ut,"No whitespace between attributes"),ut.attribName=Nt,ut.attribValue="",ut.state=ot.ATTRIB_NAME):en(ut,"Invalid attribute name");continue;case ot.ATTRIB_VALUE_UNQUOTED:if(!Ot(Nt)){Nt==="&"?ut.state=ot.ATTRIB_VALUE_ENTITY_U:ut.attribValue+=Nt;continue}Pe(ut),Nt===">"?ti(ut):ut.state=ot.ATTRIB;continue;case ot.CLOSE_TAG:if(ut.tagName)Nt===">"?Yi(ut):Pt(X,Nt)?ut.tagName+=Nt:ut.script?(ut.script+=""?Yi(ut):en(ut,"Invalid characters in closing tag");continue;case ot.TEXT_ENTITY:case ot.ATTRIB_VALUE_ENTITY_Q:case ot.ATTRIB_VALUE_ENTITY_U:var Pn,Tt;switch(ut.state){case ot.TEXT_ENTITY:Pn=ot.TEXT,Tt="textNode";break;case ot.ATTRIB_VALUE_ENTITY_Q:Pn=ot.ATTRIB_VALUE_QUOTED,Tt="attribValue";break;case ot.ATTRIB_VALUE_ENTITY_U:Pn=ot.ATTRIB_VALUE_UNQUOTED,Tt="attribValue";break}if(Nt===";"){var yt=ki(ut);ut.opt.unparsedEntities&&!Object.values(d.XML_ENTITIES).includes(yt)?((ut.entityCount+=1)>ut.opt.maxEntityCount&&ke(ut,"Parsed entity count exceeds max entity count"),(ut.entityDepth+=1)>ut.opt.maxEntityDepth&&ke(ut,"Parsed entity depth exceeds max entity depth"),ut.entity="",ut.state=Pn,ut.write(yt),ut.entityDepth-=1):(ut[Tt]+=yt,ut.entity="",ut.state=Pn)}else Pt(ut.entity.length?ft:gt,Nt)?ut.entity+=Nt:(en(ut,"Invalid character in entity name"),ut[Tt]+="&"+ut.entity+Nt,ut.entity="",ut.state=Pn);continue;default:throw new Error(ut,"Unknown state: "+ut.state)}return ut.position>=ut.bufferCheckPosition&&p(ut),ut}String.fromCodePoint||function(){var it=String.fromCharCode,ut=Math.floor,kt=function(){var Nt=16384,ie=[],rn,Pn,Tt=-1,yt=arguments.length;if(!yt)return"";for(var ue="";++Tt1114111||ut(fn)!==fn)throw RangeError("Invalid code point: "+fn);fn<=65535?ie.push(fn):(fn-=65536,rn=(fn>>10)+55296,Pn=fn%1024+56320,ie.push(rn,Pn)),(Tt+1===yt||ie.length>Nt)&&(ue+=it.apply(null,ie),ie.length=0)}return ue};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:kt,configurable:!0,writable:!0}):String.fromCodePoint=kt}()})(typeof xtt>"u"?xtt.sax={}:xtt)});var XXt=Ld((gJe,qXt)=>{"use strict";var fMe=VXt().parser;function dMe(d){var s=[],h=[],p=s,m;return m=fMe(!0),m.ontext=function(_){_.trim()!==""&&p.push(_)},m.onopentag=function(_){var E;E=[_.name,_.attributes],h.push(p),p.push(E),p=E},m.onclosetag=function(){p=h.pop()},m.write(d).close(),s[0]}qXt.exports=dMe});var KXt=Ld((mJe,YXt)=>{"use strict";function pMe(d){return d&&Object.prototype.toString.call(d)==="[object Object]"}function gMe(d){var s,h=[];return typeof d!="string"?d:(s=d.split(` `),s.length===1?" "+d:(s.forEach(function(p){if(p.trim()===""){h.push(p);return}h.push(" "+p)}),h.join(` `)))}function mMe(d){var s=d.split(` `),h=[];return s.forEach(function(p){p.trim()!==""&&h.push(p)}),h.join(` -`)}function VXt(d){var s,h,p,m;return h="",m=!0,p=d.some(function(_,E,y){if(E===0)return s="<"+_,y.length===1?!0:void 0;if(E===1)if(pMe(_)){if(Object.keys(_).forEach(function(I){s+=" "+I+'="'+_[I]+'"'}),y.length===2)return!0;s+=">";return}else s+=">";switch(typeof _){case"string":case"number":case"boolean":h+=_+` -`;return}m=!1,h+=VXt(_)}),p?s+`/> +`)}function ZXt(d){var s,h,p,m;return h="",m=!0,p=d.some(function(_,E,y){if(E===0)return s="<"+_,y.length===1?!0:void 0;if(E===1)if(pMe(_)){if(Object.keys(_).forEach(function(I){s+=" "+I+'="'+_[I]+'"'}),y.length===2)return!0;s+=">";return}else s+=">";switch(typeof _){case"string":case"number":case"boolean":h+=_+` +`;return}m=!1,h+=ZXt(_)}),p?s+`/> `:m?s+mMe(h)+" `:s+` `+gMe(h)+" -`}qXt.exports=VXt});var YXt=Ld((mJe,ZXt)=>{"use strict";function bMe(d,s){var h=function(){},p=h,m=h;function _(){this._skip=!0}function E(){this._remove=!0}function y(B){this._name=B}function I(B){this._replace=B}function N(B,P){var U,j={attr:{},full:B},V={name:y,skip:_,remove:E,replace:I,_name:void 0,_skip:!1,_remove:!1,_replace:void 0},tt=!0,Q,X,gt;if(B!==void 0&&B!==null&&B!==!0&&B!==!1)switch(U=Object.prototype.toString.call(B),U){case"[object String]":case"[object Number]":return;case"[object Array]":if(B.some(function(ft,xt){if(xt===0)return j.name=ft,!1;if(xt===1)return Object.prototype.toString.call(ft)==="[object Object]"&&(tt=!1,j.attr=ft),!0}),p.call(V,j,P),V._name&&(B[0]=V._name),V._replace)return V._replace;if(V._remove)return null;if(!V._skip){for(Q=0,X=B.length;Q1||Q===1&&tt){if(gt=N(B[Q],j),gt===null){B.splice(Q,1),X-=1;continue}gt&&(B[Q]=gt)}Q+=1}if(m.call(V,j,P),V._name&&(B[0]=V._name),V._replace)return V._replace;if(V._remove)return null}}}s&&(s.enter&&(p=s.enter),s.leave&&(m=s.leave)),N(d,void 0)}ZXt.exports=bMe});var sU=Ld((bJe,tZt)=>{"use strict";var KXt=$Xt(),JXt=XXt(),QXt=YXt();tZt.exports={parse:KXt,stringify:JXt,traverse:QXt,p:KXt,s:JXt,t:QXt}});var UA=Ld((LI,oU)=>{(function(){var d,s="4.18.1",h=200,p="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",m="Expected a function",_="Invalid `variable` option passed into `_.template`",E="Invalid `imports` option passed into `_.template`",y="__lodash_hash_undefined__",I=500,N="__lodash_placeholder__",B=1,P=2,U=4,j=1,V=2,tt=1,Q=2,X=4,gt=8,ft=16,xt=32,Bt=64,Ot=128,Pt=256,se=512,ot=30,Lt="...",be=800,ln=16,Fn=1,ne=2,xe=3,re=1/0,hn=9007199254740991,Se=17976931348623157e292,ke=NaN,mn=4294967295,en=mn-1,Qn=mn>>>1,ge=[["ary",Ot],["bind",tt],["bindKey",Q],["curry",gt],["curryRight",ft],["flip",se],["partial",xt],["partialRight",Bt],["rearg",Pt]],Pe="[object Arguments]",ti="[object Array]",Yi="[object AsyncFunction]",ki="[object Boolean]",lr="[object Date]",pr="[object DOMException]",Kt="[object Error]",wn="[object Function]",it="[object GeneratorFunction]",ut="[object Map]",kt="[object Number]",Nt="[object Null]",ie="[object Object]",rn="[object Promise]",Pn="[object Proxy]",Tt="[object RegExp]",yt="[object Set]",ue="[object String]",fn="[object Symbol]",An="[object Undefined]",zn="[object WeakMap]",Li="[object WeakSet]",xi="[object ArrayBuffer]",Jt="[object DataView]",nn="[object Float32Array]",vn="[object Float64Array]",he="[object Int8Array]",Mn="[object Int16Array]",Sn="[object Int32Array]",gn="[object Uint8Array]",Ce="[object Uint8ClampedArray]",dn="[object Uint16Array]",jn="[object Uint32Array]",ar=/\b__p \+= '';/g,gr=/\b(__p \+=) '' \+/g,tr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ln=/&(?:amp|lt|gt|quot|#39);/g,Qt=/[&<>"']/g,Mi=RegExp(Ln.source),sn=RegExp(Qt.source),Zn=/<%-([\s\S]+?)%>/g,oi=/<%([\s\S]+?)%>/g,Jr=/<%=([\s\S]+?)%>/g,Bs=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Oc=/^\w*$/,ru=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fc=/[\\^$.*+?()[\]{}|]/g,il=RegExp(fc.source),va=/^\s+/,Mr=/\s/,rv=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,U0=/\{\n\/\* \[wrapped with (.+)\] \*/,sv=/,? & /,z0=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,j0=/[()=,{}\[\]\/\s]/,ov=/\\(\\)?/g,vg=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,cv=/\w*$/,l3=/^[-+]0x[0-9a-f]+$/i,Rt=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,Je=/^0o[0-7]+$/i,tn=/^(?:0|[1-9]\d*)$/,Ze=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Hi=/($^)/,Pr=/['\n\r\u2028\u2029\\]/g,Gr="\\ud800-\\udfff",hs="\\u0300-\\u036f",Fs="\\ufe20-\\ufe2f",Ms="\\u20d0-\\u20ff",bs=hs+Fs+Ms,Tc="\\u2700-\\u27bf",rl="a-z\\xdf-\\xf6\\xf8-\\xff",Oa="\\xac\\xb1\\xd7\\xf7",wh="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Nr="\\u2000-\\u206f",mr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a1="A-Z\\xc0-\\xd6\\xd8-\\xde",dc="\\ufe0e\\ufe0f",vh=Oa+wh+Nr+mr,_g="['\u2019]",ws="["+Gr+"]",$c="["+vh+"]",_a="["+bs+"]",ff="\\d+",Bl="["+Tc+"]",_h="["+rl+"]",u1="[^"+Gr+vh+ff+Tc+rl+a1+"]",Nd="\\ud83c[\\udffb-\\udfff]",ya="(?:"+_a+"|"+Nd+")",yg="[^"+Gr+"]",H0="(?:\\ud83c[\\udde6-\\uddff]){2}",G0="[\\ud800-\\udbff][\\udc00-\\udfff]",xg="["+a1+"]",vb="\\u200d",ky="(?:"+_h+"|"+u1+")",h3="(?:"+xg+"|"+u1+")",av="(?:"+_g+"(?:d|ll|m|re|s|t|ve))?",Ly="(?:"+_g+"(?:D|LL|M|RE|S|T|VE))?",Py=ya+"?",uv="["+dc+"]?",xS="(?:"+vb+"(?:"+[yg,H0,G0].join("|")+")"+uv+Py+")*",f3="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",_k="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",As=uv+Py+xS,bp="(?:"+[Bl,H0,G0].join("|")+")"+As,Vc="(?:"+[yg+_a+"?",_a,H0,G0,ws].join("|")+")",MS=RegExp(_g,"g"),d3=RegExp(_a,"g"),lv=RegExp(Nd+"(?="+Nd+")|"+Vc+As,"g"),p3=RegExp([xg+"?"+_h+"+"+av+"(?="+[$c,xg,"$"].join("|")+")",h3+"+"+Ly+"(?="+[$c,xg+ky,"$"].join("|")+")",xg+"?"+ky+"+"+av,xg+"+"+Ly,_k,f3,ff,bp].join("|"),"g"),W0=RegExp("["+vb+Gr+bs+dc+"]"),g3=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,hv=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],sl=-1,rc={};rc[nn]=rc[vn]=rc[he]=rc[Mn]=rc[Sn]=rc[gn]=rc[Ce]=rc[dn]=rc[jn]=!0,rc[Pe]=rc[ti]=rc[xi]=rc[ki]=rc[Jt]=rc[lr]=rc[Kt]=rc[wn]=rc[ut]=rc[kt]=rc[ie]=rc[Tt]=rc[yt]=rc[ue]=rc[zn]=!1;var Bc={};Bc[Pe]=Bc[ti]=Bc[xi]=Bc[Jt]=Bc[ki]=Bc[lr]=Bc[nn]=Bc[vn]=Bc[he]=Bc[Mn]=Bc[Sn]=Bc[ut]=Bc[kt]=Bc[ie]=Bc[Tt]=Bc[yt]=Bc[ue]=Bc[fn]=Bc[gn]=Bc[Ce]=Bc[dn]=Bc[jn]=!0,Bc[Kt]=Bc[wn]=Bc[zn]=!1;var ES={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},yk={"&":"&","<":"<",">":">",'"':""","'":"'"},SS={"&":"&","<":"<",">":">",""":'"',"'":"'"},m3={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},xk=parseFloat,TS=parseInt,Co=typeof global=="object"&&global&&global.Object===Object&&global,Mk=typeof self=="object"&&self&&self.Object===Object&&self,Cc=Co||Mk||Function("return this")(),$0=typeof LI=="object"&&LI&&!LI.nodeType&&LI,Mg=$0&&typeof oU=="object"&&oU&&!oU.nodeType&&oU,CS=Mg&&Mg.exports===$0,fv=CS&&Co.process,Xf=function(){try{var oe=Mg&&Mg.require&&Mg.require("util").types;return oe||fv&&fv.binding&&fv.binding("util")}catch{}}(),b3=Xf&&Xf.isArrayBuffer,AS=Xf&&Xf.isDate,kS=Xf&&Xf.isMap,Iy=Xf&&Xf.isRegExp,LS=Xf&&Xf.isSet,Od=Xf&&Xf.isTypedArray;function df(oe,_n,$e){switch($e.length){case 0:return oe.call(_n);case 1:return oe.call(_n,$e[0]);case 2:return oe.call(_n,$e[0],$e[1]);case 3:return oe.call(_n,$e[0],$e[1],$e[2])}return oe.apply(_n,$e)}function PS(oe,_n,$e,er){for(var vs=-1,Wo=oe==null?0:oe.length;++vs-1}function Dy(oe,_n,$e){for(var er=-1,vs=oe==null?0:oe.length;++er-1;);return $e}function V0(oe,_n){for(var $e=oe.length;$e--&&vp(_n,oe[$e],0)>-1;);return $e}function Tk(oe,_n){for(var $e=oe.length,er=0;$e--;)oe[$e]===_n&&++er;return er}var pv=dv(ES),OS=dv(yk);function Uy(oe){return"\\"+m3[oe]}function Ck(oe,_n){return oe==null?d:oe[_n]}function gf(oe){return W0.test(oe)}function zy(oe){return g3.test(oe)}function Ak(oe){for(var _n,$e=[];!(_n=oe.next()).done;)$e.push(_n.value);return $e}function gv(oe){var _n=-1,$e=Array(oe.size);return oe.forEach(function(er,vs){$e[++_n]=[vs,er]}),$e}function BS(oe,_n){return function($e){return oe(_n($e))}}function Fl(oe,_n){for(var $e=-1,er=oe.length,vs=0,Wo=[];++$e-1}function oz(x,C){var F=this.__data__,J=R3(F,x);return J<0?(++this.size,F.push([x,C])):F[J][1]=C,this}Y0.prototype.clear=nz,Y0.prototype.delete=iz,Y0.prototype.get=rz,Y0.prototype.has=sz,Y0.prototype.set=oz;function K0(x){var C=-1,F=x==null?0:x.length;for(this.clear();++C=C?x:C)),x}function _p(x,C,F,J,mt,St){var Vt,ee=C&B,fe=C&P,Cn=C&U;if(F&&(Vt=mt?F(x,J,mt,St):F(x)),Vt!==d)return Vt;if(!$a(x))return x;var kn=Us(x);if(kn){if(Vt=sj(x),!ee)return td(x,Vt)}else{var Wn=zh(x),Ki=Wn==wn||Wn==it;if(zd(x))return KR(x,ee);if(Wn==ie||Wn==Pe||Ki&&!mt){if(Vt=fe||Ki?{}:m8(x),!ee)return fe?Xz(x,yz(Vt,x)):qz(x,AR(Vt,x))}else{if(!Bc[Wn])return mt?x:{};Vt=oj(x,Wn,ee)}}St||(St=new p1);var Er=St.get(x);if(Er)return Er;St.set(x,Vt),t9(x)?x.forEach(function(Zr){Vt.add(_p(Zr,C,F,Zr,x,St))}):J8(x)&&x.forEach(function(Zr,co){Vt.set(co,_p(Zr,C,F,co,x,St))});var Wr=Cn?fe?n5:e5:fe?ed:Hl,no=kn?d:Wr(x);return su(no||x,function(Zr,co){no&&(co=Zr,Zr=x[co]),I3(Vt,co,_p(Zr,C,F,co,x,St))}),Vt}function xz(x){var C=Hl(x);return function(F){return kR(F,x,C)}}function kR(x,C,F){var J=F.length;if(x==null)return!J;for(x=Fc(x);J--;){var mt=F[J],St=C[mt],Vt=x[mt];if(Vt===d&&!(mt in x)||!St(Vt))return!1}return!0}function LR(x,C,F){if(typeof x!="function")throw new Jf(m);return H3(function(){x.apply(d,F)},C)}function D3(x,C,F,J){var mt=-1,St=Ry,Vt=!0,ee=x.length,fe=[],Cn=C.length;if(!ee)return fe;F&&(C=ea(C,Uu(F))),J?(St=Dy,Vt=!1):C.length>=h&&(St=pf,Vt=!1,C=new xv(C));t:for(;++mtmt?0:mt+F),J=J===d||J>mt?mt:Ys(J),J<0&&(J+=mt),J=F>J?0:n9(J);F0&&F(ee)?C>1?yh(ee,C-1,F,J,mt):Eg(mt,ee):J||(mt[mt.length]=ee)}return mt}var $S=i8(),O3=i8(!0);function Pg(x,C){return x&&$S(x,C,Hl)}function VS(x,C){return x&&O3(x,C,Hl)}function qS(x,C){return wp(C,function(F){return im(x[F])})}function J0(x,C){C=Pb(C,x);for(var F=0,J=C.length;x!=null&&FC}function Sz(x,C){return x!=null&&pc.call(x,C)}function Tz(x,C){return x!=null&&C in Fc(x)}function Cz(x,C,F){return x>=$t(C,F)&&x=120&&kn.length>=120)?new xv(Vt&&kn):d}kn=x[0];var Wn=-1,Ki=ee[0];t:for(;++Wn-1;)ee!==x&&Zy.call(ee,fe,1),Zy.call(x,fe,1);return x}function GR(x,C){for(var F=x?C.length:0,J=F-1;F--;){var mt=C[F];if(F==J||mt!==St){var St=mt;em(mt)?Zy.call(x,mt,1):Xk(x,mt)}}return x}function $k(x,C){return x+Yy(Un()*(C-x+1))}function Oz(x,C,F,J){for(var mt=-1,St=vt(_v((C-x)/(F||1)),0),Vt=$e(St);St--;)Vt[J?St:++mt]=x,x+=F;return Vt}function Vk(x,C){var F="";if(!x||C<1||C>hn)return F;do C%2&&(F+=x),C=Yy(C/2),C&&(x+=x);while(C);return F}function oo(x,C){return u5(v8(x,C,Ba),x+"")}function Bz(x){return CR(i2(x))}function Fz(x,C){var F=i2(x);return rT(F,Mv(C,0,F.length))}function U3(x,C,F,J){if(!$a(x))return x;C=Pb(C,x);for(var mt=-1,St=C.length,Vt=St-1,ee=x;ee!=null&&++mtmt?0:mt+C),F=F>mt?mt:F,F<0&&(F+=mt),mt=C>F?0:F-C>>>0,C>>>=0;for(var St=$e(mt);++J>>1,Vt=x[St];Vt!==null&&!jd(Vt)&&(F?Vt<=C:Vt=h){var Cn=C?null:Jz(x);if(Cn)return jy(Cn);Vt=!1,mt=pf,fe=new xv}else fe=C?[]:ee;t:for(;++J=J?x:yp(x,C,F)}var YR=US||function(x){return Cc.clearTimeout(x)};function KR(x,C){if(C)return x.slice();var F=x.length,J=wv?wv(F):new x.constructor(F);return x.copy(J),J}function Jk(x){var C=new x.constructor(x.byteLength);return new Xy(C).set(new Xy(x)),C}function Gz(x,C){var F=C?Jk(x.buffer):x.buffer;return new x.constructor(F,x.byteOffset,x.byteLength)}function Wz(x){var C=new x.constructor(x.source,cv.exec(x));return C.lastIndex=x.lastIndex,C}function $z(x){return kg?Fc(kg.call(x)):{}}function JR(x,C){var F=C?Jk(x.buffer):x.buffer;return new x.constructor(F,x.byteOffset,x.length)}function QR(x,C){if(x!==C){var F=x!==d,J=x===null,mt=x===x,St=jd(x),Vt=C!==d,ee=C===null,fe=C===C,Cn=jd(C);if(!ee&&!Cn&&!St&&x>C||St&&Vt&&fe&&!ee&&!Cn||J&&Vt&&fe||!F&&fe||!mt)return 1;if(!J&&!St&&!Cn&&x=ee)return fe;var Cn=F[J];return fe*(Cn=="desc"?-1:1)}}return x.index-C.index}function t8(x,C,F,J){for(var mt=-1,St=x.length,Vt=F.length,ee=-1,fe=C.length,Cn=vt(St-Vt,0),kn=$e(fe+Cn),Wn=!J;++ee1?F[mt-1]:d,Vt=mt>2?F[2]:d;for(St=x.length>3&&typeof St=="function"?(mt--,St):d,Vt&&jh(F[0],F[1],Vt)&&(St=mt<3?d:St,mt=1),C=Fc(C);++J-1?mt[St?C[Vt]:Vt]:d}}function o8(x){return tm(function(C){var F=C.length,J=F,mt=bf.prototype.thru;for(x&&C.reverse();J--;){var St=C[J];if(typeof St!="function")throw new Jf(m);if(mt&&!Vt&&nT(St)=="wrapper")var Vt=new bf([],!0)}for(J=Vt?J:F;++J1&&$o.reverse(),kn&&feee))return!1;var Cn=St.get(x),kn=St.get(C);if(Cn&&kn)return Cn==C&&kn==x;var Wn=-1,Ki=!0,Er=F&V?new xv:d;for(St.set(x,C),St.set(C,x);++Wn1?"& ":"")+C[J],C=C.join(F>2?", ":" "),x.replace(rv,`{ +`}YXt.exports=ZXt});var QXt=Ld((bJe,JXt)=>{"use strict";function bMe(d,s){var h=function(){},p=h,m=h;function _(){this._skip=!0}function E(){this._remove=!0}function y(B){this._name=B}function I(B){this._replace=B}function O(B,P){var U,W={attr:{},full:B},q={name:y,skip:_,remove:E,replace:I,_name:void 0,_skip:!1,_remove:!1,_replace:void 0},et=!0,Q,X,gt;if(B!==void 0&&B!==null&&B!==!0&&B!==!1)switch(U=Object.prototype.toString.call(B),U){case"[object String]":case"[object Number]":return;case"[object Array]":if(B.some(function(ft,xt){if(xt===0)return W.name=ft,!1;if(xt===1)return Object.prototype.toString.call(ft)==="[object Object]"&&(et=!1,W.attr=ft),!0}),p.call(q,W,P),q._name&&(B[0]=q._name),q._replace)return q._replace;if(q._remove)return null;if(!q._skip){for(Q=0,X=B.length;Q1||Q===1&&et){if(gt=O(B[Q],W),gt===null){B.splice(Q,1),X-=1;continue}gt&&(B[Q]=gt)}Q+=1}if(m.call(q,W,P),q._name&&(B[0]=q._name),q._replace)return q._replace;if(q._remove)return null}}}s&&(s.enter&&(p=s.enter),s.leave&&(m=s.leave)),O(d,void 0)}JXt.exports=bMe});var iU=Ld((wJe,iZt)=>{"use strict";var tZt=XXt(),eZt=KXt(),nZt=QXt();iZt.exports={parse:tZt,stringify:eZt,traverse:nZt,p:tZt,s:eZt,t:nZt}});var FA=Ld((kI,rU)=>{(function(){var d,s="4.18.1",h=200,p="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",m="Expected a function",_="Invalid `variable` option passed into `_.template`",E="Invalid `imports` option passed into `_.template`",y="__lodash_hash_undefined__",I=500,O="__lodash_placeholder__",B=1,P=2,U=4,W=1,q=2,et=1,Q=2,X=4,gt=8,ft=16,xt=32,Bt=64,Ot=128,Pt=256,se=512,ot=30,Lt="...",be=800,ln=16,Fn=1,ne=2,xe=3,re=1/0,hn=9007199254740991,Se=17976931348623157e292,ke=NaN,mn=4294967295,en=mn-1,Qn=mn>>>1,ge=[["ary",Ot],["bind",et],["bindKey",Q],["curry",gt],["curryRight",ft],["flip",se],["partial",xt],["partialRight",Bt],["rearg",Pt]],Pe="[object Arguments]",ti="[object Array]",Yi="[object AsyncFunction]",ki="[object Boolean]",lr="[object Date]",pr="[object DOMException]",Kt="[object Error]",wn="[object Function]",it="[object GeneratorFunction]",ut="[object Map]",kt="[object Number]",Nt="[object Null]",ie="[object Object]",rn="[object Promise]",Pn="[object Proxy]",Tt="[object RegExp]",yt="[object Set]",ue="[object String]",fn="[object Symbol]",An="[object Undefined]",zn="[object WeakMap]",Li="[object WeakSet]",xi="[object ArrayBuffer]",Jt="[object DataView]",nn="[object Float32Array]",vn="[object Float64Array]",he="[object Int8Array]",Mn="[object Int16Array]",Sn="[object Int32Array]",gn="[object Uint8Array]",Ce="[object Uint8ClampedArray]",dn="[object Uint16Array]",jn="[object Uint32Array]",ar=/\b__p \+= '';/g,gr=/\b(__p \+=) '' \+/g,tr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ln=/&(?:amp|lt|gt|quot|#39);/g,Qt=/[&<>"']/g,Mi=RegExp(Ln.source),sn=RegExp(Qt.source),Zn=/<%-([\s\S]+?)%>/g,oi=/<%([\s\S]+?)%>/g,Jr=/<%=([\s\S]+?)%>/g,Bs=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Oc=/^\w*$/,su=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fc=/[\\^$.*+?()[\]{}|]/g,il=RegExp(fc.source),va=/^\s+/,Mr=/\s/,iv=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,U0=/\{\n\/\* \[wrapped with (.+)\] \*/,rv=/,? & /,z0=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,j0=/[()=,{}\[\]\/\s]/,sv=/\\(\\)?/g,vg=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ov=/\w*$/,l3=/^[-+]0x[0-9a-f]+$/i,Rt=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,Je=/^0o[0-7]+$/i,tn=/^(?:0|[1-9]\d*)$/,Ze=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Hi=/($^)/,Pr=/['\n\r\u2028\u2029\\]/g,Gr="\\ud800-\\udfff",hs="\\u0300-\\u036f",Fs="\\ufe20-\\ufe2f",Ms="\\u20d0-\\u20ff",bs=hs+Fs+Ms,Tc="\\u2700-\\u27bf",rl="a-z\\xdf-\\xf6\\xf8-\\xff",Ba="\\xac\\xb1\\xd7\\xf7",wh="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Nr="\\u2000-\\u206f",mr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a1="A-Z\\xc0-\\xd6\\xd8-\\xde",dc="\\ufe0e\\ufe0f",vh=Ba+wh+Nr+mr,_g="['\u2019]",ws="["+Gr+"]",$c="["+vh+"]",_a="["+bs+"]",ff="\\d+",Bl="["+Tc+"]",_h="["+rl+"]",u1="[^"+Gr+vh+ff+Tc+rl+a1+"]",Nd="\\ud83c[\\udffb-\\udfff]",ya="(?:"+_a+"|"+Nd+")",yg="[^"+Gr+"]",H0="(?:\\ud83c[\\udde6-\\uddff]){2}",G0="[\\ud800-\\udbff][\\udc00-\\udfff]",xg="["+a1+"]",vb="\\u200d",Ay="(?:"+_h+"|"+u1+")",h3="(?:"+xg+"|"+u1+")",cv="(?:"+_g+"(?:d|ll|m|re|s|t|ve))?",ky="(?:"+_g+"(?:D|LL|M|RE|S|T|VE))?",Ly=ya+"?",av="["+dc+"]?",yS="(?:"+vb+"(?:"+[yg,H0,G0].join("|")+")"+av+Ly+")*",f3="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vk="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",As=av+Ly+yS,bp="(?:"+[Bl,H0,G0].join("|")+")"+As,Vc="(?:"+[yg+_a+"?",_a,H0,G0,ws].join("|")+")",xS=RegExp(_g,"g"),d3=RegExp(_a,"g"),uv=RegExp(Nd+"(?="+Nd+")|"+Vc+As,"g"),p3=RegExp([xg+"?"+_h+"+"+cv+"(?="+[$c,xg,"$"].join("|")+")",h3+"+"+ky+"(?="+[$c,xg+Ay,"$"].join("|")+")",xg+"?"+Ay+"+"+cv,xg+"+"+ky,vk,f3,ff,bp].join("|"),"g"),W0=RegExp("["+vb+Gr+bs+dc+"]"),g3=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,lv=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],sl=-1,rc={};rc[nn]=rc[vn]=rc[he]=rc[Mn]=rc[Sn]=rc[gn]=rc[Ce]=rc[dn]=rc[jn]=!0,rc[Pe]=rc[ti]=rc[xi]=rc[ki]=rc[Jt]=rc[lr]=rc[Kt]=rc[wn]=rc[ut]=rc[kt]=rc[ie]=rc[Tt]=rc[yt]=rc[ue]=rc[zn]=!1;var Bc={};Bc[Pe]=Bc[ti]=Bc[xi]=Bc[Jt]=Bc[ki]=Bc[lr]=Bc[nn]=Bc[vn]=Bc[he]=Bc[Mn]=Bc[Sn]=Bc[ut]=Bc[kt]=Bc[ie]=Bc[Tt]=Bc[yt]=Bc[ue]=Bc[fn]=Bc[gn]=Bc[Ce]=Bc[dn]=Bc[jn]=!0,Bc[Kt]=Bc[wn]=Bc[zn]=!1;var MS={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},_k={"&":"&","<":"<",">":">",'"':""","'":"'"},ES={"&":"&","<":"<",">":">",""":'"',"'":"'"},m3={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},yk=parseFloat,SS=parseInt,Co=typeof global=="object"&&global&&global.Object===Object&&global,xk=typeof self=="object"&&self&&self.Object===Object&&self,Cc=Co||xk||Function("return this")(),$0=typeof kI=="object"&&kI&&!kI.nodeType&&kI,Mg=$0&&typeof rU=="object"&&rU&&!rU.nodeType&&rU,TS=Mg&&Mg.exports===$0,hv=TS&&Co.process,Xf=function(){try{var oe=Mg&&Mg.require&&Mg.require("util").types;return oe||hv&&hv.binding&&hv.binding("util")}catch{}}(),b3=Xf&&Xf.isArrayBuffer,CS=Xf&&Xf.isDate,AS=Xf&&Xf.isMap,Py=Xf&&Xf.isRegExp,kS=Xf&&Xf.isSet,Od=Xf&&Xf.isTypedArray;function df(oe,_n,$e){switch($e.length){case 0:return oe.call(_n);case 1:return oe.call(_n,$e[0]);case 2:return oe.call(_n,$e[0],$e[1]);case 3:return oe.call(_n,$e[0],$e[1],$e[2])}return oe.apply(_n,$e)}function LS(oe,_n,$e,er){for(var vs=-1,Wo=oe==null?0:oe.length;++vs-1}function Ry(oe,_n,$e){for(var er=-1,vs=oe==null?0:oe.length;++er-1;);return $e}function V0(oe,_n){for(var $e=oe.length;$e--&&vp(_n,oe[$e],0)>-1;);return $e}function Sk(oe,_n){for(var $e=oe.length,er=0;$e--;)oe[$e]===_n&&++er;return er}var dv=fv(MS),NS=fv(_k);function Fy(oe){return"\\"+m3[oe]}function Tk(oe,_n){return oe==null?d:oe[_n]}function gf(oe){return W0.test(oe)}function Uy(oe){return g3.test(oe)}function Ck(oe){for(var _n,$e=[];!(_n=oe.next()).done;)$e.push(_n.value);return $e}function pv(oe){var _n=-1,$e=Array(oe.size);return oe.forEach(function(er,vs){$e[++_n]=[vs,er]}),$e}function OS(oe,_n){return function($e){return oe(_n($e))}}function Fl(oe,_n){for(var $e=-1,er=oe.length,vs=0,Wo=[];++$e-1}function oz(x,C){var F=this.__data__,J=R3(F,x);return J<0?(++this.size,F.push([x,C])):F[J][1]=C,this}Y0.prototype.clear=nz,Y0.prototype.delete=iz,Y0.prototype.get=rz,Y0.prototype.has=sz,Y0.prototype.set=oz;function K0(x){var C=-1,F=x==null?0:x.length;for(this.clear();++C=C?x:C)),x}function _p(x,C,F,J,mt,St){var Vt,ee=C&B,fe=C&P,Cn=C&U;if(F&&(Vt=mt?F(x,J,mt,St):F(x)),Vt!==d)return Vt;if(!Va(x))return x;var kn=Us(x);if(kn){if(Vt=sj(x),!ee)return td(x,Vt)}else{var Wn=zh(x),Ki=Wn==wn||Wn==it;if(zd(x))return ZR(x,ee);if(Wn==ie||Wn==Pe||Ki&&!mt){if(Vt=fe||Ki?{}:p8(x),!ee)return fe?Xz(x,yz(Vt,x)):qz(x,TR(Vt,x))}else{if(!Bc[Wn])return mt?x:{};Vt=oj(x,Wn,ee)}}St||(St=new p1);var Er=St.get(x);if(Er)return Er;St.set(x,Vt),J8(x)?x.forEach(function(Zr){Vt.add(_p(Zr,C,F,Zr,x,St))}):Y8(x)&&x.forEach(function(Zr,co){Vt.set(co,_p(Zr,C,F,co,x,St))});var Wr=Cn?fe?e5:t5:fe?ed:Hl,no=kn?d:Wr(x);return ou(no||x,function(Zr,co){no&&(co=Zr,Zr=x[co]),I3(Vt,co,_p(Zr,C,F,co,x,St))}),Vt}function xz(x){var C=Hl(x);return function(F){return CR(F,x,C)}}function CR(x,C,F){var J=F.length;if(x==null)return!J;for(x=Fc(x);J--;){var mt=F[J],St=C[mt],Vt=x[mt];if(Vt===d&&!(mt in x)||!St(Vt))return!1}return!0}function AR(x,C,F){if(typeof x!="function")throw new Jf(m);return H3(function(){x.apply(d,F)},C)}function D3(x,C,F,J){var mt=-1,St=Iy,Vt=!0,ee=x.length,fe=[],Cn=C.length;if(!ee)return fe;F&&(C=ea(C,Uu(F))),J?(St=Ry,Vt=!1):C.length>=h&&(St=pf,Vt=!1,C=new yv(C));t:for(;++mtmt?0:mt+F),J=J===d||J>mt?mt:Ys(J),J<0&&(J+=mt),J=F>J?0:t9(J);F0&&F(ee)?C>1?yh(ee,C-1,F,J,mt):Eg(mt,ee):J||(mt[mt.length]=ee)}return mt}var WS=e8(),O3=e8(!0);function Pg(x,C){return x&&WS(x,C,Hl)}function $S(x,C){return x&&O3(x,C,Hl)}function VS(x,C){return wp(C,function(F){return im(x[F])})}function J0(x,C){C=Pb(C,x);for(var F=0,J=C.length;x!=null&&FC}function Sz(x,C){return x!=null&&pc.call(x,C)}function Tz(x,C){return x!=null&&C in Fc(x)}function Cz(x,C,F){return x>=$t(C,F)&&x=120&&kn.length>=120)?new yv(Vt&&kn):d}kn=x[0];var Wn=-1,Ki=ee[0];t:for(;++Wn-1;)ee!==x&&Xy.call(ee,fe,1),Xy.call(x,fe,1);return x}function jR(x,C){for(var F=x?C.length:0,J=F-1;F--;){var mt=C[F];if(F==J||mt!==St){var St=mt;em(mt)?Xy.call(x,mt,1):qk(x,mt)}}return x}function Wk(x,C){return x+Zy(Un()*(C-x+1))}function Oz(x,C,F,J){for(var mt=-1,St=vt(vv((C-x)/(F||1)),0),Vt=$e(St);St--;)Vt[J?St:++mt]=x,x+=F;return Vt}function $k(x,C){var F="";if(!x||C<1||C>hn)return F;do C%2&&(F+=x),C=Zy(C/2),C&&(x+=x);while(C);return F}function oo(x,C){return a5(b8(x,C,Fa),x+"")}function Bz(x){return SR(n2(x))}function Fz(x,C){var F=n2(x);return iT(F,xv(C,0,F.length))}function U3(x,C,F,J){if(!Va(x))return x;C=Pb(C,x);for(var mt=-1,St=C.length,Vt=St-1,ee=x;ee!=null&&++mtmt?0:mt+C),F=F>mt?mt:F,F<0&&(F+=mt),mt=C>F?0:F-C>>>0,C>>>=0;for(var St=$e(mt);++J>>1,Vt=x[St];Vt!==null&&!jd(Vt)&&(F?Vt<=C:Vt=h){var Cn=C?null:Jz(x);if(Cn)return zy(Cn);Vt=!1,mt=pf,fe=new yv}else fe=C?[]:ee;t:for(;++J=J?x:yp(x,C,F)}var XR=FS||function(x){return Cc.clearTimeout(x)};function ZR(x,C){if(C)return x.slice();var F=x.length,J=bv?bv(F):new x.constructor(F);return x.copy(J),J}function Kk(x){var C=new x.constructor(x.byteLength);return new qy(C).set(new qy(x)),C}function Gz(x,C){var F=C?Kk(x.buffer):x.buffer;return new x.constructor(F,x.byteOffset,x.byteLength)}function Wz(x){var C=new x.constructor(x.source,ov.exec(x));return C.lastIndex=x.lastIndex,C}function $z(x){return kg?Fc(kg.call(x)):{}}function YR(x,C){var F=C?Kk(x.buffer):x.buffer;return new x.constructor(F,x.byteOffset,x.length)}function KR(x,C){if(x!==C){var F=x!==d,J=x===null,mt=x===x,St=jd(x),Vt=C!==d,ee=C===null,fe=C===C,Cn=jd(C);if(!ee&&!Cn&&!St&&x>C||St&&Vt&&fe&&!ee&&!Cn||J&&Vt&&fe||!F&&fe||!mt)return 1;if(!J&&!St&&!Cn&&x=ee)return fe;var Cn=F[J];return fe*(Cn=="desc"?-1:1)}}return x.index-C.index}function JR(x,C,F,J){for(var mt=-1,St=x.length,Vt=F.length,ee=-1,fe=C.length,Cn=vt(St-Vt,0),kn=$e(fe+Cn),Wn=!J;++ee1?F[mt-1]:d,Vt=mt>2?F[2]:d;for(St=x.length>3&&typeof St=="function"?(mt--,St):d,Vt&&jh(F[0],F[1],Vt)&&(St=mt<3?d:St,mt=1),C=Fc(C);++J-1?mt[St?C[Vt]:Vt]:d}}function r8(x){return tm(function(C){var F=C.length,J=F,mt=bf.prototype.thru;for(x&&C.reverse();J--;){var St=C[J];if(typeof St!="function")throw new Jf(m);if(mt&&!Vt&&eT(St)=="wrapper")var Vt=new bf([],!0)}for(J=Vt?J:F;++J1&&$o.reverse(),kn&&feee))return!1;var Cn=St.get(x),kn=St.get(C);if(Cn&&kn)return Cn==C&&kn==x;var Wn=-1,Ki=!0,Er=F&q?new yv:d;for(St.set(x,C),St.set(C,x);++Wn1?"& ":"")+C[J],C=C.join(F>2?", ":" "),x.replace(iv,`{ /* [wrapped with `+C+`] */ -`)}function aj(x){return Us(x)||kv(x)||!!(P3&&x&&x[P3])}function em(x,C){var F=typeof x;return C=C??hn,!!C&&(F=="number"||F!="symbol"&&tn.test(x))&&x>-1&&x%1==0&&x0){if(++C>=be)return arguments[0]}else C=0;return x.apply(d,arguments)}}function rT(x,C){var F=-1,J=x.length,mt=J-1;for(C=C===d?J:C;++F1?x[C-1]:d;return F=typeof F=="function"?(x.pop(),F):d,nm(x,F)});function F8(x){var C=Mt(x);return C.__chain__=!0,C}function Ont(x,C){return C(x),x}function m5(x,C){return C(x)}var Bnt=tm(function(x){var C=x.length,F=C?x[0]:0,J=this.__wrapped__,mt=function(St){return Bk(St,x)};return C>1||this.__actions__.length||!(J instanceof po)||!em(F)?this.thru(mt):(J=J.slice(F,+F+(C?1:0)),J.__actions__.push({func:m5,args:[mt],thisArg:d}),new bf(J,this.__chain__).thru(function(St){return C&&!St.length&&St.push(d),St}))});function Fnt(){return F8(this)}function Unt(){return new bf(this.value(),this.__chain__)}function jl(){this.__values__===d&&(this.__values__=e9(this.value()));var x=this.__index__>=this.__values__.length,C=x?d:this.__values__[this.__index__++];return{done:x,value:C}}function znt(){return this}function jnt(x){for(var C,F=this;F instanceof Tb;){var J=S8(F);J.__index__=0,J.__values__=d,C?mt.__wrapped__=J:C=J;var mt=J;F=F.__wrapped__}return mt.__wrapped__=x,C}function Hnt(){var x=this.__wrapped__;if(x instanceof po){var C=x;return this.__actions__.length&&(C=new po(this)),C=C.reverse(),C.__actions__.push({func:m5,args:[f5],thisArg:d}),new bf(C,this.__chain__)}return this.thru(f5)}function $j(){return XR(this.__wrapped__,this.__actions__)}var U8=KS(function(x,C,F){pc.call(x,F)?++x[F]:Lg(x,F,1)});function Gnt(x,C,F){var J=Us(x)?w3:Mz;return F&&jh(x,C,F)&&(C=d),J(x,cs(C,3))}function Wnt(x,C){var F=Us(x)?wp:N3;return F(x,cs(C,3))}var z8=s8(C8),j8=s8(A8);function $nt(x,C){return yh(b5(x,C),1)}function Vnt(x,C){return yh(b5(x,C),re)}function qnt(x,C,F){return F=F===d?1:Ys(F),yh(b5(x,C),F)}function Vj(x,C){var F=Us(x)?su:Ab;return F(x,cs(C,3))}function qj(x,C){var F=Us(x)?IS:PR;return F(x,cs(C,3))}var Xnt=KS(function(x,C,F){pc.call(x,F)?x[F].push(C):Lg(x,F,[C])});function Znt(x,C,F,J){x=xh(x)?x:i2(x),F=F&&!J?Ys(F):0;var mt=x.length;return F<0&&(F=vt(mt+F,0)),hT(x)?F<=mt&&x.indexOf(C,F)>-1:!!mt&&vp(x,C,F)>-1}var Ynt=oo(function(x,C,F){var J=-1,mt=typeof C=="function",St=xh(x)?$e(x.length):[];return Ab(x,function(Vt){St[++J]=mt?df(C,Vt,F):B3(Vt,C,F)}),St}),Knt=KS(function(x,C,F){Lg(x,F,C)});function b5(x,C){var F=Us(x)?ea:FR;return F(x,cs(C,3))}function Jnt(x,C,F,J){return x==null?[]:(Us(C)||(C=C==null?[]:[C]),F=J?d:F,Us(F)||(F=F==null?[]:[F]),kb(x,C,F))}var Qnt=KS(function(x,C,F){x[F?0:1].push(C)},function(){return[[],[]]});function tit(x,C,F){var J=Us(x)?v3:By,mt=arguments.length<3;return J(x,cs(C,4),F,mt,Ab)}function eit(x,C,F){var J=Us(x)?_3:By,mt=arguments.length<3;return J(x,cs(C,4),F,mt,PR)}function nit(x,C){var F=Us(x)?wp:N3;return F(x,aT(cs(C,3)))}function iit(x){var C=Us(x)?CR:Bz;return C(x)}function rit(x,C,F){(F?jh(x,C,F):C===d)?C=1:C=Ys(C);var J=Us(x)?wz:Fz;return J(x,C)}function Xj(x){var C=Us(x)?vz:zz;return C(x)}function Zj(x){if(x==null)return 0;if(xh(x))return hT(x)?h1(x):x.length;var C=zh(x);return C==ut||C==yt?x.size:jk(x).length}function Yj(x,C,F){var J=Us(x)?y3:jz;return F&&jh(x,C,F)&&(C=d),J(x,cs(C,3))}var H8=oo(function(x,C){if(x==null)return[];var F=C.length;return F>1&&jh(x,C[0],C[1])?C=[]:F>2&&jh(C[0],C[1],C[2])&&(C=[C[0]]),kb(x,yh(C,1),[])}),Cv=Ik||function(){return Cc.Date.now()};function oT(x,C){if(typeof C!="function")throw new Jf(m);return x=Ys(x),function(){if(--x<1)return C.apply(this,arguments)}}function cT(x,C,F){return C=F?d:C,C=x&&C==null?x.length:C,Q0(x,Ot,d,d,d,d,C)}function Db(x,C){var F;if(typeof C!="function")throw new Jf(m);return x=Ys(x),function(){return--x>0&&(F=C.apply(this,arguments)),x<=1&&(C=d),F}}var Dg=oo(function(x,C,F){var J=tt;if(F.length){var mt=Fl(F,t2(Dg));J|=xt}return Q0(x,J,C,F,mt)}),G8=oo(function(x,C,F){var J=tt|Q;if(F.length){var mt=Fl(F,t2(G8));J|=xt}return Q0(C,J,x,F,mt)});function W8(x,C,F){C=F?d:C;var J=Q0(x,gt,d,d,d,d,d,C);return J.placeholder=W8.placeholder,J}function _r(x,C,F){C=F?d:C;var J=Q0(x,ft,d,d,d,d,d,C);return J.placeholder=_r.placeholder,J}function $8(x,C,F){var J,mt,St,Vt,ee,fe,Cn=0,kn=!1,Wn=!1,Ki=!0;if(typeof x!="function")throw new Jf(m);C=Mp(C)||0,$a(F)&&(kn=!!F.leading,Wn="maxWait"in F,St=Wn?vt(Mp(F.maxWait)||0,C):St,Ki="trailing"in F?!!F.trailing:Ki);function Er(yu){var nd=J,sm=mt;return J=mt=d,Cn=yu,Vt=x.apply(sm,nd),Vt}function Wr(yu){return Cn=yu,ee=H3(co,C),kn?Er(yu):Vt}function no(yu){var nd=yu-fe,sm=yu-Cn,M9=C-nd;return Wn?$t(M9,St-sm):M9}function Zr(yu){var nd=yu-fe,sm=yu-Cn;return fe===d||nd>=C||nd<0||Wn&&sm>=St}function co(){var yu=Cv();if(Zr(yu))return $o(yu);ee=H3(co,no(yu))}function $o(yu){return ee=d,Ki&&J?Er(yu):(J=mt=d,Vt)}function Hh(){ee!==d&&YR(ee),Cn=0,J=fe=mt=ee=d}function _f(){return ee===d?Vt:$o(Cv())}function $r(){var yu=Cv(),nd=Zr(yu);if(J=arguments,mt=this,fe=yu,nd){if(ee===d)return Wr(fe);if(Wn)return YR(ee),ee=H3(co,C),Er(fe)}return ee===d&&(ee=H3(co,C)),Vt}return $r.cancel=Hh,$r.flush=_f,$r}var V8=oo(function(x,C){return LR(x,1,C)}),Kj=oo(function(x,C,F){return LR(x,Mp(C)||0,F)});function q8(x){return Q0(x,se)}function e2(x,C){if(typeof x!="function"||C!=null&&typeof C!="function")throw new Jf(m);var F=function(){var J=arguments,mt=C?C.apply(this,J):J[0],St=F.cache;if(St.has(mt))return St.get(mt);var Vt=x.apply(this,J);return F.cache=St.set(mt,Vt)||St,Vt};return F.cache=new(e2.Cache||K0),F}e2.Cache=K0;function aT(x){if(typeof x!="function")throw new Jf(m);return function(){var C=arguments;switch(C.length){case 0:return!x.call(this);case 1:return!x.call(this,C[0]);case 2:return!x.call(this,C[0],C[1]);case 3:return!x.call(this,C[0],C[1],C[2])}return!x.apply(this,C)}}function Jj(x){return Db(2,x)}var Qj=Hz(function(x,C){C=C.length==1&&Us(C[0])?ea(C[0],Uu(cs())):ea(yh(C,1),Uu(cs()));var F=C.length;return oo(function(J){for(var mt=-1,St=$t(J.length,F);++mt=C}),kv=RR(function(){return arguments}())?RR:function(x){return ou(x)&&pc.call(x,"callee")&&!L3.call(x,"callee")},Us=$e.isArray,Z8=b3?Uu(b3):kz;function xh(x){return x!=null&&lT(x.length)&&!im(x)}function H(x){return ou(x)&&xh(x)}function uT(x){return x===!0||x===!1||ou(x)&&zl(x)==ki}var zd=S||bT,dH=AS?Uu(AS):DR;function Lv(x){return ou(x)&&x.nodeType===1&&!V3(x)}function Y8(x){if(x==null)return!0;if(xh(x)&&(Us(x)||typeof x=="string"||typeof x.splice=="function"||zd(x)||n2(x)||kv(x)))return!x.length;var C=zh(x);if(C==ut||C==yt)return!x.size;if(j3(x))return!jk(x).length;for(var F in x)if(pc.call(x,F))return!1;return!0}function pH(x,C){return F3(x,C)}function gH(x,C,F){F=typeof F=="function"?F:d;var J=F?F(x,C):d;return J===d?F3(x,C,d,F):!!J}function v5(x){if(!ou(x))return!1;var C=zl(x);return C==Kt||C==pr||typeof x.message=="string"&&typeof x.name=="string"&&!V3(x)}function mH(x){return typeof x=="number"&&D(x)}function im(x){if(!$a(x))return!1;var C=zl(x);return C==wn||C==it||C==Yi||C==Pn}function K8(x){return typeof x=="number"&&x==Ys(x)}function lT(x){return typeof x=="number"&&x>-1&&x%1==0&&x<=hn}function $a(x){var C=typeof x;return x!=null&&(C=="object"||C=="function")}function ou(x){return x!=null&&typeof x=="object"}var J8=kS?Uu(kS):NR;function _5(x,C){return x===C||zk(x,C,r5(C))}function bH(x,C,F){return F=typeof F=="function"?F:d,zk(x,C,r5(C),F)}function wH(x){return Q8(x)&&x!=+x}function vH(x){if(c5(x))throw new vs(p);return OR(x)}function _H(x){return x===null}function yH(x){return x==null}function Q8(x){return typeof x=="number"||ou(x)&&zl(x)==kt}function V3(x){if(!ou(x)||zl(x)!=ie)return!1;var C=Cg(x);if(C===null)return!0;var F=pc.call(C,"constructor")&&C.constructor;return typeof F=="function"&&F instanceof F&&Tg.call(F)==Pk}var Nb=Iy?Uu(Iy):Lz;function xH(x){return K8(x)&&x>=-hn&&x<=hn}var t9=LS?Uu(LS):Pz;function hT(x){return typeof x=="string"||!Us(x)&&ou(x)&&zl(x)==ue}function jd(x){return typeof x=="symbol"||ou(x)&&zl(x)==fn}var n2=Od?Uu(Od):Iz;function MH(x){return x===d}function EH(x){return ou(x)&&zh(x)==zn}function SH(x){return ou(x)&&zl(x)==Li}var TH=eT(Hk),CH=eT(function(x,C){return x<=C});function e9(x){if(!x)return[];if(xh(x))return hT(x)?Kf(x):td(x);if(Mb&&x[Mb])return Ak(x[Mb]());var C=zh(x),F=C==ut?gv:C==yt?jy:i2;return F(x)}function rm(x){if(!x)return x===0?x:0;if(x=Mp(x),x===re||x===-re){var C=x<0?-1:1;return C*Se}return x===x?x:0}function Ys(x){var C=rm(x),F=C%1;return C===C?F?C-F:C:0}function n9(x){return x?Mv(Ys(x),0,mn):0}function Mp(x){if(typeof x=="number")return x;if(jd(x))return ke;if($a(x)){var C=typeof x.valueOf=="function"?x.valueOf():x;x=$a(C)?C+"":C}if(typeof x!="string")return x===0?x:+x;x=Yf(x);var F=Rt.test(x);return F||Je.test(x)?TS(x.slice(2),F?2:8):l3.test(x)?ke:+x}function i9(x){return Ig(x,ed(x))}function AH(x){return x?Mv(Ys(x),-hn,hn):x===0?x:0}function Ac(x){return x==null?"":Fd(x)}var kH=Jy(function(x,C){if(j3(C)||xh(C)){Ig(C,Hl(C),x);return}for(var F in C)pc.call(C,F)&&I3(x,F,C[F])}),r9=Jy(function(x,C){Ig(C,ed(C),x)}),s9=Jy(function(x,C,F,J){Ig(C,ed(C),x,J)}),y5=Jy(function(x,C,F,J){Ig(C,Hl(C),x,J)}),LH=tm(Bk);function PH(x,C){var F=Sb(x);return C==null?F:AR(F,C)}var IH=oo(function(x,C){x=Fc(x);var F=-1,J=C.length,mt=J>2?C[2]:d;for(mt&&jh(C[0],C[1],mt)&&(J=1);++F1),St}),Ig(x,n5(x),F),J&&(F=_p(F,B|P|U,Qz));for(var mt=C.length;mt--;)Xk(F,C[mt]);return F});function XH(x,C){return c9(x,aT(cs(C)))}var fT=tm(function(x,C){return x==null?{}:Gk(x,C)});function c9(x,C){if(x==null)return{};var F=ea(n5(x),function(J){return[J]});return C=cs(C),HR(x,F,function(J,mt){return C(J,mt[0])})}function ZH(x,C,F){C=Pb(C,x);var J=-1,mt=C.length;for(mt||(mt=1,x=d);++JC){var J=x;x=C,C=J}if(F||x%1||C%1){var mt=Un();return $t(x+mt*(C-x+xk("1e-"+((mt+"").length-1))),C)}return $k(x,C)}var sG=Qy(function(x,C,F){return C=C.toLowerCase(),x+(F?l9(C):C)});function l9(x){return S5(Ac(x).toLowerCase())}function h9(x){return x=Ac(x),x&&x.replace(Ze,pv).replace(d3,"")}function oG(x,C,F){x=Ac(x),C=Fd(C);var J=x.length;F=F===d?J:Mv(Ys(F),0,J);var mt=F;return F-=C.length,F>=0&&x.slice(F,mt)==C}function cG(x){return x=Ac(x),x&&sn.test(x)?x.replace(Qt,OS):x}function aG(x){return x=Ac(x),x&&il.test(x)?x.replace(fc,"\\$&"):x}var uG=Qy(function(x,C,F){return x+(F?"-":"")+C.toLowerCase()}),lG=Qy(function(x,C,F){return x+(F?" ":"")+C.toLowerCase()}),hG=r8("toLowerCase");function fG(x,C,F){x=Ac(x),C=Ys(C);var J=C?h1(x):0;if(!C||J>=C)return x;var mt=(C-J)/2;return tT(Yy(mt),F)+x+tT(_v(mt),F)}function dG(x,C,F){x=Ac(x),C=Ys(C);var J=C?h1(x):0;return C&&J>>0,F?(x=Ac(x),x&&(typeof C=="string"||C!=null&&!Nb(C))&&(C=Fd(C),!C&&gf(x))?Ib(Kf(x),0,F):x.split(C,F)):[]}var _G=Qy(function(x,C,F){return x+(F?" ":"")+S5(C)});function f9(x,C,F){return x=Ac(x),F=F==null?0:Mv(Ys(F),0,x.length),C=Fd(C),x.slice(F,F+C.length)==C}function kr(x,C,F){var J=Mt.templateSettings;F&&jh(x,C,F)&&(C=d),x=Ac(x),C=y5({},C,J,h8);var mt=y5({},C.imports,J.imports,h8),St=Hl(mt),Vt=T3(mt,St);su(St,function(Zr){if(j0.test(Zr))throw new vs(E)});var ee,fe,Cn=0,kn=C.interpolate||Hi,Wn="__p += '",Ki=mf((C.escape||Hi).source+"|"+kn.source+"|"+(kn===Jr?vg:Hi).source+"|"+(C.evaluate||Hi).source+"|$","g"),Er="//# sourceURL="+(pc.call(C,"sourceURL")?(C.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++sl+"]")+` -`;x.replace(Ki,function(Zr,co,$o,Hh,_f,$r){return $o||($o=Hh),Wn+=x.slice(Cn,$r).replace(Pr,Uy),co&&(ee=!0,Wn+=`' + +`)}function aj(x){return Us(x)||Av(x)||!!(P3&&x&&x[P3])}function em(x,C){var F=typeof x;return C=C??hn,!!C&&(F=="number"||F!="symbol"&&tn.test(x))&&x>-1&&x%1==0&&x0){if(++C>=be)return arguments[0]}else C=0;return x.apply(d,arguments)}}function iT(x,C){var F=-1,J=x.length,mt=J-1;for(C=C===d?J:C;++F1?x[C-1]:d;return F=typeof F=="function"?(x.pop(),F):d,nm(x,F)});function O8(x){var C=Mt(x);return C.__chain__=!0,C}function Bnt(x,C){return C(x),x}function g5(x,C){return C(x)}var Fnt=tm(function(x){var C=x.length,F=C?x[0]:0,J=this.__wrapped__,mt=function(St){return Ok(St,x)};return C>1||this.__actions__.length||!(J instanceof po)||!em(F)?this.thru(mt):(J=J.slice(F,+F+(C?1:0)),J.__actions__.push({func:g5,args:[mt],thisArg:d}),new bf(J,this.__chain__).thru(function(St){return C&&!St.length&&St.push(d),St}))});function Unt(){return O8(this)}function znt(){return new bf(this.value(),this.__chain__)}function jl(){this.__values__===d&&(this.__values__=Q8(this.value()));var x=this.__index__>=this.__values__.length,C=x?d:this.__values__[this.__index__++];return{done:x,value:C}}function jnt(){return this}function Hnt(x){for(var C,F=this;F instanceof Tb;){var J=M8(F);J.__index__=0,J.__values__=d,C?mt.__wrapped__=J:C=J;var mt=J;F=F.__wrapped__}return mt.__wrapped__=x,C}function Gnt(){var x=this.__wrapped__;if(x instanceof po){var C=x;return this.__actions__.length&&(C=new po(this)),C=C.reverse(),C.__actions__.push({func:g5,args:[h5],thisArg:d}),new bf(C,this.__chain__)}return this.thru(h5)}function $j(){return VR(this.__wrapped__,this.__actions__)}var B8=YS(function(x,C,F){pc.call(x,F)?++x[F]:Lg(x,F,1)});function Wnt(x,C,F){var J=Us(x)?w3:Mz;return F&&jh(x,C,F)&&(C=d),J(x,cs(C,3))}function $nt(x,C){var F=Us(x)?wp:N3;return F(x,cs(C,3))}var F8=i8(S8),U8=i8(T8);function Vnt(x,C){return yh(m5(x,C),1)}function qnt(x,C){return yh(m5(x,C),re)}function Xnt(x,C,F){return F=F===d?1:Ys(F),yh(m5(x,C),F)}function Vj(x,C){var F=Us(x)?ou:Ab;return F(x,cs(C,3))}function qj(x,C){var F=Us(x)?PS:kR;return F(x,cs(C,3))}var Znt=YS(function(x,C,F){pc.call(x,F)?x[F].push(C):Lg(x,F,[C])});function Ynt(x,C,F,J){x=xh(x)?x:n2(x),F=F&&!J?Ys(F):0;var mt=x.length;return F<0&&(F=vt(mt+F,0)),lT(x)?F<=mt&&x.indexOf(C,F)>-1:!!mt&&vp(x,C,F)>-1}var Knt=oo(function(x,C,F){var J=-1,mt=typeof C=="function",St=xh(x)?$e(x.length):[];return Ab(x,function(Vt){St[++J]=mt?df(C,Vt,F):B3(Vt,C,F)}),St}),Jnt=YS(function(x,C,F){Lg(x,F,C)});function m5(x,C){var F=Us(x)?ea:OR;return F(x,cs(C,3))}function Qnt(x,C,F,J){return x==null?[]:(Us(C)||(C=C==null?[]:[C]),F=J?d:F,Us(F)||(F=F==null?[]:[F]),kb(x,C,F))}var tit=YS(function(x,C,F){x[F?0:1].push(C)},function(){return[[],[]]});function eit(x,C,F){var J=Us(x)?v3:Oy,mt=arguments.length<3;return J(x,cs(C,4),F,mt,Ab)}function nit(x,C,F){var J=Us(x)?_3:Oy,mt=arguments.length<3;return J(x,cs(C,4),F,mt,kR)}function iit(x,C){var F=Us(x)?wp:N3;return F(x,cT(cs(C,3)))}function rit(x){var C=Us(x)?SR:Bz;return C(x)}function sit(x,C,F){(F?jh(x,C,F):C===d)?C=1:C=Ys(C);var J=Us(x)?wz:Fz;return J(x,C)}function Xj(x){var C=Us(x)?vz:zz;return C(x)}function Zj(x){if(x==null)return 0;if(xh(x))return lT(x)?h1(x):x.length;var C=zh(x);return C==ut||C==yt?x.size:zk(x).length}function Yj(x,C,F){var J=Us(x)?y3:jz;return F&&jh(x,C,F)&&(C=d),J(x,cs(C,3))}var z8=oo(function(x,C){if(x==null)return[];var F=C.length;return F>1&&jh(x,C[0],C[1])?C=[]:F>2&&jh(C[0],C[1],C[2])&&(C=[C[0]]),kb(x,yh(C,1),[])}),Tv=Pk||function(){return Cc.Date.now()};function sT(x,C){if(typeof C!="function")throw new Jf(m);return x=Ys(x),function(){if(--x<1)return C.apply(this,arguments)}}function oT(x,C,F){return C=F?d:C,C=x&&C==null?x.length:C,Q0(x,Ot,d,d,d,d,C)}function Db(x,C){var F;if(typeof C!="function")throw new Jf(m);return x=Ys(x),function(){return--x>0&&(F=C.apply(this,arguments)),x<=1&&(C=d),F}}var Dg=oo(function(x,C,F){var J=et;if(F.length){var mt=Fl(F,Qy(Dg));J|=xt}return Q0(x,J,C,F,mt)}),j8=oo(function(x,C,F){var J=et|Q;if(F.length){var mt=Fl(F,Qy(j8));J|=xt}return Q0(C,J,x,F,mt)});function H8(x,C,F){C=F?d:C;var J=Q0(x,gt,d,d,d,d,d,C);return J.placeholder=H8.placeholder,J}function _r(x,C,F){C=F?d:C;var J=Q0(x,ft,d,d,d,d,d,C);return J.placeholder=_r.placeholder,J}function G8(x,C,F){var J,mt,St,Vt,ee,fe,Cn=0,kn=!1,Wn=!1,Ki=!0;if(typeof x!="function")throw new Jf(m);C=Mp(C)||0,Va(F)&&(kn=!!F.leading,Wn="maxWait"in F,St=Wn?vt(Mp(F.maxWait)||0,C):St,Ki="trailing"in F?!!F.trailing:Ki);function Er(yu){var nd=J,sm=mt;return J=mt=d,Cn=yu,Vt=x.apply(sm,nd),Vt}function Wr(yu){return Cn=yu,ee=H3(co,C),kn?Er(yu):Vt}function no(yu){var nd=yu-fe,sm=yu-Cn,y9=C-nd;return Wn?$t(y9,St-sm):y9}function Zr(yu){var nd=yu-fe,sm=yu-Cn;return fe===d||nd>=C||nd<0||Wn&&sm>=St}function co(){var yu=Tv();if(Zr(yu))return $o(yu);ee=H3(co,no(yu))}function $o(yu){return ee=d,Ki&&J?Er(yu):(J=mt=d,Vt)}function Hh(){ee!==d&&XR(ee),Cn=0,J=fe=mt=ee=d}function _f(){return ee===d?Vt:$o(Tv())}function $r(){var yu=Tv(),nd=Zr(yu);if(J=arguments,mt=this,fe=yu,nd){if(ee===d)return Wr(fe);if(Wn)return XR(ee),ee=H3(co,C),Er(fe)}return ee===d&&(ee=H3(co,C)),Vt}return $r.cancel=Hh,$r.flush=_f,$r}var W8=oo(function(x,C){return AR(x,1,C)}),Kj=oo(function(x,C,F){return AR(x,Mp(C)||0,F)});function $8(x){return Q0(x,se)}function t2(x,C){if(typeof x!="function"||C!=null&&typeof C!="function")throw new Jf(m);var F=function(){var J=arguments,mt=C?C.apply(this,J):J[0],St=F.cache;if(St.has(mt))return St.get(mt);var Vt=x.apply(this,J);return F.cache=St.set(mt,Vt)||St,Vt};return F.cache=new(t2.Cache||K0),F}t2.Cache=K0;function cT(x){if(typeof x!="function")throw new Jf(m);return function(){var C=arguments;switch(C.length){case 0:return!x.call(this);case 1:return!x.call(this,C[0]);case 2:return!x.call(this,C[0],C[1]);case 3:return!x.call(this,C[0],C[1],C[2])}return!x.apply(this,C)}}function Jj(x){return Db(2,x)}var Qj=Hz(function(x,C){C=C.length==1&&Us(C[0])?ea(C[0],Uu(cs())):ea(yh(C,1),Uu(cs()));var F=C.length;return oo(function(J){for(var mt=-1,St=$t(J.length,F);++mt=C}),Av=PR(function(){return arguments}())?PR:function(x){return cu(x)&&pc.call(x,"callee")&&!L3.call(x,"callee")},Us=$e.isArray,q8=b3?Uu(b3):kz;function xh(x){return x!=null&&uT(x.length)&&!im(x)}function j(x){return cu(x)&&xh(x)}function aT(x){return x===!0||x===!1||cu(x)&&zl(x)==ki}var zd=S||mT,dH=CS?Uu(CS):IR;function kv(x){return cu(x)&&x.nodeType===1&&!V3(x)}function X8(x){if(x==null)return!0;if(xh(x)&&(Us(x)||typeof x=="string"||typeof x.splice=="function"||zd(x)||e2(x)||Av(x)))return!x.length;var C=zh(x);if(C==ut||C==yt)return!x.size;if(j3(x))return!zk(x).length;for(var F in x)if(pc.call(x,F))return!1;return!0}function pH(x,C){return F3(x,C)}function gH(x,C,F){F=typeof F=="function"?F:d;var J=F?F(x,C):d;return J===d?F3(x,C,d,F):!!J}function w5(x){if(!cu(x))return!1;var C=zl(x);return C==Kt||C==pr||typeof x.message=="string"&&typeof x.name=="string"&&!V3(x)}function mH(x){return typeof x=="number"&&D(x)}function im(x){if(!Va(x))return!1;var C=zl(x);return C==wn||C==it||C==Yi||C==Pn}function Z8(x){return typeof x=="number"&&x==Ys(x)}function uT(x){return typeof x=="number"&&x>-1&&x%1==0&&x<=hn}function Va(x){var C=typeof x;return x!=null&&(C=="object"||C=="function")}function cu(x){return x!=null&&typeof x=="object"}var Y8=AS?Uu(AS):RR;function v5(x,C){return x===C||Uk(x,C,i5(C))}function bH(x,C,F){return F=typeof F=="function"?F:d,Uk(x,C,i5(C),F)}function wH(x){return K8(x)&&x!=+x}function vH(x){if(o5(x))throw new vs(p);return DR(x)}function _H(x){return x===null}function yH(x){return x==null}function K8(x){return typeof x=="number"||cu(x)&&zl(x)==kt}function V3(x){if(!cu(x)||zl(x)!=ie)return!1;var C=Cg(x);if(C===null)return!0;var F=pc.call(C,"constructor")&&C.constructor;return typeof F=="function"&&F instanceof F&&Tg.call(F)==Lk}var Nb=Py?Uu(Py):Lz;function xH(x){return Z8(x)&&x>=-hn&&x<=hn}var J8=kS?Uu(kS):Pz;function lT(x){return typeof x=="string"||!Us(x)&&cu(x)&&zl(x)==ue}function jd(x){return typeof x=="symbol"||cu(x)&&zl(x)==fn}var e2=Od?Uu(Od):Iz;function MH(x){return x===d}function EH(x){return cu(x)&&zh(x)==zn}function SH(x){return cu(x)&&zl(x)==Li}var TH=tT(jk),CH=tT(function(x,C){return x<=C});function Q8(x){if(!x)return[];if(xh(x))return lT(x)?Kf(x):td(x);if(Mb&&x[Mb])return Ck(x[Mb]());var C=zh(x),F=C==ut?pv:C==yt?zy:n2;return F(x)}function rm(x){if(!x)return x===0?x:0;if(x=Mp(x),x===re||x===-re){var C=x<0?-1:1;return C*Se}return x===x?x:0}function Ys(x){var C=rm(x),F=C%1;return C===C?F?C-F:C:0}function t9(x){return x?xv(Ys(x),0,mn):0}function Mp(x){if(typeof x=="number")return x;if(jd(x))return ke;if(Va(x)){var C=typeof x.valueOf=="function"?x.valueOf():x;x=Va(C)?C+"":C}if(typeof x!="string")return x===0?x:+x;x=Yf(x);var F=Rt.test(x);return F||Je.test(x)?SS(x.slice(2),F?2:8):l3.test(x)?ke:+x}function e9(x){return Ig(x,ed(x))}function AH(x){return x?xv(Ys(x),-hn,hn):x===0?x:0}function Ac(x){return x==null?"":Fd(x)}var kH=Ky(function(x,C){if(j3(C)||xh(C)){Ig(C,Hl(C),x);return}for(var F in C)pc.call(C,F)&&I3(x,F,C[F])}),n9=Ky(function(x,C){Ig(C,ed(C),x)}),i9=Ky(function(x,C,F,J){Ig(C,ed(C),x,J)}),_5=Ky(function(x,C,F,J){Ig(C,Hl(C),x,J)}),LH=tm(Ok);function PH(x,C){var F=Sb(x);return C==null?F:TR(F,C)}var IH=oo(function(x,C){x=Fc(x);var F=-1,J=C.length,mt=J>2?C[2]:d;for(mt&&jh(C[0],C[1],mt)&&(J=1);++F1),St}),Ig(x,e5(x),F),J&&(F=_p(F,B|P|U,Qz));for(var mt=C.length;mt--;)qk(F,C[mt]);return F});function XH(x,C){return s9(x,cT(cs(C)))}var hT=tm(function(x,C){return x==null?{}:Hk(x,C)});function s9(x,C){if(x==null)return{};var F=ea(e5(x),function(J){return[J]});return C=cs(C),zR(x,F,function(J,mt){return C(J,mt[0])})}function ZH(x,C,F){C=Pb(C,x);var J=-1,mt=C.length;for(mt||(mt=1,x=d);++JC){var J=x;x=C,C=J}if(F||x%1||C%1){var mt=Un();return $t(x+mt*(C-x+yk("1e-"+((mt+"").length-1))),C)}return Wk(x,C)}var sG=Jy(function(x,C,F){return C=C.toLowerCase(),x+(F?a9(C):C)});function a9(x){return E5(Ac(x).toLowerCase())}function u9(x){return x=Ac(x),x&&x.replace(Ze,dv).replace(d3,"")}function oG(x,C,F){x=Ac(x),C=Fd(C);var J=x.length;F=F===d?J:xv(Ys(F),0,J);var mt=F;return F-=C.length,F>=0&&x.slice(F,mt)==C}function cG(x){return x=Ac(x),x&&sn.test(x)?x.replace(Qt,NS):x}function aG(x){return x=Ac(x),x&&il.test(x)?x.replace(fc,"\\$&"):x}var uG=Jy(function(x,C,F){return x+(F?"-":"")+C.toLowerCase()}),lG=Jy(function(x,C,F){return x+(F?" ":"")+C.toLowerCase()}),hG=n8("toLowerCase");function fG(x,C,F){x=Ac(x),C=Ys(C);var J=C?h1(x):0;if(!C||J>=C)return x;var mt=(C-J)/2;return QS(Zy(mt),F)+x+QS(vv(mt),F)}function dG(x,C,F){x=Ac(x),C=Ys(C);var J=C?h1(x):0;return C&&J>>0,F?(x=Ac(x),x&&(typeof C=="string"||C!=null&&!Nb(C))&&(C=Fd(C),!C&&gf(x))?Ib(Kf(x),0,F):x.split(C,F)):[]}var _G=Jy(function(x,C,F){return x+(F?" ":"")+E5(C)});function l9(x,C,F){return x=Ac(x),F=F==null?0:xv(Ys(F),0,x.length),C=Fd(C),x.slice(F,F+C.length)==C}function kr(x,C,F){var J=Mt.templateSettings;F&&jh(x,C,F)&&(C=d),x=Ac(x),C=_5({},C,J,u8);var mt=_5({},C.imports,J.imports,u8),St=Hl(mt),Vt=T3(mt,St);ou(St,function(Zr){if(j0.test(Zr))throw new vs(E)});var ee,fe,Cn=0,kn=C.interpolate||Hi,Wn="__p += '",Ki=mf((C.escape||Hi).source+"|"+kn.source+"|"+(kn===Jr?vg:Hi).source+"|"+(C.evaluate||Hi).source+"|$","g"),Er="//# sourceURL="+(pc.call(C,"sourceURL")?(C.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++sl+"]")+` +`;x.replace(Ki,function(Zr,co,$o,Hh,_f,$r){return $o||($o=Hh),Wn+=x.slice(Cn,$r).replace(Pr,Fy),co&&(ee=!0,Wn+=`' + __e(`+co+`) + '`),_f&&(fe=!0,Wn+=`'; `+_f+`; @@ -61,11 +61,11 @@ __p += '`),$o&&(Wn+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+Wn+`return __p -}`;var no=d9(function(){return Wo(St,Er+"return "+Wn).apply(d,Vt)});if(no.source=Wn,v5(no))throw no;return no}function yG(x){return Ac(x).toLowerCase()}function xG(x){return Ac(x).toUpperCase()}function MG(x,C,F){if(x=Ac(x),x&&(F||C===d))return Yf(x);if(!x||!(C=Fd(C)))return x;var J=Kf(x),mt=Kf(C),St=NS(J,mt),Vt=V0(J,mt)+1;return Ib(J,St,Vt).join("")}function EG(x,C,F){if(x=Ac(x),x&&(F||C===d))return x.slice(0,Hy(x)+1);if(!x||!(C=Fd(C)))return x;var J=Kf(x),mt=V0(J,Kf(C))+1;return Ib(J,0,mt).join("")}function SG(x,C,F){if(x=Ac(x),x&&(F||C===d))return x.replace(va,"");if(!x||!(C=Fd(C)))return x;var J=Kf(x),mt=NS(J,Kf(C));return Ib(J,mt).join("")}function TG(x,C){var F=ot,J=Lt;if($a(C)){var mt="separator"in C?C.separator:mt;F="length"in C?Ys(C.length):F,J="omission"in C?Fd(C.omission):J}x=Ac(x);var St=x.length;if(gf(x)){var Vt=Kf(x);St=Vt.length}if(F>=St)return x;var ee=F-h1(J);if(ee<1)return J;var fe=Vt?Ib(Vt,0,ee).join(""):x.slice(0,ee);if(mt===d)return fe+J;if(Vt&&(ee+=fe.length-ee),Nb(mt)){if(x.slice(ee).search(mt)){var Cn,kn=fe;for(mt.global||(mt=mf(mt.source,Ac(cv.exec(mt))+"g")),mt.lastIndex=0;Cn=mt.exec(kn);)var Wn=Cn.index;fe=fe.slice(0,Wn===d?ee:Wn)}}else if(x.indexOf(Fd(mt),ee)!=ee){var Ki=fe.lastIndexOf(mt);Ki>-1&&(fe=fe.slice(0,Ki))}return fe+J}function CG(x){return x=Ac(x),x&&Mi.test(x)?x.replace(Ln,Gy):x}var AG=Qy(function(x,C,F){return x+(F?" ":"")+C.toUpperCase()}),S5=r8("toUpperCase");function r2(x,C,F){return x=Ac(x),C=F?d:C,C===d?zy(x)?yb(x):Ny(x):x.match(C)||[]}var d9=oo(function(x,C){try{return df(x,d,C)}catch(F){return v5(F)?F:new vs(F)}}),dT=tm(function(x,C){return su(C,function(F){F=g1(F),Lg(x,F,Dg(x[F],x))}),x});function pT(x){var C=x==null?0:x.length,F=cs();return x=C?ea(x,function(J){if(typeof J[1]!="function")throw new Jf(m);return[F(J[0]),J[1]]}):[],oo(function(J){for(var mt=-1;++mthn)return[];var F=mn,J=$t(x,mn);C=cs(C),x-=mn;for(var mt=Fy(J,C);++F0||C<0)?new po(F):(x<0?F=F.takeRight(-x):x&&(F=F.drop(x)),C!==d&&(C=Ys(C),F=C<0?F.dropRight(-C):F.take(C-x)),F)},po.prototype.takeRightWhile=function(x){return this.reverse().takeWhile(x).reverse()},po.prototype.toArray=function(){return this.take(mn)},Pg(po.prototype,function(x,C){var F=/^(?:filter|find|map|reject)|While$/.test(C),J=/^(?:head|last)$/.test(C),mt=Mt[J?"take"+(C=="last"?"Right":""):C],St=J||/^find/.test(C);mt&&(Mt.prototype[C]=function(){var Vt=this.__wrapped__,ee=J?[1]:arguments,fe=Vt instanceof po,Cn=ee[0],kn=fe||Us(Vt),Wn=function(co){var $o=mt.apply(Mt,Eg([co],ee));return J&&Ki?$o[0]:$o};kn&&F&&typeof Cn=="function"&&Cn.length!=1&&(fe=kn=!1);var Ki=this.__chain__,Er=!!this.__actions__.length,Wr=St&&!Ki,no=fe&&!Er;if(!St&&kn){Vt=no?Vt:new po(this);var Zr=x.apply(Vt,ee);return Zr.__actions__.push({func:m5,args:[Wn],thisArg:d}),new bf(Zr,Ki)}return Wr&&no?x.apply(this,ee):(Zr=this.thru(Wn),Wr?J?Zr.value()[0]:Zr.value():Zr)})}),su(["pop","push","shift","sort","splice","unshift"],function(x){var C=q0[x],F=/^(?:push|sort|unshift)$/.test(x)?"tap":"thru",J=/^(?:pop|shift)$/.test(x);Mt.prototype[x]=function(){var mt=arguments;if(J&&!this.__chain__){var St=this.value();return C.apply(Us(St)?St:[],mt)}return this[F](function(Vt){return C.apply(Us(Vt)?Vt:[],mt)})}}),Pg(po.prototype,function(x,C){var F=Mt[C];if(F){var J=F.name+"";pc.call(Eb,J)||(Eb[J]=[]),Eb[J].push({name:C,func:F})}}),Eb[JS(d,Q).name]=[{name:"wrapper",func:d}],po.prototype.clone=KU,po.prototype.reverse=JU,po.prototype.value=QU,Mt.prototype.at=Bnt,Mt.prototype.chain=Fnt,Mt.prototype.commit=Unt,Mt.prototype.next=jl,Mt.prototype.plant=jnt,Mt.prototype.reverse=Hnt,Mt.prototype.toJSON=Mt.prototype.valueOf=Mt.prototype.value=$j,Mt.prototype.first=Mt.prototype.head,Mb&&(Mt.prototype[Mb]=znt),Mt},Bd=$y();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Cc._=Bd,define(function(){return Bd})):Mg?((Mg.exports=Bd)._=Bd,$0._=Bd):Cc._=Bd}).call(LI)});var aU=Ld(cU=>{"use strict";Object.defineProperty(cU,"__esModule",{value:!0});var Mtt=sU(),R_t=UA(),eZt;(function(d){d.skin=null;function s(N,B){var P=R_t.filter(N,function(U){if(U instanceof Array&&U[0]==="g")return U[1]["s:pid"].startsWith(B)});return P}d.getPortsWithPrefix=s;function h(N,B){var P=R_t.filter(N,function(U){var j=U[0];if(U instanceof Array&&j==="g"){var V=U[1];return B(V)}return!1});return P.map(function(U){return U[1]["s:pid"]})}function p(N){return h(N,function(B){return B["s:position"]?B["s:position"]==="top":!1})}d.getInputPids=p;function m(N){return h(N,function(B){return B["s:position"]?B["s:position"]==="bottom":!1})}d.getOutputPids=m;function _(N){return h(N,function(B){return B["s:dir"]?B["s:dir"]==="lateral":B["s:position"]?B["s:position"]==="left"||B["s:position"]==="right":!1})}d.getLateralPortPids=_;function E(N){var B=null;return Mtt.traverse(d.skin,{enter:function(P,U){P.name==="s:alias"&&P.attr.val===N&&(B=U)}}),B==null&&Mtt.traverse(d.skin,{enter:function(P){P.attr["s:type"]==="generic"&&(B=P)}}),B.full}d.findSkinType=E;function y(){var N=[];return Mtt.t(d.skin,{enter:function(B){B.name==="s:low_priority_alias"&&N.push(B.attr.value)}}),N}d.getLowPriorityAliases=y;function I(){var N;return Mtt.t(d.skin,{enter:function(B){B.name==="s:properties"?N=R_t.mapValues(B.attr,function(P){return isNaN(Number(P))?P==="true"?!0:P==="false"?!1:P:Number(P)}):B.name==="s:layoutEngine"&&(N.layoutEngine=B.attr)}}),N.layoutEngine||(N.layoutEngine={}),N}d.getProperties=I})(eZt=cU.Skin||(cU.Skin={}));cU.default=eZt});var nZt=Ld(N_t=>{"use strict";Object.defineProperty(N_t,"__esModule",{value:!0});var D_t;(function(d){var s;(function(E){E.Zero="0",E.One="1",E.X="x"})(s||(s={}));var h;(function(E){E.Input="input",E.Output="output"})(h=d.Direction||(d.Direction={}));function p(E){return E.port_directions?Object.keys(E.port_directions).filter(function(y){return E.port_directions[y]===h.Input}):[]}d.getInputPortPids=p;function m(E){return E.port_directions?Object.keys(E.port_directions).filter(function(y){return E.port_directions[y]===h.Output}):[]}d.getOutputPortPids=m;var _;(function(E){E[E.Hide=0]="Hide",E[E.NoHide=1]="NoHide"})(_||(_={}))})(D_t||(D_t={}));N_t.default=D_t});var iZt=Ld(B_t=>{"use strict";Object.defineProperty(B_t,"__esModule",{value:!0});var wMe=F_t(),O_t=UA(),vMe=function(){function d(s,h){this.key=s,this.value=h}return Object.defineProperty(d.prototype,"Key",{get:function(){return this.key},enumerable:!0,configurable:!0}),d.prototype.keyIn=function(s){return O_t.includes(s,this.key)},d.prototype.maxVal=function(){return O_t.max(O_t.map(this.value,function(s){return Number(s)}))},d.prototype.valString=function(){return","+this.value.join()+","},d.prototype.findConstants=function(s,h,p){var m=this,_="",E=[],y=this.value;return y.forEach(function(I,N){I==="0"||I==="1"?(h+=1,_+=I,y[N]=h,E.push(h)):E.length>0&&(m.assignConstant(_,E,N,s,p),_="",E=[])}),E.length>0&&this.assignConstant(_,E,y.length,s,p),h},d.prototype.getGenericElkPort=function(s,h,p){var m=this.parentNode.Key,_=this.parentNode.getTemplate()[1]["s:type"];if(s===0){var E={id:m+"."+this.key,width:1,height:1,x:Number(h[0][1]["s:x"]),y:Number(h[0][1]["s:y"])};return(_==="generic"||_==="join")&&p==="in"&&(E.labels=[{id:m+"."+this.key+".label",text:this.key,x:Number(h[0][2][1].x)-10,y:Number(h[0][2][1].y)-6,width:6*this.key.length,height:11}]),(_==="generic"||_==="split")&&p==="out"&&(E.labels=[{id:m+"."+this.key+".label",text:this.key,x:Number(h[0][2][1].x)-10,y:Number(h[0][2][1].y)-6,width:6*this.key.length,height:11}]),E}else{var y=Number(h[1][1]["s:y"])-Number(h[0][1]["s:y"]),E={id:m+"."+this.key,width:1,height:1,x:Number(h[0][1]["s:x"]),y:s*y+Number(h[0][1]["s:y"])};return _==="generic"&&(E.labels=[{id:m+"."+this.key+".label",text:this.key,x:Number(h[0][2][1].x)-10,y:Number(h[0][2][1].y)-6,width:6*this.key.length,height:11}]),E}},d.prototype.assignConstant=function(s,h,p,m,_){var E=this,y=s.split("").reverse().join("");if(m.hasOwnProperty(y)){var I=m[y],N=I.length;I.forEach(function(B,P){var U=p-N+P;E.value[U]=B})}else _.push(wMe.default.fromConstantInfo(y,h)),m[y]=h},d}();B_t.Port=vMe});var rZt=Ld((yJe,Ett)=>{var _Me=function(){"use strict";function d(B,P){return P!=null&&B instanceof P}var s;try{s=Map}catch{s=function(){}}var h;try{h=Set}catch{h=function(){}}var p;try{p=Promise}catch{p=function(){}}function m(B,P,U,j,V){typeof P=="object"&&(U=P.depth,j=P.prototype,V=P.includeNonEnumerable,P=P.circular);var tt=[],Q=[],X=typeof Buffer<"u";typeof P>"u"&&(P=!0),typeof U>"u"&&(U=1/0);function gt(ft,xt){if(ft===null)return null;if(xt===0)return ft;var Bt,Ot;if(typeof ft!="object")return ft;if(d(ft,s))Bt=new s;else if(d(ft,h))Bt=new h;else if(d(ft,p))Bt=new p(function(xe,re){ft.then(function(hn){xe(gt(hn,xt-1))},function(hn){re(gt(hn,xt-1))})});else if(m.__isArray(ft))Bt=[];else if(m.__isRegExp(ft))Bt=new RegExp(ft.source,N(ft)),ft.lastIndex&&(Bt.lastIndex=ft.lastIndex);else if(m.__isDate(ft))Bt=new Date(ft.getTime());else{if(X&&Buffer.isBuffer(ft))return Buffer.allocUnsafe?Bt=Buffer.allocUnsafe(ft.length):Bt=new Buffer(ft.length),ft.copy(Bt),Bt;d(ft,Error)?Bt=Object.create(ft):typeof j>"u"?(Ot=Object.getPrototypeOf(ft),Bt=Object.create(Ot)):(Bt=Object.create(j),Ot=j)}if(P){var Pt=tt.indexOf(ft);if(Pt!=-1)return Q[Pt];tt.push(ft),Q.push(Bt)}d(ft,s)&&ft.forEach(function(xe,re){var hn=gt(re,xt-1),Se=gt(xe,xt-1);Bt.set(hn,Se)}),d(ft,h)&&ft.forEach(function(xe){var re=gt(xe,xt-1);Bt.add(re)});for(var se in ft){var ot;Ot&&(ot=Object.getOwnPropertyDescriptor(Ot,se)),!(ot&&ot.set==null)&&(Bt[se]=gt(ft[se],xt-1))}if(Object.getOwnPropertySymbols)for(var Lt=Object.getOwnPropertySymbols(ft),se=0;se{"use strict";Object.defineProperty(H_t,"__esModule",{value:!0});var Stt=G_t(),U_t=nZt(),n1=aU(),QE=iZt(),z_t=UA(),uU=rZt(),Ttt=sU(),yMe=function(){function d(s,h,p,m,_){var E=this;this.key=s,this.type=h,this.inputPorts=p,this.outputPorts=m,this.attributes=_||{},p.forEach(function(y){y.parentNode=E}),m.forEach(function(y){y.parentNode=E})}return d.fromPort=function(s,h){var p=s.direction===U_t.default.Direction.Input;return p?new d(h,"$_inputExt_",[],[new QE.Port("Y",s.bits)],{}):new d(h,"$_outputExt_",[new QE.Port("A",s.bits)],[],{})},d.fromYosysCell=function(s,h){var p=n1.default.findSkinType(s.type),m=n1.default.getInputPids(p),_=n1.default.getOutputPids(p),E=z_t.map(s.connections,function(P,U){return new QE.Port(U,P)}),y=E.filter(function(P){return P.keyIn(m)}),I=E.filter(function(P){return P.keyIn(_)});if(y.length+I.length!==E.length){var N=U_t.default.getInputPortPids(s),B=U_t.default.getOutputPortPids(s);y=E.filter(function(P){return P.keyIn(N)}),I=E.filter(function(P){return P.keyIn(B)})}return new d(h,s.type,y,I,s.attributes)},d.fromConstantInfo=function(s,h){return new d(s,"$_constant_",[],[new QE.Port("Y",h)],{})},d.fromJoinInfo=function(s,h){var p=s.slice(1,-1).split(","),m=p.map(function(y){return Number(y)}),_=[new QE.Port("Y",m)],E=h.map(function(y){return new QE.Port(y,sZt(m,y))});return new d("$join$"+s,"$_join_",E,_,{})},d.fromSplitInfo=function(s,h){var p=s.slice(1,-1).split(","),m=p.map(function(y){return Number(y)}),_=[new QE.Port("A",m)],E=h.map(function(y){var I=sZt(m,y);return new QE.Port(y,I)});return new d("$split$"+s,"$_split_",_,E,{})},Object.defineProperty(d.prototype,"Type",{get:function(){return this.type},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"Key",{get:function(){return this.key},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"InputPorts",{get:function(){return this.inputPorts},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"OutputPorts",{get:function(){return this.outputPorts},enumerable:!0,configurable:!0}),d.prototype.maxOutVal=function(s){var h=z_t.max(this.outputPorts.map(function(p){return p.maxVal()}));return z_t.max([h,s])},d.prototype.findConstants=function(s,h,p){return this.inputPorts.forEach(function(m){h=m.findConstants(s,h,p)}),h},d.prototype.inputPortVals=function(){return this.inputPorts.map(function(s){return s.valString()})},d.prototype.outputPortVals=function(){return this.outputPorts.map(function(s){return s.valString()})},d.prototype.collectPortsByDirection=function(s,h,p,m){var _=n1.default.findSkinType(this.type),E=n1.default.getLateralPortPids(_);this.inputPorts.forEach(function(y){var I=y.keyIn(E);I||_[1]["s:type"]==="generic"&&m?Stt.addToDefaultDict(p,y.valString(),y):Stt.addToDefaultDict(s,y.valString(),y)}),this.outputPorts.forEach(function(y){var I=y.keyIn(E);I||_[1]["s:type"]==="generic"&&m?Stt.addToDefaultDict(p,y.valString(),y):Stt.addToDefaultDict(h,y.valString(),y)})},d.prototype.getValueAttribute=function(){return this.attributes&&this.attributes.value?this.attributes.value:null},d.prototype.getTemplate=function(){return n1.default.findSkinType(this.type)},d.prototype.buildElkChild=function(){var s=this,h=this.getTemplate(),p=h[1]["s:type"],m={"org.eclipse.elk.portConstraints":"FIXED_POS"},_=null,E=null;for(var y in this.attributes)if(y.startsWith("org.eclipse.elk")){if(y==="org.eclipse.elk.x"){_=this.attributes[y];continue}if(y==="org.eclipse.elk.y"){E=this.attributes[y];continue}m[y]=this.attributes[y]}if(p==="join"||p==="split"||p==="generic"){var I=n1.default.getPortsWithPrefix(h,"in"),N=n1.default.getPortsWithPrefix(h,"out"),B=this.inputPorts.map(function(Q,X){return Q.getGenericElkPort(X,I,"in")}),P=this.outputPorts.map(function(Q,X){return Q.getGenericElkPort(X,N,"out")}),U={id:this.key,width:Number(h[1]["s:width"]),height:Number(this.getGenericHeight()),ports:B.concat(P),layoutOptions:m,labels:[]};return _&&(U.x=_),E&&(U.y=E),this.addLabels(h,U),U}var j=n1.default.getPortsWithPrefix(h,"").map(function(Q){return{id:s.key+"."+Q[1]["s:pid"],width:0,height:0,x:Number(Q[1]["s:x"]),y:Number(Q[1]["s:y"])}}),V=Number(h[1]["s:width"]),tt={id:this.key,width:V,height:Number(h[1]["s:height"]),ports:j,layoutOptions:m,labels:[]};return _&&(tt.x=_),E&&(tt.y=E),this.addLabels(h,tt),tt},d.prototype.render=function(s){for(var h=this.getTemplate(),p=uU(h),m=0,_=s.labels;m<_.length;m++){var E=_[m],y=E.id.split(".")[2];xMe(p,y,E.text)}for(var I=2;I3){var y=parseInt(p.key,2);E="0x"+y.toString(16)}else E=p.key;p.attributes[_]=p.key}else if(_ in p.attributes)E=p.attributes[_];else return;h.labels.push({id:p.key+".label."+_,text:E,x:m.attr.x,y:m.attr.y-6,height:11,width:6*E.length})}}})},d.prototype.getGenericHeight=function(){var s=this.getTemplate(),h=n1.default.getPortsWithPrefix(s,"in"),p=n1.default.getPortsWithPrefix(s,"out");if(this.inputPorts.length>this.outputPorts.length){var m=Number(h[1][1]["s:y"])-Number(h[0][1]["s:y"]);return Number(s[1]["s:height"])+m*(this.inputPorts.length-2)}if(p.length>1){var m=Number(p[1][1]["s:y"])-Number(p[0][1]["s:y"]);return Number(s[1]["s:height"])+m*(this.outputPorts.length-2)}return Number(s[1]["s:height"])},d}();H_t.default=yMe;function j_t(d,s){Ttt.traverse(d,{enter:function(h){h.name==="rect"&&h.attr["s:generic"]==="body"&&(h.attr.height=s)}})}function xMe(d,s,h){Ttt.traverse(d,{enter:function(p){p.name==="text"&&p.attr["s:attribute"]===s&&(p.full[2]=h)}})}function MMe(d,s,h){Ttt.traverse(d,{enter:function(p){var m=p.attr.class;m&&m.includes(s)&&(p.attr.class=m.replace(s,h))}})}function sZt(d,s){var h=s.indexOf(":");if(h===-1)return[d[Number(s)]];var p=s.slice(0,h),m=s.slice(h+1),_=d.slice(Number(p),Number(m)+1);return _}});var G_t=Ld(PI=>{"use strict";Object.defineProperty(PI,"__esModule",{value:!0});var EMe=aU(),Ctt=F_t(),P0=UA(),SMe=function(){function d(s){var h=this;this.moduleName=null,P0.forEach(s.modules,function(E,y){E.attributes&&Number(E.attributes.top)===1&&(h.moduleName=y)}),this.moduleName==null&&(this.moduleName=Object.keys(s.modules)[0]);var p=s.modules[this.moduleName],m=P0.map(p.ports,Ctt.default.fromPort),_=P0.map(p.cells,function(E,y){return Ctt.default.fromYosysCell(E,y)});this.nodes=_.concat(m),this.wires=[]}return d.prototype.addConstants=function(){var s=this.nodes.reduce(function(m,_){return _.maxOutVal(m)},-1),h={},p=[];this.nodes.forEach(function(m){s=m.findConstants(h,s,p)}),this.nodes=this.nodes.concat(p)},d.prototype.addSplitsJoins=function(){var s=P0.flatMap(this.nodes,function(E){return E.inputPortVals()}),h=P0.flatMap(this.nodes,function(E){return E.outputPortVals()}),p=s.slice(),m={},_={};s.forEach(function(E){hU(h,p,E,0,E.length,m,_)}),this.nodes=this.nodes.concat(P0.map(_,function(E,y){return Ctt.default.fromJoinInfo(y,E)})).concat(P0.map(m,function(E,y){return Ctt.default.fromSplitInfo(y,E)}))},d.prototype.createWires=function(){var s=EMe.default.getProperties(),h={},p={},m={};this.nodes.forEach(function(y){y.collectPortsByDirection(h,p,m,s.genericsLaterals)});var _=aZt(P0.keys(h).concat(P0.keys(p)).concat(P0.keys(m))),E=_.map(function(y){var I=p[y]||[],N=h[y]||[],B=m[y]||[],P={netName:y,drivers:I,riders:N,laterals:B};return I.concat(N).concat(B).forEach(function(U){U.wire=P}),P});this.wires=E},d}();PI.FlatModule=SMe;function TMe(d){var s="";return d.forEach(function(h){var p=String(h);s===""?s=p:s+=","+p}),","+s+","}PI.arrayToBitstring=TMe;function cZt(d,s){return s.indexOf(d)>-1}function oZt(d,s){return P0.findIndex(s,function(h){return cZt(d,h)})}function lU(d,s,h){d[s]===void 0?d[s]=[h]:d[s].push(h)}PI.addToDefaultDict=lU;function Att(d,s,h){var p=P0.max([d.indexOf(s),h]),m=d.substring(0,p).split(",").length-1,_=m+s.split(",").length-3;return m===_?String(m):String(m)+":"+String(_)}function hU(d,s,h,p,m,_,E){var y=s.indexOf(h);if(y!==-1&&s.splice(y,1),!(p>=h.length||m-p<2)){var I=h.slice(p,m);if(cZt(I,d)){I!==h&&lU(E,h,Att(h,I,p)),hU(d,s,h,m-1,h.length,_,E);return}var N=oZt(I,d);if(N!==-1){I!==h&&lU(E,h,Att(h,I,p)),lU(_,d[N],Att(d[N],I,0)),d.push(I),hU(d,s,h,m-1,h.length,_,E);return}if(oZt(I,s)!==-1){I!==h&&lU(E,h,Att(h,I,p)),hU(d,[],I,0,I.length,_,E),d.push(I);return}hU(d,s,h,p,p+I.slice(0,-1).lastIndexOf(",")+1,_,E)}}function aZt(d){var s={};return d.forEach(function(h){s[h]=!0}),P0.keys(s)}PI.removeDups=aZt});var $_t=Ld(fU=>{"use strict";Object.defineProperty(fU,"__esModule",{value:!0});var lZt=UA(),Gf;(function(d){d.wireNameLookup={},d.dummyNum=0,d.edgeIndex=0})(Gf=fU.ElkModel||(fU.ElkModel={}));function CMe(d){var s=d.nodes.map(function(p){return p.buildElkChild()});Gf.edgeIndex=0,Gf.dummyNum=0;var h=lZt.flatMap(d.wires,function(p){if(p.drivers.length>0&&p.riders.length>0&&p.laterals.length===0){var m=[];return W_t(p.drivers,p.riders,m),m}else if(p.drivers.concat(p.riders).length>0&&p.laterals.length>0){var m=[];return W_t(p.drivers,p.laterals,m),W_t(p.laterals,p.riders,m),m}else if(p.riders.length===0&&p.drivers.length>1){var _=uZt(s);Gf.dummyNum+=1;var E=p.drivers.map(function(P){var U=P.parentNode.Key,j="e"+String(Gf.edgeIndex);Gf.edgeIndex+=1;var V={id:j,source:U,sourcePort:U+"."+P.key,target:_,targetPort:_+".p"};return Gf.wireNameLookup[j]=P.wire.netName,V});return E}else if(p.riders.length>1&&p.drivers.length===0){var y=uZt(s);Gf.dummyNum+=1;var E=p.riders.map(function(U){var j=U.parentNode.Key,V="e"+String(Gf.edgeIndex);Gf.edgeIndex+=1;var tt={id:V,source:y,sourcePort:y+".p",target:j,targetPort:j+"."+U.key};return Gf.wireNameLookup[V]=U.wire.netName,tt});return E}else if(p.laterals.length>1){var I=p.laterals[0],N=I.parentNode.Key,B=p.laterals.slice(1).map(function(P){var U=P.parentNode.Key,j="e"+String(Gf.edgeIndex);Gf.edgeIndex+=1;var V={id:j,source:N,sourcePort:N+"."+I.key,target:U,targetPort:U+"."+P.key};return Gf.wireNameLookup[j]=P.wire.netName,V});return B}return[]});return{id:d.moduleName,children:s,edges:h}}fU.buildElkGraph=CMe;function uZt(d){var s="$d_"+String(Gf.dummyNum),h={id:s,width:0,height:0,ports:[{id:s+".p",width:0,height:0}],layoutOptions:{"org.eclipse.elk.portConstraints":"FIXED_SIDE"}};return d.push(h),s}function W_t(d,s,h){var p=lZt.flatMap(d,function(m){var _=m.parentNode.key,E=_+"."+m.key;return s.map(function(y){var I=y.parentNode.key,N=I+"."+y.key,B="e"+Gf.edgeIndex,P={id:B,sources:[E],targets:[N]};return Gf.wireNameLookup[B]=y.wire.netName,m.parentNode.type!=="$dff"&&(P.layoutOptions={"org.eclipse.elk.layered.priority.direction":10}),Gf.edgeIndex+=1,P})});h.push.apply(h,p)}});var gZt=Ld(RI=>{"use strict";var hZt=RI&&RI.__spreadArrays||function(){for(var d=0,s=0,h=arguments.length;s0?[X.bendPoints[0]]:X.endPoint:X.bendPoints&&X.bendPoints.length>0?[yy.last(X.bendPoints)]:X.startPoint}).map(function(Q){return Q.x>N.x?II.Right:Q.xN.y?II.Down:II.Up}));tt.size<3&&_.forEach(function(Q){Q.junctionPoints&&(Q.junctionPoints=Q.junctionPoints.filter(function(X){return!yy.isEqual(X,N)}))}),s+=1};s<1e4;){var p=h();if(p==="break")break}}RI.removeDummyEdges=pZt});var _Zt=Ld(Ltt=>{"use strict";Object.defineProperty(Ltt,"__esModule",{value:!0});var PMe=HXt(),IMe=sU(),RMe=G_t(),ktt=aU(),bZt=$_t(),mZt=gZt(),wZt=new PMe;function vZt(d,s){ktt.default.skin=IMe.p(d);var h=ktt.default.getProperties(),p=new RMe.FlatModule(s);return h.constants!==!1&&p.addConstants(),h.splitsAndJoins!==!1&&p.addSplitsJoins(),p.createWires(),p}function DMe(d,s,h,p){var m=vZt(d,s),_=bZt.buildElkGraph(m);if(h){p(null,JSON.stringify(_,null,2));return}var E=ktt.default.getProperties(),y=wZt.layout(_,{layoutOptions:E.layoutEngine});y.then(function(I){p(null,JSON.stringify(I,null,2))}).catch(function(I){throw Error(I)})}Ltt.dumpLayout=DMe;function NMe(d,s,h,p){var m=vZt(d,s),_=bZt.buildElkGraph(m),E=ktt.default.getProperties(),y;return p?y=new Promise(function(I){mZt.default(p,m),I()}):y=wZt.layout(_,{layoutOptions:E.layoutEngine}).then(function(I){return mZt.default(I,m)}).catch(function(I){console.error(I)}),typeof h=="function"&&y.then(function(I){return h(null,I),I}).catch(function(I){throw Error(I)}),y}Ltt.render=NMe});var hJe=FXt(zXt());var zAe=FXt(_Zt());var b2t={};lMe(b2t,{AmbientLight:()=>Det,BoxGeometry:()=>KA,Color:()=>Go,DirectionalLight:()=>Ret,DoubleSide:()=>Xw,EdgesGeometry:()=>Let,GridHelper:()=>Oet,Group:()=>cS,InstancedMesh:()=>ket,LineBasicMaterial:()=>cR,LineSegments:()=>AU,Matrix4:()=>Fu,Mesh:()=>gg,MeshBasicMaterial:()=>sR,MeshPhongMaterial:()=>Pet,PerspectiveCamera:()=>s1,Quaternion:()=>My,Raycaster:()=>Net,Scene:()=>Cet,Vector2:()=>Nc,Vector3:()=>Ge,WebGLRenderer:()=>CU});var l2t="160";var OMe=0,yZt=1,BMe=2;var QYt=1,FMe=2,Kx=3,hS=0,mg=1,Xw=2;var aS=0,QI=1,xZt=2,MZt=3,EZt=4,UMe=5,$A=100,zMe=101,jMe=102,SZt=103,TZt=104,HMe=200,GMe=201,WMe=202,$Me=203,Syt=204,Tyt=205,VMe=206,qMe=207,XMe=208,ZMe=209,YMe=210,KMe=211,JMe=212,QMe=213,tEe=214,eEe=0,nEe=1,iEe=2,oet=3,rEe=4,sEe=5,oEe=6,cEe=7,h2t=0,aEe=1,uEe=2,uS=0,lEe=1,hEe=2,fEe=3,dEe=4,pEe=5,gEe=6;var tKt=300,nR=301,iR=302,Cyt=303,Ayt=304,Bet=306,kyt=1e3,Zw=1001,Lyt=1002,r1=1003,CZt=1004;var V_t=1005;var bb=1006,mEe=1007;var xU=1008;var lS=1009,bEe=1010,wEe=1011,f2t=1012,eKt=1013,sS=1014,oS=1015,MU=1016,nKt=1017,iKt=1018,XA=1020,vEe=1021,Yw=1023,_Ee=1024,yEe=1025,ZA=1026,rR=1027,xEe=1028,rKt=1029,MEe=1030,sKt=1031,oKt=1033,q_t=33776,X_t=33777,Z_t=33778,Y_t=33779,AZt=35840,kZt=35841,LZt=35842,PZt=35843,cKt=36196,IZt=37492,RZt=37496,DZt=37808,NZt=37809,OZt=37810,BZt=37811,FZt=37812,UZt=37813,zZt=37814,jZt=37815,HZt=37816,GZt=37817,WZt=37818,$Zt=37819,VZt=37820,qZt=37821,K_t=36492,XZt=36494,ZZt=36495,EEe=36283,YZt=36284,KZt=36285,JZt=36286;var cet=2300,aet=2301,J_t=2302,QZt=2400,tYt=2401,eYt=2402;var aKt=3e3,YA=3001,SEe=3200,TEe=3201,uKt=0,CEe=1,wb="",Pd="srgb",t3="srgb-linear",d2t="display-p3",Fet="display-p3-linear",uet="linear",vu="srgb",het="rec709",fet="p3";var DI=7680;var nYt=519,AEe=512,kEe=513,LEe=514,lKt=515,PEe=516,IEe=517,REe=518,DEe=519,iYt=35044;var rYt="300 es",Pyt=1035,Qx=2e3,det=2001,fS=class{addEventListener(s,h){this._listeners===void 0&&(this._listeners={});let p=this._listeners;p[s]===void 0&&(p[s]=[]),p[s].indexOf(h)===-1&&p[s].push(h)}hasEventListener(s,h){if(this._listeners===void 0)return!1;let p=this._listeners;return p[s]!==void 0&&p[s].indexOf(h)!==-1}removeEventListener(s,h){if(this._listeners===void 0)return;let m=this._listeners[s];if(m!==void 0){let _=m.indexOf(h);_!==-1&&m.splice(_,1)}}dispatchEvent(s){if(this._listeners===void 0)return;let p=this._listeners[s.type];if(p!==void 0){s.target=this;let m=p.slice(0);for(let _=0,E=m.length;_>8&255]+gp[d>>16&255]+gp[d>>24&255]+"-"+gp[s&255]+gp[s>>8&255]+"-"+gp[s>>16&15|64]+gp[s>>24&255]+"-"+gp[h&63|128]+gp[h>>8&255]+"-"+gp[h>>16&255]+gp[h>>24&255]+gp[p&255]+gp[p>>8&255]+gp[p>>16&255]+gp[p>>24&255]).toLowerCase()}function pg(d,s,h){return Math.max(s,Math.min(h,d))}function NEe(d,s){return(d%s+s)%s}function Q_t(d,s,h){return(1-h)*d+h*s}function sYt(d){return(d&d-1)===0&&d!==0}function Ryt(d){return Math.pow(2,Math.floor(Math.log(d)/Math.LN2))}function dU(d,s){switch(s.constructor){case Float32Array:return d;case Uint32Array:return d/4294967295;case Uint16Array:return d/65535;case Uint8Array:return d/255;case Int32Array:return Math.max(d/2147483647,-1);case Int16Array:return Math.max(d/32767,-1);case Int8Array:return Math.max(d/127,-1);default:throw new Error("Invalid component type.")}}function dg(d,s){switch(s.constructor){case Float32Array:return d;case Uint32Array:return Math.round(d*4294967295);case Uint16Array:return Math.round(d*65535);case Uint8Array:return Math.round(d*255);case Int32Array:return Math.round(d*2147483647);case Int16Array:return Math.round(d*32767);case Int8Array:return Math.round(d*127);default:throw new Error("Invalid component type.")}}var Nc=class d{constructor(s=0,h=0){d.prototype.isVector2=!0,this.x=s,this.y=h}get width(){return this.x}set width(s){this.x=s}get height(){return this.y}set height(s){this.y=s}set(s,h){return this.x=s,this.y=h,this}setScalar(s){return this.x=s,this.y=s,this}setX(s){return this.x=s,this}setY(s){return this.y=s,this}setComponent(s,h){switch(s){case 0:this.x=h;break;case 1:this.y=h;break;default:throw new Error("index is out of range: "+s)}return this}getComponent(s){switch(s){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+s)}}clone(){return new this.constructor(this.x,this.y)}copy(s){return this.x=s.x,this.y=s.y,this}add(s){return this.x+=s.x,this.y+=s.y,this}addScalar(s){return this.x+=s,this.y+=s,this}addVectors(s,h){return this.x=s.x+h.x,this.y=s.y+h.y,this}addScaledVector(s,h){return this.x+=s.x*h,this.y+=s.y*h,this}sub(s){return this.x-=s.x,this.y-=s.y,this}subScalar(s){return this.x-=s,this.y-=s,this}subVectors(s,h){return this.x=s.x-h.x,this.y=s.y-h.y,this}multiply(s){return this.x*=s.x,this.y*=s.y,this}multiplyScalar(s){return this.x*=s,this.y*=s,this}divide(s){return this.x/=s.x,this.y/=s.y,this}divideScalar(s){return this.multiplyScalar(1/s)}applyMatrix3(s){let h=this.x,p=this.y,m=s.elements;return this.x=m[0]*h+m[3]*p+m[6],this.y=m[1]*h+m[4]*p+m[7],this}min(s){return this.x=Math.min(this.x,s.x),this.y=Math.min(this.y,s.y),this}max(s){return this.x=Math.max(this.x,s.x),this.y=Math.max(this.y,s.y),this}clamp(s,h){return this.x=Math.max(s.x,Math.min(h.x,this.x)),this.y=Math.max(s.y,Math.min(h.y,this.y)),this}clampScalar(s,h){return this.x=Math.max(s,Math.min(h,this.x)),this.y=Math.max(s,Math.min(h,this.y)),this}clampLength(s,h){let p=this.length();return this.divideScalar(p||1).multiplyScalar(Math.max(s,Math.min(h,p)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(s){return this.x*s.x+this.y*s.y}cross(s){return this.x*s.y-this.y*s.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(s){let h=Math.sqrt(this.lengthSq()*s.lengthSq());if(h===0)return Math.PI/2;let p=this.dot(s)/h;return Math.acos(pg(p,-1,1))}distanceTo(s){return Math.sqrt(this.distanceToSquared(s))}distanceToSquared(s){let h=this.x-s.x,p=this.y-s.y;return h*h+p*p}manhattanDistanceTo(s){return Math.abs(this.x-s.x)+Math.abs(this.y-s.y)}setLength(s){return this.normalize().multiplyScalar(s)}lerp(s,h){return this.x+=(s.x-this.x)*h,this.y+=(s.y-this.y)*h,this}lerpVectors(s,h,p){return this.x=s.x+(h.x-s.x)*p,this.y=s.y+(h.y-s.y)*p,this}equals(s){return s.x===this.x&&s.y===this.y}fromArray(s,h=0){return this.x=s[h],this.y=s[h+1],this}toArray(s=[],h=0){return s[h]=this.x,s[h+1]=this.y,s}fromBufferAttribute(s,h){return this.x=s.getX(h),this.y=s.getY(h),this}rotateAround(s,h){let p=Math.cos(h),m=Math.sin(h),_=this.x-s.x,E=this.y-s.y;return this.x=_*p-E*m+s.x,this.y=_*m+E*p+s.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},Ko=class d{constructor(s,h,p,m,_,E,y,I,N){d.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],s!==void 0&&this.set(s,h,p,m,_,E,y,I,N)}set(s,h,p,m,_,E,y,I,N){let B=this.elements;return B[0]=s,B[1]=m,B[2]=y,B[3]=h,B[4]=_,B[5]=I,B[6]=p,B[7]=E,B[8]=N,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(s){let h=this.elements,p=s.elements;return h[0]=p[0],h[1]=p[1],h[2]=p[2],h[3]=p[3],h[4]=p[4],h[5]=p[5],h[6]=p[6],h[7]=p[7],h[8]=p[8],this}extractBasis(s,h,p){return s.setFromMatrix3Column(this,0),h.setFromMatrix3Column(this,1),p.setFromMatrix3Column(this,2),this}setFromMatrix4(s){let h=s.elements;return this.set(h[0],h[4],h[8],h[1],h[5],h[9],h[2],h[6],h[10]),this}multiply(s){return this.multiplyMatrices(this,s)}premultiply(s){return this.multiplyMatrices(s,this)}multiplyMatrices(s,h){let p=s.elements,m=h.elements,_=this.elements,E=p[0],y=p[3],I=p[6],N=p[1],B=p[4],P=p[7],U=p[2],j=p[5],V=p[8],tt=m[0],Q=m[3],X=m[6],gt=m[1],ft=m[4],xt=m[7],Bt=m[2],Ot=m[5],Pt=m[8];return _[0]=E*tt+y*gt+I*Bt,_[3]=E*Q+y*ft+I*Ot,_[6]=E*X+y*xt+I*Pt,_[1]=N*tt+B*gt+P*Bt,_[4]=N*Q+B*ft+P*Ot,_[7]=N*X+B*xt+P*Pt,_[2]=U*tt+j*gt+V*Bt,_[5]=U*Q+j*ft+V*Ot,_[8]=U*X+j*xt+V*Pt,this}multiplyScalar(s){let h=this.elements;return h[0]*=s,h[3]*=s,h[6]*=s,h[1]*=s,h[4]*=s,h[7]*=s,h[2]*=s,h[5]*=s,h[8]*=s,this}determinant(){let s=this.elements,h=s[0],p=s[1],m=s[2],_=s[3],E=s[4],y=s[5],I=s[6],N=s[7],B=s[8];return h*E*B-h*y*N-p*_*B+p*y*I+m*_*N-m*E*I}invert(){let s=this.elements,h=s[0],p=s[1],m=s[2],_=s[3],E=s[4],y=s[5],I=s[6],N=s[7],B=s[8],P=B*E-y*N,U=y*I-B*_,j=N*_-E*I,V=h*P+p*U+m*j;if(V===0)return this.set(0,0,0,0,0,0,0,0,0);let tt=1/V;return s[0]=P*tt,s[1]=(m*N-B*p)*tt,s[2]=(y*p-m*E)*tt,s[3]=U*tt,s[4]=(B*h-m*I)*tt,s[5]=(m*_-y*h)*tt,s[6]=j*tt,s[7]=(p*I-N*h)*tt,s[8]=(E*h-p*_)*tt,this}transpose(){let s,h=this.elements;return s=h[1],h[1]=h[3],h[3]=s,s=h[2],h[2]=h[6],h[6]=s,s=h[5],h[5]=h[7],h[7]=s,this}getNormalMatrix(s){return this.setFromMatrix4(s).invert().transpose()}transposeIntoArray(s){let h=this.elements;return s[0]=h[0],s[1]=h[3],s[2]=h[6],s[3]=h[1],s[4]=h[4],s[5]=h[7],s[6]=h[2],s[7]=h[5],s[8]=h[8],this}setUvTransform(s,h,p,m,_,E,y){let I=Math.cos(_),N=Math.sin(_);return this.set(p*I,p*N,-p*(I*E+N*y)+E+s,-m*N,m*I,-m*(-N*E+I*y)+y+h,0,0,1),this}scale(s,h){return this.premultiply(tyt.makeScale(s,h)),this}rotate(s){return this.premultiply(tyt.makeRotation(-s)),this}translate(s,h){return this.premultiply(tyt.makeTranslation(s,h)),this}makeTranslation(s,h){return s.isVector2?this.set(1,0,s.x,0,1,s.y,0,0,1):this.set(1,0,s,0,1,h,0,0,1),this}makeRotation(s){let h=Math.cos(s),p=Math.sin(s);return this.set(h,-p,0,p,h,0,0,0,1),this}makeScale(s,h){return this.set(s,0,0,0,h,0,0,0,1),this}equals(s){let h=this.elements,p=s.elements;for(let m=0;m<9;m++)if(h[m]!==p[m])return!1;return!0}fromArray(s,h=0){for(let p=0;p<9;p++)this.elements[p]=s[p+h];return this}toArray(s=[],h=0){let p=this.elements;return s[h]=p[0],s[h+1]=p[1],s[h+2]=p[2],s[h+3]=p[3],s[h+4]=p[4],s[h+5]=p[5],s[h+6]=p[6],s[h+7]=p[7],s[h+8]=p[8],s}clone(){return new this.constructor().fromArray(this.elements)}},tyt=new Ko;function hKt(d){for(let s=d.length-1;s>=0;--s)if(d[s]>=65535)return!0;return!1}function pet(d){return document.createElementNS("http://www.w3.org/1999/xhtml",d)}function OEe(){let d=pet("canvas");return d.style.display="block",d}var oYt={};function _U(d){d in oYt||(oYt[d]=!0,console.warn(d))}var cYt=new Ko().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),aYt=new Ko().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Ptt={[t3]:{transfer:uet,primaries:het,toReference:d=>d,fromReference:d=>d},[Pd]:{transfer:vu,primaries:het,toReference:d=>d.convertSRGBToLinear(),fromReference:d=>d.convertLinearToSRGB()},[Fet]:{transfer:uet,primaries:fet,toReference:d=>d.applyMatrix3(aYt),fromReference:d=>d.applyMatrix3(cYt)},[d2t]:{transfer:vu,primaries:fet,toReference:d=>d.convertSRGBToLinear().applyMatrix3(aYt),fromReference:d=>d.applyMatrix3(cYt).convertLinearToSRGB()}},BEe=new Set([t3,Fet]),Na={enabled:!0,_workingColorSpace:t3,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(d){if(!BEe.has(d))throw new Error(`Unsupported working color space, "${d}".`);this._workingColorSpace=d},convert:function(d,s,h){if(this.enabled===!1||s===h||!s||!h)return d;let p=Ptt[s].toReference,m=Ptt[h].fromReference;return m(p(d))},fromWorkingColorSpace:function(d,s){return this.convert(d,this._workingColorSpace,s)},toWorkingColorSpace:function(d,s){return this.convert(d,s,this._workingColorSpace)},getPrimaries:function(d){return Ptt[d].primaries},getTransfer:function(d){return d===wb?uet:Ptt[d].transfer}};function tR(d){return d<.04045?d*.0773993808:Math.pow(d*.9478672986+.0521327014,2.4)}function eyt(d){return d<.0031308?d*12.92:1.055*Math.pow(d,.41666)-.055}var NI,get=class{static getDataURL(s){if(/^data:/i.test(s.src)||typeof HTMLCanvasElement>"u")return s.src;let h;if(s instanceof HTMLCanvasElement)h=s;else{NI===void 0&&(NI=pet("canvas")),NI.width=s.width,NI.height=s.height;let p=NI.getContext("2d");s instanceof ImageData?p.putImageData(s,0,0):p.drawImage(s,0,0,s.width,s.height),h=NI}return h.width>2048||h.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",s),h.toDataURL("image/jpeg",.6)):h.toDataURL("image/png")}static sRGBToLinear(s){if(typeof HTMLImageElement<"u"&&s instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&s instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&s instanceof ImageBitmap){let h=pet("canvas");h.width=s.width,h.height=s.height;let p=h.getContext("2d");p.drawImage(s,0,0,s.width,s.height);let m=p.getImageData(0,0,s.width,s.height),_=m.data;for(let E=0;E<_.length;E++)_[E]=tR(_[E]/255)*255;return p.putImageData(m,0,0),h}else if(s.data){let h=s.data.slice(0);for(let p=0;p0&&(p.userData=this.userData),h||(s.textures[this.uuid]=p),p}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(s){if(this.mapping!==tKt)return s;if(s.applyMatrix3(this.matrix),s.x<0||s.x>1)switch(this.wrapS){case kyt:s.x=s.x-Math.floor(s.x);break;case Zw:s.x=s.x<0?0:1;break;case Lyt:Math.abs(Math.floor(s.x)%2)===1?s.x=Math.ceil(s.x)-s.x:s.x=s.x-Math.floor(s.x);break}if(s.y<0||s.y>1)switch(this.wrapT){case kyt:s.y=s.y-Math.floor(s.y);break;case Zw:s.y=s.y<0?0:1;break;case Lyt:Math.abs(Math.floor(s.y)%2)===1?s.y=Math.ceil(s.y)-s.y:s.y=s.y-Math.floor(s.y);break}return this.flipY&&(s.y=1-s.y),s}set needsUpdate(s){s===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return _U("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Pd?YA:aKt}set encoding(s){_U("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=s===YA?Pd:wb}};Kw.DEFAULT_IMAGE=null;Kw.DEFAULT_MAPPING=tKt;Kw.DEFAULT_ANISOTROPY=1;var $f=class d{constructor(s=0,h=0,p=0,m=1){d.prototype.isVector4=!0,this.x=s,this.y=h,this.z=p,this.w=m}get width(){return this.z}set width(s){this.z=s}get height(){return this.w}set height(s){this.w=s}set(s,h,p,m){return this.x=s,this.y=h,this.z=p,this.w=m,this}setScalar(s){return this.x=s,this.y=s,this.z=s,this.w=s,this}setX(s){return this.x=s,this}setY(s){return this.y=s,this}setZ(s){return this.z=s,this}setW(s){return this.w=s,this}setComponent(s,h){switch(s){case 0:this.x=h;break;case 1:this.y=h;break;case 2:this.z=h;break;case 3:this.w=h;break;default:throw new Error("index is out of range: "+s)}return this}getComponent(s){switch(s){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+s)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(s){return this.x=s.x,this.y=s.y,this.z=s.z,this.w=s.w!==void 0?s.w:1,this}add(s){return this.x+=s.x,this.y+=s.y,this.z+=s.z,this.w+=s.w,this}addScalar(s){return this.x+=s,this.y+=s,this.z+=s,this.w+=s,this}addVectors(s,h){return this.x=s.x+h.x,this.y=s.y+h.y,this.z=s.z+h.z,this.w=s.w+h.w,this}addScaledVector(s,h){return this.x+=s.x*h,this.y+=s.y*h,this.z+=s.z*h,this.w+=s.w*h,this}sub(s){return this.x-=s.x,this.y-=s.y,this.z-=s.z,this.w-=s.w,this}subScalar(s){return this.x-=s,this.y-=s,this.z-=s,this.w-=s,this}subVectors(s,h){return this.x=s.x-h.x,this.y=s.y-h.y,this.z=s.z-h.z,this.w=s.w-h.w,this}multiply(s){return this.x*=s.x,this.y*=s.y,this.z*=s.z,this.w*=s.w,this}multiplyScalar(s){return this.x*=s,this.y*=s,this.z*=s,this.w*=s,this}applyMatrix4(s){let h=this.x,p=this.y,m=this.z,_=this.w,E=s.elements;return this.x=E[0]*h+E[4]*p+E[8]*m+E[12]*_,this.y=E[1]*h+E[5]*p+E[9]*m+E[13]*_,this.z=E[2]*h+E[6]*p+E[10]*m+E[14]*_,this.w=E[3]*h+E[7]*p+E[11]*m+E[15]*_,this}divideScalar(s){return this.multiplyScalar(1/s)}setAxisAngleFromQuaternion(s){this.w=2*Math.acos(s.w);let h=Math.sqrt(1-s.w*s.w);return h<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=s.x/h,this.y=s.y/h,this.z=s.z/h),this}setAxisAngleFromRotationMatrix(s){let h,p,m,_,I=s.elements,N=I[0],B=I[4],P=I[8],U=I[1],j=I[5],V=I[9],tt=I[2],Q=I[6],X=I[10];if(Math.abs(B-U)<.01&&Math.abs(P-tt)<.01&&Math.abs(V-Q)<.01){if(Math.abs(B+U)<.1&&Math.abs(P+tt)<.1&&Math.abs(V+Q)<.1&&Math.abs(N+j+X-3)<.1)return this.set(1,0,0,0),this;h=Math.PI;let ft=(N+1)/2,xt=(j+1)/2,Bt=(X+1)/2,Ot=(B+U)/4,Pt=(P+tt)/4,se=(V+Q)/4;return ft>xt&&ft>Bt?ft<.01?(p=0,m=.707106781,_=.707106781):(p=Math.sqrt(ft),m=Ot/p,_=Pt/p):xt>Bt?xt<.01?(p=.707106781,m=0,_=.707106781):(m=Math.sqrt(xt),p=Ot/m,_=se/m):Bt<.01?(p=.707106781,m=.707106781,_=0):(_=Math.sqrt(Bt),p=Pt/_,m=se/_),this.set(p,m,_,h),this}let gt=Math.sqrt((Q-V)*(Q-V)+(P-tt)*(P-tt)+(U-B)*(U-B));return Math.abs(gt)<.001&&(gt=1),this.x=(Q-V)/gt,this.y=(P-tt)/gt,this.z=(U-B)/gt,this.w=Math.acos((N+j+X-1)/2),this}min(s){return this.x=Math.min(this.x,s.x),this.y=Math.min(this.y,s.y),this.z=Math.min(this.z,s.z),this.w=Math.min(this.w,s.w),this}max(s){return this.x=Math.max(this.x,s.x),this.y=Math.max(this.y,s.y),this.z=Math.max(this.z,s.z),this.w=Math.max(this.w,s.w),this}clamp(s,h){return this.x=Math.max(s.x,Math.min(h.x,this.x)),this.y=Math.max(s.y,Math.min(h.y,this.y)),this.z=Math.max(s.z,Math.min(h.z,this.z)),this.w=Math.max(s.w,Math.min(h.w,this.w)),this}clampScalar(s,h){return this.x=Math.max(s,Math.min(h,this.x)),this.y=Math.max(s,Math.min(h,this.y)),this.z=Math.max(s,Math.min(h,this.z)),this.w=Math.max(s,Math.min(h,this.w)),this}clampLength(s,h){let p=this.length();return this.divideScalar(p||1).multiplyScalar(Math.max(s,Math.min(h,p)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(s){return this.x*s.x+this.y*s.y+this.z*s.z+this.w*s.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(s){return this.normalize().multiplyScalar(s)}lerp(s,h){return this.x+=(s.x-this.x)*h,this.y+=(s.y-this.y)*h,this.z+=(s.z-this.z)*h,this.w+=(s.w-this.w)*h,this}lerpVectors(s,h,p){return this.x=s.x+(h.x-s.x)*p,this.y=s.y+(h.y-s.y)*p,this.z=s.z+(h.z-s.z)*p,this.w=s.w+(h.w-s.w)*p,this}equals(s){return s.x===this.x&&s.y===this.y&&s.z===this.z&&s.w===this.w}fromArray(s,h=0){return this.x=s[h],this.y=s[h+1],this.z=s[h+2],this.w=s[h+3],this}toArray(s=[],h=0){return s[h]=this.x,s[h+1]=this.y,s[h+2]=this.z,s[h+3]=this.w,s}fromBufferAttribute(s,h){return this.x=s.getX(h),this.y=s.getY(h),this.z=s.getZ(h),this.w=s.getW(h),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},Dyt=class extends fS{constructor(s=1,h=1,p={}){super(),this.isRenderTarget=!0,this.width=s,this.height=h,this.depth=1,this.scissor=new $f(0,0,s,h),this.scissorTest=!1,this.viewport=new $f(0,0,s,h);let m={width:s,height:h,depth:1};p.encoding!==void 0&&(_U("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),p.colorSpace=p.encoding===YA?Pd:wb),p=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:bb,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},p),this.texture=new Kw(m,p.mapping,p.wrapS,p.wrapT,p.magFilter,p.minFilter,p.format,p.type,p.anisotropy,p.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=p.generateMipmaps,this.texture.internalFormat=p.internalFormat,this.depthBuffer=p.depthBuffer,this.stencilBuffer=p.stencilBuffer,this.depthTexture=p.depthTexture,this.samples=p.samples}setSize(s,h,p=1){(this.width!==s||this.height!==h||this.depth!==p)&&(this.width=s,this.height=h,this.depth=p,this.texture.image.width=s,this.texture.image.height=h,this.texture.image.depth=p,this.dispose()),this.viewport.set(0,0,s,h),this.scissor.set(0,0,s,h)}clone(){return new this.constructor().copy(this)}copy(s){this.width=s.width,this.height=s.height,this.depth=s.depth,this.scissor.copy(s.scissor),this.scissorTest=s.scissorTest,this.viewport.copy(s.viewport),this.texture=s.texture.clone(),this.texture.isRenderTargetTexture=!0;let h=Object.assign({},s.texture.image);return this.texture.source=new met(h),this.depthBuffer=s.depthBuffer,this.stencilBuffer=s.stencilBuffer,s.depthTexture!==null&&(this.depthTexture=s.depthTexture.clone()),this.samples=s.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},e3=class extends Dyt{constructor(s=1,h=1,p={}){super(s,h,p),this.isWebGLRenderTarget=!0}},bet=class extends Kw{constructor(s=null,h=1,p=1,m=1){super(null),this.isDataArrayTexture=!0,this.image={data:s,width:h,height:p,depth:m},this.magFilter=r1,this.minFilter=r1,this.wrapR=Zw,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Nyt=class extends Kw{constructor(s=null,h=1,p=1,m=1){super(null),this.isData3DTexture=!0,this.image={data:s,width:h,height:p,depth:m},this.magFilter=r1,this.minFilter=r1,this.wrapR=Zw,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var My=class{constructor(s=0,h=0,p=0,m=1){this.isQuaternion=!0,this._x=s,this._y=h,this._z=p,this._w=m}static slerpFlat(s,h,p,m,_,E,y){let I=p[m+0],N=p[m+1],B=p[m+2],P=p[m+3],U=_[E+0],j=_[E+1],V=_[E+2],tt=_[E+3];if(y===0){s[h+0]=I,s[h+1]=N,s[h+2]=B,s[h+3]=P;return}if(y===1){s[h+0]=U,s[h+1]=j,s[h+2]=V,s[h+3]=tt;return}if(P!==tt||I!==U||N!==j||B!==V){let Q=1-y,X=I*U+N*j+B*V+P*tt,gt=X>=0?1:-1,ft=1-X*X;if(ft>Number.EPSILON){let Bt=Math.sqrt(ft),Ot=Math.atan2(Bt,X*gt);Q=Math.sin(Q*Ot)/Bt,y=Math.sin(y*Ot)/Bt}let xt=y*gt;if(I=I*Q+U*xt,N=N*Q+j*xt,B=B*Q+V*xt,P=P*Q+tt*xt,Q===1-y){let Bt=1/Math.sqrt(I*I+N*N+B*B+P*P);I*=Bt,N*=Bt,B*=Bt,P*=Bt}}s[h]=I,s[h+1]=N,s[h+2]=B,s[h+3]=P}static multiplyQuaternionsFlat(s,h,p,m,_,E){let y=p[m],I=p[m+1],N=p[m+2],B=p[m+3],P=_[E],U=_[E+1],j=_[E+2],V=_[E+3];return s[h]=y*V+B*P+I*j-N*U,s[h+1]=I*V+B*U+N*P-y*j,s[h+2]=N*V+B*j+y*U-I*P,s[h+3]=B*V-y*P-I*U-N*j,s}get x(){return this._x}set x(s){this._x=s,this._onChangeCallback()}get y(){return this._y}set y(s){this._y=s,this._onChangeCallback()}get z(){return this._z}set z(s){this._z=s,this._onChangeCallback()}get w(){return this._w}set w(s){this._w=s,this._onChangeCallback()}set(s,h,p,m){return this._x=s,this._y=h,this._z=p,this._w=m,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(s){return this._x=s.x,this._y=s.y,this._z=s.z,this._w=s.w,this._onChangeCallback(),this}setFromEuler(s,h=!0){let p=s._x,m=s._y,_=s._z,E=s._order,y=Math.cos,I=Math.sin,N=y(p/2),B=y(m/2),P=y(_/2),U=I(p/2),j=I(m/2),V=I(_/2);switch(E){case"XYZ":this._x=U*B*P+N*j*V,this._y=N*j*P-U*B*V,this._z=N*B*V+U*j*P,this._w=N*B*P-U*j*V;break;case"YXZ":this._x=U*B*P+N*j*V,this._y=N*j*P-U*B*V,this._z=N*B*V-U*j*P,this._w=N*B*P+U*j*V;break;case"ZXY":this._x=U*B*P-N*j*V,this._y=N*j*P+U*B*V,this._z=N*B*V+U*j*P,this._w=N*B*P-U*j*V;break;case"ZYX":this._x=U*B*P-N*j*V,this._y=N*j*P+U*B*V,this._z=N*B*V-U*j*P,this._w=N*B*P+U*j*V;break;case"YZX":this._x=U*B*P+N*j*V,this._y=N*j*P+U*B*V,this._z=N*B*V-U*j*P,this._w=N*B*P-U*j*V;break;case"XZY":this._x=U*B*P-N*j*V,this._y=N*j*P-U*B*V,this._z=N*B*V+U*j*P,this._w=N*B*P+U*j*V;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+E)}return h===!0&&this._onChangeCallback(),this}setFromAxisAngle(s,h){let p=h/2,m=Math.sin(p);return this._x=s.x*m,this._y=s.y*m,this._z=s.z*m,this._w=Math.cos(p),this._onChangeCallback(),this}setFromRotationMatrix(s){let h=s.elements,p=h[0],m=h[4],_=h[8],E=h[1],y=h[5],I=h[9],N=h[2],B=h[6],P=h[10],U=p+y+P;if(U>0){let j=.5/Math.sqrt(U+1);this._w=.25/j,this._x=(B-I)*j,this._y=(_-N)*j,this._z=(E-m)*j}else if(p>y&&p>P){let j=2*Math.sqrt(1+p-y-P);this._w=(B-I)/j,this._x=.25*j,this._y=(m+E)/j,this._z=(_+N)/j}else if(y>P){let j=2*Math.sqrt(1+y-p-P);this._w=(_-N)/j,this._x=(m+E)/j,this._y=.25*j,this._z=(I+B)/j}else{let j=2*Math.sqrt(1+P-p-y);this._w=(E-m)/j,this._x=(_+N)/j,this._y=(I+B)/j,this._z=.25*j}return this._onChangeCallback(),this}setFromUnitVectors(s,h){let p=s.dot(h)+1;return pMath.abs(s.z)?(this._x=-s.y,this._y=s.x,this._z=0,this._w=p):(this._x=0,this._y=-s.z,this._z=s.y,this._w=p)):(this._x=s.y*h.z-s.z*h.y,this._y=s.z*h.x-s.x*h.z,this._z=s.x*h.y-s.y*h.x,this._w=p),this.normalize()}angleTo(s){return 2*Math.acos(Math.abs(pg(this.dot(s),-1,1)))}rotateTowards(s,h){let p=this.angleTo(s);if(p===0)return this;let m=Math.min(1,h/p);return this.slerp(s,m),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(s){return this._x*s._x+this._y*s._y+this._z*s._z+this._w*s._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let s=this.length();return s===0?(this._x=0,this._y=0,this._z=0,this._w=1):(s=1/s,this._x=this._x*s,this._y=this._y*s,this._z=this._z*s,this._w=this._w*s),this._onChangeCallback(),this}multiply(s){return this.multiplyQuaternions(this,s)}premultiply(s){return this.multiplyQuaternions(s,this)}multiplyQuaternions(s,h){let p=s._x,m=s._y,_=s._z,E=s._w,y=h._x,I=h._y,N=h._z,B=h._w;return this._x=p*B+E*y+m*N-_*I,this._y=m*B+E*I+_*y-p*N,this._z=_*B+E*N+p*I-m*y,this._w=E*B-p*y-m*I-_*N,this._onChangeCallback(),this}slerp(s,h){if(h===0)return this;if(h===1)return this.copy(s);let p=this._x,m=this._y,_=this._z,E=this._w,y=E*s._w+p*s._x+m*s._y+_*s._z;if(y<0?(this._w=-s._w,this._x=-s._x,this._y=-s._y,this._z=-s._z,y=-y):this.copy(s),y>=1)return this._w=E,this._x=p,this._y=m,this._z=_,this;let I=1-y*y;if(I<=Number.EPSILON){let j=1-h;return this._w=j*E+h*this._w,this._x=j*p+h*this._x,this._y=j*m+h*this._y,this._z=j*_+h*this._z,this.normalize(),this}let N=Math.sqrt(I),B=Math.atan2(N,y),P=Math.sin((1-h)*B)/N,U=Math.sin(h*B)/N;return this._w=E*P+this._w*U,this._x=p*P+this._x*U,this._y=m*P+this._y*U,this._z=_*P+this._z*U,this._onChangeCallback(),this}slerpQuaternions(s,h,p){return this.copy(s).slerp(h,p)}random(){let s=Math.random(),h=Math.sqrt(1-s),p=Math.sqrt(s),m=2*Math.PI*Math.random(),_=2*Math.PI*Math.random();return this.set(h*Math.cos(m),p*Math.sin(_),p*Math.cos(_),h*Math.sin(m))}equals(s){return s._x===this._x&&s._y===this._y&&s._z===this._z&&s._w===this._w}fromArray(s,h=0){return this._x=s[h],this._y=s[h+1],this._z=s[h+2],this._w=s[h+3],this._onChangeCallback(),this}toArray(s=[],h=0){return s[h]=this._x,s[h+1]=this._y,s[h+2]=this._z,s[h+3]=this._w,s}fromBufferAttribute(s,h){return this._x=s.getX(h),this._y=s.getY(h),this._z=s.getZ(h),this._w=s.getW(h),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(s){return this._onChangeCallback=s,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},Ge=class d{constructor(s=0,h=0,p=0){d.prototype.isVector3=!0,this.x=s,this.y=h,this.z=p}set(s,h,p){return p===void 0&&(p=this.z),this.x=s,this.y=h,this.z=p,this}setScalar(s){return this.x=s,this.y=s,this.z=s,this}setX(s){return this.x=s,this}setY(s){return this.y=s,this}setZ(s){return this.z=s,this}setComponent(s,h){switch(s){case 0:this.x=h;break;case 1:this.y=h;break;case 2:this.z=h;break;default:throw new Error("index is out of range: "+s)}return this}getComponent(s){switch(s){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+s)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(s){return this.x=s.x,this.y=s.y,this.z=s.z,this}add(s){return this.x+=s.x,this.y+=s.y,this.z+=s.z,this}addScalar(s){return this.x+=s,this.y+=s,this.z+=s,this}addVectors(s,h){return this.x=s.x+h.x,this.y=s.y+h.y,this.z=s.z+h.z,this}addScaledVector(s,h){return this.x+=s.x*h,this.y+=s.y*h,this.z+=s.z*h,this}sub(s){return this.x-=s.x,this.y-=s.y,this.z-=s.z,this}subScalar(s){return this.x-=s,this.y-=s,this.z-=s,this}subVectors(s,h){return this.x=s.x-h.x,this.y=s.y-h.y,this.z=s.z-h.z,this}multiply(s){return this.x*=s.x,this.y*=s.y,this.z*=s.z,this}multiplyScalar(s){return this.x*=s,this.y*=s,this.z*=s,this}multiplyVectors(s,h){return this.x=s.x*h.x,this.y=s.y*h.y,this.z=s.z*h.z,this}applyEuler(s){return this.applyQuaternion(uYt.setFromEuler(s))}applyAxisAngle(s,h){return this.applyQuaternion(uYt.setFromAxisAngle(s,h))}applyMatrix3(s){let h=this.x,p=this.y,m=this.z,_=s.elements;return this.x=_[0]*h+_[3]*p+_[6]*m,this.y=_[1]*h+_[4]*p+_[7]*m,this.z=_[2]*h+_[5]*p+_[8]*m,this}applyNormalMatrix(s){return this.applyMatrix3(s).normalize()}applyMatrix4(s){let h=this.x,p=this.y,m=this.z,_=s.elements,E=1/(_[3]*h+_[7]*p+_[11]*m+_[15]);return this.x=(_[0]*h+_[4]*p+_[8]*m+_[12])*E,this.y=(_[1]*h+_[5]*p+_[9]*m+_[13])*E,this.z=(_[2]*h+_[6]*p+_[10]*m+_[14])*E,this}applyQuaternion(s){let h=this.x,p=this.y,m=this.z,_=s.x,E=s.y,y=s.z,I=s.w,N=2*(E*m-y*p),B=2*(y*h-_*m),P=2*(_*p-E*h);return this.x=h+I*N+E*P-y*B,this.y=p+I*B+y*N-_*P,this.z=m+I*P+_*B-E*N,this}project(s){return this.applyMatrix4(s.matrixWorldInverse).applyMatrix4(s.projectionMatrix)}unproject(s){return this.applyMatrix4(s.projectionMatrixInverse).applyMatrix4(s.matrixWorld)}transformDirection(s){let h=this.x,p=this.y,m=this.z,_=s.elements;return this.x=_[0]*h+_[4]*p+_[8]*m,this.y=_[1]*h+_[5]*p+_[9]*m,this.z=_[2]*h+_[6]*p+_[10]*m,this.normalize()}divide(s){return this.x/=s.x,this.y/=s.y,this.z/=s.z,this}divideScalar(s){return this.multiplyScalar(1/s)}min(s){return this.x=Math.min(this.x,s.x),this.y=Math.min(this.y,s.y),this.z=Math.min(this.z,s.z),this}max(s){return this.x=Math.max(this.x,s.x),this.y=Math.max(this.y,s.y),this.z=Math.max(this.z,s.z),this}clamp(s,h){return this.x=Math.max(s.x,Math.min(h.x,this.x)),this.y=Math.max(s.y,Math.min(h.y,this.y)),this.z=Math.max(s.z,Math.min(h.z,this.z)),this}clampScalar(s,h){return this.x=Math.max(s,Math.min(h,this.x)),this.y=Math.max(s,Math.min(h,this.y)),this.z=Math.max(s,Math.min(h,this.z)),this}clampLength(s,h){let p=this.length();return this.divideScalar(p||1).multiplyScalar(Math.max(s,Math.min(h,p)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(s){return this.x*s.x+this.y*s.y+this.z*s.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(s){return this.normalize().multiplyScalar(s)}lerp(s,h){return this.x+=(s.x-this.x)*h,this.y+=(s.y-this.y)*h,this.z+=(s.z-this.z)*h,this}lerpVectors(s,h,p){return this.x=s.x+(h.x-s.x)*p,this.y=s.y+(h.y-s.y)*p,this.z=s.z+(h.z-s.z)*p,this}cross(s){return this.crossVectors(this,s)}crossVectors(s,h){let p=s.x,m=s.y,_=s.z,E=h.x,y=h.y,I=h.z;return this.x=m*I-_*y,this.y=_*E-p*I,this.z=p*y-m*E,this}projectOnVector(s){let h=s.lengthSq();if(h===0)return this.set(0,0,0);let p=s.dot(this)/h;return this.copy(s).multiplyScalar(p)}projectOnPlane(s){return iyt.copy(this).projectOnVector(s),this.sub(iyt)}reflect(s){return this.sub(iyt.copy(s).multiplyScalar(2*this.dot(s)))}angleTo(s){let h=Math.sqrt(this.lengthSq()*s.lengthSq());if(h===0)return Math.PI/2;let p=this.dot(s)/h;return Math.acos(pg(p,-1,1))}distanceTo(s){return Math.sqrt(this.distanceToSquared(s))}distanceToSquared(s){let h=this.x-s.x,p=this.y-s.y,m=this.z-s.z;return h*h+p*p+m*m}manhattanDistanceTo(s){return Math.abs(this.x-s.x)+Math.abs(this.y-s.y)+Math.abs(this.z-s.z)}setFromSpherical(s){return this.setFromSphericalCoords(s.radius,s.phi,s.theta)}setFromSphericalCoords(s,h,p){let m=Math.sin(h)*s;return this.x=m*Math.sin(p),this.y=Math.cos(h)*s,this.z=m*Math.cos(p),this}setFromCylindrical(s){return this.setFromCylindricalCoords(s.radius,s.theta,s.y)}setFromCylindricalCoords(s,h,p){return this.x=s*Math.sin(h),this.y=p,this.z=s*Math.cos(h),this}setFromMatrixPosition(s){let h=s.elements;return this.x=h[12],this.y=h[13],this.z=h[14],this}setFromMatrixScale(s){let h=this.setFromMatrixColumn(s,0).length(),p=this.setFromMatrixColumn(s,1).length(),m=this.setFromMatrixColumn(s,2).length();return this.x=h,this.y=p,this.z=m,this}setFromMatrixColumn(s,h){return this.fromArray(s.elements,h*4)}setFromMatrix3Column(s,h){return this.fromArray(s.elements,h*3)}setFromEuler(s){return this.x=s._x,this.y=s._y,this.z=s._z,this}setFromColor(s){return this.x=s.r,this.y=s.g,this.z=s.b,this}equals(s){return s.x===this.x&&s.y===this.y&&s.z===this.z}fromArray(s,h=0){return this.x=s[h],this.y=s[h+1],this.z=s[h+2],this}toArray(s=[],h=0){return s[h]=this.x,s[h+1]=this.y,s[h+2]=this.z,s}fromBufferAttribute(s,h){return this.x=s.getX(h),this.y=s.getY(h),this.z=s.getZ(h),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let s=(Math.random()-.5)*2,h=Math.random()*Math.PI*2,p=Math.sqrt(1-s**2);return this.x=p*Math.cos(h),this.y=p*Math.sin(h),this.z=s,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},iyt=new Ge,uYt=new My,n3=class{constructor(s=new Ge(1/0,1/0,1/0),h=new Ge(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=s,this.max=h}set(s,h){return this.min.copy(s),this.max.copy(h),this}setFromArray(s){this.makeEmpty();for(let h=0,p=s.length;hthis.max.x||s.ythis.max.y||s.zthis.max.z)}containsBox(s){return this.min.x<=s.min.x&&s.max.x<=this.max.x&&this.min.y<=s.min.y&&s.max.y<=this.max.y&&this.min.z<=s.min.z&&s.max.z<=this.max.z}getParameter(s,h){return h.set((s.x-this.min.x)/(this.max.x-this.min.x),(s.y-this.min.y)/(this.max.y-this.min.y),(s.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(s){return!(s.max.xthis.max.x||s.max.ythis.max.y||s.max.zthis.max.z)}intersectsSphere(s){return this.clampPoint(s.center,$w),$w.distanceToSquared(s.center)<=s.radius*s.radius}intersectsPlane(s){let h,p;return s.normal.x>0?(h=s.normal.x*this.min.x,p=s.normal.x*this.max.x):(h=s.normal.x*this.max.x,p=s.normal.x*this.min.x),s.normal.y>0?(h+=s.normal.y*this.min.y,p+=s.normal.y*this.max.y):(h+=s.normal.y*this.max.y,p+=s.normal.y*this.min.y),s.normal.z>0?(h+=s.normal.z*this.min.z,p+=s.normal.z*this.max.z):(h+=s.normal.z*this.max.z,p+=s.normal.z*this.min.z),h<=-s.constant&&p>=-s.constant}intersectsTriangle(s){if(this.isEmpty())return!1;this.getCenter(pU),Rtt.subVectors(this.max,pU),OI.subVectors(s.a,pU),BI.subVectors(s.b,pU),FI.subVectors(s.c,pU),tS.subVectors(BI,OI),eS.subVectors(FI,BI),zA.subVectors(OI,FI);let h=[0,-tS.z,tS.y,0,-eS.z,eS.y,0,-zA.z,zA.y,tS.z,0,-tS.x,eS.z,0,-eS.x,zA.z,0,-zA.x,-tS.y,tS.x,0,-eS.y,eS.x,0,-zA.y,zA.x,0];return!ryt(h,OI,BI,FI,Rtt)||(h=[1,0,0,0,1,0,0,0,1],!ryt(h,OI,BI,FI,Rtt))?!1:(Dtt.crossVectors(tS,eS),h=[Dtt.x,Dtt.y,Dtt.z],ryt(h,OI,BI,FI,Rtt))}clampPoint(s,h){return h.copy(s).clamp(this.min,this.max)}distanceToPoint(s){return this.clampPoint(s,$w).distanceTo(s)}getBoundingSphere(s){return this.isEmpty()?s.makeEmpty():(this.getCenter(s.center),s.radius=this.getSize($w).length()*.5),s}intersect(s){return this.min.max(s.min),this.max.min(s.max),this.isEmpty()&&this.makeEmpty(),this}union(s){return this.min.min(s.min),this.max.max(s.max),this}applyMatrix4(s){return this.isEmpty()?this:(Vx[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(s),Vx[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(s),Vx[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(s),Vx[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(s),Vx[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(s),Vx[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(s),Vx[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(s),Vx[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(s),this.setFromPoints(Vx),this)}translate(s){return this.min.add(s),this.max.add(s),this}equals(s){return s.min.equals(this.min)&&s.max.equals(this.max)}},Vx=[new Ge,new Ge,new Ge,new Ge,new Ge,new Ge,new Ge,new Ge],$w=new Ge,Itt=new n3,OI=new Ge,BI=new Ge,FI=new Ge,tS=new Ge,eS=new Ge,zA=new Ge,pU=new Ge,Rtt=new Ge,Dtt=new Ge,jA=new Ge;function ryt(d,s,h,p,m){for(let _=0,E=d.length-3;_<=E;_+=3){jA.fromArray(d,_);let y=m.x*Math.abs(jA.x)+m.y*Math.abs(jA.y)+m.z*Math.abs(jA.z),I=s.dot(jA),N=h.dot(jA),B=p.dot(jA);if(Math.max(-Math.max(I,N,B),Math.min(I,N,B))>y)return!1}return!0}var zEe=new n3,gU=new Ge,syt=new Ge,dS=class{constructor(s=new Ge,h=-1){this.isSphere=!0,this.center=s,this.radius=h}set(s,h){return this.center.copy(s),this.radius=h,this}setFromPoints(s,h){let p=this.center;h!==void 0?p.copy(h):zEe.setFromPoints(s).getCenter(p);let m=0;for(let _=0,E=s.length;_this.radius*this.radius&&(h.sub(this.center).normalize(),h.multiplyScalar(this.radius).add(this.center)),h}getBoundingBox(s){return this.isEmpty()?(s.makeEmpty(),s):(s.set(this.center,this.center),s.expandByScalar(this.radius),s)}applyMatrix4(s){return this.center.applyMatrix4(s),this.radius=this.radius*s.getMaxScaleOnAxis(),this}translate(s){return this.center.add(s),this}expandByPoint(s){if(this.isEmpty())return this.center.copy(s),this.radius=0,this;gU.subVectors(s,this.center);let h=gU.lengthSq();if(h>this.radius*this.radius){let p=Math.sqrt(h),m=(p-this.radius)*.5;this.center.addScaledVector(gU,m/p),this.radius+=m}return this}union(s){return s.isEmpty()?this:this.isEmpty()?(this.copy(s),this):(this.center.equals(s.center)===!0?this.radius=Math.max(this.radius,s.radius):(syt.subVectors(s.center,this.center).setLength(s.radius),this.expandByPoint(gU.copy(s.center).add(syt)),this.expandByPoint(gU.copy(s.center).sub(syt))),this)}equals(s){return s.center.equals(this.center)&&s.radius===this.radius}clone(){return new this.constructor().copy(this)}},qx=new Ge,oyt=new Ge,Ntt=new Ge,nS=new Ge,cyt=new Ge,Ott=new Ge,ayt=new Ge,EU=class{constructor(s=new Ge,h=new Ge(0,0,-1)){this.origin=s,this.direction=h}set(s,h){return this.origin.copy(s),this.direction.copy(h),this}copy(s){return this.origin.copy(s.origin),this.direction.copy(s.direction),this}at(s,h){return h.copy(this.origin).addScaledVector(this.direction,s)}lookAt(s){return this.direction.copy(s).sub(this.origin).normalize(),this}recast(s){return this.origin.copy(this.at(s,qx)),this}closestPointToPoint(s,h){h.subVectors(s,this.origin);let p=h.dot(this.direction);return p<0?h.copy(this.origin):h.copy(this.origin).addScaledVector(this.direction,p)}distanceToPoint(s){return Math.sqrt(this.distanceSqToPoint(s))}distanceSqToPoint(s){let h=qx.subVectors(s,this.origin).dot(this.direction);return h<0?this.origin.distanceToSquared(s):(qx.copy(this.origin).addScaledVector(this.direction,h),qx.distanceToSquared(s))}distanceSqToSegment(s,h,p,m){oyt.copy(s).add(h).multiplyScalar(.5),Ntt.copy(h).sub(s).normalize(),nS.copy(this.origin).sub(oyt);let _=s.distanceTo(h)*.5,E=-this.direction.dot(Ntt),y=nS.dot(this.direction),I=-nS.dot(Ntt),N=nS.lengthSq(),B=Math.abs(1-E*E),P,U,j,V;if(B>0)if(P=E*I-y,U=E*y-I,V=_*B,P>=0)if(U>=-V)if(U<=V){let tt=1/B;P*=tt,U*=tt,j=P*(P+E*U+2*y)+U*(E*P+U+2*I)+N}else U=_,P=Math.max(0,-(E*U+y)),j=-P*P+U*(U+2*I)+N;else U=-_,P=Math.max(0,-(E*U+y)),j=-P*P+U*(U+2*I)+N;else U<=-V?(P=Math.max(0,-(-E*_+y)),U=P>0?-_:Math.min(Math.max(-_,-I),_),j=-P*P+U*(U+2*I)+N):U<=V?(P=0,U=Math.min(Math.max(-_,-I),_),j=U*(U+2*I)+N):(P=Math.max(0,-(E*_+y)),U=P>0?_:Math.min(Math.max(-_,-I),_),j=-P*P+U*(U+2*I)+N);else U=E>0?-_:_,P=Math.max(0,-(E*U+y)),j=-P*P+U*(U+2*I)+N;return p&&p.copy(this.origin).addScaledVector(this.direction,P),m&&m.copy(oyt).addScaledVector(Ntt,U),j}intersectSphere(s,h){qx.subVectors(s.center,this.origin);let p=qx.dot(this.direction),m=qx.dot(qx)-p*p,_=s.radius*s.radius;if(m>_)return null;let E=Math.sqrt(_-m),y=p-E,I=p+E;return I<0?null:y<0?this.at(I,h):this.at(y,h)}intersectsSphere(s){return this.distanceSqToPoint(s.center)<=s.radius*s.radius}distanceToPlane(s){let h=s.normal.dot(this.direction);if(h===0)return s.distanceToPoint(this.origin)===0?0:null;let p=-(this.origin.dot(s.normal)+s.constant)/h;return p>=0?p:null}intersectPlane(s,h){let p=this.distanceToPlane(s);return p===null?null:this.at(p,h)}intersectsPlane(s){let h=s.distanceToPoint(this.origin);return h===0||s.normal.dot(this.direction)*h<0}intersectBox(s,h){let p,m,_,E,y,I,N=1/this.direction.x,B=1/this.direction.y,P=1/this.direction.z,U=this.origin;return N>=0?(p=(s.min.x-U.x)*N,m=(s.max.x-U.x)*N):(p=(s.max.x-U.x)*N,m=(s.min.x-U.x)*N),B>=0?(_=(s.min.y-U.y)*B,E=(s.max.y-U.y)*B):(_=(s.max.y-U.y)*B,E=(s.min.y-U.y)*B),p>E||_>m||((_>p||isNaN(p))&&(p=_),(E=0?(y=(s.min.z-U.z)*P,I=(s.max.z-U.z)*P):(y=(s.max.z-U.z)*P,I=(s.min.z-U.z)*P),p>I||y>m)||((y>p||p!==p)&&(p=y),(I=0?p:m,h)}intersectsBox(s){return this.intersectBox(s,qx)!==null}intersectTriangle(s,h,p,m,_){cyt.subVectors(h,s),Ott.subVectors(p,s),ayt.crossVectors(cyt,Ott);let E=this.direction.dot(ayt),y;if(E>0){if(m)return null;y=1}else if(E<0)y=-1,E=-E;else return null;nS.subVectors(this.origin,s);let I=y*this.direction.dot(Ott.crossVectors(nS,Ott));if(I<0)return null;let N=y*this.direction.dot(cyt.cross(nS));if(N<0||I+N>E)return null;let B=-y*nS.dot(ayt);return B<0?null:this.at(B/E,_)}applyMatrix4(s){return this.origin.applyMatrix4(s),this.direction.transformDirection(s),this}equals(s){return s.origin.equals(this.origin)&&s.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},Fu=class d{constructor(s,h,p,m,_,E,y,I,N,B,P,U,j,V,tt,Q){d.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],s!==void 0&&this.set(s,h,p,m,_,E,y,I,N,B,P,U,j,V,tt,Q)}set(s,h,p,m,_,E,y,I,N,B,P,U,j,V,tt,Q){let X=this.elements;return X[0]=s,X[4]=h,X[8]=p,X[12]=m,X[1]=_,X[5]=E,X[9]=y,X[13]=I,X[2]=N,X[6]=B,X[10]=P,X[14]=U,X[3]=j,X[7]=V,X[11]=tt,X[15]=Q,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new d().fromArray(this.elements)}copy(s){let h=this.elements,p=s.elements;return h[0]=p[0],h[1]=p[1],h[2]=p[2],h[3]=p[3],h[4]=p[4],h[5]=p[5],h[6]=p[6],h[7]=p[7],h[8]=p[8],h[9]=p[9],h[10]=p[10],h[11]=p[11],h[12]=p[12],h[13]=p[13],h[14]=p[14],h[15]=p[15],this}copyPosition(s){let h=this.elements,p=s.elements;return h[12]=p[12],h[13]=p[13],h[14]=p[14],this}setFromMatrix3(s){let h=s.elements;return this.set(h[0],h[3],h[6],0,h[1],h[4],h[7],0,h[2],h[5],h[8],0,0,0,0,1),this}extractBasis(s,h,p){return s.setFromMatrixColumn(this,0),h.setFromMatrixColumn(this,1),p.setFromMatrixColumn(this,2),this}makeBasis(s,h,p){return this.set(s.x,h.x,p.x,0,s.y,h.y,p.y,0,s.z,h.z,p.z,0,0,0,0,1),this}extractRotation(s){let h=this.elements,p=s.elements,m=1/UI.setFromMatrixColumn(s,0).length(),_=1/UI.setFromMatrixColumn(s,1).length(),E=1/UI.setFromMatrixColumn(s,2).length();return h[0]=p[0]*m,h[1]=p[1]*m,h[2]=p[2]*m,h[3]=0,h[4]=p[4]*_,h[5]=p[5]*_,h[6]=p[6]*_,h[7]=0,h[8]=p[8]*E,h[9]=p[9]*E,h[10]=p[10]*E,h[11]=0,h[12]=0,h[13]=0,h[14]=0,h[15]=1,this}makeRotationFromEuler(s){let h=this.elements,p=s.x,m=s.y,_=s.z,E=Math.cos(p),y=Math.sin(p),I=Math.cos(m),N=Math.sin(m),B=Math.cos(_),P=Math.sin(_);if(s.order==="XYZ"){let U=E*B,j=E*P,V=y*B,tt=y*P;h[0]=I*B,h[4]=-I*P,h[8]=N,h[1]=j+V*N,h[5]=U-tt*N,h[9]=-y*I,h[2]=tt-U*N,h[6]=V+j*N,h[10]=E*I}else if(s.order==="YXZ"){let U=I*B,j=I*P,V=N*B,tt=N*P;h[0]=U+tt*y,h[4]=V*y-j,h[8]=E*N,h[1]=E*P,h[5]=E*B,h[9]=-y,h[2]=j*y-V,h[6]=tt+U*y,h[10]=E*I}else if(s.order==="ZXY"){let U=I*B,j=I*P,V=N*B,tt=N*P;h[0]=U-tt*y,h[4]=-E*P,h[8]=V+j*y,h[1]=j+V*y,h[5]=E*B,h[9]=tt-U*y,h[2]=-E*N,h[6]=y,h[10]=E*I}else if(s.order==="ZYX"){let U=E*B,j=E*P,V=y*B,tt=y*P;h[0]=I*B,h[4]=V*N-j,h[8]=U*N+tt,h[1]=I*P,h[5]=tt*N+U,h[9]=j*N-V,h[2]=-N,h[6]=y*I,h[10]=E*I}else if(s.order==="YZX"){let U=E*I,j=E*N,V=y*I,tt=y*N;h[0]=I*B,h[4]=tt-U*P,h[8]=V*P+j,h[1]=P,h[5]=E*B,h[9]=-y*B,h[2]=-N*B,h[6]=j*P+V,h[10]=U-tt*P}else if(s.order==="XZY"){let U=E*I,j=E*N,V=y*I,tt=y*N;h[0]=I*B,h[4]=-P,h[8]=N*B,h[1]=U*P+tt,h[5]=E*B,h[9]=j*P-V,h[2]=V*P-j,h[6]=y*B,h[10]=tt*P+U}return h[3]=0,h[7]=0,h[11]=0,h[12]=0,h[13]=0,h[14]=0,h[15]=1,this}makeRotationFromQuaternion(s){return this.compose(jEe,s,HEe)}lookAt(s,h,p){let m=this.elements;return I0.subVectors(s,h),I0.lengthSq()===0&&(I0.z=1),I0.normalize(),iS.crossVectors(p,I0),iS.lengthSq()===0&&(Math.abs(p.z)===1?I0.x+=1e-4:I0.z+=1e-4,I0.normalize(),iS.crossVectors(p,I0)),iS.normalize(),Btt.crossVectors(I0,iS),m[0]=iS.x,m[4]=Btt.x,m[8]=I0.x,m[1]=iS.y,m[5]=Btt.y,m[9]=I0.y,m[2]=iS.z,m[6]=Btt.z,m[10]=I0.z,this}multiply(s){return this.multiplyMatrices(this,s)}premultiply(s){return this.multiplyMatrices(s,this)}multiplyMatrices(s,h){let p=s.elements,m=h.elements,_=this.elements,E=p[0],y=p[4],I=p[8],N=p[12],B=p[1],P=p[5],U=p[9],j=p[13],V=p[2],tt=p[6],Q=p[10],X=p[14],gt=p[3],ft=p[7],xt=p[11],Bt=p[15],Ot=m[0],Pt=m[4],se=m[8],ot=m[12],Lt=m[1],be=m[5],ln=m[9],Fn=m[13],ne=m[2],xe=m[6],re=m[10],hn=m[14],Se=m[3],ke=m[7],mn=m[11],en=m[15];return _[0]=E*Ot+y*Lt+I*ne+N*Se,_[4]=E*Pt+y*be+I*xe+N*ke,_[8]=E*se+y*ln+I*re+N*mn,_[12]=E*ot+y*Fn+I*hn+N*en,_[1]=B*Ot+P*Lt+U*ne+j*Se,_[5]=B*Pt+P*be+U*xe+j*ke,_[9]=B*se+P*ln+U*re+j*mn,_[13]=B*ot+P*Fn+U*hn+j*en,_[2]=V*Ot+tt*Lt+Q*ne+X*Se,_[6]=V*Pt+tt*be+Q*xe+X*ke,_[10]=V*se+tt*ln+Q*re+X*mn,_[14]=V*ot+tt*Fn+Q*hn+X*en,_[3]=gt*Ot+ft*Lt+xt*ne+Bt*Se,_[7]=gt*Pt+ft*be+xt*xe+Bt*ke,_[11]=gt*se+ft*ln+xt*re+Bt*mn,_[15]=gt*ot+ft*Fn+xt*hn+Bt*en,this}multiplyScalar(s){let h=this.elements;return h[0]*=s,h[4]*=s,h[8]*=s,h[12]*=s,h[1]*=s,h[5]*=s,h[9]*=s,h[13]*=s,h[2]*=s,h[6]*=s,h[10]*=s,h[14]*=s,h[3]*=s,h[7]*=s,h[11]*=s,h[15]*=s,this}determinant(){let s=this.elements,h=s[0],p=s[4],m=s[8],_=s[12],E=s[1],y=s[5],I=s[9],N=s[13],B=s[2],P=s[6],U=s[10],j=s[14],V=s[3],tt=s[7],Q=s[11],X=s[15];return V*(+_*I*P-m*N*P-_*y*U+p*N*U+m*y*j-p*I*j)+tt*(+h*I*j-h*N*U+_*E*U-m*E*j+m*N*B-_*I*B)+Q*(+h*N*P-h*y*j-_*E*P+p*E*j+_*y*B-p*N*B)+X*(-m*y*B-h*I*P+h*y*U+m*E*P-p*E*U+p*I*B)}transpose(){let s=this.elements,h;return h=s[1],s[1]=s[4],s[4]=h,h=s[2],s[2]=s[8],s[8]=h,h=s[6],s[6]=s[9],s[9]=h,h=s[3],s[3]=s[12],s[12]=h,h=s[7],s[7]=s[13],s[13]=h,h=s[11],s[11]=s[14],s[14]=h,this}setPosition(s,h,p){let m=this.elements;return s.isVector3?(m[12]=s.x,m[13]=s.y,m[14]=s.z):(m[12]=s,m[13]=h,m[14]=p),this}invert(){let s=this.elements,h=s[0],p=s[1],m=s[2],_=s[3],E=s[4],y=s[5],I=s[6],N=s[7],B=s[8],P=s[9],U=s[10],j=s[11],V=s[12],tt=s[13],Q=s[14],X=s[15],gt=P*Q*N-tt*U*N+tt*I*j-y*Q*j-P*I*X+y*U*X,ft=V*U*N-B*Q*N-V*I*j+E*Q*j+B*I*X-E*U*X,xt=B*tt*N-V*P*N+V*y*j-E*tt*j-B*y*X+E*P*X,Bt=V*P*I-B*tt*I-V*y*U+E*tt*U+B*y*Q-E*P*Q,Ot=h*gt+p*ft+m*xt+_*Bt;if(Ot===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let Pt=1/Ot;return s[0]=gt*Pt,s[1]=(tt*U*_-P*Q*_-tt*m*j+p*Q*j+P*m*X-p*U*X)*Pt,s[2]=(y*Q*_-tt*I*_+tt*m*N-p*Q*N-y*m*X+p*I*X)*Pt,s[3]=(P*I*_-y*U*_-P*m*N+p*U*N+y*m*j-p*I*j)*Pt,s[4]=ft*Pt,s[5]=(B*Q*_-V*U*_+V*m*j-h*Q*j-B*m*X+h*U*X)*Pt,s[6]=(V*I*_-E*Q*_-V*m*N+h*Q*N+E*m*X-h*I*X)*Pt,s[7]=(E*U*_-B*I*_+B*m*N-h*U*N-E*m*j+h*I*j)*Pt,s[8]=xt*Pt,s[9]=(V*P*_-B*tt*_-V*p*j+h*tt*j+B*p*X-h*P*X)*Pt,s[10]=(E*tt*_-V*y*_+V*p*N-h*tt*N-E*p*X+h*y*X)*Pt,s[11]=(B*y*_-E*P*_-B*p*N+h*P*N+E*p*j-h*y*j)*Pt,s[12]=Bt*Pt,s[13]=(B*tt*m-V*P*m+V*p*U-h*tt*U-B*p*Q+h*P*Q)*Pt,s[14]=(V*y*m-E*tt*m-V*p*I+h*tt*I+E*p*Q-h*y*Q)*Pt,s[15]=(E*P*m-B*y*m+B*p*I-h*P*I-E*p*U+h*y*U)*Pt,this}scale(s){let h=this.elements,p=s.x,m=s.y,_=s.z;return h[0]*=p,h[4]*=m,h[8]*=_,h[1]*=p,h[5]*=m,h[9]*=_,h[2]*=p,h[6]*=m,h[10]*=_,h[3]*=p,h[7]*=m,h[11]*=_,this}getMaxScaleOnAxis(){let s=this.elements,h=s[0]*s[0]+s[1]*s[1]+s[2]*s[2],p=s[4]*s[4]+s[5]*s[5]+s[6]*s[6],m=s[8]*s[8]+s[9]*s[9]+s[10]*s[10];return Math.sqrt(Math.max(h,p,m))}makeTranslation(s,h,p){return s.isVector3?this.set(1,0,0,s.x,0,1,0,s.y,0,0,1,s.z,0,0,0,1):this.set(1,0,0,s,0,1,0,h,0,0,1,p,0,0,0,1),this}makeRotationX(s){let h=Math.cos(s),p=Math.sin(s);return this.set(1,0,0,0,0,h,-p,0,0,p,h,0,0,0,0,1),this}makeRotationY(s){let h=Math.cos(s),p=Math.sin(s);return this.set(h,0,p,0,0,1,0,0,-p,0,h,0,0,0,0,1),this}makeRotationZ(s){let h=Math.cos(s),p=Math.sin(s);return this.set(h,-p,0,0,p,h,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(s,h){let p=Math.cos(h),m=Math.sin(h),_=1-p,E=s.x,y=s.y,I=s.z,N=_*E,B=_*y;return this.set(N*E+p,N*y-m*I,N*I+m*y,0,N*y+m*I,B*y+p,B*I-m*E,0,N*I-m*y,B*I+m*E,_*I*I+p,0,0,0,0,1),this}makeScale(s,h,p){return this.set(s,0,0,0,0,h,0,0,0,0,p,0,0,0,0,1),this}makeShear(s,h,p,m,_,E){return this.set(1,p,_,0,s,1,E,0,h,m,1,0,0,0,0,1),this}compose(s,h,p){let m=this.elements,_=h._x,E=h._y,y=h._z,I=h._w,N=_+_,B=E+E,P=y+y,U=_*N,j=_*B,V=_*P,tt=E*B,Q=E*P,X=y*P,gt=I*N,ft=I*B,xt=I*P,Bt=p.x,Ot=p.y,Pt=p.z;return m[0]=(1-(tt+X))*Bt,m[1]=(j+xt)*Bt,m[2]=(V-ft)*Bt,m[3]=0,m[4]=(j-xt)*Ot,m[5]=(1-(U+X))*Ot,m[6]=(Q+gt)*Ot,m[7]=0,m[8]=(V+ft)*Pt,m[9]=(Q-gt)*Pt,m[10]=(1-(U+tt))*Pt,m[11]=0,m[12]=s.x,m[13]=s.y,m[14]=s.z,m[15]=1,this}decompose(s,h,p){let m=this.elements,_=UI.set(m[0],m[1],m[2]).length(),E=UI.set(m[4],m[5],m[6]).length(),y=UI.set(m[8],m[9],m[10]).length();this.determinant()<0&&(_=-_),s.x=m[12],s.y=m[13],s.z=m[14],Vw.copy(this);let N=1/_,B=1/E,P=1/y;return Vw.elements[0]*=N,Vw.elements[1]*=N,Vw.elements[2]*=N,Vw.elements[4]*=B,Vw.elements[5]*=B,Vw.elements[6]*=B,Vw.elements[8]*=P,Vw.elements[9]*=P,Vw.elements[10]*=P,h.setFromRotationMatrix(Vw),p.x=_,p.y=E,p.z=y,this}makePerspective(s,h,p,m,_,E,y=Qx){let I=this.elements,N=2*_/(h-s),B=2*_/(p-m),P=(h+s)/(h-s),U=(p+m)/(p-m),j,V;if(y===Qx)j=-(E+_)/(E-_),V=-2*E*_/(E-_);else if(y===det)j=-E/(E-_),V=-E*_/(E-_);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+y);return I[0]=N,I[4]=0,I[8]=P,I[12]=0,I[1]=0,I[5]=B,I[9]=U,I[13]=0,I[2]=0,I[6]=0,I[10]=j,I[14]=V,I[3]=0,I[7]=0,I[11]=-1,I[15]=0,this}makeOrthographic(s,h,p,m,_,E,y=Qx){let I=this.elements,N=1/(h-s),B=1/(p-m),P=1/(E-_),U=(h+s)*N,j=(p+m)*B,V,tt;if(y===Qx)V=(E+_)*P,tt=-2*P;else if(y===det)V=_*P,tt=-1*P;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+y);return I[0]=2*N,I[4]=0,I[8]=0,I[12]=-U,I[1]=0,I[5]=2*B,I[9]=0,I[13]=-j,I[2]=0,I[6]=0,I[10]=tt,I[14]=-V,I[3]=0,I[7]=0,I[11]=0,I[15]=1,this}equals(s){let h=this.elements,p=s.elements;for(let m=0;m<16;m++)if(h[m]!==p[m])return!1;return!0}fromArray(s,h=0){for(let p=0;p<16;p++)this.elements[p]=s[p+h];return this}toArray(s=[],h=0){let p=this.elements;return s[h]=p[0],s[h+1]=p[1],s[h+2]=p[2],s[h+3]=p[3],s[h+4]=p[4],s[h+5]=p[5],s[h+6]=p[6],s[h+7]=p[7],s[h+8]=p[8],s[h+9]=p[9],s[h+10]=p[10],s[h+11]=p[11],s[h+12]=p[12],s[h+13]=p[13],s[h+14]=p[14],s[h+15]=p[15],s}},UI=new Ge,Vw=new Fu,jEe=new Ge(0,0,0),HEe=new Ge(1,1,1),iS=new Ge,Btt=new Ge,I0=new Ge,lYt=new Fu,hYt=new My,wet=class d{constructor(s=0,h=0,p=0,m=d.DEFAULT_ORDER){this.isEuler=!0,this._x=s,this._y=h,this._z=p,this._order=m}get x(){return this._x}set x(s){this._x=s,this._onChangeCallback()}get y(){return this._y}set y(s){this._y=s,this._onChangeCallback()}get z(){return this._z}set z(s){this._z=s,this._onChangeCallback()}get order(){return this._order}set order(s){this._order=s,this._onChangeCallback()}set(s,h,p,m=this._order){return this._x=s,this._y=h,this._z=p,this._order=m,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(s){return this._x=s._x,this._y=s._y,this._z=s._z,this._order=s._order,this._onChangeCallback(),this}setFromRotationMatrix(s,h=this._order,p=!0){let m=s.elements,_=m[0],E=m[4],y=m[8],I=m[1],N=m[5],B=m[9],P=m[2],U=m[6],j=m[10];switch(h){case"XYZ":this._y=Math.asin(pg(y,-1,1)),Math.abs(y)<.9999999?(this._x=Math.atan2(-B,j),this._z=Math.atan2(-E,_)):(this._x=Math.atan2(U,N),this._z=0);break;case"YXZ":this._x=Math.asin(-pg(B,-1,1)),Math.abs(B)<.9999999?(this._y=Math.atan2(y,j),this._z=Math.atan2(I,N)):(this._y=Math.atan2(-P,_),this._z=0);break;case"ZXY":this._x=Math.asin(pg(U,-1,1)),Math.abs(U)<.9999999?(this._y=Math.atan2(-P,j),this._z=Math.atan2(-E,N)):(this._y=0,this._z=Math.atan2(I,_));break;case"ZYX":this._y=Math.asin(-pg(P,-1,1)),Math.abs(P)<.9999999?(this._x=Math.atan2(U,j),this._z=Math.atan2(I,_)):(this._x=0,this._z=Math.atan2(-E,N));break;case"YZX":this._z=Math.asin(pg(I,-1,1)),Math.abs(I)<.9999999?(this._x=Math.atan2(-B,N),this._y=Math.atan2(-P,_)):(this._x=0,this._y=Math.atan2(y,j));break;case"XZY":this._z=Math.asin(-pg(E,-1,1)),Math.abs(E)<.9999999?(this._x=Math.atan2(U,N),this._y=Math.atan2(y,_)):(this._x=Math.atan2(-B,j),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+h)}return this._order=h,p===!0&&this._onChangeCallback(),this}setFromQuaternion(s,h,p){return lYt.makeRotationFromQuaternion(s),this.setFromRotationMatrix(lYt,h,p)}setFromVector3(s,h=this._order){return this.set(s.x,s.y,s.z,h)}reorder(s){return hYt.setFromEuler(this),this.setFromQuaternion(hYt,s)}equals(s){return s._x===this._x&&s._y===this._y&&s._z===this._z&&s._order===this._order}fromArray(s){return this._x=s[0],this._y=s[1],this._z=s[2],s[3]!==void 0&&(this._order=s[3]),this._onChangeCallback(),this}toArray(s=[],h=0){return s[h]=this._x,s[h+1]=this._y,s[h+2]=this._z,s[h+3]=this._order,s}_onChange(s){return this._onChangeCallback=s,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};wet.DEFAULT_ORDER="XYZ";var SU=class{constructor(){this.mask=1}set(s){this.mask=(1<>>0}enable(s){this.mask|=1<1){for(let h=0;h1){for(let p=0;p0&&(m.userData=this.userData),m.layers=this.layers.mask,m.matrix=this.matrix.toArray(),m.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(m.matrixAutoUpdate=!1),this.isInstancedMesh&&(m.type="InstancedMesh",m.count=this.count,m.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(m.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(m.type="BatchedMesh",m.perObjectFrustumCulled=this.perObjectFrustumCulled,m.sortObjects=this.sortObjects,m.drawRanges=this._drawRanges,m.reservedRanges=this._reservedRanges,m.visibility=this._visibility,m.active=this._active,m.bounds=this._bounds.map(y=>({boxInitialized:y.boxInitialized,boxMin:y.box.min.toArray(),boxMax:y.box.max.toArray(),sphereInitialized:y.sphereInitialized,sphereRadius:y.sphere.radius,sphereCenter:y.sphere.center.toArray()})),m.maxGeometryCount=this._maxGeometryCount,m.maxVertexCount=this._maxVertexCount,m.maxIndexCount=this._maxIndexCount,m.geometryInitialized=this._geometryInitialized,m.geometryCount=this._geometryCount,m.matricesTexture=this._matricesTexture.toJSON(s),this.boundingSphere!==null&&(m.boundingSphere={center:m.boundingSphere.center.toArray(),radius:m.boundingSphere.radius}),this.boundingBox!==null&&(m.boundingBox={min:m.boundingBox.min.toArray(),max:m.boundingBox.max.toArray()}));function _(y,I){return y[I.uuid]===void 0&&(y[I.uuid]=I.toJSON(s)),I.uuid}if(this.isScene)this.background&&(this.background.isColor?m.background=this.background.toJSON():this.background.isTexture&&(m.background=this.background.toJSON(s).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(m.environment=this.environment.toJSON(s).uuid);else if(this.isMesh||this.isLine||this.isPoints){m.geometry=_(s.geometries,this.geometry);let y=this.geometry.parameters;if(y!==void 0&&y.shapes!==void 0){let I=y.shapes;if(Array.isArray(I))for(let N=0,B=I.length;N0){m.children=[];for(let y=0;y0){m.animations=[];for(let y=0;y0&&(p.geometries=y),I.length>0&&(p.materials=I),N.length>0&&(p.textures=N),B.length>0&&(p.images=B),P.length>0&&(p.shapes=P),U.length>0&&(p.skeletons=U),j.length>0&&(p.animations=j),V.length>0&&(p.nodes=V)}return p.object=m,p;function E(y){let I=[];for(let N in y){let B=y[N];delete B.metadata,I.push(B)}return I}}clone(s){return new this.constructor().copy(this,s)}copy(s,h=!0){if(this.name=s.name,this.up.copy(s.up),this.position.copy(s.position),this.rotation.order=s.rotation.order,this.quaternion.copy(s.quaternion),this.scale.copy(s.scale),this.matrix.copy(s.matrix),this.matrixWorld.copy(s.matrixWorld),this.matrixAutoUpdate=s.matrixAutoUpdate,this.matrixWorldAutoUpdate=s.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=s.matrixWorldNeedsUpdate,this.layers.mask=s.layers.mask,this.visible=s.visible,this.castShadow=s.castShadow,this.receiveShadow=s.receiveShadow,this.frustumCulled=s.frustumCulled,this.renderOrder=s.renderOrder,this.animations=s.animations.slice(),this.userData=JSON.parse(JSON.stringify(s.userData)),h===!0)for(let p=0;p0?m.multiplyScalar(1/Math.sqrt(_)):m.set(0,0,0)}static getBarycoord(s,h,p,m,_){qw.subVectors(m,h),Zx.subVectors(p,h),uyt.subVectors(s,h);let E=qw.dot(qw),y=qw.dot(Zx),I=qw.dot(uyt),N=Zx.dot(Zx),B=Zx.dot(uyt),P=E*N-y*y;if(P===0)return _.set(0,0,0),null;let U=1/P,j=(N*I-y*B)*U,V=(E*B-y*I)*U;return _.set(1-j-V,V,j)}static containsPoint(s,h,p,m){return this.getBarycoord(s,h,p,m,Yx)===null?!1:Yx.x>=0&&Yx.y>=0&&Yx.x+Yx.y<=1}static getUV(s,h,p,m,_,E,y,I){return Utt===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Utt=!0),this.getInterpolation(s,h,p,m,_,E,y,I)}static getInterpolation(s,h,p,m,_,E,y,I){return this.getBarycoord(s,h,p,m,Yx)===null?(I.x=0,I.y=0,"z"in I&&(I.z=0),"w"in I&&(I.w=0),null):(I.setScalar(0),I.addScaledVector(_,Yx.x),I.addScaledVector(E,Yx.y),I.addScaledVector(y,Yx.z),I)}static isFrontFacing(s,h,p,m){return qw.subVectors(p,h),Zx.subVectors(s,h),qw.cross(Zx).dot(m)<0}set(s,h,p){return this.a.copy(s),this.b.copy(h),this.c.copy(p),this}setFromPointsAndIndices(s,h,p,m){return this.a.copy(s[h]),this.b.copy(s[p]),this.c.copy(s[m]),this}setFromAttributeAndIndices(s,h,p,m){return this.a.fromBufferAttribute(s,h),this.b.fromBufferAttribute(s,p),this.c.fromBufferAttribute(s,m),this}clone(){return new this.constructor().copy(this)}copy(s){return this.a.copy(s.a),this.b.copy(s.b),this.c.copy(s.c),this}getArea(){return qw.subVectors(this.c,this.b),Zx.subVectors(this.a,this.b),qw.cross(Zx).length()*.5}getMidpoint(s){return s.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(s){return d.getNormal(this.a,this.b,this.c,s)}getPlane(s){return s.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(s,h){return d.getBarycoord(s,this.a,this.b,this.c,h)}getUV(s,h,p,m,_){return Utt===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Utt=!0),d.getInterpolation(s,this.a,this.b,this.c,h,p,m,_)}getInterpolation(s,h,p,m,_){return d.getInterpolation(s,this.a,this.b,this.c,h,p,m,_)}containsPoint(s){return d.containsPoint(s,this.a,this.b,this.c)}isFrontFacing(s){return d.isFrontFacing(this.a,this.b,this.c,s)}intersectsBox(s){return s.intersectsTriangle(this)}closestPointToPoint(s,h){let p=this.a,m=this.b,_=this.c,E,y;jI.subVectors(m,p),HI.subVectors(_,p),lyt.subVectors(s,p);let I=jI.dot(lyt),N=HI.dot(lyt);if(I<=0&&N<=0)return h.copy(p);hyt.subVectors(s,m);let B=jI.dot(hyt),P=HI.dot(hyt);if(B>=0&&P<=B)return h.copy(m);let U=I*P-B*N;if(U<=0&&I>=0&&B<=0)return E=I/(I-B),h.copy(p).addScaledVector(jI,E);fyt.subVectors(s,_);let j=jI.dot(fyt),V=HI.dot(fyt);if(V>=0&&j<=V)return h.copy(_);let tt=j*N-I*V;if(tt<=0&&N>=0&&V<=0)return y=N/(N-V),h.copy(p).addScaledVector(HI,y);let Q=B*V-j*P;if(Q<=0&&P-B>=0&&j-V>=0)return mYt.subVectors(_,m),y=(P-B)/(P-B+(j-V)),h.copy(m).addScaledVector(mYt,y);let X=1/(Q+tt+U);return E=tt*X,y=U*X,h.copy(p).addScaledVector(jI,E).addScaledVector(HI,y)}equals(s){return s.a.equals(this.a)&&s.b.equals(this.b)&&s.c.equals(this.c)}},fKt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},rS={h:0,s:0,l:0},ztt={h:0,s:0,l:0};function dyt(d,s,h){return h<0&&(h+=1),h>1&&(h-=1),h<1/6?d+(s-d)*6*h:h<1/2?s:h<2/3?d+(s-d)*6*(2/3-h):d}var Go=class{constructor(s,h,p){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(s,h,p)}set(s,h,p){if(h===void 0&&p===void 0){let m=s;m&&m.isColor?this.copy(m):typeof m=="number"?this.setHex(m):typeof m=="string"&&this.setStyle(m)}else this.setRGB(s,h,p);return this}setScalar(s){return this.r=s,this.g=s,this.b=s,this}setHex(s,h=Pd){return s=Math.floor(s),this.r=(s>>16&255)/255,this.g=(s>>8&255)/255,this.b=(s&255)/255,Na.toWorkingColorSpace(this,h),this}setRGB(s,h,p,m=Na.workingColorSpace){return this.r=s,this.g=h,this.b=p,Na.toWorkingColorSpace(this,m),this}setHSL(s,h,p,m=Na.workingColorSpace){if(s=NEe(s,1),h=pg(h,0,1),p=pg(p,0,1),h===0)this.r=this.g=this.b=p;else{let _=p<=.5?p*(1+h):p+h-p*h,E=2*p-_;this.r=dyt(E,_,s+1/3),this.g=dyt(E,_,s),this.b=dyt(E,_,s-1/3)}return Na.toWorkingColorSpace(this,m),this}setStyle(s,h=Pd){function p(_){_!==void 0&&parseFloat(_)<1&&console.warn("THREE.Color: Alpha component of "+s+" will be ignored.")}let m;if(m=/^(\w+)\(([^\)]*)\)/.exec(s)){let _,E=m[1],y=m[2];switch(E){case"rgb":case"rgba":if(_=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(y))return p(_[4]),this.setRGB(Math.min(255,parseInt(_[1],10))/255,Math.min(255,parseInt(_[2],10))/255,Math.min(255,parseInt(_[3],10))/255,h);if(_=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(y))return p(_[4]),this.setRGB(Math.min(100,parseInt(_[1],10))/100,Math.min(100,parseInt(_[2],10))/100,Math.min(100,parseInt(_[3],10))/100,h);break;case"hsl":case"hsla":if(_=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(y))return p(_[4]),this.setHSL(parseFloat(_[1])/360,parseFloat(_[2])/100,parseFloat(_[3])/100,h);break;default:console.warn("THREE.Color: Unknown color model "+s)}}else if(m=/^\#([A-Fa-f\d]+)$/.exec(s)){let _=m[1],E=_.length;if(E===3)return this.setRGB(parseInt(_.charAt(0),16)/15,parseInt(_.charAt(1),16)/15,parseInt(_.charAt(2),16)/15,h);if(E===6)return this.setHex(parseInt(_,16),h);console.warn("THREE.Color: Invalid hex color "+s)}else if(s&&s.length>0)return this.setColorName(s,h);return this}setColorName(s,h=Pd){let p=fKt[s.toLowerCase()];return p!==void 0?this.setHex(p,h):console.warn("THREE.Color: Unknown color "+s),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(s){return this.r=s.r,this.g=s.g,this.b=s.b,this}copySRGBToLinear(s){return this.r=tR(s.r),this.g=tR(s.g),this.b=tR(s.b),this}copyLinearToSRGB(s){return this.r=eyt(s.r),this.g=eyt(s.g),this.b=eyt(s.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(s=Pd){return Na.fromWorkingColorSpace(mp.copy(this),s),Math.round(pg(mp.r*255,0,255))*65536+Math.round(pg(mp.g*255,0,255))*256+Math.round(pg(mp.b*255,0,255))}getHexString(s=Pd){return("000000"+this.getHex(s).toString(16)).slice(-6)}getHSL(s,h=Na.workingColorSpace){Na.fromWorkingColorSpace(mp.copy(this),h);let p=mp.r,m=mp.g,_=mp.b,E=Math.max(p,m,_),y=Math.min(p,m,_),I,N,B=(y+E)/2;if(y===E)I=0,N=0;else{let P=E-y;switch(N=B<=.5?P/(E+y):P/(2-E-y),E){case p:I=(m-_)/P+(m<_?6:0);break;case m:I=(_-p)/P+2;break;case _:I=(p-m)/P+4;break}I/=6}return s.h=I,s.s=N,s.l=B,s}getRGB(s,h=Na.workingColorSpace){return Na.fromWorkingColorSpace(mp.copy(this),h),s.r=mp.r,s.g=mp.g,s.b=mp.b,s}getStyle(s=Pd){Na.fromWorkingColorSpace(mp.copy(this),s);let h=mp.r,p=mp.g,m=mp.b;return s!==Pd?`color(${s} ${h.toFixed(3)} ${p.toFixed(3)} ${m.toFixed(3)})`:`rgb(${Math.round(h*255)},${Math.round(p*255)},${Math.round(m*255)})`}offsetHSL(s,h,p){return this.getHSL(rS),this.setHSL(rS.h+s,rS.s+h,rS.l+p)}add(s){return this.r+=s.r,this.g+=s.g,this.b+=s.b,this}addColors(s,h){return this.r=s.r+h.r,this.g=s.g+h.g,this.b=s.b+h.b,this}addScalar(s){return this.r+=s,this.g+=s,this.b+=s,this}sub(s){return this.r=Math.max(0,this.r-s.r),this.g=Math.max(0,this.g-s.g),this.b=Math.max(0,this.b-s.b),this}multiply(s){return this.r*=s.r,this.g*=s.g,this.b*=s.b,this}multiplyScalar(s){return this.r*=s,this.g*=s,this.b*=s,this}lerp(s,h){return this.r+=(s.r-this.r)*h,this.g+=(s.g-this.g)*h,this.b+=(s.b-this.b)*h,this}lerpColors(s,h,p){return this.r=s.r+(h.r-s.r)*p,this.g=s.g+(h.g-s.g)*p,this.b=s.b+(h.b-s.b)*p,this}lerpHSL(s,h){this.getHSL(rS),s.getHSL(ztt);let p=Q_t(rS.h,ztt.h,h),m=Q_t(rS.s,ztt.s,h),_=Q_t(rS.l,ztt.l,h);return this.setHSL(p,m,_),this}setFromVector3(s){return this.r=s.x,this.g=s.y,this.b=s.z,this}applyMatrix3(s){let h=this.r,p=this.g,m=this.b,_=s.elements;return this.r=_[0]*h+_[3]*p+_[6]*m,this.g=_[1]*h+_[4]*p+_[7]*m,this.b=_[2]*h+_[5]*p+_[8]*m,this}equals(s){return s.r===this.r&&s.g===this.g&&s.b===this.b}fromArray(s,h=0){return this.r=s[h],this.g=s[h+1],this.b=s[h+2],this}toArray(s=[],h=0){return s[h]=this.r,s[h+1]=this.g,s[h+2]=this.b,s}fromBufferAttribute(s,h){return this.r=s.getX(h),this.g=s.getY(h),this.b=s.getZ(h),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},mp=new Go;Go.NAMES=fKt;var XEe=0,pS=class extends fS{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:XEe++}),this.uuid=LU(),this.name="",this.type="Material",this.blending=QI,this.side=hS,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Syt,this.blendDst=Tyt,this.blendEquation=$A,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Go(0,0,0),this.blendAlpha=0,this.depthFunc=oet,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=nYt,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=DI,this.stencilZFail=DI,this.stencilZPass=DI,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(s){this._alphaTest>0!=s>0&&this.version++,this._alphaTest=s}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(s){if(s!==void 0)for(let h in s){let p=s[h];if(p===void 0){console.warn(`THREE.Material: parameter '${h}' has value of undefined.`);continue}let m=this[h];if(m===void 0){console.warn(`THREE.Material: '${h}' is not a property of THREE.${this.type}.`);continue}m&&m.isColor?m.set(p):m&&m.isVector3&&p&&p.isVector3?m.copy(p):this[h]=p}}toJSON(s){let h=s===void 0||typeof s=="string";h&&(s={textures:{},images:{}});let p={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};p.uuid=this.uuid,p.type=this.type,this.name!==""&&(p.name=this.name),this.color&&this.color.isColor&&(p.color=this.color.getHex()),this.roughness!==void 0&&(p.roughness=this.roughness),this.metalness!==void 0&&(p.metalness=this.metalness),this.sheen!==void 0&&(p.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(p.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(p.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(p.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(p.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(p.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(p.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(p.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(p.shininess=this.shininess),this.clearcoat!==void 0&&(p.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(p.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(p.clearcoatMap=this.clearcoatMap.toJSON(s).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(p.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(s).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(p.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(s).uuid,p.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(p.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(p.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(p.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(p.iridescenceMap=this.iridescenceMap.toJSON(s).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(p.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(s).uuid),this.anisotropy!==void 0&&(p.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(p.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(p.anisotropyMap=this.anisotropyMap.toJSON(s).uuid),this.map&&this.map.isTexture&&(p.map=this.map.toJSON(s).uuid),this.matcap&&this.matcap.isTexture&&(p.matcap=this.matcap.toJSON(s).uuid),this.alphaMap&&this.alphaMap.isTexture&&(p.alphaMap=this.alphaMap.toJSON(s).uuid),this.lightMap&&this.lightMap.isTexture&&(p.lightMap=this.lightMap.toJSON(s).uuid,p.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(p.aoMap=this.aoMap.toJSON(s).uuid,p.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(p.bumpMap=this.bumpMap.toJSON(s).uuid,p.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(p.normalMap=this.normalMap.toJSON(s).uuid,p.normalMapType=this.normalMapType,p.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(p.displacementMap=this.displacementMap.toJSON(s).uuid,p.displacementScale=this.displacementScale,p.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(p.roughnessMap=this.roughnessMap.toJSON(s).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(p.metalnessMap=this.metalnessMap.toJSON(s).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(p.emissiveMap=this.emissiveMap.toJSON(s).uuid),this.specularMap&&this.specularMap.isTexture&&(p.specularMap=this.specularMap.toJSON(s).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(p.specularIntensityMap=this.specularIntensityMap.toJSON(s).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(p.specularColorMap=this.specularColorMap.toJSON(s).uuid),this.envMap&&this.envMap.isTexture&&(p.envMap=this.envMap.toJSON(s).uuid,this.combine!==void 0&&(p.combine=this.combine)),this.envMapIntensity!==void 0&&(p.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(p.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(p.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(p.gradientMap=this.gradientMap.toJSON(s).uuid),this.transmission!==void 0&&(p.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(p.transmissionMap=this.transmissionMap.toJSON(s).uuid),this.thickness!==void 0&&(p.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(p.thicknessMap=this.thicknessMap.toJSON(s).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(p.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(p.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(p.size=this.size),this.shadowSide!==null&&(p.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(p.sizeAttenuation=this.sizeAttenuation),this.blending!==QI&&(p.blending=this.blending),this.side!==hS&&(p.side=this.side),this.vertexColors===!0&&(p.vertexColors=!0),this.opacity<1&&(p.opacity=this.opacity),this.transparent===!0&&(p.transparent=!0),this.blendSrc!==Syt&&(p.blendSrc=this.blendSrc),this.blendDst!==Tyt&&(p.blendDst=this.blendDst),this.blendEquation!==$A&&(p.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(p.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(p.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(p.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(p.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(p.blendAlpha=this.blendAlpha),this.depthFunc!==oet&&(p.depthFunc=this.depthFunc),this.depthTest===!1&&(p.depthTest=this.depthTest),this.depthWrite===!1&&(p.depthWrite=this.depthWrite),this.colorWrite===!1&&(p.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(p.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==nYt&&(p.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(p.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(p.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==DI&&(p.stencilFail=this.stencilFail),this.stencilZFail!==DI&&(p.stencilZFail=this.stencilZFail),this.stencilZPass!==DI&&(p.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(p.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(p.rotation=this.rotation),this.polygonOffset===!0&&(p.polygonOffset=!0),this.polygonOffsetFactor!==0&&(p.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(p.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(p.linewidth=this.linewidth),this.dashSize!==void 0&&(p.dashSize=this.dashSize),this.gapSize!==void 0&&(p.gapSize=this.gapSize),this.scale!==void 0&&(p.scale=this.scale),this.dithering===!0&&(p.dithering=!0),this.alphaTest>0&&(p.alphaTest=this.alphaTest),this.alphaHash===!0&&(p.alphaHash=!0),this.alphaToCoverage===!0&&(p.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(p.premultipliedAlpha=!0),this.forceSinglePass===!0&&(p.forceSinglePass=!0),this.wireframe===!0&&(p.wireframe=!0),this.wireframeLinewidth>1&&(p.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(p.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(p.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(p.flatShading=!0),this.visible===!1&&(p.visible=!1),this.toneMapped===!1&&(p.toneMapped=!1),this.fog===!1&&(p.fog=!1),Object.keys(this.userData).length>0&&(p.userData=this.userData);function m(_){let E=[];for(let y in _){let I=_[y];delete I.metadata,E.push(I)}return E}if(h){let _=m(s.textures),E=m(s.images);_.length>0&&(p.textures=_),E.length>0&&(p.images=E)}return p}clone(){return new this.constructor().copy(this)}copy(s){this.name=s.name,this.blending=s.blending,this.side=s.side,this.vertexColors=s.vertexColors,this.opacity=s.opacity,this.transparent=s.transparent,this.blendSrc=s.blendSrc,this.blendDst=s.blendDst,this.blendEquation=s.blendEquation,this.blendSrcAlpha=s.blendSrcAlpha,this.blendDstAlpha=s.blendDstAlpha,this.blendEquationAlpha=s.blendEquationAlpha,this.blendColor.copy(s.blendColor),this.blendAlpha=s.blendAlpha,this.depthFunc=s.depthFunc,this.depthTest=s.depthTest,this.depthWrite=s.depthWrite,this.stencilWriteMask=s.stencilWriteMask,this.stencilFunc=s.stencilFunc,this.stencilRef=s.stencilRef,this.stencilFuncMask=s.stencilFuncMask,this.stencilFail=s.stencilFail,this.stencilZFail=s.stencilZFail,this.stencilZPass=s.stencilZPass,this.stencilWrite=s.stencilWrite;let h=s.clippingPlanes,p=null;if(h!==null){let m=h.length;p=new Array(m);for(let _=0;_!==m;++_)p[_]=h[_].clone()}return this.clippingPlanes=p,this.clipIntersection=s.clipIntersection,this.clipShadows=s.clipShadows,this.shadowSide=s.shadowSide,this.colorWrite=s.colorWrite,this.precision=s.precision,this.polygonOffset=s.polygonOffset,this.polygonOffsetFactor=s.polygonOffsetFactor,this.polygonOffsetUnits=s.polygonOffsetUnits,this.dithering=s.dithering,this.alphaTest=s.alphaTest,this.alphaHash=s.alphaHash,this.alphaToCoverage=s.alphaToCoverage,this.premultipliedAlpha=s.premultipliedAlpha,this.forceSinglePass=s.forceSinglePass,this.visible=s.visible,this.toneMapped=s.toneMapped,this.userData=JSON.parse(JSON.stringify(s.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(s){s===!0&&this.version++}},sR=class extends pS{constructor(s){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Go(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=h2t,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(s)}copy(s){return super.copy(s),this.color.copy(s.color),this.map=s.map,this.lightMap=s.lightMap,this.lightMapIntensity=s.lightMapIntensity,this.aoMap=s.aoMap,this.aoMapIntensity=s.aoMapIntensity,this.specularMap=s.specularMap,this.alphaMap=s.alphaMap,this.envMap=s.envMap,this.combine=s.combine,this.reflectivity=s.reflectivity,this.refractionRatio=s.refractionRatio,this.wireframe=s.wireframe,this.wireframeLinewidth=s.wireframeLinewidth,this.wireframeLinecap=s.wireframeLinecap,this.wireframeLinejoin=s.wireframeLinejoin,this.fog=s.fog,this}};var Uh=new Ge,jtt=new Nc,D0=class{constructor(s,h,p=!1){if(Array.isArray(s))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=s,this.itemSize=h,this.count=s!==void 0?s.length/h:0,this.normalized=p,this.usage=iYt,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=oS,this.version=0}onUploadCallback(){}set needsUpdate(s){s===!0&&this.version++}get updateRange(){return console.warn("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(s){return this.usage=s,this}addUpdateRange(s,h){this.updateRanges.push({start:s,count:h})}clearUpdateRanges(){this.updateRanges.length=0}copy(s){return this.name=s.name,this.array=new s.array.constructor(s.array),this.itemSize=s.itemSize,this.count=s.count,this.normalized=s.normalized,this.usage=s.usage,this.gpuType=s.gpuType,this}copyAt(s,h,p){s*=this.itemSize,p*=h.itemSize;for(let m=0,_=this.itemSize;m<_;m++)this.array[s+m]=h.array[p+m];return this}copyArray(s){return this.array.set(s),this}applyMatrix3(s){if(this.itemSize===2)for(let h=0,p=this.count;h0&&(s.userData=this.userData),this.parameters!==void 0){let I=this.parameters;for(let N in I)I[N]!==void 0&&(s[N]=I[N]);return s}s.data={attributes:{}};let h=this.index;h!==null&&(s.data.index={type:h.array.constructor.name,array:Array.prototype.slice.call(h.array)});let p=this.attributes;for(let I in p){let N=p[I];s.data.attributes[I]=N.toJSON(s.data)}let m={},_=!1;for(let I in this.morphAttributes){let N=this.morphAttributes[I],B=[];for(let P=0,U=N.length;P0&&(m[I]=B,_=!0)}_&&(s.data.morphAttributes=m,s.data.morphTargetsRelative=this.morphTargetsRelative);let E=this.groups;E.length>0&&(s.data.groups=JSON.parse(JSON.stringify(E)));let y=this.boundingSphere;return y!==null&&(s.data.boundingSphere={center:y.center.toArray(),radius:y.radius}),s}clone(){return new this.constructor().copy(this)}copy(s){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let h={};this.name=s.name;let p=s.index;p!==null&&this.setIndex(p.clone(h));let m=s.attributes;for(let N in m){let B=m[N];this.setAttribute(N,B.clone(h))}let _=s.morphAttributes;for(let N in _){let B=[],P=_[N];for(let U=0,j=P.length;U0){let m=h[p[0]];if(m!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let _=0,E=m.length;_(s.far-s.near)**2))&&(bYt.copy(_).invert(),HA.copy(s.ray).applyMatrix4(bYt),!(p.boundingBox!==null&&HA.intersectsBox(p.boundingBox)===!1)&&this._computeIntersections(s,h,HA)))}_computeIntersections(s,h,p){let m,_=this.geometry,E=this.material,y=_.index,I=_.attributes.position,N=_.attributes.uv,B=_.attributes.uv1,P=_.attributes.normal,U=_.groups,j=_.drawRange;if(y!==null)if(Array.isArray(E))for(let V=0,tt=U.length;Vh.far?null:{distance:N,point:Xtt.clone(),object:d}}function Ztt(d,s,h,p,m,_,E,y,I,N){d.getVertexPosition(y,WI),d.getVertexPosition(I,$I),d.getVertexPosition(N,VI);let B=YEe(d,s,h,p,WI,$I,VI,qtt);if(B){m&&(Wtt.fromBufferAttribute(m,y),$tt.fromBufferAttribute(m,I),Vtt.fromBufferAttribute(m,N),B.uv=qA.getInterpolation(qtt,WI,$I,VI,Wtt,$tt,Vtt,new Nc)),_&&(Wtt.fromBufferAttribute(_,y),$tt.fromBufferAttribute(_,I),Vtt.fromBufferAttribute(_,N),B.uv1=qA.getInterpolation(qtt,WI,$I,VI,Wtt,$tt,Vtt,new Nc),B.uv2=B.uv1),E&&(vYt.fromBufferAttribute(E,y),_Yt.fromBufferAttribute(E,I),yYt.fromBufferAttribute(E,N),B.normal=qA.getInterpolation(qtt,WI,$I,VI,vYt,_Yt,yYt,new Ge),B.normal.dot(p.direction)>0&&B.normal.multiplyScalar(-1));let P={a:y,b:I,c:N,normal:new Ge,materialIndex:0};qA.getNormal(WI,$I,VI,P.normal),B.face=P}return B}var KA=class d extends Ey{constructor(s=1,h=1,p=1,m=1,_=1,E=1){super(),this.type="BoxGeometry",this.parameters={width:s,height:h,depth:p,widthSegments:m,heightSegments:_,depthSegments:E};let y=this;m=Math.floor(m),_=Math.floor(_),E=Math.floor(E);let I=[],N=[],B=[],P=[],U=0,j=0;V("z","y","x",-1,-1,p,h,s,E,_,0),V("z","y","x",1,-1,p,h,-s,E,_,1),V("x","z","y",1,1,s,p,h,m,E,2),V("x","z","y",1,-1,s,p,-h,m,E,3),V("x","y","z",1,-1,s,h,p,m,_,4),V("x","y","z",-1,-1,s,h,-p,m,_,5),this.setIndex(I),this.setAttribute("position",new bg(N,3)),this.setAttribute("normal",new bg(B,3)),this.setAttribute("uv",new bg(P,2));function V(tt,Q,X,gt,ft,xt,Bt,Ot,Pt,se,ot){let Lt=xt/Pt,be=Bt/se,ln=xt/2,Fn=Bt/2,ne=Ot/2,xe=Pt+1,re=se+1,hn=0,Se=0,ke=new Ge;for(let mn=0;mn0?1:-1,B.push(ke.x,ke.y,ke.z),P.push(Qn/Pt),P.push(1-mn/se),hn+=1}}for(let mn=0;mn=St)return x;var ee=F-h1(J);if(ee<1)return J;var fe=Vt?Ib(Vt,0,ee).join(""):x.slice(0,ee);if(mt===d)return fe+J;if(Vt&&(ee+=fe.length-ee),Nb(mt)){if(x.slice(ee).search(mt)){var Cn,kn=fe;for(mt.global||(mt=mf(mt.source,Ac(ov.exec(mt))+"g")),mt.lastIndex=0;Cn=mt.exec(kn);)var Wn=Cn.index;fe=fe.slice(0,Wn===d?ee:Wn)}}else if(x.indexOf(Fd(mt),ee)!=ee){var Ki=fe.lastIndexOf(mt);Ki>-1&&(fe=fe.slice(0,Ki))}return fe+J}function CG(x){return x=Ac(x),x&&Mi.test(x)?x.replace(Ln,Hy):x}var AG=Jy(function(x,C,F){return x+(F?" ":"")+C.toUpperCase()}),E5=n8("toUpperCase");function i2(x,C,F){return x=Ac(x),C=F?d:C,C===d?Uy(x)?yb(x):Dy(x):x.match(C)||[]}var h9=oo(function(x,C){try{return df(x,d,C)}catch(F){return w5(F)?F:new vs(F)}}),fT=tm(function(x,C){return ou(C,function(F){F=g1(F),Lg(x,F,Dg(x[F],x))}),x});function dT(x){var C=x==null?0:x.length,F=cs();return x=C?ea(x,function(J){if(typeof J[1]!="function")throw new Jf(m);return[F(J[0]),J[1]]}):[],oo(function(J){for(var mt=-1;++mthn)return[];var F=mn,J=$t(x,mn);C=cs(C),x-=mn;for(var mt=By(J,C);++F0||C<0)?new po(F):(x<0?F=F.takeRight(-x):x&&(F=F.drop(x)),C!==d&&(C=Ys(C),F=C<0?F.dropRight(-C):F.take(C-x)),F)},po.prototype.takeRightWhile=function(x){return this.reverse().takeWhile(x).reverse()},po.prototype.toArray=function(){return this.take(mn)},Pg(po.prototype,function(x,C){var F=/^(?:filter|find|map|reject)|While$/.test(C),J=/^(?:head|last)$/.test(C),mt=Mt[J?"take"+(C=="last"?"Right":""):C],St=J||/^find/.test(C);mt&&(Mt.prototype[C]=function(){var Vt=this.__wrapped__,ee=J?[1]:arguments,fe=Vt instanceof po,Cn=ee[0],kn=fe||Us(Vt),Wn=function(co){var $o=mt.apply(Mt,Eg([co],ee));return J&&Ki?$o[0]:$o};kn&&F&&typeof Cn=="function"&&Cn.length!=1&&(fe=kn=!1);var Ki=this.__chain__,Er=!!this.__actions__.length,Wr=St&&!Ki,no=fe&&!Er;if(!St&&kn){Vt=no?Vt:new po(this);var Zr=x.apply(Vt,ee);return Zr.__actions__.push({func:g5,args:[Wn],thisArg:d}),new bf(Zr,Ki)}return Wr&&no?x.apply(this,ee):(Zr=this.thru(Wn),Wr?J?Zr.value()[0]:Zr.value():Zr)})}),ou(["pop","push","shift","sort","splice","unshift"],function(x){var C=q0[x],F=/^(?:push|sort|unshift)$/.test(x)?"tap":"thru",J=/^(?:pop|shift)$/.test(x);Mt.prototype[x]=function(){var mt=arguments;if(J&&!this.__chain__){var St=this.value();return C.apply(Us(St)?St:[],mt)}return this[F](function(Vt){return C.apply(Us(Vt)?Vt:[],mt)})}}),Pg(po.prototype,function(x,C){var F=Mt[C];if(F){var J=F.name+"";pc.call(Eb,J)||(Eb[J]=[]),Eb[J].push({name:C,func:F})}}),Eb[KS(d,Q).name]=[{name:"wrapper",func:d}],po.prototype.clone=KU,po.prototype.reverse=JU,po.prototype.value=QU,Mt.prototype.at=Fnt,Mt.prototype.chain=Unt,Mt.prototype.commit=znt,Mt.prototype.next=jl,Mt.prototype.plant=Hnt,Mt.prototype.reverse=Gnt,Mt.prototype.toJSON=Mt.prototype.valueOf=Mt.prototype.value=$j,Mt.prototype.first=Mt.prototype.head,Mb&&(Mt.prototype[Mb]=jnt),Mt},Bd=Wy();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Cc._=Bd,define(function(){return Bd})):Mg?((Mg.exports=Bd)._=Bd,$0._=Bd):Cc._=Bd}).call(kI)});var oU=Ld(sU=>{"use strict";Object.defineProperty(sU,"__esModule",{value:!0});var Mtt=iU(),D_t=FA(),rZt;(function(d){d.skin=null;function s(O,B){var P=D_t.filter(O,function(U){if(U instanceof Array&&U[0]==="g")return U[1]["s:pid"].startsWith(B)});return P}d.getPortsWithPrefix=s;function h(O,B){var P=D_t.filter(O,function(U){var W=U[0];if(U instanceof Array&&W==="g"){var q=U[1];return B(q)}return!1});return P.map(function(U){return U[1]["s:pid"]})}function p(O){return h(O,function(B){return B["s:position"]?B["s:position"]==="top":!1})}d.getInputPids=p;function m(O){return h(O,function(B){return B["s:position"]?B["s:position"]==="bottom":!1})}d.getOutputPids=m;function _(O){return h(O,function(B){return B["s:dir"]?B["s:dir"]==="lateral":B["s:position"]?B["s:position"]==="left"||B["s:position"]==="right":!1})}d.getLateralPortPids=_;function E(O){var B=null;return Mtt.traverse(d.skin,{enter:function(P,U){P.name==="s:alias"&&P.attr.val===O&&(B=U)}}),B==null&&Mtt.traverse(d.skin,{enter:function(P){P.attr["s:type"]==="generic"&&(B=P)}}),B.full}d.findSkinType=E;function y(){var O=[];return Mtt.t(d.skin,{enter:function(B){B.name==="s:low_priority_alias"&&O.push(B.attr.value)}}),O}d.getLowPriorityAliases=y;function I(){var O;return Mtt.t(d.skin,{enter:function(B){B.name==="s:properties"?O=D_t.mapValues(B.attr,function(P){return isNaN(Number(P))?P==="true"?!0:P==="false"?!1:P:Number(P)}):B.name==="s:layoutEngine"&&(O.layoutEngine=B.attr)}}),O.layoutEngine||(O.layoutEngine={}),O}d.getProperties=I})(rZt=sU.Skin||(sU.Skin={}));sU.default=rZt});var sZt=Ld(O_t=>{"use strict";Object.defineProperty(O_t,"__esModule",{value:!0});var N_t;(function(d){var s;(function(E){E.Zero="0",E.One="1",E.X="x"})(s||(s={}));var h;(function(E){E.Input="input",E.Output="output"})(h=d.Direction||(d.Direction={}));function p(E){return E.port_directions?Object.keys(E.port_directions).filter(function(y){return E.port_directions[y]===h.Input}):[]}d.getInputPortPids=p;function m(E){return E.port_directions?Object.keys(E.port_directions).filter(function(y){return E.port_directions[y]===h.Output}):[]}d.getOutputPortPids=m;var _;(function(E){E[E.Hide=0]="Hide",E[E.NoHide=1]="NoHide"})(_||(_={}))})(N_t||(N_t={}));O_t.default=N_t});var oZt=Ld(F_t=>{"use strict";Object.defineProperty(F_t,"__esModule",{value:!0});var wMe=U_t(),B_t=FA(),vMe=function(){function d(s,h){this.key=s,this.value=h}return Object.defineProperty(d.prototype,"Key",{get:function(){return this.key},enumerable:!0,configurable:!0}),d.prototype.keyIn=function(s){return B_t.includes(s,this.key)},d.prototype.maxVal=function(){return B_t.max(B_t.map(this.value,function(s){return Number(s)}))},d.prototype.valString=function(){return","+this.value.join()+","},d.prototype.findConstants=function(s,h,p){var m=this,_="",E=[],y=this.value;return y.forEach(function(I,O){I==="0"||I==="1"?(h+=1,_+=I,y[O]=h,E.push(h)):E.length>0&&(m.assignConstant(_,E,O,s,p),_="",E=[])}),E.length>0&&this.assignConstant(_,E,y.length,s,p),h},d.prototype.getGenericElkPort=function(s,h,p){var m=this.parentNode.Key,_=this.parentNode.getTemplate()[1]["s:type"];if(s===0){var E={id:m+"."+this.key,width:1,height:1,x:Number(h[0][1]["s:x"]),y:Number(h[0][1]["s:y"])};return(_==="generic"||_==="join")&&p==="in"&&(E.labels=[{id:m+"."+this.key+".label",text:this.key,x:Number(h[0][2][1].x)-10,y:Number(h[0][2][1].y)-6,width:6*this.key.length,height:11}]),(_==="generic"||_==="split")&&p==="out"&&(E.labels=[{id:m+"."+this.key+".label",text:this.key,x:Number(h[0][2][1].x)-10,y:Number(h[0][2][1].y)-6,width:6*this.key.length,height:11}]),E}else{var y=Number(h[1][1]["s:y"])-Number(h[0][1]["s:y"]),E={id:m+"."+this.key,width:1,height:1,x:Number(h[0][1]["s:x"]),y:s*y+Number(h[0][1]["s:y"])};return _==="generic"&&(E.labels=[{id:m+"."+this.key+".label",text:this.key,x:Number(h[0][2][1].x)-10,y:Number(h[0][2][1].y)-6,width:6*this.key.length,height:11}]),E}},d.prototype.assignConstant=function(s,h,p,m,_){var E=this,y=s.split("").reverse().join("");if(m.hasOwnProperty(y)){var I=m[y],O=I.length;I.forEach(function(B,P){var U=p-O+P;E.value[U]=B})}else _.push(wMe.default.fromConstantInfo(y,h)),m[y]=h},d}();F_t.Port=vMe});var cZt=Ld((xJe,Ett)=>{var _Me=function(){"use strict";function d(B,P){return P!=null&&B instanceof P}var s;try{s=Map}catch{s=function(){}}var h;try{h=Set}catch{h=function(){}}var p;try{p=Promise}catch{p=function(){}}function m(B,P,U,W,q){typeof P=="object"&&(U=P.depth,W=P.prototype,q=P.includeNonEnumerable,P=P.circular);var et=[],Q=[],X=typeof Buffer<"u";typeof P>"u"&&(P=!0),typeof U>"u"&&(U=1/0);function gt(ft,xt){if(ft===null)return null;if(xt===0)return ft;var Bt,Ot;if(typeof ft!="object")return ft;if(d(ft,s))Bt=new s;else if(d(ft,h))Bt=new h;else if(d(ft,p))Bt=new p(function(xe,re){ft.then(function(hn){xe(gt(hn,xt-1))},function(hn){re(gt(hn,xt-1))})});else if(m.__isArray(ft))Bt=[];else if(m.__isRegExp(ft))Bt=new RegExp(ft.source,O(ft)),ft.lastIndex&&(Bt.lastIndex=ft.lastIndex);else if(m.__isDate(ft))Bt=new Date(ft.getTime());else{if(X&&Buffer.isBuffer(ft))return Buffer.allocUnsafe?Bt=Buffer.allocUnsafe(ft.length):Bt=new Buffer(ft.length),ft.copy(Bt),Bt;d(ft,Error)?Bt=Object.create(ft):typeof W>"u"?(Ot=Object.getPrototypeOf(ft),Bt=Object.create(Ot)):(Bt=Object.create(W),Ot=W)}if(P){var Pt=et.indexOf(ft);if(Pt!=-1)return Q[Pt];et.push(ft),Q.push(Bt)}d(ft,s)&&ft.forEach(function(xe,re){var hn=gt(re,xt-1),Se=gt(xe,xt-1);Bt.set(hn,Se)}),d(ft,h)&&ft.forEach(function(xe){var re=gt(xe,xt-1);Bt.add(re)});for(var se in ft){var ot;Ot&&(ot=Object.getOwnPropertyDescriptor(Ot,se)),!(ot&&ot.set==null)&&(Bt[se]=gt(ft[se],xt-1))}if(Object.getOwnPropertySymbols)for(var Lt=Object.getOwnPropertySymbols(ft),se=0;se{"use strict";Object.defineProperty(G_t,"__esModule",{value:!0});var Stt=W_t(),z_t=sZt(),n1=oU(),QE=oZt(),j_t=FA(),cU=cZt(),Ttt=iU(),yMe=function(){function d(s,h,p,m,_){var E=this;this.key=s,this.type=h,this.inputPorts=p,this.outputPorts=m,this.attributes=_||{},p.forEach(function(y){y.parentNode=E}),m.forEach(function(y){y.parentNode=E})}return d.fromPort=function(s,h){var p=s.direction===z_t.default.Direction.Input;return p?new d(h,"$_inputExt_",[],[new QE.Port("Y",s.bits)],{}):new d(h,"$_outputExt_",[new QE.Port("A",s.bits)],[],{})},d.fromYosysCell=function(s,h){var p=n1.default.findSkinType(s.type),m=n1.default.getInputPids(p),_=n1.default.getOutputPids(p),E=j_t.map(s.connections,function(P,U){return new QE.Port(U,P)}),y=E.filter(function(P){return P.keyIn(m)}),I=E.filter(function(P){return P.keyIn(_)});if(y.length+I.length!==E.length){var O=z_t.default.getInputPortPids(s),B=z_t.default.getOutputPortPids(s);y=E.filter(function(P){return P.keyIn(O)}),I=E.filter(function(P){return P.keyIn(B)})}return new d(h,s.type,y,I,s.attributes)},d.fromConstantInfo=function(s,h){return new d(s,"$_constant_",[],[new QE.Port("Y",h)],{})},d.fromJoinInfo=function(s,h){var p=s.slice(1,-1).split(","),m=p.map(function(y){return Number(y)}),_=[new QE.Port("Y",m)],E=h.map(function(y){return new QE.Port(y,aZt(m,y))});return new d("$join$"+s,"$_join_",E,_,{})},d.fromSplitInfo=function(s,h){var p=s.slice(1,-1).split(","),m=p.map(function(y){return Number(y)}),_=[new QE.Port("A",m)],E=h.map(function(y){var I=aZt(m,y);return new QE.Port(y,I)});return new d("$split$"+s,"$_split_",_,E,{})},Object.defineProperty(d.prototype,"Type",{get:function(){return this.type},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"Key",{get:function(){return this.key},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"InputPorts",{get:function(){return this.inputPorts},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"OutputPorts",{get:function(){return this.outputPorts},enumerable:!0,configurable:!0}),d.prototype.maxOutVal=function(s){var h=j_t.max(this.outputPorts.map(function(p){return p.maxVal()}));return j_t.max([h,s])},d.prototype.findConstants=function(s,h,p){return this.inputPorts.forEach(function(m){h=m.findConstants(s,h,p)}),h},d.prototype.inputPortVals=function(){return this.inputPorts.map(function(s){return s.valString()})},d.prototype.outputPortVals=function(){return this.outputPorts.map(function(s){return s.valString()})},d.prototype.collectPortsByDirection=function(s,h,p,m){var _=n1.default.findSkinType(this.type),E=n1.default.getLateralPortPids(_);this.inputPorts.forEach(function(y){var I=y.keyIn(E);I||_[1]["s:type"]==="generic"&&m?Stt.addToDefaultDict(p,y.valString(),y):Stt.addToDefaultDict(s,y.valString(),y)}),this.outputPorts.forEach(function(y){var I=y.keyIn(E);I||_[1]["s:type"]==="generic"&&m?Stt.addToDefaultDict(p,y.valString(),y):Stt.addToDefaultDict(h,y.valString(),y)})},d.prototype.getValueAttribute=function(){return this.attributes&&this.attributes.value?this.attributes.value:null},d.prototype.getTemplate=function(){return n1.default.findSkinType(this.type)},d.prototype.buildElkChild=function(){var s=this,h=this.getTemplate(),p=h[1]["s:type"],m={"org.eclipse.elk.portConstraints":"FIXED_POS"},_=null,E=null;for(var y in this.attributes)if(y.startsWith("org.eclipse.elk")){if(y==="org.eclipse.elk.x"){_=this.attributes[y];continue}if(y==="org.eclipse.elk.y"){E=this.attributes[y];continue}m[y]=this.attributes[y]}if(p==="join"||p==="split"||p==="generic"){var I=n1.default.getPortsWithPrefix(h,"in"),O=n1.default.getPortsWithPrefix(h,"out"),B=this.inputPorts.map(function(Q,X){return Q.getGenericElkPort(X,I,"in")}),P=this.outputPorts.map(function(Q,X){return Q.getGenericElkPort(X,O,"out")}),U={id:this.key,width:Number(h[1]["s:width"]),height:Number(this.getGenericHeight()),ports:B.concat(P),layoutOptions:m,labels:[]};return _&&(U.x=_),E&&(U.y=E),this.addLabels(h,U),U}var W=n1.default.getPortsWithPrefix(h,"").map(function(Q){return{id:s.key+"."+Q[1]["s:pid"],width:0,height:0,x:Number(Q[1]["s:x"]),y:Number(Q[1]["s:y"])}}),q=Number(h[1]["s:width"]),et={id:this.key,width:q,height:Number(h[1]["s:height"]),ports:W,layoutOptions:m,labels:[]};return _&&(et.x=_),E&&(et.y=E),this.addLabels(h,et),et},d.prototype.render=function(s){for(var h=this.getTemplate(),p=cU(h),m=0,_=s.labels;m<_.length;m++){var E=_[m],y=E.id.split(".")[2];xMe(p,y,E.text)}for(var I=2;I3){var y=parseInt(p.key,2);E="0x"+y.toString(16)}else E=p.key;p.attributes[_]=p.key}else if(_ in p.attributes)E=p.attributes[_];else return;h.labels.push({id:p.key+".label."+_,text:E,x:m.attr.x,y:m.attr.y-6,height:11,width:6*E.length})}}})},d.prototype.getGenericHeight=function(){var s=this.getTemplate(),h=n1.default.getPortsWithPrefix(s,"in"),p=n1.default.getPortsWithPrefix(s,"out");if(this.inputPorts.length>this.outputPorts.length){var m=Number(h[1][1]["s:y"])-Number(h[0][1]["s:y"]);return Number(s[1]["s:height"])+m*(this.inputPorts.length-2)}if(p.length>1){var m=Number(p[1][1]["s:y"])-Number(p[0][1]["s:y"]);return Number(s[1]["s:height"])+m*(this.outputPorts.length-2)}return Number(s[1]["s:height"])},d}();G_t.default=yMe;function H_t(d,s){Ttt.traverse(d,{enter:function(h){h.name==="rect"&&h.attr["s:generic"]==="body"&&(h.attr.height=s)}})}function xMe(d,s,h){Ttt.traverse(d,{enter:function(p){p.name==="text"&&p.attr["s:attribute"]===s&&(p.full[2]=h)}})}function MMe(d,s,h){Ttt.traverse(d,{enter:function(p){var m=p.attr.class;m&&m.includes(s)&&(p.attr.class=m.replace(s,h))}})}function aZt(d,s){var h=s.indexOf(":");if(h===-1)return[d[Number(s)]];var p=s.slice(0,h),m=s.slice(h+1),_=d.slice(Number(p),Number(m)+1);return _}});var W_t=Ld(LI=>{"use strict";Object.defineProperty(LI,"__esModule",{value:!0});var EMe=oU(),Ctt=U_t(),P0=FA(),SMe=function(){function d(s){var h=this;this.moduleName=null,P0.forEach(s.modules,function(E,y){E.attributes&&Number(E.attributes.top)===1&&(h.moduleName=y)}),this.moduleName==null&&(this.moduleName=Object.keys(s.modules)[0]);var p=s.modules[this.moduleName],m=P0.map(p.ports,Ctt.default.fromPort),_=P0.map(p.cells,function(E,y){return Ctt.default.fromYosysCell(E,y)});this.nodes=_.concat(m),this.wires=[]}return d.prototype.addConstants=function(){var s=this.nodes.reduce(function(m,_){return _.maxOutVal(m)},-1),h={},p=[];this.nodes.forEach(function(m){s=m.findConstants(h,s,p)}),this.nodes=this.nodes.concat(p)},d.prototype.addSplitsJoins=function(){var s=P0.flatMap(this.nodes,function(E){return E.inputPortVals()}),h=P0.flatMap(this.nodes,function(E){return E.outputPortVals()}),p=s.slice(),m={},_={};s.forEach(function(E){uU(h,p,E,0,E.length,m,_)}),this.nodes=this.nodes.concat(P0.map(_,function(E,y){return Ctt.default.fromJoinInfo(y,E)})).concat(P0.map(m,function(E,y){return Ctt.default.fromSplitInfo(y,E)}))},d.prototype.createWires=function(){var s=EMe.default.getProperties(),h={},p={},m={};this.nodes.forEach(function(y){y.collectPortsByDirection(h,p,m,s.genericsLaterals)});var _=hZt(P0.keys(h).concat(P0.keys(p)).concat(P0.keys(m))),E=_.map(function(y){var I=p[y]||[],O=h[y]||[],B=m[y]||[],P={netName:y,drivers:I,riders:O,laterals:B};return I.concat(O).concat(B).forEach(function(U){U.wire=P}),P});this.wires=E},d}();LI.FlatModule=SMe;function TMe(d){var s="";return d.forEach(function(h){var p=String(h);s===""?s=p:s+=","+p}),","+s+","}LI.arrayToBitstring=TMe;function lZt(d,s){return s.indexOf(d)>-1}function uZt(d,s){return P0.findIndex(s,function(h){return lZt(d,h)})}function aU(d,s,h){d[s]===void 0?d[s]=[h]:d[s].push(h)}LI.addToDefaultDict=aU;function Att(d,s,h){var p=P0.max([d.indexOf(s),h]),m=d.substring(0,p).split(",").length-1,_=m+s.split(",").length-3;return m===_?String(m):String(m)+":"+String(_)}function uU(d,s,h,p,m,_,E){var y=s.indexOf(h);if(y!==-1&&s.splice(y,1),!(p>=h.length||m-p<2)){var I=h.slice(p,m);if(lZt(I,d)){I!==h&&aU(E,h,Att(h,I,p)),uU(d,s,h,m-1,h.length,_,E);return}var O=uZt(I,d);if(O!==-1){I!==h&&aU(E,h,Att(h,I,p)),aU(_,d[O],Att(d[O],I,0)),d.push(I),uU(d,s,h,m-1,h.length,_,E);return}if(uZt(I,s)!==-1){I!==h&&aU(E,h,Att(h,I,p)),uU(d,[],I,0,I.length,_,E),d.push(I);return}uU(d,s,h,p,p+I.slice(0,-1).lastIndexOf(",")+1,_,E)}}function hZt(d){var s={};return d.forEach(function(h){s[h]=!0}),P0.keys(s)}LI.removeDups=hZt});var V_t=Ld(lU=>{"use strict";Object.defineProperty(lU,"__esModule",{value:!0});var dZt=FA(),Gf;(function(d){d.wireNameLookup={},d.dummyNum=0,d.edgeIndex=0})(Gf=lU.ElkModel||(lU.ElkModel={}));function CMe(d){var s=d.nodes.map(function(p){return p.buildElkChild()});Gf.edgeIndex=0,Gf.dummyNum=0;var h=dZt.flatMap(d.wires,function(p){if(p.drivers.length>0&&p.riders.length>0&&p.laterals.length===0){var m=[];return $_t(p.drivers,p.riders,m),m}else if(p.drivers.concat(p.riders).length>0&&p.laterals.length>0){var m=[];return $_t(p.drivers,p.laterals,m),$_t(p.laterals,p.riders,m),m}else if(p.riders.length===0&&p.drivers.length>1){var _=fZt(s);Gf.dummyNum+=1;var E=p.drivers.map(function(P){var U=P.parentNode.Key,W="e"+String(Gf.edgeIndex);Gf.edgeIndex+=1;var q={id:W,source:U,sourcePort:U+"."+P.key,target:_,targetPort:_+".p"};return Gf.wireNameLookup[W]=P.wire.netName,q});return E}else if(p.riders.length>1&&p.drivers.length===0){var y=fZt(s);Gf.dummyNum+=1;var E=p.riders.map(function(U){var W=U.parentNode.Key,q="e"+String(Gf.edgeIndex);Gf.edgeIndex+=1;var et={id:q,source:y,sourcePort:y+".p",target:W,targetPort:W+"."+U.key};return Gf.wireNameLookup[q]=U.wire.netName,et});return E}else if(p.laterals.length>1){var I=p.laterals[0],O=I.parentNode.Key,B=p.laterals.slice(1).map(function(P){var U=P.parentNode.Key,W="e"+String(Gf.edgeIndex);Gf.edgeIndex+=1;var q={id:W,source:O,sourcePort:O+"."+I.key,target:U,targetPort:U+"."+P.key};return Gf.wireNameLookup[W]=P.wire.netName,q});return B}return[]});return{id:d.moduleName,children:s,edges:h}}lU.buildElkGraph=CMe;function fZt(d){var s="$d_"+String(Gf.dummyNum),h={id:s,width:0,height:0,ports:[{id:s+".p",width:0,height:0}],layoutOptions:{"org.eclipse.elk.portConstraints":"FIXED_SIDE"}};return d.push(h),s}function $_t(d,s,h){var p=dZt.flatMap(d,function(m){var _=m.parentNode.key,E=_+"."+m.key;return s.map(function(y){var I=y.parentNode.key,O=I+"."+y.key,B="e"+Gf.edgeIndex,P={id:B,sources:[E],targets:[O]};return Gf.wireNameLookup[B]=y.wire.netName,m.parentNode.type!=="$dff"&&(P.layoutOptions={"org.eclipse.elk.layered.priority.direction":10}),Gf.edgeIndex+=1,P})});h.push.apply(h,p)}});var wZt=Ld(II=>{"use strict";var pZt=II&&II.__spreadArrays||function(){for(var d=0,s=0,h=arguments.length;s0?[X.bendPoints[0]]:X.endPoint:X.bendPoints&&X.bendPoints.length>0?[_y.last(X.bendPoints)]:X.startPoint}).map(function(Q){return Q.x>O.x?PI.Right:Q.xO.y?PI.Down:PI.Up}));et.size<3&&_.forEach(function(Q){Q.junctionPoints&&(Q.junctionPoints=Q.junctionPoints.filter(function(X){return!_y.isEqual(X,O)}))}),s+=1};s<1e4;){var p=h();if(p==="break")break}}II.removeDummyEdges=bZt});var MZt=Ld(Ltt=>{"use strict";Object.defineProperty(Ltt,"__esModule",{value:!0});var PMe=$Xt(),IMe=iU(),RMe=W_t(),ktt=oU(),_Zt=V_t(),vZt=wZt(),yZt=new PMe;function xZt(d,s){ktt.default.skin=IMe.p(d);var h=ktt.default.getProperties(),p=new RMe.FlatModule(s);return h.constants!==!1&&p.addConstants(),h.splitsAndJoins!==!1&&p.addSplitsJoins(),p.createWires(),p}function DMe(d,s,h,p){var m=xZt(d,s),_=_Zt.buildElkGraph(m);if(h){p(null,JSON.stringify(_,null,2));return}var E=ktt.default.getProperties(),y=yZt.layout(_,{layoutOptions:E.layoutEngine});y.then(function(I){p(null,JSON.stringify(I,null,2))}).catch(function(I){throw Error(I)})}Ltt.dumpLayout=DMe;function NMe(d,s,h,p){var m=xZt(d,s),_=_Zt.buildElkGraph(m),E=ktt.default.getProperties(),y;return p?y=new Promise(function(I){vZt.default(p,m),I()}):y=yZt.layout(_,{layoutOptions:E.layoutEngine}).then(function(I){return vZt.default(I,m)}).catch(function(I){console.error(I)}),typeof h=="function"&&y.then(function(I){return h(null,I),I}).catch(function(I){throw Error(I)}),y}Ltt.render=NMe});var fJe=jXt(GXt());var zAe=jXt(MZt());var w2t={};lMe(w2t,{AmbientLight:()=>Det,BoxGeometry:()=>YA,Color:()=>Go,DirectionalLight:()=>Ret,DoubleSide:()=>Xw,EdgesGeometry:()=>Let,GridHelper:()=>Oet,Group:()=>cS,InstancedMesh:()=>ket,LineBasicMaterial:()=>oR,LineSegments:()=>TU,Matrix4:()=>Fu,Mesh:()=>gg,MeshBasicMaterial:()=>rR,MeshPhongMaterial:()=>Pet,PerspectiveCamera:()=>s1,Quaternion:()=>xy,Raycaster:()=>Net,Scene:()=>Cet,Vector2:()=>Nc,Vector3:()=>Ge,WebGLRenderer:()=>SU});var h2t="160";var OMe=0,EZt=1,BMe=2;var nKt=1,FMe=2,Yx=3,hS=0,mg=1,Xw=2;var aS=0,JI=1,SZt=2,TZt=3,CZt=4,UMe=5,WA=100,zMe=101,jMe=102,AZt=103,kZt=104,HMe=200,GMe=201,WMe=202,$Me=203,Tyt=204,Cyt=205,VMe=206,qMe=207,XMe=208,ZMe=209,YMe=210,KMe=211,JMe=212,QMe=213,tEe=214,eEe=0,nEe=1,iEe=2,oet=3,rEe=4,sEe=5,oEe=6,cEe=7,f2t=0,aEe=1,uEe=2,uS=0,lEe=1,hEe=2,fEe=3,dEe=4,pEe=5,gEe=6;var iKt=300,eR=301,nR=302,Ayt=303,kyt=304,Bet=306,Lyt=1e3,Zw=1001,Pyt=1002,r1=1003,LZt=1004;var q_t=1005;var bb=1006,mEe=1007;var _U=1008;var lS=1009,bEe=1010,wEe=1011,d2t=1012,rKt=1013,sS=1014,oS=1015,yU=1016,sKt=1017,oKt=1018,qA=1020,vEe=1021,Yw=1023,_Ee=1024,yEe=1025,XA=1026,iR=1027,xEe=1028,cKt=1029,MEe=1030,aKt=1031,uKt=1033,X_t=33776,Z_t=33777,Y_t=33778,K_t=33779,PZt=35840,IZt=35841,RZt=35842,DZt=35843,lKt=36196,NZt=37492,OZt=37496,BZt=37808,FZt=37809,UZt=37810,zZt=37811,jZt=37812,HZt=37813,GZt=37814,WZt=37815,$Zt=37816,VZt=37817,qZt=37818,XZt=37819,ZZt=37820,YZt=37821,J_t=36492,KZt=36494,JZt=36495,EEe=36283,QZt=36284,tYt=36285,eYt=36286;var cet=2300,aet=2301,Q_t=2302,nYt=2400,iYt=2401,rYt=2402;var hKt=3e3,ZA=3001,SEe=3200,TEe=3201,fKt=0,CEe=1,wb="",Pd="srgb",Qx="srgb-linear",p2t="display-p3",Fet="display-p3-linear",uet="linear",_u="srgb",het="rec709",fet="p3";var RI=7680;var sYt=519,AEe=512,kEe=513,LEe=514,dKt=515,PEe=516,IEe=517,REe=518,DEe=519,oYt=35044;var cYt="300 es",Iyt=1035,Jx=2e3,det=2001,fS=class{addEventListener(s,h){this._listeners===void 0&&(this._listeners={});let p=this._listeners;p[s]===void 0&&(p[s]=[]),p[s].indexOf(h)===-1&&p[s].push(h)}hasEventListener(s,h){if(this._listeners===void 0)return!1;let p=this._listeners;return p[s]!==void 0&&p[s].indexOf(h)!==-1}removeEventListener(s,h){if(this._listeners===void 0)return;let m=this._listeners[s];if(m!==void 0){let _=m.indexOf(h);_!==-1&&m.splice(_,1)}}dispatchEvent(s){if(this._listeners===void 0)return;let p=this._listeners[s.type];if(p!==void 0){s.target=this;let m=p.slice(0);for(let _=0,E=m.length;_>8&255]+gp[d>>16&255]+gp[d>>24&255]+"-"+gp[s&255]+gp[s>>8&255]+"-"+gp[s>>16&15|64]+gp[s>>24&255]+"-"+gp[h&63|128]+gp[h>>8&255]+"-"+gp[h>>16&255]+gp[h>>24&255]+gp[p&255]+gp[p>>8&255]+gp[p>>16&255]+gp[p>>24&255]).toLowerCase()}function pg(d,s,h){return Math.max(s,Math.min(h,d))}function NEe(d,s){return(d%s+s)%s}function tyt(d,s,h){return(1-h)*d+h*s}function aYt(d){return(d&d-1)===0&&d!==0}function Dyt(d){return Math.pow(2,Math.floor(Math.log(d)/Math.LN2))}function hU(d,s){switch(s.constructor){case Float32Array:return d;case Uint32Array:return d/4294967295;case Uint16Array:return d/65535;case Uint8Array:return d/255;case Int32Array:return Math.max(d/2147483647,-1);case Int16Array:return Math.max(d/32767,-1);case Int8Array:return Math.max(d/127,-1);default:throw new Error("Invalid component type.")}}function dg(d,s){switch(s.constructor){case Float32Array:return d;case Uint32Array:return Math.round(d*4294967295);case Uint16Array:return Math.round(d*65535);case Uint8Array:return Math.round(d*255);case Int32Array:return Math.round(d*2147483647);case Int16Array:return Math.round(d*32767);case Int8Array:return Math.round(d*127);default:throw new Error("Invalid component type.")}}var Nc=class d{constructor(s=0,h=0){d.prototype.isVector2=!0,this.x=s,this.y=h}get width(){return this.x}set width(s){this.x=s}get height(){return this.y}set height(s){this.y=s}set(s,h){return this.x=s,this.y=h,this}setScalar(s){return this.x=s,this.y=s,this}setX(s){return this.x=s,this}setY(s){return this.y=s,this}setComponent(s,h){switch(s){case 0:this.x=h;break;case 1:this.y=h;break;default:throw new Error("index is out of range: "+s)}return this}getComponent(s){switch(s){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+s)}}clone(){return new this.constructor(this.x,this.y)}copy(s){return this.x=s.x,this.y=s.y,this}add(s){return this.x+=s.x,this.y+=s.y,this}addScalar(s){return this.x+=s,this.y+=s,this}addVectors(s,h){return this.x=s.x+h.x,this.y=s.y+h.y,this}addScaledVector(s,h){return this.x+=s.x*h,this.y+=s.y*h,this}sub(s){return this.x-=s.x,this.y-=s.y,this}subScalar(s){return this.x-=s,this.y-=s,this}subVectors(s,h){return this.x=s.x-h.x,this.y=s.y-h.y,this}multiply(s){return this.x*=s.x,this.y*=s.y,this}multiplyScalar(s){return this.x*=s,this.y*=s,this}divide(s){return this.x/=s.x,this.y/=s.y,this}divideScalar(s){return this.multiplyScalar(1/s)}applyMatrix3(s){let h=this.x,p=this.y,m=s.elements;return this.x=m[0]*h+m[3]*p+m[6],this.y=m[1]*h+m[4]*p+m[7],this}min(s){return this.x=Math.min(this.x,s.x),this.y=Math.min(this.y,s.y),this}max(s){return this.x=Math.max(this.x,s.x),this.y=Math.max(this.y,s.y),this}clamp(s,h){return this.x=Math.max(s.x,Math.min(h.x,this.x)),this.y=Math.max(s.y,Math.min(h.y,this.y)),this}clampScalar(s,h){return this.x=Math.max(s,Math.min(h,this.x)),this.y=Math.max(s,Math.min(h,this.y)),this}clampLength(s,h){let p=this.length();return this.divideScalar(p||1).multiplyScalar(Math.max(s,Math.min(h,p)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(s){return this.x*s.x+this.y*s.y}cross(s){return this.x*s.y-this.y*s.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(s){let h=Math.sqrt(this.lengthSq()*s.lengthSq());if(h===0)return Math.PI/2;let p=this.dot(s)/h;return Math.acos(pg(p,-1,1))}distanceTo(s){return Math.sqrt(this.distanceToSquared(s))}distanceToSquared(s){let h=this.x-s.x,p=this.y-s.y;return h*h+p*p}manhattanDistanceTo(s){return Math.abs(this.x-s.x)+Math.abs(this.y-s.y)}setLength(s){return this.normalize().multiplyScalar(s)}lerp(s,h){return this.x+=(s.x-this.x)*h,this.y+=(s.y-this.y)*h,this}lerpVectors(s,h,p){return this.x=s.x+(h.x-s.x)*p,this.y=s.y+(h.y-s.y)*p,this}equals(s){return s.x===this.x&&s.y===this.y}fromArray(s,h=0){return this.x=s[h],this.y=s[h+1],this}toArray(s=[],h=0){return s[h]=this.x,s[h+1]=this.y,s}fromBufferAttribute(s,h){return this.x=s.getX(h),this.y=s.getY(h),this}rotateAround(s,h){let p=Math.cos(h),m=Math.sin(h),_=this.x-s.x,E=this.y-s.y;return this.x=_*p-E*m+s.x,this.y=_*m+E*p+s.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},Ko=class d{constructor(s,h,p,m,_,E,y,I,O){d.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],s!==void 0&&this.set(s,h,p,m,_,E,y,I,O)}set(s,h,p,m,_,E,y,I,O){let B=this.elements;return B[0]=s,B[1]=m,B[2]=y,B[3]=h,B[4]=_,B[5]=I,B[6]=p,B[7]=E,B[8]=O,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(s){let h=this.elements,p=s.elements;return h[0]=p[0],h[1]=p[1],h[2]=p[2],h[3]=p[3],h[4]=p[4],h[5]=p[5],h[6]=p[6],h[7]=p[7],h[8]=p[8],this}extractBasis(s,h,p){return s.setFromMatrix3Column(this,0),h.setFromMatrix3Column(this,1),p.setFromMatrix3Column(this,2),this}setFromMatrix4(s){let h=s.elements;return this.set(h[0],h[4],h[8],h[1],h[5],h[9],h[2],h[6],h[10]),this}multiply(s){return this.multiplyMatrices(this,s)}premultiply(s){return this.multiplyMatrices(s,this)}multiplyMatrices(s,h){let p=s.elements,m=h.elements,_=this.elements,E=p[0],y=p[3],I=p[6],O=p[1],B=p[4],P=p[7],U=p[2],W=p[5],q=p[8],et=m[0],Q=m[3],X=m[6],gt=m[1],ft=m[4],xt=m[7],Bt=m[2],Ot=m[5],Pt=m[8];return _[0]=E*et+y*gt+I*Bt,_[3]=E*Q+y*ft+I*Ot,_[6]=E*X+y*xt+I*Pt,_[1]=O*et+B*gt+P*Bt,_[4]=O*Q+B*ft+P*Ot,_[7]=O*X+B*xt+P*Pt,_[2]=U*et+W*gt+q*Bt,_[5]=U*Q+W*ft+q*Ot,_[8]=U*X+W*xt+q*Pt,this}multiplyScalar(s){let h=this.elements;return h[0]*=s,h[3]*=s,h[6]*=s,h[1]*=s,h[4]*=s,h[7]*=s,h[2]*=s,h[5]*=s,h[8]*=s,this}determinant(){let s=this.elements,h=s[0],p=s[1],m=s[2],_=s[3],E=s[4],y=s[5],I=s[6],O=s[7],B=s[8];return h*E*B-h*y*O-p*_*B+p*y*I+m*_*O-m*E*I}invert(){let s=this.elements,h=s[0],p=s[1],m=s[2],_=s[3],E=s[4],y=s[5],I=s[6],O=s[7],B=s[8],P=B*E-y*O,U=y*I-B*_,W=O*_-E*I,q=h*P+p*U+m*W;if(q===0)return this.set(0,0,0,0,0,0,0,0,0);let et=1/q;return s[0]=P*et,s[1]=(m*O-B*p)*et,s[2]=(y*p-m*E)*et,s[3]=U*et,s[4]=(B*h-m*I)*et,s[5]=(m*_-y*h)*et,s[6]=W*et,s[7]=(p*I-O*h)*et,s[8]=(E*h-p*_)*et,this}transpose(){let s,h=this.elements;return s=h[1],h[1]=h[3],h[3]=s,s=h[2],h[2]=h[6],h[6]=s,s=h[5],h[5]=h[7],h[7]=s,this}getNormalMatrix(s){return this.setFromMatrix4(s).invert().transpose()}transposeIntoArray(s){let h=this.elements;return s[0]=h[0],s[1]=h[3],s[2]=h[6],s[3]=h[1],s[4]=h[4],s[5]=h[7],s[6]=h[2],s[7]=h[5],s[8]=h[8],this}setUvTransform(s,h,p,m,_,E,y){let I=Math.cos(_),O=Math.sin(_);return this.set(p*I,p*O,-p*(I*E+O*y)+E+s,-m*O,m*I,-m*(-O*E+I*y)+y+h,0,0,1),this}scale(s,h){return this.premultiply(eyt.makeScale(s,h)),this}rotate(s){return this.premultiply(eyt.makeRotation(-s)),this}translate(s,h){return this.premultiply(eyt.makeTranslation(s,h)),this}makeTranslation(s,h){return s.isVector2?this.set(1,0,s.x,0,1,s.y,0,0,1):this.set(1,0,s,0,1,h,0,0,1),this}makeRotation(s){let h=Math.cos(s),p=Math.sin(s);return this.set(h,-p,0,p,h,0,0,0,1),this}makeScale(s,h){return this.set(s,0,0,0,h,0,0,0,1),this}equals(s){let h=this.elements,p=s.elements;for(let m=0;m<9;m++)if(h[m]!==p[m])return!1;return!0}fromArray(s,h=0){for(let p=0;p<9;p++)this.elements[p]=s[p+h];return this}toArray(s=[],h=0){let p=this.elements;return s[h]=p[0],s[h+1]=p[1],s[h+2]=p[2],s[h+3]=p[3],s[h+4]=p[4],s[h+5]=p[5],s[h+6]=p[6],s[h+7]=p[7],s[h+8]=p[8],s}clone(){return new this.constructor().fromArray(this.elements)}},eyt=new Ko;function pKt(d){for(let s=d.length-1;s>=0;--s)if(d[s]>=65535)return!0;return!1}function pet(d){return document.createElementNS("http://www.w3.org/1999/xhtml",d)}function OEe(){let d=pet("canvas");return d.style.display="block",d}var uYt={};function wU(d){d in uYt||(uYt[d]=!0,console.warn(d))}var lYt=new Ko().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),hYt=new Ko().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Ptt={[Qx]:{transfer:uet,primaries:het,toReference:d=>d,fromReference:d=>d},[Pd]:{transfer:_u,primaries:het,toReference:d=>d.convertSRGBToLinear(),fromReference:d=>d.convertLinearToSRGB()},[Fet]:{transfer:uet,primaries:fet,toReference:d=>d.applyMatrix3(hYt),fromReference:d=>d.applyMatrix3(lYt)},[p2t]:{transfer:_u,primaries:fet,toReference:d=>d.convertSRGBToLinear().applyMatrix3(hYt),fromReference:d=>d.applyMatrix3(lYt).convertLinearToSRGB()}},BEe=new Set([Qx,Fet]),Na={enabled:!0,_workingColorSpace:Qx,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(d){if(!BEe.has(d))throw new Error(`Unsupported working color space, "${d}".`);this._workingColorSpace=d},convert:function(d,s,h){if(this.enabled===!1||s===h||!s||!h)return d;let p=Ptt[s].toReference,m=Ptt[h].fromReference;return m(p(d))},fromWorkingColorSpace:function(d,s){return this.convert(d,this._workingColorSpace,s)},toWorkingColorSpace:function(d,s){return this.convert(d,s,this._workingColorSpace)},getPrimaries:function(d){return Ptt[d].primaries},getTransfer:function(d){return d===wb?uet:Ptt[d].transfer}};function QI(d){return d<.04045?d*.0773993808:Math.pow(d*.9478672986+.0521327014,2.4)}function nyt(d){return d<.0031308?d*12.92:1.055*Math.pow(d,.41666)-.055}var DI,get=class{static getDataURL(s){if(/^data:/i.test(s.src)||typeof HTMLCanvasElement>"u")return s.src;let h;if(s instanceof HTMLCanvasElement)h=s;else{DI===void 0&&(DI=pet("canvas")),DI.width=s.width,DI.height=s.height;let p=DI.getContext("2d");s instanceof ImageData?p.putImageData(s,0,0):p.drawImage(s,0,0,s.width,s.height),h=DI}return h.width>2048||h.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",s),h.toDataURL("image/jpeg",.6)):h.toDataURL("image/png")}static sRGBToLinear(s){if(typeof HTMLImageElement<"u"&&s instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&s instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&s instanceof ImageBitmap){let h=pet("canvas");h.width=s.width,h.height=s.height;let p=h.getContext("2d");p.drawImage(s,0,0,s.width,s.height);let m=p.getImageData(0,0,s.width,s.height),_=m.data;for(let E=0;E<_.length;E++)_[E]=QI(_[E]/255)*255;return p.putImageData(m,0,0),h}else if(s.data){let h=s.data.slice(0);for(let p=0;p0&&(p.userData=this.userData),h||(s.textures[this.uuid]=p),p}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(s){if(this.mapping!==iKt)return s;if(s.applyMatrix3(this.matrix),s.x<0||s.x>1)switch(this.wrapS){case Lyt:s.x=s.x-Math.floor(s.x);break;case Zw:s.x=s.x<0?0:1;break;case Pyt:Math.abs(Math.floor(s.x)%2)===1?s.x=Math.ceil(s.x)-s.x:s.x=s.x-Math.floor(s.x);break}if(s.y<0||s.y>1)switch(this.wrapT){case Lyt:s.y=s.y-Math.floor(s.y);break;case Zw:s.y=s.y<0?0:1;break;case Pyt:Math.abs(Math.floor(s.y)%2)===1?s.y=Math.ceil(s.y)-s.y:s.y=s.y-Math.floor(s.y);break}return this.flipY&&(s.y=1-s.y),s}set needsUpdate(s){s===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return wU("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Pd?ZA:hKt}set encoding(s){wU("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=s===ZA?Pd:wb}};Kw.DEFAULT_IMAGE=null;Kw.DEFAULT_MAPPING=iKt;Kw.DEFAULT_ANISOTROPY=1;var $f=class d{constructor(s=0,h=0,p=0,m=1){d.prototype.isVector4=!0,this.x=s,this.y=h,this.z=p,this.w=m}get width(){return this.z}set width(s){this.z=s}get height(){return this.w}set height(s){this.w=s}set(s,h,p,m){return this.x=s,this.y=h,this.z=p,this.w=m,this}setScalar(s){return this.x=s,this.y=s,this.z=s,this.w=s,this}setX(s){return this.x=s,this}setY(s){return this.y=s,this}setZ(s){return this.z=s,this}setW(s){return this.w=s,this}setComponent(s,h){switch(s){case 0:this.x=h;break;case 1:this.y=h;break;case 2:this.z=h;break;case 3:this.w=h;break;default:throw new Error("index is out of range: "+s)}return this}getComponent(s){switch(s){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+s)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(s){return this.x=s.x,this.y=s.y,this.z=s.z,this.w=s.w!==void 0?s.w:1,this}add(s){return this.x+=s.x,this.y+=s.y,this.z+=s.z,this.w+=s.w,this}addScalar(s){return this.x+=s,this.y+=s,this.z+=s,this.w+=s,this}addVectors(s,h){return this.x=s.x+h.x,this.y=s.y+h.y,this.z=s.z+h.z,this.w=s.w+h.w,this}addScaledVector(s,h){return this.x+=s.x*h,this.y+=s.y*h,this.z+=s.z*h,this.w+=s.w*h,this}sub(s){return this.x-=s.x,this.y-=s.y,this.z-=s.z,this.w-=s.w,this}subScalar(s){return this.x-=s,this.y-=s,this.z-=s,this.w-=s,this}subVectors(s,h){return this.x=s.x-h.x,this.y=s.y-h.y,this.z=s.z-h.z,this.w=s.w-h.w,this}multiply(s){return this.x*=s.x,this.y*=s.y,this.z*=s.z,this.w*=s.w,this}multiplyScalar(s){return this.x*=s,this.y*=s,this.z*=s,this.w*=s,this}applyMatrix4(s){let h=this.x,p=this.y,m=this.z,_=this.w,E=s.elements;return this.x=E[0]*h+E[4]*p+E[8]*m+E[12]*_,this.y=E[1]*h+E[5]*p+E[9]*m+E[13]*_,this.z=E[2]*h+E[6]*p+E[10]*m+E[14]*_,this.w=E[3]*h+E[7]*p+E[11]*m+E[15]*_,this}divideScalar(s){return this.multiplyScalar(1/s)}setAxisAngleFromQuaternion(s){this.w=2*Math.acos(s.w);let h=Math.sqrt(1-s.w*s.w);return h<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=s.x/h,this.y=s.y/h,this.z=s.z/h),this}setAxisAngleFromRotationMatrix(s){let h,p,m,_,I=s.elements,O=I[0],B=I[4],P=I[8],U=I[1],W=I[5],q=I[9],et=I[2],Q=I[6],X=I[10];if(Math.abs(B-U)<.01&&Math.abs(P-et)<.01&&Math.abs(q-Q)<.01){if(Math.abs(B+U)<.1&&Math.abs(P+et)<.1&&Math.abs(q+Q)<.1&&Math.abs(O+W+X-3)<.1)return this.set(1,0,0,0),this;h=Math.PI;let ft=(O+1)/2,xt=(W+1)/2,Bt=(X+1)/2,Ot=(B+U)/4,Pt=(P+et)/4,se=(q+Q)/4;return ft>xt&&ft>Bt?ft<.01?(p=0,m=.707106781,_=.707106781):(p=Math.sqrt(ft),m=Ot/p,_=Pt/p):xt>Bt?xt<.01?(p=.707106781,m=0,_=.707106781):(m=Math.sqrt(xt),p=Ot/m,_=se/m):Bt<.01?(p=.707106781,m=.707106781,_=0):(_=Math.sqrt(Bt),p=Pt/_,m=se/_),this.set(p,m,_,h),this}let gt=Math.sqrt((Q-q)*(Q-q)+(P-et)*(P-et)+(U-B)*(U-B));return Math.abs(gt)<.001&&(gt=1),this.x=(Q-q)/gt,this.y=(P-et)/gt,this.z=(U-B)/gt,this.w=Math.acos((O+W+X-1)/2),this}min(s){return this.x=Math.min(this.x,s.x),this.y=Math.min(this.y,s.y),this.z=Math.min(this.z,s.z),this.w=Math.min(this.w,s.w),this}max(s){return this.x=Math.max(this.x,s.x),this.y=Math.max(this.y,s.y),this.z=Math.max(this.z,s.z),this.w=Math.max(this.w,s.w),this}clamp(s,h){return this.x=Math.max(s.x,Math.min(h.x,this.x)),this.y=Math.max(s.y,Math.min(h.y,this.y)),this.z=Math.max(s.z,Math.min(h.z,this.z)),this.w=Math.max(s.w,Math.min(h.w,this.w)),this}clampScalar(s,h){return this.x=Math.max(s,Math.min(h,this.x)),this.y=Math.max(s,Math.min(h,this.y)),this.z=Math.max(s,Math.min(h,this.z)),this.w=Math.max(s,Math.min(h,this.w)),this}clampLength(s,h){let p=this.length();return this.divideScalar(p||1).multiplyScalar(Math.max(s,Math.min(h,p)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(s){return this.x*s.x+this.y*s.y+this.z*s.z+this.w*s.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(s){return this.normalize().multiplyScalar(s)}lerp(s,h){return this.x+=(s.x-this.x)*h,this.y+=(s.y-this.y)*h,this.z+=(s.z-this.z)*h,this.w+=(s.w-this.w)*h,this}lerpVectors(s,h,p){return this.x=s.x+(h.x-s.x)*p,this.y=s.y+(h.y-s.y)*p,this.z=s.z+(h.z-s.z)*p,this.w=s.w+(h.w-s.w)*p,this}equals(s){return s.x===this.x&&s.y===this.y&&s.z===this.z&&s.w===this.w}fromArray(s,h=0){return this.x=s[h],this.y=s[h+1],this.z=s[h+2],this.w=s[h+3],this}toArray(s=[],h=0){return s[h]=this.x,s[h+1]=this.y,s[h+2]=this.z,s[h+3]=this.w,s}fromBufferAttribute(s,h){return this.x=s.getX(h),this.y=s.getY(h),this.z=s.getZ(h),this.w=s.getW(h),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},Nyt=class extends fS{constructor(s=1,h=1,p={}){super(),this.isRenderTarget=!0,this.width=s,this.height=h,this.depth=1,this.scissor=new $f(0,0,s,h),this.scissorTest=!1,this.viewport=new $f(0,0,s,h);let m={width:s,height:h,depth:1};p.encoding!==void 0&&(wU("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),p.colorSpace=p.encoding===ZA?Pd:wb),p=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:bb,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},p),this.texture=new Kw(m,p.mapping,p.wrapS,p.wrapT,p.magFilter,p.minFilter,p.format,p.type,p.anisotropy,p.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=p.generateMipmaps,this.texture.internalFormat=p.internalFormat,this.depthBuffer=p.depthBuffer,this.stencilBuffer=p.stencilBuffer,this.depthTexture=p.depthTexture,this.samples=p.samples}setSize(s,h,p=1){(this.width!==s||this.height!==h||this.depth!==p)&&(this.width=s,this.height=h,this.depth=p,this.texture.image.width=s,this.texture.image.height=h,this.texture.image.depth=p,this.dispose()),this.viewport.set(0,0,s,h),this.scissor.set(0,0,s,h)}clone(){return new this.constructor().copy(this)}copy(s){this.width=s.width,this.height=s.height,this.depth=s.depth,this.scissor.copy(s.scissor),this.scissorTest=s.scissorTest,this.viewport.copy(s.viewport),this.texture=s.texture.clone(),this.texture.isRenderTargetTexture=!0;let h=Object.assign({},s.texture.image);return this.texture.source=new met(h),this.depthBuffer=s.depthBuffer,this.stencilBuffer=s.stencilBuffer,s.depthTexture!==null&&(this.depthTexture=s.depthTexture.clone()),this.samples=s.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},t3=class extends Nyt{constructor(s=1,h=1,p={}){super(s,h,p),this.isWebGLRenderTarget=!0}},bet=class extends Kw{constructor(s=null,h=1,p=1,m=1){super(null),this.isDataArrayTexture=!0,this.image={data:s,width:h,height:p,depth:m},this.magFilter=r1,this.minFilter=r1,this.wrapR=Zw,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Oyt=class extends Kw{constructor(s=null,h=1,p=1,m=1){super(null),this.isData3DTexture=!0,this.image={data:s,width:h,height:p,depth:m},this.magFilter=r1,this.minFilter=r1,this.wrapR=Zw,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var xy=class{constructor(s=0,h=0,p=0,m=1){this.isQuaternion=!0,this._x=s,this._y=h,this._z=p,this._w=m}static slerpFlat(s,h,p,m,_,E,y){let I=p[m+0],O=p[m+1],B=p[m+2],P=p[m+3],U=_[E+0],W=_[E+1],q=_[E+2],et=_[E+3];if(y===0){s[h+0]=I,s[h+1]=O,s[h+2]=B,s[h+3]=P;return}if(y===1){s[h+0]=U,s[h+1]=W,s[h+2]=q,s[h+3]=et;return}if(P!==et||I!==U||O!==W||B!==q){let Q=1-y,X=I*U+O*W+B*q+P*et,gt=X>=0?1:-1,ft=1-X*X;if(ft>Number.EPSILON){let Bt=Math.sqrt(ft),Ot=Math.atan2(Bt,X*gt);Q=Math.sin(Q*Ot)/Bt,y=Math.sin(y*Ot)/Bt}let xt=y*gt;if(I=I*Q+U*xt,O=O*Q+W*xt,B=B*Q+q*xt,P=P*Q+et*xt,Q===1-y){let Bt=1/Math.sqrt(I*I+O*O+B*B+P*P);I*=Bt,O*=Bt,B*=Bt,P*=Bt}}s[h]=I,s[h+1]=O,s[h+2]=B,s[h+3]=P}static multiplyQuaternionsFlat(s,h,p,m,_,E){let y=p[m],I=p[m+1],O=p[m+2],B=p[m+3],P=_[E],U=_[E+1],W=_[E+2],q=_[E+3];return s[h]=y*q+B*P+I*W-O*U,s[h+1]=I*q+B*U+O*P-y*W,s[h+2]=O*q+B*W+y*U-I*P,s[h+3]=B*q-y*P-I*U-O*W,s}get x(){return this._x}set x(s){this._x=s,this._onChangeCallback()}get y(){return this._y}set y(s){this._y=s,this._onChangeCallback()}get z(){return this._z}set z(s){this._z=s,this._onChangeCallback()}get w(){return this._w}set w(s){this._w=s,this._onChangeCallback()}set(s,h,p,m){return this._x=s,this._y=h,this._z=p,this._w=m,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(s){return this._x=s.x,this._y=s.y,this._z=s.z,this._w=s.w,this._onChangeCallback(),this}setFromEuler(s,h=!0){let p=s._x,m=s._y,_=s._z,E=s._order,y=Math.cos,I=Math.sin,O=y(p/2),B=y(m/2),P=y(_/2),U=I(p/2),W=I(m/2),q=I(_/2);switch(E){case"XYZ":this._x=U*B*P+O*W*q,this._y=O*W*P-U*B*q,this._z=O*B*q+U*W*P,this._w=O*B*P-U*W*q;break;case"YXZ":this._x=U*B*P+O*W*q,this._y=O*W*P-U*B*q,this._z=O*B*q-U*W*P,this._w=O*B*P+U*W*q;break;case"ZXY":this._x=U*B*P-O*W*q,this._y=O*W*P+U*B*q,this._z=O*B*q+U*W*P,this._w=O*B*P-U*W*q;break;case"ZYX":this._x=U*B*P-O*W*q,this._y=O*W*P+U*B*q,this._z=O*B*q-U*W*P,this._w=O*B*P+U*W*q;break;case"YZX":this._x=U*B*P+O*W*q,this._y=O*W*P+U*B*q,this._z=O*B*q-U*W*P,this._w=O*B*P-U*W*q;break;case"XZY":this._x=U*B*P-O*W*q,this._y=O*W*P-U*B*q,this._z=O*B*q+U*W*P,this._w=O*B*P+U*W*q;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+E)}return h===!0&&this._onChangeCallback(),this}setFromAxisAngle(s,h){let p=h/2,m=Math.sin(p);return this._x=s.x*m,this._y=s.y*m,this._z=s.z*m,this._w=Math.cos(p),this._onChangeCallback(),this}setFromRotationMatrix(s){let h=s.elements,p=h[0],m=h[4],_=h[8],E=h[1],y=h[5],I=h[9],O=h[2],B=h[6],P=h[10],U=p+y+P;if(U>0){let W=.5/Math.sqrt(U+1);this._w=.25/W,this._x=(B-I)*W,this._y=(_-O)*W,this._z=(E-m)*W}else if(p>y&&p>P){let W=2*Math.sqrt(1+p-y-P);this._w=(B-I)/W,this._x=.25*W,this._y=(m+E)/W,this._z=(_+O)/W}else if(y>P){let W=2*Math.sqrt(1+y-p-P);this._w=(_-O)/W,this._x=(m+E)/W,this._y=.25*W,this._z=(I+B)/W}else{let W=2*Math.sqrt(1+P-p-y);this._w=(E-m)/W,this._x=(_+O)/W,this._y=(I+B)/W,this._z=.25*W}return this._onChangeCallback(),this}setFromUnitVectors(s,h){let p=s.dot(h)+1;return pMath.abs(s.z)?(this._x=-s.y,this._y=s.x,this._z=0,this._w=p):(this._x=0,this._y=-s.z,this._z=s.y,this._w=p)):(this._x=s.y*h.z-s.z*h.y,this._y=s.z*h.x-s.x*h.z,this._z=s.x*h.y-s.y*h.x,this._w=p),this.normalize()}angleTo(s){return 2*Math.acos(Math.abs(pg(this.dot(s),-1,1)))}rotateTowards(s,h){let p=this.angleTo(s);if(p===0)return this;let m=Math.min(1,h/p);return this.slerp(s,m),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(s){return this._x*s._x+this._y*s._y+this._z*s._z+this._w*s._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let s=this.length();return s===0?(this._x=0,this._y=0,this._z=0,this._w=1):(s=1/s,this._x=this._x*s,this._y=this._y*s,this._z=this._z*s,this._w=this._w*s),this._onChangeCallback(),this}multiply(s){return this.multiplyQuaternions(this,s)}premultiply(s){return this.multiplyQuaternions(s,this)}multiplyQuaternions(s,h){let p=s._x,m=s._y,_=s._z,E=s._w,y=h._x,I=h._y,O=h._z,B=h._w;return this._x=p*B+E*y+m*O-_*I,this._y=m*B+E*I+_*y-p*O,this._z=_*B+E*O+p*I-m*y,this._w=E*B-p*y-m*I-_*O,this._onChangeCallback(),this}slerp(s,h){if(h===0)return this;if(h===1)return this.copy(s);let p=this._x,m=this._y,_=this._z,E=this._w,y=E*s._w+p*s._x+m*s._y+_*s._z;if(y<0?(this._w=-s._w,this._x=-s._x,this._y=-s._y,this._z=-s._z,y=-y):this.copy(s),y>=1)return this._w=E,this._x=p,this._y=m,this._z=_,this;let I=1-y*y;if(I<=Number.EPSILON){let W=1-h;return this._w=W*E+h*this._w,this._x=W*p+h*this._x,this._y=W*m+h*this._y,this._z=W*_+h*this._z,this.normalize(),this}let O=Math.sqrt(I),B=Math.atan2(O,y),P=Math.sin((1-h)*B)/O,U=Math.sin(h*B)/O;return this._w=E*P+this._w*U,this._x=p*P+this._x*U,this._y=m*P+this._y*U,this._z=_*P+this._z*U,this._onChangeCallback(),this}slerpQuaternions(s,h,p){return this.copy(s).slerp(h,p)}random(){let s=Math.random(),h=Math.sqrt(1-s),p=Math.sqrt(s),m=2*Math.PI*Math.random(),_=2*Math.PI*Math.random();return this.set(h*Math.cos(m),p*Math.sin(_),p*Math.cos(_),h*Math.sin(m))}equals(s){return s._x===this._x&&s._y===this._y&&s._z===this._z&&s._w===this._w}fromArray(s,h=0){return this._x=s[h],this._y=s[h+1],this._z=s[h+2],this._w=s[h+3],this._onChangeCallback(),this}toArray(s=[],h=0){return s[h]=this._x,s[h+1]=this._y,s[h+2]=this._z,s[h+3]=this._w,s}fromBufferAttribute(s,h){return this._x=s.getX(h),this._y=s.getY(h),this._z=s.getZ(h),this._w=s.getW(h),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(s){return this._onChangeCallback=s,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},Ge=class d{constructor(s=0,h=0,p=0){d.prototype.isVector3=!0,this.x=s,this.y=h,this.z=p}set(s,h,p){return p===void 0&&(p=this.z),this.x=s,this.y=h,this.z=p,this}setScalar(s){return this.x=s,this.y=s,this.z=s,this}setX(s){return this.x=s,this}setY(s){return this.y=s,this}setZ(s){return this.z=s,this}setComponent(s,h){switch(s){case 0:this.x=h;break;case 1:this.y=h;break;case 2:this.z=h;break;default:throw new Error("index is out of range: "+s)}return this}getComponent(s){switch(s){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+s)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(s){return this.x=s.x,this.y=s.y,this.z=s.z,this}add(s){return this.x+=s.x,this.y+=s.y,this.z+=s.z,this}addScalar(s){return this.x+=s,this.y+=s,this.z+=s,this}addVectors(s,h){return this.x=s.x+h.x,this.y=s.y+h.y,this.z=s.z+h.z,this}addScaledVector(s,h){return this.x+=s.x*h,this.y+=s.y*h,this.z+=s.z*h,this}sub(s){return this.x-=s.x,this.y-=s.y,this.z-=s.z,this}subScalar(s){return this.x-=s,this.y-=s,this.z-=s,this}subVectors(s,h){return this.x=s.x-h.x,this.y=s.y-h.y,this.z=s.z-h.z,this}multiply(s){return this.x*=s.x,this.y*=s.y,this.z*=s.z,this}multiplyScalar(s){return this.x*=s,this.y*=s,this.z*=s,this}multiplyVectors(s,h){return this.x=s.x*h.x,this.y=s.y*h.y,this.z=s.z*h.z,this}applyEuler(s){return this.applyQuaternion(fYt.setFromEuler(s))}applyAxisAngle(s,h){return this.applyQuaternion(fYt.setFromAxisAngle(s,h))}applyMatrix3(s){let h=this.x,p=this.y,m=this.z,_=s.elements;return this.x=_[0]*h+_[3]*p+_[6]*m,this.y=_[1]*h+_[4]*p+_[7]*m,this.z=_[2]*h+_[5]*p+_[8]*m,this}applyNormalMatrix(s){return this.applyMatrix3(s).normalize()}applyMatrix4(s){let h=this.x,p=this.y,m=this.z,_=s.elements,E=1/(_[3]*h+_[7]*p+_[11]*m+_[15]);return this.x=(_[0]*h+_[4]*p+_[8]*m+_[12])*E,this.y=(_[1]*h+_[5]*p+_[9]*m+_[13])*E,this.z=(_[2]*h+_[6]*p+_[10]*m+_[14])*E,this}applyQuaternion(s){let h=this.x,p=this.y,m=this.z,_=s.x,E=s.y,y=s.z,I=s.w,O=2*(E*m-y*p),B=2*(y*h-_*m),P=2*(_*p-E*h);return this.x=h+I*O+E*P-y*B,this.y=p+I*B+y*O-_*P,this.z=m+I*P+_*B-E*O,this}project(s){return this.applyMatrix4(s.matrixWorldInverse).applyMatrix4(s.projectionMatrix)}unproject(s){return this.applyMatrix4(s.projectionMatrixInverse).applyMatrix4(s.matrixWorld)}transformDirection(s){let h=this.x,p=this.y,m=this.z,_=s.elements;return this.x=_[0]*h+_[4]*p+_[8]*m,this.y=_[1]*h+_[5]*p+_[9]*m,this.z=_[2]*h+_[6]*p+_[10]*m,this.normalize()}divide(s){return this.x/=s.x,this.y/=s.y,this.z/=s.z,this}divideScalar(s){return this.multiplyScalar(1/s)}min(s){return this.x=Math.min(this.x,s.x),this.y=Math.min(this.y,s.y),this.z=Math.min(this.z,s.z),this}max(s){return this.x=Math.max(this.x,s.x),this.y=Math.max(this.y,s.y),this.z=Math.max(this.z,s.z),this}clamp(s,h){return this.x=Math.max(s.x,Math.min(h.x,this.x)),this.y=Math.max(s.y,Math.min(h.y,this.y)),this.z=Math.max(s.z,Math.min(h.z,this.z)),this}clampScalar(s,h){return this.x=Math.max(s,Math.min(h,this.x)),this.y=Math.max(s,Math.min(h,this.y)),this.z=Math.max(s,Math.min(h,this.z)),this}clampLength(s,h){let p=this.length();return this.divideScalar(p||1).multiplyScalar(Math.max(s,Math.min(h,p)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(s){return this.x*s.x+this.y*s.y+this.z*s.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(s){return this.normalize().multiplyScalar(s)}lerp(s,h){return this.x+=(s.x-this.x)*h,this.y+=(s.y-this.y)*h,this.z+=(s.z-this.z)*h,this}lerpVectors(s,h,p){return this.x=s.x+(h.x-s.x)*p,this.y=s.y+(h.y-s.y)*p,this.z=s.z+(h.z-s.z)*p,this}cross(s){return this.crossVectors(this,s)}crossVectors(s,h){let p=s.x,m=s.y,_=s.z,E=h.x,y=h.y,I=h.z;return this.x=m*I-_*y,this.y=_*E-p*I,this.z=p*y-m*E,this}projectOnVector(s){let h=s.lengthSq();if(h===0)return this.set(0,0,0);let p=s.dot(this)/h;return this.copy(s).multiplyScalar(p)}projectOnPlane(s){return ryt.copy(this).projectOnVector(s),this.sub(ryt)}reflect(s){return this.sub(ryt.copy(s).multiplyScalar(2*this.dot(s)))}angleTo(s){let h=Math.sqrt(this.lengthSq()*s.lengthSq());if(h===0)return Math.PI/2;let p=this.dot(s)/h;return Math.acos(pg(p,-1,1))}distanceTo(s){return Math.sqrt(this.distanceToSquared(s))}distanceToSquared(s){let h=this.x-s.x,p=this.y-s.y,m=this.z-s.z;return h*h+p*p+m*m}manhattanDistanceTo(s){return Math.abs(this.x-s.x)+Math.abs(this.y-s.y)+Math.abs(this.z-s.z)}setFromSpherical(s){return this.setFromSphericalCoords(s.radius,s.phi,s.theta)}setFromSphericalCoords(s,h,p){let m=Math.sin(h)*s;return this.x=m*Math.sin(p),this.y=Math.cos(h)*s,this.z=m*Math.cos(p),this}setFromCylindrical(s){return this.setFromCylindricalCoords(s.radius,s.theta,s.y)}setFromCylindricalCoords(s,h,p){return this.x=s*Math.sin(h),this.y=p,this.z=s*Math.cos(h),this}setFromMatrixPosition(s){let h=s.elements;return this.x=h[12],this.y=h[13],this.z=h[14],this}setFromMatrixScale(s){let h=this.setFromMatrixColumn(s,0).length(),p=this.setFromMatrixColumn(s,1).length(),m=this.setFromMatrixColumn(s,2).length();return this.x=h,this.y=p,this.z=m,this}setFromMatrixColumn(s,h){return this.fromArray(s.elements,h*4)}setFromMatrix3Column(s,h){return this.fromArray(s.elements,h*3)}setFromEuler(s){return this.x=s._x,this.y=s._y,this.z=s._z,this}setFromColor(s){return this.x=s.r,this.y=s.g,this.z=s.b,this}equals(s){return s.x===this.x&&s.y===this.y&&s.z===this.z}fromArray(s,h=0){return this.x=s[h],this.y=s[h+1],this.z=s[h+2],this}toArray(s=[],h=0){return s[h]=this.x,s[h+1]=this.y,s[h+2]=this.z,s}fromBufferAttribute(s,h){return this.x=s.getX(h),this.y=s.getY(h),this.z=s.getZ(h),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let s=(Math.random()-.5)*2,h=Math.random()*Math.PI*2,p=Math.sqrt(1-s**2);return this.x=p*Math.cos(h),this.y=p*Math.sin(h),this.z=s,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},ryt=new Ge,fYt=new xy,e3=class{constructor(s=new Ge(1/0,1/0,1/0),h=new Ge(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=s,this.max=h}set(s,h){return this.min.copy(s),this.max.copy(h),this}setFromArray(s){this.makeEmpty();for(let h=0,p=s.length;hthis.max.x||s.ythis.max.y||s.zthis.max.z)}containsBox(s){return this.min.x<=s.min.x&&s.max.x<=this.max.x&&this.min.y<=s.min.y&&s.max.y<=this.max.y&&this.min.z<=s.min.z&&s.max.z<=this.max.z}getParameter(s,h){return h.set((s.x-this.min.x)/(this.max.x-this.min.x),(s.y-this.min.y)/(this.max.y-this.min.y),(s.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(s){return!(s.max.xthis.max.x||s.max.ythis.max.y||s.max.zthis.max.z)}intersectsSphere(s){return this.clampPoint(s.center,$w),$w.distanceToSquared(s.center)<=s.radius*s.radius}intersectsPlane(s){let h,p;return s.normal.x>0?(h=s.normal.x*this.min.x,p=s.normal.x*this.max.x):(h=s.normal.x*this.max.x,p=s.normal.x*this.min.x),s.normal.y>0?(h+=s.normal.y*this.min.y,p+=s.normal.y*this.max.y):(h+=s.normal.y*this.max.y,p+=s.normal.y*this.min.y),s.normal.z>0?(h+=s.normal.z*this.min.z,p+=s.normal.z*this.max.z):(h+=s.normal.z*this.max.z,p+=s.normal.z*this.min.z),h<=-s.constant&&p>=-s.constant}intersectsTriangle(s){if(this.isEmpty())return!1;this.getCenter(fU),Rtt.subVectors(this.max,fU),NI.subVectors(s.a,fU),OI.subVectors(s.b,fU),BI.subVectors(s.c,fU),tS.subVectors(OI,NI),eS.subVectors(BI,OI),UA.subVectors(NI,BI);let h=[0,-tS.z,tS.y,0,-eS.z,eS.y,0,-UA.z,UA.y,tS.z,0,-tS.x,eS.z,0,-eS.x,UA.z,0,-UA.x,-tS.y,tS.x,0,-eS.y,eS.x,0,-UA.y,UA.x,0];return!syt(h,NI,OI,BI,Rtt)||(h=[1,0,0,0,1,0,0,0,1],!syt(h,NI,OI,BI,Rtt))?!1:(Dtt.crossVectors(tS,eS),h=[Dtt.x,Dtt.y,Dtt.z],syt(h,NI,OI,BI,Rtt))}clampPoint(s,h){return h.copy(s).clamp(this.min,this.max)}distanceToPoint(s){return this.clampPoint(s,$w).distanceTo(s)}getBoundingSphere(s){return this.isEmpty()?s.makeEmpty():(this.getCenter(s.center),s.radius=this.getSize($w).length()*.5),s}intersect(s){return this.min.max(s.min),this.max.min(s.max),this.isEmpty()&&this.makeEmpty(),this}union(s){return this.min.min(s.min),this.max.max(s.max),this}applyMatrix4(s){return this.isEmpty()?this:($x[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(s),$x[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(s),$x[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(s),$x[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(s),$x[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(s),$x[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(s),$x[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(s),$x[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(s),this.setFromPoints($x),this)}translate(s){return this.min.add(s),this.max.add(s),this}equals(s){return s.min.equals(this.min)&&s.max.equals(this.max)}},$x=[new Ge,new Ge,new Ge,new Ge,new Ge,new Ge,new Ge,new Ge],$w=new Ge,Itt=new e3,NI=new Ge,OI=new Ge,BI=new Ge,tS=new Ge,eS=new Ge,UA=new Ge,fU=new Ge,Rtt=new Ge,Dtt=new Ge,zA=new Ge;function syt(d,s,h,p,m){for(let _=0,E=d.length-3;_<=E;_+=3){zA.fromArray(d,_);let y=m.x*Math.abs(zA.x)+m.y*Math.abs(zA.y)+m.z*Math.abs(zA.z),I=s.dot(zA),O=h.dot(zA),B=p.dot(zA);if(Math.max(-Math.max(I,O,B),Math.min(I,O,B))>y)return!1}return!0}var zEe=new e3,dU=new Ge,oyt=new Ge,dS=class{constructor(s=new Ge,h=-1){this.isSphere=!0,this.center=s,this.radius=h}set(s,h){return this.center.copy(s),this.radius=h,this}setFromPoints(s,h){let p=this.center;h!==void 0?p.copy(h):zEe.setFromPoints(s).getCenter(p);let m=0;for(let _=0,E=s.length;_this.radius*this.radius&&(h.sub(this.center).normalize(),h.multiplyScalar(this.radius).add(this.center)),h}getBoundingBox(s){return this.isEmpty()?(s.makeEmpty(),s):(s.set(this.center,this.center),s.expandByScalar(this.radius),s)}applyMatrix4(s){return this.center.applyMatrix4(s),this.radius=this.radius*s.getMaxScaleOnAxis(),this}translate(s){return this.center.add(s),this}expandByPoint(s){if(this.isEmpty())return this.center.copy(s),this.radius=0,this;dU.subVectors(s,this.center);let h=dU.lengthSq();if(h>this.radius*this.radius){let p=Math.sqrt(h),m=(p-this.radius)*.5;this.center.addScaledVector(dU,m/p),this.radius+=m}return this}union(s){return s.isEmpty()?this:this.isEmpty()?(this.copy(s),this):(this.center.equals(s.center)===!0?this.radius=Math.max(this.radius,s.radius):(oyt.subVectors(s.center,this.center).setLength(s.radius),this.expandByPoint(dU.copy(s.center).add(oyt)),this.expandByPoint(dU.copy(s.center).sub(oyt))),this)}equals(s){return s.center.equals(this.center)&&s.radius===this.radius}clone(){return new this.constructor().copy(this)}},Vx=new Ge,cyt=new Ge,Ntt=new Ge,nS=new Ge,ayt=new Ge,Ott=new Ge,uyt=new Ge,xU=class{constructor(s=new Ge,h=new Ge(0,0,-1)){this.origin=s,this.direction=h}set(s,h){return this.origin.copy(s),this.direction.copy(h),this}copy(s){return this.origin.copy(s.origin),this.direction.copy(s.direction),this}at(s,h){return h.copy(this.origin).addScaledVector(this.direction,s)}lookAt(s){return this.direction.copy(s).sub(this.origin).normalize(),this}recast(s){return this.origin.copy(this.at(s,Vx)),this}closestPointToPoint(s,h){h.subVectors(s,this.origin);let p=h.dot(this.direction);return p<0?h.copy(this.origin):h.copy(this.origin).addScaledVector(this.direction,p)}distanceToPoint(s){return Math.sqrt(this.distanceSqToPoint(s))}distanceSqToPoint(s){let h=Vx.subVectors(s,this.origin).dot(this.direction);return h<0?this.origin.distanceToSquared(s):(Vx.copy(this.origin).addScaledVector(this.direction,h),Vx.distanceToSquared(s))}distanceSqToSegment(s,h,p,m){cyt.copy(s).add(h).multiplyScalar(.5),Ntt.copy(h).sub(s).normalize(),nS.copy(this.origin).sub(cyt);let _=s.distanceTo(h)*.5,E=-this.direction.dot(Ntt),y=nS.dot(this.direction),I=-nS.dot(Ntt),O=nS.lengthSq(),B=Math.abs(1-E*E),P,U,W,q;if(B>0)if(P=E*I-y,U=E*y-I,q=_*B,P>=0)if(U>=-q)if(U<=q){let et=1/B;P*=et,U*=et,W=P*(P+E*U+2*y)+U*(E*P+U+2*I)+O}else U=_,P=Math.max(0,-(E*U+y)),W=-P*P+U*(U+2*I)+O;else U=-_,P=Math.max(0,-(E*U+y)),W=-P*P+U*(U+2*I)+O;else U<=-q?(P=Math.max(0,-(-E*_+y)),U=P>0?-_:Math.min(Math.max(-_,-I),_),W=-P*P+U*(U+2*I)+O):U<=q?(P=0,U=Math.min(Math.max(-_,-I),_),W=U*(U+2*I)+O):(P=Math.max(0,-(E*_+y)),U=P>0?_:Math.min(Math.max(-_,-I),_),W=-P*P+U*(U+2*I)+O);else U=E>0?-_:_,P=Math.max(0,-(E*U+y)),W=-P*P+U*(U+2*I)+O;return p&&p.copy(this.origin).addScaledVector(this.direction,P),m&&m.copy(cyt).addScaledVector(Ntt,U),W}intersectSphere(s,h){Vx.subVectors(s.center,this.origin);let p=Vx.dot(this.direction),m=Vx.dot(Vx)-p*p,_=s.radius*s.radius;if(m>_)return null;let E=Math.sqrt(_-m),y=p-E,I=p+E;return I<0?null:y<0?this.at(I,h):this.at(y,h)}intersectsSphere(s){return this.distanceSqToPoint(s.center)<=s.radius*s.radius}distanceToPlane(s){let h=s.normal.dot(this.direction);if(h===0)return s.distanceToPoint(this.origin)===0?0:null;let p=-(this.origin.dot(s.normal)+s.constant)/h;return p>=0?p:null}intersectPlane(s,h){let p=this.distanceToPlane(s);return p===null?null:this.at(p,h)}intersectsPlane(s){let h=s.distanceToPoint(this.origin);return h===0||s.normal.dot(this.direction)*h<0}intersectBox(s,h){let p,m,_,E,y,I,O=1/this.direction.x,B=1/this.direction.y,P=1/this.direction.z,U=this.origin;return O>=0?(p=(s.min.x-U.x)*O,m=(s.max.x-U.x)*O):(p=(s.max.x-U.x)*O,m=(s.min.x-U.x)*O),B>=0?(_=(s.min.y-U.y)*B,E=(s.max.y-U.y)*B):(_=(s.max.y-U.y)*B,E=(s.min.y-U.y)*B),p>E||_>m||((_>p||isNaN(p))&&(p=_),(E=0?(y=(s.min.z-U.z)*P,I=(s.max.z-U.z)*P):(y=(s.max.z-U.z)*P,I=(s.min.z-U.z)*P),p>I||y>m)||((y>p||p!==p)&&(p=y),(I=0?p:m,h)}intersectsBox(s){return this.intersectBox(s,Vx)!==null}intersectTriangle(s,h,p,m,_){ayt.subVectors(h,s),Ott.subVectors(p,s),uyt.crossVectors(ayt,Ott);let E=this.direction.dot(uyt),y;if(E>0){if(m)return null;y=1}else if(E<0)y=-1,E=-E;else return null;nS.subVectors(this.origin,s);let I=y*this.direction.dot(Ott.crossVectors(nS,Ott));if(I<0)return null;let O=y*this.direction.dot(ayt.cross(nS));if(O<0||I+O>E)return null;let B=-y*nS.dot(uyt);return B<0?null:this.at(B/E,_)}applyMatrix4(s){return this.origin.applyMatrix4(s),this.direction.transformDirection(s),this}equals(s){return s.origin.equals(this.origin)&&s.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},Fu=class d{constructor(s,h,p,m,_,E,y,I,O,B,P,U,W,q,et,Q){d.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],s!==void 0&&this.set(s,h,p,m,_,E,y,I,O,B,P,U,W,q,et,Q)}set(s,h,p,m,_,E,y,I,O,B,P,U,W,q,et,Q){let X=this.elements;return X[0]=s,X[4]=h,X[8]=p,X[12]=m,X[1]=_,X[5]=E,X[9]=y,X[13]=I,X[2]=O,X[6]=B,X[10]=P,X[14]=U,X[3]=W,X[7]=q,X[11]=et,X[15]=Q,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new d().fromArray(this.elements)}copy(s){let h=this.elements,p=s.elements;return h[0]=p[0],h[1]=p[1],h[2]=p[2],h[3]=p[3],h[4]=p[4],h[5]=p[5],h[6]=p[6],h[7]=p[7],h[8]=p[8],h[9]=p[9],h[10]=p[10],h[11]=p[11],h[12]=p[12],h[13]=p[13],h[14]=p[14],h[15]=p[15],this}copyPosition(s){let h=this.elements,p=s.elements;return h[12]=p[12],h[13]=p[13],h[14]=p[14],this}setFromMatrix3(s){let h=s.elements;return this.set(h[0],h[3],h[6],0,h[1],h[4],h[7],0,h[2],h[5],h[8],0,0,0,0,1),this}extractBasis(s,h,p){return s.setFromMatrixColumn(this,0),h.setFromMatrixColumn(this,1),p.setFromMatrixColumn(this,2),this}makeBasis(s,h,p){return this.set(s.x,h.x,p.x,0,s.y,h.y,p.y,0,s.z,h.z,p.z,0,0,0,0,1),this}extractRotation(s){let h=this.elements,p=s.elements,m=1/FI.setFromMatrixColumn(s,0).length(),_=1/FI.setFromMatrixColumn(s,1).length(),E=1/FI.setFromMatrixColumn(s,2).length();return h[0]=p[0]*m,h[1]=p[1]*m,h[2]=p[2]*m,h[3]=0,h[4]=p[4]*_,h[5]=p[5]*_,h[6]=p[6]*_,h[7]=0,h[8]=p[8]*E,h[9]=p[9]*E,h[10]=p[10]*E,h[11]=0,h[12]=0,h[13]=0,h[14]=0,h[15]=1,this}makeRotationFromEuler(s){let h=this.elements,p=s.x,m=s.y,_=s.z,E=Math.cos(p),y=Math.sin(p),I=Math.cos(m),O=Math.sin(m),B=Math.cos(_),P=Math.sin(_);if(s.order==="XYZ"){let U=E*B,W=E*P,q=y*B,et=y*P;h[0]=I*B,h[4]=-I*P,h[8]=O,h[1]=W+q*O,h[5]=U-et*O,h[9]=-y*I,h[2]=et-U*O,h[6]=q+W*O,h[10]=E*I}else if(s.order==="YXZ"){let U=I*B,W=I*P,q=O*B,et=O*P;h[0]=U+et*y,h[4]=q*y-W,h[8]=E*O,h[1]=E*P,h[5]=E*B,h[9]=-y,h[2]=W*y-q,h[6]=et+U*y,h[10]=E*I}else if(s.order==="ZXY"){let U=I*B,W=I*P,q=O*B,et=O*P;h[0]=U-et*y,h[4]=-E*P,h[8]=q+W*y,h[1]=W+q*y,h[5]=E*B,h[9]=et-U*y,h[2]=-E*O,h[6]=y,h[10]=E*I}else if(s.order==="ZYX"){let U=E*B,W=E*P,q=y*B,et=y*P;h[0]=I*B,h[4]=q*O-W,h[8]=U*O+et,h[1]=I*P,h[5]=et*O+U,h[9]=W*O-q,h[2]=-O,h[6]=y*I,h[10]=E*I}else if(s.order==="YZX"){let U=E*I,W=E*O,q=y*I,et=y*O;h[0]=I*B,h[4]=et-U*P,h[8]=q*P+W,h[1]=P,h[5]=E*B,h[9]=-y*B,h[2]=-O*B,h[6]=W*P+q,h[10]=U-et*P}else if(s.order==="XZY"){let U=E*I,W=E*O,q=y*I,et=y*O;h[0]=I*B,h[4]=-P,h[8]=O*B,h[1]=U*P+et,h[5]=E*B,h[9]=W*P-q,h[2]=q*P-W,h[6]=y*B,h[10]=et*P+U}return h[3]=0,h[7]=0,h[11]=0,h[12]=0,h[13]=0,h[14]=0,h[15]=1,this}makeRotationFromQuaternion(s){return this.compose(jEe,s,HEe)}lookAt(s,h,p){let m=this.elements;return I0.subVectors(s,h),I0.lengthSq()===0&&(I0.z=1),I0.normalize(),iS.crossVectors(p,I0),iS.lengthSq()===0&&(Math.abs(p.z)===1?I0.x+=1e-4:I0.z+=1e-4,I0.normalize(),iS.crossVectors(p,I0)),iS.normalize(),Btt.crossVectors(I0,iS),m[0]=iS.x,m[4]=Btt.x,m[8]=I0.x,m[1]=iS.y,m[5]=Btt.y,m[9]=I0.y,m[2]=iS.z,m[6]=Btt.z,m[10]=I0.z,this}multiply(s){return this.multiplyMatrices(this,s)}premultiply(s){return this.multiplyMatrices(s,this)}multiplyMatrices(s,h){let p=s.elements,m=h.elements,_=this.elements,E=p[0],y=p[4],I=p[8],O=p[12],B=p[1],P=p[5],U=p[9],W=p[13],q=p[2],et=p[6],Q=p[10],X=p[14],gt=p[3],ft=p[7],xt=p[11],Bt=p[15],Ot=m[0],Pt=m[4],se=m[8],ot=m[12],Lt=m[1],be=m[5],ln=m[9],Fn=m[13],ne=m[2],xe=m[6],re=m[10],hn=m[14],Se=m[3],ke=m[7],mn=m[11],en=m[15];return _[0]=E*Ot+y*Lt+I*ne+O*Se,_[4]=E*Pt+y*be+I*xe+O*ke,_[8]=E*se+y*ln+I*re+O*mn,_[12]=E*ot+y*Fn+I*hn+O*en,_[1]=B*Ot+P*Lt+U*ne+W*Se,_[5]=B*Pt+P*be+U*xe+W*ke,_[9]=B*se+P*ln+U*re+W*mn,_[13]=B*ot+P*Fn+U*hn+W*en,_[2]=q*Ot+et*Lt+Q*ne+X*Se,_[6]=q*Pt+et*be+Q*xe+X*ke,_[10]=q*se+et*ln+Q*re+X*mn,_[14]=q*ot+et*Fn+Q*hn+X*en,_[3]=gt*Ot+ft*Lt+xt*ne+Bt*Se,_[7]=gt*Pt+ft*be+xt*xe+Bt*ke,_[11]=gt*se+ft*ln+xt*re+Bt*mn,_[15]=gt*ot+ft*Fn+xt*hn+Bt*en,this}multiplyScalar(s){let h=this.elements;return h[0]*=s,h[4]*=s,h[8]*=s,h[12]*=s,h[1]*=s,h[5]*=s,h[9]*=s,h[13]*=s,h[2]*=s,h[6]*=s,h[10]*=s,h[14]*=s,h[3]*=s,h[7]*=s,h[11]*=s,h[15]*=s,this}determinant(){let s=this.elements,h=s[0],p=s[4],m=s[8],_=s[12],E=s[1],y=s[5],I=s[9],O=s[13],B=s[2],P=s[6],U=s[10],W=s[14],q=s[3],et=s[7],Q=s[11],X=s[15];return q*(+_*I*P-m*O*P-_*y*U+p*O*U+m*y*W-p*I*W)+et*(+h*I*W-h*O*U+_*E*U-m*E*W+m*O*B-_*I*B)+Q*(+h*O*P-h*y*W-_*E*P+p*E*W+_*y*B-p*O*B)+X*(-m*y*B-h*I*P+h*y*U+m*E*P-p*E*U+p*I*B)}transpose(){let s=this.elements,h;return h=s[1],s[1]=s[4],s[4]=h,h=s[2],s[2]=s[8],s[8]=h,h=s[6],s[6]=s[9],s[9]=h,h=s[3],s[3]=s[12],s[12]=h,h=s[7],s[7]=s[13],s[13]=h,h=s[11],s[11]=s[14],s[14]=h,this}setPosition(s,h,p){let m=this.elements;return s.isVector3?(m[12]=s.x,m[13]=s.y,m[14]=s.z):(m[12]=s,m[13]=h,m[14]=p),this}invert(){let s=this.elements,h=s[0],p=s[1],m=s[2],_=s[3],E=s[4],y=s[5],I=s[6],O=s[7],B=s[8],P=s[9],U=s[10],W=s[11],q=s[12],et=s[13],Q=s[14],X=s[15],gt=P*Q*O-et*U*O+et*I*W-y*Q*W-P*I*X+y*U*X,ft=q*U*O-B*Q*O-q*I*W+E*Q*W+B*I*X-E*U*X,xt=B*et*O-q*P*O+q*y*W-E*et*W-B*y*X+E*P*X,Bt=q*P*I-B*et*I-q*y*U+E*et*U+B*y*Q-E*P*Q,Ot=h*gt+p*ft+m*xt+_*Bt;if(Ot===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let Pt=1/Ot;return s[0]=gt*Pt,s[1]=(et*U*_-P*Q*_-et*m*W+p*Q*W+P*m*X-p*U*X)*Pt,s[2]=(y*Q*_-et*I*_+et*m*O-p*Q*O-y*m*X+p*I*X)*Pt,s[3]=(P*I*_-y*U*_-P*m*O+p*U*O+y*m*W-p*I*W)*Pt,s[4]=ft*Pt,s[5]=(B*Q*_-q*U*_+q*m*W-h*Q*W-B*m*X+h*U*X)*Pt,s[6]=(q*I*_-E*Q*_-q*m*O+h*Q*O+E*m*X-h*I*X)*Pt,s[7]=(E*U*_-B*I*_+B*m*O-h*U*O-E*m*W+h*I*W)*Pt,s[8]=xt*Pt,s[9]=(q*P*_-B*et*_-q*p*W+h*et*W+B*p*X-h*P*X)*Pt,s[10]=(E*et*_-q*y*_+q*p*O-h*et*O-E*p*X+h*y*X)*Pt,s[11]=(B*y*_-E*P*_-B*p*O+h*P*O+E*p*W-h*y*W)*Pt,s[12]=Bt*Pt,s[13]=(B*et*m-q*P*m+q*p*U-h*et*U-B*p*Q+h*P*Q)*Pt,s[14]=(q*y*m-E*et*m-q*p*I+h*et*I+E*p*Q-h*y*Q)*Pt,s[15]=(E*P*m-B*y*m+B*p*I-h*P*I-E*p*U+h*y*U)*Pt,this}scale(s){let h=this.elements,p=s.x,m=s.y,_=s.z;return h[0]*=p,h[4]*=m,h[8]*=_,h[1]*=p,h[5]*=m,h[9]*=_,h[2]*=p,h[6]*=m,h[10]*=_,h[3]*=p,h[7]*=m,h[11]*=_,this}getMaxScaleOnAxis(){let s=this.elements,h=s[0]*s[0]+s[1]*s[1]+s[2]*s[2],p=s[4]*s[4]+s[5]*s[5]+s[6]*s[6],m=s[8]*s[8]+s[9]*s[9]+s[10]*s[10];return Math.sqrt(Math.max(h,p,m))}makeTranslation(s,h,p){return s.isVector3?this.set(1,0,0,s.x,0,1,0,s.y,0,0,1,s.z,0,0,0,1):this.set(1,0,0,s,0,1,0,h,0,0,1,p,0,0,0,1),this}makeRotationX(s){let h=Math.cos(s),p=Math.sin(s);return this.set(1,0,0,0,0,h,-p,0,0,p,h,0,0,0,0,1),this}makeRotationY(s){let h=Math.cos(s),p=Math.sin(s);return this.set(h,0,p,0,0,1,0,0,-p,0,h,0,0,0,0,1),this}makeRotationZ(s){let h=Math.cos(s),p=Math.sin(s);return this.set(h,-p,0,0,p,h,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(s,h){let p=Math.cos(h),m=Math.sin(h),_=1-p,E=s.x,y=s.y,I=s.z,O=_*E,B=_*y;return this.set(O*E+p,O*y-m*I,O*I+m*y,0,O*y+m*I,B*y+p,B*I-m*E,0,O*I-m*y,B*I+m*E,_*I*I+p,0,0,0,0,1),this}makeScale(s,h,p){return this.set(s,0,0,0,0,h,0,0,0,0,p,0,0,0,0,1),this}makeShear(s,h,p,m,_,E){return this.set(1,p,_,0,s,1,E,0,h,m,1,0,0,0,0,1),this}compose(s,h,p){let m=this.elements,_=h._x,E=h._y,y=h._z,I=h._w,O=_+_,B=E+E,P=y+y,U=_*O,W=_*B,q=_*P,et=E*B,Q=E*P,X=y*P,gt=I*O,ft=I*B,xt=I*P,Bt=p.x,Ot=p.y,Pt=p.z;return m[0]=(1-(et+X))*Bt,m[1]=(W+xt)*Bt,m[2]=(q-ft)*Bt,m[3]=0,m[4]=(W-xt)*Ot,m[5]=(1-(U+X))*Ot,m[6]=(Q+gt)*Ot,m[7]=0,m[8]=(q+ft)*Pt,m[9]=(Q-gt)*Pt,m[10]=(1-(U+et))*Pt,m[11]=0,m[12]=s.x,m[13]=s.y,m[14]=s.z,m[15]=1,this}decompose(s,h,p){let m=this.elements,_=FI.set(m[0],m[1],m[2]).length(),E=FI.set(m[4],m[5],m[6]).length(),y=FI.set(m[8],m[9],m[10]).length();this.determinant()<0&&(_=-_),s.x=m[12],s.y=m[13],s.z=m[14],Vw.copy(this);let O=1/_,B=1/E,P=1/y;return Vw.elements[0]*=O,Vw.elements[1]*=O,Vw.elements[2]*=O,Vw.elements[4]*=B,Vw.elements[5]*=B,Vw.elements[6]*=B,Vw.elements[8]*=P,Vw.elements[9]*=P,Vw.elements[10]*=P,h.setFromRotationMatrix(Vw),p.x=_,p.y=E,p.z=y,this}makePerspective(s,h,p,m,_,E,y=Jx){let I=this.elements,O=2*_/(h-s),B=2*_/(p-m),P=(h+s)/(h-s),U=(p+m)/(p-m),W,q;if(y===Jx)W=-(E+_)/(E-_),q=-2*E*_/(E-_);else if(y===det)W=-E/(E-_),q=-E*_/(E-_);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+y);return I[0]=O,I[4]=0,I[8]=P,I[12]=0,I[1]=0,I[5]=B,I[9]=U,I[13]=0,I[2]=0,I[6]=0,I[10]=W,I[14]=q,I[3]=0,I[7]=0,I[11]=-1,I[15]=0,this}makeOrthographic(s,h,p,m,_,E,y=Jx){let I=this.elements,O=1/(h-s),B=1/(p-m),P=1/(E-_),U=(h+s)*O,W=(p+m)*B,q,et;if(y===Jx)q=(E+_)*P,et=-2*P;else if(y===det)q=_*P,et=-1*P;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+y);return I[0]=2*O,I[4]=0,I[8]=0,I[12]=-U,I[1]=0,I[5]=2*B,I[9]=0,I[13]=-W,I[2]=0,I[6]=0,I[10]=et,I[14]=-q,I[3]=0,I[7]=0,I[11]=0,I[15]=1,this}equals(s){let h=this.elements,p=s.elements;for(let m=0;m<16;m++)if(h[m]!==p[m])return!1;return!0}fromArray(s,h=0){for(let p=0;p<16;p++)this.elements[p]=s[p+h];return this}toArray(s=[],h=0){let p=this.elements;return s[h]=p[0],s[h+1]=p[1],s[h+2]=p[2],s[h+3]=p[3],s[h+4]=p[4],s[h+5]=p[5],s[h+6]=p[6],s[h+7]=p[7],s[h+8]=p[8],s[h+9]=p[9],s[h+10]=p[10],s[h+11]=p[11],s[h+12]=p[12],s[h+13]=p[13],s[h+14]=p[14],s[h+15]=p[15],s}},FI=new Ge,Vw=new Fu,jEe=new Ge(0,0,0),HEe=new Ge(1,1,1),iS=new Ge,Btt=new Ge,I0=new Ge,dYt=new Fu,pYt=new xy,wet=class d{constructor(s=0,h=0,p=0,m=d.DEFAULT_ORDER){this.isEuler=!0,this._x=s,this._y=h,this._z=p,this._order=m}get x(){return this._x}set x(s){this._x=s,this._onChangeCallback()}get y(){return this._y}set y(s){this._y=s,this._onChangeCallback()}get z(){return this._z}set z(s){this._z=s,this._onChangeCallback()}get order(){return this._order}set order(s){this._order=s,this._onChangeCallback()}set(s,h,p,m=this._order){return this._x=s,this._y=h,this._z=p,this._order=m,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(s){return this._x=s._x,this._y=s._y,this._z=s._z,this._order=s._order,this._onChangeCallback(),this}setFromRotationMatrix(s,h=this._order,p=!0){let m=s.elements,_=m[0],E=m[4],y=m[8],I=m[1],O=m[5],B=m[9],P=m[2],U=m[6],W=m[10];switch(h){case"XYZ":this._y=Math.asin(pg(y,-1,1)),Math.abs(y)<.9999999?(this._x=Math.atan2(-B,W),this._z=Math.atan2(-E,_)):(this._x=Math.atan2(U,O),this._z=0);break;case"YXZ":this._x=Math.asin(-pg(B,-1,1)),Math.abs(B)<.9999999?(this._y=Math.atan2(y,W),this._z=Math.atan2(I,O)):(this._y=Math.atan2(-P,_),this._z=0);break;case"ZXY":this._x=Math.asin(pg(U,-1,1)),Math.abs(U)<.9999999?(this._y=Math.atan2(-P,W),this._z=Math.atan2(-E,O)):(this._y=0,this._z=Math.atan2(I,_));break;case"ZYX":this._y=Math.asin(-pg(P,-1,1)),Math.abs(P)<.9999999?(this._x=Math.atan2(U,W),this._z=Math.atan2(I,_)):(this._x=0,this._z=Math.atan2(-E,O));break;case"YZX":this._z=Math.asin(pg(I,-1,1)),Math.abs(I)<.9999999?(this._x=Math.atan2(-B,O),this._y=Math.atan2(-P,_)):(this._x=0,this._y=Math.atan2(y,W));break;case"XZY":this._z=Math.asin(-pg(E,-1,1)),Math.abs(E)<.9999999?(this._x=Math.atan2(U,O),this._y=Math.atan2(y,_)):(this._x=Math.atan2(-B,W),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+h)}return this._order=h,p===!0&&this._onChangeCallback(),this}setFromQuaternion(s,h,p){return dYt.makeRotationFromQuaternion(s),this.setFromRotationMatrix(dYt,h,p)}setFromVector3(s,h=this._order){return this.set(s.x,s.y,s.z,h)}reorder(s){return pYt.setFromEuler(this),this.setFromQuaternion(pYt,s)}equals(s){return s._x===this._x&&s._y===this._y&&s._z===this._z&&s._order===this._order}fromArray(s){return this._x=s[0],this._y=s[1],this._z=s[2],s[3]!==void 0&&(this._order=s[3]),this._onChangeCallback(),this}toArray(s=[],h=0){return s[h]=this._x,s[h+1]=this._y,s[h+2]=this._z,s[h+3]=this._order,s}_onChange(s){return this._onChangeCallback=s,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};wet.DEFAULT_ORDER="XYZ";var MU=class{constructor(){this.mask=1}set(s){this.mask=(1<>>0}enable(s){this.mask|=1<1){for(let h=0;h1){for(let p=0;p0&&(m.userData=this.userData),m.layers=this.layers.mask,m.matrix=this.matrix.toArray(),m.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(m.matrixAutoUpdate=!1),this.isInstancedMesh&&(m.type="InstancedMesh",m.count=this.count,m.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(m.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(m.type="BatchedMesh",m.perObjectFrustumCulled=this.perObjectFrustumCulled,m.sortObjects=this.sortObjects,m.drawRanges=this._drawRanges,m.reservedRanges=this._reservedRanges,m.visibility=this._visibility,m.active=this._active,m.bounds=this._bounds.map(y=>({boxInitialized:y.boxInitialized,boxMin:y.box.min.toArray(),boxMax:y.box.max.toArray(),sphereInitialized:y.sphereInitialized,sphereRadius:y.sphere.radius,sphereCenter:y.sphere.center.toArray()})),m.maxGeometryCount=this._maxGeometryCount,m.maxVertexCount=this._maxVertexCount,m.maxIndexCount=this._maxIndexCount,m.geometryInitialized=this._geometryInitialized,m.geometryCount=this._geometryCount,m.matricesTexture=this._matricesTexture.toJSON(s),this.boundingSphere!==null&&(m.boundingSphere={center:m.boundingSphere.center.toArray(),radius:m.boundingSphere.radius}),this.boundingBox!==null&&(m.boundingBox={min:m.boundingBox.min.toArray(),max:m.boundingBox.max.toArray()}));function _(y,I){return y[I.uuid]===void 0&&(y[I.uuid]=I.toJSON(s)),I.uuid}if(this.isScene)this.background&&(this.background.isColor?m.background=this.background.toJSON():this.background.isTexture&&(m.background=this.background.toJSON(s).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(m.environment=this.environment.toJSON(s).uuid);else if(this.isMesh||this.isLine||this.isPoints){m.geometry=_(s.geometries,this.geometry);let y=this.geometry.parameters;if(y!==void 0&&y.shapes!==void 0){let I=y.shapes;if(Array.isArray(I))for(let O=0,B=I.length;O0){m.children=[];for(let y=0;y0){m.animations=[];for(let y=0;y0&&(p.geometries=y),I.length>0&&(p.materials=I),O.length>0&&(p.textures=O),B.length>0&&(p.images=B),P.length>0&&(p.shapes=P),U.length>0&&(p.skeletons=U),W.length>0&&(p.animations=W),q.length>0&&(p.nodes=q)}return p.object=m,p;function E(y){let I=[];for(let O in y){let B=y[O];delete B.metadata,I.push(B)}return I}}clone(s){return new this.constructor().copy(this,s)}copy(s,h=!0){if(this.name=s.name,this.up.copy(s.up),this.position.copy(s.position),this.rotation.order=s.rotation.order,this.quaternion.copy(s.quaternion),this.scale.copy(s.scale),this.matrix.copy(s.matrix),this.matrixWorld.copy(s.matrixWorld),this.matrixAutoUpdate=s.matrixAutoUpdate,this.matrixWorldAutoUpdate=s.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=s.matrixWorldNeedsUpdate,this.layers.mask=s.layers.mask,this.visible=s.visible,this.castShadow=s.castShadow,this.receiveShadow=s.receiveShadow,this.frustumCulled=s.frustumCulled,this.renderOrder=s.renderOrder,this.animations=s.animations.slice(),this.userData=JSON.parse(JSON.stringify(s.userData)),h===!0)for(let p=0;p0?m.multiplyScalar(1/Math.sqrt(_)):m.set(0,0,0)}static getBarycoord(s,h,p,m,_){qw.subVectors(m,h),Xx.subVectors(p,h),lyt.subVectors(s,h);let E=qw.dot(qw),y=qw.dot(Xx),I=qw.dot(lyt),O=Xx.dot(Xx),B=Xx.dot(lyt),P=E*O-y*y;if(P===0)return _.set(0,0,0),null;let U=1/P,W=(O*I-y*B)*U,q=(E*B-y*I)*U;return _.set(1-W-q,q,W)}static containsPoint(s,h,p,m){return this.getBarycoord(s,h,p,m,Zx)===null?!1:Zx.x>=0&&Zx.y>=0&&Zx.x+Zx.y<=1}static getUV(s,h,p,m,_,E,y,I){return Utt===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Utt=!0),this.getInterpolation(s,h,p,m,_,E,y,I)}static getInterpolation(s,h,p,m,_,E,y,I){return this.getBarycoord(s,h,p,m,Zx)===null?(I.x=0,I.y=0,"z"in I&&(I.z=0),"w"in I&&(I.w=0),null):(I.setScalar(0),I.addScaledVector(_,Zx.x),I.addScaledVector(E,Zx.y),I.addScaledVector(y,Zx.z),I)}static isFrontFacing(s,h,p,m){return qw.subVectors(p,h),Xx.subVectors(s,h),qw.cross(Xx).dot(m)<0}set(s,h,p){return this.a.copy(s),this.b.copy(h),this.c.copy(p),this}setFromPointsAndIndices(s,h,p,m){return this.a.copy(s[h]),this.b.copy(s[p]),this.c.copy(s[m]),this}setFromAttributeAndIndices(s,h,p,m){return this.a.fromBufferAttribute(s,h),this.b.fromBufferAttribute(s,p),this.c.fromBufferAttribute(s,m),this}clone(){return new this.constructor().copy(this)}copy(s){return this.a.copy(s.a),this.b.copy(s.b),this.c.copy(s.c),this}getArea(){return qw.subVectors(this.c,this.b),Xx.subVectors(this.a,this.b),qw.cross(Xx).length()*.5}getMidpoint(s){return s.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(s){return d.getNormal(this.a,this.b,this.c,s)}getPlane(s){return s.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(s,h){return d.getBarycoord(s,this.a,this.b,this.c,h)}getUV(s,h,p,m,_){return Utt===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Utt=!0),d.getInterpolation(s,this.a,this.b,this.c,h,p,m,_)}getInterpolation(s,h,p,m,_){return d.getInterpolation(s,this.a,this.b,this.c,h,p,m,_)}containsPoint(s){return d.containsPoint(s,this.a,this.b,this.c)}isFrontFacing(s){return d.isFrontFacing(this.a,this.b,this.c,s)}intersectsBox(s){return s.intersectsTriangle(this)}closestPointToPoint(s,h){let p=this.a,m=this.b,_=this.c,E,y;zI.subVectors(m,p),jI.subVectors(_,p),hyt.subVectors(s,p);let I=zI.dot(hyt),O=jI.dot(hyt);if(I<=0&&O<=0)return h.copy(p);fyt.subVectors(s,m);let B=zI.dot(fyt),P=jI.dot(fyt);if(B>=0&&P<=B)return h.copy(m);let U=I*P-B*O;if(U<=0&&I>=0&&B<=0)return E=I/(I-B),h.copy(p).addScaledVector(zI,E);dyt.subVectors(s,_);let W=zI.dot(dyt),q=jI.dot(dyt);if(q>=0&&W<=q)return h.copy(_);let et=W*O-I*q;if(et<=0&&O>=0&&q<=0)return y=O/(O-q),h.copy(p).addScaledVector(jI,y);let Q=B*q-W*P;if(Q<=0&&P-B>=0&&W-q>=0)return vYt.subVectors(_,m),y=(P-B)/(P-B+(W-q)),h.copy(m).addScaledVector(vYt,y);let X=1/(Q+et+U);return E=et*X,y=U*X,h.copy(p).addScaledVector(zI,E).addScaledVector(jI,y)}equals(s){return s.a.equals(this.a)&&s.b.equals(this.b)&&s.c.equals(this.c)}},gKt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},rS={h:0,s:0,l:0},ztt={h:0,s:0,l:0};function pyt(d,s,h){return h<0&&(h+=1),h>1&&(h-=1),h<1/6?d+(s-d)*6*h:h<1/2?s:h<2/3?d+(s-d)*6*(2/3-h):d}var Go=class{constructor(s,h,p){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(s,h,p)}set(s,h,p){if(h===void 0&&p===void 0){let m=s;m&&m.isColor?this.copy(m):typeof m=="number"?this.setHex(m):typeof m=="string"&&this.setStyle(m)}else this.setRGB(s,h,p);return this}setScalar(s){return this.r=s,this.g=s,this.b=s,this}setHex(s,h=Pd){return s=Math.floor(s),this.r=(s>>16&255)/255,this.g=(s>>8&255)/255,this.b=(s&255)/255,Na.toWorkingColorSpace(this,h),this}setRGB(s,h,p,m=Na.workingColorSpace){return this.r=s,this.g=h,this.b=p,Na.toWorkingColorSpace(this,m),this}setHSL(s,h,p,m=Na.workingColorSpace){if(s=NEe(s,1),h=pg(h,0,1),p=pg(p,0,1),h===0)this.r=this.g=this.b=p;else{let _=p<=.5?p*(1+h):p+h-p*h,E=2*p-_;this.r=pyt(E,_,s+1/3),this.g=pyt(E,_,s),this.b=pyt(E,_,s-1/3)}return Na.toWorkingColorSpace(this,m),this}setStyle(s,h=Pd){function p(_){_!==void 0&&parseFloat(_)<1&&console.warn("THREE.Color: Alpha component of "+s+" will be ignored.")}let m;if(m=/^(\w+)\(([^\)]*)\)/.exec(s)){let _,E=m[1],y=m[2];switch(E){case"rgb":case"rgba":if(_=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(y))return p(_[4]),this.setRGB(Math.min(255,parseInt(_[1],10))/255,Math.min(255,parseInt(_[2],10))/255,Math.min(255,parseInt(_[3],10))/255,h);if(_=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(y))return p(_[4]),this.setRGB(Math.min(100,parseInt(_[1],10))/100,Math.min(100,parseInt(_[2],10))/100,Math.min(100,parseInt(_[3],10))/100,h);break;case"hsl":case"hsla":if(_=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(y))return p(_[4]),this.setHSL(parseFloat(_[1])/360,parseFloat(_[2])/100,parseFloat(_[3])/100,h);break;default:console.warn("THREE.Color: Unknown color model "+s)}}else if(m=/^\#([A-Fa-f\d]+)$/.exec(s)){let _=m[1],E=_.length;if(E===3)return this.setRGB(parseInt(_.charAt(0),16)/15,parseInt(_.charAt(1),16)/15,parseInt(_.charAt(2),16)/15,h);if(E===6)return this.setHex(parseInt(_,16),h);console.warn("THREE.Color: Invalid hex color "+s)}else if(s&&s.length>0)return this.setColorName(s,h);return this}setColorName(s,h=Pd){let p=gKt[s.toLowerCase()];return p!==void 0?this.setHex(p,h):console.warn("THREE.Color: Unknown color "+s),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(s){return this.r=s.r,this.g=s.g,this.b=s.b,this}copySRGBToLinear(s){return this.r=QI(s.r),this.g=QI(s.g),this.b=QI(s.b),this}copyLinearToSRGB(s){return this.r=nyt(s.r),this.g=nyt(s.g),this.b=nyt(s.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(s=Pd){return Na.fromWorkingColorSpace(mp.copy(this),s),Math.round(pg(mp.r*255,0,255))*65536+Math.round(pg(mp.g*255,0,255))*256+Math.round(pg(mp.b*255,0,255))}getHexString(s=Pd){return("000000"+this.getHex(s).toString(16)).slice(-6)}getHSL(s,h=Na.workingColorSpace){Na.fromWorkingColorSpace(mp.copy(this),h);let p=mp.r,m=mp.g,_=mp.b,E=Math.max(p,m,_),y=Math.min(p,m,_),I,O,B=(y+E)/2;if(y===E)I=0,O=0;else{let P=E-y;switch(O=B<=.5?P/(E+y):P/(2-E-y),E){case p:I=(m-_)/P+(m<_?6:0);break;case m:I=(_-p)/P+2;break;case _:I=(p-m)/P+4;break}I/=6}return s.h=I,s.s=O,s.l=B,s}getRGB(s,h=Na.workingColorSpace){return Na.fromWorkingColorSpace(mp.copy(this),h),s.r=mp.r,s.g=mp.g,s.b=mp.b,s}getStyle(s=Pd){Na.fromWorkingColorSpace(mp.copy(this),s);let h=mp.r,p=mp.g,m=mp.b;return s!==Pd?`color(${s} ${h.toFixed(3)} ${p.toFixed(3)} ${m.toFixed(3)})`:`rgb(${Math.round(h*255)},${Math.round(p*255)},${Math.round(m*255)})`}offsetHSL(s,h,p){return this.getHSL(rS),this.setHSL(rS.h+s,rS.s+h,rS.l+p)}add(s){return this.r+=s.r,this.g+=s.g,this.b+=s.b,this}addColors(s,h){return this.r=s.r+h.r,this.g=s.g+h.g,this.b=s.b+h.b,this}addScalar(s){return this.r+=s,this.g+=s,this.b+=s,this}sub(s){return this.r=Math.max(0,this.r-s.r),this.g=Math.max(0,this.g-s.g),this.b=Math.max(0,this.b-s.b),this}multiply(s){return this.r*=s.r,this.g*=s.g,this.b*=s.b,this}multiplyScalar(s){return this.r*=s,this.g*=s,this.b*=s,this}lerp(s,h){return this.r+=(s.r-this.r)*h,this.g+=(s.g-this.g)*h,this.b+=(s.b-this.b)*h,this}lerpColors(s,h,p){return this.r=s.r+(h.r-s.r)*p,this.g=s.g+(h.g-s.g)*p,this.b=s.b+(h.b-s.b)*p,this}lerpHSL(s,h){this.getHSL(rS),s.getHSL(ztt);let p=tyt(rS.h,ztt.h,h),m=tyt(rS.s,ztt.s,h),_=tyt(rS.l,ztt.l,h);return this.setHSL(p,m,_),this}setFromVector3(s){return this.r=s.x,this.g=s.y,this.b=s.z,this}applyMatrix3(s){let h=this.r,p=this.g,m=this.b,_=s.elements;return this.r=_[0]*h+_[3]*p+_[6]*m,this.g=_[1]*h+_[4]*p+_[7]*m,this.b=_[2]*h+_[5]*p+_[8]*m,this}equals(s){return s.r===this.r&&s.g===this.g&&s.b===this.b}fromArray(s,h=0){return this.r=s[h],this.g=s[h+1],this.b=s[h+2],this}toArray(s=[],h=0){return s[h]=this.r,s[h+1]=this.g,s[h+2]=this.b,s}fromBufferAttribute(s,h){return this.r=s.getX(h),this.g=s.getY(h),this.b=s.getZ(h),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},mp=new Go;Go.NAMES=gKt;var XEe=0,pS=class extends fS{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:XEe++}),this.uuid=AU(),this.name="",this.type="Material",this.blending=JI,this.side=hS,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Tyt,this.blendDst=Cyt,this.blendEquation=WA,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Go(0,0,0),this.blendAlpha=0,this.depthFunc=oet,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=sYt,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=RI,this.stencilZFail=RI,this.stencilZPass=RI,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(s){this._alphaTest>0!=s>0&&this.version++,this._alphaTest=s}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(s){if(s!==void 0)for(let h in s){let p=s[h];if(p===void 0){console.warn(`THREE.Material: parameter '${h}' has value of undefined.`);continue}let m=this[h];if(m===void 0){console.warn(`THREE.Material: '${h}' is not a property of THREE.${this.type}.`);continue}m&&m.isColor?m.set(p):m&&m.isVector3&&p&&p.isVector3?m.copy(p):this[h]=p}}toJSON(s){let h=s===void 0||typeof s=="string";h&&(s={textures:{},images:{}});let p={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};p.uuid=this.uuid,p.type=this.type,this.name!==""&&(p.name=this.name),this.color&&this.color.isColor&&(p.color=this.color.getHex()),this.roughness!==void 0&&(p.roughness=this.roughness),this.metalness!==void 0&&(p.metalness=this.metalness),this.sheen!==void 0&&(p.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(p.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(p.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(p.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(p.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(p.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(p.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(p.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(p.shininess=this.shininess),this.clearcoat!==void 0&&(p.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(p.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(p.clearcoatMap=this.clearcoatMap.toJSON(s).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(p.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(s).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(p.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(s).uuid,p.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(p.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(p.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(p.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(p.iridescenceMap=this.iridescenceMap.toJSON(s).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(p.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(s).uuid),this.anisotropy!==void 0&&(p.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(p.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(p.anisotropyMap=this.anisotropyMap.toJSON(s).uuid),this.map&&this.map.isTexture&&(p.map=this.map.toJSON(s).uuid),this.matcap&&this.matcap.isTexture&&(p.matcap=this.matcap.toJSON(s).uuid),this.alphaMap&&this.alphaMap.isTexture&&(p.alphaMap=this.alphaMap.toJSON(s).uuid),this.lightMap&&this.lightMap.isTexture&&(p.lightMap=this.lightMap.toJSON(s).uuid,p.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(p.aoMap=this.aoMap.toJSON(s).uuid,p.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(p.bumpMap=this.bumpMap.toJSON(s).uuid,p.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(p.normalMap=this.normalMap.toJSON(s).uuid,p.normalMapType=this.normalMapType,p.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(p.displacementMap=this.displacementMap.toJSON(s).uuid,p.displacementScale=this.displacementScale,p.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(p.roughnessMap=this.roughnessMap.toJSON(s).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(p.metalnessMap=this.metalnessMap.toJSON(s).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(p.emissiveMap=this.emissiveMap.toJSON(s).uuid),this.specularMap&&this.specularMap.isTexture&&(p.specularMap=this.specularMap.toJSON(s).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(p.specularIntensityMap=this.specularIntensityMap.toJSON(s).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(p.specularColorMap=this.specularColorMap.toJSON(s).uuid),this.envMap&&this.envMap.isTexture&&(p.envMap=this.envMap.toJSON(s).uuid,this.combine!==void 0&&(p.combine=this.combine)),this.envMapIntensity!==void 0&&(p.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(p.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(p.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(p.gradientMap=this.gradientMap.toJSON(s).uuid),this.transmission!==void 0&&(p.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(p.transmissionMap=this.transmissionMap.toJSON(s).uuid),this.thickness!==void 0&&(p.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(p.thicknessMap=this.thicknessMap.toJSON(s).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(p.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(p.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(p.size=this.size),this.shadowSide!==null&&(p.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(p.sizeAttenuation=this.sizeAttenuation),this.blending!==JI&&(p.blending=this.blending),this.side!==hS&&(p.side=this.side),this.vertexColors===!0&&(p.vertexColors=!0),this.opacity<1&&(p.opacity=this.opacity),this.transparent===!0&&(p.transparent=!0),this.blendSrc!==Tyt&&(p.blendSrc=this.blendSrc),this.blendDst!==Cyt&&(p.blendDst=this.blendDst),this.blendEquation!==WA&&(p.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(p.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(p.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(p.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(p.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(p.blendAlpha=this.blendAlpha),this.depthFunc!==oet&&(p.depthFunc=this.depthFunc),this.depthTest===!1&&(p.depthTest=this.depthTest),this.depthWrite===!1&&(p.depthWrite=this.depthWrite),this.colorWrite===!1&&(p.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(p.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==sYt&&(p.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(p.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(p.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==RI&&(p.stencilFail=this.stencilFail),this.stencilZFail!==RI&&(p.stencilZFail=this.stencilZFail),this.stencilZPass!==RI&&(p.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(p.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(p.rotation=this.rotation),this.polygonOffset===!0&&(p.polygonOffset=!0),this.polygonOffsetFactor!==0&&(p.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(p.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(p.linewidth=this.linewidth),this.dashSize!==void 0&&(p.dashSize=this.dashSize),this.gapSize!==void 0&&(p.gapSize=this.gapSize),this.scale!==void 0&&(p.scale=this.scale),this.dithering===!0&&(p.dithering=!0),this.alphaTest>0&&(p.alphaTest=this.alphaTest),this.alphaHash===!0&&(p.alphaHash=!0),this.alphaToCoverage===!0&&(p.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(p.premultipliedAlpha=!0),this.forceSinglePass===!0&&(p.forceSinglePass=!0),this.wireframe===!0&&(p.wireframe=!0),this.wireframeLinewidth>1&&(p.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(p.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(p.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(p.flatShading=!0),this.visible===!1&&(p.visible=!1),this.toneMapped===!1&&(p.toneMapped=!1),this.fog===!1&&(p.fog=!1),Object.keys(this.userData).length>0&&(p.userData=this.userData);function m(_){let E=[];for(let y in _){let I=_[y];delete I.metadata,E.push(I)}return E}if(h){let _=m(s.textures),E=m(s.images);_.length>0&&(p.textures=_),E.length>0&&(p.images=E)}return p}clone(){return new this.constructor().copy(this)}copy(s){this.name=s.name,this.blending=s.blending,this.side=s.side,this.vertexColors=s.vertexColors,this.opacity=s.opacity,this.transparent=s.transparent,this.blendSrc=s.blendSrc,this.blendDst=s.blendDst,this.blendEquation=s.blendEquation,this.blendSrcAlpha=s.blendSrcAlpha,this.blendDstAlpha=s.blendDstAlpha,this.blendEquationAlpha=s.blendEquationAlpha,this.blendColor.copy(s.blendColor),this.blendAlpha=s.blendAlpha,this.depthFunc=s.depthFunc,this.depthTest=s.depthTest,this.depthWrite=s.depthWrite,this.stencilWriteMask=s.stencilWriteMask,this.stencilFunc=s.stencilFunc,this.stencilRef=s.stencilRef,this.stencilFuncMask=s.stencilFuncMask,this.stencilFail=s.stencilFail,this.stencilZFail=s.stencilZFail,this.stencilZPass=s.stencilZPass,this.stencilWrite=s.stencilWrite;let h=s.clippingPlanes,p=null;if(h!==null){let m=h.length;p=new Array(m);for(let _=0;_!==m;++_)p[_]=h[_].clone()}return this.clippingPlanes=p,this.clipIntersection=s.clipIntersection,this.clipShadows=s.clipShadows,this.shadowSide=s.shadowSide,this.colorWrite=s.colorWrite,this.precision=s.precision,this.polygonOffset=s.polygonOffset,this.polygonOffsetFactor=s.polygonOffsetFactor,this.polygonOffsetUnits=s.polygonOffsetUnits,this.dithering=s.dithering,this.alphaTest=s.alphaTest,this.alphaHash=s.alphaHash,this.alphaToCoverage=s.alphaToCoverage,this.premultipliedAlpha=s.premultipliedAlpha,this.forceSinglePass=s.forceSinglePass,this.visible=s.visible,this.toneMapped=s.toneMapped,this.userData=JSON.parse(JSON.stringify(s.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(s){s===!0&&this.version++}},rR=class extends pS{constructor(s){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Go(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=f2t,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(s)}copy(s){return super.copy(s),this.color.copy(s.color),this.map=s.map,this.lightMap=s.lightMap,this.lightMapIntensity=s.lightMapIntensity,this.aoMap=s.aoMap,this.aoMapIntensity=s.aoMapIntensity,this.specularMap=s.specularMap,this.alphaMap=s.alphaMap,this.envMap=s.envMap,this.combine=s.combine,this.reflectivity=s.reflectivity,this.refractionRatio=s.refractionRatio,this.wireframe=s.wireframe,this.wireframeLinewidth=s.wireframeLinewidth,this.wireframeLinecap=s.wireframeLinecap,this.wireframeLinejoin=s.wireframeLinejoin,this.fog=s.fog,this}};var Uh=new Ge,jtt=new Nc,D0=class{constructor(s,h,p=!1){if(Array.isArray(s))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=s,this.itemSize=h,this.count=s!==void 0?s.length/h:0,this.normalized=p,this.usage=oYt,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=oS,this.version=0}onUploadCallback(){}set needsUpdate(s){s===!0&&this.version++}get updateRange(){return console.warn("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(s){return this.usage=s,this}addUpdateRange(s,h){this.updateRanges.push({start:s,count:h})}clearUpdateRanges(){this.updateRanges.length=0}copy(s){return this.name=s.name,this.array=new s.array.constructor(s.array),this.itemSize=s.itemSize,this.count=s.count,this.normalized=s.normalized,this.usage=s.usage,this.gpuType=s.gpuType,this}copyAt(s,h,p){s*=this.itemSize,p*=h.itemSize;for(let m=0,_=this.itemSize;m<_;m++)this.array[s+m]=h.array[p+m];return this}copyArray(s){return this.array.set(s),this}applyMatrix3(s){if(this.itemSize===2)for(let h=0,p=this.count;h0&&(s.userData=this.userData),this.parameters!==void 0){let I=this.parameters;for(let O in I)I[O]!==void 0&&(s[O]=I[O]);return s}s.data={attributes:{}};let h=this.index;h!==null&&(s.data.index={type:h.array.constructor.name,array:Array.prototype.slice.call(h.array)});let p=this.attributes;for(let I in p){let O=p[I];s.data.attributes[I]=O.toJSON(s.data)}let m={},_=!1;for(let I in this.morphAttributes){let O=this.morphAttributes[I],B=[];for(let P=0,U=O.length;P0&&(m[I]=B,_=!0)}_&&(s.data.morphAttributes=m,s.data.morphTargetsRelative=this.morphTargetsRelative);let E=this.groups;E.length>0&&(s.data.groups=JSON.parse(JSON.stringify(E)));let y=this.boundingSphere;return y!==null&&(s.data.boundingSphere={center:y.center.toArray(),radius:y.radius}),s}clone(){return new this.constructor().copy(this)}copy(s){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let h={};this.name=s.name;let p=s.index;p!==null&&this.setIndex(p.clone(h));let m=s.attributes;for(let O in m){let B=m[O];this.setAttribute(O,B.clone(h))}let _=s.morphAttributes;for(let O in _){let B=[],P=_[O];for(let U=0,W=P.length;U0){let m=h[p[0]];if(m!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let _=0,E=m.length;_(s.far-s.near)**2))&&(_Yt.copy(_).invert(),jA.copy(s.ray).applyMatrix4(_Yt),!(p.boundingBox!==null&&jA.intersectsBox(p.boundingBox)===!1)&&this._computeIntersections(s,h,jA)))}_computeIntersections(s,h,p){let m,_=this.geometry,E=this.material,y=_.index,I=_.attributes.position,O=_.attributes.uv,B=_.attributes.uv1,P=_.attributes.normal,U=_.groups,W=_.drawRange;if(y!==null)if(Array.isArray(E))for(let q=0,et=U.length;qh.far?null:{distance:O,point:Xtt.clone(),object:d}}function Ztt(d,s,h,p,m,_,E,y,I,O){d.getVertexPosition(y,GI),d.getVertexPosition(I,WI),d.getVertexPosition(O,$I);let B=YEe(d,s,h,p,GI,WI,$I,qtt);if(B){m&&(Wtt.fromBufferAttribute(m,y),$tt.fromBufferAttribute(m,I),Vtt.fromBufferAttribute(m,O),B.uv=VA.getInterpolation(qtt,GI,WI,$I,Wtt,$tt,Vtt,new Nc)),_&&(Wtt.fromBufferAttribute(_,y),$tt.fromBufferAttribute(_,I),Vtt.fromBufferAttribute(_,O),B.uv1=VA.getInterpolation(qtt,GI,WI,$I,Wtt,$tt,Vtt,new Nc),B.uv2=B.uv1),E&&(xYt.fromBufferAttribute(E,y),MYt.fromBufferAttribute(E,I),EYt.fromBufferAttribute(E,O),B.normal=VA.getInterpolation(qtt,GI,WI,$I,xYt,MYt,EYt,new Ge),B.normal.dot(p.direction)>0&&B.normal.multiplyScalar(-1));let P={a:y,b:I,c:O,normal:new Ge,materialIndex:0};VA.getNormal(GI,WI,$I,P.normal),B.face=P}return B}var YA=class d extends My{constructor(s=1,h=1,p=1,m=1,_=1,E=1){super(),this.type="BoxGeometry",this.parameters={width:s,height:h,depth:p,widthSegments:m,heightSegments:_,depthSegments:E};let y=this;m=Math.floor(m),_=Math.floor(_),E=Math.floor(E);let I=[],O=[],B=[],P=[],U=0,W=0;q("z","y","x",-1,-1,p,h,s,E,_,0),q("z","y","x",1,-1,p,h,-s,E,_,1),q("x","z","y",1,1,s,p,h,m,E,2),q("x","z","y",1,-1,s,p,-h,m,E,3),q("x","y","z",1,-1,s,h,p,m,_,4),q("x","y","z",-1,-1,s,h,-p,m,_,5),this.setIndex(I),this.setAttribute("position",new bg(O,3)),this.setAttribute("normal",new bg(B,3)),this.setAttribute("uv",new bg(P,2));function q(et,Q,X,gt,ft,xt,Bt,Ot,Pt,se,ot){let Lt=xt/Pt,be=Bt/se,ln=xt/2,Fn=Bt/2,ne=Ot/2,xe=Pt+1,re=se+1,hn=0,Se=0,ke=new Ge;for(let mn=0;mn0?1:-1,B.push(ke.x,ke.y,ke.z),P.push(Qn/Pt),P.push(1-mn/se),hn+=1}}for(let mn=0;mn0&&(h.defines=this.defines),h.vertexShader=this.vertexShader,h.fragmentShader=this.fragmentShader,h.lights=this.lights,h.clipping=this.clipping;let p={};for(let m in this.extensions)this.extensions[m]===!0&&(p[m]=!0);return Object.keys(p).length>0&&(h.extensions=p),h}},yet=class extends o1{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Fu,this.projectionMatrix=new Fu,this.projectionMatrixInverse=new Fu,this.coordinateSystem=Qx}copy(s,h){return super.copy(s,h),this.matrixWorldInverse.copy(s.matrixWorldInverse),this.projectionMatrix.copy(s.projectionMatrix),this.projectionMatrixInverse.copy(s.projectionMatrixInverse),this.coordinateSystem=s.coordinateSystem,this}getWorldDirection(s){return super.getWorldDirection(s).negate()}updateMatrixWorld(s){super.updateMatrixWorld(s),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(s,h){super.updateWorldMatrix(s,h),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}},s1=class extends yet{constructor(s=50,h=1,p=.1,m=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=s,this.zoom=1,this.near=p,this.far=m,this.focus=10,this.aspect=h,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(s,h){return super.copy(s,h),this.fov=s.fov,this.zoom=s.zoom,this.near=s.near,this.far=s.far,this.focus=s.focus,this.aspect=s.aspect,this.view=s.view===null?null:Object.assign({},s.view),this.filmGauge=s.filmGauge,this.filmOffset=s.filmOffset,this}setFocalLength(s){let h=.5*this.getFilmHeight()/s;this.fov=Iyt*2*Math.atan(h),this.updateProjectionMatrix()}getFocalLength(){let s=Math.tan(set*.5*this.fov);return .5*this.getFilmHeight()/s}getEffectiveFOV(){return Iyt*2*Math.atan(Math.tan(set*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(s,h,p,m,_,E){this.aspect=s/h,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=s,this.view.fullHeight=h,this.view.offsetX=p,this.view.offsetY=m,this.view.width=_,this.view.height=E,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let s=this.near,h=s*Math.tan(set*.5*this.fov)/this.zoom,p=2*h,m=this.aspect*p,_=-.5*m,E=this.view;if(this.view!==null&&this.view.enabled){let I=E.fullWidth,N=E.fullHeight;_+=E.offsetX*m/I,h-=E.offsetY*p/N,m*=E.width/I,p*=E.height/N}let y=this.filmOffset;y!==0&&(_+=s*y/this.getFilmWidth()),this.projectionMatrix.makePerspective(_,_+m,h,h-p,s,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(s){let h=super.toJSON(s);return h.object.fov=this.fov,h.object.zoom=this.zoom,h.object.near=this.near,h.object.far=this.far,h.object.focus=this.focus,h.object.aspect=this.aspect,this.view!==null&&(h.object.view=Object.assign({},this.view)),h.object.filmGauge=this.filmGauge,h.object.filmOffset=this.filmOffset,h}},qI=-90,XI=1,Oyt=class extends o1{constructor(s,h,p){super(),this.type="CubeCamera",this.renderTarget=p,this.coordinateSystem=null,this.activeMipmapLevel=0;let m=new s1(qI,XI,s,h);m.layers=this.layers,this.add(m);let _=new s1(qI,XI,s,h);_.layers=this.layers,this.add(_);let E=new s1(qI,XI,s,h);E.layers=this.layers,this.add(E);let y=new s1(qI,XI,s,h);y.layers=this.layers,this.add(y);let I=new s1(qI,XI,s,h);I.layers=this.layers,this.add(I);let N=new s1(qI,XI,s,h);N.layers=this.layers,this.add(N)}updateCoordinateSystem(){let s=this.coordinateSystem,h=this.children.concat(),[p,m,_,E,y,I]=h;for(let N of h)this.remove(N);if(s===Qx)p.up.set(0,1,0),p.lookAt(1,0,0),m.up.set(0,1,0),m.lookAt(-1,0,0),_.up.set(0,0,-1),_.lookAt(0,1,0),E.up.set(0,0,1),E.lookAt(0,-1,0),y.up.set(0,1,0),y.lookAt(0,0,1),I.up.set(0,1,0),I.lookAt(0,0,-1);else if(s===det)p.up.set(0,-1,0),p.lookAt(-1,0,0),m.up.set(0,-1,0),m.lookAt(1,0,0),_.up.set(0,0,1),_.lookAt(0,1,0),E.up.set(0,0,-1),E.lookAt(0,-1,0),y.up.set(0,-1,0),y.lookAt(0,0,1),I.up.set(0,-1,0),I.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+s);for(let N of h)this.add(N),N.updateMatrixWorld()}update(s,h){this.parent===null&&this.updateMatrixWorld();let{renderTarget:p,activeMipmapLevel:m}=this;this.coordinateSystem!==s.coordinateSystem&&(this.coordinateSystem=s.coordinateSystem,this.updateCoordinateSystem());let[_,E,y,I,N,B]=this.children,P=s.getRenderTarget(),U=s.getActiveCubeFace(),j=s.getActiveMipmapLevel(),V=s.xr.enabled;s.xr.enabled=!1;let tt=p.texture.generateMipmaps;p.texture.generateMipmaps=!1,s.setRenderTarget(p,0,m),s.render(h,_),s.setRenderTarget(p,1,m),s.render(h,E),s.setRenderTarget(p,2,m),s.render(h,y),s.setRenderTarget(p,3,m),s.render(h,I),s.setRenderTarget(p,4,m),s.render(h,N),p.texture.generateMipmaps=tt,s.setRenderTarget(p,5,m),s.render(h,B),s.setRenderTarget(P,U,j),s.xr.enabled=V,p.texture.needsPMREMUpdate=!0}},xet=class extends Kw{constructor(s,h,p,m,_,E,y,I,N,B){s=s!==void 0?s:[],h=h!==void 0?h:nR,super(s,h,p,m,_,E,y,I,N,B),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(s){this.image=s}},Byt=class extends e3{constructor(s=1,h={}){super(s,s,h),this.isWebGLCubeRenderTarget=!0;let p={width:s,height:s,depth:1},m=[p,p,p,p,p,p];h.encoding!==void 0&&(_U("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),h.colorSpace=h.encoding===YA?Pd:wb),this.texture=new xet(m,h.mapping,h.wrapS,h.wrapT,h.magFilter,h.minFilter,h.format,h.type,h.anisotropy,h.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=h.generateMipmaps!==void 0?h.generateMipmaps:!1,this.texture.minFilter=h.minFilter!==void 0?h.minFilter:bb}fromEquirectangularTexture(s,h){this.texture.type=h.type,this.texture.colorSpace=h.colorSpace,this.texture.generateMipmaps=h.generateMipmaps,this.texture.minFilter=h.minFilter,this.texture.magFilter=h.magFilter;let p={uniforms:{tEquirect:{value:null}},vertexShader:` +}`,n3=class extends pS{constructor(s){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=QEe,this.fragmentShader=tSe,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1,clipCullDistance:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,s!==void 0&&this.setValues(s)}copy(s){return super.copy(s),this.fragmentShader=s.fragmentShader,this.vertexShader=s.vertexShader,this.uniforms=sR(s.uniforms),this.uniformsGroups=KEe(s.uniformsGroups),this.defines=Object.assign({},s.defines),this.wireframe=s.wireframe,this.wireframeLinewidth=s.wireframeLinewidth,this.fog=s.fog,this.lights=s.lights,this.clipping=s.clipping,this.extensions=Object.assign({},s.extensions),this.glslVersion=s.glslVersion,this}toJSON(s){let h=super.toJSON(s);h.glslVersion=this.glslVersion,h.uniforms={};for(let m in this.uniforms){let E=this.uniforms[m].value;E&&E.isTexture?h.uniforms[m]={type:"t",value:E.toJSON(s).uuid}:E&&E.isColor?h.uniforms[m]={type:"c",value:E.getHex()}:E&&E.isVector2?h.uniforms[m]={type:"v2",value:E.toArray()}:E&&E.isVector3?h.uniforms[m]={type:"v3",value:E.toArray()}:E&&E.isVector4?h.uniforms[m]={type:"v4",value:E.toArray()}:E&&E.isMatrix3?h.uniforms[m]={type:"m3",value:E.toArray()}:E&&E.isMatrix4?h.uniforms[m]={type:"m4",value:E.toArray()}:h.uniforms[m]={value:E}}Object.keys(this.defines).length>0&&(h.defines=this.defines),h.vertexShader=this.vertexShader,h.fragmentShader=this.fragmentShader,h.lights=this.lights,h.clipping=this.clipping;let p={};for(let m in this.extensions)this.extensions[m]===!0&&(p[m]=!0);return Object.keys(p).length>0&&(h.extensions=p),h}},yet=class extends o1{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Fu,this.projectionMatrix=new Fu,this.projectionMatrixInverse=new Fu,this.coordinateSystem=Jx}copy(s,h){return super.copy(s,h),this.matrixWorldInverse.copy(s.matrixWorldInverse),this.projectionMatrix.copy(s.projectionMatrix),this.projectionMatrixInverse.copy(s.projectionMatrixInverse),this.coordinateSystem=s.coordinateSystem,this}getWorldDirection(s){return super.getWorldDirection(s).negate()}updateMatrixWorld(s){super.updateMatrixWorld(s),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(s,h){super.updateWorldMatrix(s,h),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}},s1=class extends yet{constructor(s=50,h=1,p=.1,m=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=s,this.zoom=1,this.near=p,this.far=m,this.focus=10,this.aspect=h,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(s,h){return super.copy(s,h),this.fov=s.fov,this.zoom=s.zoom,this.near=s.near,this.far=s.far,this.focus=s.focus,this.aspect=s.aspect,this.view=s.view===null?null:Object.assign({},s.view),this.filmGauge=s.filmGauge,this.filmOffset=s.filmOffset,this}setFocalLength(s){let h=.5*this.getFilmHeight()/s;this.fov=Ryt*2*Math.atan(h),this.updateProjectionMatrix()}getFocalLength(){let s=Math.tan(set*.5*this.fov);return .5*this.getFilmHeight()/s}getEffectiveFOV(){return Ryt*2*Math.atan(Math.tan(set*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(s,h,p,m,_,E){this.aspect=s/h,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=s,this.view.fullHeight=h,this.view.offsetX=p,this.view.offsetY=m,this.view.width=_,this.view.height=E,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let s=this.near,h=s*Math.tan(set*.5*this.fov)/this.zoom,p=2*h,m=this.aspect*p,_=-.5*m,E=this.view;if(this.view!==null&&this.view.enabled){let I=E.fullWidth,O=E.fullHeight;_+=E.offsetX*m/I,h-=E.offsetY*p/O,m*=E.width/I,p*=E.height/O}let y=this.filmOffset;y!==0&&(_+=s*y/this.getFilmWidth()),this.projectionMatrix.makePerspective(_,_+m,h,h-p,s,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(s){let h=super.toJSON(s);return h.object.fov=this.fov,h.object.zoom=this.zoom,h.object.near=this.near,h.object.far=this.far,h.object.focus=this.focus,h.object.aspect=this.aspect,this.view!==null&&(h.object.view=Object.assign({},this.view)),h.object.filmGauge=this.filmGauge,h.object.filmOffset=this.filmOffset,h}},VI=-90,qI=1,Byt=class extends o1{constructor(s,h,p){super(),this.type="CubeCamera",this.renderTarget=p,this.coordinateSystem=null,this.activeMipmapLevel=0;let m=new s1(VI,qI,s,h);m.layers=this.layers,this.add(m);let _=new s1(VI,qI,s,h);_.layers=this.layers,this.add(_);let E=new s1(VI,qI,s,h);E.layers=this.layers,this.add(E);let y=new s1(VI,qI,s,h);y.layers=this.layers,this.add(y);let I=new s1(VI,qI,s,h);I.layers=this.layers,this.add(I);let O=new s1(VI,qI,s,h);O.layers=this.layers,this.add(O)}updateCoordinateSystem(){let s=this.coordinateSystem,h=this.children.concat(),[p,m,_,E,y,I]=h;for(let O of h)this.remove(O);if(s===Jx)p.up.set(0,1,0),p.lookAt(1,0,0),m.up.set(0,1,0),m.lookAt(-1,0,0),_.up.set(0,0,-1),_.lookAt(0,1,0),E.up.set(0,0,1),E.lookAt(0,-1,0),y.up.set(0,1,0),y.lookAt(0,0,1),I.up.set(0,1,0),I.lookAt(0,0,-1);else if(s===det)p.up.set(0,-1,0),p.lookAt(-1,0,0),m.up.set(0,-1,0),m.lookAt(1,0,0),_.up.set(0,0,1),_.lookAt(0,1,0),E.up.set(0,0,-1),E.lookAt(0,-1,0),y.up.set(0,-1,0),y.lookAt(0,0,1),I.up.set(0,-1,0),I.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+s);for(let O of h)this.add(O),O.updateMatrixWorld()}update(s,h){this.parent===null&&this.updateMatrixWorld();let{renderTarget:p,activeMipmapLevel:m}=this;this.coordinateSystem!==s.coordinateSystem&&(this.coordinateSystem=s.coordinateSystem,this.updateCoordinateSystem());let[_,E,y,I,O,B]=this.children,P=s.getRenderTarget(),U=s.getActiveCubeFace(),W=s.getActiveMipmapLevel(),q=s.xr.enabled;s.xr.enabled=!1;let et=p.texture.generateMipmaps;p.texture.generateMipmaps=!1,s.setRenderTarget(p,0,m),s.render(h,_),s.setRenderTarget(p,1,m),s.render(h,E),s.setRenderTarget(p,2,m),s.render(h,y),s.setRenderTarget(p,3,m),s.render(h,I),s.setRenderTarget(p,4,m),s.render(h,O),p.texture.generateMipmaps=et,s.setRenderTarget(p,5,m),s.render(h,B),s.setRenderTarget(P,U,W),s.xr.enabled=q,p.texture.needsPMREMUpdate=!0}},xet=class extends Kw{constructor(s,h,p,m,_,E,y,I,O,B){s=s!==void 0?s:[],h=h!==void 0?h:eR,super(s,h,p,m,_,E,y,I,O,B),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(s){this.image=s}},Fyt=class extends t3{constructor(s=1,h={}){super(s,s,h),this.isWebGLCubeRenderTarget=!0;let p={width:s,height:s,depth:1},m=[p,p,p,p,p,p];h.encoding!==void 0&&(wU("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),h.colorSpace=h.encoding===ZA?Pd:wb),this.texture=new xet(m,h.mapping,h.wrapS,h.wrapT,h.magFilter,h.minFilter,h.format,h.type,h.anisotropy,h.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=h.generateMipmaps!==void 0?h.generateMipmaps:!1,this.texture.minFilter=h.minFilter!==void 0?h.minFilter:bb}fromEquirectangularTexture(s,h){this.texture.type=h.type,this.texture.colorSpace=h.colorSpace,this.texture.generateMipmaps=h.generateMipmaps,this.texture.minFilter=h.minFilter,this.texture.magFilter=h.magFilter;let p={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; @@ -100,7 +100,7 @@ function print() { __p += __j.call(arguments, '') } gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},m=new KA(5,5,5),_=new i3({name:"CubemapFromEquirect",uniforms:oR(p.uniforms),vertexShader:p.vertexShader,fragmentShader:p.fragmentShader,side:mg,blending:aS});_.uniforms.tEquirect.value=h;let E=new gg(m,_),y=h.minFilter;return h.minFilter===xU&&(h.minFilter=bb),new Oyt(1,10,this).update(s,E),h.minFilter=y,E.geometry.dispose(),E.material.dispose(),this}clear(s,h,p,m){let _=s.getRenderTarget();for(let E=0;E<6;E++)s.setRenderTarget(this,E),s.clear(h,p,m);s.setRenderTarget(_)}},myt=new Ge,eSe=new Ge,nSe=new Ko,Jx=class{constructor(s=new Ge(1,0,0),h=0){this.isPlane=!0,this.normal=s,this.constant=h}set(s,h){return this.normal.copy(s),this.constant=h,this}setComponents(s,h,p,m){return this.normal.set(s,h,p),this.constant=m,this}setFromNormalAndCoplanarPoint(s,h){return this.normal.copy(s),this.constant=-h.dot(this.normal),this}setFromCoplanarPoints(s,h,p){let m=myt.subVectors(p,h).cross(eSe.subVectors(s,h)).normalize();return this.setFromNormalAndCoplanarPoint(m,s),this}copy(s){return this.normal.copy(s.normal),this.constant=s.constant,this}normalize(){let s=1/this.normal.length();return this.normal.multiplyScalar(s),this.constant*=s,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(s){return this.normal.dot(s)+this.constant}distanceToSphere(s){return this.distanceToPoint(s.center)-s.radius}projectPoint(s,h){return h.copy(s).addScaledVector(this.normal,-this.distanceToPoint(s))}intersectLine(s,h){let p=s.delta(myt),m=this.normal.dot(p);if(m===0)return this.distanceToPoint(s.start)===0?h.copy(s.start):null;let _=-(s.start.dot(this.normal)+this.constant)/m;return _<0||_>1?null:h.copy(s.start).addScaledVector(p,_)}intersectsLine(s){let h=this.distanceToPoint(s.start),p=this.distanceToPoint(s.end);return h<0&&p>0||p<0&&h>0}intersectsBox(s){return s.intersectsPlane(this)}intersectsSphere(s){return s.intersectsPlane(this)}coplanarPoint(s){return s.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(s,h){let p=h||nSe.getNormalMatrix(s),m=this.coplanarPoint(myt).applyMatrix4(s),_=this.normal.applyMatrix3(p).normalize();return this.constant=-m.dot(_),this}translate(s){return this.constant-=s.dot(this.normal),this}equals(s){return s.normal.equals(this.normal)&&s.constant===this.constant}clone(){return new this.constructor().copy(this)}},GA=new dS,Ytt=new Ge,TU=class{constructor(s=new Jx,h=new Jx,p=new Jx,m=new Jx,_=new Jx,E=new Jx){this.planes=[s,h,p,m,_,E]}set(s,h,p,m,_,E){let y=this.planes;return y[0].copy(s),y[1].copy(h),y[2].copy(p),y[3].copy(m),y[4].copy(_),y[5].copy(E),this}copy(s){let h=this.planes;for(let p=0;p<6;p++)h[p].copy(s.planes[p]);return this}setFromProjectionMatrix(s,h=Qx){let p=this.planes,m=s.elements,_=m[0],E=m[1],y=m[2],I=m[3],N=m[4],B=m[5],P=m[6],U=m[7],j=m[8],V=m[9],tt=m[10],Q=m[11],X=m[12],gt=m[13],ft=m[14],xt=m[15];if(p[0].setComponents(I-_,U-N,Q-j,xt-X).normalize(),p[1].setComponents(I+_,U+N,Q+j,xt+X).normalize(),p[2].setComponents(I+E,U+B,Q+V,xt+gt).normalize(),p[3].setComponents(I-E,U-B,Q-V,xt-gt).normalize(),p[4].setComponents(I-y,U-P,Q-tt,xt-ft).normalize(),h===Qx)p[5].setComponents(I+y,U+P,Q+tt,xt+ft).normalize();else if(h===det)p[5].setComponents(y,P,tt,ft).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+h);return this}intersectsObject(s){if(s.boundingSphere!==void 0)s.boundingSphere===null&&s.computeBoundingSphere(),GA.copy(s.boundingSphere).applyMatrix4(s.matrixWorld);else{let h=s.geometry;h.boundingSphere===null&&h.computeBoundingSphere(),GA.copy(h.boundingSphere).applyMatrix4(s.matrixWorld)}return this.intersectsSphere(GA)}intersectsSprite(s){return GA.center.set(0,0,0),GA.radius=.7071067811865476,GA.applyMatrix4(s.matrixWorld),this.intersectsSphere(GA)}intersectsSphere(s){let h=this.planes,p=s.center,m=-s.radius;for(let _=0;_<6;_++)if(h[_].distanceToPoint(p)0?s.max.x:s.min.x,Ytt.y=m.normal.y>0?s.max.y:s.min.y,Ytt.z=m.normal.z>0?s.max.z:s.min.z,m.distanceToPoint(Ytt)<0)return!1}return!0}containsPoint(s){let h=this.planes;for(let p=0;p<6;p++)if(h[p].distanceToPoint(s)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};function pKt(){let d=null,s=!1,h=null,p=null;function m(_,E){h(_,E),p=d.requestAnimationFrame(m)}return{start:function(){s!==!0&&h!==null&&(p=d.requestAnimationFrame(m),s=!0)},stop:function(){d.cancelAnimationFrame(p),s=!1},setAnimationLoop:function(_){h=_},setContext:function(_){d=_}}}function iSe(d,s){let h=s.isWebGL2,p=new WeakMap;function m(N,B){let P=N.array,U=N.usage,j=P.byteLength,V=d.createBuffer();d.bindBuffer(B,V),d.bufferData(B,P,U),N.onUploadCallback();let tt;if(P instanceof Float32Array)tt=d.FLOAT;else if(P instanceof Uint16Array)if(N.isFloat16BufferAttribute)if(h)tt=d.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else tt=d.UNSIGNED_SHORT;else if(P instanceof Int16Array)tt=d.SHORT;else if(P instanceof Uint32Array)tt=d.UNSIGNED_INT;else if(P instanceof Int32Array)tt=d.INT;else if(P instanceof Int8Array)tt=d.BYTE;else if(P instanceof Uint8Array)tt=d.UNSIGNED_BYTE;else if(P instanceof Uint8ClampedArray)tt=d.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+P);return{buffer:V,type:tt,bytesPerElement:P.BYTES_PER_ELEMENT,version:N.version,size:j}}function _(N,B,P){let U=B.array,j=B._updateRange,V=B.updateRanges;if(d.bindBuffer(P,N),j.count===-1&&V.length===0&&d.bufferSubData(P,0,U),V.length!==0){for(let tt=0,Q=V.length;tt1?null:h.copy(s.start).addScaledVector(p,_)}intersectsLine(s){let h=this.distanceToPoint(s.start),p=this.distanceToPoint(s.end);return h<0&&p>0||p<0&&h>0}intersectsBox(s){return s.intersectsPlane(this)}intersectsSphere(s){return s.intersectsPlane(this)}coplanarPoint(s){return s.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(s,h){let p=h||nSe.getNormalMatrix(s),m=this.coplanarPoint(byt).applyMatrix4(s),_=this.normal.applyMatrix3(p).normalize();return this.constant=-m.dot(_),this}translate(s){return this.constant-=s.dot(this.normal),this}equals(s){return s.normal.equals(this.normal)&&s.constant===this.constant}clone(){return new this.constructor().copy(this)}},HA=new dS,Ytt=new Ge,EU=class{constructor(s=new Kx,h=new Kx,p=new Kx,m=new Kx,_=new Kx,E=new Kx){this.planes=[s,h,p,m,_,E]}set(s,h,p,m,_,E){let y=this.planes;return y[0].copy(s),y[1].copy(h),y[2].copy(p),y[3].copy(m),y[4].copy(_),y[5].copy(E),this}copy(s){let h=this.planes;for(let p=0;p<6;p++)h[p].copy(s.planes[p]);return this}setFromProjectionMatrix(s,h=Jx){let p=this.planes,m=s.elements,_=m[0],E=m[1],y=m[2],I=m[3],O=m[4],B=m[5],P=m[6],U=m[7],W=m[8],q=m[9],et=m[10],Q=m[11],X=m[12],gt=m[13],ft=m[14],xt=m[15];if(p[0].setComponents(I-_,U-O,Q-W,xt-X).normalize(),p[1].setComponents(I+_,U+O,Q+W,xt+X).normalize(),p[2].setComponents(I+E,U+B,Q+q,xt+gt).normalize(),p[3].setComponents(I-E,U-B,Q-q,xt-gt).normalize(),p[4].setComponents(I-y,U-P,Q-et,xt-ft).normalize(),h===Jx)p[5].setComponents(I+y,U+P,Q+et,xt+ft).normalize();else if(h===det)p[5].setComponents(y,P,et,ft).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+h);return this}intersectsObject(s){if(s.boundingSphere!==void 0)s.boundingSphere===null&&s.computeBoundingSphere(),HA.copy(s.boundingSphere).applyMatrix4(s.matrixWorld);else{let h=s.geometry;h.boundingSphere===null&&h.computeBoundingSphere(),HA.copy(h.boundingSphere).applyMatrix4(s.matrixWorld)}return this.intersectsSphere(HA)}intersectsSprite(s){return HA.center.set(0,0,0),HA.radius=.7071067811865476,HA.applyMatrix4(s.matrixWorld),this.intersectsSphere(HA)}intersectsSphere(s){let h=this.planes,p=s.center,m=-s.radius;for(let _=0;_<6;_++)if(h[_].distanceToPoint(p)0?s.max.x:s.min.x,Ytt.y=m.normal.y>0?s.max.y:s.min.y,Ytt.z=m.normal.z>0?s.max.z:s.min.z,m.distanceToPoint(Ytt)<0)return!1}return!0}containsPoint(s){let h=this.planes;for(let p=0;p<6;p++)if(h[p].distanceToPoint(s)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};function bKt(){let d=null,s=!1,h=null,p=null;function m(_,E){h(_,E),p=d.requestAnimationFrame(m)}return{start:function(){s!==!0&&h!==null&&(p=d.requestAnimationFrame(m),s=!0)},stop:function(){d.cancelAnimationFrame(p),s=!1},setAnimationLoop:function(_){h=_},setContext:function(_){d=_}}}function iSe(d,s){let h=s.isWebGL2,p=new WeakMap;function m(O,B){let P=O.array,U=O.usage,W=P.byteLength,q=d.createBuffer();d.bindBuffer(B,q),d.bufferData(B,P,U),O.onUploadCallback();let et;if(P instanceof Float32Array)et=d.FLOAT;else if(P instanceof Uint16Array)if(O.isFloat16BufferAttribute)if(h)et=d.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else et=d.UNSIGNED_SHORT;else if(P instanceof Int16Array)et=d.SHORT;else if(P instanceof Uint32Array)et=d.UNSIGNED_INT;else if(P instanceof Int32Array)et=d.INT;else if(P instanceof Int8Array)et=d.BYTE;else if(P instanceof Uint8Array)et=d.UNSIGNED_BYTE;else if(P instanceof Uint8ClampedArray)et=d.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+P);return{buffer:q,type:et,bytesPerElement:P.BYTES_PER_ELEMENT,version:O.version,size:W}}function _(O,B,P){let U=B.array,W=B._updateRange,q=B.updateRanges;if(d.bindBuffer(P,O),W.count===-1&&q.length===0&&d.bufferSubData(P,0,U),q.length!==0){for(let et=0,Q=q.length;et #include #include -}`,No={alphahash_fragment:rSe,alphahash_pars_fragment:sSe,alphamap_fragment:oSe,alphamap_pars_fragment:cSe,alphatest_fragment:aSe,alphatest_pars_fragment:uSe,aomap_fragment:lSe,aomap_pars_fragment:hSe,batching_pars_vertex:fSe,batching_vertex:dSe,begin_vertex:pSe,beginnormal_vertex:gSe,bsdfs:mSe,iridescence_fragment:bSe,bumpmap_pars_fragment:wSe,clipping_planes_fragment:vSe,clipping_planes_pars_fragment:_Se,clipping_planes_pars_vertex:ySe,clipping_planes_vertex:xSe,color_fragment:MSe,color_pars_fragment:ESe,color_pars_vertex:SSe,color_vertex:TSe,common:CSe,cube_uv_reflection_fragment:ASe,defaultnormal_vertex:kSe,displacementmap_pars_vertex:LSe,displacementmap_vertex:PSe,emissivemap_fragment:ISe,emissivemap_pars_fragment:RSe,colorspace_fragment:DSe,colorspace_pars_fragment:NSe,envmap_fragment:OSe,envmap_common_pars_fragment:BSe,envmap_pars_fragment:FSe,envmap_pars_vertex:USe,envmap_physical_pars_fragment:KSe,envmap_vertex:zSe,fog_vertex:jSe,fog_pars_vertex:HSe,fog_fragment:GSe,fog_pars_fragment:WSe,gradientmap_pars_fragment:$Se,lightmap_fragment:VSe,lightmap_pars_fragment:qSe,lights_lambert_fragment:XSe,lights_lambert_pars_fragment:ZSe,lights_pars_begin:YSe,lights_toon_fragment:JSe,lights_toon_pars_fragment:QSe,lights_phong_fragment:tTe,lights_phong_pars_fragment:eTe,lights_physical_fragment:nTe,lights_physical_pars_fragment:iTe,lights_fragment_begin:rTe,lights_fragment_maps:sTe,lights_fragment_end:oTe,logdepthbuf_fragment:cTe,logdepthbuf_pars_fragment:aTe,logdepthbuf_pars_vertex:uTe,logdepthbuf_vertex:lTe,map_fragment:hTe,map_pars_fragment:fTe,map_particle_fragment:dTe,map_particle_pars_fragment:pTe,metalnessmap_fragment:gTe,metalnessmap_pars_fragment:mTe,morphcolor_vertex:bTe,morphnormal_vertex:wTe,morphtarget_pars_vertex:vTe,morphtarget_vertex:_Te,normal_fragment_begin:yTe,normal_fragment_maps:xTe,normal_pars_fragment:MTe,normal_pars_vertex:ETe,normal_vertex:STe,normalmap_pars_fragment:TTe,clearcoat_normal_fragment_begin:CTe,clearcoat_normal_fragment_maps:ATe,clearcoat_pars_fragment:kTe,iridescence_pars_fragment:LTe,opaque_fragment:PTe,packing:ITe,premultiplied_alpha_fragment:RTe,project_vertex:DTe,dithering_fragment:NTe,dithering_pars_fragment:OTe,roughnessmap_fragment:BTe,roughnessmap_pars_fragment:FTe,shadowmap_pars_fragment:UTe,shadowmap_pars_vertex:zTe,shadowmap_vertex:jTe,shadowmask_pars_fragment:HTe,skinbase_vertex:GTe,skinning_pars_vertex:WTe,skinning_vertex:$Te,skinnormal_vertex:VTe,specularmap_fragment:qTe,specularmap_pars_fragment:XTe,tonemapping_fragment:ZTe,tonemapping_pars_fragment:YTe,transmission_fragment:KTe,transmission_pars_fragment:JTe,uv_pars_fragment:QTe,uv_pars_vertex:tCe,uv_vertex:eCe,worldpos_vertex:nCe,background_vert:iCe,background_frag:rCe,backgroundCube_vert:sCe,backgroundCube_frag:oCe,cube_vert:cCe,cube_frag:aCe,depth_vert:uCe,depth_frag:lCe,distanceRGBA_vert:hCe,distanceRGBA_frag:fCe,equirect_vert:dCe,equirect_frag:pCe,linedashed_vert:gCe,linedashed_frag:mCe,meshbasic_vert:bCe,meshbasic_frag:wCe,meshlambert_vert:vCe,meshlambert_frag:_Ce,meshmatcap_vert:yCe,meshmatcap_frag:xCe,meshnormal_vert:MCe,meshnormal_frag:ECe,meshphong_vert:SCe,meshphong_frag:TCe,meshphysical_vert:CCe,meshphysical_frag:ACe,meshtoon_vert:kCe,meshtoon_frag:LCe,points_vert:PCe,points_frag:ICe,shadow_vert:RCe,shadow_frag:DCe,sprite_vert:NCe,sprite_frag:OCe},Zi={common:{diffuse:{value:new Go(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Ko},alphaMap:{value:null},alphaMapTransform:{value:new Ko},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Ko}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Ko}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Ko}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Ko},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Ko},normalScale:{value:new Nc(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Ko},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Ko}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Ko}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Ko}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Go(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Go(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Ko},alphaTest:{value:0},uvTransform:{value:new Ko}},sprite:{diffuse:{value:new Go(16777215)},opacity:{value:1},center:{value:new Nc(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Ko},alphaMap:{value:null},alphaMapTransform:{value:new Ko},alphaTest:{value:0}}},xy={basic:{uniforms:i1([Zi.common,Zi.specularmap,Zi.envmap,Zi.aomap,Zi.lightmap,Zi.fog]),vertexShader:No.meshbasic_vert,fragmentShader:No.meshbasic_frag},lambert:{uniforms:i1([Zi.common,Zi.specularmap,Zi.envmap,Zi.aomap,Zi.lightmap,Zi.emissivemap,Zi.bumpmap,Zi.normalmap,Zi.displacementmap,Zi.fog,Zi.lights,{emissive:{value:new Go(0)}}]),vertexShader:No.meshlambert_vert,fragmentShader:No.meshlambert_frag},phong:{uniforms:i1([Zi.common,Zi.specularmap,Zi.envmap,Zi.aomap,Zi.lightmap,Zi.emissivemap,Zi.bumpmap,Zi.normalmap,Zi.displacementmap,Zi.fog,Zi.lights,{emissive:{value:new Go(0)},specular:{value:new Go(1118481)},shininess:{value:30}}]),vertexShader:No.meshphong_vert,fragmentShader:No.meshphong_frag},standard:{uniforms:i1([Zi.common,Zi.envmap,Zi.aomap,Zi.lightmap,Zi.emissivemap,Zi.bumpmap,Zi.normalmap,Zi.displacementmap,Zi.roughnessmap,Zi.metalnessmap,Zi.fog,Zi.lights,{emissive:{value:new Go(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:No.meshphysical_vert,fragmentShader:No.meshphysical_frag},toon:{uniforms:i1([Zi.common,Zi.aomap,Zi.lightmap,Zi.emissivemap,Zi.bumpmap,Zi.normalmap,Zi.displacementmap,Zi.gradientmap,Zi.fog,Zi.lights,{emissive:{value:new Go(0)}}]),vertexShader:No.meshtoon_vert,fragmentShader:No.meshtoon_frag},matcap:{uniforms:i1([Zi.common,Zi.bumpmap,Zi.normalmap,Zi.displacementmap,Zi.fog,{matcap:{value:null}}]),vertexShader:No.meshmatcap_vert,fragmentShader:No.meshmatcap_frag},points:{uniforms:i1([Zi.points,Zi.fog]),vertexShader:No.points_vert,fragmentShader:No.points_frag},dashed:{uniforms:i1([Zi.common,Zi.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:No.linedashed_vert,fragmentShader:No.linedashed_frag},depth:{uniforms:i1([Zi.common,Zi.displacementmap]),vertexShader:No.depth_vert,fragmentShader:No.depth_frag},normal:{uniforms:i1([Zi.common,Zi.bumpmap,Zi.normalmap,Zi.displacementmap,{opacity:{value:1}}]),vertexShader:No.meshnormal_vert,fragmentShader:No.meshnormal_frag},sprite:{uniforms:i1([Zi.sprite,Zi.fog]),vertexShader:No.sprite_vert,fragmentShader:No.sprite_frag},background:{uniforms:{uvTransform:{value:new Ko},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:No.background_vert,fragmentShader:No.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:No.backgroundCube_vert,fragmentShader:No.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:No.cube_vert,fragmentShader:No.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:No.equirect_vert,fragmentShader:No.equirect_frag},distanceRGBA:{uniforms:i1([Zi.common,Zi.displacementmap,{referencePosition:{value:new Ge},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:No.distanceRGBA_vert,fragmentShader:No.distanceRGBA_frag},shadow:{uniforms:i1([Zi.lights,Zi.fog,{color:{value:new Go(0)},opacity:{value:1}}]),vertexShader:No.shadow_vert,fragmentShader:No.shadow_frag}};xy.physical={uniforms:i1([xy.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Ko},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Ko},clearcoatNormalScale:{value:new Nc(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Ko},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Ko},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Ko},sheen:{value:0},sheenColor:{value:new Go(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Ko},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Ko},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Ko},transmissionSamplerSize:{value:new Nc},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Ko},attenuationDistance:{value:0},attenuationColor:{value:new Go(0)},specularColor:{value:new Go(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Ko},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Ko},anisotropyVector:{value:new Nc},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Ko}}]),vertexShader:No.meshphysical_vert,fragmentShader:No.meshphysical_frag};var Ktt={r:0,b:0,g:0};function BCe(d,s,h,p,m,_,E){let y=new Go(0),I=_===!0?0:1,N,B,P=null,U=0,j=null;function V(Q,X){let gt=!1,ft=X.isScene===!0?X.background:null;ft&&ft.isTexture&&(ft=(X.backgroundBlurriness>0?h:s).get(ft)),ft===null?tt(y,I):ft&&ft.isColor&&(tt(ft,1),gt=!0);let xt=d.xr.getEnvironmentBlendMode();xt==="additive"?p.buffers.color.setClear(0,0,0,1,E):xt==="alpha-blend"&&p.buffers.color.setClear(0,0,0,0,E),(d.autoClear||gt)&&d.clear(d.autoClearColor,d.autoClearDepth,d.autoClearStencil),ft&&(ft.isCubeTexture||ft.mapping===Bet)?(B===void 0&&(B=new gg(new KA(1,1,1),new i3({name:"BackgroundCubeMaterial",uniforms:oR(xy.backgroundCube.uniforms),vertexShader:xy.backgroundCube.vertexShader,fragmentShader:xy.backgroundCube.fragmentShader,side:mg,depthTest:!1,depthWrite:!1,fog:!1})),B.geometry.deleteAttribute("normal"),B.geometry.deleteAttribute("uv"),B.onBeforeRender=function(Bt,Ot,Pt){this.matrixWorld.copyPosition(Pt.matrixWorld)},Object.defineProperty(B.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),m.update(B)),B.material.uniforms.envMap.value=ft,B.material.uniforms.flipEnvMap.value=ft.isCubeTexture&&ft.isRenderTargetTexture===!1?-1:1,B.material.uniforms.backgroundBlurriness.value=X.backgroundBlurriness,B.material.uniforms.backgroundIntensity.value=X.backgroundIntensity,B.material.toneMapped=Na.getTransfer(ft.colorSpace)!==vu,(P!==ft||U!==ft.version||j!==d.toneMapping)&&(B.material.needsUpdate=!0,P=ft,U=ft.version,j=d.toneMapping),B.layers.enableAll(),Q.unshift(B,B.geometry,B.material,0,0,null)):ft&&ft.isTexture&&(N===void 0&&(N=new gg(new Fyt(2,2),new i3({name:"BackgroundMaterial",uniforms:oR(xy.background.uniforms),vertexShader:xy.background.vertexShader,fragmentShader:xy.background.fragmentShader,side:hS,depthTest:!1,depthWrite:!1,fog:!1})),N.geometry.deleteAttribute("normal"),Object.defineProperty(N.material,"map",{get:function(){return this.uniforms.t2D.value}}),m.update(N)),N.material.uniforms.t2D.value=ft,N.material.uniforms.backgroundIntensity.value=X.backgroundIntensity,N.material.toneMapped=Na.getTransfer(ft.colorSpace)!==vu,ft.matrixAutoUpdate===!0&&ft.updateMatrix(),N.material.uniforms.uvTransform.value.copy(ft.matrix),(P!==ft||U!==ft.version||j!==d.toneMapping)&&(N.material.needsUpdate=!0,P=ft,U=ft.version,j=d.toneMapping),N.layers.enableAll(),Q.unshift(N,N.geometry,N.material,0,0,null))}function tt(Q,X){Q.getRGB(Ktt,dKt(d)),p.buffers.color.setClear(Ktt.r,Ktt.g,Ktt.b,X,E)}return{getClearColor:function(){return y},setClearColor:function(Q,X=1){y.set(Q),I=X,tt(y,I)},getClearAlpha:function(){return I},setClearAlpha:function(Q){I=Q,tt(y,I)},render:V}}function FCe(d,s,h,p){let m=d.getParameter(d.MAX_VERTEX_ATTRIBS),_=p.isWebGL2?null:s.get("OES_vertex_array_object"),E=p.isWebGL2||_!==null,y={},I=Q(null),N=I,B=!1;function P(ne,xe,re,hn,Se){let ke=!1;if(E){let mn=tt(hn,re,xe);N!==mn&&(N=mn,j(N.object)),ke=X(ne,hn,re,Se),ke&>(ne,hn,re,Se)}else{let mn=xe.wireframe===!0;(N.geometry!==hn.id||N.program!==re.id||N.wireframe!==mn)&&(N.geometry=hn.id,N.program=re.id,N.wireframe=mn,ke=!0)}Se!==null&&h.update(Se,d.ELEMENT_ARRAY_BUFFER),(ke||B)&&(B=!1,se(ne,xe,re,hn),Se!==null&&d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,h.get(Se).buffer))}function U(){return p.isWebGL2?d.createVertexArray():_.createVertexArrayOES()}function j(ne){return p.isWebGL2?d.bindVertexArray(ne):_.bindVertexArrayOES(ne)}function V(ne){return p.isWebGL2?d.deleteVertexArray(ne):_.deleteVertexArrayOES(ne)}function tt(ne,xe,re){let hn=re.wireframe===!0,Se=y[ne.id];Se===void 0&&(Se={},y[ne.id]=Se);let ke=Se[xe.id];ke===void 0&&(ke={},Se[xe.id]=ke);let mn=ke[hn];return mn===void 0&&(mn=Q(U()),ke[hn]=mn),mn}function Q(ne){let xe=[],re=[],hn=[];for(let Se=0;Se=0){let Pe=Se[Qn],ti=ke[Qn];if(ti===void 0&&(Qn==="instanceMatrix"&&ne.instanceMatrix&&(ti=ne.instanceMatrix),Qn==="instanceColor"&&ne.instanceColor&&(ti=ne.instanceColor)),Pe===void 0||Pe.attribute!==ti||ti&&Pe.data!==ti.data)return!0;mn++}return N.attributesNum!==mn||N.index!==hn}function gt(ne,xe,re,hn){let Se={},ke=xe.attributes,mn=0,en=re.getAttributes();for(let Qn in en)if(en[Qn].location>=0){let Pe=ke[Qn];Pe===void 0&&(Qn==="instanceMatrix"&&ne.instanceMatrix&&(Pe=ne.instanceMatrix),Qn==="instanceColor"&&ne.instanceColor&&(Pe=ne.instanceColor));let ti={};ti.attribute=Pe,Pe&&Pe.data&&(ti.data=Pe.data),Se[Qn]=ti,mn++}N.attributes=Se,N.attributesNum=mn,N.index=hn}function ft(){let ne=N.newAttributes;for(let xe=0,re=ne.length;xe=0){let ge=Se[en];if(ge===void 0&&(en==="instanceMatrix"&&ne.instanceMatrix&&(ge=ne.instanceMatrix),en==="instanceColor"&&ne.instanceColor&&(ge=ne.instanceColor)),ge!==void 0){let Pe=ge.normalized,ti=ge.itemSize,Yi=h.get(ge);if(Yi===void 0)continue;let ki=Yi.buffer,lr=Yi.type,pr=Yi.bytesPerElement,Kt=p.isWebGL2===!0&&(lr===d.INT||lr===d.UNSIGNED_INT||ge.gpuType===eKt);if(ge.isInterleavedBufferAttribute){let wn=ge.data,it=wn.stride,ut=ge.offset;if(wn.isInstancedInterleavedBuffer){for(let kt=0;kt0&&d.getShaderPrecisionFormat(d.FRAGMENT_SHADER,d.HIGH_FLOAT).precision>0)return"highp";Pt="mediump"}return Pt==="mediump"&&d.getShaderPrecisionFormat(d.VERTEX_SHADER,d.MEDIUM_FLOAT).precision>0&&d.getShaderPrecisionFormat(d.FRAGMENT_SHADER,d.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let E=typeof WebGL2RenderingContext<"u"&&d.constructor.name==="WebGL2RenderingContext",y=h.precision!==void 0?h.precision:"highp",I=_(y);I!==y&&(console.warn("THREE.WebGLRenderer:",y,"not supported, using",I,"instead."),y=I);let N=E||s.has("WEBGL_draw_buffers"),B=h.logarithmicDepthBuffer===!0,P=d.getParameter(d.MAX_TEXTURE_IMAGE_UNITS),U=d.getParameter(d.MAX_VERTEX_TEXTURE_IMAGE_UNITS),j=d.getParameter(d.MAX_TEXTURE_SIZE),V=d.getParameter(d.MAX_CUBE_MAP_TEXTURE_SIZE),tt=d.getParameter(d.MAX_VERTEX_ATTRIBS),Q=d.getParameter(d.MAX_VERTEX_UNIFORM_VECTORS),X=d.getParameter(d.MAX_VARYING_VECTORS),gt=d.getParameter(d.MAX_FRAGMENT_UNIFORM_VECTORS),ft=U>0,xt=E||s.has("OES_texture_float"),Bt=ft&&xt,Ot=E?d.getParameter(d.MAX_SAMPLES):0;return{isWebGL2:E,drawBuffers:N,getMaxAnisotropy:m,getMaxPrecision:_,precision:y,logarithmicDepthBuffer:B,maxTextures:P,maxVertexTextures:U,maxTextureSize:j,maxCubemapSize:V,maxAttributes:tt,maxVertexUniforms:Q,maxVaryings:X,maxFragmentUniforms:gt,vertexTextures:ft,floatFragmentTextures:xt,floatVertexTextures:Bt,maxSamples:Ot}}function jCe(d){let s=this,h=null,p=0,m=!1,_=!1,E=new Jx,y=new Ko,I={value:null,needsUpdate:!1};this.uniform=I,this.numPlanes=0,this.numIntersection=0,this.init=function(P,U){let j=P.length!==0||U||p!==0||m;return m=U,p=P.length,j},this.beginShadows=function(){_=!0,B(null)},this.endShadows=function(){_=!1},this.setGlobalState=function(P,U){h=B(P,U,0)},this.setState=function(P,U,j){let V=P.clippingPlanes,tt=P.clipIntersection,Q=P.clipShadows,X=d.get(P);if(!m||V===null||V.length===0||_&&!Q)_?B(null):N();else{let gt=_?0:p,ft=gt*4,xt=X.clippingState||null;I.value=xt,xt=B(V,U,ft,j);for(let Bt=0;Bt!==ft;++Bt)xt[Bt]=h[Bt];X.clippingState=xt,this.numIntersection=tt?this.numPlanes:0,this.numPlanes+=gt}};function N(){I.value!==h&&(I.value=h,I.needsUpdate=p>0),s.numPlanes=p,s.numIntersection=0}function B(P,U,j,V){let tt=P!==null?P.length:0,Q=null;if(tt!==0){if(Q=I.value,V!==!0||Q===null){let X=j+tt*4,gt=U.matrixWorldInverse;y.getNormalMatrix(gt),(Q===null||Q.length0){let N=new Byt(I.height/2);return N.fromEquirectangularTexture(d,E),s.set(E,N),E.addEventListener("dispose",m),h(N.texture,E.mapping)}else return null}}return E}function m(E){let y=E.target;y.removeEventListener("dispose",m);let I=s.get(y);I!==void 0&&(s.delete(y),I.dispose())}function _(){s=new WeakMap}return{get:p,dispose:_}}var Met=class extends yet{constructor(s=-1,h=1,p=1,m=-1,_=.1,E=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=s,this.right=h,this.top=p,this.bottom=m,this.near=_,this.far=E,this.updateProjectionMatrix()}copy(s,h){return super.copy(s,h),this.left=s.left,this.right=s.right,this.top=s.top,this.bottom=s.bottom,this.near=s.near,this.far=s.far,this.zoom=s.zoom,this.view=s.view===null?null:Object.assign({},s.view),this}setViewOffset(s,h,p,m,_,E){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=s,this.view.fullHeight=h,this.view.offsetX=p,this.view.offsetY=m,this.view.width=_,this.view.height=E,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let s=(this.right-this.left)/(2*this.zoom),h=(this.top-this.bottom)/(2*this.zoom),p=(this.right+this.left)/2,m=(this.top+this.bottom)/2,_=p-s,E=p+s,y=m+h,I=m-h;if(this.view!==null&&this.view.enabled){let N=(this.right-this.left)/this.view.fullWidth/this.zoom,B=(this.top-this.bottom)/this.view.fullHeight/this.zoom;_+=N*this.view.offsetX,E=_+N*this.view.width,y-=B*this.view.offsetY,I=y-B*this.view.height}this.projectionMatrix.makeOrthographic(_,E,y,I,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(s){let h=super.toJSON(s);return h.object.zoom=this.zoom,h.object.left=this.left,h.object.right=this.right,h.object.top=this.top,h.object.bottom=this.bottom,h.object.near=this.near,h.object.far=this.far,this.view!==null&&(h.object.view=Object.assign({},this.view)),h}},KI=4,xYt=[.125,.215,.35,.446,.526,.582],VA=20,byt=new Met,MYt=new Go,wyt=null,vyt=0,_yt=0,WA=(1+Math.sqrt(5))/2,ZI=1/WA,EYt=[new Ge(1,1,1),new Ge(-1,1,1),new Ge(1,1,-1),new Ge(-1,1,-1),new Ge(0,WA,ZI),new Ge(0,WA,-ZI),new Ge(ZI,0,WA),new Ge(-ZI,0,WA),new Ge(WA,ZI,0),new Ge(-WA,ZI,0)],Eet=class{constructor(s){this._renderer=s,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(s,h=0,p=.1,m=100){wyt=this._renderer.getRenderTarget(),vyt=this._renderer.getActiveCubeFace(),_yt=this._renderer.getActiveMipmapLevel(),this._setSize(256);let _=this._allocateTargets();return _.depthBuffer=!0,this._sceneToCubeUV(s,p,m,_),h>0&&this._blur(_,0,0,h),this._applyPMREM(_),this._cleanup(_),_}fromEquirectangular(s,h=null){return this._fromTexture(s,h)}fromCubemap(s,h=null){return this._fromTexture(s,h)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=CYt(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=TYt(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(s){this._lodMax=Math.floor(Math.log2(s)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let s=0;s2?ft:0,ft,ft),B.setRenderTarget(m),tt&&B.render(V,y),B.render(s,y)}V.geometry.dispose(),V.material.dispose(),B.toneMapping=U,B.autoClear=P,s.background=Q}_textureToCubeUV(s,h){let p=this._renderer,m=s.mapping===nR||s.mapping===iR;m?(this._cubemapMaterial===null&&(this._cubemapMaterial=CYt()),this._cubemapMaterial.uniforms.flipEnvMap.value=s.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=TYt());let _=m?this._cubemapMaterial:this._equirectMaterial,E=new gg(this._lodPlanes[0],_),y=_.uniforms;y.envMap.value=s;let I=this._cubeSize;Jtt(h,0,0,3*I,2*I),p.setRenderTarget(h),p.render(E,byt)}_applyPMREM(s){let h=this._renderer,p=h.autoClear;h.autoClear=!1;for(let m=1;mVA&&console.warn(`sigmaRadians, ${_}, is too large and will clip, as it requested ${Q} samples when the maximum is set to ${VA}`);let X=[],gt=0;for(let Pt=0;Ptft-KI?m-ft+KI:0),Ot=4*(this._cubeSize-xt);Jtt(h,Bt,Ot,3*xt,2*xt),I.setRenderTarget(h),I.render(P,byt)}};function GCe(d){let s=[],h=[],p=[],m=d,_=d-KI+1+xYt.length;for(let E=0;E<_;E++){let y=Math.pow(2,m);h.push(y);let I=1/y;E>d-KI?I=xYt[E-d+KI-1]:E===0&&(I=0),p.push(I);let N=1/(y-2),B=-N,P=1+N,U=[B,B,P,B,P,P,B,B,P,P,B,P],j=6,V=6,tt=3,Q=2,X=1,gt=new Float32Array(tt*V*j),ft=new Float32Array(Q*V*j),xt=new Float32Array(X*V*j);for(let Ot=0;Ot2?0:-1,ot=[Pt,se,0,Pt+2/3,se,0,Pt+2/3,se+1,0,Pt,se,0,Pt+2/3,se+1,0,Pt,se+1,0];gt.set(ot,tt*V*Ot),ft.set(U,Q*V*Ot);let Lt=[Ot,Ot,Ot,Ot,Ot,Ot];xt.set(Lt,X*V*Ot)}let Bt=new Ey;Bt.setAttribute("position",new D0(gt,tt)),Bt.setAttribute("uv",new D0(ft,Q)),Bt.setAttribute("faceIndex",new D0(xt,X)),s.push(Bt),m>KI&&m--}return{lodPlanes:s,sizeLods:h,sigmas:p}}function SYt(d,s,h){let p=new e3(d,s,h);return p.texture.mapping=Bet,p.texture.name="PMREM.cubeUv",p.scissorTest=!0,p}function Jtt(d,s,h,p,m){d.viewport.set(s,h,p,m),d.scissor.set(s,h,p,m)}function WCe(d,s,h){let p=new Float32Array(VA),m=new Ge(0,1,0);return new i3({name:"SphericalGaussianBlur",defines:{n:VA,CUBEUV_TEXEL_WIDTH:1/s,CUBEUV_TEXEL_HEIGHT:1/h,CUBEUV_MAX_MIP:`${d}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:p},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:m}},vertexShader:p2t(),fragmentShader:` +}`,No={alphahash_fragment:rSe,alphahash_pars_fragment:sSe,alphamap_fragment:oSe,alphamap_pars_fragment:cSe,alphatest_fragment:aSe,alphatest_pars_fragment:uSe,aomap_fragment:lSe,aomap_pars_fragment:hSe,batching_pars_vertex:fSe,batching_vertex:dSe,begin_vertex:pSe,beginnormal_vertex:gSe,bsdfs:mSe,iridescence_fragment:bSe,bumpmap_pars_fragment:wSe,clipping_planes_fragment:vSe,clipping_planes_pars_fragment:_Se,clipping_planes_pars_vertex:ySe,clipping_planes_vertex:xSe,color_fragment:MSe,color_pars_fragment:ESe,color_pars_vertex:SSe,color_vertex:TSe,common:CSe,cube_uv_reflection_fragment:ASe,defaultnormal_vertex:kSe,displacementmap_pars_vertex:LSe,displacementmap_vertex:PSe,emissivemap_fragment:ISe,emissivemap_pars_fragment:RSe,colorspace_fragment:DSe,colorspace_pars_fragment:NSe,envmap_fragment:OSe,envmap_common_pars_fragment:BSe,envmap_pars_fragment:FSe,envmap_pars_vertex:USe,envmap_physical_pars_fragment:KSe,envmap_vertex:zSe,fog_vertex:jSe,fog_pars_vertex:HSe,fog_fragment:GSe,fog_pars_fragment:WSe,gradientmap_pars_fragment:$Se,lightmap_fragment:VSe,lightmap_pars_fragment:qSe,lights_lambert_fragment:XSe,lights_lambert_pars_fragment:ZSe,lights_pars_begin:YSe,lights_toon_fragment:JSe,lights_toon_pars_fragment:QSe,lights_phong_fragment:tTe,lights_phong_pars_fragment:eTe,lights_physical_fragment:nTe,lights_physical_pars_fragment:iTe,lights_fragment_begin:rTe,lights_fragment_maps:sTe,lights_fragment_end:oTe,logdepthbuf_fragment:cTe,logdepthbuf_pars_fragment:aTe,logdepthbuf_pars_vertex:uTe,logdepthbuf_vertex:lTe,map_fragment:hTe,map_pars_fragment:fTe,map_particle_fragment:dTe,map_particle_pars_fragment:pTe,metalnessmap_fragment:gTe,metalnessmap_pars_fragment:mTe,morphcolor_vertex:bTe,morphnormal_vertex:wTe,morphtarget_pars_vertex:vTe,morphtarget_vertex:_Te,normal_fragment_begin:yTe,normal_fragment_maps:xTe,normal_pars_fragment:MTe,normal_pars_vertex:ETe,normal_vertex:STe,normalmap_pars_fragment:TTe,clearcoat_normal_fragment_begin:CTe,clearcoat_normal_fragment_maps:ATe,clearcoat_pars_fragment:kTe,iridescence_pars_fragment:LTe,opaque_fragment:PTe,packing:ITe,premultiplied_alpha_fragment:RTe,project_vertex:DTe,dithering_fragment:NTe,dithering_pars_fragment:OTe,roughnessmap_fragment:BTe,roughnessmap_pars_fragment:FTe,shadowmap_pars_fragment:UTe,shadowmap_pars_vertex:zTe,shadowmap_vertex:jTe,shadowmask_pars_fragment:HTe,skinbase_vertex:GTe,skinning_pars_vertex:WTe,skinning_vertex:$Te,skinnormal_vertex:VTe,specularmap_fragment:qTe,specularmap_pars_fragment:XTe,tonemapping_fragment:ZTe,tonemapping_pars_fragment:YTe,transmission_fragment:KTe,transmission_pars_fragment:JTe,uv_pars_fragment:QTe,uv_pars_vertex:tCe,uv_vertex:eCe,worldpos_vertex:nCe,background_vert:iCe,background_frag:rCe,backgroundCube_vert:sCe,backgroundCube_frag:oCe,cube_vert:cCe,cube_frag:aCe,depth_vert:uCe,depth_frag:lCe,distanceRGBA_vert:hCe,distanceRGBA_frag:fCe,equirect_vert:dCe,equirect_frag:pCe,linedashed_vert:gCe,linedashed_frag:mCe,meshbasic_vert:bCe,meshbasic_frag:wCe,meshlambert_vert:vCe,meshlambert_frag:_Ce,meshmatcap_vert:yCe,meshmatcap_frag:xCe,meshnormal_vert:MCe,meshnormal_frag:ECe,meshphong_vert:SCe,meshphong_frag:TCe,meshphysical_vert:CCe,meshphysical_frag:ACe,meshtoon_vert:kCe,meshtoon_frag:LCe,points_vert:PCe,points_frag:ICe,shadow_vert:RCe,shadow_frag:DCe,sprite_vert:NCe,sprite_frag:OCe},Zi={common:{diffuse:{value:new Go(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Ko},alphaMap:{value:null},alphaMapTransform:{value:new Ko},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Ko}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Ko}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Ko}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Ko},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Ko},normalScale:{value:new Nc(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Ko},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Ko}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Ko}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Ko}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Go(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Go(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Ko},alphaTest:{value:0},uvTransform:{value:new Ko}},sprite:{diffuse:{value:new Go(16777215)},opacity:{value:1},center:{value:new Nc(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Ko},alphaMap:{value:null},alphaMapTransform:{value:new Ko},alphaTest:{value:0}}},yy={basic:{uniforms:i1([Zi.common,Zi.specularmap,Zi.envmap,Zi.aomap,Zi.lightmap,Zi.fog]),vertexShader:No.meshbasic_vert,fragmentShader:No.meshbasic_frag},lambert:{uniforms:i1([Zi.common,Zi.specularmap,Zi.envmap,Zi.aomap,Zi.lightmap,Zi.emissivemap,Zi.bumpmap,Zi.normalmap,Zi.displacementmap,Zi.fog,Zi.lights,{emissive:{value:new Go(0)}}]),vertexShader:No.meshlambert_vert,fragmentShader:No.meshlambert_frag},phong:{uniforms:i1([Zi.common,Zi.specularmap,Zi.envmap,Zi.aomap,Zi.lightmap,Zi.emissivemap,Zi.bumpmap,Zi.normalmap,Zi.displacementmap,Zi.fog,Zi.lights,{emissive:{value:new Go(0)},specular:{value:new Go(1118481)},shininess:{value:30}}]),vertexShader:No.meshphong_vert,fragmentShader:No.meshphong_frag},standard:{uniforms:i1([Zi.common,Zi.envmap,Zi.aomap,Zi.lightmap,Zi.emissivemap,Zi.bumpmap,Zi.normalmap,Zi.displacementmap,Zi.roughnessmap,Zi.metalnessmap,Zi.fog,Zi.lights,{emissive:{value:new Go(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:No.meshphysical_vert,fragmentShader:No.meshphysical_frag},toon:{uniforms:i1([Zi.common,Zi.aomap,Zi.lightmap,Zi.emissivemap,Zi.bumpmap,Zi.normalmap,Zi.displacementmap,Zi.gradientmap,Zi.fog,Zi.lights,{emissive:{value:new Go(0)}}]),vertexShader:No.meshtoon_vert,fragmentShader:No.meshtoon_frag},matcap:{uniforms:i1([Zi.common,Zi.bumpmap,Zi.normalmap,Zi.displacementmap,Zi.fog,{matcap:{value:null}}]),vertexShader:No.meshmatcap_vert,fragmentShader:No.meshmatcap_frag},points:{uniforms:i1([Zi.points,Zi.fog]),vertexShader:No.points_vert,fragmentShader:No.points_frag},dashed:{uniforms:i1([Zi.common,Zi.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:No.linedashed_vert,fragmentShader:No.linedashed_frag},depth:{uniforms:i1([Zi.common,Zi.displacementmap]),vertexShader:No.depth_vert,fragmentShader:No.depth_frag},normal:{uniforms:i1([Zi.common,Zi.bumpmap,Zi.normalmap,Zi.displacementmap,{opacity:{value:1}}]),vertexShader:No.meshnormal_vert,fragmentShader:No.meshnormal_frag},sprite:{uniforms:i1([Zi.sprite,Zi.fog]),vertexShader:No.sprite_vert,fragmentShader:No.sprite_frag},background:{uniforms:{uvTransform:{value:new Ko},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:No.background_vert,fragmentShader:No.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:No.backgroundCube_vert,fragmentShader:No.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:No.cube_vert,fragmentShader:No.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:No.equirect_vert,fragmentShader:No.equirect_frag},distanceRGBA:{uniforms:i1([Zi.common,Zi.displacementmap,{referencePosition:{value:new Ge},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:No.distanceRGBA_vert,fragmentShader:No.distanceRGBA_frag},shadow:{uniforms:i1([Zi.lights,Zi.fog,{color:{value:new Go(0)},opacity:{value:1}}]),vertexShader:No.shadow_vert,fragmentShader:No.shadow_frag}};yy.physical={uniforms:i1([yy.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Ko},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Ko},clearcoatNormalScale:{value:new Nc(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Ko},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Ko},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Ko},sheen:{value:0},sheenColor:{value:new Go(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Ko},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Ko},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Ko},transmissionSamplerSize:{value:new Nc},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Ko},attenuationDistance:{value:0},attenuationColor:{value:new Go(0)},specularColor:{value:new Go(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Ko},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Ko},anisotropyVector:{value:new Nc},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Ko}}]),vertexShader:No.meshphysical_vert,fragmentShader:No.meshphysical_frag};var Ktt={r:0,b:0,g:0};function BCe(d,s,h,p,m,_,E){let y=new Go(0),I=_===!0?0:1,O,B,P=null,U=0,W=null;function q(Q,X){let gt=!1,ft=X.isScene===!0?X.background:null;ft&&ft.isTexture&&(ft=(X.backgroundBlurriness>0?h:s).get(ft)),ft===null?et(y,I):ft&&ft.isColor&&(et(ft,1),gt=!0);let xt=d.xr.getEnvironmentBlendMode();xt==="additive"?p.buffers.color.setClear(0,0,0,1,E):xt==="alpha-blend"&&p.buffers.color.setClear(0,0,0,0,E),(d.autoClear||gt)&&d.clear(d.autoClearColor,d.autoClearDepth,d.autoClearStencil),ft&&(ft.isCubeTexture||ft.mapping===Bet)?(B===void 0&&(B=new gg(new YA(1,1,1),new n3({name:"BackgroundCubeMaterial",uniforms:sR(yy.backgroundCube.uniforms),vertexShader:yy.backgroundCube.vertexShader,fragmentShader:yy.backgroundCube.fragmentShader,side:mg,depthTest:!1,depthWrite:!1,fog:!1})),B.geometry.deleteAttribute("normal"),B.geometry.deleteAttribute("uv"),B.onBeforeRender=function(Bt,Ot,Pt){this.matrixWorld.copyPosition(Pt.matrixWorld)},Object.defineProperty(B.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),m.update(B)),B.material.uniforms.envMap.value=ft,B.material.uniforms.flipEnvMap.value=ft.isCubeTexture&&ft.isRenderTargetTexture===!1?-1:1,B.material.uniforms.backgroundBlurriness.value=X.backgroundBlurriness,B.material.uniforms.backgroundIntensity.value=X.backgroundIntensity,B.material.toneMapped=Na.getTransfer(ft.colorSpace)!==_u,(P!==ft||U!==ft.version||W!==d.toneMapping)&&(B.material.needsUpdate=!0,P=ft,U=ft.version,W=d.toneMapping),B.layers.enableAll(),Q.unshift(B,B.geometry,B.material,0,0,null)):ft&&ft.isTexture&&(O===void 0&&(O=new gg(new Uyt(2,2),new n3({name:"BackgroundMaterial",uniforms:sR(yy.background.uniforms),vertexShader:yy.background.vertexShader,fragmentShader:yy.background.fragmentShader,side:hS,depthTest:!1,depthWrite:!1,fog:!1})),O.geometry.deleteAttribute("normal"),Object.defineProperty(O.material,"map",{get:function(){return this.uniforms.t2D.value}}),m.update(O)),O.material.uniforms.t2D.value=ft,O.material.uniforms.backgroundIntensity.value=X.backgroundIntensity,O.material.toneMapped=Na.getTransfer(ft.colorSpace)!==_u,ft.matrixAutoUpdate===!0&&ft.updateMatrix(),O.material.uniforms.uvTransform.value.copy(ft.matrix),(P!==ft||U!==ft.version||W!==d.toneMapping)&&(O.material.needsUpdate=!0,P=ft,U=ft.version,W=d.toneMapping),O.layers.enableAll(),Q.unshift(O,O.geometry,O.material,0,0,null))}function et(Q,X){Q.getRGB(Ktt,mKt(d)),p.buffers.color.setClear(Ktt.r,Ktt.g,Ktt.b,X,E)}return{getClearColor:function(){return y},setClearColor:function(Q,X=1){y.set(Q),I=X,et(y,I)},getClearAlpha:function(){return I},setClearAlpha:function(Q){I=Q,et(y,I)},render:q}}function FCe(d,s,h,p){let m=d.getParameter(d.MAX_VERTEX_ATTRIBS),_=p.isWebGL2?null:s.get("OES_vertex_array_object"),E=p.isWebGL2||_!==null,y={},I=Q(null),O=I,B=!1;function P(ne,xe,re,hn,Se){let ke=!1;if(E){let mn=et(hn,re,xe);O!==mn&&(O=mn,W(O.object)),ke=X(ne,hn,re,Se),ke&>(ne,hn,re,Se)}else{let mn=xe.wireframe===!0;(O.geometry!==hn.id||O.program!==re.id||O.wireframe!==mn)&&(O.geometry=hn.id,O.program=re.id,O.wireframe=mn,ke=!0)}Se!==null&&h.update(Se,d.ELEMENT_ARRAY_BUFFER),(ke||B)&&(B=!1,se(ne,xe,re,hn),Se!==null&&d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,h.get(Se).buffer))}function U(){return p.isWebGL2?d.createVertexArray():_.createVertexArrayOES()}function W(ne){return p.isWebGL2?d.bindVertexArray(ne):_.bindVertexArrayOES(ne)}function q(ne){return p.isWebGL2?d.deleteVertexArray(ne):_.deleteVertexArrayOES(ne)}function et(ne,xe,re){let hn=re.wireframe===!0,Se=y[ne.id];Se===void 0&&(Se={},y[ne.id]=Se);let ke=Se[xe.id];ke===void 0&&(ke={},Se[xe.id]=ke);let mn=ke[hn];return mn===void 0&&(mn=Q(U()),ke[hn]=mn),mn}function Q(ne){let xe=[],re=[],hn=[];for(let Se=0;Se=0){let Pe=Se[Qn],ti=ke[Qn];if(ti===void 0&&(Qn==="instanceMatrix"&&ne.instanceMatrix&&(ti=ne.instanceMatrix),Qn==="instanceColor"&&ne.instanceColor&&(ti=ne.instanceColor)),Pe===void 0||Pe.attribute!==ti||ti&&Pe.data!==ti.data)return!0;mn++}return O.attributesNum!==mn||O.index!==hn}function gt(ne,xe,re,hn){let Se={},ke=xe.attributes,mn=0,en=re.getAttributes();for(let Qn in en)if(en[Qn].location>=0){let Pe=ke[Qn];Pe===void 0&&(Qn==="instanceMatrix"&&ne.instanceMatrix&&(Pe=ne.instanceMatrix),Qn==="instanceColor"&&ne.instanceColor&&(Pe=ne.instanceColor));let ti={};ti.attribute=Pe,Pe&&Pe.data&&(ti.data=Pe.data),Se[Qn]=ti,mn++}O.attributes=Se,O.attributesNum=mn,O.index=hn}function ft(){let ne=O.newAttributes;for(let xe=0,re=ne.length;xe=0){let ge=Se[en];if(ge===void 0&&(en==="instanceMatrix"&&ne.instanceMatrix&&(ge=ne.instanceMatrix),en==="instanceColor"&&ne.instanceColor&&(ge=ne.instanceColor)),ge!==void 0){let Pe=ge.normalized,ti=ge.itemSize,Yi=h.get(ge);if(Yi===void 0)continue;let ki=Yi.buffer,lr=Yi.type,pr=Yi.bytesPerElement,Kt=p.isWebGL2===!0&&(lr===d.INT||lr===d.UNSIGNED_INT||ge.gpuType===rKt);if(ge.isInterleavedBufferAttribute){let wn=ge.data,it=wn.stride,ut=ge.offset;if(wn.isInstancedInterleavedBuffer){for(let kt=0;kt0&&d.getShaderPrecisionFormat(d.FRAGMENT_SHADER,d.HIGH_FLOAT).precision>0)return"highp";Pt="mediump"}return Pt==="mediump"&&d.getShaderPrecisionFormat(d.VERTEX_SHADER,d.MEDIUM_FLOAT).precision>0&&d.getShaderPrecisionFormat(d.FRAGMENT_SHADER,d.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let E=typeof WebGL2RenderingContext<"u"&&d.constructor.name==="WebGL2RenderingContext",y=h.precision!==void 0?h.precision:"highp",I=_(y);I!==y&&(console.warn("THREE.WebGLRenderer:",y,"not supported, using",I,"instead."),y=I);let O=E||s.has("WEBGL_draw_buffers"),B=h.logarithmicDepthBuffer===!0,P=d.getParameter(d.MAX_TEXTURE_IMAGE_UNITS),U=d.getParameter(d.MAX_VERTEX_TEXTURE_IMAGE_UNITS),W=d.getParameter(d.MAX_TEXTURE_SIZE),q=d.getParameter(d.MAX_CUBE_MAP_TEXTURE_SIZE),et=d.getParameter(d.MAX_VERTEX_ATTRIBS),Q=d.getParameter(d.MAX_VERTEX_UNIFORM_VECTORS),X=d.getParameter(d.MAX_VARYING_VECTORS),gt=d.getParameter(d.MAX_FRAGMENT_UNIFORM_VECTORS),ft=U>0,xt=E||s.has("OES_texture_float"),Bt=ft&&xt,Ot=E?d.getParameter(d.MAX_SAMPLES):0;return{isWebGL2:E,drawBuffers:O,getMaxAnisotropy:m,getMaxPrecision:_,precision:y,logarithmicDepthBuffer:B,maxTextures:P,maxVertexTextures:U,maxTextureSize:W,maxCubemapSize:q,maxAttributes:et,maxVertexUniforms:Q,maxVaryings:X,maxFragmentUniforms:gt,vertexTextures:ft,floatFragmentTextures:xt,floatVertexTextures:Bt,maxSamples:Ot}}function jCe(d){let s=this,h=null,p=0,m=!1,_=!1,E=new Kx,y=new Ko,I={value:null,needsUpdate:!1};this.uniform=I,this.numPlanes=0,this.numIntersection=0,this.init=function(P,U){let W=P.length!==0||U||p!==0||m;return m=U,p=P.length,W},this.beginShadows=function(){_=!0,B(null)},this.endShadows=function(){_=!1},this.setGlobalState=function(P,U){h=B(P,U,0)},this.setState=function(P,U,W){let q=P.clippingPlanes,et=P.clipIntersection,Q=P.clipShadows,X=d.get(P);if(!m||q===null||q.length===0||_&&!Q)_?B(null):O();else{let gt=_?0:p,ft=gt*4,xt=X.clippingState||null;I.value=xt,xt=B(q,U,ft,W);for(let Bt=0;Bt!==ft;++Bt)xt[Bt]=h[Bt];X.clippingState=xt,this.numIntersection=et?this.numPlanes:0,this.numPlanes+=gt}};function O(){I.value!==h&&(I.value=h,I.needsUpdate=p>0),s.numPlanes=p,s.numIntersection=0}function B(P,U,W,q){let et=P!==null?P.length:0,Q=null;if(et!==0){if(Q=I.value,q!==!0||Q===null){let X=W+et*4,gt=U.matrixWorldInverse;y.getNormalMatrix(gt),(Q===null||Q.length0){let O=new Fyt(I.height/2);return O.fromEquirectangularTexture(d,E),s.set(E,O),E.addEventListener("dispose",m),h(O.texture,E.mapping)}else return null}}return E}function m(E){let y=E.target;y.removeEventListener("dispose",m);let I=s.get(y);I!==void 0&&(s.delete(y),I.dispose())}function _(){s=new WeakMap}return{get:p,dispose:_}}var Met=class extends yet{constructor(s=-1,h=1,p=1,m=-1,_=.1,E=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=s,this.right=h,this.top=p,this.bottom=m,this.near=_,this.far=E,this.updateProjectionMatrix()}copy(s,h){return super.copy(s,h),this.left=s.left,this.right=s.right,this.top=s.top,this.bottom=s.bottom,this.near=s.near,this.far=s.far,this.zoom=s.zoom,this.view=s.view===null?null:Object.assign({},s.view),this}setViewOffset(s,h,p,m,_,E){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=s,this.view.fullHeight=h,this.view.offsetX=p,this.view.offsetY=m,this.view.width=_,this.view.height=E,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let s=(this.right-this.left)/(2*this.zoom),h=(this.top-this.bottom)/(2*this.zoom),p=(this.right+this.left)/2,m=(this.top+this.bottom)/2,_=p-s,E=p+s,y=m+h,I=m-h;if(this.view!==null&&this.view.enabled){let O=(this.right-this.left)/this.view.fullWidth/this.zoom,B=(this.top-this.bottom)/this.view.fullHeight/this.zoom;_+=O*this.view.offsetX,E=_+O*this.view.width,y-=B*this.view.offsetY,I=y-B*this.view.height}this.projectionMatrix.makeOrthographic(_,E,y,I,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(s){let h=super.toJSON(s);return h.object.zoom=this.zoom,h.object.left=this.left,h.object.right=this.right,h.object.top=this.top,h.object.bottom=this.bottom,h.object.near=this.near,h.object.far=this.far,this.view!==null&&(h.object.view=Object.assign({},this.view)),h}},YI=4,SYt=[.125,.215,.35,.446,.526,.582],$A=20,wyt=new Met,TYt=new Go,vyt=null,_yt=0,yyt=0,GA=(1+Math.sqrt(5))/2,XI=1/GA,CYt=[new Ge(1,1,1),new Ge(-1,1,1),new Ge(1,1,-1),new Ge(-1,1,-1),new Ge(0,GA,XI),new Ge(0,GA,-XI),new Ge(XI,0,GA),new Ge(-XI,0,GA),new Ge(GA,XI,0),new Ge(-GA,XI,0)],Eet=class{constructor(s){this._renderer=s,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(s,h=0,p=.1,m=100){vyt=this._renderer.getRenderTarget(),_yt=this._renderer.getActiveCubeFace(),yyt=this._renderer.getActiveMipmapLevel(),this._setSize(256);let _=this._allocateTargets();return _.depthBuffer=!0,this._sceneToCubeUV(s,p,m,_),h>0&&this._blur(_,0,0,h),this._applyPMREM(_),this._cleanup(_),_}fromEquirectangular(s,h=null){return this._fromTexture(s,h)}fromCubemap(s,h=null){return this._fromTexture(s,h)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=LYt(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=kYt(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(s){this._lodMax=Math.floor(Math.log2(s)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let s=0;s2?ft:0,ft,ft),B.setRenderTarget(m),et&&B.render(q,y),B.render(s,y)}q.geometry.dispose(),q.material.dispose(),B.toneMapping=U,B.autoClear=P,s.background=Q}_textureToCubeUV(s,h){let p=this._renderer,m=s.mapping===eR||s.mapping===nR;m?(this._cubemapMaterial===null&&(this._cubemapMaterial=LYt()),this._cubemapMaterial.uniforms.flipEnvMap.value=s.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=kYt());let _=m?this._cubemapMaterial:this._equirectMaterial,E=new gg(this._lodPlanes[0],_),y=_.uniforms;y.envMap.value=s;let I=this._cubeSize;Jtt(h,0,0,3*I,2*I),p.setRenderTarget(h),p.render(E,wyt)}_applyPMREM(s){let h=this._renderer,p=h.autoClear;h.autoClear=!1;for(let m=1;m$A&&console.warn(`sigmaRadians, ${_}, is too large and will clip, as it requested ${Q} samples when the maximum is set to ${$A}`);let X=[],gt=0;for(let Pt=0;Pt<$A;++Pt){let se=Pt/et,ot=Math.exp(-se*se/2);X.push(ot),Pt===0?gt+=ot:Ptft-YI?m-ft+YI:0),Ot=4*(this._cubeSize-xt);Jtt(h,Bt,Ot,3*xt,2*xt),I.setRenderTarget(h),I.render(P,wyt)}};function GCe(d){let s=[],h=[],p=[],m=d,_=d-YI+1+SYt.length;for(let E=0;E<_;E++){let y=Math.pow(2,m);h.push(y);let I=1/y;E>d-YI?I=SYt[E-d+YI-1]:E===0&&(I=0),p.push(I);let O=1/(y-2),B=-O,P=1+O,U=[B,B,P,B,P,P,B,B,P,P,B,P],W=6,q=6,et=3,Q=2,X=1,gt=new Float32Array(et*q*W),ft=new Float32Array(Q*q*W),xt=new Float32Array(X*q*W);for(let Ot=0;Ot2?0:-1,ot=[Pt,se,0,Pt+2/3,se,0,Pt+2/3,se+1,0,Pt,se,0,Pt+2/3,se+1,0,Pt,se+1,0];gt.set(ot,et*q*Ot),ft.set(U,Q*q*Ot);let Lt=[Ot,Ot,Ot,Ot,Ot,Ot];xt.set(Lt,X*q*Ot)}let Bt=new My;Bt.setAttribute("position",new D0(gt,et)),Bt.setAttribute("uv",new D0(ft,Q)),Bt.setAttribute("faceIndex",new D0(xt,X)),s.push(Bt),m>YI&&m--}return{lodPlanes:s,sizeLods:h,sigmas:p}}function AYt(d,s,h){let p=new t3(d,s,h);return p.texture.mapping=Bet,p.texture.name="PMREM.cubeUv",p.scissorTest=!0,p}function Jtt(d,s,h,p,m){d.viewport.set(s,h,p,m),d.scissor.set(s,h,p,m)}function WCe(d,s,h){let p=new Float32Array($A),m=new Ge(0,1,0);return new n3({name:"SphericalGaussianBlur",defines:{n:$A,CUBEUV_TEXEL_WIDTH:1/s,CUBEUV_TEXEL_HEIGHT:1/h,CUBEUV_MAX_MIP:`${d}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:p},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:m}},vertexShader:g2t(),fragmentShader:` precision mediump float; precision mediump int; @@ -3593,7 +3593,7 @@ void main() { } } - `,blending:aS,depthTest:!1,depthWrite:!1})}function TYt(){return new i3({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:p2t(),fragmentShader:` + `,blending:aS,depthTest:!1,depthWrite:!1})}function kYt(){return new n3({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:g2t(),fragmentShader:` precision mediump float; precision mediump int; @@ -3612,7 +3612,7 @@ void main() { gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); } - `,blending:aS,depthTest:!1,depthWrite:!1})}function CYt(){return new i3({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:p2t(),fragmentShader:` + `,blending:aS,depthTest:!1,depthWrite:!1})}function LYt(){return new n3({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:g2t(),fragmentShader:` precision mediump float; precision mediump int; @@ -3628,7 +3628,7 @@ void main() { gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); } - `,blending:aS,depthTest:!1,depthWrite:!1})}function p2t(){return` + `,blending:aS,depthTest:!1,depthWrite:!1})}function g2t(){return` precision mediump float; precision mediump int; @@ -3683,38 +3683,38 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function $Ce(d){let s=new WeakMap,h=null;function p(y){if(y&&y.isTexture){let I=y.mapping,N=I===Cyt||I===Ayt,B=I===nR||I===iR;if(N||B)if(y.isRenderTargetTexture&&y.needsPMREMUpdate===!0){y.needsPMREMUpdate=!1;let P=s.get(y);return h===null&&(h=new Eet(d)),P=N?h.fromEquirectangular(y,P):h.fromCubemap(y,P),s.set(y,P),P.texture}else{if(s.has(y))return s.get(y).texture;{let P=y.image;if(N&&P&&P.height>0||B&&P&&m(P)){h===null&&(h=new Eet(d));let U=N?h.fromEquirectangular(y):h.fromCubemap(y);return s.set(y,U),y.addEventListener("dispose",_),U.texture}else return null}}}return y}function m(y){let I=0,N=6;for(let B=0;Bs.maxTextureSize&&(Lt=Math.ceil(ot/s.maxTextureSize),ot=s.maxTextureSize);let be=new Float32Array(ot*Lt*4*V),ln=new bet(be,ot,Lt,V);ln.type=oS,ln.needsUpdate=!0;let Fn=se*4;for(let xe=0;xe0)return d;let m=s*h,_=AYt[m];if(_===void 0&&(_=new Float32Array(m),AYt[m]=_),s!==0){p.toArray(_,0);for(let E=1,y=0;E!==s;++E)y+=h,d[E].toArray(_,y)}return _}function lf(d,s){if(d.length!==s.length)return!1;for(let h=0,p=d.length;h0||B&&P&&m(P)){h===null&&(h=new Eet(d));let U=O?h.fromEquirectangular(y):h.fromCubemap(y);return s.set(y,U),y.addEventListener("dispose",_),U.texture}else return null}}}return y}function m(y){let I=0,O=6;for(let B=0;Bs.maxTextureSize&&(Lt=Math.ceil(ot/s.maxTextureSize),ot=s.maxTextureSize);let be=new Float32Array(ot*Lt*4*q),ln=new bet(be,ot,Lt,q);ln.type=oS,ln.needsUpdate=!0;let Fn=se*4;for(let xe=0;xe0)return d;let m=s*h,_=PYt[m];if(_===void 0&&(_=new Float32Array(m),PYt[m]=_),s!==0){p.toArray(_,0);for(let E=1,y=0;E!==s;++E)y+=h,d[E].toArray(_,y)}return _}function lf(d,s){if(d.length!==s.length)return!1;for(let h=0,p=d.length;h":" "} ${y}: ${h[E]}`)}return p.join(` -`)}function W4e(d){let s=Na.getPrimaries(Na.workingColorSpace),h=Na.getPrimaries(d),p;switch(s===h?p="":s===fet&&h===het?p="LinearDisplayP3ToLinearSRGB":s===het&&h===fet&&(p="LinearSRGBToLinearDisplayP3"),d){case t3:case Fet:return[p,"LinearTransferOETF"];case Pd:case d2t:return[p,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",d),[p,"LinearTransferOETF"]}}function NYt(d,s,h){let p=d.getShaderParameter(s,d.COMPILE_STATUS),m=d.getShaderInfoLog(s).trim();if(p&&m==="")return"";let _=/ERROR: 0:(\d+)/.exec(m);if(_){let E=parseInt(_[1]);return h.toUpperCase()+` +`)}function W4e(d){let s=Na.getPrimaries(Na.workingColorSpace),h=Na.getPrimaries(d),p;switch(s===h?p="":s===fet&&h===het?p="LinearDisplayP3ToLinearSRGB":s===het&&h===fet&&(p="LinearSRGBToLinearDisplayP3"),d){case Qx:case Fet:return[p,"LinearTransferOETF"];case Pd:case p2t:return[p,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",d),[p,"LinearTransferOETF"]}}function FYt(d,s,h){let p=d.getShaderParameter(s,d.COMPILE_STATUS),m=d.getShaderInfoLog(s).trim();if(p&&m==="")return"";let _=/ERROR: 0:(\d+)/.exec(m);if(_){let E=parseInt(_[1]);return h.toUpperCase()+` `+m+` -`+G4e(d.getShaderSource(s),E)}else return m}function $4e(d,s){let h=W4e(s);return`vec4 ${d}( vec4 value ) { return ${h[0]}( ${h[1]}( value ) ); }`}function V4e(d,s){let h;switch(s){case lEe:h="Linear";break;case hEe:h="Reinhard";break;case fEe:h="OptimizedCineon";break;case dEe:h="ACESFilmic";break;case gEe:h="AgX";break;case pEe:h="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",s),h="Linear"}return"vec3 "+d+"( vec3 color ) { return "+h+"ToneMapping( color ); }"}function q4e(d){return[d.extensionDerivatives||d.envMapCubeUVHeight||d.bumpMap||d.normalMapTangentSpace||d.clearcoatNormalMap||d.flatShading||d.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(d.extensionFragDepth||d.logarithmicDepthBuffer)&&d.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",d.extensionDrawBuffers&&d.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(d.extensionShaderTextureLOD||d.envMap||d.transmission)&&d.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(JI).join(` -`)}function X4e(d){return[d.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":""].filter(JI).join(` +`+G4e(d.getShaderSource(s),E)}else return m}function $4e(d,s){let h=W4e(s);return`vec4 ${d}( vec4 value ) { return ${h[0]}( ${h[1]}( value ) ); }`}function V4e(d,s){let h;switch(s){case lEe:h="Linear";break;case hEe:h="Reinhard";break;case fEe:h="OptimizedCineon";break;case dEe:h="ACESFilmic";break;case gEe:h="AgX";break;case pEe:h="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",s),h="Linear"}return"vec3 "+d+"( vec3 color ) { return "+h+"ToneMapping( color ); }"}function q4e(d){return[d.extensionDerivatives||d.envMapCubeUVHeight||d.bumpMap||d.normalMapTangentSpace||d.clearcoatNormalMap||d.flatShading||d.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(d.extensionFragDepth||d.logarithmicDepthBuffer)&&d.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",d.extensionDrawBuffers&&d.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(d.extensionShaderTextureLOD||d.envMap||d.transmission)&&d.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(KI).join(` +`)}function X4e(d){return[d.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":""].filter(KI).join(` `)}function Z4e(d){let s=[];for(let h in d){let p=d[h];p!==!1&&s.push("#define "+h+" "+p)}return s.join(` -`)}function Y4e(d,s){let h={},p=d.getProgramParameter(s,d.ACTIVE_ATTRIBUTES);for(let m=0;m/gm;function Hyt(d){return d.replace(K4e,Q4e)}var J4e=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function Q4e(d,s){let h=No[s];if(h===void 0){let p=J4e.get(s);if(p!==void 0)h=No[p],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',s,p);else throw new Error("Can not resolve #include <"+s+">")}return Hyt(h)}var tAe=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function FYt(d){return d.replace(tAe,eAe)}function eAe(d,s,h,p){let m="";for(let _=parseInt(s);_/gm;function Gyt(d){return d.replace(K4e,Q4e)}var J4e=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function Q4e(d,s){let h=No[s];if(h===void 0){let p=J4e.get(s);if(p!==void 0)h=No[p],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',s,p);else throw new Error("Can not resolve #include <"+s+">")}return Gyt(h)}var tAe=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function jYt(d){return d.replace(tAe,eAe)}function eAe(d,s,h,p){let m="";for(let _=parseInt(s);_0&&(X+=` -`),gt=[j,"#define SHADER_TYPE "+h.shaderType,"#define SHADER_NAME "+h.shaderName,tt].filter(JI).join(` +`),gt=[W,"#define SHADER_TYPE "+h.shaderType,"#define SHADER_NAME "+h.shaderName,et].filter(KI).join(` `),gt.length>0&&(gt+=` -`)):(X=[UYt(h),"#define SHADER_TYPE "+h.shaderType,"#define SHADER_NAME "+h.shaderName,tt,h.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",h.batching?"#define USE_BATCHING":"",h.instancing?"#define USE_INSTANCING":"",h.instancingColor?"#define USE_INSTANCING_COLOR":"",h.useFog&&h.fog?"#define USE_FOG":"",h.useFog&&h.fogExp2?"#define FOG_EXP2":"",h.map?"#define USE_MAP":"",h.envMap?"#define USE_ENVMAP":"",h.envMap?"#define "+B:"",h.lightMap?"#define USE_LIGHTMAP":"",h.aoMap?"#define USE_AOMAP":"",h.bumpMap?"#define USE_BUMPMAP":"",h.normalMap?"#define USE_NORMALMAP":"",h.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",h.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",h.displacementMap?"#define USE_DISPLACEMENTMAP":"",h.emissiveMap?"#define USE_EMISSIVEMAP":"",h.anisotropy?"#define USE_ANISOTROPY":"",h.anisotropyMap?"#define USE_ANISOTROPYMAP":"",h.clearcoatMap?"#define USE_CLEARCOATMAP":"",h.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",h.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",h.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",h.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",h.specularMap?"#define USE_SPECULARMAP":"",h.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",h.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",h.roughnessMap?"#define USE_ROUGHNESSMAP":"",h.metalnessMap?"#define USE_METALNESSMAP":"",h.alphaMap?"#define USE_ALPHAMAP":"",h.alphaHash?"#define USE_ALPHAHASH":"",h.transmission?"#define USE_TRANSMISSION":"",h.transmissionMap?"#define USE_TRANSMISSIONMAP":"",h.thicknessMap?"#define USE_THICKNESSMAP":"",h.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",h.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",h.mapUv?"#define MAP_UV "+h.mapUv:"",h.alphaMapUv?"#define ALPHAMAP_UV "+h.alphaMapUv:"",h.lightMapUv?"#define LIGHTMAP_UV "+h.lightMapUv:"",h.aoMapUv?"#define AOMAP_UV "+h.aoMapUv:"",h.emissiveMapUv?"#define EMISSIVEMAP_UV "+h.emissiveMapUv:"",h.bumpMapUv?"#define BUMPMAP_UV "+h.bumpMapUv:"",h.normalMapUv?"#define NORMALMAP_UV "+h.normalMapUv:"",h.displacementMapUv?"#define DISPLACEMENTMAP_UV "+h.displacementMapUv:"",h.metalnessMapUv?"#define METALNESSMAP_UV "+h.metalnessMapUv:"",h.roughnessMapUv?"#define ROUGHNESSMAP_UV "+h.roughnessMapUv:"",h.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+h.anisotropyMapUv:"",h.clearcoatMapUv?"#define CLEARCOATMAP_UV "+h.clearcoatMapUv:"",h.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+h.clearcoatNormalMapUv:"",h.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+h.clearcoatRoughnessMapUv:"",h.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+h.iridescenceMapUv:"",h.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+h.iridescenceThicknessMapUv:"",h.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+h.sheenColorMapUv:"",h.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+h.sheenRoughnessMapUv:"",h.specularMapUv?"#define SPECULARMAP_UV "+h.specularMapUv:"",h.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+h.specularColorMapUv:"",h.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+h.specularIntensityMapUv:"",h.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+h.transmissionMapUv:"",h.thicknessMapUv?"#define THICKNESSMAP_UV "+h.thicknessMapUv:"",h.vertexTangents&&h.flatShading===!1?"#define USE_TANGENT":"",h.vertexColors?"#define USE_COLOR":"",h.vertexAlphas?"#define USE_COLOR_ALPHA":"",h.vertexUv1s?"#define USE_UV1":"",h.vertexUv2s?"#define USE_UV2":"",h.vertexUv3s?"#define USE_UV3":"",h.pointsUvs?"#define USE_POINTS_UV":"",h.flatShading?"#define FLAT_SHADED":"",h.skinning?"#define USE_SKINNING":"",h.morphTargets?"#define USE_MORPHTARGETS":"",h.morphNormals&&h.flatShading===!1?"#define USE_MORPHNORMALS":"",h.morphColors&&h.isWebGL2?"#define USE_MORPHCOLORS":"",h.morphTargetsCount>0&&h.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",h.morphTargetsCount>0&&h.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+h.morphTextureStride:"",h.morphTargetsCount>0&&h.isWebGL2?"#define MORPHTARGETS_COUNT "+h.morphTargetsCount:"",h.doubleSided?"#define DOUBLE_SIDED":"",h.flipSided?"#define FLIP_SIDED":"",h.shadowMapEnabled?"#define USE_SHADOWMAP":"",h.shadowMapEnabled?"#define "+I:"",h.sizeAttenuation?"#define USE_SIZEATTENUATION":"",h.numLightProbes>0?"#define USE_LIGHT_PROBES":"",h.useLegacyLights?"#define LEGACY_LIGHTS":"",h.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",h.logarithmicDepthBuffer&&h.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` -`].filter(JI).join(` -`),gt=[j,UYt(h),"#define SHADER_TYPE "+h.shaderType,"#define SHADER_NAME "+h.shaderName,tt,h.useFog&&h.fog?"#define USE_FOG":"",h.useFog&&h.fogExp2?"#define FOG_EXP2":"",h.map?"#define USE_MAP":"",h.matcap?"#define USE_MATCAP":"",h.envMap?"#define USE_ENVMAP":"",h.envMap?"#define "+N:"",h.envMap?"#define "+B:"",h.envMap?"#define "+P:"",U?"#define CUBEUV_TEXEL_WIDTH "+U.texelWidth:"",U?"#define CUBEUV_TEXEL_HEIGHT "+U.texelHeight:"",U?"#define CUBEUV_MAX_MIP "+U.maxMip+".0":"",h.lightMap?"#define USE_LIGHTMAP":"",h.aoMap?"#define USE_AOMAP":"",h.bumpMap?"#define USE_BUMPMAP":"",h.normalMap?"#define USE_NORMALMAP":"",h.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",h.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",h.emissiveMap?"#define USE_EMISSIVEMAP":"",h.anisotropy?"#define USE_ANISOTROPY":"",h.anisotropyMap?"#define USE_ANISOTROPYMAP":"",h.clearcoat?"#define USE_CLEARCOAT":"",h.clearcoatMap?"#define USE_CLEARCOATMAP":"",h.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",h.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",h.iridescence?"#define USE_IRIDESCENCE":"",h.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",h.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",h.specularMap?"#define USE_SPECULARMAP":"",h.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",h.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",h.roughnessMap?"#define USE_ROUGHNESSMAP":"",h.metalnessMap?"#define USE_METALNESSMAP":"",h.alphaMap?"#define USE_ALPHAMAP":"",h.alphaTest?"#define USE_ALPHATEST":"",h.alphaHash?"#define USE_ALPHAHASH":"",h.sheen?"#define USE_SHEEN":"",h.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",h.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",h.transmission?"#define USE_TRANSMISSION":"",h.transmissionMap?"#define USE_TRANSMISSIONMAP":"",h.thicknessMap?"#define USE_THICKNESSMAP":"",h.vertexTangents&&h.flatShading===!1?"#define USE_TANGENT":"",h.vertexColors||h.instancingColor?"#define USE_COLOR":"",h.vertexAlphas?"#define USE_COLOR_ALPHA":"",h.vertexUv1s?"#define USE_UV1":"",h.vertexUv2s?"#define USE_UV2":"",h.vertexUv3s?"#define USE_UV3":"",h.pointsUvs?"#define USE_POINTS_UV":"",h.gradientMap?"#define USE_GRADIENTMAP":"",h.flatShading?"#define FLAT_SHADED":"",h.doubleSided?"#define DOUBLE_SIDED":"",h.flipSided?"#define FLIP_SIDED":"",h.shadowMapEnabled?"#define USE_SHADOWMAP":"",h.shadowMapEnabled?"#define "+I:"",h.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",h.numLightProbes>0?"#define USE_LIGHT_PROBES":"",h.useLegacyLights?"#define LEGACY_LIGHTS":"",h.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",h.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",h.logarithmicDepthBuffer&&h.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",h.toneMapping!==uS?"#define TONE_MAPPING":"",h.toneMapping!==uS?No.tonemapping_pars_fragment:"",h.toneMapping!==uS?V4e("toneMapping",h.toneMapping):"",h.dithering?"#define DITHERING":"",h.opaque?"#define OPAQUE":"",No.colorspace_pars_fragment,$4e("linearToOutputTexel",h.outputColorSpace),h.useDepthPacking?"#define DEPTH_PACKING "+h.depthPacking:"",` -`].filter(JI).join(` -`)),E=Hyt(E),E=OYt(E,h),E=BYt(E,h),y=Hyt(y),y=OYt(y,h),y=BYt(y,h),E=FYt(E),y=FYt(y),h.isWebGL2&&h.isRawShaderMaterial!==!0&&(ft=`#version 300 es -`,X=[V,"precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` +`)):(X=[HYt(h),"#define SHADER_TYPE "+h.shaderType,"#define SHADER_NAME "+h.shaderName,et,h.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",h.batching?"#define USE_BATCHING":"",h.instancing?"#define USE_INSTANCING":"",h.instancingColor?"#define USE_INSTANCING_COLOR":"",h.useFog&&h.fog?"#define USE_FOG":"",h.useFog&&h.fogExp2?"#define FOG_EXP2":"",h.map?"#define USE_MAP":"",h.envMap?"#define USE_ENVMAP":"",h.envMap?"#define "+B:"",h.lightMap?"#define USE_LIGHTMAP":"",h.aoMap?"#define USE_AOMAP":"",h.bumpMap?"#define USE_BUMPMAP":"",h.normalMap?"#define USE_NORMALMAP":"",h.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",h.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",h.displacementMap?"#define USE_DISPLACEMENTMAP":"",h.emissiveMap?"#define USE_EMISSIVEMAP":"",h.anisotropy?"#define USE_ANISOTROPY":"",h.anisotropyMap?"#define USE_ANISOTROPYMAP":"",h.clearcoatMap?"#define USE_CLEARCOATMAP":"",h.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",h.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",h.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",h.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",h.specularMap?"#define USE_SPECULARMAP":"",h.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",h.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",h.roughnessMap?"#define USE_ROUGHNESSMAP":"",h.metalnessMap?"#define USE_METALNESSMAP":"",h.alphaMap?"#define USE_ALPHAMAP":"",h.alphaHash?"#define USE_ALPHAHASH":"",h.transmission?"#define USE_TRANSMISSION":"",h.transmissionMap?"#define USE_TRANSMISSIONMAP":"",h.thicknessMap?"#define USE_THICKNESSMAP":"",h.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",h.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",h.mapUv?"#define MAP_UV "+h.mapUv:"",h.alphaMapUv?"#define ALPHAMAP_UV "+h.alphaMapUv:"",h.lightMapUv?"#define LIGHTMAP_UV "+h.lightMapUv:"",h.aoMapUv?"#define AOMAP_UV "+h.aoMapUv:"",h.emissiveMapUv?"#define EMISSIVEMAP_UV "+h.emissiveMapUv:"",h.bumpMapUv?"#define BUMPMAP_UV "+h.bumpMapUv:"",h.normalMapUv?"#define NORMALMAP_UV "+h.normalMapUv:"",h.displacementMapUv?"#define DISPLACEMENTMAP_UV "+h.displacementMapUv:"",h.metalnessMapUv?"#define METALNESSMAP_UV "+h.metalnessMapUv:"",h.roughnessMapUv?"#define ROUGHNESSMAP_UV "+h.roughnessMapUv:"",h.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+h.anisotropyMapUv:"",h.clearcoatMapUv?"#define CLEARCOATMAP_UV "+h.clearcoatMapUv:"",h.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+h.clearcoatNormalMapUv:"",h.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+h.clearcoatRoughnessMapUv:"",h.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+h.iridescenceMapUv:"",h.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+h.iridescenceThicknessMapUv:"",h.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+h.sheenColorMapUv:"",h.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+h.sheenRoughnessMapUv:"",h.specularMapUv?"#define SPECULARMAP_UV "+h.specularMapUv:"",h.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+h.specularColorMapUv:"",h.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+h.specularIntensityMapUv:"",h.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+h.transmissionMapUv:"",h.thicknessMapUv?"#define THICKNESSMAP_UV "+h.thicknessMapUv:"",h.vertexTangents&&h.flatShading===!1?"#define USE_TANGENT":"",h.vertexColors?"#define USE_COLOR":"",h.vertexAlphas?"#define USE_COLOR_ALPHA":"",h.vertexUv1s?"#define USE_UV1":"",h.vertexUv2s?"#define USE_UV2":"",h.vertexUv3s?"#define USE_UV3":"",h.pointsUvs?"#define USE_POINTS_UV":"",h.flatShading?"#define FLAT_SHADED":"",h.skinning?"#define USE_SKINNING":"",h.morphTargets?"#define USE_MORPHTARGETS":"",h.morphNormals&&h.flatShading===!1?"#define USE_MORPHNORMALS":"",h.morphColors&&h.isWebGL2?"#define USE_MORPHCOLORS":"",h.morphTargetsCount>0&&h.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",h.morphTargetsCount>0&&h.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+h.morphTextureStride:"",h.morphTargetsCount>0&&h.isWebGL2?"#define MORPHTARGETS_COUNT "+h.morphTargetsCount:"",h.doubleSided?"#define DOUBLE_SIDED":"",h.flipSided?"#define FLIP_SIDED":"",h.shadowMapEnabled?"#define USE_SHADOWMAP":"",h.shadowMapEnabled?"#define "+I:"",h.sizeAttenuation?"#define USE_SIZEATTENUATION":"",h.numLightProbes>0?"#define USE_LIGHT_PROBES":"",h.useLegacyLights?"#define LEGACY_LIGHTS":"",h.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",h.logarithmicDepthBuffer&&h.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` +`].filter(KI).join(` +`),gt=[W,HYt(h),"#define SHADER_TYPE "+h.shaderType,"#define SHADER_NAME "+h.shaderName,et,h.useFog&&h.fog?"#define USE_FOG":"",h.useFog&&h.fogExp2?"#define FOG_EXP2":"",h.map?"#define USE_MAP":"",h.matcap?"#define USE_MATCAP":"",h.envMap?"#define USE_ENVMAP":"",h.envMap?"#define "+O:"",h.envMap?"#define "+B:"",h.envMap?"#define "+P:"",U?"#define CUBEUV_TEXEL_WIDTH "+U.texelWidth:"",U?"#define CUBEUV_TEXEL_HEIGHT "+U.texelHeight:"",U?"#define CUBEUV_MAX_MIP "+U.maxMip+".0":"",h.lightMap?"#define USE_LIGHTMAP":"",h.aoMap?"#define USE_AOMAP":"",h.bumpMap?"#define USE_BUMPMAP":"",h.normalMap?"#define USE_NORMALMAP":"",h.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",h.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",h.emissiveMap?"#define USE_EMISSIVEMAP":"",h.anisotropy?"#define USE_ANISOTROPY":"",h.anisotropyMap?"#define USE_ANISOTROPYMAP":"",h.clearcoat?"#define USE_CLEARCOAT":"",h.clearcoatMap?"#define USE_CLEARCOATMAP":"",h.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",h.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",h.iridescence?"#define USE_IRIDESCENCE":"",h.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",h.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",h.specularMap?"#define USE_SPECULARMAP":"",h.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",h.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",h.roughnessMap?"#define USE_ROUGHNESSMAP":"",h.metalnessMap?"#define USE_METALNESSMAP":"",h.alphaMap?"#define USE_ALPHAMAP":"",h.alphaTest?"#define USE_ALPHATEST":"",h.alphaHash?"#define USE_ALPHAHASH":"",h.sheen?"#define USE_SHEEN":"",h.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",h.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",h.transmission?"#define USE_TRANSMISSION":"",h.transmissionMap?"#define USE_TRANSMISSIONMAP":"",h.thicknessMap?"#define USE_THICKNESSMAP":"",h.vertexTangents&&h.flatShading===!1?"#define USE_TANGENT":"",h.vertexColors||h.instancingColor?"#define USE_COLOR":"",h.vertexAlphas?"#define USE_COLOR_ALPHA":"",h.vertexUv1s?"#define USE_UV1":"",h.vertexUv2s?"#define USE_UV2":"",h.vertexUv3s?"#define USE_UV3":"",h.pointsUvs?"#define USE_POINTS_UV":"",h.gradientMap?"#define USE_GRADIENTMAP":"",h.flatShading?"#define FLAT_SHADED":"",h.doubleSided?"#define DOUBLE_SIDED":"",h.flipSided?"#define FLIP_SIDED":"",h.shadowMapEnabled?"#define USE_SHADOWMAP":"",h.shadowMapEnabled?"#define "+I:"",h.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",h.numLightProbes>0?"#define USE_LIGHT_PROBES":"",h.useLegacyLights?"#define LEGACY_LIGHTS":"",h.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",h.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",h.logarithmicDepthBuffer&&h.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",h.toneMapping!==uS?"#define TONE_MAPPING":"",h.toneMapping!==uS?No.tonemapping_pars_fragment:"",h.toneMapping!==uS?V4e("toneMapping",h.toneMapping):"",h.dithering?"#define DITHERING":"",h.opaque?"#define OPAQUE":"",No.colorspace_pars_fragment,$4e("linearToOutputTexel",h.outputColorSpace),h.useDepthPacking?"#define DEPTH_PACKING "+h.depthPacking:"",` +`].filter(KI).join(` +`)),E=Gyt(E),E=UYt(E,h),E=zYt(E,h),y=Gyt(y),y=UYt(y,h),y=zYt(y,h),E=jYt(E),y=jYt(y),h.isWebGL2&&h.isRawShaderMaterial!==!0&&(ft=`#version 300 es +`,X=[q,"precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` `)+` -`+X,gt=["precision mediump sampler2DArray;","#define varying in",h.glslVersion===rYt?"":"layout(location = 0) out highp vec4 pc_fragColor;",h.glslVersion===rYt?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` +`+X,gt=["precision mediump sampler2DArray;","#define varying in",h.glslVersion===cYt?"":"layout(location = 0) out highp vec4 pc_fragColor;",h.glslVersion===cYt?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` `)+` -`+gt);let xt=ft+X+E,Bt=ft+gt+y,Ot=DYt(m,m.VERTEX_SHADER,xt),Pt=DYt(m,m.FRAGMENT_SHADER,Bt);m.attachShader(Q,Ot),m.attachShader(Q,Pt),h.index0AttributeName!==void 0?m.bindAttribLocation(Q,0,h.index0AttributeName):h.morphTargets===!0&&m.bindAttribLocation(Q,0,"position"),m.linkProgram(Q);function se(ln){if(d.debug.checkShaderErrors){let Fn=m.getProgramInfoLog(Q).trim(),ne=m.getShaderInfoLog(Ot).trim(),xe=m.getShaderInfoLog(Pt).trim(),re=!0,hn=!0;if(m.getProgramParameter(Q,m.LINK_STATUS)===!1)if(re=!1,typeof d.debug.onShaderError=="function")d.debug.onShaderError(m,Q,Ot,Pt);else{let Se=NYt(m,Ot,"vertex"),ke=NYt(m,Pt,"fragment");console.error("THREE.WebGLProgram: Shader Error "+m.getError()+" - VALIDATE_STATUS "+m.getProgramParameter(Q,m.VALIDATE_STATUS)+` +`+gt);let xt=ft+X+E,Bt=ft+gt+y,Ot=BYt(m,m.VERTEX_SHADER,xt),Pt=BYt(m,m.FRAGMENT_SHADER,Bt);m.attachShader(Q,Ot),m.attachShader(Q,Pt),h.index0AttributeName!==void 0?m.bindAttribLocation(Q,0,h.index0AttributeName):h.morphTargets===!0&&m.bindAttribLocation(Q,0,"position"),m.linkProgram(Q);function se(ln){if(d.debug.checkShaderErrors){let Fn=m.getProgramInfoLog(Q).trim(),ne=m.getShaderInfoLog(Ot).trim(),xe=m.getShaderInfoLog(Pt).trim(),re=!0,hn=!0;if(m.getProgramParameter(Q,m.LINK_STATUS)===!1)if(re=!1,typeof d.debug.onShaderError=="function")d.debug.onShaderError(m,Q,Ot,Pt);else{let Se=FYt(m,Ot,"vertex"),ke=FYt(m,Pt,"fragment");console.error("THREE.WebGLProgram: Shader Error "+m.getError()+" - VALIDATE_STATUS "+m.getProgramParameter(Q,m.VALIDATE_STATUS)+` Program Info Log: `+Fn+` `+Se+` -`+ke)}else Fn!==""?console.warn("THREE.WebGLProgram: Program Info Log:",Fn):(ne===""||xe==="")&&(hn=!1);hn&&(ln.diagnostics={runnable:re,programLog:Fn,vertexShader:{log:ne,prefix:X},fragmentShader:{log:xe,prefix:gt}})}m.deleteShader(Ot),m.deleteShader(Pt),ot=new eR(m,Q),Lt=Y4e(m,Q)}let ot;this.getUniforms=function(){return ot===void 0&&se(this),ot};let Lt;this.getAttributes=function(){return Lt===void 0&&se(this),Lt};let be=h.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return be===!1&&(be=m.getProgramParameter(Q,j4e)),be},this.destroy=function(){p.releaseStatesOfProgram(this),m.deleteProgram(Q),this.program=void 0},this.type=h.shaderType,this.name=h.shaderName,this.id=H4e++,this.cacheKey=s,this.usedTimes=1,this.program=Q,this.vertexShader=Ot,this.fragmentShader=Pt,this}var aAe=0,Gyt=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(s){let h=s.vertexShader,p=s.fragmentShader,m=this._getShaderStage(h),_=this._getShaderStage(p),E=this._getShaderCacheForMaterial(s);return E.has(m)===!1&&(E.add(m),m.usedTimes++),E.has(_)===!1&&(E.add(_),_.usedTimes++),this}remove(s){let h=this.materialCache.get(s);for(let p of h)p.usedTimes--,p.usedTimes===0&&this.shaderCache.delete(p.code);return this.materialCache.delete(s),this}getVertexShaderID(s){return this._getShaderStage(s.vertexShader).id}getFragmentShaderID(s){return this._getShaderStage(s.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(s){let h=this.materialCache,p=h.get(s);return p===void 0&&(p=new Set,h.set(s,p)),p}_getShaderStage(s){let h=this.shaderCache,p=h.get(s);return p===void 0&&(p=new Wyt(s),h.set(s,p)),p}},Wyt=class{constructor(s){this.id=aAe++,this.code=s,this.usedTimes=0}};function uAe(d,s,h,p,m,_,E){let y=new SU,I=new Gyt,N=[],B=m.isWebGL2,P=m.logarithmicDepthBuffer,U=m.vertexTextures,j=m.precision,V={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function tt(ot){return ot===0?"uv":`uv${ot}`}function Q(ot,Lt,be,ln,Fn){let ne=ln.fog,xe=Fn.geometry,re=ot.isMeshStandardMaterial?ln.environment:null,hn=(ot.isMeshStandardMaterial?h:s).get(ot.envMap||re),Se=hn&&hn.mapping===Bet?hn.image.height:null,ke=V[ot.type];ot.precision!==null&&(j=m.getMaxPrecision(ot.precision),j!==ot.precision&&console.warn("THREE.WebGLProgram.getParameters:",ot.precision,"not supported, using",j,"instead."));let mn=xe.morphAttributes.position||xe.morphAttributes.normal||xe.morphAttributes.color,en=mn!==void 0?mn.length:0,Qn=0;xe.morphAttributes.position!==void 0&&(Qn=1),xe.morphAttributes.normal!==void 0&&(Qn=2),xe.morphAttributes.color!==void 0&&(Qn=3);let ge,Pe,ti,Yi;if(ke){let ru=xy[ke];ge=ru.vertexShader,Pe=ru.fragmentShader}else ge=ot.vertexShader,Pe=ot.fragmentShader,I.update(ot),ti=I.getVertexShaderID(ot),Yi=I.getFragmentShaderID(ot);let ki=d.getRenderTarget(),lr=Fn.isInstancedMesh===!0,pr=Fn.isBatchedMesh===!0,Kt=!!ot.map,wn=!!ot.matcap,it=!!hn,ut=!!ot.aoMap,kt=!!ot.lightMap,Nt=!!ot.bumpMap,ie=!!ot.normalMap,rn=!!ot.displacementMap,Pn=!!ot.emissiveMap,Tt=!!ot.metalnessMap,yt=!!ot.roughnessMap,ue=ot.anisotropy>0,fn=ot.clearcoat>0,An=ot.iridescence>0,zn=ot.sheen>0,Li=ot.transmission>0,xi=ue&&!!ot.anisotropyMap,Jt=fn&&!!ot.clearcoatMap,nn=fn&&!!ot.clearcoatNormalMap,vn=fn&&!!ot.clearcoatRoughnessMap,he=An&&!!ot.iridescenceMap,Mn=An&&!!ot.iridescenceThicknessMap,Sn=zn&&!!ot.sheenColorMap,gn=zn&&!!ot.sheenRoughnessMap,Ce=!!ot.specularMap,dn=!!ot.specularColorMap,jn=!!ot.specularIntensityMap,ar=Li&&!!ot.transmissionMap,gr=Li&&!!ot.thicknessMap,tr=!!ot.gradientMap,Ln=!!ot.alphaMap,Qt=ot.alphaTest>0,Mi=!!ot.alphaHash,sn=!!ot.extensions,Zn=!!xe.attributes.uv1,oi=!!xe.attributes.uv2,Jr=!!xe.attributes.uv3,Bs=uS;return ot.toneMapped&&(ki===null||ki.isXRRenderTarget===!0)&&(Bs=d.toneMapping),{isWebGL2:B,shaderID:ke,shaderType:ot.type,shaderName:ot.name,vertexShader:ge,fragmentShader:Pe,defines:ot.defines,customVertexShaderID:ti,customFragmentShaderID:Yi,isRawShaderMaterial:ot.isRawShaderMaterial===!0,glslVersion:ot.glslVersion,precision:j,batching:pr,instancing:lr,instancingColor:lr&&Fn.instanceColor!==null,supportsVertexTextures:U,outputColorSpace:ki===null?d.outputColorSpace:ki.isXRRenderTarget===!0?ki.texture.colorSpace:t3,map:Kt,matcap:wn,envMap:it,envMapMode:it&&hn.mapping,envMapCubeUVHeight:Se,aoMap:ut,lightMap:kt,bumpMap:Nt,normalMap:ie,displacementMap:U&&rn,emissiveMap:Pn,normalMapObjectSpace:ie&&ot.normalMapType===CEe,normalMapTangentSpace:ie&&ot.normalMapType===uKt,metalnessMap:Tt,roughnessMap:yt,anisotropy:ue,anisotropyMap:xi,clearcoat:fn,clearcoatMap:Jt,clearcoatNormalMap:nn,clearcoatRoughnessMap:vn,iridescence:An,iridescenceMap:he,iridescenceThicknessMap:Mn,sheen:zn,sheenColorMap:Sn,sheenRoughnessMap:gn,specularMap:Ce,specularColorMap:dn,specularIntensityMap:jn,transmission:Li,transmissionMap:ar,thicknessMap:gr,gradientMap:tr,opaque:ot.transparent===!1&&ot.blending===QI,alphaMap:Ln,alphaTest:Qt,alphaHash:Mi,combine:ot.combine,mapUv:Kt&&tt(ot.map.channel),aoMapUv:ut&&tt(ot.aoMap.channel),lightMapUv:kt&&tt(ot.lightMap.channel),bumpMapUv:Nt&&tt(ot.bumpMap.channel),normalMapUv:ie&&tt(ot.normalMap.channel),displacementMapUv:rn&&tt(ot.displacementMap.channel),emissiveMapUv:Pn&&tt(ot.emissiveMap.channel),metalnessMapUv:Tt&&tt(ot.metalnessMap.channel),roughnessMapUv:yt&&tt(ot.roughnessMap.channel),anisotropyMapUv:xi&&tt(ot.anisotropyMap.channel),clearcoatMapUv:Jt&&tt(ot.clearcoatMap.channel),clearcoatNormalMapUv:nn&&tt(ot.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:vn&&tt(ot.clearcoatRoughnessMap.channel),iridescenceMapUv:he&&tt(ot.iridescenceMap.channel),iridescenceThicknessMapUv:Mn&&tt(ot.iridescenceThicknessMap.channel),sheenColorMapUv:Sn&&tt(ot.sheenColorMap.channel),sheenRoughnessMapUv:gn&&tt(ot.sheenRoughnessMap.channel),specularMapUv:Ce&&tt(ot.specularMap.channel),specularColorMapUv:dn&&tt(ot.specularColorMap.channel),specularIntensityMapUv:jn&&tt(ot.specularIntensityMap.channel),transmissionMapUv:ar&&tt(ot.transmissionMap.channel),thicknessMapUv:gr&&tt(ot.thicknessMap.channel),alphaMapUv:Ln&&tt(ot.alphaMap.channel),vertexTangents:!!xe.attributes.tangent&&(ie||ue),vertexColors:ot.vertexColors,vertexAlphas:ot.vertexColors===!0&&!!xe.attributes.color&&xe.attributes.color.itemSize===4,vertexUv1s:Zn,vertexUv2s:oi,vertexUv3s:Jr,pointsUvs:Fn.isPoints===!0&&!!xe.attributes.uv&&(Kt||Ln),fog:!!ne,useFog:ot.fog===!0,fogExp2:ne&&ne.isFogExp2,flatShading:ot.flatShading===!0,sizeAttenuation:ot.sizeAttenuation===!0,logarithmicDepthBuffer:P,skinning:Fn.isSkinnedMesh===!0,morphTargets:xe.morphAttributes.position!==void 0,morphNormals:xe.morphAttributes.normal!==void 0,morphColors:xe.morphAttributes.color!==void 0,morphTargetsCount:en,morphTextureStride:Qn,numDirLights:Lt.directional.length,numPointLights:Lt.point.length,numSpotLights:Lt.spot.length,numSpotLightMaps:Lt.spotLightMap.length,numRectAreaLights:Lt.rectArea.length,numHemiLights:Lt.hemi.length,numDirLightShadows:Lt.directionalShadowMap.length,numPointLightShadows:Lt.pointShadowMap.length,numSpotLightShadows:Lt.spotShadowMap.length,numSpotLightShadowsWithMaps:Lt.numSpotLightShadowsWithMaps,numLightProbes:Lt.numLightProbes,numClippingPlanes:E.numPlanes,numClipIntersection:E.numIntersection,dithering:ot.dithering,shadowMapEnabled:d.shadowMap.enabled&&be.length>0,shadowMapType:d.shadowMap.type,toneMapping:Bs,useLegacyLights:d._useLegacyLights,decodeVideoTexture:Kt&&ot.map.isVideoTexture===!0&&Na.getTransfer(ot.map.colorSpace)===vu,premultipliedAlpha:ot.premultipliedAlpha,doubleSided:ot.side===Xw,flipSided:ot.side===mg,useDepthPacking:ot.depthPacking>=0,depthPacking:ot.depthPacking||0,index0AttributeName:ot.index0AttributeName,extensionDerivatives:sn&&ot.extensions.derivatives===!0,extensionFragDepth:sn&&ot.extensions.fragDepth===!0,extensionDrawBuffers:sn&&ot.extensions.drawBuffers===!0,extensionShaderTextureLOD:sn&&ot.extensions.shaderTextureLOD===!0,extensionClipCullDistance:sn&&ot.extensions.clipCullDistance&&p.has("WEBGL_clip_cull_distance"),rendererExtensionFragDepth:B||p.has("EXT_frag_depth"),rendererExtensionDrawBuffers:B||p.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:B||p.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:p.has("KHR_parallel_shader_compile"),customProgramCacheKey:ot.customProgramCacheKey()}}function X(ot){let Lt=[];if(ot.shaderID?Lt.push(ot.shaderID):(Lt.push(ot.customVertexShaderID),Lt.push(ot.customFragmentShaderID)),ot.defines!==void 0)for(let be in ot.defines)Lt.push(be),Lt.push(ot.defines[be]);return ot.isRawShaderMaterial===!1&&(gt(Lt,ot),ft(Lt,ot),Lt.push(d.outputColorSpace)),Lt.push(ot.customProgramCacheKey),Lt.join()}function gt(ot,Lt){ot.push(Lt.precision),ot.push(Lt.outputColorSpace),ot.push(Lt.envMapMode),ot.push(Lt.envMapCubeUVHeight),ot.push(Lt.mapUv),ot.push(Lt.alphaMapUv),ot.push(Lt.lightMapUv),ot.push(Lt.aoMapUv),ot.push(Lt.bumpMapUv),ot.push(Lt.normalMapUv),ot.push(Lt.displacementMapUv),ot.push(Lt.emissiveMapUv),ot.push(Lt.metalnessMapUv),ot.push(Lt.roughnessMapUv),ot.push(Lt.anisotropyMapUv),ot.push(Lt.clearcoatMapUv),ot.push(Lt.clearcoatNormalMapUv),ot.push(Lt.clearcoatRoughnessMapUv),ot.push(Lt.iridescenceMapUv),ot.push(Lt.iridescenceThicknessMapUv),ot.push(Lt.sheenColorMapUv),ot.push(Lt.sheenRoughnessMapUv),ot.push(Lt.specularMapUv),ot.push(Lt.specularColorMapUv),ot.push(Lt.specularIntensityMapUv),ot.push(Lt.transmissionMapUv),ot.push(Lt.thicknessMapUv),ot.push(Lt.combine),ot.push(Lt.fogExp2),ot.push(Lt.sizeAttenuation),ot.push(Lt.morphTargetsCount),ot.push(Lt.morphAttributeCount),ot.push(Lt.numDirLights),ot.push(Lt.numPointLights),ot.push(Lt.numSpotLights),ot.push(Lt.numSpotLightMaps),ot.push(Lt.numHemiLights),ot.push(Lt.numRectAreaLights),ot.push(Lt.numDirLightShadows),ot.push(Lt.numPointLightShadows),ot.push(Lt.numSpotLightShadows),ot.push(Lt.numSpotLightShadowsWithMaps),ot.push(Lt.numLightProbes),ot.push(Lt.shadowMapType),ot.push(Lt.toneMapping),ot.push(Lt.numClippingPlanes),ot.push(Lt.numClipIntersection),ot.push(Lt.depthPacking)}function ft(ot,Lt){y.disableAll(),Lt.isWebGL2&&y.enable(0),Lt.supportsVertexTextures&&y.enable(1),Lt.instancing&&y.enable(2),Lt.instancingColor&&y.enable(3),Lt.matcap&&y.enable(4),Lt.envMap&&y.enable(5),Lt.normalMapObjectSpace&&y.enable(6),Lt.normalMapTangentSpace&&y.enable(7),Lt.clearcoat&&y.enable(8),Lt.iridescence&&y.enable(9),Lt.alphaTest&&y.enable(10),Lt.vertexColors&&y.enable(11),Lt.vertexAlphas&&y.enable(12),Lt.vertexUv1s&&y.enable(13),Lt.vertexUv2s&&y.enable(14),Lt.vertexUv3s&&y.enable(15),Lt.vertexTangents&&y.enable(16),Lt.anisotropy&&y.enable(17),Lt.alphaHash&&y.enable(18),Lt.batching&&y.enable(19),ot.push(y.mask),y.disableAll(),Lt.fog&&y.enable(0),Lt.useFog&&y.enable(1),Lt.flatShading&&y.enable(2),Lt.logarithmicDepthBuffer&&y.enable(3),Lt.skinning&&y.enable(4),Lt.morphTargets&&y.enable(5),Lt.morphNormals&&y.enable(6),Lt.morphColors&&y.enable(7),Lt.premultipliedAlpha&&y.enable(8),Lt.shadowMapEnabled&&y.enable(9),Lt.useLegacyLights&&y.enable(10),Lt.doubleSided&&y.enable(11),Lt.flipSided&&y.enable(12),Lt.useDepthPacking&&y.enable(13),Lt.dithering&&y.enable(14),Lt.transmission&&y.enable(15),Lt.sheen&&y.enable(16),Lt.opaque&&y.enable(17),Lt.pointsUvs&&y.enable(18),Lt.decodeVideoTexture&&y.enable(19),ot.push(y.mask)}function xt(ot){let Lt=V[ot.type],be;if(Lt){let ln=xy[Lt];be=JEe.clone(ln.uniforms)}else be=ot.uniforms;return be}function Bt(ot,Lt){let be;for(let ln=0,Fn=N.length;ln0?p.push(X):j.transparent===!0?m.push(X):h.push(X)}function I(P,U,j,V,tt,Q){let X=E(P,U,j,V,tt,Q);j.transmission>0?p.unshift(X):j.transparent===!0?m.unshift(X):h.unshift(X)}function N(P,U){h.length>1&&h.sort(P||hAe),p.length>1&&p.sort(U||zYt),m.length>1&&m.sort(U||zYt)}function B(){for(let P=s,U=d.length;P=_.length?(E=new jYt,_.push(E)):E=_[m],E}function h(){d=new WeakMap}return{get:s,dispose:h}}function dAe(){let d={};return{get:function(s){if(d[s.id]!==void 0)return d[s.id];let h;switch(s.type){case"DirectionalLight":h={direction:new Ge,color:new Go};break;case"SpotLight":h={position:new Ge,direction:new Ge,color:new Go,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":h={position:new Ge,color:new Go,distance:0,decay:0};break;case"HemisphereLight":h={direction:new Ge,skyColor:new Go,groundColor:new Go};break;case"RectAreaLight":h={color:new Go,position:new Ge,halfWidth:new Ge,halfHeight:new Ge};break}return d[s.id]=h,h}}}function pAe(){let d={};return{get:function(s){if(d[s.id]!==void 0)return d[s.id];let h;switch(s.type){case"DirectionalLight":h={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Nc};break;case"SpotLight":h={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Nc};break;case"PointLight":h={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Nc,shadowCameraNear:1,shadowCameraFar:1e3};break}return d[s.id]=h,h}}}var gAe=0;function mAe(d,s){return(s.castShadow?2:0)-(d.castShadow?2:0)+(s.map?1:0)-(d.map?1:0)}function bAe(d,s){let h=new dAe,p=pAe(),m={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let B=0;B<9;B++)m.probe.push(new Ge);let _=new Ge,E=new Fu,y=new Fu;function I(B,P){let U=0,j=0,V=0;for(let ln=0;ln<9;ln++)m.probe[ln].set(0,0,0);let tt=0,Q=0,X=0,gt=0,ft=0,xt=0,Bt=0,Ot=0,Pt=0,se=0,ot=0;B.sort(mAe);let Lt=P===!0?Math.PI:1;for(let ln=0,Fn=B.length;ln0&&(s.isWebGL2?d.has("OES_texture_float_linear")===!0?(m.rectAreaLTC1=Zi.LTC_FLOAT_1,m.rectAreaLTC2=Zi.LTC_FLOAT_2):(m.rectAreaLTC1=Zi.LTC_HALF_1,m.rectAreaLTC2=Zi.LTC_HALF_2):d.has("OES_texture_float_linear")===!0?(m.rectAreaLTC1=Zi.LTC_FLOAT_1,m.rectAreaLTC2=Zi.LTC_FLOAT_2):d.has("OES_texture_half_float_linear")===!0?(m.rectAreaLTC1=Zi.LTC_HALF_1,m.rectAreaLTC2=Zi.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),m.ambient[0]=U,m.ambient[1]=j,m.ambient[2]=V;let be=m.hash;(be.directionalLength!==tt||be.pointLength!==Q||be.spotLength!==X||be.rectAreaLength!==gt||be.hemiLength!==ft||be.numDirectionalShadows!==xt||be.numPointShadows!==Bt||be.numSpotShadows!==Ot||be.numSpotMaps!==Pt||be.numLightProbes!==ot)&&(m.directional.length=tt,m.spot.length=X,m.rectArea.length=gt,m.point.length=Q,m.hemi.length=ft,m.directionalShadow.length=xt,m.directionalShadowMap.length=xt,m.pointShadow.length=Bt,m.pointShadowMap.length=Bt,m.spotShadow.length=Ot,m.spotShadowMap.length=Ot,m.directionalShadowMatrix.length=xt,m.pointShadowMatrix.length=Bt,m.spotLightMatrix.length=Ot+Pt-se,m.spotLightMap.length=Pt,m.numSpotLightShadowsWithMaps=se,m.numLightProbes=ot,be.directionalLength=tt,be.pointLength=Q,be.spotLength=X,be.rectAreaLength=gt,be.hemiLength=ft,be.numDirectionalShadows=xt,be.numPointShadows=Bt,be.numSpotShadows=Ot,be.numSpotMaps=Pt,be.numLightProbes=ot,m.version=gAe++)}function N(B,P){let U=0,j=0,V=0,tt=0,Q=0,X=P.matrixWorldInverse;for(let gt=0,ft=B.length;gt=y.length?(I=new HYt(d,s),y.push(I)):I=y[E],I}function m(){h=new WeakMap}return{get:p,dispose:m}}var $yt=class extends pS{constructor(s){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=SEe,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(s)}copy(s){return super.copy(s),this.depthPacking=s.depthPacking,this.map=s.map,this.alphaMap=s.alphaMap,this.displacementMap=s.displacementMap,this.displacementScale=s.displacementScale,this.displacementBias=s.displacementBias,this.wireframe=s.wireframe,this.wireframeLinewidth=s.wireframeLinewidth,this}},Vyt=class extends pS{constructor(s){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(s)}copy(s){return super.copy(s),this.map=s.map,this.alphaMap=s.alphaMap,this.displacementMap=s.displacementMap,this.displacementScale=s.displacementScale,this.displacementBias=s.displacementBias,this}},vAe=`void main() { +`+ke)}else Fn!==""?console.warn("THREE.WebGLProgram: Program Info Log:",Fn):(ne===""||xe==="")&&(hn=!1);hn&&(ln.diagnostics={runnable:re,programLog:Fn,vertexShader:{log:ne,prefix:X},fragmentShader:{log:xe,prefix:gt}})}m.deleteShader(Ot),m.deleteShader(Pt),ot=new tR(m,Q),Lt=Y4e(m,Q)}let ot;this.getUniforms=function(){return ot===void 0&&se(this),ot};let Lt;this.getAttributes=function(){return Lt===void 0&&se(this),Lt};let be=h.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return be===!1&&(be=m.getProgramParameter(Q,j4e)),be},this.destroy=function(){p.releaseStatesOfProgram(this),m.deleteProgram(Q),this.program=void 0},this.type=h.shaderType,this.name=h.shaderName,this.id=H4e++,this.cacheKey=s,this.usedTimes=1,this.program=Q,this.vertexShader=Ot,this.fragmentShader=Pt,this}var aAe=0,Wyt=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(s){let h=s.vertexShader,p=s.fragmentShader,m=this._getShaderStage(h),_=this._getShaderStage(p),E=this._getShaderCacheForMaterial(s);return E.has(m)===!1&&(E.add(m),m.usedTimes++),E.has(_)===!1&&(E.add(_),_.usedTimes++),this}remove(s){let h=this.materialCache.get(s);for(let p of h)p.usedTimes--,p.usedTimes===0&&this.shaderCache.delete(p.code);return this.materialCache.delete(s),this}getVertexShaderID(s){return this._getShaderStage(s.vertexShader).id}getFragmentShaderID(s){return this._getShaderStage(s.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(s){let h=this.materialCache,p=h.get(s);return p===void 0&&(p=new Set,h.set(s,p)),p}_getShaderStage(s){let h=this.shaderCache,p=h.get(s);return p===void 0&&(p=new $yt(s),h.set(s,p)),p}},$yt=class{constructor(s){this.id=aAe++,this.code=s,this.usedTimes=0}};function uAe(d,s,h,p,m,_,E){let y=new MU,I=new Wyt,O=[],B=m.isWebGL2,P=m.logarithmicDepthBuffer,U=m.vertexTextures,W=m.precision,q={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function et(ot){return ot===0?"uv":`uv${ot}`}function Q(ot,Lt,be,ln,Fn){let ne=ln.fog,xe=Fn.geometry,re=ot.isMeshStandardMaterial?ln.environment:null,hn=(ot.isMeshStandardMaterial?h:s).get(ot.envMap||re),Se=hn&&hn.mapping===Bet?hn.image.height:null,ke=q[ot.type];ot.precision!==null&&(W=m.getMaxPrecision(ot.precision),W!==ot.precision&&console.warn("THREE.WebGLProgram.getParameters:",ot.precision,"not supported, using",W,"instead."));let mn=xe.morphAttributes.position||xe.morphAttributes.normal||xe.morphAttributes.color,en=mn!==void 0?mn.length:0,Qn=0;xe.morphAttributes.position!==void 0&&(Qn=1),xe.morphAttributes.normal!==void 0&&(Qn=2),xe.morphAttributes.color!==void 0&&(Qn=3);let ge,Pe,ti,Yi;if(ke){let su=yy[ke];ge=su.vertexShader,Pe=su.fragmentShader}else ge=ot.vertexShader,Pe=ot.fragmentShader,I.update(ot),ti=I.getVertexShaderID(ot),Yi=I.getFragmentShaderID(ot);let ki=d.getRenderTarget(),lr=Fn.isInstancedMesh===!0,pr=Fn.isBatchedMesh===!0,Kt=!!ot.map,wn=!!ot.matcap,it=!!hn,ut=!!ot.aoMap,kt=!!ot.lightMap,Nt=!!ot.bumpMap,ie=!!ot.normalMap,rn=!!ot.displacementMap,Pn=!!ot.emissiveMap,Tt=!!ot.metalnessMap,yt=!!ot.roughnessMap,ue=ot.anisotropy>0,fn=ot.clearcoat>0,An=ot.iridescence>0,zn=ot.sheen>0,Li=ot.transmission>0,xi=ue&&!!ot.anisotropyMap,Jt=fn&&!!ot.clearcoatMap,nn=fn&&!!ot.clearcoatNormalMap,vn=fn&&!!ot.clearcoatRoughnessMap,he=An&&!!ot.iridescenceMap,Mn=An&&!!ot.iridescenceThicknessMap,Sn=zn&&!!ot.sheenColorMap,gn=zn&&!!ot.sheenRoughnessMap,Ce=!!ot.specularMap,dn=!!ot.specularColorMap,jn=!!ot.specularIntensityMap,ar=Li&&!!ot.transmissionMap,gr=Li&&!!ot.thicknessMap,tr=!!ot.gradientMap,Ln=!!ot.alphaMap,Qt=ot.alphaTest>0,Mi=!!ot.alphaHash,sn=!!ot.extensions,Zn=!!xe.attributes.uv1,oi=!!xe.attributes.uv2,Jr=!!xe.attributes.uv3,Bs=uS;return ot.toneMapped&&(ki===null||ki.isXRRenderTarget===!0)&&(Bs=d.toneMapping),{isWebGL2:B,shaderID:ke,shaderType:ot.type,shaderName:ot.name,vertexShader:ge,fragmentShader:Pe,defines:ot.defines,customVertexShaderID:ti,customFragmentShaderID:Yi,isRawShaderMaterial:ot.isRawShaderMaterial===!0,glslVersion:ot.glslVersion,precision:W,batching:pr,instancing:lr,instancingColor:lr&&Fn.instanceColor!==null,supportsVertexTextures:U,outputColorSpace:ki===null?d.outputColorSpace:ki.isXRRenderTarget===!0?ki.texture.colorSpace:Qx,map:Kt,matcap:wn,envMap:it,envMapMode:it&&hn.mapping,envMapCubeUVHeight:Se,aoMap:ut,lightMap:kt,bumpMap:Nt,normalMap:ie,displacementMap:U&&rn,emissiveMap:Pn,normalMapObjectSpace:ie&&ot.normalMapType===CEe,normalMapTangentSpace:ie&&ot.normalMapType===fKt,metalnessMap:Tt,roughnessMap:yt,anisotropy:ue,anisotropyMap:xi,clearcoat:fn,clearcoatMap:Jt,clearcoatNormalMap:nn,clearcoatRoughnessMap:vn,iridescence:An,iridescenceMap:he,iridescenceThicknessMap:Mn,sheen:zn,sheenColorMap:Sn,sheenRoughnessMap:gn,specularMap:Ce,specularColorMap:dn,specularIntensityMap:jn,transmission:Li,transmissionMap:ar,thicknessMap:gr,gradientMap:tr,opaque:ot.transparent===!1&&ot.blending===JI,alphaMap:Ln,alphaTest:Qt,alphaHash:Mi,combine:ot.combine,mapUv:Kt&&et(ot.map.channel),aoMapUv:ut&&et(ot.aoMap.channel),lightMapUv:kt&&et(ot.lightMap.channel),bumpMapUv:Nt&&et(ot.bumpMap.channel),normalMapUv:ie&&et(ot.normalMap.channel),displacementMapUv:rn&&et(ot.displacementMap.channel),emissiveMapUv:Pn&&et(ot.emissiveMap.channel),metalnessMapUv:Tt&&et(ot.metalnessMap.channel),roughnessMapUv:yt&&et(ot.roughnessMap.channel),anisotropyMapUv:xi&&et(ot.anisotropyMap.channel),clearcoatMapUv:Jt&&et(ot.clearcoatMap.channel),clearcoatNormalMapUv:nn&&et(ot.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:vn&&et(ot.clearcoatRoughnessMap.channel),iridescenceMapUv:he&&et(ot.iridescenceMap.channel),iridescenceThicknessMapUv:Mn&&et(ot.iridescenceThicknessMap.channel),sheenColorMapUv:Sn&&et(ot.sheenColorMap.channel),sheenRoughnessMapUv:gn&&et(ot.sheenRoughnessMap.channel),specularMapUv:Ce&&et(ot.specularMap.channel),specularColorMapUv:dn&&et(ot.specularColorMap.channel),specularIntensityMapUv:jn&&et(ot.specularIntensityMap.channel),transmissionMapUv:ar&&et(ot.transmissionMap.channel),thicknessMapUv:gr&&et(ot.thicknessMap.channel),alphaMapUv:Ln&&et(ot.alphaMap.channel),vertexTangents:!!xe.attributes.tangent&&(ie||ue),vertexColors:ot.vertexColors,vertexAlphas:ot.vertexColors===!0&&!!xe.attributes.color&&xe.attributes.color.itemSize===4,vertexUv1s:Zn,vertexUv2s:oi,vertexUv3s:Jr,pointsUvs:Fn.isPoints===!0&&!!xe.attributes.uv&&(Kt||Ln),fog:!!ne,useFog:ot.fog===!0,fogExp2:ne&&ne.isFogExp2,flatShading:ot.flatShading===!0,sizeAttenuation:ot.sizeAttenuation===!0,logarithmicDepthBuffer:P,skinning:Fn.isSkinnedMesh===!0,morphTargets:xe.morphAttributes.position!==void 0,morphNormals:xe.morphAttributes.normal!==void 0,morphColors:xe.morphAttributes.color!==void 0,morphTargetsCount:en,morphTextureStride:Qn,numDirLights:Lt.directional.length,numPointLights:Lt.point.length,numSpotLights:Lt.spot.length,numSpotLightMaps:Lt.spotLightMap.length,numRectAreaLights:Lt.rectArea.length,numHemiLights:Lt.hemi.length,numDirLightShadows:Lt.directionalShadowMap.length,numPointLightShadows:Lt.pointShadowMap.length,numSpotLightShadows:Lt.spotShadowMap.length,numSpotLightShadowsWithMaps:Lt.numSpotLightShadowsWithMaps,numLightProbes:Lt.numLightProbes,numClippingPlanes:E.numPlanes,numClipIntersection:E.numIntersection,dithering:ot.dithering,shadowMapEnabled:d.shadowMap.enabled&&be.length>0,shadowMapType:d.shadowMap.type,toneMapping:Bs,useLegacyLights:d._useLegacyLights,decodeVideoTexture:Kt&&ot.map.isVideoTexture===!0&&Na.getTransfer(ot.map.colorSpace)===_u,premultipliedAlpha:ot.premultipliedAlpha,doubleSided:ot.side===Xw,flipSided:ot.side===mg,useDepthPacking:ot.depthPacking>=0,depthPacking:ot.depthPacking||0,index0AttributeName:ot.index0AttributeName,extensionDerivatives:sn&&ot.extensions.derivatives===!0,extensionFragDepth:sn&&ot.extensions.fragDepth===!0,extensionDrawBuffers:sn&&ot.extensions.drawBuffers===!0,extensionShaderTextureLOD:sn&&ot.extensions.shaderTextureLOD===!0,extensionClipCullDistance:sn&&ot.extensions.clipCullDistance&&p.has("WEBGL_clip_cull_distance"),rendererExtensionFragDepth:B||p.has("EXT_frag_depth"),rendererExtensionDrawBuffers:B||p.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:B||p.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:p.has("KHR_parallel_shader_compile"),customProgramCacheKey:ot.customProgramCacheKey()}}function X(ot){let Lt=[];if(ot.shaderID?Lt.push(ot.shaderID):(Lt.push(ot.customVertexShaderID),Lt.push(ot.customFragmentShaderID)),ot.defines!==void 0)for(let be in ot.defines)Lt.push(be),Lt.push(ot.defines[be]);return ot.isRawShaderMaterial===!1&&(gt(Lt,ot),ft(Lt,ot),Lt.push(d.outputColorSpace)),Lt.push(ot.customProgramCacheKey),Lt.join()}function gt(ot,Lt){ot.push(Lt.precision),ot.push(Lt.outputColorSpace),ot.push(Lt.envMapMode),ot.push(Lt.envMapCubeUVHeight),ot.push(Lt.mapUv),ot.push(Lt.alphaMapUv),ot.push(Lt.lightMapUv),ot.push(Lt.aoMapUv),ot.push(Lt.bumpMapUv),ot.push(Lt.normalMapUv),ot.push(Lt.displacementMapUv),ot.push(Lt.emissiveMapUv),ot.push(Lt.metalnessMapUv),ot.push(Lt.roughnessMapUv),ot.push(Lt.anisotropyMapUv),ot.push(Lt.clearcoatMapUv),ot.push(Lt.clearcoatNormalMapUv),ot.push(Lt.clearcoatRoughnessMapUv),ot.push(Lt.iridescenceMapUv),ot.push(Lt.iridescenceThicknessMapUv),ot.push(Lt.sheenColorMapUv),ot.push(Lt.sheenRoughnessMapUv),ot.push(Lt.specularMapUv),ot.push(Lt.specularColorMapUv),ot.push(Lt.specularIntensityMapUv),ot.push(Lt.transmissionMapUv),ot.push(Lt.thicknessMapUv),ot.push(Lt.combine),ot.push(Lt.fogExp2),ot.push(Lt.sizeAttenuation),ot.push(Lt.morphTargetsCount),ot.push(Lt.morphAttributeCount),ot.push(Lt.numDirLights),ot.push(Lt.numPointLights),ot.push(Lt.numSpotLights),ot.push(Lt.numSpotLightMaps),ot.push(Lt.numHemiLights),ot.push(Lt.numRectAreaLights),ot.push(Lt.numDirLightShadows),ot.push(Lt.numPointLightShadows),ot.push(Lt.numSpotLightShadows),ot.push(Lt.numSpotLightShadowsWithMaps),ot.push(Lt.numLightProbes),ot.push(Lt.shadowMapType),ot.push(Lt.toneMapping),ot.push(Lt.numClippingPlanes),ot.push(Lt.numClipIntersection),ot.push(Lt.depthPacking)}function ft(ot,Lt){y.disableAll(),Lt.isWebGL2&&y.enable(0),Lt.supportsVertexTextures&&y.enable(1),Lt.instancing&&y.enable(2),Lt.instancingColor&&y.enable(3),Lt.matcap&&y.enable(4),Lt.envMap&&y.enable(5),Lt.normalMapObjectSpace&&y.enable(6),Lt.normalMapTangentSpace&&y.enable(7),Lt.clearcoat&&y.enable(8),Lt.iridescence&&y.enable(9),Lt.alphaTest&&y.enable(10),Lt.vertexColors&&y.enable(11),Lt.vertexAlphas&&y.enable(12),Lt.vertexUv1s&&y.enable(13),Lt.vertexUv2s&&y.enable(14),Lt.vertexUv3s&&y.enable(15),Lt.vertexTangents&&y.enable(16),Lt.anisotropy&&y.enable(17),Lt.alphaHash&&y.enable(18),Lt.batching&&y.enable(19),ot.push(y.mask),y.disableAll(),Lt.fog&&y.enable(0),Lt.useFog&&y.enable(1),Lt.flatShading&&y.enable(2),Lt.logarithmicDepthBuffer&&y.enable(3),Lt.skinning&&y.enable(4),Lt.morphTargets&&y.enable(5),Lt.morphNormals&&y.enable(6),Lt.morphColors&&y.enable(7),Lt.premultipliedAlpha&&y.enable(8),Lt.shadowMapEnabled&&y.enable(9),Lt.useLegacyLights&&y.enable(10),Lt.doubleSided&&y.enable(11),Lt.flipSided&&y.enable(12),Lt.useDepthPacking&&y.enable(13),Lt.dithering&&y.enable(14),Lt.transmission&&y.enable(15),Lt.sheen&&y.enable(16),Lt.opaque&&y.enable(17),Lt.pointsUvs&&y.enable(18),Lt.decodeVideoTexture&&y.enable(19),ot.push(y.mask)}function xt(ot){let Lt=q[ot.type],be;if(Lt){let ln=yy[Lt];be=JEe.clone(ln.uniforms)}else be=ot.uniforms;return be}function Bt(ot,Lt){let be;for(let ln=0,Fn=O.length;ln0?p.push(X):W.transparent===!0?m.push(X):h.push(X)}function I(P,U,W,q,et,Q){let X=E(P,U,W,q,et,Q);W.transmission>0?p.unshift(X):W.transparent===!0?m.unshift(X):h.unshift(X)}function O(P,U){h.length>1&&h.sort(P||hAe),p.length>1&&p.sort(U||GYt),m.length>1&&m.sort(U||GYt)}function B(){for(let P=s,U=d.length;P=_.length?(E=new WYt,_.push(E)):E=_[m],E}function h(){d=new WeakMap}return{get:s,dispose:h}}function dAe(){let d={};return{get:function(s){if(d[s.id]!==void 0)return d[s.id];let h;switch(s.type){case"DirectionalLight":h={direction:new Ge,color:new Go};break;case"SpotLight":h={position:new Ge,direction:new Ge,color:new Go,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":h={position:new Ge,color:new Go,distance:0,decay:0};break;case"HemisphereLight":h={direction:new Ge,skyColor:new Go,groundColor:new Go};break;case"RectAreaLight":h={color:new Go,position:new Ge,halfWidth:new Ge,halfHeight:new Ge};break}return d[s.id]=h,h}}}function pAe(){let d={};return{get:function(s){if(d[s.id]!==void 0)return d[s.id];let h;switch(s.type){case"DirectionalLight":h={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Nc};break;case"SpotLight":h={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Nc};break;case"PointLight":h={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Nc,shadowCameraNear:1,shadowCameraFar:1e3};break}return d[s.id]=h,h}}}var gAe=0;function mAe(d,s){return(s.castShadow?2:0)-(d.castShadow?2:0)+(s.map?1:0)-(d.map?1:0)}function bAe(d,s){let h=new dAe,p=pAe(),m={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let B=0;B<9;B++)m.probe.push(new Ge);let _=new Ge,E=new Fu,y=new Fu;function I(B,P){let U=0,W=0,q=0;for(let ln=0;ln<9;ln++)m.probe[ln].set(0,0,0);let et=0,Q=0,X=0,gt=0,ft=0,xt=0,Bt=0,Ot=0,Pt=0,se=0,ot=0;B.sort(mAe);let Lt=P===!0?Math.PI:1;for(let ln=0,Fn=B.length;ln0&&(s.isWebGL2?d.has("OES_texture_float_linear")===!0?(m.rectAreaLTC1=Zi.LTC_FLOAT_1,m.rectAreaLTC2=Zi.LTC_FLOAT_2):(m.rectAreaLTC1=Zi.LTC_HALF_1,m.rectAreaLTC2=Zi.LTC_HALF_2):d.has("OES_texture_float_linear")===!0?(m.rectAreaLTC1=Zi.LTC_FLOAT_1,m.rectAreaLTC2=Zi.LTC_FLOAT_2):d.has("OES_texture_half_float_linear")===!0?(m.rectAreaLTC1=Zi.LTC_HALF_1,m.rectAreaLTC2=Zi.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),m.ambient[0]=U,m.ambient[1]=W,m.ambient[2]=q;let be=m.hash;(be.directionalLength!==et||be.pointLength!==Q||be.spotLength!==X||be.rectAreaLength!==gt||be.hemiLength!==ft||be.numDirectionalShadows!==xt||be.numPointShadows!==Bt||be.numSpotShadows!==Ot||be.numSpotMaps!==Pt||be.numLightProbes!==ot)&&(m.directional.length=et,m.spot.length=X,m.rectArea.length=gt,m.point.length=Q,m.hemi.length=ft,m.directionalShadow.length=xt,m.directionalShadowMap.length=xt,m.pointShadow.length=Bt,m.pointShadowMap.length=Bt,m.spotShadow.length=Ot,m.spotShadowMap.length=Ot,m.directionalShadowMatrix.length=xt,m.pointShadowMatrix.length=Bt,m.spotLightMatrix.length=Ot+Pt-se,m.spotLightMap.length=Pt,m.numSpotLightShadowsWithMaps=se,m.numLightProbes=ot,be.directionalLength=et,be.pointLength=Q,be.spotLength=X,be.rectAreaLength=gt,be.hemiLength=ft,be.numDirectionalShadows=xt,be.numPointShadows=Bt,be.numSpotShadows=Ot,be.numSpotMaps=Pt,be.numLightProbes=ot,m.version=gAe++)}function O(B,P){let U=0,W=0,q=0,et=0,Q=0,X=P.matrixWorldInverse;for(let gt=0,ft=B.length;gt=y.length?(I=new $Yt(d,s),y.push(I)):I=y[E],I}function m(){h=new WeakMap}return{get:p,dispose:m}}var Vyt=class extends pS{constructor(s){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=SEe,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(s)}copy(s){return super.copy(s),this.depthPacking=s.depthPacking,this.map=s.map,this.alphaMap=s.alphaMap,this.displacementMap=s.displacementMap,this.displacementScale=s.displacementScale,this.displacementBias=s.displacementBias,this.wireframe=s.wireframe,this.wireframeLinewidth=s.wireframeLinewidth,this}},qyt=class extends pS{constructor(s){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(s)}copy(s){return super.copy(s),this.map=s.map,this.alphaMap=s.alphaMap,this.displacementMap=s.displacementMap,this.displacementScale=s.displacementScale,this.displacementBias=s.displacementBias,this}},vAe=`void main() { gl_Position = vec4( position, 1.0 ); }`,_Ae=`uniform sampler2D shadow_pass; uniform vec2 resolution; @@ -3742,7 +3742,7 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function yAe(d,s,h){let p=new TU,m=new Nc,_=new Nc,E=new $f,y=new $yt({depthPacking:TEe}),I=new Vyt,N={},B=h.maxTextureSize,P={[hS]:mg,[mg]:hS,[Xw]:Xw},U=new i3({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Nc},radius:{value:4}},vertexShader:vAe,fragmentShader:_Ae}),j=U.clone();j.defines.HORIZONTAL_PASS=1;let V=new Ey;V.setAttribute("position",new D0(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let tt=new gg(V,U),Q=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=QYt;let X=this.type;this.render=function(Ot,Pt,se){if(Q.enabled===!1||Q.autoUpdate===!1&&Q.needsUpdate===!1||Ot.length===0)return;let ot=d.getRenderTarget(),Lt=d.getActiveCubeFace(),be=d.getActiveMipmapLevel(),ln=d.state;ln.setBlending(aS),ln.buffers.color.setClear(1,1,1,1),ln.buffers.depth.setTest(!0),ln.setScissorTest(!1);let Fn=X!==Kx&&this.type===Kx,ne=X===Kx&&this.type!==Kx;for(let xe=0,re=Ot.length;xeB||m.y>B)&&(m.x>B&&(_.x=Math.floor(B/ke.x),m.x=_.x*ke.x,Se.mapSize.x=_.x),m.y>B&&(_.y=Math.floor(B/ke.y),m.y=_.y*ke.y,Se.mapSize.y=_.y)),Se.map===null||Fn===!0||ne===!0){let en=this.type!==Kx?{minFilter:r1,magFilter:r1}:{};Se.map!==null&&Se.map.dispose(),Se.map=new e3(m.x,m.y,en),Se.map.texture.name=hn.name+".shadowMap",Se.camera.updateProjectionMatrix()}d.setRenderTarget(Se.map),d.clear();let mn=Se.getViewportCount();for(let en=0;en0||Pt.map&&Pt.alphaTest>0){let ln=Lt.uuid,Fn=Pt.uuid,ne=N[ln];ne===void 0&&(ne={},N[ln]=ne);let xe=ne[Fn];xe===void 0&&(xe=Lt.clone(),ne[Fn]=xe,Pt.addEventListener("dispose",Bt)),Lt=xe}if(Lt.visible=Pt.visible,Lt.wireframe=Pt.wireframe,ot===Kx?Lt.side=Pt.shadowSide!==null?Pt.shadowSide:Pt.side:Lt.side=Pt.shadowSide!==null?Pt.shadowSide:P[Pt.side],Lt.alphaMap=Pt.alphaMap,Lt.alphaTest=Pt.alphaTest,Lt.map=Pt.map,Lt.clipShadows=Pt.clipShadows,Lt.clippingPlanes=Pt.clippingPlanes,Lt.clipIntersection=Pt.clipIntersection,Lt.displacementMap=Pt.displacementMap,Lt.displacementScale=Pt.displacementScale,Lt.displacementBias=Pt.displacementBias,Lt.wireframeLinewidth=Pt.wireframeLinewidth,Lt.linewidth=Pt.linewidth,se.isPointLight===!0&&Lt.isMeshDistanceMaterial===!0){let ln=d.properties.get(Lt);ln.light=se}return Lt}function xt(Ot,Pt,se,ot,Lt){if(Ot.visible===!1)return;if(Ot.layers.test(Pt.layers)&&(Ot.isMesh||Ot.isLine||Ot.isPoints)&&(Ot.castShadow||Ot.receiveShadow&&Lt===Kx)&&(!Ot.frustumCulled||p.intersectsObject(Ot))){Ot.modelViewMatrix.multiplyMatrices(se.matrixWorldInverse,Ot.matrixWorld);let Fn=s.update(Ot),ne=Ot.material;if(Array.isArray(ne)){let xe=Fn.groups;for(let re=0,hn=xe.length;re=1):mn.indexOf("OpenGL ES")!==-1&&(ke=parseFloat(/^OpenGL ES (\d)/.exec(mn)[1]),Se=ke>=2);let en=null,Qn={},ge=d.getParameter(d.SCISSOR_BOX),Pe=d.getParameter(d.VIEWPORT),ti=new $f().fromArray(ge),Yi=new $f().fromArray(Pe);function ki(Qt,Mi,sn,Zn){let oi=new Uint8Array(4),Jr=d.createTexture();d.bindTexture(Qt,Jr),d.texParameteri(Qt,d.TEXTURE_MIN_FILTER,d.NEAREST),d.texParameteri(Qt,d.TEXTURE_MAG_FILTER,d.NEAREST);for(let Bs=0;Bs"u"?!1:/OculusBrowser/g.test(navigator.userAgent),B=new WeakMap,P,U=new WeakMap,j=!1;try{j=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function V(Tt,yt){return j?new OffscreenCanvas(Tt,yt):pet("canvas")}function tt(Tt,yt,ue,fn){let An=1;if((Tt.width>fn||Tt.height>fn)&&(An=fn/Math.max(Tt.width,Tt.height)),An<1||yt===!0)if(typeof HTMLImageElement<"u"&&Tt instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&Tt instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&Tt instanceof ImageBitmap){let zn=yt?Ryt:Math.floor,Li=zn(An*Tt.width),xi=zn(An*Tt.height);P===void 0&&(P=V(Li,xi));let Jt=ue?V(Li,xi):P;return Jt.width=Li,Jt.height=xi,Jt.getContext("2d").drawImage(Tt,0,0,Li,xi),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Tt.width+"x"+Tt.height+") to ("+Li+"x"+xi+")."),Jt}else return"data"in Tt&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Tt.width+"x"+Tt.height+")."),Tt;return Tt}function Q(Tt){return sYt(Tt.width)&&sYt(Tt.height)}function X(Tt){return y?!1:Tt.wrapS!==Zw||Tt.wrapT!==Zw||Tt.minFilter!==r1&&Tt.minFilter!==bb}function gt(Tt,yt){return Tt.generateMipmaps&&yt&&Tt.minFilter!==r1&&Tt.minFilter!==bb}function ft(Tt){d.generateMipmap(Tt)}function xt(Tt,yt,ue,fn,An=!1){if(y===!1)return yt;if(Tt!==null){if(d[Tt]!==void 0)return d[Tt];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+Tt+"'")}let zn=yt;if(yt===d.RED&&(ue===d.FLOAT&&(zn=d.R32F),ue===d.HALF_FLOAT&&(zn=d.R16F),ue===d.UNSIGNED_BYTE&&(zn=d.R8)),yt===d.RED_INTEGER&&(ue===d.UNSIGNED_BYTE&&(zn=d.R8UI),ue===d.UNSIGNED_SHORT&&(zn=d.R16UI),ue===d.UNSIGNED_INT&&(zn=d.R32UI),ue===d.BYTE&&(zn=d.R8I),ue===d.SHORT&&(zn=d.R16I),ue===d.INT&&(zn=d.R32I)),yt===d.RG&&(ue===d.FLOAT&&(zn=d.RG32F),ue===d.HALF_FLOAT&&(zn=d.RG16F),ue===d.UNSIGNED_BYTE&&(zn=d.RG8)),yt===d.RGBA){let Li=An?uet:Na.getTransfer(fn);ue===d.FLOAT&&(zn=d.RGBA32F),ue===d.HALF_FLOAT&&(zn=d.RGBA16F),ue===d.UNSIGNED_BYTE&&(zn=Li===vu?d.SRGB8_ALPHA8:d.RGBA8),ue===d.UNSIGNED_SHORT_4_4_4_4&&(zn=d.RGBA4),ue===d.UNSIGNED_SHORT_5_5_5_1&&(zn=d.RGB5_A1)}return(zn===d.R16F||zn===d.R32F||zn===d.RG16F||zn===d.RG32F||zn===d.RGBA16F||zn===d.RGBA32F)&&s.get("EXT_color_buffer_float"),zn}function Bt(Tt,yt,ue){return gt(Tt,ue)===!0||Tt.isFramebufferTexture&&Tt.minFilter!==r1&&Tt.minFilter!==bb?Math.log2(Math.max(yt.width,yt.height))+1:Tt.mipmaps!==void 0&&Tt.mipmaps.length>0?Tt.mipmaps.length:Tt.isCompressedTexture&&Array.isArray(Tt.image)?yt.mipmaps.length:1}function Ot(Tt){return Tt===r1||Tt===CZt||Tt===V_t?d.NEAREST:d.LINEAR}function Pt(Tt){let yt=Tt.target;yt.removeEventListener("dispose",Pt),ot(yt),yt.isVideoTexture&&B.delete(yt)}function se(Tt){let yt=Tt.target;yt.removeEventListener("dispose",se),be(yt)}function ot(Tt){let yt=p.get(Tt);if(yt.__webglInit===void 0)return;let ue=Tt.source,fn=U.get(ue);if(fn){let An=fn[yt.__cacheKey];An.usedTimes--,An.usedTimes===0&&Lt(Tt),Object.keys(fn).length===0&&U.delete(ue)}p.remove(Tt)}function Lt(Tt){let yt=p.get(Tt);d.deleteTexture(yt.__webglTexture);let ue=Tt.source,fn=U.get(ue);delete fn[yt.__cacheKey],E.memory.textures--}function be(Tt){let yt=Tt.texture,ue=p.get(Tt),fn=p.get(yt);if(fn.__webglTexture!==void 0&&(d.deleteTexture(fn.__webglTexture),E.memory.textures--),Tt.depthTexture&&Tt.depthTexture.dispose(),Tt.isWebGLCubeRenderTarget)for(let An=0;An<6;An++){if(Array.isArray(ue.__webglFramebuffer[An]))for(let zn=0;zn=m.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+Tt+" texture units while this GPU supports only "+m.maxTextures),ln+=1,Tt}function xe(Tt){let yt=[];return yt.push(Tt.wrapS),yt.push(Tt.wrapT),yt.push(Tt.wrapR||0),yt.push(Tt.magFilter),yt.push(Tt.minFilter),yt.push(Tt.anisotropy),yt.push(Tt.internalFormat),yt.push(Tt.format),yt.push(Tt.type),yt.push(Tt.generateMipmaps),yt.push(Tt.premultiplyAlpha),yt.push(Tt.flipY),yt.push(Tt.unpackAlignment),yt.push(Tt.colorSpace),yt.join()}function re(Tt,yt){let ue=p.get(Tt);if(Tt.isVideoTexture&&rn(Tt),Tt.isRenderTargetTexture===!1&&Tt.version>0&&ue.__version!==Tt.version){let fn=Tt.image;if(fn===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(fn.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ti(ue,Tt,yt);return}}h.bindTexture(d.TEXTURE_2D,ue.__webglTexture,d.TEXTURE0+yt)}function hn(Tt,yt){let ue=p.get(Tt);if(Tt.version>0&&ue.__version!==Tt.version){ti(ue,Tt,yt);return}h.bindTexture(d.TEXTURE_2D_ARRAY,ue.__webglTexture,d.TEXTURE0+yt)}function Se(Tt,yt){let ue=p.get(Tt);if(Tt.version>0&&ue.__version!==Tt.version){ti(ue,Tt,yt);return}h.bindTexture(d.TEXTURE_3D,ue.__webglTexture,d.TEXTURE0+yt)}function ke(Tt,yt){let ue=p.get(Tt);if(Tt.version>0&&ue.__version!==Tt.version){Yi(ue,Tt,yt);return}h.bindTexture(d.TEXTURE_CUBE_MAP,ue.__webglTexture,d.TEXTURE0+yt)}let mn={[kyt]:d.REPEAT,[Zw]:d.CLAMP_TO_EDGE,[Lyt]:d.MIRRORED_REPEAT},en={[r1]:d.NEAREST,[CZt]:d.NEAREST_MIPMAP_NEAREST,[V_t]:d.NEAREST_MIPMAP_LINEAR,[bb]:d.LINEAR,[mEe]:d.LINEAR_MIPMAP_NEAREST,[xU]:d.LINEAR_MIPMAP_LINEAR},Qn={[AEe]:d.NEVER,[DEe]:d.ALWAYS,[kEe]:d.LESS,[lKt]:d.LEQUAL,[LEe]:d.EQUAL,[REe]:d.GEQUAL,[PEe]:d.GREATER,[IEe]:d.NOTEQUAL};function ge(Tt,yt,ue){if(ue?(d.texParameteri(Tt,d.TEXTURE_WRAP_S,mn[yt.wrapS]),d.texParameteri(Tt,d.TEXTURE_WRAP_T,mn[yt.wrapT]),(Tt===d.TEXTURE_3D||Tt===d.TEXTURE_2D_ARRAY)&&d.texParameteri(Tt,d.TEXTURE_WRAP_R,mn[yt.wrapR]),d.texParameteri(Tt,d.TEXTURE_MAG_FILTER,en[yt.magFilter]),d.texParameteri(Tt,d.TEXTURE_MIN_FILTER,en[yt.minFilter])):(d.texParameteri(Tt,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE),d.texParameteri(Tt,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE),(Tt===d.TEXTURE_3D||Tt===d.TEXTURE_2D_ARRAY)&&d.texParameteri(Tt,d.TEXTURE_WRAP_R,d.CLAMP_TO_EDGE),(yt.wrapS!==Zw||yt.wrapT!==Zw)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),d.texParameteri(Tt,d.TEXTURE_MAG_FILTER,Ot(yt.magFilter)),d.texParameteri(Tt,d.TEXTURE_MIN_FILTER,Ot(yt.minFilter)),yt.minFilter!==r1&&yt.minFilter!==bb&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),yt.compareFunction&&(d.texParameteri(Tt,d.TEXTURE_COMPARE_MODE,d.COMPARE_REF_TO_TEXTURE),d.texParameteri(Tt,d.TEXTURE_COMPARE_FUNC,Qn[yt.compareFunction])),s.has("EXT_texture_filter_anisotropic")===!0){let fn=s.get("EXT_texture_filter_anisotropic");if(yt.magFilter===r1||yt.minFilter!==V_t&&yt.minFilter!==xU||yt.type===oS&&s.has("OES_texture_float_linear")===!1||y===!1&&yt.type===MU&&s.has("OES_texture_half_float_linear")===!1)return;(yt.anisotropy>1||p.get(yt).__currentAnisotropy)&&(d.texParameterf(Tt,fn.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(yt.anisotropy,m.getMaxAnisotropy())),p.get(yt).__currentAnisotropy=yt.anisotropy)}}function Pe(Tt,yt){let ue=!1;Tt.__webglInit===void 0&&(Tt.__webglInit=!0,yt.addEventListener("dispose",Pt));let fn=yt.source,An=U.get(fn);An===void 0&&(An={},U.set(fn,An));let zn=xe(yt);if(zn!==Tt.__cacheKey){An[zn]===void 0&&(An[zn]={texture:d.createTexture(),usedTimes:0},E.memory.textures++,ue=!0),An[zn].usedTimes++;let Li=An[Tt.__cacheKey];Li!==void 0&&(An[Tt.__cacheKey].usedTimes--,Li.usedTimes===0&&Lt(yt)),Tt.__cacheKey=zn,Tt.__webglTexture=An[zn].texture}return ue}function ti(Tt,yt,ue){let fn=d.TEXTURE_2D;(yt.isDataArrayTexture||yt.isCompressedArrayTexture)&&(fn=d.TEXTURE_2D_ARRAY),yt.isData3DTexture&&(fn=d.TEXTURE_3D);let An=Pe(Tt,yt),zn=yt.source;h.bindTexture(fn,Tt.__webglTexture,d.TEXTURE0+ue);let Li=p.get(zn);if(zn.version!==Li.__version||An===!0){h.activeTexture(d.TEXTURE0+ue);let xi=Na.getPrimaries(Na.workingColorSpace),Jt=yt.colorSpace===wb?null:Na.getPrimaries(yt.colorSpace),nn=yt.colorSpace===wb||xi===Jt?d.NONE:d.BROWSER_DEFAULT_WEBGL;d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,yt.flipY),d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,yt.premultiplyAlpha),d.pixelStorei(d.UNPACK_ALIGNMENT,yt.unpackAlignment),d.pixelStorei(d.UNPACK_COLORSPACE_CONVERSION_WEBGL,nn);let vn=X(yt)&&Q(yt.image)===!1,he=tt(yt.image,vn,!1,m.maxTextureSize);he=Pn(yt,he);let Mn=Q(he)||y,Sn=_.convert(yt.format,yt.colorSpace),gn=_.convert(yt.type),Ce=xt(yt.internalFormat,Sn,gn,yt.colorSpace,yt.isVideoTexture);ge(fn,yt,Mn);let dn,jn=yt.mipmaps,ar=y&&yt.isVideoTexture!==!0&&Ce!==cKt,gr=Li.__version===void 0||An===!0,tr=Bt(yt,he,Mn);if(yt.isDepthTexture)Ce=d.DEPTH_COMPONENT,y?yt.type===oS?Ce=d.DEPTH_COMPONENT32F:yt.type===sS?Ce=d.DEPTH_COMPONENT24:yt.type===XA?Ce=d.DEPTH24_STENCIL8:Ce=d.DEPTH_COMPONENT16:yt.type===oS&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),yt.format===ZA&&Ce===d.DEPTH_COMPONENT&&yt.type!==f2t&&yt.type!==sS&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),yt.type=sS,gn=_.convert(yt.type)),yt.format===rR&&Ce===d.DEPTH_COMPONENT&&(Ce=d.DEPTH_STENCIL,yt.type!==XA&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),yt.type=XA,gn=_.convert(yt.type))),gr&&(ar?h.texStorage2D(d.TEXTURE_2D,1,Ce,he.width,he.height):h.texImage2D(d.TEXTURE_2D,0,Ce,he.width,he.height,0,Sn,gn,null));else if(yt.isDataTexture)if(jn.length>0&&Mn){ar&&gr&&h.texStorage2D(d.TEXTURE_2D,tr,Ce,jn[0].width,jn[0].height);for(let Ln=0,Qt=jn.length;Ln>=1,Qt>>=1}}else if(jn.length>0&&Mn){ar&&gr&&h.texStorage2D(d.TEXTURE_2D,tr,Ce,jn[0].width,jn[0].height);for(let Ln=0,Qt=jn.length;Ln0&&gr++,h.texStorage2D(d.TEXTURE_CUBE_MAP,gr,dn,he[0].width,he[0].height));for(let Ln=0;Ln<6;Ln++)if(vn){jn?h.texSubImage2D(d.TEXTURE_CUBE_MAP_POSITIVE_X+Ln,0,0,0,he[Ln].width,he[Ln].height,gn,Ce,he[Ln].data):h.texImage2D(d.TEXTURE_CUBE_MAP_POSITIVE_X+Ln,0,dn,he[Ln].width,he[Ln].height,0,gn,Ce,he[Ln].data);for(let Qt=0;Qt>zn),he=Math.max(1,yt.height>>zn);An===d.TEXTURE_3D||An===d.TEXTURE_2D_ARRAY?h.texImage3D(An,zn,Jt,vn,he,yt.depth,0,Li,xi,null):h.texImage2D(An,zn,Jt,vn,he,0,Li,xi,null)}h.bindFramebuffer(d.FRAMEBUFFER,Tt),ie(yt)?I.framebufferTexture2DMultisampleEXT(d.FRAMEBUFFER,fn,An,p.get(ue).__webglTexture,0,Nt(yt)):(An===d.TEXTURE_2D||An>=d.TEXTURE_CUBE_MAP_POSITIVE_X&&An<=d.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&d.framebufferTexture2D(d.FRAMEBUFFER,fn,An,p.get(ue).__webglTexture,zn),h.bindFramebuffer(d.FRAMEBUFFER,null)}function lr(Tt,yt,ue){if(d.bindRenderbuffer(d.RENDERBUFFER,Tt),yt.depthBuffer&&!yt.stencilBuffer){let fn=y===!0?d.DEPTH_COMPONENT24:d.DEPTH_COMPONENT16;if(ue||ie(yt)){let An=yt.depthTexture;An&&An.isDepthTexture&&(An.type===oS?fn=d.DEPTH_COMPONENT32F:An.type===sS&&(fn=d.DEPTH_COMPONENT24));let zn=Nt(yt);ie(yt)?I.renderbufferStorageMultisampleEXT(d.RENDERBUFFER,zn,fn,yt.width,yt.height):d.renderbufferStorageMultisample(d.RENDERBUFFER,zn,fn,yt.width,yt.height)}else d.renderbufferStorage(d.RENDERBUFFER,fn,yt.width,yt.height);d.framebufferRenderbuffer(d.FRAMEBUFFER,d.DEPTH_ATTACHMENT,d.RENDERBUFFER,Tt)}else if(yt.depthBuffer&&yt.stencilBuffer){let fn=Nt(yt);ue&&ie(yt)===!1?d.renderbufferStorageMultisample(d.RENDERBUFFER,fn,d.DEPTH24_STENCIL8,yt.width,yt.height):ie(yt)?I.renderbufferStorageMultisampleEXT(d.RENDERBUFFER,fn,d.DEPTH24_STENCIL8,yt.width,yt.height):d.renderbufferStorage(d.RENDERBUFFER,d.DEPTH_STENCIL,yt.width,yt.height),d.framebufferRenderbuffer(d.FRAMEBUFFER,d.DEPTH_STENCIL_ATTACHMENT,d.RENDERBUFFER,Tt)}else{let fn=yt.isWebGLMultipleRenderTargets===!0?yt.texture:[yt.texture];for(let An=0;An0){ue.__webglFramebuffer[xi]=[];for(let Jt=0;Jt0){ue.__webglFramebuffer=[];for(let xi=0;xi0&&ie(Tt)===!1){let xi=zn?yt:[yt];ue.__webglMultisampledFramebuffer=d.createFramebuffer(),ue.__webglColorRenderbuffer=[],h.bindFramebuffer(d.FRAMEBUFFER,ue.__webglMultisampledFramebuffer);for(let Jt=0;Jt0)for(let Jt=0;Jt0)for(let Jt=0;Jt0&&ie(Tt)===!1){let yt=Tt.isWebGLMultipleRenderTargets?Tt.texture:[Tt.texture],ue=Tt.width,fn=Tt.height,An=d.COLOR_BUFFER_BIT,zn=[],Li=Tt.stencilBuffer?d.DEPTH_STENCIL_ATTACHMENT:d.DEPTH_ATTACHMENT,xi=p.get(Tt),Jt=Tt.isWebGLMultipleRenderTargets===!0;if(Jt)for(let nn=0;nn0&&s.has("WEBGL_multisampled_render_to_texture")===!0&&yt.__useRenderToTexture!==!1}function rn(Tt){let yt=E.render.frame;B.get(Tt)!==yt&&(B.set(Tt,yt),Tt.update())}function Pn(Tt,yt){let ue=Tt.colorSpace,fn=Tt.format,An=Tt.type;return Tt.isCompressedTexture===!0||Tt.isVideoTexture===!0||Tt.format===Pyt||ue!==t3&&ue!==wb&&(Na.getTransfer(ue)===vu?y===!1?s.has("EXT_sRGB")===!0&&fn===Yw?(Tt.format=Pyt,Tt.minFilter=bb,Tt.generateMipmaps=!1):yt=get.sRGBToLinear(yt):(fn!==Yw||An!==lS)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ue)),yt}this.allocateTextureUnit=ne,this.resetTextureUnits=Fn,this.setTexture2D=re,this.setTexture2DArray=hn,this.setTexture3D=Se,this.setTextureCube=ke,this.rebindTextures=wn,this.setupRenderTarget=it,this.updateRenderTargetMipmap=ut,this.updateMultisampleRenderTarget=kt,this.setupDepthRenderbuffer=Kt,this.setupFrameBufferTexture=ki,this.useMultisampledRTT=ie}function EAe(d,s,h){let p=h.isWebGL2;function m(_,E=wb){let y,I=Na.getTransfer(E);if(_===lS)return d.UNSIGNED_BYTE;if(_===nKt)return d.UNSIGNED_SHORT_4_4_4_4;if(_===iKt)return d.UNSIGNED_SHORT_5_5_5_1;if(_===bEe)return d.BYTE;if(_===wEe)return d.SHORT;if(_===f2t)return d.UNSIGNED_SHORT;if(_===eKt)return d.INT;if(_===sS)return d.UNSIGNED_INT;if(_===oS)return d.FLOAT;if(_===MU)return p?d.HALF_FLOAT:(y=s.get("OES_texture_half_float"),y!==null?y.HALF_FLOAT_OES:null);if(_===vEe)return d.ALPHA;if(_===Yw)return d.RGBA;if(_===_Ee)return d.LUMINANCE;if(_===yEe)return d.LUMINANCE_ALPHA;if(_===ZA)return d.DEPTH_COMPONENT;if(_===rR)return d.DEPTH_STENCIL;if(_===Pyt)return y=s.get("EXT_sRGB"),y!==null?y.SRGB_ALPHA_EXT:null;if(_===xEe)return d.RED;if(_===rKt)return d.RED_INTEGER;if(_===MEe)return d.RG;if(_===sKt)return d.RG_INTEGER;if(_===oKt)return d.RGBA_INTEGER;if(_===q_t||_===X_t||_===Z_t||_===Y_t)if(I===vu)if(y=s.get("WEBGL_compressed_texture_s3tc_srgb"),y!==null){if(_===q_t)return y.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(_===X_t)return y.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(_===Z_t)return y.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(_===Y_t)return y.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(y=s.get("WEBGL_compressed_texture_s3tc"),y!==null){if(_===q_t)return y.COMPRESSED_RGB_S3TC_DXT1_EXT;if(_===X_t)return y.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(_===Z_t)return y.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(_===Y_t)return y.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(_===AZt||_===kZt||_===LZt||_===PZt)if(y=s.get("WEBGL_compressed_texture_pvrtc"),y!==null){if(_===AZt)return y.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(_===kZt)return y.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(_===LZt)return y.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(_===PZt)return y.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(_===cKt)return y=s.get("WEBGL_compressed_texture_etc1"),y!==null?y.COMPRESSED_RGB_ETC1_WEBGL:null;if(_===IZt||_===RZt)if(y=s.get("WEBGL_compressed_texture_etc"),y!==null){if(_===IZt)return I===vu?y.COMPRESSED_SRGB8_ETC2:y.COMPRESSED_RGB8_ETC2;if(_===RZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:y.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(_===DZt||_===NZt||_===OZt||_===BZt||_===FZt||_===UZt||_===zZt||_===jZt||_===HZt||_===GZt||_===WZt||_===$Zt||_===VZt||_===qZt)if(y=s.get("WEBGL_compressed_texture_astc"),y!==null){if(_===DZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:y.COMPRESSED_RGBA_ASTC_4x4_KHR;if(_===NZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:y.COMPRESSED_RGBA_ASTC_5x4_KHR;if(_===OZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:y.COMPRESSED_RGBA_ASTC_5x5_KHR;if(_===BZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:y.COMPRESSED_RGBA_ASTC_6x5_KHR;if(_===FZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:y.COMPRESSED_RGBA_ASTC_6x6_KHR;if(_===UZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:y.COMPRESSED_RGBA_ASTC_8x5_KHR;if(_===zZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:y.COMPRESSED_RGBA_ASTC_8x6_KHR;if(_===jZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:y.COMPRESSED_RGBA_ASTC_8x8_KHR;if(_===HZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:y.COMPRESSED_RGBA_ASTC_10x5_KHR;if(_===GZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:y.COMPRESSED_RGBA_ASTC_10x6_KHR;if(_===WZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:y.COMPRESSED_RGBA_ASTC_10x8_KHR;if(_===$Zt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:y.COMPRESSED_RGBA_ASTC_10x10_KHR;if(_===VZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:y.COMPRESSED_RGBA_ASTC_12x10_KHR;if(_===qZt)return I===vu?y.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:y.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(_===K_t||_===XZt||_===ZZt)if(y=s.get("EXT_texture_compression_bptc"),y!==null){if(_===K_t)return I===vu?y.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:y.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(_===XZt)return y.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(_===ZZt)return y.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(_===EEe||_===YZt||_===KZt||_===JZt)if(y=s.get("EXT_texture_compression_rgtc"),y!==null){if(_===K_t)return y.COMPRESSED_RED_RGTC1_EXT;if(_===YZt)return y.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(_===KZt)return y.COMPRESSED_RED_GREEN_RGTC2_EXT;if(_===JZt)return y.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return _===XA?p?d.UNSIGNED_INT_24_8:(y=s.get("WEBGL_depth_texture"),y!==null?y.UNSIGNED_INT_24_8_WEBGL:null):d[_]!==void 0?d[_]:null}return{convert:m}}var qyt=class extends s1{constructor(s=[]){super(),this.isArrayCamera=!0,this.cameras=s}},cS=class extends o1{constructor(){super(),this.isGroup=!0,this.type="Group"}},SAe={type:"move"},yU=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new cS,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new cS,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Ge,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Ge),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new cS,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Ge,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Ge),this._grip}dispatchEvent(s){return this._targetRay!==null&&this._targetRay.dispatchEvent(s),this._grip!==null&&this._grip.dispatchEvent(s),this._hand!==null&&this._hand.dispatchEvent(s),this}connect(s){if(s&&s.hand){let h=this._hand;if(h)for(let p of s.hand.values())this._getHandJoint(h,p)}return this.dispatchEvent({type:"connected",data:s}),this}disconnect(s){return this.dispatchEvent({type:"disconnected",data:s}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(s,h,p){let m=null,_=null,E=null,y=this._targetRay,I=this._grip,N=this._hand;if(s&&h.session.visibilityState!=="visible-blurred"){if(N&&s.hand){E=!0;for(let tt of s.hand.values()){let Q=h.getJointPose(tt,p),X=this._getHandJoint(N,tt);Q!==null&&(X.matrix.fromArray(Q.transform.matrix),X.matrix.decompose(X.position,X.rotation,X.scale),X.matrixWorldNeedsUpdate=!0,X.jointRadius=Q.radius),X.visible=Q!==null}let B=N.joints["index-finger-tip"],P=N.joints["thumb-tip"],U=B.position.distanceTo(P.position),j=.02,V=.005;N.inputState.pinching&&U>j+V?(N.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:s.handedness,target:this})):!N.inputState.pinching&&U<=j-V&&(N.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:s.handedness,target:this}))}else I!==null&&s.gripSpace&&(_=h.getPose(s.gripSpace,p),_!==null&&(I.matrix.fromArray(_.transform.matrix),I.matrix.decompose(I.position,I.rotation,I.scale),I.matrixWorldNeedsUpdate=!0,_.linearVelocity?(I.hasLinearVelocity=!0,I.linearVelocity.copy(_.linearVelocity)):I.hasLinearVelocity=!1,_.angularVelocity?(I.hasAngularVelocity=!0,I.angularVelocity.copy(_.angularVelocity)):I.hasAngularVelocity=!1));y!==null&&(m=h.getPose(s.targetRaySpace,p),m===null&&_!==null&&(m=_),m!==null&&(y.matrix.fromArray(m.transform.matrix),y.matrix.decompose(y.position,y.rotation,y.scale),y.matrixWorldNeedsUpdate=!0,m.linearVelocity?(y.hasLinearVelocity=!0,y.linearVelocity.copy(m.linearVelocity)):y.hasLinearVelocity=!1,m.angularVelocity?(y.hasAngularVelocity=!0,y.angularVelocity.copy(m.angularVelocity)):y.hasAngularVelocity=!1,this.dispatchEvent(SAe)))}return y!==null&&(y.visible=m!==null),I!==null&&(I.visible=_!==null),N!==null&&(N.visible=E!==null),this}_getHandJoint(s,h){if(s.joints[h.jointName]===void 0){let p=new cS;p.matrixAutoUpdate=!1,p.visible=!1,s.joints[h.jointName]=p,s.add(p)}return s.joints[h.jointName]}},Xyt=class extends fS{constructor(s,h){super();let p=this,m=null,_=1,E=null,y="local-floor",I=1,N=null,B=null,P=null,U=null,j=null,V=null,tt=h.getContextAttributes(),Q=null,X=null,gt=[],ft=[],xt=new Nc,Bt=null,Ot=new s1;Ot.layers.enable(1),Ot.viewport=new $f;let Pt=new s1;Pt.layers.enable(2),Pt.viewport=new $f;let se=[Ot,Pt],ot=new qyt;ot.layers.enable(1),ot.layers.enable(2);let Lt=null,be=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ge){let Pe=gt[ge];return Pe===void 0&&(Pe=new yU,gt[ge]=Pe),Pe.getTargetRaySpace()},this.getControllerGrip=function(ge){let Pe=gt[ge];return Pe===void 0&&(Pe=new yU,gt[ge]=Pe),Pe.getGripSpace()},this.getHand=function(ge){let Pe=gt[ge];return Pe===void 0&&(Pe=new yU,gt[ge]=Pe),Pe.getHandSpace()};function ln(ge){let Pe=ft.indexOf(ge.inputSource);if(Pe===-1)return;let ti=gt[Pe];ti!==void 0&&(ti.update(ge.inputSource,ge.frame,N||E),ti.dispatchEvent({type:ge.type,data:ge.inputSource}))}function Fn(){m.removeEventListener("select",ln),m.removeEventListener("selectstart",ln),m.removeEventListener("selectend",ln),m.removeEventListener("squeeze",ln),m.removeEventListener("squeezestart",ln),m.removeEventListener("squeezeend",ln),m.removeEventListener("end",Fn),m.removeEventListener("inputsourceschange",ne);for(let ge=0;ge=0&&(ft[Yi]=null,gt[Yi].disconnect(ti))}for(let Pe=0;Pe=ft.length){ft.push(ti),Yi=lr;break}else if(ft[lr]===null){ft[lr]=ti,Yi=lr;break}if(Yi===-1)break}let ki=gt[Yi];ki&&ki.connect(ti)}}let xe=new Ge,re=new Ge;function hn(ge,Pe,ti){xe.setFromMatrixPosition(Pe.matrixWorld),re.setFromMatrixPosition(ti.matrixWorld);let Yi=xe.distanceTo(re),ki=Pe.projectionMatrix.elements,lr=ti.projectionMatrix.elements,pr=ki[14]/(ki[10]-1),Kt=ki[14]/(ki[10]+1),wn=(ki[9]+1)/ki[5],it=(ki[9]-1)/ki[5],ut=(ki[8]-1)/ki[0],kt=(lr[8]+1)/lr[0],Nt=pr*ut,ie=pr*kt,rn=Yi/(-ut+kt),Pn=rn*-ut;Pe.matrixWorld.decompose(ge.position,ge.quaternion,ge.scale),ge.translateX(Pn),ge.translateZ(rn),ge.matrixWorld.compose(ge.position,ge.quaternion,ge.scale),ge.matrixWorldInverse.copy(ge.matrixWorld).invert();let Tt=pr+rn,yt=Kt+rn,ue=Nt-Pn,fn=ie+(Yi-Pn),An=wn*Kt/yt*Tt,zn=it*Kt/yt*Tt;ge.projectionMatrix.makePerspective(ue,fn,An,zn,Tt,yt),ge.projectionMatrixInverse.copy(ge.projectionMatrix).invert()}function Se(ge,Pe){Pe===null?ge.matrixWorld.copy(ge.matrix):ge.matrixWorld.multiplyMatrices(Pe.matrixWorld,ge.matrix),ge.matrixWorldInverse.copy(ge.matrixWorld).invert()}this.updateCamera=function(ge){if(m===null)return;ot.near=Pt.near=Ot.near=ge.near,ot.far=Pt.far=Ot.far=ge.far,(Lt!==ot.near||be!==ot.far)&&(m.updateRenderState({depthNear:ot.near,depthFar:ot.far}),Lt=ot.near,be=ot.far);let Pe=ge.parent,ti=ot.cameras;Se(ot,Pe);for(let Yi=0;Yi0&&(Q.alphaTest.value=X.alphaTest);let gt=s.get(X).envMap;if(gt&&(Q.envMap.value=gt,Q.flipEnvMap.value=gt.isCubeTexture&>.isRenderTargetTexture===!1?-1:1,Q.reflectivity.value=X.reflectivity,Q.ior.value=X.ior,Q.refractionRatio.value=X.refractionRatio),X.lightMap){Q.lightMap.value=X.lightMap;let ft=d._useLegacyLights===!0?Math.PI:1;Q.lightMapIntensity.value=X.lightMapIntensity*ft,h(X.lightMap,Q.lightMapTransform)}X.aoMap&&(Q.aoMap.value=X.aoMap,Q.aoMapIntensity.value=X.aoMapIntensity,h(X.aoMap,Q.aoMapTransform))}function E(Q,X){Q.diffuse.value.copy(X.color),Q.opacity.value=X.opacity,X.map&&(Q.map.value=X.map,h(X.map,Q.mapTransform))}function y(Q,X){Q.dashSize.value=X.dashSize,Q.totalSize.value=X.dashSize+X.gapSize,Q.scale.value=X.scale}function I(Q,X,gt,ft){Q.diffuse.value.copy(X.color),Q.opacity.value=X.opacity,Q.size.value=X.size*gt,Q.scale.value=ft*.5,X.map&&(Q.map.value=X.map,h(X.map,Q.uvTransform)),X.alphaMap&&(Q.alphaMap.value=X.alphaMap,h(X.alphaMap,Q.alphaMapTransform)),X.alphaTest>0&&(Q.alphaTest.value=X.alphaTest)}function N(Q,X){Q.diffuse.value.copy(X.color),Q.opacity.value=X.opacity,Q.rotation.value=X.rotation,X.map&&(Q.map.value=X.map,h(X.map,Q.mapTransform)),X.alphaMap&&(Q.alphaMap.value=X.alphaMap,h(X.alphaMap,Q.alphaMapTransform)),X.alphaTest>0&&(Q.alphaTest.value=X.alphaTest)}function B(Q,X){Q.specular.value.copy(X.specular),Q.shininess.value=Math.max(X.shininess,1e-4)}function P(Q,X){X.gradientMap&&(Q.gradientMap.value=X.gradientMap)}function U(Q,X){Q.metalness.value=X.metalness,X.metalnessMap&&(Q.metalnessMap.value=X.metalnessMap,h(X.metalnessMap,Q.metalnessMapTransform)),Q.roughness.value=X.roughness,X.roughnessMap&&(Q.roughnessMap.value=X.roughnessMap,h(X.roughnessMap,Q.roughnessMapTransform)),s.get(X).envMap&&(Q.envMapIntensity.value=X.envMapIntensity)}function j(Q,X,gt){Q.ior.value=X.ior,X.sheen>0&&(Q.sheenColor.value.copy(X.sheenColor).multiplyScalar(X.sheen),Q.sheenRoughness.value=X.sheenRoughness,X.sheenColorMap&&(Q.sheenColorMap.value=X.sheenColorMap,h(X.sheenColorMap,Q.sheenColorMapTransform)),X.sheenRoughnessMap&&(Q.sheenRoughnessMap.value=X.sheenRoughnessMap,h(X.sheenRoughnessMap,Q.sheenRoughnessMapTransform))),X.clearcoat>0&&(Q.clearcoat.value=X.clearcoat,Q.clearcoatRoughness.value=X.clearcoatRoughness,X.clearcoatMap&&(Q.clearcoatMap.value=X.clearcoatMap,h(X.clearcoatMap,Q.clearcoatMapTransform)),X.clearcoatRoughnessMap&&(Q.clearcoatRoughnessMap.value=X.clearcoatRoughnessMap,h(X.clearcoatRoughnessMap,Q.clearcoatRoughnessMapTransform)),X.clearcoatNormalMap&&(Q.clearcoatNormalMap.value=X.clearcoatNormalMap,h(X.clearcoatNormalMap,Q.clearcoatNormalMapTransform),Q.clearcoatNormalScale.value.copy(X.clearcoatNormalScale),X.side===mg&&Q.clearcoatNormalScale.value.negate())),X.iridescence>0&&(Q.iridescence.value=X.iridescence,Q.iridescenceIOR.value=X.iridescenceIOR,Q.iridescenceThicknessMinimum.value=X.iridescenceThicknessRange[0],Q.iridescenceThicknessMaximum.value=X.iridescenceThicknessRange[1],X.iridescenceMap&&(Q.iridescenceMap.value=X.iridescenceMap,h(X.iridescenceMap,Q.iridescenceMapTransform)),X.iridescenceThicknessMap&&(Q.iridescenceThicknessMap.value=X.iridescenceThicknessMap,h(X.iridescenceThicknessMap,Q.iridescenceThicknessMapTransform))),X.transmission>0&&(Q.transmission.value=X.transmission,Q.transmissionSamplerMap.value=gt.texture,Q.transmissionSamplerSize.value.set(gt.width,gt.height),X.transmissionMap&&(Q.transmissionMap.value=X.transmissionMap,h(X.transmissionMap,Q.transmissionMapTransform)),Q.thickness.value=X.thickness,X.thicknessMap&&(Q.thicknessMap.value=X.thicknessMap,h(X.thicknessMap,Q.thicknessMapTransform)),Q.attenuationDistance.value=X.attenuationDistance,Q.attenuationColor.value.copy(X.attenuationColor)),X.anisotropy>0&&(Q.anisotropyVector.value.set(X.anisotropy*Math.cos(X.anisotropyRotation),X.anisotropy*Math.sin(X.anisotropyRotation)),X.anisotropyMap&&(Q.anisotropyMap.value=X.anisotropyMap,h(X.anisotropyMap,Q.anisotropyMapTransform))),Q.specularIntensity.value=X.specularIntensity,Q.specularColor.value.copy(X.specularColor),X.specularColorMap&&(Q.specularColorMap.value=X.specularColorMap,h(X.specularColorMap,Q.specularColorMapTransform)),X.specularIntensityMap&&(Q.specularIntensityMap.value=X.specularIntensityMap,h(X.specularIntensityMap,Q.specularIntensityMapTransform))}function V(Q,X){X.matcap&&(Q.matcap.value=X.matcap)}function tt(Q,X){let gt=s.get(X).light;Q.referencePosition.value.setFromMatrixPosition(gt.matrixWorld),Q.nearDistance.value=gt.shadow.camera.near,Q.farDistance.value=gt.shadow.camera.far}return{refreshFogUniforms:p,refreshMaterialUniforms:m}}function CAe(d,s,h,p){let m={},_={},E=[],y=h.isWebGL2?d.getParameter(d.MAX_UNIFORM_BUFFER_BINDINGS):0;function I(gt,ft){let xt=ft.program;p.uniformBlockBinding(gt,xt)}function N(gt,ft){let xt=m[gt.id];xt===void 0&&(V(gt),xt=B(gt),m[gt.id]=xt,gt.addEventListener("dispose",Q));let Bt=ft.program;p.updateUBOMapping(gt,Bt);let Ot=s.render.frame;_[gt.id]!==Ot&&(U(gt),_[gt.id]=Ot)}function B(gt){let ft=P();gt.__bindingPointIndex=ft;let xt=d.createBuffer(),Bt=gt.__size,Ot=gt.usage;return d.bindBuffer(d.UNIFORM_BUFFER,xt),d.bufferData(d.UNIFORM_BUFFER,Bt,Ot),d.bindBuffer(d.UNIFORM_BUFFER,null),d.bindBufferBase(d.UNIFORM_BUFFER,ft,xt),xt}function P(){for(let gt=0;gt0&&(xt+=Bt-Ot),gt.__size=xt,gt.__cache={},this}function tt(gt){let ft={boundary:0,storage:0};return typeof gt=="number"||typeof gt=="boolean"?(ft.boundary=4,ft.storage=4):gt.isVector2?(ft.boundary=8,ft.storage=8):gt.isVector3||gt.isColor?(ft.boundary=16,ft.storage=12):gt.isVector4?(ft.boundary=16,ft.storage=16):gt.isMatrix3?(ft.boundary=48,ft.storage=48):gt.isMatrix4?(ft.boundary=64,ft.storage=64):gt.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",gt),ft}function Q(gt){let ft=gt.target;ft.removeEventListener("dispose",Q);let xt=E.indexOf(ft.__bindingPointIndex);E.splice(xt,1),d.deleteBuffer(m[ft.id]),delete m[ft.id],delete _[ft.id]}function X(){for(let gt in m)d.deleteBuffer(m[gt]);E=[],m={},_={}}return{bind:I,update:N,dispose:X}}var CU=class{constructor(s={}){let{canvas:h=OEe(),context:p=null,depth:m=!0,stencil:_=!0,alpha:E=!1,antialias:y=!1,premultipliedAlpha:I=!0,preserveDrawingBuffer:N=!1,powerPreference:B="default",failIfMajorPerformanceCaveat:P=!1}=s;this.isWebGLRenderer=!0;let U;p!==null?U=p.getContextAttributes().alpha:U=E;let j=new Uint32Array(4),V=new Int32Array(4),tt=null,Q=null,X=[],gt=[];this.domElement=h,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Pd,this._useLegacyLights=!1,this.toneMapping=uS,this.toneMappingExposure=1;let ft=this,xt=!1,Bt=0,Ot=0,Pt=null,se=-1,ot=null,Lt=new $f,be=new $f,ln=null,Fn=new Go(0),ne=0,xe=h.width,re=h.height,hn=1,Se=null,ke=null,mn=new $f(0,0,xe,re),en=new $f(0,0,xe,re),Qn=!1,ge=new TU,Pe=!1,ti=!1,Yi=null,ki=new Fu,lr=new Nc,pr=new Ge,Kt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function wn(){return Pt===null?hn:1}let it=p;function ut(Rt,ve){for(let Je=0;Je{function Hi(){if(tn.forEach(function(Pr){Pn.get(Pr).currentProgram.isReady()&&tn.delete(Pr)}),tn.size===0){Ze(Rt);return}setTimeout(Hi,10)}kt.get("KHR_parallel_shader_compile")!==null?Hi():setTimeout(Hi,10)})};let Bs=null;function Oc(Rt){Bs&&Bs(Rt)}function ru(){il.stop()}function fc(){il.start()}let il=new pKt;il.setAnimationLoop(Oc),typeof self<"u"&&il.setContext(self),this.setAnimationLoop=function(Rt){Bs=Rt,tr.setAnimationLoop(Rt),Rt===null?il.stop():il.start()},tr.addEventListener("sessionstart",ru),tr.addEventListener("sessionend",fc),this.render=function(Rt,ve){if(ve!==void 0&&ve.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(xt===!0)return;Rt.matrixWorldAutoUpdate===!0&&Rt.updateMatrixWorld(),ve.parent===null&&ve.matrixWorldAutoUpdate===!0&&ve.updateMatrixWorld(),tr.enabled===!0&&tr.isPresenting===!0&&(tr.cameraAutoUpdate===!0&&tr.updateCamera(ve),ve=tr.getCamera()),Rt.isScene===!0&&Rt.onBeforeRender(ft,Rt,ve,Pt),Q=nn.get(Rt,gt.length),Q.init(),gt.push(Q),ki.multiplyMatrices(ve.projectionMatrix,ve.matrixWorldInverse),ge.setFromProjectionMatrix(ki),ti=this.localClippingEnabled,Pe=vn.init(this.clippingPlanes,ti),tt=Jt.get(Rt,X.length),tt.init(),X.push(tt),va(Rt,ve,0,ft.sortObjects),tt.finish(),ft.sortObjects===!0&&tt.sort(Se,ke),this.info.render.frame++,Pe===!0&&vn.beginShadows();let Je=Q.state.shadowsArray;if(he.render(Je,Rt,ve),Pe===!0&&vn.endShadows(),this.info.autoReset===!0&&this.info.reset(),Mn.render(tt,Rt),Q.setupLights(ft._useLegacyLights),ve.isArrayCamera){let tn=ve.cameras;for(let Ze=0,Hi=tn.length;Ze0?Q=gt[gt.length-1]:Q=null,X.pop(),X.length>0?tt=X[X.length-1]:tt=null};function va(Rt,ve,Je,tn){if(Rt.visible===!1)return;if(Rt.layers.test(ve.layers)){if(Rt.isGroup)Je=Rt.renderOrder;else if(Rt.isLOD)Rt.autoUpdate===!0&&Rt.update(ve);else if(Rt.isLight)Q.pushLight(Rt),Rt.castShadow&&Q.pushShadow(Rt);else if(Rt.isSprite){if(!Rt.frustumCulled||ge.intersectsSprite(Rt)){tn&&pr.setFromMatrixPosition(Rt.matrixWorld).applyMatrix4(ki);let Pr=zn.update(Rt),Gr=Rt.material;Gr.visible&&tt.push(Rt,Pr,Gr,Je,pr.z,null)}}else if((Rt.isMesh||Rt.isLine||Rt.isPoints)&&(!Rt.frustumCulled||ge.intersectsObject(Rt))){let Pr=zn.update(Rt),Gr=Rt.material;if(tn&&(Rt.boundingSphere!==void 0?(Rt.boundingSphere===null&&Rt.computeBoundingSphere(),pr.copy(Rt.boundingSphere.center)):(Pr.boundingSphere===null&&Pr.computeBoundingSphere(),pr.copy(Pr.boundingSphere.center)),pr.applyMatrix4(Rt.matrixWorld).applyMatrix4(ki)),Array.isArray(Gr)){let hs=Pr.groups;for(let Fs=0,Ms=hs.length;Fs0&&rv(Ze,Hi,ve,Je),tn&&ie.viewport(Lt.copy(tn)),Ze.length>0&&U0(Ze,ve,Je),Hi.length>0&&U0(Hi,ve,Je),Pr.length>0&&U0(Pr,ve,Je),ie.buffers.depth.setTest(!0),ie.buffers.depth.setMask(!0),ie.buffers.color.setMask(!0),ie.setPolygonOffset(!1)}function rv(Rt,ve,Je,tn){if((Je.isScene===!0?Je.overrideMaterial:null)!==null)return;let Hi=Nt.isWebGL2;Yi===null&&(Yi=new e3(1,1,{generateMipmaps:!0,type:kt.has("EXT_color_buffer_half_float")?MU:lS,minFilter:xU,samples:Hi?4:0})),ft.getDrawingBufferSize(lr),Hi?Yi.setSize(lr.x,lr.y):Yi.setSize(Ryt(lr.x),Ryt(lr.y));let Pr=ft.getRenderTarget();ft.setRenderTarget(Yi),ft.getClearColor(Fn),ne=ft.getClearAlpha(),ne<1&&ft.setClearColor(16777215,.5),ft.clear();let Gr=ft.toneMapping;ft.toneMapping=uS,U0(Rt,Je,tn),Tt.updateMultisampleRenderTarget(Yi),Tt.updateRenderTargetMipmap(Yi);let hs=!1;for(let Fs=0,Ms=ve.length;Fs0),bs=!!Je.morphAttributes.position,Tc=!!Je.morphAttributes.normal,rl=!!Je.morphAttributes.color,Oa=uS;tn.toneMapped&&(Pt===null||Pt.isXRRenderTarget===!0)&&(Oa=ft.toneMapping);let wh=Je.morphAttributes.position||Je.morphAttributes.normal||Je.morphAttributes.color,Nr=wh!==void 0?wh.length:0,mr=Pn.get(tn),a1=Q.state.lights;if(Pe===!0&&(ti===!0||Rt!==ot)){let _h=Rt===ot&&tn.id===se;vn.setState(tn,Rt,_h)}let dc=!1;tn.version===mr.__version?(mr.needsLights&&mr.lightsStateVersion!==a1.state.version||mr.outputColorSpace!==Gr||Ze.isBatchedMesh&&mr.batching===!1||!Ze.isBatchedMesh&&mr.batching===!0||Ze.isInstancedMesh&&mr.instancing===!1||!Ze.isInstancedMesh&&mr.instancing===!0||Ze.isSkinnedMesh&&mr.skinning===!1||!Ze.isSkinnedMesh&&mr.skinning===!0||Ze.isInstancedMesh&&mr.instancingColor===!0&&Ze.instanceColor===null||Ze.isInstancedMesh&&mr.instancingColor===!1&&Ze.instanceColor!==null||mr.envMap!==hs||tn.fog===!0&&mr.fog!==Hi||mr.numClippingPlanes!==void 0&&(mr.numClippingPlanes!==vn.numPlanes||mr.numIntersection!==vn.numIntersection)||mr.vertexAlphas!==Fs||mr.vertexTangents!==Ms||mr.morphTargets!==bs||mr.morphNormals!==Tc||mr.morphColors!==rl||mr.toneMapping!==Oa||Nt.isWebGL2===!0&&mr.morphTargetsCount!==Nr)&&(dc=!0):(dc=!0,mr.__version=tn.version);let vh=mr.currentProgram;dc===!0&&(vh=z0(tn,ve,Ze));let _g=!1,ws=!1,$c=!1,_a=vh.getUniforms(),ff=mr.uniforms;if(ie.useProgram(vh.program)&&(_g=!0,ws=!0,$c=!0),tn.id!==se&&(se=tn.id,ws=!0),_g||ot!==Rt){_a.setValue(it,"projectionMatrix",Rt.projectionMatrix),_a.setValue(it,"viewMatrix",Rt.matrixWorldInverse);let _h=_a.map.cameraPosition;_h!==void 0&&_h.setValue(it,pr.setFromMatrixPosition(Rt.matrixWorld)),Nt.logarithmicDepthBuffer&&_a.setValue(it,"logDepthBufFC",2/(Math.log(Rt.far+1)/Math.LN2)),(tn.isMeshPhongMaterial||tn.isMeshToonMaterial||tn.isMeshLambertMaterial||tn.isMeshBasicMaterial||tn.isMeshStandardMaterial||tn.isShaderMaterial)&&_a.setValue(it,"isOrthographic",Rt.isOrthographicCamera===!0),ot!==Rt&&(ot=Rt,ws=!0,$c=!0)}if(Ze.isSkinnedMesh){_a.setOptional(it,Ze,"bindMatrix"),_a.setOptional(it,Ze,"bindMatrixInverse");let _h=Ze.skeleton;_h&&(Nt.floatVertexTextures?(_h.boneTexture===null&&_h.computeBoneTexture(),_a.setValue(it,"boneTexture",_h.boneTexture,Tt)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}Ze.isBatchedMesh&&(_a.setOptional(it,Ze,"batchingTexture"),_a.setValue(it,"batchingTexture",Ze._matricesTexture,Tt));let Bl=Je.morphAttributes;if((Bl.position!==void 0||Bl.normal!==void 0||Bl.color!==void 0&&Nt.isWebGL2===!0)&&Sn.update(Ze,Je,vh),(ws||mr.receiveShadow!==Ze.receiveShadow)&&(mr.receiveShadow=Ze.receiveShadow,_a.setValue(it,"receiveShadow",Ze.receiveShadow)),tn.isMeshGouraudMaterial&&tn.envMap!==null&&(ff.envMap.value=hs,ff.flipEnvMap.value=hs.isCubeTexture&&hs.isRenderTargetTexture===!1?-1:1),ws&&(_a.setValue(it,"toneMappingExposure",ft.toneMappingExposure),mr.needsLights&&cv(ff,$c),Hi&&tn.fog===!0&&xi.refreshFogUniforms(ff,Hi),xi.refreshMaterialUniforms(ff,tn,hn,re,Yi),eR.upload(it,j0(mr),ff,Tt)),tn.isShaderMaterial&&tn.uniformsNeedUpdate===!0&&(eR.upload(it,j0(mr),ff,Tt),tn.uniformsNeedUpdate=!1),tn.isSpriteMaterial&&_a.setValue(it,"center",Ze.center),_a.setValue(it,"modelViewMatrix",Ze.modelViewMatrix),_a.setValue(it,"normalMatrix",Ze.normalMatrix),_a.setValue(it,"modelMatrix",Ze.matrixWorld),tn.isShaderMaterial||tn.isRawShaderMaterial){let _h=tn.uniformsGroups;for(let u1=0,Nd=_h.length;u10&&Tt.useMultisampledRTT(Rt)===!1?Ze=Pn.get(Rt).__webglMultisampledFramebuffer:Array.isArray(Ms)?Ze=Ms[Je]:Ze=Ms,Lt.copy(Rt.viewport),be.copy(Rt.scissor),ln=Rt.scissorTest}else Lt.copy(mn).multiplyScalar(hn).floor(),be.copy(en).multiplyScalar(hn).floor(),ln=Qn;if(ie.bindFramebuffer(it.FRAMEBUFFER,Ze)&&Nt.drawBuffers&&tn&&ie.drawBuffers(Rt,Ze),ie.viewport(Lt),ie.scissor(be),ie.setScissorTest(ln),Hi){let hs=Pn.get(Rt.texture);it.framebufferTexture2D(it.FRAMEBUFFER,it.COLOR_ATTACHMENT0,it.TEXTURE_CUBE_MAP_POSITIVE_X+ve,hs.__webglTexture,Je)}else if(Pr){let hs=Pn.get(Rt.texture),Fs=ve||0;it.framebufferTextureLayer(it.FRAMEBUFFER,it.COLOR_ATTACHMENT0,hs.__webglTexture,Je||0,Fs)}se=-1},this.readRenderTargetPixels=function(Rt,ve,Je,tn,Ze,Hi,Pr){if(!(Rt&&Rt.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Gr=Pn.get(Rt).__webglFramebuffer;if(Rt.isWebGLCubeRenderTarget&&Pr!==void 0&&(Gr=Gr[Pr]),Gr){ie.bindFramebuffer(it.FRAMEBUFFER,Gr);try{let hs=Rt.texture,Fs=hs.format,Ms=hs.type;if(Fs!==Yw&&dn.convert(Fs)!==it.getParameter(it.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}let bs=Ms===MU&&(kt.has("EXT_color_buffer_half_float")||Nt.isWebGL2&&kt.has("EXT_color_buffer_float"));if(Ms!==lS&&dn.convert(Ms)!==it.getParameter(it.IMPLEMENTATION_COLOR_READ_TYPE)&&!(Ms===oS&&(Nt.isWebGL2||kt.has("OES_texture_float")||kt.has("WEBGL_color_buffer_float")))&&!bs){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}ve>=0&&ve<=Rt.width-tn&&Je>=0&&Je<=Rt.height-Ze&&it.readPixels(ve,Je,tn,Ze,dn.convert(Fs),dn.convert(Ms),Hi)}finally{let hs=Pt!==null?Pn.get(Pt).__webglFramebuffer:null;ie.bindFramebuffer(it.FRAMEBUFFER,hs)}}},this.copyFramebufferToTexture=function(Rt,ve,Je=0){let tn=Math.pow(2,-Je),Ze=Math.floor(ve.image.width*tn),Hi=Math.floor(ve.image.height*tn);Tt.setTexture2D(ve,0),it.copyTexSubImage2D(it.TEXTURE_2D,Je,0,0,Rt.x,Rt.y,Ze,Hi),ie.unbindTexture()},this.copyTextureToTexture=function(Rt,ve,Je,tn=0){let Ze=ve.image.width,Hi=ve.image.height,Pr=dn.convert(Je.format),Gr=dn.convert(Je.type);Tt.setTexture2D(Je,0),it.pixelStorei(it.UNPACK_FLIP_Y_WEBGL,Je.flipY),it.pixelStorei(it.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Je.premultiplyAlpha),it.pixelStorei(it.UNPACK_ALIGNMENT,Je.unpackAlignment),ve.isDataTexture?it.texSubImage2D(it.TEXTURE_2D,tn,Rt.x,Rt.y,Ze,Hi,Pr,Gr,ve.image.data):ve.isCompressedTexture?it.compressedTexSubImage2D(it.TEXTURE_2D,tn,Rt.x,Rt.y,ve.mipmaps[0].width,ve.mipmaps[0].height,Pr,ve.mipmaps[0].data):it.texSubImage2D(it.TEXTURE_2D,tn,Rt.x,Rt.y,Pr,Gr,ve.image),tn===0&&Je.generateMipmaps&&it.generateMipmap(it.TEXTURE_2D),ie.unbindTexture()},this.copyTextureToTexture3D=function(Rt,ve,Je,tn,Ze=0){if(ft.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}let Hi=Rt.max.x-Rt.min.x+1,Pr=Rt.max.y-Rt.min.y+1,Gr=Rt.max.z-Rt.min.z+1,hs=dn.convert(tn.format),Fs=dn.convert(tn.type),Ms;if(tn.isData3DTexture)Tt.setTexture3D(tn,0),Ms=it.TEXTURE_3D;else if(tn.isDataArrayTexture||tn.isCompressedArrayTexture)Tt.setTexture2DArray(tn,0),Ms=it.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}it.pixelStorei(it.UNPACK_FLIP_Y_WEBGL,tn.flipY),it.pixelStorei(it.UNPACK_PREMULTIPLY_ALPHA_WEBGL,tn.premultiplyAlpha),it.pixelStorei(it.UNPACK_ALIGNMENT,tn.unpackAlignment);let bs=it.getParameter(it.UNPACK_ROW_LENGTH),Tc=it.getParameter(it.UNPACK_IMAGE_HEIGHT),rl=it.getParameter(it.UNPACK_SKIP_PIXELS),Oa=it.getParameter(it.UNPACK_SKIP_ROWS),wh=it.getParameter(it.UNPACK_SKIP_IMAGES),Nr=Je.isCompressedTexture?Je.mipmaps[Ze]:Je.image;it.pixelStorei(it.UNPACK_ROW_LENGTH,Nr.width),it.pixelStorei(it.UNPACK_IMAGE_HEIGHT,Nr.height),it.pixelStorei(it.UNPACK_SKIP_PIXELS,Rt.min.x),it.pixelStorei(it.UNPACK_SKIP_ROWS,Rt.min.y),it.pixelStorei(it.UNPACK_SKIP_IMAGES,Rt.min.z),Je.isDataTexture||Je.isData3DTexture?it.texSubImage3D(Ms,Ze,ve.x,ve.y,ve.z,Hi,Pr,Gr,hs,Fs,Nr.data):Je.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),it.compressedTexSubImage3D(Ms,Ze,ve.x,ve.y,ve.z,Hi,Pr,Gr,hs,Nr.data)):it.texSubImage3D(Ms,Ze,ve.x,ve.y,ve.z,Hi,Pr,Gr,hs,Fs,Nr),it.pixelStorei(it.UNPACK_ROW_LENGTH,bs),it.pixelStorei(it.UNPACK_IMAGE_HEIGHT,Tc),it.pixelStorei(it.UNPACK_SKIP_PIXELS,rl),it.pixelStorei(it.UNPACK_SKIP_ROWS,Oa),it.pixelStorei(it.UNPACK_SKIP_IMAGES,wh),Ze===0&&tn.generateMipmaps&&it.generateMipmap(Ms),ie.unbindTexture()},this.initTexture=function(Rt){Rt.isCubeTexture?Tt.setTextureCube(Rt,0):Rt.isData3DTexture?Tt.setTexture3D(Rt,0):Rt.isDataArrayTexture||Rt.isCompressedArrayTexture?Tt.setTexture2DArray(Rt,0):Tt.setTexture2D(Rt,0),ie.unbindTexture()},this.resetState=function(){Bt=0,Ot=0,Pt=null,ie.reset(),jn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Qx}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(s){this._outputColorSpace=s;let h=this.getContext();h.drawingBufferColorSpace=s===d2t?"display-p3":"srgb",h.unpackColorSpace=Na.workingColorSpace===Fet?"display-p3":"srgb"}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===Pd?YA:aKt}set outputEncoding(s){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=s===YA?Pd:t3}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(s){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=s}},Zyt=class extends CU{};Zyt.prototype.isWebGL1Renderer=!0;var Cet=class extends o1{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(s,h){return super.copy(s,h),s.background!==null&&(this.background=s.background.clone()),s.environment!==null&&(this.environment=s.environment.clone()),s.fog!==null&&(this.fog=s.fog.clone()),this.backgroundBlurriness=s.backgroundBlurriness,this.backgroundIntensity=s.backgroundIntensity,s.overrideMaterial!==null&&(this.overrideMaterial=s.overrideMaterial.clone()),this.matrixAutoUpdate=s.matrixAutoUpdate,this}toJSON(s){let h=super.toJSON(s);return this.fog!==null&&(h.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(h.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(h.object.backgroundIntensity=this.backgroundIntensity),h}};var Aet=class extends D0{constructor(s,h,p,m=1){super(s,h,p),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=m}copy(s){return super.copy(s),this.meshPerAttribute=s.meshPerAttribute,this}toJSON(){let s=super.toJSON();return s.meshPerAttribute=this.meshPerAttribute,s.isInstancedBufferAttribute=!0,s}},YI=new Fu,GYt=new Fu,Qtt=[],WYt=new n3,AAe=new Fu,wU=new gg,vU=new dS,ket=class extends gg{constructor(s,h,p){super(s,h),this.isInstancedMesh=!0,this.instanceMatrix=new Aet(new Float32Array(p*16),16),this.instanceColor=null,this.count=p,this.boundingBox=null,this.boundingSphere=null;for(let m=0;mI)continue;U.applyMatrix4(this.matrixWorld);let se=s.ray.origin.distanceTo(U);ses.far||h.push({distance:se,point:P.clone().applyMatrix4(this.matrixWorld),index:ft,face:null,faceIndex:null,object:this})}}else{let X=Math.max(0,E.start),gt=Math.min(Q.count,E.start+E.count);for(let ft=X,xt=gt-1;ftI)continue;U.applyMatrix4(this.matrixWorld);let Ot=s.ray.origin.distanceTo(U);Ots.far||h.push({distance:Ot,point:P.clone().applyMatrix4(this.matrixWorld),index:ft,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){let h=this.geometry.morphAttributes,p=Object.keys(h);if(p.length>0){let m=h[p[0]];if(m!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let _=0,E=m.length;_=_)){let y=h[1];s=_)break e}E=p,p=0;break n}break t}for(;p>>1;sh;)--E;if(++E,_!==0||E!==m){_>=E&&(E=Math.max(E,1),_=E-1);let y=this.getValueSize();this.times=p.slice(_,E),this.values=this.values.slice(_*y,E*y)}return this}validate(){let s=!0,h=this.getValueSize();h-Math.floor(h)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),s=!1);let p=this.times,m=this.values,_=p.length;_===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),s=!1);let E=null;for(let y=0;y!==_;y++){let I=p[y];if(typeof I=="number"&&isNaN(I)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,y,I),s=!1;break}if(E!==null&&E>I){console.error("THREE.KeyframeTrack: Out of order keys.",this,y,I,E),s=!1;break}E=I}if(m!==void 0&&kAe(m))for(let y=0,I=m.length;y!==I;++y){let N=m[y];if(isNaN(N)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,y,N),s=!1;break}}return s}optimize(){let s=this.times.slice(),h=this.values.slice(),p=this.getValueSize(),m=this.getInterpolation()===J_t,_=s.length-1,E=1;for(let y=1;y<_;++y){let I=!1,N=s[y],B=s[y+1];if(N!==B&&(y!==1||N!==s[0]))if(m)I=!0;else{let P=y*p,U=P-p,j=P+p;for(let V=0;V!==p;++V){let tt=h[P+V];if(tt!==h[U+V]||tt!==h[j+V]){I=!0;break}}}if(I){if(y!==E){s[E]=s[y];let P=y*p,U=E*p;for(let j=0;j!==p;++j)h[U+j]=h[P+j]}++E}}if(_>0){s[E]=s[_];for(let y=_*p,I=E*p,N=0;N!==p;++N)h[I+N]=h[y+N];++E}return E!==s.length?(this.times=s.slice(0,E),this.values=h.slice(0,E*p)):(this.times=s,this.values=h),this}clone(){let s=this.times.slice(),h=this.values.slice(),p=this.constructor,m=new p(this.name,s,h);return m.createInterpolant=this.createInterpolant,m}};Jw.prototype.TimeBufferType=Float32Array;Jw.prototype.ValueBufferType=Float32Array;Jw.prototype.DefaultInterpolation=aet;var JA=class extends Jw{};JA.prototype.ValueTypeName="bool";JA.prototype.ValueBufferType=Array;JA.prototype.DefaultInterpolation=cet;JA.prototype.InterpolantFactoryMethodLinear=void 0;JA.prototype.InterpolantFactoryMethodSmooth=void 0;var t2t=class extends Jw{};t2t.prototype.ValueTypeName="color";var e2t=class extends Jw{};e2t.prototype.ValueTypeName="number";var n2t=class extends aR{constructor(s,h,p,m){super(s,h,p,m)}interpolate_(s,h,p,m){let _=this.resultBuffer,E=this.sampleValues,y=this.valueSize,I=(p-h)/(m-h),N=s*y;for(let B=N+y;N!==B;N+=4)My.slerpFlat(_,0,E,N-y,E,N,I);return _}},kU=class extends Jw{InterpolantFactoryMethodLinear(s){return new n2t(this.times,this.values,this.getValueSize(),s)}};kU.prototype.ValueTypeName="quaternion";kU.prototype.DefaultInterpolation=aet;kU.prototype.InterpolantFactoryMethodSmooth=void 0;var QA=class extends Jw{};QA.prototype.ValueTypeName="string";QA.prototype.ValueBufferType=Array;QA.prototype.DefaultInterpolation=cet;QA.prototype.InterpolantFactoryMethodLinear=void 0;QA.prototype.InterpolantFactoryMethodSmooth=void 0;var i2t=class extends Jw{};i2t.prototype.ValueTypeName="vector";var r2t=class{constructor(s,h,p){let m=this,_=!1,E=0,y=0,I,N=[];this.onStart=void 0,this.onLoad=s,this.onProgress=h,this.onError=p,this.itemStart=function(B){y++,_===!1&&m.onStart!==void 0&&m.onStart(B,E,y),_=!0},this.itemEnd=function(B){E++,m.onProgress!==void 0&&m.onProgress(B,E,y),E===y&&(_=!1,m.onLoad!==void 0&&m.onLoad())},this.itemError=function(B){m.onError!==void 0&&m.onError(B)},this.resolveURL=function(B){return I?I(B):B},this.setURLModifier=function(B){return I=B,this},this.addHandler=function(B,P){return N.push(B,P),this},this.removeHandler=function(B){let P=N.indexOf(B);return P!==-1&&N.splice(P,2),this},this.getHandler=function(B){for(let P=0,U=N.length;PB||m.y>B)&&(m.x>B&&(_.x=Math.floor(B/ke.x),m.x=_.x*ke.x,Se.mapSize.x=_.x),m.y>B&&(_.y=Math.floor(B/ke.y),m.y=_.y*ke.y,Se.mapSize.y=_.y)),Se.map===null||Fn===!0||ne===!0){let en=this.type!==Yx?{minFilter:r1,magFilter:r1}:{};Se.map!==null&&Se.map.dispose(),Se.map=new t3(m.x,m.y,en),Se.map.texture.name=hn.name+".shadowMap",Se.camera.updateProjectionMatrix()}d.setRenderTarget(Se.map),d.clear();let mn=Se.getViewportCount();for(let en=0;en0||Pt.map&&Pt.alphaTest>0){let ln=Lt.uuid,Fn=Pt.uuid,ne=O[ln];ne===void 0&&(ne={},O[ln]=ne);let xe=ne[Fn];xe===void 0&&(xe=Lt.clone(),ne[Fn]=xe,Pt.addEventListener("dispose",Bt)),Lt=xe}if(Lt.visible=Pt.visible,Lt.wireframe=Pt.wireframe,ot===Yx?Lt.side=Pt.shadowSide!==null?Pt.shadowSide:Pt.side:Lt.side=Pt.shadowSide!==null?Pt.shadowSide:P[Pt.side],Lt.alphaMap=Pt.alphaMap,Lt.alphaTest=Pt.alphaTest,Lt.map=Pt.map,Lt.clipShadows=Pt.clipShadows,Lt.clippingPlanes=Pt.clippingPlanes,Lt.clipIntersection=Pt.clipIntersection,Lt.displacementMap=Pt.displacementMap,Lt.displacementScale=Pt.displacementScale,Lt.displacementBias=Pt.displacementBias,Lt.wireframeLinewidth=Pt.wireframeLinewidth,Lt.linewidth=Pt.linewidth,se.isPointLight===!0&&Lt.isMeshDistanceMaterial===!0){let ln=d.properties.get(Lt);ln.light=se}return Lt}function xt(Ot,Pt,se,ot,Lt){if(Ot.visible===!1)return;if(Ot.layers.test(Pt.layers)&&(Ot.isMesh||Ot.isLine||Ot.isPoints)&&(Ot.castShadow||Ot.receiveShadow&&Lt===Yx)&&(!Ot.frustumCulled||p.intersectsObject(Ot))){Ot.modelViewMatrix.multiplyMatrices(se.matrixWorldInverse,Ot.matrixWorld);let Fn=s.update(Ot),ne=Ot.material;if(Array.isArray(ne)){let xe=Fn.groups;for(let re=0,hn=xe.length;re=1):mn.indexOf("OpenGL ES")!==-1&&(ke=parseFloat(/^OpenGL ES (\d)/.exec(mn)[1]),Se=ke>=2);let en=null,Qn={},ge=d.getParameter(d.SCISSOR_BOX),Pe=d.getParameter(d.VIEWPORT),ti=new $f().fromArray(ge),Yi=new $f().fromArray(Pe);function ki(Qt,Mi,sn,Zn){let oi=new Uint8Array(4),Jr=d.createTexture();d.bindTexture(Qt,Jr),d.texParameteri(Qt,d.TEXTURE_MIN_FILTER,d.NEAREST),d.texParameteri(Qt,d.TEXTURE_MAG_FILTER,d.NEAREST);for(let Bs=0;Bs"u"?!1:/OculusBrowser/g.test(navigator.userAgent),B=new WeakMap,P,U=new WeakMap,W=!1;try{W=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function q(Tt,yt){return W?new OffscreenCanvas(Tt,yt):pet("canvas")}function et(Tt,yt,ue,fn){let An=1;if((Tt.width>fn||Tt.height>fn)&&(An=fn/Math.max(Tt.width,Tt.height)),An<1||yt===!0)if(typeof HTMLImageElement<"u"&&Tt instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&Tt instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&Tt instanceof ImageBitmap){let zn=yt?Dyt:Math.floor,Li=zn(An*Tt.width),xi=zn(An*Tt.height);P===void 0&&(P=q(Li,xi));let Jt=ue?q(Li,xi):P;return Jt.width=Li,Jt.height=xi,Jt.getContext("2d").drawImage(Tt,0,0,Li,xi),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Tt.width+"x"+Tt.height+") to ("+Li+"x"+xi+")."),Jt}else return"data"in Tt&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Tt.width+"x"+Tt.height+")."),Tt;return Tt}function Q(Tt){return aYt(Tt.width)&&aYt(Tt.height)}function X(Tt){return y?!1:Tt.wrapS!==Zw||Tt.wrapT!==Zw||Tt.minFilter!==r1&&Tt.minFilter!==bb}function gt(Tt,yt){return Tt.generateMipmaps&&yt&&Tt.minFilter!==r1&&Tt.minFilter!==bb}function ft(Tt){d.generateMipmap(Tt)}function xt(Tt,yt,ue,fn,An=!1){if(y===!1)return yt;if(Tt!==null){if(d[Tt]!==void 0)return d[Tt];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+Tt+"'")}let zn=yt;if(yt===d.RED&&(ue===d.FLOAT&&(zn=d.R32F),ue===d.HALF_FLOAT&&(zn=d.R16F),ue===d.UNSIGNED_BYTE&&(zn=d.R8)),yt===d.RED_INTEGER&&(ue===d.UNSIGNED_BYTE&&(zn=d.R8UI),ue===d.UNSIGNED_SHORT&&(zn=d.R16UI),ue===d.UNSIGNED_INT&&(zn=d.R32UI),ue===d.BYTE&&(zn=d.R8I),ue===d.SHORT&&(zn=d.R16I),ue===d.INT&&(zn=d.R32I)),yt===d.RG&&(ue===d.FLOAT&&(zn=d.RG32F),ue===d.HALF_FLOAT&&(zn=d.RG16F),ue===d.UNSIGNED_BYTE&&(zn=d.RG8)),yt===d.RGBA){let Li=An?uet:Na.getTransfer(fn);ue===d.FLOAT&&(zn=d.RGBA32F),ue===d.HALF_FLOAT&&(zn=d.RGBA16F),ue===d.UNSIGNED_BYTE&&(zn=Li===_u?d.SRGB8_ALPHA8:d.RGBA8),ue===d.UNSIGNED_SHORT_4_4_4_4&&(zn=d.RGBA4),ue===d.UNSIGNED_SHORT_5_5_5_1&&(zn=d.RGB5_A1)}return(zn===d.R16F||zn===d.R32F||zn===d.RG16F||zn===d.RG32F||zn===d.RGBA16F||zn===d.RGBA32F)&&s.get("EXT_color_buffer_float"),zn}function Bt(Tt,yt,ue){return gt(Tt,ue)===!0||Tt.isFramebufferTexture&&Tt.minFilter!==r1&&Tt.minFilter!==bb?Math.log2(Math.max(yt.width,yt.height))+1:Tt.mipmaps!==void 0&&Tt.mipmaps.length>0?Tt.mipmaps.length:Tt.isCompressedTexture&&Array.isArray(Tt.image)?yt.mipmaps.length:1}function Ot(Tt){return Tt===r1||Tt===LZt||Tt===q_t?d.NEAREST:d.LINEAR}function Pt(Tt){let yt=Tt.target;yt.removeEventListener("dispose",Pt),ot(yt),yt.isVideoTexture&&B.delete(yt)}function se(Tt){let yt=Tt.target;yt.removeEventListener("dispose",se),be(yt)}function ot(Tt){let yt=p.get(Tt);if(yt.__webglInit===void 0)return;let ue=Tt.source,fn=U.get(ue);if(fn){let An=fn[yt.__cacheKey];An.usedTimes--,An.usedTimes===0&&Lt(Tt),Object.keys(fn).length===0&&U.delete(ue)}p.remove(Tt)}function Lt(Tt){let yt=p.get(Tt);d.deleteTexture(yt.__webglTexture);let ue=Tt.source,fn=U.get(ue);delete fn[yt.__cacheKey],E.memory.textures--}function be(Tt){let yt=Tt.texture,ue=p.get(Tt),fn=p.get(yt);if(fn.__webglTexture!==void 0&&(d.deleteTexture(fn.__webglTexture),E.memory.textures--),Tt.depthTexture&&Tt.depthTexture.dispose(),Tt.isWebGLCubeRenderTarget)for(let An=0;An<6;An++){if(Array.isArray(ue.__webglFramebuffer[An]))for(let zn=0;zn=m.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+Tt+" texture units while this GPU supports only "+m.maxTextures),ln+=1,Tt}function xe(Tt){let yt=[];return yt.push(Tt.wrapS),yt.push(Tt.wrapT),yt.push(Tt.wrapR||0),yt.push(Tt.magFilter),yt.push(Tt.minFilter),yt.push(Tt.anisotropy),yt.push(Tt.internalFormat),yt.push(Tt.format),yt.push(Tt.type),yt.push(Tt.generateMipmaps),yt.push(Tt.premultiplyAlpha),yt.push(Tt.flipY),yt.push(Tt.unpackAlignment),yt.push(Tt.colorSpace),yt.join()}function re(Tt,yt){let ue=p.get(Tt);if(Tt.isVideoTexture&&rn(Tt),Tt.isRenderTargetTexture===!1&&Tt.version>0&&ue.__version!==Tt.version){let fn=Tt.image;if(fn===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(fn.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ti(ue,Tt,yt);return}}h.bindTexture(d.TEXTURE_2D,ue.__webglTexture,d.TEXTURE0+yt)}function hn(Tt,yt){let ue=p.get(Tt);if(Tt.version>0&&ue.__version!==Tt.version){ti(ue,Tt,yt);return}h.bindTexture(d.TEXTURE_2D_ARRAY,ue.__webglTexture,d.TEXTURE0+yt)}function Se(Tt,yt){let ue=p.get(Tt);if(Tt.version>0&&ue.__version!==Tt.version){ti(ue,Tt,yt);return}h.bindTexture(d.TEXTURE_3D,ue.__webglTexture,d.TEXTURE0+yt)}function ke(Tt,yt){let ue=p.get(Tt);if(Tt.version>0&&ue.__version!==Tt.version){Yi(ue,Tt,yt);return}h.bindTexture(d.TEXTURE_CUBE_MAP,ue.__webglTexture,d.TEXTURE0+yt)}let mn={[Lyt]:d.REPEAT,[Zw]:d.CLAMP_TO_EDGE,[Pyt]:d.MIRRORED_REPEAT},en={[r1]:d.NEAREST,[LZt]:d.NEAREST_MIPMAP_NEAREST,[q_t]:d.NEAREST_MIPMAP_LINEAR,[bb]:d.LINEAR,[mEe]:d.LINEAR_MIPMAP_NEAREST,[_U]:d.LINEAR_MIPMAP_LINEAR},Qn={[AEe]:d.NEVER,[DEe]:d.ALWAYS,[kEe]:d.LESS,[dKt]:d.LEQUAL,[LEe]:d.EQUAL,[REe]:d.GEQUAL,[PEe]:d.GREATER,[IEe]:d.NOTEQUAL};function ge(Tt,yt,ue){if(ue?(d.texParameteri(Tt,d.TEXTURE_WRAP_S,mn[yt.wrapS]),d.texParameteri(Tt,d.TEXTURE_WRAP_T,mn[yt.wrapT]),(Tt===d.TEXTURE_3D||Tt===d.TEXTURE_2D_ARRAY)&&d.texParameteri(Tt,d.TEXTURE_WRAP_R,mn[yt.wrapR]),d.texParameteri(Tt,d.TEXTURE_MAG_FILTER,en[yt.magFilter]),d.texParameteri(Tt,d.TEXTURE_MIN_FILTER,en[yt.minFilter])):(d.texParameteri(Tt,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE),d.texParameteri(Tt,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE),(Tt===d.TEXTURE_3D||Tt===d.TEXTURE_2D_ARRAY)&&d.texParameteri(Tt,d.TEXTURE_WRAP_R,d.CLAMP_TO_EDGE),(yt.wrapS!==Zw||yt.wrapT!==Zw)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),d.texParameteri(Tt,d.TEXTURE_MAG_FILTER,Ot(yt.magFilter)),d.texParameteri(Tt,d.TEXTURE_MIN_FILTER,Ot(yt.minFilter)),yt.minFilter!==r1&&yt.minFilter!==bb&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),yt.compareFunction&&(d.texParameteri(Tt,d.TEXTURE_COMPARE_MODE,d.COMPARE_REF_TO_TEXTURE),d.texParameteri(Tt,d.TEXTURE_COMPARE_FUNC,Qn[yt.compareFunction])),s.has("EXT_texture_filter_anisotropic")===!0){let fn=s.get("EXT_texture_filter_anisotropic");if(yt.magFilter===r1||yt.minFilter!==q_t&&yt.minFilter!==_U||yt.type===oS&&s.has("OES_texture_float_linear")===!1||y===!1&&yt.type===yU&&s.has("OES_texture_half_float_linear")===!1)return;(yt.anisotropy>1||p.get(yt).__currentAnisotropy)&&(d.texParameterf(Tt,fn.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(yt.anisotropy,m.getMaxAnisotropy())),p.get(yt).__currentAnisotropy=yt.anisotropy)}}function Pe(Tt,yt){let ue=!1;Tt.__webglInit===void 0&&(Tt.__webglInit=!0,yt.addEventListener("dispose",Pt));let fn=yt.source,An=U.get(fn);An===void 0&&(An={},U.set(fn,An));let zn=xe(yt);if(zn!==Tt.__cacheKey){An[zn]===void 0&&(An[zn]={texture:d.createTexture(),usedTimes:0},E.memory.textures++,ue=!0),An[zn].usedTimes++;let Li=An[Tt.__cacheKey];Li!==void 0&&(An[Tt.__cacheKey].usedTimes--,Li.usedTimes===0&&Lt(yt)),Tt.__cacheKey=zn,Tt.__webglTexture=An[zn].texture}return ue}function ti(Tt,yt,ue){let fn=d.TEXTURE_2D;(yt.isDataArrayTexture||yt.isCompressedArrayTexture)&&(fn=d.TEXTURE_2D_ARRAY),yt.isData3DTexture&&(fn=d.TEXTURE_3D);let An=Pe(Tt,yt),zn=yt.source;h.bindTexture(fn,Tt.__webglTexture,d.TEXTURE0+ue);let Li=p.get(zn);if(zn.version!==Li.__version||An===!0){h.activeTexture(d.TEXTURE0+ue);let xi=Na.getPrimaries(Na.workingColorSpace),Jt=yt.colorSpace===wb?null:Na.getPrimaries(yt.colorSpace),nn=yt.colorSpace===wb||xi===Jt?d.NONE:d.BROWSER_DEFAULT_WEBGL;d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,yt.flipY),d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,yt.premultiplyAlpha),d.pixelStorei(d.UNPACK_ALIGNMENT,yt.unpackAlignment),d.pixelStorei(d.UNPACK_COLORSPACE_CONVERSION_WEBGL,nn);let vn=X(yt)&&Q(yt.image)===!1,he=et(yt.image,vn,!1,m.maxTextureSize);he=Pn(yt,he);let Mn=Q(he)||y,Sn=_.convert(yt.format,yt.colorSpace),gn=_.convert(yt.type),Ce=xt(yt.internalFormat,Sn,gn,yt.colorSpace,yt.isVideoTexture);ge(fn,yt,Mn);let dn,jn=yt.mipmaps,ar=y&&yt.isVideoTexture!==!0&&Ce!==lKt,gr=Li.__version===void 0||An===!0,tr=Bt(yt,he,Mn);if(yt.isDepthTexture)Ce=d.DEPTH_COMPONENT,y?yt.type===oS?Ce=d.DEPTH_COMPONENT32F:yt.type===sS?Ce=d.DEPTH_COMPONENT24:yt.type===qA?Ce=d.DEPTH24_STENCIL8:Ce=d.DEPTH_COMPONENT16:yt.type===oS&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),yt.format===XA&&Ce===d.DEPTH_COMPONENT&&yt.type!==d2t&&yt.type!==sS&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),yt.type=sS,gn=_.convert(yt.type)),yt.format===iR&&Ce===d.DEPTH_COMPONENT&&(Ce=d.DEPTH_STENCIL,yt.type!==qA&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),yt.type=qA,gn=_.convert(yt.type))),gr&&(ar?h.texStorage2D(d.TEXTURE_2D,1,Ce,he.width,he.height):h.texImage2D(d.TEXTURE_2D,0,Ce,he.width,he.height,0,Sn,gn,null));else if(yt.isDataTexture)if(jn.length>0&&Mn){ar&&gr&&h.texStorage2D(d.TEXTURE_2D,tr,Ce,jn[0].width,jn[0].height);for(let Ln=0,Qt=jn.length;Ln>=1,Qt>>=1}}else if(jn.length>0&&Mn){ar&&gr&&h.texStorage2D(d.TEXTURE_2D,tr,Ce,jn[0].width,jn[0].height);for(let Ln=0,Qt=jn.length;Ln0&&gr++,h.texStorage2D(d.TEXTURE_CUBE_MAP,gr,dn,he[0].width,he[0].height));for(let Ln=0;Ln<6;Ln++)if(vn){jn?h.texSubImage2D(d.TEXTURE_CUBE_MAP_POSITIVE_X+Ln,0,0,0,he[Ln].width,he[Ln].height,gn,Ce,he[Ln].data):h.texImage2D(d.TEXTURE_CUBE_MAP_POSITIVE_X+Ln,0,dn,he[Ln].width,he[Ln].height,0,gn,Ce,he[Ln].data);for(let Qt=0;Qt>zn),he=Math.max(1,yt.height>>zn);An===d.TEXTURE_3D||An===d.TEXTURE_2D_ARRAY?h.texImage3D(An,zn,Jt,vn,he,yt.depth,0,Li,xi,null):h.texImage2D(An,zn,Jt,vn,he,0,Li,xi,null)}h.bindFramebuffer(d.FRAMEBUFFER,Tt),ie(yt)?I.framebufferTexture2DMultisampleEXT(d.FRAMEBUFFER,fn,An,p.get(ue).__webglTexture,0,Nt(yt)):(An===d.TEXTURE_2D||An>=d.TEXTURE_CUBE_MAP_POSITIVE_X&&An<=d.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&d.framebufferTexture2D(d.FRAMEBUFFER,fn,An,p.get(ue).__webglTexture,zn),h.bindFramebuffer(d.FRAMEBUFFER,null)}function lr(Tt,yt,ue){if(d.bindRenderbuffer(d.RENDERBUFFER,Tt),yt.depthBuffer&&!yt.stencilBuffer){let fn=y===!0?d.DEPTH_COMPONENT24:d.DEPTH_COMPONENT16;if(ue||ie(yt)){let An=yt.depthTexture;An&&An.isDepthTexture&&(An.type===oS?fn=d.DEPTH_COMPONENT32F:An.type===sS&&(fn=d.DEPTH_COMPONENT24));let zn=Nt(yt);ie(yt)?I.renderbufferStorageMultisampleEXT(d.RENDERBUFFER,zn,fn,yt.width,yt.height):d.renderbufferStorageMultisample(d.RENDERBUFFER,zn,fn,yt.width,yt.height)}else d.renderbufferStorage(d.RENDERBUFFER,fn,yt.width,yt.height);d.framebufferRenderbuffer(d.FRAMEBUFFER,d.DEPTH_ATTACHMENT,d.RENDERBUFFER,Tt)}else if(yt.depthBuffer&&yt.stencilBuffer){let fn=Nt(yt);ue&&ie(yt)===!1?d.renderbufferStorageMultisample(d.RENDERBUFFER,fn,d.DEPTH24_STENCIL8,yt.width,yt.height):ie(yt)?I.renderbufferStorageMultisampleEXT(d.RENDERBUFFER,fn,d.DEPTH24_STENCIL8,yt.width,yt.height):d.renderbufferStorage(d.RENDERBUFFER,d.DEPTH_STENCIL,yt.width,yt.height),d.framebufferRenderbuffer(d.FRAMEBUFFER,d.DEPTH_STENCIL_ATTACHMENT,d.RENDERBUFFER,Tt)}else{let fn=yt.isWebGLMultipleRenderTargets===!0?yt.texture:[yt.texture];for(let An=0;An0){ue.__webglFramebuffer[xi]=[];for(let Jt=0;Jt0){ue.__webglFramebuffer=[];for(let xi=0;xi0&&ie(Tt)===!1){let xi=zn?yt:[yt];ue.__webglMultisampledFramebuffer=d.createFramebuffer(),ue.__webglColorRenderbuffer=[],h.bindFramebuffer(d.FRAMEBUFFER,ue.__webglMultisampledFramebuffer);for(let Jt=0;Jt0)for(let Jt=0;Jt0)for(let Jt=0;Jt0&&ie(Tt)===!1){let yt=Tt.isWebGLMultipleRenderTargets?Tt.texture:[Tt.texture],ue=Tt.width,fn=Tt.height,An=d.COLOR_BUFFER_BIT,zn=[],Li=Tt.stencilBuffer?d.DEPTH_STENCIL_ATTACHMENT:d.DEPTH_ATTACHMENT,xi=p.get(Tt),Jt=Tt.isWebGLMultipleRenderTargets===!0;if(Jt)for(let nn=0;nn0&&s.has("WEBGL_multisampled_render_to_texture")===!0&&yt.__useRenderToTexture!==!1}function rn(Tt){let yt=E.render.frame;B.get(Tt)!==yt&&(B.set(Tt,yt),Tt.update())}function Pn(Tt,yt){let ue=Tt.colorSpace,fn=Tt.format,An=Tt.type;return Tt.isCompressedTexture===!0||Tt.isVideoTexture===!0||Tt.format===Iyt||ue!==Qx&&ue!==wb&&(Na.getTransfer(ue)===_u?y===!1?s.has("EXT_sRGB")===!0&&fn===Yw?(Tt.format=Iyt,Tt.minFilter=bb,Tt.generateMipmaps=!1):yt=get.sRGBToLinear(yt):(fn!==Yw||An!==lS)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ue)),yt}this.allocateTextureUnit=ne,this.resetTextureUnits=Fn,this.setTexture2D=re,this.setTexture2DArray=hn,this.setTexture3D=Se,this.setTextureCube=ke,this.rebindTextures=wn,this.setupRenderTarget=it,this.updateRenderTargetMipmap=ut,this.updateMultisampleRenderTarget=kt,this.setupDepthRenderbuffer=Kt,this.setupFrameBufferTexture=ki,this.useMultisampledRTT=ie}function EAe(d,s,h){let p=h.isWebGL2;function m(_,E=wb){let y,I=Na.getTransfer(E);if(_===lS)return d.UNSIGNED_BYTE;if(_===sKt)return d.UNSIGNED_SHORT_4_4_4_4;if(_===oKt)return d.UNSIGNED_SHORT_5_5_5_1;if(_===bEe)return d.BYTE;if(_===wEe)return d.SHORT;if(_===d2t)return d.UNSIGNED_SHORT;if(_===rKt)return d.INT;if(_===sS)return d.UNSIGNED_INT;if(_===oS)return d.FLOAT;if(_===yU)return p?d.HALF_FLOAT:(y=s.get("OES_texture_half_float"),y!==null?y.HALF_FLOAT_OES:null);if(_===vEe)return d.ALPHA;if(_===Yw)return d.RGBA;if(_===_Ee)return d.LUMINANCE;if(_===yEe)return d.LUMINANCE_ALPHA;if(_===XA)return d.DEPTH_COMPONENT;if(_===iR)return d.DEPTH_STENCIL;if(_===Iyt)return y=s.get("EXT_sRGB"),y!==null?y.SRGB_ALPHA_EXT:null;if(_===xEe)return d.RED;if(_===cKt)return d.RED_INTEGER;if(_===MEe)return d.RG;if(_===aKt)return d.RG_INTEGER;if(_===uKt)return d.RGBA_INTEGER;if(_===X_t||_===Z_t||_===Y_t||_===K_t)if(I===_u)if(y=s.get("WEBGL_compressed_texture_s3tc_srgb"),y!==null){if(_===X_t)return y.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(_===Z_t)return y.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(_===Y_t)return y.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(_===K_t)return y.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(y=s.get("WEBGL_compressed_texture_s3tc"),y!==null){if(_===X_t)return y.COMPRESSED_RGB_S3TC_DXT1_EXT;if(_===Z_t)return y.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(_===Y_t)return y.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(_===K_t)return y.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(_===PZt||_===IZt||_===RZt||_===DZt)if(y=s.get("WEBGL_compressed_texture_pvrtc"),y!==null){if(_===PZt)return y.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(_===IZt)return y.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(_===RZt)return y.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(_===DZt)return y.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(_===lKt)return y=s.get("WEBGL_compressed_texture_etc1"),y!==null?y.COMPRESSED_RGB_ETC1_WEBGL:null;if(_===NZt||_===OZt)if(y=s.get("WEBGL_compressed_texture_etc"),y!==null){if(_===NZt)return I===_u?y.COMPRESSED_SRGB8_ETC2:y.COMPRESSED_RGB8_ETC2;if(_===OZt)return I===_u?y.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:y.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(_===BZt||_===FZt||_===UZt||_===zZt||_===jZt||_===HZt||_===GZt||_===WZt||_===$Zt||_===VZt||_===qZt||_===XZt||_===ZZt||_===YZt)if(y=s.get("WEBGL_compressed_texture_astc"),y!==null){if(_===BZt)return I===_u?y.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:y.COMPRESSED_RGBA_ASTC_4x4_KHR;if(_===FZt)return I===_u?y.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:y.COMPRESSED_RGBA_ASTC_5x4_KHR;if(_===UZt)return I===_u?y.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:y.COMPRESSED_RGBA_ASTC_5x5_KHR;if(_===zZt)return I===_u?y.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:y.COMPRESSED_RGBA_ASTC_6x5_KHR;if(_===jZt)return I===_u?y.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:y.COMPRESSED_RGBA_ASTC_6x6_KHR;if(_===HZt)return I===_u?y.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:y.COMPRESSED_RGBA_ASTC_8x5_KHR;if(_===GZt)return I===_u?y.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:y.COMPRESSED_RGBA_ASTC_8x6_KHR;if(_===WZt)return I===_u?y.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:y.COMPRESSED_RGBA_ASTC_8x8_KHR;if(_===$Zt)return I===_u?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:y.COMPRESSED_RGBA_ASTC_10x5_KHR;if(_===VZt)return I===_u?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:y.COMPRESSED_RGBA_ASTC_10x6_KHR;if(_===qZt)return I===_u?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:y.COMPRESSED_RGBA_ASTC_10x8_KHR;if(_===XZt)return I===_u?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:y.COMPRESSED_RGBA_ASTC_10x10_KHR;if(_===ZZt)return I===_u?y.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:y.COMPRESSED_RGBA_ASTC_12x10_KHR;if(_===YZt)return I===_u?y.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:y.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(_===J_t||_===KZt||_===JZt)if(y=s.get("EXT_texture_compression_bptc"),y!==null){if(_===J_t)return I===_u?y.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:y.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(_===KZt)return y.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(_===JZt)return y.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(_===EEe||_===QZt||_===tYt||_===eYt)if(y=s.get("EXT_texture_compression_rgtc"),y!==null){if(_===J_t)return y.COMPRESSED_RED_RGTC1_EXT;if(_===QZt)return y.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(_===tYt)return y.COMPRESSED_RED_GREEN_RGTC2_EXT;if(_===eYt)return y.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return _===qA?p?d.UNSIGNED_INT_24_8:(y=s.get("WEBGL_depth_texture"),y!==null?y.UNSIGNED_INT_24_8_WEBGL:null):d[_]!==void 0?d[_]:null}return{convert:m}}var Xyt=class extends s1{constructor(s=[]){super(),this.isArrayCamera=!0,this.cameras=s}},cS=class extends o1{constructor(){super(),this.isGroup=!0,this.type="Group"}},SAe={type:"move"},vU=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new cS,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new cS,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Ge,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Ge),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new cS,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Ge,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Ge),this._grip}dispatchEvent(s){return this._targetRay!==null&&this._targetRay.dispatchEvent(s),this._grip!==null&&this._grip.dispatchEvent(s),this._hand!==null&&this._hand.dispatchEvent(s),this}connect(s){if(s&&s.hand){let h=this._hand;if(h)for(let p of s.hand.values())this._getHandJoint(h,p)}return this.dispatchEvent({type:"connected",data:s}),this}disconnect(s){return this.dispatchEvent({type:"disconnected",data:s}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(s,h,p){let m=null,_=null,E=null,y=this._targetRay,I=this._grip,O=this._hand;if(s&&h.session.visibilityState!=="visible-blurred"){if(O&&s.hand){E=!0;for(let et of s.hand.values()){let Q=h.getJointPose(et,p),X=this._getHandJoint(O,et);Q!==null&&(X.matrix.fromArray(Q.transform.matrix),X.matrix.decompose(X.position,X.rotation,X.scale),X.matrixWorldNeedsUpdate=!0,X.jointRadius=Q.radius),X.visible=Q!==null}let B=O.joints["index-finger-tip"],P=O.joints["thumb-tip"],U=B.position.distanceTo(P.position),W=.02,q=.005;O.inputState.pinching&&U>W+q?(O.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:s.handedness,target:this})):!O.inputState.pinching&&U<=W-q&&(O.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:s.handedness,target:this}))}else I!==null&&s.gripSpace&&(_=h.getPose(s.gripSpace,p),_!==null&&(I.matrix.fromArray(_.transform.matrix),I.matrix.decompose(I.position,I.rotation,I.scale),I.matrixWorldNeedsUpdate=!0,_.linearVelocity?(I.hasLinearVelocity=!0,I.linearVelocity.copy(_.linearVelocity)):I.hasLinearVelocity=!1,_.angularVelocity?(I.hasAngularVelocity=!0,I.angularVelocity.copy(_.angularVelocity)):I.hasAngularVelocity=!1));y!==null&&(m=h.getPose(s.targetRaySpace,p),m===null&&_!==null&&(m=_),m!==null&&(y.matrix.fromArray(m.transform.matrix),y.matrix.decompose(y.position,y.rotation,y.scale),y.matrixWorldNeedsUpdate=!0,m.linearVelocity?(y.hasLinearVelocity=!0,y.linearVelocity.copy(m.linearVelocity)):y.hasLinearVelocity=!1,m.angularVelocity?(y.hasAngularVelocity=!0,y.angularVelocity.copy(m.angularVelocity)):y.hasAngularVelocity=!1,this.dispatchEvent(SAe)))}return y!==null&&(y.visible=m!==null),I!==null&&(I.visible=_!==null),O!==null&&(O.visible=E!==null),this}_getHandJoint(s,h){if(s.joints[h.jointName]===void 0){let p=new cS;p.matrixAutoUpdate=!1,p.visible=!1,s.joints[h.jointName]=p,s.add(p)}return s.joints[h.jointName]}},Zyt=class extends fS{constructor(s,h){super();let p=this,m=null,_=1,E=null,y="local-floor",I=1,O=null,B=null,P=null,U=null,W=null,q=null,et=h.getContextAttributes(),Q=null,X=null,gt=[],ft=[],xt=new Nc,Bt=null,Ot=new s1;Ot.layers.enable(1),Ot.viewport=new $f;let Pt=new s1;Pt.layers.enable(2),Pt.viewport=new $f;let se=[Ot,Pt],ot=new Xyt;ot.layers.enable(1),ot.layers.enable(2);let Lt=null,be=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ge){let Pe=gt[ge];return Pe===void 0&&(Pe=new vU,gt[ge]=Pe),Pe.getTargetRaySpace()},this.getControllerGrip=function(ge){let Pe=gt[ge];return Pe===void 0&&(Pe=new vU,gt[ge]=Pe),Pe.getGripSpace()},this.getHand=function(ge){let Pe=gt[ge];return Pe===void 0&&(Pe=new vU,gt[ge]=Pe),Pe.getHandSpace()};function ln(ge){let Pe=ft.indexOf(ge.inputSource);if(Pe===-1)return;let ti=gt[Pe];ti!==void 0&&(ti.update(ge.inputSource,ge.frame,O||E),ti.dispatchEvent({type:ge.type,data:ge.inputSource}))}function Fn(){m.removeEventListener("select",ln),m.removeEventListener("selectstart",ln),m.removeEventListener("selectend",ln),m.removeEventListener("squeeze",ln),m.removeEventListener("squeezestart",ln),m.removeEventListener("squeezeend",ln),m.removeEventListener("end",Fn),m.removeEventListener("inputsourceschange",ne);for(let ge=0;ge=0&&(ft[Yi]=null,gt[Yi].disconnect(ti))}for(let Pe=0;Pe=ft.length){ft.push(ti),Yi=lr;break}else if(ft[lr]===null){ft[lr]=ti,Yi=lr;break}if(Yi===-1)break}let ki=gt[Yi];ki&&ki.connect(ti)}}let xe=new Ge,re=new Ge;function hn(ge,Pe,ti){xe.setFromMatrixPosition(Pe.matrixWorld),re.setFromMatrixPosition(ti.matrixWorld);let Yi=xe.distanceTo(re),ki=Pe.projectionMatrix.elements,lr=ti.projectionMatrix.elements,pr=ki[14]/(ki[10]-1),Kt=ki[14]/(ki[10]+1),wn=(ki[9]+1)/ki[5],it=(ki[9]-1)/ki[5],ut=(ki[8]-1)/ki[0],kt=(lr[8]+1)/lr[0],Nt=pr*ut,ie=pr*kt,rn=Yi/(-ut+kt),Pn=rn*-ut;Pe.matrixWorld.decompose(ge.position,ge.quaternion,ge.scale),ge.translateX(Pn),ge.translateZ(rn),ge.matrixWorld.compose(ge.position,ge.quaternion,ge.scale),ge.matrixWorldInverse.copy(ge.matrixWorld).invert();let Tt=pr+rn,yt=Kt+rn,ue=Nt-Pn,fn=ie+(Yi-Pn),An=wn*Kt/yt*Tt,zn=it*Kt/yt*Tt;ge.projectionMatrix.makePerspective(ue,fn,An,zn,Tt,yt),ge.projectionMatrixInverse.copy(ge.projectionMatrix).invert()}function Se(ge,Pe){Pe===null?ge.matrixWorld.copy(ge.matrix):ge.matrixWorld.multiplyMatrices(Pe.matrixWorld,ge.matrix),ge.matrixWorldInverse.copy(ge.matrixWorld).invert()}this.updateCamera=function(ge){if(m===null)return;ot.near=Pt.near=Ot.near=ge.near,ot.far=Pt.far=Ot.far=ge.far,(Lt!==ot.near||be!==ot.far)&&(m.updateRenderState({depthNear:ot.near,depthFar:ot.far}),Lt=ot.near,be=ot.far);let Pe=ge.parent,ti=ot.cameras;Se(ot,Pe);for(let Yi=0;Yi0&&(Q.alphaTest.value=X.alphaTest);let gt=s.get(X).envMap;if(gt&&(Q.envMap.value=gt,Q.flipEnvMap.value=gt.isCubeTexture&>.isRenderTargetTexture===!1?-1:1,Q.reflectivity.value=X.reflectivity,Q.ior.value=X.ior,Q.refractionRatio.value=X.refractionRatio),X.lightMap){Q.lightMap.value=X.lightMap;let ft=d._useLegacyLights===!0?Math.PI:1;Q.lightMapIntensity.value=X.lightMapIntensity*ft,h(X.lightMap,Q.lightMapTransform)}X.aoMap&&(Q.aoMap.value=X.aoMap,Q.aoMapIntensity.value=X.aoMapIntensity,h(X.aoMap,Q.aoMapTransform))}function E(Q,X){Q.diffuse.value.copy(X.color),Q.opacity.value=X.opacity,X.map&&(Q.map.value=X.map,h(X.map,Q.mapTransform))}function y(Q,X){Q.dashSize.value=X.dashSize,Q.totalSize.value=X.dashSize+X.gapSize,Q.scale.value=X.scale}function I(Q,X,gt,ft){Q.diffuse.value.copy(X.color),Q.opacity.value=X.opacity,Q.size.value=X.size*gt,Q.scale.value=ft*.5,X.map&&(Q.map.value=X.map,h(X.map,Q.uvTransform)),X.alphaMap&&(Q.alphaMap.value=X.alphaMap,h(X.alphaMap,Q.alphaMapTransform)),X.alphaTest>0&&(Q.alphaTest.value=X.alphaTest)}function O(Q,X){Q.diffuse.value.copy(X.color),Q.opacity.value=X.opacity,Q.rotation.value=X.rotation,X.map&&(Q.map.value=X.map,h(X.map,Q.mapTransform)),X.alphaMap&&(Q.alphaMap.value=X.alphaMap,h(X.alphaMap,Q.alphaMapTransform)),X.alphaTest>0&&(Q.alphaTest.value=X.alphaTest)}function B(Q,X){Q.specular.value.copy(X.specular),Q.shininess.value=Math.max(X.shininess,1e-4)}function P(Q,X){X.gradientMap&&(Q.gradientMap.value=X.gradientMap)}function U(Q,X){Q.metalness.value=X.metalness,X.metalnessMap&&(Q.metalnessMap.value=X.metalnessMap,h(X.metalnessMap,Q.metalnessMapTransform)),Q.roughness.value=X.roughness,X.roughnessMap&&(Q.roughnessMap.value=X.roughnessMap,h(X.roughnessMap,Q.roughnessMapTransform)),s.get(X).envMap&&(Q.envMapIntensity.value=X.envMapIntensity)}function W(Q,X,gt){Q.ior.value=X.ior,X.sheen>0&&(Q.sheenColor.value.copy(X.sheenColor).multiplyScalar(X.sheen),Q.sheenRoughness.value=X.sheenRoughness,X.sheenColorMap&&(Q.sheenColorMap.value=X.sheenColorMap,h(X.sheenColorMap,Q.sheenColorMapTransform)),X.sheenRoughnessMap&&(Q.sheenRoughnessMap.value=X.sheenRoughnessMap,h(X.sheenRoughnessMap,Q.sheenRoughnessMapTransform))),X.clearcoat>0&&(Q.clearcoat.value=X.clearcoat,Q.clearcoatRoughness.value=X.clearcoatRoughness,X.clearcoatMap&&(Q.clearcoatMap.value=X.clearcoatMap,h(X.clearcoatMap,Q.clearcoatMapTransform)),X.clearcoatRoughnessMap&&(Q.clearcoatRoughnessMap.value=X.clearcoatRoughnessMap,h(X.clearcoatRoughnessMap,Q.clearcoatRoughnessMapTransform)),X.clearcoatNormalMap&&(Q.clearcoatNormalMap.value=X.clearcoatNormalMap,h(X.clearcoatNormalMap,Q.clearcoatNormalMapTransform),Q.clearcoatNormalScale.value.copy(X.clearcoatNormalScale),X.side===mg&&Q.clearcoatNormalScale.value.negate())),X.iridescence>0&&(Q.iridescence.value=X.iridescence,Q.iridescenceIOR.value=X.iridescenceIOR,Q.iridescenceThicknessMinimum.value=X.iridescenceThicknessRange[0],Q.iridescenceThicknessMaximum.value=X.iridescenceThicknessRange[1],X.iridescenceMap&&(Q.iridescenceMap.value=X.iridescenceMap,h(X.iridescenceMap,Q.iridescenceMapTransform)),X.iridescenceThicknessMap&&(Q.iridescenceThicknessMap.value=X.iridescenceThicknessMap,h(X.iridescenceThicknessMap,Q.iridescenceThicknessMapTransform))),X.transmission>0&&(Q.transmission.value=X.transmission,Q.transmissionSamplerMap.value=gt.texture,Q.transmissionSamplerSize.value.set(gt.width,gt.height),X.transmissionMap&&(Q.transmissionMap.value=X.transmissionMap,h(X.transmissionMap,Q.transmissionMapTransform)),Q.thickness.value=X.thickness,X.thicknessMap&&(Q.thicknessMap.value=X.thicknessMap,h(X.thicknessMap,Q.thicknessMapTransform)),Q.attenuationDistance.value=X.attenuationDistance,Q.attenuationColor.value.copy(X.attenuationColor)),X.anisotropy>0&&(Q.anisotropyVector.value.set(X.anisotropy*Math.cos(X.anisotropyRotation),X.anisotropy*Math.sin(X.anisotropyRotation)),X.anisotropyMap&&(Q.anisotropyMap.value=X.anisotropyMap,h(X.anisotropyMap,Q.anisotropyMapTransform))),Q.specularIntensity.value=X.specularIntensity,Q.specularColor.value.copy(X.specularColor),X.specularColorMap&&(Q.specularColorMap.value=X.specularColorMap,h(X.specularColorMap,Q.specularColorMapTransform)),X.specularIntensityMap&&(Q.specularIntensityMap.value=X.specularIntensityMap,h(X.specularIntensityMap,Q.specularIntensityMapTransform))}function q(Q,X){X.matcap&&(Q.matcap.value=X.matcap)}function et(Q,X){let gt=s.get(X).light;Q.referencePosition.value.setFromMatrixPosition(gt.matrixWorld),Q.nearDistance.value=gt.shadow.camera.near,Q.farDistance.value=gt.shadow.camera.far}return{refreshFogUniforms:p,refreshMaterialUniforms:m}}function CAe(d,s,h,p){let m={},_={},E=[],y=h.isWebGL2?d.getParameter(d.MAX_UNIFORM_BUFFER_BINDINGS):0;function I(gt,ft){let xt=ft.program;p.uniformBlockBinding(gt,xt)}function O(gt,ft){let xt=m[gt.id];xt===void 0&&(q(gt),xt=B(gt),m[gt.id]=xt,gt.addEventListener("dispose",Q));let Bt=ft.program;p.updateUBOMapping(gt,Bt);let Ot=s.render.frame;_[gt.id]!==Ot&&(U(gt),_[gt.id]=Ot)}function B(gt){let ft=P();gt.__bindingPointIndex=ft;let xt=d.createBuffer(),Bt=gt.__size,Ot=gt.usage;return d.bindBuffer(d.UNIFORM_BUFFER,xt),d.bufferData(d.UNIFORM_BUFFER,Bt,Ot),d.bindBuffer(d.UNIFORM_BUFFER,null),d.bindBufferBase(d.UNIFORM_BUFFER,ft,xt),xt}function P(){for(let gt=0;gt0&&(xt+=Bt-Ot),gt.__size=xt,gt.__cache={},this}function et(gt){let ft={boundary:0,storage:0};return typeof gt=="number"||typeof gt=="boolean"?(ft.boundary=4,ft.storage=4):gt.isVector2?(ft.boundary=8,ft.storage=8):gt.isVector3||gt.isColor?(ft.boundary=16,ft.storage=12):gt.isVector4?(ft.boundary=16,ft.storage=16):gt.isMatrix3?(ft.boundary=48,ft.storage=48):gt.isMatrix4?(ft.boundary=64,ft.storage=64):gt.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",gt),ft}function Q(gt){let ft=gt.target;ft.removeEventListener("dispose",Q);let xt=E.indexOf(ft.__bindingPointIndex);E.splice(xt,1),d.deleteBuffer(m[ft.id]),delete m[ft.id],delete _[ft.id]}function X(){for(let gt in m)d.deleteBuffer(m[gt]);E=[],m={},_={}}return{bind:I,update:O,dispose:X}}var SU=class{constructor(s={}){let{canvas:h=OEe(),context:p=null,depth:m=!0,stencil:_=!0,alpha:E=!1,antialias:y=!1,premultipliedAlpha:I=!0,preserveDrawingBuffer:O=!1,powerPreference:B="default",failIfMajorPerformanceCaveat:P=!1}=s;this.isWebGLRenderer=!0;let U;p!==null?U=p.getContextAttributes().alpha:U=E;let W=new Uint32Array(4),q=new Int32Array(4),et=null,Q=null,X=[],gt=[];this.domElement=h,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Pd,this._useLegacyLights=!1,this.toneMapping=uS,this.toneMappingExposure=1;let ft=this,xt=!1,Bt=0,Ot=0,Pt=null,se=-1,ot=null,Lt=new $f,be=new $f,ln=null,Fn=new Go(0),ne=0,xe=h.width,re=h.height,hn=1,Se=null,ke=null,mn=new $f(0,0,xe,re),en=new $f(0,0,xe,re),Qn=!1,ge=new EU,Pe=!1,ti=!1,Yi=null,ki=new Fu,lr=new Nc,pr=new Ge,Kt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function wn(){return Pt===null?hn:1}let it=p;function ut(Rt,ve){for(let Je=0;Je{function Hi(){if(tn.forEach(function(Pr){Pn.get(Pr).currentProgram.isReady()&&tn.delete(Pr)}),tn.size===0){Ze(Rt);return}setTimeout(Hi,10)}kt.get("KHR_parallel_shader_compile")!==null?Hi():setTimeout(Hi,10)})};let Bs=null;function Oc(Rt){Bs&&Bs(Rt)}function su(){il.stop()}function fc(){il.start()}let il=new bKt;il.setAnimationLoop(Oc),typeof self<"u"&&il.setContext(self),this.setAnimationLoop=function(Rt){Bs=Rt,tr.setAnimationLoop(Rt),Rt===null?il.stop():il.start()},tr.addEventListener("sessionstart",su),tr.addEventListener("sessionend",fc),this.render=function(Rt,ve){if(ve!==void 0&&ve.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(xt===!0)return;Rt.matrixWorldAutoUpdate===!0&&Rt.updateMatrixWorld(),ve.parent===null&&ve.matrixWorldAutoUpdate===!0&&ve.updateMatrixWorld(),tr.enabled===!0&&tr.isPresenting===!0&&(tr.cameraAutoUpdate===!0&&tr.updateCamera(ve),ve=tr.getCamera()),Rt.isScene===!0&&Rt.onBeforeRender(ft,Rt,ve,Pt),Q=nn.get(Rt,gt.length),Q.init(),gt.push(Q),ki.multiplyMatrices(ve.projectionMatrix,ve.matrixWorldInverse),ge.setFromProjectionMatrix(ki),ti=this.localClippingEnabled,Pe=vn.init(this.clippingPlanes,ti),et=Jt.get(Rt,X.length),et.init(),X.push(et),va(Rt,ve,0,ft.sortObjects),et.finish(),ft.sortObjects===!0&&et.sort(Se,ke),this.info.render.frame++,Pe===!0&&vn.beginShadows();let Je=Q.state.shadowsArray;if(he.render(Je,Rt,ve),Pe===!0&&vn.endShadows(),this.info.autoReset===!0&&this.info.reset(),Mn.render(et,Rt),Q.setupLights(ft._useLegacyLights),ve.isArrayCamera){let tn=ve.cameras;for(let Ze=0,Hi=tn.length;Ze0?Q=gt[gt.length-1]:Q=null,X.pop(),X.length>0?et=X[X.length-1]:et=null};function va(Rt,ve,Je,tn){if(Rt.visible===!1)return;if(Rt.layers.test(ve.layers)){if(Rt.isGroup)Je=Rt.renderOrder;else if(Rt.isLOD)Rt.autoUpdate===!0&&Rt.update(ve);else if(Rt.isLight)Q.pushLight(Rt),Rt.castShadow&&Q.pushShadow(Rt);else if(Rt.isSprite){if(!Rt.frustumCulled||ge.intersectsSprite(Rt)){tn&&pr.setFromMatrixPosition(Rt.matrixWorld).applyMatrix4(ki);let Pr=zn.update(Rt),Gr=Rt.material;Gr.visible&&et.push(Rt,Pr,Gr,Je,pr.z,null)}}else if((Rt.isMesh||Rt.isLine||Rt.isPoints)&&(!Rt.frustumCulled||ge.intersectsObject(Rt))){let Pr=zn.update(Rt),Gr=Rt.material;if(tn&&(Rt.boundingSphere!==void 0?(Rt.boundingSphere===null&&Rt.computeBoundingSphere(),pr.copy(Rt.boundingSphere.center)):(Pr.boundingSphere===null&&Pr.computeBoundingSphere(),pr.copy(Pr.boundingSphere.center)),pr.applyMatrix4(Rt.matrixWorld).applyMatrix4(ki)),Array.isArray(Gr)){let hs=Pr.groups;for(let Fs=0,Ms=hs.length;Fs0&&iv(Ze,Hi,ve,Je),tn&&ie.viewport(Lt.copy(tn)),Ze.length>0&&U0(Ze,ve,Je),Hi.length>0&&U0(Hi,ve,Je),Pr.length>0&&U0(Pr,ve,Je),ie.buffers.depth.setTest(!0),ie.buffers.depth.setMask(!0),ie.buffers.color.setMask(!0),ie.setPolygonOffset(!1)}function iv(Rt,ve,Je,tn){if((Je.isScene===!0?Je.overrideMaterial:null)!==null)return;let Hi=Nt.isWebGL2;Yi===null&&(Yi=new t3(1,1,{generateMipmaps:!0,type:kt.has("EXT_color_buffer_half_float")?yU:lS,minFilter:_U,samples:Hi?4:0})),ft.getDrawingBufferSize(lr),Hi?Yi.setSize(lr.x,lr.y):Yi.setSize(Dyt(lr.x),Dyt(lr.y));let Pr=ft.getRenderTarget();ft.setRenderTarget(Yi),ft.getClearColor(Fn),ne=ft.getClearAlpha(),ne<1&&ft.setClearColor(16777215,.5),ft.clear();let Gr=ft.toneMapping;ft.toneMapping=uS,U0(Rt,Je,tn),Tt.updateMultisampleRenderTarget(Yi),Tt.updateRenderTargetMipmap(Yi);let hs=!1;for(let Fs=0,Ms=ve.length;Fs0),bs=!!Je.morphAttributes.position,Tc=!!Je.morphAttributes.normal,rl=!!Je.morphAttributes.color,Ba=uS;tn.toneMapped&&(Pt===null||Pt.isXRRenderTarget===!0)&&(Ba=ft.toneMapping);let wh=Je.morphAttributes.position||Je.morphAttributes.normal||Je.morphAttributes.color,Nr=wh!==void 0?wh.length:0,mr=Pn.get(tn),a1=Q.state.lights;if(Pe===!0&&(ti===!0||Rt!==ot)){let _h=Rt===ot&&tn.id===se;vn.setState(tn,Rt,_h)}let dc=!1;tn.version===mr.__version?(mr.needsLights&&mr.lightsStateVersion!==a1.state.version||mr.outputColorSpace!==Gr||Ze.isBatchedMesh&&mr.batching===!1||!Ze.isBatchedMesh&&mr.batching===!0||Ze.isInstancedMesh&&mr.instancing===!1||!Ze.isInstancedMesh&&mr.instancing===!0||Ze.isSkinnedMesh&&mr.skinning===!1||!Ze.isSkinnedMesh&&mr.skinning===!0||Ze.isInstancedMesh&&mr.instancingColor===!0&&Ze.instanceColor===null||Ze.isInstancedMesh&&mr.instancingColor===!1&&Ze.instanceColor!==null||mr.envMap!==hs||tn.fog===!0&&mr.fog!==Hi||mr.numClippingPlanes!==void 0&&(mr.numClippingPlanes!==vn.numPlanes||mr.numIntersection!==vn.numIntersection)||mr.vertexAlphas!==Fs||mr.vertexTangents!==Ms||mr.morphTargets!==bs||mr.morphNormals!==Tc||mr.morphColors!==rl||mr.toneMapping!==Ba||Nt.isWebGL2===!0&&mr.morphTargetsCount!==Nr)&&(dc=!0):(dc=!0,mr.__version=tn.version);let vh=mr.currentProgram;dc===!0&&(vh=z0(tn,ve,Ze));let _g=!1,ws=!1,$c=!1,_a=vh.getUniforms(),ff=mr.uniforms;if(ie.useProgram(vh.program)&&(_g=!0,ws=!0,$c=!0),tn.id!==se&&(se=tn.id,ws=!0),_g||ot!==Rt){_a.setValue(it,"projectionMatrix",Rt.projectionMatrix),_a.setValue(it,"viewMatrix",Rt.matrixWorldInverse);let _h=_a.map.cameraPosition;_h!==void 0&&_h.setValue(it,pr.setFromMatrixPosition(Rt.matrixWorld)),Nt.logarithmicDepthBuffer&&_a.setValue(it,"logDepthBufFC",2/(Math.log(Rt.far+1)/Math.LN2)),(tn.isMeshPhongMaterial||tn.isMeshToonMaterial||tn.isMeshLambertMaterial||tn.isMeshBasicMaterial||tn.isMeshStandardMaterial||tn.isShaderMaterial)&&_a.setValue(it,"isOrthographic",Rt.isOrthographicCamera===!0),ot!==Rt&&(ot=Rt,ws=!0,$c=!0)}if(Ze.isSkinnedMesh){_a.setOptional(it,Ze,"bindMatrix"),_a.setOptional(it,Ze,"bindMatrixInverse");let _h=Ze.skeleton;_h&&(Nt.floatVertexTextures?(_h.boneTexture===null&&_h.computeBoneTexture(),_a.setValue(it,"boneTexture",_h.boneTexture,Tt)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}Ze.isBatchedMesh&&(_a.setOptional(it,Ze,"batchingTexture"),_a.setValue(it,"batchingTexture",Ze._matricesTexture,Tt));let Bl=Je.morphAttributes;if((Bl.position!==void 0||Bl.normal!==void 0||Bl.color!==void 0&&Nt.isWebGL2===!0)&&Sn.update(Ze,Je,vh),(ws||mr.receiveShadow!==Ze.receiveShadow)&&(mr.receiveShadow=Ze.receiveShadow,_a.setValue(it,"receiveShadow",Ze.receiveShadow)),tn.isMeshGouraudMaterial&&tn.envMap!==null&&(ff.envMap.value=hs,ff.flipEnvMap.value=hs.isCubeTexture&&hs.isRenderTargetTexture===!1?-1:1),ws&&(_a.setValue(it,"toneMappingExposure",ft.toneMappingExposure),mr.needsLights&&ov(ff,$c),Hi&&tn.fog===!0&&xi.refreshFogUniforms(ff,Hi),xi.refreshMaterialUniforms(ff,tn,hn,re,Yi),tR.upload(it,j0(mr),ff,Tt)),tn.isShaderMaterial&&tn.uniformsNeedUpdate===!0&&(tR.upload(it,j0(mr),ff,Tt),tn.uniformsNeedUpdate=!1),tn.isSpriteMaterial&&_a.setValue(it,"center",Ze.center),_a.setValue(it,"modelViewMatrix",Ze.modelViewMatrix),_a.setValue(it,"normalMatrix",Ze.normalMatrix),_a.setValue(it,"modelMatrix",Ze.matrixWorld),tn.isShaderMaterial||tn.isRawShaderMaterial){let _h=tn.uniformsGroups;for(let u1=0,Nd=_h.length;u10&&Tt.useMultisampledRTT(Rt)===!1?Ze=Pn.get(Rt).__webglMultisampledFramebuffer:Array.isArray(Ms)?Ze=Ms[Je]:Ze=Ms,Lt.copy(Rt.viewport),be.copy(Rt.scissor),ln=Rt.scissorTest}else Lt.copy(mn).multiplyScalar(hn).floor(),be.copy(en).multiplyScalar(hn).floor(),ln=Qn;if(ie.bindFramebuffer(it.FRAMEBUFFER,Ze)&&Nt.drawBuffers&&tn&&ie.drawBuffers(Rt,Ze),ie.viewport(Lt),ie.scissor(be),ie.setScissorTest(ln),Hi){let hs=Pn.get(Rt.texture);it.framebufferTexture2D(it.FRAMEBUFFER,it.COLOR_ATTACHMENT0,it.TEXTURE_CUBE_MAP_POSITIVE_X+ve,hs.__webglTexture,Je)}else if(Pr){let hs=Pn.get(Rt.texture),Fs=ve||0;it.framebufferTextureLayer(it.FRAMEBUFFER,it.COLOR_ATTACHMENT0,hs.__webglTexture,Je||0,Fs)}se=-1},this.readRenderTargetPixels=function(Rt,ve,Je,tn,Ze,Hi,Pr){if(!(Rt&&Rt.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Gr=Pn.get(Rt).__webglFramebuffer;if(Rt.isWebGLCubeRenderTarget&&Pr!==void 0&&(Gr=Gr[Pr]),Gr){ie.bindFramebuffer(it.FRAMEBUFFER,Gr);try{let hs=Rt.texture,Fs=hs.format,Ms=hs.type;if(Fs!==Yw&&dn.convert(Fs)!==it.getParameter(it.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}let bs=Ms===yU&&(kt.has("EXT_color_buffer_half_float")||Nt.isWebGL2&&kt.has("EXT_color_buffer_float"));if(Ms!==lS&&dn.convert(Ms)!==it.getParameter(it.IMPLEMENTATION_COLOR_READ_TYPE)&&!(Ms===oS&&(Nt.isWebGL2||kt.has("OES_texture_float")||kt.has("WEBGL_color_buffer_float")))&&!bs){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}ve>=0&&ve<=Rt.width-tn&&Je>=0&&Je<=Rt.height-Ze&&it.readPixels(ve,Je,tn,Ze,dn.convert(Fs),dn.convert(Ms),Hi)}finally{let hs=Pt!==null?Pn.get(Pt).__webglFramebuffer:null;ie.bindFramebuffer(it.FRAMEBUFFER,hs)}}},this.copyFramebufferToTexture=function(Rt,ve,Je=0){let tn=Math.pow(2,-Je),Ze=Math.floor(ve.image.width*tn),Hi=Math.floor(ve.image.height*tn);Tt.setTexture2D(ve,0),it.copyTexSubImage2D(it.TEXTURE_2D,Je,0,0,Rt.x,Rt.y,Ze,Hi),ie.unbindTexture()},this.copyTextureToTexture=function(Rt,ve,Je,tn=0){let Ze=ve.image.width,Hi=ve.image.height,Pr=dn.convert(Je.format),Gr=dn.convert(Je.type);Tt.setTexture2D(Je,0),it.pixelStorei(it.UNPACK_FLIP_Y_WEBGL,Je.flipY),it.pixelStorei(it.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Je.premultiplyAlpha),it.pixelStorei(it.UNPACK_ALIGNMENT,Je.unpackAlignment),ve.isDataTexture?it.texSubImage2D(it.TEXTURE_2D,tn,Rt.x,Rt.y,Ze,Hi,Pr,Gr,ve.image.data):ve.isCompressedTexture?it.compressedTexSubImage2D(it.TEXTURE_2D,tn,Rt.x,Rt.y,ve.mipmaps[0].width,ve.mipmaps[0].height,Pr,ve.mipmaps[0].data):it.texSubImage2D(it.TEXTURE_2D,tn,Rt.x,Rt.y,Pr,Gr,ve.image),tn===0&&Je.generateMipmaps&&it.generateMipmap(it.TEXTURE_2D),ie.unbindTexture()},this.copyTextureToTexture3D=function(Rt,ve,Je,tn,Ze=0){if(ft.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}let Hi=Rt.max.x-Rt.min.x+1,Pr=Rt.max.y-Rt.min.y+1,Gr=Rt.max.z-Rt.min.z+1,hs=dn.convert(tn.format),Fs=dn.convert(tn.type),Ms;if(tn.isData3DTexture)Tt.setTexture3D(tn,0),Ms=it.TEXTURE_3D;else if(tn.isDataArrayTexture||tn.isCompressedArrayTexture)Tt.setTexture2DArray(tn,0),Ms=it.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}it.pixelStorei(it.UNPACK_FLIP_Y_WEBGL,tn.flipY),it.pixelStorei(it.UNPACK_PREMULTIPLY_ALPHA_WEBGL,tn.premultiplyAlpha),it.pixelStorei(it.UNPACK_ALIGNMENT,tn.unpackAlignment);let bs=it.getParameter(it.UNPACK_ROW_LENGTH),Tc=it.getParameter(it.UNPACK_IMAGE_HEIGHT),rl=it.getParameter(it.UNPACK_SKIP_PIXELS),Ba=it.getParameter(it.UNPACK_SKIP_ROWS),wh=it.getParameter(it.UNPACK_SKIP_IMAGES),Nr=Je.isCompressedTexture?Je.mipmaps[Ze]:Je.image;it.pixelStorei(it.UNPACK_ROW_LENGTH,Nr.width),it.pixelStorei(it.UNPACK_IMAGE_HEIGHT,Nr.height),it.pixelStorei(it.UNPACK_SKIP_PIXELS,Rt.min.x),it.pixelStorei(it.UNPACK_SKIP_ROWS,Rt.min.y),it.pixelStorei(it.UNPACK_SKIP_IMAGES,Rt.min.z),Je.isDataTexture||Je.isData3DTexture?it.texSubImage3D(Ms,Ze,ve.x,ve.y,ve.z,Hi,Pr,Gr,hs,Fs,Nr.data):Je.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),it.compressedTexSubImage3D(Ms,Ze,ve.x,ve.y,ve.z,Hi,Pr,Gr,hs,Nr.data)):it.texSubImage3D(Ms,Ze,ve.x,ve.y,ve.z,Hi,Pr,Gr,hs,Fs,Nr),it.pixelStorei(it.UNPACK_ROW_LENGTH,bs),it.pixelStorei(it.UNPACK_IMAGE_HEIGHT,Tc),it.pixelStorei(it.UNPACK_SKIP_PIXELS,rl),it.pixelStorei(it.UNPACK_SKIP_ROWS,Ba),it.pixelStorei(it.UNPACK_SKIP_IMAGES,wh),Ze===0&&tn.generateMipmaps&&it.generateMipmap(Ms),ie.unbindTexture()},this.initTexture=function(Rt){Rt.isCubeTexture?Tt.setTextureCube(Rt,0):Rt.isData3DTexture?Tt.setTexture3D(Rt,0):Rt.isDataArrayTexture||Rt.isCompressedArrayTexture?Tt.setTexture2DArray(Rt,0):Tt.setTexture2D(Rt,0),ie.unbindTexture()},this.resetState=function(){Bt=0,Ot=0,Pt=null,ie.reset(),jn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Jx}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(s){this._outputColorSpace=s;let h=this.getContext();h.drawingBufferColorSpace=s===p2t?"display-p3":"srgb",h.unpackColorSpace=Na.workingColorSpace===Fet?"display-p3":"srgb"}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===Pd?ZA:hKt}set outputEncoding(s){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=s===ZA?Pd:Qx}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(s){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=s}},Yyt=class extends SU{};Yyt.prototype.isWebGL1Renderer=!0;var Cet=class extends o1{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(s,h){return super.copy(s,h),s.background!==null&&(this.background=s.background.clone()),s.environment!==null&&(this.environment=s.environment.clone()),s.fog!==null&&(this.fog=s.fog.clone()),this.backgroundBlurriness=s.backgroundBlurriness,this.backgroundIntensity=s.backgroundIntensity,s.overrideMaterial!==null&&(this.overrideMaterial=s.overrideMaterial.clone()),this.matrixAutoUpdate=s.matrixAutoUpdate,this}toJSON(s){let h=super.toJSON(s);return this.fog!==null&&(h.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(h.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(h.object.backgroundIntensity=this.backgroundIntensity),h}};var Aet=class extends D0{constructor(s,h,p,m=1){super(s,h,p),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=m}copy(s){return super.copy(s),this.meshPerAttribute=s.meshPerAttribute,this}toJSON(){let s=super.toJSON();return s.meshPerAttribute=this.meshPerAttribute,s.isInstancedBufferAttribute=!0,s}},ZI=new Fu,VYt=new Fu,Qtt=[],qYt=new e3,AAe=new Fu,mU=new gg,bU=new dS,ket=class extends gg{constructor(s,h,p){super(s,h),this.isInstancedMesh=!0,this.instanceMatrix=new Aet(new Float32Array(p*16),16),this.instanceColor=null,this.count=p,this.boundingBox=null,this.boundingSphere=null;for(let m=0;mI)continue;U.applyMatrix4(this.matrixWorld);let se=s.ray.origin.distanceTo(U);ses.far||h.push({distance:se,point:P.clone().applyMatrix4(this.matrixWorld),index:ft,face:null,faceIndex:null,object:this})}}else{let X=Math.max(0,E.start),gt=Math.min(Q.count,E.start+E.count);for(let ft=X,xt=gt-1;ftI)continue;U.applyMatrix4(this.matrixWorld);let Ot=s.ray.origin.distanceTo(U);Ots.far||h.push({distance:Ot,point:P.clone().applyMatrix4(this.matrixWorld),index:ft,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){let h=this.geometry.morphAttributes,p=Object.keys(h);if(p.length>0){let m=h[p[0]];if(m!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let _=0,E=m.length;_=_)){let y=h[1];s=_)break e}E=p,p=0;break n}break t}for(;p>>1;sh;)--E;if(++E,_!==0||E!==m){_>=E&&(E=Math.max(E,1),_=E-1);let y=this.getValueSize();this.times=p.slice(_,E),this.values=this.values.slice(_*y,E*y)}return this}validate(){let s=!0,h=this.getValueSize();h-Math.floor(h)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),s=!1);let p=this.times,m=this.values,_=p.length;_===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),s=!1);let E=null;for(let y=0;y!==_;y++){let I=p[y];if(typeof I=="number"&&isNaN(I)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,y,I),s=!1;break}if(E!==null&&E>I){console.error("THREE.KeyframeTrack: Out of order keys.",this,y,I,E),s=!1;break}E=I}if(m!==void 0&&kAe(m))for(let y=0,I=m.length;y!==I;++y){let O=m[y];if(isNaN(O)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,y,O),s=!1;break}}return s}optimize(){let s=this.times.slice(),h=this.values.slice(),p=this.getValueSize(),m=this.getInterpolation()===Q_t,_=s.length-1,E=1;for(let y=1;y<_;++y){let I=!1,O=s[y],B=s[y+1];if(O!==B&&(y!==1||O!==s[0]))if(m)I=!0;else{let P=y*p,U=P-p,W=P+p;for(let q=0;q!==p;++q){let et=h[P+q];if(et!==h[U+q]||et!==h[W+q]){I=!0;break}}}if(I){if(y!==E){s[E]=s[y];let P=y*p,U=E*p;for(let W=0;W!==p;++W)h[U+W]=h[P+W]}++E}}if(_>0){s[E]=s[_];for(let y=_*p,I=E*p,O=0;O!==p;++O)h[I+O]=h[y+O];++E}return E!==s.length?(this.times=s.slice(0,E),this.values=h.slice(0,E*p)):(this.times=s,this.values=h),this}clone(){let s=this.times.slice(),h=this.values.slice(),p=this.constructor,m=new p(this.name,s,h);return m.createInterpolant=this.createInterpolant,m}};Jw.prototype.TimeBufferType=Float32Array;Jw.prototype.ValueBufferType=Float32Array;Jw.prototype.DefaultInterpolation=aet;var KA=class extends Jw{};KA.prototype.ValueTypeName="bool";KA.prototype.ValueBufferType=Array;KA.prototype.DefaultInterpolation=cet;KA.prototype.InterpolantFactoryMethodLinear=void 0;KA.prototype.InterpolantFactoryMethodSmooth=void 0;var e2t=class extends Jw{};e2t.prototype.ValueTypeName="color";var n2t=class extends Jw{};n2t.prototype.ValueTypeName="number";var i2t=class extends cR{constructor(s,h,p,m){super(s,h,p,m)}interpolate_(s,h,p,m){let _=this.resultBuffer,E=this.sampleValues,y=this.valueSize,I=(p-h)/(m-h),O=s*y;for(let B=O+y;O!==B;O+=4)xy.slerpFlat(_,0,E,O-y,E,O,I);return _}},CU=class extends Jw{InterpolantFactoryMethodLinear(s){return new i2t(this.times,this.values,this.getValueSize(),s)}};CU.prototype.ValueTypeName="quaternion";CU.prototype.DefaultInterpolation=aet;CU.prototype.InterpolantFactoryMethodSmooth=void 0;var JA=class extends Jw{};JA.prototype.ValueTypeName="string";JA.prototype.ValueBufferType=Array;JA.prototype.DefaultInterpolation=cet;JA.prototype.InterpolantFactoryMethodLinear=void 0;JA.prototype.InterpolantFactoryMethodSmooth=void 0;var r2t=class extends Jw{};r2t.prototype.ValueTypeName="vector";var s2t=class{constructor(s,h,p){let m=this,_=!1,E=0,y=0,I,O=[];this.onStart=void 0,this.onLoad=s,this.onProgress=h,this.onError=p,this.itemStart=function(B){y++,_===!1&&m.onStart!==void 0&&m.onStart(B,E,y),_=!0},this.itemEnd=function(B){E++,m.onProgress!==void 0&&m.onProgress(B,E,y),E===y&&(_=!1,m.onLoad!==void 0&&m.onLoad())},this.itemError=function(B){m.onError!==void 0&&m.onError(B)},this.resolveURL=function(B){return I?I(B):B},this.setURLModifier=function(B){return I=B,this},this.addHandler=function(B,P){return O.push(B,P),this},this.removeHandler=function(B){let P=O.indexOf(B);return P!==-1&&O.splice(P,2),this},this.getHandler=function(B){for(let P=0,U=O.length;Pandnandornorxorxnornotbufdffinputconstantoutputhi:lohi:lohi:lohi:logenericout0out1in0in1aoi21aoi22aoi211aoi221aoi222aoi33oai21oai22oai211oai221oai222oai33and3nand3or3nor3and4nand4or4nor4`;window.netlistsvg=zAe;window.openroadSkin=_Kt;window.THREE=b2t;var zet=globalThis,jet=zet.ShadowRoot&&(zet.ShadyCSS===void 0||zet.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,w2t=Symbol(),yKt=new WeakMap,PU=class{constructor(s,h,p){if(this._$cssResult$=!0,p!==w2t)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=s,this.t=h}get styleSheet(){let s=this.o,h=this.t;if(jet&&s===void 0){let p=h!==void 0&&h.length===1;p&&(s=yKt.get(h)),s===void 0&&((this.o=s=new CSSStyleSheet).replaceSync(this.cssText),p&&yKt.set(h,s))}return s}toString(){return this.cssText}},xKt=d=>new PU(typeof d=="string"?d:d+"",void 0,w2t),IU=(d,...s)=>{let h=d.length===1?d[0]:s.reduce((p,m,_)=>p+(E=>{if(E._$cssResult$===!0)return E.cssText;if(typeof E=="number")return E;throw Error("Value passed to 'css' function must be a 'css' function result: "+E+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(m)+d[_+1],d[0]);return new PU(h,d,w2t)},MKt=(d,s)=>{if(jet)d.adoptedStyleSheets=s.map(h=>h instanceof CSSStyleSheet?h:h.styleSheet);else for(let h of s){let p=document.createElement("style"),m=zet.litNonce;m!==void 0&&p.setAttribute("nonce",m),p.textContent=h.cssText,d.appendChild(p)}},v2t=jet?d=>d:d=>d instanceof CSSStyleSheet?(s=>{let h="";for(let p of s.cssRules)h+=p.cssText;return xKt(h)})(d):d;var{is:jAe,defineProperty:HAe,getOwnPropertyDescriptor:GAe,getOwnPropertyNames:WAe,getOwnPropertySymbols:$Ae,getPrototypeOf:VAe}=Object,Het=globalThis,EKt=Het.trustedTypes,qAe=EKt?EKt.emptyScript:"",XAe=Het.reactiveElementPolyfillSupport,RU=(d,s)=>d,_2t={toAttribute(d,s){switch(s){case Boolean:d=d?qAe:null;break;case Object:case Array:d=d==null?d:JSON.stringify(d)}return d},fromAttribute(d,s){let h=d;switch(s){case Boolean:h=d!==null;break;case Number:h=d===null?null:Number(d);break;case Object:case Array:try{h=JSON.parse(d)}catch{h=null}}return h}},TKt=(d,s)=>!jAe(d,s),SKt={attribute:!0,type:String,converter:_2t,reflect:!1,useDefault:!1,hasChanged:TKt};Symbol.metadata??=Symbol("metadata"),Het.litPropertyMetadata??=new WeakMap;var r3=class extends HTMLElement{static addInitializer(s){this._$Ei(),(this.l??=[]).push(s)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(s,h=SKt){if(h.state&&(h.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(s)&&((h=Object.create(h)).wrapped=!0),this.elementProperties.set(s,h),!h.noAccessor){let p=Symbol(),m=this.getPropertyDescriptor(s,p,h);m!==void 0&&HAe(this.prototype,s,m)}}static getPropertyDescriptor(s,h,p){let{get:m,set:_}=GAe(this.prototype,s)??{get(){return this[h]},set(E){this[h]=E}};return{get:m,set(E){let y=m?.call(this);_?.call(this,E),this.requestUpdate(s,y,p)},configurable:!0,enumerable:!0}}static getPropertyOptions(s){return this.elementProperties.get(s)??SKt}static _$Ei(){if(this.hasOwnProperty(RU("elementProperties")))return;let s=VAe(this);s.finalize(),s.l!==void 0&&(this.l=[...s.l]),this.elementProperties=new Map(s.elementProperties)}static finalize(){if(this.hasOwnProperty(RU("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(RU("properties"))){let h=this.properties,p=[...WAe(h),...$Ae(h)];for(let m of p)this.createProperty(m,h[m])}let s=this[Symbol.metadata];if(s!==null){let h=litPropertyMetadata.get(s);if(h!==void 0)for(let[p,m]of h)this.elementProperties.set(p,m)}this._$Eh=new Map;for(let[h,p]of this.elementProperties){let m=this._$Eu(h,p);m!==void 0&&this._$Eh.set(m,h)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){let h=[];if(Array.isArray(s)){let p=new Set(s.flat(1/0).reverse());for(let m of p)h.unshift(v2t(m))}else s!==void 0&&h.push(v2t(s));return h}static _$Eu(s,h){let p=h.attribute;return p===!1?void 0:typeof p=="string"?p:typeof s=="string"?s.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(s=>this.enableUpdating=s),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(s=>s(this))}addController(s){(this._$EO??=new Set).add(s),this.renderRoot!==void 0&&this.isConnected&&s.hostConnected?.()}removeController(s){this._$EO?.delete(s)}_$E_(){let s=new Map,h=this.constructor.elementProperties;for(let p of h.keys())this.hasOwnProperty(p)&&(s.set(p,this[p]),delete this[p]);s.size>0&&(this._$Ep=s)}createRenderRoot(){let s=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return MKt(s,this.constructor.elementStyles),s}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(s=>s.hostConnected?.())}enableUpdating(s){}disconnectedCallback(){this._$EO?.forEach(s=>s.hostDisconnected?.())}attributeChangedCallback(s,h,p){this._$AK(s,p)}_$ET(s,h){let p=this.constructor.elementProperties.get(s),m=this.constructor._$Eu(s,p);if(m!==void 0&&p.reflect===!0){let _=(p.converter?.toAttribute!==void 0?p.converter:_2t).toAttribute(h,p.type);this._$Em=s,_==null?this.removeAttribute(m):this.setAttribute(m,_),this._$Em=null}}_$AK(s,h){let p=this.constructor,m=p._$Eh.get(s);if(m!==void 0&&this._$Em!==m){let _=p.getPropertyOptions(m),E=typeof _.converter=="function"?{fromAttribute:_.converter}:_.converter?.fromAttribute!==void 0?_.converter:_2t;this._$Em=m;let y=E.fromAttribute(h,_.type);this[m]=y??this._$Ej?.get(m)??y,this._$Em=null}}requestUpdate(s,h,p,m=!1,_){if(s!==void 0){let E=this.constructor;if(m===!1&&(_=this[s]),p??=E.getPropertyOptions(s),!((p.hasChanged??TKt)(_,h)||p.useDefault&&p.reflect&&_===this._$Ej?.get(s)&&!this.hasAttribute(E._$Eu(s,p))))return;this.C(s,h,p)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(s,h,{useDefault:p,reflect:m,wrapped:_},E){p&&!(this._$Ej??=new Map).has(s)&&(this._$Ej.set(s,E??h??this[s]),_!==!0||E!==void 0)||(this._$AL.has(s)||(this.hasUpdated||p||(h=void 0),this._$AL.set(s,h)),m===!0&&this._$Em!==s&&(this._$Eq??=new Set).add(s))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(h){Promise.reject(h)}let s=this.scheduleUpdate();return s!=null&&await s,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[m,_]of this._$Ep)this[m]=_;this._$Ep=void 0}let p=this.constructor.elementProperties;if(p.size>0)for(let[m,_]of p){let{wrapped:E}=_,y=this[m];E!==!0||this._$AL.has(m)||y===void 0||this.C(m,void 0,_,y)}}let s=!1,h=this._$AL;try{s=this.shouldUpdate(h),s?(this.willUpdate(h),this._$EO?.forEach(p=>p.hostUpdate?.()),this.update(h)):this._$EM()}catch(p){throw s=!1,this._$EM(),p}s&&this._$AE(h)}willUpdate(s){}_$AE(s){this._$EO?.forEach(h=>h.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(s)),this.updated(s)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(s){return!0}update(s){this._$Eq&&=this._$Eq.forEach(h=>this._$ET(h,this[h])),this._$EM()}updated(s){}firstUpdated(s){}};r3.elementStyles=[],r3.shadowRootOptions={mode:"open"},r3[RU("elementProperties")]=new Map,r3[RU("finalized")]=new Map,XAe?.({ReactiveElement:r3}),(Het.reactiveElementVersions??=[]).push("2.1.2");var x2t=globalThis,CKt=d=>d,Get=x2t.trustedTypes,AKt=Get?Get.createPolicy("lit-html",{createHTML:d=>d}):void 0,M2t="$lit$",s3=`lit$${Math.random().toFixed(9).slice(2)}$`,E2t="?"+s3,ZAe=`<${E2t}>`,nk=document,NU=()=>nk.createComment(""),OU=d=>d===null||typeof d!="object"&&typeof d!="function",S2t=Array.isArray,DKt=d=>S2t(d)||typeof d?.[Symbol.iterator]=="function",y2t=`[ -\f\r]`,DU=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,kKt=/-->/g,LKt=/>/g,tk=RegExp(`>|${y2t}(?:([^\\s"'>=/]+)(${y2t}*=${y2t}*(?:[^ -\f\r"'\`<>=]|("|')|))|$)`,"g"),PKt=/'/g,IKt=/"/g,NKt=/^(?:script|style|textarea|title)$/i,T2t=d=>(s,...h)=>({_$litType$:d,strings:s,values:h}),Sy=T2t(1),c1=T2t(2),OJe=T2t(3),Qw=Symbol.for("lit-noChange"),_u=Symbol.for("lit-nothing"),RKt=new WeakMap,ek=nk.createTreeWalker(nk,129);function OKt(d,s){if(!S2t(d)||!d.hasOwnProperty("raw"))throw Error("invalid template strings array");return AKt!==void 0?AKt.createHTML(s):s}var BKt=(d,s)=>{let h=d.length-1,p=[],m,_=s===2?"":s===3?"":"",E=DU;for(let y=0;y"?(E=m??DU,P=-1):B[1]===void 0?P=-2:(P=E.lastIndex-B[2].length,N=B[1],E=B[3]===void 0?tk:B[3]==='"'?IKt:PKt):E===IKt||E===PKt?E=tk:E===kKt||E===LKt?E=DU:(E=tk,m=void 0);let j=E===tk&&d[y+1].startsWith("/>")?" ":"";_+=E===DU?I+ZAe:P>=0?(p.push(N),I.slice(0,P)+M2t+I.slice(P)+s3+j):I+s3+(P===-2?y:j)}return[OKt(d,_+(d[h]||"")+(s===2?"":s===3?"":"")),p]},BU=class d{constructor({strings:s,_$litType$:h},p){let m;this.parts=[];let _=0,E=0,y=s.length-1,I=this.parts,[N,B]=BKt(s,h);if(this.el=d.createElement(N,p),ek.currentNode=this.el.content,h===2||h===3){let P=this.el.content.firstChild;P.replaceWith(...P.childNodes)}for(;(m=ek.nextNode())!==null&&I.length0){m.textContent=Get?Get.emptyScript:"";for(let j=0;j2||p[0]!==""||p[1]!==""?(this._$AH=Array(p.length-1).fill(new String),this.strings=p):this._$AH=_u}_$AI(s,h=this,p,m){let _=this.strings,E=!1;if(_===void 0)s=ik(this,s,h,0),E=!OU(s)||s!==this._$AH&&s!==Qw,E&&(this._$AH=s);else{let y=s,I,N;for(s=_[0],I=0;I<_.length-1;I++)N=ik(this,y[p+I],h,I),N===Qw&&(N=this._$AH[I]),E||=!OU(N)||N!==this._$AH[I],N===_u?s=_u:s!==_u&&(s+=(N??"")+_[I+1]),this._$AH[I]=N}E&&!m&&this.j(s)}j(s){s===_u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,s??"")}},$et=class extends rk{constructor(){super(...arguments),this.type=3}j(s){this.element[this.name]=s===_u?void 0:s}},Vet=class extends rk{constructor(){super(...arguments),this.type=4}j(s){this.element.toggleAttribute(this.name,!!s&&s!==_u)}},qet=class extends rk{constructor(s,h,p,m,_){super(s,h,p,m,_),this.type=5}_$AI(s,h=this){if((s=ik(this,s,h,0)??_u)===Qw)return;let p=this._$AH,m=s===_u&&p!==_u||s.capture!==p.capture||s.once!==p.once||s.passive!==p.passive,_=s!==_u&&(p===_u||m);m&&this.element.removeEventListener(this.name,this,p),_&&this.element.addEventListener(this.name,this,s),this._$AH=s}handleEvent(s){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,s):this._$AH.handleEvent(s)}},Xet=class{constructor(s,h,p){this.element=s,this.type=6,this._$AN=void 0,this._$AM=h,this.options=p}get _$AU(){return this._$AM._$AU}_$AI(s){ik(this,s)}},FKt={M:M2t,P:s3,A:E2t,C:1,L:BKt,R:Wet,D:DKt,V:ik,I:lR,H:rk,N:Vet,U:qet,B:$et,F:Xet},YAe=x2t.litHtmlPolyfillSupport;YAe?.(BU,lR),(x2t.litHtmlVersions??=[]).push("3.3.3");var UKt=(d,s,h)=>{let p=h?.renderBefore??s,m=p._$litPart$;if(m===void 0){let _=h?.renderBefore??null;p._$litPart$=m=new lR(s.insertBefore(NU(),_),_,void 0,h??{})}return m._$AI(d),m};var C2t=globalThis,Ty=class extends r3{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let s=super.createRenderRoot();return this.renderOptions.renderBefore??=s.firstChild,s}update(s){let h=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(s),this._$Do=UKt(h,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Qw}};Ty._$litElement$=!0,Ty.finalized=!0,C2t.litElementHydrateSupport?.({LitElement:Ty});var KAe=C2t.litElementPolyfillSupport;KAe?.({LitElement:Ty});(C2t.litElementVersions??=[]).push("4.2.2");function A2t(d,s,h){return d?s(d):h?.(d)}var k2t=d=>d??_u;var Zet={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Yet=d=>(...s)=>({_$litDirective$:d,values:s}),hR=class{constructor(s){}get _$AU(){return this._$AM._$AU}_$AT(s,h,p){this._$Ct=s,this._$AM=h,this._$Ci=p}_$AS(s,h){return this.update(s,h)}update(s,h){return this.render(...h)}};var Ket=Yet(class extends hR{constructor(d){if(super(d),d.type!==Zet.ATTRIBUTE||d.name!=="class"||d.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(d){return" "+Object.keys(d).filter(s=>d[s]).join(" ")+" "}update(d,[s]){if(this.st===void 0){this.st=new Set,d.strings!==void 0&&(this.nt=new Set(d.strings.join(" ").split(/\s/).filter(p=>p!=="")));for(let p in s)s[p]&&!this.nt?.has(p)&&this.st.add(p);return this.render(s)}let h=d.element.classList;for(let p of this.st)p in s||(h.remove(p),this.st.delete(p));for(let p in s){let m=!!s[p];m===this.st.has(p)||this.nt?.has(p)||(m?(h.add(p),this.st.add(p)):(h.remove(p),this.st.delete(p)))}return Qw}});var{I:JAe}=FKt,zKt=d=>d;var jKt=()=>document.createComment(""),fR=(d,s,h)=>{let p=d._$AA.parentNode,m=s===void 0?d._$AB:s._$AA;if(h===void 0){let _=p.insertBefore(jKt(),m),E=p.insertBefore(jKt(),m);h=new JAe(_,E,d,d.options)}else{let _=h._$AB.nextSibling,E=h._$AM,y=E!==d;if(y){let I;h._$AQ?.(d),h._$AM=d,h._$AP!==void 0&&(I=d._$AU)!==E._$AU&&h._$AP(I)}if(_!==m||y){let I=h._$AA;for(;I!==_;){let N=zKt(I).nextSibling;zKt(p).insertBefore(I,m),I=N}}}return h},gS=(d,s,h=d)=>(d._$AI(s,h),d),QAe={},HKt=(d,s=QAe)=>d._$AH=s,GKt=d=>d._$AH,Jet=d=>{d._$AR(),d._$AA.remove()};var WKt=(d,s,h)=>{let p=new Map;for(let m=s;m<=h;m++)p.set(d[m],m);return p},$Kt=Yet(class extends hR{constructor(d){if(super(d),d.type!==Zet.CHILD)throw Error("repeat() can only be used in text expressions")}dt(d,s,h){let p;h===void 0?h=s:s!==void 0&&(p=s);let m=[],_=[],E=0;for(let y of d)m[E]=p?p(y,E):E,_[E]=h(y,E),E++;return{values:_,keys:m}}render(d,s,h){return this.dt(d,s,h).values}update(d,[s,h,p]){let m=GKt(d),{values:_,keys:E}=this.dt(s,h,p);if(!Array.isArray(m))return this.ut=E,_;let y=this.ut??=[],I=[],N,B,P=0,U=m.length-1,j=0,V=_.length-1;for(;P<=U&&j<=V;)if(m[P]===null)P++;else if(m[U]===null)U--;else if(y[P]===E[j])I[j]=gS(m[P],_[j]),P++,j++;else if(y[U]===E[V])I[V]=gS(m[U],_[V]),U--,V--;else if(y[P]===E[V])I[V]=gS(m[P],_[V]),fR(d,I[V+1],m[P]),P++,V--;else if(y[U]===E[j])I[j]=gS(m[U],_[j]),fR(d,m[P],m[U]),U--,j++;else if(N===void 0&&(N=WKt(E,j,V),B=WKt(y,P,U)),N.has(y[P]))if(N.has(y[U])){let tt=B.get(E[j]),Q=tt!==void 0?m[tt]:null;if(Q===null){let X=fR(d,m[P]);gS(X,_[j]),I[j]=X}else I[j]=gS(Q,_[j]),fR(d,m[P],Q),m[tt]=null;j++}else Jet(m[U]),U--;else Jet(m[P]),P++;for(;j<=V;){let tt=fR(d,I[V+1]);gS(tt,_[j]),I[j++]=tt}for(;P<=U;){let tt=m[P++];tt!==null&&Jet(tt)}return this.ut=E,HKt(d,I),Qw}});function Id(d,s,h,p,m=0,_=0){return[(s-_-p)*h,(d-m)*h]}function Vf(d,s,h,p,m,_,E=0,y=0){return[[(s-y-_)*m,(d-E)*m],[(p-y-_)*m,(h-E)*m]]}function tv(d,s,h,p,m=0,_=0){return{dbuX:Math.round(m+s/h),dbuY:Math.round(_+p+d/h)}}function tke(d){return!Number.isFinite(d)||d<=1?1:Math.round(Math.min(d,3)*100)/100}var o3=240,eke=256,c3="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",L2t=o3;function ev(){return L2t}function VKt(){L2t=eke}var vQe=1/64,P2t=120;function qKt(d){L2t=d}function sk(d){let s={...d||{}};return s.tileSize===void 0&&(s.tileSize=ev()),s}function Qet(d,s){return Math.max(1,Math.round(d*s))}function dR(){let d=typeof window<"u"&&window.devicePixelRatio?window.devicePixelRatio:1;return!Number.isFinite(d)||d<=1?1:Math.min(d,3)}function pR(d,s=ev()){return{dpr:tke(d),tile_px:Qet(s,d)}}function tnt(d,s,h,p,m=ev()){let{visibility:_,selectability:E,visibleLayers:y,selectableLayers:I,app:N}=h,B={};for(let[U,j]of Object.entries(_||{}))B[U]=!!j;if(E)for(let[U,j]of Object.entries(E))B["s_"+U]=!!j;let P={type:"tile",layer:s,z:d.z,x:d.x,y:d.y,...pR(p,m),visible_layers:y?[...y]:[],selectable_layers:I?[...I]:[],...B};if(N&&N.visibleChiplets instanceof Set&&(P.visible_chiplets=[...N.visibleChiplets]),N&&N.layerPatterns){let U=N.layerPatterns[s];U!==void 0&&U!==1&&(P.pattern=U)}return P}function XKt(d){if(typeof window>"u"||typeof window.matchMedia!="function"||typeof d!="function")return()=>{};let s=!1,h=null,p=null,m=()=>{if(s)return;let _=window.devicePixelRatio||1;h=window.matchMedia(`(resolution: ${_}dppx)`),p=()=>{s||(m(),d(window.devicePixelRatio||1))},h.addEventListener("change",p,{once:!0})};return m(),()=>{s=!0,h&&p&&h.removeEventListener("change",p),h=null,p=null}}function gR(d,s){let h=d&&d._map?d._map.getZoom():s;return Math.floor(h)}function Sc(d){return!!d?.websocketManager?.isStaticMode}function JKt(d){let s=d?.protocol==="https:"?"wss":"ws",h=d?.host||"localhost:8080";return`${s}://${h}/ws`}function QKt(d,s){let h={};for(let[p,m]of Object.entries(d||{}))h[p]=!!m;for(let[p,m]of Object.entries(s||{}))h["s_"+p]=!!m;return h}function mR(d,s){s&&typeof s.sel_has_inst=="boolean"&&(d.selHasInst=s.sel_has_inst,d.selHasNet=!!s.sel_has_net)}var I2t=null;function nv(d,s=4e3){let h=document.getElementById("or-toast");return h||(h=document.createElement("div"),h.id="or-toast",document.body.appendChild(h)),h.textContent=d,h.classList.add("visible"),I2t&&clearTimeout(I2t),I2t=setTimeout(()=>h.classList.remove("visible"),s),h}function tJt({title:d,message:s,confirmLabel:h="OK",danger:p=!1}){return new Promise(m=>{let _=document.createElement("div");_.className="or-modal-overlay";let E=document.createElement("div");E.className="or-modal";let y=document.createElement("div");y.className="or-modal-title",y.textContent=d;let I=document.createElement("div");I.className="or-modal-message",I.textContent=s;let N=document.createElement("div");N.className="or-modal-buttons";let B=document.createElement("button");B.className="or-btn",B.textContent="Cancel";let P=document.createElement("button");P.className="or-btn"+(p?" or-btn-danger":""),P.textContent=h;let U=V=>{document.removeEventListener("keydown",j,!0),_.remove(),m(V)},j=V=>{V.key==="Escape"&&(V.stopPropagation(),U(!1))};B.addEventListener("click",()=>U(!1)),P.addEventListener("click",()=>U(!0)),_.addEventListener("click",V=>{V.target===_&&U(!1)}),document.addEventListener("keydown",j,!0),N.appendChild(B),N.appendChild(P),E.appendChild(y),E.appendChild(I),E.appendChild(N),_.appendChild(E),document.body.appendChild(_),B.focus()})}var nke=.05;function ike([[d,s],[h,p]],m){let _=(p-s)*m,E=(h-d)*m;return[[d-E,s-_],[h+E,p+_]]}function R2t(d,s=256,h=null){if(!ZKt(d))return null;let p=d[0][0],m=d[0][1],_=Math.max(d[1][1]-m,d[1][0]-p),E=s/_,y=ZKt(h)?h:d,[[I,N],[B,P]]=ike(y,nke);return{scale:E,maxDXDY:_,originX:m,originY:p,fitBounds:Vf(N,I,P,B,E,_,m,p)}}function ZKt(d){return!!d&&d[1][0]>d[0][0]&&d[1][1]>d[0][1]}function eJt(d,s){return!!d&&!!s&&d[0][0]===s[0][0]&&d[0][1]===s[0][1]&&d[1][0]===s[1][0]&&d[1][1]===s[1][1]}function wg(d){d.selectionToken=(d.selectionToken||0)+1;for(let s of d.selectionResetters||[])s();return d.selectionToken}function N0(d,s){return d.selectionToken===s}function nJt(d,s){d.selectionResetters||(d.selectionResetters=[]),d.selectionResetters.push(s)}function iJt(d=typeof L<"u"?L.CRS.Simple:void 0,s={}){return{crs:d,zoom:1,zoomSnap:1,zoomDelta:1,fadeAnimation:!1,attributionControl:!1,scrollWheelZoom:s.wheelZoom!==!1,keyboardPanDelta:bR(s.arrowStep)}}var D2t=80,FU=10,UU=1e3;function bR(d){let s=d===""||d===null?NaN:Math.round(Number(d));return Number.isFinite(s)?Math.min(UU,Math.max(FU,s)):D2t}function rJt(d,s){d?.keyboard?._setPanDelta?.(s)}function ok(d="vis-group-header"){let s=document.createElement("div");s.className=d;let h=document.createElement("span");h.className="vis-arrow",s.appendChild(h);let p=document.createElement("span");return p.className="vis-name",s.appendChild(p),{header:s,arrow:h,name:p}}function ck(d,s,h,p){let m=_=>{h.classList.toggle("collapsed",_),s.textContent=_?"\u25B6":"\u25BC"};m(!!p),d.addEventListener("click",_=>{let E=_.target&&_.target.parentNode===d&&_.target.classList&&_.target.classList.contains("vis-name");_.target!==d&&_.target!==s&&!E||m(!h.classList.contains("collapsed"))})}var YKt=30;function sJt(d,s=8){if(!Number.isFinite(d)||d<=0)return YKt;let h=Math.ceil(Math.log2(s/d));return Math.max(1,Math.min(YKt,h))}function oJt({designBounds:d,fitRect:s,viewW:h,viewH:p}){let m=R2t(d,o3,s),_=j=>Number.isFinite(j)&&j>0;if(!m||!_(h)||!_(p))return o3;let E=m.fitBounds[1][1]-m.fitBounds[0][1],y=m.fitBounds[1][0]-m.fitBounds[0][0],I=Math.min(h/E,p/y),N=Math.log2(I);if(!Number.isFinite(N)||N<0)return o3;let B=Math.floor(N),P=o3*2**(N-B),U=Math.floor(P/P2t)*P2t;return U>o3&&Math.log2(o3*I/U)>=B?U:o3}function cJt(d,{showDbu:s,dbuPerMicron:h},p=!1){if(s)return String(Math.round(d));let m=h>0?h:1e3,_=Math.ceil(Math.log10(m)),E=(d/m).toFixed(_);return p?E+" \xB5m":E}function aJt(d,{showDbu:s,dbuPerMicron:h}){let p=parseFloat(d);if(!Number.isFinite(p))return null;if(s)return Math.round(p);let m=h>0?h:1e3;return Math.round(p*m)}function uJt(d,{showDbu:s,dbuPerMicron:h}){if(s)return String(Math.round(d));let p=h>0?h:1e3,m=d/p;return m>=1e3?(m/1e3).toFixed(3)+" mm":m>=1?m.toFixed(3)+" um":(m*1e3).toFixed(1)+" nm"}function lJt({showDbu:d}){return d?"DBU":"\xB5m"}function wR(d){return typeof d=="string"&&/^#[0-9a-fA-F]{6}$/.test(d)}function hJt(d){if(typeof d!="string")return null;let s=d.trim();if(wR(s))return s.toLowerCase();let h=s.match(/^#([0-9a-fA-F]{3})$/);if(h)return"#"+h[1].split("").map(m=>m+m).join("").toLowerCase();let p=s.match(/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/);if(p){let m=p.slice(1).map(Number);return m.some(_=>_>255)?null:"#"+m.map(_=>_.toString(16).padStart(2,"0")).join("")}return null}function zU(d){let s=null;return()=>{s===null&&(s=requestAnimationFrame(()=>{s=null,d()}))}}function KKt(d){let s=Math.pow(10,Math.floor(Math.log10(d))),h=d/s,p;return h<1.5?p=1:h<3.5?p=2:h<7.5?p=5:p=10,{value:p*s,digit:p}}function fJt({targetPx:d,pxPerDbu:s,dbuPerMicron:h,showDbu:p}){if(!Number.isFinite(s)||s<=0||!Number.isFinite(d)||d<=0)return null;let m,_,E;if(p){let I=KKt(Math.max(1,d/s));E=I.digit,m=Math.round(I.value*s),_=String(Math.round(I.value))}else{let I=Number.isFinite(h)&&h>0?h:1e3,N=s*I,B=KKt(d/N);E=B.digit;let P=B.value;m=Math.round(P*N);let U,j;P>=1e3?(U=1/1e3,j="mm"):P>=1?(U=1,j="\xB5m"):P>=.001?(U=1e3,j="nm"):(U=1e6,j="pm"),_=Math.round(P*U)+" "+j}return{barPx:m,label:_,segments:E===1?5:E}}function jU(d,s,h){return s?typeof d.runTclScript=="function"?d.runTclScript(s,h):(h&&typeof d.echoTcl=="function"&&d.echoTcl(s),d.websocketManager.request({type:"tcl_eval",cmd:s}).catch(()=>{})):Promise.resolve()}function ak(d,s){let h=d.querySelectorAll("thead th");(!s||!s[0])&&(d.style.tableLayout="auto",h.forEach(p=>p.style.width=""),s=Array.from(h,p=>p.offsetWidth+"px")),h.forEach((p,m)=>p.style.width=s[m]||""),d.style.tableLayout="fixed",h.forEach((p,m)=>{if(m===h.length-1)return;let _=document.createElement("div");_.className="col-resize-grip",p.style.position="relative",p.appendChild(_);let E,y,I=B=>{p.style.width=Math.max(30,y+B.clientX-E)+"px"},N=()=>{document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",N);let B=P=>P.stopPropagation();document.addEventListener("click",B,{capture:!0,once:!0}),setTimeout(()=>{document.removeEventListener("click",B,{capture:!0})},0)};_.addEventListener("mousedown",B=>{B.preventDefault(),E=B.clientX,y=p.offsetWidth,document.addEventListener("mousemove",I),document.addEventListener("mouseup",N)})})}function dJt(d,s){d.scrollWheelZoom.disable(),d.getContainer().addEventListener("wheel",h=>{if(h.preventDefault(),s()===h.ctrlKey){let[m,_]=N2t(h,()=>d.getContainer().clientHeight);d.panBy([m,_],{animate:!1});return}let p=h.deltaY<0?1:-1;d.setZoomAround(d.mouseEventToLatLng(h),d.getZoom()+p)},{passive:!1})}function N2t(d,s){let p=1;return d.deltaMode===1?p=16:d.deltaMode===2&&(p=s()||16),[d.deltaX*p,d.deltaY*p]}function vR(d,s,h,p){let m=document.createElement("div");m.className="modal-overlay",m.innerHTML=` + the output wire straight to it. -->aoi21aoi22aoi211aoi221aoi222aoi33oai21oai22oai211oai221oai222oai33and3nand3or3nor3and4nand4or4nor4`;window.netlistsvg=zAe;window.openroadSkin=MKt;window.THREE=w2t;var zet=globalThis,jet=zet.ShadowRoot&&(zet.ShadyCSS===void 0||zet.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,v2t=Symbol(),EKt=new WeakMap,kU=class{constructor(s,h,p){if(this._$cssResult$=!0,p!==v2t)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=s,this.t=h}get styleSheet(){let s=this.o,h=this.t;if(jet&&s===void 0){let p=h!==void 0&&h.length===1;p&&(s=EKt.get(h)),s===void 0&&((this.o=s=new CSSStyleSheet).replaceSync(this.cssText),p&&EKt.set(h,s))}return s}toString(){return this.cssText}},SKt=d=>new kU(typeof d=="string"?d:d+"",void 0,v2t),LU=(d,...s)=>{let h=d.length===1?d[0]:s.reduce((p,m,_)=>p+(E=>{if(E._$cssResult$===!0)return E.cssText;if(typeof E=="number")return E;throw Error("Value passed to 'css' function must be a 'css' function result: "+E+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(m)+d[_+1],d[0]);return new kU(h,d,v2t)},TKt=(d,s)=>{if(jet)d.adoptedStyleSheets=s.map(h=>h instanceof CSSStyleSheet?h:h.styleSheet);else for(let h of s){let p=document.createElement("style"),m=zet.litNonce;m!==void 0&&p.setAttribute("nonce",m),p.textContent=h.cssText,d.appendChild(p)}},_2t=jet?d=>d:d=>d instanceof CSSStyleSheet?(s=>{let h="";for(let p of s.cssRules)h+=p.cssText;return SKt(h)})(d):d;var{is:jAe,defineProperty:HAe,getOwnPropertyDescriptor:GAe,getOwnPropertyNames:WAe,getOwnPropertySymbols:$Ae,getPrototypeOf:VAe}=Object,Het=globalThis,CKt=Het.trustedTypes,qAe=CKt?CKt.emptyScript:"",XAe=Het.reactiveElementPolyfillSupport,PU=(d,s)=>d,y2t={toAttribute(d,s){switch(s){case Boolean:d=d?qAe:null;break;case Object:case Array:d=d==null?d:JSON.stringify(d)}return d},fromAttribute(d,s){let h=d;switch(s){case Boolean:h=d!==null;break;case Number:h=d===null?null:Number(d);break;case Object:case Array:try{h=JSON.parse(d)}catch{h=null}}return h}},kKt=(d,s)=>!jAe(d,s),AKt={attribute:!0,type:String,converter:y2t,reflect:!1,useDefault:!1,hasChanged:kKt};Symbol.metadata??=Symbol("metadata"),Het.litPropertyMetadata??=new WeakMap;var i3=class extends HTMLElement{static addInitializer(s){this._$Ei(),(this.l??=[]).push(s)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(s,h=AKt){if(h.state&&(h.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(s)&&((h=Object.create(h)).wrapped=!0),this.elementProperties.set(s,h),!h.noAccessor){let p=Symbol(),m=this.getPropertyDescriptor(s,p,h);m!==void 0&&HAe(this.prototype,s,m)}}static getPropertyDescriptor(s,h,p){let{get:m,set:_}=GAe(this.prototype,s)??{get(){return this[h]},set(E){this[h]=E}};return{get:m,set(E){let y=m?.call(this);_?.call(this,E),this.requestUpdate(s,y,p)},configurable:!0,enumerable:!0}}static getPropertyOptions(s){return this.elementProperties.get(s)??AKt}static _$Ei(){if(this.hasOwnProperty(PU("elementProperties")))return;let s=VAe(this);s.finalize(),s.l!==void 0&&(this.l=[...s.l]),this.elementProperties=new Map(s.elementProperties)}static finalize(){if(this.hasOwnProperty(PU("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(PU("properties"))){let h=this.properties,p=[...WAe(h),...$Ae(h)];for(let m of p)this.createProperty(m,h[m])}let s=this[Symbol.metadata];if(s!==null){let h=litPropertyMetadata.get(s);if(h!==void 0)for(let[p,m]of h)this.elementProperties.set(p,m)}this._$Eh=new Map;for(let[h,p]of this.elementProperties){let m=this._$Eu(h,p);m!==void 0&&this._$Eh.set(m,h)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){let h=[];if(Array.isArray(s)){let p=new Set(s.flat(1/0).reverse());for(let m of p)h.unshift(_2t(m))}else s!==void 0&&h.push(_2t(s));return h}static _$Eu(s,h){let p=h.attribute;return p===!1?void 0:typeof p=="string"?p:typeof s=="string"?s.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(s=>this.enableUpdating=s),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(s=>s(this))}addController(s){(this._$EO??=new Set).add(s),this.renderRoot!==void 0&&this.isConnected&&s.hostConnected?.()}removeController(s){this._$EO?.delete(s)}_$E_(){let s=new Map,h=this.constructor.elementProperties;for(let p of h.keys())this.hasOwnProperty(p)&&(s.set(p,this[p]),delete this[p]);s.size>0&&(this._$Ep=s)}createRenderRoot(){let s=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return TKt(s,this.constructor.elementStyles),s}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(s=>s.hostConnected?.())}enableUpdating(s){}disconnectedCallback(){this._$EO?.forEach(s=>s.hostDisconnected?.())}attributeChangedCallback(s,h,p){this._$AK(s,p)}_$ET(s,h){let p=this.constructor.elementProperties.get(s),m=this.constructor._$Eu(s,p);if(m!==void 0&&p.reflect===!0){let _=(p.converter?.toAttribute!==void 0?p.converter:y2t).toAttribute(h,p.type);this._$Em=s,_==null?this.removeAttribute(m):this.setAttribute(m,_),this._$Em=null}}_$AK(s,h){let p=this.constructor,m=p._$Eh.get(s);if(m!==void 0&&this._$Em!==m){let _=p.getPropertyOptions(m),E=typeof _.converter=="function"?{fromAttribute:_.converter}:_.converter?.fromAttribute!==void 0?_.converter:y2t;this._$Em=m;let y=E.fromAttribute(h,_.type);this[m]=y??this._$Ej?.get(m)??y,this._$Em=null}}requestUpdate(s,h,p,m=!1,_){if(s!==void 0){let E=this.constructor;if(m===!1&&(_=this[s]),p??=E.getPropertyOptions(s),!((p.hasChanged??kKt)(_,h)||p.useDefault&&p.reflect&&_===this._$Ej?.get(s)&&!this.hasAttribute(E._$Eu(s,p))))return;this.C(s,h,p)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(s,h,{useDefault:p,reflect:m,wrapped:_},E){p&&!(this._$Ej??=new Map).has(s)&&(this._$Ej.set(s,E??h??this[s]),_!==!0||E!==void 0)||(this._$AL.has(s)||(this.hasUpdated||p||(h=void 0),this._$AL.set(s,h)),m===!0&&this._$Em!==s&&(this._$Eq??=new Set).add(s))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(h){Promise.reject(h)}let s=this.scheduleUpdate();return s!=null&&await s,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[m,_]of this._$Ep)this[m]=_;this._$Ep=void 0}let p=this.constructor.elementProperties;if(p.size>0)for(let[m,_]of p){let{wrapped:E}=_,y=this[m];E!==!0||this._$AL.has(m)||y===void 0||this.C(m,void 0,_,y)}}let s=!1,h=this._$AL;try{s=this.shouldUpdate(h),s?(this.willUpdate(h),this._$EO?.forEach(p=>p.hostUpdate?.()),this.update(h)):this._$EM()}catch(p){throw s=!1,this._$EM(),p}s&&this._$AE(h)}willUpdate(s){}_$AE(s){this._$EO?.forEach(h=>h.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(s)),this.updated(s)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(s){return!0}update(s){this._$Eq&&=this._$Eq.forEach(h=>this._$ET(h,this[h])),this._$EM()}updated(s){}firstUpdated(s){}};i3.elementStyles=[],i3.shadowRootOptions={mode:"open"},i3[PU("elementProperties")]=new Map,i3[PU("finalized")]=new Map,XAe?.({ReactiveElement:i3}),(Het.reactiveElementVersions??=[]).push("2.1.2");var M2t=globalThis,LKt=d=>d,Get=M2t.trustedTypes,PKt=Get?Get.createPolicy("lit-html",{createHTML:d=>d}):void 0,E2t="$lit$",r3=`lit$${Math.random().toFixed(9).slice(2)}$`,S2t="?"+r3,ZAe=`<${S2t}>`,ek=document,RU=()=>ek.createComment(""),DU=d=>d===null||typeof d!="object"&&typeof d!="function",T2t=Array.isArray,BKt=d=>T2t(d)||typeof d?.[Symbol.iterator]=="function",x2t=`[ +\f\r]`,IU=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,IKt=/-->/g,RKt=/>/g,QA=RegExp(`>|${x2t}(?:([^\\s"'>=/]+)(${x2t}*=${x2t}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),DKt=/'/g,NKt=/"/g,FKt=/^(?:script|style|textarea|title)$/i,C2t=d=>(s,...h)=>({_$litType$:d,strings:s,values:h}),Ey=C2t(1),c1=C2t(2),BJe=C2t(3),s3=Symbol.for("lit-noChange"),Oa=Symbol.for("lit-nothing"),OKt=new WeakMap,tk=ek.createTreeWalker(ek,129);function UKt(d,s){if(!T2t(d)||!d.hasOwnProperty("raw"))throw Error("invalid template strings array");return PKt!==void 0?PKt.createHTML(s):s}var zKt=(d,s)=>{let h=d.length-1,p=[],m,_=s===2?"":s===3?"":"",E=IU;for(let y=0;y"?(E=m??IU,P=-1):B[1]===void 0?P=-2:(P=E.lastIndex-B[2].length,O=B[1],E=B[3]===void 0?QA:B[3]==='"'?NKt:DKt):E===NKt||E===DKt?E=QA:E===IKt||E===RKt?E=IU:(E=QA,m=void 0);let W=E===QA&&d[y+1].startsWith("/>")?" ":"";_+=E===IU?I+ZAe:P>=0?(p.push(O),I.slice(0,P)+E2t+I.slice(P)+r3+W):I+r3+(P===-2?y:W)}return[UKt(d,_+(d[h]||"")+(s===2?"":s===3?"":"")),p]},NU=class d{constructor({strings:s,_$litType$:h},p){let m;this.parts=[];let _=0,E=0,y=s.length-1,I=this.parts,[O,B]=zKt(s,h);if(this.el=d.createElement(O,p),tk.currentNode=this.el.content,h===2||h===3){let P=this.el.content.firstChild;P.replaceWith(...P.childNodes)}for(;(m=tk.nextNode())!==null&&I.length0){m.textContent=Get?Get.emptyScript:"";for(let W=0;W2||p[0]!==""||p[1]!==""?(this._$AH=Array(p.length-1).fill(new String),this.strings=p):this._$AH=Oa}_$AI(s,h=this,p,m){let _=this.strings,E=!1;if(_===void 0)s=nk(this,s,h,0),E=!DU(s)||s!==this._$AH&&s!==s3,E&&(this._$AH=s);else{let y=s,I,O;for(s=_[0],I=0;I<_.length-1;I++)O=nk(this,y[p+I],h,I),O===s3&&(O=this._$AH[I]),E||=!DU(O)||O!==this._$AH[I],O===Oa?s=Oa:s!==Oa&&(s+=(O??"")+_[I+1]),this._$AH[I]=O}E&&!m&&this.j(s)}j(s){s===Oa?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,s??"")}},$et=class extends ik{constructor(){super(...arguments),this.type=3}j(s){this.element[this.name]=s===Oa?void 0:s}},Vet=class extends ik{constructor(){super(...arguments),this.type=4}j(s){this.element.toggleAttribute(this.name,!!s&&s!==Oa)}},qet=class extends ik{constructor(s,h,p,m,_){super(s,h,p,m,_),this.type=5}_$AI(s,h=this){if((s=nk(this,s,h,0)??Oa)===s3)return;let p=this._$AH,m=s===Oa&&p!==Oa||s.capture!==p.capture||s.once!==p.once||s.passive!==p.passive,_=s!==Oa&&(p===Oa||m);m&&this.element.removeEventListener(this.name,this,p),_&&this.element.addEventListener(this.name,this,s),this._$AH=s}handleEvent(s){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,s):this._$AH.handleEvent(s)}},Xet=class{constructor(s,h,p){this.element=s,this.type=6,this._$AN=void 0,this._$AM=h,this.options=p}get _$AU(){return this._$AM._$AU}_$AI(s){nk(this,s)}},jKt={M:E2t,P:r3,A:S2t,C:1,L:zKt,R:Wet,D:BKt,V:nk,I:uR,H:ik,N:Vet,U:qet,B:$et,F:Xet},YAe=M2t.litHtmlPolyfillSupport;YAe?.(NU,uR),(M2t.litHtmlVersions??=[]).push("3.3.3");var HKt=(d,s,h)=>{let p=h?.renderBefore??s,m=p._$litPart$;if(m===void 0){let _=h?.renderBefore??null;p._$litPart$=m=new uR(s.insertBefore(RU(),_),_,void 0,h??{})}return m._$AI(d),m};var A2t=globalThis,Sy=class extends i3{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let s=super.createRenderRoot();return this.renderOptions.renderBefore??=s.firstChild,s}update(s){let h=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(s),this._$Do=HKt(h,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return s3}};Sy._$litElement$=!0,Sy.finalized=!0,A2t.litElementHydrateSupport?.({LitElement:Sy});var KAe=A2t.litElementPolyfillSupport;KAe?.({LitElement:Sy});(A2t.litElementVersions??=[]).push("4.2.2");function k2t(d,s,h){return d?s(d):h?.(d)}var L2t=d=>d??Oa;var Zet={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},OU=d=>(...s)=>({_$litDirective$:d,values:s}),lR=class{constructor(s){}get _$AU(){return this._$AM._$AU}_$AT(s,h,p){this._$Ct=s,this._$AM=h,this._$Ci=p}_$AS(s,h){return this.update(s,h)}update(s,h){return this.render(...h)}};var GKt=OU(class extends lR{constructor(d){if(super(d),d.type!==Zet.ATTRIBUTE||d.name!=="class"||d.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(d){return" "+Object.keys(d).filter(s=>d[s]).join(" ")+" "}update(d,[s]){if(this.st===void 0){this.st=new Set,d.strings!==void 0&&(this.nt=new Set(d.strings.join(" ").split(/\s/).filter(p=>p!=="")));for(let p in s)s[p]&&!this.nt?.has(p)&&this.st.add(p);return this.render(s)}let h=d.element.classList;for(let p of this.st)p in s||(h.remove(p),this.st.delete(p));for(let p in s){let m=!!s[p];m===this.st.has(p)||this.nt?.has(p)||(m?(h.add(p),this.st.add(p)):(h.remove(p),this.st.delete(p)))}return s3}});var{I:hQe}=jKt;var WKt=d=>d.strings===void 0;var BU=(d,s)=>{let h=d._$AN;if(h===void 0)return!1;for(let p of h)p._$AO?.(s,!1),BU(p,s);return!0},Yet=d=>{let s,h;do{if((s=d._$AM)===void 0)break;h=s._$AN,h.delete(d),d=s}while(h?.size===0)},$Kt=d=>{for(let s;s=d._$AM;d=s){let h=s._$AN;if(h===void 0)s._$AN=h=new Set;else if(h.has(d))break;h.add(d),tke(s)}};function JAe(d){this._$AN!==void 0?(Yet(this),this._$AM=d,$Kt(this)):this._$AM=d}function QAe(d,s=!1,h=0){let p=this._$AH,m=this._$AN;if(m!==void 0&&m.size!==0)if(s)if(Array.isArray(p))for(let _=h;_{d.type==Zet.CHILD&&(d._$AP??=QAe,d._$AQ??=JAe)},Ket=class extends lR{constructor(){super(...arguments),this._$AN=void 0}_$AT(s,h,p){super._$AT(s,h,p),$Kt(this),this.isConnected=s._$AU}_$AO(s,h=!0){s!==this.isConnected&&(this.isConnected=s,s?this.reconnected?.():this.disconnected?.()),h&&(BU(this,s),Yet(this))}setValue(s){if(WKt(this._$Ct))this._$Ct._$AI(s,this);else{let h=[...this._$Ct._$AH];h[this._$Ci]=s,this._$Ct._$AI(h,this,0)}}disconnected(){}reconnected(){}};var Jet=()=>new I2t,I2t=class{},P2t=new WeakMap,Qet=OU(class extends Ket{render(d){return Oa}update(d,[s]){let h=s!==this.G;return h&&this.rt(void 0),(h||this.lt!==this.ct)&&(this.G=s,this.ht=d.options?.host,this.rt(this.ct=d.element)),Oa}rt(d){if(this.G!==void 0)if(this.isConnected||(d=void 0),typeof this.G=="function"){let s=this.ht??globalThis,h=P2t.get(s);h===void 0&&(h=new WeakMap,P2t.set(s,h)),h.get(this.G)!==void 0&&this.G.call(this.ht,void 0),h.set(this.G,d),d!==void 0&&this.G.call(this.ht,d)}else this.G.value=d}get lt(){return typeof this.G=="function"?P2t.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});function Id(d,s,h,p,m=0,_=0){return[(s-_-p)*h,(d-m)*h]}function Vf(d,s,h,p,m,_,E=0,y=0){return[[(s-y-_)*m,(d-E)*m],[(p-y-_)*m,(h-E)*m]]}function Qw(d,s,h,p,m=0,_=0){return{dbuX:Math.round(m+s/h),dbuY:Math.round(_+p+d/h)}}function eke(d){return!Number.isFinite(d)||d<=1?1:Math.round(Math.min(d,3)*100)/100}var o3=240,nke=256,c3="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",R2t=o3;function tv(){return R2t}function VKt(){R2t=nke}var SQe=1/64,D2t=120;function qKt(d){R2t=d}function rk(d){let s={...d||{}};return s.tileSize===void 0&&(s.tileSize=tv()),s}function tnt(d,s){return Math.max(1,Math.round(d*s))}function hR(){let d=typeof window<"u"&&window.devicePixelRatio?window.devicePixelRatio:1;return!Number.isFinite(d)||d<=1?1:Math.min(d,3)}function fR(d,s=tv()){return{dpr:eke(d),tile_px:tnt(s,d)}}function ent(d,s,h,p,m=tv()){let{visibility:_,selectability:E,visibleLayers:y,selectableLayers:I,app:O}=h,B={};for(let[U,W]of Object.entries(_||{}))B[U]=!!W;if(E)for(let[U,W]of Object.entries(E))B["s_"+U]=!!W;let P={type:"tile",layer:s,z:d.z,x:d.x,y:d.y,...fR(p,m),visible_layers:y?[...y]:[],selectable_layers:I?[...I]:[],...B};if(O&&O.visibleChiplets instanceof Set&&(P.visible_chiplets=[...O.visibleChiplets]),O&&O.layerPatterns){let U=O.layerPatterns[s];U!==void 0&&U!==1&&(P.pattern=U)}return P}function XKt(d){if(typeof window>"u"||typeof window.matchMedia!="function"||typeof d!="function")return()=>{};let s=!1,h=null,p=null,m=()=>{if(s)return;let _=window.devicePixelRatio||1;h=window.matchMedia(`(resolution: ${_}dppx)`),p=()=>{s||(m(),d(window.devicePixelRatio||1))},h.addEventListener("change",p,{once:!0})};return m(),()=>{s=!0,h&&p&&h.removeEventListener("change",p),h=null,p=null}}function dR(d,s){let h=d&&d._map?d._map.getZoom():s;return Math.floor(h)}function Sc(d){return!!d?.websocketManager?.isStaticMode}function JKt(d){let s=d?.protocol==="https:"?"wss":"ws",h=d?.host||"localhost:8080";return`${s}://${h}/ws`}function QKt(d,s){let h={};for(let[p,m]of Object.entries(d||{}))h[p]=!!m;for(let[p,m]of Object.entries(s||{}))h["s_"+p]=!!m;return h}function pR(d,s){s&&typeof s.sel_has_inst=="boolean"&&(d.selHasInst=s.sel_has_inst,d.selHasNet=!!s.sel_has_net)}var N2t=null;function ev(d,s=4e3){let h=document.getElementById("or-toast");return h||(h=document.createElement("div"),h.id="or-toast",document.body.appendChild(h)),h.textContent=d,h.classList.add("visible"),N2t&&clearTimeout(N2t),N2t=setTimeout(()=>h.classList.remove("visible"),s),h}function tJt({title:d,message:s,confirmLabel:h="OK",danger:p=!1}){return new Promise(m=>{let _=document.createElement("div");_.className="or-modal-overlay";let E=document.createElement("div");E.className="or-modal";let y=document.createElement("div");y.className="or-modal-title",y.textContent=d;let I=document.createElement("div");I.className="or-modal-message",I.textContent=s;let O=document.createElement("div");O.className="or-modal-buttons";let B=document.createElement("button");B.className="or-btn",B.textContent="Cancel";let P=document.createElement("button");P.className="or-btn"+(p?" or-btn-danger":""),P.textContent=h;let U=q=>{document.removeEventListener("keydown",W,!0),_.remove(),m(q)},W=q=>{q.key==="Escape"&&(q.stopPropagation(),U(!1))};B.addEventListener("click",()=>U(!1)),P.addEventListener("click",()=>U(!0)),_.addEventListener("click",q=>{q.target===_&&U(!1)}),document.addEventListener("keydown",W,!0),O.appendChild(B),O.appendChild(P),E.appendChild(y),E.appendChild(I),E.appendChild(O),_.appendChild(E),document.body.appendChild(_),B.focus()})}var ike=.05;function rke([[d,s],[h,p]],m){let _=(p-s)*m,E=(h-d)*m;return[[d-E,s-_],[h+E,p+_]]}function O2t(d,s=256,h=null){if(!ZKt(d))return null;let p=d[0][0],m=d[0][1],_=Math.max(d[1][1]-m,d[1][0]-p),E=s/_,y=ZKt(h)?h:d,[[I,O],[B,P]]=rke(y,ike);return{scale:E,maxDXDY:_,originX:m,originY:p,fitBounds:Vf(O,I,P,B,E,_,m,p)}}function ZKt(d){return!!d&&d[1][0]>d[0][0]&&d[1][1]>d[0][1]}function eJt(d,s){return!!d&&!!s&&d[0][0]===s[0][0]&&d[0][1]===s[0][1]&&d[1][0]===s[1][0]&&d[1][1]===s[1][1]}function wg(d){d.selectionToken=(d.selectionToken||0)+1;for(let s of d.selectionResetters||[])s();return d.selectionToken}function N0(d,s){return d.selectionToken===s}function nJt(d,s){d.selectionResetters||(d.selectionResetters=[]),d.selectionResetters.push(s)}function iJt(d=typeof L<"u"?L.CRS.Simple:void 0,s={}){return{crs:d,zoom:1,zoomSnap:1,zoomDelta:1,fadeAnimation:!1,attributionControl:!1,scrollWheelZoom:s.wheelZoom!==!1,keyboardPanDelta:gR(s.arrowStep)}}var B2t=80,FU=10,UU=1e3;function gR(d){let s=d===""||d===null?NaN:Math.round(Number(d));return Number.isFinite(s)?Math.min(UU,Math.max(FU,s)):B2t}function rJt(d,s){d?.keyboard?._setPanDelta?.(s)}function sk(d="vis-group-header"){let s=document.createElement("div");s.className=d;let h=document.createElement("span");h.className="vis-arrow",s.appendChild(h);let p=document.createElement("span");return p.className="vis-name",s.appendChild(p),{header:s,arrow:h,name:p}}function ok(d,s,h,p){let m=_=>{h.classList.toggle("collapsed",_),s.textContent=_?"\u25B6":"\u25BC"};m(!!p),d.addEventListener("click",_=>{let E=_.target&&_.target.parentNode===d&&_.target.classList&&_.target.classList.contains("vis-name");_.target!==d&&_.target!==s&&!E||m(!h.classList.contains("collapsed"))})}var YKt=30;function sJt(d,s=8){if(!Number.isFinite(d)||d<=0)return YKt;let h=Math.ceil(Math.log2(s/d));return Math.max(1,Math.min(YKt,h))}function oJt({designBounds:d,fitRect:s,viewW:h,viewH:p}){let m=O2t(d,o3,s),_=W=>Number.isFinite(W)&&W>0;if(!m||!_(h)||!_(p))return o3;let E=m.fitBounds[1][1]-m.fitBounds[0][1],y=m.fitBounds[1][0]-m.fitBounds[0][0],I=Math.min(h/E,p/y),O=Math.log2(I);if(!Number.isFinite(O)||O<0)return o3;let B=Math.floor(O),P=o3*2**(O-B),U=Math.floor(P/D2t)*D2t;return U>o3&&Math.log2(o3*I/U)>=B?U:o3}function cJt(d,{showDbu:s,dbuPerMicron:h},p=!1){if(s)return String(Math.round(d));let m=h>0?h:1e3,_=Math.ceil(Math.log10(m)),E=(d/m).toFixed(_);return p?E+" \xB5m":E}function aJt(d,{showDbu:s,dbuPerMicron:h}){let p=parseFloat(d);if(!Number.isFinite(p))return null;if(s)return Math.round(p);let m=h>0?h:1e3;return Math.round(p*m)}function uJt(d,{showDbu:s,dbuPerMicron:h}){if(s)return String(Math.round(d));let p=h>0?h:1e3,m=d/p;return m>=1e3?(m/1e3).toFixed(3)+" mm":m>=1?m.toFixed(3)+" um":(m*1e3).toFixed(1)+" nm"}function lJt({showDbu:d}){return d?"DBU":"\xB5m"}function mR(d){return typeof d=="string"&&/^#[0-9a-fA-F]{6}$/.test(d)}function hJt(d){if(typeof d!="string")return null;let s=d.trim();if(mR(s))return s.toLowerCase();let h=s.match(/^#([0-9a-fA-F]{3})$/);if(h)return"#"+h[1].split("").map(m=>m+m).join("").toLowerCase();let p=s.match(/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/);if(p){let m=p.slice(1).map(Number);return m.some(_=>_>255)?null:"#"+m.map(_=>_.toString(16).padStart(2,"0")).join("")}return null}function zU(d){let s=null;return()=>{s===null&&(s=requestAnimationFrame(()=>{s=null,d()}))}}function KKt(d){let s=Math.pow(10,Math.floor(Math.log10(d))),h=d/s,p;return h<1.5?p=1:h<3.5?p=2:h<7.5?p=5:p=10,{value:p*s,digit:p}}function fJt({targetPx:d,pxPerDbu:s,dbuPerMicron:h,showDbu:p}){if(!Number.isFinite(s)||s<=0||!Number.isFinite(d)||d<=0)return null;let m,_,E;if(p){let I=KKt(Math.max(1,d/s));E=I.digit,m=Math.round(I.value*s),_=String(Math.round(I.value))}else{let I=Number.isFinite(h)&&h>0?h:1e3,O=s*I,B=KKt(d/O);E=B.digit;let P=B.value;m=Math.round(P*O);let U,W;P>=1e3?(U=1/1e3,W="mm"):P>=1?(U=1,W="\xB5m"):P>=.001?(U=1e3,W="nm"):(U=1e6,W="pm"),_=Math.round(P*U)+" "+W}return{barPx:m,label:_,segments:E===1?5:E}}function jU(d,s,h){return s?typeof d.runTclScript=="function"?d.runTclScript(s,h):(h&&typeof d.echoTcl=="function"&&d.echoTcl(s),d.websocketManager.request({type:"tcl_eval",cmd:s}).catch(()=>{})):Promise.resolve()}function ck(d,s){let h=d.querySelectorAll("thead th");(!s||!s[0])&&(d.style.tableLayout="auto",h.forEach(p=>p.style.width=""),s=Array.from(h,p=>p.offsetWidth+"px")),h.forEach((p,m)=>p.style.width=s[m]||""),d.style.tableLayout="fixed",h.forEach((p,m)=>{if(m===h.length-1)return;let _=document.createElement("div");_.className="col-resize-grip",p.style.position="relative",p.appendChild(_);let E,y,I=B=>{p.style.width=Math.max(30,y+B.clientX-E)+"px"},O=()=>{document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",O);let B=P=>P.stopPropagation();document.addEventListener("click",B,{capture:!0,once:!0}),setTimeout(()=>{document.removeEventListener("click",B,{capture:!0})},0)};_.addEventListener("mousedown",B=>{B.preventDefault(),E=B.clientX,y=p.offsetWidth,document.addEventListener("mousemove",I),document.addEventListener("mouseup",O)})})}function dJt(d,s){d.scrollWheelZoom.disable(),d.getContainer().addEventListener("wheel",h=>{if(h.preventDefault(),s()===h.ctrlKey){let[m,_]=F2t(h,()=>d.getContainer().clientHeight);d.panBy([m,_],{animate:!1});return}let p=h.deltaY<0?1:-1;d.setZoomAround(d.mouseEventToLatLng(h),d.getZoom()+p)},{passive:!1})}function F2t(d,s){let p=1;return d.deltaMode===1?p=16:d.deltaMode===2&&(p=s()||16),[d.deltaX*p,d.deltaY*p]}function bR(d,s,h,p){let m=document.createElement("div");m.className="modal-overlay",m.innerHTML=` -
`,document.body.appendChild(m);let _=()=>m.remove();m.addEventListener("click",I=>{I.target===m&&_()}),m.addEventListener("keydown",I=>{I.key==="Escape"&&_()}),m.querySelector(".cancel").addEventListener("click",_),m.querySelector(".modal-close").addEventListener("click",_);let E=m.querySelector(".modal-error"),y=(I,N)=>{E.textContent=I,E.style.display=I?"block":"none",E.classList.toggle("info",!!N)};return{overlay:m,close:_,okBtn:m.querySelector(".ok"),showError:y}}var ent=class{constructor(){this.eventListeners=new Map}on(s,h){this.eventListeners.has(s)||this.eventListeners.set(s,new Set),this.eventListeners.get(s).add(h)}off(s,h){this.eventListeners.get(s)?.delete(h)}emit(s,...h){let p=this.eventListeners.get(s);if(p)for(let m of p)try{m(...h)}catch(_){console.error(_)}}fire(s,...h){this.emit(s,...h)}};function HU(d,s,h={}){d.dispatchEvent(new CustomEvent(s,{bubbles:!0,composed:!0,detail:h}))}var mJt=IU` +
`,document.body.appendChild(m);let _=()=>m.remove();m.addEventListener("click",I=>{I.target===m&&_()}),m.addEventListener("keydown",I=>{I.key==="Escape"&&_()}),m.querySelector(".cancel").addEventListener("click",_),m.querySelector(".modal-close").addEventListener("click",_);let E=m.querySelector(".modal-error"),y=(I,O)=>{E.textContent=I,E.style.display=I?"block":"none",E.classList.toggle("info",!!O)};return{overlay:m,close:_,okBtn:m.querySelector(".ok"),showError:y}}var nnt=class{constructor(){this.eventListeners=new Map}on(s,h){this.eventListeners.has(s)||this.eventListeners.set(s,new Set),this.eventListeners.get(s).add(h)}off(s,h){this.eventListeners.get(s)?.delete(h)}emit(s,...h){let p=this.eventListeners.get(s);if(p)for(let m of p)try{m(...h)}catch(_){console.error(_)}}fire(s,...h){this.emit(s,...h)}};function HU(d,s,h={}){d.dispatchEvent(new CustomEvent(s,{bubbles:!0,composed:!0,detail:h}))}var mJt=LU` .ide-tab-icon { display: inline-flex; align-items: center; @@ -3812,7 +3812,7 @@ path, rect, circle, polygon { height: 100%; display: block; } -`,O2t=class extends Ty{static properties={name:{type:String,reflect:!0},maximizable:{type:Boolean,reflect:!0},collapsible:{type:Boolean,reflect:!0},maximized:{type:Boolean,reflect:!0},collapsed:{type:Boolean,reflect:!0},_overflowing:{state:!0},_fadeStart:{state:!0},_fadeEnd:{state:!0},_menuOpen:{state:!0}};static styles=[mJt,IU` +`,U2t=class extends Sy{static properties={name:{type:String,reflect:!0},maximizable:{type:Boolean,reflect:!0},collapsible:{type:Boolean,reflect:!0},maximized:{type:Boolean,reflect:!0},collapsed:{type:Boolean,reflect:!0},_menuOpen:{state:!0},_focusIndex:{state:!0}};static styles=[mJt,LU` :host { display: flex; flex-direction: column; @@ -3843,44 +3843,24 @@ path, rect, circle, polygon { flex-shrink: 0; } + /* Fills up to the controls, so the fixed right-edge fade lies over + empty space when the tabs fit; a tab scrolled into view clears it. */ .ide-tabs { display: flex; + flex: 1; height: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; - --tab-fade: 24px; - /* Scrolling a tab into view keeps it clear of the faded edge. */ - scroll-padding-inline: var(--tab-fade); - -webkit-mask-image: var(--tab-mask, none); - mask-image: var(--tab-mask, none); + scroll-padding-inline-end: 24px; + -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); + mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); } .ide-tabs::-webkit-scrollbar { display: none; } - /* The tabs at their full width: its size is the strip's scrollWidth. */ - .ide-tabs-track { - display: flex; - flex: none; - height: 100%; - } - - /* Fade the edge that has tabs scrolled past it. */ - .ide-tabs.fade-start { - --tab-mask: linear-gradient(to left, #000 calc(100% - var(--tab-fade)), transparent); - } - - .ide-tabs.fade-end { - --tab-mask: linear-gradient(to right, #000 calc(100% - var(--tab-fade)), transparent); - } - - .ide-tabs.fade-start.fade-end { - --tab-mask: linear-gradient(to right, transparent, #000 var(--tab-fade), - #000 calc(100% - var(--tab-fade)), transparent); - } - .ide-controls { display: flex; align-items: center; @@ -3905,16 +3885,11 @@ path, rect, circle, polygon { } .ide-btn:hover, - .ide-btn-overflow[aria-expanded="true"] { + .ide-btn-tab-menu[aria-expanded="true"] { background: var(--bg-hover); color: var(--fg-primary); } - /* Always laid out, so whether the tabs overflow never depends on it showing. */ - .ide-btn-overflow.idle { - visibility: hidden; - } - .ide-btn.ide-btn-restore { width: auto; padding: 0 6px; @@ -3991,74 +3966,65 @@ path, rect, circle, polygon { overflow: hidden; text-overflow: ellipsis; } - `];constructor(){super(),this._overflowing=!1,this._fadeStart=!1,this._fadeEnd=!1,this._menuOpen=!1,this._tabsEl=null,this._tabsTrack=null,this._tabsSlot=null,this._tabsObserver=null,this._tabsMutations=null,this._menuAbort=null,this._menuHadFocus=!1,this._inUpdate=!1}connectedCallback(){super.connectedCallback(),this.classList.add("ide-pane",`ide-pane-${this.paneName}`),this.hasUpdated&&this._observeStrip()}disconnectedCallback(){super.disconnectedCallback(),this._tabsObserver?.disconnect(),this._closeMenu()}firstUpdated(){this._tabsEl=this.renderRoot.querySelector(".ide-tabs"),this._tabsTrack=this.renderRoot.querySelector(".ide-tabs-track"),this._tabsSlot=this.renderRoot.querySelector('slot[name="tabs"]'),this._tabsObserver=new ResizeObserver(()=>{this._updateOverflow(),this._tabs.find(s=>s.active)?.scrollIntoView({inline:"nearest",block:"nearest"})}),this._tabsMutations=new MutationObserver(()=>this.requestUpdate()),this._observeStrip()}willUpdate(s){this._menuHadFocus=this._menuOpen&&this._menuHasFocus(),this._inUpdate=!0,this._menuOpen&&(!this._overflowing||this.collapsed||s.has("maximized"))&&this._closeMenu(this._menuHadFocus)}updated(s){this._inUpdate=!1,this._menuOpen&&(s.has("_menuOpen")||this._menuHadFocus&&!this._menuHasFocus())&&this._focusMenuItem()}get _tabs(){return this._tabsSlot?.assignedElements()||[]}_observeStrip(){this._tabsObserver.observe(this._tabsEl),this._tabsObserver.observe(this._tabsTrack)}_observeTabs(){this._tabsMutations.disconnect();for(let s of this._tabs)this._tabsMutations.observe(s,{attributes:!0,attributeFilter:["active","hidden","title"]})}_onTabsSlotChange(){this._menuOpen&&(this._observeTabs(),this.requestUpdate())}_updateOverflow(){let s=this._tabsEl;if(!s)return;let h=s.scrollWidth-s.clientWidth;this._overflowing=h>1,this._fadeStart=this._overflowing&&s.scrollLeft>1,this._fadeEnd=this._overflowing&&s.scrollLeft=Math.abs(s.deltaY)||(s.preventDefault(),this._tabsEl.scrollLeft+=N2t(s,()=>this._tabsEl.clientWidth)[1])}_onOverflowClick(){this._menuOpen?this._closeMenu(!0):this._openMenu()}_openMenu(){this._menuOpen=!0,this._observeTabs(),this._menuAbort=new AbortController;let{signal:s}=this._menuAbort;document.addEventListener("pointerdown",h=>{let p=h.composedPath();[".ide-tab-menu",".ide-btn-overflow"].some(_=>p.includes(this.renderRoot.querySelector(_)))||this._closeMenu()},{signal:s}),window.addEventListener("keydown",h=>this._onMenuKey(h),{capture:!0,signal:s})}_closeMenu(s=!1){this._menuAbort?.abort(),this._menuAbort=null,this._tabsMutations?.disconnect(),this._menuOpen=!1,s&&this.renderRoot.querySelector(".ide-btn-overflow")?.focus()}_menuHasFocus(){return!!this.renderRoot?.activeElement?.closest(".ide-tab-menu")}_focusMenuItem(){let s=[...this.renderRoot.querySelectorAll(".ide-tab-menu-item")];(s.find(h=>h.getAttribute("aria-checked")==="true")||s[0])?.focus()}_onMenuFocusout(s){this._inUpdate||this._menuOpen&&!s.currentTarget.contains(s.relatedTarget)&&this._closeMenu()}_keepMenuFocus(s){s.preventDefault()}_onMenuKey(s){let h=this.renderRoot.querySelector(".ide-tab-menu");if(!h||!s.composedPath().includes(h))return;let p=[...h.querySelectorAll(".ide-tab-menu-item")],m=p.length,_=p.indexOf(this.renderRoot.activeElement),E=null;if(s.key==="ArrowDown")E=p[(_+1)%m];else if(s.key==="ArrowUp")E=p[_<=0?m-1:_-1];else if(s.key==="Home")E=p[0];else if(s.key==="End")E=p[m-1];else if(s.key.length===1&&s.key!==" "&&!s.ctrlKey&&!s.metaKey&&!s.altKey){let y=s.key.toLowerCase();E=[...p.slice(_+1),...p.slice(0,_+1)].find(I=>I.querySelector(".ide-tab-menu-title").textContent.toLowerCase().startsWith(y))}else if(s.key!=="Escape")return;s.preventDefault(),s.stopPropagation(),s.key==="Escape"?this._closeMenu(!0):E?.focus()}_selectFromMenu(s){this._closeMenu(!0),s.select()}_renderTabMenu(){let s=this._tabs.filter(h=>!h.hidden);return Sy` - `,"Apply",XJt),I=m.querySelector(".opt-family"),O=m.querySelector(".opt-custom"),B=m.querySelector(".opt-scale"),P=m.querySelector(".opt-preview");function U(){P.style.fontFamily=O.value.trim()||I.value,P.style.fontSize=`calc(13px * ${$U(B.value)/100})`}for(let q of[I,O,B])q.addEventListener("input",U);U();function W(){let q=B.value.trim(),et=Number(q);if(q===""||!Number.isFinite(et)){y("Size must be a number.");return}if(etmnt){y(`Size must be between ${gnt} and ${mnt} %.`);return}d.setAppFont({family:O.value.trim()||I.value,scale:et}),_()}E.addEventListener("click",W);for(let q of[O,B])q.addEventListener("keydown",et=>{et.key==="Enter"&&(et.preventDefault(),W())});return{close:_}}function ext(d){return String(d).replace(/&/g,"&").replace(/"/g,""").replace(//g,">")}var Yke='',Kke='';function _R(d){let s=document.createElement("span");return s.className="vis-name",d!=null&&(s.textContent=d),s}function bS(){let d=document.createElement("span");return d.className="vis-sel-cb vis-sel-spacer",d}function KJt(){let d=document.createElement("div");d.className="display-controls-header",d.appendChild(_R(""));for(let[s,h]of[[Yke,"Visible"],[Kke,"Selectable"]]){let p=document.createElement("span");p.className="vis-header-icon",p.title=h,p.innerHTML=s,d.appendChild(p)}return d}var bnt=class{constructor(s,h,p){this.visibility=s,this.selectability=h,this.onChange=p;let m=()=>{this._syncAll(),this.onChange()};this.model=new nv(m),this.selModel=new nv(m)}add(s){return this.model.addFromSpec(this._enrichSpec(s,"")),this.selModel.addFromSpec(this._enrichSelSpec(s,"",!1)),this}render(s){for(let h of this.model.roots)s.appendChild(this._dom(h));this._syncAll()}_nodeId(s,h){let p=s.key||s.label;return h?h+"/"+p:p}_enrichSpec(s,h){let p=this._nodeId(s,h),m={id:p,data:s};return s.children?m.children=s.children.map(_=>this._enrichSpec(_,p)):s.key&&(m.checked=!!this.visibility[s.key]),s.disabled!=null&&(m.disabled=s.disabled),m}_enrichSelSpec(s,h,p){let m=s.addSelectable===!0?!0:s.addSelectable===!1?!1:p,_=this._nodeId(s,h),E={id:_,data:s,hasCheckbox:!1};if(s.children){E.children=s.children.map(I=>this._enrichSelSpec(I,_,m));let y=I=>I.some(O=>O.hasCheckbox||O.children&&y(O.children));E.hasCheckbox=y(E.children),E.hasCheckbox&&(E.checked=!0)}else if(s.key){let y=s.selectable===!0||s.selectable!==!1&&p;E.hasCheckbox=y,y&&(E.checked=this.selectability[s.key]!==!1)}return E}_syncAll(){this.model.forEach(s=>{s.cb&&(s.cb.checked=s.checked,s.cb.indeterminate=s.indeterminate);let h=s.data;h.key&&(this.visibility[h.key]=s.checked),h.visKey&&(this.visibility[h.visKey]=s.checked||s.indeterminate)}),this.selModel.forEach(s=>{if(!s.hasCheckbox)return;let h=s.data;if(h.key&&(this.selectability[h.key]=s.checked),!s.selCb)return;s.selCb.checked=s.checked,s.selCb.indeterminate=s.indeterminate;let p=this.model.get(s.id),m=p&&!p.checked&&!p.indeterminate;s.selCb.disabled=m,s.selLabel&&s.selLabel.classList.toggle("vis-sel-disabled",m)}),this.model.forEach(s=>{let h=s.data;if(h.disabledBy&&s.el){let p=!this.visibility[h.disabledBy];s.el.classList.toggle("disabled",p)}})}_buildSelCheckbox(s){let h=this.selModel.get(s.id);if(!h||!h.hasCheckbox)return null;let p=document.createElement("input");return p.type="checkbox",p.className="vis-sel-cb",p.title="Selectable",p.addEventListener("change",()=>{this.selModel.check(h.id,p.checked)}),h.selCb=p,p}_dom(s){let h=s.data,p=document.createElement("input");p.type="checkbox",p.className="vis-cb",p.title="Visible",s.cb=p,p.addEventListener("change",()=>this.model.check(s.id,p.checked));let m=this._buildSelCheckbox(s),_=P=>{if(P.appendChild(p),m){P.appendChild(m);let U=this.selModel.get(s.id);U&&(U.selLabel=P)}else P.appendChild(bS())};if(!s.children.length){let P=document.createElement("div");P.className="vis-leaf";let U=document.createElement("span");return U.className="vis-arrow",U.style.visibility="hidden",U.textContent="\u25B6",P.appendChild(U),P.appendChild(_R(h.label)),_(P),s.el=P,P}let E=document.createElement("div");E.className="vis-group";let{header:y,arrow:I,name:O}=sk();O.textContent=h.label,_(y),E.appendChild(y);let B=document.createElement("div");B.className="vis-group-children",h.disabled&&B.classList.add("disabled");for(let P of s.children)B.appendChild(this._dom(P));return E.appendChild(B),ok(y,I,B,!0),E}};function VU(d,s,h,p){let m=new Set,_=Math.max(0,d-s),E=Math.min(p-1,d+h);for(let y=_;y<=E;y++)m.add(y);return m}function Jke(d){let s={};for(let[h,p]of Object.entries(d||{}))p!==1&&(s[h]=p);return s}function wnt(d,s){return(d||[]).some(h=>h.every(p=>!!s[p]))}function Qke(d,s){return d.map(h=>{let p=!s.has(h.path);return{id:h.path,parentId:h.parent!=null?h.parent:null,hasCheckbox:h.parent!=null,checked:p,data:{path:h.path,name:h.name,master:h.master,depth:h.depth}}})}var JJt=[[70,130,210],[200,50,50],[50,180,80],[200,160,40],[160,60,200],[40,190,190],[220,120,50],[180,70,150]];function QJt(d,s,h,p,m,_,E){if(!d.displayControlsEl)return;d.displayControlsEl.innerHTML="",d.allLayers=[],d.displayControlsEl.appendChild(KJt());let y=d.mergeTiles?d.MergedTileLayer:null,I=new Set;function O(){for(let Jt of I)Jt.refreshTiles();I.clear()}function B(Jt,nn){if(!y){let he=new p(d.websocketManager,Jt,{opacity:1,zIndex:nn});return he._orShow=()=>he.addTo(d.map),he._orHide=()=>d.map.removeLayer(he),he}let vn={layer:Jt,opacity:1,visible:!1};return{_orItem:vn,_orPane:null,refreshTiles(){this._orPane&&(I.add(this._orPane),O())},_orShow(){$2t(vn,!0)&&this._orPane&&I.add(this._orPane)},_orHide(){$2t(vn,!1)&&this._orPane&&I.add(this._orPane)}}}function P(Jt,nn,vn,he){let Mn=new p(d.websocketManager,Jt,{zIndex:vn});return he&&Mn.addTo(d.map),nn&&(d[nn]=Mn),d.allLayers.push(Mn),Mn}P("_instances",null,0,!0),P("_pins","pinsLayer",1,s.pins),P("_modules","modulesLayer",2,s.module_view),d.overlayLayers=(m&&m.overlays||[]).map(Jt=>({def:Jt,layer:P(Jt.name,null,Jt.z_index,wnt(Jt.shown_by,s))}));let U=[],W=[],q=null,et=new Set,Q=new Set;try{let Jt=window.sessionStorage.getItem("or_hidden_layers");Jt&&(et=new Set(JSON.parse(Jt)))}catch{}try{let Jt=window.sessionStorage.getItem("or_nonselectable_layers");Jt&&(Q=new Set(JSON.parse(Jt)))}catch{}try{let Jt=window.sessionStorage.getItem("or_layer_patterns");Jt&&Object.assign(d.layerPatterns,JSON.parse(Jt))}catch{}function X(){try{window.sessionStorage.setItem("or_layer_patterns",JSON.stringify(Jke(d.layerPatterns)))}catch{}}function gt(Jt,nn,vn){vn===1?delete d.layerPatterns[Jt]:d.layerPatterns[Jt]=vn,X(),nn&&typeof nn.refreshTiles=="function"&&nn.refreshTiles()}let ft=[{label:"Solid",value:1},{label:"Diagonal",value:2},{label:"Cross",value:3},{label:"Dots",value:4},{label:"None (no fill)",value:0}],xt=0,Bt=3;function Ot(Jt,nn="layers",vn=void 0){let he=[],Mn=Jt.type==="category"?vn:Jt.path,Sn=Jt.flipped===!0,gn=Jt.instances||[],Ce=gn.filter(Qt=>Qt.type!=="category"),dn=gn.filter(Qt=>Qt.type==="category"),jn=Jt.layers||[],ar=xt;xt+=jn.length;function gr(Qt,Mi){let sn=Qt.map((Zn,oi)=>oi);Mi&&sn.reverse(),sn.forEach(Zn=>{let oi=Qt[Zn],Jr=nn+"/"+(oi.name||Zn);he.push(Ot(oi,Jr,Mn))})}function tr(){(Sn?jn.map((Mi,sn)=>sn).reverse():jn.map((Mi,sn)=>sn)).forEach(Mi=>{let sn=jn[Mi],Zn=sn.name||sn,oi=ar+Mi,Jr=Bt++,Bs=B(Zn,Jr),Oc=`${nn}/${Zn}`;Bs._nodeId=Oc;let su=!et.has(Oc);su&&(Bs._orShow(),d.visibleLayers.add(Oc),d.visibleLayerNames.add(Zn)),y||d.allLayers.push(Bs),U.push(Bs),W.push(Oc),he.push({id:Oc,data:{name:Zn,layer:Bs,color:sn.color,colorIndex:oi,nodeId:Oc,ownerChipletPath:Mn},checked:su})})}gr(Ce,!1),Sn&&tr(),gr(dn,Sn),Sn||tr();let Ln={name:Jt.name,isInstance:!0};return Jt.type==="category"&&(Jt.name==="Implant"||Jt.name==="Other")&&(Ln.startCollapsed=!0),Jt.type!=="category"&&(Ln.chipletPath=Jt.path),{id:nn,data:Ln,children:he}}let Pt;if(m.layer_hierarchy?Pt=Ot(m.layer_hierarchy,"layers_parent"):Pt={id:"layers_parent",children:m.layers.map((Jt,nn)=>{let vn=B(Jt,nn+3),he=`layers_parent/${Jt}`;vn._nodeId=he;let Mn=!et.has(he);return Mn&&(vn._orShow(),d.visibleLayers.add(he),d.visibleLayerNames.add(Jt)),y||d.allLayers.push(vn),U.push(vn),W.push(he),{id:he,data:{name:Jt,layer:vn,colorIndex:nn,nodeId:he},checked:Mn}})},y&&U.length>0){let vn=function(){let{width:dn,height:jn}=MJt(d.map.getContainer()),ar=tv(),gr=xJt(dn,jn,ar),tr=yJt(ar,d.tileDpr?d.tileDpr():1);return{count:d.mergeGroupCount||SJt({budgetBytes:EJt(nn,gr,tr),tilesPerPane:gr,bytesPerTile:tr,paneCount:Jt.length}),tilesPerPane:gr,perTile:tr}},he=function(dn,jn,ar){let gr=(dn+snt)*jn*ar;return{layers:Jt.length,groups:dn,tilesPerPane:jn,unmergedPanes:snt,budgetMB:Math.round(nn/(1024*1024)),estimatedMB:Math.round(gr/(1024*1024))}},Mn=function(dn,jn){let ar=0;jn.forEach((gr,tr)=>{for(let Ln=0;Lndn._orItem),nn=d.tileBudgetBytes||W2t,Sn=vn(),gn=V2t(Jt,Sn.count),Ce=kJt(y,d.websocketManager,gn,d.map,3);Mn(Ce,gn),d.allLayers.push(...Ce),d.mergedPanes=Ce,d.mergeStats=he(Ce.length,Sn.tilesPerPane,Sn.perTile),console.log("[tiles] merged %d layers into %d panes (~%d MB of %d MB budget, %d tiles/pane)",d.mergeStats.layers,d.mergeStats.groups,d.mergeStats.estimatedMB,d.mergeStats.budgetMB,Sn.tilesPerPane),d.map.on("resize",()=>{let dn=vn();if(dn.count>=d.mergedPanes.length)return;let jn=V2t(Jt,dn.count),ar=d.mergedPanes.slice(0,jn.length);for(let gr of d.mergedPanes.slice(jn.length)){d.map.removeLayer(gr);let tr=d.allLayers.indexOf(gr);tr>=0&&d.allLayers.splice(tr,1)}d.mergedPanes=ar,Mn(ar,jn),ar.forEach((gr,tr)=>gr.setItems(jn[tr])),d.mergeStats=he(ar.length,dn.tilesPerPane,dn.perTile),console.log("[tiles] window grew \u2014 regrouped %d layers into %d panes (~%d MB of %d MB budget, %d tiles/pane)",d.mergeStats.layers,d.mergeStats.groups,d.mergeStats.estimatedMB,d.mergeStats.budgetMB,dn.tilesPerPane)})}function se(Jt){if(!Jt.children||Jt.children.length===0){let nn=Jt.data&&Jt.data.name,vn=nn?!Q.has(nn):!0;return vn&&nn&&d.selectableLayers.add(nn),{id:Jt.id,data:{name:nn},checked:vn}}return{id:Jt.id,data:{name:Jt.data&&Jt.data.name},children:Jt.children.map(se)}}let ot=se(Pt),Lt=new nv(()=>{d.visibleLayerNames.clear();let Jt=[],nn={},vn=!1,he=!1,Mn=q&&d.visibleChiplets instanceof Set;Lt.forEach(gn=>{if(gn.cb&&(gn.cb.checked=gn.checked,gn.cb.indeterminate=gn.indeterminate),gn.data&&gn.data.layer){let Ce=gn.data.nodeId||gn.data.name;Jt.push(Ce),gn.checked?(gn.data.layer._orShow(),d.visibleLayers.add(Ce),d.visibleLayerNames.add(gn.data.name)):(gn.data.layer._orHide(),d.visibleLayers.delete(Ce))}if(Mn&&gn.data&&gn.data.chipletPath){let Ce=gn.data.chipletPath,dn=q.get(Ce);if(dn){let jn=gn.checked||gn.indeterminate,ar={checked:gn.checked,indeterminate:gn.indeterminate};(dn.checked!==gn.checked||dn.indeterminate!==gn.indeterminate)&&(nn[Ce]=ar,vn=!0),d.visibleChiplets.has(Ce)!==jn&&(he=!0)}}}),O(),ln(),d.pinsLayer&&d.map.hasLayer(d.pinsLayer)&&d.pinsLayer.refreshTiles();for(let{def:gn,layer:Ce}of d.overlayLayers||[])wnt(gn.layers_by,s)&&d.map.hasLayer(Ce)&&Ce.refreshTiles();let Sn=Jt.filter(gn=>!d.visibleLayers.has(gn));try{window.sessionStorage.setItem("or_hidden_layers",JSON.stringify(Sn))}catch{}d.syncDisplayState(),he?q.mirrorStates(nn):vn&&(q.mirrorStatesQuiet(nn),q.forEach(gn=>{gn.cb&&(gn.cb.checked=gn.checked,gn.cb.indeterminate=gn.indeterminate)}))});d.layerModel=Lt,Lt.addFromSpec(Pt);let be=new nv(()=>{d.selectableLayers.clear(),be.forEach(nn=>{nn.checked&&nn.data&&nn.data.name&&d.selectableLayers.add(nn.data.name)}),ln();let Jt=m.layers.filter(nn=>!d.selectableLayers.has(nn));try{window.sessionStorage.setItem("or_nonselectable_layers",JSON.stringify(Jt))}catch{}d.syncDisplayState()});be.addFromSpec(ot);function ln(){be.forEach(Jt=>{if(!Jt.selCb)return;Jt.selCb.checked=Jt.checked,Jt.selCb.indeterminate=Jt.indeterminate;let nn=Lt.get(Jt.id),vn=nn&&!nn.checked&&!nn.indeterminate;Jt.selCb.disabled=vn})}let Fn=document.createElement("div");Fn.className="context-menu",Fn.style.display="none",document.body.appendChild(Fn);function ne(Jt){let nn={};W.forEach((vn,he)=>{vn&&(nn[vn]=Jt.has(he))}),Lt.checkSet(nn)}function xe(){Fn.style.display="none"}function re(Jt,nn){let vn=document.createElement("div");vn.className="context-menu-item",vn.textContent=Jt,vn.addEventListener("click",()=>{nn(),xe()}),Fn.appendChild(vn)}let hn=U.length,Se=[{label:"Show only this layer",fn:Jt=>VU(Jt,0,0,hn)},{label:"Show layer range \u2195",fn:Jt=>VU(Jt,1,1,hn)},{label:"Show layer range \u2195\u2195",fn:Jt=>VU(Jt,2,2,hn)},{label:"Show layer range \u2193",fn:Jt=>VU(Jt,1,0,hn)},{label:"Show layer range \u2191",fn:Jt=>VU(Jt,0,1,hn)}];document.addEventListener("click",Jt=>{Fn.contains(Jt.target)||xe()}),document.addEventListener("keydown",Jt=>{Jt.key==="Escape"&&xe()});let ke=!Sc(d),mn=null;function en(){mn&&(mn.classList.remove("vis-row-selected"),mn=null)}ke&&nJt(d,en);function Qn(Jt,nn,vn){let he=wg(d);mn=Jt,Jt.classList.add("vis-row-selected");let Mn={type:"select_layer",layer:nn,use_dbu:d.showDbu};vn&&(Mn.chiplet=vn),d.websocketManager.request(Mn).then(Sn=>{N0(d,he)&&(d.updateInspector&&d.updateInspector(Sn),d.focusComponent&&d.focusComponent("Inspector"),d.refreshOverlay&&d.refreshOverlay())}).catch(Sn=>{console.error("select_layer failed:",Sn),N0(d,he)&&en()})}function ge(Jt,nn=!1){let vn=be.get(Jt.id);if(!Jt.children||Jt.children.length===0){let he=document.createElement("div");he.className=ke?"vis-leaf vis-leaf-selectable":"vis-leaf";let Mn=document.createElement("span");Mn.className="vis-arrow",Mn.style.visibility="hidden",Mn.textContent="\u25B6",he.appendChild(Mn);let Sn=Jt.data.colorIndex,gn=Jt.data.name,Ce=_R(),dn=document.createElement("span");dn.className="layer-color";let jn=Jt.data.color||m.layer_colors&&m.layer_colors[Sn]||JJt[Sn%JJt.length];dn.style.backgroundColor=`rgb(${jn[0]},${jn[1]},${jn[2]})`,Ce.appendChild(dn),Ce.appendChild(document.createTextNode(gn)),he.appendChild(Ce),ke&&Ce.addEventListener("click",()=>{Qn(he,gn,Jt.data.ownerChipletPath)});let ar=document.createElement("input");if(ar.type="checkbox",ar.className="vis-cb",ar.title="Visible",ar.checked=Jt.checked,Jt.cb=ar,ar.addEventListener("change",()=>{Lt.check(Jt.id,ar.checked)}),he.appendChild(ar),vn){let gr=document.createElement("input");gr.type="checkbox",gr.className="vis-sel-cb",gr.title="Selectable",gr.checked=vn.checked,vn.selCb=gr,gr.addEventListener("change",()=>{be.check(Jt.id,gr.checked)}),he.appendChild(gr)}else he.appendChild(bS());return he.addEventListener("contextmenu",gr=>{gr.preventDefault(),gr.stopPropagation(),Fn.innerHTML="";for(let Qt of Se)re(Qt.label,()=>ne(Qt.fn(Sn)));let tr=document.createElement("div");tr.className="context-menu-separator",tr.style.borderTop="1px solid #555",tr.style.margin="4px 0",Fn.appendChild(tr);let Ln=d.layerPatterns[gn]??1;for(let Qt of ft){let Mi=Ln===Qt.value?"\u25CF ":" ";re(Mi+"Fill: "+Qt.label,()=>gt(gn,Jt.data.layer,Qt.value))}Fn.style.left=gr.clientX+"px",Fn.style.top=gr.clientY+"px",Fn.style.display="block"}),he}else{let he=document.createElement("div");he.className="vis-group";let{header:Mn,arrow:Sn,name:gn}=sk();gn.textContent=nn?"Layers":Jt.data.name||"Group";let Ce=document.createElement("input");if(Ce.type="checkbox",Ce.className="vis-cb",Ce.title="Visible",Ce.checked=Jt.checked,Ce.indeterminate=Jt.indeterminate,Jt.cb=Ce,Ce.addEventListener("change",()=>{Lt.check(Jt.id,Ce.checked)}),Mn.appendChild(Ce),vn){let jn=document.createElement("input");jn.type="checkbox",jn.className="vis-sel-cb",jn.title="Selectable",jn.checked=vn.checked,jn.indeterminate=vn.indeterminate,vn.selCb=jn,jn.addEventListener("change",()=>{be.check(Jt.id,jn.checked)}),Mn.appendChild(jn)}else Mn.appendChild(bS());he.appendChild(Mn);let dn=document.createElement("div");dn.className="vis-group-children";for(let jn of Jt.children)dn.appendChild(ge(jn,!1));return he.appendChild(dn),ok(Mn,Sn,dn,!!(Jt.data&&Jt.data.startCollapsed)),he}}let Pe=Lt.roots[0]||Lt.get("layers_parent"),ti=ge(Pe,!0);d.displayControlsEl.appendChild(ti),ln();let Yi=m&&Array.isArray(m.chiplets)?m.chiplets:[];if(Yi.length>1){let dn=function(sn,Zn){let oi=Ce.get(sn);oi&&(Lt.cascadeQuiet(oi.id,Zn),Lt.onChange())},Mi=function(sn){let Zn=sn.data;if(sn!==Ln){let oi=document.createElement("div");oi.className="vis-leaf",oi.style.paddingLeft=8*(Zn.depth-1)+"px",oi.title=Zn.path+(Zn.master?` (${Zn.master})`:""),oi.appendChild(_R(Zn.name));let Jr=document.createElement("input");Jr.type="checkbox",Jr.className="vis-cb",Jr.checked=sn.checked,Jr.indeterminate=sn.indeterminate,sn.cb=Jr,Jr.addEventListener("change",()=>{q.check(sn.id,Jr.checked),dn(Zn.path,Jr.checked)}),oi.appendChild(Jr),oi.appendChild(bS()),Qt.appendChild(oi)}sn.children&&sn.children.forEach(Mi)},Jt=m&&m.block_name||"",nn=Jt!=="",vn={};if(nn)try{let sn=qf("or_hidden_chiplets");if(sn){let Zn=JSON.parse(decodeURIComponent(sn));Zn&&typeof Zn=="object"&&!Array.isArray(Zn)&&(vn=Zn)}}catch{}let he=new Set(Array.isArray(vn[Jt])?vn[Jt]:[]),Mn=Qke(Yi,he),Sn=Mn.findIndex(sn=>sn.parentId===null),gn=Sn>=0?Mn[Sn].id:null;if(Sn>=0&&(Mn[Sn].hasCheckbox=!0),d.visibleChiplets=new Set(Yi.filter(sn=>!he.has(sn.path)).map(sn=>sn.path)),q=new nv(()=>{let sn=new Set;if(q.forEach(Zn=>{Zn.cb&&(Zn.cb.checked=Zn.checked,Zn.cb.indeterminate=Zn.indeterminate),Zn.data&&Zn.data.path&&(Zn.checked||Zn.indeterminate)&&sn.add(Zn.data.path)}),d.visibleChiplets=sn,nn){let Zn=Yi.filter(Jr=>!sn.has(Jr.path)).map(Jr=>Jr.path),oi={};try{let Jr=qf("or_hidden_chiplets");if(Jr){let Bs=JSON.parse(decodeURIComponent(Jr));Bs&&typeof Bs=="object"&&!Array.isArray(Bs)&&(oi=Bs)}}catch{}Zn.length===0?delete oi[Jt]:oi[Jt]=Zn,Rd("or_hidden_chiplets",encodeURIComponent(JSON.stringify(oi)))}_()}),q.buildFromNodes(Mn),typeof console<"u"&&console.warn){let sn=new Set;Lt.forEach(oi=>{oi.data&&oi.data.chipletPath&&sn.add(oi.data.chipletPath)});let Zn=new Set;q.forEach(oi=>{oi.data&&oi.data.path&&Zn.add(oi.data.path)});for(let oi of Zn)sn.has(oi)||console.warn(`[display-controls] chiplet "${oi}" missing from layer_hierarchy \u2014 Layers/Chiplets sync may drift`);for(let oi of sn)Zn.has(oi)||console.warn(`[display-controls] layer hierarchy node "${oi}" has no matching chiplet \u2014 Layers/Chiplets sync may drift`)}let Ce=new Map;Lt.forEach(sn=>{sn.data&&sn.data.chipletPath&&Ce.set(sn.data.chipletPath,sn)});{let sn={};if(Lt.forEach(Zn=>{if(!Zn.data||!Zn.data.chipletPath)return;let oi=Zn.data.chipletPath;he.has(oi)||q.get(oi)&&(sn[oi]={checked:Zn.checked,indeterminate:Zn.indeterminate})}),Object.keys(sn).length>0){q.mirrorStatesQuiet(sn);let Zn=new Set;q.forEach(oi=>{oi.data&&oi.data.path&&(oi.checked||oi.indeterminate)&&Zn.add(oi.data.path)}),d.visibleChiplets=Zn}}let jn=document.createElement("div");jn.className="vis-group";let{header:ar,arrow:gr,name:tr}=sk();tr.textContent="Chiplets";let Ln=gn!=null?q.get(gn):null;if(Ln){let sn=document.createElement("input");sn.type="checkbox",sn.className="vis-cb",sn.checked=Ln.checked,sn.indeterminate=Ln.indeterminate,Ln.cb=sn,sn.addEventListener("change",Zn=>{Zn.stopPropagation(),q.check(gn,sn.checked),Ln.data&&Ln.data.path&&dn(Ln.data.path,sn.checked)}),ar.appendChild(sn)}ar.appendChild(bS()),jn.appendChild(ar);let Qt=document.createElement("div");Qt.className="vis-group-children",q.roots.forEach(Mi),jn.appendChild(Qt),ok(ar,gr,Qt,!1),d.displayControlsEl.appendChild(jn)}else d.visibleChiplets=null;let ki=!!s.debug_renderers,lr=new bnt(s,h,()=>{_(),!!s.debug_renderers!==ki&&(ki=!!s.debug_renderers,d.refreshRendererControls&&d.refreshRendererControls())});lr.add({label:"Nets",addSelectable:!0,children:[{key:"net_signal",label:"Signal"},{key:"net_power",label:"Power"},{key:"net_ground",label:"Ground"},{key:"net_clock",label:"Clock"},{key:"net_reset",label:"Reset"},{key:"net_tieoff",label:"Tie off"},{key:"net_scan",label:"Scan"},{key:"net_analog",label:"Analog"}]}),lr.add({label:"Instances",addSelectable:!0,children:[{label:"Std Cells",visKey:"stdcells",disabled:!d.hasLiberty,children:[{label:"Bufs/Invs",children:[{key:"std_bufinv_timing",label:"Timing opt."},{key:"std_bufinv",label:"Netlist"}]},{key:"std_combinational",label:"Combinational"},{key:"std_sequential",label:"Sequential"},{label:"Clock tree",children:[{key:"std_clock_bufinv",label:"Buffer/Inverter"},{key:"std_clock_gate",label:"Clock gate"}]},{key:"std_level_shift",label:"Level shifter"}]},{key:"macros",label:"Macros"},{label:"Pads",children:[{key:"pad_input",label:"Input"},{key:"pad_output",label:"Output"},{key:"pad_inout",label:"Inout"},{key:"pad_power",label:"Power"},{key:"pad_spacer",label:"Spacer"},{key:"pad_areaio",label:"Area IO"},{key:"pad_other",label:"Other"}]},{label:"Physical",children:[{key:"phys_fill",label:"Fill"},{key:"phys_endcap",label:"Endcap"},{key:"phys_welltap",label:"Welltap"},{key:"phys_tie",label:"Tie Hi/Lo"},{key:"phys_antenna",label:"Antenna"},{key:"phys_cover",label:"Cover"},{key:"phys_bump",label:"Bump"},{key:"phys_other",label:"Other"}]}]}),lr.add({label:"Blockages",addSelectable:!0,children:[{key:"placement_blockages",label:"Placement"},{key:"routing_obstructions",label:"Routing"}]}),m.sites&&m.sites.length>0&&lr.add({label:"Rows",visKey:"rows",addSelectable:!0,children:m.sites.map(Jt=>({key:"site_"+Jt,label:Jt}))}),lr.add({label:"Tracks",children:[{key:"tracks_pref",label:"Pref"},{key:"tracks_non_pref",label:"Non Pref"}]}),lr.add({label:"Shapes",children:[{label:"Routing",visKey:"routing",children:[{key:"routing_segments",label:"Segments"},{key:"routing_vias",label:"Vias"}]},{label:"Special Routing",visKey:"special_nets",children:[{key:"srouting_segments",label:"Segments"},{key:"srouting_vias",label:"Vias"}]},{key:"pins",label:"Pins",selectable:!0},{key:"pin_names",label:"Pin Names",disabledBy:"pins"},{key:"fills",label:"Fills"}]}),lr.add({label:"Misc",children:[{label:"Instances",children:[{key:"inst_names",label:"Names"},{key:"inst_pins",label:"Pins",selectable:!0},{key:"inst_pin_names",label:"Pin Names",disabledBy:"inst_pins"},{key:"blockages",label:"Blockages"}]},{key:"detailed",label:"Detailed view"},{key:"rulers",label:"Rulers"},{key:"labels",label:"Labels"},{key:"scale_bar",label:"Scale bar"},{key:"access_points",label:"Access Points"},{key:"regions",label:"Regions"},{key:"mfg_grid",label:"Manufacturing grid"},{key:"gcell_grid",label:"GCell grid"},{key:"flywires_only",label:"Flywires only"},{key:"focused_nets_guides",label:"Focused nets guides"},{key:"highlight_selected",label:"Highlight selected"}]}),lr.add({key:"module_view",label:"Module view"}),lr.add({label:"Debug Graphics",children:[{key:"debug_renderers",label:"Renderers"},{key:"debug_live",label:"Live (don't require pause)",disabledBy:"debug_renderers"},{key:"debug",label:"Tiles"}]}),lr.render(d.displayControlsEl);let pr=document.createElement("div");pr.className="renderer-controls",d.displayControlsEl.appendChild(pr);function Kt(Jt){return Promise.all(Jt.map(({path:nn,value:vn})=>d.websocketManager.request({type:"set_renderer_control",path:nn,value:vn}))).catch(()=>{})}function wn(Jt){pr.innerHTML="";let nn=new Map;for(let vn of Jt||[]){let he=vn.group||"";nn.has(he)||nn.set(he,[]),nn.get(he).push(vn)}for(let[vn,he]of nn){let Mn=pr;if(vn){let Sn=document.createElement("div");Sn.className="vis-group";let{header:gn,arrow:Ce,name:dn}=sk();dn.textContent=vn;let jn=document.createElement("input");jn.type="checkbox",jn.className="vis-cb",jn.title="Visible";let ar=he.filter(tr=>tr.visible).length;jn.checked=ar===he.length,jn.indeterminate=ar>0&&ar{let tr=jn.checked;Kt(he.filter(Ln=>!!Ln.visible!==tr).map(Ln=>({path:Ln.path,value:tr})))}),gn.appendChild(jn),gn.appendChild(bS()),Sn.appendChild(gn);let gr=document.createElement("div");gr.className="vis-group-children",Sn.appendChild(gr),ok(gn,Ce,gr,!1),pr.appendChild(Sn),Mn=gr}for(let Sn of he){let gn=document.createElement("div");gn.className="vis-leaf";let Ce=document.createElement("span");Ce.className="vis-arrow",Ce.style.visibility="hidden",Ce.textContent="\u25B6",gn.appendChild(Ce),gn.appendChild(_R(Sn.name));let dn=document.createElement("input");dn.type="checkbox",dn.className="vis-cb",dn.title="Visible",dn.checked=!!Sn.visible,dn.addEventListener("change",()=>Kt([{path:Sn.path,value:dn.checked}])),gn.appendChild(dn),gn.appendChild(bS()),Mn.appendChild(gn)}}}d.refreshRendererControls=function(){return!d.websocketManager||Sc(d)||!s.debug_renderers?(pr.innerHTML="",Promise.resolve()):d.websocketManager.request({type:"renderer_controls"}).then(Jt=>wn(Jt.controls)).catch(()=>{})},d.refreshRendererControls();let it=document.createElement("div");it.className="bg-color-row";let ut=document.createElement("span");ut.textContent="Background";let kt=document.createElement("input");kt.type="color",kt.className="bg-color-input",kt.title="Layout background color";let Nt=qf("or_bg_color");kt.value=mR(Nt)?Nt:Z2t(),kt.addEventListener("input",()=>{document.documentElement.style.setProperty("--bg-map",kt.value)}),kt.addEventListener("change",()=>{OJt(kt.value,d)});let ie=document.createElement("button");ie.className="bg-color-reset",ie.textContent="Reset",ie.title="Reset background to the theme default",ie.addEventListener("click",()=>{BJt(d),kt.value=Z2t()}),it.appendChild(ut),it.appendChild(kt),it.appendChild(ie),d.heatMapLayer||(d.heatMapLayer=new E(d.websocketManager,d,{zIndex:U.length+10,opacity:1}));let rn=document.createElement("div");rn.className="vis-group heatmap-controls",d.displayControlsEl.appendChild(rn);let{header:Pn,arrow:Tt,name:yt}=sk("vis-group-header heatmap-header");yt.textContent="Heat Maps",rn.appendChild(Pn);let ue=document.createElement("div");ue.className="vis-group-children heatmap-group-children",rn.appendChild(ue),ok(Pn,Tt,ue,!0),d.displayControlsEl.appendChild(it);function fn(Jt,nn,vn,he){let Mn=document.createElement("label");Mn.className="heatmap-setting";let Sn=document.createElement("input");Sn.type="checkbox",Sn.checked=vn,Sn.addEventListener("change",()=>he(Sn.checked)),Mn.appendChild(Sn),Mn.appendChild(document.createTextNode(nn)),Jt.appendChild(Mn)}function An(Jt,nn,vn,he,Mn){let Sn=document.createElement("label");Sn.className="heatmap-setting";let gn=document.createElement("span");gn.textContent=nn;let Ce=document.createElement("input");Ce.type="number",Ce.value=String(vn),Ce.step=String(he||1),Ce.addEventListener("change",()=>Mn(parseFloat(Ce.value))),Sn.appendChild(gn),Sn.appendChild(Ce),Jt.appendChild(Sn)}function zn(Jt,nn,vn,he,Mn){let Sn=document.createElement("label");Sn.className="heatmap-setting";let gn=document.createElement("span");gn.textContent=nn;let Ce=document.createElement("select");for(let dn of he){let jn=document.createElement("option");jn.value=dn,jn.textContent=dn,dn===vn&&(jn.selected=!0),Ce.appendChild(jn)}Ce.addEventListener("change",()=>Mn(Ce.value)),Sn.appendChild(gn),Sn.appendChild(Ce),Jt.appendChild(Sn)}function Li(Jt){d.websocketManager.request(Jt).then(nn=>{d.updateHeatMaps&&d.updateHeatMaps(nn)}).catch(nn=>console.error("Heat map update failed",nn))}function xi(Jt){if(!d.heatMapLegendEl)return;let nn=d.heatMapLegendEl;if(nn.innerHTML="",!Jt||!Jt.show_legend||!Jt.legend||Jt.legend.length===0){nn.classList.add("hidden");return}let vn=document.createElement("div");vn.className="heatmap-map-legend-title",vn.textContent=Jt.title,nn.appendChild(vn);let he=document.createElement("div");he.className="heatmap-map-legend-units",he.textContent=Jt.units||"",nn.appendChild(he);let Mn=document.createElement("div");Mn.className="heatmap-map-legend-list";for(let Sn of Jt.legend){let gn=document.createElement("div");gn.className="heatmap-legend-row";let Ce=document.createElement("span");Ce.className="heatmap-legend-swatch",Ce.style.backgroundColor=`rgba(${Sn.color[0]}, ${Sn.color[1]}, ${Sn.color[2]}, ${Sn.color[3]/255})`;let dn=document.createElement("span");dn.textContent=Sn.value,gn.appendChild(Ce),gn.appendChild(dn),Mn.appendChild(gn)}nn.appendChild(Mn),nn.classList.remove("hidden")}d.renderHeatMapControls=Jt=>{ue.innerHTML="";let nn=document.createElement("div");nn.className="heatmap-list",ue.appendChild(nn);let vn=document.createElement("label");vn.className="heatmap-setting";let he=document.createElement("input");he.type="radio",he.name="active-heatmap",he.checked=!Jt.active,he.addEventListener("change",()=>{Li({type:"set_active_heatmap",name:""})}),vn.appendChild(he),vn.appendChild(document.createTextNode("Off")),nn.appendChild(vn);for(let Ce of Jt.heatmaps||[]){let dn=document.createElement("label");dn.className="heatmap-setting";let jn=document.createElement("input");jn.type="radio",jn.name="active-heatmap",jn.checked=Ce.name===Jt.active,jn.addEventListener("change",()=>{Li({type:"set_active_heatmap",name:Ce.name})}),dn.appendChild(jn),dn.appendChild(document.createTextNode(Ce.title)),nn.appendChild(dn)}let Mn=(Jt.heatmaps||[]).find(Ce=>Ce.name===Jt.active);if(xi(Mn),!Mn)return;let Sn=document.createElement("div");Sn.className="heatmap-settings",ue.appendChild(Sn),An(Sn,"Display min",Mn.display_min,Mn.display_range_increment,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"DisplayMin",value:Ce})}),An(Sn,"Display max",Mn.display_max,Mn.display_range_increment,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"DisplayMax",value:Ce})}),fn(Sn,"Show below min",Mn.draw_below_min,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"ShowMin",value:Ce})}),fn(Sn,"Show above max",Mn.draw_above_max,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"ShowMax",value:Ce})}),fn(Sn,"Log scale",Mn.log_scale,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"LogScale",value:Ce})}),fn(Sn,"Reverse log",Mn.reverse_log,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"ReverseLog",value:Ce})}),Mn.can_adjust_grid&&(An(Sn,"Grid X",Mn.grid_x,.1,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"GridX",value:Ce})}),An(Sn,"Grid Y",Mn.grid_y,.1,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"GridY",value:Ce})})),An(Sn,"Alpha",Mn.alpha,1,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"Alpha",value:Ce})}),fn(Sn,"Legend",Mn.show_legend,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"ShowLegend",value:Ce})}),Mn.supports_numbers&&fn(Sn,"Show numbers",Mn.show_numbers,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"ShowNumbers",value:Ce})});for(let Ce of Mn.options||[])Ce.type==="bool"?fn(Sn,Ce.label,Ce.value,dn=>{Li({type:"set_heatmap",name:Mn.name,option:Ce.name,value:dn})}):Ce.type==="choice"&&zn(Sn,Ce.label,Ce.value,Ce.choices||[],dn=>{Li({type:"set_heatmap",name:Mn.name,option:Ce.name,value:dn})});Mn.selection_filter_label&&fn(Sn,Mn.selection_filter_label,Mn.use_selected_only,Ce=>{Li({type:"set_heatmap",name:Mn.name,option:"use_selected_only",value:Ce})});let gn=document.createElement("button");gn.className="or-btn or-btn-sm heatmap-rebuild",gn.textContent="Rebuild data",gn.addEventListener("click",()=>{Li({type:"set_heatmap",name:Mn.name,option:"rebuild",value:1})}),Sn.appendChild(gn)}}var tQt="search-nav-dialog",t5e=[{label:"Instance",value:"inst"},{label:"Net",value:"net"},{label:"Port",value:"port"}];function vnt(d){if(!d.designScale)return;let s=t5e.map(B=>``).join(""),{overlay:h,close:p,okBtn:m,showError:_}=bR("Find Object",`
`,"Find",tQt),E=h.querySelector(".sn-pattern"),y=h.querySelector(".sn-type"),I=h.querySelector(".sn-case");E.focus();function N(){let B=E.value.trim();if(!B){_("Enter a name or glob pattern.");return}d.websocketManager&&(_("Searching\u2026",!0),d.websocketManager.request({type:"find",obj_type:y.value,pattern:B,match_case:I.checked}).then(P=>{mR(d,P);let U=P&&P.count?P.count:0;if(!U){_("No objects found.");return}Array.isArray(P.bbox)&&(d.lastSelectionBounds=Vf(P.bbox[0],P.bbox[1],P.bbox[2],P.bbox[3],d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY),d.map.fitBounds(d.lastSelectionBounds)),typeof d.updateInspector=="function"&&d.updateInspector(P),typeof d.redrawAllLayers=="function"&&d.redrawAllLayers();let j=P.selection_count||U;_(P.truncated?`${U} found (showing first ${j}).`:`${U} found.`,!0)}).catch(P=>_("Find failed: "+P)))}return m.addEventListener("click",N),E.addEventListener("keydown",B=>{B.key==="Enter"&&(B.preventDefault(),N())}),{close:p}}function vnt(d){if(!d.designScale||!d.map)return;let s=V=>d.formatDbu(V),h=V=>d.parseDbu(V),p=d.unitLabel(),m=d.map.getCenter(),_=tv(m.lat,m.lng,d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY),{overlay:E,close:y,okBtn:I,showError:N}=vR("Go to Position",` + `,"Find",tQt),E=h.querySelector(".sn-pattern"),y=h.querySelector(".sn-type"),I=h.querySelector(".sn-case");E.focus();function O(){let B=E.value.trim();if(!B){_("Enter a name or glob pattern.");return}d.websocketManager&&(_("Searching\u2026",!0),d.websocketManager.request({type:"find",obj_type:y.value,pattern:B,match_case:I.checked}).then(P=>{pR(d,P);let U=P&&P.count?P.count:0;if(!U){_("No objects found.");return}Array.isArray(P.bbox)&&(d.lastSelectionBounds=Vf(P.bbox[0],P.bbox[1],P.bbox[2],P.bbox[3],d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY),d.map.fitBounds(d.lastSelectionBounds)),typeof d.updateInspector=="function"&&d.updateInspector(P),typeof d.redrawAllLayers=="function"&&d.redrawAllLayers();let W=P.selection_count||U;_(P.truncated?`${U} found (showing first ${W}).`:`${U} found.`,!0)}).catch(P=>_("Find failed: "+P)))}return m.addEventListener("click",O),E.addEventListener("keydown",B=>{B.key==="Enter"&&(B.preventDefault(),O())}),{close:p}}function _nt(d){if(!d.designScale||!d.map)return;let s=q=>d.formatDbu(q),h=q=>d.parseDbu(q),p=d.unitLabel(),m=d.map.getCenter(),_=Qw(m.lat,m.lng,d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY),{overlay:E,close:y,okBtn:I,showError:O}=bR("Go to Position",`
-
`,"Go to",tQt),B=E.querySelector(".sn-x"),P=E.querySelector(".sn-y"),U=E.querySelector(".sn-size");B.focus(),B.select();function j(){let V=h(B.value),tt=h(P.value);if(V===null||tt===null){N(`X and Y must be numbers (${p}).`);return}let Q=Id(V,tt,d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY),X=U.value.trim(),gt=X?h(X):null;if(gt!==null&>>0){let ft=gt/2;d.map.fitBounds(Vf(V-ft,tt-ft,V+ft,tt+ft,d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY))}else d.map.setView(Q,d.map.getZoom());y()}I.addEventListener("click",j);for(let V of[B,P,U])V.addEventListener("keydown",tt=>{tt.key==="Enter"&&(tt.preventDefault(),j())});return{close:y}}var eQt={ctrl:"ctrl",control:"ctrl",shift:"shift",alt:"alt",meta:"meta",cmd:"meta",command:"meta",super:"meta"};function t5e(d){if(typeof d!="string")return null;let s=d.split("+").map(_=>_.trim().toLowerCase()).filter(Boolean);if(s.length===0)return null;let h=s.pop();if(eQt[h]!==void 0)return null;let p=new Set;for(let _ of s){let E=eQt[_];if(E===void 0)return null;p.add(E)}return[...["ctrl","alt","shift","meta"].filter(_=>p.has(_)),h].join("+")}function e5e(d){let s=[];return d.ctrlKey&&s.push("ctrl"),d.altKey&&s.push("alt"),d.shiftKey&&s.push("shift"),d.metaKey&&s.push("meta"),[...s,String(d.key).toLowerCase()].join("+")}function iQt(d){let s=B=>()=>d.focusComponent(B,{reveal:!0}),h=[{label:"File",items:[{label:"Open DB...",action:()=>nQt(d,"Open DB","read_db"),enabledWhen:()=>!d.designScale},{label:"Save DB...",action:()=>nQt(d,"Save DB","write_db"),enabledWhen:()=>!!d.designScale}]},{label:"View",items:[{label:"Fit",shortcut:"F",action:()=>{d.fitBounds&&d.map.fitBounds(d.fitBounds)}},{label:"Zoom In",shortcut:"Z",action:()=>d.map.zoomIn()},{label:"Zoom Out",shortcut:"Shift+Z",action:()=>d.map.zoomOut()},{type:"separator"},{label:"Toggle Theme",shortcut:"T",action:()=>d.toggleTheme()},{type:"separator"},{label:"Find...",shortcut:"Ctrl+F",action:()=>wnt(d),enabledWhen:()=>!!d.designScale},{label:"Go to Position...",shortcut:"Shift+G",action:()=>vnt(d),enabledWhen:()=>!!d.designScale}]},{label:"Tools",items:[{label:"Ruler",shortcut:"K",action:()=>{d.rulerManager&&d.rulerManager.toggleRulerMode()}},{label:"Clear Rulers",shortcut:"Shift+K",action:()=>{d.rulerManager&&d.rulerManager.clearAllRulers()}},{type:"separator"},{label:"Add Label",shortcut:"L",action:()=>{d.labelManager&&d.labelManager.toggleLabelMode()}},{label:"Clear Labels",action:()=>{d.labelManager&&d.labelManager.clearAllLabels()}},{type:"separator"},{label:"Clear Highlights",action:()=>{d.websocketManager.request({type:"clear_highlights",group:-1}).then(()=>{d.refreshOverlay&&d.refreshOverlay(),d.refreshInspector&&d.refreshInspector()}).catch(()=>{})}},{type:"separator"},{label:"Global Connect...",action:()=>{d.showGlobalConnectDialog&&d.showGlobalConnectDialog()},enabledWhen:()=>!!d.designScale}]},{label:"Options",items:[{label:"Show DBU",action:()=>d.toggleShowDbu(),checked:()=>d.showDbu},{label:"Make euclidian rulers",action:()=>d.toggleRulerStyle(),checked:()=>d.rulerStyle!=="manhattan"},{type:"separator"},{label:"Mouse wheel mapped to zoom by default",action:()=>d.toggleWheelZoom(),checked:()=>d.wheelZoom},{label:"Arrow keys scroll step...",action:()=>d.showArrowStepDialog()},{label:"Application font...",action:()=>d.showAppFontDialog()},{type:"separator"},{label:"Show polygon decomposition",action:()=>d.togglePolyDecomp(),checked:()=>d.polyDecomp,enabledWhen:()=>!!d.designScale}]},{label:"Windows",items:[{label:"Layout Viewer",action:s("LayoutViewer")},{label:"3D Viewer",action:s("3DViewer")},{label:"Display Controls",action:s("DisplayControls")},{label:"Inspector",action:s("Inspector")},{label:"Selection Browser",action:s("SelectHighlight")},{label:"Tcl Console",action:s("TclConsole")},{label:"Hierarchy Browser",action:s("Browser")},{label:"Timing",action:s("TimingWidget")},{label:"DRC Viewer",action:s("DRCWidget")},{label:"Clock Tree",action:s("ClockWidget")},{label:"Charts",action:s("ChartsWidget")},{label:"Help",action:s("HelpWidget")},{type:"separator"},{label:"Reset to Default Layout",action:()=>d.resetLayout()}]},{label:"Help",items:[{label:"Keyboard Shortcuts",action:s("HelpWidget")}]}],p=document.getElementById("menu-bar"),m=null,_=new Map;function E(){m&&(m.classList.remove("open"),m=null)}function y(){let B=h.map(V=>({label:V.label,items:V.items.slice()})),P=new Map(B.map(V=>[V.label,V]));function U(V){let tt=P.get(V);return tt||(tt={label:V,items:[]},P.set(V,tt),B.push(tt)),tt}function j(V,tt){let Q=V.items.find(X=>X.submenu&&X.label===tt);return Q||(Q={label:tt,submenu:{label:tt,items:[]}},V.items.push(Q)),Q.submenu}for(let V of d.customMenu||[]){let tt=String(V.path||"Custom Scripts").split("/").map(ft=>ft.trim()).filter(Boolean);tt.length===0&&tt.push("Custom Scripts");let Q=U(tt[0]);for(let ft=1;ftjU(d,V.script,V.echo);Q.items.push({label:V.text,shortcut:V.shortcut,action:X});let gt=t5e(V.shortcut);gt&&_.set(gt,X)}return B}function I(B,P){for(let U of P){if(U.type==="separator"){let tt=document.createElement("div");tt.className="menu-separator",B.appendChild(tt);continue}let j=document.createElement("div");if(j.className="menu-item",U.submenu){j.classList.add("submenu-item");let tt=document.createElement("span");tt.textContent=U.label,j.appendChild(tt);let Q=document.createElement("span");Q.className="submenu-arrow",Q.textContent="\u25B8",j.appendChild(Q);let X=document.createElement("div");X.className="menu-dropdown submenu",I(X,U.submenu.items),j.appendChild(X),B.appendChild(j);continue}if(U.disabled&&j.classList.add("disabled"),U.enabledWhen&&(j._enabledWhen=U.enabledWhen),U.checked){let tt=document.createElement("span");tt.className="menu-check",tt.textContent=U.checked()?"\u2713":"",j.appendChild(tt),j._checkedFn=U.checked}let V=document.createElement("span");if(V.textContent=U.label,j.appendChild(V),U.shortcut){let tt=document.createElement("span");tt.className="shortcut",tt.textContent=U.shortcut,j.appendChild(tt)}U.action&&j.addEventListener("click",tt=>{j.classList.contains("disabled")||(tt.stopPropagation(),E(),U.action())}),B.appendChild(j)}}function N(){for(let P of p.querySelectorAll(":scope > .menu-label"))P.remove();let B=p.firstChild;m=null,_.clear();for(let P of y()){let V=function(){for(let tt of j.querySelectorAll(".menu-item"))if(tt._enabledWhen&&tt.classList.toggle("disabled",!tt._enabledWhen()),tt._checkedFn){let Q=tt.querySelector(".menu-check");Q&&(Q.textContent=tt._checkedFn()?"\u2713":"")}},U=document.createElement("div");U.className="menu-label",U.textContent=P.label;let j=document.createElement("div");j.className="menu-dropdown",I(j,P.items),U.appendChild(j),U.addEventListener("click",tt=>{tt.stopPropagation(),m===U?E():(E(),V(),U.classList.add("open"),m=U)}),U.addEventListener("mouseenter",()=>{m&&m!==U&&(E(),V(),U.classList.add("open"),m=U)}),p.insertBefore(U,B)}}N(),d.rebuildMenuBar=N,document.addEventListener("click",E),n5e(_)}function n5e(d){document.addEventListener("keydown",s=>{if(d.size===0)return;let h=s.target.tagName;if(h==="INPUT"||h==="TEXTAREA"||s.target.isContentEditable)return;let p=d.get(e5e(s));p&&(s.preventDefault(),s.stopImmediatePropagation(),p())},!0)}function nQt(d,s,h){let p=h==="write_db",m=document.createElement("div");m.className="modal-overlay",m.innerHTML=` +
`,"Go to",tQt),B=E.querySelector(".sn-x"),P=E.querySelector(".sn-y"),U=E.querySelector(".sn-size");B.focus(),B.select();function W(){let q=h(B.value),et=h(P.value);if(q===null||et===null){O(`X and Y must be numbers (${p}).`);return}let Q=Id(q,et,d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY),X=U.value.trim(),gt=X?h(X):null;if(gt!==null&>>0){let ft=gt/2;d.map.fitBounds(Vf(q-ft,et-ft,q+ft,et+ft,d.designScale,d.designMaxDXDY,d.designOriginX,d.designOriginY))}else d.map.setView(Q,d.map.getZoom());y()}I.addEventListener("click",W);for(let q of[B,P,U])q.addEventListener("keydown",et=>{et.key==="Enter"&&(et.preventDefault(),W())});return{close:y}}var eQt={ctrl:"ctrl",control:"ctrl",shift:"shift",alt:"alt",meta:"meta",cmd:"meta",command:"meta",super:"meta"};function e5e(d){if(typeof d!="string")return null;let s=d.split("+").map(_=>_.trim().toLowerCase()).filter(Boolean);if(s.length===0)return null;let h=s.pop();if(eQt[h]!==void 0)return null;let p=new Set;for(let _ of s){let E=eQt[_];if(E===void 0)return null;p.add(E)}return[...["ctrl","alt","shift","meta"].filter(_=>p.has(_)),h].join("+")}function n5e(d){let s=[];return d.ctrlKey&&s.push("ctrl"),d.altKey&&s.push("alt"),d.shiftKey&&s.push("shift"),d.metaKey&&s.push("meta"),[...s,String(d.key).toLowerCase()].join("+")}function iQt(d){let s=B=>()=>d.focusComponent(B,{reveal:!0}),h=[{label:"File",items:[{label:"Open DB...",action:()=>nQt(d,"Open DB","read_db"),enabledWhen:()=>!d.designScale},{label:"Save DB...",action:()=>nQt(d,"Save DB","write_db"),enabledWhen:()=>!!d.designScale}]},{label:"View",items:[{label:"Fit",shortcut:"F",action:()=>{d.fitBounds&&d.map.fitBounds(d.fitBounds)}},{label:"Zoom In",shortcut:"Z",action:()=>d.map.zoomIn()},{label:"Zoom Out",shortcut:"Shift+Z",action:()=>d.map.zoomOut()},{type:"separator"},{label:"Toggle Theme",shortcut:"T",action:()=>d.toggleTheme()},{type:"separator"},{label:"Find...",shortcut:"Ctrl+F",action:()=>vnt(d),enabledWhen:()=>!!d.designScale},{label:"Go to Position...",shortcut:"Shift+G",action:()=>_nt(d),enabledWhen:()=>!!d.designScale}]},{label:"Tools",items:[{label:"Ruler",shortcut:"K",action:()=>{d.rulerManager&&d.rulerManager.toggleRulerMode()}},{label:"Clear Rulers",shortcut:"Shift+K",action:()=>{d.rulerManager&&d.rulerManager.clearAllRulers()}},{type:"separator"},{label:"Add Label",shortcut:"L",action:()=>{d.labelManager&&d.labelManager.toggleLabelMode()}},{label:"Clear Labels",action:()=>{d.labelManager&&d.labelManager.clearAllLabels()}},{type:"separator"},{label:"Clear Highlights",action:()=>{d.websocketManager.request({type:"clear_highlights",group:-1}).then(()=>{d.refreshOverlay&&d.refreshOverlay(),d.refreshInspector&&d.refreshInspector()}).catch(()=>{})}},{type:"separator"},{label:"Global Connect...",action:()=>{d.showGlobalConnectDialog&&d.showGlobalConnectDialog()},enabledWhen:()=>!!d.designScale}]},{label:"Options",items:[{label:"Show DBU",action:()=>d.toggleShowDbu(),checked:()=>d.showDbu},{label:"Make euclidian rulers",action:()=>d.toggleRulerStyle(),checked:()=>d.rulerStyle!=="manhattan"},{type:"separator"},{label:"Mouse wheel mapped to zoom by default",action:()=>d.toggleWheelZoom(),checked:()=>d.wheelZoom},{label:"Arrow keys scroll step...",action:()=>d.showArrowStepDialog()},{label:"Application font...",action:()=>d.showAppFontDialog()},{type:"separator"},{label:"Show polygon decomposition",action:()=>d.togglePolyDecomp(),checked:()=>d.polyDecomp,enabledWhen:()=>!!d.designScale}]},{label:"Windows",items:[{label:"Layout Viewer",action:s("LayoutViewer")},{label:"Schematic",action:s("SchematicWidget")},{label:"3D Viewer",action:s("3DViewer")},{label:"Display Controls",action:s("DisplayControls")},{label:"Inspector",action:s("Inspector")},{label:"Selection Browser",action:s("SelectHighlight")},{label:"Tcl Console",action:s("TclConsole")},{label:"Hierarchy Browser",action:s("Browser")},{label:"Timing",action:s("TimingWidget")},{label:"DRC Viewer",action:s("DRCWidget")},{label:"Clock Tree",action:s("ClockWidget")},{label:"Charts",action:s("ChartsWidget")},{label:"Help",action:s("HelpWidget")},{type:"separator"},{label:"Reset to Default Layout",action:()=>d.resetLayout()}]},{label:"Help",items:[{label:"Keyboard Shortcuts",action:s("HelpWidget")}]}],p=document.getElementById("menu-bar"),m=null,_=new Map;function E(){m&&(m.classList.remove("open"),m=null)}function y(){let B=h.map(q=>({label:q.label,items:q.items.slice()})),P=new Map(B.map(q=>[q.label,q]));function U(q){let et=P.get(q);return et||(et={label:q,items:[]},P.set(q,et),B.push(et)),et}function W(q,et){let Q=q.items.find(X=>X.submenu&&X.label===et);return Q||(Q={label:et,submenu:{label:et,items:[]}},q.items.push(Q)),Q.submenu}for(let q of d.customMenu||[]){let et=String(q.path||"Custom Scripts").split("/").map(ft=>ft.trim()).filter(Boolean);et.length===0&&et.push("Custom Scripts");let Q=U(et[0]);for(let ft=1;ftjU(d,q.script,q.echo);Q.items.push({label:q.text,shortcut:q.shortcut,action:X});let gt=e5e(q.shortcut);gt&&_.set(gt,X)}return B}function I(B,P){for(let U of P){if(U.type==="separator"){let et=document.createElement("div");et.className="menu-separator",B.appendChild(et);continue}let W=document.createElement("div");if(W.className="menu-item",U.submenu){W.classList.add("submenu-item");let et=document.createElement("span");et.textContent=U.label,W.appendChild(et);let Q=document.createElement("span");Q.className="submenu-arrow",Q.textContent="\u25B8",W.appendChild(Q);let X=document.createElement("div");X.className="menu-dropdown submenu",I(X,U.submenu.items),W.appendChild(X),B.appendChild(W);continue}if(U.disabled&&W.classList.add("disabled"),U.enabledWhen&&(W._enabledWhen=U.enabledWhen),U.checked){let et=document.createElement("span");et.className="menu-check",et.textContent=U.checked()?"\u2713":"",W.appendChild(et),W._checkedFn=U.checked}let q=document.createElement("span");if(q.textContent=U.label,W.appendChild(q),U.shortcut){let et=document.createElement("span");et.className="shortcut",et.textContent=U.shortcut,W.appendChild(et)}U.action&&W.addEventListener("click",et=>{W.classList.contains("disabled")||(et.stopPropagation(),E(),U.action())}),B.appendChild(W)}}function O(){for(let P of p.querySelectorAll(":scope > .menu-label"))P.remove();let B=p.firstChild;m=null,_.clear();for(let P of y()){let q=function(){for(let et of W.querySelectorAll(".menu-item"))if(et._enabledWhen&&et.classList.toggle("disabled",!et._enabledWhen()),et._checkedFn){let Q=et.querySelector(".menu-check");Q&&(Q.textContent=et._checkedFn()?"\u2713":"")}},U=document.createElement("div");U.className="menu-label",U.textContent=P.label;let W=document.createElement("div");W.className="menu-dropdown",I(W,P.items),U.appendChild(W),U.addEventListener("click",et=>{et.stopPropagation(),m===U?E():(E(),q(),U.classList.add("open"),m=U)}),U.addEventListener("mouseenter",()=>{m&&m!==U&&(E(),q(),U.classList.add("open"),m=U)}),p.insertBefore(U,B)}}O(),d.rebuildMenuBar=O,document.addEventListener("click",E),i5e(_)}function i5e(d){document.addEventListener("keydown",s=>{if(d.size===0)return;let h=s.target.tagName;if(h==="INPUT"||h==="TEXTAREA"||s.target.isContentEditable)return;let p=d.get(n5e(s));p&&(s.preventDefault(),s.stopImmediatePropagation(),p())},!0)}function nQt(d,s,h){let p=h==="write_db",m=document.createElement("div");m.className="modal-overlay",m.innerHTML=` - `,document.body.appendChild(m);let _=m.querySelector(".fb-breadcrumb"),E=m.querySelector(".fb-file-list"),y=m.querySelector(".fb-path-input"),I=m.querySelector(".modal-error"),N=m.querySelector(".ok"),B=m.querySelector(".cancel"),P="",U=null;function j(){m.remove()}function V(){let ft=y.value.trim();N.disabled=!ft}function tt(ft){_.innerHTML="";let xt=ft.split("/").filter(Boolean),Bt=document.createElement("span");Bt.className="fb-crumb",Bt.textContent="/",Bt.addEventListener("click",()=>X("/")),_.appendChild(Bt);let Ot="";for(let Pt of xt){Ot+="/"+Pt;let se=document.createElement("span");se.className="fb-crumb-sep",se.textContent=" / ",_.appendChild(se);let ot=document.createElement("span");ot.className="fb-crumb",ot.textContent=Pt;let Lt=Ot;ot.addEventListener("click",()=>X(Lt)),_.appendChild(ot)}}function Q(ft){if(E.innerHTML="",U=null,!ft||ft.length===0){let xt=document.createElement("div");xt.className="fb-empty",xt.textContent="(empty directory)",E.appendChild(xt);return}for(let xt of ft){let Bt=document.createElement("div");Bt.className="fb-entry",xt.is_dir&&Bt.classList.add("fb-dir");let Ot=document.createElement("span");Ot.className="fb-icon",Ot.textContent=xt.is_dir?"\u{1F4C1}":"\u{1F4C4}",Bt.appendChild(Ot);let Pt=document.createElement("span");if(Pt.className="fb-name",Pt.textContent=xt.name,Bt.appendChild(Pt),!xt.is_dir&&xt.size!==void 0){let se=document.createElement("span");se.className="fb-size",se.textContent=i5e(xt.size),Bt.appendChild(se)}xt.is_dir?Bt.addEventListener("click",()=>{X(P+"/"+xt.name)}):(Bt.addEventListener("click",()=>{let se=E.querySelector(".fb-selected");se&&se.classList.remove("fb-selected"),Bt.classList.add("fb-selected"),U=xt,y.value=P+"/"+xt.name,V()}),Bt.addEventListener("dblclick",()=>{y.value=P+"/"+xt.name,V(),gt()})),E.appendChild(Bt)}}async function X(ft){I.style.display="none",E.innerHTML='
Loading...
';try{let xt=await d.websocketManager.request({type:"list_dir",path:ft||""});if(P=xt.path,tt(xt.path),Q(xt.entries),p){let Ot=y.value.trim().split("/").pop();Ot&&!Ot.includes("/")?y.value=P+"/"+Ot:y.value=P+"/"}else y.value="",U=null;V()}catch(xt){E.innerHTML="",I.textContent=xt.message||String(xt),I.style.display=""}}async function gt(){let ft=y.value.trim();if(ft){N.disabled=!0,N.textContent="Working...",I.style.display="none";try{let xt=await d.websocketManager.request({type:"tcl_eval",cmd:`${h} ${ft}`});if(xt.is_error){I.textContent=xt.output||xt.result||"Command failed",I.style.display="",N.disabled=!1,N.textContent=p?"Save":"Open";return}if(j(),h==="read_db"){window.location.reload();return}}catch(xt){I.textContent=xt.message||"Request failed",I.style.display="",N.disabled=!1,N.textContent=p?"Save":"Open"}}}y.addEventListener("input",V),y.addEventListener("keydown",ft=>{if(ft.key==="Enter"){let xt=y.value.trim();xt.endsWith("/")?X(xt.replace(/\/+$/,"")||"/"):gt()}ft.key==="Escape"&&j()}),N.addEventListener("click",gt),B.addEventListener("click",j),m.addEventListener("click",ft=>{ft.target===m&&j()}),X("")}function i5e(d){return d<1024?d+" B":d<1024*1024?(d/1024).toFixed(1)+" KB":d<1024*1024*1024?(d/(1024*1024)).toFixed(1)+" MB":(d/(1024*1024*1024)).toFixed(1)+" GB"}function rQt(d){let s=document.getElementById("toolbar");if(!s)return;d._toolbarToggleState||(d._toolbarToggleState={});function h(){s.innerHTML="";let p=d.customToolbar||[],m=new Set(p.map(_=>_.key));for(let _ of Object.keys(d._toolbarToggleState))m.has(_)||delete d._toolbarToggleState[_];for(let _ of p){let E=document.createElement("button");if(E.className="or-btn or-btn-sm toolbar-button",E.dataset.key=_.key,_.tooltip&&(E.title=_.tooltip),_.icon){let y=document.createElement("span");if(y.className="toolbar-icon",/^(data:|https?:|\.?\/)/.test(_.icon)){let I=document.createElement("img");I.src=_.icon,I.alt="",y.appendChild(I)}else y.textContent=_.icon;E.appendChild(y)}if(_.text){let y=document.createElement("span");y.className="toolbar-label",y.textContent=_.text,E.appendChild(y)}_.toggle&&d._toolbarToggleState[_.key]&&E.classList.add("active"),E.addEventListener("click",()=>{if(_.toggle){let y=!d._toolbarToggleState[_.key];d._toolbarToggleState[_.key]=y,E.classList.toggle("active",y),jU(d,y?_.script:_.script_off,_.echo)}else jU(d,_.script,_.echo)}),s.appendChild(E)}}return h(),d.rebuildToolbar=h,{rebuild:h}}function oQt(d,s=""){let h=document.createElement("div");h.className="modal-overlay",h.innerHTML=` + `,document.body.appendChild(m);let _=m.querySelector(".fb-breadcrumb"),E=m.querySelector(".fb-file-list"),y=m.querySelector(".fb-path-input"),I=m.querySelector(".modal-error"),O=m.querySelector(".ok"),B=m.querySelector(".cancel"),P="",U=null;function W(){m.remove()}function q(){let ft=y.value.trim();O.disabled=!ft}function et(ft){_.innerHTML="";let xt=ft.split("/").filter(Boolean),Bt=document.createElement("span");Bt.className="fb-crumb",Bt.textContent="/",Bt.addEventListener("click",()=>X("/")),_.appendChild(Bt);let Ot="";for(let Pt of xt){Ot+="/"+Pt;let se=document.createElement("span");se.className="fb-crumb-sep",se.textContent=" / ",_.appendChild(se);let ot=document.createElement("span");ot.className="fb-crumb",ot.textContent=Pt;let Lt=Ot;ot.addEventListener("click",()=>X(Lt)),_.appendChild(ot)}}function Q(ft){if(E.innerHTML="",U=null,!ft||ft.length===0){let xt=document.createElement("div");xt.className="fb-empty",xt.textContent="(empty directory)",E.appendChild(xt);return}for(let xt of ft){let Bt=document.createElement("div");Bt.className="fb-entry",xt.is_dir&&Bt.classList.add("fb-dir");let Ot=document.createElement("span");Ot.className="fb-icon",Ot.textContent=xt.is_dir?"\u{1F4C1}":"\u{1F4C4}",Bt.appendChild(Ot);let Pt=document.createElement("span");if(Pt.className="fb-name",Pt.textContent=xt.name,Bt.appendChild(Pt),!xt.is_dir&&xt.size!==void 0){let se=document.createElement("span");se.className="fb-size",se.textContent=r5e(xt.size),Bt.appendChild(se)}xt.is_dir?Bt.addEventListener("click",()=>{X(P+"/"+xt.name)}):(Bt.addEventListener("click",()=>{let se=E.querySelector(".fb-selected");se&&se.classList.remove("fb-selected"),Bt.classList.add("fb-selected"),U=xt,y.value=P+"/"+xt.name,q()}),Bt.addEventListener("dblclick",()=>{y.value=P+"/"+xt.name,q(),gt()})),E.appendChild(Bt)}}async function X(ft){I.style.display="none",E.innerHTML='
Loading...
';try{let xt=await d.websocketManager.request({type:"list_dir",path:ft||""});if(P=xt.path,et(xt.path),Q(xt.entries),p){let Ot=y.value.trim().split("/").pop();Ot&&!Ot.includes("/")?y.value=P+"/"+Ot:y.value=P+"/"}else y.value="",U=null;q()}catch(xt){E.innerHTML="",I.textContent=xt.message||String(xt),I.style.display=""}}async function gt(){let ft=y.value.trim();if(ft){O.disabled=!0,O.textContent="Working...",I.style.display="none";try{let xt=await d.websocketManager.request({type:"tcl_eval",cmd:`${h} ${ft}`});if(xt.is_error){I.textContent=xt.output||xt.result||"Command failed",I.style.display="",O.disabled=!1,O.textContent=p?"Save":"Open";return}if(W(),h==="read_db"){window.location.reload();return}}catch(xt){I.textContent=xt.message||"Request failed",I.style.display="",O.disabled=!1,O.textContent=p?"Save":"Open"}}}y.addEventListener("input",q),y.addEventListener("keydown",ft=>{if(ft.key==="Enter"){let xt=y.value.trim();xt.endsWith("/")?X(xt.replace(/\/+$/,"")||"/"):gt()}ft.key==="Escape"&&W()}),O.addEventListener("click",gt),B.addEventListener("click",W),m.addEventListener("click",ft=>{ft.target===m&&W()}),X("")}function r5e(d){return d<1024?d+" B":d<1024*1024?(d/1024).toFixed(1)+" KB":d<1024*1024*1024?(d/(1024*1024)).toFixed(1)+" MB":(d/(1024*1024*1024)).toFixed(1)+" GB"}function rQt(d){let s=document.getElementById("toolbar");if(!s)return;d._toolbarToggleState||(d._toolbarToggleState={});function h(){s.innerHTML="";let p=d.customToolbar||[],m=new Set(p.map(_=>_.key));for(let _ of Object.keys(d._toolbarToggleState))m.has(_)||delete d._toolbarToggleState[_];for(let _ of p){let E=document.createElement("button");if(E.className="or-btn or-btn-sm toolbar-button",E.dataset.key=_.key,_.tooltip&&(E.title=_.tooltip),_.icon){let y=document.createElement("span");if(y.className="toolbar-icon",/^(data:|https?:|\.?\/)/.test(_.icon)){let I=document.createElement("img");I.src=_.icon,I.alt="",y.appendChild(I)}else y.textContent=_.icon;E.appendChild(y)}if(_.text){let y=document.createElement("span");y.className="toolbar-label",y.textContent=_.text,E.appendChild(y)}_.toggle&&d._toolbarToggleState[_.key]&&E.classList.add("active"),E.addEventListener("click",()=>{if(_.toggle){let y=!d._toolbarToggleState[_.key];d._toolbarToggleState[_.key]=y,E.classList.toggle("active",y),jU(d,y?_.script:_.script_off,_.echo)}else jU(d,_.script,_.echo)}),s.appendChild(E)}}return h(),d.rebuildToolbar=h,{rebuild:h}}function oQt(d,s=""){let h=document.createElement("div");h.className="modal-overlay",h.innerHTML=` `,document.body.appendChild(h);function p(_){_.key==="Escape"&&m()}let m=()=>{h.remove(),document.removeEventListener("keydown",p)};return h.addEventListener("click",_=>{_.target===h&&m()}),document.addEventListener("keydown",p),{overlay:h,body:h.querySelector(".modal-body"),errorDiv:h.querySelector(".modal-error"),buttons:h.querySelector(".modal-buttons"),close:m}}function Cy(d,s){d.textContent=s,d.style.display=s?"":"none"}function MR(d,s,{primary:h=!1}={}){let p=document.createElement("button");return p.textContent=s,p.className="or-btn"+(h?" or-btn-primary":""),d.appendChild(p),p}function _nt(d){return"{"+String(d)+"}"}function cQt(d){let s=oQt("Global Connect","gc-dialog"),h=document.createElement("div");h.className="gc-table",s.body.appendChild(h);let p=document.createElement("div");p.className="gc-form";let m=document.createElement("input");m.placeholder="Instance pattern (regex)",m.value=".*";let _=document.createElement("input");_.placeholder="Pin pattern (regex)";let E=document.createElement("select"),y=document.createElement("select"),I=document.createElement("span");I.innerHTML='',p.append(vS("Instance",m),vS("Pin",_),vS("Net",E),vS("Region",y),I);let N=MR(p,"Add rule");s.body.appendChild(p);function B(){let V=_.value.trim()!==""&&E.value!=="";for(let tt of[m,_])try{new RegExp(tt.value),tt.classList.remove("gc-invalid")}catch{tt.classList.add("gc-invalid"),V=!1}N.disabled=!V}m.addEventListener("input",B),_.addEventListener("input",B),E.addEventListener("change",B);function P(){d.websocketManager.request({type:"global_connect_info"}).then(V=>{h.innerHTML='
InstancePinNetRegion
',(V.rules||[]).forEach(tt=>{let Q=document.createElement("div");Q.className="gc-row",Q.innerHTML=`${qU(tt.inst)}${qU(tt.pin)}${qU(tt.net)}${qU(tt.region||"All")}`;let X=document.createElement("button");X.className="or-btn or-btn-sm or-btn-icon",X.textContent="\u2715",X.title="Delete rule",X.addEventListener("click",()=>{d.websocketManager.request({type:"global_connect_delete",inst:tt.inst,pin:tt.pin,net:tt.net,region:tt.region||""}).then(P).catch(gt=>Cy(s.errorDiv,String(gt)))}),Q.appendChild(X),h.appendChild(Q)}),Q2t(E,V.nets||[]),Q2t(y,["All",...V.regions||[]]),B()}).catch(V=>Cy(s.errorDiv,String(V)))}N.addEventListener("click",()=>{let V=p.querySelector('input[name="gc-pg"]:checked').value,tt=`add_global_connection -net ${_nt(E.value)} -inst_pattern ${_nt(m.value||".*")} -pin_pattern ${_nt(_.value)} -${V}`;y.value&&y.value!=="All"&&(tt+=` -region ${_nt(y.value)}`),sQt(d,tt,s.errorDiv,"Rule added.",P)}),MR(s.buttons,"Apply (force)").addEventListener("click",()=>{d.websocketManager.request({type:"global_connect_apply",force:!0}).then(V=>{if(!V.had_rules){Cy(s.errorDiv,"No global-connect rules defined \u2014 add a rule first.");return}Cy(s.errorDiv,`Connected ${V.connected} pin(s).`),d.scheduleRedrawAllLayers&&d.scheduleRedrawAllLayers(),P()}).catch(V=>Cy(s.errorDiv,V.message||String(V)))}),MR(s.buttons,"Clear all").addEventListener("click",()=>sQt(d,"clear_global_connect",s.errorDiv,"Rules cleared.",P)),MR(s.buttons,"Close").addEventListener("click",s.close),P()}function sQt(d,s,h,p,m){d.websocketManager.request({type:"tcl_eval",cmd:s}).then(_=>{if(_.is_error){Cy(h,_.output||_.result||"Command failed");return}Cy(h,p||""),d.scheduleRedrawAllLayers&&d.scheduleRedrawAllLayers(),m&&m()}).catch(_=>Cy(h,_.message||String(_)))}function aQt(d,s){let h=oQt(`Insert Buffer \u2014 ${qU(s)}`,"buf-dialog"),p=MR(h.buttons,"Insert",{primary:!0});p.disabled=!0,MR(h.buttons,"Cancel").addEventListener("click",h.close),d.websocketManager.request({type:"buffer_info",net:s}).then(_=>{if(!_.can_buffer){h.body.textContent=_.error||"This net has multiple drivers and cannot be buffered.";return}r5e(d,h,s,_,p)}).catch(_=>{h.body.textContent=String(_)})}function r5e(d,s,h,p,m){let _=document.createElement("div");_.className="buf-pins";let E=p.drivers||[],y=p.loads||[],I=new Set;function N(){_.innerHTML="";let V=(tt,Q)=>{let X=document.createElement("label");X.className="buf-pin";let gt=document.createElement("input");gt.type="checkbox",gt.checked=I.has(tt.id),gt.addEventListener("change",()=>{if(gt.checked){if(Q)I.clear();else for(let ft of E)I.delete(ft.id);I.add(tt.id)}else I.delete(tt.id);N(),j()}),X.append(gt,document.createTextNode(" "+tt.label)),_.appendChild(X)};E.forEach(tt=>V(tt,!0)),y.forEach(tt=>V(tt,!1))}E.length&&I.add(E[0].id),N();let B=document.createElement("select");Q2t(B,p.masters||[]);let P=document.createElement("input");P.placeholder="Optional: new buffer name";let U=document.createElement("input");U.placeholder="Optional: new net name",s.body.append(vS("Pins to buffer",_),vS("Buffer master",B),vS("Buffer name",P),vS("Net name",U));function j(){m.disabled=I.size===0||!B.value}B.addEventListener("change",j),j(),m.addEventListener("click",()=>{let V=new Set(E.map(X=>X.id)),tt=[...I],Q=tt.some(X=>V.has(X))?"driver":"loads";d.websocketManager.request({type:"insert_buffer",net:h,mode:Q,pins:tt,master:B.value,buf_name:P.value.trim(),net_name:U.value.trim()}).then(X=>{if(X.is_error||X.ok===!1){Cy(s.errorDiv,X.error||X.result||"Insertion failed");return}s.close(),X.inst&&(d.selectedInstanceName=X.inst),d.scheduleRedrawAllLayers&&d.scheduleRedrawAllLayers()}).catch(X=>Cy(s.errorDiv,X.message||String(X)))})}function vS(d,s){let h=document.createElement("label");h.className="edit-field";let p=document.createElement("span");return p.textContent=d,h.append(p,s),h}function Q2t(d,s){let h=d.value;d.innerHTML="";for(let p of s){let m=document.createElement("option");m.value=p,m.textContent=p,d.appendChild(m)}s.includes(h)&&(d.value=h)}function qU(d){return String(d??"").replace(/&/g,"&").replace(//g,">")}var uQt="#00ffff",s5e="#ffff00",txt="#ffffff",gk=0,ext=1,XU=2,ynt=class{constructor(s,h,p,m){this._app=s,this._visibility=h,this._updateInspector=p,this._focusComponent=m,this._state=gk,this._rulers=[],this._nextId=0,this._pt0=null,this._selectedRulerId=null,this._ctrlHeld=!1,this._shiftHeld=!1,this._rulerPane=null,this._rulerLayerGroup=null,this._previewGroup=null,this._snapGroup=null,this._snapTimer=null,this._lastSnapResult=null,this._onMouseMove=this._handleMouseMove.bind(this),this._onMapClick=this._handleMapClick.bind(this),this._initLayers()}_initLayers(){let s=this._app.map;s&&(this._rulerPane=s.createPane("ruler-pane"),this._rulerPane.style.zIndex="700",this._rulerPane.style.pointerEvents="auto",this._rulerLayerGroup=L.layerGroup([],{pane:"ruler-pane"}).addTo(s),this._previewGroup=L.layerGroup([],{pane:"ruler-pane"}).addTo(s),this._snapGroup=L.layerGroup([],{pane:"ruler-pane"}).addTo(s))}isActive(){return this._state!==gk}updateVisibility(){this._rulerPane&&(this._rulerPane.style.display=this._visibility.rulers?"":"none")}toggleRulerMode(){this._state===gk?this._enterFirstPoint():this.cancelRulerBuild()}cancelRulerBuild(){this._state=gk,this._pt0=null,this._lastSnapResult=null,this._clearPreview(),this._clearSnap(),this._setCursor(!1),this._removeMapListeners()}clearAllRulers(){this._rulers=[],this._selectedRulerId=null,this._rulerLayerGroup.clearLayers(),this._clearPreview(),this._clearSnap(),this._state!==gk&&this.cancelRulerBuild()}_enterFirstPoint(){this._state=ext,this._pt0=null,this._lastSnapResult=null,this._setCursor(!0),this._addMapListeners()}_enterMeasuring(s){this._state=XU,this._pt0=s}_addMapListeners(){let s=this._app.map;s&&(s.getContainer().addEventListener("mousemove",this._onMouseMove),s.on("click",this._onMapClick))}_removeMapListeners(){let s=this._app.map;s&&(s.getContainer().removeEventListener("mousemove",this._onMouseMove),s.off("click",this._onMapClick))}_handleMouseMove(s){if(this._state===gk)return;this._ctrlHeld=s.ctrlKey||s.metaKey,this._shiftHeld=s.shiftKey;let h=this._app.map,p=h.getContainer().getBoundingClientRect(),m=h.containerPointToLatLng([s.clientX-p.left,s.clientY-p.top]),_=tv(m.lat,m.lng,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY);this._snapTimer&&clearTimeout(this._snapTimer),this._snapTimer=setTimeout(()=>{this._requestSnap(_.dbuX,_.dbuY)},50)}_handleMapClick(s){if(this._state===gk)return;L.DomEvent.stopPropagation(s);let h=s.originalEvent;h&&(this._ctrlHeld=h.ctrlKey||h.metaKey,this._shiftHeld=h.shiftKey);let p=tv(s.latlng.lat,s.latlng.lng,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY),m=this._getSnappedPoint(p.dbuX,p.dbuY);this._state===ext?this._enterMeasuring(m):this._state===XU&&(this._createRuler(this._pt0,m),this._state=ext,this._pt0=null,this._clearPreview(),this._clearSnap(),this._lastSnapResult=null)}async _requestSnap(s,h){let p=this._app;if(!p.websocketManager||!p.designScale)return;if(this._ctrlHeld){this._lastSnapResult=null,this._clearSnap(),this._updatePreview(s,h);return}let _=p.techData?.dbu_per_micron||1e3,E=p.map.getZoom(),y=Math.pow(2,Math.max(0,E)),I=1/(p.designScale*y),N=Math.max(Math.round(10*I),10),B=!0,P=!0;if(this._shiftHeld)B=!0,P=!0;else if(this._state===XU&&this._pt0){let j=Math.abs(s-this._pt0.x),V=Math.abs(h-this._pt0.y);j>V?(B=!1,P=!0):V>j&&(B=!0,P=!1)}let U={};for(let[j,V]of Object.entries(this._visibility))U[j]=!!V;try{let j=await p.websocketManager.request({type:"snap",dbu_x:s,dbu_y:h,radius:_,point_threshold:N,horizontal:!!B,vertical:!!P,visible_layers:[...p.visibleLayerNames],...U});this._lastSnapResult=j,this._updateSnapIndicator(j),this._updatePreview(s,h)}catch{this._lastSnapResult=null,this._clearSnap()}}_getSnappedPoint(s,h){if(this._ctrlHeld)return{x:s,y:h};let p=this._lastSnapResult,m;if(p?.found&&p.is_point)m={x:p.edge[0][0],y:p.edge[0][1]};else if(p?.found){let _=p.edge;_[0][1]===_[1][1]?m={x:s,y:_[0][1]}:m={x:_[0][0],y:h}}else m={x:s,y:h};if(!this._shiftHeld&&this._state===XU&&this._pt0){let _=Math.abs(m.x-this._pt0.x),E=Math.abs(m.y-this._pt0.y);_{L.DomEvent.stopPropagation(se),this._selectRuler(s.id)}),B.addLayer(V);let tt=this._app.map.getZoom(),Q=Math.pow(2,Math.max(0,tt)),gt=8*(1/(h*Q)),ft=(se,ot,Lt)=>{let be=Math.sqrt(ot*ot+Lt*Lt);if(be===0)return;let ln=-Lt/be,Fn=ot/be,ne=Id(se.x+ln*gt,se.y+Fn*gt,h,p,m,_),xe=Id(se.x-ln*gt,se.y-Fn*gt,h,p,m,_);B.addLayer(L.polyline([ne,xe],{color:N,weight:2,pane:"ruler-pane",interactive:!1}))};if(P)ft(s.pt0,P.x-s.pt0.x,P.y-s.pt0.y),ft(s.pt1,s.pt1.x-P.x,s.pt1.y-P.y);else{let se=s.pt1.x-s.pt0.x,ot=s.pt1.y-s.pt0.y;ft(s.pt0,se,ot),ft(s.pt1,se,ot)}let xt=this._computeDistance(s.pt0,s.pt1,s.euclidian),Bt=U?U[0]:(E[0]+y[0])/2,Ot=U?U[1]:(E[1]+y[1])/2,Pt=L.marker([Bt,Ot],{icon:L.divIcon({className:"ruler-label",html:this._formatDistance(xt),iconSize:null}),pane:"ruler-pane",interactive:!1});B.addLayer(Pt),s._layerGroup=B,this._rulerLayerGroup.addLayer(B)}_rerenderAll(){this._rulerLayerGroup.clearLayers();for(let s of this._rulers)this._renderRuler(s)}_selectRuler(s){this._selectedRulerId=s,this._rerenderAll();let h=this._rulers.find(N=>N.id===s);if(!h)return;wg(this._app);let p=Math.abs(h.pt1.x-h.pt0.x),m=Math.abs(h.pt1.y-h.pt0.y),_=h.euclidian?Math.sqrt(p*p+m*m):p+m,E=N=>this._app.formatDbu(N,!0),y=N=>this._app.parseDbu(N),I={type:"Ruler",name:h.name,bbox:[Math.min(h.pt0.x,h.pt1.x),Math.min(h.pt0.y,h.pt1.y),Math.max(h.pt0.x,h.pt1.x),Math.max(h.pt0.y,h.pt1.y)],properties:[{name:"Name",value:h.name,editable:!0},{name:"Label",value:h.label||"",editable:!0},{name:"Point 0 - x",value:E(h.pt0.x),editable:!0},{name:"Point 0 - y",value:E(h.pt0.y),editable:!0},{name:"Point 1 - x",value:E(h.pt1.x),editable:!0},{name:"Point 1 - y",value:E(h.pt1.y),editable:!0},{name:"Delta x",value:E(p)},{name:"Delta y",value:E(m)},{name:"Length",value:E(_)},{name:"Euclidian",value:h.euclidian?"True":"False",editable:!0,editor:{type:"bool"}}],onPropertyChange:(N,B)=>{switch(N){case"Name":h.name=B;break;case"Label":h.label=B;break;case"Point 0 - x":{let P=y(B);P!==null&&(h.pt0.x=P);break}case"Point 0 - y":{let P=y(B);P!==null&&(h.pt0.y=P);break}case"Point 1 - x":{let P=y(B);P!==null&&(h.pt1.x=P);break}case"Point 1 - y":{let P=y(B);P!==null&&(h.pt1.y=P);break}case"Euclidian":h.euclidian=B.trim().toLowerCase()==="true";break}this._rerenderAll(),this._selectRuler(h.id)}};this._updateInspector(I),this._focusComponent("Inspector"),requestAnimationFrame(()=>{let N=this._app.inspectorEl?.querySelector(".inspector-toolbar");if(!N)return;let B=document.createElement("button");B.className="or-btn or-btn-icon",B.title="Delete ruler",B.innerHTML='',B.addEventListener("click",()=>{this.deleteRuler(s)}),N.appendChild(B)})}deleteRuler(s){let h=this._rulers.findIndex(m=>m.id===s);if(h===-1)return;let p=this._rulers[h];p._layerGroup&&this._rulerLayerGroup.removeLayer(p._layerGroup),this._rulers.splice(h,1),this._selectedRulerId===s&&(this._selectedRulerId=null,this._updateInspector(null))}_getManhattanJoinPt(s,h){return{x:h.x,y:s.y}}_computeDistance(s,h,p=!0){let m=Math.abs(h.x-s.x),_=Math.abs(h.y-s.y);return p?Math.sqrt(m*m+_*_):m+_}_formatDistance(s){return this._app.formatDistance(s)}_setCursor(s){let h=this._app.map?.getContainer();h&&(s?h.classList.add("ruler-mode-cursor"):h.classList.remove("ruler-mode-cursor"))}_clearPreview(){this._previewGroup?.clearLayers()}_clearSnap(){this._snapGroup?.clearLayers()}};var xnt=class{constructor(s,h,p,m){this._app=s,this._visibility=h,this._updateInspector=p,this._focusComponent=m,this._labels=[],this._anchors=[],this._mode=!1,this._selectedName=null,this._pane=null,this._handleGroup=null,this._initLayers()}_initLayers(){let s=this._app.map;s&&(this._pane=s.createPane("label-pane"),this._pane.style.zIndex="690",this._pane.style.pointerEvents="auto",this._handleGroup=L.layerGroup([],{pane:"label-pane"}).addTo(s))}isActive(){return this._mode}updateVisibility(){this._pane&&(this._pane.style.display=this._visibility.labels?"":"none")}toggleLabelMode(){this._mode=!this._mode,this._setCursor(this._mode)}cancelLabelMode(){this._mode=!1,this._setCursor(!1)}_setCursor(s){let h=this._app.map?.getContainer();h&&h.classList.toggle("label-mode-cursor",s)}_wm(){return this._app.websocketManager}_applyLabels(s){this._labels=s||[],this._renderHandles()}_refresh(s){this._applyLabels(s&&s.labels),this._app.refreshOverlay()}applyRemoteLabels(s){this._applyLabels(s),this._selectedName&&!this._labels.some(h=>h.name===this._selectedName)&&(this._selectedName=null,this._updateInspector(null),this._renderHandles()),this._app.refreshOverlay()}_updateLabel(s,h){return this._wm().request({type:"update_label",name:s,...h})}async reload(){let s=this._wm();if(s)try{let h=await s.request({type:"list_labels"});this._anchors=h.anchors||[],this._applyLabels(h.labels)}catch{this._applyLabels([])}}async handleMapClick(s,h){let p=window.prompt("Label text:");if(this._mode=!1,this._setCursor(!1),!!p)try{let m=await this._wm().request({type:"add_label",x:Math.round(s),y:Math.round(h),text:p});this._refresh(m)}catch(m){console.error("add_label failed:",m)}}_renderHandles(){if(!this._handleGroup)return;this._handleGroup.clearLayers();let s=this._app.designScale;if(!s)return;let h=this._app.designMaxDXDY,p=this._app.designOriginX,m=this._app.designOriginY;for(let _ of this._labels){let E=Id(_.x,_.y,s,h,p,m),y=_.name===this._selectedName,I=L.marker(E,{pane:"label-pane",draggable:!0,keyboard:!1,icon:L.divIcon({className:"label-handle"+(y?" label-handle-selected":""),html:"",iconSize:[10,10]}),title:_.text});I.on("click",N=>{L.DomEvent.stopPropagation(N),this._select(_.name)}),I.on("dragend",N=>{let B=N.target.getLatLng(),{dbuX:P,dbuY:U}=tv(B.lat,B.lng,s,h,p,m);this._commitMove(_,Math.round(P),Math.round(U))}),this._handleGroup.addLayer(I)}}async _commitMove(s,h,p){try{let m=await this._updateLabel(s.name,{x:h,y:p,text:s.text,size:s.size||0,anchor:s.anchor||"center",color:s.color});this._refresh(m)}catch(m){console.error("move label failed:",m)}}_select(s){this._selectedName=s,this._renderHandles();let h=this._labels.find(_=>_.name===s);if(!h)return;let p=_=>this._app.formatDbu(_,!0),m={type:"Label",name:h.name,bbox:[h.x,h.y,h.x,h.y],properties:[{name:"Name",value:h.name},{name:"Text",value:h.text,editable:!0},{name:"x",value:p(h.x)},{name:"y",value:p(h.y)},{name:"Font size",value:String(h.size||0),editable:!0},{name:"Anchor",value:h.anchor||"center",editable:!0,editor:{type:"list",options:this._anchors}}],onPropertyChange:(_,E)=>{let y={text:h.text,size:h.size||0,anchor:h.anchor||"center"};_==="Text"?y.text=E:_==="Font size"?y.size=parseInt(E,10)||0:_==="Anchor"&&(y.anchor=E.trim()),this._edit(h,y)}};this._updateInspector(m),this._focusComponent("Inspector"),requestAnimationFrame(()=>{let _=this._app.inspectorEl?.querySelector(".inspector-toolbar");if(!_||_.querySelector(".delete-label-btn"))return;let E=document.createElement("button");E.className="or-btn or-btn-icon delete-label-btn",E.title="Delete label",E.innerHTML='',E.addEventListener("click",()=>this.deleteLabel(s)),_.appendChild(E)})}async _edit(s,h){try{let p=await this._updateLabel(s.name,{x:s.x,y:s.y,text:h.text,size:h.size,anchor:h.anchor,color:s.color});this._refresh(p),this._select(s.name)}catch(p){console.error("edit label failed:",p)}}async deleteLabel(s){try{let h=await this._wm().request({type:"delete_label",name:s});this._selectedName===s&&(this._selectedName=null,this._updateInspector(null)),this._refresh(h)}catch(h){console.error("delete_label failed:",h)}}async clearAllLabels(){try{let s=await this._wm().request({type:"clear_labels"});this._selectedName=null,this._refresh(s)}catch(s){console.error("clear_labels failed:",s)}}};var lQt="Select an instance in the layout to view its schematic.",Mnt=class{constructor(s,h){this.container=s,this.appState=h,this.element=document.createElement("div"),this.element.className="schematic-widget",this.element.style.cssText="width:100%; height:100%; display:flex; flex-direction:column; background:var(--bg-panel); color:var(--fg-primary); overflow:hidden;",this.controls=document.createElement("div"),this.controls.style.cssText="padding:4px 8px; background:var(--bg-header); border-bottom:1px solid var(--border);flex-shrink:0; display:flex; align-items:center; gap:8px; flex-wrap:wrap;",this.controls.innerHTML='',this.element.appendChild(this.controls),this.svgContainer=document.createElement("div"),this.svgContainer.style.cssText="flex:1; overflow:hidden; position:relative; cursor:grab; background:var(--bg-main);",this.element.appendChild(this.svgContainer),this.container.element.appendChild(this.element),this.controls.querySelector("#schematic-refresh").addEventListener("click",()=>this.refresh()),this.controls.querySelector("#schematic-fit").addEventListener("click",()=>this.fitView()),this.controls.querySelector("#schematic-zoom-in").addEventListener("click",()=>this._zoomStep(1.5)),this.controls.querySelector("#schematic-zoom-out").addEventListener("click",()=>this._zoomStep(1/1.5)),this.controls.querySelector("#schematic-select").addEventListener("click",()=>this._toggleSelectMode()),this.controls.querySelector("#schematic-zoom-to").addEventListener("click",()=>this._zoomToSelected()),this.controls.querySelector("#schematic-save-svg").addEventListener("click",()=>this._exportSvg()),this.controls.querySelector("#schematic-save-png").addEventListener("click",()=>this._exportPng()),this.controls.querySelector("#schematic-copy").addEventListener("click",()=>this._copyImage()),this.appState.schematicWidget=this,this.netlistsvg=null,this.skin=null,this._svgEl=null,this._scale=1,this._panX=0,this._panY=0,this._selectMode=!1,this._selectedCell=null,this._svgIdToInstName=new Map,this._setupPanZoom(),this.initNetlistSVG()}_setupPanZoom(){let s=this.svgContainer,h=!1,p,m,_,E;s.addEventListener("wheel",y=>{if(!this._svgEl)return;y.preventDefault();let I=y.deltaY<0?1.2:1/1.2,N=s.getBoundingClientRect(),B=y.clientX-N.left,P=y.clientY-N.top;this._panX=B+(this._panX-B)*I,this._panY=P+(this._panY-P)*I,this._scale*=I,this._applyTransform()},{passive:!1}),s.addEventListener("mousedown",y=>{if(!(!this._svgEl||y.button!==0)){if(this._selectMode){this._handleSelectClick(y);return}h=!0,p=y.clientX,m=y.clientY,_=this._panX,E=this._panY,s.style.cursor="grabbing",y.preventDefault()}}),window.addEventListener("mousemove",y=>{h&&(this._panX=_+(y.clientX-p),this._panY=E+(y.clientY-m),this._applyTransform())}),window.addEventListener("mouseup",()=>{h&&(h=!1,s.style.cursor=this._selectMode?"default":"grab")})}_zoomStep(s){if(!this._svgEl)return;let h=this.svgContainer.getBoundingClientRect(),p=h.width/2,m=h.height/2;this._panX=p+(this._panX-p)*s,this._panY=m+(this._panY-m)*s,this._scale*=s,this._applyTransform()}_toggleSelectMode(){this._selectMode=!this._selectMode;let s=this.controls.querySelector("#schematic-select");this._selectMode?(s.style.background="var(--accent)",s.style.color="var(--fg-white)",this.svgContainer.style.cursor="default"):(s.style.background="",s.style.color="",this.svgContainer.style.cursor="grab",this._clearCellHighlight())}_handleSelectClick(s){if(!this._svgEl)return;let h=s.target,p=null;for(;h&&h!==this._svgEl;){if(h.tagName==="g"&&h.id&&this._svgIdToInstName.has(h.id)){p=h;break}h=h.parentElement}if(this._clearCellHighlight(),!p)return;let m=this._svgIdToInstName.get(p.id);try{let _=p.getBBox(),E=3,y=document.createElementNS("http://www.w3.org/2000/svg","rect");y.setAttribute("x",_.x-E),y.setAttribute("y",_.y-E),y.setAttribute("width",_.width+E*2),y.setAttribute("height",_.height+E*2),y.setAttribute("fill","none"),y.setAttribute("stroke","#e05a00"),y.setAttribute("stroke-width","1.5"),y.setAttribute("rx","3"),y.id="_schematic_highlight",p.appendChild(y),this._selectedCell=p}catch{}this.controls.querySelector("#schematic-zoom-to").disabled=!1,this.setStatus(`Selected: ${m}`),this._fetchInspect(m)}_fetchInspect(s){let h=this.appState.websocketManager;if(!h)return;console.log("[Schematic] inspect:",s);let p=wg(this.appState);h.request({type:"schematic_inspect",inst_name:s,use_dbu:this.appState.showDbu}).then(m=>{N0(this.appState,p)&&(this.appState.updateInspector&&this.appState.updateInspector(m),this.appState.focusComponent&&this.appState.focusComponent("Inspector"),this.appState.refreshOverlay&&this.appState.refreshOverlay())}).catch(m=>{console.error("schematic_inspect failed:",m),this.setStatus(`Inspect error: ${m}`)})}_clearCellHighlight(){if(this._svgEl){let s=this._svgEl.querySelector("#_schematic_highlight");s&&s.remove()}this._selectedCell=null,this.controls.querySelector("#schematic-zoom-to").disabled=!0}_zoomToSelected(){if(!this._selectedCell||!this._svgEl)return;let s=this.svgContainer.getBoundingClientRect(),h=this._selectedCell.getBoundingClientRect(),p=(h.left-s.left-this._panX)/this._scale,m=(h.top-s.top-this._panY)/this._scale,_=h.width/this._scale,E=h.height/this._scale,y=Math.min(s.width/_,s.height/E)*.9;this._scale=y,this._panX=s.width/2-(p+_/2)*y,this._panY=s.height/2-(m+E/2)*y,this._applyTransform()}_applyTransform(){this._svgEl&&(this._svgEl.style.transform=`translate(${this._panX}px, ${this._panY}px) scale(${this._scale})`,this._svgEl.style.transformOrigin="0 0")}fitView(){if(!this._svgEl)return;let s=this.svgContainer.getBoundingClientRect();if(s.width===0||s.height===0)return;let h=this._svgEl.viewBox&&this._svgEl.viewBox.baseVal,p=h&&h.width||this._svgEl.clientWidth||1,m=h&&h.height||this._svgEl.clientHeight||1;this._scale=Math.min(s.width/p,s.height/m)*.95,this._panX=(s.width-p*this._scale)/2,this._panY=(s.height-m*this._scale)/2,this._applyTransform()}initNetlistSVG(){this.netlistsvg=globalThis.netlistsvg,this.skin=globalThis.openroadSkin,this._netlistsvgReady=!!(this.netlistsvg&&this.skin),this._netlistsvgReady&&console.log("NetlistSVG ready."),this.setStatus(this._unreadyStatus()??lQt)}_unreadyStatus(){return this._netlistsvgReady?null:Sc(this.appState)?"The schematic is not available in saved reports.":"Init error: netlistsvg or its skin is missing from the page."}syncCone(s={}){let h=this.controls.querySelector("#schematic-fanin-depth"),p=this.controls.querySelector("#schematic-fanout-depth"),m=(_,E,y)=>{if(!_)return;let I=parseInt(_.max,10)||10;E===!1?_.value=0:y!==void 0&&(_.value=y>0?Math.min(y,I):I)};m(h,s.fanin,s.fanin_depth),m(p,s.fanout,s.fanout_depth),this.refresh(s.inst_name),this.appState.focusComponent&&this.appState.focusComponent("SchematicWidget",{reveal:!0})}refresh(s=this.appState.selectedInstanceName){if(!this._netlistsvgReady){this.setStatus(this._unreadyStatus());return}if(!s){this.setStatus(lQt);return}let h=this.appState.websocketManager;if(!h){this.setStatus("Waiting for server connection\u2026");return}this.setStatus(`Loading schematic for ${s}\u2026`);let p=parseInt(this.controls.querySelector("#schematic-fanin-depth").value,10),m=parseInt(this.controls.querySelector("#schematic-fanout-depth").value,10),_=isNaN(p)?1:p,E=isNaN(m)?1:m;h.readyPromise.then(()=>{h.request({type:"schematic_cone",inst_name:s,fanin_depth:_,fanout_depth:E}).then(y=>{let I=y.modules&&y.modules.top&&y.modules.top.cells;if(!I||Object.keys(I).length===0){this.setStatus("No cells found for selected instance.");return}this.renderNetlist(y)}).catch(y=>{this.setStatus(`Error: ${y}`)})})}setStatus(s){this.controls.querySelector("#schematic-status").textContent=s}_exportSvg(){if(!this._svgEl){this.setStatus("No schematic to export.");return}let s=q2t(this._svgEl);UJt(new Blob([s],{type:"image/svg+xml;charset=utf-8"}),"schematic.svg")}async _exportPng(){if(!this._svgEl){this.setStatus("No schematic to export.");return}try{let s=await X2t(this._svgEl,2);dk(s,"schematic.png")}catch{this.setStatus("PNG export failed.")}}async _copyImage(){if(!this._svgEl){this.setStatus("No schematic to export.");return}try{let s=await X2t(this._svgEl,2),h=await cnt(s);this.setStatus(h?"Schematic copied to clipboard.":"Clipboard not available.")}catch{this.setStatus("Copy failed.")}}async renderNetlist(s){try{this.setStatus("Rendering\u2026"),typeof window<"u"&&(window.__lastSchematic=s);let h=l5e(s),p,m=this.netlistsvg.render(this.skin,h);if(m&&typeof m.then=="function"?p=await m:p=await new Promise((y,I)=>{this.netlistsvg.render(this.skin,h,(N,B)=>{N?I(N):y(B)})}),typeof p!="string"||!p.includes("requestAnimationFrame(()=>this.fitView()));let E=Object.keys(s.modules.top.cells).length;this.setStatus(`${E} cell${E!==1?"s":""}`)}catch(h){console.error("NetlistSVG render failed:",h),this.setStatus(`Render error: ${h.message||h}`)}}_applyPinLabels(s){if(!this._svgEl)return;let h="http://www.w3.org/2000/svg",p="https://github.com/nturley/netlistsvg",m=s.modules&&s.modules.top&&s.modules.top.cells||{},_=(E,y)=>E.getAttribute("s:"+y)??E.getAttributeNS(p,y);for(let[E,y]of Object.entries(m)){let I=y.port_labels;if(!I)continue;let N=this._svgEl.querySelector("#"+CSS.escape("cell_"+E))||this._svgEl.querySelector("#"+CSS.escape(E));if(!N)continue;let B=y.port_directions||{};for(let P of Array.from(N.children)){if(P.tagName!=="g")continue;let U=_(P,"pid");if(!U||!(U in I))continue;let j=parseFloat(_(P,"x")),V=parseFloat(_(P,"y"));if(!isFinite(j)||!isFinite(V))continue;let tt=document.createElementNS(h,"text");B[U]==="input"?(tt.setAttribute("class","inputPortLabel"),tt.setAttribute("x",j-3)):tt.setAttribute("x",j+4),tt.setAttribute("y",V-4),tt.setAttribute("style","font-size:5px"),tt.setAttribute("pointer-events","none"),tt.textContent=I[U],N.appendChild(tt)}}}_scopeSkinStyles(){if(!this._svgEl)return;let s=".schematic-widget",h=p=>{for(let m of p)m.selectorText?m.selectorText=o5e(m.selectorText,s):m.cssRules&&h(m.cssRules)};for(let p of this._svgEl.querySelectorAll("style")){let m=p.sheet;if(m)try{h(m.cssRules)}catch{continue}}}};function o5e(d,s){return d.split(",").map(h=>{let p=h.trim();if(!p)return"";let m=p.charAt(s.length);return p.startsWith(s)&&(m===""||!/[\w-]/.test(m))?p:`${s} ${p}`}).filter(Boolean).join(", ")}var hQt={and:"$_AND_",nand:"$_NAND_",or:"$_OR_",nor:"$_NOR_",xor:"$_XOR_",xnor:"$_XNOR_",not:"$_NOT_",buf:"$_BUF_"},c5e=new Set(["aoi21","aoi22","aoi211","aoi221","aoi222","aoi33","oai21","oai22","oai211","oai221","oai222","oai33"]),a5e=new Set(["and3","and4","or3","or4","nand3","nand4","nor3","nor4"]),fQt=["A","B","C","D","E","F"];function u5e(d){let s=d&&d.gate_kind;if(!s)return d;let h=d.port_directions||{},p=null,m=[];for(let[P,U]of Object.entries(h))U==="output"&&p===null?p=P:U==="input"&&m.push(P);let _,E={};if(s==="aoi"||s==="oai"){let P=Array.isArray(d.gate_terms)?d.gate_terms:[];if(!P.length)return d;let U=P.map(tt=>tt.length);if(_=s+U.slice().sort((tt,Q)=>Q-tt).join(""),!c5e.has(_))return d;let j=P.map(tt=>tt.slice()).sort((tt,Q)=>tt.length-Q.length),V=0;for(let tt of j)for(let Q of tt)E[Q]=fQt[V]||"I"+V,V++}else{let P=m.length;if(s==="not"||s==="buf")_=hQt[s];else if(P<=2)_=hQt[s];else if(_=s+P,!a5e.has(_))return d;if(!_)return d;m.forEach((U,j)=>{E[U]=fQt[j]||"I"+j})}p!==null&&(E[p]="Y");let y=d.connections||{},I={},N={};for(let[P,U]of Object.entries(y))E[P]&&(I[E[P]]=U);for(let[P,U]of Object.entries(h))E[P]&&(N[E[P]]=U);let B={};for(let[P,U]of Object.entries(E))B[U]=P;return{...d,type:_,connections:I,port_directions:N,port_labels:B}}function l5e(d){let s=d&&d.modules&&d.modules.top;if(!s||!s.cells)return d;let h={};for(let[p,m]of Object.entries(s.cells))h[p]=u5e(m);return{...d,modules:{...d.modules,top:{...s,cells:h}}}}var Ent=class{constructor(s,h,p){this._app=s,this._redrawAllLayers=h,this._refreshOverlay=p||h,this._categories=[],this._activeCategory="",this._markerTree=null,this._expandedNodes=new Set,this._build(),this._app.websocketManager.readyPromise.then(()=>this.refresh())}_build(){let s=document.createElement("div");s.className="drc-widget";let h=document.createElement("div");h.className="drc-toolbar",this._categorySelect=document.createElement("select"),this._categorySelect.className="drc-category-select",h.appendChild(this._categorySelect),this._loadBtn=document.createElement("button"),this._loadBtn.className="or-btn or-btn-sm",this._loadBtn.textContent="Load...",h.appendChild(this._loadBtn),s.appendChild(h),this._infoBar=document.createElement("div"),this._infoBar.className="drc-info-bar",s.appendChild(this._infoBar),this._treeContainer=document.createElement("div"),this._treeContainer.className="drc-tree-container",s.appendChild(this._treeContainer),this.element=s,this._bindEvents()}_bindEvents(){this._categorySelect.addEventListener("change",()=>{this._activeCategory=this._categorySelect.value,this._loadMarkers()}),this._loadBtn.addEventListener("click",()=>{this._showLoadDialog()})}_loadCategories(){return this._app.websocketManager.request({type:"drc_categories"}).then(s=>{this._categories=s.categories||[],this._renderCategorySelect()}).catch(s=>{console.error("Failed to load DRC categories:",s)})}refresh(){this._loadCategories().then(()=>{!this._activeCategory&&this._categories.length>0&&(this._activeCategory=this._categories[0].name,this._categorySelect.value=this._activeCategory),this._activeCategory&&this._loadMarkers()})}_renderCategorySelect(){let s=this._categorySelect,h=s.value;s.innerHTML="";let p=document.createElement("option");p.value="",p.textContent="(none)",s.appendChild(p);for(let m of this._categories){let _=document.createElement("option");_.value=m.name,_.textContent=`${m.name} (${m.count})`,s.appendChild(_)}this._activeCategory&&this._categories.some(m=>m.name===this._activeCategory)?s.value=this._activeCategory:h&&this._categories.some(m=>m.name===h)?(s.value=h,this._activeCategory=h):this._activeCategory=""}_loadMarkers(){if(!this._activeCategory){this._markerTree=null,this._treeContainer.innerHTML="",this._infoBar.textContent="",this._refreshOverlay();return}this._treeContainer.innerHTML='
Loading...
',this._app.websocketManager.request({type:"drc_markers",category:this._activeCategory}).then(s=>{this._markerTree=s,this._renderTree(),this._refreshOverlay()}).catch(s=>{this._treeContainer.innerHTML="";let h=document.createElement("div");h.className="drc-error",h.textContent=`Error: ${s}`,this._treeContainer.appendChild(h),console.error("Failed to load DRC markers:",s)})}_renderTree(){if(this._treeContainer.innerHTML="",!this._markerTree)return;if(this._markerTree.error){let E=document.createElement("div");E.className="drc-error",E.textContent=this._markerTree.error,this._treeContainer.appendChild(E);return}let s=this._markerTree.total_count||0;this._infoBar.textContent=`${s} total violation${s!==1?"s":""}`;let h=this._markerTree.name||this._activeCategory,p=this._markerTree.subcategories||[],m=this._markerTree.markers||[];if(p.length===0&&m.length===0){this._treeContainer.innerHTML='
No violations
';return}let _=document.createElement("div");_.className="drc-tree",m.length>0&&_.appendChild(this._buildCategoryNode({name:h||"Markers",count:m.length,markers:m},[]));for(let E of p)_.appendChild(this._buildCategoryNode(E,[h]));this._treeContainer.appendChild(_)}_buildCategoryNode(s,h=[]){let p=[...h,s.name],m=document.createElement("div");m.className="drc-tree-node";let _=document.createElement("div");_.className="drc-tree-header";let E=document.createElement("span");E.className="drc-toggle";let y=s.subcategories&&s.subcategories.length>0||s.markers&&s.markers.length>0,I=JSON.stringify(p),N=this._expandedNodes.has(I);E.textContent=y?N?"\u25BC":"\u25B6":" ",_.appendChild(E);let B=document.createElement("input");B.type="checkbox",B.checked=this._allMarkersVisible(s),B.className="drc-visibility-check",B.addEventListener("change",V=>{V.stopPropagation(),this._toggleCategoryVisibility(s,B.checked,p)}),_.appendChild(B);let P=document.createElement("span");P.className="drc-category-label",P.textContent=s.name,_.appendChild(P);let U=document.createElement("span");U.className="drc-count",U.textContent=`${s.count} markers`,_.appendChild(U),m.appendChild(_);let j=document.createElement("div");if(j.className="drc-tree-children",j.style.display=N?"":"none",s.subcategories)for(let V of s.subcategories)j.appendChild(this._buildCategoryNode(V,p));if(s.markers)for(let V of s.markers)j.appendChild(this._buildMarkerNode(V));return m.appendChild(j),y&&(_.addEventListener("click",V=>{if(V.target===B)return;let tt=j.style.display!=="none";j.style.display=tt?"none":"",E.textContent=tt?"\u25B6":"\u25BC",tt?this._expandedNodes.delete(I):this._expandedNodes.add(I)}),_.style.cursor="pointer"),m}_buildMarkerNode(s){let h=document.createElement("div");h.className="drc-marker-row",h.dataset.markerId=s.id,s.visited||h.classList.add("drc-unvisited");let p=document.createElement("input");p.type="checkbox",p.checked=s.visible,p.className="drc-visibility-check",p.addEventListener("change",E=>{E.stopPropagation(),s.visible=p.checked,this._updateMarker(s.id,"visible",p.checked)}),h.appendChild(p);let m=document.createElement("span");m.className="drc-marker-index",m.textContent=s.index,h.appendChild(m);let _=document.createElement("span");if(_.className="drc-marker-name",_.textContent=s.name,s.layer&&(_.title=`Layer: ${s.layer}`),h.appendChild(_),s.layer){let E=document.createElement("span");E.className="drc-layer-badge",E.textContent=s.layer,h.appendChild(E)}return h.addEventListener("click",E=>{E.target!==p&&this._highlightMarker(s)}),h.addEventListener("dblclick",E=>{E.target!==p&&this._highlightMarker(s,!0)}),h}highlightMarkerById(s,h=!1){let p=this._findMarkerById(s);p&&this._highlightMarker(p,h)}_findMarkerById(s){let h=p=>{if(!p)return null;if(p.markers){for(let m of p.markers)if(m.id===s)return m}if(p.subcategories)for(let m of p.subcategories){let _=h(m);if(_)return _}return null};return h(this._markerTree)}_highlightMarker(s,h=!1){this._app.websocketManager.request({type:"drc_highlight",marker_id:s.id,open_inspector:h}).then(p=>{if(p.ok&&p.bbox){s.visited=!0;let m=this._treeContainer.querySelector(`.drc-marker-row[data-marker-id="${s.id}"]`);m&&m.classList.remove("drc-unvisited"),this._zoomToBBox(p.bbox),this._refreshOverlay(),h&&(p.select_id!=null&&this._app.navigateInspector&&this._app.navigateInspector(p.select_id),this._app.focusComponent&&this._app.focusComponent("Inspector"))}}).catch(p=>{console.error("Failed to highlight DRC marker:",p)})}_zoomToBBox(s){if(!this._app.designScale||!this._app.map)return;let[h,p,m,_]=s,E=m-h,y=_-p,N=10*this._app.getDbuPerMicron(),B=2*Math.max(E,y),P=Math.min(N,B);this._app.map.fitBounds(Vf(h-P,p-P,m+P,_+P,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY))}_updateMarker(s,h,p){this._app.websocketManager.request({type:"drc_update_marker",marker_id:s,field:h,value:!!p}).then(()=>{this._refreshOverlay(),h==="visible"&&(this._update3DHighlights(),p&&this._flashHighlight())}).catch(m=>{console.error("Failed to update DRC marker:",m)})}_flashHighlight(){let s=this._app.map?.getContainer();s&&(s.classList.remove("drc-flashing"),s.offsetWidth,s.classList.add("drc-flashing"),s.addEventListener("animationend",()=>{s.classList.remove("drc-flashing")},{once:!0}))}_update3DHighlights(){let s=this._app.threeDViewerWidget;if(!s)return;let h=[];this._collectVisibleMarkers(this._markerTree,h),h.length>0?s.highlightDRC(h):s.clearHighlightDRC()}_collectVisibleMarkers(s,h){if(s){if(s.markers)for(let p of s.markers)p.visible&&h.push(p);if(s.subcategories)for(let p of s.subcategories)this._collectVisibleMarkers(p,h)}}_setMarkersVisible(s,h){if(s){if(s.markers)for(let p of s.markers)p.visible=h;if(s.subcategories)for(let p of s.subcategories)this._setMarkersVisible(p,h)}}_snapshotMarkerVisibility(s,h=new Map){if(!s)return h;if(s.markers)for(let p of s.markers)h.set(p.id,p.visible);if(s.subcategories)for(let p of s.subcategories)this._snapshotMarkerVisibility(p,h);return h}_restoreMarkerVisibility(s,h){if(s){if(s.markers)for(let p of s.markers)h.has(p.id)&&(p.visible=h.get(p.id));if(s.subcategories)for(let p of s.subcategories)this._restoreMarkerVisibility(p,h)}}_allMarkersVisible(s){if(s.markers){for(let h of s.markers)if(!h.visible)return!1}if(s.subcategories){for(let h of s.subcategories)if(!this._allMarkersVisible(h))return!1}return!0}_toggleCategoryVisibility(s,h,p){let m=this._snapshotMarkerVisibility(s);this._setMarkersVisible(s,h),this._renderTree(),this._app.websocketManager.request({type:"drc_update_category_visibility",category:s.name,path:p||[s.name],visible:!!h}).then(()=>{this._refreshOverlay(),this._update3DHighlights(),h&&this._flashHighlight()}).catch(_=>{console.error("Failed to update category visibility:",_),this._restoreMarkerVisibility(s,m),this._renderTree()})}_showLoadDialog(){new nxt(this._app,h=>{this._activeCategory=h,this._loadCategories().then(()=>{this._categorySelect.value=this._activeCategory,this._loadMarkers()})}).open()}selectCategory(s){this._activeCategory=s,this._categorySelect.value=s,this._loadMarkers()}},nxt=class{constructor(s,h){this._app=s,this._onLoaded=h,this._currentPath="",this._disposers=[],this._closed=!1}open(){this._overlay=document.createElement("div"),this._overlay.className="modal-overlay",this._overlay.innerHTML=` + `,document.body.appendChild(h);function p(_){_.key==="Escape"&&m()}let m=()=>{h.remove(),document.removeEventListener("keydown",p)};return h.addEventListener("click",_=>{_.target===h&&m()}),document.addEventListener("keydown",p),{overlay:h,body:h.querySelector(".modal-body"),errorDiv:h.querySelector(".modal-error"),buttons:h.querySelector(".modal-buttons"),close:m}}function Ty(d,s){d.textContent=s,d.style.display=s?"":"none"}function yR(d,s,{primary:h=!1}={}){let p=document.createElement("button");return p.textContent=s,p.className="or-btn"+(h?" or-btn-primary":""),d.appendChild(p),p}function ynt(d){return"{"+String(d)+"}"}function cQt(d){let s=oQt("Global Connect","gc-dialog"),h=document.createElement("div");h.className="gc-table",s.body.appendChild(h);let p=document.createElement("div");p.className="gc-form";let m=document.createElement("input");m.placeholder="Instance pattern (regex)",m.value=".*";let _=document.createElement("input");_.placeholder="Pin pattern (regex)";let E=document.createElement("select"),y=document.createElement("select"),I=document.createElement("span");I.innerHTML='',p.append(wS("Instance",m),wS("Pin",_),wS("Net",E),wS("Region",y),I);let O=yR(p,"Add rule");s.body.appendChild(p);function B(){let q=_.value.trim()!==""&&E.value!=="";for(let et of[m,_])try{new RegExp(et.value),et.classList.remove("gc-invalid")}catch{et.classList.add("gc-invalid"),q=!1}O.disabled=!q}m.addEventListener("input",B),_.addEventListener("input",B),E.addEventListener("change",B);function P(){d.websocketManager.request({type:"global_connect_info"}).then(q=>{h.innerHTML='
InstancePinNetRegion
',(q.rules||[]).forEach(et=>{let Q=document.createElement("div");Q.className="gc-row",Q.innerHTML=`${qU(et.inst)}${qU(et.pin)}${qU(et.net)}${qU(et.region||"All")}`;let X=document.createElement("button");X.className="or-btn or-btn-sm or-btn-icon",X.textContent="\u2715",X.title="Delete rule",X.addEventListener("click",()=>{d.websocketManager.request({type:"global_connect_delete",inst:et.inst,pin:et.pin,net:et.net,region:et.region||""}).then(P).catch(gt=>Ty(s.errorDiv,String(gt)))}),Q.appendChild(X),h.appendChild(Q)}),nxt(E,q.nets||[]),nxt(y,["All",...q.regions||[]]),B()}).catch(q=>Ty(s.errorDiv,String(q)))}O.addEventListener("click",()=>{let q=p.querySelector('input[name="gc-pg"]:checked').value,et=`add_global_connection -net ${ynt(E.value)} -inst_pattern ${ynt(m.value||".*")} -pin_pattern ${ynt(_.value)} -${q}`;y.value&&y.value!=="All"&&(et+=` -region ${ynt(y.value)}`),sQt(d,et,s.errorDiv,"Rule added.",P)}),yR(s.buttons,"Apply (force)").addEventListener("click",()=>{d.websocketManager.request({type:"global_connect_apply",force:!0}).then(q=>{if(!q.had_rules){Ty(s.errorDiv,"No global-connect rules defined \u2014 add a rule first.");return}Ty(s.errorDiv,`Connected ${q.connected} pin(s).`),d.scheduleRedrawAllLayers&&d.scheduleRedrawAllLayers(),P()}).catch(q=>Ty(s.errorDiv,q.message||String(q)))}),yR(s.buttons,"Clear all").addEventListener("click",()=>sQt(d,"clear_global_connect",s.errorDiv,"Rules cleared.",P)),yR(s.buttons,"Close").addEventListener("click",s.close),P()}function sQt(d,s,h,p,m){d.websocketManager.request({type:"tcl_eval",cmd:s}).then(_=>{if(_.is_error){Ty(h,_.output||_.result||"Command failed");return}Ty(h,p||""),d.scheduleRedrawAllLayers&&d.scheduleRedrawAllLayers(),m&&m()}).catch(_=>Ty(h,_.message||String(_)))}function aQt(d,s){let h=oQt(`Insert Buffer \u2014 ${qU(s)}`,"buf-dialog"),p=yR(h.buttons,"Insert",{primary:!0});p.disabled=!0,yR(h.buttons,"Cancel").addEventListener("click",h.close),d.websocketManager.request({type:"buffer_info",net:s}).then(_=>{if(!_.can_buffer){h.body.textContent=_.error||"This net has multiple drivers and cannot be buffered.";return}s5e(d,h,s,_,p)}).catch(_=>{h.body.textContent=String(_)})}function s5e(d,s,h,p,m){let _=document.createElement("div");_.className="buf-pins";let E=p.drivers||[],y=p.loads||[],I=new Set;function O(){_.innerHTML="";let q=(et,Q)=>{let X=document.createElement("label");X.className="buf-pin";let gt=document.createElement("input");gt.type="checkbox",gt.checked=I.has(et.id),gt.addEventListener("change",()=>{if(gt.checked){if(Q)I.clear();else for(let ft of E)I.delete(ft.id);I.add(et.id)}else I.delete(et.id);O(),W()}),X.append(gt,document.createTextNode(" "+et.label)),_.appendChild(X)};E.forEach(et=>q(et,!0)),y.forEach(et=>q(et,!1))}E.length&&I.add(E[0].id),O();let B=document.createElement("select");nxt(B,p.masters||[]);let P=document.createElement("input");P.placeholder="Optional: new buffer name";let U=document.createElement("input");U.placeholder="Optional: new net name",s.body.append(wS("Pins to buffer",_),wS("Buffer master",B),wS("Buffer name",P),wS("Net name",U));function W(){m.disabled=I.size===0||!B.value}B.addEventListener("change",W),W(),m.addEventListener("click",()=>{let q=new Set(E.map(X=>X.id)),et=[...I],Q=et.some(X=>q.has(X))?"driver":"loads";d.websocketManager.request({type:"insert_buffer",net:h,mode:Q,pins:et,master:B.value,buf_name:P.value.trim(),net_name:U.value.trim()}).then(X=>{if(X.is_error||X.ok===!1){Ty(s.errorDiv,X.error||X.result||"Insertion failed");return}s.close(),X.inst&&(d.selectedInstanceName=X.inst),d.scheduleRedrawAllLayers&&d.scheduleRedrawAllLayers()}).catch(X=>Ty(s.errorDiv,X.message||String(X)))})}function wS(d,s){let h=document.createElement("label");h.className="edit-field";let p=document.createElement("span");return p.textContent=d,h.append(p,s),h}function nxt(d,s){let h=d.value;d.innerHTML="";for(let p of s){let m=document.createElement("option");m.value=p,m.textContent=p,d.appendChild(m)}s.includes(h)&&(d.value=h)}function qU(d){return String(d??"").replace(/&/g,"&").replace(//g,">")}var uQt="#00ffff",o5e="#ffff00",ixt="#ffffff",pk=0,rxt=1,XU=2,xnt=class{constructor(s,h,p,m){this._app=s,this._visibility=h,this._updateInspector=p,this._focusComponent=m,this._state=pk,this._rulers=[],this._nextId=0,this._pt0=null,this._selectedRulerId=null,this._ctrlHeld=!1,this._shiftHeld=!1,this._rulerPane=null,this._rulerLayerGroup=null,this._previewGroup=null,this._snapGroup=null,this._snapTimer=null,this._lastSnapResult=null,this._onMouseMove=this._handleMouseMove.bind(this),this._onMapClick=this._handleMapClick.bind(this),this._initLayers()}_initLayers(){let s=this._app.map;s&&(this._rulerPane=s.createPane("ruler-pane"),this._rulerPane.style.zIndex="700",this._rulerPane.style.pointerEvents="auto",this._rulerLayerGroup=L.layerGroup([],{pane:"ruler-pane"}).addTo(s),this._previewGroup=L.layerGroup([],{pane:"ruler-pane"}).addTo(s),this._snapGroup=L.layerGroup([],{pane:"ruler-pane"}).addTo(s))}isActive(){return this._state!==pk}updateVisibility(){this._rulerPane&&(this._rulerPane.style.display=this._visibility.rulers?"":"none")}toggleRulerMode(){this._state===pk?this._enterFirstPoint():this.cancelRulerBuild()}cancelRulerBuild(){this._state=pk,this._pt0=null,this._lastSnapResult=null,this._clearPreview(),this._clearSnap(),this._setCursor(!1),this._removeMapListeners()}clearAllRulers(){this._rulers=[],this._selectedRulerId=null,this._rulerLayerGroup.clearLayers(),this._clearPreview(),this._clearSnap(),this._state!==pk&&this.cancelRulerBuild()}_enterFirstPoint(){this._state=rxt,this._pt0=null,this._lastSnapResult=null,this._setCursor(!0),this._addMapListeners()}_enterMeasuring(s){this._state=XU,this._pt0=s}_addMapListeners(){let s=this._app.map;s&&(s.getContainer().addEventListener("mousemove",this._onMouseMove),s.on("click",this._onMapClick))}_removeMapListeners(){let s=this._app.map;s&&(s.getContainer().removeEventListener("mousemove",this._onMouseMove),s.off("click",this._onMapClick))}_handleMouseMove(s){if(this._state===pk)return;this._ctrlHeld=s.ctrlKey||s.metaKey,this._shiftHeld=s.shiftKey;let h=this._app.map,p=h.getContainer().getBoundingClientRect(),m=h.containerPointToLatLng([s.clientX-p.left,s.clientY-p.top]),_=Qw(m.lat,m.lng,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY);this._snapTimer&&clearTimeout(this._snapTimer),this._snapTimer=setTimeout(()=>{this._requestSnap(_.dbuX,_.dbuY)},50)}_handleMapClick(s){if(this._state===pk)return;L.DomEvent.stopPropagation(s);let h=s.originalEvent;h&&(this._ctrlHeld=h.ctrlKey||h.metaKey,this._shiftHeld=h.shiftKey);let p=Qw(s.latlng.lat,s.latlng.lng,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY),m=this._getSnappedPoint(p.dbuX,p.dbuY);this._state===rxt?this._enterMeasuring(m):this._state===XU&&(this._createRuler(this._pt0,m),this._state=rxt,this._pt0=null,this._clearPreview(),this._clearSnap(),this._lastSnapResult=null)}async _requestSnap(s,h){let p=this._app;if(!p.websocketManager||!p.designScale)return;if(this._ctrlHeld){this._lastSnapResult=null,this._clearSnap(),this._updatePreview(s,h);return}let _=p.techData?.dbu_per_micron||1e3,E=p.map.getZoom(),y=Math.pow(2,Math.max(0,E)),I=1/(p.designScale*y),O=Math.max(Math.round(10*I),10),B=!0,P=!0;if(this._shiftHeld)B=!0,P=!0;else if(this._state===XU&&this._pt0){let W=Math.abs(s-this._pt0.x),q=Math.abs(h-this._pt0.y);W>q?(B=!1,P=!0):q>W&&(B=!0,P=!1)}let U={};for(let[W,q]of Object.entries(this._visibility))U[W]=!!q;try{let W=await p.websocketManager.request({type:"snap",dbu_x:s,dbu_y:h,radius:_,point_threshold:O,horizontal:!!B,vertical:!!P,visible_layers:[...p.visibleLayerNames],...U});this._lastSnapResult=W,this._updateSnapIndicator(W),this._updatePreview(s,h)}catch{this._lastSnapResult=null,this._clearSnap()}}_getSnappedPoint(s,h){if(this._ctrlHeld)return{x:s,y:h};let p=this._lastSnapResult,m;if(p?.found&&p.is_point)m={x:p.edge[0][0],y:p.edge[0][1]};else if(p?.found){let _=p.edge;_[0][1]===_[1][1]?m={x:s,y:_[0][1]}:m={x:_[0][0],y:h}}else m={x:s,y:h};if(!this._shiftHeld&&this._state===XU&&this._pt0){let _=Math.abs(m.x-this._pt0.x),E=Math.abs(m.y-this._pt0.y);_{L.DomEvent.stopPropagation(se),this._selectRuler(s.id)}),B.addLayer(q);let et=this._app.map.getZoom(),Q=Math.pow(2,Math.max(0,et)),gt=8*(1/(h*Q)),ft=(se,ot,Lt)=>{let be=Math.sqrt(ot*ot+Lt*Lt);if(be===0)return;let ln=-Lt/be,Fn=ot/be,ne=Id(se.x+ln*gt,se.y+Fn*gt,h,p,m,_),xe=Id(se.x-ln*gt,se.y-Fn*gt,h,p,m,_);B.addLayer(L.polyline([ne,xe],{color:O,weight:2,pane:"ruler-pane",interactive:!1}))};if(P)ft(s.pt0,P.x-s.pt0.x,P.y-s.pt0.y),ft(s.pt1,s.pt1.x-P.x,s.pt1.y-P.y);else{let se=s.pt1.x-s.pt0.x,ot=s.pt1.y-s.pt0.y;ft(s.pt0,se,ot),ft(s.pt1,se,ot)}let xt=this._computeDistance(s.pt0,s.pt1,s.euclidian),Bt=U?U[0]:(E[0]+y[0])/2,Ot=U?U[1]:(E[1]+y[1])/2,Pt=L.marker([Bt,Ot],{icon:L.divIcon({className:"ruler-label",html:this._formatDistance(xt),iconSize:null}),pane:"ruler-pane",interactive:!1});B.addLayer(Pt),s._layerGroup=B,this._rulerLayerGroup.addLayer(B)}_rerenderAll(){this._rulerLayerGroup.clearLayers();for(let s of this._rulers)this._renderRuler(s)}_selectRuler(s){this._selectedRulerId=s,this._rerenderAll();let h=this._rulers.find(O=>O.id===s);if(!h)return;wg(this._app);let p=Math.abs(h.pt1.x-h.pt0.x),m=Math.abs(h.pt1.y-h.pt0.y),_=h.euclidian?Math.sqrt(p*p+m*m):p+m,E=O=>this._app.formatDbu(O,!0),y=O=>this._app.parseDbu(O),I={type:"Ruler",name:h.name,bbox:[Math.min(h.pt0.x,h.pt1.x),Math.min(h.pt0.y,h.pt1.y),Math.max(h.pt0.x,h.pt1.x),Math.max(h.pt0.y,h.pt1.y)],properties:[{name:"Name",value:h.name,editable:!0},{name:"Label",value:h.label||"",editable:!0},{name:"Point 0 - x",value:E(h.pt0.x),editable:!0},{name:"Point 0 - y",value:E(h.pt0.y),editable:!0},{name:"Point 1 - x",value:E(h.pt1.x),editable:!0},{name:"Point 1 - y",value:E(h.pt1.y),editable:!0},{name:"Delta x",value:E(p)},{name:"Delta y",value:E(m)},{name:"Length",value:E(_)},{name:"Euclidian",value:h.euclidian?"True":"False",editable:!0,editor:{type:"bool"}}],onPropertyChange:(O,B)=>{switch(O){case"Name":h.name=B;break;case"Label":h.label=B;break;case"Point 0 - x":{let P=y(B);P!==null&&(h.pt0.x=P);break}case"Point 0 - y":{let P=y(B);P!==null&&(h.pt0.y=P);break}case"Point 1 - x":{let P=y(B);P!==null&&(h.pt1.x=P);break}case"Point 1 - y":{let P=y(B);P!==null&&(h.pt1.y=P);break}case"Euclidian":h.euclidian=B.trim().toLowerCase()==="true";break}this._rerenderAll(),this._selectRuler(h.id)}};this._updateInspector(I),this._focusComponent("Inspector"),requestAnimationFrame(()=>{let O=this._app.inspectorEl?.querySelector(".inspector-toolbar");if(!O)return;let B=document.createElement("button");B.className="or-btn or-btn-icon",B.title="Delete ruler",B.innerHTML='',B.addEventListener("click",()=>{this.deleteRuler(s)}),O.appendChild(B)})}deleteRuler(s){let h=this._rulers.findIndex(m=>m.id===s);if(h===-1)return;let p=this._rulers[h];p._layerGroup&&this._rulerLayerGroup.removeLayer(p._layerGroup),this._rulers.splice(h,1),this._selectedRulerId===s&&(this._selectedRulerId=null,this._updateInspector(null))}_getManhattanJoinPt(s,h){return{x:h.x,y:s.y}}_computeDistance(s,h,p=!0){let m=Math.abs(h.x-s.x),_=Math.abs(h.y-s.y);return p?Math.sqrt(m*m+_*_):m+_}_formatDistance(s){return this._app.formatDistance(s)}_setCursor(s){let h=this._app.map?.getContainer();h&&(s?h.classList.add("ruler-mode-cursor"):h.classList.remove("ruler-mode-cursor"))}_clearPreview(){this._previewGroup?.clearLayers()}_clearSnap(){this._snapGroup?.clearLayers()}};var Mnt=class{constructor(s,h,p,m){this._app=s,this._visibility=h,this._updateInspector=p,this._focusComponent=m,this._labels=[],this._anchors=[],this._mode=!1,this._selectedName=null,this._pane=null,this._handleGroup=null,this._initLayers()}_initLayers(){let s=this._app.map;s&&(this._pane=s.createPane("label-pane"),this._pane.style.zIndex="690",this._pane.style.pointerEvents="auto",this._handleGroup=L.layerGroup([],{pane:"label-pane"}).addTo(s))}isActive(){return this._mode}updateVisibility(){this._pane&&(this._pane.style.display=this._visibility.labels?"":"none")}toggleLabelMode(){this._mode=!this._mode,this._setCursor(this._mode)}cancelLabelMode(){this._mode=!1,this._setCursor(!1)}_setCursor(s){let h=this._app.map?.getContainer();h&&h.classList.toggle("label-mode-cursor",s)}_wm(){return this._app.websocketManager}_applyLabels(s){this._labels=s||[],this._renderHandles()}_refresh(s){this._applyLabels(s&&s.labels),this._app.refreshOverlay()}applyRemoteLabels(s){this._applyLabels(s),this._selectedName&&!this._labels.some(h=>h.name===this._selectedName)&&(this._selectedName=null,this._updateInspector(null),this._renderHandles()),this._app.refreshOverlay()}_updateLabel(s,h){return this._wm().request({type:"update_label",name:s,...h})}async reload(){let s=this._wm();if(s)try{let h=await s.request({type:"list_labels"});this._anchors=h.anchors||[],this._applyLabels(h.labels)}catch{this._applyLabels([])}}async handleMapClick(s,h){let p=window.prompt("Label text:");if(this._mode=!1,this._setCursor(!1),!!p)try{let m=await this._wm().request({type:"add_label",x:Math.round(s),y:Math.round(h),text:p});this._refresh(m)}catch(m){console.error("add_label failed:",m)}}_renderHandles(){if(!this._handleGroup)return;this._handleGroup.clearLayers();let s=this._app.designScale;if(!s)return;let h=this._app.designMaxDXDY,p=this._app.designOriginX,m=this._app.designOriginY;for(let _ of this._labels){let E=Id(_.x,_.y,s,h,p,m),y=_.name===this._selectedName,I=L.marker(E,{pane:"label-pane",draggable:!0,keyboard:!1,icon:L.divIcon({className:"label-handle"+(y?" label-handle-selected":""),html:"",iconSize:[10,10]}),title:_.text});I.on("click",O=>{L.DomEvent.stopPropagation(O),this._select(_.name)}),I.on("dragend",O=>{let B=O.target.getLatLng(),{dbuX:P,dbuY:U}=Qw(B.lat,B.lng,s,h,p,m);this._commitMove(_,Math.round(P),Math.round(U))}),this._handleGroup.addLayer(I)}}async _commitMove(s,h,p){try{let m=await this._updateLabel(s.name,{x:h,y:p,text:s.text,size:s.size||0,anchor:s.anchor||"center",color:s.color});this._refresh(m)}catch(m){console.error("move label failed:",m)}}_select(s){this._selectedName=s,this._renderHandles();let h=this._labels.find(_=>_.name===s);if(!h)return;let p=_=>this._app.formatDbu(_,!0),m={type:"Label",name:h.name,bbox:[h.x,h.y,h.x,h.y],properties:[{name:"Name",value:h.name},{name:"Text",value:h.text,editable:!0},{name:"x",value:p(h.x)},{name:"y",value:p(h.y)},{name:"Font size",value:String(h.size||0),editable:!0},{name:"Anchor",value:h.anchor||"center",editable:!0,editor:{type:"list",options:this._anchors}}],onPropertyChange:(_,E)=>{let y={text:h.text,size:h.size||0,anchor:h.anchor||"center"};_==="Text"?y.text=E:_==="Font size"?y.size=parseInt(E,10)||0:_==="Anchor"&&(y.anchor=E.trim()),this._edit(h,y)}};this._updateInspector(m),this._focusComponent("Inspector"),requestAnimationFrame(()=>{let _=this._app.inspectorEl?.querySelector(".inspector-toolbar");if(!_||_.querySelector(".delete-label-btn"))return;let E=document.createElement("button");E.className="or-btn or-btn-icon delete-label-btn",E.title="Delete label",E.innerHTML='',E.addEventListener("click",()=>this.deleteLabel(s)),_.appendChild(E)})}async _edit(s,h){try{let p=await this._updateLabel(s.name,{x:s.x,y:s.y,text:h.text,size:h.size,anchor:h.anchor,color:s.color});this._refresh(p),this._select(s.name)}catch(p){console.error("edit label failed:",p)}}async deleteLabel(s){try{let h=await this._wm().request({type:"delete_label",name:s});this._selectedName===s&&(this._selectedName=null,this._updateInspector(null)),this._refresh(h)}catch(h){console.error("delete_label failed:",h)}}async clearAllLabels(){try{let s=await this._wm().request({type:"clear_labels"});this._selectedName=null,this._refresh(s)}catch(s){console.error("clear_labels failed:",s)}}};var lQt="Select an instance in the layout to view its schematic.",Ent=class{constructor(s,h){this.container=s,this.appState=h,this.element=document.createElement("div"),this.element.className="schematic-widget",this.element.style.cssText="width:100%; height:100%; display:flex; flex-direction:column; background:var(--bg-panel); color:var(--fg-primary); overflow:hidden;",this.controls=document.createElement("div"),this.controls.style.cssText="padding:4px 8px; background:var(--bg-header); border-bottom:1px solid var(--border);flex-shrink:0; display:flex; align-items:center; gap:8px; flex-wrap:wrap;",this.controls.innerHTML='',this.element.appendChild(this.controls),this.svgContainer=document.createElement("div"),this.svgContainer.style.cssText="flex:1; overflow:hidden; position:relative; cursor:grab; background:var(--bg-main);",this.element.appendChild(this.svgContainer),this.container.element.appendChild(this.element),this.controls.querySelector("#schematic-refresh").addEventListener("click",()=>this._onRefresh()),this.controls.querySelector("#schematic-fit").addEventListener("click",()=>this.fitView()),this.controls.querySelector("#schematic-zoom-in").addEventListener("click",()=>this._zoomStep(1.5)),this.controls.querySelector("#schematic-zoom-out").addEventListener("click",()=>this._zoomStep(1/1.5)),this.controls.querySelector("#schematic-select").addEventListener("click",()=>this._toggleSelectMode()),this.controls.querySelector("#schematic-zoom-to").addEventListener("click",()=>this._zoomToSelected()),this.controls.querySelector("#schematic-save-svg").addEventListener("click",()=>this._exportSvg()),this.controls.querySelector("#schematic-save-png").addEventListener("click",()=>this._exportPng()),this.controls.querySelector("#schematic-copy").addEventListener("click",()=>this._copyImage()),this.appState.schematicWidget=this,this.netlistsvg=null,this.skin=null,this._svgEl=null,this._scale=1,this._panX=0,this._panY=0,this._selectMode=!1,this._selectedCell=null,this._svgIdToInstName=new Map,this._setupPanZoom(),this.initNetlistSVG()}_setupPanZoom(){let s=this.svgContainer,h=!1,p,m,_,E;s.addEventListener("wheel",y=>{if(!this._svgEl)return;y.preventDefault();let I=y.deltaY<0?1.2:1/1.2,O=s.getBoundingClientRect(),B=y.clientX-O.left,P=y.clientY-O.top;this._panX=B+(this._panX-B)*I,this._panY=P+(this._panY-P)*I,this._scale*=I,this._applyTransform()},{passive:!1}),s.addEventListener("mousedown",y=>{if(!(!this._svgEl||y.button!==0)){if(this._selectMode){this._handleSelectClick(y);return}h=!0,p=y.clientX,m=y.clientY,_=this._panX,E=this._panY,s.style.cursor="grabbing",y.preventDefault()}}),window.addEventListener("mousemove",y=>{h&&(this._panX=_+(y.clientX-p),this._panY=E+(y.clientY-m),this._applyTransform())}),window.addEventListener("mouseup",()=>{h&&(h=!1,s.style.cursor=this._selectMode?"default":"grab")})}_zoomStep(s){if(!this._svgEl)return;let h=this.svgContainer.getBoundingClientRect(),p=h.width/2,m=h.height/2;this._panX=p+(this._panX-p)*s,this._panY=m+(this._panY-m)*s,this._scale*=s,this._applyTransform()}_toggleSelectMode(){this._selectMode=!this._selectMode;let s=this.controls.querySelector("#schematic-select");this._selectMode?(s.style.background="var(--accent)",s.style.color="var(--fg-white)",this.svgContainer.style.cursor="default"):(s.style.background="",s.style.color="",this.svgContainer.style.cursor="grab",this._clearCellHighlight())}_handleSelectClick(s){if(!this._svgEl)return;let h=s.target,p=null;for(;h&&h!==this._svgEl;){if(h.tagName==="g"&&h.id&&this._svgIdToInstName.has(h.id)){p=h;break}h=h.parentElement}if(this._clearCellHighlight(),!p)return;let m=this._svgIdToInstName.get(p.id);try{let _=p.getBBox(),E=3,y=document.createElementNS("http://www.w3.org/2000/svg","rect");y.setAttribute("x",_.x-E),y.setAttribute("y",_.y-E),y.setAttribute("width",_.width+E*2),y.setAttribute("height",_.height+E*2),y.setAttribute("fill","none"),y.setAttribute("stroke","#e05a00"),y.setAttribute("stroke-width","1.5"),y.setAttribute("rx","3"),y.id="_schematic_highlight",p.appendChild(y),this._selectedCell=p}catch{}this.controls.querySelector("#schematic-zoom-to").disabled=!1,this.setStatus(`Selected: ${m}`),this._fetchInspect(m)}_fetchInspect(s){let h=this.appState.websocketManager;if(!h)return;console.log("[Schematic] inspect:",s);let p=wg(this.appState);h.request({type:"schematic_inspect",inst_name:s,use_dbu:this.appState.showDbu}).then(m=>{N0(this.appState,p)&&(this.appState.updateInspector&&this.appState.updateInspector(m),this.appState.focusComponent&&this.appState.focusComponent("Inspector"),this.appState.refreshOverlay&&this.appState.refreshOverlay())}).catch(m=>{console.error("schematic_inspect failed:",m),this.setStatus(`Inspect error: ${m}`)})}_clearCellHighlight(){if(this._svgEl){let s=this._svgEl.querySelector("#_schematic_highlight");s&&s.remove()}this._selectedCell=null,this.controls.querySelector("#schematic-zoom-to").disabled=!0}_zoomToSelected(){if(!this._selectedCell||!this._svgEl)return;let s=this.svgContainer.getBoundingClientRect(),h=this._selectedCell.getBoundingClientRect(),p=(h.left-s.left-this._panX)/this._scale,m=(h.top-s.top-this._panY)/this._scale,_=h.width/this._scale,E=h.height/this._scale,y=Math.min(s.width/_,s.height/E)*.9;this._scale=y,this._panX=s.width/2-(p+_/2)*y,this._panY=s.height/2-(m+E/2)*y,this._applyTransform()}_applyTransform(){this._svgEl&&(this._svgEl.style.transform=`translate(${this._panX}px, ${this._panY}px) scale(${this._scale})`,this._svgEl.style.transformOrigin="0 0")}fitView(){if(!this._svgEl)return;let s=this.svgContainer.getBoundingClientRect();if(s.width===0||s.height===0)return;let h=this._svgEl.viewBox&&this._svgEl.viewBox.baseVal,p=h&&h.width||this._svgEl.clientWidth||1,m=h&&h.height||this._svgEl.clientHeight||1;this._scale=Math.min(s.width/p,s.height/m)*.95,this._panX=(s.width-p*this._scale)/2,this._panY=(s.height-m*this._scale)/2,this._applyTransform()}initNetlistSVG(){this.netlistsvg=globalThis.netlistsvg,this.skin=globalThis.openroadSkin,this._netlistsvgReady=!!(this.netlistsvg&&this.skin),this._netlistsvgReady&&console.log("NetlistSVG ready."),this.setStatus(this._unreadyStatus()??lQt)}_unreadyStatus(){return this._netlistsvgReady?null:Sc(this.appState)?"The schematic is not available in saved reports.":"Init error: netlistsvg or its skin is missing from the page."}syncCone(s={}){let h=this.controls.querySelector("#schematic-fanin-depth"),p=this.controls.querySelector("#schematic-fanout-depth"),m=(_,E,y)=>{if(!_)return;let I=parseInt(_.max,10)||10;E===!1?_.value=0:y!==void 0&&(_.value=y>0?Math.min(y,I):I)};m(h,s.fanin,s.fanin_depth),m(p,s.fanout,s.fanout_depth),this.refresh(s.inst_name),this.appState.focusComponent&&this.appState.focusComponent("SchematicWidget",{reveal:!0})}_onRefresh(){this.refresh(this._instName)}refresh(s=this.appState.selectedInstanceName){if(this._instName=s,!this._netlistsvgReady){this.setStatus(this._unreadyStatus());return}if(!s){this.setStatus(lQt);return}let h=this.appState.websocketManager;if(!h){this.setStatus("Waiting for server connection\u2026");return}this.setStatus(`Loading schematic for ${s}\u2026`);let p=parseInt(this.controls.querySelector("#schematic-fanin-depth").value,10),m=parseInt(this.controls.querySelector("#schematic-fanout-depth").value,10),_=isNaN(p)?1:p,E=isNaN(m)?1:m;h.readyPromise.then(()=>{h.request({type:"schematic_cone",inst_name:s,fanin_depth:_,fanout_depth:E}).then(y=>{let I=y.modules&&y.modules.top&&y.modules.top.cells;if(!I||Object.keys(I).length===0){this.setStatus("No cells found for selected instance.");return}this.renderNetlist(y)}).catch(y=>{this.setStatus(`Error: ${y}`)})})}setStatus(s){this.controls.querySelector("#schematic-status").textContent=s}_exportSvg(){if(!this._svgEl){this.setStatus("No schematic to export.");return}let s=Y2t(this._svgEl);UJt(new Blob([s],{type:"image/svg+xml;charset=utf-8"}),"schematic.svg")}async _exportPng(){if(!this._svgEl){this.setStatus("No schematic to export.");return}try{let s=await K2t(this._svgEl,2);fk(s,"schematic.png")}catch{this.setStatus("PNG export failed.")}}async _copyImage(){if(!this._svgEl){this.setStatus("No schematic to export.");return}try{let s=await K2t(this._svgEl,2),h=await ant(s);this.setStatus(h?"Schematic copied to clipboard.":"Clipboard not available.")}catch{this.setStatus("Copy failed.")}}async renderNetlist(s){try{this.setStatus("Rendering\u2026"),typeof window<"u"&&(window.__lastSchematic=s);let h=h5e(s),p,m=this.netlistsvg.render(this.skin,h);if(m&&typeof m.then=="function"?p=await m:p=await new Promise((y,I)=>{this.netlistsvg.render(this.skin,h,(O,B)=>{O?I(O):y(B)})}),typeof p!="string"||!p.includes("requestAnimationFrame(()=>this.fitView()));let E=Object.keys(s.modules.top.cells).length;this.setStatus(`${E} cell${E!==1?"s":""}`)}catch(h){console.error("NetlistSVG render failed:",h),this.setStatus(`Render error: ${h.message||h}`)}}_applyPinLabels(s){if(!this._svgEl)return;let h="http://www.w3.org/2000/svg",p="https://github.com/nturley/netlistsvg",m=s.modules&&s.modules.top&&s.modules.top.cells||{},_=(E,y)=>E.getAttribute("s:"+y)??E.getAttributeNS(p,y);for(let[E,y]of Object.entries(m)){let I=y.port_labels;if(!I)continue;let O=this._svgEl.querySelector("#"+CSS.escape("cell_"+E))||this._svgEl.querySelector("#"+CSS.escape(E));if(!O)continue;let B=y.port_directions||{};for(let P of Array.from(O.children)){if(P.tagName!=="g")continue;let U=_(P,"pid");if(!U||!(U in I))continue;let W=parseFloat(_(P,"x")),q=parseFloat(_(P,"y"));if(!isFinite(W)||!isFinite(q))continue;let et=document.createElementNS(h,"text");B[U]==="input"?(et.setAttribute("class","inputPortLabel"),et.setAttribute("x",W-3)):et.setAttribute("x",W+4),et.setAttribute("y",q-4),et.setAttribute("style","font-size:5px"),et.setAttribute("pointer-events","none"),et.textContent=I[U],O.appendChild(et)}}}_scopeSkinStyles(){if(!this._svgEl)return;let s=".schematic-widget",h=p=>{for(let m of p)m.selectorText?m.selectorText=c5e(m.selectorText,s):m.cssRules&&h(m.cssRules)};for(let p of this._svgEl.querySelectorAll("style")){let m=p.sheet;if(m)try{h(m.cssRules)}catch{continue}}}};function c5e(d,s){return d.split(",").map(h=>{let p=h.trim();if(!p)return"";let m=p.charAt(s.length);return p.startsWith(s)&&(m===""||!/[\w-]/.test(m))?p:`${s} ${p}`}).filter(Boolean).join(", ")}var hQt={and:"$_AND_",nand:"$_NAND_",or:"$_OR_",nor:"$_NOR_",xor:"$_XOR_",xnor:"$_XNOR_",not:"$_NOT_",buf:"$_BUF_"},a5e=new Set(["aoi21","aoi22","aoi211","aoi221","aoi222","aoi33","oai21","oai22","oai211","oai221","oai222","oai33"]),u5e=new Set(["and3","and4","or3","or4","nand3","nand4","nor3","nor4"]),fQt=["A","B","C","D","E","F"];function l5e(d){let s=d&&d.gate_kind;if(!s)return d;let h=d.port_directions||{},p=null,m=[];for(let[P,U]of Object.entries(h))U==="output"&&p===null?p=P:U==="input"&&m.push(P);let _,E={};if(s==="aoi"||s==="oai"){let P=Array.isArray(d.gate_terms)?d.gate_terms:[];if(!P.length)return d;let U=P.map(et=>et.length);if(_=s+U.slice().sort((et,Q)=>Q-et).join(""),!a5e.has(_))return d;let W=P.map(et=>et.slice()).sort((et,Q)=>et.length-Q.length),q=0;for(let et of W)for(let Q of et)E[Q]=fQt[q]||"I"+q,q++}else{let P=m.length;if(s==="not"||s==="buf")_=hQt[s];else if(P<=2)_=hQt[s];else if(_=s+P,!u5e.has(_))return d;if(!_)return d;m.forEach((U,W)=>{E[U]=fQt[W]||"I"+W})}p!==null&&(E[p]="Y");let y=d.connections||{},I={},O={};for(let[P,U]of Object.entries(y))E[P]&&(I[E[P]]=U);for(let[P,U]of Object.entries(h))E[P]&&(O[E[P]]=U);let B={};for(let[P,U]of Object.entries(E))B[U]=P;return{...d,type:_,connections:I,port_directions:O,port_labels:B}}function h5e(d){let s=d&&d.modules&&d.modules.top;if(!s||!s.cells)return d;let h={};for(let[p,m]of Object.entries(s.cells))h[p]=l5e(m);return{...d,modules:{...d.modules,top:{...s,cells:h}}}}var Snt=class{constructor(s,h,p){this._app=s,this._redrawAllLayers=h,this._refreshOverlay=p||h,this._categories=[],this._activeCategory="",this._markerTree=null,this._expandedNodes=new Set,this._build(),this._app.websocketManager.readyPromise.then(()=>this.refresh())}_build(){let s=document.createElement("div");s.className="drc-widget";let h=document.createElement("div");h.className="drc-toolbar",this._categorySelect=document.createElement("select"),this._categorySelect.className="drc-category-select",h.appendChild(this._categorySelect),this._loadBtn=document.createElement("button"),this._loadBtn.className="or-btn or-btn-sm",this._loadBtn.textContent="Load...",h.appendChild(this._loadBtn),s.appendChild(h),this._infoBar=document.createElement("div"),this._infoBar.className="drc-info-bar",s.appendChild(this._infoBar),this._treeContainer=document.createElement("div"),this._treeContainer.className="drc-tree-container",s.appendChild(this._treeContainer),this.element=s,this._bindEvents()}_bindEvents(){this._categorySelect.addEventListener("change",()=>{this._activeCategory=this._categorySelect.value,this._loadMarkers()}),this._loadBtn.addEventListener("click",()=>{this._showLoadDialog()})}_loadCategories(){return this._app.websocketManager.request({type:"drc_categories"}).then(s=>{this._categories=s.categories||[],this._renderCategorySelect()}).catch(s=>{console.error("Failed to load DRC categories:",s)})}refresh(){this._loadCategories().then(()=>{!this._activeCategory&&this._categories.length>0&&(this._activeCategory=this._categories[0].name,this._categorySelect.value=this._activeCategory),this._activeCategory&&this._loadMarkers()})}_renderCategorySelect(){let s=this._categorySelect,h=s.value;s.innerHTML="";let p=document.createElement("option");p.value="",p.textContent="(none)",s.appendChild(p);for(let m of this._categories){let _=document.createElement("option");_.value=m.name,_.textContent=`${m.name} (${m.count})`,s.appendChild(_)}this._activeCategory&&this._categories.some(m=>m.name===this._activeCategory)?s.value=this._activeCategory:h&&this._categories.some(m=>m.name===h)?(s.value=h,this._activeCategory=h):this._activeCategory=""}_loadMarkers(){if(!this._activeCategory){this._markerTree=null,this._treeContainer.innerHTML="",this._infoBar.textContent="",this._refreshOverlay();return}this._treeContainer.innerHTML='
Loading...
',this._app.websocketManager.request({type:"drc_markers",category:this._activeCategory}).then(s=>{this._markerTree=s,this._renderTree(),this._refreshOverlay()}).catch(s=>{this._treeContainer.innerHTML="";let h=document.createElement("div");h.className="drc-error",h.textContent=`Error: ${s}`,this._treeContainer.appendChild(h),console.error("Failed to load DRC markers:",s)})}_renderTree(){if(this._treeContainer.innerHTML="",!this._markerTree)return;if(this._markerTree.error){let E=document.createElement("div");E.className="drc-error",E.textContent=this._markerTree.error,this._treeContainer.appendChild(E);return}let s=this._markerTree.total_count||0;this._infoBar.textContent=`${s} total violation${s!==1?"s":""}`;let h=this._markerTree.name||this._activeCategory,p=this._markerTree.subcategories||[],m=this._markerTree.markers||[];if(p.length===0&&m.length===0){this._treeContainer.innerHTML='
No violations
';return}let _=document.createElement("div");_.className="drc-tree",m.length>0&&_.appendChild(this._buildCategoryNode({name:h||"Markers",count:m.length,markers:m},[]));for(let E of p)_.appendChild(this._buildCategoryNode(E,[h]));this._treeContainer.appendChild(_)}_buildCategoryNode(s,h=[]){let p=[...h,s.name],m=document.createElement("div");m.className="drc-tree-node";let _=document.createElement("div");_.className="drc-tree-header";let E=document.createElement("span");E.className="drc-toggle";let y=s.subcategories&&s.subcategories.length>0||s.markers&&s.markers.length>0,I=JSON.stringify(p),O=this._expandedNodes.has(I);E.textContent=y?O?"\u25BC":"\u25B6":" ",_.appendChild(E);let B=document.createElement("input");B.type="checkbox",B.checked=this._allMarkersVisible(s),B.className="drc-visibility-check",B.addEventListener("change",q=>{q.stopPropagation(),this._toggleCategoryVisibility(s,B.checked,p)}),_.appendChild(B);let P=document.createElement("span");P.className="drc-category-label",P.textContent=s.name,_.appendChild(P);let U=document.createElement("span");U.className="drc-count",U.textContent=`${s.count} markers`,_.appendChild(U),m.appendChild(_);let W=document.createElement("div");if(W.className="drc-tree-children",W.style.display=O?"":"none",s.subcategories)for(let q of s.subcategories)W.appendChild(this._buildCategoryNode(q,p));if(s.markers)for(let q of s.markers)W.appendChild(this._buildMarkerNode(q));return m.appendChild(W),y&&(_.addEventListener("click",q=>{if(q.target===B)return;let et=W.style.display!=="none";W.style.display=et?"none":"",E.textContent=et?"\u25B6":"\u25BC",et?this._expandedNodes.delete(I):this._expandedNodes.add(I)}),_.style.cursor="pointer"),m}_buildMarkerNode(s){let h=document.createElement("div");h.className="drc-marker-row",h.dataset.markerId=s.id,s.visited||h.classList.add("drc-unvisited");let p=document.createElement("input");p.type="checkbox",p.checked=s.visible,p.className="drc-visibility-check",p.addEventListener("change",E=>{E.stopPropagation(),s.visible=p.checked,this._updateMarker(s.id,"visible",p.checked)}),h.appendChild(p);let m=document.createElement("span");m.className="drc-marker-index",m.textContent=s.index,h.appendChild(m);let _=document.createElement("span");if(_.className="drc-marker-name",_.textContent=s.name,s.layer&&(_.title=`Layer: ${s.layer}`),h.appendChild(_),s.layer){let E=document.createElement("span");E.className="drc-layer-badge",E.textContent=s.layer,h.appendChild(E)}return h.addEventListener("click",E=>{E.target!==p&&this._highlightMarker(s)}),h.addEventListener("dblclick",E=>{E.target!==p&&this._highlightMarker(s,!0)}),h}highlightMarkerById(s,h=!1){let p=this._findMarkerById(s);p&&this._highlightMarker(p,h)}_findMarkerById(s){let h=p=>{if(!p)return null;if(p.markers){for(let m of p.markers)if(m.id===s)return m}if(p.subcategories)for(let m of p.subcategories){let _=h(m);if(_)return _}return null};return h(this._markerTree)}_highlightMarker(s,h=!1){this._app.websocketManager.request({type:"drc_highlight",marker_id:s.id,open_inspector:h}).then(p=>{if(p.ok&&p.bbox){s.visited=!0;let m=this._treeContainer.querySelector(`.drc-marker-row[data-marker-id="${s.id}"]`);m&&m.classList.remove("drc-unvisited"),this._zoomToBBox(p.bbox),this._refreshOverlay(),h&&(p.select_id!=null&&this._app.navigateInspector&&this._app.navigateInspector(p.select_id),this._app.focusComponent&&this._app.focusComponent("Inspector"))}}).catch(p=>{console.error("Failed to highlight DRC marker:",p)})}_zoomToBBox(s){if(!this._app.designScale||!this._app.map)return;let[h,p,m,_]=s,E=m-h,y=_-p,O=10*this._app.getDbuPerMicron(),B=2*Math.max(E,y),P=Math.min(O,B);this._app.map.fitBounds(Vf(h-P,p-P,m+P,_+P,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY))}_updateMarker(s,h,p){this._app.websocketManager.request({type:"drc_update_marker",marker_id:s,field:h,value:!!p}).then(()=>{this._refreshOverlay(),h==="visible"&&(this._update3DHighlights(),p&&this._flashHighlight())}).catch(m=>{console.error("Failed to update DRC marker:",m)})}_flashHighlight(){let s=this._app.map?.getContainer();s&&(s.classList.remove("drc-flashing"),s.offsetWidth,s.classList.add("drc-flashing"),s.addEventListener("animationend",()=>{s.classList.remove("drc-flashing")},{once:!0}))}_update3DHighlights(){let s=this._app.threeDViewerWidget;if(!s)return;let h=[];this._collectVisibleMarkers(this._markerTree,h),h.length>0?s.highlightDRC(h):s.clearHighlightDRC()}_collectVisibleMarkers(s,h){if(s){if(s.markers)for(let p of s.markers)p.visible&&h.push(p);if(s.subcategories)for(let p of s.subcategories)this._collectVisibleMarkers(p,h)}}_setMarkersVisible(s,h){if(s){if(s.markers)for(let p of s.markers)p.visible=h;if(s.subcategories)for(let p of s.subcategories)this._setMarkersVisible(p,h)}}_snapshotMarkerVisibility(s,h=new Map){if(!s)return h;if(s.markers)for(let p of s.markers)h.set(p.id,p.visible);if(s.subcategories)for(let p of s.subcategories)this._snapshotMarkerVisibility(p,h);return h}_restoreMarkerVisibility(s,h){if(s){if(s.markers)for(let p of s.markers)h.has(p.id)&&(p.visible=h.get(p.id));if(s.subcategories)for(let p of s.subcategories)this._restoreMarkerVisibility(p,h)}}_allMarkersVisible(s){if(s.markers){for(let h of s.markers)if(!h.visible)return!1}if(s.subcategories){for(let h of s.subcategories)if(!this._allMarkersVisible(h))return!1}return!0}_toggleCategoryVisibility(s,h,p){let m=this._snapshotMarkerVisibility(s);this._setMarkersVisible(s,h),this._renderTree(),this._app.websocketManager.request({type:"drc_update_category_visibility",category:s.name,path:p||[s.name],visible:!!h}).then(()=>{this._refreshOverlay(),this._update3DHighlights(),h&&this._flashHighlight()}).catch(_=>{console.error("Failed to update category visibility:",_),this._restoreMarkerVisibility(s,m),this._renderTree()})}_showLoadDialog(){new sxt(this._app,h=>{this._activeCategory=h,this._loadCategories().then(()=>{this._categorySelect.value=this._activeCategory,this._loadMarkers()})}).open()}selectCategory(s){this._activeCategory=s,this._categorySelect.value=s,this._loadMarkers()}},sxt=class{constructor(s,h){this._app=s,this._onLoaded=h,this._currentPath="",this._disposers=[],this._closed=!1}open(){this._overlay=document.createElement("div"),this._overlay.className="modal-overlay",this._overlay.innerHTML=` - `,document.body.appendChild(this._overlay),this._breadcrumb=this._overlay.querySelector(".fb-breadcrumb"),this._fileList=this._overlay.querySelector(".fb-file-list"),this._pathInput=this._overlay.querySelector(".fb-path-input"),this._errorDiv=this._overlay.querySelector(".modal-error"),this._okBtn=this._overlay.querySelector(".ok"),this._cancelBtn=this._overlay.querySelector(".cancel"),this._listen(this._pathInput,"input",()=>this._updateOkState()),this._listen(this._pathInput,"keydown",s=>{if(s.key==="Enter"){let h=this._pathInput.value.trim();h.endsWith("/")?this._navigate(h.replace(/\/+$/,"")||"/"):this._submit()}else s.key==="Escape"&&this.close()}),this._listen(this._okBtn,"click",()=>this._submit()),this._listen(this._cancelBtn,"click",()=>this.close()),this._listen(this._overlay,"click",s=>{s.target===this._overlay&&this.close()}),this._navigate("")}close(){if(!this._closed){this._closed=!0;for(let s of this._disposers)s();this._disposers.length=0,this._overlay&&(this._overlay.remove(),this._overlay=null)}}_listen(s,h,p){s.addEventListener(h,p),this._disposers.push(()=>s.removeEventListener(h,p))}_updateOkState(){this._okBtn.disabled=!this._pathInput.value.trim()}_renderBreadcrumb(s){this._breadcrumb.innerHTML="";let h=s.split("/").filter(Boolean),p=document.createElement("span");p.className="fb-crumb",p.textContent="/",this._listen(p,"click",()=>this._navigate("/")),this._breadcrumb.appendChild(p);let m="";for(let _ of h){m+="/"+_;let E=document.createElement("span");E.className="fb-crumb-sep",E.textContent=" / ",this._breadcrumb.appendChild(E);let y=document.createElement("span");y.className="fb-crumb",y.textContent=_;let I=m;this._listen(y,"click",()=>this._navigate(I)),this._breadcrumb.appendChild(y)}}_renderEntries(s){if(this._fileList.innerHTML="",!s||s.length===0){let h=document.createElement("div");h.className="fb-empty",h.textContent="(empty directory)",this._fileList.appendChild(h);return}for(let h of s){let p=document.createElement("div");p.className="fb-entry",h.is_dir&&p.classList.add("fb-dir");let m=document.createElement("span");m.className="fb-icon",m.textContent=h.is_dir?"\u{1F4C1}":"\u{1F4C4}",p.appendChild(m);let _=document.createElement("span");_.className="fb-name",_.textContent=h.name,p.appendChild(_),h.is_dir?this._listen(p,"click",()=>this._navigate(this._currentPath+"/"+h.name)):(this._listen(p,"click",()=>{let E=this._fileList.querySelector(".fb-selected");E&&E.classList.remove("fb-selected"),p.classList.add("fb-selected"),this._pathInput.value=this._currentPath+"/"+h.name,this._updateOkState()}),this._listen(p,"dblclick",()=>{this._pathInput.value=this._currentPath+"/"+h.name,this._updateOkState(),this._submit()})),this._fileList.appendChild(p)}}async _navigate(s){this._errorDiv.style.display="none",this._fileList.innerHTML='
Loading...
';try{let h=await this._app.websocketManager.request({type:"list_dir",path:s||""});if(this._closed)return;this._currentPath=h.path,this._renderBreadcrumb(h.path),this._renderEntries(h.entries),this._pathInput.value="",this._updateOkState()}catch(h){if(this._closed)return;this._fileList.innerHTML="",this._errorDiv.textContent=h.message||String(h),this._errorDiv.style.display=""}}async _submit(){let s=this._pathInput.value.trim();if(s){this._okBtn.disabled=!0,this._okBtn.textContent="Loading...",this._errorDiv.style.display="none";try{let h=await this._app.websocketManager.request({type:"drc_load_report",path:s});if(this._closed)return;if(h.ok){let p=h.category;this.close(),this._onLoaded(p)}else this._errorDiv.textContent=h.error||"Failed to load report",this._errorDiv.style.display="",this._okBtn.disabled=!1,this._okBtn.textContent="Load"}catch(h){if(this._closed)return;this._errorDiv.textContent=h.message||"Request failed",this._errorDiv.style.display="",this._okBtn.disabled=!1,this._okBtn.textContent="Load"}}}};var h5e=` -\r[]{}`;var Snt=class{constructor(s,h){this._input=s,this._ws=h,this._popup=null,this._items=[],this._selectedIndex=-1,this._replaceStart=0,this._replaceEnd=0,this._debounceTimer=null,this._commandCache=null,this._history=[],this._historyIndex=-1,this._historyStash="",this._createPopup(),this._onInputBound=this._onInput.bind(this),this._onBlurBound=this._onBlur.bind(this),this._input.addEventListener("input",this._onInputBound),this._input.addEventListener("blur",this._onBlurBound)}_createPopup(){this._popup=document.createElement("div"),this._popup.className="tcl-complete-popup",this._popup.style.display="none",this._input.parentElement.appendChild(this._popup)}handleKeyDown(s){let h=this._popup.style.display!=="none";return s.key==="Tab"?(s.preventDefault(),h?this._tabAccept():this._tabComplete(this._input.value,this._input.selectionStart),!0):s.key==="Escape"?h?(this._hidePopup(),!0):!1:s.key==="ArrowDown"?h?(s.preventDefault(),this._selectItem(this._selectedIndex+1),!0):this._historyIndex>=0?(s.preventDefault(),this._historyIndex--,this._historyIndex<0?this._input.value=this._historyStash:this._input.value=this._history[this._historyIndex],!0):!1:s.key==="ArrowUp"?h?(s.preventDefault(),this._selectItem(this._selectedIndex-1),!0):this._historyIndex{let s=this._input.value,h=this._input.selectionStart,p=this._extractPrefix(s,h);p.length>=2||p.length>=1&&(p[0]==="$"||p[0]==="-")?this._requestCompletions(s,h):this._hidePopup()},100)}_onBlur(){setTimeout(()=>this._hidePopup(),150)}_extractPrefix(s,h){let p=h-1;for(;p>=0&&h5e.indexOf(s[p])===-1;)p--;return s.substring(p+1,h)}_fetchCompletions(s,h,p){let m=this._extractPrefix(s,h),_=m.length>0&&m[0]==="$",E=m.length>0&&m[0]==="-",y=!_&&!E,I=h-m.length,N=s.substring(0,I),B=/^[\s\[]*$/.test(N);if(y&&B&&this._commandCache){let P=m.toLowerCase(),U=this._commandCache.filter(j=>j.toLowerCase().startsWith(P));p(U,I,h);return}this._ws.request({type:"tcl_complete",line:s,cursor_pos:h}).then(P=>{P.mode==="commands"&&!this._commandCache&&m===""&&(this._commandCache=P.completions),P.mode==="commands"&&!this._commandCache&&this._ws.request({type:"tcl_complete",line:"",cursor_pos:0}).then(U=>{U.mode==="commands"&&(this._commandCache=U.completions)}).catch(()=>{}),p(P.completions,P.replace_start,P.replace_end)}).catch(()=>p([],0,0))}_requestCompletions(s,h){this._fetchCompletions(s,h,(p,m,_)=>{this._showPopup(p,m,_)})}_tabAccept(){if(this._items.length===0){this._hidePopup();return}if(this._items.length===1){this._selectedIndex=0,this._acceptCompletion();return}this._advanceToCommonPrefix()}_tabComplete(s,h){this._fetchCompletions(s,h,(p,m,_)=>{if(!p||p.length===0){this._hidePopup();return}if(p.length===1){this._items=p,this._replaceStart=m,this._replaceEnd=_,this._selectedIndex=0,this._acceptCompletion();return}this._items=p,this._replaceStart=m,this._replaceEnd=_,this._advanceToCommonPrefix(),this._showPopup(p,this._replaceStart,this._replaceEnd)})}_advanceToCommonPrefix(){if(this._items.length<2)return!1;let s=this._items[0];for(let E=1;E0;E++){let y=this._items[E],I=0;for(;I{let I=document.createElement("div");I.className="tcl-complete-item",I.textContent=E,I.addEventListener("mousedown",N=>{N.preventDefault(),this._selectedIndex=y,this._acceptCompletion()}),this._popup.appendChild(I)}),s.length>15){let E=document.createElement("div");E.className="tcl-complete-more",E.textContent=`... ${s.length-15} more`,this._popup.appendChild(E)}this._selectedIndex=0,this._highlightSelected(),this._popup.style.display="block"}_hidePopup(){this._popup.style.display="none",this._items=[],this._selectedIndex=-1}_selectItem(s){if(this._items.length===0)return;let h=Math.min(this._items.length,15)-1;this._selectedIndex=Math.max(0,Math.min(s,h)),this._highlightSelected()}_highlightSelected(){let s=this._popup.querySelectorAll(".tcl-complete-item");s.forEach((h,p)=>{h.classList.toggle("selected",p===this._selectedIndex)}),s[this._selectedIndex]&&s[this._selectedIndex].scrollIntoView&&s[this._selectedIndex].scrollIntoView({block:"nearest"})}_acceptCompletion(){if(this._selectedIndex<0||this._selectedIndex>=this._items.length){this._hidePopup();return}let s=this._items[this._selectedIndex],h=this._input.value.substring(0,this._replaceStart),p=this._input.value.substring(this._replaceEnd),_=!s.endsWith("/")&&!s.endsWith("::")&&(p.length===0||p[0]!==" ")?" ":"";this._input.value=h+s+_+p;let E=this._replaceStart+s.length+_.length;this._input.setSelectionRange(E,E),this._input.focus(),this._hidePopup()}};var dQt=[{key:"or_visibility",store:"cookie"},{key:"or_selectability",store:"cookie"},{key:"or_hidden_layers",store:"session"},{key:"or_nonselectable_layers",store:"session"},{key:"or_layer_patterns",store:"session"},{key:"or_hidden_chiplets",store:"cookie"},{key:"or_bg_color",store:"cookie"},{key:"or_show_dbu",store:"cookie"},{key:"or_theme",store:"theme"},{key:"or_use_true_z",store:"cookie"},{key:"or_ruler_style",store:"cookie"},{key:"or_wheel_zoom",store:"cookie"},{key:"or_arrow_step",store:"cookie"},{key:"or_font_family",store:"cookie"},{key:"or_font_scale",store:"cookie"}];function f5e(d,s){try{return window[d].getItem(s)}catch{return null}}function d5e(d,s,h){try{h===null?window[d].removeItem(s):window[d].setItem(s,h)}catch{}}function p5e({key:d,store:s}){return s==="session"?f5e("sessionStorage",d):qf(d)}function g5e({key:d,store:s},h){s==="session"?d5e("sessionStorage",d,h):s==="theme"?h===null?NJt():ont(h):h===null?snt(d):Rd(d,h)}function pQt(){let d={};for(let s of dQt){let h=p5e(s);h&&(d[s.key]=h)}return{version:1,entries:d}}function m5e(d){return typeof d=="string"&&d!==""&&!/[;\r\n]/.test(d)}function gQt(d){for(let s of dQt){let h=d[s.key];g5e(s,m5e(h)?h:null)}}function mQt(d,s=typeof document<"u"?document:null){let h="OpenROAD",p=d?`${h} - ${d}`:h;return s&&(s.title=p),p}var Zs=globalThis.THREE,bQt=2,b5e=.002,w5e=.9,v5e=1.1,_5e=.1,y5e=20,x5e=3,mk=2,wQt=2,M5e=10,E5e=1e4,S5e=.15,T5e=300,C5e=6,Tnt=Math.PI/180,vQt=[5025616,2201331,16750592,10233776,48340,16007990,2533018,7951688,15277667,4149685];function A5e(d){let s=new Array(d.length).fill(0),h=new Map;d.forEach((p,m)=>{let _=p.z;h.has(_)||h.set(_,[]),h.get(_).push({idx:m,chiplet:p})});for(let p of h.values()){if(p.length<=1)continue;let m=[];for(let{idx:_,chiplet:E}of p){let y=E.x,I=E.y,N=E.x+E.width,B=E.y+E.height,P=!1;for(let U=0;UyV.x1&&IV.y1)){m[U].push({x1:y,y1:I,x2:N,y2:B}),s[_]=U,P=!0;break}P||(m.push([{x1:y,y1:I,x2:N,y2:B}]),s[_]=m.length-1)}}return s}var Cnt=class{constructor(s,h){if(this._app=h,this._container=s,this._element=document.createElement("div"),this._element.className="three-d-viewer-widget",s.element.appendChild(this._element),!Zs){Sc(h)?this._showInfo("The 3D view is not available in saved reports."):this._showError("three.js is missing from the page."),this._destroyed=!0;return}this._canvasContainer=document.createElement("div"),this._canvasContainer.className="three-d-canvas-container",this._element.appendChild(this._canvasContainer),this._tooltip=document.createElement("div"),this._tooltip.className="or-tooltip",this._canvasContainer.appendChild(this._tooltip),this._optionsOverlay=this._createOptionsOverlay(),this._canvasContainer.appendChild(this._optionsOverlay),this._raycaster=new Zs.Raycaster,this._scene=new Zs.Scene,this._applyTheme(),this._themeObserver=new MutationObserver(()=>{this._applyTheme(),this.render()}),this._themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),this._camera=new Zs.PerspectiveCamera(45,1,10,1e5),this._camera.position.set(0,0,1e3);try{this._renderer=new Zs.WebGLRenderer({antialias:!0,preserveDrawingBuffer:!0})}catch(E){console.error("3D viewer: failed to create WebGL context:",E),this._showWebGLUnavailable(E),this._themeObserver&&(this._themeObserver.disconnect(),this._themeObserver=null),this._destroyed=!0;return}this._renderer.setPixelRatio(window.devicePixelRatio),this._renderer.setSize(s.width,s.height),this._canvasContainer.appendChild(this._renderer.domElement),this._rotation=new Zs.Quaternion,this._distance=1e3,this._panX=0,this._panY=0,this._boundingRadius=1,this._sceneCenter=new Zs.Vector3,this._mouseDown=!1,this._mouseButton=-1,this._lastMousePos={x:0,y:0},this._setupMouseHandlers();let p=new Zs.AmbientLight(16777215,.5);this._scene.add(p);let m=new Zs.DirectionalLight(16777215,.8);m.position.set(1,1,1).normalize(),this._scene.add(m);let _=new Zs.DirectionalLight(16777215,.3);_.position.set(-1,-.5,.5).normalize(),this._scene.add(_),s.on("resize",this.onResize.bind(this)),s.on("open",this.onOpen.bind(this)),s.on("destroy",this.onDestroy.bind(this)),this._designGroup=new Zs.Group,this._scene.add(this._designGroup),this._chipletMeshes=[],this._loading=!1,this._destroyed=!1,this._edgeMaterial=null}_setupMouseHandlers(){let s=this._renderer.domElement;s.addEventListener("mousedown",h=>{this._mouseDown=!0,this._mouseButton=h.button,this._lastMousePos.x=h.clientX,this._lastMousePos.y=h.clientY,s.focus(),h.preventDefault()}),s.addEventListener("contextmenu",h=>h.preventDefault()),this._onMouseMove=h=>{if(!this._mouseDown)return;let p=h.clientX-this._lastMousePos.x,m=h.clientY-this._lastMousePos.y;this._lastMousePos.x=h.clientX,this._lastMousePos.y=h.clientY,!(p===0&&m===0)&&(this._mouseButton===0?this._handleRotate(p,m):this._mouseButton===2&&this._handlePan(p,m),this._updateCamera())},this._onMouseUp=h=>{this._mouseDown&&h.button===this._mouseButton&&(this._mouseDown=!1,this._mouseButton=-1)},window.addEventListener("mousemove",this._onMouseMove),window.addEventListener("mouseup",this._onMouseUp),s.addEventListener("wheel",h=>{h.preventDefault(),h.deltaY<0?this._distance*=w5e:this._distance*=v5e;let p=Math.max(this._boundingRadius*_5e,1),m=Math.max(this._boundingRadius*y5e,p);this._distance=Math.max(p,Math.min(m,this._distance)),this._updateCamera()},{passive:!1}),s.tabIndex=0,s.style.outline="none",s.addEventListener("keydown",h=>{h.key.toLowerCase()==="f"&&this.resetCamera()}),s.addEventListener("dblclick",h=>{h.preventDefault();let p=this._pickDrcMarkerId(h);if(p!=null&&this._app.drcWidget){this._app.drcWidget.highlightMarkerById(p,!0);return}this.resetCamera()}),s.addEventListener("mousemove",h=>{if(this._mouseDown){this._hideTooltip();return}this._updateTooltip(h)}),s.addEventListener("mouseleave",()=>{this._hideTooltip()})}_createOptionsOverlay(){let s=document.createElement("div");s.className="three-d-options";let h=document.createElement("label");h.title="Render chiplets at their true Z (disable stacking offset for overlapping chiplets at same Z).";let p=document.createElement("input");p.type="checkbox",p.checked=!!this._app.useTrueZ,p.addEventListener("change",()=>{this._app.useTrueZ=p.checked,Rd("or_use_true_z",p.checked?"1":"0"),this._app.syncDisplayState(),this.refreshSceneForOptions()}),h.appendChild(p),h.appendChild(document.createTextNode("True Z (no stacking)")),s.appendChild(h);let m=document.createElement("div");m.style.cssText="margin-top:4px; display:flex; gap:4px;";let _=document.createElement("button");_.className="or-btn or-btn-sm",_.textContent="Save PNG",_.title="Save the 3D view as a PNG image (2x resolution)",_.addEventListener("click",()=>this._exportPng(2));let E=document.createElement("button");return E.className="or-btn or-btn-sm",E.textContent="Copy",E.title="Copy the 3D view image to the clipboard",E.addEventListener("click",()=>this._copyImage(2)),m.appendChild(_),m.appendChild(E),s.appendChild(m),s}_capturePng(s=2){if(!this._renderer)return null;let h=this._renderer,p=h.domElement.clientWidth||h.domElement.width,m=h.domElement.clientHeight||h.domElement.height,_=h.getPixelRatio();try{return h.setPixelRatio(_*s),h.setSize(p,m,!1),this.render(),h.domElement.toDataURL("image/png")}finally{h.setPixelRatio(_),h.setSize(p,m,!1),this.render()}}_exportPng(s=2){let h=this._capturePng(s);h&&dk(h,"3d-view.png")}async _copyImage(s=2){let h=this._capturePng(s);h&&await cnt(h)}_setRaycasterFromEvent(s){let p=this._renderer.domElement.getBoundingClientRect(),m=new Zs.Vector2((s.clientX-p.left)/p.width*2-1,-((s.clientY-p.top)/p.height*2-1));this._raycaster.setFromCamera(m,this._camera)}_updateTooltip(s){if(!this._chipletMeshes.length){this._hideTooltip();return}this._setRaycasterFromEvent(s);let h=this._chipletMeshes.map(y=>y.mesh),p=this._raycaster.intersectObjects(h,!1);if(p.length===0){this._hideTooltip();return}let m=p[0].object,_=this._chipletMeshes.find(y=>y.mesh===m);if(!_){this._hideTooltip();return}this._tooltip.textContent=_.data.name,this._tooltip.style.display="block";let E=this._canvasContainer.getBoundingClientRect();this._tooltip.style.left=s.clientX-E.left+12+"px",this._tooltip.style.top=s.clientY-E.top+12+"px"}_hideTooltip(){this._tooltip&&(this._tooltip.style.display="none")}_pickDrcMarkerId(s){if(!this._drcHitboxMesh||!this._drcHitboxMarkerIds)return null;this._setRaycasterFromEvent(s);let h=this._raycaster.intersectObject(this._drcHitboxMesh,!1);if(h.length===0)return null;let p=h[0].instanceId;return p==null?null:this._drcHitboxMarkerIds[p]??null}_handleRotate(s,h){let p=Math.sqrt(s*s+h*h);if(p<.001)return;let m=new Zs.Vector3(h/p,s/p,0),_=p/bQt,y=new Zs.Quaternion().setFromAxisAngle(m,_*Tnt).clone().multiply(this._rotation);if(new Zs.Vector3(0,0,1).applyQuaternion(y).z>=0)this._rotation.copy(y);else{let N=new Zs.Vector3(0,1,0),B=s/bQt*Tnt,U=new Zs.Quaternion().setFromAxisAngle(N,B).clone().multiply(this._rotation);new Zs.Vector3(0,0,1).applyQuaternion(U).z>=0&&this._rotation.copy(U)}}_handlePan(s,h){let p=this._distance*b5e;this._panX+=s*p,this._panY-=h*p}_updateCamera(){let s=Math.max(this._boundingRadius,1e3),h=Math.max(this._distance-s*wQt,M5e),p=this._distance+s*wQt;p0;){let s=this._designGroup.children[0];this._designGroup.remove(s),s.geometry&&s.geometry.dispose(),s.material&&!s.material._shared&&s.material.dispose()}this._edgeMaterial&&(this._edgeMaterial.dispose(),this._edgeMaterial=null),this._onMouseMove&&(window.removeEventListener("mousemove",this._onMouseMove),this._onMouseMove=null),this._onMouseUp&&(window.removeEventListener("mouseup",this._onMouseUp),this._onMouseUp=null),this._renderer&&(this._renderer.dispose(),this._renderer=null),this._app.threeDViewerWidget===this&&(this._app.threeDViewerWidget=null)}}_setInitialCameraState(){this._distance=this._boundingRadius*x5e;let s=new Zs.Quaternion().setFromAxisAngle(new Zs.Vector3(1,0,0),-45*Tnt),h=new Zs.Quaternion().setFromAxisAngle(new Zs.Vector3(0,0,1),45*Tnt);this._rotation=s.multiply(h),this._panX=0,this._panY=0}resetCamera(){this._sceneBounds&&(this._setInitialCameraState(),this._updateCamera())}onResize(){if(this._destroyed)return;let s=this._canvasContainer.getBoundingClientRect(),h=s.width,p=s.height;h===0||p===0||(this._camera.aspect=h/p,this._camera.updateProjectionMatrix(),this._renderer.setSize(h,p),this.render())}render(){this._destroyed||this._renderer&&this._scene&&this._camera&&this._renderer.render(this._scene,this._camera)}_applyTheme(){let h=fk().bgMap||"#000000";this._scene.background=new Zs.Color(h)}async loadData(){if(!(this._loading||this._destroyed)){this._loading=!0;for(let s of[".three-d-error",".three-d-info"]){let h=this._element.querySelector(s);h&&h.remove()}try{await this._app.websocketManager.readyPromise;let s=await this._app.websocketManager.request({type:"get_3d_data"});if(this._destroyed)return;if(s&&s.error){this._showError(s.error);return}if(s&&s.info){this._showInfo(s.info);return}this.buildScene(s)}catch(s){if(this._destroyed)return;console.error("Failed to load 3D data:",s),this._showError(s.message||String(s))}finally{this._loading=!1}}}_showOverlay(s,h,p){let m=document.createElement("div");m.className=s,m.style.cssText="position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-family:monospace;text-align:center;",m.style.color=p,m.textContent=h,this._element.appendChild(m)}_showError(s){this._showOverlay("three-d-error","Failed to load 3D data: "+s,"var(--error)")}_showInfo(s){this._showOverlay("three-d-info",s,"var(--fg-muted, #888)")}_showWebGLUnavailable(s){let h=document.createElement("div");h.className="three-d-error",h.style.cssText="position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-family:monospace;text-align:center;max-width:80%;color:var(--error);";let p=s&&s.message?s.message:String(s||"");h.innerHTML='
3D viewer unavailable: WebGL context could not be created.
In Chrome, open chrome://flags/#ignore-gpu-blocklist and set Override software rendering list to Enabled, then relaunch the browser.
Otherwise enable hardware acceleration or try a different browser. See chrome://gpu for details.
'+(p?'
'+p+"
":""),this._element.appendChild(h)}buildScene(s){if(this._destroyed||(this._lastSceneData=s,this._clearScene(),!s||!s.chiplets||s.chiplets.length===0))return;let h=this._app.getDbuPerMicron(),p=this._buildChiplets(s.chiplets,h);p.minX!==1/0&&(this._buildGrid(p),this._setSceneBoundsAndCenter(p),this._setInitialCameraState(),this._updateCamera())}_clearScene(){for(this._chipletMeshes=[];this._designGroup.children.length>0;){let s=this._designGroup.children[0];this._designGroup.remove(s),s.geometry&&s.geometry.dispose(),s.material&&!s.material._shared&&s.material.dispose()}this._hideTooltip()}_buildChiplets(s,h){let p={minX:1/0,minY:1/0,minZ:1/0,maxX:-1/0,maxY:-1/0,maxZ:-1/0};this._edgeMaterial||(this._edgeMaterial=new Zs.LineBasicMaterial({color:0,linewidth:1}),this._edgeMaterial._shared=!0);let m=this._app.useTrueZ?new Array(s.length).fill(0):A5e(s);return s.forEach((_,E)=>{let y=_.width/h,I=_.height/h,N=_.thickness/h*mk,B=vQt[E%vQt.length],P=new Zs.MeshPhongMaterial({color:B,transparent:!1,opacity:1,side:Zs.DoubleSide,shininess:40}),U=new Zs.BoxGeometry(y,I,N),j=new Zs.Mesh(U,P),V=_.x/h+y/2,tt=_.y/h+I/2,Q=N*S5e,X=_.z/h*mk+N/2+m[E]*(N+Q);j.position.set(V,tt,X),this._designGroup.add(j),this._chipletMeshes.push({mesh:j,data:_,color:B});let gt=new Zs.EdgesGeometry(U),ft=new Zs.LineSegments(gt,this._edgeMaterial);ft.position.set(V,tt,X),this._designGroup.add(ft),p.minX=Math.min(p.minX,_.x/h),p.minY=Math.min(p.minY,_.y/h),p.minZ=Math.min(p.minZ,X-N/2),p.maxX=Math.max(p.maxX,_.x/h+y),p.maxY=Math.max(p.maxY,_.y/h+I),p.maxZ=Math.max(p.maxZ,X+N/2)}),p}_buildGrid(s){let h=s.maxX-s.minX,p=s.maxY-s.minY,m=Math.max(h,p)*1.4,_=10,E=new Zs.GridHelper(m,_,8947848,4473924);E.rotation.x=Math.PI/2,E.position.set((s.minX+s.maxX)/2,(s.minY+s.maxY)/2,s.minZ-1),this._designGroup.add(E)}_setSceneBoundsAndCenter(s){this._sceneBounds=s;let h=s.maxX-s.minX,p=s.maxY-s.minY,m=s.maxZ-s.minZ;this._boundingRadius=Math.sqrt(h*h+p*p+m*m)/2,this._sceneCenter.set((s.minX+s.maxX)/2,(s.minY+s.maxY)/2,(s.minZ+s.maxZ)/2)}_stackOffsetForPoint(s,h,p,m){for(let{mesh:_,data:E}of this._chipletMeshes){if(s!==E.z||hE.x+E.width||pE.y+E.height)continue;let y=E.thickness/m*mk,I=E.z/m*mk+y/2;return _.position.z-I}return 0}clearHighlightDRC(){this._drcBlinkInterval&&(clearInterval(this._drcBlinkInterval),this._drcBlinkInterval=null),this._drcMeshGroup&&(this._scene.remove(this._drcMeshGroup),this._drcMeshGroup.children.forEach(s=>{s.geometry&&s.geometry.dispose()}),this._drcMaterial&&(this._drcMaterial.dispose(),this._drcMaterial=null),this._drcHitboxMaterial&&(this._drcHitboxMaterial.dispose(),this._drcHitboxMaterial=null),this._drcHitboxMesh=null,this._drcHitboxMarkerIds=null,this._drcMeshGroup=null,this.render())}highlightDRC(s){if(this._destroyed||(this.clearHighlightDRC(),!s||s.length===0))return;let h=this._app.getDbuPerMicron(),p=0,m=1e4/h*mk;this._sceneBounds&&this._sceneBounds.minZ!==1/0&&(p=this._sceneBounds.minZ,m=this._sceneBounds.maxZ),p-=1,m+=1;let _=Math.max(m-p,1);this._drcMeshGroup=new Zs.Group,this._drcMaterial=new Zs.LineBasicMaterial({color:16776960,transparent:!0,opacity:1,depthTest:!1,depthWrite:!1}),this._drcHitboxMaterial=new Zs.MeshBasicMaterial({transparent:!0,opacity:0,depthWrite:!1});let E=[];for(let N of s){let B=N.rects&&N.rects.length>0?N.rects:[N.bbox];for(let P of B){let[U,j,V,tt,Q,X]=P,gt=Math.max((V-U)/h,.001),ft=Math.max((tt-j)/h,.001),xt=p,Bt=_,Ot=0;if(P.length>=6&&Q!==void 0&&X!==void 0){xt=Q/h*mk;let Lt=X/h*mk;Bt=Math.max(Lt-xt,.001),Ot=this._stackOffsetForPoint(Q,(U+V)/2,(j+tt)/2,h)}let Pt=U/h+gt/2,se=j/h+ft/2,ot=xt+Bt/2+Ot;E.push({cx:Pt,cy:se,cz:ot,width:gt,height:ft,depth:Bt,markerId:N.id})}}if(E.length>0){let N=new Zs.BoxGeometry(1,1,1);this._drcHitboxMesh=new Zs.InstancedMesh(N,this._drcHitboxMaterial,E.length),this._drcHitboxMarkerIds=new Array(E.length);let B=new Zs.Matrix4,P=new Zs.Vector3,U=new Zs.Vector3,j=new Zs.Quaternion;E.forEach((V,tt)=>{U.set(V.cx,V.cy,V.cz),P.set(V.width,V.height,V.depth),B.compose(U,j,P),this._drcHitboxMesh.setMatrixAt(tt,B),this._drcHitboxMarkerIds[tt]=V.markerId;let Q=new Zs.BoxGeometry(V.width,V.height,V.depth),X=new Zs.EdgesGeometry(Q);Q.dispose();let gt=new Zs.LineSegments(X,this._drcMaterial);gt.position.set(V.cx,V.cy,V.cz),gt.renderOrder=999,this._drcMeshGroup.add(gt)}),this._drcHitboxMesh.instanceMatrix.needsUpdate=!0,this._drcMeshGroup.add(this._drcHitboxMesh)}this._drcMeshGroup.renderOrder=999,this._scene.add(this._drcMeshGroup),this.render();let y=!0,I=0;this._drcBlinkInterval=setInterval(()=>{if(!(!this._drcMeshGroup||!this._drcMaterial)){if(I+=1,I>=C5e){this._drcMaterial.opacity=1,this.render(),clearInterval(this._drcBlinkInterval),this._drcBlinkInterval=null;return}y=!y,this._drcMaterial.opacity=y?1:.2,this.render()}},T5e)}refreshSceneForOptions(){this._destroyed||this._lastSceneData&&(this.clearHighlightDRC(),this.buildScene(this._lastSceneData))}};var k5e=[{name:"green",hex:"#00ff00"},{name:"yellow",hex:"#ffff00"},{name:"cyan",hex:"#00ffff"},{name:"magenta",hex:"#ff00ff"},{name:"red",hex:"#ff0000"},{name:"dark_green",hex:"#008000"},{name:"dark_magenta",hex:"#800080"},{name:"blue",hex:"#0000ff"},{name:"orange",hex:"#ffa500"},{name:"purple",hex:"#800080"},{name:"lime",hex:"#bfff00"},{name:"teal",hex:"#008080"},{name:"pink",hex:"#ffc0cb"},{name:"brown",hex:"#8b4513"},{name:"indigo",hex:"#4b0082"},{name:"turquoise",hex:"#40e0d0"}],L5e=[{label:"Connected Insts",suffix:"connected_insts",needsNet:!0},{label:"Output Nets",suffix:"connected_nets",args:{output:!0,input:!1}},{label:"Input Nets",suffix:"connected_nets",args:{output:!1,input:!0}},{label:"All Nets",suffix:"connected_nets",args:{output:!0,input:!0}},{label:"All buffer trees",suffix:"connected_buffer_trees"},{label:"All buffer trees (incl. inverters)",suffix:"connected_buffer_trees",args:{include_inverters:!0}}],Ant=class{constructor(s){this._app=s,this._el=document.createElement("div"),this._el.className="context-menu",this._el.style.display="none",this._el.style.zIndex="10000",document.body.appendChild(this._el),this._bindEvents()}_bindEvents(){document.addEventListener("mousedown",s=>{this._el.contains(s.target)||this.hide()}),this._app.map&&this._app.map.on("movestart",()=>this.hide())}show(s){this._el.innerHTML="";let h=!!this._app.selHasInst,p=!!this._app.selHasNet,m=!(h||p),_=j=>L5e.map(V=>({label:V.label,disabled:V.needsNet?!p:!h,...j(V.suffix,V.args||{})})),E=[{label:"Select",disabled:m,subMenu:_((j,V)=>({action:()=>this._sendContextAction("select_"+j,V)}))},{label:"Highlight",disabled:m,subMenu:_((j,V)=>({subMenu:this._buildColorSubmenu("highlight_"+j,V)}))},{label:"Save",subMenu:[{label:"Visible layout",action:()=>this._app.captureLayout?.({entire:!1})},{label:"Entire layout",action:()=>this._app.captureLayout?.({entire:!0})}]},{label:"Clear",subMenu:[{label:"Selections",action:()=>this._sendContextAction("clear_selections")},{label:"Highlights",action:()=>this._sendContextAction("clear_highlights")},{label:"Rulers",action:()=>{this._app.rulerManager?.clearAllRulers()}},{label:"Focus nets",action:()=>this._sendContextAction("clear_focus_nets")},{label:"Route Guides",action:()=>this._sendContextAction("clear_route_guides")},{label:"All",action:()=>{this._sendContextAction("clear_all"),this._app.rulerManager?.clearAllRulers()}}]}];this._buildMenu(E,this._el),this._el.style.display="block";let y=4,I=this._el.getBoundingClientRect(),N=window.innerWidth-I.width-y,B=window.innerHeight-I.height-y,P=Math.max(y,Math.min(s.originalEvent.clientX,N)),U=Math.max(y,Math.min(s.originalEvent.clientY,B));this._el.style.left=P+"px",this._el.style.top=U+"px"}hide(){this._el.style.display="none"}_buildColorSubmenu(s,h={}){return k5e.map(({name:p,hex:m},_)=>({label:p,swatch:m,action:()=>this._sendContextAction(s,{...h,group:_})}))}_buildMenu(s,h){s.forEach(p=>{let m=document.createElement("div");if(m.className="cm-item",p.swatch){let _=document.createElement("span");_.className="cm-swatch",_.style.background=p.swatch,m.appendChild(_)}if(m.appendChild(document.createTextNode(p.label)),p.disabled){m.classList.add("disabled"),p.subMenu&&m.classList.add("has-submenu"),h.appendChild(m);return}if(p.subMenu){m.classList.add("has-submenu");let _=document.createElement("div");_.className="cm-submenu",this._buildMenu(p.subMenu,_),m.appendChild(_),m.addEventListener("mouseenter",()=>{_.classList.remove("flip-left"),_.getBoundingClientRect().right>window.innerWidth&&_.classList.add("flip-left")})}else p.action&&m.addEventListener("click",_=>{_.stopPropagation(),this.hide();try{p.action()}catch(E){console.error("Context menu item action threw:",p.label,E)}});h.appendChild(m)})}_sendContextAction(s,h={}){this._app.websocketManager&&this._app.websocketManager.request({type:"context_action",action:s,...h}).then(p=>{mR(this._app,p),p&&p.connected_count===0&&nv('Nothing connected \u2014 select an instance (or a net for "Connected Insts") first.'),this._syncAfterAction(s)}).catch(p=>{console.error("Context action failed:",s,p)})}_syncAfterAction(s){let h=this._app;(s==="clear_focus_nets"||s==="clear_route_guides"||s==="clear_all")&&typeof h.redrawAllLayers=="function"&&h.redrawAllLayers(),s==="clear_selections"||s==="clear_all"?(h.updateInspector?.(null),h.stopSelectionAnimation?.(),h.highlightRect&&h.map&&(h.map.removeLayer(h.highlightRect),h.highlightRect=null),h.lastSelectionBounds=null):h.refreshInspector?.(),h.refreshOverlay?.()}};function _Qt(d,s){if(!d)return;let h=URL.createObjectURL(d),p=document.createElement("a");p.href=h,p.download=s,p.style.display="none",document.body.appendChild(p),p.click(),document.body.removeChild(p),setTimeout(()=>URL.revokeObjectURL(h),0)}function xQt(d){return d.options&&d.options.opacity!=null?d.options.opacity:1}function MQt(d,s,h){if(!s||s.tagName==="IMG"&&(!s.complete||!s.naturalWidth))return;let p=s.getBoundingClientRect();if(!(p.width<=0||p.height<=0))try{d.drawImage(s,p.left-h.left,p.top-h.top,p.width,p.height)}catch{}}function P5e(d,s,h){let p=[];d.map.eachLayer(m=>{m instanceof L.GridLayer&&m._tiles&&p.push(m)}),p.sort((m,_)=>(m.options&&m.options.zIndex||0)-(_.options&&_.options.zIndex||0));for(let m of p){let _=xQt(m);if(!(_<=0)){s.globalAlpha=_;for(let E of Object.keys(m._tiles)){let y=m._tiles[E];!y||!y.current||MQt(s,y.el,h)}}}s.globalAlpha=1}function I5e(d,s,h){let p=d.map.getContainer().querySelectorAll(".leaflet-pane svg"),m=[];return p.forEach(_=>{let E=_.getBoundingClientRect();if(E.width<=0||E.height<=0)return;let y=_.cloneNode(!0);y.setAttribute("width",E.width),y.setAttribute("height",E.height);let I=new XMLSerializer().serializeToString(y),N="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(I);m.push(new Promise(B=>{let P=new Image;P.onload=()=>{try{s.drawImage(P,E.left-h.left,E.top-h.top,E.width,E.height)}catch{}B()},P.onerror=()=>B(),P.src=N}))}),Promise.all(m)}function R5e(d,s,h){d.map.getContainer().querySelectorAll(".leaflet-pane .ruler-label").forEach(m=>{let _=m.getBoundingClientRect();if(_.width<=0||_.height<=0)return;let E=m.textContent;if(!E)return;let y=getComputedStyle(m),I=_.left-h.left,N=_.top-h.top;s.save(),s.fillStyle=y.backgroundColor||"rgba(0, 0, 0, 0.75)";let B=Math.min(parseFloat(y.borderTopLeftRadius)||0,_.height/2);B>0&&typeof s.roundRect=="function"?(s.beginPath(),s.roundRect(I,N,_.width,_.height,B),s.fill()):s.fillRect(I,N,_.width,_.height),s.fillStyle=y.color||"#eee",s.font=y.font||`${y.fontSize||"12px"} ${y.fontFamily||"monospace"}`,s.textAlign="left",s.textBaseline="middle",s.fillText(E,I+(parseFloat(y.paddingLeft)||0),N+_.height/2),s.restore()})}function D5e(d){let s=0;return d.map.eachLayer(h=>{if(!(!(h instanceof L.GridLayer)||!h._tiles)){h._loading&&s++;for(let p of Object.keys(h._tiles)){let m=h._tiles[p],_=m&&m.el;m&&m.current&&_&&_.tagName==="IMG"&&(!_.complete||!_.naturalWidth)&&s++}}}),s}function N5e(d,s=6e3,h=32){return new Promise(p=>{let m=Date.now()+s,_=0,E=()=>{if(D5e(d)===0){if(++_>=2){p();return}}else _=0;if(Date.now()>=m){p();return}setTimeout(E,h)};setTimeout(E,h)})}function O5e(d,s,h){d.map.eachLayer(p=>{if(!(p instanceof L.ImageOverlay))return;let m=xQt(p);m<=0||(s.globalAlpha=m,MQt(s,p._image,h),s.globalAlpha=1)})}async function yQt(d){let s=d.map.getContainer(),h=s.getBoundingClientRect(),p=Math.max(1,Math.round(h.width)),m=Math.max(1,Math.round(h.height)),_=document.createElement("canvas");_.width=p,_.height=m;let E=_.getContext("2d"),y=getComputedStyle(s).backgroundColor;return E.fillStyle=y&&y!=="transparent"&&y!=="rgba(0, 0, 0, 0)"?y:"#000",E.fillRect(0,0,p,m),P5e(d,E,h),O5e(d,E,h),await I5e(d,E,h),R5e(d,E,h),new Promise(I=>_.toBlob(I,"image/png"))}async function EQt(d,{entire:s=!1}={}){if(!d.map)return;if(!s||!d.fitBounds){_Qt(await yQt(d),"layout_visible.png");return}let h=d.map.getCenter(),p=d.map.getZoom();try{d.map.fitBounds(d.fitBounds,{animate:!1}),await N5e(d),_Qt(await yQt(d),"layout_entire.png")}finally{d.map.setView(h,p,{animate:!1})}}var bk=document.getElementById("websocket-status"),ZU=null,B5e=2e3,F5e=20;function ixt(){let d=ht.websocketManager&&ht.websocketManager.isConnected,s=ht.websocketManager?ht.websocketManager.pendingCount:0;if(d)ZU&&(clearTimeout(ZU),ZU=null),s>F5e?(bk.innerHTML=`
pending: ${s}
`,bk.style.display="block"):bk.style.display="none";else{if(ht.websocketManager?._shutdown)return;ZU||(ZU=setTimeout(()=>{ht.websocketManager?.isConnected||(bk.innerHTML='
\u26A0 OpenROAD disconnected \u2014 retrying\u2026
',bk.style.display="block")},B5e))}U5e(s)}function U5e(d){let s=ht.tileProgressEl;s&&(s.classList.toggle("active",d>0),s.title=d>0?`${d} tile requests pending`:"")}function z5e(d){if(!d)return"";try{return decodeURIComponent(d)}catch{return""}}var ht={map:null,fitBounds:null,lastSelectionBounds:null,selHasInst:!1,selHasNet:!1,displayControlsEl:null,allLayers:[],designScale:null,designMaxDXDY:null,designOriginX:0,designOriginY:0,websocketManager:null,goldenLayout:null,hasLiberty:!1,techData:null,inspectorEl:null,tclOutputEl:null,highlightRect:null,hoverHighlightLayer:null,hoverHighlightPane:"hover-highlight-pane",modulesLayer:null,pinsLayer:null,overlayLayers:[],hierarchyBrowser:null,focusNets:new Set,routeGuideNets:new Set,visibleLayers:new Set,visibleLayerNames:new Set,visibleChiplets:null,layerPatterns:{},useTrueZ:qf("or_use_true_z")==="1",showDbu:qf("or_show_dbu")==="1",rulerStyle:qf("or_ruler_style")==="manhattan"?"manhattan":"euclidian",wheelZoom:qf("or_wheel_zoom")!=="0",arrowStep:bR(qf("or_arrow_step")),fontFamily:z5e(qf("or_font_family")),fontScale:$U(qf("or_font_scale")),polyDecomp:!1,labelManager:null,selectableLayers:new Set,heatMapData:null,activeHeatMap:"",heatMapLayer:null,heatMapLegendEl:null,renderHeatMapControls:null,rulerManager:null,selectionToken:0,selectionResetters:[],getDbuPerMicron(){return this.techData?.dbu_per_micron||1e3},unitOpts(){return{showDbu:this.showDbu,dbuPerMicron:this.getDbuPerMicron()}},formatDbu(d,s=!1){return cJt(d,this.unitOpts(),s)},parseDbu(d){return aJt(d,this.unitOpts())},formatDistance(d){return uJt(d,this.unitOpts())},unitLabel(){return lJt(this.unitOpts())}},Dd={stdcells:!0,macros:!0,pad_input:!0,pad_output:!0,pad_inout:!0,pad_power:!0,pad_spacer:!0,pad_areaio:!0,pad_other:!0,phys_fill:!1,phys_endcap:!0,phys_welltap:!0,phys_tie:!0,phys_antenna:!0,phys_cover:!0,phys_bump:!0,phys_other:!0,std_bufinv:!0,std_bufinv_timing:!0,std_clock_bufinv:!0,std_clock_gate:!0,std_level_shift:!0,std_sequential:!0,std_combinational:!0,net_signal:!0,net_power:!0,net_ground:!0,net_clock:!0,net_reset:!0,net_tieoff:!0,net_scan:!0,net_analog:!0,inst_names:!0,inst_pins:!0,inst_pin_names:!1,routing:!0,routing_segments:!0,routing_vias:!0,special_nets:!0,srouting_segments:!0,srouting_vias:!0,pins:!0,pin_names:!0,access_points:!1,regions:!0,mfg_grid:!1,gcell_grid:!1,flywires_only:!1,blockages:!0,placement_blockages:!0,routing_obstructions:!0,fills:!1,rows:!1,tracks_pref:!1,tracks_non_pref:!1,module_view:!1,detailed:!1,rulers:!0,labels:!0,scale_bar:!0,focused_nets_guides:!1,highlight_selected:!0,debug:!1};try{let d=qf("or_visibility");if(d){let s=JSON.parse(decodeURIComponent(d));for(let[h,p]of Object.entries(s))Dd[h]=!!p}}catch{}var wk={stdcells:!0,macros:!0,pad_input:!0,pad_output:!0,pad_inout:!0,pad_power:!0,pad_spacer:!0,pad_areaio:!0,pad_other:!0,phys_fill:!0,phys_endcap:!0,phys_welltap:!0,phys_tie:!0,phys_antenna:!0,phys_cover:!0,phys_bump:!0,phys_other:!0,std_bufinv:!0,std_bufinv_timing:!0,std_clock_bufinv:!0,std_clock_gate:!0,std_level_shift:!0,std_sequential:!0,std_combinational:!0,net_signal:!0,net_power:!0,net_ground:!0,net_clock:!0,net_reset:!0,net_tieoff:!0,net_scan:!0,net_analog:!0,pins:!0,inst_pins:!0,placement_blockages:!0,routing_obstructions:!0};ht.visibility=Dd;ht.selectability=wk;try{let d=qf("or_selectability");if(d){let s=JSON.parse(decodeURIComponent(d));for(let[h,p]of Object.entries(s))wk[h]=!!p}}catch{}var j5e=wJt(Dd,ht.visibleLayerNames,wk,ht.selectableLayers,ht);(function(){let s=null;try{s=new URLSearchParams(window.location.search)}catch{s=null}let h=_=>s?s.get(_):null;ht.mergeTiles=h("mergetiles")!=="0";let p=Number(h("tilebudget"));Number.isFinite(p)&&p>0&&(ht.tileBudgetBytes=Math.round(p*1024*1024));let m=Number(h("mergegroups"));Number.isFinite(m)&&m>0&&(ht.mergeGroupCount=Math.floor(m)),ht.tileDpr=uk,ht.MergedTileLayer=AJt({visibility:Dd,selectability:wk,visibleLayers:ht.visibleLayerNames,selectableLayers:ht.selectableLayers,app:ht},{dpr:uk})})();var H5e=L.GridLayer.extend({initialize:function(d,s,h){this._websocketManager=d,this._appState=s,L.GridLayer.prototype.initialize.call(this,sk(h))},_clampZoom:function(d){return L.GridLayer.prototype._clampZoom.call(this,gR(this,d))},createTile:function(d,s){let h=document.createElement("img");h.alt="",h.setAttribute("role","presentation"),h._tileDone=!1,h.onload=()=>{h.src&&h.src.startsWith("blob:")&&URL.revokeObjectURL(h.src),h._tileDone||(h._tileDone=!0,s(null,h))},h.onerror=()=>{h._tileDone||(h._tileDone=!0,s(new Error("heat map tile load error"),h))};let p=this._appState.activeHeatMap;return p?(this._websocketManager.request({type:"heatmap_tile",name:p,z:d.z,x:d.x,y:d.y,...pR(uk(),this.getTileSize().x)}).then(m=>{h.src=m?URL.createObjectURL(m):c3}).catch(()=>{h.src=c3}),h):(h.src=c3,h)},refreshTiles:function(){if(this._map)for(let d in this._tiles){let s=this._tiles[d];if(!s||!s.el)continue;let h=s.el,p=s.coords,m=this._appState.activeHeatMap;if(!m){h.src&&h.src.startsWith("blob:")&&URL.revokeObjectURL(h.src),h.src=c3;continue}this._websocketManager.request({type:"heatmap_tile",name:m,z:p.z,x:p.x,y:p.y,...pR(uk(),this.getTileSize().x)}).then(_=>{h.src&&h.src.startsWith("blob:")&&URL.revokeObjectURL(h.src),h.src=_?URL.createObjectURL(_):c3}).catch(()=>{h.src=c3})}}});function sxt(d){ht.heatMapData=d,ht.activeHeatMap=d.active||"",ht.heatMapLayer&&(ht.activeHeatMap?ht.map.hasLayer(ht.heatMapLayer)||ht.heatMapLayer.addTo(ht.map):ht.map.hasLayer(ht.heatMapLayer)&&ht.map.removeLayer(ht.heatMapLayer),ht.heatMapLayer.refreshTiles()),ht.renderHeatMapControls&&ht.renderHeatMapControls(d)}ht.updateHeatMaps=sxt;function oxt(){ht.overlayLayer&&ht.overlayLayer.refreshTiles()}var vk=zU(()=>{oxt(),ht.selectionBrowser&&ht.selectionBrowser.scheduleRefresh()});ht.refreshOverlay=vk;function F0(){Rd("or_visibility",encodeURIComponent(JSON.stringify(Dd))),Rd("or_selectability",encodeURIComponent(JSON.stringify(wk))),u3();let d=[[ht.modulesLayer,Dd.module_view],[ht.pinsLayer,Dd.pins],...ht.overlayLayers.map(({def:s,layer:h})=>[h,bnt(s.shown_by,Dd)])];for(let[s,h]of d)s&&(h&&!ht.map.hasLayer(s)?s.addTo(ht.map):!h&&ht.map.hasLayer(s)&&ht.map.removeLayer(s));for(let s of ht.allLayers)s.refreshTiles();if(ht.heatMapLayer&&ht.heatMapLayer.refreshTiles(),ht.highlightRect){let s=Dd.highlight_selected!==!1;!s&&ht.map.hasLayer(ht.highlightRect)?ht.map.removeLayer(ht.highlightRect):s&&!ht.map.hasLayer(ht.highlightRect)&&ht.highlightRect.addTo(ht.map)}!Dd.highlight_selected&&ht.clearSelectionPulse&&ht.clearSelectionPulse(),oxt(),ht.rulerManager&&ht.rulerManager.updateVisibility(),ht.labelManager&&ht.labelManager.updateVisibility(),ht.updateScaleBar&&ht.updateScaleBar()}var ER=zU(F0),u3=zU(()=>{!ht.websocketManager||Sc(ht)||ht.websocketManager.request({type:"set_display_state",state:pQt()}).catch(()=>{})});ht.syncDisplayState=u3;function G5e(d){if(!d||typeof d!="object")return;let s=d.entries;if(!(!s||typeof s!="object")){gQt(s);try{if(ht.map&&typeof sessionStorage<"u"){let h=ht.map.getCenter();sessionStorage.setItem("or_restore_view",JSON.stringify({lat:h.lat,lng:h.lng,zoom:ht.map.getZoom()}))}}catch{}window.location.reload()}}ht.redrawAllLayers=F0;ht.captureLayout=(d={})=>EQt(ht,d);function W5e(d){let s=document.createElement("div");s.className="layout-viewer",s.style.width="100%",s.style.height="100%",s.style.backgroundColor="var(--bg-map)",d.element.appendChild(s);let h=document.createElement("div");h.className="or-hud or-hud-bottom-right heatmap-map-legend hidden",s.appendChild(h),ht.heatMapLegendEl=h;let p=document.createElement("div");p.className="or-progress",s.appendChild(p),ht.tileProgressEl=p,d.on("destroy",()=>{ht.tileProgressEl=null,ht.heatMapLegendEl=null}),ht.map=L.map(s,iJt(void 0,{wheelZoom:ht.wheelZoom,arrowStep:ht.arrowStep})),Sc(ht)||dJt(ht.map,()=>ht.wheelZoom),DJt(ht.map),XKt(()=>F0());let m=ht.map.createPane(ht.hoverHighlightPane);m.style.zIndex="650",m.style.pointerEvents="none";let _=L.Control.extend({onAdd:function(){let X=L.DomUtil.create("div","leaflet-bar leaflet-control leaflet-control-fit"),gt=L.DomUtil.create("a","",X);return gt.href="#",gt.title="Fit",gt.setAttribute("role","button"),gt.setAttribute("aria-label","Fit"),gt.textContent="\u2922",L.DomEvent.on(gt,"click",L.DomEvent.stop).on(gt,"click",()=>{ht.fitBounds&&ht.map.fitBounds(ht.fitBounds)}),X}});new _({position:"topleft"}).addTo(ht.map),new ResizeObserver(()=>{ht.map.invalidateSize({animate:!1})}).observe(s);let E=document.createElement("div");E.className="or-hud or-hud-bottom-left hidden";let y=document.createElement("div");y.id="scale-bar";let I=document.createElement("span");I.className="or-hud-divider";let N=document.createElement("div");N.id="coord-bar",E.appendChild(y),E.appendChild(I),E.appendChild(N),s.appendChild(E);function B(){let X=y.style.display!=="none"&&y.childElementCount>0,gt=N.textContent!=="";I.style.display=X&>?"":"none",E.classList.toggle("hidden",!X&&!gt)}B(),ht.map.on("mousemove",X=>{if(ht.lastMouseLatLng=X.latlng,!ht.designScale)return;let{dbuX:gt,dbuY:ft}=tv(X.latlng.lat,X.latlng.lng,ht.designScale,ht.designMaxDXDY,ht.designOriginX,ht.designOriginY);N.textContent=`X: ${ht.formatDbu(gt)} Y: ${ht.formatDbu(ft)}`,B()}),ht.map.on("mouseout",X=>{let gt=X.originalEvent&&X.originalEvent.relatedTarget;gt&&s.contains(gt)||(ht.lastMouseLatLng=null,N.textContent="",B())});let P=22,U=8,j=22;function V(X,gt,ft){let Bt=2+U,Ot=j,Pt=j+X,se=P-2,ot=X>=40,Lt=[];if(Lt.push(``),ot&&ft>1)for(let be=1;be`)}ot&&Lt.push(`0`),Lt.push(`${gt}`),y.innerHTML=`${Lt.join("")}`}function tt(){if(!ht.designScale||!Dd.scale_bar){y.style.display="none",B();return}let X=ht.designScale*Math.pow(2,ht.map.getZoom()),gt=ht.map.getContainer().clientWidth||400,ft=fJt({targetPx:gt*.15,pxPerDbu:X,dbuPerMicron:ht.techData?.dbu_per_micron,showDbu:ht.showDbu});if(!ft){y.style.display="none",B();return}y.style.display="",V(ft.barPx,ft.label,ft.segments),B()}let Q=zU(tt);ht.map.on("zoom zoomend resize",Q),ht.updateScaleBar=tt,ht.rulerManager=new ynt(ht,Dd,YU,knt),ht.labelManager=new xnt(ht,Dd,YU,knt)}function $5e(d){let s=document.createElement("div");s.className="display-controls",s.innerHTML='
Loading layers...
',d.element.appendChild(s),ht.displayControlsEl=s}var rxt="or_restore_console",V5e=1<<20;function q5e(){try{if(ht.tclOutputEl){let d=[...ht.tclOutputEl.children].map(m=>[m.textContent,m.className]),s=d.length,h=0;for(;s>0&&h+d[s-1][0].length<=V5e;)h+=d[--s][0].length;let p=d.slice(s);s>0&&p.unshift([`[earlier output not kept across reload] -`,""]),sessionStorage.setItem(rxt,JSON.stringify(p))}}catch{}window.location.reload()}function X5e(){try{let d=sessionStorage.getItem(rxt);if(!d)return;sessionStorage.removeItem(rxt);for(let[s,h]of JSON.parse(d))_S(s,h)}catch{}}function _S(d,s){if(!ht.tclOutputEl)return;let h=document.createElement("span");s&&(h.className=s),h.textContent=d,ht.tclOutputEl.appendChild(h),ht.tclOutputEl.scrollTop=ht.tclOutputEl.scrollHeight}function Z5e(){if(ht._shutdownHandled)return;ht._shutdownHandled=!0,ht.websocketManager&&(ht.websocketManager._shutdown=!0,ht.websocketManager.onPush=()=>{});let d=document.createElement("div");d.style.cssText="position:fixed;inset:0;z-index:99999;background:#1e1e1e;color:#ddd;display:flex;flex-direction:column;align-items:center;justify-content:center;font-family:system-ui,sans-serif;font-size:16px;padding:24px;text-align:center;",d.innerHTML='
OpenROAD exited
You can close this tab.
',document.body.appendChild(d),setTimeout(()=>{try{window.close()}catch{}},1500)}function Y5e(d){let s=document.createElement("div");if(s.className="tcl-console",s.innerHTML='
%
',d.element.appendChild(s),ht.tclOutputEl=s.querySelector(".tcl-output"),X5e(),Sc(ht)){s.querySelector(".tcl-input-row").style.display="none";let m=document.createElement("span");m.className="tcl-static-notice",m.setAttribute("role","status"),m.setAttribute("aria-live","polite"),m.textContent="Tcl console is not available in saved reports.",ht.tclOutputEl.appendChild(m);return}let h=s.querySelector(".tcl-input"),p=new Snt(h,ht.websocketManager);h.addEventListener("keydown",m=>{if(!p.handleKeyDown(m)&&m.key==="Enter"){let _=h.value.trim();if(!_)return;_S(`>>> ${_} -`,"tcl-cmd"),p.addToHistory(_),h.value="",ht.websocketManager.request({type:"tcl_eval",cmd:_}).then(E=>{E.result&&_S(E.result+` -`,E.is_error?"tcl-error":""),E.action==="shutdown"&&Z5e(),!E.is_error&&ht.drcWidget&&ht.drcWidget.refresh()}).catch(E=>_S(`Error: ${E} -`,"tcl-error"))}})}ht.visibility=Dd;var yS=VJt(ht,F0,vk),K5e=yS.createInspector,YU=yS.updateInspector,J5e=yS.highlightBBox,Q5e=yS.pulseHighlight;ht.updateInspector=YU;ht.navigateInspector=yS.navigateInspector;ht.refreshInspector=yS.refreshInspector;ht.animateSelection=yS.animateSelection;ht.stopSelectionAnimation=yS.stopSelectionAnimation;function tLe(d){new fnt(d,ht,F0)}function eLe(d){ht.timingWidget=new hk(ht,F0,vk),d.element.appendChild(ht.timingWidget.element)}function nLe(d){ht.drcWidget=new Ent(ht,F0,vk),d.element.appendChild(ht.drcWidget.element)}function iLe(d){ht.clockTreeWidget=new lnt(d,ht,F0,vk)}function rLe(d){ht.chartsWidget=new hnt(ht,F0),d.element.appendChild(ht.chartsWidget.element)}function sLe(d){let s=document.createElement("div");s.className="help-panel",s.innerHTML="

Keyboard Shortcuts

fFit design to viewport
scrollZoom in/out
dragPan the view
right-dragRubber-band zoom
Shift+clickAdd object to selection
Ctrl/Cmd+clickSelect object and its connected nets
kToggle ruler mode
Shift+KClear all rulers
EscapeCancel ruler (when building)
",d.element.appendChild(s)}function oLe(d){ht.selectionBrowser=new dnt(d,ht,vk)}function cLe(d){new Mnt(d,ht)}function aLe(d){ht.threeDViewerWidget=new Cnt(d,ht)}var uLe=28,lLe={dimensions:{headerHeight:uLe},root:{type:"row",content:[{type:"component",componentType:"DisplayControls",title:"Display Controls",width:15},{type:"column",width:55,content:[{type:"stack",height:70,content:[{type:"component",componentType:"LayoutViewer",title:"Layout",isClosable:!1},{type:"component",componentType:"SchematicWidget",title:"Schematic"},{type:"component",componentType:"3DViewer",title:"3D Viewer"}]},{type:"component",componentType:"TclConsole",title:"Tcl Console",height:30}]},{type:"stack",width:30,content:[{type:"component",componentType:"Inspector",title:"Inspector"},{type:"component",componentType:"Browser",title:"Hierarchy"},{type:"component",componentType:"TimingWidget",title:"Timing"},{type:"component",componentType:"DRCWidget",title:"DRC"},{type:"component",componentType:"SelectHighlight",title:"Select Highlight"},{type:"component",componentType:"ClockWidget",title:"Clock Tree"},{type:"component",componentType:"ChartsWidget",title:"Charts"},{type:"component",componentType:"HelpWidget",title:"Help"}]}]}};ht.goldenLayout=new nnt(document.getElementById("gl-container"));ht.goldenLayout.registerComponentFactoryFunction("LayoutViewer",W5e);ht.goldenLayout.registerComponentFactoryFunction("DisplayControls",$5e);ht.goldenLayout.registerComponentFactoryFunction("TclConsole",Y5e);ht.goldenLayout.registerComponentFactoryFunction("Inspector",K5e);ht.goldenLayout.registerComponentFactoryFunction("Browser",tLe);ht.goldenLayout.registerComponentFactoryFunction("TimingWidget",eLe);ht.goldenLayout.registerComponentFactoryFunction("DRCWidget",nLe);ht.goldenLayout.registerComponentFactoryFunction("ClockWidget",iLe);ht.goldenLayout.registerComponentFactoryFunction("ChartsWidget",rLe);ht.goldenLayout.registerComponentFactoryFunction("SchematicWidget",cLe);ht.goldenLayout.registerComponentFactoryFunction("3DViewer",aLe);ht.goldenLayout.registerComponentFactoryFunction("HelpWidget",sLe);ht.goldenLayout.registerComponentFactoryFunction("SelectHighlight",oLe);var Ay=window.__STATIC_CACHE__||null;if(Ay)VKt(),ht.websocketManager=GU.fromCache(Ay,ixt);else{let d=JKt(window.location);ht.websocketManager=new GU(d,ixt),ht.layerExtents=new int,ht.websocketManager.onReconnected=()=>{Lnt(),uxt(null,null,{reloadOnChange:!0}).catch(()=>{})}}ixt();ht.goldenLayout.loadLayout(lLe);function cxt(){ht.goldenLayout.updateSize()}ht.syncLayoutSize=cxt;window.addEventListener("resize",cxt);function knt(d,s){ht.goldenLayout.focusComponent(d,s)}ht.focusComponent=knt;ht.resetLayout=function(){ht.goldenLayout&&typeof ht.goldenLayout.resetLayout=="function"&&ht.goldenLayout.resetLayout()};ht.toggleTheme=function(){let d=document.documentElement.dataset.theme==="dark"?"light":"dark";document.documentElement.dataset.theme=d,$2t(d),ont(d),ht.chartsWidget&&ht.chartsWidget.render(),ht.clockTreeWidget&&ht.clockTreeWidget.render(),u3()};ht.toggleShowDbu=function(){ht.showDbu=!ht.showDbu,Rd("or_show_dbu",ht.showDbu?"1":"0"),ht.rulerManager&&ht.rulerManager._rerenderAll(),ht.hierarchyBrowser&&ht.hierarchyBrowser._render(),ht.updateScaleBar&&ht.updateScaleBar(),ht.refreshInspector&&ht.refreshInspector(),u3()};ht.toggleRulerStyle=function(){ht.rulerStyle=ht.rulerStyle==="manhattan"?"euclidian":"manhattan",Rd("or_ruler_style",ht.rulerStyle),u3()};ht.toggleWheelZoom=function(){ht.wheelZoom=!ht.wheelZoom,Rd("or_wheel_zoom",ht.wheelZoom?"1":"0"),u3()};ht.setArrowStep=function(d){ht.arrowStep=bR(d),Rd("or_arrow_step",String(ht.arrowStep)),rJt(ht.map,ht.arrowStep),u3()};ht.setAppFont=function({family:d,scale:s}){ht.fontFamily=d??ht.fontFamily,ht.fontScale=$U(s??ht.fontScale),Rd("or_font_family",encodeURIComponent(ht.fontFamily)),Rd("or_font_scale",String(ht.fontScale)),ht.applyAppFont(),u3()};ht.applyAppFont=function(){let d=document.documentElement;ht.fontFamily?d.style.setProperty("--or-font-family",ht.fontFamily):d.style.removeProperty("--or-font-family"),d.style.setProperty("--or-font-scale",String(ht.fontScale/100)),ht.chartsWidget&&ht.chartsWidget.render(),ht.clockTreeWidget&&ht.clockTreeWidget.render()};ht.showArrowStepDialog=()=>ZJt(ht);ht.showAppFontDialog=()=>YJt(ht);ht.togglePolyDecomp=function(){ht.websocketManager&&ht.websocketManager.request({type:"poly_decomp",value:!ht.polyDecomp}).then(d=>axt(d.value)).catch(()=>{})};function axt(d){ht.polyDecomp=!!d,ht.rebuildMenuBar&&ht.rebuildMenuBar(),ht.refreshOverlay&&ht.refreshOverlay()}ht.applyAppFont();ht.echoTcl=d=>_S(`>>> ${d} -`,"tcl-cmd");ht.runTclScript=(d,s)=>d?(s&&ht.echoTcl(d),ht.websocketManager.request({type:"tcl_eval",cmd:d}).then(h=>(h&&h.result&&_S(h.result+` -`,h.is_error?"tcl-error":""),h)).catch(h=>{_S(`Error: ${h} -`,"tcl-error")})):Promise.resolve();function SQt(d){d&&(ht.customMenu=d.menu||[],ht.customToolbar=d.toolbar||[],ht.rebuildMenuBar&&ht.rebuildMenuBar(),ht.rebuildToolbar&&ht.rebuildToolbar(),cxt())}ht.customMenu=[];ht.customToolbar=[];ht.scheduleRedrawAllLayers=ER;ht.showGlobalConnectDialog=()=>cQt(ht);ht.showInsertBufferDialog=d=>aQt(ht,d);iQt(ht);rQt(ht);ht.contextMenu=new Ant(ht);function hLe(){let d=document.getElementById("debug-continue-btn");return d||(d=document.createElement("button"),d.id="debug-continue-btn",d.className="debug-continue-btn",d.textContent="Continue",d.title="Advance the debugger (gpl, cts, ...)",d.addEventListener("click",()=>{ht.websocketManager.request({type:"debug_continue"}).catch(()=>{})}),(document.getElementById("menu-bar")||document.body).appendChild(d),d)}function TQt(d,s){let h=R2t(d,ev(),s);return h?(ht.currentBounds=d,ht.designScale=h.scale,ht.designMaxDXDY=h.maxDXDY,ht.designOriginX=h.originX,ht.designOriginY=h.originY,ht.fitBounds=h.fitBounds,ht.map.setMaxZoom(sJt(h.scale)),!0):!1}async function uxt(d,s,{reloadOnChange:h=!1}={}){if(Sc(ht)||!ht.map)return!1;let p=d,m=s;if(!p)try{let y=await ht.websocketManager.request({type:"bounds"});p=y.bounds,m=y.fit_bounds}catch{return!1}if(!p||eJt(ht.currentBounds,p))return!1;if(h)return window.location.reload(),!0;let E=!!ht.designScale?tv(ht.map.getCenter().lat,ht.map.getCenter().lng,ht.designScale,ht.designMaxDXDY,ht.designOriginX,ht.designOriginY):null;if(!TQt(p,m))return!1;if(E){let y=Id(E.dbuX,E.dbuY,ht.designScale,ht.designMaxDXDY,ht.designOriginX,ht.designOriginY);ht.map.setView(y,ht.map.getZoom(),{animate:!1})}return ht.highlightRect&&(ht.map.removeLayer(ht.highlightRect),ht.highlightRect=null),F0(),!0}function fLe(){let d=document.getElementById("loading-overlay");d.style.display="flex";let s=()=>{d.style.display!=="none"&&ht.websocketManager.request({type:"bounds"}).then(h=>{h.shapes_ready&&(d.style.display="none")}).catch(()=>{}).finally(()=>{d.style.display!=="none"&&setTimeout(s,1e3)})};setTimeout(s,1e3)}function Lnt(){ht.layerExtents&&ht.layerExtents.refetch(d=>ht.websocketManager.request(d))}function dLe(d){document.getElementById("loading-overlay").style.display="none",Lnt(),uxt(d.bounds,d.fit_bounds).then(s=>{s||F0()}).catch(()=>F0()),ht.refreshInspector&&ht.refreshInspector()}function pLe(){let d=document.getElementById("script-running-badge");return d||(d=document.createElement("span"),d.id="script-running-badge",d.className="script-running-badge",d.textContent="Script running",d.title="The view updates when the script pauses or finishes",(document.getElementById("menu-bar")||document.body).appendChild(d),d)}function gLe(d){if(ht.scriptRunning=d,pLe().style.display=d?"block":"none",!d){if(!ht.booted||!ht.designScale){q5e();return}ht.refreshPending&&(ht.refreshPending=!1,Lnt(),ht.refreshInspector&&ht.refreshInspector()),uxt().then(s=>{s||ER()}).catch(()=>ER())}}ht.websocketManager.onPush=d=>{if(d.type==="refresh"){if(ht.scriptRunning){ht.refreshPending=!0;return}dLe(d)}else if(d.type==="script_running")gLe(!!d.running);else if(d.type==="renderer_controls_changed")ht.refreshRendererControls&&ht.refreshRendererControls(),ER();else if(d.type==="selection_invalidated")ht.updateInspector&&ht.updateInspector(null),ht.stopSelectionAnimation&&ht.stopSelectionAnimation(),ht.highlightRect&&ht.map&&(ht.map.removeLayer(ht.highlightRect),ht.highlightRect=null),vk();else if(d.type==="heatmaps_changed")ht.websocketManager.request({type:"heatmaps"}).then(sxt).catch(s=>console.error("Heat map refresh failed",s));else if(d.type==="labels_changed")ht.labelManager&&ht.labelManager.applyRemoteLabels(d.labels);else if(d.type==="drcUpdated")ht._drcUpdateTimeout&&clearTimeout(ht._drcUpdateTimeout),ht._drcUpdateTimeout=setTimeout(()=>{ht.drcWidget&&ht.drcWidget.refresh()},500);else if(d.type==="debug_paused")ht.refreshRendererControls&&ht.refreshRendererControls(),hLe().style.display="block",ER(),ht.chartsWidget&&ht.websocketManager.request({type:"debug_charts"}).then(s=>ht.chartsWidget.setDebugCharts(s.charts||[])).catch(()=>{});else if(d.type==="debug_resumed"){let s=document.getElementById("debug-continue-btn");s&&(s.style.display="none")}else if(d.type==="debug_refresh"){if(ht.scriptRunning)return;ht.highlightRect&&(ht.map.removeLayer(ht.highlightRect),ht.highlightRect=null),ER()}else if(d.type==="log"){let s=d.text;s.endsWith(` -`)&&(s=s.slice(0,-1)),s&&_S(s+` -`,"")}else d.type==="restore_display_state"?G5e(d.state):d.type==="custom_ui"?SQt(d):d.type==="poly_decomp"?axt(d.value):d.type==="shutdown"&&(ht.websocketManager._shutdown=!0,bk.innerHTML='
Server stopped
',bk.style.display="block")};ht.websocketManager.readyPromise.then(async()=>{try{let E=function(y,I={}){let{addToSelection:N=!1,focusInspector:B=!0,context:P=!1,showConnectivity:U=!1}=I;if(!ht.designScale)return Promise.resolve(null);let{dbuX:j,dbuY:V}=tv(y.lat,y.lng,ht.designScale,ht.designMaxDXDY,ht.designOriginX,ht.designOriginY);if(ht.labelManager&&ht.labelManager.isActive()){ht.labelManager.handleMapClick(j,V);return}let tt=QKt(Dd,wk),Q={type:"select",dbu_x:j,dbu_y:V,zoom:Math.round(ht.map.getZoom()),visible_layers:[...ht.visibleLayerNames],selectable_layers:[...ht.selectableLayers],use_dbu:ht.showDbu,...tt};N&&(Q.add_to_selection=!0),P&&(Q.context=!0),U&&(Q.show_connectivity=!0),ht.visibleChiplets instanceof Set&&(Q.visible_chiplets=[...ht.visibleChiplets]);let X=wg(ht);return ht.websocketManager.request(Q).then(gt=>{if(N0(ht,X)){if(console.log("Select response:",gt,"at dbu",j,V),ht.map.closePopup(),mR(ht,gt),gt.selected&>.selected.length>0){let ft=gt.selected[0];ft.type==="Inst"&&(ht.selectedInstanceName=ft.name,ht.schematicWidget&&ht.schematicWidget.refresh()),YU(gt),B&&knt("Inspector"),gt.bbox&&(J5e(gt.bbox[0],gt.bbox[1],gt.bbox[2],gt.bbox[3],gt.type),Q5e(gt.bbox,gt.type),ht.lastSelectionBounds=Vf(gt.bbox[0],gt.bbox[1],gt.bbox[2],gt.bbox[3],ht.designScale,ht.designMaxDXDY,ht.designOriginX,ht.designOriginY)),Q.show_connectivity&>.connected_added>0&&nv(`Selected ${gt.connected_added} connected net`+(gt.connected_added>1?"s":""))}else!N&&!P&&(YU(null),ht.highlightRect&&(ht.map.removeLayer(ht.highlightRect),ht.highlightRect=null),ht.lastSelectionBounds=null);return oxt(),gt}}).catch(gt=>(console.error("Select failed:",gt),null))},[d,s,h]=await Promise.all([ht.websocketManager.request({type:"tech"}),ht.websocketManager.request({type:"bounds"}),ht.websocketManager.request({type:"heatmaps"})]);Lnt(),ht.hasLiberty=d.has_liberty,ht.techData=d,mQt(d.block_name),ht.websocketManager.request({type:"custom_ui"}).then(SQt).catch(()=>{}),ht.websocketManager.request({type:"poly_decomp"}).then(y=>axt(y.value)).catch(()=>{});let p=s.bounds,m=s.fit_bounds;if(!Ay){let y=ht.map.getSize();qKt(oJt({designBounds:p,fitRect:m,viewW:y.x,viewH:y.y}))}let _=TQt(p,m);if(_){if(ht.labelManager&&ht.labelManager.reload(),ht.map.fitBounds(ht.fitBounds),Ay){let y=Ay.zoom;ht.map.setMinZoom(y),ht.map.setMaxZoom(y),ht.map.fitBounds(ht.fitBounds),ht.map.scrollWheelZoom.disable(),ht.map.touchZoom.disable(),ht.map.boxZoom.disable(),ht.map.doubleClickZoom.disable(),ht.pathOverlay=L.imageOverlay("",Vf(p[0][1],p[0][0],p[1][1],p[1][0],ht.designScale,ht.designMaxDXDY,ht.designOriginX,ht.designOriginY),{opacity:1,interactive:!1,zIndex:1e3}),Ay.setPathOverlay=I=>{I?(ht.pathOverlay.setUrl(I),ht.pathOverlay.addTo(ht.map)):ht.map.removeLayer(ht.pathOverlay)}}try{let y=sessionStorage.getItem("or_restore_view");if(y){sessionStorage.removeItem("or_restore_view");let I=JSON.parse(y);I&&isFinite(I.lat)&&isFinite(I.lng)&&isFinite(I.zoom)&&ht.map.setView([I.lat,I.lng],I.zoom)}}catch{}}if(Ay&&(document.getElementById("loading-overlay").style.display="none"),ht.selectAtLatLng=E,Ay||ht.map.on("click",y=>{if(ht.rulerManager&&ht.rulerManager.isActive())return;let I=y.originalEvent;E(y.latlng,{addToSelection:!!(I&&I.shiftKey),showConnectivity:!!(I&&(I.ctrlKey||I.metaKey))})}),!Ay){let y=ht.map.getContainer(),I=null,N=null;y.addEventListener("contextmenu",B=>{B.preventDefault()}),y.addEventListener("mousedown",B=>{B.button===2&&(I={x:B.clientX,y:B.clientY},ht.map.dragging.disable())}),window.addEventListener("mousemove",B=>{if(!I)return;let P=B.clientX-I.x,U=B.clientY-I.y;if(!N&&Math.abs(P)>=4&&Math.abs(U)>=4&&(N=document.createElement("div"),N.className="rubber-band",document.body.appendChild(N)),N){let j=Math.min(I.x,B.clientX),V=Math.min(I.y,B.clientY);N.style.left=j+"px",N.style.top=V+"px",N.style.width=Math.abs(P)+"px",N.style.height=Math.abs(U)+"px"}}),window.addEventListener("mouseup",B=>{if(!I)return;let P=!!N;N&&(N.remove(),N=null);let U=I;I=null,ht.map.dragging.enable();let j=y.getBoundingClientRect();if(P){let Q=ht.map.containerPointToLatLng([U.x-j.left,U.y-j.top]),X=ht.map.containerPointToLatLng([B.clientX-j.left,B.clientY-j.top]);ht.map.fitBounds([[Math.min(Q.lat,X.lat),Math.min(Q.lng,X.lng)],[Math.max(Q.lat,X.lat),Math.max(Q.lng,X.lng)]]);return}if(!(B.clientX>=j.left&&B.clientX<=j.right&&B.clientY>=j.top&&B.clientY<=j.bottom)||ht.rulerManager&&ht.rulerManager.isActive())return;let tt=ht.map.containerPointToLatLng([B.clientX-j.left,B.clientY-j.top]);ht.selectAtLatLng(tt,{context:!0,focusInspector:!1}).then(()=>ht.contextMenu.show({originalEvent:B}))})}if(QJt(ht,Dd,wk,j5e,d,F0,H5e),!ht.overlayLayer&&!Ay){let y=vJt(Dd,ht);ht.overlayLayer=new y(ht.websocketManager,{zIndex:ht.allLayers.length+5,opacity:1}),ht.overlayLayer.addTo(ht.map)}sxt(h),_&&!s.shapes_ready&&fLe(),u3(),ht.booted=!0}catch(d){ht.scriptRunning||console.error("Failed to load initial data from server:",d)}});document.addEventListener("openroad-cone-sync",d=>{ht.schematicWidget?.syncCone(d.detail||{})});document.addEventListener("keydown",d=>{let s=d.target.tagName;if(s==="INPUT"||s==="TEXTAREA"||d.target.isContentEditable)return;let h=d.key.toLowerCase();h==="escape"&&ht.rulerManager&&ht.rulerManager.isActive()?ht.rulerManager.cancelRulerBuild():h==="escape"&&ht.labelManager&&ht.labelManager.isActive()?ht.labelManager.cancelLabelMode():h==="k"&&!d.shiftKey&&!d.ctrlKey&&!d.metaKey?ht.rulerManager&&ht.rulerManager.toggleRulerMode():h==="k"&&d.shiftKey&&!d.ctrlKey&&!d.metaKey?ht.rulerManager&&ht.rulerManager.clearAllRulers():h==="l"&&!d.shiftKey&&!d.ctrlKey&&!d.metaKey?ht.labelManager&&ht.labelManager.toggleLabelMode():h==="f"&&!d.ctrlKey&&!d.metaKey&&ht.fitBounds?ht.map.fitBounds(ht.fitBounds):h==="z"&&!d.shiftKey&&!d.ctrlKey&&ht.map?ht.lastMouseLatLng?ht.map.setZoomAround(ht.lastMouseLatLng,ht.map.getZoom()+1):ht.map.zoomIn():h==="z"&&d.shiftKey&&!d.ctrlKey&&ht.map?ht.lastMouseLatLng?ht.map.setZoomAround(ht.lastMouseLatLng,ht.map.getZoom()-1):ht.map.zoomOut():h==="f"&&(d.ctrlKey||d.metaKey)?(d.preventDefault(),ht.designScale&&wnt(ht)):h==="g"&&d.shiftKey&&!d.ctrlKey&&!d.metaKey?(d.preventDefault(),ht.designScale&&vnt(ht)):h==="t"&&!d.shiftKey&&!d.ctrlKey&&!d.metaKey&&ht.toggleTheme()},!0);})(); + `,document.body.appendChild(this._overlay),this._breadcrumb=this._overlay.querySelector(".fb-breadcrumb"),this._fileList=this._overlay.querySelector(".fb-file-list"),this._pathInput=this._overlay.querySelector(".fb-path-input"),this._errorDiv=this._overlay.querySelector(".modal-error"),this._okBtn=this._overlay.querySelector(".ok"),this._cancelBtn=this._overlay.querySelector(".cancel"),this._listen(this._pathInput,"input",()=>this._updateOkState()),this._listen(this._pathInput,"keydown",s=>{if(s.key==="Enter"){let h=this._pathInput.value.trim();h.endsWith("/")?this._navigate(h.replace(/\/+$/,"")||"/"):this._submit()}else s.key==="Escape"&&this.close()}),this._listen(this._okBtn,"click",()=>this._submit()),this._listen(this._cancelBtn,"click",()=>this.close()),this._listen(this._overlay,"click",s=>{s.target===this._overlay&&this.close()}),this._navigate("")}close(){if(!this._closed){this._closed=!0;for(let s of this._disposers)s();this._disposers.length=0,this._overlay&&(this._overlay.remove(),this._overlay=null)}}_listen(s,h,p){s.addEventListener(h,p),this._disposers.push(()=>s.removeEventListener(h,p))}_updateOkState(){this._okBtn.disabled=!this._pathInput.value.trim()}_renderBreadcrumb(s){this._breadcrumb.innerHTML="";let h=s.split("/").filter(Boolean),p=document.createElement("span");p.className="fb-crumb",p.textContent="/",this._listen(p,"click",()=>this._navigate("/")),this._breadcrumb.appendChild(p);let m="";for(let _ of h){m+="/"+_;let E=document.createElement("span");E.className="fb-crumb-sep",E.textContent=" / ",this._breadcrumb.appendChild(E);let y=document.createElement("span");y.className="fb-crumb",y.textContent=_;let I=m;this._listen(y,"click",()=>this._navigate(I)),this._breadcrumb.appendChild(y)}}_renderEntries(s){if(this._fileList.innerHTML="",!s||s.length===0){let h=document.createElement("div");h.className="fb-empty",h.textContent="(empty directory)",this._fileList.appendChild(h);return}for(let h of s){let p=document.createElement("div");p.className="fb-entry",h.is_dir&&p.classList.add("fb-dir");let m=document.createElement("span");m.className="fb-icon",m.textContent=h.is_dir?"\u{1F4C1}":"\u{1F4C4}",p.appendChild(m);let _=document.createElement("span");_.className="fb-name",_.textContent=h.name,p.appendChild(_),h.is_dir?this._listen(p,"click",()=>this._navigate(this._currentPath+"/"+h.name)):(this._listen(p,"click",()=>{let E=this._fileList.querySelector(".fb-selected");E&&E.classList.remove("fb-selected"),p.classList.add("fb-selected"),this._pathInput.value=this._currentPath+"/"+h.name,this._updateOkState()}),this._listen(p,"dblclick",()=>{this._pathInput.value=this._currentPath+"/"+h.name,this._updateOkState(),this._submit()})),this._fileList.appendChild(p)}}async _navigate(s){this._errorDiv.style.display="none",this._fileList.innerHTML='
Loading...
';try{let h=await this._app.websocketManager.request({type:"list_dir",path:s||""});if(this._closed)return;this._currentPath=h.path,this._renderBreadcrumb(h.path),this._renderEntries(h.entries),this._pathInput.value="",this._updateOkState()}catch(h){if(this._closed)return;this._fileList.innerHTML="",this._errorDiv.textContent=h.message||String(h),this._errorDiv.style.display=""}}async _submit(){let s=this._pathInput.value.trim();if(s){this._okBtn.disabled=!0,this._okBtn.textContent="Loading...",this._errorDiv.style.display="none";try{let h=await this._app.websocketManager.request({type:"drc_load_report",path:s});if(this._closed)return;if(h.ok){let p=h.category;this.close(),this._onLoaded(p)}else this._errorDiv.textContent=h.error||"Failed to load report",this._errorDiv.style.display="",this._okBtn.disabled=!1,this._okBtn.textContent="Load"}catch(h){if(this._closed)return;this._errorDiv.textContent=h.message||"Request failed",this._errorDiv.style.display="",this._okBtn.disabled=!1,this._okBtn.textContent="Load"}}}};var f5e=` +\r[]{}`;var Tnt=class{constructor(s,h){this._input=s,this._ws=h,this._popup=null,this._items=[],this._selectedIndex=-1,this._replaceStart=0,this._replaceEnd=0,this._debounceTimer=null,this._commandCache=null,this._history=[],this._historyIndex=-1,this._historyStash="",this._createPopup(),this._onInputBound=this._onInput.bind(this),this._onBlurBound=this._onBlur.bind(this),this._input.addEventListener("input",this._onInputBound),this._input.addEventListener("blur",this._onBlurBound)}_createPopup(){this._popup=document.createElement("div"),this._popup.className="tcl-complete-popup",this._popup.style.display="none",this._input.parentElement.appendChild(this._popup)}handleKeyDown(s){let h=this._popup.style.display!=="none";return s.key==="Tab"?(s.preventDefault(),h?this._tabAccept():this._tabComplete(this._input.value,this._input.selectionStart),!0):s.key==="Escape"?h?(this._hidePopup(),!0):!1:s.key==="ArrowDown"?h?(s.preventDefault(),this._selectItem(this._selectedIndex+1),!0):this._historyIndex>=0?(s.preventDefault(),this._historyIndex--,this._historyIndex<0?this._input.value=this._historyStash:this._input.value=this._history[this._historyIndex],!0):!1:s.key==="ArrowUp"?h?(s.preventDefault(),this._selectItem(this._selectedIndex-1),!0):this._historyIndex{let s=this._input.value,h=this._input.selectionStart,p=this._extractPrefix(s,h);p.length>=2||p.length>=1&&(p[0]==="$"||p[0]==="-")?this._requestCompletions(s,h):this._hidePopup()},100)}_onBlur(){setTimeout(()=>this._hidePopup(),150)}_extractPrefix(s,h){let p=h-1;for(;p>=0&&f5e.indexOf(s[p])===-1;)p--;return s.substring(p+1,h)}_fetchCompletions(s,h,p){let m=this._extractPrefix(s,h),_=m.length>0&&m[0]==="$",E=m.length>0&&m[0]==="-",y=!_&&!E,I=h-m.length,O=s.substring(0,I),B=/^[\s\[]*$/.test(O);if(y&&B&&this._commandCache){let P=m.toLowerCase(),U=this._commandCache.filter(W=>W.toLowerCase().startsWith(P));p(U,I,h);return}this._ws.request({type:"tcl_complete",line:s,cursor_pos:h}).then(P=>{P.mode==="commands"&&!this._commandCache&&m===""&&(this._commandCache=P.completions),P.mode==="commands"&&!this._commandCache&&this._ws.request({type:"tcl_complete",line:"",cursor_pos:0}).then(U=>{U.mode==="commands"&&(this._commandCache=U.completions)}).catch(()=>{}),p(P.completions,P.replace_start,P.replace_end)}).catch(()=>p([],0,0))}_requestCompletions(s,h){this._fetchCompletions(s,h,(p,m,_)=>{this._showPopup(p,m,_)})}_tabAccept(){if(this._items.length===0){this._hidePopup();return}if(this._items.length===1){this._selectedIndex=0,this._acceptCompletion();return}this._advanceToCommonPrefix()}_tabComplete(s,h){this._fetchCompletions(s,h,(p,m,_)=>{if(!p||p.length===0){this._hidePopup();return}if(p.length===1){this._items=p,this._replaceStart=m,this._replaceEnd=_,this._selectedIndex=0,this._acceptCompletion();return}this._items=p,this._replaceStart=m,this._replaceEnd=_,this._advanceToCommonPrefix(),this._showPopup(p,this._replaceStart,this._replaceEnd)})}_advanceToCommonPrefix(){if(this._items.length<2)return!1;let s=this._items[0];for(let E=1;E0;E++){let y=this._items[E],I=0;for(;I{let I=document.createElement("div");I.className="tcl-complete-item",I.textContent=E,I.addEventListener("mousedown",O=>{O.preventDefault(),this._selectedIndex=y,this._acceptCompletion()}),this._popup.appendChild(I)}),s.length>15){let E=document.createElement("div");E.className="tcl-complete-more",E.textContent=`... ${s.length-15} more`,this._popup.appendChild(E)}this._selectedIndex=0,this._highlightSelected(),this._popup.style.display="block"}_hidePopup(){this._popup.style.display="none",this._items=[],this._selectedIndex=-1}_selectItem(s){if(this._items.length===0)return;let h=Math.min(this._items.length,15)-1;this._selectedIndex=Math.max(0,Math.min(s,h)),this._highlightSelected()}_highlightSelected(){let s=this._popup.querySelectorAll(".tcl-complete-item");s.forEach((h,p)=>{h.classList.toggle("selected",p===this._selectedIndex)}),s[this._selectedIndex]&&s[this._selectedIndex].scrollIntoView&&s[this._selectedIndex].scrollIntoView({block:"nearest"})}_acceptCompletion(){if(this._selectedIndex<0||this._selectedIndex>=this._items.length){this._hidePopup();return}let s=this._items[this._selectedIndex],h=this._input.value.substring(0,this._replaceStart),p=this._input.value.substring(this._replaceEnd),_=!s.endsWith("/")&&!s.endsWith("::")&&(p.length===0||p[0]!==" ")?" ":"";this._input.value=h+s+_+p;let E=this._replaceStart+s.length+_.length;this._input.setSelectionRange(E,E),this._input.focus(),this._hidePopup()}};var dQt=[{key:"or_visibility",store:"cookie"},{key:"or_selectability",store:"cookie"},{key:"or_hidden_layers",store:"session"},{key:"or_nonselectable_layers",store:"session"},{key:"or_layer_patterns",store:"session"},{key:"or_hidden_chiplets",store:"cookie"},{key:"or_bg_color",store:"cookie"},{key:"or_show_dbu",store:"cookie"},{key:"or_theme",store:"theme"},{key:"or_use_true_z",store:"cookie"},{key:"or_ruler_style",store:"cookie"},{key:"or_wheel_zoom",store:"cookie"},{key:"or_arrow_step",store:"cookie"},{key:"or_font_family",store:"cookie"},{key:"or_font_scale",store:"cookie"}];function d5e(d,s){try{return window[d].getItem(s)}catch{return null}}function p5e(d,s,h){try{h===null?window[d].removeItem(s):window[d].setItem(s,h)}catch{}}function g5e({key:d,store:s}){return s==="session"?d5e("sessionStorage",d):qf(d)}function m5e({key:d,store:s},h){s==="session"?p5e("sessionStorage",d,h):s==="theme"?h===null?NJt():cnt(h):h===null?ont(d):Rd(d,h)}function pQt(){let d={};for(let s of dQt){let h=g5e(s);h&&(d[s.key]=h)}return{version:1,entries:d}}function b5e(d){return typeof d=="string"&&d!==""&&!/[;\r\n]/.test(d)}function gQt(d){for(let s of dQt){let h=d[s.key];m5e(s,b5e(h)?h:null)}}function mQt(d,s=typeof document<"u"?document:null){let h="OpenROAD",p=d?`${h} - ${d}`:h;return s&&(s.title=p),p}var Zs=globalThis.THREE,bQt=2,w5e=.002,v5e=.9,_5e=1.1,y5e=.1,x5e=20,M5e=3,gk=2,wQt=2,E5e=10,S5e=1e4,T5e=.15,C5e=300,A5e=6,Cnt=Math.PI/180,vQt=[5025616,2201331,16750592,10233776,48340,16007990,2533018,7951688,15277667,4149685];function k5e(d){let s=new Array(d.length).fill(0),h=new Map;d.forEach((p,m)=>{let _=p.z;h.has(_)||h.set(_,[]),h.get(_).push({idx:m,chiplet:p})});for(let p of h.values()){if(p.length<=1)continue;let m=[];for(let{idx:_,chiplet:E}of p){let y=E.x,I=E.y,O=E.x+E.width,B=E.y+E.height,P=!1;for(let U=0;Uyq.x1&&Iq.y1)){m[U].push({x1:y,y1:I,x2:O,y2:B}),s[_]=U,P=!0;break}P||(m.push([{x1:y,y1:I,x2:O,y2:B}]),s[_]=m.length-1)}}return s}var Ant=class{constructor(s,h){if(this._app=h,this._container=s,this._element=document.createElement("div"),this._element.className="three-d-viewer-widget",s.element.appendChild(this._element),!Zs){Sc(h)?this._showInfo("The 3D view is not available in saved reports."):this._showError("three.js is missing from the page."),this._destroyed=!0;return}this._canvasContainer=document.createElement("div"),this._canvasContainer.className="three-d-canvas-container",this._element.appendChild(this._canvasContainer),this._tooltip=document.createElement("div"),this._tooltip.className="or-tooltip",this._canvasContainer.appendChild(this._tooltip),this._optionsOverlay=this._createOptionsOverlay(),this._canvasContainer.appendChild(this._optionsOverlay),this._raycaster=new Zs.Raycaster,this._scene=new Zs.Scene,this._applyTheme(),this._themeObserver=new MutationObserver(()=>{this._applyTheme(),this.render()}),this._themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),this._camera=new Zs.PerspectiveCamera(45,1,10,1e5),this._camera.position.set(0,0,1e3);try{this._renderer=new Zs.WebGLRenderer({antialias:!0,preserveDrawingBuffer:!0})}catch(E){console.error("3D viewer: failed to create WebGL context:",E),this._showWebGLUnavailable(E),this._themeObserver&&(this._themeObserver.disconnect(),this._themeObserver=null),this._destroyed=!0;return}this._renderer.setPixelRatio(window.devicePixelRatio),this._renderer.setSize(s.width,s.height),this._canvasContainer.appendChild(this._renderer.domElement),this._rotation=new Zs.Quaternion,this._distance=1e3,this._panX=0,this._panY=0,this._boundingRadius=1,this._sceneCenter=new Zs.Vector3,this._mouseDown=!1,this._mouseButton=-1,this._lastMousePos={x:0,y:0},this._setupMouseHandlers();let p=new Zs.AmbientLight(16777215,.5);this._scene.add(p);let m=new Zs.DirectionalLight(16777215,.8);m.position.set(1,1,1).normalize(),this._scene.add(m);let _=new Zs.DirectionalLight(16777215,.3);_.position.set(-1,-.5,.5).normalize(),this._scene.add(_),s.on("resize",this.onResize.bind(this)),s.on("open",this.onOpen.bind(this)),s.on("destroy",this.onDestroy.bind(this)),this._designGroup=new Zs.Group,this._scene.add(this._designGroup),this._chipletMeshes=[],this._loading=!1,this._destroyed=!1,this._edgeMaterial=null}_setupMouseHandlers(){let s=this._renderer.domElement;s.addEventListener("mousedown",h=>{this._mouseDown=!0,this._mouseButton=h.button,this._lastMousePos.x=h.clientX,this._lastMousePos.y=h.clientY,s.focus(),h.preventDefault()}),s.addEventListener("contextmenu",h=>h.preventDefault()),this._onMouseMove=h=>{if(!this._mouseDown)return;let p=h.clientX-this._lastMousePos.x,m=h.clientY-this._lastMousePos.y;this._lastMousePos.x=h.clientX,this._lastMousePos.y=h.clientY,!(p===0&&m===0)&&(this._mouseButton===0?this._handleRotate(p,m):this._mouseButton===2&&this._handlePan(p,m),this._updateCamera())},this._onMouseUp=h=>{this._mouseDown&&h.button===this._mouseButton&&(this._mouseDown=!1,this._mouseButton=-1)},window.addEventListener("mousemove",this._onMouseMove),window.addEventListener("mouseup",this._onMouseUp),s.addEventListener("wheel",h=>{h.preventDefault(),h.deltaY<0?this._distance*=v5e:this._distance*=_5e;let p=Math.max(this._boundingRadius*y5e,1),m=Math.max(this._boundingRadius*x5e,p);this._distance=Math.max(p,Math.min(m,this._distance)),this._updateCamera()},{passive:!1}),s.tabIndex=0,s.style.outline="none",s.addEventListener("keydown",h=>{h.key.toLowerCase()==="f"&&this.resetCamera()}),s.addEventListener("dblclick",h=>{h.preventDefault();let p=this._pickDrcMarkerId(h);if(p!=null&&this._app.drcWidget){this._app.drcWidget.highlightMarkerById(p,!0);return}this.resetCamera()}),s.addEventListener("mousemove",h=>{if(this._mouseDown){this._hideTooltip();return}this._updateTooltip(h)}),s.addEventListener("mouseleave",()=>{this._hideTooltip()})}_createOptionsOverlay(){let s=document.createElement("div");s.className="three-d-options";let h=document.createElement("label");h.title="Render chiplets at their true Z (disable stacking offset for overlapping chiplets at same Z).";let p=document.createElement("input");p.type="checkbox",p.checked=!!this._app.useTrueZ,p.addEventListener("change",()=>{this._app.useTrueZ=p.checked,Rd("or_use_true_z",p.checked?"1":"0"),this._app.syncDisplayState(),this.refreshSceneForOptions()}),h.appendChild(p),h.appendChild(document.createTextNode("True Z (no stacking)")),s.appendChild(h);let m=document.createElement("div");m.style.cssText="margin-top:4px; display:flex; gap:4px;";let _=document.createElement("button");_.className="or-btn or-btn-sm",_.textContent="Save PNG",_.title="Save the 3D view as a PNG image (2x resolution)",_.addEventListener("click",()=>this._exportPng(2));let E=document.createElement("button");return E.className="or-btn or-btn-sm",E.textContent="Copy",E.title="Copy the 3D view image to the clipboard",E.addEventListener("click",()=>this._copyImage(2)),m.appendChild(_),m.appendChild(E),s.appendChild(m),s}_capturePng(s=2){if(!this._renderer)return null;let h=this._renderer,p=h.domElement.clientWidth||h.domElement.width,m=h.domElement.clientHeight||h.domElement.height,_=h.getPixelRatio();try{return h.setPixelRatio(_*s),h.setSize(p,m,!1),this.render(),h.domElement.toDataURL("image/png")}finally{h.setPixelRatio(_),h.setSize(p,m,!1),this.render()}}_exportPng(s=2){let h=this._capturePng(s);h&&fk(h,"3d-view.png")}async _copyImage(s=2){let h=this._capturePng(s);h&&await ant(h)}_setRaycasterFromEvent(s){let p=this._renderer.domElement.getBoundingClientRect(),m=new Zs.Vector2((s.clientX-p.left)/p.width*2-1,-((s.clientY-p.top)/p.height*2-1));this._raycaster.setFromCamera(m,this._camera)}_updateTooltip(s){if(!this._chipletMeshes.length){this._hideTooltip();return}this._setRaycasterFromEvent(s);let h=this._chipletMeshes.map(y=>y.mesh),p=this._raycaster.intersectObjects(h,!1);if(p.length===0){this._hideTooltip();return}let m=p[0].object,_=this._chipletMeshes.find(y=>y.mesh===m);if(!_){this._hideTooltip();return}this._tooltip.textContent=_.data.name,this._tooltip.style.display="block";let E=this._canvasContainer.getBoundingClientRect();this._tooltip.style.left=s.clientX-E.left+12+"px",this._tooltip.style.top=s.clientY-E.top+12+"px"}_hideTooltip(){this._tooltip&&(this._tooltip.style.display="none")}_pickDrcMarkerId(s){if(!this._drcHitboxMesh||!this._drcHitboxMarkerIds)return null;this._setRaycasterFromEvent(s);let h=this._raycaster.intersectObject(this._drcHitboxMesh,!1);if(h.length===0)return null;let p=h[0].instanceId;return p==null?null:this._drcHitboxMarkerIds[p]??null}_handleRotate(s,h){let p=Math.sqrt(s*s+h*h);if(p<.001)return;let m=new Zs.Vector3(h/p,s/p,0),_=p/bQt,y=new Zs.Quaternion().setFromAxisAngle(m,_*Cnt).clone().multiply(this._rotation);if(new Zs.Vector3(0,0,1).applyQuaternion(y).z>=0)this._rotation.copy(y);else{let O=new Zs.Vector3(0,1,0),B=s/bQt*Cnt,U=new Zs.Quaternion().setFromAxisAngle(O,B).clone().multiply(this._rotation);new Zs.Vector3(0,0,1).applyQuaternion(U).z>=0&&this._rotation.copy(U)}}_handlePan(s,h){let p=this._distance*w5e;this._panX+=s*p,this._panY-=h*p}_updateCamera(){let s=Math.max(this._boundingRadius,1e3),h=Math.max(this._distance-s*wQt,E5e),p=this._distance+s*wQt;p0;){let s=this._designGroup.children[0];this._designGroup.remove(s),s.geometry&&s.geometry.dispose(),s.material&&!s.material._shared&&s.material.dispose()}this._edgeMaterial&&(this._edgeMaterial.dispose(),this._edgeMaterial=null),this._onMouseMove&&(window.removeEventListener("mousemove",this._onMouseMove),this._onMouseMove=null),this._onMouseUp&&(window.removeEventListener("mouseup",this._onMouseUp),this._onMouseUp=null),this._renderer&&(this._renderer.dispose(),this._renderer=null),this._app.threeDViewerWidget===this&&(this._app.threeDViewerWidget=null)}}_setInitialCameraState(){this._distance=this._boundingRadius*M5e;let s=new Zs.Quaternion().setFromAxisAngle(new Zs.Vector3(1,0,0),-45*Cnt),h=new Zs.Quaternion().setFromAxisAngle(new Zs.Vector3(0,0,1),45*Cnt);this._rotation=s.multiply(h),this._panX=0,this._panY=0}resetCamera(){this._sceneBounds&&(this._setInitialCameraState(),this._updateCamera())}onResize(){if(this._destroyed)return;let s=this._canvasContainer.getBoundingClientRect(),h=s.width,p=s.height;h===0||p===0||(this._camera.aspect=h/p,this._camera.updateProjectionMatrix(),this._renderer.setSize(h,p),this.render())}render(){this._destroyed||this._renderer&&this._scene&&this._camera&&this._renderer.render(this._scene,this._camera)}_applyTheme(){let h=hk().bgMap||"#000000";this._scene.background=new Zs.Color(h)}async loadData(){if(!(this._loading||this._destroyed)){this._loading=!0;for(let s of[".three-d-error",".three-d-info"]){let h=this._element.querySelector(s);h&&h.remove()}try{await this._app.websocketManager.readyPromise;let s=await this._app.websocketManager.request({type:"get_3d_data"});if(this._destroyed)return;if(s&&s.error){this._showError(s.error);return}if(s&&s.info){this._showInfo(s.info);return}this.buildScene(s)}catch(s){if(this._destroyed)return;console.error("Failed to load 3D data:",s),this._showError(s.message||String(s))}finally{this._loading=!1}}}_showOverlay(s,h,p){let m=document.createElement("div");m.className=s,m.style.cssText="position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-family:monospace;text-align:center;",m.style.color=p,m.textContent=h,this._element.appendChild(m)}_showError(s){this._showOverlay("three-d-error","Failed to load 3D data: "+s,"var(--error)")}_showInfo(s){this._showOverlay("three-d-info",s,"var(--fg-muted, #888)")}_showWebGLUnavailable(s){let h=document.createElement("div");h.className="three-d-error",h.style.cssText="position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-family:monospace;text-align:center;max-width:80%;color:var(--error);";let p=s&&s.message?s.message:String(s||"");h.innerHTML='
3D viewer unavailable: WebGL context could not be created.
In Chrome, open chrome://flags/#ignore-gpu-blocklist and set Override software rendering list to Enabled, then relaunch the browser.
Otherwise enable hardware acceleration or try a different browser. See chrome://gpu for details.
'+(p?'
'+p+"
":""),this._element.appendChild(h)}buildScene(s){if(this._destroyed||(this._lastSceneData=s,this._clearScene(),!s||!s.chiplets||s.chiplets.length===0))return;let h=this._app.getDbuPerMicron(),p=this._buildChiplets(s.chiplets,h);p.minX!==1/0&&(this._buildGrid(p),this._setSceneBoundsAndCenter(p),this._setInitialCameraState(),this._updateCamera())}_clearScene(){for(this._chipletMeshes=[];this._designGroup.children.length>0;){let s=this._designGroup.children[0];this._designGroup.remove(s),s.geometry&&s.geometry.dispose(),s.material&&!s.material._shared&&s.material.dispose()}this._hideTooltip()}_buildChiplets(s,h){let p={minX:1/0,minY:1/0,minZ:1/0,maxX:-1/0,maxY:-1/0,maxZ:-1/0};this._edgeMaterial||(this._edgeMaterial=new Zs.LineBasicMaterial({color:0,linewidth:1}),this._edgeMaterial._shared=!0);let m=this._app.useTrueZ?new Array(s.length).fill(0):k5e(s);return s.forEach((_,E)=>{let y=_.width/h,I=_.height/h,O=_.thickness/h*gk,B=vQt[E%vQt.length],P=new Zs.MeshPhongMaterial({color:B,transparent:!1,opacity:1,side:Zs.DoubleSide,shininess:40}),U=new Zs.BoxGeometry(y,I,O),W=new Zs.Mesh(U,P),q=_.x/h+y/2,et=_.y/h+I/2,Q=O*T5e,X=_.z/h*gk+O/2+m[E]*(O+Q);W.position.set(q,et,X),this._designGroup.add(W),this._chipletMeshes.push({mesh:W,data:_,color:B});let gt=new Zs.EdgesGeometry(U),ft=new Zs.LineSegments(gt,this._edgeMaterial);ft.position.set(q,et,X),this._designGroup.add(ft),p.minX=Math.min(p.minX,_.x/h),p.minY=Math.min(p.minY,_.y/h),p.minZ=Math.min(p.minZ,X-O/2),p.maxX=Math.max(p.maxX,_.x/h+y),p.maxY=Math.max(p.maxY,_.y/h+I),p.maxZ=Math.max(p.maxZ,X+O/2)}),p}_buildGrid(s){let h=s.maxX-s.minX,p=s.maxY-s.minY,m=Math.max(h,p)*1.4,_=10,E=new Zs.GridHelper(m,_,8947848,4473924);E.rotation.x=Math.PI/2,E.position.set((s.minX+s.maxX)/2,(s.minY+s.maxY)/2,s.minZ-1),this._designGroup.add(E)}_setSceneBoundsAndCenter(s){this._sceneBounds=s;let h=s.maxX-s.minX,p=s.maxY-s.minY,m=s.maxZ-s.minZ;this._boundingRadius=Math.sqrt(h*h+p*p+m*m)/2,this._sceneCenter.set((s.minX+s.maxX)/2,(s.minY+s.maxY)/2,(s.minZ+s.maxZ)/2)}_stackOffsetForPoint(s,h,p,m){for(let{mesh:_,data:E}of this._chipletMeshes){if(s!==E.z||hE.x+E.width||pE.y+E.height)continue;let y=E.thickness/m*gk,I=E.z/m*gk+y/2;return _.position.z-I}return 0}clearHighlightDRC(){this._drcBlinkInterval&&(clearInterval(this._drcBlinkInterval),this._drcBlinkInterval=null),this._drcMeshGroup&&(this._scene.remove(this._drcMeshGroup),this._drcMeshGroup.children.forEach(s=>{s.geometry&&s.geometry.dispose()}),this._drcMaterial&&(this._drcMaterial.dispose(),this._drcMaterial=null),this._drcHitboxMaterial&&(this._drcHitboxMaterial.dispose(),this._drcHitboxMaterial=null),this._drcHitboxMesh=null,this._drcHitboxMarkerIds=null,this._drcMeshGroup=null,this.render())}highlightDRC(s){if(this._destroyed||(this.clearHighlightDRC(),!s||s.length===0))return;let h=this._app.getDbuPerMicron(),p=0,m=1e4/h*gk;this._sceneBounds&&this._sceneBounds.minZ!==1/0&&(p=this._sceneBounds.minZ,m=this._sceneBounds.maxZ),p-=1,m+=1;let _=Math.max(m-p,1);this._drcMeshGroup=new Zs.Group,this._drcMaterial=new Zs.LineBasicMaterial({color:16776960,transparent:!0,opacity:1,depthTest:!1,depthWrite:!1}),this._drcHitboxMaterial=new Zs.MeshBasicMaterial({transparent:!0,opacity:0,depthWrite:!1});let E=[];for(let O of s){let B=O.rects&&O.rects.length>0?O.rects:[O.bbox];for(let P of B){let[U,W,q,et,Q,X]=P,gt=Math.max((q-U)/h,.001),ft=Math.max((et-W)/h,.001),xt=p,Bt=_,Ot=0;if(P.length>=6&&Q!==void 0&&X!==void 0){xt=Q/h*gk;let Lt=X/h*gk;Bt=Math.max(Lt-xt,.001),Ot=this._stackOffsetForPoint(Q,(U+q)/2,(W+et)/2,h)}let Pt=U/h+gt/2,se=W/h+ft/2,ot=xt+Bt/2+Ot;E.push({cx:Pt,cy:se,cz:ot,width:gt,height:ft,depth:Bt,markerId:O.id})}}if(E.length>0){let O=new Zs.BoxGeometry(1,1,1);this._drcHitboxMesh=new Zs.InstancedMesh(O,this._drcHitboxMaterial,E.length),this._drcHitboxMarkerIds=new Array(E.length);let B=new Zs.Matrix4,P=new Zs.Vector3,U=new Zs.Vector3,W=new Zs.Quaternion;E.forEach((q,et)=>{U.set(q.cx,q.cy,q.cz),P.set(q.width,q.height,q.depth),B.compose(U,W,P),this._drcHitboxMesh.setMatrixAt(et,B),this._drcHitboxMarkerIds[et]=q.markerId;let Q=new Zs.BoxGeometry(q.width,q.height,q.depth),X=new Zs.EdgesGeometry(Q);Q.dispose();let gt=new Zs.LineSegments(X,this._drcMaterial);gt.position.set(q.cx,q.cy,q.cz),gt.renderOrder=999,this._drcMeshGroup.add(gt)}),this._drcHitboxMesh.instanceMatrix.needsUpdate=!0,this._drcMeshGroup.add(this._drcHitboxMesh)}this._drcMeshGroup.renderOrder=999,this._scene.add(this._drcMeshGroup),this.render();let y=!0,I=0;this._drcBlinkInterval=setInterval(()=>{if(!(!this._drcMeshGroup||!this._drcMaterial)){if(I+=1,I>=A5e){this._drcMaterial.opacity=1,this.render(),clearInterval(this._drcBlinkInterval),this._drcBlinkInterval=null;return}y=!y,this._drcMaterial.opacity=y?1:.2,this.render()}},C5e)}refreshSceneForOptions(){this._destroyed||this._lastSceneData&&(this.clearHighlightDRC(),this.buildScene(this._lastSceneData))}};var L5e=[{name:"green",hex:"#00ff00"},{name:"yellow",hex:"#ffff00"},{name:"cyan",hex:"#00ffff"},{name:"magenta",hex:"#ff00ff"},{name:"red",hex:"#ff0000"},{name:"dark_green",hex:"#008000"},{name:"dark_magenta",hex:"#800080"},{name:"blue",hex:"#0000ff"},{name:"orange",hex:"#ffa500"},{name:"purple",hex:"#800080"},{name:"lime",hex:"#bfff00"},{name:"teal",hex:"#008080"},{name:"pink",hex:"#ffc0cb"},{name:"brown",hex:"#8b4513"},{name:"indigo",hex:"#4b0082"},{name:"turquoise",hex:"#40e0d0"}],P5e=[{label:"Connected Insts",suffix:"connected_insts",needsNet:!0},{label:"Output Nets",suffix:"connected_nets",args:{output:!0,input:!1}},{label:"Input Nets",suffix:"connected_nets",args:{output:!1,input:!0}},{label:"All Nets",suffix:"connected_nets",args:{output:!0,input:!0}},{label:"All buffer trees",suffix:"connected_buffer_trees"},{label:"All buffer trees (incl. inverters)",suffix:"connected_buffer_trees",args:{include_inverters:!0}}],knt=class{constructor(s){this._app=s,this._el=document.createElement("div"),this._el.className="context-menu",this._el.style.display="none",this._el.style.zIndex="10000",document.body.appendChild(this._el),this._bindEvents()}_bindEvents(){document.addEventListener("mousedown",s=>{this._el.contains(s.target)||this.hide()}),this._app.map&&this._app.map.on("movestart",()=>this.hide())}show(s){this._el.innerHTML="";let h=!!this._app.selHasInst,p=!!this._app.selHasNet,m=!(h||p),_=W=>P5e.map(q=>({label:q.label,disabled:q.needsNet?!p:!h,...W(q.suffix,q.args||{})})),E=[{label:"Select",disabled:m,subMenu:_((W,q)=>({action:()=>this._sendContextAction("select_"+W,q)}))},{label:"Highlight",disabled:m,subMenu:_((W,q)=>({subMenu:this._buildColorSubmenu("highlight_"+W,q)}))},{label:"Save",subMenu:[{label:"Visible layout",action:()=>this._app.captureLayout?.({entire:!1})},{label:"Entire layout",action:()=>this._app.captureLayout?.({entire:!0})}]},{label:"Clear",subMenu:[{label:"Selections",action:()=>this._sendContextAction("clear_selections")},{label:"Highlights",action:()=>this._sendContextAction("clear_highlights")},{label:"Rulers",action:()=>{this._app.rulerManager?.clearAllRulers()}},{label:"Focus nets",action:()=>this._sendContextAction("clear_focus_nets")},{label:"Route Guides",action:()=>this._sendContextAction("clear_route_guides")},{label:"All",action:()=>{this._sendContextAction("clear_all"),this._app.rulerManager?.clearAllRulers()}}]}];this._buildMenu(E,this._el),this._el.style.display="block";let y=4,I=this._el.getBoundingClientRect(),O=window.innerWidth-I.width-y,B=window.innerHeight-I.height-y,P=Math.max(y,Math.min(s.originalEvent.clientX,O)),U=Math.max(y,Math.min(s.originalEvent.clientY,B));this._el.style.left=P+"px",this._el.style.top=U+"px"}hide(){this._el.style.display="none"}_buildColorSubmenu(s,h={}){return L5e.map(({name:p,hex:m},_)=>({label:p,swatch:m,action:()=>this._sendContextAction(s,{...h,group:_})}))}_buildMenu(s,h){s.forEach(p=>{let m=document.createElement("div");if(m.className="cm-item",p.swatch){let _=document.createElement("span");_.className="cm-swatch",_.style.background=p.swatch,m.appendChild(_)}if(m.appendChild(document.createTextNode(p.label)),p.disabled){m.classList.add("disabled"),p.subMenu&&m.classList.add("has-submenu"),h.appendChild(m);return}if(p.subMenu){m.classList.add("has-submenu");let _=document.createElement("div");_.className="cm-submenu",this._buildMenu(p.subMenu,_),m.appendChild(_),m.addEventListener("mouseenter",()=>{_.classList.remove("flip-left"),_.getBoundingClientRect().right>window.innerWidth&&_.classList.add("flip-left")})}else p.action&&m.addEventListener("click",_=>{_.stopPropagation(),this.hide();try{p.action()}catch(E){console.error("Context menu item action threw:",p.label,E)}});h.appendChild(m)})}_sendContextAction(s,h={}){this._app.websocketManager&&this._app.websocketManager.request({type:"context_action",action:s,...h}).then(p=>{pR(this._app,p),p&&p.connected_count===0&&ev('Nothing connected \u2014 select an instance (or a net for "Connected Insts") first.'),this._syncAfterAction(s)}).catch(p=>{console.error("Context action failed:",s,p)})}_syncAfterAction(s){let h=this._app;(s==="clear_focus_nets"||s==="clear_route_guides"||s==="clear_all")&&typeof h.redrawAllLayers=="function"&&h.redrawAllLayers(),s==="clear_selections"||s==="clear_all"?(h.updateInspector?.(null),h.stopSelectionAnimation?.(),h.highlightRect&&h.map&&(h.map.removeLayer(h.highlightRect),h.highlightRect=null),h.lastSelectionBounds=null):h.refreshInspector?.(),h.refreshOverlay?.()}};function _Qt(d,s){if(!d)return;let h=URL.createObjectURL(d),p=document.createElement("a");p.href=h,p.download=s,p.style.display="none",document.body.appendChild(p),p.click(),document.body.removeChild(p),setTimeout(()=>URL.revokeObjectURL(h),0)}function xQt(d){return d.options&&d.options.opacity!=null?d.options.opacity:1}function MQt(d,s,h){if(!s||s.tagName==="IMG"&&(!s.complete||!s.naturalWidth))return;let p=s.getBoundingClientRect();if(!(p.width<=0||p.height<=0))try{d.drawImage(s,p.left-h.left,p.top-h.top,p.width,p.height)}catch{}}function I5e(d,s,h){let p=[];d.map.eachLayer(m=>{m instanceof L.GridLayer&&m._tiles&&p.push(m)}),p.sort((m,_)=>(m.options&&m.options.zIndex||0)-(_.options&&_.options.zIndex||0));for(let m of p){let _=xQt(m);if(!(_<=0)){s.globalAlpha=_;for(let E of Object.keys(m._tiles)){let y=m._tiles[E];!y||!y.current||MQt(s,y.el,h)}}}s.globalAlpha=1}function R5e(d,s,h){let p=d.map.getContainer().querySelectorAll(".leaflet-pane svg"),m=[];return p.forEach(_=>{let E=_.getBoundingClientRect();if(E.width<=0||E.height<=0)return;let y=_.cloneNode(!0);y.setAttribute("width",E.width),y.setAttribute("height",E.height);let I=new XMLSerializer().serializeToString(y),O="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(I);m.push(new Promise(B=>{let P=new Image;P.onload=()=>{try{s.drawImage(P,E.left-h.left,E.top-h.top,E.width,E.height)}catch{}B()},P.onerror=()=>B(),P.src=O}))}),Promise.all(m)}function D5e(d,s,h){d.map.getContainer().querySelectorAll(".leaflet-pane .ruler-label").forEach(m=>{let _=m.getBoundingClientRect();if(_.width<=0||_.height<=0)return;let E=m.textContent;if(!E)return;let y=getComputedStyle(m),I=_.left-h.left,O=_.top-h.top;s.save(),s.fillStyle=y.backgroundColor||"rgba(0, 0, 0, 0.75)";let B=Math.min(parseFloat(y.borderTopLeftRadius)||0,_.height/2);B>0&&typeof s.roundRect=="function"?(s.beginPath(),s.roundRect(I,O,_.width,_.height,B),s.fill()):s.fillRect(I,O,_.width,_.height),s.fillStyle=y.color||"#eee",s.font=y.font||`${y.fontSize||"12px"} ${y.fontFamily||"monospace"}`,s.textAlign="left",s.textBaseline="middle",s.fillText(E,I+(parseFloat(y.paddingLeft)||0),O+_.height/2),s.restore()})}function N5e(d){let s=0;return d.map.eachLayer(h=>{if(!(!(h instanceof L.GridLayer)||!h._tiles)){h._loading&&s++;for(let p of Object.keys(h._tiles)){let m=h._tiles[p],_=m&&m.el;m&&m.current&&_&&_.tagName==="IMG"&&(!_.complete||!_.naturalWidth)&&s++}}}),s}function O5e(d,s=6e3,h=32){return new Promise(p=>{let m=Date.now()+s,_=0,E=()=>{if(N5e(d)===0){if(++_>=2){p();return}}else _=0;if(Date.now()>=m){p();return}setTimeout(E,h)};setTimeout(E,h)})}function B5e(d,s,h){d.map.eachLayer(p=>{if(!(p instanceof L.ImageOverlay))return;let m=xQt(p);m<=0||(s.globalAlpha=m,MQt(s,p._image,h),s.globalAlpha=1)})}async function yQt(d){let s=d.map.getContainer(),h=s.getBoundingClientRect(),p=Math.max(1,Math.round(h.width)),m=Math.max(1,Math.round(h.height)),_=document.createElement("canvas");_.width=p,_.height=m;let E=_.getContext("2d"),y=getComputedStyle(s).backgroundColor;return E.fillStyle=y&&y!=="transparent"&&y!=="rgba(0, 0, 0, 0)"?y:"#000",E.fillRect(0,0,p,m),I5e(d,E,h),B5e(d,E,h),await R5e(d,E,h),D5e(d,E,h),new Promise(I=>_.toBlob(I,"image/png"))}async function EQt(d,{entire:s=!1}={}){if(!d.map)return;if(!s||!d.fitBounds){_Qt(await yQt(d),"layout_visible.png");return}let h=d.map.getCenter(),p=d.map.getZoom();try{d.map.fitBounds(d.fitBounds,{animate:!1}),await O5e(d),_Qt(await yQt(d),"layout_entire.png")}finally{d.map.setView(h,p,{animate:!1})}}var mk=document.getElementById("websocket-status"),ZU=null,F5e=2e3,U5e=20;function oxt(){let d=ht.websocketManager&&ht.websocketManager.isConnected,s=ht.websocketManager?ht.websocketManager.pendingCount:0;if(d)ZU&&(clearTimeout(ZU),ZU=null),s>U5e?(mk.innerHTML=`
pending: ${s}
`,mk.style.display="block"):mk.style.display="none";else{if(ht.websocketManager?._shutdown)return;ZU||(ZU=setTimeout(()=>{ht.websocketManager?.isConnected||(mk.innerHTML='
\u26A0 OpenROAD disconnected \u2014 retrying\u2026
',mk.style.display="block")},F5e))}z5e(s)}function z5e(d){let s=ht.tileProgressEl;s&&(s.classList.toggle("active",d>0),s.title=d>0?`${d} tile requests pending`:"")}function j5e(d){if(!d)return"";try{return decodeURIComponent(d)}catch{return""}}var ht={map:null,fitBounds:null,lastSelectionBounds:null,selHasInst:!1,selHasNet:!1,displayControlsEl:null,allLayers:[],designScale:null,designMaxDXDY:null,designOriginX:0,designOriginY:0,websocketManager:null,goldenLayout:null,hasLiberty:!1,techData:null,inspectorEl:null,tclOutputEl:null,highlightRect:null,hoverHighlightLayer:null,hoverHighlightPane:"hover-highlight-pane",modulesLayer:null,pinsLayer:null,overlayLayers:[],hierarchyBrowser:null,focusNets:new Set,routeGuideNets:new Set,visibleLayers:new Set,visibleLayerNames:new Set,visibleChiplets:null,layerPatterns:{},useTrueZ:qf("or_use_true_z")==="1",showDbu:qf("or_show_dbu")==="1",rulerStyle:qf("or_ruler_style")==="manhattan"?"manhattan":"euclidian",wheelZoom:qf("or_wheel_zoom")!=="0",arrowStep:gR(qf("or_arrow_step")),fontFamily:j5e(qf("or_font_family")),fontScale:$U(qf("or_font_scale")),polyDecomp:!1,labelManager:null,selectableLayers:new Set,heatMapData:null,activeHeatMap:"",heatMapLayer:null,heatMapLegendEl:null,renderHeatMapControls:null,rulerManager:null,selectionToken:0,selectionResetters:[],getDbuPerMicron(){return this.techData?.dbu_per_micron||1e3},unitOpts(){return{showDbu:this.showDbu,dbuPerMicron:this.getDbuPerMicron()}},formatDbu(d,s=!1){return cJt(d,this.unitOpts(),s)},parseDbu(d){return aJt(d,this.unitOpts())},formatDistance(d){return uJt(d,this.unitOpts())},unitLabel(){return lJt(this.unitOpts())}},Dd={stdcells:!0,macros:!0,pad_input:!0,pad_output:!0,pad_inout:!0,pad_power:!0,pad_spacer:!0,pad_areaio:!0,pad_other:!0,phys_fill:!1,phys_endcap:!0,phys_welltap:!0,phys_tie:!0,phys_antenna:!0,phys_cover:!0,phys_bump:!0,phys_other:!0,std_bufinv:!0,std_bufinv_timing:!0,std_clock_bufinv:!0,std_clock_gate:!0,std_level_shift:!0,std_sequential:!0,std_combinational:!0,net_signal:!0,net_power:!0,net_ground:!0,net_clock:!0,net_reset:!0,net_tieoff:!0,net_scan:!0,net_analog:!0,inst_names:!0,inst_pins:!0,inst_pin_names:!1,routing:!0,routing_segments:!0,routing_vias:!0,special_nets:!0,srouting_segments:!0,srouting_vias:!0,pins:!0,pin_names:!0,access_points:!1,regions:!0,mfg_grid:!1,gcell_grid:!1,flywires_only:!1,blockages:!0,placement_blockages:!0,routing_obstructions:!0,fills:!1,rows:!1,tracks_pref:!1,tracks_non_pref:!1,module_view:!1,detailed:!1,rulers:!0,labels:!0,scale_bar:!0,focused_nets_guides:!1,highlight_selected:!0,debug:!1};try{let d=qf("or_visibility");if(d){let s=JSON.parse(decodeURIComponent(d));for(let[h,p]of Object.entries(s))Dd[h]=!!p}}catch{}var bk={stdcells:!0,macros:!0,pad_input:!0,pad_output:!0,pad_inout:!0,pad_power:!0,pad_spacer:!0,pad_areaio:!0,pad_other:!0,phys_fill:!0,phys_endcap:!0,phys_welltap:!0,phys_tie:!0,phys_antenna:!0,phys_cover:!0,phys_bump:!0,phys_other:!0,std_bufinv:!0,std_bufinv_timing:!0,std_clock_bufinv:!0,std_clock_gate:!0,std_level_shift:!0,std_sequential:!0,std_combinational:!0,net_signal:!0,net_power:!0,net_ground:!0,net_clock:!0,net_reset:!0,net_tieoff:!0,net_scan:!0,net_analog:!0,pins:!0,inst_pins:!0,placement_blockages:!0,routing_obstructions:!0};ht.visibility=Dd;ht.selectability=bk;try{let d=qf("or_selectability");if(d){let s=JSON.parse(decodeURIComponent(d));for(let[h,p]of Object.entries(s))bk[h]=!!p}}catch{}var H5e=wJt(Dd,ht.visibleLayerNames,bk,ht.selectableLayers,ht);(function(){let s=null;try{s=new URLSearchParams(window.location.search)}catch{s=null}let h=_=>s?s.get(_):null;ht.mergeTiles=h("mergetiles")!=="0";let p=Number(h("tilebudget"));Number.isFinite(p)&&p>0&&(ht.tileBudgetBytes=Math.round(p*1024*1024));let m=Number(h("mergegroups"));Number.isFinite(m)&&m>0&&(ht.mergeGroupCount=Math.floor(m)),ht.tileDpr=ak,ht.MergedTileLayer=AJt({visibility:Dd,selectability:bk,visibleLayers:ht.visibleLayerNames,selectableLayers:ht.selectableLayers,app:ht},{dpr:ak})})();var G5e=L.GridLayer.extend({initialize:function(d,s,h){this._websocketManager=d,this._appState=s,L.GridLayer.prototype.initialize.call(this,rk(h))},_clampZoom:function(d){return L.GridLayer.prototype._clampZoom.call(this,dR(this,d))},createTile:function(d,s){let h=document.createElement("img");h.alt="",h.setAttribute("role","presentation"),h._tileDone=!1,h.onload=()=>{h.src&&h.src.startsWith("blob:")&&URL.revokeObjectURL(h.src),h._tileDone||(h._tileDone=!0,s(null,h))},h.onerror=()=>{h._tileDone||(h._tileDone=!0,s(new Error("heat map tile load error"),h))};let p=this._appState.activeHeatMap;return p?(this._websocketManager.request({type:"heatmap_tile",name:p,z:d.z,x:d.x,y:d.y,...fR(ak(),this.getTileSize().x)}).then(m=>{h.src=m?URL.createObjectURL(m):c3}).catch(()=>{h.src=c3}),h):(h.src=c3,h)},refreshTiles:function(){if(this._map)for(let d in this._tiles){let s=this._tiles[d];if(!s||!s.el)continue;let h=s.el,p=s.coords,m=this._appState.activeHeatMap;if(!m){h.src&&h.src.startsWith("blob:")&&URL.revokeObjectURL(h.src),h.src=c3;continue}this._websocketManager.request({type:"heatmap_tile",name:m,z:p.z,x:p.x,y:p.y,...fR(ak(),this.getTileSize().x)}).then(_=>{h.src&&h.src.startsWith("blob:")&&URL.revokeObjectURL(h.src),h.src=_?URL.createObjectURL(_):c3}).catch(()=>{h.src=c3})}}});function axt(d){ht.heatMapData=d,ht.activeHeatMap=d.active||"",ht.heatMapLayer&&(ht.activeHeatMap?ht.map.hasLayer(ht.heatMapLayer)||ht.heatMapLayer.addTo(ht.map):ht.map.hasLayer(ht.heatMapLayer)&&ht.map.removeLayer(ht.heatMapLayer),ht.heatMapLayer.refreshTiles()),ht.renderHeatMapControls&&ht.renderHeatMapControls(d)}ht.updateHeatMaps=axt;function uxt(){ht.overlayLayer&&ht.overlayLayer.refreshTiles()}var wk=zU(()=>{uxt(),ht.selectionBrowser&&ht.selectionBrowser.scheduleRefresh()});ht.refreshOverlay=wk;function F0(){Rd("or_visibility",encodeURIComponent(JSON.stringify(Dd))),Rd("or_selectability",encodeURIComponent(JSON.stringify(bk))),u3();let d=[[ht.modulesLayer,Dd.module_view],[ht.pinsLayer,Dd.pins],...ht.overlayLayers.map(({def:s,layer:h})=>[h,wnt(s.shown_by,Dd)])];for(let[s,h]of d)s&&(h&&!ht.map.hasLayer(s)?s.addTo(ht.map):!h&&ht.map.hasLayer(s)&&ht.map.removeLayer(s));for(let s of ht.allLayers)s.refreshTiles();if(ht.heatMapLayer&&ht.heatMapLayer.refreshTiles(),ht.highlightRect){let s=Dd.highlight_selected!==!1;!s&&ht.map.hasLayer(ht.highlightRect)?ht.map.removeLayer(ht.highlightRect):s&&!ht.map.hasLayer(ht.highlightRect)&&ht.highlightRect.addTo(ht.map)}!Dd.highlight_selected&&ht.clearSelectionPulse&&ht.clearSelectionPulse(),uxt(),ht.rulerManager&&ht.rulerManager.updateVisibility(),ht.labelManager&&ht.labelManager.updateVisibility(),ht.updateScaleBar&&ht.updateScaleBar()}var xR=zU(F0),u3=zU(()=>{!ht.websocketManager||Sc(ht)||ht.websocketManager.request({type:"set_display_state",state:pQt()}).catch(()=>{})});ht.syncDisplayState=u3;function W5e(d){if(!d||typeof d!="object")return;let s=d.entries;if(!(!s||typeof s!="object")){gQt(s);try{if(ht.map&&typeof sessionStorage<"u"){let h=ht.map.getCenter();sessionStorage.setItem("or_restore_view",JSON.stringify({lat:h.lat,lng:h.lng,zoom:ht.map.getZoom()}))}}catch{}window.location.reload()}}ht.redrawAllLayers=F0;ht.captureLayout=(d={})=>EQt(ht,d);function $5e(d){let s=document.createElement("div");s.className="layout-viewer",s.style.width="100%",s.style.height="100%",s.style.backgroundColor="var(--bg-map)",d.element.appendChild(s);let h=document.createElement("div");h.className="or-hud or-hud-bottom-right heatmap-map-legend hidden",s.appendChild(h),ht.heatMapLegendEl=h;let p=document.createElement("div");p.className="or-progress",s.appendChild(p),ht.tileProgressEl=p,d.on("destroy",()=>{ht.tileProgressEl=null,ht.heatMapLegendEl=null}),ht.map=L.map(s,iJt(void 0,{wheelZoom:ht.wheelZoom,arrowStep:ht.arrowStep})),Sc(ht)||dJt(ht.map,()=>ht.wheelZoom),DJt(ht.map),XKt(()=>F0());let m=ht.map.createPane(ht.hoverHighlightPane);m.style.zIndex="650",m.style.pointerEvents="none";let _=L.Control.extend({onAdd:function(){let X=L.DomUtil.create("div","leaflet-bar leaflet-control leaflet-control-fit"),gt=L.DomUtil.create("a","",X);return gt.href="#",gt.title="Fit",gt.setAttribute("role","button"),gt.setAttribute("aria-label","Fit"),gt.textContent="\u2922",L.DomEvent.on(gt,"click",L.DomEvent.stop).on(gt,"click",()=>{ht.fitBounds&&ht.map.fitBounds(ht.fitBounds)}),X}});new _({position:"topleft"}).addTo(ht.map),new ResizeObserver(()=>{ht.map.invalidateSize({animate:!1})}).observe(s);let E=document.createElement("div");E.className="or-hud or-hud-bottom-left hidden";let y=document.createElement("div");y.id="scale-bar";let I=document.createElement("span");I.className="or-hud-divider";let O=document.createElement("div");O.id="coord-bar",E.appendChild(y),E.appendChild(I),E.appendChild(O),s.appendChild(E);function B(){let X=y.style.display!=="none"&&y.childElementCount>0,gt=O.textContent!=="";I.style.display=X&>?"":"none",E.classList.toggle("hidden",!X&&!gt)}B(),ht.map.on("mousemove",X=>{if(ht.lastMouseLatLng=X.latlng,!ht.designScale)return;let{dbuX:gt,dbuY:ft}=Qw(X.latlng.lat,X.latlng.lng,ht.designScale,ht.designMaxDXDY,ht.designOriginX,ht.designOriginY);O.textContent=`X: ${ht.formatDbu(gt)} Y: ${ht.formatDbu(ft)}`,B()}),ht.map.on("mouseout",X=>{let gt=X.originalEvent&&X.originalEvent.relatedTarget;gt&&s.contains(gt)||(ht.lastMouseLatLng=null,O.textContent="",B())});let P=22,U=8,W=22;function q(X,gt,ft){let Bt=2+U,Ot=W,Pt=W+X,se=P-2,ot=X>=40,Lt=[];if(Lt.push(``),ot&&ft>1)for(let be=1;be`)}ot&&Lt.push(`0`),Lt.push(`${gt}`),y.innerHTML=`${Lt.join("")}`}function et(){if(!ht.designScale||!Dd.scale_bar){y.style.display="none",B();return}let X=ht.designScale*Math.pow(2,ht.map.getZoom()),gt=ht.map.getContainer().clientWidth||400,ft=fJt({targetPx:gt*.15,pxPerDbu:X,dbuPerMicron:ht.techData?.dbu_per_micron,showDbu:ht.showDbu});if(!ft){y.style.display="none",B();return}y.style.display="",q(ft.barPx,ft.label,ft.segments),B()}let Q=zU(et);ht.map.on("zoom zoomend resize",Q),ht.updateScaleBar=et,ht.rulerManager=new xnt(ht,Dd,YU,Lnt),ht.labelManager=new Mnt(ht,Dd,YU,Lnt)}function V5e(d){let s=document.createElement("div");s.className="display-controls",s.innerHTML='
Loading layers...
',d.element.appendChild(s),ht.displayControlsEl=s}var cxt="or_restore_console",q5e=1<<20;function X5e(){try{if(ht.tclOutputEl){let d=[...ht.tclOutputEl.children].map(m=>[m.textContent,m.className]),s=d.length,h=0;for(;s>0&&h+d[s-1][0].length<=q5e;)h+=d[--s][0].length;let p=d.slice(s);s>0&&p.unshift([`[earlier output not kept across reload] +`,""]),sessionStorage.setItem(cxt,JSON.stringify(p))}}catch{}window.location.reload()}function Z5e(){try{let d=sessionStorage.getItem(cxt);if(!d)return;sessionStorage.removeItem(cxt);for(let[s,h]of JSON.parse(d))vS(s,h)}catch{}}function vS(d,s){if(!ht.tclOutputEl)return;let h=document.createElement("span");s&&(h.className=s),h.textContent=d,ht.tclOutputEl.appendChild(h),ht.tclOutputEl.scrollTop=ht.tclOutputEl.scrollHeight}function Y5e(){if(ht._shutdownHandled)return;ht._shutdownHandled=!0,ht.websocketManager&&(ht.websocketManager._shutdown=!0,ht.websocketManager.onPush=()=>{});let d=document.createElement("div");d.style.cssText="position:fixed;inset:0;z-index:99999;background:#1e1e1e;color:#ddd;display:flex;flex-direction:column;align-items:center;justify-content:center;font-family:system-ui,sans-serif;font-size:16px;padding:24px;text-align:center;",d.innerHTML='
OpenROAD exited
You can close this tab.
',document.body.appendChild(d),setTimeout(()=>{try{window.close()}catch{}},1500)}function K5e(d){let s=document.createElement("div");if(s.className="tcl-console",s.innerHTML='
%
',d.element.appendChild(s),ht.tclOutputEl=s.querySelector(".tcl-output"),Z5e(),Sc(ht)){s.querySelector(".tcl-input-row").style.display="none";let m=document.createElement("span");m.className="tcl-static-notice",m.setAttribute("role","status"),m.setAttribute("aria-live","polite"),m.textContent="Tcl console is not available in saved reports.",ht.tclOutputEl.appendChild(m);return}let h=s.querySelector(".tcl-input"),p=new Tnt(h,ht.websocketManager);h.addEventListener("keydown",m=>{if(!p.handleKeyDown(m)&&m.key==="Enter"){let _=h.value.trim();if(!_)return;vS(`>>> ${_} +`,"tcl-cmd"),p.addToHistory(_),h.value="",ht.websocketManager.request({type:"tcl_eval",cmd:_}).then(E=>{E.result&&vS(E.result+` +`,E.is_error?"tcl-error":""),E.action==="shutdown"&&Y5e(),!E.is_error&&ht.drcWidget&&ht.drcWidget.refresh()}).catch(E=>vS(`Error: ${E} +`,"tcl-error"))}})}ht.visibility=Dd;var _S=VJt(ht,F0,wk),J5e=_S.createInspector,YU=_S.updateInspector,Q5e=_S.highlightBBox,tLe=_S.pulseHighlight;ht.updateInspector=YU;ht.navigateInspector=_S.navigateInspector;ht.refreshInspector=_S.refreshInspector;ht.animateSelection=_S.animateSelection;ht.stopSelectionAnimation=_S.stopSelectionAnimation;function eLe(d){new dnt(d,ht,F0)}function nLe(d){ht.timingWidget=new lk(ht,F0,wk),d.element.appendChild(ht.timingWidget.element)}function iLe(d){ht.drcWidget=new Snt(ht,F0,wk),d.element.appendChild(ht.drcWidget.element)}function rLe(d){ht.clockTreeWidget=new hnt(d,ht,F0,wk)}function sLe(d){ht.chartsWidget=new fnt(ht,F0),d.element.appendChild(ht.chartsWidget.element)}function oLe(d){let s=document.createElement("div");s.className="help-panel",s.innerHTML="

Keyboard Shortcuts

fFit design to viewport
scrollZoom in/out
dragPan the view
right-dragRubber-band zoom
Shift+clickAdd object to selection
Ctrl/Cmd+clickSelect object and its connected nets
kToggle ruler mode
Shift+KClear all rulers
EscapeCancel ruler (when building)
",d.element.appendChild(s)}function cLe(d){ht.selectionBrowser=new pnt(d,ht,wk)}function aLe(d){new Ent(d,ht)}function uLe(d){ht.threeDViewerWidget=new Ant(d,ht)}var lLe=28,hLe={dimensions:{headerHeight:lLe},root:{type:"row",content:[{type:"component",componentType:"DisplayControls",title:"Display Controls",width:15},{type:"column",width:55,content:[{type:"stack",height:70,content:[{type:"component",componentType:"LayoutViewer",title:"Layout",isClosable:!1},{type:"component",componentType:"SchematicWidget",title:"Schematic"},{type:"component",componentType:"3DViewer",title:"3D Viewer"}]},{type:"component",componentType:"TclConsole",title:"Tcl Console",height:30}]},{type:"stack",width:30,content:[{type:"component",componentType:"Inspector",title:"Inspector"},{type:"component",componentType:"Browser",title:"Hierarchy"},{type:"component",componentType:"TimingWidget",title:"Timing"},{type:"component",componentType:"DRCWidget",title:"DRC"},{type:"component",componentType:"SelectHighlight",title:"Select Highlight"},{type:"component",componentType:"ClockWidget",title:"Clock Tree"},{type:"component",componentType:"ChartsWidget",title:"Charts"},{type:"component",componentType:"HelpWidget",title:"Help"}]}]}};ht.goldenLayout=new int(document.getElementById("gl-container"));ht.goldenLayout.registerComponentFactoryFunction("LayoutViewer",$5e);ht.goldenLayout.registerComponentFactoryFunction("DisplayControls",V5e);ht.goldenLayout.registerComponentFactoryFunction("TclConsole",K5e);ht.goldenLayout.registerComponentFactoryFunction("Inspector",J5e);ht.goldenLayout.registerComponentFactoryFunction("Browser",eLe);ht.goldenLayout.registerComponentFactoryFunction("TimingWidget",nLe);ht.goldenLayout.registerComponentFactoryFunction("DRCWidget",iLe);ht.goldenLayout.registerComponentFactoryFunction("ClockWidget",rLe);ht.goldenLayout.registerComponentFactoryFunction("ChartsWidget",sLe);ht.goldenLayout.registerComponentFactoryFunction("SchematicWidget",aLe);ht.goldenLayout.registerComponentFactoryFunction("3DViewer",uLe);ht.goldenLayout.registerComponentFactoryFunction("HelpWidget",oLe);ht.goldenLayout.registerComponentFactoryFunction("SelectHighlight",cLe);var Cy=window.__STATIC_CACHE__||null;if(Cy)VKt(),ht.websocketManager=GU.fromCache(Cy,oxt);else{let d=JKt(window.location);ht.websocketManager=new GU(d,oxt),ht.layerExtents=new rnt,ht.websocketManager.onReconnected=()=>{Pnt(),fxt(null,null,{reloadOnChange:!0}).catch(()=>{})}}oxt();ht.goldenLayout.loadLayout(hLe);function lxt(){ht.goldenLayout.updateSize()}ht.syncLayoutSize=lxt;window.addEventListener("resize",lxt);function Lnt(d,s){ht.goldenLayout.focusComponent(d,s)}ht.focusComponent=Lnt;ht.resetLayout=function(){ht.goldenLayout&&typeof ht.goldenLayout.resetLayout=="function"&&ht.goldenLayout.resetLayout()};ht.toggleTheme=function(){let d=document.documentElement.dataset.theme==="dark"?"light":"dark";document.documentElement.dataset.theme=d,X2t(d),cnt(d),ht.chartsWidget&&ht.chartsWidget.render(),ht.clockTreeWidget&&ht.clockTreeWidget.render(),u3()};ht.toggleShowDbu=function(){ht.showDbu=!ht.showDbu,Rd("or_show_dbu",ht.showDbu?"1":"0"),ht.rulerManager&&ht.rulerManager._rerenderAll(),ht.hierarchyBrowser&&ht.hierarchyBrowser._render(),ht.updateScaleBar&&ht.updateScaleBar(),ht.refreshInspector&&ht.refreshInspector(),u3()};ht.toggleRulerStyle=function(){ht.rulerStyle=ht.rulerStyle==="manhattan"?"euclidian":"manhattan",Rd("or_ruler_style",ht.rulerStyle),u3()};ht.toggleWheelZoom=function(){ht.wheelZoom=!ht.wheelZoom,Rd("or_wheel_zoom",ht.wheelZoom?"1":"0"),u3()};ht.setArrowStep=function(d){ht.arrowStep=gR(d),Rd("or_arrow_step",String(ht.arrowStep)),rJt(ht.map,ht.arrowStep),u3()};ht.setAppFont=function({family:d,scale:s}){ht.fontFamily=d??ht.fontFamily,ht.fontScale=$U(s??ht.fontScale),Rd("or_font_family",encodeURIComponent(ht.fontFamily)),Rd("or_font_scale",String(ht.fontScale)),ht.applyAppFont(),u3()};ht.applyAppFont=function(){let d=document.documentElement;ht.fontFamily?d.style.setProperty("--or-font-family",ht.fontFamily):d.style.removeProperty("--or-font-family"),d.style.setProperty("--or-font-scale",String(ht.fontScale/100)),ht.chartsWidget&&ht.chartsWidget.render(),ht.clockTreeWidget&&ht.clockTreeWidget.render()};ht.showArrowStepDialog=()=>ZJt(ht);ht.showAppFontDialog=()=>YJt(ht);ht.togglePolyDecomp=function(){ht.websocketManager&&ht.websocketManager.request({type:"poly_decomp",value:!ht.polyDecomp}).then(d=>hxt(d.value)).catch(()=>{})};function hxt(d){ht.polyDecomp=!!d,ht.rebuildMenuBar&&ht.rebuildMenuBar(),ht.refreshOverlay&&ht.refreshOverlay()}ht.applyAppFont();ht.echoTcl=d=>vS(`>>> ${d} +`,"tcl-cmd");ht.runTclScript=(d,s)=>d?(s&&ht.echoTcl(d),ht.websocketManager.request({type:"tcl_eval",cmd:d}).then(h=>(h&&h.result&&vS(h.result+` +`,h.is_error?"tcl-error":""),h)).catch(h=>{vS(`Error: ${h} +`,"tcl-error")})):Promise.resolve();function SQt(d){d&&(ht.customMenu=d.menu||[],ht.customToolbar=d.toolbar||[],ht.rebuildMenuBar&&ht.rebuildMenuBar(),ht.rebuildToolbar&&ht.rebuildToolbar(),lxt())}ht.customMenu=[];ht.customToolbar=[];ht.scheduleRedrawAllLayers=xR;ht.showGlobalConnectDialog=()=>cQt(ht);ht.showInsertBufferDialog=d=>aQt(ht,d);iQt(ht);rQt(ht);ht.contextMenu=new knt(ht);function fLe(){let d=document.getElementById("debug-continue-btn");return d||(d=document.createElement("button"),d.id="debug-continue-btn",d.className="debug-continue-btn",d.textContent="Continue",d.title="Advance the debugger (gpl, cts, ...)",d.addEventListener("click",()=>{ht.websocketManager.request({type:"debug_continue"}).catch(()=>{})}),(document.getElementById("menu-bar")||document.body).appendChild(d),d)}function TQt(d,s){let h=O2t(d,tv(),s);return h?(ht.currentBounds=d,ht.designScale=h.scale,ht.designMaxDXDY=h.maxDXDY,ht.designOriginX=h.originX,ht.designOriginY=h.originY,ht.fitBounds=h.fitBounds,ht.map.setMaxZoom(sJt(h.scale)),!0):!1}async function fxt(d,s,{reloadOnChange:h=!1}={}){if(Sc(ht)||!ht.map)return!1;let p=d,m=s;if(!p)try{let y=await ht.websocketManager.request({type:"bounds"});p=y.bounds,m=y.fit_bounds}catch{return!1}if(!p||eJt(ht.currentBounds,p))return!1;if(h)return window.location.reload(),!0;let E=!!ht.designScale?Qw(ht.map.getCenter().lat,ht.map.getCenter().lng,ht.designScale,ht.designMaxDXDY,ht.designOriginX,ht.designOriginY):null;if(!TQt(p,m))return!1;if(E){let y=Id(E.dbuX,E.dbuY,ht.designScale,ht.designMaxDXDY,ht.designOriginX,ht.designOriginY);ht.map.setView(y,ht.map.getZoom(),{animate:!1})}return ht.highlightRect&&(ht.map.removeLayer(ht.highlightRect),ht.highlightRect=null),F0(),!0}function dLe(){let d=document.getElementById("loading-overlay");d.style.display="flex";let s=()=>{d.style.display!=="none"&&ht.websocketManager.request({type:"bounds"}).then(h=>{h.shapes_ready&&(d.style.display="none")}).catch(()=>{}).finally(()=>{d.style.display!=="none"&&setTimeout(s,1e3)})};setTimeout(s,1e3)}function Pnt(){ht.layerExtents&&ht.layerExtents.refetch(d=>ht.websocketManager.request(d))}function pLe(d){document.getElementById("loading-overlay").style.display="none",Pnt(),fxt(d.bounds,d.fit_bounds).then(s=>{s||F0()}).catch(()=>F0()),ht.refreshInspector&&ht.refreshInspector()}function gLe(){let d=document.getElementById("script-running-badge");return d||(d=document.createElement("span"),d.id="script-running-badge",d.className="script-running-badge",d.textContent="Script running",d.title="The view updates when the script pauses or finishes",(document.getElementById("menu-bar")||document.body).appendChild(d),d)}function mLe(d){if(ht.scriptRunning=d,gLe().style.display=d?"block":"none",!d){if(!ht.booted||!ht.designScale){X5e();return}ht.refreshPending&&(ht.refreshPending=!1,Pnt(),ht.refreshInspector&&ht.refreshInspector()),fxt().then(s=>{s||xR()}).catch(()=>xR())}}ht.websocketManager.onPush=d=>{if(d.type==="refresh"){if(ht.scriptRunning){ht.refreshPending=!0;return}pLe(d)}else if(d.type==="script_running")mLe(!!d.running);else if(d.type==="renderer_controls_changed")ht.refreshRendererControls&&ht.refreshRendererControls(),xR();else if(d.type==="selection_invalidated")ht.updateInspector&&ht.updateInspector(null),ht.stopSelectionAnimation&&ht.stopSelectionAnimation(),ht.highlightRect&&ht.map&&(ht.map.removeLayer(ht.highlightRect),ht.highlightRect=null),wk();else if(d.type==="heatmaps_changed")ht.websocketManager.request({type:"heatmaps"}).then(axt).catch(s=>console.error("Heat map refresh failed",s));else if(d.type==="labels_changed")ht.labelManager&&ht.labelManager.applyRemoteLabels(d.labels);else if(d.type==="drcUpdated")ht._drcUpdateTimeout&&clearTimeout(ht._drcUpdateTimeout),ht._drcUpdateTimeout=setTimeout(()=>{ht.drcWidget&&ht.drcWidget.refresh()},500);else if(d.type==="debug_paused")ht.refreshRendererControls&&ht.refreshRendererControls(),fLe().style.display="block",xR(),ht.chartsWidget&&ht.websocketManager.request({type:"debug_charts"}).then(s=>ht.chartsWidget.setDebugCharts(s.charts||[])).catch(()=>{});else if(d.type==="debug_resumed"){let s=document.getElementById("debug-continue-btn");s&&(s.style.display="none")}else if(d.type==="debug_refresh"){if(ht.scriptRunning)return;ht.highlightRect&&(ht.map.removeLayer(ht.highlightRect),ht.highlightRect=null),xR()}else if(d.type==="log"){let s=d.text;s.endsWith(` +`)&&(s=s.slice(0,-1)),s&&vS(s+` +`,"")}else d.type==="restore_display_state"?W5e(d.state):d.type==="custom_ui"?SQt(d):d.type==="poly_decomp"?hxt(d.value):d.type==="shutdown"&&(ht.websocketManager._shutdown=!0,mk.innerHTML='
Server stopped
',mk.style.display="block")};ht.websocketManager.readyPromise.then(async()=>{try{let E=function(y,I={}){let{addToSelection:O=!1,focusInspector:B=!0,context:P=!1,showConnectivity:U=!1}=I;if(!ht.designScale)return Promise.resolve(null);let{dbuX:W,dbuY:q}=Qw(y.lat,y.lng,ht.designScale,ht.designMaxDXDY,ht.designOriginX,ht.designOriginY);if(ht.labelManager&&ht.labelManager.isActive()){ht.labelManager.handleMapClick(W,q);return}let et=QKt(Dd,bk),Q={type:"select",dbu_x:W,dbu_y:q,zoom:Math.round(ht.map.getZoom()),visible_layers:[...ht.visibleLayerNames],selectable_layers:[...ht.selectableLayers],use_dbu:ht.showDbu,...et};O&&(Q.add_to_selection=!0),P&&(Q.context=!0),U&&(Q.show_connectivity=!0),ht.visibleChiplets instanceof Set&&(Q.visible_chiplets=[...ht.visibleChiplets]);let X=wg(ht);return ht.websocketManager.request(Q).then(gt=>{if(N0(ht,X)){if(console.log("Select response:",gt,"at dbu",W,q),ht.map.closePopup(),pR(ht,gt),gt.selected&>.selected.length>0){let ft=gt.selected[0];ft.type==="Inst"&&(ht.selectedInstanceName=ft.name,ht.schematicWidget&&ht.schematicWidget.refresh()),YU(gt),B&&Lnt("Inspector"),gt.bbox&&(Q5e(gt.bbox[0],gt.bbox[1],gt.bbox[2],gt.bbox[3],gt.type),tLe(gt.bbox,gt.type),ht.lastSelectionBounds=Vf(gt.bbox[0],gt.bbox[1],gt.bbox[2],gt.bbox[3],ht.designScale,ht.designMaxDXDY,ht.designOriginX,ht.designOriginY)),Q.show_connectivity&>.connected_added>0&&ev(`Selected ${gt.connected_added} connected net`+(gt.connected_added>1?"s":""))}else!O&&!P&&(YU(null),ht.highlightRect&&(ht.map.removeLayer(ht.highlightRect),ht.highlightRect=null),ht.lastSelectionBounds=null);return uxt(),gt}}).catch(gt=>(console.error("Select failed:",gt),null))},[d,s,h]=await Promise.all([ht.websocketManager.request({type:"tech"}),ht.websocketManager.request({type:"bounds"}),ht.websocketManager.request({type:"heatmaps"})]);Pnt(),ht.hasLiberty=d.has_liberty,ht.techData=d,mQt(d.block_name),ht.websocketManager.request({type:"custom_ui"}).then(SQt).catch(()=>{}),ht.websocketManager.request({type:"poly_decomp"}).then(y=>hxt(y.value)).catch(()=>{});let p=s.bounds,m=s.fit_bounds;if(!Cy){let y=ht.map.getSize();qKt(oJt({designBounds:p,fitRect:m,viewW:y.x,viewH:y.y}))}let _=TQt(p,m);if(_){if(ht.labelManager&&ht.labelManager.reload(),ht.map.fitBounds(ht.fitBounds),Cy){let y=Cy.zoom;ht.map.setMinZoom(y),ht.map.setMaxZoom(y),ht.map.fitBounds(ht.fitBounds),ht.map.scrollWheelZoom.disable(),ht.map.touchZoom.disable(),ht.map.boxZoom.disable(),ht.map.doubleClickZoom.disable(),ht.pathOverlay=L.imageOverlay("",Vf(p[0][1],p[0][0],p[1][1],p[1][0],ht.designScale,ht.designMaxDXDY,ht.designOriginX,ht.designOriginY),{opacity:1,interactive:!1,zIndex:1e3}),Cy.setPathOverlay=I=>{I?(ht.pathOverlay.setUrl(I),ht.pathOverlay.addTo(ht.map)):ht.map.removeLayer(ht.pathOverlay)}}try{let y=sessionStorage.getItem("or_restore_view");if(y){sessionStorage.removeItem("or_restore_view");let I=JSON.parse(y);I&&isFinite(I.lat)&&isFinite(I.lng)&&isFinite(I.zoom)&&ht.map.setView([I.lat,I.lng],I.zoom)}}catch{}}if(Cy&&(document.getElementById("loading-overlay").style.display="none"),ht.selectAtLatLng=E,Cy||ht.map.on("click",y=>{if(ht.rulerManager&&ht.rulerManager.isActive())return;let I=y.originalEvent;E(y.latlng,{addToSelection:!!(I&&I.shiftKey),showConnectivity:!!(I&&(I.ctrlKey||I.metaKey))})}),!Cy){let y=ht.map.getContainer(),I=null,O=null;y.addEventListener("contextmenu",B=>{B.preventDefault()}),y.addEventListener("mousedown",B=>{B.button===2&&(I={x:B.clientX,y:B.clientY},ht.map.dragging.disable())}),window.addEventListener("mousemove",B=>{if(!I)return;let P=B.clientX-I.x,U=B.clientY-I.y;if(!O&&Math.abs(P)>=4&&Math.abs(U)>=4&&(O=document.createElement("div"),O.className="rubber-band",document.body.appendChild(O)),O){let W=Math.min(I.x,B.clientX),q=Math.min(I.y,B.clientY);O.style.left=W+"px",O.style.top=q+"px",O.style.width=Math.abs(P)+"px",O.style.height=Math.abs(U)+"px"}}),window.addEventListener("mouseup",B=>{if(!I)return;let P=!!O;O&&(O.remove(),O=null);let U=I;I=null,ht.map.dragging.enable();let W=y.getBoundingClientRect();if(P){let Q=ht.map.containerPointToLatLng([U.x-W.left,U.y-W.top]),X=ht.map.containerPointToLatLng([B.clientX-W.left,B.clientY-W.top]);ht.map.fitBounds([[Math.min(Q.lat,X.lat),Math.min(Q.lng,X.lng)],[Math.max(Q.lat,X.lat),Math.max(Q.lng,X.lng)]]);return}if(!(B.clientX>=W.left&&B.clientX<=W.right&&B.clientY>=W.top&&B.clientY<=W.bottom)||ht.rulerManager&&ht.rulerManager.isActive())return;let et=ht.map.containerPointToLatLng([B.clientX-W.left,B.clientY-W.top]);ht.selectAtLatLng(et,{context:!0,focusInspector:!1}).then(()=>ht.contextMenu.show({originalEvent:B}))})}if(QJt(ht,Dd,bk,H5e,d,F0,G5e),!ht.overlayLayer&&!Cy){let y=vJt(Dd,ht);ht.overlayLayer=new y(ht.websocketManager,{zIndex:ht.allLayers.length+5,opacity:1}),ht.overlayLayer.addTo(ht.map)}axt(h),_&&!s.shapes_ready&&dLe(),u3(),ht.booted=!0}catch(d){ht.scriptRunning||console.error("Failed to load initial data from server:",d)}});document.addEventListener("openroad-cone-sync",d=>{ht.schematicWidget?.syncCone(d.detail||{})});document.addEventListener("keydown",d=>{let s=d.target.tagName;if(s==="INPUT"||s==="TEXTAREA"||d.target.isContentEditable)return;let h=d.key.toLowerCase();h==="escape"&&ht.rulerManager&&ht.rulerManager.isActive()?ht.rulerManager.cancelRulerBuild():h==="escape"&&ht.labelManager&&ht.labelManager.isActive()?ht.labelManager.cancelLabelMode():h==="k"&&!d.shiftKey&&!d.ctrlKey&&!d.metaKey?ht.rulerManager&&ht.rulerManager.toggleRulerMode():h==="k"&&d.shiftKey&&!d.ctrlKey&&!d.metaKey?ht.rulerManager&&ht.rulerManager.clearAllRulers():h==="l"&&!d.shiftKey&&!d.ctrlKey&&!d.metaKey?ht.labelManager&&ht.labelManager.toggleLabelMode():h==="f"&&!d.ctrlKey&&!d.metaKey&&ht.fitBounds?ht.map.fitBounds(ht.fitBounds):h==="z"&&!d.shiftKey&&!d.ctrlKey&&ht.map?ht.lastMouseLatLng?ht.map.setZoomAround(ht.lastMouseLatLng,ht.map.getZoom()+1):ht.map.zoomIn():h==="z"&&d.shiftKey&&!d.ctrlKey&&ht.map?ht.lastMouseLatLng?ht.map.setZoomAround(ht.lastMouseLatLng,ht.map.getZoom()-1):ht.map.zoomOut():h==="f"&&(d.ctrlKey||d.metaKey)?(d.preventDefault(),ht.designScale&&vnt(ht)):h==="g"&&d.shiftKey&&!d.ctrlKey&&!d.metaKey?(d.preventDefault(),ht.designScale&&_nt(ht)):h==="t"&&!d.shiftKey&&!d.ctrlKey&&!d.metaKey&&ht.toggleTheme()},!0);})(); /*! Bundled license information: leaflet/dist/leaflet-src.js: @@ -4347,10 +4313,17 @@ lit-html/directive-helpers.js: * SPDX-License-Identifier: BSD-3-Clause *) -lit-html/directives/repeat.js: +lit-html/async-directive.js: (** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) + +lit-html/directives/ref.js: + (** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) */ diff --git a/src/web/dist/report.min.js b/src/web/dist/report.min.js index 3848a8f13c1..6aa6fcc17b2 100644 --- a/src/web/dist/report.min.js +++ b/src/web/dist/report.min.js @@ -1,16 +1,16 @@ -(()=>{var yh=Object.create;var ia=Object.defineProperty;var vh=Object.getOwnPropertyDescriptor;var bh=Object.getOwnPropertyNames;var wh=Object.getPrototypeOf,xh=Object.prototype.hasOwnProperty;var Ch=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports);var kh=(s,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of bh(e))!xh.call(s,r)&&r!==i&&ia(s,r,{get:()=>e[r],enumerable:!(o=vh(e,r))||o.enumerable});return s};var Lh=(s,e,i)=>(i=s!=null?yh(wh(s)):{},kh(e||!s||!s.__esModule?ia(i,"default",{value:s,enumerable:!0}):i,s));var sa=Ch((jn,na)=>{(function(s,e){typeof jn=="object"&&typeof na<"u"?e(jn):typeof define=="function"&&define.amd?define(["exports"],e):(s=typeof globalThis<"u"?globalThis:s||self,e(s.leaflet={}))})(jn,function(s){"use strict";var e="1.9.4";function i(t){var n,a,c,d;for(a=1,c=arguments.length;a"u"||!L||!L.Mixin)){t=P(t)?t:[t];for(var n=0;n0?Math.floor(t):Math.ceil(t)};rt.prototype={clone:function(){return new rt(this.x,this.y)},add:function(t){return this.clone()._add(at(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(at(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new rt(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new rt(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=ye(this.x),this.y=ye(this.y),this},distanceTo:function(t){t=at(t);var n=t.x-this.x,a=t.y-this.y;return Math.sqrt(n*n+a*a)},equals:function(t){return t=at(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=at(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+y(this.x)+", "+y(this.y)+")"}};function at(t,n,a){return t instanceof rt?t:P(t)?new rt(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new rt(t.x,t.y):new rt(t,n,a)}function kt(t,n){if(t)for(var a=n?[t,n]:t,c=0,d=a.length;c=this.min.x&&a.x<=this.max.x&&n.y>=this.min.y&&a.y<=this.max.y},intersects:function(t){t=Ot(t);var n=this.min,a=this.max,c=t.min,d=t.max,m=d.x>=n.x&&c.x<=a.x,x=d.y>=n.y&&c.y<=a.y;return m&&x},overlaps:function(t){t=Ot(t);var n=this.min,a=this.max,c=t.min,d=t.max,m=d.x>n.x&&c.xn.y&&c.y=n.lat&&d.lat<=a.lat&&c.lng>=n.lng&&d.lng<=a.lng},intersects:function(t){t=At(t);var n=this._southWest,a=this._northEast,c=t.getSouthWest(),d=t.getNorthEast(),m=d.lat>=n.lat&&c.lat<=a.lat,x=d.lng>=n.lng&&c.lng<=a.lng;return m&&x},overlaps:function(t){t=At(t);var n=this._southWest,a=this._northEast,c=t.getSouthWest(),d=t.getNorthEast(),m=d.lat>n.lat&&c.latn.lng&&c.lng1,lt=function(){var t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",_,n),window.removeEventListener("testPassiveEventSupport",_,n)}catch{}return t}(),Dt=function(){return!!document.createElement("canvas").getContext}(),oe=!!(document.createElementNS&&Y("svg").createSVGRect),Ge=!!oe&&function(){var t=document.createElement("div");return t.innerHTML="",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),An=!oe&&function(){try{var t=document.createElement("div");t.innerHTML='';var n=t.firstChild;return n.style.behavior="url(#default#VML)",n&&typeof n.adj=="object"}catch{return!1}}(),dc=navigator.platform.indexOf("Mac")===0,uc=navigator.platform.indexOf("Linux")===0;function Me(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var et={ie:I,ielt9:z,edge:ct,webkit:Lt,android:Xt,android23:zt,androidStock:Se,opera:Ue,chrome:Bt,gecko:ii,safari:M,phantom:H,opera12:F,win:U,ie3d:O,webkit3d:W,gecko3d:q,any3d:R,mobile:X,mobileWebkit:j,mobileWebkit3d:vt,msPointer:mt,pointer:St,touch:Ht,touchNative:Tt,mobileOpera:ce,mobileGecko:K,retina:st,passiveEvents:lt,canvas:Dt,svg:oe,vml:An,inlineSvg:Ge,mac:dc,linux:uc},ar=et.msPointer?"MSPointerDown":"pointerdown",lr=et.msPointer?"MSPointerMove":"pointermove",cr=et.msPointer?"MSPointerUp":"pointerup",hr=et.msPointer?"MSPointerCancel":"pointercancel",Zs={touchstart:ar,touchmove:lr,touchend:cr,touchcancel:hr},dr={touchstart:yc,touchmove:In,touchend:In,touchcancel:In},Ei={},ur=!1;function pc(t,n,a){return n==="touchstart"&&gc(),dr[n]?(a=dr[n].bind(this,a),t.addEventListener(Zs[n],a,!1),a):(console.warn("wrong event specified:",n),_)}function fc(t,n,a){if(!Zs[n]){console.warn("wrong event specified:",n);return}t.removeEventListener(Zs[n],a,!1)}function mc(t){Ei[t.pointerId]=t}function _c(t){Ei[t.pointerId]&&(Ei[t.pointerId]=t)}function pr(t){delete Ei[t.pointerId]}function gc(){ur||(document.addEventListener(ar,mc,!0),document.addEventListener(lr,_c,!0),document.addEventListener(cr,pr,!0),document.addEventListener(hr,pr,!0),ur=!0)}function In(t,n){if(n.pointerType!==(n.MSPOINTER_TYPE_MOUSE||"mouse")){n.touches=[];for(var a in Ei)n.touches.push(Ei[a]);n.changedTouches=[n],t(n)}}function yc(t,n){n.MSPOINTER_TYPE_TOUCH&&n.pointerType===n.MSPOINTER_TYPE_TOUCH&&Kt(n),In(t,n)}function vc(t){var n={},a,c;for(c in t)a=t[c],n[c]=a&&a.bind?a.bind(t):a;return t=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}var bc=200;function wc(t,n){t.addEventListener("dblclick",n);var a=0,c;function d(m){if(m.detail!==1){c=m.detail;return}if(!(m.pointerType==="mouse"||m.sourceCapabilities&&!m.sourceCapabilities.firesTouchEvents)){var x=yr(m);if(!(x.some(function(E){return E instanceof HTMLLabelElement&&E.attributes.for})&&!x.some(function(E){return E instanceof HTMLInputElement||E instanceof HTMLSelectElement}))){var S=Date.now();S-a<=bc?(c++,c===2&&n(vc(m))):c=1,a=S}}}return t.addEventListener("click",d),{dblclick:n,simDblclick:d}}function xc(t,n){t.removeEventListener("dblclick",n.dblclick),t.removeEventListener("click",n.simDblclick)}var qs=Dn(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Ji=Dn(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),fr=Ji==="webkitTransition"||Ji==="OTransition"?Ji+"End":"transitionend";function mr(t){return typeof t=="string"?document.getElementById(t):t}function Qi(t,n){var a=t.style[n]||t.currentStyle&&t.currentStyle[n];if((!a||a==="auto")&&document.defaultView){var c=document.defaultView.getComputedStyle(t,null);a=c?c[n]:null}return a==="auto"?null:a}function xt(t,n,a){var c=document.createElement(t);return c.className=n||"",a&&a.appendChild(c),c}function Rt(t){var n=t.parentNode;n&&n.removeChild(t)}function Nn(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Ti(t){var n=t.parentNode;n&&n.lastChild!==t&&n.appendChild(t)}function Pi(t){var n=t.parentNode;n&&n.firstChild!==t&&n.insertBefore(t,n.firstChild)}function Ws(t,n){if(t.classList!==void 0)return t.classList.contains(n);var a=Bn(t);return a.length>0&&new RegExp("(^|\\s)"+n+"(\\s|$)").test(a)}function pt(t,n){if(t.classList!==void 0)for(var a=v(n),c=0,d=a.length;c0?2*window.devicePixelRatio:1;function br(t){return et.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/Lc:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}function io(t,n){var a=n.relatedTarget;if(!a)return!0;try{for(;a&&a!==t;)a=a.parentNode}catch{return!1}return a!==t}var Sc={__proto__:null,on:ut,off:Et,stopPropagation:oi,disableScrollPropagation:eo,disableClickPropagation:sn,preventDefault:Kt,stop:ri,getPropagationPath:yr,getMousePosition:vr,getWheelDelta:br,isExternalTarget:io,addListener:ut,removeListener:Et},wr=Yt.extend({run:function(t,n,a,c){this.stop(),this._el=t,this._inProgress=!0,this._duration=a||.25,this._easeOutPower=1/Math.max(c||.5,.2),this._startPos=si(t),this._offset=n.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=nt(this._animate,this),this._step()},_step:function(t){var n=+new Date-this._startTime,a=this._duration*1e3;nthis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,n){this._enforcingBounds=!0;var a=this.getCenter(),c=this._limitCenter(a,this._zoom,At(t));return a.equals(c)||this.panTo(c,n),this._enforcingBounds=!1,this},panInside:function(t,n){n=n||{};var a=at(n.paddingTopLeft||n.padding||[0,0]),c=at(n.paddingBottomRight||n.padding||[0,0]),d=this.project(this.getCenter()),m=this.project(t),x=this.getPixelBounds(),S=Ot([x.min.add(a),x.max.subtract(c)]),E=S.getSize();if(!S.contains(m)){this._enforcingBounds=!0;var N=m.subtract(S.getCenter()),V=S.extend(m).getSize().subtract(E);d.x+=N.x<0?-V.x:V.x,d.y+=N.y<0?-V.y:V.y,this.panTo(this.unproject(d),n),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},t===!0?{animate:!0}:t);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var a=this.getSize(),c=n.divideBy(2).round(),d=a.divideBy(2).round(),m=c.subtract(d);return!m.x&&!m.y?this:(t.animate&&t.pan?this.panBy(m):(t.pan&&this._rawPanBy(m),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(r(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:a}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=r(this._handleGeolocationResponse,this),a=r(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,a,t):navigator.geolocation.getCurrentPosition(n,a,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var n=t.code,a=t.message||(n===1?"permission denied":n===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:n,message:"Geolocation error: "+a+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var n=t.coords.latitude,a=t.coords.longitude,c=new yt(n,a),d=c.toBounds(t.coords.accuracy*2),m=this._locateOptions;if(m.setView){var x=this.getBoundsZoom(d);this.setView(c,m.maxZoom?Math.min(x,m.maxZoom):x)}var S={latlng:c,bounds:d,timestamp:t.timestamp};for(var E in t.coords)typeof t.coords[E]=="number"&&(S[E]=t.coords[E]);this.fire("locationfound",S)}},addHandler:function(t,n){if(!n)return this;var a=this[t]=new n(this);return this._handlers.push(a),this.options[t]&&a.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Rt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(tt(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)Rt(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,n){var a="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),c=xt("div",a,n||this._mapPane);return t&&(this._panes[t]=c),c},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),n=this.unproject(t.getBottomLeft()),a=this.unproject(t.getTopRight());return new Wt(n,a)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,n,a){t=At(t),a=at(a||[0,0]);var c=this.getZoom()||0,d=this.getMinZoom(),m=this.getMaxZoom(),x=t.getNorthWest(),S=t.getSouthEast(),E=this.getSize().subtract(a),N=Ot(this.project(S,c),this.project(x,c)).getSize(),V=et.any3d?this.options.zoomSnap:1,ot=E.x/N.x,_t=E.y/N.y,ne=n?Math.max(ot,_t):Math.min(ot,_t);return c=this.getScaleZoom(ne,c),V&&(c=Math.round(c/(V/100))*(V/100),c=n?Math.ceil(c/V)*V:Math.floor(c/V)*V),Math.max(d,Math.min(m,c))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new rt(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,n){var a=this._getTopLeftPoint(t,n);return new kt(a,a.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,n){var a=this.options.crs;return n=n===void 0?this._zoom:n,a.scale(t)/a.scale(n)},getScaleZoom:function(t,n){var a=this.options.crs;n=n===void 0?this._zoom:n;var c=a.zoom(t*a.scale(n));return isNaN(c)?1/0:c},project:function(t,n){return n=n===void 0?this._zoom:n,this.options.crs.latLngToPoint(ft(t),n)},unproject:function(t,n){return n=n===void 0?this._zoom:n,this.options.crs.pointToLatLng(at(t),n)},layerPointToLatLng:function(t){var n=at(t).add(this.getPixelOrigin());return this.unproject(n)},latLngToLayerPoint:function(t){var n=this.project(ft(t))._round();return n._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(ft(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(At(t))},distance:function(t,n){return this.options.crs.distance(ft(t),ft(n))},containerPointToLayerPoint:function(t){return at(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return at(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var n=this.containerPointToLayerPoint(at(t));return this.layerPointToLatLng(n)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ft(t)))},mouseEventToContainerPoint:function(t){return vr(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var n=this._container=mr(t);if(n){if(n._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");ut(n,"scroll",this._onScroll,this),this._containerId=h(n)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&et.any3d,pt(t,"leaflet-container"+(et.touch?" leaflet-touch":"")+(et.retina?" leaflet-retina":"")+(et.ielt9?" leaflet-oldie":"")+(et.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var n=Qi(t,"position");n!=="absolute"&&n!=="relative"&&n!=="fixed"&&n!=="sticky"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Zt(this._mapPane,new rt(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(pt(t.markerPane,"leaflet-zoom-hide"),pt(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,n,a){Zt(this._mapPane,new rt(0,0));var c=!this._loaded;this._loaded=!0,n=this._limitZoom(n),this.fire("viewprereset");var d=this._zoom!==n;this._moveStart(d,a)._move(t,n)._moveEnd(d),this.fire("viewreset"),c&&this.fire("load")},_moveStart:function(t,n){return t&&this.fire("zoomstart"),n||this.fire("movestart"),this},_move:function(t,n,a,c){n===void 0&&(n=this._zoom);var d=this._zoom!==n;return this._zoom=n,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),c?a&&a.pinch&&this.fire("zoom",a):((d||a&&a.pinch)&&this.fire("zoom",a),this.fire("move",a)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return tt(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Zt(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[h(this._container)]=this;var n=t?Et:ut;n(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&n(window,"resize",this._onResize,this),et.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){tt(this._resizeRequest),this._resizeRequest=nt(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,n){for(var a=[],c,d=n==="mouseout"||n==="mouseover",m=t.target||t.srcElement,x=!1;m;){if(c=this._targets[h(m)],c&&(n==="click"||n==="preclick")&&this._draggableMoved(c)){x=!0;break}if(c&&c.listens(n,!0)&&(d&&!io(m,t)||(a.push(c),d))||m===this._container)break;m=m.parentNode}return!a.length&&!x&&!d&&this.listens(n,!0)&&(a=[this]),a},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var n=t.target||t.srcElement;if(!(!this._loaded||n._leaflet_disable_events||t.type==="click"&&this._isClickDisabled(n))){var a=t.type;a==="mousedown"&&js(n),this._fireDOMEvent(t,a)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,n,a){if(t.type==="click"){var c=i({},t);c.type="preclick",this._fireDOMEvent(c,c.type,a)}var d=this._findEventTargets(t,n);if(a){for(var m=[],x=0;x0?Math.round(t-n)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(n))},_limitZoom:function(t){var n=this.getMinZoom(),a=this.getMaxZoom(),c=et.any3d?this.options.zoomSnap:1;return c&&(t=Math.round(t/c)*c),Math.max(n,Math.min(a,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){$t(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,n){var a=this._getCenterOffset(t)._trunc();return(n&&n.animate)!==!0&&!this.getSize().contains(a)?!1:(this.panBy(a,n),!0)},_createAnimProxy:function(){var t=this._proxy=xt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(n){var a=qs,c=this._proxy.style[a];ni(this._proxy,this.project(n.center,n.zoom),this.getZoomScale(n.zoom,1)),c===this._proxy.style[a]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Rt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),n=this.getZoom();ni(this._proxy,this.project(t,n),this.getZoomScale(n,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,n,a){if(this._animatingZoom)return!0;if(a=a||{},!this._zoomAnimated||a.animate===!1||this._nothingToAnimate()||Math.abs(n-this._zoom)>this.options.zoomAnimationThreshold)return!1;var c=this.getZoomScale(n),d=this._getCenterOffset(t)._divideBy(1-1/c);return a.animate!==!0&&!this.getSize().contains(d)?!1:(nt(function(){this._moveStart(!0,a.noMoveStart||!1)._animateZoom(t,n,!0)},this),!0)},_animateZoom:function(t,n,a,c){this._mapPane&&(a&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=n,pt(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:n,noUpdate:c}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(r(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&$t(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Mc(t,n){return new bt(t,n)}var ve=Mt.extend({options:{position:"topright"},initialize:function(t){w(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var n=this._map;return n&&n.removeControl(this),this.options.position=t,n&&n.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var n=this._container=this.onAdd(t),a=this.getPosition(),c=t._controlCorners[a];return pt(n,"leaflet-control"),a.indexOf("bottom")!==-1?c.insertBefore(n,c.firstChild):c.appendChild(n),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Rt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),on=function(t){return new ve(t)};bt.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},n="leaflet-",a=this._controlContainer=xt("div",n+"control-container",this._container);function c(d,m){var x=n+d+" "+n+m;t[d+m]=xt("div",x,a)}c("top","left"),c("top","right"),c("bottom","left"),c("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)Rt(this._controlCorners[t]);Rt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var xr=ve.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,n,a,c){return a1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=n&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var n=this._getLayer(h(t.target)),a=n.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;a&&this._map.fire(a,n)},_createRadioElement:function(t,n){var a='",c=document.createElement("div");return c.innerHTML=a,c.firstChild},_addItem:function(t){var n=document.createElement("label"),a=this._map.hasLayer(t.layer),c;t.overlay?(c=document.createElement("input"),c.type="checkbox",c.className="leaflet-control-layers-selector",c.defaultChecked=a):c=this._createRadioElement("leaflet-base-layers_"+h(this),a),this._layerControlInputs.push(c),c.layerId=h(t.layer),ut(c,"click",this._onInputClick,this);var d=document.createElement("span");d.innerHTML=" "+t.name;var m=document.createElement("span");n.appendChild(m),m.appendChild(c),m.appendChild(d);var x=t.overlay?this._overlaysList:this._baseLayersList;return x.appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,n,a,c=[],d=[];this._handlingClick=!0;for(var m=t.length-1;m>=0;m--)n=t[m],a=this._getLayer(n.layerId).layer,n.checked?c.push(a):n.checked||d.push(a);for(m=0;m=0;d--)n=t[d],a=this._getLayer(n.layerId).layer,n.disabled=a.options.minZoom!==void 0&&ca.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,ut(t,"click",Kt),this.expand();var n=this;setTimeout(function(){Et(t,"click",Kt),n._preventClick=!1})}}),Ec=function(t,n,a){return new xr(t,n,a)},no=ve.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var n="leaflet-control-zoom",a=xt("div",n+" leaflet-bar"),c=this.options;return this._zoomInButton=this._createButton(c.zoomInText,c.zoomInTitle,n+"-in",a,this._zoomIn),this._zoomOutButton=this._createButton(c.zoomOutText,c.zoomOutTitle,n+"-out",a,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),a},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,n,a,c,d){var m=xt("a",a,c);return m.innerHTML=t,m.href="#",m.title=n,m.setAttribute("role","button"),m.setAttribute("aria-label",n),sn(m),ut(m,"click",ri),ut(m,"click",d,this),ut(m,"click",this._refocusOnMap,this),m},_updateDisabled:function(){var t=this._map,n="leaflet-disabled";$t(this._zoomInButton,n),$t(this._zoomOutButton,n),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(pt(this._zoomOutButton,n),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(pt(this._zoomInButton,n),this._zoomInButton.setAttribute("aria-disabled","true"))}});bt.mergeOptions({zoomControl:!0}),bt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new no,this.addControl(this.zoomControl))});var Tc=function(t){return new no(t)},Cr=ve.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var n="leaflet-control-scale",a=xt("div",n),c=this.options;return this._addScales(c,n+"-line",a),t.on(c.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),a},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,n,a){t.metric&&(this._mScale=xt("div",n,a)),t.imperial&&(this._iScale=xt("div",n,a))},_update:function(){var t=this._map,n=t.getSize().y/2,a=t.distance(t.containerPointToLatLng([0,n]),t.containerPointToLatLng([this.options.maxWidth,n]));this._updateScales(a)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var n=this._getRoundNum(t),a=n<1e3?n+" m":n/1e3+" km";this._updateScale(this._mScale,a,n/t)},_updateImperial:function(t){var n=t*3.2808399,a,c,d;n>5280?(a=n/5280,c=this._getRoundNum(a),this._updateScale(this._iScale,c+" mi",c/a)):(d=this._getRoundNum(n),this._updateScale(this._iScale,d+" ft",d/n))},_updateScale:function(t,n,a){t.style.width=Math.round(this.options.maxWidth*a)+"px",t.innerHTML=n},_getRoundNum:function(t){var n=Math.pow(10,(Math.floor(t)+"").length-1),a=t/n;return a=a>=10?10:a>=5?5:a>=3?3:a>=2?2:1,n*a}}),Pc=function(t){return new Cr(t)},Ac='',so=ve.extend({options:{position:"bottomright",prefix:''+(et.inlineSvg?Ac+" ":"")+"Leaflet"},initialize:function(t){w(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=xt("div","leaflet-control-attribution"),sn(this._container);for(var n in t._layers)t._layers[n].getAttribution&&this.addAttribution(t._layers[n].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var n in this._attributions)this._attributions[n]&&t.push(n);var a=[];this.options.prefix&&a.push(this.options.prefix),t.length&&a.push(t.join(", ")),this._container.innerHTML=a.join(' ')}}});bt.mergeOptions({attributionControl:!0}),bt.addInitHook(function(){this.options.attributionControl&&new so().addTo(this)});var Ic=function(t){return new so(t)};ve.Layers=xr,ve.Zoom=no,ve.Scale=Cr,ve.Attribution=so,on.layers=Ec,on.zoom=Tc,on.scale=Pc,on.attribution=Ic;var Te=Mt.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Te.addTo=function(t,n){return t.addHandler(n,this),this};var Nc={Events:Nt},kr=et.touch?"touchstart mousedown":"mousedown",Ve=Yt.extend({options:{clickTolerance:3},initialize:function(t,n,a,c){w(this,c),this._element=t,this._dragStartTarget=n||t,this._preventOutline=a},enable:function(){this._enabled||(ut(this._dragStartTarget,kr,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Ve._dragging===this&&this.finishDrag(!0),Et(this._dragStartTarget,kr,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!Ws(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){Ve._dragging===this&&this.finishDrag();return}if(!(Ve._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(Ve._dragging=this,this._preventOutline&&js(this._element),Vs(),tn(),!this._moving)){this.fire("down");var n=t.touches?t.touches[0]:t,a=_r(this._element);this._startPoint=new rt(n.clientX,n.clientY),this._startPos=si(this._element),this._parentScale=Ks(a);var c=t.type==="mousedown";ut(document,c?"mousemove":"touchmove",this._onMove,this),ut(document,c?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var n=t.touches&&t.touches.length===1?t.touches[0]:t,a=new rt(n.clientX,n.clientY)._subtract(this._startPoint);!a.x&&!a.y||Math.abs(a.x)+Math.abs(a.y)m&&(x=S,m=E);m>a&&(n[x]=1,ro(t,n,a,c,x),ro(t,n,a,x,d))}function Oc(t,n){for(var a=[t[0]],c=1,d=0,m=t.length;cn&&(a.push(t[c]),d=c);return dn.max.x&&(a|=2),t.yn.max.y&&(a|=8),a}function zc(t,n){var a=n.x-t.x,c=n.y-t.y;return a*a+c*c}function rn(t,n,a,c){var d=n.x,m=n.y,x=a.x-d,S=a.y-m,E=x*x+S*S,N;return E>0&&(N=((t.x-d)*x+(t.y-m)*S)/E,N>1?(d=a.x,m=a.y):N>0&&(d+=x*N,m+=S*N)),x=t.x-d,S=t.y-m,c?x*x+S*S:new rt(d,m)}function _e(t){return!P(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]<"u"}function Ar(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),_e(t)}function Ir(t,n){var a,c,d,m,x,S,E,N;if(!t||t.length===0)throw new Error("latlngs not passed");_e(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var V=ft([0,0]),ot=At(t),_t=ot.getNorthWest().distanceTo(ot.getSouthWest())*ot.getNorthEast().distanceTo(ot.getNorthWest());_t<1700&&(V=oo(t));var ne=t.length,Ut=[];for(a=0;ac){E=(m-c)/d,N=[S.x-E*(S.x-x.x),S.y-E*(S.y-x.y)];break}var re=n.unproject(at(N));return ft([re.lat+V.lat,re.lng+V.lng])}var Hc={__proto__:null,simplify:Mr,pointToSegmentDistance:Er,closestPointOnSegment:Dc,clipSegment:Pr,_getEdgeIntersection:zn,_getBitCode:ai,_sqClosestPointOnSegment:rn,isFlat:_e,_flat:Ar,polylineCenter:Ir},ao={project:function(t){return new rt(t.lng,t.lat)},unproject:function(t){return new yt(t.y,t.x)},bounds:new kt([-180,-90],[180,90])},lo={R:6378137,R_MINOR:6356752314245179e-9,bounds:new kt([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var n=Math.PI/180,a=this.R,c=t.lat*n,d=this.R_MINOR/a,m=Math.sqrt(1-d*d),x=m*Math.sin(c),S=Math.tan(Math.PI/4-c/2)/Math.pow((1-x)/(1+x),m/2);return c=-a*Math.log(Math.max(S,1e-10)),new rt(t.lng*n*a,c)},unproject:function(t){for(var n=180/Math.PI,a=this.R,c=this.R_MINOR/a,d=Math.sqrt(1-c*c),m=Math.exp(-t.y/a),x=Math.PI/2-2*Math.atan(m),S=0,E=.1,N;S<15&&Math.abs(E)>1e-7;S++)N=d*Math.sin(x),N=Math.pow((1-N)/(1+N),d/2),E=Math.PI/2-2*Math.atan(m*N)-x,x+=E;return new yt(x*n,t.x*n/a)}},$c={__proto__:null,LonLat:ao,Mercator:lo,SphericalMercator:ee},Fc=i({},ie,{code:"EPSG:3395",projection:lo,transformation:function(){var t=.5/(Math.PI*lo.R);return k(t,.5,-t,.5)}()}),Nr=i({},ie,{code:"EPSG:4326",projection:ao,transformation:k(1/180,1,-1/180,.5)}),Zc=i({},le,{projection:ao,transformation:k(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,n){var a=n.lng-t.lng,c=n.lat-t.lat;return Math.sqrt(a*a+c*c)},infinite:!0});le.Earth=ie,le.EPSG3395=Fc,le.EPSG3857=$,le.EPSG900913=D,le.EPSG4326=Nr,le.Simple=Zc;var be=Yt.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[h(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[h(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var n=t.target;if(n.hasLayer(this)){if(this._map=n,this._zoomAnimated=n._zoomAnimated,this.getEvents){var a=this.getEvents();n.on(a,this),this.once("remove",function(){n.off(a,this)},this)}this.onAdd(n),this.fire("add"),n.fire("layeradd",{layer:this})}}});bt.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var n=h(t);return this._layers[n]?this:(this._layers[n]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var n=h(t);return this._layers[n]?(this._loaded&&t.onRemove(this),delete this._layers[n],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return h(t)in this._layers},eachLayer:function(t,n){for(var a in this._layers)t.call(n,this._layers[a]);return this},_addLayers:function(t){t=t?P(t)?t:[t]:[];for(var n=0,a=t.length;nthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&n[0]instanceof yt&&n[0].equals(n[a-1])&&n.pop(),n},_setLatLngs:function(t){Re.prototype._setLatLngs.call(this,t),_e(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return _e(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,n=this.options.weight,a=new rt(n,n);if(t=new kt(t.min.subtract(a),t.max.add(a)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(var c=0,d=this._rings.length,m;ct.y!=d.y>t.y&&t.x<(d.x-c.x)*(t.y-c.y)/(d.y-c.y)+c.x&&(n=!n);return n||Re.prototype._containsPoint.call(this,t,!0)}});function jc(t,n){return new Ni(t,n)}var Oe=De.extend({initialize:function(t,n){w(this,n),this._layers={},t&&this.addData(t)},addData:function(t){var n=P(t)?t:t.features,a,c,d;if(n){for(a=0,c=n.length;a0&&d.push(d[0].slice()),d}function Bi(t,n){return t.feature?i({},t.feature,{geometry:n}):Wn(n)}function Wn(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var po={toGeoJSON:function(t){return Bi(this,{type:"Point",coordinates:uo(this.getLatLng(),t)})}};Hn.include(po),co.include(po),$n.include(po),Re.include({toGeoJSON:function(t){var n=!_e(this._latlngs),a=qn(this._latlngs,n?1:0,!1,t);return Bi(this,{type:(n?"Multi":"")+"LineString",coordinates:a})}}),Ni.include({toGeoJSON:function(t){var n=!_e(this._latlngs),a=n&&!_e(this._latlngs[0]),c=qn(this._latlngs,a?2:n?1:0,!0,t);return n||(c=[c]),Bi(this,{type:(a?"Multi":"")+"Polygon",coordinates:c})}}),Ai.include({toMultiPoint:function(t){var n=[];return this.eachLayer(function(a){n.push(a.toGeoJSON(t).geometry.coordinates)}),Bi(this,{type:"MultiPoint",coordinates:n})},toGeoJSON:function(t){var n=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(n==="MultiPoint")return this.toMultiPoint(t);var a=n==="GeometryCollection",c=[];return this.eachLayer(function(d){if(d.toGeoJSON){var m=d.toGeoJSON(t);if(a)c.push(m.geometry);else{var x=Wn(m);x.type==="FeatureCollection"?c.push.apply(c,x.features):c.push(x)}}}),a?Bi(this,{geometries:c,type:"GeometryCollection"}):{type:"FeatureCollection",features:c}}});function Rr(t,n){return new Oe(t,n)}var Kc=Rr,Un=be.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,n,a){this._url=t,this._bounds=At(n),w(this,a)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(pt(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Rt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&Ti(this._image),this},bringToBack:function(){return this._map&&Pi(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=At(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._url.tagName==="IMG",n=this._image=t?this._url:xt("img");if(pt(n,"leaflet-image-layer"),this._zoomAnimated&&pt(n,"leaflet-zoom-animated"),this.options.className&&pt(n,this.options.className),n.onselectstart=_,n.onmousemove=_,n.onload=r(this.fire,this,"load"),n.onerror=r(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(n.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t){this._url=n.src;return}n.src=this._url,n.alt=this.options.alt},_animateZoom:function(t){var n=this._map.getZoomScale(t.zoom),a=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;ni(this._image,a,n)},_reset:function(){var t=this._image,n=new kt(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),a=n.getSize();Zt(t,n.min),t.style.width=a.x+"px",t.style.height=a.y+"px"},_updateOpacity:function(){me(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Jc=function(t,n,a){return new Un(t,n,a)},Or=Un.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t=this._url.tagName==="VIDEO",n=this._image=t?this._url:xt("video");if(pt(n,"leaflet-image-layer"),this._zoomAnimated&&pt(n,"leaflet-zoom-animated"),this.options.className&&pt(n,this.options.className),n.onselectstart=_,n.onmousemove=_,n.onloadeddata=r(this.fire,this,"load"),t){for(var a=n.getElementsByTagName("source"),c=[],d=0;d0?c:[n.src];return}P(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(n.style,"objectFit")&&(n.style.objectFit="fill"),n.autoplay=!!this.options.autoplay,n.loop=!!this.options.loop,n.muted=!!this.options.muted,n.playsInline=!!this.options.playsInline;for(var m=0;md?(n.height=d+"px",pt(t,m)):$t(t,m),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var n=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),a=this._getAnchor();Zt(this._container,n.add(a))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,n=parseInt(Qi(this._container,"marginBottom"),10)||0,a=this._container.offsetHeight+n,c=this._containerWidth,d=new rt(this._containerLeft,-a-this._containerBottom);d._add(si(this._container));var m=t.layerPointToContainerPoint(d),x=at(this.options.autoPanPadding),S=at(this.options.autoPanPaddingTopLeft||x),E=at(this.options.autoPanPaddingBottomRight||x),N=t.getSize(),V=0,ot=0;m.x+c+E.x>N.x&&(V=m.x+c-N.x+E.x),m.x-V-S.x<0&&(V=m.x-S.x),m.y+a+E.y>N.y&&(ot=m.y+a-N.y+E.y),m.y-ot-S.y<0&&(ot=m.y-S.y),(V||ot)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([V,ot]))}},_getAnchor:function(){return at(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),eh=function(t,n){return new Gn(t,n)};bt.mergeOptions({closePopupOnClick:!0}),bt.include({openPopup:function(t,n,a){return this._initOverlay(Gn,t,n,a).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),be.include({bindPopup:function(t,n){return this._popup=this._initOverlay(Gn,this._popup,t,n),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof De||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(!(!this._popup||!this._map)){ri(t);var n=t.layer||t.target;if(this._popup._source===n&&!(n instanceof Ye)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng);return}this._popup._source=n,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){t.originalEvent.keyCode===13&&this._openPopup(t)}});var Vn=Pe.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Pe.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Pe.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Pe.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip",n=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=xt("div",n),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+h(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var n,a,c=this._map,d=this._container,m=c.latLngToContainerPoint(c.getCenter()),x=c.layerPointToContainerPoint(t),S=this.options.direction,E=d.offsetWidth,N=d.offsetHeight,V=at(this.options.offset),ot=this._getAnchor();S==="top"?(n=E/2,a=N):S==="bottom"?(n=E/2,a=0):S==="center"?(n=E/2,a=N/2):S==="right"?(n=0,a=N/2):S==="left"?(n=E,a=N/2):x.xthis.options.maxZoom||ac?this._retainParent(d,m,x,c):!1)},_retainChildren:function(t,n,a,c){for(var d=2*t;d<2*t+2;d++)for(var m=2*n;m<2*n+2;m++){var x=new rt(d,m);x.z=a+1;var S=this._tileCoordsToKey(x),E=this._tiles[S];if(E&&E.active){E.retain=!0;continue}else E&&E.loaded&&(E.retain=!0);a+1this.options.maxZoom||this.options.minZoom!==void 0&&d1){this._setView(t,a);return}for(var ot=d.min.y;ot<=d.max.y;ot++)for(var _t=d.min.x;_t<=d.max.x;_t++){var ne=new rt(_t,ot);if(ne.z=this._tileZoom,!!this._isValidTile(ne)){var Ut=this._tiles[this._tileCoordsToKey(ne)];Ut?Ut.current=!0:x.push(ne)}}if(x.sort(function(re,Ri){return re.distanceTo(m)-Ri.distanceTo(m)}),x.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var ge=document.createDocumentFragment();for(_t=0;_ta.max.x)||!n.wrapLat&&(t.ya.max.y))return!1}if(!this.options.bounds)return!0;var c=this._tileCoordsToBounds(t);return At(this.options.bounds).overlaps(c)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var n=this._map,a=this.getTileSize(),c=t.scaleBy(a),d=c.add(a),m=n.unproject(c,t.z),x=n.unproject(d,t.z);return[m,x]},_tileCoordsToBounds:function(t){var n=this._tileCoordsToNwSe(t),a=new Wt(n[0],n[1]);return this.options.noWrap||(a=this._map.wrapLatLngBounds(a)),a},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var n=t.split(":"),a=new rt(+n[0],+n[1]);return a.z=+n[2],a},_removeTile:function(t){var n=this._tiles[t];n&&(Rt(n.el),delete this._tiles[t],this.fire("tileunload",{tile:n.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){pt(t,"leaflet-tile");var n=this.getTileSize();t.style.width=n.x+"px",t.style.height=n.y+"px",t.onselectstart=_,t.onmousemove=_,et.ielt9&&this.options.opacity<1&&me(t,this.options.opacity)},_addTile:function(t,n){var a=this._getTilePos(t),c=this._tileCoordsToKey(t),d=this.createTile(this._wrapCoords(t),r(this._tileReady,this,t));this._initTile(d),this.createTile.length<2&&nt(r(this._tileReady,this,t,null,d)),Zt(d,a),this._tiles[c]={el:d,coords:t,current:!0},n.appendChild(d),this.fire("tileloadstart",{tile:d,coords:t})},_tileReady:function(t,n,a){n&&this.fire("tileerror",{error:n,tile:a,coords:t});var c=this._tileCoordsToKey(t);a=this._tiles[c],a&&(a.loaded=+new Date,this._map._fadeAnimated?(me(a.el,0),tt(this._fadeFrame),this._fadeFrame=nt(this._updateOpacity,this)):(a.active=!0,this._pruneTiles()),n||(pt(a.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:a.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),et.ielt9||!this._map._fadeAnimated?nt(this._pruneTiles,this):setTimeout(r(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var n=new rt(this._wrapX?f(t.x,this._wrapX):t.x,this._wrapY?f(t.y,this._wrapY):t.y);return n.z=t.z,n},_pxBoundsToTileRange:function(t){var n=this.getTileSize();return new kt(t.min.unscaleBy(n).floor(),t.max.unscaleBy(n).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function sh(t){return new ln(t)}var Di=ln.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,n){this._url=t,n=w(this,n),n.detectRetina&&et.retina&&n.maxZoom>0?(n.tileSize=Math.floor(n.tileSize/2),n.zoomReverse?(n.zoomOffset--,n.minZoom=Math.min(n.maxZoom,n.minZoom+1)):(n.zoomOffset++,n.maxZoom=Math.max(n.minZoom,n.maxZoom-1)),n.minZoom=Math.max(0,n.minZoom)):n.zoomReverse?n.minZoom=Math.min(n.maxZoom,n.minZoom):n.maxZoom=Math.max(n.minZoom,n.maxZoom),typeof n.subdomains=="string"&&(n.subdomains=n.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,n){return this._url===t&&n===void 0&&(n=!0),this._url=t,n||this.redraw(),this},createTile:function(t,n){var a=document.createElement("img");return ut(a,"load",r(this._tileOnLoad,this,n,a)),ut(a,"error",r(this._tileOnError,this,n,a)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(a.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(a.referrerPolicy=this.options.referrerPolicy),a.alt="",a.src=this.getTileUrl(t),a},getTileUrl:function(t){var n={r:et.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var a=this._globalTileRange.max.y-t.y;this.options.tms&&(n.y=a),n["-y"]=a}return B(this._url,i(n,this.options))},_tileOnLoad:function(t,n){et.ielt9?setTimeout(r(t,this,null,n),0):t(null,n)},_tileOnError:function(t,n,a){var c=this.options.errorTileUrl;c&&n.getAttribute("src")!==c&&(n.src=c),t(a,n)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,n=this.options.maxZoom,a=this.options.zoomReverse,c=this.options.zoomOffset;return a&&(t=n-t),t+c},_getSubdomain:function(t){var n=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[n]},_abortLoading:function(){var t,n;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&(n=this._tiles[t].el,n.onload=_,n.onerror=_,!n.complete)){n.src=Z;var a=this._tiles[t].coords;Rt(n),delete this._tiles[t],this.fire("tileabort",{tile:n,coords:a})}},_removeTile:function(t){var n=this._tiles[t];if(n)return n.el.setAttribute("src",Z),ln.prototype._removeTile.call(this,t)},_tileReady:function(t,n,a){if(!(!this._map||a&&a.getAttribute("src")===Z))return ln.prototype._tileReady.call(this,t,n,a)}});function $r(t,n){return new Di(t,n)}var Fr=Di.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,n){this._url=t;var a=i({},this.defaultWmsParams);for(var c in n)c in this.options||(a[c]=n[c]);n=w(this,n);var d=n.detectRetina&&et.retina?2:1,m=this.getTileSize();a.width=m.x*d,a.height=m.y*d,this.wmsParams=a},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var n=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[n]=this._crs.code,Di.prototype.onAdd.call(this,t)},getTileUrl:function(t){var n=this._tileCoordsToNwSe(t),a=this._crs,c=Ot(a.project(n[0]),a.project(n[1])),d=c.min,m=c.max,x=(this._wmsVersion>=1.3&&this._crs===Nr?[d.y,d.x,m.y,m.x]:[d.x,d.y,m.x,m.y]).join(","),S=Di.prototype.getTileUrl.call(this,t);return S+b(this.wmsParams,S,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+x},setParams:function(t,n){return i(this.wmsParams,t),n||this.redraw(),this}});function oh(t,n){return new Fr(t,n)}Di.WMS=Fr,$r.wms=oh;var ze=be.extend({options:{padding:.1},initialize:function(t){w(this,t),h(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),pt(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,n){var a=this._map.getZoomScale(n,this._zoom),c=this._map.getSize().multiplyBy(.5+this.options.padding),d=this._map.project(this._center,n),m=c.multiplyBy(-a).add(d).subtract(this._map._getNewPixelOrigin(t,n));et.any3d?ni(this._container,m,a):Zt(this._container,m)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,n=this._map.getSize(),a=this._map.containerPointToLayerPoint(n.multiplyBy(-t)).round();this._bounds=new kt(a,a.add(n.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Zr=ze.extend({options:{tolerance:0},getEvents:function(){var t=ze.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ze.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");ut(t,"mousemove",this._onMouseMove,this),ut(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ut(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){tt(this._redrawRequest),delete this._ctx,Rt(this._container),Et(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var n in this._layers)t=this._layers[n],t._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ze.prototype._update.call(this);var t=this._bounds,n=this._container,a=t.getSize(),c=et.retina?2:1;Zt(n,t.min),n.width=c*a.x,n.height=c*a.y,n.style.width=a.x+"px",n.style.height=a.y+"px",et.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){ze.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[h(t)]=t;var n=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=n),this._drawLast=n,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var n=t._order,a=n.next,c=n.prev;a?a.prev=c:this._drawLast=c,c?c.next=a:this._drawFirst=a,delete t._order,delete this._layers[h(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray=="string"){var n=t.options.dashArray.split(/[, ]+/),a=[],c,d;for(d=0;d')}}catch{}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),rh={_initContainer:function(){this._container=xt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ze.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var n=t._container=cn("shape");pt(n,"leaflet-vml-shape "+(this.options.className||"")),n.coordsize="1 1",t._path=cn("path"),n.appendChild(t._path),this._updateStyle(t),this._layers[h(t)]=t},_addPath:function(t){var n=t._container;this._container.appendChild(n),t.options.interactive&&t.addInteractiveTarget(n)},_removePath:function(t){var n=t._container;Rt(n),t.removeInteractiveTarget(n),delete this._layers[h(t)]},_updateStyle:function(t){var n=t._stroke,a=t._fill,c=t.options,d=t._container;d.stroked=!!c.stroke,d.filled=!!c.fill,c.stroke?(n||(n=t._stroke=cn("stroke")),d.appendChild(n),n.weight=c.weight+"px",n.color=c.color,n.opacity=c.opacity,c.dashArray?n.dashStyle=P(c.dashArray)?c.dashArray.join(" "):c.dashArray.replace(/( *, *)/g," "):n.dashStyle="",n.endcap=c.lineCap.replace("butt","flat"),n.joinstyle=c.lineJoin):n&&(d.removeChild(n),t._stroke=null),c.fill?(a||(a=t._fill=cn("fill")),d.appendChild(a),a.color=c.fillColor||c.color,a.opacity=c.fillOpacity):a&&(d.removeChild(a),t._fill=null)},_updateCircle:function(t){var n=t._point.round(),a=Math.round(t._radius),c=Math.round(t._radiusY||a);this._setPath(t,t._empty()?"M0 0":"AL "+n.x+","+n.y+" "+a+","+c+" 0,"+65535*360)},_setPath:function(t,n){t._path.v=n},_bringToFront:function(t){Ti(t._container)},_bringToBack:function(t){Pi(t._container)}},Yn=et.vml?cn:Y,hn=ze.extend({_initContainer:function(){this._container=Yn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Yn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Rt(this._container),Et(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ze.prototype._update.call(this);var t=this._bounds,n=t.getSize(),a=this._container;(!this._svgSize||!this._svgSize.equals(n))&&(this._svgSize=n,a.setAttribute("width",n.x),a.setAttribute("height",n.y)),Zt(a,t.min),a.setAttribute("viewBox",[t.min.x,t.min.y,n.x,n.y].join(" ")),this.fire("update")}},_initPath:function(t){var n=t._path=Yn("path");t.options.className&&pt(n,t.options.className),t.options.interactive&&pt(n,"leaflet-interactive"),this._updateStyle(t),this._layers[h(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){Rt(t._path),t.removeInteractiveTarget(t._path),delete this._layers[h(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var n=t._path,a=t.options;n&&(a.stroke?(n.setAttribute("stroke",a.color),n.setAttribute("stroke-opacity",a.opacity),n.setAttribute("stroke-width",a.weight),n.setAttribute("stroke-linecap",a.lineCap),n.setAttribute("stroke-linejoin",a.lineJoin),a.dashArray?n.setAttribute("stroke-dasharray",a.dashArray):n.removeAttribute("stroke-dasharray"),a.dashOffset?n.setAttribute("stroke-dashoffset",a.dashOffset):n.removeAttribute("stroke-dashoffset")):n.setAttribute("stroke","none"),a.fill?(n.setAttribute("fill",a.fillColor||a.color),n.setAttribute("fill-opacity",a.fillOpacity),n.setAttribute("fill-rule",a.fillRule||"evenodd")):n.setAttribute("fill","none"))},_updatePoly:function(t,n){this._setPath(t,A(t._parts,n))},_updateCircle:function(t){var n=t._point,a=Math.max(Math.round(t._radius),1),c=Math.max(Math.round(t._radiusY),1)||a,d="a"+a+","+c+" 0 1,0 ",m=t._empty()?"M0 0":"M"+(n.x-a)+","+n.y+d+a*2+",0 "+d+-a*2+",0 ";this._setPath(t,m)},_setPath:function(t,n){t._path.setAttribute("d",n)},_bringToFront:function(t){Ti(t._path)},_bringToBack:function(t){Pi(t._path)}});et.vml&&hn.include(rh);function Wr(t){return et.svg||et.vml?new hn(t):null}bt.include({getRenderer:function(t){var n=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return n||(n=this._renderer=this._createRenderer()),this.hasLayer(n)||this.addLayer(n),n},_getPaneRenderer:function(t){if(t==="overlayPane"||t===void 0)return!1;var n=this._paneRenderers[t];return n===void 0&&(n=this._createRenderer({pane:t}),this._paneRenderers[t]=n),n},_createRenderer:function(t){return this.options.preferCanvas&&qr(t)||Wr(t)}});var Ur=Ni.extend({initialize:function(t,n){Ni.prototype.initialize.call(this,this._boundsToLatLngs(t),n)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=At(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function ah(t,n){return new Ur(t,n)}hn.create=Yn,hn.pointsToPath=A,Oe.geometryToLayer=Fn,Oe.coordsToLatLng=ho,Oe.coordsToLatLngs=Zn,Oe.latLngToCoords=uo,Oe.latLngsToCoords=qn,Oe.getFeature=Bi,Oe.asFeature=Wn,bt.mergeOptions({boxZoom:!0});var Gr=Te.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){ut(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Et(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Rt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),tn(),Vs(),this._startPoint=this._map.mouseEventToContainerPoint(t),ut(document,{contextmenu:ri,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=xt("div","leaflet-zoom-box",this._container),pt(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var n=new kt(this._point,this._startPoint),a=n.getSize();Zt(this._box,n.min),this._box.style.width=a.x+"px",this._box.style.height=a.y+"px"},_finish:function(){this._moved&&(Rt(this._box),$t(this._container,"leaflet-crosshair")),en(),Ys(),Et(document,{contextmenu:ri,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if(!(t.which!==1&&t.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(r(this._resetState,this),0);var n=new Wt(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(n).fire("boxzoomend",{boxZoomBounds:n})}},_onKeyDown:function(t){t.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});bt.addInitHook("addHandler","boxZoom",Gr),bt.mergeOptions({doubleClickZoom:!0});var Vr=Te.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var n=this._map,a=n.getZoom(),c=n.options.zoomDelta,d=t.originalEvent.shiftKey?a-c:a+c;n.options.doubleClickZoom==="center"?n.setZoom(d):n.setZoomAround(t.containerPoint,d)}});bt.addInitHook("addHandler","doubleClickZoom",Vr),bt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Yr=Te.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Ve(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}pt(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){$t(this._map._container,"leaflet-grab"),$t(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var n=At(this._map.options.maxBounds);this._offsetLimit=Ot(this._map.latLngToContainerPoint(n.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(n.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var n=this._lastTime=+new Date,a=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(a),this._times.push(n),this._prunePositions(n)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),n=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=n.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,n){return t-(t-n)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var t=this._draggable._newPos.subtract(this._draggable._startPos),n=this._offsetLimit;t.xn.max.x&&(t.x=this._viscousLimit(t.x,n.max.x)),t.y>n.max.y&&(t.y=this._viscousLimit(t.y,n.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,n=Math.round(t/2),a=this._initialWorldOffset,c=this._draggable._newPos.x,d=(c-n+a)%t+n-a,m=(c+n+a)%t-n-a,x=Math.abs(d+a)0?m:-m))-n;this._delta=0,this._startTime=null,x&&(t.options.scrollWheelZoom==="center"?t.setZoom(n+x):t.setZoomAround(this._lastMousePos,n+x))}});bt.addInitHook("addHandler","scrollWheelZoom",jr);var lh=600;bt.mergeOptions({tapHold:et.touchNative&&et.safari&&et.mobile,tapTolerance:15});var Kr=Te.extend({addHooks:function(){ut(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Et(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),t.touches.length===1){var n=t.touches[0];this._startPos=this._newPos=new rt(n.clientX,n.clientY),this._holdTimeout=setTimeout(r(function(){this._cancel(),this._isTapValid()&&(ut(document,"touchend",Kt),ut(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",n))},this),lh),ut(document,"touchend touchcancel contextmenu",this._cancel,this),ut(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Et(document,"touchend",Kt),Et(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Et(document,"touchend touchcancel contextmenu",this._cancel,this),Et(document,"touchmove",this._onMove,this)},_onMove:function(t){var n=t.touches[0];this._newPos=new rt(n.clientX,n.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,n){var a=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY});a._simulated=!0,n.target.dispatchEvent(a)}});bt.addInitHook("addHandler","tapHold",Kr),bt.mergeOptions({touchZoom:et.touch,bounceAtZoomLimits:!0});var Jr=Te.extend({addHooks:function(){pt(this._map._container,"leaflet-touch-zoom"),ut(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){$t(this._map._container,"leaflet-touch-zoom"),Et(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var n=this._map;if(!(!t.touches||t.touches.length!==2||n._animatingZoom||this._zooming)){var a=n.mouseEventToContainerPoint(t.touches[0]),c=n.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=n.getSize()._divideBy(2),this._startLatLng=n.containerPointToLatLng(this._centerPoint),n.options.touchZoom!=="center"&&(this._pinchStartLatLng=n.containerPointToLatLng(a.add(c)._divideBy(2))),this._startDist=a.distanceTo(c),this._startZoom=n.getZoom(),this._moved=!1,this._zooming=!0,n._stop(),ut(document,"touchmove",this._onTouchMove,this),ut(document,"touchend touchcancel",this._onTouchEnd,this),Kt(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var n=this._map,a=n.mouseEventToContainerPoint(t.touches[0]),c=n.mouseEventToContainerPoint(t.touches[1]),d=a.distanceTo(c)/this._startDist;if(this._zoom=n.getScaleZoom(d,this._startZoom),!n.options.bounceAtZoomLimits&&(this._zoomn.getMaxZoom()&&d>1)&&(this._zoom=n._limitZoom(this._zoom)),n.options.touchZoom==="center"){if(this._center=this._startLatLng,d===1)return}else{var m=a._add(c)._divideBy(2)._subtract(this._centerPoint);if(d===1&&m.x===0&&m.y===0)return;this._center=n.unproject(n.project(this._pinchStartLatLng,this._zoom).subtract(m),this._zoom)}this._moved||(n._moveStart(!0,!1),this._moved=!0),tt(this._animRequest);var x=r(n._move,n,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=nt(x,this,!0),Kt(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,tt(this._animRequest),Et(document,"touchmove",this._onTouchMove,this),Et(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});bt.addInitHook("addHandler","touchZoom",Jr),bt.BoxZoom=Gr,bt.DoubleClickZoom=Vr,bt.Drag=Yr,bt.Keyboard=Xr,bt.ScrollWheelZoom=jr,bt.TapHold=Kr,bt.TouchZoom=Jr,s.Bounds=kt,s.Browser=et,s.CRS=le,s.Canvas=Zr,s.Circle=co,s.CircleMarker=$n,s.Class=Mt,s.Control=ve,s.DivIcon=Hr,s.DivOverlay=Pe,s.DomEvent=Sc,s.DomUtil=kc,s.Draggable=Ve,s.Evented=Yt,s.FeatureGroup=De,s.GeoJSON=Oe,s.GridLayer=ln,s.Handler=Te,s.Icon=Ii,s.ImageOverlay=Un,s.LatLng=yt,s.LatLngBounds=Wt,s.Layer=be,s.LayerGroup=Ai,s.LineUtil=Hc,s.Map=bt,s.Marker=Hn,s.Mixin=Nc,s.Path=Ye,s.Point=rt,s.PolyUtil=Bc,s.Polygon=Ni,s.Polyline=Re,s.Popup=Gn,s.PosAnimation=wr,s.Projection=$c,s.Rectangle=Ur,s.Renderer=ze,s.SVG=hn,s.SVGOverlay=zr,s.TileLayer=Di,s.Tooltip=Vn,s.Transformation=fe,s.Util=Ct,s.VideoOverlay=Or,s.bind=r,s.bounds=Ot,s.canvas=qr,s.circle=Yc,s.circleMarker=Vc,s.control=on,s.divIcon=nh,s.extend=i,s.featureGroup=Wc,s.geoJSON=Rr,s.geoJson=Kc,s.gridLayer=sh,s.icon=Uc,s.imageOverlay=Jc,s.latLng=ft,s.latLngBounds=At,s.layerGroup=qc,s.map=Mc,s.marker=Gc,s.point=at,s.polygon=jc,s.polyline=Xc,s.popup=eh,s.rectangle=ah,s.setOptions=w,s.stamp=h,s.svg=Wr,s.svgOverlay=th,s.tileLayer=$r,s.tooltip=ih,s.transformation=k,s.version=e,s.videoOverlay=Qc;var ch=window.L;s.noConflict=function(){return window.L=ch,this},window.L=s})});var ip=Lh(sa());var Kn=globalThis,Jn=Kn.ShadowRoot&&(Kn.ShadyCSS===void 0||Kn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,mo=Symbol(),oa=new WeakMap,dn=class{constructor(e,i,o){if(this._$cssResult$=!0,o!==mo)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=i}get styleSheet(){let e=this.o,i=this.t;if(Jn&&e===void 0){let o=i!==void 0&&i.length===1;o&&(e=oa.get(i)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&oa.set(i,e))}return e}toString(){return this.cssText}},ra=s=>new dn(typeof s=="string"?s:s+"",void 0,mo),un=(s,...e)=>{let i=s.length===1?s[0]:e.reduce((o,r,l)=>o+(h=>{if(h._$cssResult$===!0)return h.cssText;if(typeof h=="number")return h;throw Error("Value passed to 'css' function must be a 'css' function result: "+h+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+s[l+1],s[0]);return new dn(i,s,mo)},aa=(s,e)=>{if(Jn)s.adoptedStyleSheets=e.map(i=>i instanceof CSSStyleSheet?i:i.styleSheet);else for(let i of e){let o=document.createElement("style"),r=Kn.litNonce;r!==void 0&&o.setAttribute("nonce",r),o.textContent=i.cssText,s.appendChild(o)}},_o=Jn?s=>s:s=>s instanceof CSSStyleSheet?(e=>{let i="";for(let o of e.cssRules)i+=o.cssText;return ra(i)})(s):s;var{is:Sh,defineProperty:Mh,getOwnPropertyDescriptor:Eh,getOwnPropertyNames:Th,getOwnPropertySymbols:Ph,getPrototypeOf:Ah}=Object,Qn=globalThis,la=Qn.trustedTypes,Ih=la?la.emptyScript:"",Nh=Qn.reactiveElementPolyfillSupport,pn=(s,e)=>s,go={toAttribute(s,e){switch(e){case Boolean:s=s?Ih:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,e){let i=s;switch(e){case Boolean:i=s!==null;break;case Number:i=s===null?null:Number(s);break;case Object:case Array:try{i=JSON.parse(s)}catch{i=null}}return i}},ha=(s,e)=>!Sh(s,e),ca={attribute:!0,type:String,converter:go,reflect:!1,useDefault:!1,hasChanged:ha};Symbol.metadata??=Symbol("metadata"),Qn.litPropertyMetadata??=new WeakMap;var He=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,i=ca){if(i.state&&(i.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((i=Object.create(i)).wrapped=!0),this.elementProperties.set(e,i),!i.noAccessor){let o=Symbol(),r=this.getPropertyDescriptor(e,o,i);r!==void 0&&Mh(this.prototype,e,r)}}static getPropertyDescriptor(e,i,o){let{get:r,set:l}=Eh(this.prototype,e)??{get(){return this[i]},set(h){this[i]=h}};return{get:r,set(h){let u=r?.call(this);l?.call(this,h),this.requestUpdate(e,u,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??ca}static _$Ei(){if(this.hasOwnProperty(pn("elementProperties")))return;let e=Ah(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(pn("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(pn("properties"))){let i=this.properties,o=[...Th(i),...Ph(i)];for(let r of o)this.createProperty(r,i[r])}let e=this[Symbol.metadata];if(e!==null){let i=litPropertyMetadata.get(e);if(i!==void 0)for(let[o,r]of i)this.elementProperties.set(o,r)}this._$Eh=new Map;for(let[i,o]of this.elementProperties){let r=this._$Eu(i,o);r!==void 0&&this._$Eh.set(r,i)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let i=[];if(Array.isArray(e)){let o=new Set(e.flat(1/0).reverse());for(let r of o)i.unshift(_o(r))}else e!==void 0&&i.push(_o(e));return i}static _$Eu(e,i){let o=i.attribute;return o===!1?void 0:typeof o=="string"?o:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,i=this.constructor.elementProperties;for(let o of i.keys())this.hasOwnProperty(o)&&(e.set(o,this[o]),delete this[o]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return aa(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,i,o){this._$AK(e,o)}_$ET(e,i){let o=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,o);if(r!==void 0&&o.reflect===!0){let l=(o.converter?.toAttribute!==void 0?o.converter:go).toAttribute(i,o.type);this._$Em=e,l==null?this.removeAttribute(r):this.setAttribute(r,l),this._$Em=null}}_$AK(e,i){let o=this.constructor,r=o._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let l=o.getPropertyOptions(r),h=typeof l.converter=="function"?{fromAttribute:l.converter}:l.converter?.fromAttribute!==void 0?l.converter:go;this._$Em=r;let u=h.fromAttribute(i,l.type);this[r]=u??this._$Ej?.get(r)??u,this._$Em=null}}requestUpdate(e,i,o,r=!1,l){if(e!==void 0){let h=this.constructor;if(r===!1&&(l=this[e]),o??=h.getPropertyOptions(e),!((o.hasChanged??ha)(l,i)||o.useDefault&&o.reflect&&l===this._$Ej?.get(e)&&!this.hasAttribute(h._$Eu(e,o))))return;this.C(e,i,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,i,{useDefault:o,reflect:r,wrapped:l},h){o&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,h??i??this[e]),l!==!0||h!==void 0)||(this._$AL.has(e)||(this.hasUpdated||o||(i=void 0),this._$AL.set(e,i)),r===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(i){Promise.reject(i)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,l]of this._$Ep)this[r]=l;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[r,l]of o){let{wrapped:h}=l,u=this[r];h!==!0||this._$AL.has(r)||u===void 0||this.C(r,void 0,l,u)}}let e=!1,i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(i)):this._$EM()}catch(o){throw e=!1,this._$EM(),o}e&&this._$AE(i)}willUpdate(e){}_$AE(e){this._$EO?.forEach(i=>i.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(i=>this._$ET(i,this[i])),this._$EM()}updated(e){}firstUpdated(e){}};He.elementStyles=[],He.shadowRootOptions={mode:"open"},He[pn("elementProperties")]=new Map,He[pn("finalized")]=new Map,Nh?.({ReactiveElement:He}),(Qn.reactiveElementVersions??=[]).push("2.1.2");var vo=globalThis,da=s=>s,ts=vo.trustedTypes,ua=ts?ts.createPolicy("lit-html",{createHTML:s=>s}):void 0,bo="$lit$",$e=`lit$${Math.random().toFixed(9).slice(2)}$`,wo="?"+$e,Bh=`<${wo}>`,hi=document,mn=()=>hi.createComment(""),_n=s=>s===null||typeof s!="object"&&typeof s!="function",xo=Array.isArray,ya=s=>xo(s)||typeof s?.[Symbol.iterator]=="function",yo=`[ -\f\r]`,fn=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,pa=/-->/g,fa=/>/g,li=RegExp(`>|${yo}(?:([^\\s"'>=/]+)(${yo}*=${yo}*(?:[^ -\f\r"'\`<>=]|("|')|))|$)`,"g"),ma=/'/g,_a=/"/g,va=/^(?:script|style|textarea|title)$/i,Co=s=>(e,...i)=>({_$litType$:s,strings:e,values:i}),Ae=Co(1),se=Co(2),ap=Co(3),we=Symbol.for("lit-noChange"),Pt=Symbol.for("lit-nothing"),ga=new WeakMap,ci=hi.createTreeWalker(hi,129);function ba(s,e){if(!xo(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return ua!==void 0?ua.createHTML(e):e}var wa=(s,e)=>{let i=s.length-1,o=[],r,l=e===2?"":e===3?"":"",h=fn;for(let u=0;u"?(h=r??fn,g=-1):y[1]===void 0?g=-2:(g=h.lastIndex-y[2].length,_=y[1],h=y[3]===void 0?li:y[3]==='"'?_a:ma):h===_a||h===ma?h=li:h===pa||h===fa?h=fn:(h=li,r=void 0);let w=h===li&&s[u+1].startsWith("/>")?" ":"";l+=h===fn?f+Bh:g>=0?(o.push(_),f.slice(0,g)+bo+f.slice(g)+$e+w):f+$e+(g===-2?u:w)}return[ba(s,l+(s[i]||"")+(e===2?"":e===3?"":"")),o]},gn=class s{constructor({strings:e,_$litType$:i},o){let r;this.parts=[];let l=0,h=0,u=e.length-1,f=this.parts,[_,y]=wa(e,i);if(this.el=s.createElement(_,o),ci.currentNode=this.el.content,i===2||i===3){let g=this.el.content.firstChild;g.replaceWith(...g.childNodes)}for(;(r=ci.nextNode())!==null&&f.length0){r.textContent=ts?ts.emptyScript:"";for(let w=0;w2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=Pt}_$AI(e,i=this,o,r){let l=this.strings,h=!1;if(l===void 0)e=di(this,e,i,0),h=!_n(e)||e!==this._$AH&&e!==we,h&&(this._$AH=e);else{let u=e,f,_;for(e=l[0],f=0;f{let o=i?.renderBefore??e,r=o._$litPart$;if(r===void 0){let l=i?.renderBefore??null;o._$litPart$=r=new Oi(e.insertBefore(mn(),l),l,void 0,i??{})}return r._$AI(s),r};var ko=globalThis,Ie=class extends He{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ca(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return we}};Ie._$litElement$=!0,Ie.finalized=!0,ko.litElementHydrateSupport?.({LitElement:Ie});var Rh=ko.litElementPolyfillSupport;Rh?.({LitElement:Ie});(ko.litElementVersions??=[]).push("4.2.2");function Lo(s,e,i){return s?e(s):i?.(s)}var So=s=>s??Pt;var rs={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},as=s=>(...e)=>({_$litDirective$:s,values:e}),zi=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,i,o){this._$Ct=e,this._$AM=i,this._$Ci=o}_$AS(e,i){return this.update(e,i)}update(e,i){return this.render(...i)}};var ls=as(class extends zi{constructor(s){if(super(s),s.type!==rs.ATTRIBUTE||s.name!=="class"||s.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(e=>s[e]).join(" ")+" "}update(s,[e]){if(this.st===void 0){this.st=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(let o in e)e[o]&&!this.nt?.has(o)&&this.st.add(o);return this.render(e)}let i=s.element.classList;for(let o of this.st)o in e||(i.remove(o),this.st.delete(o));for(let o in e){let r=!!e[o];r===this.st.has(o)||this.nt?.has(o)||(r?(i.add(o),this.st.add(o)):(i.remove(o),this.st.delete(o)))}return we}});var{I:Oh}=xa,ka=s=>s;var La=()=>document.createComment(""),Hi=(s,e,i)=>{let o=s._$AA.parentNode,r=e===void 0?s._$AB:e._$AA;if(i===void 0){let l=o.insertBefore(La(),r),h=o.insertBefore(La(),r);i=new Oh(l,h,s,s.options)}else{let l=i._$AB.nextSibling,h=i._$AM,u=h!==s;if(u){let f;i._$AQ?.(s),i._$AM=s,i._$AP!==void 0&&(f=s._$AU)!==h._$AU&&i._$AP(f)}if(l!==r||u){let f=i._$AA;for(;f!==l;){let _=ka(f).nextSibling;ka(o).insertBefore(f,r),f=_}}}return i},Xe=(s,e,i=s)=>(s._$AI(e,i),s),zh={},Sa=(s,e=zh)=>s._$AH=e,Ma=s=>s._$AH,cs=s=>{s._$AR(),s._$AA.remove()};var Ea=(s,e,i)=>{let o=new Map;for(let r=e;r<=i;r++)o.set(s[r],r);return o},Ta=as(class extends zi{constructor(s){if(super(s),s.type!==rs.CHILD)throw Error("repeat() can only be used in text expressions")}dt(s,e,i){let o;i===void 0?i=e:e!==void 0&&(o=e);let r=[],l=[],h=0;for(let u of s)r[h]=o?o(u,h):h,l[h]=i(u,h),h++;return{values:l,keys:r}}render(s,e,i){return this.dt(s,e,i).values}update(s,[e,i,o]){let r=Ma(s),{values:l,keys:h}=this.dt(e,i,o);if(!Array.isArray(r))return this.ut=h,l;let u=this.ut??=[],f=[],_,y,g=0,v=r.length-1,w=0,b=l.length-1;for(;g<=v&&w<=b;)if(r[g]===null)g++;else if(r[v]===null)v--;else if(u[g]===h[w])f[w]=Xe(r[g],l[w]),g++,w++;else if(u[v]===h[b])f[b]=Xe(r[v],l[b]),v--,b--;else if(u[g]===h[b])f[b]=Xe(r[g],l[b]),Hi(s,f[b+1],r[g]),g++,b--;else if(u[v]===h[w])f[w]=Xe(r[v],l[w]),Hi(s,r[g],r[v]),v--,w++;else if(_===void 0&&(_=Ea(h,w,b),y=Ea(u,g,v)),_.has(u[g]))if(_.has(u[v])){let C=y.get(h[w]),B=C!==void 0?r[C]:null;if(B===null){let P=Hi(s,r[g]);Xe(P,l[w]),f[w]=P}else f[w]=Xe(B,l[w]),Hi(s,r[g],B),r[C]=null;w++}else cs(r[v]),v--;else cs(r[g]),g++;for(;w<=b;){let C=Hi(s,f[b+1]);Xe(C,l[w]),f[w++]=C}for(;g<=v;){let C=r[g++];C!==null&&cs(C)}return this.ut=h,Sa(s,f),we}});function Jt(s,e,i,o,r=0,l=0){return[(e-l-o)*i,(s-r)*i]}function Gt(s,e,i,o,r,l,h=0,u=0){return[[(e-u-l)*r,(s-h)*r],[(o-u-l)*r,(i-h)*r]]}function xe(s,e,i,o,r=0,l=0){return{dbuX:Math.round(r+e/i),dbuY:Math.round(l+o+s/i)}}function Hh(s){return!Number.isFinite(s)||s<=1?1:Math.round(Math.min(s,3)*100)/100}var Fe=240,$h=256,Ze="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Mo=Fe;function Ce(){return Mo}function Pa(){Mo=$h}var Wp=1/64,Eo=120;function Aa(s){Mo=s}function pi(s){let e={...s||{}};return e.tileSize===void 0&&(e.tileSize=Ce()),e}function hs(s,e){return Math.max(1,Math.round(s*e))}function $i(){let s=typeof window<"u"&&window.devicePixelRatio?window.devicePixelRatio:1;return!Number.isFinite(s)||s<=1?1:Math.min(s,3)}function Fi(s,e=Ce()){return{dpr:Hh(s),tile_px:hs(e,s)}}function ds(s,e,i,o,r=Ce()){let{visibility:l,selectability:h,visibleLayers:u,selectableLayers:f,app:_}=i,y={};for(let[v,w]of Object.entries(l||{}))y[v]=!!w;if(h)for(let[v,w]of Object.entries(h))y["s_"+v]=!!w;let g={type:"tile",layer:e,z:s.z,x:s.x,y:s.y,...Fi(o,r),visible_layers:u?[...u]:[],selectable_layers:f?[...f]:[],...y};if(_&&_.visibleChiplets instanceof Set&&(g.visible_chiplets=[..._.visibleChiplets]),_&&_.layerPatterns){let v=_.layerPatterns[e];v!==void 0&&v!==1&&(g.pattern=v)}return g}function Ia(s){if(typeof window>"u"||typeof window.matchMedia!="function"||typeof s!="function")return()=>{};let e=!1,i=null,o=null,r=()=>{if(e)return;let l=window.devicePixelRatio||1;i=window.matchMedia(`(resolution: ${l}dppx)`),o=()=>{e||(r(),s(window.devicePixelRatio||1))},i.addEventListener("change",o,{once:!0})};return r(),()=>{e=!0,i&&o&&i.removeEventListener("change",o),i=null,o=null}}function Zi(s,e){let i=s&&s._map?s._map.getZoom():e;return Math.floor(i)}function wt(s){return!!s?.websocketManager?.isStaticMode}function Ra(s){let e=s?.protocol==="https:"?"wss":"ws",i=s?.host||"localhost:8080";return`${e}://${i}/ws`}function Oa(s,e){let i={};for(let[o,r]of Object.entries(s||{}))i[o]=!!r;for(let[o,r]of Object.entries(e||{}))i["s_"+o]=!!r;return i}function qi(s,e){e&&typeof e.sel_has_inst=="boolean"&&(s.selHasInst=e.sel_has_inst,s.selHasNet=!!e.sel_has_net)}var To=null;function ke(s,e=4e3){let i=document.getElementById("or-toast");return i||(i=document.createElement("div"),i.id="or-toast",document.body.appendChild(i)),i.textContent=s,i.classList.add("visible"),To&&clearTimeout(To),To=setTimeout(()=>i.classList.remove("visible"),e),i}function za({title:s,message:e,confirmLabel:i="OK",danger:o=!1}){return new Promise(r=>{let l=document.createElement("div");l.className="or-modal-overlay";let h=document.createElement("div");h.className="or-modal";let u=document.createElement("div");u.className="or-modal-title",u.textContent=s;let f=document.createElement("div");f.className="or-modal-message",f.textContent=e;let _=document.createElement("div");_.className="or-modal-buttons";let y=document.createElement("button");y.className="or-btn",y.textContent="Cancel";let g=document.createElement("button");g.className="or-btn"+(o?" or-btn-danger":""),g.textContent=i;let v=b=>{document.removeEventListener("keydown",w,!0),l.remove(),r(b)},w=b=>{b.key==="Escape"&&(b.stopPropagation(),v(!1))};y.addEventListener("click",()=>v(!1)),g.addEventListener("click",()=>v(!0)),l.addEventListener("click",b=>{b.target===l&&v(!1)}),document.addEventListener("keydown",w,!0),_.appendChild(y),_.appendChild(g),h.appendChild(u),h.appendChild(f),h.appendChild(_),l.appendChild(h),document.body.appendChild(l),y.focus()})}var Fh=.05;function Zh([[s,e],[i,o]],r){let l=(o-e)*r,h=(i-s)*r;return[[s-h,e-l],[i+h,o+l]]}function Po(s,e=256,i=null){if(!Na(s))return null;let o=s[0][0],r=s[0][1],l=Math.max(s[1][1]-r,s[1][0]-o),h=e/l,u=Na(i)?i:s,[[f,_],[y,g]]=Zh(u,Fh);return{scale:h,maxDXDY:l,originX:r,originY:o,fitBounds:Gt(_,f,g,y,h,l,r,o)}}function Na(s){return!!s&&s[1][0]>s[0][0]&&s[1][1]>s[0][1]}function Ha(s,e){return!!s&&!!e&&s[0][0]===e[0][0]&&s[0][1]===e[0][1]&&s[1][0]===e[1][0]&&s[1][1]===e[1][1]}function ae(s){s.selectionToken=(s.selectionToken||0)+1;for(let e of s.selectionResetters||[])e();return s.selectionToken}function he(s,e){return s.selectionToken===e}function $a(s,e){s.selectionResetters||(s.selectionResetters=[]),s.selectionResetters.push(e)}function Fa(s=typeof L<"u"?L.CRS.Simple:void 0,e={}){return{crs:s,zoom:1,zoomSnap:1,zoomDelta:1,fadeAnimation:!1,attributionControl:!1,scrollWheelZoom:e.wheelZoom!==!1,keyboardPanDelta:Wi(e.arrowStep)}}var Ao=80,yn=10,vn=1e3;function Wi(s){let e=s===""||s===null?NaN:Math.round(Number(s));return Number.isFinite(e)?Math.min(vn,Math.max(yn,e)):Ao}function Za(s,e){s?.keyboard?._setPanDelta?.(e)}function fi(s="vis-group-header"){let e=document.createElement("div");e.className=s;let i=document.createElement("span");i.className="vis-arrow",e.appendChild(i);let o=document.createElement("span");return o.className="vis-name",e.appendChild(o),{header:e,arrow:i,name:o}}function mi(s,e,i,o){let r=l=>{i.classList.toggle("collapsed",l),e.textContent=l?"\u25B6":"\u25BC"};r(!!o),s.addEventListener("click",l=>{let h=l.target&&l.target.parentNode===s&&l.target.classList&&l.target.classList.contains("vis-name");l.target!==s&&l.target!==e&&!h||r(!i.classList.contains("collapsed"))})}var Ba=30;function qa(s,e=8){if(!Number.isFinite(s)||s<=0)return Ba;let i=Math.ceil(Math.log2(e/s));return Math.max(1,Math.min(Ba,i))}function Wa({designBounds:s,fitRect:e,viewW:i,viewH:o}){let r=Po(s,Fe,e),l=w=>Number.isFinite(w)&&w>0;if(!r||!l(i)||!l(o))return Fe;let h=r.fitBounds[1][1]-r.fitBounds[0][1],u=r.fitBounds[1][0]-r.fitBounds[0][0],f=Math.min(i/h,o/u),_=Math.log2(f);if(!Number.isFinite(_)||_<0)return Fe;let y=Math.floor(_),g=Fe*2**(_-y),v=Math.floor(g/Eo)*Eo;return v>Fe&&Math.log2(Fe*f/v)>=y?v:Fe}function Ua(s,{showDbu:e,dbuPerMicron:i},o=!1){if(e)return String(Math.round(s));let r=i>0?i:1e3,l=Math.ceil(Math.log10(r)),h=(s/r).toFixed(l);return o?h+" \xB5m":h}function Ga(s,{showDbu:e,dbuPerMicron:i}){let o=parseFloat(s);if(!Number.isFinite(o))return null;if(e)return Math.round(o);let r=i>0?i:1e3;return Math.round(o*r)}function Va(s,{showDbu:e,dbuPerMicron:i}){if(e)return String(Math.round(s));let o=i>0?i:1e3,r=s/o;return r>=1e3?(r/1e3).toFixed(3)+" mm":r>=1?r.toFixed(3)+" um":(r*1e3).toFixed(1)+" nm"}function Ya({showDbu:s}){return s?"DBU":"\xB5m"}function Ui(s){return typeof s=="string"&&/^#[0-9a-fA-F]{6}$/.test(s)}function Xa(s){if(typeof s!="string")return null;let e=s.trim();if(Ui(e))return e.toLowerCase();let i=e.match(/^#([0-9a-fA-F]{3})$/);if(i)return"#"+i[1].split("").map(r=>r+r).join("").toLowerCase();let o=e.match(/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/);if(o){let r=o.slice(1).map(Number);return r.some(l=>l>255)?null:"#"+r.map(l=>l.toString(16).padStart(2,"0")).join("")}return null}function bn(s){let e=null;return()=>{e===null&&(e=requestAnimationFrame(()=>{e=null,s()}))}}function Da(s){let e=Math.pow(10,Math.floor(Math.log10(s))),i=s/e,o;return i<1.5?o=1:i<3.5?o=2:i<7.5?o=5:o=10,{value:o*e,digit:o}}function ja({targetPx:s,pxPerDbu:e,dbuPerMicron:i,showDbu:o}){if(!Number.isFinite(e)||e<=0||!Number.isFinite(s)||s<=0)return null;let r,l,h;if(o){let f=Da(Math.max(1,s/e));h=f.digit,r=Math.round(f.value*e),l=String(Math.round(f.value))}else{let f=Number.isFinite(i)&&i>0?i:1e3,_=e*f,y=Da(s/_);h=y.digit;let g=y.value;r=Math.round(g*_);let v,w;g>=1e3?(v=1/1e3,w="mm"):g>=1?(v=1,w="\xB5m"):g>=.001?(v=1e3,w="nm"):(v=1e6,w="pm"),l=Math.round(g*v)+" "+w}return{barPx:r,label:l,segments:h===1?5:h}}function wn(s,e,i){return e?typeof s.runTclScript=="function"?s.runTclScript(e,i):(i&&typeof s.echoTcl=="function"&&s.echoTcl(e),s.websocketManager.request({type:"tcl_eval",cmd:e}).catch(()=>{})):Promise.resolve()}function _i(s,e){let i=s.querySelectorAll("thead th");(!e||!e[0])&&(s.style.tableLayout="auto",i.forEach(o=>o.style.width=""),e=Array.from(i,o=>o.offsetWidth+"px")),i.forEach((o,r)=>o.style.width=e[r]||""),s.style.tableLayout="fixed",i.forEach((o,r)=>{if(r===i.length-1)return;let l=document.createElement("div");l.className="col-resize-grip",o.style.position="relative",o.appendChild(l);let h,u,f=y=>{o.style.width=Math.max(30,u+y.clientX-h)+"px"},_=()=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",_);let y=g=>g.stopPropagation();document.addEventListener("click",y,{capture:!0,once:!0}),setTimeout(()=>{document.removeEventListener("click",y,{capture:!0})},0)};l.addEventListener("mousedown",y=>{y.preventDefault(),h=y.clientX,u=o.offsetWidth,document.addEventListener("mousemove",f),document.addEventListener("mouseup",_)})})}function Ka(s,e){s.scrollWheelZoom.disable(),s.getContainer().addEventListener("wheel",i=>{if(i.preventDefault(),e()===i.ctrlKey){let[r,l]=Io(i,()=>s.getContainer().clientHeight);s.panBy([r,l],{animate:!1});return}let o=i.deltaY<0?1:-1;s.setZoomAround(s.mouseEventToLatLng(i),s.getZoom()+o)},{passive:!1})}function Io(s,e){let o=1;return s.deltaMode===1?o=16:s.deltaMode===2&&(o=e()||16),[s.deltaX*o,s.deltaY*o]}function Gi(s,e,i,o){let r=document.createElement("div");r.className="modal-overlay",r.innerHTML=` +(()=>{var yh=Object.create;var oa=Object.defineProperty;var vh=Object.getOwnPropertyDescriptor;var bh=Object.getOwnPropertyNames;var wh=Object.getPrototypeOf,xh=Object.prototype.hasOwnProperty;var Ch=(s,t)=>()=>(t||s((t={exports:{}}).exports,t),t.exports);var kh=(s,t,i,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of bh(t))!xh.call(s,r)&&r!==i&&oa(s,r,{get:()=>t[r],enumerable:!(o=vh(t,r))||o.enumerable});return s};var Lh=(s,t,i)=>(i=s!=null?yh(wh(s)):{},kh(t||!s||!s.__esModule?oa(i,"default",{value:s,enumerable:!0}):i,s));var aa=Ch((jn,ra)=>{(function(s,t){typeof jn=="object"&&typeof ra<"u"?t(jn):typeof define=="function"&&define.amd?define(["exports"],t):(s=typeof globalThis<"u"?globalThis:s||self,t(s.leaflet={}))})(jn,function(s){"use strict";var t="1.9.4";function i(e){var n,a,c,d;for(a=1,c=arguments.length;a"u"||!L||!L.Mixin)){e=P(e)?e:[e];for(var n=0;n0?Math.floor(e):Math.ceil(e)};rt.prototype={clone:function(){return new rt(this.x,this.y)},add:function(e){return this.clone()._add(at(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(at(e))},_subtract:function(e){return this.x-=e.x,this.y-=e.y,this},divideBy:function(e){return this.clone()._divideBy(e)},_divideBy:function(e){return this.x/=e,this.y/=e,this},multiplyBy:function(e){return this.clone()._multiplyBy(e)},_multiplyBy:function(e){return this.x*=e,this.y*=e,this},scaleBy:function(e){return new rt(this.x*e.x,this.y*e.y)},unscaleBy:function(e){return new rt(this.x/e.x,this.y/e.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=ye(this.x),this.y=ye(this.y),this},distanceTo:function(e){e=at(e);var n=e.x-this.x,a=e.y-this.y;return Math.sqrt(n*n+a*a)},equals:function(e){return e=at(e),e.x===this.x&&e.y===this.y},contains:function(e){return e=at(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return"Point("+g(this.x)+", "+g(this.y)+")"}};function at(e,n,a){return e instanceof rt?e:P(e)?new rt(e[0],e[1]):e==null?e:typeof e=="object"&&"x"in e&&"y"in e?new rt(e.x,e.y):new rt(e,n,a)}function kt(e,n){if(e)for(var a=n?[e,n]:e,c=0,d=a.length;c=this.min.x&&a.x<=this.max.x&&n.y>=this.min.y&&a.y<=this.max.y},intersects:function(e){e=zt(e);var n=this.min,a=this.max,c=e.min,d=e.max,m=d.x>=n.x&&c.x<=a.x,x=d.y>=n.y&&c.y<=a.y;return m&&x},overlaps:function(e){e=zt(e);var n=this.min,a=this.max,c=e.min,d=e.max,m=d.x>n.x&&c.xn.y&&c.y=n.lat&&d.lat<=a.lat&&c.lng>=n.lng&&d.lng<=a.lng},intersects:function(e){e=At(e);var n=this._southWest,a=this._northEast,c=e.getSouthWest(),d=e.getNorthEast(),m=d.lat>=n.lat&&c.lat<=a.lat,x=d.lng>=n.lng&&c.lng<=a.lng;return m&&x},overlaps:function(e){e=At(e);var n=this._southWest,a=this._northEast,c=e.getSouthWest(),d=e.getNorthEast(),m=d.lat>n.lat&&c.latn.lng&&c.lng1,lt=function(){var e=!1;try{var n=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveEventSupport",_,n),window.removeEventListener("testPassiveEventSupport",_,n)}catch{}return e}(),Dt=function(){return!!document.createElement("canvas").getContext}(),oe=!!(document.createElementNS&&Y("svg").createSVGRect),Ue=!!oe&&function(){var e=document.createElement("div");return e.innerHTML="",(e.firstChild&&e.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),An=!oe&&function(){try{var e=document.createElement("div");e.innerHTML='';var n=e.firstChild;return n.style.behavior="url(#default#VML)",n&&typeof n.adj=="object"}catch{return!1}}(),dc=navigator.platform.indexOf("Mac")===0,uc=navigator.platform.indexOf("Linux")===0;function Se(e){return navigator.userAgent.toLowerCase().indexOf(e)>=0}var et={ie:I,ielt9:O,edge:ct,webkit:Lt,android:Xt,android23:Ot,androidStock:Le,opera:Ge,chrome:Bt,gecko:ei,safari:M,phantom:H,opera12:F,win:G,ie3d:z,webkit3d:W,gecko3d:q,any3d:D,mobile:X,mobileWebkit:j,mobileWebkit3d:vt,msPointer:mt,pointer:St,touch:Ht,touchNative:Pt,mobileOpera:ce,mobileGecko:K,retina:st,passiveEvents:lt,canvas:Dt,svg:oe,vml:An,inlineSvg:Ue,mac:dc,linux:uc},hr=et.msPointer?"MSPointerDown":"pointerdown",dr=et.msPointer?"MSPointerMove":"pointermove",ur=et.msPointer?"MSPointerUp":"pointerup",pr=et.msPointer?"MSPointerCancel":"pointercancel",qs={touchstart:hr,touchmove:dr,touchend:ur,touchcancel:pr},fr={touchstart:yc,touchmove:In,touchend:In,touchcancel:In},Mi={},mr=!1;function pc(e,n,a){return n==="touchstart"&&gc(),fr[n]?(a=fr[n].bind(this,a),e.addEventListener(qs[n],a,!1),a):(console.warn("wrong event specified:",n),_)}function fc(e,n,a){if(!qs[n]){console.warn("wrong event specified:",n);return}e.removeEventListener(qs[n],a,!1)}function mc(e){Mi[e.pointerId]=e}function _c(e){Mi[e.pointerId]&&(Mi[e.pointerId]=e)}function _r(e){delete Mi[e.pointerId]}function gc(){mr||(document.addEventListener(hr,mc,!0),document.addEventListener(dr,_c,!0),document.addEventListener(ur,_r,!0),document.addEventListener(pr,_r,!0),mr=!0)}function In(e,n){if(n.pointerType!==(n.MSPOINTER_TYPE_MOUSE||"mouse")){n.touches=[];for(var a in Mi)n.touches.push(Mi[a]);n.changedTouches=[n],e(n)}}function yc(e,n){n.MSPOINTER_TYPE_TOUCH&&n.pointerType===n.MSPOINTER_TYPE_TOUCH&&Kt(n),In(e,n)}function vc(e){var n={},a,c;for(c in e)a=e[c],n[c]=a&&a.bind?a.bind(e):a;return e=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}var bc=200;function wc(e,n){e.addEventListener("dblclick",n);var a=0,c;function d(m){if(m.detail!==1){c=m.detail;return}if(!(m.pointerType==="mouse"||m.sourceCapabilities&&!m.sourceCapabilities.firesTouchEvents)){var x=wr(m);if(!(x.some(function(E){return E instanceof HTMLLabelElement&&E.attributes.for})&&!x.some(function(E){return E instanceof HTMLInputElement||E instanceof HTMLSelectElement}))){var S=Date.now();S-a<=bc?(c++,c===2&&n(vc(m))):c=1,a=S}}}return e.addEventListener("click",d),{dblclick:n,simDblclick:d}}function xc(e,n){e.removeEventListener("dblclick",n.dblclick),e.removeEventListener("click",n.simDblclick)}var Ws=Dn(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ji=Dn(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),gr=ji==="webkitTransition"||ji==="OTransition"?ji+"End":"transitionend";function yr(e){return typeof e=="string"?document.getElementById(e):e}function Ki(e,n){var a=e.style[n]||e.currentStyle&&e.currentStyle[n];if((!a||a==="auto")&&document.defaultView){var c=document.defaultView.getComputedStyle(e,null);a=c?c[n]:null}return a==="auto"?null:a}function xt(e,n,a){var c=document.createElement(e);return c.className=n||"",a&&a.appendChild(c),c}function Rt(e){var n=e.parentNode;n&&n.removeChild(e)}function Nn(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function Ei(e){var n=e.parentNode;n&&n.lastChild!==e&&n.appendChild(e)}function Ti(e){var n=e.parentNode;n&&n.firstChild!==e&&n.insertBefore(e,n.firstChild)}function Gs(e,n){if(e.classList!==void 0)return e.classList.contains(n);var a=Bn(e);return a.length>0&&new RegExp("(^|\\s)"+n+"(\\s|$)").test(a)}function pt(e,n){if(e.classList!==void 0)for(var a=v(n),c=0,d=a.length;c0?2*window.devicePixelRatio:1;function Cr(e){return et.edge?e.wheelDeltaY/2:e.deltaY&&e.deltaMode===0?-e.deltaY/Lc:e.deltaY&&e.deltaMode===1?-e.deltaY*20:e.deltaY&&e.deltaMode===2?-e.deltaY*60:e.deltaX||e.deltaZ?0:e.wheelDelta?(e.wheelDeltaY||e.wheelDelta)/2:e.detail&&Math.abs(e.detail)<32765?-e.detail*20:e.detail?e.detail/-32765*60:0}function no(e,n){var a=n.relatedTarget;if(!a)return!0;try{for(;a&&a!==e;)a=a.parentNode}catch{return!1}return a!==e}var Sc={__proto__:null,on:ut,off:Tt,stopPropagation:si,disableScrollPropagation:io,disableClickPropagation:en,preventDefault:Kt,stop:oi,getPropagationPath:wr,getMousePosition:xr,getWheelDelta:Cr,isExternalTarget:no,addListener:ut,removeListener:Tt},kr=Yt.extend({run:function(e,n,a,c){this.stop(),this._el=e,this._inProgress=!0,this._duration=a||.25,this._easeOutPower=1/Math.max(c||.5,.2),this._startPos=ni(e),this._offset=n.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=nt(this._animate,this),this._step()},_step:function(e){var n=+new Date-this._startTime,a=this._duration*1e3;nthis.options.maxZoom)?this.setZoom(e):this},panInsideBounds:function(e,n){this._enforcingBounds=!0;var a=this.getCenter(),c=this._limitCenter(a,this._zoom,At(e));return a.equals(c)||this.panTo(c,n),this._enforcingBounds=!1,this},panInside:function(e,n){n=n||{};var a=at(n.paddingTopLeft||n.padding||[0,0]),c=at(n.paddingBottomRight||n.padding||[0,0]),d=this.project(this.getCenter()),m=this.project(e),x=this.getPixelBounds(),S=zt([x.min.add(a),x.max.subtract(c)]),E=S.getSize();if(!S.contains(m)){this._enforcingBounds=!0;var N=m.subtract(S.getCenter()),V=S.extend(m).getSize().subtract(E);d.x+=N.x<0?-V.x:V.x,d.y+=N.y<0?-V.y:V.y,this.panTo(this.unproject(d),n),this._enforcingBounds=!1}return this},invalidateSize:function(e){if(!this._loaded)return this;e=i({animate:!1,pan:!0},e===!0?{animate:!0}:e);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var a=this.getSize(),c=n.divideBy(2).round(),d=a.divideBy(2).round(),m=c.subtract(d);return!m.x&&!m.y?this:(e.animate&&e.pan?this.panBy(m):(e.pan&&this._rawPanBy(m),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(r(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:a}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(e){if(e=this._locateOptions=i({timeout:1e4,watch:!1},e),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=r(this._handleGeolocationResponse,this),a=r(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,a,e):navigator.geolocation.getCurrentPosition(n,a,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){if(this._container._leaflet_id){var n=e.code,a=e.message||(n===1?"permission denied":n===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:n,message:"Geolocation error: "+a+"."})}},_handleGeolocationResponse:function(e){if(this._container._leaflet_id){var n=e.coords.latitude,a=e.coords.longitude,c=new yt(n,a),d=c.toBounds(e.coords.accuracy*2),m=this._locateOptions;if(m.setView){var x=this.getBoundsZoom(d);this.setView(c,m.maxZoom?Math.min(x,m.maxZoom):x)}var S={latlng:c,bounds:d,timestamp:e.timestamp};for(var E in e.coords)typeof e.coords[E]=="number"&&(S[E]=e.coords[E]);this.fire("locationfound",S)}},addHandler:function(e,n){if(!n)return this;var a=this[e]=new n(this);return this._handlers.push(a),this.options[e]&&a.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Rt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(tt(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var e;for(e in this._layers)this._layers[e].remove();for(e in this._panes)Rt(this._panes[e]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(e,n){var a="leaflet-pane"+(e?" leaflet-"+e.replace("Pane","")+"-pane":""),c=xt("div",a,n||this._mapPane);return e&&(this._panes[e]=c),c},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds(),n=this.unproject(e.getBottomLeft()),a=this.unproject(e.getTopRight());return new Wt(n,a)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(e,n,a){e=At(e),a=at(a||[0,0]);var c=this.getZoom()||0,d=this.getMinZoom(),m=this.getMaxZoom(),x=e.getNorthWest(),S=e.getSouthEast(),E=this.getSize().subtract(a),N=zt(this.project(S,c),this.project(x,c)).getSize(),V=et.any3d?this.options.zoomSnap:1,ot=E.x/N.x,_t=E.y/N.y,ne=n?Math.max(ot,_t):Math.min(ot,_t);return c=this.getScaleZoom(ne,c),V&&(c=Math.round(c/(V/100))*(V/100),c=n?Math.ceil(c/V)*V:Math.floor(c/V)*V),Math.max(d,Math.min(m,c))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new rt(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(e,n){var a=this._getTopLeftPoint(e,n);return new kt(a,a.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(e===void 0?this.getZoom():e)},getPane:function(e){return typeof e=="string"?this._panes[e]:e},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e,n){var a=this.options.crs;return n=n===void 0?this._zoom:n,a.scale(e)/a.scale(n)},getScaleZoom:function(e,n){var a=this.options.crs;n=n===void 0?this._zoom:n;var c=a.zoom(e*a.scale(n));return isNaN(c)?1/0:c},project:function(e,n){return n=n===void 0?this._zoom:n,this.options.crs.latLngToPoint(ft(e),n)},unproject:function(e,n){return n=n===void 0?this._zoom:n,this.options.crs.pointToLatLng(at(e),n)},layerPointToLatLng:function(e){var n=at(e).add(this.getPixelOrigin());return this.unproject(n)},latLngToLayerPoint:function(e){var n=this.project(ft(e))._round();return n._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(ft(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds(At(e))},distance:function(e,n){return this.options.crs.distance(ft(e),ft(n))},containerPointToLayerPoint:function(e){return at(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return at(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var n=this.containerPointToLayerPoint(at(e));return this.layerPointToLatLng(n)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ft(e)))},mouseEventToContainerPoint:function(e){return xr(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){var n=this._container=yr(e);if(n){if(n._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");ut(n,"scroll",this._onScroll,this),this._containerId=h(n)},_initLayout:function(){var e=this._container;this._fadeAnimated=this.options.fadeAnimation&&et.any3d,pt(e,"leaflet-container"+(et.touch?" leaflet-touch":"")+(et.retina?" leaflet-retina":"")+(et.ielt9?" leaflet-oldie":"")+(et.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var n=Ki(e,"position");n!=="absolute"&&n!=="relative"&&n!=="fixed"&&n!=="sticky"&&(e.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Zt(this._mapPane,new rt(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(pt(e.markerPane,"leaflet-zoom-hide"),pt(e.shadowPane,"leaflet-zoom-hide"))},_resetView:function(e,n,a){Zt(this._mapPane,new rt(0,0));var c=!this._loaded;this._loaded=!0,n=this._limitZoom(n),this.fire("viewprereset");var d=this._zoom!==n;this._moveStart(d,a)._move(e,n)._moveEnd(d),this.fire("viewreset"),c&&this.fire("load")},_moveStart:function(e,n){return e&&this.fire("zoomstart"),n||this.fire("movestart"),this},_move:function(e,n,a,c){n===void 0&&(n=this._zoom);var d=this._zoom!==n;return this._zoom=n,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),c?a&&a.pinch&&this.fire("zoom",a):((d||a&&a.pinch)&&this.fire("zoom",a),this.fire("move",a)),this},_moveEnd:function(e){return e&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return tt(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){Zt(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){this._targets={},this._targets[h(this._container)]=this;var n=e?Tt:ut;n(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&n(window,"resize",this._onResize,this),et.any3d&&this.options.transform3DLimit&&(e?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){tt(this._resizeRequest),this._resizeRequest=nt(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(e,n){for(var a=[],c,d=n==="mouseout"||n==="mouseover",m=e.target||e.srcElement,x=!1;m;){if(c=this._targets[h(m)],c&&(n==="click"||n==="preclick")&&this._draggableMoved(c)){x=!0;break}if(c&&c.listens(n,!0)&&(d&&!no(m,e)||(a.push(c),d))||m===this._container)break;m=m.parentNode}return!a.length&&!x&&!d&&this.listens(n,!0)&&(a=[this]),a},_isClickDisabled:function(e){for(;e&&e!==this._container;){if(e._leaflet_disable_click)return!0;e=e.parentNode}},_handleDOMEvent:function(e){var n=e.target||e.srcElement;if(!(!this._loaded||n._leaflet_disable_events||e.type==="click"&&this._isClickDisabled(n))){var a=e.type;a==="mousedown"&&Ks(n),this._fireDOMEvent(e,a)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(e,n,a){if(e.type==="click"){var c=i({},e);c.type="preclick",this._fireDOMEvent(c,c.type,a)}var d=this._findEventTargets(e,n);if(a){for(var m=[],x=0;x0?Math.round(e-n)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(n))},_limitZoom:function(e){var n=this.getMinZoom(),a=this.getMaxZoom(),c=et.any3d?this.options.zoomSnap:1;return c&&(e=Math.round(e/c)*c),Math.max(n,Math.min(a,e))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){$t(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,n){var a=this._getCenterOffset(e)._trunc();return(n&&n.animate)!==!0&&!this.getSize().contains(a)?!1:(this.panBy(a,n),!0)},_createAnimProxy:function(){var e=this._proxy=xt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(e),this.on("zoomanim",function(n){var a=Ws,c=this._proxy.style[a];ii(this._proxy,this.project(n.center,n.zoom),this.getZoomScale(n.zoom,1)),c===this._proxy.style[a]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Rt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var e=this.getCenter(),n=this.getZoom();ii(this._proxy,this.project(e,n),this.getZoomScale(n,1))},_catchTransitionEnd:function(e){this._animatingZoom&&e.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(e,n,a){if(this._animatingZoom)return!0;if(a=a||{},!this._zoomAnimated||a.animate===!1||this._nothingToAnimate()||Math.abs(n-this._zoom)>this.options.zoomAnimationThreshold)return!1;var c=this.getZoomScale(n),d=this._getCenterOffset(e)._divideBy(1-1/c);return a.animate!==!0&&!this.getSize().contains(d)?!1:(nt(function(){this._moveStart(!0,a.noMoveStart||!1)._animateZoom(e,n,!0)},this),!0)},_animateZoom:function(e,n,a,c){this._mapPane&&(a&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=n,pt(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:e,zoom:n,noUpdate:c}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(r(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&$t(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Mc(e,n){return new bt(e,n)}var ve=Et.extend({options:{position:"topright"},initialize:function(e){w(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var n=this._map;return n&&n.removeControl(this),this.options.position=e,n&&n.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this.remove(),this._map=e;var n=this._container=this.onAdd(e),a=this.getPosition(),c=e._controlCorners[a];return pt(n,"leaflet-control"),a.indexOf("bottom")!==-1?c.insertBefore(n,c.firstChild):c.appendChild(n),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Rt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(e){this._map&&e&&e.screenX>0&&e.screenY>0&&this._map.getContainer().focus()}}),nn=function(e){return new ve(e)};bt.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.remove(),this},_initControlPos:function(){var e=this._controlCorners={},n="leaflet-",a=this._controlContainer=xt("div",n+"control-container",this._container);function c(d,m){var x=n+d+" "+n+m;e[d+m]=xt("div",x,a)}c("top","left"),c("top","right"),c("bottom","left"),c("bottom","right")},_clearControlPos:function(){for(var e in this._controlCorners)Rt(this._controlCorners[e]);Rt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Lr=ve.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,n,a,c){return a1,this._baseLayersList.style.display=e?"":"none"),this._separator.style.display=n&&e?"":"none",this},_onLayerChange:function(e){this._handlingClick||this._update();var n=this._getLayer(h(e.target)),a=n.overlay?e.type==="add"?"overlayadd":"overlayremove":e.type==="add"?"baselayerchange":null;a&&this._map.fire(a,n)},_createRadioElement:function(e,n){var a='",c=document.createElement("div");return c.innerHTML=a,c.firstChild},_addItem:function(e){var n=document.createElement("label"),a=this._map.hasLayer(e.layer),c;e.overlay?(c=document.createElement("input"),c.type="checkbox",c.className="leaflet-control-layers-selector",c.defaultChecked=a):c=this._createRadioElement("leaflet-base-layers_"+h(this),a),this._layerControlInputs.push(c),c.layerId=h(e.layer),ut(c,"click",this._onInputClick,this);var d=document.createElement("span");d.innerHTML=" "+e.name;var m=document.createElement("span");n.appendChild(m),m.appendChild(c),m.appendChild(d);var x=e.overlay?this._overlaysList:this._baseLayersList;return x.appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var e=this._layerControlInputs,n,a,c=[],d=[];this._handlingClick=!0;for(var m=e.length-1;m>=0;m--)n=e[m],a=this._getLayer(n.layerId).layer,n.checked?c.push(a):n.checked||d.push(a);for(m=0;m=0;d--)n=e[d],a=this._getLayer(n.layerId).layer,n.disabled=a.options.minZoom!==void 0&&ca.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var e=this._section;this._preventClick=!0,ut(e,"click",Kt),this.expand();var n=this;setTimeout(function(){Tt(e,"click",Kt),n._preventClick=!1})}}),Ec=function(e,n,a){return new Lr(e,n,a)},so=ve.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(e){var n="leaflet-control-zoom",a=xt("div",n+" leaflet-bar"),c=this.options;return this._zoomInButton=this._createButton(c.zoomInText,c.zoomInTitle,n+"-in",a,this._zoomIn),this._zoomOutButton=this._createButton(c.zoomOutText,c.zoomOutTitle,n+"-out",a,this._zoomOut),this._updateDisabled(),e.on("zoomend zoomlevelschange",this._updateDisabled,this),a},onRemove:function(e){e.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(e){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))},_createButton:function(e,n,a,c,d){var m=xt("a",a,c);return m.innerHTML=e,m.href="#",m.title=n,m.setAttribute("role","button"),m.setAttribute("aria-label",n),en(m),ut(m,"click",oi),ut(m,"click",d,this),ut(m,"click",this._refocusOnMap,this),m},_updateDisabled:function(){var e=this._map,n="leaflet-disabled";$t(this._zoomInButton,n),$t(this._zoomOutButton,n),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||e._zoom===e.getMinZoom())&&(pt(this._zoomOutButton,n),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||e._zoom===e.getMaxZoom())&&(pt(this._zoomInButton,n),this._zoomInButton.setAttribute("aria-disabled","true"))}});bt.mergeOptions({zoomControl:!0}),bt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new so,this.addControl(this.zoomControl))});var Tc=function(e){return new so(e)},Sr=ve.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var n="leaflet-control-scale",a=xt("div",n),c=this.options;return this._addScales(c,n+"-line",a),e.on(c.updateWhenIdle?"moveend":"move",this._update,this),e.whenReady(this._update,this),a},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,n,a){e.metric&&(this._mScale=xt("div",n,a)),e.imperial&&(this._iScale=xt("div",n,a))},_update:function(){var e=this._map,n=e.getSize().y/2,a=e.distance(e.containerPointToLatLng([0,n]),e.containerPointToLatLng([this.options.maxWidth,n]));this._updateScales(a)},_updateScales:function(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)},_updateMetric:function(e){var n=this._getRoundNum(e),a=n<1e3?n+" m":n/1e3+" km";this._updateScale(this._mScale,a,n/e)},_updateImperial:function(e){var n=e*3.2808399,a,c,d;n>5280?(a=n/5280,c=this._getRoundNum(a),this._updateScale(this._iScale,c+" mi",c/a)):(d=this._getRoundNum(n),this._updateScale(this._iScale,d+" ft",d/n))},_updateScale:function(e,n,a){e.style.width=Math.round(this.options.maxWidth*a)+"px",e.innerHTML=n},_getRoundNum:function(e){var n=Math.pow(10,(Math.floor(e)+"").length-1),a=e/n;return a=a>=10?10:a>=5?5:a>=3?3:a>=2?2:1,n*a}}),Pc=function(e){return new Sr(e)},Ac='',oo=ve.extend({options:{position:"bottomright",prefix:''+(et.inlineSvg?Ac+" ":"")+"Leaflet"},initialize:function(e){w(this,e),this._attributions={}},onAdd:function(e){e.attributionControl=this,this._container=xt("div","leaflet-control-attribution"),en(this._container);for(var n in e._layers)e._layers[n].getAttribution&&this.addAttribution(e._layers[n].getAttribution());return this._update(),e.on("layeradd",this._addAttribution,this),this._container},onRemove:function(e){e.off("layeradd",this._addAttribution,this)},_addAttribution:function(e){e.layer.getAttribution&&(this.addAttribution(e.layer.getAttribution()),e.layer.once("remove",function(){this.removeAttribution(e.layer.getAttribution())},this))},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e?(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update(),this):this},removeAttribution:function(e){return e?(this._attributions[e]&&(this._attributions[e]--,this._update()),this):this},_update:function(){if(this._map){var e=[];for(var n in this._attributions)this._attributions[n]&&e.push(n);var a=[];this.options.prefix&&a.push(this.options.prefix),e.length&&a.push(e.join(", ")),this._container.innerHTML=a.join(' ')}}});bt.mergeOptions({attributionControl:!0}),bt.addInitHook(function(){this.options.attributionControl&&new oo().addTo(this)});var Ic=function(e){return new oo(e)};ve.Layers=Lr,ve.Zoom=so,ve.Scale=Sr,ve.Attribution=oo,nn.layers=Ec,nn.zoom=Tc,nn.scale=Pc,nn.attribution=Ic;var Ee=Et.extend({initialize:function(e){this._map=e},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Ee.addTo=function(e,n){return e.addHandler(n,this),this};var Nc={Events:Nt},Mr=et.touch?"touchstart mousedown":"mousedown",Ve=Yt.extend({options:{clickTolerance:3},initialize:function(e,n,a,c){w(this,c),this._element=e,this._dragStartTarget=n||e,this._preventOutline=a},enable:function(){this._enabled||(ut(this._dragStartTarget,Mr,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Ve._dragging===this&&this.finishDrag(!0),Tt(this._dragStartTarget,Mr,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){if(this._enabled&&(this._moved=!1,!Gs(this._element,"leaflet-zoom-anim"))){if(e.touches&&e.touches.length!==1){Ve._dragging===this&&this.finishDrag();return}if(!(Ve._dragging||e.shiftKey||e.which!==1&&e.button!==1&&!e.touches)&&(Ve._dragging=this,this._preventOutline&&Ks(this._element),Ys(),Ji(),!this._moving)){this.fire("down");var n=e.touches?e.touches[0]:e,a=vr(this._element);this._startPoint=new rt(n.clientX,n.clientY),this._startPos=ni(this._element),this._parentScale=Js(a);var c=e.type==="mousedown";ut(document,c?"mousemove":"touchmove",this._onMove,this),ut(document,c?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(e){if(this._enabled){if(e.touches&&e.touches.length>1){this._moved=!0;return}var n=e.touches&&e.touches.length===1?e.touches[0]:e,a=new rt(n.clientX,n.clientY)._subtract(this._startPoint);!a.x&&!a.y||Math.abs(a.x)+Math.abs(a.y)m&&(x=S,m=E);m>a&&(n[x]=1,ao(e,n,a,c,x),ao(e,n,a,x,d))}function zc(e,n){for(var a=[e[0]],c=1,d=0,m=e.length;cn&&(a.push(e[c]),d=c);return dn.max.x&&(a|=2),e.yn.max.y&&(a|=8),a}function Oc(e,n){var a=n.x-e.x,c=n.y-e.y;return a*a+c*c}function sn(e,n,a,c){var d=n.x,m=n.y,x=a.x-d,S=a.y-m,E=x*x+S*S,N;return E>0&&(N=((e.x-d)*x+(e.y-m)*S)/E,N>1?(d=a.x,m=a.y):N>0&&(d+=x*N,m+=S*N)),x=e.x-d,S=e.y-m,c?x*x+S*S:new rt(d,m)}function _e(e){return!P(e[0])||typeof e[0][0]!="object"&&typeof e[0][0]<"u"}function Br(e){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),_e(e)}function Dr(e,n){var a,c,d,m,x,S,E,N;if(!e||e.length===0)throw new Error("latlngs not passed");_e(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var V=ft([0,0]),ot=At(e),_t=ot.getNorthWest().distanceTo(ot.getSouthWest())*ot.getNorthEast().distanceTo(ot.getNorthWest());_t<1700&&(V=ro(e));var ne=e.length,Gt=[];for(a=0;ac){E=(m-c)/d,N=[S.x-E*(S.x-x.x),S.y-E*(S.y-x.y)];break}var re=n.unproject(at(N));return ft([re.lat+V.lat,re.lng+V.lng])}var Hc={__proto__:null,simplify:Pr,pointToSegmentDistance:Ar,closestPointOnSegment:Dc,clipSegment:Nr,_getEdgeIntersection:On,_getBitCode:ri,_sqClosestPointOnSegment:sn,isFlat:_e,_flat:Br,polylineCenter:Dr},lo={project:function(e){return new rt(e.lng,e.lat)},unproject:function(e){return new yt(e.y,e.x)},bounds:new kt([-180,-90],[180,90])},co={R:6378137,R_MINOR:6356752314245179e-9,bounds:new kt([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(e){var n=Math.PI/180,a=this.R,c=e.lat*n,d=this.R_MINOR/a,m=Math.sqrt(1-d*d),x=m*Math.sin(c),S=Math.tan(Math.PI/4-c/2)/Math.pow((1-x)/(1+x),m/2);return c=-a*Math.log(Math.max(S,1e-10)),new rt(e.lng*n*a,c)},unproject:function(e){for(var n=180/Math.PI,a=this.R,c=this.R_MINOR/a,d=Math.sqrt(1-c*c),m=Math.exp(-e.y/a),x=Math.PI/2-2*Math.atan(m),S=0,E=.1,N;S<15&&Math.abs(E)>1e-7;S++)N=d*Math.sin(x),N=Math.pow((1-N)/(1+N),d/2),E=Math.PI/2-2*Math.atan(m*N)-x,x+=E;return new yt(x*n,e.x*n/a)}},$c={__proto__:null,LonLat:lo,Mercator:co,SphericalMercator:ee},Fc=i({},ie,{code:"EPSG:3395",projection:co,transformation:function(){var e=.5/(Math.PI*co.R);return k(e,.5,-e,.5)}()}),Rr=i({},ie,{code:"EPSG:4326",projection:lo,transformation:k(1/180,1,-1/180,.5)}),Zc=i({},le,{projection:lo,transformation:k(1,0,-1,0),scale:function(e){return Math.pow(2,e)},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,n){var a=n.lng-e.lng,c=n.lat-e.lat;return Math.sqrt(a*a+c*c)},infinite:!0});le.Earth=ie,le.EPSG3395=Fc,le.EPSG3857=$,le.EPSG900913=B,le.EPSG4326=Rr,le.Simple=Zc;var be=Yt.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(e){return e.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(e){return e&&e.removeLayer(this),this},getPane:function(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function(e){return this._map._targets[h(e)]=this,this},removeInteractiveTarget:function(e){return delete this._map._targets[h(e)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(e){var n=e.target;if(n.hasLayer(this)){if(this._map=n,this._zoomAnimated=n._zoomAnimated,this.getEvents){var a=this.getEvents();n.on(a,this),this.once("remove",function(){n.off(a,this)},this)}this.onAdd(n),this.fire("add"),n.fire("layeradd",{layer:this})}}});bt.include({addLayer:function(e){if(!e._layerAdd)throw new Error("The provided object is not a Layer.");var n=h(e);return this._layers[n]?this:(this._layers[n]=e,e._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e),this)},removeLayer:function(e){var n=h(e);return this._layers[n]?(this._loaded&&e.onRemove(this),delete this._layers[n],this._loaded&&(this.fire("layerremove",{layer:e}),e.fire("remove")),e._map=e._mapToAdd=null,this):this},hasLayer:function(e){return h(e)in this._layers},eachLayer:function(e,n){for(var a in this._layers)e.call(n,this._layers[a]);return this},_addLayers:function(e){e=e?P(e)?e:[e]:[];for(var n=0,a=e.length;nthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&n[0]instanceof yt&&n[0].equals(n[a-1])&&n.pop(),n},_setLatLngs:function(e){De.prototype._setLatLngs.call(this,e),_e(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return _e(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var e=this._renderer._bounds,n=this.options.weight,a=new rt(n,n);if(e=new kt(e.min.subtract(a),e.max.add(a)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(e))){if(this.options.noClip){this._parts=this._rings;return}for(var c=0,d=this._rings.length,m;ce.y!=d.y>e.y&&e.x<(d.x-c.x)*(e.y-c.y)/(d.y-c.y)+c.x&&(n=!n);return n||De.prototype._containsPoint.call(this,e,!0)}});function jc(e,n){return new Ii(e,n)}var Re=Be.extend({initialize:function(e,n){w(this,n),this._layers={},e&&this.addData(e)},addData:function(e){var n=P(e)?e:e.features,a,c,d;if(n){for(a=0,c=n.length;a0&&d.push(d[0].slice()),d}function Ni(e,n){return e.feature?i({},e.feature,{geometry:n}):Wn(n)}function Wn(e){return e.type==="Feature"||e.type==="FeatureCollection"?e:{type:"Feature",properties:{},geometry:e}}var fo={toGeoJSON:function(e){return Ni(this,{type:"Point",coordinates:po(this.getLatLng(),e)})}};Hn.include(fo),ho.include(fo),$n.include(fo),De.include({toGeoJSON:function(e){var n=!_e(this._latlngs),a=qn(this._latlngs,n?1:0,!1,e);return Ni(this,{type:(n?"Multi":"")+"LineString",coordinates:a})}}),Ii.include({toGeoJSON:function(e){var n=!_e(this._latlngs),a=n&&!_e(this._latlngs[0]),c=qn(this._latlngs,a?2:n?1:0,!0,e);return n||(c=[c]),Ni(this,{type:(a?"Multi":"")+"Polygon",coordinates:c})}}),Pi.include({toMultiPoint:function(e){var n=[];return this.eachLayer(function(a){n.push(a.toGeoJSON(e).geometry.coordinates)}),Ni(this,{type:"MultiPoint",coordinates:n})},toGeoJSON:function(e){var n=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(n==="MultiPoint")return this.toMultiPoint(e);var a=n==="GeometryCollection",c=[];return this.eachLayer(function(d){if(d.toGeoJSON){var m=d.toGeoJSON(e);if(a)c.push(m.geometry);else{var x=Wn(m);x.type==="FeatureCollection"?c.push.apply(c,x.features):c.push(x)}}}),a?Ni(this,{geometries:c,type:"GeometryCollection"}):{type:"FeatureCollection",features:c}}});function Hr(e,n){return new Re(e,n)}var Kc=Hr,Gn=be.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(e,n,a){this._url=e,this._bounds=At(n),w(this,a)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(pt(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Rt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(e){return this.options.opacity=e,this._image&&this._updateOpacity(),this},setStyle:function(e){return e.opacity&&this.setOpacity(e.opacity),this},bringToFront:function(){return this._map&&Ei(this._image),this},bringToBack:function(){return this._map&&Ti(this._image),this},setUrl:function(e){return this._url=e,this._image&&(this._image.src=e),this},setBounds:function(e){return this._bounds=At(e),this._map&&this._reset(),this},getEvents:function(){var e={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var e=this._url.tagName==="IMG",n=this._image=e?this._url:xt("img");if(pt(n,"leaflet-image-layer"),this._zoomAnimated&&pt(n,"leaflet-zoom-animated"),this.options.className&&pt(n,this.options.className),n.onselectstart=_,n.onmousemove=_,n.onload=r(this.fire,this,"load"),n.onerror=r(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(n.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),e){this._url=n.src;return}n.src=this._url,n.alt=this.options.alt},_animateZoom:function(e){var n=this._map.getZoomScale(e.zoom),a=this._map._latLngBoundsToNewLayerBounds(this._bounds,e.zoom,e.center).min;ii(this._image,a,n)},_reset:function(){var e=this._image,n=new kt(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),a=n.getSize();Zt(e,n.min),e.style.width=a.x+"px",e.style.height=a.y+"px"},_updateOpacity:function(){me(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var e=this.options.errorOverlayUrl;e&&this._url!==e&&(this._url=e,this._image.src=e)},getCenter:function(){return this._bounds.getCenter()}}),Jc=function(e,n,a){return new Gn(e,n,a)},$r=Gn.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var e=this._url.tagName==="VIDEO",n=this._image=e?this._url:xt("video");if(pt(n,"leaflet-image-layer"),this._zoomAnimated&&pt(n,"leaflet-zoom-animated"),this.options.className&&pt(n,this.options.className),n.onselectstart=_,n.onmousemove=_,n.onloadeddata=r(this.fire,this,"load"),e){for(var a=n.getElementsByTagName("source"),c=[],d=0;d0?c:[n.src];return}P(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(n.style,"objectFit")&&(n.style.objectFit="fill"),n.autoplay=!!this.options.autoplay,n.loop=!!this.options.loop,n.muted=!!this.options.muted,n.playsInline=!!this.options.playsInline;for(var m=0;md?(n.height=d+"px",pt(e,m)):$t(e,m),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){var n=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),a=this._getAnchor();Zt(this._container,n.add(a))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var e=this._map,n=parseInt(Ki(this._container,"marginBottom"),10)||0,a=this._container.offsetHeight+n,c=this._containerWidth,d=new rt(this._containerLeft,-a-this._containerBottom);d._add(ni(this._container));var m=e.layerPointToContainerPoint(d),x=at(this.options.autoPanPadding),S=at(this.options.autoPanPaddingTopLeft||x),E=at(this.options.autoPanPaddingBottomRight||x),N=e.getSize(),V=0,ot=0;m.x+c+E.x>N.x&&(V=m.x+c-N.x+E.x),m.x-V-S.x<0&&(V=m.x-S.x),m.y+a+E.y>N.y&&(ot=m.y+a-N.y+E.y),m.y-ot-S.y<0&&(ot=m.y-S.y),(V||ot)&&(this.options.keepInView&&(this._autopanning=!0),e.fire("autopanstart").panBy([V,ot]))}},_getAnchor:function(){return at(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),eh=function(e,n){return new Un(e,n)};bt.mergeOptions({closePopupOnClick:!0}),bt.include({openPopup:function(e,n,a){return this._initOverlay(Un,e,n,a).openOn(this),this},closePopup:function(e){return e=arguments.length?e:this._popup,e&&e.close(),this}}),be.include({bindPopup:function(e,n){return this._popup=this._initOverlay(Un,this._popup,e,n),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(e){return this._popup&&(this instanceof Be||(this._popup._source=this),this._popup._prepareOpen(e||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(e){if(!(!this._popup||!this._map)){oi(e);var n=e.layer||e.target;if(this._popup._source===n&&!(n instanceof Ye)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(e.latlng);return}this._popup._source=n,this.openPopup(e.latlng)}},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){e.originalEvent.keyCode===13&&this._openPopup(e)}});var Vn=Te.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(e){Te.prototype.onAdd.call(this,e),this.setOpacity(this.options.opacity),e.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(e){Te.prototype.onRemove.call(this,e),e.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var e=Te.prototype.getEvents.call(this);return this.options.permanent||(e.preclick=this.close),e},_initLayout:function(){var e="leaflet-tooltip",n=e+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=xt("div",n),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+h(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var n,a,c=this._map,d=this._container,m=c.latLngToContainerPoint(c.getCenter()),x=c.layerPointToContainerPoint(e),S=this.options.direction,E=d.offsetWidth,N=d.offsetHeight,V=at(this.options.offset),ot=this._getAnchor();S==="top"?(n=E/2,a=N):S==="bottom"?(n=E/2,a=0):S==="center"?(n=E/2,a=N/2):S==="right"?(n=0,a=N/2):S==="left"?(n=E,a=N/2):x.xthis.options.maxZoom||ac?this._retainParent(d,m,x,c):!1)},_retainChildren:function(e,n,a,c){for(var d=2*e;d<2*e+2;d++)for(var m=2*n;m<2*n+2;m++){var x=new rt(d,m);x.z=a+1;var S=this._tileCoordsToKey(x),E=this._tiles[S];if(E&&E.active){E.retain=!0;continue}else E&&E.loaded&&(E.retain=!0);a+1this.options.maxZoom||this.options.minZoom!==void 0&&d1){this._setView(e,a);return}for(var ot=d.min.y;ot<=d.max.y;ot++)for(var _t=d.min.x;_t<=d.max.x;_t++){var ne=new rt(_t,ot);if(ne.z=this._tileZoom,!!this._isValidTile(ne)){var Gt=this._tiles[this._tileCoordsToKey(ne)];Gt?Gt.current=!0:x.push(ne)}}if(x.sort(function(re,Di){return re.distanceTo(m)-Di.distanceTo(m)}),x.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var ge=document.createDocumentFragment();for(_t=0;_ta.max.x)||!n.wrapLat&&(e.ya.max.y))return!1}if(!this.options.bounds)return!0;var c=this._tileCoordsToBounds(e);return At(this.options.bounds).overlaps(c)},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function(e){var n=this._map,a=this.getTileSize(),c=e.scaleBy(a),d=c.add(a),m=n.unproject(c,e.z),x=n.unproject(d,e.z);return[m,x]},_tileCoordsToBounds:function(e){var n=this._tileCoordsToNwSe(e),a=new Wt(n[0],n[1]);return this.options.noWrap||(a=this._map.wrapLatLngBounds(a)),a},_tileCoordsToKey:function(e){return e.x+":"+e.y+":"+e.z},_keyToTileCoords:function(e){var n=e.split(":"),a=new rt(+n[0],+n[1]);return a.z=+n[2],a},_removeTile:function(e){var n=this._tiles[e];n&&(Rt(n.el),delete this._tiles[e],this.fire("tileunload",{tile:n.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){pt(e,"leaflet-tile");var n=this.getTileSize();e.style.width=n.x+"px",e.style.height=n.y+"px",e.onselectstart=_,e.onmousemove=_,et.ielt9&&this.options.opacity<1&&me(e,this.options.opacity)},_addTile:function(e,n){var a=this._getTilePos(e),c=this._tileCoordsToKey(e),d=this.createTile(this._wrapCoords(e),r(this._tileReady,this,e));this._initTile(d),this.createTile.length<2&&nt(r(this._tileReady,this,e,null,d)),Zt(d,a),this._tiles[c]={el:d,coords:e,current:!0},n.appendChild(d),this.fire("tileloadstart",{tile:d,coords:e})},_tileReady:function(e,n,a){n&&this.fire("tileerror",{error:n,tile:a,coords:e});var c=this._tileCoordsToKey(e);a=this._tiles[c],a&&(a.loaded=+new Date,this._map._fadeAnimated?(me(a.el,0),tt(this._fadeFrame),this._fadeFrame=nt(this._updateOpacity,this)):(a.active=!0,this._pruneTiles()),n||(pt(a.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:a.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),et.ielt9||!this._map._fadeAnimated?nt(this._pruneTiles,this):setTimeout(r(this._pruneTiles,this),250)))},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var n=new rt(this._wrapX?f(e.x,this._wrapX):e.x,this._wrapY?f(e.y,this._wrapY):e.y);return n.z=e.z,n},_pxBoundsToTileRange:function(e){var n=this.getTileSize();return new kt(e.min.unscaleBy(n).floor(),e.max.unscaleBy(n).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var e in this._tiles)if(!this._tiles[e].loaded)return!1;return!0}});function sh(e){return new rn(e)}var Bi=rn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(e,n){this._url=e,n=w(this,n),n.detectRetina&&et.retina&&n.maxZoom>0?(n.tileSize=Math.floor(n.tileSize/2),n.zoomReverse?(n.zoomOffset--,n.minZoom=Math.min(n.maxZoom,n.minZoom+1)):(n.zoomOffset++,n.maxZoom=Math.max(n.minZoom,n.maxZoom-1)),n.minZoom=Math.max(0,n.minZoom)):n.zoomReverse?n.minZoom=Math.min(n.maxZoom,n.minZoom):n.maxZoom=Math.max(n.minZoom,n.maxZoom),typeof n.subdomains=="string"&&(n.subdomains=n.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(e,n){return this._url===e&&n===void 0&&(n=!0),this._url=e,n||this.redraw(),this},createTile:function(e,n){var a=document.createElement("img");return ut(a,"load",r(this._tileOnLoad,this,n,a)),ut(a,"error",r(this._tileOnError,this,n,a)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(a.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(a.referrerPolicy=this.options.referrerPolicy),a.alt="",a.src=this.getTileUrl(e),a},getTileUrl:function(e){var n={r:et.retina?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var a=this._globalTileRange.max.y-e.y;this.options.tms&&(n.y=a),n["-y"]=a}return R(this._url,i(n,this.options))},_tileOnLoad:function(e,n){et.ielt9?setTimeout(r(e,this,null,n),0):e(null,n)},_tileOnError:function(e,n,a){var c=this.options.errorTileUrl;c&&n.getAttribute("src")!==c&&(n.src=c),e(a,n)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,n=this.options.maxZoom,a=this.options.zoomReverse,c=this.options.zoomOffset;return a&&(e=n-e),e+c},_getSubdomain:function(e){var n=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[n]},_abortLoading:function(){var e,n;for(e in this._tiles)if(this._tiles[e].coords.z!==this._tileZoom&&(n=this._tiles[e].el,n.onload=_,n.onerror=_,!n.complete)){n.src=Z;var a=this._tiles[e].coords;Rt(n),delete this._tiles[e],this.fire("tileabort",{tile:n,coords:a})}},_removeTile:function(e){var n=this._tiles[e];if(n)return n.el.setAttribute("src",Z),rn.prototype._removeTile.call(this,e)},_tileReady:function(e,n,a){if(!(!this._map||a&&a.getAttribute("src")===Z))return rn.prototype._tileReady.call(this,e,n,a)}});function qr(e,n){return new Bi(e,n)}var Wr=Bi.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(e,n){this._url=e;var a=i({},this.defaultWmsParams);for(var c in n)c in this.options||(a[c]=n[c]);n=w(this,n);var d=n.detectRetina&&et.retina?2:1,m=this.getTileSize();a.width=m.x*d,a.height=m.y*d,this.wmsParams=a},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var n=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[n]=this._crs.code,Bi.prototype.onAdd.call(this,e)},getTileUrl:function(e){var n=this._tileCoordsToNwSe(e),a=this._crs,c=zt(a.project(n[0]),a.project(n[1])),d=c.min,m=c.max,x=(this._wmsVersion>=1.3&&this._crs===Rr?[d.y,d.x,m.y,m.x]:[d.x,d.y,m.x,m.y]).join(","),S=Bi.prototype.getTileUrl.call(this,e);return S+b(this.wmsParams,S,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+x},setParams:function(e,n){return i(this.wmsParams,e),n||this.redraw(),this}});function oh(e,n){return new Wr(e,n)}Bi.WMS=Wr,qr.wms=oh;var ze=be.extend({options:{padding:.1},initialize:function(e){w(this,e),h(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),pt(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(e.zoomanim=this._onAnimZoom),e},_onAnimZoom:function(e){this._updateTransform(e.center,e.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(e,n){var a=this._map.getZoomScale(n,this._zoom),c=this._map.getSize().multiplyBy(.5+this.options.padding),d=this._map.project(this._center,n),m=c.multiplyBy(-a).add(d).subtract(this._map._getNewPixelOrigin(e,n));et.any3d?ii(this._container,m,a):Zt(this._container,m)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var e in this._layers)this._layers[e]._reset()},_onZoomEnd:function(){for(var e in this._layers)this._layers[e]._project()},_updatePaths:function(){for(var e in this._layers)this._layers[e]._update()},_update:function(){var e=this.options.padding,n=this._map.getSize(),a=this._map.containerPointToLayerPoint(n.multiplyBy(-e)).round();this._bounds=new kt(a,a.add(n.multiplyBy(1+e*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Gr=ze.extend({options:{tolerance:0},getEvents:function(){var e=ze.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ze.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=document.createElement("canvas");ut(e,"mousemove",this._onMouseMove,this),ut(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ut(e,"mouseout",this._handleMouseOut,this),e._leaflet_disable_events=!0,this._ctx=e.getContext("2d")},_destroyContainer:function(){tt(this._redrawRequest),delete this._ctx,Rt(this._container),Tt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var e;this._redrawBounds=null;for(var n in this._layers)e=this._layers[n],e._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ze.prototype._update.call(this);var e=this._bounds,n=this._container,a=e.getSize(),c=et.retina?2:1;Zt(n,e.min),n.width=c*a.x,n.height=c*a.y,n.style.width=a.x+"px",n.style.height=a.y+"px",et.retina&&this._ctx.scale(2,2),this._ctx.translate(-e.min.x,-e.min.y),this.fire("update")}},_reset:function(){ze.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),this._layers[h(e)]=e;var n=e._order={layer:e,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=n),this._drawLast=n,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(e){this._requestRedraw(e)},_removePath:function(e){var n=e._order,a=n.next,c=n.prev;a?a.prev=c:this._drawLast=c,c?c.next=a:this._drawFirst=a,delete e._order,delete this._layers[h(e)],this._requestRedraw(e)},_updatePath:function(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)},_updateStyle:function(e){this._updateDashArray(e),this._requestRedraw(e)},_updateDashArray:function(e){if(typeof e.options.dashArray=="string"){var n=e.options.dashArray.split(/[, ]+/),a=[],c,d;for(d=0;d')}}catch{}return function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),rh={_initContainer:function(){this._container=xt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ze.prototype._update.call(this),this.fire("update"))},_initPath:function(e){var n=e._container=an("shape");pt(n,"leaflet-vml-shape "+(this.options.className||"")),n.coordsize="1 1",e._path=an("path"),n.appendChild(e._path),this._updateStyle(e),this._layers[h(e)]=e},_addPath:function(e){var n=e._container;this._container.appendChild(n),e.options.interactive&&e.addInteractiveTarget(n)},_removePath:function(e){var n=e._container;Rt(n),e.removeInteractiveTarget(n),delete this._layers[h(e)]},_updateStyle:function(e){var n=e._stroke,a=e._fill,c=e.options,d=e._container;d.stroked=!!c.stroke,d.filled=!!c.fill,c.stroke?(n||(n=e._stroke=an("stroke")),d.appendChild(n),n.weight=c.weight+"px",n.color=c.color,n.opacity=c.opacity,c.dashArray?n.dashStyle=P(c.dashArray)?c.dashArray.join(" "):c.dashArray.replace(/( *, *)/g," "):n.dashStyle="",n.endcap=c.lineCap.replace("butt","flat"),n.joinstyle=c.lineJoin):n&&(d.removeChild(n),e._stroke=null),c.fill?(a||(a=e._fill=an("fill")),d.appendChild(a),a.color=c.fillColor||c.color,a.opacity=c.fillOpacity):a&&(d.removeChild(a),e._fill=null)},_updateCircle:function(e){var n=e._point.round(),a=Math.round(e._radius),c=Math.round(e._radiusY||a);this._setPath(e,e._empty()?"M0 0":"AL "+n.x+","+n.y+" "+a+","+c+" 0,"+65535*360)},_setPath:function(e,n){e._path.v=n},_bringToFront:function(e){Ei(e._container)},_bringToBack:function(e){Ti(e._container)}},Yn=et.vml?an:Y,ln=ze.extend({_initContainer:function(){this._container=Yn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Yn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Rt(this._container),Tt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ze.prototype._update.call(this);var e=this._bounds,n=e.getSize(),a=this._container;(!this._svgSize||!this._svgSize.equals(n))&&(this._svgSize=n,a.setAttribute("width",n.x),a.setAttribute("height",n.y)),Zt(a,e.min),a.setAttribute("viewBox",[e.min.x,e.min.y,n.x,n.y].join(" ")),this.fire("update")}},_initPath:function(e){var n=e._path=Yn("path");e.options.className&&pt(n,e.options.className),e.options.interactive&&pt(n,"leaflet-interactive"),this._updateStyle(e),this._layers[h(e)]=e},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){Rt(e._path),e.removeInteractiveTarget(e._path),delete this._layers[h(e)]},_updatePath:function(e){e._project(),e._update()},_updateStyle:function(e){var n=e._path,a=e.options;n&&(a.stroke?(n.setAttribute("stroke",a.color),n.setAttribute("stroke-opacity",a.opacity),n.setAttribute("stroke-width",a.weight),n.setAttribute("stroke-linecap",a.lineCap),n.setAttribute("stroke-linejoin",a.lineJoin),a.dashArray?n.setAttribute("stroke-dasharray",a.dashArray):n.removeAttribute("stroke-dasharray"),a.dashOffset?n.setAttribute("stroke-dashoffset",a.dashOffset):n.removeAttribute("stroke-dashoffset")):n.setAttribute("stroke","none"),a.fill?(n.setAttribute("fill",a.fillColor||a.color),n.setAttribute("fill-opacity",a.fillOpacity),n.setAttribute("fill-rule",a.fillRule||"evenodd")):n.setAttribute("fill","none"))},_updatePoly:function(e,n){this._setPath(e,A(e._parts,n))},_updateCircle:function(e){var n=e._point,a=Math.max(Math.round(e._radius),1),c=Math.max(Math.round(e._radiusY),1)||a,d="a"+a+","+c+" 0 1,0 ",m=e._empty()?"M0 0":"M"+(n.x-a)+","+n.y+d+a*2+",0 "+d+-a*2+",0 ";this._setPath(e,m)},_setPath:function(e,n){e._path.setAttribute("d",n)},_bringToFront:function(e){Ei(e._path)},_bringToBack:function(e){Ti(e._path)}});et.vml&&ln.include(rh);function Vr(e){return et.svg||et.vml?new ln(e):null}bt.include({getRenderer:function(e){var n=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer;return n||(n=this._renderer=this._createRenderer()),this.hasLayer(n)||this.addLayer(n),n},_getPaneRenderer:function(e){if(e==="overlayPane"||e===void 0)return!1;var n=this._paneRenderers[e];return n===void 0&&(n=this._createRenderer({pane:e}),this._paneRenderers[e]=n),n},_createRenderer:function(e){return this.options.preferCanvas&&Ur(e)||Vr(e)}});var Yr=Ii.extend({initialize:function(e,n){Ii.prototype.initialize.call(this,this._boundsToLatLngs(e),n)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return e=At(e),[e.getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});function ah(e,n){return new Yr(e,n)}ln.create=Yn,ln.pointsToPath=A,Re.geometryToLayer=Fn,Re.coordsToLatLng=uo,Re.coordsToLatLngs=Zn,Re.latLngToCoords=po,Re.latLngsToCoords=qn,Re.getFeature=Ni,Re.asFeature=Wn,bt.mergeOptions({boxZoom:!0});var Xr=Ee.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._resetStateTimeout=0,e.on("unload",this._destroy,this)},addHooks:function(){ut(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Tt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Rt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(e){if(!e.shiftKey||e.which!==1&&e.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Ji(),Ys(),this._startPoint=this._map.mouseEventToContainerPoint(e),ut(document,{contextmenu:oi,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=xt("div","leaflet-zoom-box",this._container),pt(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(e);var n=new kt(this._point,this._startPoint),a=n.getSize();Zt(this._box,n.min),this._box.style.width=a.x+"px",this._box.style.height=a.y+"px"},_finish:function(){this._moved&&(Rt(this._box),$t(this._container,"leaflet-crosshair")),Qi(),Xs(),Tt(document,{contextmenu:oi,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){if(!(e.which!==1&&e.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(r(this._resetState,this),0);var n=new Wt(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(n).fire("boxzoomend",{boxZoomBounds:n})}},_onKeyDown:function(e){e.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});bt.addInitHook("addHandler","boxZoom",Xr),bt.mergeOptions({doubleClickZoom:!0});var jr=Ee.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(e){var n=this._map,a=n.getZoom(),c=n.options.zoomDelta,d=e.originalEvent.shiftKey?a-c:a+c;n.options.doubleClickZoom==="center"?n.setZoom(d):n.setZoomAround(e.containerPoint,d)}});bt.addInitHook("addHandler","doubleClickZoom",jr),bt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Kr=Ee.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new Ve(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),e.on("zoomend",this._onZoomEnd,this),e.whenReady(this._onZoomEnd,this))}pt(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){$t(this._map._container,"leaflet-grab"),$t(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var e=this._map;if(e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var n=At(this._map.options.maxBounds);this._offsetLimit=zt(this._map.latLngToContainerPoint(n.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(n.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(e){if(this._map.options.inertia){var n=this._lastTime=+new Date,a=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(a),this._times.push(n),this._prunePositions(n)}this._map.fire("move",e).fire("drag",e)},_prunePositions:function(e){for(;this._positions.length>1&&e-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var e=this._map.getSize().divideBy(2),n=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=n.subtract(e).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(e,n){return e-(e-n)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var e=this._draggable._newPos.subtract(this._draggable._startPos),n=this._offsetLimit;e.xn.max.x&&(e.x=this._viscousLimit(e.x,n.max.x)),e.y>n.max.y&&(e.y=this._viscousLimit(e.y,n.max.y)),this._draggable._newPos=this._draggable._startPos.add(e)}},_onPreDragWrap:function(){var e=this._worldWidth,n=Math.round(e/2),a=this._initialWorldOffset,c=this._draggable._newPos.x,d=(c-n+a)%e+n-a,m=(c+n+a)%e-n-a,x=Math.abs(d+a)0?m:-m))-n;this._delta=0,this._startTime=null,x&&(e.options.scrollWheelZoom==="center"?e.setZoom(n+x):e.setZoomAround(this._lastMousePos,n+x))}});bt.addInitHook("addHandler","scrollWheelZoom",Qr);var lh=600;bt.mergeOptions({tapHold:et.touchNative&&et.safari&&et.mobile,tapTolerance:15});var ta=Ee.extend({addHooks:function(){ut(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Tt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){if(clearTimeout(this._holdTimeout),e.touches.length===1){var n=e.touches[0];this._startPos=this._newPos=new rt(n.clientX,n.clientY),this._holdTimeout=setTimeout(r(function(){this._cancel(),this._isTapValid()&&(ut(document,"touchend",Kt),ut(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",n))},this),lh),ut(document,"touchend touchcancel contextmenu",this._cancel,this),ut(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function e(){Tt(document,"touchend",Kt),Tt(document,"touchend touchcancel",e)},_cancel:function(){clearTimeout(this._holdTimeout),Tt(document,"touchend touchcancel contextmenu",this._cancel,this),Tt(document,"touchmove",this._onMove,this)},_onMove:function(e){var n=e.touches[0];this._newPos=new rt(n.clientX,n.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(e,n){var a=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY});a._simulated=!0,n.target.dispatchEvent(a)}});bt.addInitHook("addHandler","tapHold",ta),bt.mergeOptions({touchZoom:et.touch,bounceAtZoomLimits:!0});var ea=Ee.extend({addHooks:function(){pt(this._map._container,"leaflet-touch-zoom"),ut(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){$t(this._map._container,"leaflet-touch-zoom"),Tt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){var n=this._map;if(!(!e.touches||e.touches.length!==2||n._animatingZoom||this._zooming)){var a=n.mouseEventToContainerPoint(e.touches[0]),c=n.mouseEventToContainerPoint(e.touches[1]);this._centerPoint=n.getSize()._divideBy(2),this._startLatLng=n.containerPointToLatLng(this._centerPoint),n.options.touchZoom!=="center"&&(this._pinchStartLatLng=n.containerPointToLatLng(a.add(c)._divideBy(2))),this._startDist=a.distanceTo(c),this._startZoom=n.getZoom(),this._moved=!1,this._zooming=!0,n._stop(),ut(document,"touchmove",this._onTouchMove,this),ut(document,"touchend touchcancel",this._onTouchEnd,this),Kt(e)}},_onTouchMove:function(e){if(!(!e.touches||e.touches.length!==2||!this._zooming)){var n=this._map,a=n.mouseEventToContainerPoint(e.touches[0]),c=n.mouseEventToContainerPoint(e.touches[1]),d=a.distanceTo(c)/this._startDist;if(this._zoom=n.getScaleZoom(d,this._startZoom),!n.options.bounceAtZoomLimits&&(this._zoomn.getMaxZoom()&&d>1)&&(this._zoom=n._limitZoom(this._zoom)),n.options.touchZoom==="center"){if(this._center=this._startLatLng,d===1)return}else{var m=a._add(c)._divideBy(2)._subtract(this._centerPoint);if(d===1&&m.x===0&&m.y===0)return;this._center=n.unproject(n.project(this._pinchStartLatLng,this._zoom).subtract(m),this._zoom)}this._moved||(n._moveStart(!0,!1),this._moved=!0),tt(this._animRequest);var x=r(n._move,n,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=nt(x,this,!0),Kt(e)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,tt(this._animRequest),Tt(document,"touchmove",this._onTouchMove,this),Tt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});bt.addInitHook("addHandler","touchZoom",ea),bt.BoxZoom=Xr,bt.DoubleClickZoom=jr,bt.Drag=Kr,bt.Keyboard=Jr,bt.ScrollWheelZoom=Qr,bt.TapHold=ta,bt.TouchZoom=ea,s.Bounds=kt,s.Browser=et,s.CRS=le,s.Canvas=Gr,s.Circle=ho,s.CircleMarker=$n,s.Class=Et,s.Control=ve,s.DivIcon=Zr,s.DivOverlay=Te,s.DomEvent=Sc,s.DomUtil=kc,s.Draggable=Ve,s.Evented=Yt,s.FeatureGroup=Be,s.GeoJSON=Re,s.GridLayer=rn,s.Handler=Ee,s.Icon=Ai,s.ImageOverlay=Gn,s.LatLng=yt,s.LatLngBounds=Wt,s.Layer=be,s.LayerGroup=Pi,s.LineUtil=Hc,s.Map=bt,s.Marker=Hn,s.Mixin=Nc,s.Path=Ye,s.Point=rt,s.PolyUtil=Bc,s.Polygon=Ii,s.Polyline=De,s.Popup=Un,s.PosAnimation=kr,s.Projection=$c,s.Rectangle=Yr,s.Renderer=ze,s.SVG=ln,s.SVGOverlay=Fr,s.TileLayer=Bi,s.Tooltip=Vn,s.Transformation=fe,s.Util=Ct,s.VideoOverlay=$r,s.bind=r,s.bounds=zt,s.canvas=Ur,s.circle=Yc,s.circleMarker=Vc,s.control=nn,s.divIcon=nh,s.extend=i,s.featureGroup=Wc,s.geoJSON=Hr,s.geoJson=Kc,s.gridLayer=sh,s.icon=Gc,s.imageOverlay=Jc,s.latLng=ft,s.latLngBounds=At,s.layerGroup=qc,s.map=Mc,s.marker=Uc,s.point=at,s.polygon=jc,s.polyline=Xc,s.popup=eh,s.rectangle=ah,s.setOptions=w,s.stamp=h,s.svg=Vr,s.svgOverlay=th,s.tileLayer=qr,s.tooltip=ih,s.transformation=k,s.version=t,s.videoOverlay=Qc;var ch=window.L;s.noConflict=function(){return window.L=ch,this},window.L=s})});var np=Lh(aa());var Kn=globalThis,Jn=Kn.ShadowRoot&&(Kn.ShadyCSS===void 0||Kn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,_o=Symbol(),la=new WeakMap,cn=class{constructor(t,i,o){if(this._$cssResult$=!0,o!==_o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i}get styleSheet(){let t=this.o,i=this.t;if(Jn&&t===void 0){let o=i!==void 0&&i.length===1;o&&(t=la.get(i)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&la.set(i,t))}return t}toString(){return this.cssText}},ca=s=>new cn(typeof s=="string"?s:s+"",void 0,_o),hn=(s,...t)=>{let i=s.length===1?s[0]:t.reduce((o,r,l)=>o+(h=>{if(h._$cssResult$===!0)return h.cssText;if(typeof h=="number")return h;throw Error("Value passed to 'css' function must be a 'css' function result: "+h+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+s[l+1],s[0]);return new cn(i,s,_o)},ha=(s,t)=>{if(Jn)s.adoptedStyleSheets=t.map(i=>i instanceof CSSStyleSheet?i:i.styleSheet);else for(let i of t){let o=document.createElement("style"),r=Kn.litNonce;r!==void 0&&o.setAttribute("nonce",r),o.textContent=i.cssText,s.appendChild(o)}},go=Jn?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let i="";for(let o of t.cssRules)i+=o.cssText;return ca(i)})(s):s;var{is:Sh,defineProperty:Mh,getOwnPropertyDescriptor:Eh,getOwnPropertyNames:Th,getOwnPropertySymbols:Ph,getPrototypeOf:Ah}=Object,Qn=globalThis,da=Qn.trustedTypes,Ih=da?da.emptyScript:"",Nh=Qn.reactiveElementPolyfillSupport,dn=(s,t)=>s,yo={toAttribute(s,t){switch(t){case Boolean:s=s?Ih:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let i=s;switch(t){case Boolean:i=s!==null;break;case Number:i=s===null?null:Number(s);break;case Object:case Array:try{i=JSON.parse(s)}catch{i=null}}return i}},pa=(s,t)=>!Sh(s,t),ua={attribute:!0,type:String,converter:yo,reflect:!1,useDefault:!1,hasChanged:pa};Symbol.metadata??=Symbol("metadata"),Qn.litPropertyMetadata??=new WeakMap;var Oe=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,i=ua){if(i.state&&(i.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((i=Object.create(i)).wrapped=!0),this.elementProperties.set(t,i),!i.noAccessor){let o=Symbol(),r=this.getPropertyDescriptor(t,o,i);r!==void 0&&Mh(this.prototype,t,r)}}static getPropertyDescriptor(t,i,o){let{get:r,set:l}=Eh(this.prototype,t)??{get(){return this[i]},set(h){this[i]=h}};return{get:r,set(h){let u=r?.call(this);l?.call(this,h),this.requestUpdate(t,u,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??ua}static _$Ei(){if(this.hasOwnProperty(dn("elementProperties")))return;let t=Ah(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(dn("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(dn("properties"))){let i=this.properties,o=[...Th(i),...Ph(i)];for(let r of o)this.createProperty(r,i[r])}let t=this[Symbol.metadata];if(t!==null){let i=litPropertyMetadata.get(t);if(i!==void 0)for(let[o,r]of i)this.elementProperties.set(o,r)}this._$Eh=new Map;for(let[i,o]of this.elementProperties){let r=this._$Eu(i,o);r!==void 0&&this._$Eh.set(r,i)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let i=[];if(Array.isArray(t)){let o=new Set(t.flat(1/0).reverse());for(let r of o)i.unshift(go(r))}else t!==void 0&&i.push(go(t));return i}static _$Eu(t,i){let o=i.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,i=this.constructor.elementProperties;for(let o of i.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ha(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,i,o){this._$AK(t,o)}_$ET(t,i){let o=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,o);if(r!==void 0&&o.reflect===!0){let l=(o.converter?.toAttribute!==void 0?o.converter:yo).toAttribute(i,o.type);this._$Em=t,l==null?this.removeAttribute(r):this.setAttribute(r,l),this._$Em=null}}_$AK(t,i){let o=this.constructor,r=o._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let l=o.getPropertyOptions(r),h=typeof l.converter=="function"?{fromAttribute:l.converter}:l.converter?.fromAttribute!==void 0?l.converter:yo;this._$Em=r;let u=h.fromAttribute(i,l.type);this[r]=u??this._$Ej?.get(r)??u,this._$Em=null}}requestUpdate(t,i,o,r=!1,l){if(t!==void 0){let h=this.constructor;if(r===!1&&(l=this[t]),o??=h.getPropertyOptions(t),!((o.hasChanged??pa)(l,i)||o.useDefault&&o.reflect&&l===this._$Ej?.get(t)&&!this.hasAttribute(h._$Eu(t,o))))return;this.C(t,i,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,i,{useDefault:o,reflect:r,wrapped:l},h){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,h??i??this[t]),l!==!0||h!==void 0)||(this._$AL.has(t)||(this.hasUpdated||o||(i=void 0),this._$AL.set(t,i)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(i){Promise.reject(i)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,l]of this._$Ep)this[r]=l;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[r,l]of o){let{wrapped:h}=l,u=this[r];h!==!0||this._$AL.has(r)||u===void 0||this.C(r,void 0,l,u)}}let t=!1,i=this._$AL;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(i)):this._$EM()}catch(o){throw t=!1,this._$EM(),o}t&&this._$AE(i)}willUpdate(t){}_$AE(t){this._$EO?.forEach(i=>i.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(i=>this._$ET(i,this[i])),this._$EM()}updated(t){}firstUpdated(t){}};Oe.elementStyles=[],Oe.shadowRootOptions={mode:"open"},Oe[dn("elementProperties")]=new Map,Oe[dn("finalized")]=new Map,Nh?.({ReactiveElement:Oe}),(Qn.reactiveElementVersions??=[]).push("2.1.2");var bo=globalThis,fa=s=>s,ts=bo.trustedTypes,ma=ts?ts.createPolicy("lit-html",{createHTML:s=>s}):void 0,wo="$lit$",He=`lit$${Math.random().toFixed(9).slice(2)}$`,xo="?"+He,Bh=`<${xo}>`,ci=document,pn=()=>ci.createComment(""),fn=s=>s===null||typeof s!="object"&&typeof s!="function",Co=Array.isArray,wa=s=>Co(s)||typeof s?.[Symbol.iterator]=="function",vo=`[ +\f\r]`,un=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_a=/-->/g,ga=/>/g,ai=RegExp(`>|${vo}(?:([^\\s"'>=/]+)(${vo}*=${vo}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),ya=/'/g,va=/"/g,xa=/^(?:script|style|textarea|title)$/i,ko=s=>(t,...i)=>({_$litType$:s,strings:t,values:i}),Pe=ko(1),se=ko(2),lp=ko(3),$e=Symbol.for("lit-noChange"),Mt=Symbol.for("lit-nothing"),ba=new WeakMap,li=ci.createTreeWalker(ci,129);function Ca(s,t){if(!Co(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return ma!==void 0?ma.createHTML(t):t}var ka=(s,t)=>{let i=s.length-1,o=[],r,l=t===2?"":t===3?"":"",h=un;for(let u=0;u"?(h=r??un,y=-1):g[1]===void 0?y=-2:(y=h.lastIndex-g[2].length,_=g[1],h=g[3]===void 0?ai:g[3]==='"'?va:ya):h===va||h===ya?h=ai:h===_a||h===ga?h=un:(h=ai,r=void 0);let w=h===ai&&s[u+1].startsWith("/>")?" ":"";l+=h===un?f+Bh:y>=0?(o.push(_),f.slice(0,y)+wo+f.slice(y)+He+w):f+He+(y===-2?u:w)}return[Ca(s,l+(s[i]||"")+(t===2?"":t===3?"":"")),o]},mn=class s{constructor({strings:t,_$litType$:i},o){let r;this.parts=[];let l=0,h=0,u=t.length-1,f=this.parts,[_,g]=ka(t,i);if(this.el=s.createElement(_,o),li.currentNode=this.el.content,i===2||i===3){let y=this.el.content.firstChild;y.replaceWith(...y.childNodes)}for(;(r=li.nextNode())!==null&&f.length0){r.textContent=ts?ts.emptyScript:"";for(let w=0;w2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=Mt}_$AI(t,i=this,o,r){let l=this.strings,h=!1;if(l===void 0)t=hi(this,t,i,0),h=!fn(t)||t!==this._$AH&&t!==$e,h&&(this._$AH=t);else{let u=t,f,_;for(t=l[0],f=0;f{let o=i?.renderBefore??t,r=o._$litPart$;if(r===void 0){let l=i?.renderBefore??null;o._$litPart$=r=new Ri(t.insertBefore(pn(),l),l,void 0,i??{})}return r._$AI(s),r};var Lo=globalThis,Ae=class extends Oe{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Sa(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return $e}};Ae._$litElement$=!0,Ae.finalized=!0,Lo.litElementHydrateSupport?.({LitElement:Ae});var Rh=Lo.litElementPolyfillSupport;Rh?.({LitElement:Ae});(Lo.litElementVersions??=[]).push("4.2.2");function So(s,t,i){return s?t(s):i?.(s)}var Mo=s=>s??Mt;var rs={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},_n=s=>(...t)=>({_$litDirective$:s,values:t}),zi=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,o){this._$Ct=t,this._$AM=i,this._$Ci=o}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}};var Ma=_n(class extends zi{constructor(s){if(super(s),s.type!==rs.ATTRIBUTE||s.name!=="class"||s.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(t=>s[t]).join(" ")+" "}update(s,[t]){if(this.st===void 0){this.st=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(let o in t)t[o]&&!this.nt?.has(o)&&this.st.add(o);return this.render(t)}let i=s.element.classList;for(let o of this.st)o in t||(i.remove(o),this.st.delete(o));for(let o in t){let r=!!t[o];r===this.st.has(o)||this.nt?.has(o)||(r?(i.add(o),this.st.add(o)):(i.remove(o),this.st.delete(o)))}return $e}});var{I:Rp}=La;var Ea=s=>s.strings===void 0;var gn=(s,t)=>{let i=s._$AN;if(i===void 0)return!1;for(let o of i)o._$AO?.(t,!1),gn(o,t);return!0},as=s=>{let t,i;do{if((t=s._$AM)===void 0)break;i=t._$AN,i.delete(s),s=t}while(i?.size===0)},Ta=s=>{for(let t;t=s._$AM;s=t){let i=t._$AN;if(i===void 0)t._$AN=i=new Set;else if(i.has(s))break;i.add(s),Hh(t)}};function zh(s){this._$AN!==void 0?(as(this),this._$AM=s,Ta(this)):this._$AM=s}function Oh(s,t=!1,i=0){let o=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(t)if(Array.isArray(o))for(let l=i;l{s.type==rs.CHILD&&(s._$AP??=Oh,s._$AQ??=zh)},ls=class extends zi{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,i,o){super._$AT(t,i,o),Ta(this),this.isConnected=t._$AU}_$AO(t,i=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),i&&(gn(this,t),as(this))}setValue(t){if(Ea(this._$Ct))this._$Ct._$AI(t,this);else{let i=[...this._$Ct._$AH];i[this._$Ci]=t,this._$Ct._$AI(i,this,0)}}disconnected(){}reconnected(){}};var cs=()=>new To,To=class{},Eo=new WeakMap,hs=_n(class extends ls{render(s){return Mt}update(s,[t]){let i=t!==this.G;return i&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.G=t,this.ht=s.options?.host,this.rt(this.ct=s.element)),Mt}rt(s){if(this.G!==void 0)if(this.isConnected||(s=void 0),typeof this.G=="function"){let t=this.ht??globalThis,i=Eo.get(t);i===void 0&&(i=new WeakMap,Eo.set(t,i)),i.get(this.G)!==void 0&&this.G.call(this.ht,void 0),i.set(this.G,s),s!==void 0&&this.G.call(this.ht,s)}else this.G.value=s}get lt(){return typeof this.G=="function"?Eo.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});function Jt(s,t,i,o,r=0,l=0){return[(t-l-o)*i,(s-r)*i]}function Ut(s,t,i,o,r,l,h=0,u=0){return[[(t-u-l)*r,(s-h)*r],[(o-u-l)*r,(i-h)*r]]}function we(s,t,i,o,r=0,l=0){return{dbuX:Math.round(r+t/i),dbuY:Math.round(l+o+s/i)}}function $h(s){return!Number.isFinite(s)||s<=1?1:Math.round(Math.min(s,3)*100)/100}var Fe=240,Fh=256,Ze="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Po=Fe;function xe(){return Po}function Pa(){Po=Fh}var jp=1/64,Ao=120;function Aa(s){Po=s}function ui(s){let t={...s||{}};return t.tileSize===void 0&&(t.tileSize=xe()),t}function ds(s,t){return Math.max(1,Math.round(s*t))}function Oi(){let s=typeof window<"u"&&window.devicePixelRatio?window.devicePixelRatio:1;return!Number.isFinite(s)||s<=1?1:Math.min(s,3)}function Hi(s,t=xe()){return{dpr:$h(s),tile_px:ds(t,s)}}function us(s,t,i,o,r=xe()){let{visibility:l,selectability:h,visibleLayers:u,selectableLayers:f,app:_}=i,g={};for(let[v,w]of Object.entries(l||{}))g[v]=!!w;if(h)for(let[v,w]of Object.entries(h))g["s_"+v]=!!w;let y={type:"tile",layer:t,z:s.z,x:s.x,y:s.y,...Hi(o,r),visible_layers:u?[...u]:[],selectable_layers:f?[...f]:[],...g};if(_&&_.visibleChiplets instanceof Set&&(y.visible_chiplets=[..._.visibleChiplets]),_&&_.layerPatterns){let v=_.layerPatterns[t];v!==void 0&&v!==1&&(y.pattern=v)}return y}function Ia(s){if(typeof window>"u"||typeof window.matchMedia!="function"||typeof s!="function")return()=>{};let t=!1,i=null,o=null,r=()=>{if(t)return;let l=window.devicePixelRatio||1;i=window.matchMedia(`(resolution: ${l}dppx)`),o=()=>{t||(r(),s(window.devicePixelRatio||1))},i.addEventListener("change",o,{once:!0})};return r(),()=>{t=!0,i&&o&&i.removeEventListener("change",o),i=null,o=null}}function $i(s,t){let i=s&&s._map?s._map.getZoom():t;return Math.floor(i)}function wt(s){return!!s?.websocketManager?.isStaticMode}function Ra(s){let t=s?.protocol==="https:"?"wss":"ws",i=s?.host||"localhost:8080";return`${t}://${i}/ws`}function za(s,t){let i={};for(let[o,r]of Object.entries(s||{}))i[o]=!!r;for(let[o,r]of Object.entries(t||{}))i["s_"+o]=!!r;return i}function Fi(s,t){t&&typeof t.sel_has_inst=="boolean"&&(s.selHasInst=t.sel_has_inst,s.selHasNet=!!t.sel_has_net)}var Io=null;function Ce(s,t=4e3){let i=document.getElementById("or-toast");return i||(i=document.createElement("div"),i.id="or-toast",document.body.appendChild(i)),i.textContent=s,i.classList.add("visible"),Io&&clearTimeout(Io),Io=setTimeout(()=>i.classList.remove("visible"),t),i}function Oa({title:s,message:t,confirmLabel:i="OK",danger:o=!1}){return new Promise(r=>{let l=document.createElement("div");l.className="or-modal-overlay";let h=document.createElement("div");h.className="or-modal";let u=document.createElement("div");u.className="or-modal-title",u.textContent=s;let f=document.createElement("div");f.className="or-modal-message",f.textContent=t;let _=document.createElement("div");_.className="or-modal-buttons";let g=document.createElement("button");g.className="or-btn",g.textContent="Cancel";let y=document.createElement("button");y.className="or-btn"+(o?" or-btn-danger":""),y.textContent=i;let v=b=>{document.removeEventListener("keydown",w,!0),l.remove(),r(b)},w=b=>{b.key==="Escape"&&(b.stopPropagation(),v(!1))};g.addEventListener("click",()=>v(!1)),y.addEventListener("click",()=>v(!0)),l.addEventListener("click",b=>{b.target===l&&v(!1)}),document.addEventListener("keydown",w,!0),_.appendChild(g),_.appendChild(y),h.appendChild(u),h.appendChild(f),h.appendChild(_),l.appendChild(h),document.body.appendChild(l),g.focus()})}var Zh=.05;function qh([[s,t],[i,o]],r){let l=(o-t)*r,h=(i-s)*r;return[[s-h,t-l],[i+h,o+l]]}function No(s,t=256,i=null){if(!Na(s))return null;let o=s[0][0],r=s[0][1],l=Math.max(s[1][1]-r,s[1][0]-o),h=t/l,u=Na(i)?i:s,[[f,_],[g,y]]=qh(u,Zh);return{scale:h,maxDXDY:l,originX:r,originY:o,fitBounds:Ut(_,f,y,g,h,l,r,o)}}function Na(s){return!!s&&s[1][0]>s[0][0]&&s[1][1]>s[0][1]}function Ha(s,t){return!!s&&!!t&&s[0][0]===t[0][0]&&s[0][1]===t[0][1]&&s[1][0]===t[1][0]&&s[1][1]===t[1][1]}function ae(s){s.selectionToken=(s.selectionToken||0)+1;for(let t of s.selectionResetters||[])t();return s.selectionToken}function he(s,t){return s.selectionToken===t}function $a(s,t){s.selectionResetters||(s.selectionResetters=[]),s.selectionResetters.push(t)}function Fa(s=typeof L<"u"?L.CRS.Simple:void 0,t={}){return{crs:s,zoom:1,zoomSnap:1,zoomDelta:1,fadeAnimation:!1,attributionControl:!1,scrollWheelZoom:t.wheelZoom!==!1,keyboardPanDelta:Zi(t.arrowStep)}}var Bo=80,yn=10,vn=1e3;function Zi(s){let t=s===""||s===null?NaN:Math.round(Number(s));return Number.isFinite(t)?Math.min(vn,Math.max(yn,t)):Bo}function Za(s,t){s?.keyboard?._setPanDelta?.(t)}function pi(s="vis-group-header"){let t=document.createElement("div");t.className=s;let i=document.createElement("span");i.className="vis-arrow",t.appendChild(i);let o=document.createElement("span");return o.className="vis-name",t.appendChild(o),{header:t,arrow:i,name:o}}function fi(s,t,i,o){let r=l=>{i.classList.toggle("collapsed",l),t.textContent=l?"\u25B6":"\u25BC"};r(!!o),s.addEventListener("click",l=>{let h=l.target&&l.target.parentNode===s&&l.target.classList&&l.target.classList.contains("vis-name");l.target!==s&&l.target!==t&&!h||r(!i.classList.contains("collapsed"))})}var Ba=30;function qa(s,t=8){if(!Number.isFinite(s)||s<=0)return Ba;let i=Math.ceil(Math.log2(t/s));return Math.max(1,Math.min(Ba,i))}function Wa({designBounds:s,fitRect:t,viewW:i,viewH:o}){let r=No(s,Fe,t),l=w=>Number.isFinite(w)&&w>0;if(!r||!l(i)||!l(o))return Fe;let h=r.fitBounds[1][1]-r.fitBounds[0][1],u=r.fitBounds[1][0]-r.fitBounds[0][0],f=Math.min(i/h,o/u),_=Math.log2(f);if(!Number.isFinite(_)||_<0)return Fe;let g=Math.floor(_),y=Fe*2**(_-g),v=Math.floor(y/Ao)*Ao;return v>Fe&&Math.log2(Fe*f/v)>=g?v:Fe}function Ga(s,{showDbu:t,dbuPerMicron:i},o=!1){if(t)return String(Math.round(s));let r=i>0?i:1e3,l=Math.ceil(Math.log10(r)),h=(s/r).toFixed(l);return o?h+" \xB5m":h}function Ua(s,{showDbu:t,dbuPerMicron:i}){let o=parseFloat(s);if(!Number.isFinite(o))return null;if(t)return Math.round(o);let r=i>0?i:1e3;return Math.round(o*r)}function Va(s,{showDbu:t,dbuPerMicron:i}){if(t)return String(Math.round(s));let o=i>0?i:1e3,r=s/o;return r>=1e3?(r/1e3).toFixed(3)+" mm":r>=1?r.toFixed(3)+" um":(r*1e3).toFixed(1)+" nm"}function Ya({showDbu:s}){return s?"DBU":"\xB5m"}function qi(s){return typeof s=="string"&&/^#[0-9a-fA-F]{6}$/.test(s)}function Xa(s){if(typeof s!="string")return null;let t=s.trim();if(qi(t))return t.toLowerCase();let i=t.match(/^#([0-9a-fA-F]{3})$/);if(i)return"#"+i[1].split("").map(r=>r+r).join("").toLowerCase();let o=t.match(/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/);if(o){let r=o.slice(1).map(Number);return r.some(l=>l>255)?null:"#"+r.map(l=>l.toString(16).padStart(2,"0")).join("")}return null}function bn(s){let t=null;return()=>{t===null&&(t=requestAnimationFrame(()=>{t=null,s()}))}}function Da(s){let t=Math.pow(10,Math.floor(Math.log10(s))),i=s/t,o;return i<1.5?o=1:i<3.5?o=2:i<7.5?o=5:o=10,{value:o*t,digit:o}}function ja({targetPx:s,pxPerDbu:t,dbuPerMicron:i,showDbu:o}){if(!Number.isFinite(t)||t<=0||!Number.isFinite(s)||s<=0)return null;let r,l,h;if(o){let f=Da(Math.max(1,s/t));h=f.digit,r=Math.round(f.value*t),l=String(Math.round(f.value))}else{let f=Number.isFinite(i)&&i>0?i:1e3,_=t*f,g=Da(s/_);h=g.digit;let y=g.value;r=Math.round(y*_);let v,w;y>=1e3?(v=1/1e3,w="mm"):y>=1?(v=1,w="\xB5m"):y>=.001?(v=1e3,w="nm"):(v=1e6,w="pm"),l=Math.round(y*v)+" "+w}return{barPx:r,label:l,segments:h===1?5:h}}function wn(s,t,i){return t?typeof s.runTclScript=="function"?s.runTclScript(t,i):(i&&typeof s.echoTcl=="function"&&s.echoTcl(t),s.websocketManager.request({type:"tcl_eval",cmd:t}).catch(()=>{})):Promise.resolve()}function mi(s,t){let i=s.querySelectorAll("thead th");(!t||!t[0])&&(s.style.tableLayout="auto",i.forEach(o=>o.style.width=""),t=Array.from(i,o=>o.offsetWidth+"px")),i.forEach((o,r)=>o.style.width=t[r]||""),s.style.tableLayout="fixed",i.forEach((o,r)=>{if(r===i.length-1)return;let l=document.createElement("div");l.className="col-resize-grip",o.style.position="relative",o.appendChild(l);let h,u,f=g=>{o.style.width=Math.max(30,u+g.clientX-h)+"px"},_=()=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",_);let g=y=>y.stopPropagation();document.addEventListener("click",g,{capture:!0,once:!0}),setTimeout(()=>{document.removeEventListener("click",g,{capture:!0})},0)};l.addEventListener("mousedown",g=>{g.preventDefault(),h=g.clientX,u=o.offsetWidth,document.addEventListener("mousemove",f),document.addEventListener("mouseup",_)})})}function Ka(s,t){s.scrollWheelZoom.disable(),s.getContainer().addEventListener("wheel",i=>{if(i.preventDefault(),t()===i.ctrlKey){let[r,l]=Do(i,()=>s.getContainer().clientHeight);s.panBy([r,l],{animate:!1});return}let o=i.deltaY<0?1:-1;s.setZoomAround(s.mouseEventToLatLng(i),s.getZoom()+o)},{passive:!1})}function Do(s,t){let o=1;return s.deltaMode===1?o=16:s.deltaMode===2&&(o=t()||16),[s.deltaX*o,s.deltaY*o]}function Wi(s,t,i,o){let r=document.createElement("div");r.className="modal-overlay",r.innerHTML=` `,document.body.appendChild(r);let l=()=>r.remove();r.addEventListener("click",f=>{f.target===r&&l()}),r.addEventListener("keydown",f=>{f.key==="Escape"&&l()}),r.querySelector(".cancel").addEventListener("click",l),r.querySelector(".modal-close").addEventListener("click",l);let h=r.querySelector(".modal-error"),u=(f,_)=>{h.textContent=f,h.style.display=f?"block":"none",h.classList.toggle("info",!!_)};return{overlay:r,close:l,okBtn:r.querySelector(".ok"),showError:u}}var us=class{constructor(){this.eventListeners=new Map}on(e,i){this.eventListeners.has(e)||this.eventListeners.set(e,new Set),this.eventListeners.get(e).add(i)}off(e,i){this.eventListeners.get(e)?.delete(i)}emit(e,...i){let o=this.eventListeners.get(e);if(o)for(let r of o)try{r(...i)}catch(l){console.error(l)}}fire(e,...i){this.emit(e,...i)}};function xn(s,e,i={}){s.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0,detail:i}))}var tl=un` + `,document.body.appendChild(r);let l=()=>r.remove();r.addEventListener("click",f=>{f.target===r&&l()}),r.addEventListener("keydown",f=>{f.key==="Escape"&&l()}),r.querySelector(".cancel").addEventListener("click",l),r.querySelector(".modal-close").addEventListener("click",l);let h=r.querySelector(".modal-error"),u=(f,_)=>{h.textContent=f,h.style.display=f?"block":"none",h.classList.toggle("info",!!_)};return{overlay:r,close:l,okBtn:r.querySelector(".ok"),showError:u}}var ps=class{constructor(){this.eventListeners=new Map}on(t,i){this.eventListeners.has(t)||this.eventListeners.set(t,new Set),this.eventListeners.get(t).add(i)}off(t,i){this.eventListeners.get(t)?.delete(i)}emit(t,...i){let o=this.eventListeners.get(t);if(o)for(let r of o)try{r(...i)}catch(l){console.error(l)}}fire(t,...i){this.emit(t,...i)}};function xn(s,t,i={}){s.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:i}))}var tl=hn` .ide-tab-icon { display: inline-flex; align-items: center; @@ -25,7 +25,7 @@ height: 100%; display: block; } -`,No=class extends Ie{static properties={name:{type:String,reflect:!0},maximizable:{type:Boolean,reflect:!0},collapsible:{type:Boolean,reflect:!0},maximized:{type:Boolean,reflect:!0},collapsed:{type:Boolean,reflect:!0},_overflowing:{state:!0},_fadeStart:{state:!0},_fadeEnd:{state:!0},_menuOpen:{state:!0}};static styles=[tl,un` +`,Ro=class extends Ae{static properties={name:{type:String,reflect:!0},maximizable:{type:Boolean,reflect:!0},collapsible:{type:Boolean,reflect:!0},maximized:{type:Boolean,reflect:!0},collapsed:{type:Boolean,reflect:!0},_menuOpen:{state:!0},_focusIndex:{state:!0}};static styles=[tl,hn` :host { display: flex; flex-direction: column; @@ -56,44 +56,24 @@ flex-shrink: 0; } + /* Fills up to the controls, so the fixed right-edge fade lies over + empty space when the tabs fit; a tab scrolled into view clears it. */ .ide-tabs { display: flex; + flex: 1; height: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; - --tab-fade: 24px; - /* Scrolling a tab into view keeps it clear of the faded edge. */ - scroll-padding-inline: var(--tab-fade); - -webkit-mask-image: var(--tab-mask, none); - mask-image: var(--tab-mask, none); + scroll-padding-inline-end: 24px; + -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); + mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); } .ide-tabs::-webkit-scrollbar { display: none; } - /* The tabs at their full width: its size is the strip's scrollWidth. */ - .ide-tabs-track { - display: flex; - flex: none; - height: 100%; - } - - /* Fade the edge that has tabs scrolled past it. */ - .ide-tabs.fade-start { - --tab-mask: linear-gradient(to left, #000 calc(100% - var(--tab-fade)), transparent); - } - - .ide-tabs.fade-end { - --tab-mask: linear-gradient(to right, #000 calc(100% - var(--tab-fade)), transparent); - } - - .ide-tabs.fade-start.fade-end { - --tab-mask: linear-gradient(to right, transparent, #000 var(--tab-fade), - #000 calc(100% - var(--tab-fade)), transparent); - } - .ide-controls { display: flex; align-items: center; @@ -118,16 +98,11 @@ } .ide-btn:hover, - .ide-btn-overflow[aria-expanded="true"] { + .ide-btn-tab-menu[aria-expanded="true"] { background: var(--bg-hover); color: var(--fg-primary); } - /* Always laid out, so whether the tabs overflow never depends on it showing. */ - .ide-btn-overflow.idle { - visibility: hidden; - } - .ide-btn.ide-btn-restore { width: auto; padding: 0 6px; @@ -204,74 +179,65 @@ overflow: hidden; text-overflow: ellipsis; } - `];constructor(){super(),this._overflowing=!1,this._fadeStart=!1,this._fadeEnd=!1,this._menuOpen=!1,this._tabsEl=null,this._tabsTrack=null,this._tabsSlot=null,this._tabsObserver=null,this._tabsMutations=null,this._menuAbort=null,this._menuHadFocus=!1,this._inUpdate=!1}connectedCallback(){super.connectedCallback(),this.classList.add("ide-pane",`ide-pane-${this.paneName}`),this.hasUpdated&&this._observeStrip()}disconnectedCallback(){super.disconnectedCallback(),this._tabsObserver?.disconnect(),this._closeMenu()}firstUpdated(){this._tabsEl=this.renderRoot.querySelector(".ide-tabs"),this._tabsTrack=this.renderRoot.querySelector(".ide-tabs-track"),this._tabsSlot=this.renderRoot.querySelector('slot[name="tabs"]'),this._tabsObserver=new ResizeObserver(()=>{this._updateOverflow(),this._tabs.find(e=>e.active)?.scrollIntoView({inline:"nearest",block:"nearest"})}),this._tabsMutations=new MutationObserver(()=>this.requestUpdate()),this._observeStrip()}willUpdate(e){this._menuHadFocus=this._menuOpen&&this._menuHasFocus(),this._inUpdate=!0,this._menuOpen&&(!this._overflowing||this.collapsed||e.has("maximized"))&&this._closeMenu(this._menuHadFocus)}updated(e){this._inUpdate=!1,this._menuOpen&&(e.has("_menuOpen")||this._menuHadFocus&&!this._menuHasFocus())&&this._focusMenuItem()}get _tabs(){return this._tabsSlot?.assignedElements()||[]}_observeStrip(){this._tabsObserver.observe(this._tabsEl),this._tabsObserver.observe(this._tabsTrack)}_observeTabs(){this._tabsMutations.disconnect();for(let e of this._tabs)this._tabsMutations.observe(e,{attributes:!0,attributeFilter:["active","hidden","title"]})}_onTabsSlotChange(){this._menuOpen&&(this._observeTabs(),this.requestUpdate())}_updateOverflow(){let e=this._tabsEl;if(!e)return;let i=e.scrollWidth-e.clientWidth;this._overflowing=i>1,this._fadeStart=this._overflowing&&e.scrollLeft>1,this._fadeEnd=this._overflowing&&e.scrollLeft=Math.abs(e.deltaY)||(e.preventDefault(),this._tabsEl.scrollLeft+=Io(e,()=>this._tabsEl.clientWidth)[1])}_onOverflowClick(){this._menuOpen?this._closeMenu(!0):this._openMenu()}_openMenu(){this._menuOpen=!0,this._observeTabs(),this._menuAbort=new AbortController;let{signal:e}=this._menuAbort;document.addEventListener("pointerdown",i=>{let o=i.composedPath();[".ide-tab-menu",".ide-btn-overflow"].some(l=>o.includes(this.renderRoot.querySelector(l)))||this._closeMenu()},{signal:e}),window.addEventListener("keydown",i=>this._onMenuKey(i),{capture:!0,signal:e})}_closeMenu(e=!1){this._menuAbort?.abort(),this._menuAbort=null,this._tabsMutations?.disconnect(),this._menuOpen=!1,e&&this.renderRoot.querySelector(".ide-btn-overflow")?.focus()}_menuHasFocus(){return!!this.renderRoot?.activeElement?.closest(".ide-tab-menu")}_focusMenuItem(){let e=[...this.renderRoot.querySelectorAll(".ide-tab-menu-item")];(e.find(i=>i.getAttribute("aria-checked")==="true")||e[0])?.focus()}_onMenuFocusout(e){this._inUpdate||this._menuOpen&&!e.currentTarget.contains(e.relatedTarget)&&this._closeMenu()}_keepMenuFocus(e){e.preventDefault()}_onMenuKey(e){let i=this.renderRoot.querySelector(".ide-tab-menu");if(!i||!e.composedPath().includes(i))return;let o=[...i.querySelectorAll(".ide-tab-menu-item")],r=o.length,l=o.indexOf(this.renderRoot.activeElement),h=null;if(e.key==="ArrowDown")h=o[(l+1)%r];else if(e.key==="ArrowUp")h=o[l<=0?r-1:l-1];else if(e.key==="Home")h=o[0];else if(e.key==="End")h=o[r-1];else if(e.key.length===1&&e.key!==" "&&!e.ctrlKey&&!e.metaKey&&!e.altKey){let u=e.key.toLowerCase();h=[...o.slice(l+1),...o.slice(0,l+1)].find(f=>f.querySelector(".ide-tab-menu-title").textContent.toLowerCase().startsWith(u))}else if(e.key!=="Escape")return;e.preventDefault(),e.stopPropagation(),e.key==="Escape"?this._closeMenu(!0):h?.focus()}_selectFromMenu(e){this._closeMenu(!0),e.select()}_renderTabMenu(){let e=this._tabs.filter(i=>!i.hidden);return Ae` - `,"Apply",Il),f=r.querySelector(".opt-family"),_=r.querySelector(".opt-custom"),g=r.querySelector(".opt-scale"),y=r.querySelector(".opt-preview");function v(){y.style.fontFamily=_.value.trim()||f.value,y.style.fontSize=`calc(13px * ${Ln(g.value)/100})`}for(let b of[f,_,g])b.addEventListener("input",v);v();function w(){let b=g.value.trim(),C=Number(b);if(b===""||!Number.isFinite(C)){u("Size must be a number.");return}if(CMs){u(`Size must be between ${Ss} and ${Ms} %.`);return}s.setAppFont({family:_.value.trim()||f.value,scale:C}),l()}h.addEventListener("click",w);for(let b of[_,g])b.addEventListener("keydown",C=>{C.key==="Enter"&&(C.preventDefault(),w())});return{close:l}}function Jo(s){return String(s).replace(/&/g,"&").replace(/"/g,""").replace(//g,">")}var Dd='',Rd='';function Vi(s){let t=document.createElement("span");return t.className="vis-name",s!=null&&(t.textContent=s),t}function Ke(){let s=document.createElement("span");return s.className="vis-sel-cb vis-sel-spacer",s}function Dl(){let s=document.createElement("div");s.className="display-controls-header",s.appendChild(Vi(""));for(let[t,i]of[[Dd,"Visible"],[Rd,"Selectable"]]){let o=document.createElement("span");o.className="vis-header-icon",o.title=i,o.innerHTML=t,s.appendChild(o)}return s}var Es=class{constructor(t,i,o){this.visibility=t,this.selectability=i,this.onChange=o;let r=()=>{this._syncAll(),this.onChange()};this.model=new ke(r),this.selModel=new ke(r)}add(t){return this.model.addFromSpec(this._enrichSpec(t,"")),this.selModel.addFromSpec(this._enrichSelSpec(t,"",!1)),this}render(t){for(let i of this.model.roots)t.appendChild(this._dom(i));this._syncAll()}_nodeId(t,i){let o=t.key||t.label;return i?i+"/"+o:o}_enrichSpec(t,i){let o=this._nodeId(t,i),r={id:o,data:t};return t.children?r.children=t.children.map(l=>this._enrichSpec(l,o)):t.key&&(r.checked=!!this.visibility[t.key]),t.disabled!=null&&(r.disabled=t.disabled),r}_enrichSelSpec(t,i,o){let r=t.addSelectable===!0?!0:t.addSelectable===!1?!1:o,l=this._nodeId(t,i),h={id:l,data:t,hasCheckbox:!1};if(t.children){h.children=t.children.map(f=>this._enrichSelSpec(f,l,r));let u=f=>f.some(_=>_.hasCheckbox||_.children&&u(_.children));h.hasCheckbox=u(h.children),h.hasCheckbox&&(h.checked=!0)}else if(t.key){let u=t.selectable===!0||t.selectable!==!1&&o;h.hasCheckbox=u,u&&(h.checked=this.selectability[t.key]!==!1)}return h}_syncAll(){this.model.forEach(t=>{t.cb&&(t.cb.checked=t.checked,t.cb.indeterminate=t.indeterminate);let i=t.data;i.key&&(this.visibility[i.key]=t.checked),i.visKey&&(this.visibility[i.visKey]=t.checked||t.indeterminate)}),this.selModel.forEach(t=>{if(!t.hasCheckbox)return;let i=t.data;if(i.key&&(this.selectability[i.key]=t.checked),!t.selCb)return;t.selCb.checked=t.checked,t.selCb.indeterminate=t.indeterminate;let o=this.model.get(t.id),r=o&&!o.checked&&!o.indeterminate;t.selCb.disabled=r,t.selLabel&&t.selLabel.classList.toggle("vis-sel-disabled",r)}),this.model.forEach(t=>{let i=t.data;if(i.disabledBy&&t.el){let o=!this.visibility[i.disabledBy];t.el.classList.toggle("disabled",o)}})}_buildSelCheckbox(t){let i=this.selModel.get(t.id);if(!i||!i.hasCheckbox)return null;let o=document.createElement("input");return o.type="checkbox",o.className="vis-sel-cb",o.title="Selectable",o.addEventListener("change",()=>{this.selModel.check(i.id,o.checked)}),i.selCb=o,o}_dom(t){let i=t.data,o=document.createElement("input");o.type="checkbox",o.className="vis-cb",o.title="Visible",t.cb=o,o.addEventListener("change",()=>this.model.check(t.id,o.checked));let r=this._buildSelCheckbox(t),l=y=>{if(y.appendChild(o),r){y.appendChild(r);let v=this.selModel.get(t.id);v&&(v.selLabel=y)}else y.appendChild(Ke())};if(!t.children.length){let y=document.createElement("div");y.className="vis-leaf";let v=document.createElement("span");return v.className="vis-arrow",v.style.visibility="hidden",v.textContent="\u25B6",y.appendChild(v),y.appendChild(Vi(i.label)),l(y),t.el=y,y}let h=document.createElement("div");h.className="vis-group";let{header:u,arrow:f,name:_}=pi();_.textContent=i.label,l(u),h.appendChild(u);let g=document.createElement("div");g.className="vis-group-children",i.disabled&&g.classList.add("disabled");for(let y of t.children)g.appendChild(this._dom(y));return h.appendChild(g),fi(u,f,g,!0),h}};function Sn(s,t,i,o){let r=new Set,l=Math.max(0,s-t),h=Math.min(o-1,s+i);for(let u=l;u<=h;u++)r.add(u);return r}function zd(s){let t={};for(let[i,o]of Object.entries(s||{}))o!==1&&(t[i]=o);return t}function Ts(s,t){return(s||[]).some(i=>i.every(o=>!!t[o]))}function Od(s,t){return s.map(i=>{let o=!t.has(i.path);return{id:i.path,parentId:i.parent!=null?i.parent:null,hasCheckbox:i.parent!=null,checked:o,data:{path:i.path,name:i.name,master:i.master,depth:i.depth}}})}var Rl=[[70,130,210],[200,50,50],[50,180,80],[200,160,40],[160,60,200],[40,190,190],[220,120,50],[180,70,150]];function zl(s,t,i,o,r,l,h){if(!s.displayControlsEl)return;s.displayControlsEl.innerHTML="",s.allLayers=[],s.displayControlsEl.appendChild(Dl());let u=s.mergeTiles?s.MergedTileLayer:null,f=new Set;function _(){for(let M of f)M.refreshTiles();f.clear()}function g(M,H){if(!u){let G=new o(s.websocketManager,M,{opacity:1,zIndex:H});return G._orShow=()=>G.addTo(s.map),G._orHide=()=>s.map.removeLayer(G),G}let F={layer:M,opacity:1,visible:!1};return{_orItem:F,_orPane:null,refreshTiles(){this._orPane&&(f.add(this._orPane),_())},_orShow(){Zo(F,!0)&&this._orPane&&f.add(this._orPane)},_orHide(){Zo(F,!1)&&this._orPane&&f.add(this._orPane)}}}function y(M,H,F,G){let z=new o(s.websocketManager,M,{zIndex:F});return G&&z.addTo(s.map),H&&(s[H]=z),s.allLayers.push(z),z}y("_instances",null,0,!0),y("_pins","pinsLayer",1,t.pins),y("_modules","modulesLayer",2,t.module_view),s.overlayLayers=(r&&r.overlays||[]).map(M=>({def:M,layer:y(M.name,null,M.z_index,Ts(M.shown_by,t))}));let v=[],w=[],b=null,C=new Set,R=new Set;try{let M=window.sessionStorage.getItem("or_hidden_layers");M&&(C=new Set(JSON.parse(M)))}catch{}try{let M=window.sessionStorage.getItem("or_nonselectable_layers");M&&(R=new Set(JSON.parse(M)))}catch{}try{let M=window.sessionStorage.getItem("or_layer_patterns");M&&Object.assign(s.layerPatterns,JSON.parse(M))}catch{}function P(){try{window.sessionStorage.setItem("or_layer_patterns",JSON.stringify(zd(s.layerPatterns)))}catch{}}function T(M,H,F){F===1?delete s.layerPatterns[M]:s.layerPatterns[M]=F,P(),H&&typeof H.refreshTiles=="function"&&H.refreshTiles()}let Z=[{label:"Solid",value:1},{label:"Diagonal",value:2},{label:"Cross",value:3},{label:"Dots",value:4},{label:"None (no fill)",value:0}],U=0,dt=3;function gt(M,H="layers",F=void 0){let G=[],z=M.type==="category"?F:M.path,W=M.flipped===!0,q=M.instances||[],D=q.filter(Ht=>Ht.type!=="category"),X=q.filter(Ht=>Ht.type==="category"),j=M.layers||[],vt=U;U+=j.length;function mt(Ht,ce){let K=Ht.map((st,lt)=>lt);ce&&K.reverse(),K.forEach(st=>{let lt=Ht[st],Dt=H+"/"+(lt.name||st);G.push(gt(lt,Dt,z))})}function St(){(W?j.map((ce,K)=>K).reverse():j.map((ce,K)=>K)).forEach(ce=>{let K=j[ce],st=K.name||K,lt=vt+ce,Dt=dt++,oe=g(st,Dt),Ue=`${H}/${st}`;oe._nodeId=Ue;let An=!C.has(Ue);An&&(oe._orShow(),s.visibleLayers.add(Ue),s.visibleLayerNames.add(st)),u||s.allLayers.push(oe),v.push(oe),w.push(Ue),G.push({id:Ue,data:{name:st,layer:oe,color:K.color,colorIndex:lt,nodeId:Ue,ownerChipletPath:z},checked:An})})}mt(D,!1),W&&St(),mt(X,W),W||St();let Pt={name:M.name,isInstance:!0};return M.type==="category"&&(M.name==="Implant"||M.name==="Other")&&(Pt.startCollapsed=!0),M.type!=="category"&&(Pt.chipletPath=M.path),{id:H,data:Pt,children:G}}let it;if(r.layer_hierarchy?it=gt(r.layer_hierarchy,"layers_parent"):it={id:"layers_parent",children:r.layers.map((M,H)=>{let F=g(M,H+3),G=`layers_parent/${M}`;F._nodeId=G;let z=!C.has(G);return z&&(F._orShow(),s.visibleLayers.add(G),s.visibleLayerNames.add(M)),u||s.allLayers.push(F),v.push(F),w.push(G),{id:G,data:{name:M,layer:F,colorIndex:H,nodeId:G},checked:z}})},u&&v.length>0){let F=function(){let{width:X,height:j}=al(s.map.getContainer()),vt=xe(),mt=rl(X,j,vt),St=ol(vt,s.tileDpr?s.tileDpr():1);return{count:s.mergeGroupCount||cl({budgetBytes:ll(H,mt,St),tilesPerPane:mt,bytesPerTile:St,paneCount:M.length}),tilesPerPane:mt,perTile:St}},G=function(X,j,vt){let mt=(X+_s)*j*vt;return{layers:M.length,groups:X,tilesPerPane:j,unmergedPanes:_s,budgetMB:Math.round(H/(1024*1024)),estimatedMB:Math.round(mt/(1024*1024))}},z=function(X,j){let vt=0;j.forEach((mt,St)=>{for(let Pt=0;PtX._orItem),H=s.tileBudgetBytes||Fo,W=F(),q=qo(M,W.count),D=pl(u,s.websocketManager,q,s.map,3);z(D,q),s.allLayers.push(...D),s.mergedPanes=D,s.mergeStats=G(D.length,W.tilesPerPane,W.perTile),console.log("[tiles] merged %d layers into %d panes (~%d MB of %d MB budget, %d tiles/pane)",s.mergeStats.layers,s.mergeStats.groups,s.mergeStats.estimatedMB,s.mergeStats.budgetMB,W.tilesPerPane),s.map.on("resize",()=>{let X=F();if(X.count>=s.mergedPanes.length)return;let j=qo(M,X.count),vt=s.mergedPanes.slice(0,j.length);for(let mt of s.mergedPanes.slice(j.length)){s.map.removeLayer(mt);let St=s.allLayers.indexOf(mt);St>=0&&s.allLayers.splice(St,1)}s.mergedPanes=vt,z(vt,j),vt.forEach((mt,St)=>mt.setItems(j[St])),s.mergeStats=G(vt.length,X.tilesPerPane,X.perTile),console.log("[tiles] window grew \u2014 regrouped %d layers into %d panes (~%d MB of %d MB budget, %d tiles/pane)",s.mergeStats.layers,s.mergeStats.groups,s.mergeStats.estimatedMB,s.mergeStats.budgetMB,X.tilesPerPane)})}function Q(M){if(!M.children||M.children.length===0){let H=M.data&&M.data.name,F=H?!R.has(H):!0;return F&&H&&s.selectableLayers.add(H),{id:M.id,data:{name:H},checked:F}}return{id:M.id,data:{name:M.data&&M.data.name},children:M.children.map(Q)}}let nt=Q(it),tt=new ke(()=>{s.visibleLayerNames.clear();let M=[],H={},F=!1,G=!1,z=b&&s.visibleChiplets instanceof Set;tt.forEach(q=>{if(q.cb&&(q.cb.checked=q.checked,q.cb.indeterminate=q.indeterminate),q.data&&q.data.layer){let D=q.data.nodeId||q.data.name;M.push(D),q.checked?(q.data.layer._orShow(),s.visibleLayers.add(D),s.visibleLayerNames.add(q.data.name)):(q.data.layer._orHide(),s.visibleLayers.delete(D))}if(z&&q.data&&q.data.chipletPath){let D=q.data.chipletPath,X=b.get(D);if(X){let j=q.checked||q.indeterminate,vt={checked:q.checked,indeterminate:q.indeterminate};(X.checked!==q.checked||X.indeterminate!==q.indeterminate)&&(H[D]=vt,F=!0),s.visibleChiplets.has(D)!==j&&(G=!0)}}}),_(),Et(),s.pinsLayer&&s.map.hasLayer(s.pinsLayer)&&s.pinsLayer.refreshTiles();for(let{def:q,layer:D}of s.overlayLayers||[])Ts(q.layers_by,t)&&s.map.hasLayer(D)&&D.refreshTiles();let W=M.filter(q=>!s.visibleLayers.has(q));try{window.sessionStorage.setItem("or_hidden_layers",JSON.stringify(W))}catch{}s.syncDisplayState(),G?b.mirrorStates(H):F&&(b.mirrorStatesQuiet(H),b.forEach(q=>{q.cb&&(q.cb.checked=q.checked,q.cb.indeterminate=q.indeterminate)}))});s.layerModel=tt,tt.addFromSpec(it);let Ct=new ke(()=>{s.selectableLayers.clear(),Ct.forEach(H=>{H.checked&&H.data&&H.data.name&&s.selectableLayers.add(H.data.name)}),Et();let M=r.layers.filter(H=>!s.selectableLayers.has(H));try{window.sessionStorage.setItem("or_nonselectable_layers",JSON.stringify(M))}catch{}s.syncDisplayState()});Ct.addFromSpec(nt);function Et(){Ct.forEach(M=>{if(!M.selCb)return;M.selCb.checked=M.checked,M.selCb.indeterminate=M.indeterminate;let H=tt.get(M.id),F=H&&!H.checked&&!H.indeterminate;M.selCb.disabled=F})}let It=document.createElement("div");It.className="context-menu",It.style.display="none",document.body.appendChild(It);function Nt(M){let H={};w.forEach((F,G)=>{F&&(H[F]=M.has(G))}),tt.checkSet(H)}function Yt(){It.style.display="none"}function rt(M,H){let F=document.createElement("div");F.className="context-menu-item",F.textContent=M,F.addEventListener("click",()=>{H(),Yt()}),It.appendChild(F)}let ye=v.length,at=[{label:"Show only this layer",fn:M=>Sn(M,0,0,ye)},{label:"Show layer range \u2195",fn:M=>Sn(M,1,1,ye)},{label:"Show layer range \u2195\u2195",fn:M=>Sn(M,2,2,ye)},{label:"Show layer range \u2193",fn:M=>Sn(M,1,0,ye)},{label:"Show layer range \u2191",fn:M=>Sn(M,0,1,ye)}];document.addEventListener("click",M=>{It.contains(M.target)||Yt()}),document.addEventListener("keydown",M=>{M.key==="Escape"&&Yt()});let kt=!wt(s),zt=null;function Wt(){zt&&(zt.classList.remove("vis-row-selected"),zt=null)}kt&&$a(s,Wt);function At(M,H,F){let G=ae(s);zt=M,M.classList.add("vis-row-selected");let z={type:"select_layer",layer:H,use_dbu:s.showDbu};F&&(z.chiplet=F),s.websocketManager.request(z).then(W=>{he(s,G)&&(s.updateInspector&&s.updateInspector(W),s.focusComponent&&s.focusComponent("Inspector"),s.refreshOverlay&&s.refreshOverlay())}).catch(W=>{console.error("select_layer failed:",W),he(s,G)&&Wt()})}function yt(M,H=!1){let F=Ct.get(M.id);if(!M.children||M.children.length===0){let G=document.createElement("div");G.className=kt?"vis-leaf vis-leaf-selectable":"vis-leaf";let z=document.createElement("span");z.className="vis-arrow",z.style.visibility="hidden",z.textContent="\u25B6",G.appendChild(z);let W=M.data.colorIndex,q=M.data.name,D=Vi(),X=document.createElement("span");X.className="layer-color";let j=M.data.color||r.layer_colors&&r.layer_colors[W]||Rl[W%Rl.length];X.style.backgroundColor=`rgb(${j[0]},${j[1]},${j[2]})`,D.appendChild(X),D.appendChild(document.createTextNode(q)),G.appendChild(D),kt&&D.addEventListener("click",()=>{At(G,q,M.data.ownerChipletPath)});let vt=document.createElement("input");if(vt.type="checkbox",vt.className="vis-cb",vt.title="Visible",vt.checked=M.checked,M.cb=vt,vt.addEventListener("change",()=>{tt.check(M.id,vt.checked)}),G.appendChild(vt),F){let mt=document.createElement("input");mt.type="checkbox",mt.className="vis-sel-cb",mt.title="Selectable",mt.checked=F.checked,F.selCb=mt,mt.addEventListener("change",()=>{Ct.check(M.id,mt.checked)}),G.appendChild(mt)}else G.appendChild(Ke());return G.addEventListener("contextmenu",mt=>{mt.preventDefault(),mt.stopPropagation(),It.innerHTML="";for(let Ht of at)rt(Ht.label,()=>Nt(Ht.fn(W)));let St=document.createElement("div");St.className="context-menu-separator",St.style.borderTop="1px solid #555",St.style.margin="4px 0",It.appendChild(St);let Pt=s.layerPatterns[q]??1;for(let Ht of Z){let ce=Pt===Ht.value?"\u25CF ":" ";rt(ce+"Fill: "+Ht.label,()=>T(q,M.data.layer,Ht.value))}It.style.left=mt.clientX+"px",It.style.top=mt.clientY+"px",It.style.display="block"}),G}else{let G=document.createElement("div");G.className="vis-group";let{header:z,arrow:W,name:q}=pi();q.textContent=H?"Layers":M.data.name||"Group";let D=document.createElement("input");if(D.type="checkbox",D.className="vis-cb",D.title="Visible",D.checked=M.checked,D.indeterminate=M.indeterminate,M.cb=D,D.addEventListener("change",()=>{tt.check(M.id,D.checked)}),z.appendChild(D),F){let j=document.createElement("input");j.type="checkbox",j.className="vis-sel-cb",j.title="Selectable",j.checked=F.checked,j.indeterminate=F.indeterminate,F.selCb=j,j.addEventListener("change",()=>{Ct.check(M.id,j.checked)}),z.appendChild(j)}else z.appendChild(Ke());G.appendChild(z);let X=document.createElement("div");X.className="vis-group-children";for(let j of M.children)X.appendChild(yt(j,!1));return G.appendChild(X),fi(z,W,X,!!(M.data&&M.data.startCollapsed)),G}}let ft=tt.roots[0]||tt.get("layers_parent"),le=yt(ft,!0);s.displayControlsEl.appendChild(le),Et();let ie=r&&Array.isArray(r.chiplets)?r.chiplets:[];if(ie.length>1){let X=function(K,st){let lt=D.get(K);lt&&(tt.cascadeQuiet(lt.id,st),tt.onChange())},ce=function(K){let st=K.data;if(K!==Pt){let lt=document.createElement("div");lt.className="vis-leaf",lt.style.paddingLeft=8*(st.depth-1)+"px",lt.title=st.path+(st.master?` (${st.master})`:""),lt.appendChild(Vi(st.name));let Dt=document.createElement("input");Dt.type="checkbox",Dt.className="vis-cb",Dt.checked=K.checked,Dt.indeterminate=K.indeterminate,K.cb=Dt,Dt.addEventListener("change",()=>{b.check(K.id,Dt.checked),X(st.path,Dt.checked)}),lt.appendChild(Dt),lt.appendChild(Ke()),Ht.appendChild(lt)}K.children&&K.children.forEach(ce)},M=r&&r.block_name||"",H=M!=="",F={};if(H)try{let K=Vt("or_hidden_chiplets");if(K){let st=JSON.parse(decodeURIComponent(K));st&&typeof st=="object"&&!Array.isArray(st)&&(F=st)}}catch{}let G=new Set(Array.isArray(F[M])?F[M]:[]),z=Od(ie,G),W=z.findIndex(K=>K.parentId===null),q=W>=0?z[W].id:null;if(W>=0&&(z[W].hasCheckbox=!0),s.visibleChiplets=new Set(ie.filter(K=>!G.has(K.path)).map(K=>K.path)),b=new ke(()=>{let K=new Set;if(b.forEach(st=>{st.cb&&(st.cb.checked=st.checked,st.cb.indeterminate=st.indeterminate),st.data&&st.data.path&&(st.checked||st.indeterminate)&&K.add(st.data.path)}),s.visibleChiplets=K,H){let st=ie.filter(Dt=>!K.has(Dt.path)).map(Dt=>Dt.path),lt={};try{let Dt=Vt("or_hidden_chiplets");if(Dt){let oe=JSON.parse(decodeURIComponent(Dt));oe&&typeof oe=="object"&&!Array.isArray(oe)&&(lt=oe)}}catch{}st.length===0?delete lt[M]:lt[M]=st,Qt("or_hidden_chiplets",encodeURIComponent(JSON.stringify(lt)))}l()}),b.buildFromNodes(z),typeof console<"u"&&console.warn){let K=new Set;tt.forEach(lt=>{lt.data&<.data.chipletPath&&K.add(lt.data.chipletPath)});let st=new Set;b.forEach(lt=>{lt.data&<.data.path&&st.add(lt.data.path)});for(let lt of st)K.has(lt)||console.warn(`[display-controls] chiplet "${lt}" missing from layer_hierarchy \u2014 Layers/Chiplets sync may drift`);for(let lt of K)st.has(lt)||console.warn(`[display-controls] layer hierarchy node "${lt}" has no matching chiplet \u2014 Layers/Chiplets sync may drift`)}let D=new Map;tt.forEach(K=>{K.data&&K.data.chipletPath&&D.set(K.data.chipletPath,K)});{let K={};if(tt.forEach(st=>{if(!st.data||!st.data.chipletPath)return;let lt=st.data.chipletPath;G.has(lt)||b.get(lt)&&(K[lt]={checked:st.checked,indeterminate:st.indeterminate})}),Object.keys(K).length>0){b.mirrorStatesQuiet(K);let st=new Set;b.forEach(lt=>{lt.data&<.data.path&&(lt.checked||lt.indeterminate)&&st.add(lt.data.path)}),s.visibleChiplets=st}}let j=document.createElement("div");j.className="vis-group";let{header:vt,arrow:mt,name:St}=pi();St.textContent="Chiplets";let Pt=q!=null?b.get(q):null;if(Pt){let K=document.createElement("input");K.type="checkbox",K.className="vis-cb",K.checked=Pt.checked,K.indeterminate=Pt.indeterminate,Pt.cb=K,K.addEventListener("change",st=>{st.stopPropagation(),b.check(q,K.checked),Pt.data&&Pt.data.path&&X(Pt.data.path,K.checked)}),vt.appendChild(K)}vt.appendChild(Ke()),j.appendChild(vt);let Ht=document.createElement("div");Ht.className="vis-group-children",b.roots.forEach(ce),j.appendChild(Ht),fi(vt,mt,Ht,!1),s.displayControlsEl.appendChild(j)}else s.visibleChiplets=null;let Ft=!!t.debug_renderers,ee=new Es(t,i,()=>{l(),!!t.debug_renderers!==Ft&&(Ft=!!t.debug_renderers,s.refreshRendererControls&&s.refreshRendererControls())});ee.add({label:"Nets",addSelectable:!0,children:[{key:"net_signal",label:"Signal"},{key:"net_power",label:"Power"},{key:"net_ground",label:"Ground"},{key:"net_clock",label:"Clock"},{key:"net_reset",label:"Reset"},{key:"net_tieoff",label:"Tie off"},{key:"net_scan",label:"Scan"},{key:"net_analog",label:"Analog"}]}),ee.add({label:"Instances",addSelectable:!0,children:[{label:"Std Cells",visKey:"stdcells",disabled:!s.hasLiberty,children:[{label:"Bufs/Invs",children:[{key:"std_bufinv_timing",label:"Timing opt."},{key:"std_bufinv",label:"Netlist"}]},{key:"std_combinational",label:"Combinational"},{key:"std_sequential",label:"Sequential"},{label:"Clock tree",children:[{key:"std_clock_bufinv",label:"Buffer/Inverter"},{key:"std_clock_gate",label:"Clock gate"}]},{key:"std_level_shift",label:"Level shifter"}]},{key:"macros",label:"Macros"},{label:"Pads",children:[{key:"pad_input",label:"Input"},{key:"pad_output",label:"Output"},{key:"pad_inout",label:"Inout"},{key:"pad_power",label:"Power"},{key:"pad_spacer",label:"Spacer"},{key:"pad_areaio",label:"Area IO"},{key:"pad_other",label:"Other"}]},{label:"Physical",children:[{key:"phys_fill",label:"Fill"},{key:"phys_endcap",label:"Endcap"},{key:"phys_welltap",label:"Welltap"},{key:"phys_tie",label:"Tie Hi/Lo"},{key:"phys_antenna",label:"Antenna"},{key:"phys_cover",label:"Cover"},{key:"phys_bump",label:"Bump"},{key:"phys_other",label:"Other"}]}]}),ee.add({label:"Blockages",addSelectable:!0,children:[{key:"placement_blockages",label:"Placement"},{key:"routing_obstructions",label:"Routing"}]}),r.sites&&r.sites.length>0&&ee.add({label:"Rows",visKey:"rows",addSelectable:!0,children:r.sites.map(M=>({key:"site_"+M,label:M}))}),ee.add({label:"Tracks",children:[{key:"tracks_pref",label:"Pref"},{key:"tracks_non_pref",label:"Non Pref"}]}),ee.add({label:"Shapes",children:[{label:"Routing",visKey:"routing",children:[{key:"routing_segments",label:"Segments"},{key:"routing_vias",label:"Vias"}]},{label:"Special Routing",visKey:"special_nets",children:[{key:"srouting_segments",label:"Segments"},{key:"srouting_vias",label:"Vias"}]},{key:"pins",label:"Pins",selectable:!0},{key:"pin_names",label:"Pin Names",disabledBy:"pins"},{key:"fills",label:"Fills"}]}),ee.add({label:"Misc",children:[{label:"Instances",children:[{key:"inst_names",label:"Names"},{key:"inst_pins",label:"Pins",selectable:!0},{key:"inst_pin_names",label:"Pin Names",disabledBy:"inst_pins"},{key:"blockages",label:"Blockages"}]},{key:"detailed",label:"Detailed view"},{key:"rulers",label:"Rulers"},{key:"labels",label:"Labels"},{key:"scale_bar",label:"Scale bar"},{key:"access_points",label:"Access Points"},{key:"regions",label:"Regions"},{key:"mfg_grid",label:"Manufacturing grid"},{key:"gcell_grid",label:"GCell grid"},{key:"flywires_only",label:"Flywires only"},{key:"focused_nets_guides",label:"Focused nets guides"},{key:"highlight_selected",label:"Highlight selected"}]}),ee.add({key:"module_view",label:"Module view"}),ee.add({label:"Debug Graphics",children:[{key:"debug_renderers",label:"Renderers"},{key:"debug_live",label:"Live (don't require pause)",disabledBy:"debug_renderers"},{key:"debug",label:"Tiles"}]}),ee.render(s.displayControlsEl);let fe=document.createElement("div");fe.className="renderer-controls",s.displayControlsEl.appendChild(fe);function k(M){return Promise.all(M.map(({path:H,value:F})=>s.websocketManager.request({type:"set_renderer_control",path:H,value:F}))).catch(()=>{})}function $(M){fe.innerHTML="";let H=new Map;for(let F of M||[]){let G=F.group||"";H.has(G)||H.set(G,[]),H.get(G).push(F)}for(let[F,G]of H){let z=fe;if(F){let W=document.createElement("div");W.className="vis-group";let{header:q,arrow:D,name:X}=pi();X.textContent=F;let j=document.createElement("input");j.type="checkbox",j.className="vis-cb",j.title="Visible";let vt=G.filter(St=>St.visible).length;j.checked=vt===G.length,j.indeterminate=vt>0&&vt{let St=j.checked;k(G.filter(Pt=>!!Pt.visible!==St).map(Pt=>({path:Pt.path,value:St})))}),q.appendChild(j),q.appendChild(Ke()),W.appendChild(q);let mt=document.createElement("div");mt.className="vis-group-children",W.appendChild(mt),fi(q,D,mt,!1),fe.appendChild(W),z=mt}for(let W of G){let q=document.createElement("div");q.className="vis-leaf";let D=document.createElement("span");D.className="vis-arrow",D.style.visibility="hidden",D.textContent="\u25B6",q.appendChild(D),q.appendChild(Vi(W.name));let X=document.createElement("input");X.type="checkbox",X.className="vis-cb",X.title="Visible",X.checked=!!W.visible,X.addEventListener("change",()=>k([{path:W.path,value:X.checked}])),q.appendChild(X),q.appendChild(Ke()),z.appendChild(q)}}}s.refreshRendererControls=function(){return!s.websocketManager||wt(s)||!t.debug_renderers?(fe.innerHTML="",Promise.resolve()):s.websocketManager.request({type:"renderer_controls"}).then(M=>$(M.controls)).catch(()=>{})},s.refreshRendererControls();let B=document.createElement("div");B.className="bg-color-row";let Y=document.createElement("span");Y.textContent="Background";let A=document.createElement("input");A.type="color",A.className="bg-color-input",A.title="Layout background color";let J=Vt("or_bg_color");A.value=qi(J)?J:Uo(),A.addEventListener("input",()=>{document.documentElement.style.setProperty("--bg-map",A.value)}),A.addEventListener("change",()=>{bl(A.value,s)});let I=document.createElement("button");I.className="bg-color-reset",I.textContent="Reset",I.title="Reset background to the theme default",I.addEventListener("click",()=>{wl(s),A.value=Uo()}),B.appendChild(Y),B.appendChild(A),B.appendChild(I),s.heatMapLayer||(s.heatMapLayer=new h(s.websocketManager,s,{zIndex:v.length+10,opacity:1}));let O=document.createElement("div");O.className="vis-group heatmap-controls",s.displayControlsEl.appendChild(O);let{header:ct,arrow:Lt,name:Xt}=pi("vis-group-header heatmap-header");Xt.textContent="Heat Maps",O.appendChild(ct);let Ot=document.createElement("div");Ot.className="vis-group-children heatmap-group-children",O.appendChild(Ot),fi(ct,Lt,Ot,!0),s.displayControlsEl.appendChild(B);function jt(M,H,F,G){let z=document.createElement("label");z.className="heatmap-setting";let W=document.createElement("input");W.type="checkbox",W.checked=F,W.addEventListener("change",()=>G(W.checked)),z.appendChild(W),z.appendChild(document.createTextNode(H)),M.appendChild(z)}function Le(M,H,F,G,z){let W=document.createElement("label");W.className="heatmap-setting";let q=document.createElement("span");q.textContent=H;let D=document.createElement("input");D.type="number",D.value=String(F),D.step=String(G||1),D.addEventListener("change",()=>z(parseFloat(D.value))),W.appendChild(q),W.appendChild(D),M.appendChild(W)}function Ge(M,H,F,G,z){let W=document.createElement("label");W.className="heatmap-setting";let q=document.createElement("span");q.textContent=H;let D=document.createElement("select");for(let X of G){let j=document.createElement("option");j.value=X,j.textContent=X,X===F&&(j.selected=!0),D.appendChild(j)}D.addEventListener("change",()=>z(D.value)),W.appendChild(q),W.appendChild(D),M.appendChild(W)}function Bt(M){s.websocketManager.request(M).then(H=>{s.updateHeatMaps&&s.updateHeatMaps(H)}).catch(H=>console.error("Heat map update failed",H))}function ei(M){if(!s.heatMapLegendEl)return;let H=s.heatMapLegendEl;if(H.innerHTML="",!M||!M.show_legend||!M.legend||M.legend.length===0){H.classList.add("hidden");return}let F=document.createElement("div");F.className="heatmap-map-legend-title",F.textContent=M.title,H.appendChild(F);let G=document.createElement("div");G.className="heatmap-map-legend-units",G.textContent=M.units||"",H.appendChild(G);let z=document.createElement("div");z.className="heatmap-map-legend-list";for(let W of M.legend){let q=document.createElement("div");q.className="heatmap-legend-row";let D=document.createElement("span");D.className="heatmap-legend-swatch",D.style.backgroundColor=`rgba(${W.color[0]}, ${W.color[1]}, ${W.color[2]}, ${W.color[3]/255})`;let X=document.createElement("span");X.textContent=W.value,q.appendChild(D),q.appendChild(X),z.appendChild(q)}H.appendChild(z),H.classList.remove("hidden")}s.renderHeatMapControls=M=>{Ot.innerHTML="";let H=document.createElement("div");H.className="heatmap-list",Ot.appendChild(H);let F=document.createElement("label");F.className="heatmap-setting";let G=document.createElement("input");G.type="radio",G.name="active-heatmap",G.checked=!M.active,G.addEventListener("change",()=>{Bt({type:"set_active_heatmap",name:""})}),F.appendChild(G),F.appendChild(document.createTextNode("Off")),H.appendChild(F);for(let D of M.heatmaps||[]){let X=document.createElement("label");X.className="heatmap-setting";let j=document.createElement("input");j.type="radio",j.name="active-heatmap",j.checked=D.name===M.active,j.addEventListener("change",()=>{Bt({type:"set_active_heatmap",name:D.name})}),X.appendChild(j),X.appendChild(document.createTextNode(D.title)),H.appendChild(X)}let z=(M.heatmaps||[]).find(D=>D.name===M.active);if(ei(z),!z)return;let W=document.createElement("div");W.className="heatmap-settings",Ot.appendChild(W),Le(W,"Display min",z.display_min,z.display_range_increment,D=>{Bt({type:"set_heatmap",name:z.name,option:"DisplayMin",value:D})}),Le(W,"Display max",z.display_max,z.display_range_increment,D=>{Bt({type:"set_heatmap",name:z.name,option:"DisplayMax",value:D})}),jt(W,"Show below min",z.draw_below_min,D=>{Bt({type:"set_heatmap",name:z.name,option:"ShowMin",value:D})}),jt(W,"Show above max",z.draw_above_max,D=>{Bt({type:"set_heatmap",name:z.name,option:"ShowMax",value:D})}),jt(W,"Log scale",z.log_scale,D=>{Bt({type:"set_heatmap",name:z.name,option:"LogScale",value:D})}),jt(W,"Reverse log",z.reverse_log,D=>{Bt({type:"set_heatmap",name:z.name,option:"ReverseLog",value:D})}),z.can_adjust_grid&&(Le(W,"Grid X",z.grid_x,.1,D=>{Bt({type:"set_heatmap",name:z.name,option:"GridX",value:D})}),Le(W,"Grid Y",z.grid_y,.1,D=>{Bt({type:"set_heatmap",name:z.name,option:"GridY",value:D})})),Le(W,"Alpha",z.alpha,1,D=>{Bt({type:"set_heatmap",name:z.name,option:"Alpha",value:D})}),jt(W,"Legend",z.show_legend,D=>{Bt({type:"set_heatmap",name:z.name,option:"ShowLegend",value:D})}),z.supports_numbers&&jt(W,"Show numbers",z.show_numbers,D=>{Bt({type:"set_heatmap",name:z.name,option:"ShowNumbers",value:D})});for(let D of z.options||[])D.type==="bool"?jt(W,D.label,D.value,X=>{Bt({type:"set_heatmap",name:z.name,option:D.name,value:X})}):D.type==="choice"&&Ge(W,D.label,D.value,D.choices||[],X=>{Bt({type:"set_heatmap",name:z.name,option:D.name,value:X})});z.selection_filter_label&&jt(W,z.selection_filter_label,z.use_selected_only,D=>{Bt({type:"set_heatmap",name:z.name,option:"use_selected_only",value:D})});let q=document.createElement("button");q.className="or-btn or-btn-sm heatmap-rebuild",q.textContent="Rebuild data",q.addEventListener("click",()=>{Bt({type:"set_heatmap",name:z.name,option:"rebuild",value:1})}),W.appendChild(q)}}var Ol="search-nav-dialog",Hd=[{label:"Instance",value:"inst"},{label:"Net",value:"net"},{label:"Port",value:"port"}];function Ps(s){if(!s.designScale)return;let t=Hd.map(g=>``).join(""),{overlay:i,close:o,okBtn:r,showError:l}=Wi("Find Object",`
- +
`,"Find",zl),h=i.querySelector(".sn-pattern"),u=i.querySelector(".sn-type"),f=i.querySelector(".sn-case");h.focus();function _(){let y=h.value.trim();if(!y){l("Enter a name or glob pattern.");return}s.websocketManager&&(l("Searching\u2026",!0),s.websocketManager.request({type:"find",obj_type:u.value,pattern:y,match_case:f.checked}).then(g=>{qi(s,g);let v=g&&g.count?g.count:0;if(!v){l("No objects found.");return}Array.isArray(g.bbox)&&(s.lastSelectionBounds=Gt(g.bbox[0],g.bbox[1],g.bbox[2],g.bbox[3],s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY),s.map.fitBounds(s.lastSelectionBounds)),typeof s.updateInspector=="function"&&s.updateInspector(g),typeof s.redrawAllLayers=="function"&&s.redrawAllLayers();let w=g.selection_count||v;l(g.truncated?`${v} found (showing first ${w}).`:`${v} found.`,!0)}).catch(g=>l("Find failed: "+g)))}return r.addEventListener("click",_),h.addEventListener("keydown",y=>{y.key==="Enter"&&(y.preventDefault(),_())}),{close:o}}function Ps(s){if(!s.designScale||!s.map)return;let e=b=>s.formatDbu(b),i=b=>s.parseDbu(b),o=s.unitLabel(),r=s.map.getCenter(),l=xe(r.lat,r.lng,s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY),{overlay:h,close:u,okBtn:f,showError:_}=Gi("Go to Position",` + `,"Find",Ol),h=i.querySelector(".sn-pattern"),u=i.querySelector(".sn-type"),f=i.querySelector(".sn-case");h.focus();function _(){let g=h.value.trim();if(!g){l("Enter a name or glob pattern.");return}s.websocketManager&&(l("Searching\u2026",!0),s.websocketManager.request({type:"find",obj_type:u.value,pattern:g,match_case:f.checked}).then(y=>{Fi(s,y);let v=y&&y.count?y.count:0;if(!v){l("No objects found.");return}Array.isArray(y.bbox)&&(s.lastSelectionBounds=Ut(y.bbox[0],y.bbox[1],y.bbox[2],y.bbox[3],s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY),s.map.fitBounds(s.lastSelectionBounds)),typeof s.updateInspector=="function"&&s.updateInspector(y),typeof s.redrawAllLayers=="function"&&s.redrawAllLayers();let w=y.selection_count||v;l(y.truncated?`${v} found (showing first ${w}).`:`${v} found.`,!0)}).catch(y=>l("Find failed: "+y)))}return r.addEventListener("click",_),h.addEventListener("keydown",g=>{g.key==="Enter"&&(g.preventDefault(),_())}),{close:o}}function As(s){if(!s.designScale||!s.map)return;let t=b=>s.formatDbu(b),i=b=>s.parseDbu(b),o=s.unitLabel(),r=s.map.getCenter(),l=we(r.lat,r.lng,s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY),{overlay:h,close:u,okBtn:f,showError:_}=Wi("Go to Position",`
-
+
-
+
-
`,"Go to",zl),y=h.querySelector(".sn-x"),g=h.querySelector(".sn-y"),v=h.querySelector(".sn-size");y.focus(),y.select();function w(){let b=i(y.value),C=i(g.value);if(b===null||C===null){_(`X and Y must be numbers (${o}).`);return}let B=Jt(b,C,s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY),P=v.value.trim(),T=P?i(P):null;if(T!==null&&T>0){let Z=T/2;s.map.fitBounds(Gt(b-Z,C-Z,b+Z,C+Z,s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY))}else s.map.setView(B,s.map.getZoom());u()}f.addEventListener("click",w);for(let b of[y,g,v])b.addEventListener("keydown",C=>{C.key==="Enter"&&(C.preventDefault(),w())});return{close:u}}var Hl={ctrl:"ctrl",control:"ctrl",shift:"shift",alt:"alt",meta:"meta",cmd:"meta",command:"meta",super:"meta"};function Hd(s){if(typeof s!="string")return null;let e=s.split("+").map(l=>l.trim().toLowerCase()).filter(Boolean);if(e.length===0)return null;let i=e.pop();if(Hl[i]!==void 0)return null;let o=new Set;for(let l of e){let h=Hl[l];if(h===void 0)return null;o.add(h)}return[...["ctrl","alt","shift","meta"].filter(l=>o.has(l)),i].join("+")}function $d(s){let e=[];return s.ctrlKey&&e.push("ctrl"),s.altKey&&e.push("alt"),s.shiftKey&&e.push("shift"),s.metaKey&&e.push("meta"),[...e,String(s.key).toLowerCase()].join("+")}function Fl(s){let e=y=>()=>s.focusComponent(y,{reveal:!0}),i=[{label:"File",items:[{label:"Open DB...",action:()=>$l(s,"Open DB","read_db"),enabledWhen:()=>!s.designScale},{label:"Save DB...",action:()=>$l(s,"Save DB","write_db"),enabledWhen:()=>!!s.designScale}]},{label:"View",items:[{label:"Fit",shortcut:"F",action:()=>{s.fitBounds&&s.map.fitBounds(s.fitBounds)}},{label:"Zoom In",shortcut:"Z",action:()=>s.map.zoomIn()},{label:"Zoom Out",shortcut:"Shift+Z",action:()=>s.map.zoomOut()},{type:"separator"},{label:"Toggle Theme",shortcut:"T",action:()=>s.toggleTheme()},{type:"separator"},{label:"Find...",shortcut:"Ctrl+F",action:()=>Ts(s),enabledWhen:()=>!!s.designScale},{label:"Go to Position...",shortcut:"Shift+G",action:()=>Ps(s),enabledWhen:()=>!!s.designScale}]},{label:"Tools",items:[{label:"Ruler",shortcut:"K",action:()=>{s.rulerManager&&s.rulerManager.toggleRulerMode()}},{label:"Clear Rulers",shortcut:"Shift+K",action:()=>{s.rulerManager&&s.rulerManager.clearAllRulers()}},{type:"separator"},{label:"Add Label",shortcut:"L",action:()=>{s.labelManager&&s.labelManager.toggleLabelMode()}},{label:"Clear Labels",action:()=>{s.labelManager&&s.labelManager.clearAllLabels()}},{type:"separator"},{label:"Clear Highlights",action:()=>{s.websocketManager.request({type:"clear_highlights",group:-1}).then(()=>{s.refreshOverlay&&s.refreshOverlay(),s.refreshInspector&&s.refreshInspector()}).catch(()=>{})}},{type:"separator"},{label:"Global Connect...",action:()=>{s.showGlobalConnectDialog&&s.showGlobalConnectDialog()},enabledWhen:()=>!!s.designScale}]},{label:"Options",items:[{label:"Show DBU",action:()=>s.toggleShowDbu(),checked:()=>s.showDbu},{label:"Make euclidian rulers",action:()=>s.toggleRulerStyle(),checked:()=>s.rulerStyle!=="manhattan"},{type:"separator"},{label:"Mouse wheel mapped to zoom by default",action:()=>s.toggleWheelZoom(),checked:()=>s.wheelZoom},{label:"Arrow keys scroll step...",action:()=>s.showArrowStepDialog()},{label:"Application font...",action:()=>s.showAppFontDialog()},{type:"separator"},{label:"Show polygon decomposition",action:()=>s.togglePolyDecomp(),checked:()=>s.polyDecomp,enabledWhen:()=>!!s.designScale}]},{label:"Windows",items:[{label:"Layout Viewer",action:e("LayoutViewer")},{label:"3D Viewer",action:e("3DViewer")},{label:"Display Controls",action:e("DisplayControls")},{label:"Inspector",action:e("Inspector")},{label:"Selection Browser",action:e("SelectHighlight")},{label:"Tcl Console",action:e("TclConsole")},{label:"Hierarchy Browser",action:e("Browser")},{label:"Timing",action:e("TimingWidget")},{label:"DRC Viewer",action:e("DRCWidget")},{label:"Clock Tree",action:e("ClockWidget")},{label:"Charts",action:e("ChartsWidget")},{label:"Help",action:e("HelpWidget")},{type:"separator"},{label:"Reset to Default Layout",action:()=>s.resetLayout()}]},{label:"Help",items:[{label:"Keyboard Shortcuts",action:e("HelpWidget")}]}],o=document.getElementById("menu-bar"),r=null,l=new Map;function h(){r&&(r.classList.remove("open"),r=null)}function u(){let y=i.map(b=>({label:b.label,items:b.items.slice()})),g=new Map(y.map(b=>[b.label,b]));function v(b){let C=g.get(b);return C||(C={label:b,items:[]},g.set(b,C),y.push(C)),C}function w(b,C){let B=b.items.find(P=>P.submenu&&P.label===C);return B||(B={label:C,submenu:{label:C,items:[]}},b.items.push(B)),B.submenu}for(let b of s.customMenu||[]){let C=String(b.path||"Custom Scripts").split("/").map(Z=>Z.trim()).filter(Boolean);C.length===0&&C.push("Custom Scripts");let B=v(C[0]);for(let Z=1;Zwn(s,b.script,b.echo);B.items.push({label:b.text,shortcut:b.shortcut,action:P});let T=Hd(b.shortcut);T&&l.set(T,P)}return y}function f(y,g){for(let v of g){if(v.type==="separator"){let C=document.createElement("div");C.className="menu-separator",y.appendChild(C);continue}let w=document.createElement("div");if(w.className="menu-item",v.submenu){w.classList.add("submenu-item");let C=document.createElement("span");C.textContent=v.label,w.appendChild(C);let B=document.createElement("span");B.className="submenu-arrow",B.textContent="\u25B8",w.appendChild(B);let P=document.createElement("div");P.className="menu-dropdown submenu",f(P,v.submenu.items),w.appendChild(P),y.appendChild(w);continue}if(v.disabled&&w.classList.add("disabled"),v.enabledWhen&&(w._enabledWhen=v.enabledWhen),v.checked){let C=document.createElement("span");C.className="menu-check",C.textContent=v.checked()?"\u2713":"",w.appendChild(C),w._checkedFn=v.checked}let b=document.createElement("span");if(b.textContent=v.label,w.appendChild(b),v.shortcut){let C=document.createElement("span");C.className="shortcut",C.textContent=v.shortcut,w.appendChild(C)}v.action&&w.addEventListener("click",C=>{w.classList.contains("disabled")||(C.stopPropagation(),h(),v.action())}),y.appendChild(w)}}function _(){for(let g of o.querySelectorAll(":scope > .menu-label"))g.remove();let y=o.firstChild;r=null,l.clear();for(let g of u()){let b=function(){for(let C of w.querySelectorAll(".menu-item"))if(C._enabledWhen&&C.classList.toggle("disabled",!C._enabledWhen()),C._checkedFn){let B=C.querySelector(".menu-check");B&&(B.textContent=C._checkedFn()?"\u2713":"")}},v=document.createElement("div");v.className="menu-label",v.textContent=g.label;let w=document.createElement("div");w.className="menu-dropdown",f(w,g.items),v.appendChild(w),v.addEventListener("click",C=>{C.stopPropagation(),r===v?h():(h(),b(),v.classList.add("open"),r=v)}),v.addEventListener("mouseenter",()=>{r&&r!==v&&(h(),b(),v.classList.add("open"),r=v)}),o.insertBefore(v,y)}}_(),s.rebuildMenuBar=_,document.addEventListener("click",h),Fd(l)}function Fd(s){document.addEventListener("keydown",e=>{if(s.size===0)return;let i=e.target.tagName;if(i==="INPUT"||i==="TEXTAREA"||e.target.isContentEditable)return;let o=s.get($d(e));o&&(e.preventDefault(),e.stopImmediatePropagation(),o())},!0)}function $l(s,e,i){let o=i==="write_db",r=document.createElement("div");r.className="modal-overlay",r.innerHTML=` + `,"Go to",Ol),g=h.querySelector(".sn-x"),y=h.querySelector(".sn-y"),v=h.querySelector(".sn-size");g.focus(),g.select();function w(){let b=i(g.value),C=i(y.value);if(b===null||C===null){_(`X and Y must be numbers (${o}).`);return}let R=Jt(b,C,s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY),P=v.value.trim(),T=P?i(P):null;if(T!==null&&T>0){let Z=T/2;s.map.fitBounds(Ut(b-Z,C-Z,b+Z,C+Z,s.designScale,s.designMaxDXDY,s.designOriginX,s.designOriginY))}else s.map.setView(R,s.map.getZoom());u()}f.addEventListener("click",w);for(let b of[g,y,v])b.addEventListener("keydown",C=>{C.key==="Enter"&&(C.preventDefault(),w())});return{close:u}}var Hl={ctrl:"ctrl",control:"ctrl",shift:"shift",alt:"alt",meta:"meta",cmd:"meta",command:"meta",super:"meta"};function $d(s){if(typeof s!="string")return null;let t=s.split("+").map(l=>l.trim().toLowerCase()).filter(Boolean);if(t.length===0)return null;let i=t.pop();if(Hl[i]!==void 0)return null;let o=new Set;for(let l of t){let h=Hl[l];if(h===void 0)return null;o.add(h)}return[...["ctrl","alt","shift","meta"].filter(l=>o.has(l)),i].join("+")}function Fd(s){let t=[];return s.ctrlKey&&t.push("ctrl"),s.altKey&&t.push("alt"),s.shiftKey&&t.push("shift"),s.metaKey&&t.push("meta"),[...t,String(s.key).toLowerCase()].join("+")}function Fl(s){let t=g=>()=>s.focusComponent(g,{reveal:!0}),i=[{label:"File",items:[{label:"Open DB...",action:()=>$l(s,"Open DB","read_db"),enabledWhen:()=>!s.designScale},{label:"Save DB...",action:()=>$l(s,"Save DB","write_db"),enabledWhen:()=>!!s.designScale}]},{label:"View",items:[{label:"Fit",shortcut:"F",action:()=>{s.fitBounds&&s.map.fitBounds(s.fitBounds)}},{label:"Zoom In",shortcut:"Z",action:()=>s.map.zoomIn()},{label:"Zoom Out",shortcut:"Shift+Z",action:()=>s.map.zoomOut()},{type:"separator"},{label:"Toggle Theme",shortcut:"T",action:()=>s.toggleTheme()},{type:"separator"},{label:"Find...",shortcut:"Ctrl+F",action:()=>Ps(s),enabledWhen:()=>!!s.designScale},{label:"Go to Position...",shortcut:"Shift+G",action:()=>As(s),enabledWhen:()=>!!s.designScale}]},{label:"Tools",items:[{label:"Ruler",shortcut:"K",action:()=>{s.rulerManager&&s.rulerManager.toggleRulerMode()}},{label:"Clear Rulers",shortcut:"Shift+K",action:()=>{s.rulerManager&&s.rulerManager.clearAllRulers()}},{type:"separator"},{label:"Add Label",shortcut:"L",action:()=>{s.labelManager&&s.labelManager.toggleLabelMode()}},{label:"Clear Labels",action:()=>{s.labelManager&&s.labelManager.clearAllLabels()}},{type:"separator"},{label:"Clear Highlights",action:()=>{s.websocketManager.request({type:"clear_highlights",group:-1}).then(()=>{s.refreshOverlay&&s.refreshOverlay(),s.refreshInspector&&s.refreshInspector()}).catch(()=>{})}},{type:"separator"},{label:"Global Connect...",action:()=>{s.showGlobalConnectDialog&&s.showGlobalConnectDialog()},enabledWhen:()=>!!s.designScale}]},{label:"Options",items:[{label:"Show DBU",action:()=>s.toggleShowDbu(),checked:()=>s.showDbu},{label:"Make euclidian rulers",action:()=>s.toggleRulerStyle(),checked:()=>s.rulerStyle!=="manhattan"},{type:"separator"},{label:"Mouse wheel mapped to zoom by default",action:()=>s.toggleWheelZoom(),checked:()=>s.wheelZoom},{label:"Arrow keys scroll step...",action:()=>s.showArrowStepDialog()},{label:"Application font...",action:()=>s.showAppFontDialog()},{type:"separator"},{label:"Show polygon decomposition",action:()=>s.togglePolyDecomp(),checked:()=>s.polyDecomp,enabledWhen:()=>!!s.designScale}]},{label:"Windows",items:[{label:"Layout Viewer",action:t("LayoutViewer")},{label:"Schematic",action:t("SchematicWidget")},{label:"3D Viewer",action:t("3DViewer")},{label:"Display Controls",action:t("DisplayControls")},{label:"Inspector",action:t("Inspector")},{label:"Selection Browser",action:t("SelectHighlight")},{label:"Tcl Console",action:t("TclConsole")},{label:"Hierarchy Browser",action:t("Browser")},{label:"Timing",action:t("TimingWidget")},{label:"DRC Viewer",action:t("DRCWidget")},{label:"Clock Tree",action:t("ClockWidget")},{label:"Charts",action:t("ChartsWidget")},{label:"Help",action:t("HelpWidget")},{type:"separator"},{label:"Reset to Default Layout",action:()=>s.resetLayout()}]},{label:"Help",items:[{label:"Keyboard Shortcuts",action:t("HelpWidget")}]}],o=document.getElementById("menu-bar"),r=null,l=new Map;function h(){r&&(r.classList.remove("open"),r=null)}function u(){let g=i.map(b=>({label:b.label,items:b.items.slice()})),y=new Map(g.map(b=>[b.label,b]));function v(b){let C=y.get(b);return C||(C={label:b,items:[]},y.set(b,C),g.push(C)),C}function w(b,C){let R=b.items.find(P=>P.submenu&&P.label===C);return R||(R={label:C,submenu:{label:C,items:[]}},b.items.push(R)),R.submenu}for(let b of s.customMenu||[]){let C=String(b.path||"Custom Scripts").split("/").map(Z=>Z.trim()).filter(Boolean);C.length===0&&C.push("Custom Scripts");let R=v(C[0]);for(let Z=1;Zwn(s,b.script,b.echo);R.items.push({label:b.text,shortcut:b.shortcut,action:P});let T=$d(b.shortcut);T&&l.set(T,P)}return g}function f(g,y){for(let v of y){if(v.type==="separator"){let C=document.createElement("div");C.className="menu-separator",g.appendChild(C);continue}let w=document.createElement("div");if(w.className="menu-item",v.submenu){w.classList.add("submenu-item");let C=document.createElement("span");C.textContent=v.label,w.appendChild(C);let R=document.createElement("span");R.className="submenu-arrow",R.textContent="\u25B8",w.appendChild(R);let P=document.createElement("div");P.className="menu-dropdown submenu",f(P,v.submenu.items),w.appendChild(P),g.appendChild(w);continue}if(v.disabled&&w.classList.add("disabled"),v.enabledWhen&&(w._enabledWhen=v.enabledWhen),v.checked){let C=document.createElement("span");C.className="menu-check",C.textContent=v.checked()?"\u2713":"",w.appendChild(C),w._checkedFn=v.checked}let b=document.createElement("span");if(b.textContent=v.label,w.appendChild(b),v.shortcut){let C=document.createElement("span");C.className="shortcut",C.textContent=v.shortcut,w.appendChild(C)}v.action&&w.addEventListener("click",C=>{w.classList.contains("disabled")||(C.stopPropagation(),h(),v.action())}),g.appendChild(w)}}function _(){for(let y of o.querySelectorAll(":scope > .menu-label"))y.remove();let g=o.firstChild;r=null,l.clear();for(let y of u()){let b=function(){for(let C of w.querySelectorAll(".menu-item"))if(C._enabledWhen&&C.classList.toggle("disabled",!C._enabledWhen()),C._checkedFn){let R=C.querySelector(".menu-check");R&&(R.textContent=C._checkedFn()?"\u2713":"")}},v=document.createElement("div");v.className="menu-label",v.textContent=y.label;let w=document.createElement("div");w.className="menu-dropdown",f(w,y.items),v.appendChild(w),v.addEventListener("click",C=>{C.stopPropagation(),r===v?h():(h(),b(),v.classList.add("open"),r=v)}),v.addEventListener("mouseenter",()=>{r&&r!==v&&(h(),b(),v.classList.add("open"),r=v)}),o.insertBefore(v,g)}}_(),s.rebuildMenuBar=_,document.addEventListener("click",h),Zd(l)}function Zd(s){document.addEventListener("keydown",t=>{if(s.size===0)return;let i=t.target.tagName;if(i==="INPUT"||i==="TEXTAREA"||t.target.isContentEditable)return;let o=s.get(Fd(t));o&&(t.preventDefault(),t.stopImmediatePropagation(),o())},!0)}function $l(s,t,i){let o=i==="write_db",r=document.createElement("div");r.className="modal-overlay",r.innerHTML=` - `,document.body.appendChild(r);let l=r.querySelector(".fb-breadcrumb"),h=r.querySelector(".fb-file-list"),u=r.querySelector(".fb-path-input"),f=r.querySelector(".modal-error"),_=r.querySelector(".ok"),y=r.querySelector(".cancel"),g="",v=null;function w(){r.remove()}function b(){let Z=u.value.trim();_.disabled=!Z}function C(Z){l.innerHTML="";let G=Z.split("/").filter(Boolean),dt=document.createElement("span");dt.className="fb-crumb",dt.textContent="/",dt.addEventListener("click",()=>P("/")),l.appendChild(dt);let gt="";for(let it of G){gt+="/"+it;let Q=document.createElement("span");Q.className="fb-crumb-sep",Q.textContent=" / ",l.appendChild(Q);let nt=document.createElement("span");nt.className="fb-crumb",nt.textContent=it;let tt=gt;nt.addEventListener("click",()=>P(tt)),l.appendChild(nt)}}function B(Z){if(h.innerHTML="",v=null,!Z||Z.length===0){let G=document.createElement("div");G.className="fb-empty",G.textContent="(empty directory)",h.appendChild(G);return}for(let G of Z){let dt=document.createElement("div");dt.className="fb-entry",G.is_dir&&dt.classList.add("fb-dir");let gt=document.createElement("span");gt.className="fb-icon",gt.textContent=G.is_dir?"\u{1F4C1}":"\u{1F4C4}",dt.appendChild(gt);let it=document.createElement("span");if(it.className="fb-name",it.textContent=G.name,dt.appendChild(it),!G.is_dir&&G.size!==void 0){let Q=document.createElement("span");Q.className="fb-size",Q.textContent=Zd(G.size),dt.appendChild(Q)}G.is_dir?dt.addEventListener("click",()=>{P(g+"/"+G.name)}):(dt.addEventListener("click",()=>{let Q=h.querySelector(".fb-selected");Q&&Q.classList.remove("fb-selected"),dt.classList.add("fb-selected"),v=G,u.value=g+"/"+G.name,b()}),dt.addEventListener("dblclick",()=>{u.value=g+"/"+G.name,b(),T()})),h.appendChild(dt)}}async function P(Z){f.style.display="none",h.innerHTML='
Loading...
';try{let G=await s.websocketManager.request({type:"list_dir",path:Z||""});if(g=G.path,C(G.path),B(G.entries),o){let gt=u.value.trim().split("/").pop();gt&&!gt.includes("/")?u.value=g+"/"+gt:u.value=g+"/"}else u.value="",v=null;b()}catch(G){h.innerHTML="",f.textContent=G.message||String(G),f.style.display=""}}async function T(){let Z=u.value.trim();if(Z){_.disabled=!0,_.textContent="Working...",f.style.display="none";try{let G=await s.websocketManager.request({type:"tcl_eval",cmd:`${i} ${Z}`});if(G.is_error){f.textContent=G.output||G.result||"Command failed",f.style.display="",_.disabled=!1,_.textContent=o?"Save":"Open";return}if(w(),i==="read_db"){window.location.reload();return}}catch(G){f.textContent=G.message||"Request failed",f.style.display="",_.disabled=!1,_.textContent=o?"Save":"Open"}}}u.addEventListener("input",b),u.addEventListener("keydown",Z=>{if(Z.key==="Enter"){let G=u.value.trim();G.endsWith("/")?P(G.replace(/\/+$/,"")||"/"):T()}Z.key==="Escape"&&w()}),_.addEventListener("click",T),y.addEventListener("click",w),r.addEventListener("click",Z=>{Z.target===r&&w()}),P("")}function Zd(s){return s<1024?s+" B":s<1024*1024?(s/1024).toFixed(1)+" KB":s<1024*1024*1024?(s/(1024*1024)).toFixed(1)+" MB":(s/(1024*1024*1024)).toFixed(1)+" GB"}function Zl(s){let e=document.getElementById("toolbar");if(!e)return;s._toolbarToggleState||(s._toolbarToggleState={});function i(){e.innerHTML="";let o=s.customToolbar||[],r=new Set(o.map(l=>l.key));for(let l of Object.keys(s._toolbarToggleState))r.has(l)||delete s._toolbarToggleState[l];for(let l of o){let h=document.createElement("button");if(h.className="or-btn or-btn-sm toolbar-button",h.dataset.key=l.key,l.tooltip&&(h.title=l.tooltip),l.icon){let u=document.createElement("span");if(u.className="toolbar-icon",/^(data:|https?:|\.?\/)/.test(l.icon)){let f=document.createElement("img");f.src=l.icon,f.alt="",u.appendChild(f)}else u.textContent=l.icon;h.appendChild(u)}if(l.text){let u=document.createElement("span");u.className="toolbar-label",u.textContent=l.text,h.appendChild(u)}l.toggle&&s._toolbarToggleState[l.key]&&h.classList.add("active"),h.addEventListener("click",()=>{if(l.toggle){let u=!s._toolbarToggleState[l.key];s._toolbarToggleState[l.key]=u,h.classList.toggle("active",u),wn(s,u?l.script:l.script_off,l.echo)}else wn(s,l.script,l.echo)}),e.appendChild(h)}}return i(),s.rebuildToolbar=i,{rebuild:i}}function Wl(s,e=""){let i=document.createElement("div");i.className="modal-overlay",i.innerHTML=` - `,document.body.appendChild(r);let l=r.querySelector(".fb-breadcrumb"),h=r.querySelector(".fb-file-list"),u=r.querySelector(".fb-path-input"),f=r.querySelector(".modal-error"),_=r.querySelector(".ok"),g=r.querySelector(".cancel"),y="",v=null;function w(){r.remove()}function b(){let Z=u.value.trim();_.disabled=!Z}function C(Z){l.innerHTML="";let U=Z.split("/").filter(Boolean),dt=document.createElement("span");dt.className="fb-crumb",dt.textContent="/",dt.addEventListener("click",()=>P("/")),l.appendChild(dt);let gt="";for(let it of U){gt+="/"+it;let Q=document.createElement("span");Q.className="fb-crumb-sep",Q.textContent=" / ",l.appendChild(Q);let nt=document.createElement("span");nt.className="fb-crumb",nt.textContent=it;let tt=gt;nt.addEventListener("click",()=>P(tt)),l.appendChild(nt)}}function R(Z){if(h.innerHTML="",v=null,!Z||Z.length===0){let U=document.createElement("div");U.className="fb-empty",U.textContent="(empty directory)",h.appendChild(U);return}for(let U of Z){let dt=document.createElement("div");dt.className="fb-entry",U.is_dir&&dt.classList.add("fb-dir");let gt=document.createElement("span");gt.className="fb-icon",gt.textContent=U.is_dir?"\u{1F4C1}":"\u{1F4C4}",dt.appendChild(gt);let it=document.createElement("span");if(it.className="fb-name",it.textContent=U.name,dt.appendChild(it),!U.is_dir&&U.size!==void 0){let Q=document.createElement("span");Q.className="fb-size",Q.textContent=qd(U.size),dt.appendChild(Q)}U.is_dir?dt.addEventListener("click",()=>{P(y+"/"+U.name)}):(dt.addEventListener("click",()=>{let Q=h.querySelector(".fb-selected");Q&&Q.classList.remove("fb-selected"),dt.classList.add("fb-selected"),v=U,u.value=y+"/"+U.name,b()}),dt.addEventListener("dblclick",()=>{u.value=y+"/"+U.name,b(),T()})),h.appendChild(dt)}}async function P(Z){f.style.display="none",h.innerHTML='
Loading...
';try{let U=await s.websocketManager.request({type:"list_dir",path:Z||""});if(y=U.path,C(U.path),R(U.entries),o){let gt=u.value.trim().split("/").pop();gt&&!gt.includes("/")?u.value=y+"/"+gt:u.value=y+"/"}else u.value="",v=null;b()}catch(U){h.innerHTML="",f.textContent=U.message||String(U),f.style.display=""}}async function T(){let Z=u.value.trim();if(Z){_.disabled=!0,_.textContent="Working...",f.style.display="none";try{let U=await s.websocketManager.request({type:"tcl_eval",cmd:`${i} ${Z}`});if(U.is_error){f.textContent=U.output||U.result||"Command failed",f.style.display="",_.disabled=!1,_.textContent=o?"Save":"Open";return}if(w(),i==="read_db"){window.location.reload();return}}catch(U){f.textContent=U.message||"Request failed",f.style.display="",_.disabled=!1,_.textContent=o?"Save":"Open"}}}u.addEventListener("input",b),u.addEventListener("keydown",Z=>{if(Z.key==="Enter"){let U=u.value.trim();U.endsWith("/")?P(U.replace(/\/+$/,"")||"/"):T()}Z.key==="Escape"&&w()}),_.addEventListener("click",T),g.addEventListener("click",w),r.addEventListener("click",Z=>{Z.target===r&&w()}),P("")}function qd(s){return s<1024?s+" B":s<1024*1024?(s/1024).toFixed(1)+" KB":s<1024*1024*1024?(s/(1024*1024)).toFixed(1)+" MB":(s/(1024*1024*1024)).toFixed(1)+" GB"}function Zl(s){let t=document.getElementById("toolbar");if(!t)return;s._toolbarToggleState||(s._toolbarToggleState={});function i(){t.innerHTML="";let o=s.customToolbar||[],r=new Set(o.map(l=>l.key));for(let l of Object.keys(s._toolbarToggleState))r.has(l)||delete s._toolbarToggleState[l];for(let l of o){let h=document.createElement("button");if(h.className="or-btn or-btn-sm toolbar-button",h.dataset.key=l.key,l.tooltip&&(h.title=l.tooltip),l.icon){let u=document.createElement("span");if(u.className="toolbar-icon",/^(data:|https?:|\.?\/)/.test(l.icon)){let f=document.createElement("img");f.src=l.icon,f.alt="",u.appendChild(f)}else u.textContent=l.icon;h.appendChild(u)}if(l.text){let u=document.createElement("span");u.className="toolbar-label",u.textContent=l.text,h.appendChild(u)}l.toggle&&s._toolbarToggleState[l.key]&&h.classList.add("active"),h.addEventListener("click",()=>{if(l.toggle){let u=!s._toolbarToggleState[l.key];s._toolbarToggleState[l.key]=u,h.classList.toggle("active",u),wn(s,u?l.script:l.script_off,l.echo)}else wn(s,l.script,l.echo)}),t.appendChild(h)}}return i(),s.rebuildToolbar=i,{rebuild:i}}function Wl(s,t=""){let i=document.createElement("div");i.className="modal-overlay",i.innerHTML=` + `,document.body.appendChild(i);function o(l){l.key==="Escape"&&r()}let r=()=>{i.remove(),document.removeEventListener("keydown",o)};return i.addEventListener("click",l=>{l.target===i&&r()}),document.addEventListener("keydown",o),{overlay:i,body:i.querySelector(".modal-body"),errorDiv:i.querySelector(".modal-error"),buttons:i.querySelector(".modal-buttons"),close:r}}function Ne(s,e){s.textContent=e,s.style.display=e?"":"none"}function ji(s,e,{primary:i=!1}={}){let o=document.createElement("button");return o.textContent=e,o.className="or-btn"+(i?" or-btn-primary":""),s.appendChild(o),o}function As(s){return"{"+String(s)+"}"}function Ul(s){let e=Wl("Global Connect","gc-dialog"),i=document.createElement("div");i.className="gc-table",e.body.appendChild(i);let o=document.createElement("div");o.className="gc-form";let r=document.createElement("input");r.placeholder="Instance pattern (regex)",r.value=".*";let l=document.createElement("input");l.placeholder="Pin pattern (regex)";let h=document.createElement("select"),u=document.createElement("select"),f=document.createElement("span");f.innerHTML='',o.append(Qe("Instance",r),Qe("Pin",l),Qe("Net",h),Qe("Region",u),f);let _=ji(o,"Add rule");e.body.appendChild(o);function y(){let b=l.value.trim()!==""&&h.value!=="";for(let C of[r,l])try{new RegExp(C.value),C.classList.remove("gc-invalid")}catch{C.classList.add("gc-invalid"),b=!1}_.disabled=!b}r.addEventListener("input",y),l.addEventListener("input",y),h.addEventListener("change",y);function g(){s.websocketManager.request({type:"global_connect_info"}).then(b=>{i.innerHTML='
InstancePinNetRegion
',(b.rules||[]).forEach(C=>{let B=document.createElement("div");B.className="gc-row",B.innerHTML=`${Mn(C.inst)}${Mn(C.pin)}${Mn(C.net)}${Mn(C.region||"All")}`;let P=document.createElement("button");P.className="or-btn or-btn-sm or-btn-icon",P.textContent="\u2715",P.title="Delete rule",P.addEventListener("click",()=>{s.websocketManager.request({type:"global_connect_delete",inst:C.inst,pin:C.pin,net:C.net,region:C.region||""}).then(g).catch(T=>Ne(e.errorDiv,String(T)))}),B.appendChild(P),i.appendChild(B)}),jo(h,b.nets||[]),jo(u,["All",...b.regions||[]]),y()}).catch(b=>Ne(e.errorDiv,String(b)))}_.addEventListener("click",()=>{let b=o.querySelector('input[name="gc-pg"]:checked').value,C=`add_global_connection -net ${As(h.value)} -inst_pattern ${As(r.value||".*")} -pin_pattern ${As(l.value)} -${b}`;u.value&&u.value!=="All"&&(C+=` -region ${As(u.value)}`),ql(s,C,e.errorDiv,"Rule added.",g)}),ji(e.buttons,"Apply (force)").addEventListener("click",()=>{s.websocketManager.request({type:"global_connect_apply",force:!0}).then(b=>{if(!b.had_rules){Ne(e.errorDiv,"No global-connect rules defined \u2014 add a rule first.");return}Ne(e.errorDiv,`Connected ${b.connected} pin(s).`),s.scheduleRedrawAllLayers&&s.scheduleRedrawAllLayers(),g()}).catch(b=>Ne(e.errorDiv,b.message||String(b)))}),ji(e.buttons,"Clear all").addEventListener("click",()=>ql(s,"clear_global_connect",e.errorDiv,"Rules cleared.",g)),ji(e.buttons,"Close").addEventListener("click",e.close),g()}function ql(s,e,i,o,r){s.websocketManager.request({type:"tcl_eval",cmd:e}).then(l=>{if(l.is_error){Ne(i,l.output||l.result||"Command failed");return}Ne(i,o||""),s.scheduleRedrawAllLayers&&s.scheduleRedrawAllLayers(),r&&r()}).catch(l=>Ne(i,l.message||String(l)))}function Gl(s,e){let i=Wl(`Insert Buffer \u2014 ${Mn(e)}`,"buf-dialog"),o=ji(i.buttons,"Insert",{primary:!0});o.disabled=!0,ji(i.buttons,"Cancel").addEventListener("click",i.close),s.websocketManager.request({type:"buffer_info",net:e}).then(l=>{if(!l.can_buffer){i.body.textContent=l.error||"This net has multiple drivers and cannot be buffered.";return}qd(s,i,e,l,o)}).catch(l=>{i.body.textContent=String(l)})}function qd(s,e,i,o,r){let l=document.createElement("div");l.className="buf-pins";let h=o.drivers||[],u=o.loads||[],f=new Set;function _(){l.innerHTML="";let b=(C,B)=>{let P=document.createElement("label");P.className="buf-pin";let T=document.createElement("input");T.type="checkbox",T.checked=f.has(C.id),T.addEventListener("change",()=>{if(T.checked){if(B)f.clear();else for(let Z of h)f.delete(Z.id);f.add(C.id)}else f.delete(C.id);_(),w()}),P.append(T,document.createTextNode(" "+C.label)),l.appendChild(P)};h.forEach(C=>b(C,!0)),u.forEach(C=>b(C,!1))}h.length&&f.add(h[0].id),_();let y=document.createElement("select");jo(y,o.masters||[]);let g=document.createElement("input");g.placeholder="Optional: new buffer name";let v=document.createElement("input");v.placeholder="Optional: new net name",e.body.append(Qe("Pins to buffer",l),Qe("Buffer master",y),Qe("Buffer name",g),Qe("Net name",v));function w(){r.disabled=f.size===0||!y.value}y.addEventListener("change",w),w(),r.addEventListener("click",()=>{let b=new Set(h.map(P=>P.id)),C=[...f],B=C.some(P=>b.has(P))?"driver":"loads";s.websocketManager.request({type:"insert_buffer",net:i,mode:B,pins:C,master:y.value,buf_name:g.value.trim(),net_name:v.value.trim()}).then(P=>{if(P.is_error||P.ok===!1){Ne(e.errorDiv,P.error||P.result||"Insertion failed");return}e.close(),P.inst&&(s.selectedInstanceName=P.inst),s.scheduleRedrawAllLayers&&s.scheduleRedrawAllLayers()}).catch(P=>Ne(e.errorDiv,P.message||String(P)))})}function Qe(s,e){let i=document.createElement("label");i.className="edit-field";let o=document.createElement("span");return o.textContent=s,i.append(o,e),i}function jo(s,e){let i=s.value;s.innerHTML="";for(let o of e){let r=document.createElement("option");r.value=o,r.textContent=o,s.appendChild(r)}e.includes(i)&&(s.value=i)}function Mn(s){return String(s??"").replace(/&/g,"&").replace(//g,">")}var Vl="#00ffff",Wd="#ffff00",Ko="#ffffff",Ci=0,Jo=1,En=2,Is=class{constructor(e,i,o,r){this._app=e,this._visibility=i,this._updateInspector=o,this._focusComponent=r,this._state=Ci,this._rulers=[],this._nextId=0,this._pt0=null,this._selectedRulerId=null,this._ctrlHeld=!1,this._shiftHeld=!1,this._rulerPane=null,this._rulerLayerGroup=null,this._previewGroup=null,this._snapGroup=null,this._snapTimer=null,this._lastSnapResult=null,this._onMouseMove=this._handleMouseMove.bind(this),this._onMapClick=this._handleMapClick.bind(this),this._initLayers()}_initLayers(){let e=this._app.map;e&&(this._rulerPane=e.createPane("ruler-pane"),this._rulerPane.style.zIndex="700",this._rulerPane.style.pointerEvents="auto",this._rulerLayerGroup=L.layerGroup([],{pane:"ruler-pane"}).addTo(e),this._previewGroup=L.layerGroup([],{pane:"ruler-pane"}).addTo(e),this._snapGroup=L.layerGroup([],{pane:"ruler-pane"}).addTo(e))}isActive(){return this._state!==Ci}updateVisibility(){this._rulerPane&&(this._rulerPane.style.display=this._visibility.rulers?"":"none")}toggleRulerMode(){this._state===Ci?this._enterFirstPoint():this.cancelRulerBuild()}cancelRulerBuild(){this._state=Ci,this._pt0=null,this._lastSnapResult=null,this._clearPreview(),this._clearSnap(),this._setCursor(!1),this._removeMapListeners()}clearAllRulers(){this._rulers=[],this._selectedRulerId=null,this._rulerLayerGroup.clearLayers(),this._clearPreview(),this._clearSnap(),this._state!==Ci&&this.cancelRulerBuild()}_enterFirstPoint(){this._state=Jo,this._pt0=null,this._lastSnapResult=null,this._setCursor(!0),this._addMapListeners()}_enterMeasuring(e){this._state=En,this._pt0=e}_addMapListeners(){let e=this._app.map;e&&(e.getContainer().addEventListener("mousemove",this._onMouseMove),e.on("click",this._onMapClick))}_removeMapListeners(){let e=this._app.map;e&&(e.getContainer().removeEventListener("mousemove",this._onMouseMove),e.off("click",this._onMapClick))}_handleMouseMove(e){if(this._state===Ci)return;this._ctrlHeld=e.ctrlKey||e.metaKey,this._shiftHeld=e.shiftKey;let i=this._app.map,o=i.getContainer().getBoundingClientRect(),r=i.containerPointToLatLng([e.clientX-o.left,e.clientY-o.top]),l=xe(r.lat,r.lng,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY);this._snapTimer&&clearTimeout(this._snapTimer),this._snapTimer=setTimeout(()=>{this._requestSnap(l.dbuX,l.dbuY)},50)}_handleMapClick(e){if(this._state===Ci)return;L.DomEvent.stopPropagation(e);let i=e.originalEvent;i&&(this._ctrlHeld=i.ctrlKey||i.metaKey,this._shiftHeld=i.shiftKey);let o=xe(e.latlng.lat,e.latlng.lng,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY),r=this._getSnappedPoint(o.dbuX,o.dbuY);this._state===Jo?this._enterMeasuring(r):this._state===En&&(this._createRuler(this._pt0,r),this._state=Jo,this._pt0=null,this._clearPreview(),this._clearSnap(),this._lastSnapResult=null)}async _requestSnap(e,i){let o=this._app;if(!o.websocketManager||!o.designScale)return;if(this._ctrlHeld){this._lastSnapResult=null,this._clearSnap(),this._updatePreview(e,i);return}let l=o.techData?.dbu_per_micron||1e3,h=o.map.getZoom(),u=Math.pow(2,Math.max(0,h)),f=1/(o.designScale*u),_=Math.max(Math.round(10*f),10),y=!0,g=!0;if(this._shiftHeld)y=!0,g=!0;else if(this._state===En&&this._pt0){let w=Math.abs(e-this._pt0.x),b=Math.abs(i-this._pt0.y);w>b?(y=!1,g=!0):b>w&&(y=!0,g=!1)}let v={};for(let[w,b]of Object.entries(this._visibility))v[w]=!!b;try{let w=await o.websocketManager.request({type:"snap",dbu_x:e,dbu_y:i,radius:l,point_threshold:_,horizontal:!!y,vertical:!!g,visible_layers:[...o.visibleLayerNames],...v});this._lastSnapResult=w,this._updateSnapIndicator(w),this._updatePreview(e,i)}catch{this._lastSnapResult=null,this._clearSnap()}}_getSnappedPoint(e,i){if(this._ctrlHeld)return{x:e,y:i};let o=this._lastSnapResult,r;if(o?.found&&o.is_point)r={x:o.edge[0][0],y:o.edge[0][1]};else if(o?.found){let l=o.edge;l[0][1]===l[1][1]?r={x:e,y:l[0][1]}:r={x:l[0][0],y:i}}else r={x:e,y:i};if(!this._shiftHeld&&this._state===En&&this._pt0){let l=Math.abs(r.x-this._pt0.x),h=Math.abs(r.y-this._pt0.y);l{L.DomEvent.stopPropagation(Q),this._selectRuler(e.id)}),y.addLayer(b);let C=this._app.map.getZoom(),B=Math.pow(2,Math.max(0,C)),T=8*(1/(i*B)),Z=(Q,nt,tt)=>{let Ct=Math.sqrt(nt*nt+tt*tt);if(Ct===0)return;let Mt=-tt/Ct,It=nt/Ct,Nt=Jt(Q.x+Mt*T,Q.y+It*T,i,o,r,l),Yt=Jt(Q.x-Mt*T,Q.y-It*T,i,o,r,l);y.addLayer(L.polyline([Nt,Yt],{color:_,weight:2,pane:"ruler-pane",interactive:!1}))};if(g)Z(e.pt0,g.x-e.pt0.x,g.y-e.pt0.y),Z(e.pt1,e.pt1.x-g.x,e.pt1.y-g.y);else{let Q=e.pt1.x-e.pt0.x,nt=e.pt1.y-e.pt0.y;Z(e.pt0,Q,nt),Z(e.pt1,Q,nt)}let G=this._computeDistance(e.pt0,e.pt1,e.euclidian),dt=v?v[0]:(h[0]+u[0])/2,gt=v?v[1]:(h[1]+u[1])/2,it=L.marker([dt,gt],{icon:L.divIcon({className:"ruler-label",html:this._formatDistance(G),iconSize:null}),pane:"ruler-pane",interactive:!1});y.addLayer(it),e._layerGroup=y,this._rulerLayerGroup.addLayer(y)}_rerenderAll(){this._rulerLayerGroup.clearLayers();for(let e of this._rulers)this._renderRuler(e)}_selectRuler(e){this._selectedRulerId=e,this._rerenderAll();let i=this._rulers.find(_=>_.id===e);if(!i)return;ae(this._app);let o=Math.abs(i.pt1.x-i.pt0.x),r=Math.abs(i.pt1.y-i.pt0.y),l=i.euclidian?Math.sqrt(o*o+r*r):o+r,h=_=>this._app.formatDbu(_,!0),u=_=>this._app.parseDbu(_),f={type:"Ruler",name:i.name,bbox:[Math.min(i.pt0.x,i.pt1.x),Math.min(i.pt0.y,i.pt1.y),Math.max(i.pt0.x,i.pt1.x),Math.max(i.pt0.y,i.pt1.y)],properties:[{name:"Name",value:i.name,editable:!0},{name:"Label",value:i.label||"",editable:!0},{name:"Point 0 - x",value:h(i.pt0.x),editable:!0},{name:"Point 0 - y",value:h(i.pt0.y),editable:!0},{name:"Point 1 - x",value:h(i.pt1.x),editable:!0},{name:"Point 1 - y",value:h(i.pt1.y),editable:!0},{name:"Delta x",value:h(o)},{name:"Delta y",value:h(r)},{name:"Length",value:h(l)},{name:"Euclidian",value:i.euclidian?"True":"False",editable:!0,editor:{type:"bool"}}],onPropertyChange:(_,y)=>{switch(_){case"Name":i.name=y;break;case"Label":i.label=y;break;case"Point 0 - x":{let g=u(y);g!==null&&(i.pt0.x=g);break}case"Point 0 - y":{let g=u(y);g!==null&&(i.pt0.y=g);break}case"Point 1 - x":{let g=u(y);g!==null&&(i.pt1.x=g);break}case"Point 1 - y":{let g=u(y);g!==null&&(i.pt1.y=g);break}case"Euclidian":i.euclidian=y.trim().toLowerCase()==="true";break}this._rerenderAll(),this._selectRuler(i.id)}};this._updateInspector(f),this._focusComponent("Inspector"),requestAnimationFrame(()=>{let _=this._app.inspectorEl?.querySelector(".inspector-toolbar");if(!_)return;let y=document.createElement("button");y.className="or-btn or-btn-icon",y.title="Delete ruler",y.innerHTML='',y.addEventListener("click",()=>{this.deleteRuler(e)}),_.appendChild(y)})}deleteRuler(e){let i=this._rulers.findIndex(r=>r.id===e);if(i===-1)return;let o=this._rulers[i];o._layerGroup&&this._rulerLayerGroup.removeLayer(o._layerGroup),this._rulers.splice(i,1),this._selectedRulerId===e&&(this._selectedRulerId=null,this._updateInspector(null))}_getManhattanJoinPt(e,i){return{x:i.x,y:e.y}}_computeDistance(e,i,o=!0){let r=Math.abs(i.x-e.x),l=Math.abs(i.y-e.y);return o?Math.sqrt(r*r+l*l):r+l}_formatDistance(e){return this._app.formatDistance(e)}_setCursor(e){let i=this._app.map?.getContainer();i&&(e?i.classList.add("ruler-mode-cursor"):i.classList.remove("ruler-mode-cursor"))}_clearPreview(){this._previewGroup?.clearLayers()}_clearSnap(){this._snapGroup?.clearLayers()}};var Ns=class{constructor(e,i,o,r){this._app=e,this._visibility=i,this._updateInspector=o,this._focusComponent=r,this._labels=[],this._anchors=[],this._mode=!1,this._selectedName=null,this._pane=null,this._handleGroup=null,this._initLayers()}_initLayers(){let e=this._app.map;e&&(this._pane=e.createPane("label-pane"),this._pane.style.zIndex="690",this._pane.style.pointerEvents="auto",this._handleGroup=L.layerGroup([],{pane:"label-pane"}).addTo(e))}isActive(){return this._mode}updateVisibility(){this._pane&&(this._pane.style.display=this._visibility.labels?"":"none")}toggleLabelMode(){this._mode=!this._mode,this._setCursor(this._mode)}cancelLabelMode(){this._mode=!1,this._setCursor(!1)}_setCursor(e){let i=this._app.map?.getContainer();i&&i.classList.toggle("label-mode-cursor",e)}_wm(){return this._app.websocketManager}_applyLabels(e){this._labels=e||[],this._renderHandles()}_refresh(e){this._applyLabels(e&&e.labels),this._app.refreshOverlay()}applyRemoteLabels(e){this._applyLabels(e),this._selectedName&&!this._labels.some(i=>i.name===this._selectedName)&&(this._selectedName=null,this._updateInspector(null),this._renderHandles()),this._app.refreshOverlay()}_updateLabel(e,i){return this._wm().request({type:"update_label",name:e,...i})}async reload(){let e=this._wm();if(e)try{let i=await e.request({type:"list_labels"});this._anchors=i.anchors||[],this._applyLabels(i.labels)}catch{this._applyLabels([])}}async handleMapClick(e,i){let o=window.prompt("Label text:");if(this._mode=!1,this._setCursor(!1),!!o)try{let r=await this._wm().request({type:"add_label",x:Math.round(e),y:Math.round(i),text:o});this._refresh(r)}catch(r){console.error("add_label failed:",r)}}_renderHandles(){if(!this._handleGroup)return;this._handleGroup.clearLayers();let e=this._app.designScale;if(!e)return;let i=this._app.designMaxDXDY,o=this._app.designOriginX,r=this._app.designOriginY;for(let l of this._labels){let h=Jt(l.x,l.y,e,i,o,r),u=l.name===this._selectedName,f=L.marker(h,{pane:"label-pane",draggable:!0,keyboard:!1,icon:L.divIcon({className:"label-handle"+(u?" label-handle-selected":""),html:"",iconSize:[10,10]}),title:l.text});f.on("click",_=>{L.DomEvent.stopPropagation(_),this._select(l.name)}),f.on("dragend",_=>{let y=_.target.getLatLng(),{dbuX:g,dbuY:v}=xe(y.lat,y.lng,e,i,o,r);this._commitMove(l,Math.round(g),Math.round(v))}),this._handleGroup.addLayer(f)}}async _commitMove(e,i,o){try{let r=await this._updateLabel(e.name,{x:i,y:o,text:e.text,size:e.size||0,anchor:e.anchor||"center",color:e.color});this._refresh(r)}catch(r){console.error("move label failed:",r)}}_select(e){this._selectedName=e,this._renderHandles();let i=this._labels.find(l=>l.name===e);if(!i)return;let o=l=>this._app.formatDbu(l,!0),r={type:"Label",name:i.name,bbox:[i.x,i.y,i.x,i.y],properties:[{name:"Name",value:i.name},{name:"Text",value:i.text,editable:!0},{name:"x",value:o(i.x)},{name:"y",value:o(i.y)},{name:"Font size",value:String(i.size||0),editable:!0},{name:"Anchor",value:i.anchor||"center",editable:!0,editor:{type:"list",options:this._anchors}}],onPropertyChange:(l,h)=>{let u={text:i.text,size:i.size||0,anchor:i.anchor||"center"};l==="Text"?u.text=h:l==="Font size"?u.size=parseInt(h,10)||0:l==="Anchor"&&(u.anchor=h.trim()),this._edit(i,u)}};this._updateInspector(r),this._focusComponent("Inspector"),requestAnimationFrame(()=>{let l=this._app.inspectorEl?.querySelector(".inspector-toolbar");if(!l||l.querySelector(".delete-label-btn"))return;let h=document.createElement("button");h.className="or-btn or-btn-icon delete-label-btn",h.title="Delete label",h.innerHTML='',h.addEventListener("click",()=>this.deleteLabel(e)),l.appendChild(h)})}async _edit(e,i){try{let o=await this._updateLabel(e.name,{x:e.x,y:e.y,text:i.text,size:i.size,anchor:i.anchor,color:e.color});this._refresh(o),this._select(e.name)}catch(o){console.error("edit label failed:",o)}}async deleteLabel(e){try{let i=await this._wm().request({type:"delete_label",name:e});this._selectedName===e&&(this._selectedName=null,this._updateInspector(null)),this._refresh(i)}catch(i){console.error("delete_label failed:",i)}}async clearAllLabels(){try{let e=await this._wm().request({type:"clear_labels"});this._selectedName=null,this._refresh(e)}catch(e){console.error("clear_labels failed:",e)}}};var Yl="Select an instance in the layout to view its schematic.",Bs=class{constructor(e,i){this.container=e,this.appState=i,this.element=document.createElement("div"),this.element.className="schematic-widget",this.element.style.cssText="width:100%; height:100%; display:flex; flex-direction:column; background:var(--bg-panel); color:var(--fg-primary); overflow:hidden;",this.controls=document.createElement("div"),this.controls.style.cssText="padding:4px 8px; background:var(--bg-header); border-bottom:1px solid var(--border);flex-shrink:0; display:flex; align-items:center; gap:8px; flex-wrap:wrap;",this.controls.innerHTML='',this.element.appendChild(this.controls),this.svgContainer=document.createElement("div"),this.svgContainer.style.cssText="flex:1; overflow:hidden; position:relative; cursor:grab; background:var(--bg-main);",this.element.appendChild(this.svgContainer),this.container.element.appendChild(this.element),this.controls.querySelector("#schematic-refresh").addEventListener("click",()=>this.refresh()),this.controls.querySelector("#schematic-fit").addEventListener("click",()=>this.fitView()),this.controls.querySelector("#schematic-zoom-in").addEventListener("click",()=>this._zoomStep(1.5)),this.controls.querySelector("#schematic-zoom-out").addEventListener("click",()=>this._zoomStep(1/1.5)),this.controls.querySelector("#schematic-select").addEventListener("click",()=>this._toggleSelectMode()),this.controls.querySelector("#schematic-zoom-to").addEventListener("click",()=>this._zoomToSelected()),this.controls.querySelector("#schematic-save-svg").addEventListener("click",()=>this._exportSvg()),this.controls.querySelector("#schematic-save-png").addEventListener("click",()=>this._exportPng()),this.controls.querySelector("#schematic-copy").addEventListener("click",()=>this._copyImage()),this.appState.schematicWidget=this,this.netlistsvg=null,this.skin=null,this._svgEl=null,this._scale=1,this._panX=0,this._panY=0,this._selectMode=!1,this._selectedCell=null,this._svgIdToInstName=new Map,this._setupPanZoom(),this.initNetlistSVG()}_setupPanZoom(){let e=this.svgContainer,i=!1,o,r,l,h;e.addEventListener("wheel",u=>{if(!this._svgEl)return;u.preventDefault();let f=u.deltaY<0?1.2:1/1.2,_=e.getBoundingClientRect(),y=u.clientX-_.left,g=u.clientY-_.top;this._panX=y+(this._panX-y)*f,this._panY=g+(this._panY-g)*f,this._scale*=f,this._applyTransform()},{passive:!1}),e.addEventListener("mousedown",u=>{if(!(!this._svgEl||u.button!==0)){if(this._selectMode){this._handleSelectClick(u);return}i=!0,o=u.clientX,r=u.clientY,l=this._panX,h=this._panY,e.style.cursor="grabbing",u.preventDefault()}}),window.addEventListener("mousemove",u=>{i&&(this._panX=l+(u.clientX-o),this._panY=h+(u.clientY-r),this._applyTransform())}),window.addEventListener("mouseup",()=>{i&&(i=!1,e.style.cursor=this._selectMode?"default":"grab")})}_zoomStep(e){if(!this._svgEl)return;let i=this.svgContainer.getBoundingClientRect(),o=i.width/2,r=i.height/2;this._panX=o+(this._panX-o)*e,this._panY=r+(this._panY-r)*e,this._scale*=e,this._applyTransform()}_toggleSelectMode(){this._selectMode=!this._selectMode;let e=this.controls.querySelector("#schematic-select");this._selectMode?(e.style.background="var(--accent)",e.style.color="var(--fg-white)",this.svgContainer.style.cursor="default"):(e.style.background="",e.style.color="",this.svgContainer.style.cursor="grab",this._clearCellHighlight())}_handleSelectClick(e){if(!this._svgEl)return;let i=e.target,o=null;for(;i&&i!==this._svgEl;){if(i.tagName==="g"&&i.id&&this._svgIdToInstName.has(i.id)){o=i;break}i=i.parentElement}if(this._clearCellHighlight(),!o)return;let r=this._svgIdToInstName.get(o.id);try{let l=o.getBBox(),h=3,u=document.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",l.x-h),u.setAttribute("y",l.y-h),u.setAttribute("width",l.width+h*2),u.setAttribute("height",l.height+h*2),u.setAttribute("fill","none"),u.setAttribute("stroke","#e05a00"),u.setAttribute("stroke-width","1.5"),u.setAttribute("rx","3"),u.id="_schematic_highlight",o.appendChild(u),this._selectedCell=o}catch{}this.controls.querySelector("#schematic-zoom-to").disabled=!1,this.setStatus(`Selected: ${r}`),this._fetchInspect(r)}_fetchInspect(e){let i=this.appState.websocketManager;if(!i)return;console.log("[Schematic] inspect:",e);let o=ae(this.appState);i.request({type:"schematic_inspect",inst_name:e,use_dbu:this.appState.showDbu}).then(r=>{he(this.appState,o)&&(this.appState.updateInspector&&this.appState.updateInspector(r),this.appState.focusComponent&&this.appState.focusComponent("Inspector"),this.appState.refreshOverlay&&this.appState.refreshOverlay())}).catch(r=>{console.error("schematic_inspect failed:",r),this.setStatus(`Inspect error: ${r}`)})}_clearCellHighlight(){if(this._svgEl){let e=this._svgEl.querySelector("#_schematic_highlight");e&&e.remove()}this._selectedCell=null,this.controls.querySelector("#schematic-zoom-to").disabled=!0}_zoomToSelected(){if(!this._selectedCell||!this._svgEl)return;let e=this.svgContainer.getBoundingClientRect(),i=this._selectedCell.getBoundingClientRect(),o=(i.left-e.left-this._panX)/this._scale,r=(i.top-e.top-this._panY)/this._scale,l=i.width/this._scale,h=i.height/this._scale,u=Math.min(e.width/l,e.height/h)*.9;this._scale=u,this._panX=e.width/2-(o+l/2)*u,this._panY=e.height/2-(r+h/2)*u,this._applyTransform()}_applyTransform(){this._svgEl&&(this._svgEl.style.transform=`translate(${this._panX}px, ${this._panY}px) scale(${this._scale})`,this._svgEl.style.transformOrigin="0 0")}fitView(){if(!this._svgEl)return;let e=this.svgContainer.getBoundingClientRect();if(e.width===0||e.height===0)return;let i=this._svgEl.viewBox&&this._svgEl.viewBox.baseVal,o=i&&i.width||this._svgEl.clientWidth||1,r=i&&i.height||this._svgEl.clientHeight||1;this._scale=Math.min(e.width/o,e.height/r)*.95,this._panX=(e.width-o*this._scale)/2,this._panY=(e.height-r*this._scale)/2,this._applyTransform()}initNetlistSVG(){this.netlistsvg=globalThis.netlistsvg,this.skin=globalThis.openroadSkin,this._netlistsvgReady=!!(this.netlistsvg&&this.skin),this._netlistsvgReady&&console.log("NetlistSVG ready."),this.setStatus(this._unreadyStatus()??Yl)}_unreadyStatus(){return this._netlistsvgReady?null:wt(this.appState)?"The schematic is not available in saved reports.":"Init error: netlistsvg or its skin is missing from the page."}syncCone(e={}){let i=this.controls.querySelector("#schematic-fanin-depth"),o=this.controls.querySelector("#schematic-fanout-depth"),r=(l,h,u)=>{if(!l)return;let f=parseInt(l.max,10)||10;h===!1?l.value=0:u!==void 0&&(l.value=u>0?Math.min(u,f):f)};r(i,e.fanin,e.fanin_depth),r(o,e.fanout,e.fanout_depth),this.refresh(e.inst_name),this.appState.focusComponent&&this.appState.focusComponent("SchematicWidget",{reveal:!0})}refresh(e=this.appState.selectedInstanceName){if(!this._netlistsvgReady){this.setStatus(this._unreadyStatus());return}if(!e){this.setStatus(Yl);return}let i=this.appState.websocketManager;if(!i){this.setStatus("Waiting for server connection\u2026");return}this.setStatus(`Loading schematic for ${e}\u2026`);let o=parseInt(this.controls.querySelector("#schematic-fanin-depth").value,10),r=parseInt(this.controls.querySelector("#schematic-fanout-depth").value,10),l=isNaN(o)?1:o,h=isNaN(r)?1:r;i.readyPromise.then(()=>{i.request({type:"schematic_cone",inst_name:e,fanin_depth:l,fanout_depth:h}).then(u=>{let f=u.modules&&u.modules.top&&u.modules.top.cells;if(!f||Object.keys(f).length===0){this.setStatus("No cells found for selected instance.");return}this.renderNetlist(u)}).catch(u=>{this.setStatus(`Error: ${u}`)})})}setStatus(e){this.controls.querySelector("#schematic-status").textContent=e}_exportSvg(){if(!this._svgEl){this.setStatus("No schematic to export.");return}let e=Wo(this._svgEl);Cl(new Blob([e],{type:"image/svg+xml;charset=utf-8"}),"schematic.svg")}async _exportPng(){if(!this._svgEl){this.setStatus("No schematic to export.");return}try{let e=await Uo(this._svgEl,2);wi(e,"schematic.png")}catch{this.setStatus("PNG export failed.")}}async _copyImage(){if(!this._svgEl){this.setStatus("No schematic to export.");return}try{let e=await Uo(this._svgEl,2),i=await ys(e);this.setStatus(i?"Schematic copied to clipboard.":"Clipboard not available.")}catch{this.setStatus("Copy failed.")}}async renderNetlist(e){try{this.setStatus("Rendering\u2026"),typeof window<"u"&&(window.__lastSchematic=e);let i=Xd(e),o,r=this.netlistsvg.render(this.skin,i);if(r&&typeof r.then=="function"?o=await r:o=await new Promise((u,f)=>{this.netlistsvg.render(this.skin,i,(_,y)=>{_?f(_):u(y)})}),typeof o!="string"||!o.includes("requestAnimationFrame(()=>this.fitView()));let h=Object.keys(e.modules.top.cells).length;this.setStatus(`${h} cell${h!==1?"s":""}`)}catch(i){console.error("NetlistSVG render failed:",i),this.setStatus(`Render error: ${i.message||i}`)}}_applyPinLabels(e){if(!this._svgEl)return;let i="http://www.w3.org/2000/svg",o="https://github.com/nturley/netlistsvg",r=e.modules&&e.modules.top&&e.modules.top.cells||{},l=(h,u)=>h.getAttribute("s:"+u)??h.getAttributeNS(o,u);for(let[h,u]of Object.entries(r)){let f=u.port_labels;if(!f)continue;let _=this._svgEl.querySelector("#"+CSS.escape("cell_"+h))||this._svgEl.querySelector("#"+CSS.escape(h));if(!_)continue;let y=u.port_directions||{};for(let g of Array.from(_.children)){if(g.tagName!=="g")continue;let v=l(g,"pid");if(!v||!(v in f))continue;let w=parseFloat(l(g,"x")),b=parseFloat(l(g,"y"));if(!isFinite(w)||!isFinite(b))continue;let C=document.createElementNS(i,"text");y[v]==="input"?(C.setAttribute("class","inputPortLabel"),C.setAttribute("x",w-3)):C.setAttribute("x",w+4),C.setAttribute("y",b-4),C.setAttribute("style","font-size:5px"),C.setAttribute("pointer-events","none"),C.textContent=f[v],_.appendChild(C)}}}_scopeSkinStyles(){if(!this._svgEl)return;let e=".schematic-widget",i=o=>{for(let r of o)r.selectorText?r.selectorText=Ud(r.selectorText,e):r.cssRules&&i(r.cssRules)};for(let o of this._svgEl.querySelectorAll("style")){let r=o.sheet;if(r)try{i(r.cssRules)}catch{continue}}}};function Ud(s,e){return s.split(",").map(i=>{let o=i.trim();if(!o)return"";let r=o.charAt(e.length);return o.startsWith(e)&&(r===""||!/[\w-]/.test(r))?o:`${e} ${o}`}).filter(Boolean).join(", ")}var Xl={and:"$_AND_",nand:"$_NAND_",or:"$_OR_",nor:"$_NOR_",xor:"$_XOR_",xnor:"$_XNOR_",not:"$_NOT_",buf:"$_BUF_"},Gd=new Set(["aoi21","aoi22","aoi211","aoi221","aoi222","aoi33","oai21","oai22","oai211","oai221","oai222","oai33"]),Vd=new Set(["and3","and4","or3","or4","nand3","nand4","nor3","nor4"]),jl=["A","B","C","D","E","F"];function Yd(s){let e=s&&s.gate_kind;if(!e)return s;let i=s.port_directions||{},o=null,r=[];for(let[g,v]of Object.entries(i))v==="output"&&o===null?o=g:v==="input"&&r.push(g);let l,h={};if(e==="aoi"||e==="oai"){let g=Array.isArray(s.gate_terms)?s.gate_terms:[];if(!g.length)return s;let v=g.map(C=>C.length);if(l=e+v.slice().sort((C,B)=>B-C).join(""),!Gd.has(l))return s;let w=g.map(C=>C.slice()).sort((C,B)=>C.length-B.length),b=0;for(let C of w)for(let B of C)h[B]=jl[b]||"I"+b,b++}else{let g=r.length;if(e==="not"||e==="buf")l=Xl[e];else if(g<=2)l=Xl[e];else if(l=e+g,!Vd.has(l))return s;if(!l)return s;r.forEach((v,w)=>{h[v]=jl[w]||"I"+w})}o!==null&&(h[o]="Y");let u=s.connections||{},f={},_={};for(let[g,v]of Object.entries(u))h[g]&&(f[h[g]]=v);for(let[g,v]of Object.entries(i))h[g]&&(_[h[g]]=v);let y={};for(let[g,v]of Object.entries(h))y[v]=g;return{...s,type:l,connections:f,port_directions:_,port_labels:y}}function Xd(s){let e=s&&s.modules&&s.modules.top;if(!e||!e.cells)return s;let i={};for(let[o,r]of Object.entries(e.cells))i[o]=Yd(r);return{...s,modules:{...s.modules,top:{...e,cells:i}}}}var Ds=class{constructor(e,i,o){this._app=e,this._redrawAllLayers=i,this._refreshOverlay=o||i,this._categories=[],this._activeCategory="",this._markerTree=null,this._expandedNodes=new Set,this._build(),this._app.websocketManager.readyPromise.then(()=>this.refresh())}_build(){let e=document.createElement("div");e.className="drc-widget";let i=document.createElement("div");i.className="drc-toolbar",this._categorySelect=document.createElement("select"),this._categorySelect.className="drc-category-select",i.appendChild(this._categorySelect),this._loadBtn=document.createElement("button"),this._loadBtn.className="or-btn or-btn-sm",this._loadBtn.textContent="Load...",i.appendChild(this._loadBtn),e.appendChild(i),this._infoBar=document.createElement("div"),this._infoBar.className="drc-info-bar",e.appendChild(this._infoBar),this._treeContainer=document.createElement("div"),this._treeContainer.className="drc-tree-container",e.appendChild(this._treeContainer),this.element=e,this._bindEvents()}_bindEvents(){this._categorySelect.addEventListener("change",()=>{this._activeCategory=this._categorySelect.value,this._loadMarkers()}),this._loadBtn.addEventListener("click",()=>{this._showLoadDialog()})}_loadCategories(){return this._app.websocketManager.request({type:"drc_categories"}).then(e=>{this._categories=e.categories||[],this._renderCategorySelect()}).catch(e=>{console.error("Failed to load DRC categories:",e)})}refresh(){this._loadCategories().then(()=>{!this._activeCategory&&this._categories.length>0&&(this._activeCategory=this._categories[0].name,this._categorySelect.value=this._activeCategory),this._activeCategory&&this._loadMarkers()})}_renderCategorySelect(){let e=this._categorySelect,i=e.value;e.innerHTML="";let o=document.createElement("option");o.value="",o.textContent="(none)",e.appendChild(o);for(let r of this._categories){let l=document.createElement("option");l.value=r.name,l.textContent=`${r.name} (${r.count})`,e.appendChild(l)}this._activeCategory&&this._categories.some(r=>r.name===this._activeCategory)?e.value=this._activeCategory:i&&this._categories.some(r=>r.name===i)?(e.value=i,this._activeCategory=i):this._activeCategory=""}_loadMarkers(){if(!this._activeCategory){this._markerTree=null,this._treeContainer.innerHTML="",this._infoBar.textContent="",this._refreshOverlay();return}this._treeContainer.innerHTML='
Loading...
',this._app.websocketManager.request({type:"drc_markers",category:this._activeCategory}).then(e=>{this._markerTree=e,this._renderTree(),this._refreshOverlay()}).catch(e=>{this._treeContainer.innerHTML="";let i=document.createElement("div");i.className="drc-error",i.textContent=`Error: ${e}`,this._treeContainer.appendChild(i),console.error("Failed to load DRC markers:",e)})}_renderTree(){if(this._treeContainer.innerHTML="",!this._markerTree)return;if(this._markerTree.error){let h=document.createElement("div");h.className="drc-error",h.textContent=this._markerTree.error,this._treeContainer.appendChild(h);return}let e=this._markerTree.total_count||0;this._infoBar.textContent=`${e} total violation${e!==1?"s":""}`;let i=this._markerTree.name||this._activeCategory,o=this._markerTree.subcategories||[],r=this._markerTree.markers||[];if(o.length===0&&r.length===0){this._treeContainer.innerHTML='
No violations
';return}let l=document.createElement("div");l.className="drc-tree",r.length>0&&l.appendChild(this._buildCategoryNode({name:i||"Markers",count:r.length,markers:r},[]));for(let h of o)l.appendChild(this._buildCategoryNode(h,[i]));this._treeContainer.appendChild(l)}_buildCategoryNode(e,i=[]){let o=[...i,e.name],r=document.createElement("div");r.className="drc-tree-node";let l=document.createElement("div");l.className="drc-tree-header";let h=document.createElement("span");h.className="drc-toggle";let u=e.subcategories&&e.subcategories.length>0||e.markers&&e.markers.length>0,f=JSON.stringify(o),_=this._expandedNodes.has(f);h.textContent=u?_?"\u25BC":"\u25B6":" ",l.appendChild(h);let y=document.createElement("input");y.type="checkbox",y.checked=this._allMarkersVisible(e),y.className="drc-visibility-check",y.addEventListener("change",b=>{b.stopPropagation(),this._toggleCategoryVisibility(e,y.checked,o)}),l.appendChild(y);let g=document.createElement("span");g.className="drc-category-label",g.textContent=e.name,l.appendChild(g);let v=document.createElement("span");v.className="drc-count",v.textContent=`${e.count} markers`,l.appendChild(v),r.appendChild(l);let w=document.createElement("div");if(w.className="drc-tree-children",w.style.display=_?"":"none",e.subcategories)for(let b of e.subcategories)w.appendChild(this._buildCategoryNode(b,o));if(e.markers)for(let b of e.markers)w.appendChild(this._buildMarkerNode(b));return r.appendChild(w),u&&(l.addEventListener("click",b=>{if(b.target===y)return;let C=w.style.display!=="none";w.style.display=C?"none":"",h.textContent=C?"\u25B6":"\u25BC",C?this._expandedNodes.delete(f):this._expandedNodes.add(f)}),l.style.cursor="pointer"),r}_buildMarkerNode(e){let i=document.createElement("div");i.className="drc-marker-row",i.dataset.markerId=e.id,e.visited||i.classList.add("drc-unvisited");let o=document.createElement("input");o.type="checkbox",o.checked=e.visible,o.className="drc-visibility-check",o.addEventListener("change",h=>{h.stopPropagation(),e.visible=o.checked,this._updateMarker(e.id,"visible",o.checked)}),i.appendChild(o);let r=document.createElement("span");r.className="drc-marker-index",r.textContent=e.index,i.appendChild(r);let l=document.createElement("span");if(l.className="drc-marker-name",l.textContent=e.name,e.layer&&(l.title=`Layer: ${e.layer}`),i.appendChild(l),e.layer){let h=document.createElement("span");h.className="drc-layer-badge",h.textContent=e.layer,i.appendChild(h)}return i.addEventListener("click",h=>{h.target!==o&&this._highlightMarker(e)}),i.addEventListener("dblclick",h=>{h.target!==o&&this._highlightMarker(e,!0)}),i}highlightMarkerById(e,i=!1){let o=this._findMarkerById(e);o&&this._highlightMarker(o,i)}_findMarkerById(e){let i=o=>{if(!o)return null;if(o.markers){for(let r of o.markers)if(r.id===e)return r}if(o.subcategories)for(let r of o.subcategories){let l=i(r);if(l)return l}return null};return i(this._markerTree)}_highlightMarker(e,i=!1){this._app.websocketManager.request({type:"drc_highlight",marker_id:e.id,open_inspector:i}).then(o=>{if(o.ok&&o.bbox){e.visited=!0;let r=this._treeContainer.querySelector(`.drc-marker-row[data-marker-id="${e.id}"]`);r&&r.classList.remove("drc-unvisited"),this._zoomToBBox(o.bbox),this._refreshOverlay(),i&&(o.select_id!=null&&this._app.navigateInspector&&this._app.navigateInspector(o.select_id),this._app.focusComponent&&this._app.focusComponent("Inspector"))}}).catch(o=>{console.error("Failed to highlight DRC marker:",o)})}_zoomToBBox(e){if(!this._app.designScale||!this._app.map)return;let[i,o,r,l]=e,h=r-i,u=l-o,_=10*this._app.getDbuPerMicron(),y=2*Math.max(h,u),g=Math.min(_,y);this._app.map.fitBounds(Gt(i-g,o-g,r+g,l+g,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY))}_updateMarker(e,i,o){this._app.websocketManager.request({type:"drc_update_marker",marker_id:e,field:i,value:!!o}).then(()=>{this._refreshOverlay(),i==="visible"&&(this._update3DHighlights(),o&&this._flashHighlight())}).catch(r=>{console.error("Failed to update DRC marker:",r)})}_flashHighlight(){let e=this._app.map?.getContainer();e&&(e.classList.remove("drc-flashing"),e.offsetWidth,e.classList.add("drc-flashing"),e.addEventListener("animationend",()=>{e.classList.remove("drc-flashing")},{once:!0}))}_update3DHighlights(){let e=this._app.threeDViewerWidget;if(!e)return;let i=[];this._collectVisibleMarkers(this._markerTree,i),i.length>0?e.highlightDRC(i):e.clearHighlightDRC()}_collectVisibleMarkers(e,i){if(e){if(e.markers)for(let o of e.markers)o.visible&&i.push(o);if(e.subcategories)for(let o of e.subcategories)this._collectVisibleMarkers(o,i)}}_setMarkersVisible(e,i){if(e){if(e.markers)for(let o of e.markers)o.visible=i;if(e.subcategories)for(let o of e.subcategories)this._setMarkersVisible(o,i)}}_snapshotMarkerVisibility(e,i=new Map){if(!e)return i;if(e.markers)for(let o of e.markers)i.set(o.id,o.visible);if(e.subcategories)for(let o of e.subcategories)this._snapshotMarkerVisibility(o,i);return i}_restoreMarkerVisibility(e,i){if(e){if(e.markers)for(let o of e.markers)i.has(o.id)&&(o.visible=i.get(o.id));if(e.subcategories)for(let o of e.subcategories)this._restoreMarkerVisibility(o,i)}}_allMarkersVisible(e){if(e.markers){for(let i of e.markers)if(!i.visible)return!1}if(e.subcategories){for(let i of e.subcategories)if(!this._allMarkersVisible(i))return!1}return!0}_toggleCategoryVisibility(e,i,o){let r=this._snapshotMarkerVisibility(e);this._setMarkersVisible(e,i),this._renderTree(),this._app.websocketManager.request({type:"drc_update_category_visibility",category:e.name,path:o||[e.name],visible:!!i}).then(()=>{this._refreshOverlay(),this._update3DHighlights(),i&&this._flashHighlight()}).catch(l=>{console.error("Failed to update category visibility:",l),this._restoreMarkerVisibility(e,r),this._renderTree()})}_showLoadDialog(){new Qo(this._app,i=>{this._activeCategory=i,this._loadCategories().then(()=>{this._categorySelect.value=this._activeCategory,this._loadMarkers()})}).open()}selectCategory(e){this._activeCategory=e,this._categorySelect.value=e,this._loadMarkers()}},Qo=class{constructor(e,i){this._app=e,this._onLoaded=i,this._currentPath="",this._disposers=[],this._closed=!1}open(){this._overlay=document.createElement("div"),this._overlay.className="modal-overlay",this._overlay.innerHTML=` + `,document.body.appendChild(i);function o(l){l.key==="Escape"&&r()}let r=()=>{i.remove(),document.removeEventListener("keydown",o)};return i.addEventListener("click",l=>{l.target===i&&r()}),document.addEventListener("keydown",o),{overlay:i,body:i.querySelector(".modal-body"),errorDiv:i.querySelector(".modal-error"),buttons:i.querySelector(".modal-buttons"),close:r}}function Ie(s,t){s.textContent=t,s.style.display=t?"":"none"}function Yi(s,t,{primary:i=!1}={}){let o=document.createElement("button");return o.textContent=t,o.className="or-btn"+(i?" or-btn-primary":""),s.appendChild(o),o}function Is(s){return"{"+String(s)+"}"}function Gl(s){let t=Wl("Global Connect","gc-dialog"),i=document.createElement("div");i.className="gc-table",t.body.appendChild(i);let o=document.createElement("div");o.className="gc-form";let r=document.createElement("input");r.placeholder="Instance pattern (regex)",r.value=".*";let l=document.createElement("input");l.placeholder="Pin pattern (regex)";let h=document.createElement("select"),u=document.createElement("select"),f=document.createElement("span");f.innerHTML='',o.append(Je("Instance",r),Je("Pin",l),Je("Net",h),Je("Region",u),f);let _=Yi(o,"Add rule");t.body.appendChild(o);function g(){let b=l.value.trim()!==""&&h.value!=="";for(let C of[r,l])try{new RegExp(C.value),C.classList.remove("gc-invalid")}catch{C.classList.add("gc-invalid"),b=!1}_.disabled=!b}r.addEventListener("input",g),l.addEventListener("input",g),h.addEventListener("change",g);function y(){s.websocketManager.request({type:"global_connect_info"}).then(b=>{i.innerHTML='
InstancePinNetRegion
',(b.rules||[]).forEach(C=>{let R=document.createElement("div");R.className="gc-row",R.innerHTML=`${Mn(C.inst)}${Mn(C.pin)}${Mn(C.net)}${Mn(C.region||"All")}`;let P=document.createElement("button");P.className="or-btn or-btn-sm or-btn-icon",P.textContent="\u2715",P.title="Delete rule",P.addEventListener("click",()=>{s.websocketManager.request({type:"global_connect_delete",inst:C.inst,pin:C.pin,net:C.net,region:C.region||""}).then(y).catch(T=>Ie(t.errorDiv,String(T)))}),R.appendChild(P),i.appendChild(R)}),Qo(h,b.nets||[]),Qo(u,["All",...b.regions||[]]),g()}).catch(b=>Ie(t.errorDiv,String(b)))}_.addEventListener("click",()=>{let b=o.querySelector('input[name="gc-pg"]:checked').value,C=`add_global_connection -net ${Is(h.value)} -inst_pattern ${Is(r.value||".*")} -pin_pattern ${Is(l.value)} -${b}`;u.value&&u.value!=="All"&&(C+=` -region ${Is(u.value)}`),ql(s,C,t.errorDiv,"Rule added.",y)}),Yi(t.buttons,"Apply (force)").addEventListener("click",()=>{s.websocketManager.request({type:"global_connect_apply",force:!0}).then(b=>{if(!b.had_rules){Ie(t.errorDiv,"No global-connect rules defined \u2014 add a rule first.");return}Ie(t.errorDiv,`Connected ${b.connected} pin(s).`),s.scheduleRedrawAllLayers&&s.scheduleRedrawAllLayers(),y()}).catch(b=>Ie(t.errorDiv,b.message||String(b)))}),Yi(t.buttons,"Clear all").addEventListener("click",()=>ql(s,"clear_global_connect",t.errorDiv,"Rules cleared.",y)),Yi(t.buttons,"Close").addEventListener("click",t.close),y()}function ql(s,t,i,o,r){s.websocketManager.request({type:"tcl_eval",cmd:t}).then(l=>{if(l.is_error){Ie(i,l.output||l.result||"Command failed");return}Ie(i,o||""),s.scheduleRedrawAllLayers&&s.scheduleRedrawAllLayers(),r&&r()}).catch(l=>Ie(i,l.message||String(l)))}function Ul(s,t){let i=Wl(`Insert Buffer \u2014 ${Mn(t)}`,"buf-dialog"),o=Yi(i.buttons,"Insert",{primary:!0});o.disabled=!0,Yi(i.buttons,"Cancel").addEventListener("click",i.close),s.websocketManager.request({type:"buffer_info",net:t}).then(l=>{if(!l.can_buffer){i.body.textContent=l.error||"This net has multiple drivers and cannot be buffered.";return}Wd(s,i,t,l,o)}).catch(l=>{i.body.textContent=String(l)})}function Wd(s,t,i,o,r){let l=document.createElement("div");l.className="buf-pins";let h=o.drivers||[],u=o.loads||[],f=new Set;function _(){l.innerHTML="";let b=(C,R)=>{let P=document.createElement("label");P.className="buf-pin";let T=document.createElement("input");T.type="checkbox",T.checked=f.has(C.id),T.addEventListener("change",()=>{if(T.checked){if(R)f.clear();else for(let Z of h)f.delete(Z.id);f.add(C.id)}else f.delete(C.id);_(),w()}),P.append(T,document.createTextNode(" "+C.label)),l.appendChild(P)};h.forEach(C=>b(C,!0)),u.forEach(C=>b(C,!1))}h.length&&f.add(h[0].id),_();let g=document.createElement("select");Qo(g,o.masters||[]);let y=document.createElement("input");y.placeholder="Optional: new buffer name";let v=document.createElement("input");v.placeholder="Optional: new net name",t.body.append(Je("Pins to buffer",l),Je("Buffer master",g),Je("Buffer name",y),Je("Net name",v));function w(){r.disabled=f.size===0||!g.value}g.addEventListener("change",w),w(),r.addEventListener("click",()=>{let b=new Set(h.map(P=>P.id)),C=[...f],R=C.some(P=>b.has(P))?"driver":"loads";s.websocketManager.request({type:"insert_buffer",net:i,mode:R,pins:C,master:g.value,buf_name:y.value.trim(),net_name:v.value.trim()}).then(P=>{if(P.is_error||P.ok===!1){Ie(t.errorDiv,P.error||P.result||"Insertion failed");return}t.close(),P.inst&&(s.selectedInstanceName=P.inst),s.scheduleRedrawAllLayers&&s.scheduleRedrawAllLayers()}).catch(P=>Ie(t.errorDiv,P.message||String(P)))})}function Je(s,t){let i=document.createElement("label");i.className="edit-field";let o=document.createElement("span");return o.textContent=s,i.append(o,t),i}function Qo(s,t){let i=s.value;s.innerHTML="";for(let o of t){let r=document.createElement("option");r.value=o,r.textContent=o,s.appendChild(r)}t.includes(i)&&(s.value=i)}function Mn(s){return String(s??"").replace(/&/g,"&").replace(//g,">")}var Vl="#00ffff",Gd="#ffff00",tr="#ffffff",xi=0,er=1,En=2,Ns=class{constructor(t,i,o,r){this._app=t,this._visibility=i,this._updateInspector=o,this._focusComponent=r,this._state=xi,this._rulers=[],this._nextId=0,this._pt0=null,this._selectedRulerId=null,this._ctrlHeld=!1,this._shiftHeld=!1,this._rulerPane=null,this._rulerLayerGroup=null,this._previewGroup=null,this._snapGroup=null,this._snapTimer=null,this._lastSnapResult=null,this._onMouseMove=this._handleMouseMove.bind(this),this._onMapClick=this._handleMapClick.bind(this),this._initLayers()}_initLayers(){let t=this._app.map;t&&(this._rulerPane=t.createPane("ruler-pane"),this._rulerPane.style.zIndex="700",this._rulerPane.style.pointerEvents="auto",this._rulerLayerGroup=L.layerGroup([],{pane:"ruler-pane"}).addTo(t),this._previewGroup=L.layerGroup([],{pane:"ruler-pane"}).addTo(t),this._snapGroup=L.layerGroup([],{pane:"ruler-pane"}).addTo(t))}isActive(){return this._state!==xi}updateVisibility(){this._rulerPane&&(this._rulerPane.style.display=this._visibility.rulers?"":"none")}toggleRulerMode(){this._state===xi?this._enterFirstPoint():this.cancelRulerBuild()}cancelRulerBuild(){this._state=xi,this._pt0=null,this._lastSnapResult=null,this._clearPreview(),this._clearSnap(),this._setCursor(!1),this._removeMapListeners()}clearAllRulers(){this._rulers=[],this._selectedRulerId=null,this._rulerLayerGroup.clearLayers(),this._clearPreview(),this._clearSnap(),this._state!==xi&&this.cancelRulerBuild()}_enterFirstPoint(){this._state=er,this._pt0=null,this._lastSnapResult=null,this._setCursor(!0),this._addMapListeners()}_enterMeasuring(t){this._state=En,this._pt0=t}_addMapListeners(){let t=this._app.map;t&&(t.getContainer().addEventListener("mousemove",this._onMouseMove),t.on("click",this._onMapClick))}_removeMapListeners(){let t=this._app.map;t&&(t.getContainer().removeEventListener("mousemove",this._onMouseMove),t.off("click",this._onMapClick))}_handleMouseMove(t){if(this._state===xi)return;this._ctrlHeld=t.ctrlKey||t.metaKey,this._shiftHeld=t.shiftKey;let i=this._app.map,o=i.getContainer().getBoundingClientRect(),r=i.containerPointToLatLng([t.clientX-o.left,t.clientY-o.top]),l=we(r.lat,r.lng,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY);this._snapTimer&&clearTimeout(this._snapTimer),this._snapTimer=setTimeout(()=>{this._requestSnap(l.dbuX,l.dbuY)},50)}_handleMapClick(t){if(this._state===xi)return;L.DomEvent.stopPropagation(t);let i=t.originalEvent;i&&(this._ctrlHeld=i.ctrlKey||i.metaKey,this._shiftHeld=i.shiftKey);let o=we(t.latlng.lat,t.latlng.lng,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY),r=this._getSnappedPoint(o.dbuX,o.dbuY);this._state===er?this._enterMeasuring(r):this._state===En&&(this._createRuler(this._pt0,r),this._state=er,this._pt0=null,this._clearPreview(),this._clearSnap(),this._lastSnapResult=null)}async _requestSnap(t,i){let o=this._app;if(!o.websocketManager||!o.designScale)return;if(this._ctrlHeld){this._lastSnapResult=null,this._clearSnap(),this._updatePreview(t,i);return}let l=o.techData?.dbu_per_micron||1e3,h=o.map.getZoom(),u=Math.pow(2,Math.max(0,h)),f=1/(o.designScale*u),_=Math.max(Math.round(10*f),10),g=!0,y=!0;if(this._shiftHeld)g=!0,y=!0;else if(this._state===En&&this._pt0){let w=Math.abs(t-this._pt0.x),b=Math.abs(i-this._pt0.y);w>b?(g=!1,y=!0):b>w&&(g=!0,y=!1)}let v={};for(let[w,b]of Object.entries(this._visibility))v[w]=!!b;try{let w=await o.websocketManager.request({type:"snap",dbu_x:t,dbu_y:i,radius:l,point_threshold:_,horizontal:!!g,vertical:!!y,visible_layers:[...o.visibleLayerNames],...v});this._lastSnapResult=w,this._updateSnapIndicator(w),this._updatePreview(t,i)}catch{this._lastSnapResult=null,this._clearSnap()}}_getSnappedPoint(t,i){if(this._ctrlHeld)return{x:t,y:i};let o=this._lastSnapResult,r;if(o?.found&&o.is_point)r={x:o.edge[0][0],y:o.edge[0][1]};else if(o?.found){let l=o.edge;l[0][1]===l[1][1]?r={x:t,y:l[0][1]}:r={x:l[0][0],y:i}}else r={x:t,y:i};if(!this._shiftHeld&&this._state===En&&this._pt0){let l=Math.abs(r.x-this._pt0.x),h=Math.abs(r.y-this._pt0.y);l{L.DomEvent.stopPropagation(Q),this._selectRuler(t.id)}),g.addLayer(b);let C=this._app.map.getZoom(),R=Math.pow(2,Math.max(0,C)),T=8*(1/(i*R)),Z=(Q,nt,tt)=>{let Ct=Math.sqrt(nt*nt+tt*tt);if(Ct===0)return;let Et=-tt/Ct,It=nt/Ct,Nt=Jt(Q.x+Et*T,Q.y+It*T,i,o,r,l),Yt=Jt(Q.x-Et*T,Q.y-It*T,i,o,r,l);g.addLayer(L.polyline([Nt,Yt],{color:_,weight:2,pane:"ruler-pane",interactive:!1}))};if(y)Z(t.pt0,y.x-t.pt0.x,y.y-t.pt0.y),Z(t.pt1,t.pt1.x-y.x,t.pt1.y-y.y);else{let Q=t.pt1.x-t.pt0.x,nt=t.pt1.y-t.pt0.y;Z(t.pt0,Q,nt),Z(t.pt1,Q,nt)}let U=this._computeDistance(t.pt0,t.pt1,t.euclidian),dt=v?v[0]:(h[0]+u[0])/2,gt=v?v[1]:(h[1]+u[1])/2,it=L.marker([dt,gt],{icon:L.divIcon({className:"ruler-label",html:this._formatDistance(U),iconSize:null}),pane:"ruler-pane",interactive:!1});g.addLayer(it),t._layerGroup=g,this._rulerLayerGroup.addLayer(g)}_rerenderAll(){this._rulerLayerGroup.clearLayers();for(let t of this._rulers)this._renderRuler(t)}_selectRuler(t){this._selectedRulerId=t,this._rerenderAll();let i=this._rulers.find(_=>_.id===t);if(!i)return;ae(this._app);let o=Math.abs(i.pt1.x-i.pt0.x),r=Math.abs(i.pt1.y-i.pt0.y),l=i.euclidian?Math.sqrt(o*o+r*r):o+r,h=_=>this._app.formatDbu(_,!0),u=_=>this._app.parseDbu(_),f={type:"Ruler",name:i.name,bbox:[Math.min(i.pt0.x,i.pt1.x),Math.min(i.pt0.y,i.pt1.y),Math.max(i.pt0.x,i.pt1.x),Math.max(i.pt0.y,i.pt1.y)],properties:[{name:"Name",value:i.name,editable:!0},{name:"Label",value:i.label||"",editable:!0},{name:"Point 0 - x",value:h(i.pt0.x),editable:!0},{name:"Point 0 - y",value:h(i.pt0.y),editable:!0},{name:"Point 1 - x",value:h(i.pt1.x),editable:!0},{name:"Point 1 - y",value:h(i.pt1.y),editable:!0},{name:"Delta x",value:h(o)},{name:"Delta y",value:h(r)},{name:"Length",value:h(l)},{name:"Euclidian",value:i.euclidian?"True":"False",editable:!0,editor:{type:"bool"}}],onPropertyChange:(_,g)=>{switch(_){case"Name":i.name=g;break;case"Label":i.label=g;break;case"Point 0 - x":{let y=u(g);y!==null&&(i.pt0.x=y);break}case"Point 0 - y":{let y=u(g);y!==null&&(i.pt0.y=y);break}case"Point 1 - x":{let y=u(g);y!==null&&(i.pt1.x=y);break}case"Point 1 - y":{let y=u(g);y!==null&&(i.pt1.y=y);break}case"Euclidian":i.euclidian=g.trim().toLowerCase()==="true";break}this._rerenderAll(),this._selectRuler(i.id)}};this._updateInspector(f),this._focusComponent("Inspector"),requestAnimationFrame(()=>{let _=this._app.inspectorEl?.querySelector(".inspector-toolbar");if(!_)return;let g=document.createElement("button");g.className="or-btn or-btn-icon",g.title="Delete ruler",g.innerHTML='',g.addEventListener("click",()=>{this.deleteRuler(t)}),_.appendChild(g)})}deleteRuler(t){let i=this._rulers.findIndex(r=>r.id===t);if(i===-1)return;let o=this._rulers[i];o._layerGroup&&this._rulerLayerGroup.removeLayer(o._layerGroup),this._rulers.splice(i,1),this._selectedRulerId===t&&(this._selectedRulerId=null,this._updateInspector(null))}_getManhattanJoinPt(t,i){return{x:i.x,y:t.y}}_computeDistance(t,i,o=!0){let r=Math.abs(i.x-t.x),l=Math.abs(i.y-t.y);return o?Math.sqrt(r*r+l*l):r+l}_formatDistance(t){return this._app.formatDistance(t)}_setCursor(t){let i=this._app.map?.getContainer();i&&(t?i.classList.add("ruler-mode-cursor"):i.classList.remove("ruler-mode-cursor"))}_clearPreview(){this._previewGroup?.clearLayers()}_clearSnap(){this._snapGroup?.clearLayers()}};var Bs=class{constructor(t,i,o,r){this._app=t,this._visibility=i,this._updateInspector=o,this._focusComponent=r,this._labels=[],this._anchors=[],this._mode=!1,this._selectedName=null,this._pane=null,this._handleGroup=null,this._initLayers()}_initLayers(){let t=this._app.map;t&&(this._pane=t.createPane("label-pane"),this._pane.style.zIndex="690",this._pane.style.pointerEvents="auto",this._handleGroup=L.layerGroup([],{pane:"label-pane"}).addTo(t))}isActive(){return this._mode}updateVisibility(){this._pane&&(this._pane.style.display=this._visibility.labels?"":"none")}toggleLabelMode(){this._mode=!this._mode,this._setCursor(this._mode)}cancelLabelMode(){this._mode=!1,this._setCursor(!1)}_setCursor(t){let i=this._app.map?.getContainer();i&&i.classList.toggle("label-mode-cursor",t)}_wm(){return this._app.websocketManager}_applyLabels(t){this._labels=t||[],this._renderHandles()}_refresh(t){this._applyLabels(t&&t.labels),this._app.refreshOverlay()}applyRemoteLabels(t){this._applyLabels(t),this._selectedName&&!this._labels.some(i=>i.name===this._selectedName)&&(this._selectedName=null,this._updateInspector(null),this._renderHandles()),this._app.refreshOverlay()}_updateLabel(t,i){return this._wm().request({type:"update_label",name:t,...i})}async reload(){let t=this._wm();if(t)try{let i=await t.request({type:"list_labels"});this._anchors=i.anchors||[],this._applyLabels(i.labels)}catch{this._applyLabels([])}}async handleMapClick(t,i){let o=window.prompt("Label text:");if(this._mode=!1,this._setCursor(!1),!!o)try{let r=await this._wm().request({type:"add_label",x:Math.round(t),y:Math.round(i),text:o});this._refresh(r)}catch(r){console.error("add_label failed:",r)}}_renderHandles(){if(!this._handleGroup)return;this._handleGroup.clearLayers();let t=this._app.designScale;if(!t)return;let i=this._app.designMaxDXDY,o=this._app.designOriginX,r=this._app.designOriginY;for(let l of this._labels){let h=Jt(l.x,l.y,t,i,o,r),u=l.name===this._selectedName,f=L.marker(h,{pane:"label-pane",draggable:!0,keyboard:!1,icon:L.divIcon({className:"label-handle"+(u?" label-handle-selected":""),html:"",iconSize:[10,10]}),title:l.text});f.on("click",_=>{L.DomEvent.stopPropagation(_),this._select(l.name)}),f.on("dragend",_=>{let g=_.target.getLatLng(),{dbuX:y,dbuY:v}=we(g.lat,g.lng,t,i,o,r);this._commitMove(l,Math.round(y),Math.round(v))}),this._handleGroup.addLayer(f)}}async _commitMove(t,i,o){try{let r=await this._updateLabel(t.name,{x:i,y:o,text:t.text,size:t.size||0,anchor:t.anchor||"center",color:t.color});this._refresh(r)}catch(r){console.error("move label failed:",r)}}_select(t){this._selectedName=t,this._renderHandles();let i=this._labels.find(l=>l.name===t);if(!i)return;let o=l=>this._app.formatDbu(l,!0),r={type:"Label",name:i.name,bbox:[i.x,i.y,i.x,i.y],properties:[{name:"Name",value:i.name},{name:"Text",value:i.text,editable:!0},{name:"x",value:o(i.x)},{name:"y",value:o(i.y)},{name:"Font size",value:String(i.size||0),editable:!0},{name:"Anchor",value:i.anchor||"center",editable:!0,editor:{type:"list",options:this._anchors}}],onPropertyChange:(l,h)=>{let u={text:i.text,size:i.size||0,anchor:i.anchor||"center"};l==="Text"?u.text=h:l==="Font size"?u.size=parseInt(h,10)||0:l==="Anchor"&&(u.anchor=h.trim()),this._edit(i,u)}};this._updateInspector(r),this._focusComponent("Inspector"),requestAnimationFrame(()=>{let l=this._app.inspectorEl?.querySelector(".inspector-toolbar");if(!l||l.querySelector(".delete-label-btn"))return;let h=document.createElement("button");h.className="or-btn or-btn-icon delete-label-btn",h.title="Delete label",h.innerHTML='',h.addEventListener("click",()=>this.deleteLabel(t)),l.appendChild(h)})}async _edit(t,i){try{let o=await this._updateLabel(t.name,{x:t.x,y:t.y,text:i.text,size:i.size,anchor:i.anchor,color:t.color});this._refresh(o),this._select(t.name)}catch(o){console.error("edit label failed:",o)}}async deleteLabel(t){try{let i=await this._wm().request({type:"delete_label",name:t});this._selectedName===t&&(this._selectedName=null,this._updateInspector(null)),this._refresh(i)}catch(i){console.error("delete_label failed:",i)}}async clearAllLabels(){try{let t=await this._wm().request({type:"clear_labels"});this._selectedName=null,this._refresh(t)}catch(t){console.error("clear_labels failed:",t)}}};var Yl="Select an instance in the layout to view its schematic.",Ds=class{constructor(t,i){this.container=t,this.appState=i,this.element=document.createElement("div"),this.element.className="schematic-widget",this.element.style.cssText="width:100%; height:100%; display:flex; flex-direction:column; background:var(--bg-panel); color:var(--fg-primary); overflow:hidden;",this.controls=document.createElement("div"),this.controls.style.cssText="padding:4px 8px; background:var(--bg-header); border-bottom:1px solid var(--border);flex-shrink:0; display:flex; align-items:center; gap:8px; flex-wrap:wrap;",this.controls.innerHTML='',this.element.appendChild(this.controls),this.svgContainer=document.createElement("div"),this.svgContainer.style.cssText="flex:1; overflow:hidden; position:relative; cursor:grab; background:var(--bg-main);",this.element.appendChild(this.svgContainer),this.container.element.appendChild(this.element),this.controls.querySelector("#schematic-refresh").addEventListener("click",()=>this._onRefresh()),this.controls.querySelector("#schematic-fit").addEventListener("click",()=>this.fitView()),this.controls.querySelector("#schematic-zoom-in").addEventListener("click",()=>this._zoomStep(1.5)),this.controls.querySelector("#schematic-zoom-out").addEventListener("click",()=>this._zoomStep(1/1.5)),this.controls.querySelector("#schematic-select").addEventListener("click",()=>this._toggleSelectMode()),this.controls.querySelector("#schematic-zoom-to").addEventListener("click",()=>this._zoomToSelected()),this.controls.querySelector("#schematic-save-svg").addEventListener("click",()=>this._exportSvg()),this.controls.querySelector("#schematic-save-png").addEventListener("click",()=>this._exportPng()),this.controls.querySelector("#schematic-copy").addEventListener("click",()=>this._copyImage()),this.appState.schematicWidget=this,this.netlistsvg=null,this.skin=null,this._svgEl=null,this._scale=1,this._panX=0,this._panY=0,this._selectMode=!1,this._selectedCell=null,this._svgIdToInstName=new Map,this._setupPanZoom(),this.initNetlistSVG()}_setupPanZoom(){let t=this.svgContainer,i=!1,o,r,l,h;t.addEventListener("wheel",u=>{if(!this._svgEl)return;u.preventDefault();let f=u.deltaY<0?1.2:1/1.2,_=t.getBoundingClientRect(),g=u.clientX-_.left,y=u.clientY-_.top;this._panX=g+(this._panX-g)*f,this._panY=y+(this._panY-y)*f,this._scale*=f,this._applyTransform()},{passive:!1}),t.addEventListener("mousedown",u=>{if(!(!this._svgEl||u.button!==0)){if(this._selectMode){this._handleSelectClick(u);return}i=!0,o=u.clientX,r=u.clientY,l=this._panX,h=this._panY,t.style.cursor="grabbing",u.preventDefault()}}),window.addEventListener("mousemove",u=>{i&&(this._panX=l+(u.clientX-o),this._panY=h+(u.clientY-r),this._applyTransform())}),window.addEventListener("mouseup",()=>{i&&(i=!1,t.style.cursor=this._selectMode?"default":"grab")})}_zoomStep(t){if(!this._svgEl)return;let i=this.svgContainer.getBoundingClientRect(),o=i.width/2,r=i.height/2;this._panX=o+(this._panX-o)*t,this._panY=r+(this._panY-r)*t,this._scale*=t,this._applyTransform()}_toggleSelectMode(){this._selectMode=!this._selectMode;let t=this.controls.querySelector("#schematic-select");this._selectMode?(t.style.background="var(--accent)",t.style.color="var(--fg-white)",this.svgContainer.style.cursor="default"):(t.style.background="",t.style.color="",this.svgContainer.style.cursor="grab",this._clearCellHighlight())}_handleSelectClick(t){if(!this._svgEl)return;let i=t.target,o=null;for(;i&&i!==this._svgEl;){if(i.tagName==="g"&&i.id&&this._svgIdToInstName.has(i.id)){o=i;break}i=i.parentElement}if(this._clearCellHighlight(),!o)return;let r=this._svgIdToInstName.get(o.id);try{let l=o.getBBox(),h=3,u=document.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",l.x-h),u.setAttribute("y",l.y-h),u.setAttribute("width",l.width+h*2),u.setAttribute("height",l.height+h*2),u.setAttribute("fill","none"),u.setAttribute("stroke","#e05a00"),u.setAttribute("stroke-width","1.5"),u.setAttribute("rx","3"),u.id="_schematic_highlight",o.appendChild(u),this._selectedCell=o}catch{}this.controls.querySelector("#schematic-zoom-to").disabled=!1,this.setStatus(`Selected: ${r}`),this._fetchInspect(r)}_fetchInspect(t){let i=this.appState.websocketManager;if(!i)return;console.log("[Schematic] inspect:",t);let o=ae(this.appState);i.request({type:"schematic_inspect",inst_name:t,use_dbu:this.appState.showDbu}).then(r=>{he(this.appState,o)&&(this.appState.updateInspector&&this.appState.updateInspector(r),this.appState.focusComponent&&this.appState.focusComponent("Inspector"),this.appState.refreshOverlay&&this.appState.refreshOverlay())}).catch(r=>{console.error("schematic_inspect failed:",r),this.setStatus(`Inspect error: ${r}`)})}_clearCellHighlight(){if(this._svgEl){let t=this._svgEl.querySelector("#_schematic_highlight");t&&t.remove()}this._selectedCell=null,this.controls.querySelector("#schematic-zoom-to").disabled=!0}_zoomToSelected(){if(!this._selectedCell||!this._svgEl)return;let t=this.svgContainer.getBoundingClientRect(),i=this._selectedCell.getBoundingClientRect(),o=(i.left-t.left-this._panX)/this._scale,r=(i.top-t.top-this._panY)/this._scale,l=i.width/this._scale,h=i.height/this._scale,u=Math.min(t.width/l,t.height/h)*.9;this._scale=u,this._panX=t.width/2-(o+l/2)*u,this._panY=t.height/2-(r+h/2)*u,this._applyTransform()}_applyTransform(){this._svgEl&&(this._svgEl.style.transform=`translate(${this._panX}px, ${this._panY}px) scale(${this._scale})`,this._svgEl.style.transformOrigin="0 0")}fitView(){if(!this._svgEl)return;let t=this.svgContainer.getBoundingClientRect();if(t.width===0||t.height===0)return;let i=this._svgEl.viewBox&&this._svgEl.viewBox.baseVal,o=i&&i.width||this._svgEl.clientWidth||1,r=i&&i.height||this._svgEl.clientHeight||1;this._scale=Math.min(t.width/o,t.height/r)*.95,this._panX=(t.width-o*this._scale)/2,this._panY=(t.height-r*this._scale)/2,this._applyTransform()}initNetlistSVG(){this.netlistsvg=globalThis.netlistsvg,this.skin=globalThis.openroadSkin,this._netlistsvgReady=!!(this.netlistsvg&&this.skin),this._netlistsvgReady&&console.log("NetlistSVG ready."),this.setStatus(this._unreadyStatus()??Yl)}_unreadyStatus(){return this._netlistsvgReady?null:wt(this.appState)?"The schematic is not available in saved reports.":"Init error: netlistsvg or its skin is missing from the page."}syncCone(t={}){let i=this.controls.querySelector("#schematic-fanin-depth"),o=this.controls.querySelector("#schematic-fanout-depth"),r=(l,h,u)=>{if(!l)return;let f=parseInt(l.max,10)||10;h===!1?l.value=0:u!==void 0&&(l.value=u>0?Math.min(u,f):f)};r(i,t.fanin,t.fanin_depth),r(o,t.fanout,t.fanout_depth),this.refresh(t.inst_name),this.appState.focusComponent&&this.appState.focusComponent("SchematicWidget",{reveal:!0})}_onRefresh(){this.refresh(this._instName)}refresh(t=this.appState.selectedInstanceName){if(this._instName=t,!this._netlistsvgReady){this.setStatus(this._unreadyStatus());return}if(!t){this.setStatus(Yl);return}let i=this.appState.websocketManager;if(!i){this.setStatus("Waiting for server connection\u2026");return}this.setStatus(`Loading schematic for ${t}\u2026`);let o=parseInt(this.controls.querySelector("#schematic-fanin-depth").value,10),r=parseInt(this.controls.querySelector("#schematic-fanout-depth").value,10),l=isNaN(o)?1:o,h=isNaN(r)?1:r;i.readyPromise.then(()=>{i.request({type:"schematic_cone",inst_name:t,fanin_depth:l,fanout_depth:h}).then(u=>{let f=u.modules&&u.modules.top&&u.modules.top.cells;if(!f||Object.keys(f).length===0){this.setStatus("No cells found for selected instance.");return}this.renderNetlist(u)}).catch(u=>{this.setStatus(`Error: ${u}`)})})}setStatus(t){this.controls.querySelector("#schematic-status").textContent=t}_exportSvg(){if(!this._svgEl){this.setStatus("No schematic to export.");return}let t=Vo(this._svgEl);Cl(new Blob([t],{type:"image/svg+xml;charset=utf-8"}),"schematic.svg")}async _exportPng(){if(!this._svgEl){this.setStatus("No schematic to export.");return}try{let t=await Yo(this._svgEl,2);bi(t,"schematic.png")}catch{this.setStatus("PNG export failed.")}}async _copyImage(){if(!this._svgEl){this.setStatus("No schematic to export.");return}try{let t=await Yo(this._svgEl,2),i=await vs(t);this.setStatus(i?"Schematic copied to clipboard.":"Clipboard not available.")}catch{this.setStatus("Copy failed.")}}async renderNetlist(t){try{this.setStatus("Rendering\u2026"),typeof window<"u"&&(window.__lastSchematic=t);let i=jd(t),o,r=this.netlistsvg.render(this.skin,i);if(r&&typeof r.then=="function"?o=await r:o=await new Promise((u,f)=>{this.netlistsvg.render(this.skin,i,(_,g)=>{_?f(_):u(g)})}),typeof o!="string"||!o.includes("requestAnimationFrame(()=>this.fitView()));let h=Object.keys(t.modules.top.cells).length;this.setStatus(`${h} cell${h!==1?"s":""}`)}catch(i){console.error("NetlistSVG render failed:",i),this.setStatus(`Render error: ${i.message||i}`)}}_applyPinLabels(t){if(!this._svgEl)return;let i="http://www.w3.org/2000/svg",o="https://github.com/nturley/netlistsvg",r=t.modules&&t.modules.top&&t.modules.top.cells||{},l=(h,u)=>h.getAttribute("s:"+u)??h.getAttributeNS(o,u);for(let[h,u]of Object.entries(r)){let f=u.port_labels;if(!f)continue;let _=this._svgEl.querySelector("#"+CSS.escape("cell_"+h))||this._svgEl.querySelector("#"+CSS.escape(h));if(!_)continue;let g=u.port_directions||{};for(let y of Array.from(_.children)){if(y.tagName!=="g")continue;let v=l(y,"pid");if(!v||!(v in f))continue;let w=parseFloat(l(y,"x")),b=parseFloat(l(y,"y"));if(!isFinite(w)||!isFinite(b))continue;let C=document.createElementNS(i,"text");g[v]==="input"?(C.setAttribute("class","inputPortLabel"),C.setAttribute("x",w-3)):C.setAttribute("x",w+4),C.setAttribute("y",b-4),C.setAttribute("style","font-size:5px"),C.setAttribute("pointer-events","none"),C.textContent=f[v],_.appendChild(C)}}}_scopeSkinStyles(){if(!this._svgEl)return;let t=".schematic-widget",i=o=>{for(let r of o)r.selectorText?r.selectorText=Ud(r.selectorText,t):r.cssRules&&i(r.cssRules)};for(let o of this._svgEl.querySelectorAll("style")){let r=o.sheet;if(r)try{i(r.cssRules)}catch{continue}}}};function Ud(s,t){return s.split(",").map(i=>{let o=i.trim();if(!o)return"";let r=o.charAt(t.length);return o.startsWith(t)&&(r===""||!/[\w-]/.test(r))?o:`${t} ${o}`}).filter(Boolean).join(", ")}var Xl={and:"$_AND_",nand:"$_NAND_",or:"$_OR_",nor:"$_NOR_",xor:"$_XOR_",xnor:"$_XNOR_",not:"$_NOT_",buf:"$_BUF_"},Vd=new Set(["aoi21","aoi22","aoi211","aoi221","aoi222","aoi33","oai21","oai22","oai211","oai221","oai222","oai33"]),Yd=new Set(["and3","and4","or3","or4","nand3","nand4","nor3","nor4"]),jl=["A","B","C","D","E","F"];function Xd(s){let t=s&&s.gate_kind;if(!t)return s;let i=s.port_directions||{},o=null,r=[];for(let[y,v]of Object.entries(i))v==="output"&&o===null?o=y:v==="input"&&r.push(y);let l,h={};if(t==="aoi"||t==="oai"){let y=Array.isArray(s.gate_terms)?s.gate_terms:[];if(!y.length)return s;let v=y.map(C=>C.length);if(l=t+v.slice().sort((C,R)=>R-C).join(""),!Vd.has(l))return s;let w=y.map(C=>C.slice()).sort((C,R)=>C.length-R.length),b=0;for(let C of w)for(let R of C)h[R]=jl[b]||"I"+b,b++}else{let y=r.length;if(t==="not"||t==="buf")l=Xl[t];else if(y<=2)l=Xl[t];else if(l=t+y,!Yd.has(l))return s;if(!l)return s;r.forEach((v,w)=>{h[v]=jl[w]||"I"+w})}o!==null&&(h[o]="Y");let u=s.connections||{},f={},_={};for(let[y,v]of Object.entries(u))h[y]&&(f[h[y]]=v);for(let[y,v]of Object.entries(i))h[y]&&(_[h[y]]=v);let g={};for(let[y,v]of Object.entries(h))g[v]=y;return{...s,type:l,connections:f,port_directions:_,port_labels:g}}function jd(s){let t=s&&s.modules&&s.modules.top;if(!t||!t.cells)return s;let i={};for(let[o,r]of Object.entries(t.cells))i[o]=Xd(r);return{...s,modules:{...s.modules,top:{...t,cells:i}}}}var Rs=class{constructor(t,i,o){this._app=t,this._redrawAllLayers=i,this._refreshOverlay=o||i,this._categories=[],this._activeCategory="",this._markerTree=null,this._expandedNodes=new Set,this._build(),this._app.websocketManager.readyPromise.then(()=>this.refresh())}_build(){let t=document.createElement("div");t.className="drc-widget";let i=document.createElement("div");i.className="drc-toolbar",this._categorySelect=document.createElement("select"),this._categorySelect.className="drc-category-select",i.appendChild(this._categorySelect),this._loadBtn=document.createElement("button"),this._loadBtn.className="or-btn or-btn-sm",this._loadBtn.textContent="Load...",i.appendChild(this._loadBtn),t.appendChild(i),this._infoBar=document.createElement("div"),this._infoBar.className="drc-info-bar",t.appendChild(this._infoBar),this._treeContainer=document.createElement("div"),this._treeContainer.className="drc-tree-container",t.appendChild(this._treeContainer),this.element=t,this._bindEvents()}_bindEvents(){this._categorySelect.addEventListener("change",()=>{this._activeCategory=this._categorySelect.value,this._loadMarkers()}),this._loadBtn.addEventListener("click",()=>{this._showLoadDialog()})}_loadCategories(){return this._app.websocketManager.request({type:"drc_categories"}).then(t=>{this._categories=t.categories||[],this._renderCategorySelect()}).catch(t=>{console.error("Failed to load DRC categories:",t)})}refresh(){this._loadCategories().then(()=>{!this._activeCategory&&this._categories.length>0&&(this._activeCategory=this._categories[0].name,this._categorySelect.value=this._activeCategory),this._activeCategory&&this._loadMarkers()})}_renderCategorySelect(){let t=this._categorySelect,i=t.value;t.innerHTML="";let o=document.createElement("option");o.value="",o.textContent="(none)",t.appendChild(o);for(let r of this._categories){let l=document.createElement("option");l.value=r.name,l.textContent=`${r.name} (${r.count})`,t.appendChild(l)}this._activeCategory&&this._categories.some(r=>r.name===this._activeCategory)?t.value=this._activeCategory:i&&this._categories.some(r=>r.name===i)?(t.value=i,this._activeCategory=i):this._activeCategory=""}_loadMarkers(){if(!this._activeCategory){this._markerTree=null,this._treeContainer.innerHTML="",this._infoBar.textContent="",this._refreshOverlay();return}this._treeContainer.innerHTML='
Loading...
',this._app.websocketManager.request({type:"drc_markers",category:this._activeCategory}).then(t=>{this._markerTree=t,this._renderTree(),this._refreshOverlay()}).catch(t=>{this._treeContainer.innerHTML="";let i=document.createElement("div");i.className="drc-error",i.textContent=`Error: ${t}`,this._treeContainer.appendChild(i),console.error("Failed to load DRC markers:",t)})}_renderTree(){if(this._treeContainer.innerHTML="",!this._markerTree)return;if(this._markerTree.error){let h=document.createElement("div");h.className="drc-error",h.textContent=this._markerTree.error,this._treeContainer.appendChild(h);return}let t=this._markerTree.total_count||0;this._infoBar.textContent=`${t} total violation${t!==1?"s":""}`;let i=this._markerTree.name||this._activeCategory,o=this._markerTree.subcategories||[],r=this._markerTree.markers||[];if(o.length===0&&r.length===0){this._treeContainer.innerHTML='
No violations
';return}let l=document.createElement("div");l.className="drc-tree",r.length>0&&l.appendChild(this._buildCategoryNode({name:i||"Markers",count:r.length,markers:r},[]));for(let h of o)l.appendChild(this._buildCategoryNode(h,[i]));this._treeContainer.appendChild(l)}_buildCategoryNode(t,i=[]){let o=[...i,t.name],r=document.createElement("div");r.className="drc-tree-node";let l=document.createElement("div");l.className="drc-tree-header";let h=document.createElement("span");h.className="drc-toggle";let u=t.subcategories&&t.subcategories.length>0||t.markers&&t.markers.length>0,f=JSON.stringify(o),_=this._expandedNodes.has(f);h.textContent=u?_?"\u25BC":"\u25B6":" ",l.appendChild(h);let g=document.createElement("input");g.type="checkbox",g.checked=this._allMarkersVisible(t),g.className="drc-visibility-check",g.addEventListener("change",b=>{b.stopPropagation(),this._toggleCategoryVisibility(t,g.checked,o)}),l.appendChild(g);let y=document.createElement("span");y.className="drc-category-label",y.textContent=t.name,l.appendChild(y);let v=document.createElement("span");v.className="drc-count",v.textContent=`${t.count} markers`,l.appendChild(v),r.appendChild(l);let w=document.createElement("div");if(w.className="drc-tree-children",w.style.display=_?"":"none",t.subcategories)for(let b of t.subcategories)w.appendChild(this._buildCategoryNode(b,o));if(t.markers)for(let b of t.markers)w.appendChild(this._buildMarkerNode(b));return r.appendChild(w),u&&(l.addEventListener("click",b=>{if(b.target===g)return;let C=w.style.display!=="none";w.style.display=C?"none":"",h.textContent=C?"\u25B6":"\u25BC",C?this._expandedNodes.delete(f):this._expandedNodes.add(f)}),l.style.cursor="pointer"),r}_buildMarkerNode(t){let i=document.createElement("div");i.className="drc-marker-row",i.dataset.markerId=t.id,t.visited||i.classList.add("drc-unvisited");let o=document.createElement("input");o.type="checkbox",o.checked=t.visible,o.className="drc-visibility-check",o.addEventListener("change",h=>{h.stopPropagation(),t.visible=o.checked,this._updateMarker(t.id,"visible",o.checked)}),i.appendChild(o);let r=document.createElement("span");r.className="drc-marker-index",r.textContent=t.index,i.appendChild(r);let l=document.createElement("span");if(l.className="drc-marker-name",l.textContent=t.name,t.layer&&(l.title=`Layer: ${t.layer}`),i.appendChild(l),t.layer){let h=document.createElement("span");h.className="drc-layer-badge",h.textContent=t.layer,i.appendChild(h)}return i.addEventListener("click",h=>{h.target!==o&&this._highlightMarker(t)}),i.addEventListener("dblclick",h=>{h.target!==o&&this._highlightMarker(t,!0)}),i}highlightMarkerById(t,i=!1){let o=this._findMarkerById(t);o&&this._highlightMarker(o,i)}_findMarkerById(t){let i=o=>{if(!o)return null;if(o.markers){for(let r of o.markers)if(r.id===t)return r}if(o.subcategories)for(let r of o.subcategories){let l=i(r);if(l)return l}return null};return i(this._markerTree)}_highlightMarker(t,i=!1){this._app.websocketManager.request({type:"drc_highlight",marker_id:t.id,open_inspector:i}).then(o=>{if(o.ok&&o.bbox){t.visited=!0;let r=this._treeContainer.querySelector(`.drc-marker-row[data-marker-id="${t.id}"]`);r&&r.classList.remove("drc-unvisited"),this._zoomToBBox(o.bbox),this._refreshOverlay(),i&&(o.select_id!=null&&this._app.navigateInspector&&this._app.navigateInspector(o.select_id),this._app.focusComponent&&this._app.focusComponent("Inspector"))}}).catch(o=>{console.error("Failed to highlight DRC marker:",o)})}_zoomToBBox(t){if(!this._app.designScale||!this._app.map)return;let[i,o,r,l]=t,h=r-i,u=l-o,_=10*this._app.getDbuPerMicron(),g=2*Math.max(h,u),y=Math.min(_,g);this._app.map.fitBounds(Ut(i-y,o-y,r+y,l+y,this._app.designScale,this._app.designMaxDXDY,this._app.designOriginX,this._app.designOriginY))}_updateMarker(t,i,o){this._app.websocketManager.request({type:"drc_update_marker",marker_id:t,field:i,value:!!o}).then(()=>{this._refreshOverlay(),i==="visible"&&(this._update3DHighlights(),o&&this._flashHighlight())}).catch(r=>{console.error("Failed to update DRC marker:",r)})}_flashHighlight(){let t=this._app.map?.getContainer();t&&(t.classList.remove("drc-flashing"),t.offsetWidth,t.classList.add("drc-flashing"),t.addEventListener("animationend",()=>{t.classList.remove("drc-flashing")},{once:!0}))}_update3DHighlights(){let t=this._app.threeDViewerWidget;if(!t)return;let i=[];this._collectVisibleMarkers(this._markerTree,i),i.length>0?t.highlightDRC(i):t.clearHighlightDRC()}_collectVisibleMarkers(t,i){if(t){if(t.markers)for(let o of t.markers)o.visible&&i.push(o);if(t.subcategories)for(let o of t.subcategories)this._collectVisibleMarkers(o,i)}}_setMarkersVisible(t,i){if(t){if(t.markers)for(let o of t.markers)o.visible=i;if(t.subcategories)for(let o of t.subcategories)this._setMarkersVisible(o,i)}}_snapshotMarkerVisibility(t,i=new Map){if(!t)return i;if(t.markers)for(let o of t.markers)i.set(o.id,o.visible);if(t.subcategories)for(let o of t.subcategories)this._snapshotMarkerVisibility(o,i);return i}_restoreMarkerVisibility(t,i){if(t){if(t.markers)for(let o of t.markers)i.has(o.id)&&(o.visible=i.get(o.id));if(t.subcategories)for(let o of t.subcategories)this._restoreMarkerVisibility(o,i)}}_allMarkersVisible(t){if(t.markers){for(let i of t.markers)if(!i.visible)return!1}if(t.subcategories){for(let i of t.subcategories)if(!this._allMarkersVisible(i))return!1}return!0}_toggleCategoryVisibility(t,i,o){let r=this._snapshotMarkerVisibility(t);this._setMarkersVisible(t,i),this._renderTree(),this._app.websocketManager.request({type:"drc_update_category_visibility",category:t.name,path:o||[t.name],visible:!!i}).then(()=>{this._refreshOverlay(),this._update3DHighlights(),i&&this._flashHighlight()}).catch(l=>{console.error("Failed to update category visibility:",l),this._restoreMarkerVisibility(t,r),this._renderTree()})}_showLoadDialog(){new ir(this._app,i=>{this._activeCategory=i,this._loadCategories().then(()=>{this._categorySelect.value=this._activeCategory,this._loadMarkers()})}).open()}selectCategory(t){this._activeCategory=t,this._categorySelect.value=t,this._loadMarkers()}},ir=class{constructor(t,i){this._app=t,this._onLoaded=i,this._currentPath="",this._disposers=[],this._closed=!1}open(){this._overlay=document.createElement("div"),this._overlay.className="modal-overlay",this._overlay.innerHTML=` - `,document.body.appendChild(this._overlay),this._breadcrumb=this._overlay.querySelector(".fb-breadcrumb"),this._fileList=this._overlay.querySelector(".fb-file-list"),this._pathInput=this._overlay.querySelector(".fb-path-input"),this._errorDiv=this._overlay.querySelector(".modal-error"),this._okBtn=this._overlay.querySelector(".ok"),this._cancelBtn=this._overlay.querySelector(".cancel"),this._listen(this._pathInput,"input",()=>this._updateOkState()),this._listen(this._pathInput,"keydown",e=>{if(e.key==="Enter"){let i=this._pathInput.value.trim();i.endsWith("/")?this._navigate(i.replace(/\/+$/,"")||"/"):this._submit()}else e.key==="Escape"&&this.close()}),this._listen(this._okBtn,"click",()=>this._submit()),this._listen(this._cancelBtn,"click",()=>this.close()),this._listen(this._overlay,"click",e=>{e.target===this._overlay&&this.close()}),this._navigate("")}close(){if(!this._closed){this._closed=!0;for(let e of this._disposers)e();this._disposers.length=0,this._overlay&&(this._overlay.remove(),this._overlay=null)}}_listen(e,i,o){e.addEventListener(i,o),this._disposers.push(()=>e.removeEventListener(i,o))}_updateOkState(){this._okBtn.disabled=!this._pathInput.value.trim()}_renderBreadcrumb(e){this._breadcrumb.innerHTML="";let i=e.split("/").filter(Boolean),o=document.createElement("span");o.className="fb-crumb",o.textContent="/",this._listen(o,"click",()=>this._navigate("/")),this._breadcrumb.appendChild(o);let r="";for(let l of i){r+="/"+l;let h=document.createElement("span");h.className="fb-crumb-sep",h.textContent=" / ",this._breadcrumb.appendChild(h);let u=document.createElement("span");u.className="fb-crumb",u.textContent=l;let f=r;this._listen(u,"click",()=>this._navigate(f)),this._breadcrumb.appendChild(u)}}_renderEntries(e){if(this._fileList.innerHTML="",!e||e.length===0){let i=document.createElement("div");i.className="fb-empty",i.textContent="(empty directory)",this._fileList.appendChild(i);return}for(let i of e){let o=document.createElement("div");o.className="fb-entry",i.is_dir&&o.classList.add("fb-dir");let r=document.createElement("span");r.className="fb-icon",r.textContent=i.is_dir?"\u{1F4C1}":"\u{1F4C4}",o.appendChild(r);let l=document.createElement("span");l.className="fb-name",l.textContent=i.name,o.appendChild(l),i.is_dir?this._listen(o,"click",()=>this._navigate(this._currentPath+"/"+i.name)):(this._listen(o,"click",()=>{let h=this._fileList.querySelector(".fb-selected");h&&h.classList.remove("fb-selected"),o.classList.add("fb-selected"),this._pathInput.value=this._currentPath+"/"+i.name,this._updateOkState()}),this._listen(o,"dblclick",()=>{this._pathInput.value=this._currentPath+"/"+i.name,this._updateOkState(),this._submit()})),this._fileList.appendChild(o)}}async _navigate(e){this._errorDiv.style.display="none",this._fileList.innerHTML='
Loading...
';try{let i=await this._app.websocketManager.request({type:"list_dir",path:e||""});if(this._closed)return;this._currentPath=i.path,this._renderBreadcrumb(i.path),this._renderEntries(i.entries),this._pathInput.value="",this._updateOkState()}catch(i){if(this._closed)return;this._fileList.innerHTML="",this._errorDiv.textContent=i.message||String(i),this._errorDiv.style.display=""}}async _submit(){let e=this._pathInput.value.trim();if(e){this._okBtn.disabled=!0,this._okBtn.textContent="Loading...",this._errorDiv.style.display="none";try{let i=await this._app.websocketManager.request({type:"drc_load_report",path:e});if(this._closed)return;if(i.ok){let o=i.category;this.close(),this._onLoaded(o)}else this._errorDiv.textContent=i.error||"Failed to load report",this._errorDiv.style.display="",this._okBtn.disabled=!1,this._okBtn.textContent="Load"}catch(i){if(this._closed)return;this._errorDiv.textContent=i.message||"Request failed",this._errorDiv.style.display="",this._okBtn.disabled=!1,this._okBtn.textContent="Load"}}}};var jd=` -\r[]{}`;var Rs=class{constructor(e,i){this._input=e,this._ws=i,this._popup=null,this._items=[],this._selectedIndex=-1,this._replaceStart=0,this._replaceEnd=0,this._debounceTimer=null,this._commandCache=null,this._history=[],this._historyIndex=-1,this._historyStash="",this._createPopup(),this._onInputBound=this._onInput.bind(this),this._onBlurBound=this._onBlur.bind(this),this._input.addEventListener("input",this._onInputBound),this._input.addEventListener("blur",this._onBlurBound)}_createPopup(){this._popup=document.createElement("div"),this._popup.className="tcl-complete-popup",this._popup.style.display="none",this._input.parentElement.appendChild(this._popup)}handleKeyDown(e){let i=this._popup.style.display!=="none";return e.key==="Tab"?(e.preventDefault(),i?this._tabAccept():this._tabComplete(this._input.value,this._input.selectionStart),!0):e.key==="Escape"?i?(this._hidePopup(),!0):!1:e.key==="ArrowDown"?i?(e.preventDefault(),this._selectItem(this._selectedIndex+1),!0):this._historyIndex>=0?(e.preventDefault(),this._historyIndex--,this._historyIndex<0?this._input.value=this._historyStash:this._input.value=this._history[this._historyIndex],!0):!1:e.key==="ArrowUp"?i?(e.preventDefault(),this._selectItem(this._selectedIndex-1),!0):this._historyIndex{let e=this._input.value,i=this._input.selectionStart,o=this._extractPrefix(e,i);o.length>=2||o.length>=1&&(o[0]==="$"||o[0]==="-")?this._requestCompletions(e,i):this._hidePopup()},100)}_onBlur(){setTimeout(()=>this._hidePopup(),150)}_extractPrefix(e,i){let o=i-1;for(;o>=0&&jd.indexOf(e[o])===-1;)o--;return e.substring(o+1,i)}_fetchCompletions(e,i,o){let r=this._extractPrefix(e,i),l=r.length>0&&r[0]==="$",h=r.length>0&&r[0]==="-",u=!l&&!h,f=i-r.length,_=e.substring(0,f),y=/^[\s\[]*$/.test(_);if(u&&y&&this._commandCache){let g=r.toLowerCase(),v=this._commandCache.filter(w=>w.toLowerCase().startsWith(g));o(v,f,i);return}this._ws.request({type:"tcl_complete",line:e,cursor_pos:i}).then(g=>{g.mode==="commands"&&!this._commandCache&&r===""&&(this._commandCache=g.completions),g.mode==="commands"&&!this._commandCache&&this._ws.request({type:"tcl_complete",line:"",cursor_pos:0}).then(v=>{v.mode==="commands"&&(this._commandCache=v.completions)}).catch(()=>{}),o(g.completions,g.replace_start,g.replace_end)}).catch(()=>o([],0,0))}_requestCompletions(e,i){this._fetchCompletions(e,i,(o,r,l)=>{this._showPopup(o,r,l)})}_tabAccept(){if(this._items.length===0){this._hidePopup();return}if(this._items.length===1){this._selectedIndex=0,this._acceptCompletion();return}this._advanceToCommonPrefix()}_tabComplete(e,i){this._fetchCompletions(e,i,(o,r,l)=>{if(!o||o.length===0){this._hidePopup();return}if(o.length===1){this._items=o,this._replaceStart=r,this._replaceEnd=l,this._selectedIndex=0,this._acceptCompletion();return}this._items=o,this._replaceStart=r,this._replaceEnd=l,this._advanceToCommonPrefix(),this._showPopup(o,this._replaceStart,this._replaceEnd)})}_advanceToCommonPrefix(){if(this._items.length<2)return!1;let e=this._items[0];for(let h=1;h0;h++){let u=this._items[h],f=0;for(;f{let f=document.createElement("div");f.className="tcl-complete-item",f.textContent=h,f.addEventListener("mousedown",_=>{_.preventDefault(),this._selectedIndex=u,this._acceptCompletion()}),this._popup.appendChild(f)}),e.length>15){let h=document.createElement("div");h.className="tcl-complete-more",h.textContent=`... ${e.length-15} more`,this._popup.appendChild(h)}this._selectedIndex=0,this._highlightSelected(),this._popup.style.display="block"}_hidePopup(){this._popup.style.display="none",this._items=[],this._selectedIndex=-1}_selectItem(e){if(this._items.length===0)return;let i=Math.min(this._items.length,15)-1;this._selectedIndex=Math.max(0,Math.min(e,i)),this._highlightSelected()}_highlightSelected(){let e=this._popup.querySelectorAll(".tcl-complete-item");e.forEach((i,o)=>{i.classList.toggle("selected",o===this._selectedIndex)}),e[this._selectedIndex]&&e[this._selectedIndex].scrollIntoView&&e[this._selectedIndex].scrollIntoView({block:"nearest"})}_acceptCompletion(){if(this._selectedIndex<0||this._selectedIndex>=this._items.length){this._hidePopup();return}let e=this._items[this._selectedIndex],i=this._input.value.substring(0,this._replaceStart),o=this._input.value.substring(this._replaceEnd),l=!e.endsWith("/")&&!e.endsWith("::")&&(o.length===0||o[0]!==" ")?" ":"";this._input.value=i+e+l+o;let h=this._replaceStart+e.length+l.length;this._input.setSelectionRange(h,h),this._input.focus(),this._hidePopup()}};var Kl=[{key:"or_visibility",store:"cookie"},{key:"or_selectability",store:"cookie"},{key:"or_hidden_layers",store:"session"},{key:"or_nonselectable_layers",store:"session"},{key:"or_layer_patterns",store:"session"},{key:"or_hidden_chiplets",store:"cookie"},{key:"or_bg_color",store:"cookie"},{key:"or_show_dbu",store:"cookie"},{key:"or_theme",store:"theme"},{key:"or_use_true_z",store:"cookie"},{key:"or_ruler_style",store:"cookie"},{key:"or_wheel_zoom",store:"cookie"},{key:"or_arrow_step",store:"cookie"},{key:"or_font_family",store:"cookie"},{key:"or_font_scale",store:"cookie"}];function Kd(s,e){try{return window[s].getItem(e)}catch{return null}}function Jd(s,e,i){try{i===null?window[s].removeItem(e):window[s].setItem(e,i)}catch{}}function Qd({key:s,store:e}){return e==="session"?Kd("sessionStorage",s):Vt(s)}function tu({key:s,store:e},i){e==="session"?Jd("sessionStorage",s,i):e==="theme"?i===null?vl():gs(i):i===null?_s(s):Qt(s,i)}function Jl(){let s={};for(let e of Kl){let i=Qd(e);i&&(s[e.key]=i)}return{version:1,entries:s}}function eu(s){return typeof s=="string"&&s!==""&&!/[;\r\n]/.test(s)}function Ql(s){for(let e of Kl){let i=s[e.key];tu(e,eu(i)?i:null)}}function tc(s,e=typeof document<"u"?document:null){let i="OpenROAD",o=s?`${i} - ${s}`:i;return e&&(e.title=o),o}var ht=globalThis.THREE,ec=2,iu=.002,nu=.9,su=1.1,ou=.1,ru=20,au=3,ki=2,ic=2,lu=10,cu=1e4,hu=.15,du=300,uu=6,Os=Math.PI/180,nc=[5025616,2201331,16750592,10233776,48340,16007990,2533018,7951688,15277667,4149685];function pu(s){let e=new Array(s.length).fill(0),i=new Map;s.forEach((o,r)=>{let l=o.z;i.has(l)||i.set(l,[]),i.get(l).push({idx:r,chiplet:o})});for(let o of i.values()){if(o.length<=1)continue;let r=[];for(let{idx:l,chiplet:h}of o){let u=h.x,f=h.y,_=h.x+h.width,y=h.y+h.height,g=!1;for(let v=0;vub.x1&&fb.y1)){r[v].push({x1:u,y1:f,x2:_,y2:y}),e[l]=v,g=!0;break}g||(r.push([{x1:u,y1:f,x2:_,y2:y}]),e[l]=r.length-1)}}return e}var zs=class{constructor(e,i){if(this._app=i,this._container=e,this._element=document.createElement("div"),this._element.className="three-d-viewer-widget",e.element.appendChild(this._element),!ht){wt(i)?this._showInfo("The 3D view is not available in saved reports."):this._showError("three.js is missing from the page."),this._destroyed=!0;return}this._canvasContainer=document.createElement("div"),this._canvasContainer.className="three-d-canvas-container",this._element.appendChild(this._canvasContainer),this._tooltip=document.createElement("div"),this._tooltip.className="or-tooltip",this._canvasContainer.appendChild(this._tooltip),this._optionsOverlay=this._createOptionsOverlay(),this._canvasContainer.appendChild(this._optionsOverlay),this._raycaster=new ht.Raycaster,this._scene=new ht.Scene,this._applyTheme(),this._themeObserver=new MutationObserver(()=>{this._applyTheme(),this.render()}),this._themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),this._camera=new ht.PerspectiveCamera(45,1,10,1e5),this._camera.position.set(0,0,1e3);try{this._renderer=new ht.WebGLRenderer({antialias:!0,preserveDrawingBuffer:!0})}catch(h){console.error("3D viewer: failed to create WebGL context:",h),this._showWebGLUnavailable(h),this._themeObserver&&(this._themeObserver.disconnect(),this._themeObserver=null),this._destroyed=!0;return}this._renderer.setPixelRatio(window.devicePixelRatio),this._renderer.setSize(e.width,e.height),this._canvasContainer.appendChild(this._renderer.domElement),this._rotation=new ht.Quaternion,this._distance=1e3,this._panX=0,this._panY=0,this._boundingRadius=1,this._sceneCenter=new ht.Vector3,this._mouseDown=!1,this._mouseButton=-1,this._lastMousePos={x:0,y:0},this._setupMouseHandlers();let o=new ht.AmbientLight(16777215,.5);this._scene.add(o);let r=new ht.DirectionalLight(16777215,.8);r.position.set(1,1,1).normalize(),this._scene.add(r);let l=new ht.DirectionalLight(16777215,.3);l.position.set(-1,-.5,.5).normalize(),this._scene.add(l),e.on("resize",this.onResize.bind(this)),e.on("open",this.onOpen.bind(this)),e.on("destroy",this.onDestroy.bind(this)),this._designGroup=new ht.Group,this._scene.add(this._designGroup),this._chipletMeshes=[],this._loading=!1,this._destroyed=!1,this._edgeMaterial=null}_setupMouseHandlers(){let e=this._renderer.domElement;e.addEventListener("mousedown",i=>{this._mouseDown=!0,this._mouseButton=i.button,this._lastMousePos.x=i.clientX,this._lastMousePos.y=i.clientY,e.focus(),i.preventDefault()}),e.addEventListener("contextmenu",i=>i.preventDefault()),this._onMouseMove=i=>{if(!this._mouseDown)return;let o=i.clientX-this._lastMousePos.x,r=i.clientY-this._lastMousePos.y;this._lastMousePos.x=i.clientX,this._lastMousePos.y=i.clientY,!(o===0&&r===0)&&(this._mouseButton===0?this._handleRotate(o,r):this._mouseButton===2&&this._handlePan(o,r),this._updateCamera())},this._onMouseUp=i=>{this._mouseDown&&i.button===this._mouseButton&&(this._mouseDown=!1,this._mouseButton=-1)},window.addEventListener("mousemove",this._onMouseMove),window.addEventListener("mouseup",this._onMouseUp),e.addEventListener("wheel",i=>{i.preventDefault(),i.deltaY<0?this._distance*=nu:this._distance*=su;let o=Math.max(this._boundingRadius*ou,1),r=Math.max(this._boundingRadius*ru,o);this._distance=Math.max(o,Math.min(r,this._distance)),this._updateCamera()},{passive:!1}),e.tabIndex=0,e.style.outline="none",e.addEventListener("keydown",i=>{i.key.toLowerCase()==="f"&&this.resetCamera()}),e.addEventListener("dblclick",i=>{i.preventDefault();let o=this._pickDrcMarkerId(i);if(o!=null&&this._app.drcWidget){this._app.drcWidget.highlightMarkerById(o,!0);return}this.resetCamera()}),e.addEventListener("mousemove",i=>{if(this._mouseDown){this._hideTooltip();return}this._updateTooltip(i)}),e.addEventListener("mouseleave",()=>{this._hideTooltip()})}_createOptionsOverlay(){let e=document.createElement("div");e.className="three-d-options";let i=document.createElement("label");i.title="Render chiplets at their true Z (disable stacking offset for overlapping chiplets at same Z).";let o=document.createElement("input");o.type="checkbox",o.checked=!!this._app.useTrueZ,o.addEventListener("change",()=>{this._app.useTrueZ=o.checked,Qt("or_use_true_z",o.checked?"1":"0"),this._app.syncDisplayState(),this.refreshSceneForOptions()}),i.appendChild(o),i.appendChild(document.createTextNode("True Z (no stacking)")),e.appendChild(i);let r=document.createElement("div");r.style.cssText="margin-top:4px; display:flex; gap:4px;";let l=document.createElement("button");l.className="or-btn or-btn-sm",l.textContent="Save PNG",l.title="Save the 3D view as a PNG image (2x resolution)",l.addEventListener("click",()=>this._exportPng(2));let h=document.createElement("button");return h.className="or-btn or-btn-sm",h.textContent="Copy",h.title="Copy the 3D view image to the clipboard",h.addEventListener("click",()=>this._copyImage(2)),r.appendChild(l),r.appendChild(h),e.appendChild(r),e}_capturePng(e=2){if(!this._renderer)return null;let i=this._renderer,o=i.domElement.clientWidth||i.domElement.width,r=i.domElement.clientHeight||i.domElement.height,l=i.getPixelRatio();try{return i.setPixelRatio(l*e),i.setSize(o,r,!1),this.render(),i.domElement.toDataURL("image/png")}finally{i.setPixelRatio(l),i.setSize(o,r,!1),this.render()}}_exportPng(e=2){let i=this._capturePng(e);i&&wi(i,"3d-view.png")}async _copyImage(e=2){let i=this._capturePng(e);i&&await ys(i)}_setRaycasterFromEvent(e){let o=this._renderer.domElement.getBoundingClientRect(),r=new ht.Vector2((e.clientX-o.left)/o.width*2-1,-((e.clientY-o.top)/o.height*2-1));this._raycaster.setFromCamera(r,this._camera)}_updateTooltip(e){if(!this._chipletMeshes.length){this._hideTooltip();return}this._setRaycasterFromEvent(e);let i=this._chipletMeshes.map(u=>u.mesh),o=this._raycaster.intersectObjects(i,!1);if(o.length===0){this._hideTooltip();return}let r=o[0].object,l=this._chipletMeshes.find(u=>u.mesh===r);if(!l){this._hideTooltip();return}this._tooltip.textContent=l.data.name,this._tooltip.style.display="block";let h=this._canvasContainer.getBoundingClientRect();this._tooltip.style.left=e.clientX-h.left+12+"px",this._tooltip.style.top=e.clientY-h.top+12+"px"}_hideTooltip(){this._tooltip&&(this._tooltip.style.display="none")}_pickDrcMarkerId(e){if(!this._drcHitboxMesh||!this._drcHitboxMarkerIds)return null;this._setRaycasterFromEvent(e);let i=this._raycaster.intersectObject(this._drcHitboxMesh,!1);if(i.length===0)return null;let o=i[0].instanceId;return o==null?null:this._drcHitboxMarkerIds[o]??null}_handleRotate(e,i){let o=Math.sqrt(e*e+i*i);if(o<.001)return;let r=new ht.Vector3(i/o,e/o,0),l=o/ec,u=new ht.Quaternion().setFromAxisAngle(r,l*Os).clone().multiply(this._rotation);if(new ht.Vector3(0,0,1).applyQuaternion(u).z>=0)this._rotation.copy(u);else{let _=new ht.Vector3(0,1,0),y=e/ec*Os,v=new ht.Quaternion().setFromAxisAngle(_,y).clone().multiply(this._rotation);new ht.Vector3(0,0,1).applyQuaternion(v).z>=0&&this._rotation.copy(v)}}_handlePan(e,i){let o=this._distance*iu;this._panX+=e*o,this._panY-=i*o}_updateCamera(){let e=Math.max(this._boundingRadius,1e3),i=Math.max(this._distance-e*ic,lu),o=this._distance+e*ic;o0;){let e=this._designGroup.children[0];this._designGroup.remove(e),e.geometry&&e.geometry.dispose(),e.material&&!e.material._shared&&e.material.dispose()}this._edgeMaterial&&(this._edgeMaterial.dispose(),this._edgeMaterial=null),this._onMouseMove&&(window.removeEventListener("mousemove",this._onMouseMove),this._onMouseMove=null),this._onMouseUp&&(window.removeEventListener("mouseup",this._onMouseUp),this._onMouseUp=null),this._renderer&&(this._renderer.dispose(),this._renderer=null),this._app.threeDViewerWidget===this&&(this._app.threeDViewerWidget=null)}}_setInitialCameraState(){this._distance=this._boundingRadius*au;let e=new ht.Quaternion().setFromAxisAngle(new ht.Vector3(1,0,0),-45*Os),i=new ht.Quaternion().setFromAxisAngle(new ht.Vector3(0,0,1),45*Os);this._rotation=e.multiply(i),this._panX=0,this._panY=0}resetCamera(){this._sceneBounds&&(this._setInitialCameraState(),this._updateCamera())}onResize(){if(this._destroyed)return;let e=this._canvasContainer.getBoundingClientRect(),i=e.width,o=e.height;i===0||o===0||(this._camera.aspect=i/o,this._camera.updateProjectionMatrix(),this._renderer.setSize(i,o),this.render())}render(){this._destroyed||this._renderer&&this._scene&&this._camera&&this._renderer.render(this._scene,this._camera)}_applyTheme(){let i=bi().bgMap||"#000000";this._scene.background=new ht.Color(i)}async loadData(){if(!(this._loading||this._destroyed)){this._loading=!0;for(let e of[".three-d-error",".three-d-info"]){let i=this._element.querySelector(e);i&&i.remove()}try{await this._app.websocketManager.readyPromise;let e=await this._app.websocketManager.request({type:"get_3d_data"});if(this._destroyed)return;if(e&&e.error){this._showError(e.error);return}if(e&&e.info){this._showInfo(e.info);return}this.buildScene(e)}catch(e){if(this._destroyed)return;console.error("Failed to load 3D data:",e),this._showError(e.message||String(e))}finally{this._loading=!1}}}_showOverlay(e,i,o){let r=document.createElement("div");r.className=e,r.style.cssText="position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-family:monospace;text-align:center;",r.style.color=o,r.textContent=i,this._element.appendChild(r)}_showError(e){this._showOverlay("three-d-error","Failed to load 3D data: "+e,"var(--error)")}_showInfo(e){this._showOverlay("three-d-info",e,"var(--fg-muted, #888)")}_showWebGLUnavailable(e){let i=document.createElement("div");i.className="three-d-error",i.style.cssText="position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-family:monospace;text-align:center;max-width:80%;color:var(--error);";let o=e&&e.message?e.message:String(e||"");i.innerHTML='
3D viewer unavailable: WebGL context could not be created.
In Chrome, open chrome://flags/#ignore-gpu-blocklist and set Override software rendering list to Enabled, then relaunch the browser.
Otherwise enable hardware acceleration or try a different browser. See chrome://gpu for details.
'+(o?'
'+o+"
":""),this._element.appendChild(i)}buildScene(e){if(this._destroyed||(this._lastSceneData=e,this._clearScene(),!e||!e.chiplets||e.chiplets.length===0))return;let i=this._app.getDbuPerMicron(),o=this._buildChiplets(e.chiplets,i);o.minX!==1/0&&(this._buildGrid(o),this._setSceneBoundsAndCenter(o),this._setInitialCameraState(),this._updateCamera())}_clearScene(){for(this._chipletMeshes=[];this._designGroup.children.length>0;){let e=this._designGroup.children[0];this._designGroup.remove(e),e.geometry&&e.geometry.dispose(),e.material&&!e.material._shared&&e.material.dispose()}this._hideTooltip()}_buildChiplets(e,i){let o={minX:1/0,minY:1/0,minZ:1/0,maxX:-1/0,maxY:-1/0,maxZ:-1/0};this._edgeMaterial||(this._edgeMaterial=new ht.LineBasicMaterial({color:0,linewidth:1}),this._edgeMaterial._shared=!0);let r=this._app.useTrueZ?new Array(e.length).fill(0):pu(e);return e.forEach((l,h)=>{let u=l.width/i,f=l.height/i,_=l.thickness/i*ki,y=nc[h%nc.length],g=new ht.MeshPhongMaterial({color:y,transparent:!1,opacity:1,side:ht.DoubleSide,shininess:40}),v=new ht.BoxGeometry(u,f,_),w=new ht.Mesh(v,g),b=l.x/i+u/2,C=l.y/i+f/2,B=_*hu,P=l.z/i*ki+_/2+r[h]*(_+B);w.position.set(b,C,P),this._designGroup.add(w),this._chipletMeshes.push({mesh:w,data:l,color:y});let T=new ht.EdgesGeometry(v),Z=new ht.LineSegments(T,this._edgeMaterial);Z.position.set(b,C,P),this._designGroup.add(Z),o.minX=Math.min(o.minX,l.x/i),o.minY=Math.min(o.minY,l.y/i),o.minZ=Math.min(o.minZ,P-_/2),o.maxX=Math.max(o.maxX,l.x/i+u),o.maxY=Math.max(o.maxY,l.y/i+f),o.maxZ=Math.max(o.maxZ,P+_/2)}),o}_buildGrid(e){let i=e.maxX-e.minX,o=e.maxY-e.minY,r=Math.max(i,o)*1.4,l=10,h=new ht.GridHelper(r,l,8947848,4473924);h.rotation.x=Math.PI/2,h.position.set((e.minX+e.maxX)/2,(e.minY+e.maxY)/2,e.minZ-1),this._designGroup.add(h)}_setSceneBoundsAndCenter(e){this._sceneBounds=e;let i=e.maxX-e.minX,o=e.maxY-e.minY,r=e.maxZ-e.minZ;this._boundingRadius=Math.sqrt(i*i+o*o+r*r)/2,this._sceneCenter.set((e.minX+e.maxX)/2,(e.minY+e.maxY)/2,(e.minZ+e.maxZ)/2)}_stackOffsetForPoint(e,i,o,r){for(let{mesh:l,data:h}of this._chipletMeshes){if(e!==h.z||ih.x+h.width||oh.y+h.height)continue;let u=h.thickness/r*ki,f=h.z/r*ki+u/2;return l.position.z-f}return 0}clearHighlightDRC(){this._drcBlinkInterval&&(clearInterval(this._drcBlinkInterval),this._drcBlinkInterval=null),this._drcMeshGroup&&(this._scene.remove(this._drcMeshGroup),this._drcMeshGroup.children.forEach(e=>{e.geometry&&e.geometry.dispose()}),this._drcMaterial&&(this._drcMaterial.dispose(),this._drcMaterial=null),this._drcHitboxMaterial&&(this._drcHitboxMaterial.dispose(),this._drcHitboxMaterial=null),this._drcHitboxMesh=null,this._drcHitboxMarkerIds=null,this._drcMeshGroup=null,this.render())}highlightDRC(e){if(this._destroyed||(this.clearHighlightDRC(),!e||e.length===0))return;let i=this._app.getDbuPerMicron(),o=0,r=1e4/i*ki;this._sceneBounds&&this._sceneBounds.minZ!==1/0&&(o=this._sceneBounds.minZ,r=this._sceneBounds.maxZ),o-=1,r+=1;let l=Math.max(r-o,1);this._drcMeshGroup=new ht.Group,this._drcMaterial=new ht.LineBasicMaterial({color:16776960,transparent:!0,opacity:1,depthTest:!1,depthWrite:!1}),this._drcHitboxMaterial=new ht.MeshBasicMaterial({transparent:!0,opacity:0,depthWrite:!1});let h=[];for(let _ of e){let y=_.rects&&_.rects.length>0?_.rects:[_.bbox];for(let g of y){let[v,w,b,C,B,P]=g,T=Math.max((b-v)/i,.001),Z=Math.max((C-w)/i,.001),G=o,dt=l,gt=0;if(g.length>=6&&B!==void 0&&P!==void 0){G=B/i*ki;let tt=P/i*ki;dt=Math.max(tt-G,.001),gt=this._stackOffsetForPoint(B,(v+b)/2,(w+C)/2,i)}let it=v/i+T/2,Q=w/i+Z/2,nt=G+dt/2+gt;h.push({cx:it,cy:Q,cz:nt,width:T,height:Z,depth:dt,markerId:_.id})}}if(h.length>0){let _=new ht.BoxGeometry(1,1,1);this._drcHitboxMesh=new ht.InstancedMesh(_,this._drcHitboxMaterial,h.length),this._drcHitboxMarkerIds=new Array(h.length);let y=new ht.Matrix4,g=new ht.Vector3,v=new ht.Vector3,w=new ht.Quaternion;h.forEach((b,C)=>{v.set(b.cx,b.cy,b.cz),g.set(b.width,b.height,b.depth),y.compose(v,w,g),this._drcHitboxMesh.setMatrixAt(C,y),this._drcHitboxMarkerIds[C]=b.markerId;let B=new ht.BoxGeometry(b.width,b.height,b.depth),P=new ht.EdgesGeometry(B);B.dispose();let T=new ht.LineSegments(P,this._drcMaterial);T.position.set(b.cx,b.cy,b.cz),T.renderOrder=999,this._drcMeshGroup.add(T)}),this._drcHitboxMesh.instanceMatrix.needsUpdate=!0,this._drcMeshGroup.add(this._drcHitboxMesh)}this._drcMeshGroup.renderOrder=999,this._scene.add(this._drcMeshGroup),this.render();let u=!0,f=0;this._drcBlinkInterval=setInterval(()=>{if(!(!this._drcMeshGroup||!this._drcMaterial)){if(f+=1,f>=uu){this._drcMaterial.opacity=1,this.render(),clearInterval(this._drcBlinkInterval),this._drcBlinkInterval=null;return}u=!u,this._drcMaterial.opacity=u?1:.2,this.render()}},du)}refreshSceneForOptions(){this._destroyed||this._lastSceneData&&(this.clearHighlightDRC(),this.buildScene(this._lastSceneData))}};var fu=[{name:"green",hex:"#00ff00"},{name:"yellow",hex:"#ffff00"},{name:"cyan",hex:"#00ffff"},{name:"magenta",hex:"#ff00ff"},{name:"red",hex:"#ff0000"},{name:"dark_green",hex:"#008000"},{name:"dark_magenta",hex:"#800080"},{name:"blue",hex:"#0000ff"},{name:"orange",hex:"#ffa500"},{name:"purple",hex:"#800080"},{name:"lime",hex:"#bfff00"},{name:"teal",hex:"#008080"},{name:"pink",hex:"#ffc0cb"},{name:"brown",hex:"#8b4513"},{name:"indigo",hex:"#4b0082"},{name:"turquoise",hex:"#40e0d0"}],mu=[{label:"Connected Insts",suffix:"connected_insts",needsNet:!0},{label:"Output Nets",suffix:"connected_nets",args:{output:!0,input:!1}},{label:"Input Nets",suffix:"connected_nets",args:{output:!1,input:!0}},{label:"All Nets",suffix:"connected_nets",args:{output:!0,input:!0}},{label:"All buffer trees",suffix:"connected_buffer_trees"},{label:"All buffer trees (incl. inverters)",suffix:"connected_buffer_trees",args:{include_inverters:!0}}],Hs=class{constructor(e){this._app=e,this._el=document.createElement("div"),this._el.className="context-menu",this._el.style.display="none",this._el.style.zIndex="10000",document.body.appendChild(this._el),this._bindEvents()}_bindEvents(){document.addEventListener("mousedown",e=>{this._el.contains(e.target)||this.hide()}),this._app.map&&this._app.map.on("movestart",()=>this.hide())}show(e){this._el.innerHTML="";let i=!!this._app.selHasInst,o=!!this._app.selHasNet,r=!(i||o),l=w=>mu.map(b=>({label:b.label,disabled:b.needsNet?!o:!i,...w(b.suffix,b.args||{})})),h=[{label:"Select",disabled:r,subMenu:l((w,b)=>({action:()=>this._sendContextAction("select_"+w,b)}))},{label:"Highlight",disabled:r,subMenu:l((w,b)=>({subMenu:this._buildColorSubmenu("highlight_"+w,b)}))},{label:"Save",subMenu:[{label:"Visible layout",action:()=>this._app.captureLayout?.({entire:!1})},{label:"Entire layout",action:()=>this._app.captureLayout?.({entire:!0})}]},{label:"Clear",subMenu:[{label:"Selections",action:()=>this._sendContextAction("clear_selections")},{label:"Highlights",action:()=>this._sendContextAction("clear_highlights")},{label:"Rulers",action:()=>{this._app.rulerManager?.clearAllRulers()}},{label:"Focus nets",action:()=>this._sendContextAction("clear_focus_nets")},{label:"Route Guides",action:()=>this._sendContextAction("clear_route_guides")},{label:"All",action:()=>{this._sendContextAction("clear_all"),this._app.rulerManager?.clearAllRulers()}}]}];this._buildMenu(h,this._el),this._el.style.display="block";let u=4,f=this._el.getBoundingClientRect(),_=window.innerWidth-f.width-u,y=window.innerHeight-f.height-u,g=Math.max(u,Math.min(e.originalEvent.clientX,_)),v=Math.max(u,Math.min(e.originalEvent.clientY,y));this._el.style.left=g+"px",this._el.style.top=v+"px"}hide(){this._el.style.display="none"}_buildColorSubmenu(e,i={}){return fu.map(({name:o,hex:r},l)=>({label:o,swatch:r,action:()=>this._sendContextAction(e,{...i,group:l})}))}_buildMenu(e,i){e.forEach(o=>{let r=document.createElement("div");if(r.className="cm-item",o.swatch){let l=document.createElement("span");l.className="cm-swatch",l.style.background=o.swatch,r.appendChild(l)}if(r.appendChild(document.createTextNode(o.label)),o.disabled){r.classList.add("disabled"),o.subMenu&&r.classList.add("has-submenu"),i.appendChild(r);return}if(o.subMenu){r.classList.add("has-submenu");let l=document.createElement("div");l.className="cm-submenu",this._buildMenu(o.subMenu,l),r.appendChild(l),r.addEventListener("mouseenter",()=>{l.classList.remove("flip-left"),l.getBoundingClientRect().right>window.innerWidth&&l.classList.add("flip-left")})}else o.action&&r.addEventListener("click",l=>{l.stopPropagation(),this.hide();try{o.action()}catch(h){console.error("Context menu item action threw:",o.label,h)}});i.appendChild(r)})}_sendContextAction(e,i={}){this._app.websocketManager&&this._app.websocketManager.request({type:"context_action",action:e,...i}).then(o=>{qi(this._app,o),o&&o.connected_count===0&&ke('Nothing connected \u2014 select an instance (or a net for "Connected Insts") first.'),this._syncAfterAction(e)}).catch(o=>{console.error("Context action failed:",e,o)})}_syncAfterAction(e){let i=this._app;(e==="clear_focus_nets"||e==="clear_route_guides"||e==="clear_all")&&typeof i.redrawAllLayers=="function"&&i.redrawAllLayers(),e==="clear_selections"||e==="clear_all"?(i.updateInspector?.(null),i.stopSelectionAnimation?.(),i.highlightRect&&i.map&&(i.map.removeLayer(i.highlightRect),i.highlightRect=null),i.lastSelectionBounds=null):i.refreshInspector?.(),i.refreshOverlay?.()}};function sc(s,e){if(!s)return;let i=URL.createObjectURL(s),o=document.createElement("a");o.href=i,o.download=e,o.style.display="none",document.body.appendChild(o),o.click(),document.body.removeChild(o),setTimeout(()=>URL.revokeObjectURL(i),0)}function rc(s){return s.options&&s.options.opacity!=null?s.options.opacity:1}function ac(s,e,i){if(!e||e.tagName==="IMG"&&(!e.complete||!e.naturalWidth))return;let o=e.getBoundingClientRect();if(!(o.width<=0||o.height<=0))try{s.drawImage(e,o.left-i.left,o.top-i.top,o.width,o.height)}catch{}}function _u(s,e,i){let o=[];s.map.eachLayer(r=>{r instanceof L.GridLayer&&r._tiles&&o.push(r)}),o.sort((r,l)=>(r.options&&r.options.zIndex||0)-(l.options&&l.options.zIndex||0));for(let r of o){let l=rc(r);if(!(l<=0)){e.globalAlpha=l;for(let h of Object.keys(r._tiles)){let u=r._tiles[h];!u||!u.current||ac(e,u.el,i)}}}e.globalAlpha=1}function gu(s,e,i){let o=s.map.getContainer().querySelectorAll(".leaflet-pane svg"),r=[];return o.forEach(l=>{let h=l.getBoundingClientRect();if(h.width<=0||h.height<=0)return;let u=l.cloneNode(!0);u.setAttribute("width",h.width),u.setAttribute("height",h.height);let f=new XMLSerializer().serializeToString(u),_="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(f);r.push(new Promise(y=>{let g=new Image;g.onload=()=>{try{e.drawImage(g,h.left-i.left,h.top-i.top,h.width,h.height)}catch{}y()},g.onerror=()=>y(),g.src=_}))}),Promise.all(r)}function yu(s,e,i){s.map.getContainer().querySelectorAll(".leaflet-pane .ruler-label").forEach(r=>{let l=r.getBoundingClientRect();if(l.width<=0||l.height<=0)return;let h=r.textContent;if(!h)return;let u=getComputedStyle(r),f=l.left-i.left,_=l.top-i.top;e.save(),e.fillStyle=u.backgroundColor||"rgba(0, 0, 0, 0.75)";let y=Math.min(parseFloat(u.borderTopLeftRadius)||0,l.height/2);y>0&&typeof e.roundRect=="function"?(e.beginPath(),e.roundRect(f,_,l.width,l.height,y),e.fill()):e.fillRect(f,_,l.width,l.height),e.fillStyle=u.color||"#eee",e.font=u.font||`${u.fontSize||"12px"} ${u.fontFamily||"monospace"}`,e.textAlign="left",e.textBaseline="middle",e.fillText(h,f+(parseFloat(u.paddingLeft)||0),_+l.height/2),e.restore()})}function vu(s){let e=0;return s.map.eachLayer(i=>{if(!(!(i instanceof L.GridLayer)||!i._tiles)){i._loading&&e++;for(let o of Object.keys(i._tiles)){let r=i._tiles[o],l=r&&r.el;r&&r.current&&l&&l.tagName==="IMG"&&(!l.complete||!l.naturalWidth)&&e++}}}),e}function bu(s,e=6e3,i=32){return new Promise(o=>{let r=Date.now()+e,l=0,h=()=>{if(vu(s)===0){if(++l>=2){o();return}}else l=0;if(Date.now()>=r){o();return}setTimeout(h,i)};setTimeout(h,i)})}function wu(s,e,i){s.map.eachLayer(o=>{if(!(o instanceof L.ImageOverlay))return;let r=rc(o);r<=0||(e.globalAlpha=r,ac(e,o._image,i),e.globalAlpha=1)})}async function oc(s){let e=s.map.getContainer(),i=e.getBoundingClientRect(),o=Math.max(1,Math.round(i.width)),r=Math.max(1,Math.round(i.height)),l=document.createElement("canvas");l.width=o,l.height=r;let h=l.getContext("2d"),u=getComputedStyle(e).backgroundColor;return h.fillStyle=u&&u!=="transparent"&&u!=="rgba(0, 0, 0, 0)"?u:"#000",h.fillRect(0,0,o,r),_u(s,h,i),wu(s,h,i),await gu(s,h,i),yu(s,h,i),new Promise(f=>l.toBlob(f,"image/png"))}async function lc(s,{entire:e=!1}={}){if(!s.map)return;if(!e||!s.fitBounds){sc(await oc(s),"layout_visible.png");return}let i=s.map.getCenter(),o=s.map.getZoom();try{s.map.fitBounds(s.fitBounds,{animate:!1}),await bu(s),sc(await oc(s),"layout_entire.png")}finally{s.map.setView(i,o,{animate:!1})}}var Li=document.getElementById("websocket-status"),Tn=null,xu=2e3,Cu=20;function tr(){let s=p.websocketManager&&p.websocketManager.isConnected,e=p.websocketManager?p.websocketManager.pendingCount:0;if(s)Tn&&(clearTimeout(Tn),Tn=null),e>Cu?(Li.innerHTML=`
pending: ${e}
`,Li.style.display="block"):Li.style.display="none";else{if(p.websocketManager?._shutdown)return;Tn||(Tn=setTimeout(()=>{p.websocketManager?.isConnected||(Li.innerHTML='
\u26A0 OpenROAD disconnected \u2014 retrying\u2026
',Li.style.display="block")},xu))}ku(e)}function ku(s){let e=p.tileProgressEl;e&&(e.classList.toggle("active",s>0),e.title=s>0?`${s} tile requests pending`:"")}function Lu(s){if(!s)return"";try{return decodeURIComponent(s)}catch{return""}}var p={map:null,fitBounds:null,lastSelectionBounds:null,selHasInst:!1,selHasNet:!1,displayControlsEl:null,allLayers:[],designScale:null,designMaxDXDY:null,designOriginX:0,designOriginY:0,websocketManager:null,goldenLayout:null,hasLiberty:!1,techData:null,inspectorEl:null,tclOutputEl:null,highlightRect:null,hoverHighlightLayer:null,hoverHighlightPane:"hover-highlight-pane",modulesLayer:null,pinsLayer:null,overlayLayers:[],hierarchyBrowser:null,focusNets:new Set,routeGuideNets:new Set,visibleLayers:new Set,visibleLayerNames:new Set,visibleChiplets:null,layerPatterns:{},useTrueZ:Vt("or_use_true_z")==="1",showDbu:Vt("or_show_dbu")==="1",rulerStyle:Vt("or_ruler_style")==="manhattan"?"manhattan":"euclidian",wheelZoom:Vt("or_wheel_zoom")!=="0",arrowStep:Wi(Vt("or_arrow_step")),fontFamily:Lu(Vt("or_font_family")),fontScale:Ln(Vt("or_font_scale")),polyDecomp:!1,labelManager:null,selectableLayers:new Set,heatMapData:null,activeHeatMap:"",heatMapLayer:null,heatMapLegendEl:null,renderHeatMapControls:null,rulerManager:null,selectionToken:0,selectionResetters:[],getDbuPerMicron(){return this.techData?.dbu_per_micron||1e3},unitOpts(){return{showDbu:this.showDbu,dbuPerMicron:this.getDbuPerMicron()}},formatDbu(s,e=!1){return Ua(s,this.unitOpts(),e)},parseDbu(s){return Ga(s,this.unitOpts())},formatDistance(s){return Va(s,this.unitOpts())},unitLabel(){return Ya(this.unitOpts())}},te={stdcells:!0,macros:!0,pad_input:!0,pad_output:!0,pad_inout:!0,pad_power:!0,pad_spacer:!0,pad_areaio:!0,pad_other:!0,phys_fill:!1,phys_endcap:!0,phys_welltap:!0,phys_tie:!0,phys_antenna:!0,phys_cover:!0,phys_bump:!0,phys_other:!0,std_bufinv:!0,std_bufinv_timing:!0,std_clock_bufinv:!0,std_clock_gate:!0,std_level_shift:!0,std_sequential:!0,std_combinational:!0,net_signal:!0,net_power:!0,net_ground:!0,net_clock:!0,net_reset:!0,net_tieoff:!0,net_scan:!0,net_analog:!0,inst_names:!0,inst_pins:!0,inst_pin_names:!1,routing:!0,routing_segments:!0,routing_vias:!0,special_nets:!0,srouting_segments:!0,srouting_vias:!0,pins:!0,pin_names:!0,access_points:!1,regions:!0,mfg_grid:!1,gcell_grid:!1,flywires_only:!1,blockages:!0,placement_blockages:!0,routing_obstructions:!0,fills:!1,rows:!1,tracks_pref:!1,tracks_non_pref:!1,module_view:!1,detailed:!1,rulers:!0,labels:!0,scale_bar:!0,focused_nets_guides:!1,highlight_selected:!0,debug:!1};try{let s=Vt("or_visibility");if(s){let e=JSON.parse(decodeURIComponent(s));for(let[i,o]of Object.entries(e))te[i]=!!o}}catch{}var Si={stdcells:!0,macros:!0,pad_input:!0,pad_output:!0,pad_inout:!0,pad_power:!0,pad_spacer:!0,pad_areaio:!0,pad_other:!0,phys_fill:!0,phys_endcap:!0,phys_welltap:!0,phys_tie:!0,phys_antenna:!0,phys_cover:!0,phys_bump:!0,phys_other:!0,std_bufinv:!0,std_bufinv_timing:!0,std_clock_bufinv:!0,std_clock_gate:!0,std_level_shift:!0,std_sequential:!0,std_combinational:!0,net_signal:!0,net_power:!0,net_ground:!0,net_clock:!0,net_reset:!0,net_tieoff:!0,net_scan:!0,net_analog:!0,pins:!0,inst_pins:!0,placement_blockages:!0,routing_obstructions:!0};p.visibility=te;p.selectability=Si;try{let s=Vt("or_selectability");if(s){let e=JSON.parse(decodeURIComponent(s));for(let[i,o]of Object.entries(e))Si[i]=!!o}}catch{}var Su=il(te,p.visibleLayerNames,Si,p.selectableLayers,p);(function(){let e=null;try{e=new URLSearchParams(window.location.search)}catch{e=null}let i=l=>e?e.get(l):null;p.mergeTiles=i("mergetiles")!=="0";let o=Number(i("tilebudget"));Number.isFinite(o)&&o>0&&(p.tileBudgetBytes=Math.round(o*1024*1024));let r=Number(i("mergegroups"));Number.isFinite(r)&&r>0&&(p.mergeGroupCount=Math.floor(r)),p.tileDpr=gi,p.MergedTileLayer=ul({visibility:te,selectability:Si,visibleLayers:p.visibleLayerNames,selectableLayers:p.selectableLayers,app:p},{dpr:gi})})();var Mu=L.GridLayer.extend({initialize:function(s,e,i){this._websocketManager=s,this._appState=e,L.GridLayer.prototype.initialize.call(this,pi(i))},_clampZoom:function(s){return L.GridLayer.prototype._clampZoom.call(this,Zi(this,s))},createTile:function(s,e){let i=document.createElement("img");i.alt="",i.setAttribute("role","presentation"),i._tileDone=!1,i.onload=()=>{i.src&&i.src.startsWith("blob:")&&URL.revokeObjectURL(i.src),i._tileDone||(i._tileDone=!0,e(null,i))},i.onerror=()=>{i._tileDone||(i._tileDone=!0,e(new Error("heat map tile load error"),i))};let o=this._appState.activeHeatMap;return o?(this._websocketManager.request({type:"heatmap_tile",name:o,z:s.z,x:s.x,y:s.y,...Fi(gi(),this.getTileSize().x)}).then(r=>{i.src=r?URL.createObjectURL(r):Ze}).catch(()=>{i.src=Ze}),i):(i.src=Ze,i)},refreshTiles:function(){if(this._map)for(let s in this._tiles){let e=this._tiles[s];if(!e||!e.el)continue;let i=e.el,o=e.coords,r=this._appState.activeHeatMap;if(!r){i.src&&i.src.startsWith("blob:")&&URL.revokeObjectURL(i.src),i.src=Ze;continue}this._websocketManager.request({type:"heatmap_tile",name:r,z:o.z,x:o.x,y:o.y,...Fi(gi(),this.getTileSize().x)}).then(l=>{i.src&&i.src.startsWith("blob:")&&URL.revokeObjectURL(i.src),i.src=l?URL.createObjectURL(l):Ze}).catch(()=>{i.src=Ze})}}});function ir(s){p.heatMapData=s,p.activeHeatMap=s.active||"",p.heatMapLayer&&(p.activeHeatMap?p.map.hasLayer(p.heatMapLayer)||p.heatMapLayer.addTo(p.map):p.map.hasLayer(p.heatMapLayer)&&p.map.removeLayer(p.heatMapLayer),p.heatMapLayer.refreshTiles()),p.renderHeatMapControls&&p.renderHeatMapControls(s)}p.updateHeatMaps=ir;function nr(){p.overlayLayer&&p.overlayLayer.refreshTiles()}var Mi=bn(()=>{nr(),p.selectionBrowser&&p.selectionBrowser.scheduleRefresh()});p.refreshOverlay=Mi;function pe(){Qt("or_visibility",encodeURIComponent(JSON.stringify(te))),Qt("or_selectability",encodeURIComponent(JSON.stringify(Si))),We();let s=[[p.modulesLayer,te.module_view],[p.pinsLayer,te.pins],...p.overlayLayers.map(({def:e,layer:i})=>[i,Es(e.shown_by,te)])];for(let[e,i]of s)e&&(i&&!p.map.hasLayer(e)?e.addTo(p.map):!i&&p.map.hasLayer(e)&&p.map.removeLayer(e));for(let e of p.allLayers)e.refreshTiles();if(p.heatMapLayer&&p.heatMapLayer.refreshTiles(),p.highlightRect){let e=te.highlight_selected!==!1;!e&&p.map.hasLayer(p.highlightRect)?p.map.removeLayer(p.highlightRect):e&&!p.map.hasLayer(p.highlightRect)&&p.highlightRect.addTo(p.map)}!te.highlight_selected&&p.clearSelectionPulse&&p.clearSelectionPulse(),nr(),p.rulerManager&&p.rulerManager.updateVisibility(),p.labelManager&&p.labelManager.updateVisibility(),p.updateScaleBar&&p.updateScaleBar()}var Ki=bn(pe),We=bn(()=>{!p.websocketManager||wt(p)||p.websocketManager.request({type:"set_display_state",state:Jl()}).catch(()=>{})});p.syncDisplayState=We;function Eu(s){if(!s||typeof s!="object")return;let e=s.entries;if(!(!e||typeof e!="object")){Ql(e);try{if(p.map&&typeof sessionStorage<"u"){let i=p.map.getCenter();sessionStorage.setItem("or_restore_view",JSON.stringify({lat:i.lat,lng:i.lng,zoom:p.map.getZoom()}))}}catch{}window.location.reload()}}p.redrawAllLayers=pe;p.captureLayout=(s={})=>lc(p,s);function Tu(s){let e=document.createElement("div");e.className="layout-viewer",e.style.width="100%",e.style.height="100%",e.style.backgroundColor="var(--bg-map)",s.element.appendChild(e);let i=document.createElement("div");i.className="or-hud or-hud-bottom-right heatmap-map-legend hidden",e.appendChild(i),p.heatMapLegendEl=i;let o=document.createElement("div");o.className="or-progress",e.appendChild(o),p.tileProgressEl=o,s.on("destroy",()=>{p.tileProgressEl=null,p.heatMapLegendEl=null}),p.map=L.map(e,Fa(void 0,{wheelZoom:p.wheelZoom,arrowStep:p.arrowStep})),wt(p)||Ka(p.map,()=>p.wheelZoom),yl(p.map),Ia(()=>pe());let r=p.map.createPane(p.hoverHighlightPane);r.style.zIndex="650",r.style.pointerEvents="none";let l=L.Control.extend({onAdd:function(){let P=L.DomUtil.create("div","leaflet-bar leaflet-control leaflet-control-fit"),T=L.DomUtil.create("a","",P);return T.href="#",T.title="Fit",T.setAttribute("role","button"),T.setAttribute("aria-label","Fit"),T.textContent="\u2922",L.DomEvent.on(T,"click",L.DomEvent.stop).on(T,"click",()=>{p.fitBounds&&p.map.fitBounds(p.fitBounds)}),P}});new l({position:"topleft"}).addTo(p.map),new ResizeObserver(()=>{p.map.invalidateSize({animate:!1})}).observe(e);let h=document.createElement("div");h.className="or-hud or-hud-bottom-left hidden";let u=document.createElement("div");u.id="scale-bar";let f=document.createElement("span");f.className="or-hud-divider";let _=document.createElement("div");_.id="coord-bar",h.appendChild(u),h.appendChild(f),h.appendChild(_),e.appendChild(h);function y(){let P=u.style.display!=="none"&&u.childElementCount>0,T=_.textContent!=="";f.style.display=P&&T?"":"none",h.classList.toggle("hidden",!P&&!T)}y(),p.map.on("mousemove",P=>{if(p.lastMouseLatLng=P.latlng,!p.designScale)return;let{dbuX:T,dbuY:Z}=xe(P.latlng.lat,P.latlng.lng,p.designScale,p.designMaxDXDY,p.designOriginX,p.designOriginY);_.textContent=`X: ${p.formatDbu(T)} Y: ${p.formatDbu(Z)}`,y()}),p.map.on("mouseout",P=>{let T=P.originalEvent&&P.originalEvent.relatedTarget;T&&e.contains(T)||(p.lastMouseLatLng=null,_.textContent="",y())});let g=22,v=8,w=22;function b(P,T,Z){let dt=2+v,gt=w,it=w+P,Q=g-2,nt=P>=40,tt=[];if(tt.push(``),nt&&Z>1)for(let Ct=1;Ct`)}nt&&tt.push(`0`),tt.push(`${T}`),u.innerHTML=`${tt.join("")}`}function C(){if(!p.designScale||!te.scale_bar){u.style.display="none",y();return}let P=p.designScale*Math.pow(2,p.map.getZoom()),T=p.map.getContainer().clientWidth||400,Z=ja({targetPx:T*.15,pxPerDbu:P,dbuPerMicron:p.techData?.dbu_per_micron,showDbu:p.showDbu});if(!Z){u.style.display="none",y();return}u.style.display="",b(Z.barPx,Z.label,Z.segments),y()}let B=bn(C);p.map.on("zoom zoomend resize",B),p.updateScaleBar=C,p.rulerManager=new Is(p,te,Pn,$s),p.labelManager=new Ns(p,te,Pn,$s)}function Pu(s){let e=document.createElement("div");e.className="display-controls",e.innerHTML='
Loading layers...
',s.element.appendChild(e),p.displayControlsEl=e}var er="or_restore_console",Au=1<<20;function Iu(){try{if(p.tclOutputEl){let s=[...p.tclOutputEl.children].map(r=>[r.textContent,r.className]),e=s.length,i=0;for(;e>0&&i+s[e-1][0].length<=Au;)i+=s[--e][0].length;let o=s.slice(e);e>0&&o.unshift([`[earlier output not kept across reload] -`,""]),sessionStorage.setItem(er,JSON.stringify(o))}}catch{}window.location.reload()}function Nu(){try{let s=sessionStorage.getItem(er);if(!s)return;sessionStorage.removeItem(er);for(let[e,i]of JSON.parse(s))ti(e,i)}catch{}}function ti(s,e){if(!p.tclOutputEl)return;let i=document.createElement("span");e&&(i.className=e),i.textContent=s,p.tclOutputEl.appendChild(i),p.tclOutputEl.scrollTop=p.tclOutputEl.scrollHeight}function Bu(){if(p._shutdownHandled)return;p._shutdownHandled=!0,p.websocketManager&&(p.websocketManager._shutdown=!0,p.websocketManager.onPush=()=>{});let s=document.createElement("div");s.style.cssText="position:fixed;inset:0;z-index:99999;background:#1e1e1e;color:#ddd;display:flex;flex-direction:column;align-items:center;justify-content:center;font-family:system-ui,sans-serif;font-size:16px;padding:24px;text-align:center;",s.innerHTML='
OpenROAD exited
You can close this tab.
',document.body.appendChild(s),setTimeout(()=>{try{window.close()}catch{}},1500)}function Du(s){let e=document.createElement("div");if(e.className="tcl-console",e.innerHTML='
%
',s.element.appendChild(e),p.tclOutputEl=e.querySelector(".tcl-output"),Nu(),wt(p)){e.querySelector(".tcl-input-row").style.display="none";let r=document.createElement("span");r.className="tcl-static-notice",r.setAttribute("role","status"),r.setAttribute("aria-live","polite"),r.textContent="Tcl console is not available in saved reports.",p.tclOutputEl.appendChild(r);return}let i=e.querySelector(".tcl-input"),o=new Rs(i,p.websocketManager);i.addEventListener("keydown",r=>{if(!o.handleKeyDown(r)&&r.key==="Enter"){let l=i.value.trim();if(!l)return;ti(`>>> ${l} -`,"tcl-cmd"),o.addToHistory(l),i.value="",p.websocketManager.request({type:"tcl_eval",cmd:l}).then(h=>{h.result&&ti(h.result+` -`,h.is_error?"tcl-error":""),h.action==="shutdown"&&Bu(),!h.is_error&&p.drcWidget&&p.drcWidget.refresh()}).catch(h=>ti(`Error: ${h} -`,"tcl-error"))}})}p.visibility=te;var ei=Pl(p,pe,Mi),Ru=ei.createInspector,Pn=ei.updateInspector,Ou=ei.highlightBBox,zu=ei.pulseHighlight;p.updateInspector=Pn;p.navigateInspector=ei.navigateInspector;p.refreshInspector=ei.refreshInspector;p.animateSelection=ei.animateSelection;p.stopSelectionAnimation=ei.stopSelectionAnimation;function Hu(s){new Cs(s,p,pe)}function $u(s){p.timingWidget=new vi(p,pe,Mi),s.element.appendChild(p.timingWidget.element)}function Fu(s){p.drcWidget=new Ds(p,pe,Mi),s.element.appendChild(p.drcWidget.element)}function Zu(s){p.clockTreeWidget=new ws(s,p,pe,Mi)}function qu(s){p.chartsWidget=new xs(p,pe),s.element.appendChild(p.chartsWidget.element)}function Wu(s){let e=document.createElement("div");e.className="help-panel",e.innerHTML="

Keyboard Shortcuts

fFit design to viewport
scrollZoom in/out
dragPan the view
right-dragRubber-band zoom
Shift+clickAdd object to selection
Ctrl/Cmd+clickSelect object and its connected nets
kToggle ruler mode
Shift+KClear all rulers
EscapeCancel ruler (when building)
",s.element.appendChild(e)}function Uu(s){p.selectionBrowser=new ks(s,p,Mi)}function Gu(s){new Bs(s,p)}function Vu(s){p.threeDViewerWidget=new zs(s,p)}var Yu=28,Xu={dimensions:{headerHeight:Yu},root:{type:"row",content:[{type:"component",componentType:"DisplayControls",title:"Display Controls",width:15},{type:"column",width:55,content:[{type:"stack",height:70,content:[{type:"component",componentType:"LayoutViewer",title:"Layout",isClosable:!1},{type:"component",componentType:"SchematicWidget",title:"Schematic"},{type:"component",componentType:"3DViewer",title:"3D Viewer"}]},{type:"component",componentType:"TclConsole",title:"Tcl Console",height:30}]},{type:"stack",width:30,content:[{type:"component",componentType:"Inspector",title:"Inspector"},{type:"component",componentType:"Browser",title:"Hierarchy"},{type:"component",componentType:"TimingWidget",title:"Timing"},{type:"component",componentType:"DRCWidget",title:"DRC"},{type:"component",componentType:"SelectHighlight",title:"Select Highlight"},{type:"component",componentType:"ClockWidget",title:"Clock Tree"},{type:"component",componentType:"ChartsWidget",title:"Charts"},{type:"component",componentType:"HelpWidget",title:"Help"}]}]}};p.goldenLayout=new ps(document.getElementById("gl-container"));p.goldenLayout.registerComponentFactoryFunction("LayoutViewer",Tu);p.goldenLayout.registerComponentFactoryFunction("DisplayControls",Pu);p.goldenLayout.registerComponentFactoryFunction("TclConsole",Du);p.goldenLayout.registerComponentFactoryFunction("Inspector",Ru);p.goldenLayout.registerComponentFactoryFunction("Browser",Hu);p.goldenLayout.registerComponentFactoryFunction("TimingWidget",$u);p.goldenLayout.registerComponentFactoryFunction("DRCWidget",Fu);p.goldenLayout.registerComponentFactoryFunction("ClockWidget",Zu);p.goldenLayout.registerComponentFactoryFunction("ChartsWidget",qu);p.goldenLayout.registerComponentFactoryFunction("SchematicWidget",Gu);p.goldenLayout.registerComponentFactoryFunction("3DViewer",Vu);p.goldenLayout.registerComponentFactoryFunction("HelpWidget",Wu);p.goldenLayout.registerComponentFactoryFunction("SelectHighlight",Uu);var Be=window.__STATIC_CACHE__||null;if(Be)Pa(),p.websocketManager=Cn.fromCache(Be,tr);else{let s=Ra(window.location);p.websocketManager=new Cn(s,tr),p.layerExtents=new fs,p.websocketManager.onReconnected=()=>{Fs(),rr(null,null,{reloadOnChange:!0}).catch(()=>{})}}tr();p.goldenLayout.loadLayout(Xu);function sr(){p.goldenLayout.updateSize()}p.syncLayoutSize=sr;window.addEventListener("resize",sr);function $s(s,e){p.goldenLayout.focusComponent(s,e)}p.focusComponent=$s;p.resetLayout=function(){p.goldenLayout&&typeof p.goldenLayout.resetLayout=="function"&&p.goldenLayout.resetLayout()};p.toggleTheme=function(){let s=document.documentElement.dataset.theme==="dark"?"light":"dark";document.documentElement.dataset.theme=s,Zo(s),gs(s),p.chartsWidget&&p.chartsWidget.render(),p.clockTreeWidget&&p.clockTreeWidget.render(),We()};p.toggleShowDbu=function(){p.showDbu=!p.showDbu,Qt("or_show_dbu",p.showDbu?"1":"0"),p.rulerManager&&p.rulerManager._rerenderAll(),p.hierarchyBrowser&&p.hierarchyBrowser._render(),p.updateScaleBar&&p.updateScaleBar(),p.refreshInspector&&p.refreshInspector(),We()};p.toggleRulerStyle=function(){p.rulerStyle=p.rulerStyle==="manhattan"?"euclidian":"manhattan",Qt("or_ruler_style",p.rulerStyle),We()};p.toggleWheelZoom=function(){p.wheelZoom=!p.wheelZoom,Qt("or_wheel_zoom",p.wheelZoom?"1":"0"),We()};p.setArrowStep=function(s){p.arrowStep=Wi(s),Qt("or_arrow_step",String(p.arrowStep)),Za(p.map,p.arrowStep),We()};p.setAppFont=function({family:s,scale:e}){p.fontFamily=s??p.fontFamily,p.fontScale=Ln(e??p.fontScale),Qt("or_font_family",encodeURIComponent(p.fontFamily)),Qt("or_font_scale",String(p.fontScale)),p.applyAppFont(),We()};p.applyAppFont=function(){let s=document.documentElement;p.fontFamily?s.style.setProperty("--or-font-family",p.fontFamily):s.style.removeProperty("--or-font-family"),s.style.setProperty("--or-font-scale",String(p.fontScale/100)),p.chartsWidget&&p.chartsWidget.render(),p.clockTreeWidget&&p.clockTreeWidget.render()};p.showArrowStepDialog=()=>Nl(p);p.showAppFontDialog=()=>Bl(p);p.togglePolyDecomp=function(){p.websocketManager&&p.websocketManager.request({type:"poly_decomp",value:!p.polyDecomp}).then(s=>or(s.value)).catch(()=>{})};function or(s){p.polyDecomp=!!s,p.rebuildMenuBar&&p.rebuildMenuBar(),p.refreshOverlay&&p.refreshOverlay()}p.applyAppFont();p.echoTcl=s=>ti(`>>> ${s} -`,"tcl-cmd");p.runTclScript=(s,e)=>s?(e&&p.echoTcl(s),p.websocketManager.request({type:"tcl_eval",cmd:s}).then(i=>(i&&i.result&&ti(i.result+` -`,i.is_error?"tcl-error":""),i)).catch(i=>{ti(`Error: ${i} -`,"tcl-error")})):Promise.resolve();function cc(s){s&&(p.customMenu=s.menu||[],p.customToolbar=s.toolbar||[],p.rebuildMenuBar&&p.rebuildMenuBar(),p.rebuildToolbar&&p.rebuildToolbar(),sr())}p.customMenu=[];p.customToolbar=[];p.scheduleRedrawAllLayers=Ki;p.showGlobalConnectDialog=()=>Ul(p);p.showInsertBufferDialog=s=>Gl(p,s);Fl(p);Zl(p);p.contextMenu=new Hs(p);function ju(){let s=document.getElementById("debug-continue-btn");return s||(s=document.createElement("button"),s.id="debug-continue-btn",s.className="debug-continue-btn",s.textContent="Continue",s.title="Advance the debugger (gpl, cts, ...)",s.addEventListener("click",()=>{p.websocketManager.request({type:"debug_continue"}).catch(()=>{})}),(document.getElementById("menu-bar")||document.body).appendChild(s),s)}function hc(s,e){let i=Po(s,Ce(),e);return i?(p.currentBounds=s,p.designScale=i.scale,p.designMaxDXDY=i.maxDXDY,p.designOriginX=i.originX,p.designOriginY=i.originY,p.fitBounds=i.fitBounds,p.map.setMaxZoom(qa(i.scale)),!0):!1}async function rr(s,e,{reloadOnChange:i=!1}={}){if(wt(p)||!p.map)return!1;let o=s,r=e;if(!o)try{let u=await p.websocketManager.request({type:"bounds"});o=u.bounds,r=u.fit_bounds}catch{return!1}if(!o||Ha(p.currentBounds,o))return!1;if(i)return window.location.reload(),!0;let h=!!p.designScale?xe(p.map.getCenter().lat,p.map.getCenter().lng,p.designScale,p.designMaxDXDY,p.designOriginX,p.designOriginY):null;if(!hc(o,r))return!1;if(h){let u=Jt(h.dbuX,h.dbuY,p.designScale,p.designMaxDXDY,p.designOriginX,p.designOriginY);p.map.setView(u,p.map.getZoom(),{animate:!1})}return p.highlightRect&&(p.map.removeLayer(p.highlightRect),p.highlightRect=null),pe(),!0}function Ku(){let s=document.getElementById("loading-overlay");s.style.display="flex";let e=()=>{s.style.display!=="none"&&p.websocketManager.request({type:"bounds"}).then(i=>{i.shapes_ready&&(s.style.display="none")}).catch(()=>{}).finally(()=>{s.style.display!=="none"&&setTimeout(e,1e3)})};setTimeout(e,1e3)}function Fs(){p.layerExtents&&p.layerExtents.refetch(s=>p.websocketManager.request(s))}function Ju(s){document.getElementById("loading-overlay").style.display="none",Fs(),rr(s.bounds,s.fit_bounds).then(e=>{e||pe()}).catch(()=>pe()),p.refreshInspector&&p.refreshInspector()}function Qu(){let s=document.getElementById("script-running-badge");return s||(s=document.createElement("span"),s.id="script-running-badge",s.className="script-running-badge",s.textContent="Script running",s.title="The view updates when the script pauses or finishes",(document.getElementById("menu-bar")||document.body).appendChild(s),s)}function tp(s){if(p.scriptRunning=s,Qu().style.display=s?"block":"none",!s){if(!p.booted||!p.designScale){Iu();return}p.refreshPending&&(p.refreshPending=!1,Fs(),p.refreshInspector&&p.refreshInspector()),rr().then(e=>{e||Ki()}).catch(()=>Ki())}}p.websocketManager.onPush=s=>{if(s.type==="refresh"){if(p.scriptRunning){p.refreshPending=!0;return}Ju(s)}else if(s.type==="script_running")tp(!!s.running);else if(s.type==="renderer_controls_changed")p.refreshRendererControls&&p.refreshRendererControls(),Ki();else if(s.type==="selection_invalidated")p.updateInspector&&p.updateInspector(null),p.stopSelectionAnimation&&p.stopSelectionAnimation(),p.highlightRect&&p.map&&(p.map.removeLayer(p.highlightRect),p.highlightRect=null),Mi();else if(s.type==="heatmaps_changed")p.websocketManager.request({type:"heatmaps"}).then(ir).catch(e=>console.error("Heat map refresh failed",e));else if(s.type==="labels_changed")p.labelManager&&p.labelManager.applyRemoteLabels(s.labels);else if(s.type==="drcUpdated")p._drcUpdateTimeout&&clearTimeout(p._drcUpdateTimeout),p._drcUpdateTimeout=setTimeout(()=>{p.drcWidget&&p.drcWidget.refresh()},500);else if(s.type==="debug_paused")p.refreshRendererControls&&p.refreshRendererControls(),ju().style.display="block",Ki(),p.chartsWidget&&p.websocketManager.request({type:"debug_charts"}).then(e=>p.chartsWidget.setDebugCharts(e.charts||[])).catch(()=>{});else if(s.type==="debug_resumed"){let e=document.getElementById("debug-continue-btn");e&&(e.style.display="none")}else if(s.type==="debug_refresh"){if(p.scriptRunning)return;p.highlightRect&&(p.map.removeLayer(p.highlightRect),p.highlightRect=null),Ki()}else if(s.type==="log"){let e=s.text;e.endsWith(` -`)&&(e=e.slice(0,-1)),e&&ti(e+` -`,"")}else s.type==="restore_display_state"?Eu(s.state):s.type==="custom_ui"?cc(s):s.type==="poly_decomp"?or(s.value):s.type==="shutdown"&&(p.websocketManager._shutdown=!0,Li.innerHTML='
Server stopped
',Li.style.display="block")};p.websocketManager.readyPromise.then(async()=>{try{let h=function(u,f={}){let{addToSelection:_=!1,focusInspector:y=!0,context:g=!1,showConnectivity:v=!1}=f;if(!p.designScale)return Promise.resolve(null);let{dbuX:w,dbuY:b}=xe(u.lat,u.lng,p.designScale,p.designMaxDXDY,p.designOriginX,p.designOriginY);if(p.labelManager&&p.labelManager.isActive()){p.labelManager.handleMapClick(w,b);return}let C=Oa(te,Si),B={type:"select",dbu_x:w,dbu_y:b,zoom:Math.round(p.map.getZoom()),visible_layers:[...p.visibleLayerNames],selectable_layers:[...p.selectableLayers],use_dbu:p.showDbu,...C};_&&(B.add_to_selection=!0),g&&(B.context=!0),v&&(B.show_connectivity=!0),p.visibleChiplets instanceof Set&&(B.visible_chiplets=[...p.visibleChiplets]);let P=ae(p);return p.websocketManager.request(B).then(T=>{if(he(p,P)){if(console.log("Select response:",T,"at dbu",w,b),p.map.closePopup(),qi(p,T),T.selected&&T.selected.length>0){let Z=T.selected[0];Z.type==="Inst"&&(p.selectedInstanceName=Z.name,p.schematicWidget&&p.schematicWidget.refresh()),Pn(T),y&&$s("Inspector"),T.bbox&&(Ou(T.bbox[0],T.bbox[1],T.bbox[2],T.bbox[3],T.type),zu(T.bbox,T.type),p.lastSelectionBounds=Gt(T.bbox[0],T.bbox[1],T.bbox[2],T.bbox[3],p.designScale,p.designMaxDXDY,p.designOriginX,p.designOriginY)),B.show_connectivity&&T.connected_added>0&&ke(`Selected ${T.connected_added} connected net`+(T.connected_added>1?"s":""))}else!_&&!g&&(Pn(null),p.highlightRect&&(p.map.removeLayer(p.highlightRect),p.highlightRect=null),p.lastSelectionBounds=null);return nr(),T}}).catch(T=>(console.error("Select failed:",T),null))},[s,e,i]=await Promise.all([p.websocketManager.request({type:"tech"}),p.websocketManager.request({type:"bounds"}),p.websocketManager.request({type:"heatmaps"})]);Fs(),p.hasLiberty=s.has_liberty,p.techData=s,tc(s.block_name),p.websocketManager.request({type:"custom_ui"}).then(cc).catch(()=>{}),p.websocketManager.request({type:"poly_decomp"}).then(u=>or(u.value)).catch(()=>{});let o=e.bounds,r=e.fit_bounds;if(!Be){let u=p.map.getSize();Aa(Wa({designBounds:o,fitRect:r,viewW:u.x,viewH:u.y}))}let l=hc(o,r);if(l){if(p.labelManager&&p.labelManager.reload(),p.map.fitBounds(p.fitBounds),Be){let u=Be.zoom;p.map.setMinZoom(u),p.map.setMaxZoom(u),p.map.fitBounds(p.fitBounds),p.map.scrollWheelZoom.disable(),p.map.touchZoom.disable(),p.map.boxZoom.disable(),p.map.doubleClickZoom.disable(),p.pathOverlay=L.imageOverlay("",Gt(o[0][1],o[0][0],o[1][1],o[1][0],p.designScale,p.designMaxDXDY,p.designOriginX,p.designOriginY),{opacity:1,interactive:!1,zIndex:1e3}),Be.setPathOverlay=f=>{f?(p.pathOverlay.setUrl(f),p.pathOverlay.addTo(p.map)):p.map.removeLayer(p.pathOverlay)}}try{let u=sessionStorage.getItem("or_restore_view");if(u){sessionStorage.removeItem("or_restore_view");let f=JSON.parse(u);f&&isFinite(f.lat)&&isFinite(f.lng)&&isFinite(f.zoom)&&p.map.setView([f.lat,f.lng],f.zoom)}}catch{}}if(Be&&(document.getElementById("loading-overlay").style.display="none"),p.selectAtLatLng=h,Be||p.map.on("click",u=>{if(p.rulerManager&&p.rulerManager.isActive())return;let f=u.originalEvent;h(u.latlng,{addToSelection:!!(f&&f.shiftKey),showConnectivity:!!(f&&(f.ctrlKey||f.metaKey))})}),!Be){let u=p.map.getContainer(),f=null,_=null;u.addEventListener("contextmenu",y=>{y.preventDefault()}),u.addEventListener("mousedown",y=>{y.button===2&&(f={x:y.clientX,y:y.clientY},p.map.dragging.disable())}),window.addEventListener("mousemove",y=>{if(!f)return;let g=y.clientX-f.x,v=y.clientY-f.y;if(!_&&Math.abs(g)>=4&&Math.abs(v)>=4&&(_=document.createElement("div"),_.className="rubber-band",document.body.appendChild(_)),_){let w=Math.min(f.x,y.clientX),b=Math.min(f.y,y.clientY);_.style.left=w+"px",_.style.top=b+"px",_.style.width=Math.abs(g)+"px",_.style.height=Math.abs(v)+"px"}}),window.addEventListener("mouseup",y=>{if(!f)return;let g=!!_;_&&(_.remove(),_=null);let v=f;f=null,p.map.dragging.enable();let w=u.getBoundingClientRect();if(g){let B=p.map.containerPointToLatLng([v.x-w.left,v.y-w.top]),P=p.map.containerPointToLatLng([y.clientX-w.left,y.clientY-w.top]);p.map.fitBounds([[Math.min(B.lat,P.lat),Math.min(B.lng,P.lng)],[Math.max(B.lat,P.lat),Math.max(B.lng,P.lng)]]);return}if(!(y.clientX>=w.left&&y.clientX<=w.right&&y.clientY>=w.top&&y.clientY<=w.bottom)||p.rulerManager&&p.rulerManager.isActive())return;let C=p.map.containerPointToLatLng([y.clientX-w.left,y.clientY-w.top]);p.selectAtLatLng(C,{context:!0,focusInspector:!1}).then(()=>p.contextMenu.show({originalEvent:y}))})}if(Ol(p,te,Si,Su,s,pe,Mu),!p.overlayLayer&&!Be){let u=nl(te,p);p.overlayLayer=new u(p.websocketManager,{zIndex:p.allLayers.length+5,opacity:1}),p.overlayLayer.addTo(p.map)}ir(i),l&&!e.shapes_ready&&Ku(),We(),p.booted=!0}catch(s){p.scriptRunning||console.error("Failed to load initial data from server:",s)}});document.addEventListener("openroad-cone-sync",s=>{p.schematicWidget?.syncCone(s.detail||{})});document.addEventListener("keydown",s=>{let e=s.target.tagName;if(e==="INPUT"||e==="TEXTAREA"||s.target.isContentEditable)return;let i=s.key.toLowerCase();i==="escape"&&p.rulerManager&&p.rulerManager.isActive()?p.rulerManager.cancelRulerBuild():i==="escape"&&p.labelManager&&p.labelManager.isActive()?p.labelManager.cancelLabelMode():i==="k"&&!s.shiftKey&&!s.ctrlKey&&!s.metaKey?p.rulerManager&&p.rulerManager.toggleRulerMode():i==="k"&&s.shiftKey&&!s.ctrlKey&&!s.metaKey?p.rulerManager&&p.rulerManager.clearAllRulers():i==="l"&&!s.shiftKey&&!s.ctrlKey&&!s.metaKey?p.labelManager&&p.labelManager.toggleLabelMode():i==="f"&&!s.ctrlKey&&!s.metaKey&&p.fitBounds?p.map.fitBounds(p.fitBounds):i==="z"&&!s.shiftKey&&!s.ctrlKey&&p.map?p.lastMouseLatLng?p.map.setZoomAround(p.lastMouseLatLng,p.map.getZoom()+1):p.map.zoomIn():i==="z"&&s.shiftKey&&!s.ctrlKey&&p.map?p.lastMouseLatLng?p.map.setZoomAround(p.lastMouseLatLng,p.map.getZoom()-1):p.map.zoomOut():i==="f"&&(s.ctrlKey||s.metaKey)?(s.preventDefault(),p.designScale&&Ts(p)):i==="g"&&s.shiftKey&&!s.ctrlKey&&!s.metaKey?(s.preventDefault(),p.designScale&&Ps(p)):i==="t"&&!s.shiftKey&&!s.ctrlKey&&!s.metaKey&&p.toggleTheme()},!0);})(); + `,document.body.appendChild(this._overlay),this._breadcrumb=this._overlay.querySelector(".fb-breadcrumb"),this._fileList=this._overlay.querySelector(".fb-file-list"),this._pathInput=this._overlay.querySelector(".fb-path-input"),this._errorDiv=this._overlay.querySelector(".modal-error"),this._okBtn=this._overlay.querySelector(".ok"),this._cancelBtn=this._overlay.querySelector(".cancel"),this._listen(this._pathInput,"input",()=>this._updateOkState()),this._listen(this._pathInput,"keydown",t=>{if(t.key==="Enter"){let i=this._pathInput.value.trim();i.endsWith("/")?this._navigate(i.replace(/\/+$/,"")||"/"):this._submit()}else t.key==="Escape"&&this.close()}),this._listen(this._okBtn,"click",()=>this._submit()),this._listen(this._cancelBtn,"click",()=>this.close()),this._listen(this._overlay,"click",t=>{t.target===this._overlay&&this.close()}),this._navigate("")}close(){if(!this._closed){this._closed=!0;for(let t of this._disposers)t();this._disposers.length=0,this._overlay&&(this._overlay.remove(),this._overlay=null)}}_listen(t,i,o){t.addEventListener(i,o),this._disposers.push(()=>t.removeEventListener(i,o))}_updateOkState(){this._okBtn.disabled=!this._pathInput.value.trim()}_renderBreadcrumb(t){this._breadcrumb.innerHTML="";let i=t.split("/").filter(Boolean),o=document.createElement("span");o.className="fb-crumb",o.textContent="/",this._listen(o,"click",()=>this._navigate("/")),this._breadcrumb.appendChild(o);let r="";for(let l of i){r+="/"+l;let h=document.createElement("span");h.className="fb-crumb-sep",h.textContent=" / ",this._breadcrumb.appendChild(h);let u=document.createElement("span");u.className="fb-crumb",u.textContent=l;let f=r;this._listen(u,"click",()=>this._navigate(f)),this._breadcrumb.appendChild(u)}}_renderEntries(t){if(this._fileList.innerHTML="",!t||t.length===0){let i=document.createElement("div");i.className="fb-empty",i.textContent="(empty directory)",this._fileList.appendChild(i);return}for(let i of t){let o=document.createElement("div");o.className="fb-entry",i.is_dir&&o.classList.add("fb-dir");let r=document.createElement("span");r.className="fb-icon",r.textContent=i.is_dir?"\u{1F4C1}":"\u{1F4C4}",o.appendChild(r);let l=document.createElement("span");l.className="fb-name",l.textContent=i.name,o.appendChild(l),i.is_dir?this._listen(o,"click",()=>this._navigate(this._currentPath+"/"+i.name)):(this._listen(o,"click",()=>{let h=this._fileList.querySelector(".fb-selected");h&&h.classList.remove("fb-selected"),o.classList.add("fb-selected"),this._pathInput.value=this._currentPath+"/"+i.name,this._updateOkState()}),this._listen(o,"dblclick",()=>{this._pathInput.value=this._currentPath+"/"+i.name,this._updateOkState(),this._submit()})),this._fileList.appendChild(o)}}async _navigate(t){this._errorDiv.style.display="none",this._fileList.innerHTML='
Loading...
';try{let i=await this._app.websocketManager.request({type:"list_dir",path:t||""});if(this._closed)return;this._currentPath=i.path,this._renderBreadcrumb(i.path),this._renderEntries(i.entries),this._pathInput.value="",this._updateOkState()}catch(i){if(this._closed)return;this._fileList.innerHTML="",this._errorDiv.textContent=i.message||String(i),this._errorDiv.style.display=""}}async _submit(){let t=this._pathInput.value.trim();if(t){this._okBtn.disabled=!0,this._okBtn.textContent="Loading...",this._errorDiv.style.display="none";try{let i=await this._app.websocketManager.request({type:"drc_load_report",path:t});if(this._closed)return;if(i.ok){let o=i.category;this.close(),this._onLoaded(o)}else this._errorDiv.textContent=i.error||"Failed to load report",this._errorDiv.style.display="",this._okBtn.disabled=!1,this._okBtn.textContent="Load"}catch(i){if(this._closed)return;this._errorDiv.textContent=i.message||"Request failed",this._errorDiv.style.display="",this._okBtn.disabled=!1,this._okBtn.textContent="Load"}}}};var Kd=` +\r[]{}`;var zs=class{constructor(t,i){this._input=t,this._ws=i,this._popup=null,this._items=[],this._selectedIndex=-1,this._replaceStart=0,this._replaceEnd=0,this._debounceTimer=null,this._commandCache=null,this._history=[],this._historyIndex=-1,this._historyStash="",this._createPopup(),this._onInputBound=this._onInput.bind(this),this._onBlurBound=this._onBlur.bind(this),this._input.addEventListener("input",this._onInputBound),this._input.addEventListener("blur",this._onBlurBound)}_createPopup(){this._popup=document.createElement("div"),this._popup.className="tcl-complete-popup",this._popup.style.display="none",this._input.parentElement.appendChild(this._popup)}handleKeyDown(t){let i=this._popup.style.display!=="none";return t.key==="Tab"?(t.preventDefault(),i?this._tabAccept():this._tabComplete(this._input.value,this._input.selectionStart),!0):t.key==="Escape"?i?(this._hidePopup(),!0):!1:t.key==="ArrowDown"?i?(t.preventDefault(),this._selectItem(this._selectedIndex+1),!0):this._historyIndex>=0?(t.preventDefault(),this._historyIndex--,this._historyIndex<0?this._input.value=this._historyStash:this._input.value=this._history[this._historyIndex],!0):!1:t.key==="ArrowUp"?i?(t.preventDefault(),this._selectItem(this._selectedIndex-1),!0):this._historyIndex{let t=this._input.value,i=this._input.selectionStart,o=this._extractPrefix(t,i);o.length>=2||o.length>=1&&(o[0]==="$"||o[0]==="-")?this._requestCompletions(t,i):this._hidePopup()},100)}_onBlur(){setTimeout(()=>this._hidePopup(),150)}_extractPrefix(t,i){let o=i-1;for(;o>=0&&Kd.indexOf(t[o])===-1;)o--;return t.substring(o+1,i)}_fetchCompletions(t,i,o){let r=this._extractPrefix(t,i),l=r.length>0&&r[0]==="$",h=r.length>0&&r[0]==="-",u=!l&&!h,f=i-r.length,_=t.substring(0,f),g=/^[\s\[]*$/.test(_);if(u&&g&&this._commandCache){let y=r.toLowerCase(),v=this._commandCache.filter(w=>w.toLowerCase().startsWith(y));o(v,f,i);return}this._ws.request({type:"tcl_complete",line:t,cursor_pos:i}).then(y=>{y.mode==="commands"&&!this._commandCache&&r===""&&(this._commandCache=y.completions),y.mode==="commands"&&!this._commandCache&&this._ws.request({type:"tcl_complete",line:"",cursor_pos:0}).then(v=>{v.mode==="commands"&&(this._commandCache=v.completions)}).catch(()=>{}),o(y.completions,y.replace_start,y.replace_end)}).catch(()=>o([],0,0))}_requestCompletions(t,i){this._fetchCompletions(t,i,(o,r,l)=>{this._showPopup(o,r,l)})}_tabAccept(){if(this._items.length===0){this._hidePopup();return}if(this._items.length===1){this._selectedIndex=0,this._acceptCompletion();return}this._advanceToCommonPrefix()}_tabComplete(t,i){this._fetchCompletions(t,i,(o,r,l)=>{if(!o||o.length===0){this._hidePopup();return}if(o.length===1){this._items=o,this._replaceStart=r,this._replaceEnd=l,this._selectedIndex=0,this._acceptCompletion();return}this._items=o,this._replaceStart=r,this._replaceEnd=l,this._advanceToCommonPrefix(),this._showPopup(o,this._replaceStart,this._replaceEnd)})}_advanceToCommonPrefix(){if(this._items.length<2)return!1;let t=this._items[0];for(let h=1;h0;h++){let u=this._items[h],f=0;for(;f{let f=document.createElement("div");f.className="tcl-complete-item",f.textContent=h,f.addEventListener("mousedown",_=>{_.preventDefault(),this._selectedIndex=u,this._acceptCompletion()}),this._popup.appendChild(f)}),t.length>15){let h=document.createElement("div");h.className="tcl-complete-more",h.textContent=`... ${t.length-15} more`,this._popup.appendChild(h)}this._selectedIndex=0,this._highlightSelected(),this._popup.style.display="block"}_hidePopup(){this._popup.style.display="none",this._items=[],this._selectedIndex=-1}_selectItem(t){if(this._items.length===0)return;let i=Math.min(this._items.length,15)-1;this._selectedIndex=Math.max(0,Math.min(t,i)),this._highlightSelected()}_highlightSelected(){let t=this._popup.querySelectorAll(".tcl-complete-item");t.forEach((i,o)=>{i.classList.toggle("selected",o===this._selectedIndex)}),t[this._selectedIndex]&&t[this._selectedIndex].scrollIntoView&&t[this._selectedIndex].scrollIntoView({block:"nearest"})}_acceptCompletion(){if(this._selectedIndex<0||this._selectedIndex>=this._items.length){this._hidePopup();return}let t=this._items[this._selectedIndex],i=this._input.value.substring(0,this._replaceStart),o=this._input.value.substring(this._replaceEnd),l=!t.endsWith("/")&&!t.endsWith("::")&&(o.length===0||o[0]!==" ")?" ":"";this._input.value=i+t+l+o;let h=this._replaceStart+t.length+l.length;this._input.setSelectionRange(h,h),this._input.focus(),this._hidePopup()}};var Kl=[{key:"or_visibility",store:"cookie"},{key:"or_selectability",store:"cookie"},{key:"or_hidden_layers",store:"session"},{key:"or_nonselectable_layers",store:"session"},{key:"or_layer_patterns",store:"session"},{key:"or_hidden_chiplets",store:"cookie"},{key:"or_bg_color",store:"cookie"},{key:"or_show_dbu",store:"cookie"},{key:"or_theme",store:"theme"},{key:"or_use_true_z",store:"cookie"},{key:"or_ruler_style",store:"cookie"},{key:"or_wheel_zoom",store:"cookie"},{key:"or_arrow_step",store:"cookie"},{key:"or_font_family",store:"cookie"},{key:"or_font_scale",store:"cookie"}];function Jd(s,t){try{return window[s].getItem(t)}catch{return null}}function Qd(s,t,i){try{i===null?window[s].removeItem(t):window[s].setItem(t,i)}catch{}}function tu({key:s,store:t}){return t==="session"?Jd("sessionStorage",s):Vt(s)}function eu({key:s,store:t},i){t==="session"?Qd("sessionStorage",s,i):t==="theme"?i===null?vl():ys(i):i===null?gs(s):Qt(s,i)}function Jl(){let s={};for(let t of Kl){let i=tu(t);i&&(s[t.key]=i)}return{version:1,entries:s}}function iu(s){return typeof s=="string"&&s!==""&&!/[;\r\n]/.test(s)}function Ql(s){for(let t of Kl){let i=s[t.key];eu(t,iu(i)?i:null)}}function tc(s,t=typeof document<"u"?document:null){let i="OpenROAD",o=s?`${i} - ${s}`:i;return t&&(t.title=o),o}var ht=globalThis.THREE,ec=2,nu=.002,su=.9,ou=1.1,ru=.1,au=20,lu=3,Ci=2,ic=2,cu=10,hu=1e4,du=.15,uu=300,pu=6,Os=Math.PI/180,nc=[5025616,2201331,16750592,10233776,48340,16007990,2533018,7951688,15277667,4149685];function fu(s){let t=new Array(s.length).fill(0),i=new Map;s.forEach((o,r)=>{let l=o.z;i.has(l)||i.set(l,[]),i.get(l).push({idx:r,chiplet:o})});for(let o of i.values()){if(o.length<=1)continue;let r=[];for(let{idx:l,chiplet:h}of o){let u=h.x,f=h.y,_=h.x+h.width,g=h.y+h.height,y=!1;for(let v=0;vub.x1&&fb.y1)){r[v].push({x1:u,y1:f,x2:_,y2:g}),t[l]=v,y=!0;break}y||(r.push([{x1:u,y1:f,x2:_,y2:g}]),t[l]=r.length-1)}}return t}var Hs=class{constructor(t,i){if(this._app=i,this._container=t,this._element=document.createElement("div"),this._element.className="three-d-viewer-widget",t.element.appendChild(this._element),!ht){wt(i)?this._showInfo("The 3D view is not available in saved reports."):this._showError("three.js is missing from the page."),this._destroyed=!0;return}this._canvasContainer=document.createElement("div"),this._canvasContainer.className="three-d-canvas-container",this._element.appendChild(this._canvasContainer),this._tooltip=document.createElement("div"),this._tooltip.className="or-tooltip",this._canvasContainer.appendChild(this._tooltip),this._optionsOverlay=this._createOptionsOverlay(),this._canvasContainer.appendChild(this._optionsOverlay),this._raycaster=new ht.Raycaster,this._scene=new ht.Scene,this._applyTheme(),this._themeObserver=new MutationObserver(()=>{this._applyTheme(),this.render()}),this._themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),this._camera=new ht.PerspectiveCamera(45,1,10,1e5),this._camera.position.set(0,0,1e3);try{this._renderer=new ht.WebGLRenderer({antialias:!0,preserveDrawingBuffer:!0})}catch(h){console.error("3D viewer: failed to create WebGL context:",h),this._showWebGLUnavailable(h),this._themeObserver&&(this._themeObserver.disconnect(),this._themeObserver=null),this._destroyed=!0;return}this._renderer.setPixelRatio(window.devicePixelRatio),this._renderer.setSize(t.width,t.height),this._canvasContainer.appendChild(this._renderer.domElement),this._rotation=new ht.Quaternion,this._distance=1e3,this._panX=0,this._panY=0,this._boundingRadius=1,this._sceneCenter=new ht.Vector3,this._mouseDown=!1,this._mouseButton=-1,this._lastMousePos={x:0,y:0},this._setupMouseHandlers();let o=new ht.AmbientLight(16777215,.5);this._scene.add(o);let r=new ht.DirectionalLight(16777215,.8);r.position.set(1,1,1).normalize(),this._scene.add(r);let l=new ht.DirectionalLight(16777215,.3);l.position.set(-1,-.5,.5).normalize(),this._scene.add(l),t.on("resize",this.onResize.bind(this)),t.on("open",this.onOpen.bind(this)),t.on("destroy",this.onDestroy.bind(this)),this._designGroup=new ht.Group,this._scene.add(this._designGroup),this._chipletMeshes=[],this._loading=!1,this._destroyed=!1,this._edgeMaterial=null}_setupMouseHandlers(){let t=this._renderer.domElement;t.addEventListener("mousedown",i=>{this._mouseDown=!0,this._mouseButton=i.button,this._lastMousePos.x=i.clientX,this._lastMousePos.y=i.clientY,t.focus(),i.preventDefault()}),t.addEventListener("contextmenu",i=>i.preventDefault()),this._onMouseMove=i=>{if(!this._mouseDown)return;let o=i.clientX-this._lastMousePos.x,r=i.clientY-this._lastMousePos.y;this._lastMousePos.x=i.clientX,this._lastMousePos.y=i.clientY,!(o===0&&r===0)&&(this._mouseButton===0?this._handleRotate(o,r):this._mouseButton===2&&this._handlePan(o,r),this._updateCamera())},this._onMouseUp=i=>{this._mouseDown&&i.button===this._mouseButton&&(this._mouseDown=!1,this._mouseButton=-1)},window.addEventListener("mousemove",this._onMouseMove),window.addEventListener("mouseup",this._onMouseUp),t.addEventListener("wheel",i=>{i.preventDefault(),i.deltaY<0?this._distance*=su:this._distance*=ou;let o=Math.max(this._boundingRadius*ru,1),r=Math.max(this._boundingRadius*au,o);this._distance=Math.max(o,Math.min(r,this._distance)),this._updateCamera()},{passive:!1}),t.tabIndex=0,t.style.outline="none",t.addEventListener("keydown",i=>{i.key.toLowerCase()==="f"&&this.resetCamera()}),t.addEventListener("dblclick",i=>{i.preventDefault();let o=this._pickDrcMarkerId(i);if(o!=null&&this._app.drcWidget){this._app.drcWidget.highlightMarkerById(o,!0);return}this.resetCamera()}),t.addEventListener("mousemove",i=>{if(this._mouseDown){this._hideTooltip();return}this._updateTooltip(i)}),t.addEventListener("mouseleave",()=>{this._hideTooltip()})}_createOptionsOverlay(){let t=document.createElement("div");t.className="three-d-options";let i=document.createElement("label");i.title="Render chiplets at their true Z (disable stacking offset for overlapping chiplets at same Z).";let o=document.createElement("input");o.type="checkbox",o.checked=!!this._app.useTrueZ,o.addEventListener("change",()=>{this._app.useTrueZ=o.checked,Qt("or_use_true_z",o.checked?"1":"0"),this._app.syncDisplayState(),this.refreshSceneForOptions()}),i.appendChild(o),i.appendChild(document.createTextNode("True Z (no stacking)")),t.appendChild(i);let r=document.createElement("div");r.style.cssText="margin-top:4px; display:flex; gap:4px;";let l=document.createElement("button");l.className="or-btn or-btn-sm",l.textContent="Save PNG",l.title="Save the 3D view as a PNG image (2x resolution)",l.addEventListener("click",()=>this._exportPng(2));let h=document.createElement("button");return h.className="or-btn or-btn-sm",h.textContent="Copy",h.title="Copy the 3D view image to the clipboard",h.addEventListener("click",()=>this._copyImage(2)),r.appendChild(l),r.appendChild(h),t.appendChild(r),t}_capturePng(t=2){if(!this._renderer)return null;let i=this._renderer,o=i.domElement.clientWidth||i.domElement.width,r=i.domElement.clientHeight||i.domElement.height,l=i.getPixelRatio();try{return i.setPixelRatio(l*t),i.setSize(o,r,!1),this.render(),i.domElement.toDataURL("image/png")}finally{i.setPixelRatio(l),i.setSize(o,r,!1),this.render()}}_exportPng(t=2){let i=this._capturePng(t);i&&bi(i,"3d-view.png")}async _copyImage(t=2){let i=this._capturePng(t);i&&await vs(i)}_setRaycasterFromEvent(t){let o=this._renderer.domElement.getBoundingClientRect(),r=new ht.Vector2((t.clientX-o.left)/o.width*2-1,-((t.clientY-o.top)/o.height*2-1));this._raycaster.setFromCamera(r,this._camera)}_updateTooltip(t){if(!this._chipletMeshes.length){this._hideTooltip();return}this._setRaycasterFromEvent(t);let i=this._chipletMeshes.map(u=>u.mesh),o=this._raycaster.intersectObjects(i,!1);if(o.length===0){this._hideTooltip();return}let r=o[0].object,l=this._chipletMeshes.find(u=>u.mesh===r);if(!l){this._hideTooltip();return}this._tooltip.textContent=l.data.name,this._tooltip.style.display="block";let h=this._canvasContainer.getBoundingClientRect();this._tooltip.style.left=t.clientX-h.left+12+"px",this._tooltip.style.top=t.clientY-h.top+12+"px"}_hideTooltip(){this._tooltip&&(this._tooltip.style.display="none")}_pickDrcMarkerId(t){if(!this._drcHitboxMesh||!this._drcHitboxMarkerIds)return null;this._setRaycasterFromEvent(t);let i=this._raycaster.intersectObject(this._drcHitboxMesh,!1);if(i.length===0)return null;let o=i[0].instanceId;return o==null?null:this._drcHitboxMarkerIds[o]??null}_handleRotate(t,i){let o=Math.sqrt(t*t+i*i);if(o<.001)return;let r=new ht.Vector3(i/o,t/o,0),l=o/ec,u=new ht.Quaternion().setFromAxisAngle(r,l*Os).clone().multiply(this._rotation);if(new ht.Vector3(0,0,1).applyQuaternion(u).z>=0)this._rotation.copy(u);else{let _=new ht.Vector3(0,1,0),g=t/ec*Os,v=new ht.Quaternion().setFromAxisAngle(_,g).clone().multiply(this._rotation);new ht.Vector3(0,0,1).applyQuaternion(v).z>=0&&this._rotation.copy(v)}}_handlePan(t,i){let o=this._distance*nu;this._panX+=t*o,this._panY-=i*o}_updateCamera(){let t=Math.max(this._boundingRadius,1e3),i=Math.max(this._distance-t*ic,cu),o=this._distance+t*ic;o0;){let t=this._designGroup.children[0];this._designGroup.remove(t),t.geometry&&t.geometry.dispose(),t.material&&!t.material._shared&&t.material.dispose()}this._edgeMaterial&&(this._edgeMaterial.dispose(),this._edgeMaterial=null),this._onMouseMove&&(window.removeEventListener("mousemove",this._onMouseMove),this._onMouseMove=null),this._onMouseUp&&(window.removeEventListener("mouseup",this._onMouseUp),this._onMouseUp=null),this._renderer&&(this._renderer.dispose(),this._renderer=null),this._app.threeDViewerWidget===this&&(this._app.threeDViewerWidget=null)}}_setInitialCameraState(){this._distance=this._boundingRadius*lu;let t=new ht.Quaternion().setFromAxisAngle(new ht.Vector3(1,0,0),-45*Os),i=new ht.Quaternion().setFromAxisAngle(new ht.Vector3(0,0,1),45*Os);this._rotation=t.multiply(i),this._panX=0,this._panY=0}resetCamera(){this._sceneBounds&&(this._setInitialCameraState(),this._updateCamera())}onResize(){if(this._destroyed)return;let t=this._canvasContainer.getBoundingClientRect(),i=t.width,o=t.height;i===0||o===0||(this._camera.aspect=i/o,this._camera.updateProjectionMatrix(),this._renderer.setSize(i,o),this.render())}render(){this._destroyed||this._renderer&&this._scene&&this._camera&&this._renderer.render(this._scene,this._camera)}_applyTheme(){let i=vi().bgMap||"#000000";this._scene.background=new ht.Color(i)}async loadData(){if(!(this._loading||this._destroyed)){this._loading=!0;for(let t of[".three-d-error",".three-d-info"]){let i=this._element.querySelector(t);i&&i.remove()}try{await this._app.websocketManager.readyPromise;let t=await this._app.websocketManager.request({type:"get_3d_data"});if(this._destroyed)return;if(t&&t.error){this._showError(t.error);return}if(t&&t.info){this._showInfo(t.info);return}this.buildScene(t)}catch(t){if(this._destroyed)return;console.error("Failed to load 3D data:",t),this._showError(t.message||String(t))}finally{this._loading=!1}}}_showOverlay(t,i,o){let r=document.createElement("div");r.className=t,r.style.cssText="position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-family:monospace;text-align:center;",r.style.color=o,r.textContent=i,this._element.appendChild(r)}_showError(t){this._showOverlay("three-d-error","Failed to load 3D data: "+t,"var(--error)")}_showInfo(t){this._showOverlay("three-d-info",t,"var(--fg-muted, #888)")}_showWebGLUnavailable(t){let i=document.createElement("div");i.className="three-d-error",i.style.cssText="position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-family:monospace;text-align:center;max-width:80%;color:var(--error);";let o=t&&t.message?t.message:String(t||"");i.innerHTML='
3D viewer unavailable: WebGL context could not be created.
In Chrome, open chrome://flags/#ignore-gpu-blocklist and set Override software rendering list to Enabled, then relaunch the browser.
Otherwise enable hardware acceleration or try a different browser. See chrome://gpu for details.
'+(o?'
'+o+"
":""),this._element.appendChild(i)}buildScene(t){if(this._destroyed||(this._lastSceneData=t,this._clearScene(),!t||!t.chiplets||t.chiplets.length===0))return;let i=this._app.getDbuPerMicron(),o=this._buildChiplets(t.chiplets,i);o.minX!==1/0&&(this._buildGrid(o),this._setSceneBoundsAndCenter(o),this._setInitialCameraState(),this._updateCamera())}_clearScene(){for(this._chipletMeshes=[];this._designGroup.children.length>0;){let t=this._designGroup.children[0];this._designGroup.remove(t),t.geometry&&t.geometry.dispose(),t.material&&!t.material._shared&&t.material.dispose()}this._hideTooltip()}_buildChiplets(t,i){let o={minX:1/0,minY:1/0,minZ:1/0,maxX:-1/0,maxY:-1/0,maxZ:-1/0};this._edgeMaterial||(this._edgeMaterial=new ht.LineBasicMaterial({color:0,linewidth:1}),this._edgeMaterial._shared=!0);let r=this._app.useTrueZ?new Array(t.length).fill(0):fu(t);return t.forEach((l,h)=>{let u=l.width/i,f=l.height/i,_=l.thickness/i*Ci,g=nc[h%nc.length],y=new ht.MeshPhongMaterial({color:g,transparent:!1,opacity:1,side:ht.DoubleSide,shininess:40}),v=new ht.BoxGeometry(u,f,_),w=new ht.Mesh(v,y),b=l.x/i+u/2,C=l.y/i+f/2,R=_*du,P=l.z/i*Ci+_/2+r[h]*(_+R);w.position.set(b,C,P),this._designGroup.add(w),this._chipletMeshes.push({mesh:w,data:l,color:g});let T=new ht.EdgesGeometry(v),Z=new ht.LineSegments(T,this._edgeMaterial);Z.position.set(b,C,P),this._designGroup.add(Z),o.minX=Math.min(o.minX,l.x/i),o.minY=Math.min(o.minY,l.y/i),o.minZ=Math.min(o.minZ,P-_/2),o.maxX=Math.max(o.maxX,l.x/i+u),o.maxY=Math.max(o.maxY,l.y/i+f),o.maxZ=Math.max(o.maxZ,P+_/2)}),o}_buildGrid(t){let i=t.maxX-t.minX,o=t.maxY-t.minY,r=Math.max(i,o)*1.4,l=10,h=new ht.GridHelper(r,l,8947848,4473924);h.rotation.x=Math.PI/2,h.position.set((t.minX+t.maxX)/2,(t.minY+t.maxY)/2,t.minZ-1),this._designGroup.add(h)}_setSceneBoundsAndCenter(t){this._sceneBounds=t;let i=t.maxX-t.minX,o=t.maxY-t.minY,r=t.maxZ-t.minZ;this._boundingRadius=Math.sqrt(i*i+o*o+r*r)/2,this._sceneCenter.set((t.minX+t.maxX)/2,(t.minY+t.maxY)/2,(t.minZ+t.maxZ)/2)}_stackOffsetForPoint(t,i,o,r){for(let{mesh:l,data:h}of this._chipletMeshes){if(t!==h.z||ih.x+h.width||oh.y+h.height)continue;let u=h.thickness/r*Ci,f=h.z/r*Ci+u/2;return l.position.z-f}return 0}clearHighlightDRC(){this._drcBlinkInterval&&(clearInterval(this._drcBlinkInterval),this._drcBlinkInterval=null),this._drcMeshGroup&&(this._scene.remove(this._drcMeshGroup),this._drcMeshGroup.children.forEach(t=>{t.geometry&&t.geometry.dispose()}),this._drcMaterial&&(this._drcMaterial.dispose(),this._drcMaterial=null),this._drcHitboxMaterial&&(this._drcHitboxMaterial.dispose(),this._drcHitboxMaterial=null),this._drcHitboxMesh=null,this._drcHitboxMarkerIds=null,this._drcMeshGroup=null,this.render())}highlightDRC(t){if(this._destroyed||(this.clearHighlightDRC(),!t||t.length===0))return;let i=this._app.getDbuPerMicron(),o=0,r=1e4/i*Ci;this._sceneBounds&&this._sceneBounds.minZ!==1/0&&(o=this._sceneBounds.minZ,r=this._sceneBounds.maxZ),o-=1,r+=1;let l=Math.max(r-o,1);this._drcMeshGroup=new ht.Group,this._drcMaterial=new ht.LineBasicMaterial({color:16776960,transparent:!0,opacity:1,depthTest:!1,depthWrite:!1}),this._drcHitboxMaterial=new ht.MeshBasicMaterial({transparent:!0,opacity:0,depthWrite:!1});let h=[];for(let _ of t){let g=_.rects&&_.rects.length>0?_.rects:[_.bbox];for(let y of g){let[v,w,b,C,R,P]=y,T=Math.max((b-v)/i,.001),Z=Math.max((C-w)/i,.001),U=o,dt=l,gt=0;if(y.length>=6&&R!==void 0&&P!==void 0){U=R/i*Ci;let tt=P/i*Ci;dt=Math.max(tt-U,.001),gt=this._stackOffsetForPoint(R,(v+b)/2,(w+C)/2,i)}let it=v/i+T/2,Q=w/i+Z/2,nt=U+dt/2+gt;h.push({cx:it,cy:Q,cz:nt,width:T,height:Z,depth:dt,markerId:_.id})}}if(h.length>0){let _=new ht.BoxGeometry(1,1,1);this._drcHitboxMesh=new ht.InstancedMesh(_,this._drcHitboxMaterial,h.length),this._drcHitboxMarkerIds=new Array(h.length);let g=new ht.Matrix4,y=new ht.Vector3,v=new ht.Vector3,w=new ht.Quaternion;h.forEach((b,C)=>{v.set(b.cx,b.cy,b.cz),y.set(b.width,b.height,b.depth),g.compose(v,w,y),this._drcHitboxMesh.setMatrixAt(C,g),this._drcHitboxMarkerIds[C]=b.markerId;let R=new ht.BoxGeometry(b.width,b.height,b.depth),P=new ht.EdgesGeometry(R);R.dispose();let T=new ht.LineSegments(P,this._drcMaterial);T.position.set(b.cx,b.cy,b.cz),T.renderOrder=999,this._drcMeshGroup.add(T)}),this._drcHitboxMesh.instanceMatrix.needsUpdate=!0,this._drcMeshGroup.add(this._drcHitboxMesh)}this._drcMeshGroup.renderOrder=999,this._scene.add(this._drcMeshGroup),this.render();let u=!0,f=0;this._drcBlinkInterval=setInterval(()=>{if(!(!this._drcMeshGroup||!this._drcMaterial)){if(f+=1,f>=pu){this._drcMaterial.opacity=1,this.render(),clearInterval(this._drcBlinkInterval),this._drcBlinkInterval=null;return}u=!u,this._drcMaterial.opacity=u?1:.2,this.render()}},uu)}refreshSceneForOptions(){this._destroyed||this._lastSceneData&&(this.clearHighlightDRC(),this.buildScene(this._lastSceneData))}};var mu=[{name:"green",hex:"#00ff00"},{name:"yellow",hex:"#ffff00"},{name:"cyan",hex:"#00ffff"},{name:"magenta",hex:"#ff00ff"},{name:"red",hex:"#ff0000"},{name:"dark_green",hex:"#008000"},{name:"dark_magenta",hex:"#800080"},{name:"blue",hex:"#0000ff"},{name:"orange",hex:"#ffa500"},{name:"purple",hex:"#800080"},{name:"lime",hex:"#bfff00"},{name:"teal",hex:"#008080"},{name:"pink",hex:"#ffc0cb"},{name:"brown",hex:"#8b4513"},{name:"indigo",hex:"#4b0082"},{name:"turquoise",hex:"#40e0d0"}],_u=[{label:"Connected Insts",suffix:"connected_insts",needsNet:!0},{label:"Output Nets",suffix:"connected_nets",args:{output:!0,input:!1}},{label:"Input Nets",suffix:"connected_nets",args:{output:!1,input:!0}},{label:"All Nets",suffix:"connected_nets",args:{output:!0,input:!0}},{label:"All buffer trees",suffix:"connected_buffer_trees"},{label:"All buffer trees (incl. inverters)",suffix:"connected_buffer_trees",args:{include_inverters:!0}}],$s=class{constructor(t){this._app=t,this._el=document.createElement("div"),this._el.className="context-menu",this._el.style.display="none",this._el.style.zIndex="10000",document.body.appendChild(this._el),this._bindEvents()}_bindEvents(){document.addEventListener("mousedown",t=>{this._el.contains(t.target)||this.hide()}),this._app.map&&this._app.map.on("movestart",()=>this.hide())}show(t){this._el.innerHTML="";let i=!!this._app.selHasInst,o=!!this._app.selHasNet,r=!(i||o),l=w=>_u.map(b=>({label:b.label,disabled:b.needsNet?!o:!i,...w(b.suffix,b.args||{})})),h=[{label:"Select",disabled:r,subMenu:l((w,b)=>({action:()=>this._sendContextAction("select_"+w,b)}))},{label:"Highlight",disabled:r,subMenu:l((w,b)=>({subMenu:this._buildColorSubmenu("highlight_"+w,b)}))},{label:"Save",subMenu:[{label:"Visible layout",action:()=>this._app.captureLayout?.({entire:!1})},{label:"Entire layout",action:()=>this._app.captureLayout?.({entire:!0})}]},{label:"Clear",subMenu:[{label:"Selections",action:()=>this._sendContextAction("clear_selections")},{label:"Highlights",action:()=>this._sendContextAction("clear_highlights")},{label:"Rulers",action:()=>{this._app.rulerManager?.clearAllRulers()}},{label:"Focus nets",action:()=>this._sendContextAction("clear_focus_nets")},{label:"Route Guides",action:()=>this._sendContextAction("clear_route_guides")},{label:"All",action:()=>{this._sendContextAction("clear_all"),this._app.rulerManager?.clearAllRulers()}}]}];this._buildMenu(h,this._el),this._el.style.display="block";let u=4,f=this._el.getBoundingClientRect(),_=window.innerWidth-f.width-u,g=window.innerHeight-f.height-u,y=Math.max(u,Math.min(t.originalEvent.clientX,_)),v=Math.max(u,Math.min(t.originalEvent.clientY,g));this._el.style.left=y+"px",this._el.style.top=v+"px"}hide(){this._el.style.display="none"}_buildColorSubmenu(t,i={}){return mu.map(({name:o,hex:r},l)=>({label:o,swatch:r,action:()=>this._sendContextAction(t,{...i,group:l})}))}_buildMenu(t,i){t.forEach(o=>{let r=document.createElement("div");if(r.className="cm-item",o.swatch){let l=document.createElement("span");l.className="cm-swatch",l.style.background=o.swatch,r.appendChild(l)}if(r.appendChild(document.createTextNode(o.label)),o.disabled){r.classList.add("disabled"),o.subMenu&&r.classList.add("has-submenu"),i.appendChild(r);return}if(o.subMenu){r.classList.add("has-submenu");let l=document.createElement("div");l.className="cm-submenu",this._buildMenu(o.subMenu,l),r.appendChild(l),r.addEventListener("mouseenter",()=>{l.classList.remove("flip-left"),l.getBoundingClientRect().right>window.innerWidth&&l.classList.add("flip-left")})}else o.action&&r.addEventListener("click",l=>{l.stopPropagation(),this.hide();try{o.action()}catch(h){console.error("Context menu item action threw:",o.label,h)}});i.appendChild(r)})}_sendContextAction(t,i={}){this._app.websocketManager&&this._app.websocketManager.request({type:"context_action",action:t,...i}).then(o=>{Fi(this._app,o),o&&o.connected_count===0&&Ce('Nothing connected \u2014 select an instance (or a net for "Connected Insts") first.'),this._syncAfterAction(t)}).catch(o=>{console.error("Context action failed:",t,o)})}_syncAfterAction(t){let i=this._app;(t==="clear_focus_nets"||t==="clear_route_guides"||t==="clear_all")&&typeof i.redrawAllLayers=="function"&&i.redrawAllLayers(),t==="clear_selections"||t==="clear_all"?(i.updateInspector?.(null),i.stopSelectionAnimation?.(),i.highlightRect&&i.map&&(i.map.removeLayer(i.highlightRect),i.highlightRect=null),i.lastSelectionBounds=null):i.refreshInspector?.(),i.refreshOverlay?.()}};function sc(s,t){if(!s)return;let i=URL.createObjectURL(s),o=document.createElement("a");o.href=i,o.download=t,o.style.display="none",document.body.appendChild(o),o.click(),document.body.removeChild(o),setTimeout(()=>URL.revokeObjectURL(i),0)}function rc(s){return s.options&&s.options.opacity!=null?s.options.opacity:1}function ac(s,t,i){if(!t||t.tagName==="IMG"&&(!t.complete||!t.naturalWidth))return;let o=t.getBoundingClientRect();if(!(o.width<=0||o.height<=0))try{s.drawImage(t,o.left-i.left,o.top-i.top,o.width,o.height)}catch{}}function gu(s,t,i){let o=[];s.map.eachLayer(r=>{r instanceof L.GridLayer&&r._tiles&&o.push(r)}),o.sort((r,l)=>(r.options&&r.options.zIndex||0)-(l.options&&l.options.zIndex||0));for(let r of o){let l=rc(r);if(!(l<=0)){t.globalAlpha=l;for(let h of Object.keys(r._tiles)){let u=r._tiles[h];!u||!u.current||ac(t,u.el,i)}}}t.globalAlpha=1}function yu(s,t,i){let o=s.map.getContainer().querySelectorAll(".leaflet-pane svg"),r=[];return o.forEach(l=>{let h=l.getBoundingClientRect();if(h.width<=0||h.height<=0)return;let u=l.cloneNode(!0);u.setAttribute("width",h.width),u.setAttribute("height",h.height);let f=new XMLSerializer().serializeToString(u),_="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(f);r.push(new Promise(g=>{let y=new Image;y.onload=()=>{try{t.drawImage(y,h.left-i.left,h.top-i.top,h.width,h.height)}catch{}g()},y.onerror=()=>g(),y.src=_}))}),Promise.all(r)}function vu(s,t,i){s.map.getContainer().querySelectorAll(".leaflet-pane .ruler-label").forEach(r=>{let l=r.getBoundingClientRect();if(l.width<=0||l.height<=0)return;let h=r.textContent;if(!h)return;let u=getComputedStyle(r),f=l.left-i.left,_=l.top-i.top;t.save(),t.fillStyle=u.backgroundColor||"rgba(0, 0, 0, 0.75)";let g=Math.min(parseFloat(u.borderTopLeftRadius)||0,l.height/2);g>0&&typeof t.roundRect=="function"?(t.beginPath(),t.roundRect(f,_,l.width,l.height,g),t.fill()):t.fillRect(f,_,l.width,l.height),t.fillStyle=u.color||"#eee",t.font=u.font||`${u.fontSize||"12px"} ${u.fontFamily||"monospace"}`,t.textAlign="left",t.textBaseline="middle",t.fillText(h,f+(parseFloat(u.paddingLeft)||0),_+l.height/2),t.restore()})}function bu(s){let t=0;return s.map.eachLayer(i=>{if(!(!(i instanceof L.GridLayer)||!i._tiles)){i._loading&&t++;for(let o of Object.keys(i._tiles)){let r=i._tiles[o],l=r&&r.el;r&&r.current&&l&&l.tagName==="IMG"&&(!l.complete||!l.naturalWidth)&&t++}}}),t}function wu(s,t=6e3,i=32){return new Promise(o=>{let r=Date.now()+t,l=0,h=()=>{if(bu(s)===0){if(++l>=2){o();return}}else l=0;if(Date.now()>=r){o();return}setTimeout(h,i)};setTimeout(h,i)})}function xu(s,t,i){s.map.eachLayer(o=>{if(!(o instanceof L.ImageOverlay))return;let r=rc(o);r<=0||(t.globalAlpha=r,ac(t,o._image,i),t.globalAlpha=1)})}async function oc(s){let t=s.map.getContainer(),i=t.getBoundingClientRect(),o=Math.max(1,Math.round(i.width)),r=Math.max(1,Math.round(i.height)),l=document.createElement("canvas");l.width=o,l.height=r;let h=l.getContext("2d"),u=getComputedStyle(t).backgroundColor;return h.fillStyle=u&&u!=="transparent"&&u!=="rgba(0, 0, 0, 0)"?u:"#000",h.fillRect(0,0,o,r),gu(s,h,i),xu(s,h,i),await yu(s,h,i),vu(s,h,i),new Promise(f=>l.toBlob(f,"image/png"))}async function lc(s,{entire:t=!1}={}){if(!s.map)return;if(!t||!s.fitBounds){sc(await oc(s),"layout_visible.png");return}let i=s.map.getCenter(),o=s.map.getZoom();try{s.map.fitBounds(s.fitBounds,{animate:!1}),await wu(s),sc(await oc(s),"layout_entire.png")}finally{s.map.setView(i,o,{animate:!1})}}var ki=document.getElementById("websocket-status"),Tn=null,Cu=2e3,ku=20;function nr(){let s=p.websocketManager&&p.websocketManager.isConnected,t=p.websocketManager?p.websocketManager.pendingCount:0;if(s)Tn&&(clearTimeout(Tn),Tn=null),t>ku?(ki.innerHTML=`
pending: ${t}
`,ki.style.display="block"):ki.style.display="none";else{if(p.websocketManager?._shutdown)return;Tn||(Tn=setTimeout(()=>{p.websocketManager?.isConnected||(ki.innerHTML='
\u26A0 OpenROAD disconnected \u2014 retrying\u2026
',ki.style.display="block")},Cu))}Lu(t)}function Lu(s){let t=p.tileProgressEl;t&&(t.classList.toggle("active",s>0),t.title=s>0?`${s} tile requests pending`:"")}function Su(s){if(!s)return"";try{return decodeURIComponent(s)}catch{return""}}var p={map:null,fitBounds:null,lastSelectionBounds:null,selHasInst:!1,selHasNet:!1,displayControlsEl:null,allLayers:[],designScale:null,designMaxDXDY:null,designOriginX:0,designOriginY:0,websocketManager:null,goldenLayout:null,hasLiberty:!1,techData:null,inspectorEl:null,tclOutputEl:null,highlightRect:null,hoverHighlightLayer:null,hoverHighlightPane:"hover-highlight-pane",modulesLayer:null,pinsLayer:null,overlayLayers:[],hierarchyBrowser:null,focusNets:new Set,routeGuideNets:new Set,visibleLayers:new Set,visibleLayerNames:new Set,visibleChiplets:null,layerPatterns:{},useTrueZ:Vt("or_use_true_z")==="1",showDbu:Vt("or_show_dbu")==="1",rulerStyle:Vt("or_ruler_style")==="manhattan"?"manhattan":"euclidian",wheelZoom:Vt("or_wheel_zoom")!=="0",arrowStep:Zi(Vt("or_arrow_step")),fontFamily:Su(Vt("or_font_family")),fontScale:Ln(Vt("or_font_scale")),polyDecomp:!1,labelManager:null,selectableLayers:new Set,heatMapData:null,activeHeatMap:"",heatMapLayer:null,heatMapLegendEl:null,renderHeatMapControls:null,rulerManager:null,selectionToken:0,selectionResetters:[],getDbuPerMicron(){return this.techData?.dbu_per_micron||1e3},unitOpts(){return{showDbu:this.showDbu,dbuPerMicron:this.getDbuPerMicron()}},formatDbu(s,t=!1){return Ga(s,this.unitOpts(),t)},parseDbu(s){return Ua(s,this.unitOpts())},formatDistance(s){return Va(s,this.unitOpts())},unitLabel(){return Ya(this.unitOpts())}},te={stdcells:!0,macros:!0,pad_input:!0,pad_output:!0,pad_inout:!0,pad_power:!0,pad_spacer:!0,pad_areaio:!0,pad_other:!0,phys_fill:!1,phys_endcap:!0,phys_welltap:!0,phys_tie:!0,phys_antenna:!0,phys_cover:!0,phys_bump:!0,phys_other:!0,std_bufinv:!0,std_bufinv_timing:!0,std_clock_bufinv:!0,std_clock_gate:!0,std_level_shift:!0,std_sequential:!0,std_combinational:!0,net_signal:!0,net_power:!0,net_ground:!0,net_clock:!0,net_reset:!0,net_tieoff:!0,net_scan:!0,net_analog:!0,inst_names:!0,inst_pins:!0,inst_pin_names:!1,routing:!0,routing_segments:!0,routing_vias:!0,special_nets:!0,srouting_segments:!0,srouting_vias:!0,pins:!0,pin_names:!0,access_points:!1,regions:!0,mfg_grid:!1,gcell_grid:!1,flywires_only:!1,blockages:!0,placement_blockages:!0,routing_obstructions:!0,fills:!1,rows:!1,tracks_pref:!1,tracks_non_pref:!1,module_view:!1,detailed:!1,rulers:!0,labels:!0,scale_bar:!0,focused_nets_guides:!1,highlight_selected:!0,debug:!1};try{let s=Vt("or_visibility");if(s){let t=JSON.parse(decodeURIComponent(s));for(let[i,o]of Object.entries(t))te[i]=!!o}}catch{}var Li={stdcells:!0,macros:!0,pad_input:!0,pad_output:!0,pad_inout:!0,pad_power:!0,pad_spacer:!0,pad_areaio:!0,pad_other:!0,phys_fill:!0,phys_endcap:!0,phys_welltap:!0,phys_tie:!0,phys_antenna:!0,phys_cover:!0,phys_bump:!0,phys_other:!0,std_bufinv:!0,std_bufinv_timing:!0,std_clock_bufinv:!0,std_clock_gate:!0,std_level_shift:!0,std_sequential:!0,std_combinational:!0,net_signal:!0,net_power:!0,net_ground:!0,net_clock:!0,net_reset:!0,net_tieoff:!0,net_scan:!0,net_analog:!0,pins:!0,inst_pins:!0,placement_blockages:!0,routing_obstructions:!0};p.visibility=te;p.selectability=Li;try{let s=Vt("or_selectability");if(s){let t=JSON.parse(decodeURIComponent(s));for(let[i,o]of Object.entries(t))Li[i]=!!o}}catch{}var Mu=il(te,p.visibleLayerNames,Li,p.selectableLayers,p);(function(){let t=null;try{t=new URLSearchParams(window.location.search)}catch{t=null}let i=l=>t?t.get(l):null;p.mergeTiles=i("mergetiles")!=="0";let o=Number(i("tilebudget"));Number.isFinite(o)&&o>0&&(p.tileBudgetBytes=Math.round(o*1024*1024));let r=Number(i("mergegroups"));Number.isFinite(r)&&r>0&&(p.mergeGroupCount=Math.floor(r)),p.tileDpr=_i,p.MergedTileLayer=ul({visibility:te,selectability:Li,visibleLayers:p.visibleLayerNames,selectableLayers:p.selectableLayers,app:p},{dpr:_i})})();var Eu=L.GridLayer.extend({initialize:function(s,t,i){this._websocketManager=s,this._appState=t,L.GridLayer.prototype.initialize.call(this,ui(i))},_clampZoom:function(s){return L.GridLayer.prototype._clampZoom.call(this,$i(this,s))},createTile:function(s,t){let i=document.createElement("img");i.alt="",i.setAttribute("role","presentation"),i._tileDone=!1,i.onload=()=>{i.src&&i.src.startsWith("blob:")&&URL.revokeObjectURL(i.src),i._tileDone||(i._tileDone=!0,t(null,i))},i.onerror=()=>{i._tileDone||(i._tileDone=!0,t(new Error("heat map tile load error"),i))};let o=this._appState.activeHeatMap;return o?(this._websocketManager.request({type:"heatmap_tile",name:o,z:s.z,x:s.x,y:s.y,...Hi(_i(),this.getTileSize().x)}).then(r=>{i.src=r?URL.createObjectURL(r):Ze}).catch(()=>{i.src=Ze}),i):(i.src=Ze,i)},refreshTiles:function(){if(this._map)for(let s in this._tiles){let t=this._tiles[s];if(!t||!t.el)continue;let i=t.el,o=t.coords,r=this._appState.activeHeatMap;if(!r){i.src&&i.src.startsWith("blob:")&&URL.revokeObjectURL(i.src),i.src=Ze;continue}this._websocketManager.request({type:"heatmap_tile",name:r,z:o.z,x:o.x,y:o.y,...Hi(_i(),this.getTileSize().x)}).then(l=>{i.src&&i.src.startsWith("blob:")&&URL.revokeObjectURL(i.src),i.src=l?URL.createObjectURL(l):Ze}).catch(()=>{i.src=Ze})}}});function or(s){p.heatMapData=s,p.activeHeatMap=s.active||"",p.heatMapLayer&&(p.activeHeatMap?p.map.hasLayer(p.heatMapLayer)||p.heatMapLayer.addTo(p.map):p.map.hasLayer(p.heatMapLayer)&&p.map.removeLayer(p.heatMapLayer),p.heatMapLayer.refreshTiles()),p.renderHeatMapControls&&p.renderHeatMapControls(s)}p.updateHeatMaps=or;function rr(){p.overlayLayer&&p.overlayLayer.refreshTiles()}var Si=bn(()=>{rr(),p.selectionBrowser&&p.selectionBrowser.scheduleRefresh()});p.refreshOverlay=Si;function pe(){Qt("or_visibility",encodeURIComponent(JSON.stringify(te))),Qt("or_selectability",encodeURIComponent(JSON.stringify(Li))),We();let s=[[p.modulesLayer,te.module_view],[p.pinsLayer,te.pins],...p.overlayLayers.map(({def:t,layer:i})=>[i,Ts(t.shown_by,te)])];for(let[t,i]of s)t&&(i&&!p.map.hasLayer(t)?t.addTo(p.map):!i&&p.map.hasLayer(t)&&p.map.removeLayer(t));for(let t of p.allLayers)t.refreshTiles();if(p.heatMapLayer&&p.heatMapLayer.refreshTiles(),p.highlightRect){let t=te.highlight_selected!==!1;!t&&p.map.hasLayer(p.highlightRect)?p.map.removeLayer(p.highlightRect):t&&!p.map.hasLayer(p.highlightRect)&&p.highlightRect.addTo(p.map)}!te.highlight_selected&&p.clearSelectionPulse&&p.clearSelectionPulse(),rr(),p.rulerManager&&p.rulerManager.updateVisibility(),p.labelManager&&p.labelManager.updateVisibility(),p.updateScaleBar&&p.updateScaleBar()}var Xi=bn(pe),We=bn(()=>{!p.websocketManager||wt(p)||p.websocketManager.request({type:"set_display_state",state:Jl()}).catch(()=>{})});p.syncDisplayState=We;function Tu(s){if(!s||typeof s!="object")return;let t=s.entries;if(!(!t||typeof t!="object")){Ql(t);try{if(p.map&&typeof sessionStorage<"u"){let i=p.map.getCenter();sessionStorage.setItem("or_restore_view",JSON.stringify({lat:i.lat,lng:i.lng,zoom:p.map.getZoom()}))}}catch{}window.location.reload()}}p.redrawAllLayers=pe;p.captureLayout=(s={})=>lc(p,s);function Pu(s){let t=document.createElement("div");t.className="layout-viewer",t.style.width="100%",t.style.height="100%",t.style.backgroundColor="var(--bg-map)",s.element.appendChild(t);let i=document.createElement("div");i.className="or-hud or-hud-bottom-right heatmap-map-legend hidden",t.appendChild(i),p.heatMapLegendEl=i;let o=document.createElement("div");o.className="or-progress",t.appendChild(o),p.tileProgressEl=o,s.on("destroy",()=>{p.tileProgressEl=null,p.heatMapLegendEl=null}),p.map=L.map(t,Fa(void 0,{wheelZoom:p.wheelZoom,arrowStep:p.arrowStep})),wt(p)||Ka(p.map,()=>p.wheelZoom),yl(p.map),Ia(()=>pe());let r=p.map.createPane(p.hoverHighlightPane);r.style.zIndex="650",r.style.pointerEvents="none";let l=L.Control.extend({onAdd:function(){let P=L.DomUtil.create("div","leaflet-bar leaflet-control leaflet-control-fit"),T=L.DomUtil.create("a","",P);return T.href="#",T.title="Fit",T.setAttribute("role","button"),T.setAttribute("aria-label","Fit"),T.textContent="\u2922",L.DomEvent.on(T,"click",L.DomEvent.stop).on(T,"click",()=>{p.fitBounds&&p.map.fitBounds(p.fitBounds)}),P}});new l({position:"topleft"}).addTo(p.map),new ResizeObserver(()=>{p.map.invalidateSize({animate:!1})}).observe(t);let h=document.createElement("div");h.className="or-hud or-hud-bottom-left hidden";let u=document.createElement("div");u.id="scale-bar";let f=document.createElement("span");f.className="or-hud-divider";let _=document.createElement("div");_.id="coord-bar",h.appendChild(u),h.appendChild(f),h.appendChild(_),t.appendChild(h);function g(){let P=u.style.display!=="none"&&u.childElementCount>0,T=_.textContent!=="";f.style.display=P&&T?"":"none",h.classList.toggle("hidden",!P&&!T)}g(),p.map.on("mousemove",P=>{if(p.lastMouseLatLng=P.latlng,!p.designScale)return;let{dbuX:T,dbuY:Z}=we(P.latlng.lat,P.latlng.lng,p.designScale,p.designMaxDXDY,p.designOriginX,p.designOriginY);_.textContent=`X: ${p.formatDbu(T)} Y: ${p.formatDbu(Z)}`,g()}),p.map.on("mouseout",P=>{let T=P.originalEvent&&P.originalEvent.relatedTarget;T&&t.contains(T)||(p.lastMouseLatLng=null,_.textContent="",g())});let y=22,v=8,w=22;function b(P,T,Z){let dt=2+v,gt=w,it=w+P,Q=y-2,nt=P>=40,tt=[];if(tt.push(``),nt&&Z>1)for(let Ct=1;Ct`)}nt&&tt.push(`0`),tt.push(`${T}`),u.innerHTML=`${tt.join("")}`}function C(){if(!p.designScale||!te.scale_bar){u.style.display="none",g();return}let P=p.designScale*Math.pow(2,p.map.getZoom()),T=p.map.getContainer().clientWidth||400,Z=ja({targetPx:T*.15,pxPerDbu:P,dbuPerMicron:p.techData?.dbu_per_micron,showDbu:p.showDbu});if(!Z){u.style.display="none",g();return}u.style.display="",b(Z.barPx,Z.label,Z.segments),g()}let R=bn(C);p.map.on("zoom zoomend resize",R),p.updateScaleBar=C,p.rulerManager=new Ns(p,te,Pn,Fs),p.labelManager=new Bs(p,te,Pn,Fs)}function Au(s){let t=document.createElement("div");t.className="display-controls",t.innerHTML='
Loading layers...
',s.element.appendChild(t),p.displayControlsEl=t}var sr="or_restore_console",Iu=1<<20;function Nu(){try{if(p.tclOutputEl){let s=[...p.tclOutputEl.children].map(r=>[r.textContent,r.className]),t=s.length,i=0;for(;t>0&&i+s[t-1][0].length<=Iu;)i+=s[--t][0].length;let o=s.slice(t);t>0&&o.unshift([`[earlier output not kept across reload] +`,""]),sessionStorage.setItem(sr,JSON.stringify(o))}}catch{}window.location.reload()}function Bu(){try{let s=sessionStorage.getItem(sr);if(!s)return;sessionStorage.removeItem(sr);for(let[t,i]of JSON.parse(s))Qe(t,i)}catch{}}function Qe(s,t){if(!p.tclOutputEl)return;let i=document.createElement("span");t&&(i.className=t),i.textContent=s,p.tclOutputEl.appendChild(i),p.tclOutputEl.scrollTop=p.tclOutputEl.scrollHeight}function Du(){if(p._shutdownHandled)return;p._shutdownHandled=!0,p.websocketManager&&(p.websocketManager._shutdown=!0,p.websocketManager.onPush=()=>{});let s=document.createElement("div");s.style.cssText="position:fixed;inset:0;z-index:99999;background:#1e1e1e;color:#ddd;display:flex;flex-direction:column;align-items:center;justify-content:center;font-family:system-ui,sans-serif;font-size:16px;padding:24px;text-align:center;",s.innerHTML='
OpenROAD exited
You can close this tab.
',document.body.appendChild(s),setTimeout(()=>{try{window.close()}catch{}},1500)}function Ru(s){let t=document.createElement("div");if(t.className="tcl-console",t.innerHTML='
%
',s.element.appendChild(t),p.tclOutputEl=t.querySelector(".tcl-output"),Bu(),wt(p)){t.querySelector(".tcl-input-row").style.display="none";let r=document.createElement("span");r.className="tcl-static-notice",r.setAttribute("role","status"),r.setAttribute("aria-live","polite"),r.textContent="Tcl console is not available in saved reports.",p.tclOutputEl.appendChild(r);return}let i=t.querySelector(".tcl-input"),o=new zs(i,p.websocketManager);i.addEventListener("keydown",r=>{if(!o.handleKeyDown(r)&&r.key==="Enter"){let l=i.value.trim();if(!l)return;Qe(`>>> ${l} +`,"tcl-cmd"),o.addToHistory(l),i.value="",p.websocketManager.request({type:"tcl_eval",cmd:l}).then(h=>{h.result&&Qe(h.result+` +`,h.is_error?"tcl-error":""),h.action==="shutdown"&&Du(),!h.is_error&&p.drcWidget&&p.drcWidget.refresh()}).catch(h=>Qe(`Error: ${h} +`,"tcl-error"))}})}p.visibility=te;var ti=Pl(p,pe,Si),zu=ti.createInspector,Pn=ti.updateInspector,Ou=ti.highlightBBox,Hu=ti.pulseHighlight;p.updateInspector=Pn;p.navigateInspector=ti.navigateInspector;p.refreshInspector=ti.refreshInspector;p.animateSelection=ti.animateSelection;p.stopSelectionAnimation=ti.stopSelectionAnimation;function $u(s){new ks(s,p,pe)}function Fu(s){p.timingWidget=new yi(p,pe,Si),s.element.appendChild(p.timingWidget.element)}function Zu(s){p.drcWidget=new Rs(p,pe,Si),s.element.appendChild(p.drcWidget.element)}function qu(s){p.clockTreeWidget=new xs(s,p,pe,Si)}function Wu(s){p.chartsWidget=new Cs(p,pe),s.element.appendChild(p.chartsWidget.element)}function Gu(s){let t=document.createElement("div");t.className="help-panel",t.innerHTML="

Keyboard Shortcuts

fFit design to viewport
scrollZoom in/out
dragPan the view
right-dragRubber-band zoom
Shift+clickAdd object to selection
Ctrl/Cmd+clickSelect object and its connected nets
kToggle ruler mode
Shift+KClear all rulers
EscapeCancel ruler (when building)
",s.element.appendChild(t)}function Uu(s){p.selectionBrowser=new Ls(s,p,Si)}function Vu(s){new Ds(s,p)}function Yu(s){p.threeDViewerWidget=new Hs(s,p)}var Xu=28,ju={dimensions:{headerHeight:Xu},root:{type:"row",content:[{type:"component",componentType:"DisplayControls",title:"Display Controls",width:15},{type:"column",width:55,content:[{type:"stack",height:70,content:[{type:"component",componentType:"LayoutViewer",title:"Layout",isClosable:!1},{type:"component",componentType:"SchematicWidget",title:"Schematic"},{type:"component",componentType:"3DViewer",title:"3D Viewer"}]},{type:"component",componentType:"TclConsole",title:"Tcl Console",height:30}]},{type:"stack",width:30,content:[{type:"component",componentType:"Inspector",title:"Inspector"},{type:"component",componentType:"Browser",title:"Hierarchy"},{type:"component",componentType:"TimingWidget",title:"Timing"},{type:"component",componentType:"DRCWidget",title:"DRC"},{type:"component",componentType:"SelectHighlight",title:"Select Highlight"},{type:"component",componentType:"ClockWidget",title:"Clock Tree"},{type:"component",componentType:"ChartsWidget",title:"Charts"},{type:"component",componentType:"HelpWidget",title:"Help"}]}]}};p.goldenLayout=new fs(document.getElementById("gl-container"));p.goldenLayout.registerComponentFactoryFunction("LayoutViewer",Pu);p.goldenLayout.registerComponentFactoryFunction("DisplayControls",Au);p.goldenLayout.registerComponentFactoryFunction("TclConsole",Ru);p.goldenLayout.registerComponentFactoryFunction("Inspector",zu);p.goldenLayout.registerComponentFactoryFunction("Browser",$u);p.goldenLayout.registerComponentFactoryFunction("TimingWidget",Fu);p.goldenLayout.registerComponentFactoryFunction("DRCWidget",Zu);p.goldenLayout.registerComponentFactoryFunction("ClockWidget",qu);p.goldenLayout.registerComponentFactoryFunction("ChartsWidget",Wu);p.goldenLayout.registerComponentFactoryFunction("SchematicWidget",Vu);p.goldenLayout.registerComponentFactoryFunction("3DViewer",Yu);p.goldenLayout.registerComponentFactoryFunction("HelpWidget",Gu);p.goldenLayout.registerComponentFactoryFunction("SelectHighlight",Uu);var Ne=window.__STATIC_CACHE__||null;if(Ne)Pa(),p.websocketManager=Cn.fromCache(Ne,nr);else{let s=Ra(window.location);p.websocketManager=new Cn(s,nr),p.layerExtents=new ms,p.websocketManager.onReconnected=()=>{Zs(),cr(null,null,{reloadOnChange:!0}).catch(()=>{})}}nr();p.goldenLayout.loadLayout(ju);function ar(){p.goldenLayout.updateSize()}p.syncLayoutSize=ar;window.addEventListener("resize",ar);function Fs(s,t){p.goldenLayout.focusComponent(s,t)}p.focusComponent=Fs;p.resetLayout=function(){p.goldenLayout&&typeof p.goldenLayout.resetLayout=="function"&&p.goldenLayout.resetLayout()};p.toggleTheme=function(){let s=document.documentElement.dataset.theme==="dark"?"light":"dark";document.documentElement.dataset.theme=s,Go(s),ys(s),p.chartsWidget&&p.chartsWidget.render(),p.clockTreeWidget&&p.clockTreeWidget.render(),We()};p.toggleShowDbu=function(){p.showDbu=!p.showDbu,Qt("or_show_dbu",p.showDbu?"1":"0"),p.rulerManager&&p.rulerManager._rerenderAll(),p.hierarchyBrowser&&p.hierarchyBrowser._render(),p.updateScaleBar&&p.updateScaleBar(),p.refreshInspector&&p.refreshInspector(),We()};p.toggleRulerStyle=function(){p.rulerStyle=p.rulerStyle==="manhattan"?"euclidian":"manhattan",Qt("or_ruler_style",p.rulerStyle),We()};p.toggleWheelZoom=function(){p.wheelZoom=!p.wheelZoom,Qt("or_wheel_zoom",p.wheelZoom?"1":"0"),We()};p.setArrowStep=function(s){p.arrowStep=Zi(s),Qt("or_arrow_step",String(p.arrowStep)),Za(p.map,p.arrowStep),We()};p.setAppFont=function({family:s,scale:t}){p.fontFamily=s??p.fontFamily,p.fontScale=Ln(t??p.fontScale),Qt("or_font_family",encodeURIComponent(p.fontFamily)),Qt("or_font_scale",String(p.fontScale)),p.applyAppFont(),We()};p.applyAppFont=function(){let s=document.documentElement;p.fontFamily?s.style.setProperty("--or-font-family",p.fontFamily):s.style.removeProperty("--or-font-family"),s.style.setProperty("--or-font-scale",String(p.fontScale/100)),p.chartsWidget&&p.chartsWidget.render(),p.clockTreeWidget&&p.clockTreeWidget.render()};p.showArrowStepDialog=()=>Nl(p);p.showAppFontDialog=()=>Bl(p);p.togglePolyDecomp=function(){p.websocketManager&&p.websocketManager.request({type:"poly_decomp",value:!p.polyDecomp}).then(s=>lr(s.value)).catch(()=>{})};function lr(s){p.polyDecomp=!!s,p.rebuildMenuBar&&p.rebuildMenuBar(),p.refreshOverlay&&p.refreshOverlay()}p.applyAppFont();p.echoTcl=s=>Qe(`>>> ${s} +`,"tcl-cmd");p.runTclScript=(s,t)=>s?(t&&p.echoTcl(s),p.websocketManager.request({type:"tcl_eval",cmd:s}).then(i=>(i&&i.result&&Qe(i.result+` +`,i.is_error?"tcl-error":""),i)).catch(i=>{Qe(`Error: ${i} +`,"tcl-error")})):Promise.resolve();function cc(s){s&&(p.customMenu=s.menu||[],p.customToolbar=s.toolbar||[],p.rebuildMenuBar&&p.rebuildMenuBar(),p.rebuildToolbar&&p.rebuildToolbar(),ar())}p.customMenu=[];p.customToolbar=[];p.scheduleRedrawAllLayers=Xi;p.showGlobalConnectDialog=()=>Gl(p);p.showInsertBufferDialog=s=>Ul(p,s);Fl(p);Zl(p);p.contextMenu=new $s(p);function Ku(){let s=document.getElementById("debug-continue-btn");return s||(s=document.createElement("button"),s.id="debug-continue-btn",s.className="debug-continue-btn",s.textContent="Continue",s.title="Advance the debugger (gpl, cts, ...)",s.addEventListener("click",()=>{p.websocketManager.request({type:"debug_continue"}).catch(()=>{})}),(document.getElementById("menu-bar")||document.body).appendChild(s),s)}function hc(s,t){let i=No(s,xe(),t);return i?(p.currentBounds=s,p.designScale=i.scale,p.designMaxDXDY=i.maxDXDY,p.designOriginX=i.originX,p.designOriginY=i.originY,p.fitBounds=i.fitBounds,p.map.setMaxZoom(qa(i.scale)),!0):!1}async function cr(s,t,{reloadOnChange:i=!1}={}){if(wt(p)||!p.map)return!1;let o=s,r=t;if(!o)try{let u=await p.websocketManager.request({type:"bounds"});o=u.bounds,r=u.fit_bounds}catch{return!1}if(!o||Ha(p.currentBounds,o))return!1;if(i)return window.location.reload(),!0;let h=!!p.designScale?we(p.map.getCenter().lat,p.map.getCenter().lng,p.designScale,p.designMaxDXDY,p.designOriginX,p.designOriginY):null;if(!hc(o,r))return!1;if(h){let u=Jt(h.dbuX,h.dbuY,p.designScale,p.designMaxDXDY,p.designOriginX,p.designOriginY);p.map.setView(u,p.map.getZoom(),{animate:!1})}return p.highlightRect&&(p.map.removeLayer(p.highlightRect),p.highlightRect=null),pe(),!0}function Ju(){let s=document.getElementById("loading-overlay");s.style.display="flex";let t=()=>{s.style.display!=="none"&&p.websocketManager.request({type:"bounds"}).then(i=>{i.shapes_ready&&(s.style.display="none")}).catch(()=>{}).finally(()=>{s.style.display!=="none"&&setTimeout(t,1e3)})};setTimeout(t,1e3)}function Zs(){p.layerExtents&&p.layerExtents.refetch(s=>p.websocketManager.request(s))}function Qu(s){document.getElementById("loading-overlay").style.display="none",Zs(),cr(s.bounds,s.fit_bounds).then(t=>{t||pe()}).catch(()=>pe()),p.refreshInspector&&p.refreshInspector()}function tp(){let s=document.getElementById("script-running-badge");return s||(s=document.createElement("span"),s.id="script-running-badge",s.className="script-running-badge",s.textContent="Script running",s.title="The view updates when the script pauses or finishes",(document.getElementById("menu-bar")||document.body).appendChild(s),s)}function ep(s){if(p.scriptRunning=s,tp().style.display=s?"block":"none",!s){if(!p.booted||!p.designScale){Nu();return}p.refreshPending&&(p.refreshPending=!1,Zs(),p.refreshInspector&&p.refreshInspector()),cr().then(t=>{t||Xi()}).catch(()=>Xi())}}p.websocketManager.onPush=s=>{if(s.type==="refresh"){if(p.scriptRunning){p.refreshPending=!0;return}Qu(s)}else if(s.type==="script_running")ep(!!s.running);else if(s.type==="renderer_controls_changed")p.refreshRendererControls&&p.refreshRendererControls(),Xi();else if(s.type==="selection_invalidated")p.updateInspector&&p.updateInspector(null),p.stopSelectionAnimation&&p.stopSelectionAnimation(),p.highlightRect&&p.map&&(p.map.removeLayer(p.highlightRect),p.highlightRect=null),Si();else if(s.type==="heatmaps_changed")p.websocketManager.request({type:"heatmaps"}).then(or).catch(t=>console.error("Heat map refresh failed",t));else if(s.type==="labels_changed")p.labelManager&&p.labelManager.applyRemoteLabels(s.labels);else if(s.type==="drcUpdated")p._drcUpdateTimeout&&clearTimeout(p._drcUpdateTimeout),p._drcUpdateTimeout=setTimeout(()=>{p.drcWidget&&p.drcWidget.refresh()},500);else if(s.type==="debug_paused")p.refreshRendererControls&&p.refreshRendererControls(),Ku().style.display="block",Xi(),p.chartsWidget&&p.websocketManager.request({type:"debug_charts"}).then(t=>p.chartsWidget.setDebugCharts(t.charts||[])).catch(()=>{});else if(s.type==="debug_resumed"){let t=document.getElementById("debug-continue-btn");t&&(t.style.display="none")}else if(s.type==="debug_refresh"){if(p.scriptRunning)return;p.highlightRect&&(p.map.removeLayer(p.highlightRect),p.highlightRect=null),Xi()}else if(s.type==="log"){let t=s.text;t.endsWith(` +`)&&(t=t.slice(0,-1)),t&&Qe(t+` +`,"")}else s.type==="restore_display_state"?Tu(s.state):s.type==="custom_ui"?cc(s):s.type==="poly_decomp"?lr(s.value):s.type==="shutdown"&&(p.websocketManager._shutdown=!0,ki.innerHTML='
Server stopped
',ki.style.display="block")};p.websocketManager.readyPromise.then(async()=>{try{let h=function(u,f={}){let{addToSelection:_=!1,focusInspector:g=!0,context:y=!1,showConnectivity:v=!1}=f;if(!p.designScale)return Promise.resolve(null);let{dbuX:w,dbuY:b}=we(u.lat,u.lng,p.designScale,p.designMaxDXDY,p.designOriginX,p.designOriginY);if(p.labelManager&&p.labelManager.isActive()){p.labelManager.handleMapClick(w,b);return}let C=za(te,Li),R={type:"select",dbu_x:w,dbu_y:b,zoom:Math.round(p.map.getZoom()),visible_layers:[...p.visibleLayerNames],selectable_layers:[...p.selectableLayers],use_dbu:p.showDbu,...C};_&&(R.add_to_selection=!0),y&&(R.context=!0),v&&(R.show_connectivity=!0),p.visibleChiplets instanceof Set&&(R.visible_chiplets=[...p.visibleChiplets]);let P=ae(p);return p.websocketManager.request(R).then(T=>{if(he(p,P)){if(console.log("Select response:",T,"at dbu",w,b),p.map.closePopup(),Fi(p,T),T.selected&&T.selected.length>0){let Z=T.selected[0];Z.type==="Inst"&&(p.selectedInstanceName=Z.name,p.schematicWidget&&p.schematicWidget.refresh()),Pn(T),g&&Fs("Inspector"),T.bbox&&(Ou(T.bbox[0],T.bbox[1],T.bbox[2],T.bbox[3],T.type),Hu(T.bbox,T.type),p.lastSelectionBounds=Ut(T.bbox[0],T.bbox[1],T.bbox[2],T.bbox[3],p.designScale,p.designMaxDXDY,p.designOriginX,p.designOriginY)),R.show_connectivity&&T.connected_added>0&&Ce(`Selected ${T.connected_added} connected net`+(T.connected_added>1?"s":""))}else!_&&!y&&(Pn(null),p.highlightRect&&(p.map.removeLayer(p.highlightRect),p.highlightRect=null),p.lastSelectionBounds=null);return rr(),T}}).catch(T=>(console.error("Select failed:",T),null))},[s,t,i]=await Promise.all([p.websocketManager.request({type:"tech"}),p.websocketManager.request({type:"bounds"}),p.websocketManager.request({type:"heatmaps"})]);Zs(),p.hasLiberty=s.has_liberty,p.techData=s,tc(s.block_name),p.websocketManager.request({type:"custom_ui"}).then(cc).catch(()=>{}),p.websocketManager.request({type:"poly_decomp"}).then(u=>lr(u.value)).catch(()=>{});let o=t.bounds,r=t.fit_bounds;if(!Ne){let u=p.map.getSize();Aa(Wa({designBounds:o,fitRect:r,viewW:u.x,viewH:u.y}))}let l=hc(o,r);if(l){if(p.labelManager&&p.labelManager.reload(),p.map.fitBounds(p.fitBounds),Ne){let u=Ne.zoom;p.map.setMinZoom(u),p.map.setMaxZoom(u),p.map.fitBounds(p.fitBounds),p.map.scrollWheelZoom.disable(),p.map.touchZoom.disable(),p.map.boxZoom.disable(),p.map.doubleClickZoom.disable(),p.pathOverlay=L.imageOverlay("",Ut(o[0][1],o[0][0],o[1][1],o[1][0],p.designScale,p.designMaxDXDY,p.designOriginX,p.designOriginY),{opacity:1,interactive:!1,zIndex:1e3}),Ne.setPathOverlay=f=>{f?(p.pathOverlay.setUrl(f),p.pathOverlay.addTo(p.map)):p.map.removeLayer(p.pathOverlay)}}try{let u=sessionStorage.getItem("or_restore_view");if(u){sessionStorage.removeItem("or_restore_view");let f=JSON.parse(u);f&&isFinite(f.lat)&&isFinite(f.lng)&&isFinite(f.zoom)&&p.map.setView([f.lat,f.lng],f.zoom)}}catch{}}if(Ne&&(document.getElementById("loading-overlay").style.display="none"),p.selectAtLatLng=h,Ne||p.map.on("click",u=>{if(p.rulerManager&&p.rulerManager.isActive())return;let f=u.originalEvent;h(u.latlng,{addToSelection:!!(f&&f.shiftKey),showConnectivity:!!(f&&(f.ctrlKey||f.metaKey))})}),!Ne){let u=p.map.getContainer(),f=null,_=null;u.addEventListener("contextmenu",g=>{g.preventDefault()}),u.addEventListener("mousedown",g=>{g.button===2&&(f={x:g.clientX,y:g.clientY},p.map.dragging.disable())}),window.addEventListener("mousemove",g=>{if(!f)return;let y=g.clientX-f.x,v=g.clientY-f.y;if(!_&&Math.abs(y)>=4&&Math.abs(v)>=4&&(_=document.createElement("div"),_.className="rubber-band",document.body.appendChild(_)),_){let w=Math.min(f.x,g.clientX),b=Math.min(f.y,g.clientY);_.style.left=w+"px",_.style.top=b+"px",_.style.width=Math.abs(y)+"px",_.style.height=Math.abs(v)+"px"}}),window.addEventListener("mouseup",g=>{if(!f)return;let y=!!_;_&&(_.remove(),_=null);let v=f;f=null,p.map.dragging.enable();let w=u.getBoundingClientRect();if(y){let R=p.map.containerPointToLatLng([v.x-w.left,v.y-w.top]),P=p.map.containerPointToLatLng([g.clientX-w.left,g.clientY-w.top]);p.map.fitBounds([[Math.min(R.lat,P.lat),Math.min(R.lng,P.lng)],[Math.max(R.lat,P.lat),Math.max(R.lng,P.lng)]]);return}if(!(g.clientX>=w.left&&g.clientX<=w.right&&g.clientY>=w.top&&g.clientY<=w.bottom)||p.rulerManager&&p.rulerManager.isActive())return;let C=p.map.containerPointToLatLng([g.clientX-w.left,g.clientY-w.top]);p.selectAtLatLng(C,{context:!0,focusInspector:!1}).then(()=>p.contextMenu.show({originalEvent:g}))})}if(zl(p,te,Li,Mu,s,pe,Eu),!p.overlayLayer&&!Ne){let u=nl(te,p);p.overlayLayer=new u(p.websocketManager,{zIndex:p.allLayers.length+5,opacity:1}),p.overlayLayer.addTo(p.map)}or(i),l&&!t.shapes_ready&&Ju(),We(),p.booted=!0}catch(s){p.scriptRunning||console.error("Failed to load initial data from server:",s)}});document.addEventListener("openroad-cone-sync",s=>{p.schematicWidget?.syncCone(s.detail||{})});document.addEventListener("keydown",s=>{let t=s.target.tagName;if(t==="INPUT"||t==="TEXTAREA"||s.target.isContentEditable)return;let i=s.key.toLowerCase();i==="escape"&&p.rulerManager&&p.rulerManager.isActive()?p.rulerManager.cancelRulerBuild():i==="escape"&&p.labelManager&&p.labelManager.isActive()?p.labelManager.cancelLabelMode():i==="k"&&!s.shiftKey&&!s.ctrlKey&&!s.metaKey?p.rulerManager&&p.rulerManager.toggleRulerMode():i==="k"&&s.shiftKey&&!s.ctrlKey&&!s.metaKey?p.rulerManager&&p.rulerManager.clearAllRulers():i==="l"&&!s.shiftKey&&!s.ctrlKey&&!s.metaKey?p.labelManager&&p.labelManager.toggleLabelMode():i==="f"&&!s.ctrlKey&&!s.metaKey&&p.fitBounds?p.map.fitBounds(p.fitBounds):i==="z"&&!s.shiftKey&&!s.ctrlKey&&p.map?p.lastMouseLatLng?p.map.setZoomAround(p.lastMouseLatLng,p.map.getZoom()+1):p.map.zoomIn():i==="z"&&s.shiftKey&&!s.ctrlKey&&p.map?p.lastMouseLatLng?p.map.setZoomAround(p.lastMouseLatLng,p.map.getZoom()-1):p.map.zoomOut():i==="f"&&(s.ctrlKey||s.metaKey)?(s.preventDefault(),p.designScale&&Ps(p)):i==="g"&&s.shiftKey&&!s.ctrlKey&&!s.metaKey?(s.preventDefault(),p.designScale&&As(p)):i==="t"&&!s.shiftKey&&!s.ctrlKey&&!s.metaKey&&p.toggleTheme()},!0);})(); /*! Bundled license information: leaflet/dist/leaflet-src.js: @@ -540,10 +506,17 @@ lit-html/directive-helpers.js: * SPDX-License-Identifier: BSD-3-Clause *) -lit-html/directives/repeat.js: +lit-html/async-directive.js: (** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) + +lit-html/directives/ref.js: + (** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) */ diff --git a/src/web/src/grid-layout.js b/src/web/src/grid-layout.js index 3350a3e02da..436041e760e 100644 --- a/src/web/src/grid-layout.js +++ b/src/web/src/grid-layout.js @@ -5,7 +5,7 @@ import { LitElement, html, css, svg, nothing } from 'lit'; import { when } from 'lit/directives/when.js'; import { ifDefined } from 'lit/directives/if-defined.js'; import { classMap } from 'lit/directives/class-map.js'; -import { repeat } from 'lit/directives/repeat.js'; +import { createRef, ref } from 'lit/directives/ref.js'; import { wheelDeltaPx } from './ui-utils.js'; // ─── Native CSS Grid IDE Layout Manager & Custom Elements ──────────────────── @@ -83,10 +83,9 @@ export class IdePaneElement extends LitElement { collapsible: { type: Boolean, reflect: true }, maximized: { type: Boolean, reflect: true }, collapsed: { type: Boolean, reflect: true }, - _overflowing: { state: true }, - _fadeStart: { state: true }, - _fadeEnd: { state: true }, _menuOpen: { state: true }, + // Index, among the listed tabs, of the menu item with keyboard focus. + _focusIndex: { state: true }, }; static styles = [tabIconStyles, css` @@ -120,44 +119,24 @@ export class IdePaneElement extends LitElement { flex-shrink: 0; } + /* Fills up to the controls, so the fixed right-edge fade lies over + empty space when the tabs fit; a tab scrolled into view clears it. */ .ide-tabs { display: flex; + flex: 1; height: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; - --tab-fade: 24px; - /* Scrolling a tab into view keeps it clear of the faded edge. */ - scroll-padding-inline: var(--tab-fade); - -webkit-mask-image: var(--tab-mask, none); - mask-image: var(--tab-mask, none); + scroll-padding-inline-end: 24px; + -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); + mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); } .ide-tabs::-webkit-scrollbar { display: none; } - /* The tabs at their full width: its size is the strip's scrollWidth. */ - .ide-tabs-track { - display: flex; - flex: none; - height: 100%; - } - - /* Fade the edge that has tabs scrolled past it. */ - .ide-tabs.fade-start { - --tab-mask: linear-gradient(to left, #000 calc(100% - var(--tab-fade)), transparent); - } - - .ide-tabs.fade-end { - --tab-mask: linear-gradient(to right, #000 calc(100% - var(--tab-fade)), transparent); - } - - .ide-tabs.fade-start.fade-end { - --tab-mask: linear-gradient(to right, transparent, #000 var(--tab-fade), - #000 calc(100% - var(--tab-fade)), transparent); - } - .ide-controls { display: flex; align-items: center; @@ -182,16 +161,11 @@ export class IdePaneElement extends LitElement { } .ide-btn:hover, - .ide-btn-overflow[aria-expanded="true"] { + .ide-btn-tab-menu[aria-expanded="true"] { background: var(--bg-hover); color: var(--fg-primary); } - /* Always laid out, so whether the tabs overflow never depends on it showing. */ - .ide-btn-overflow.idle { - visibility: hidden; - } - .ide-btn.ide-btn-restore { width: auto; padding: 0 6px; @@ -272,110 +246,57 @@ export class IdePaneElement extends LitElement { constructor() { super(); - this._overflowing = false; - this._fadeStart = false; - this._fadeEnd = false; this._menuOpen = false; - this._tabsEl = null; - this._tabsTrack = null; - this._tabsSlot = null; - this._tabsObserver = null; - this._tabsMutations = null; + this._focusIndex = 0; + this._slotRef = createRef(); + this._menuRef = createRef(); + this._btnRef = createRef(); this._menuAbort = null; - this._menuHadFocus = false; - this._inUpdate = false; } connectedCallback() { super.connectedCallback(); this.classList.add('ide-pane', `ide-pane-${this.paneName}`); - if (this.hasUpdated) this._observeStrip(); } disconnectedCallback() { super.disconnectedCallback(); - this._tabsObserver?.disconnect(); this._closeMenu(); } - firstUpdated() { - this._tabsEl = this.renderRoot.querySelector('.ide-tabs'); - this._tabsTrack = this.renderRoot.querySelector('.ide-tabs-track'); - this._tabsSlot = this.renderRoot.querySelector('slot[name="tabs"]'); - // Its first callback takes the first measurement. - this._tabsObserver = new ResizeObserver(() => { - this._updateOverflow(); - // A narrower strip must not leave the active tab out of view. - this._tabs.find(tab => tab.active) - ?.scrollIntoView({ inline: 'nearest', block: 'nearest' }); - }); - // The open menu shows the tabs' state, which is not the pane's. - this._tabsMutations = new MutationObserver(() => this.requestUpdate()); - this._observeStrip(); - } - willUpdate(changedProperties) { - this._menuHadFocus = this._menuOpen && this._menuHasFocus(); - this._inUpdate = true; - if (this._menuOpen && (!this._overflowing || this.collapsed - || changedProperties.has('maximized'))) { - this._closeMenu(this._menuHadFocus); + if (!this._menuOpen) return; + if (this.collapsed || changedProperties.has('maximized')) { + this._closeMenu(this._menuRef.value?.contains(this.renderRoot.activeElement)); + return; } + // A listed tab may have been closed while the menu is open. + this._focusIndex = Math.min(this._focusIndex, Math.max(0, this._menuTabs.length - 1)); } - updated(changedProperties) { - this._inUpdate = false; - // On opening, or when the focused item's tab went away in this render. - if (this._menuOpen && (changedProperties.has('_menuOpen') - || (this._menuHadFocus && !this._menuHasFocus()))) { - this._focusMenuItem(); - } + updated() { + if (this._menuOpen) this._menuRef.value?.children[this._focusIndex]?.focus(); } get _tabs() { - return this._tabsSlot?.assignedElements() || []; + return this._slotRef.value?.assignedElements() ?? []; } - // The strip's box and its tabs' full width bound its scroll range. - _observeStrip() { - this._tabsObserver.observe(this._tabsEl); - this._tabsObserver.observe(this._tabsTrack); - } - - _observeTabs() { - this._tabsMutations.disconnect(); - for (const tab of this._tabs) { - this._tabsMutations.observe(tab, { - attributes: true, attributeFilter: ['active', 'hidden', 'title'], - }); - } - } - - _onTabsSlotChange() { - if (!this._menuOpen) return; - this._observeTabs(); - this.requestUpdate(); - } - - _updateOverflow() { - const el = this._tabsEl; - if (!el) return; - const max = el.scrollWidth - el.clientWidth; - this._overflowing = max > 1; - this._fadeStart = this._overflowing && el.scrollLeft > 1; - this._fadeEnd = this._overflowing && el.scrollLeft < max - 1; + get _menuTabs() { + return this._tabs.filter(tab => !tab.hidden); } _onTabsWheel(e) { + const strip = e.currentTarget; // Ctrl+wheel and trackpad pinch zoom the page. - if (e.ctrlKey || !this._overflowing + if (e.ctrlKey || strip.scrollWidth <= strip.clientWidth || Math.abs(e.deltaX) >= Math.abs(e.deltaY)) return; e.preventDefault(); // The vertical delta scrolls sideways, so a page is the strip's width. - this._tabsEl.scrollLeft += wheelDeltaPx(e, () => this._tabsEl.clientWidth)[1]; + strip.scrollLeft += wheelDeltaPx(e, () => strip.clientWidth)[1]; } - _onOverflowClick() { + _onMenuButtonClick() { if (this._menuOpen) { this._closeMenu(true); } else { @@ -385,15 +306,15 @@ export class IdePaneElement extends LitElement { _openMenu() { this._menuOpen = true; - this._observeTabs(); + this._focusIndex = Math.max(0, this._menuTabs.findIndex(tab => tab.active)); this._menuAbort = new AbortController(); const { signal } = this._menuAbort; document.addEventListener('pointerdown', (e) => { const path = e.composedPath(); - const inside = ['.ide-tab-menu', '.ide-btn-overflow'].some( - sel => path.includes(this.renderRoot.querySelector(sel))); - if (!inside) this._closeMenu(); + if (!path.includes(this._menuRef.value) && !path.includes(this._btnRef.value)) { + this._closeMenu(); + } }, { signal }); // Window capture: main.js reads Escape and single letters as shortcuts @@ -404,54 +325,43 @@ export class IdePaneElement extends LitElement { _closeMenu(restoreFocus = false) { this._menuAbort?.abort(); this._menuAbort = null; - this._tabsMutations?.disconnect(); this._menuOpen = false; - if (restoreFocus) this.renderRoot.querySelector('.ide-btn-overflow')?.focus(); - } - - _menuHasFocus() { - return !!this.renderRoot?.activeElement?.closest('.ide-tab-menu'); - } - - // The active tab's item, else the first. - _focusMenuItem() { - const items = [...this.renderRoot.querySelectorAll('.ide-tab-menu-item')]; - (items.find(item => item.getAttribute('aria-checked') === 'true') || items[0])?.focus(); + if (restoreFocus) this._btnRef.value?.focus(); } + // Closes when focus goes elsewhere. No relatedTarget (window blur, Safari's + // unfocused clicks, Chrome blurring an item a render removes) is not leaving. _onMenuFocusout(e) { - // Chrome blurs a focused item as a render removes it; updated() then - // focuses another one, so this is not focus leaving the menu. - if (this._inUpdate) return; - if (this._menuOpen && !e.currentTarget.contains(e.relatedTarget)) this._closeMenu(); - } - - // A press must not move focus off the menu before the click: on the ▾ the - // focusout would close it, and Safari does not focus a clicked item. - _keepMenuFocus(e) { - e.preventDefault(); + const to = e.relatedTarget; + if (to && !this._menuRef.value?.contains(to) && to !== this._btnRef.value) { + this._closeMenu(); + } } _onMenuKey(e) { - const menu = this.renderRoot.querySelector('.ide-tab-menu'); + const menu = this._menuRef.value; if (!menu || !e.composedPath().includes(menu)) return; - const items = [...menu.querySelectorAll('.ide-tab-menu-item')]; - const n = items.length; - const i = items.indexOf(this.renderRoot.activeElement); - let target = null; + const tabs = this._menuTabs; + const n = tabs.length; + const i = this._focusIndex; + let next = i; if (e.key === 'ArrowDown') { - target = items[(i + 1) % n]; + next = (i + 1) % n; } else if (e.key === 'ArrowUp') { - target = items[i <= 0 ? n - 1 : i - 1]; + next = (i - 1 + n) % n; } else if (e.key === 'Home') { - target = items[0]; + next = 0; } else if (e.key === 'End') { - target = items[n - 1]; + next = n - 1; } else if (e.key.length === 1 && e.key !== ' ' && !e.ctrlKey && !e.metaKey && !e.altKey) { - // Type-ahead: the next item whose title starts with the letter. + // Type-ahead: the next tab whose title starts with the letter. const letter = e.key.toLowerCase(); - target = [...items.slice(i + 1), ...items.slice(0, i + 1)].find(item => - item.querySelector('.ide-tab-menu-title').textContent.toLowerCase().startsWith(letter)); + for (let k = 1; k <= n; k++) { + if ((tabs[(i + k) % n].title || '').toLowerCase().startsWith(letter)) { + next = (i + k) % n; + break; + } + } } else if (e.key !== 'Escape') { return; } @@ -460,7 +370,7 @@ export class IdePaneElement extends LitElement { if (e.key === 'Escape') { this._closeMenu(true); } else { - target?.focus(); + this._focusIndex = next; } } @@ -470,15 +380,10 @@ export class IdePaneElement extends LitElement { } _renderTabMenu() { - const tabs = this._tabs.filter(tab => !tab.hidden); return html` -